actions.js (4083B)
1 export const actions = { 2 setLibrary( library ) { 3 return { 4 type: 'SET_LIBRARY', 5 library 6 }; 7 }, 8 fetchLibraryFromAPI( path ) { 9 return { 10 type: 'FETCH_LIBRARY_FROM_API', 11 path, 12 }; 13 }, 14 setActiveItemType( activeItemType ) { 15 return { 16 type: 'SET_ACTIVE_ITEM_TYPE', 17 activeItemType 18 } 19 }, 20 setActiveCategory( activeCategory ) { 21 return { 22 type: 'SET_ACTIVE_CATEGORY', 23 activeCategory 24 } 25 }, 26 setActiveCollection( activeCollection ) { 27 return { 28 type: 'SET_ACTIVE_COLLECTION', 29 activeCollection 30 } 31 }, 32 setActivePriceFilter( activePriceFilter ) { 33 return { 34 type: 'SET_ACTIVE_PRICE_FILTER', 35 activePriceFilter 36 } 37 }, 38 setSearchContext( searchContext ) { 39 return { 40 type: 'SET_SEARCH_CONTEXT', 41 searchContext 42 } 43 }, 44 setDependencyFilters( dependencyFilters ) { 45 return { 46 type: 'SET_DEPENDENCY_FILTERS', 47 dependencyFilters 48 } 49 }, 50 setCurrentPage( currentPage ) { 51 return { 52 type: 'SET_CURRENT_PAGE', 53 currentPage 54 } 55 }, 56 setLoading( loading ) { 57 return { 58 type: 'SET_LOADING', 59 loading 60 } 61 }, 62 setColumns( columns ) { 63 return { 64 type: 'SET_COLUMNS', 65 columns 66 } 67 }, 68 setSortBy( sortBy ) { 69 return { 70 type: 'SET_SORT_BY', 71 sortBy 72 } 73 }, 74 appendErrorMessage( errorMessage ) { 75 return { 76 type: 'APPEND_ERROR_MESSAGE', 77 errorMessage: errorMessage || 'Unknown Error' 78 } 79 }, 80 discardAllErrorMessages() { 81 return { 82 type: 'DISCARD_ALL_ERROR_MESSAGES' 83 } 84 }, 85 setInstalledDependencies(installedDependencies) { 86 return { 87 type: 'SET_INSTALLED_DEPENDENCIES', 88 installedDependencies 89 } 90 }, 91 setTourOpen(isTourOpen) { 92 return { 93 type: 'SET_TOUR_OPEN', 94 isTourOpen 95 } 96 }, 97 setTourActiveButtonGroup(data) { 98 return { 99 type: 'SET_TOUR_ACTIVE_BUTTON_GROUP', 100 data 101 } 102 }, 103 setTourPreviewVisible(isVisible) { 104 return { 105 type: 'SET_PREVIEW_VISIBLE', 106 isVisible 107 } 108 }, 109 setImportingTemplate(importingTemplate) { 110 return { 111 type: 'SET_IMPORTING_TEMPLATE', 112 importingTemplate 113 } 114 }, 115 setChallengeStep(data) { 116 return { 117 type: 'SET_CHALLENGE_STEP', 118 data 119 } 120 }, 121 setChallengeOpen(data) { 122 return { 123 type: 'SET_CHALLENGE_OPEN', 124 data 125 } 126 }, 127 setChallengeTooltipRect(data) { 128 return { 129 type: 'SET_CHALLENGE_TOOLTIP_RECT', 130 data 131 } 132 }, 133 setChallengeFinalStatus(data) { 134 return { 135 type: 'SET_CHALLENGE_FINAL_STATUS', 136 data 137 } 138 }, 139 setChallengePassed(data) { 140 return { 141 type: 'SET_CHALLENGE_PASSED', 142 data 143 } 144 }, 145 setChallengeListExpanded(data){ 146 return { 147 type: 'SET_CHALLENGE_LIST_EXPANDED', 148 data 149 } 150 }, 151 setActivateDialogDisplay(data) { 152 return { 153 type: 'SET_ACTIVATE_DIALOG_DISPLAY', 154 data 155 } 156 }, 157 setImportToAppend(data) { 158 return { 159 type: 'SET_IMPORT_TO_APPEND', 160 data 161 } 162 }, 163 setDependencyFilterRule(data) { 164 return { 165 type: 'SET_DEPENDENCY_FILTER_RULE', 166 data 167 } 168 }, 169 selectDependencies(data) { 170 return { 171 type: 'SELECT_DEPENDENCIES', 172 data 173 } 174 }, 175 clearSearch() { 176 return { 177 type: 'CLEAR_SEARCH' 178 } 179 }, 180 clearState() { 181 return { 182 type: 'CLEAR_STATE' 183 } 184 } 185 };