jamespot-front-business 1.1.52 → 1.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-internal.md +3 -4
- package/dist/cjs.js +138 -116
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +139 -112
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +426 -505
- package/package.json +2 -2
- package/tsconfig.json +0 -1
package/README-internal.md
CHANGED
|
@@ -7,17 +7,16 @@ https://github.com/Jamespot/jamespot-user-api/blob/develop/README-internal.md
|
|
|
7
7
|
|
|
8
8
|
### Installation
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
10
|
+
- PNPM is used in this project.
|
|
11
|
+
- It save time in packages installation and projects build among additional other features
|
|
12
12
|
|
|
13
13
|
follow this for more infos: https://pnpm.io/pnpm-cli
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
pnpm install --frozen-lockfile --ignore-scripts
|
|
16
|
+
pnpm install --frozen-lockfile --ignore-scripts
|
|
17
17
|
pnpm build
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
21
20
|
## Use in another package
|
|
22
21
|
|
|
23
22
|
```
|
package/dist/cjs.js
CHANGED
|
@@ -85,24 +85,72 @@ const Toast = {
|
|
|
85
85
|
selectors: selectors$2,
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
+
const fetchCurrentAnimation = toolkit.createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
89
|
+
try {
|
|
90
|
+
const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
|
|
91
|
+
const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
|
|
92
|
+
return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
|
|
93
|
+
}
|
|
94
|
+
catch (_) {
|
|
95
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
96
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
|
|
97
|
+
}
|
|
98
|
+
}));
|
|
99
|
+
const fetchCurrentAnimationApp = toolkit.createAsyncThunk('animations/fetchCurrentAnimationApp', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
100
|
+
try {
|
|
101
|
+
return (yield extra.jApi.animations.GetCurrentAnimationApp()).result;
|
|
102
|
+
}
|
|
103
|
+
catch (_) {
|
|
104
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
105
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
|
|
106
|
+
}
|
|
107
|
+
}));
|
|
108
|
+
const deleteCurrentAnimation = toolkit.createAsyncThunk('animations/deleteCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
109
|
+
try {
|
|
110
|
+
yield extra.jApi.animations.DeleteAnimation();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
catch (_) {
|
|
114
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
115
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot delete animation' });
|
|
116
|
+
}
|
|
117
|
+
}));
|
|
118
|
+
const saveCurrentAnimation = toolkit.createAsyncThunk('animations/saveCurrentAnimation', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
119
|
+
try {
|
|
120
|
+
yield extra.jApi.animations.SaveAnimationConfiguration(params);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
catch (_) {
|
|
124
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
125
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
|
|
126
|
+
}
|
|
127
|
+
}));
|
|
128
|
+
const toggleAnimationIsActive = toolkit.createAsyncThunk('animations/toggleAnimationIsActive', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
129
|
+
try {
|
|
130
|
+
yield extra.jApi.animations.ToggleAnimationActive();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
catch (_) {
|
|
134
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
135
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
|
|
136
|
+
}
|
|
137
|
+
}));
|
|
138
|
+
|
|
88
139
|
const getAnimationsRTHandlers = function (dispatch) {
|
|
89
140
|
const addAnimationHandler = function (message) {
|
|
90
|
-
if (message.namespace === 'ANIMATIONS' &&
|
|
91
|
-
message.function === 'add') {
|
|
141
|
+
if (message.namespace === 'ANIMATIONS' && message.function === 'add') {
|
|
92
142
|
dispatch(fetchCurrentAnimation());
|
|
93
143
|
dispatch(fetchCurrentAnimationApp());
|
|
94
144
|
}
|
|
95
145
|
};
|
|
96
146
|
const deleteAnimationHandler = function (message) {
|
|
97
|
-
if (message.namespace === 'ANIMATIONS' &&
|
|
98
|
-
message.function === 'delete') {
|
|
147
|
+
if (message.namespace === 'ANIMATIONS' && message.function === 'delete') {
|
|
99
148
|
dispatch(fetchCurrentAnimation());
|
|
100
149
|
dispatch(fetchCurrentAnimationApp());
|
|
101
150
|
}
|
|
102
151
|
};
|
|
103
152
|
const toggleIsActiveAnimationHandler = function (message) {
|
|
104
|
-
if (message.namespace === 'ANIMATIONS' &&
|
|
105
|
-
message.function === 'toggle') {
|
|
153
|
+
if (message.namespace === 'ANIMATIONS' && message.function === 'toggle') {
|
|
106
154
|
dispatch(fetchCurrentAnimation());
|
|
107
155
|
}
|
|
108
156
|
};
|
|
@@ -157,56 +205,6 @@ const animationsSlice = toolkit.createSlice({
|
|
|
157
205
|
});
|
|
158
206
|
},
|
|
159
207
|
});
|
|
160
|
-
const fetchCurrentAnimation = toolkit.createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
161
|
-
try {
|
|
162
|
-
const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
|
|
163
|
-
const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
|
|
164
|
-
return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
|
|
165
|
-
}
|
|
166
|
-
catch (_) {
|
|
167
|
-
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
168
|
-
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
|
|
169
|
-
}
|
|
170
|
-
}));
|
|
171
|
-
const fetchCurrentAnimationApp = toolkit.createAsyncThunk('animations/fetchCurrentAnimationApp', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
172
|
-
try {
|
|
173
|
-
return (yield extra.jApi.animations.GetCurrentAnimationApp()).result;
|
|
174
|
-
}
|
|
175
|
-
catch (_) {
|
|
176
|
-
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
177
|
-
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
|
|
178
|
-
}
|
|
179
|
-
}));
|
|
180
|
-
const deleteCurrentAnimation = toolkit.createAsyncThunk('animations/deleteCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
181
|
-
try {
|
|
182
|
-
yield extra.jApi.animations.DeleteAnimation();
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
catch (_) {
|
|
186
|
-
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
187
|
-
return rejectWithValue({ error: 1, errorMsg: 'Cannot delete animation' });
|
|
188
|
-
}
|
|
189
|
-
}));
|
|
190
|
-
const saveCurrentAnimation = toolkit.createAsyncThunk('animations/saveCurrentAnimation', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
191
|
-
try {
|
|
192
|
-
yield extra.jApi.animations.SaveAnimationConfiguration(params);
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
catch (_) {
|
|
196
|
-
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
197
|
-
return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
|
|
198
|
-
}
|
|
199
|
-
}));
|
|
200
|
-
const toggleAnimationIsActive = toolkit.createAsyncThunk('animations/toggleAnimationIsActive', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
201
|
-
try {
|
|
202
|
-
yield extra.jApi.animations.ToggleAnimationActive();
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
catch (_) {
|
|
206
|
-
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
207
|
-
return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
|
|
208
|
-
}
|
|
209
|
-
}));
|
|
210
208
|
const selectCurrentAnimation = (state) => state.animations.animationConfiguration;
|
|
211
209
|
const isActiveAnimation = (state) => state.animations.isActiveForCurrentUser;
|
|
212
210
|
const isToggleLoading = (state) => state.animations.isToggleLoading;
|
|
@@ -468,10 +466,12 @@ const getCommentsLikeRTHandlers = function (dispatch, idComments, idArticle) {
|
|
|
468
466
|
dispatch(fetchComments({ idArticle }));
|
|
469
467
|
}
|
|
470
468
|
};
|
|
471
|
-
return idComments
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
469
|
+
return idComments
|
|
470
|
+
? [
|
|
471
|
+
{ namespace: 'CUSTOM-ACTION', function: 'add', handler: commentLikeHandler },
|
|
472
|
+
{ namespace: 'CUSTOM-ACTION', function: 'remove', handler: commentLikeHandler },
|
|
473
|
+
]
|
|
474
|
+
: [];
|
|
475
475
|
};
|
|
476
476
|
|
|
477
477
|
const CommentReducer = redux.combineReducers({
|
|
@@ -751,7 +751,7 @@ const BookmarkEditSlice = toolkit.createSlice({
|
|
|
751
751
|
resetStatus: (state) => {
|
|
752
752
|
state.status = undefined;
|
|
753
753
|
state.loading = 'idle';
|
|
754
|
-
}
|
|
754
|
+
},
|
|
755
755
|
},
|
|
756
756
|
extraReducers: (builder) => {
|
|
757
757
|
builder
|
|
@@ -784,11 +784,15 @@ const selectBookmarkListIsInitialized = (state) => state.bookmark.bookmarkList.i
|
|
|
784
784
|
const selectBookmarkEditBookmark = (state) => state.bookmark.bookmarkEdit.bookmark;
|
|
785
785
|
const Bookmark = {
|
|
786
786
|
slice: bookmarkSlice,
|
|
787
|
-
actions: Object.assign(Object.assign({ fetchBookmark,
|
|
787
|
+
actions: Object.assign(Object.assign({ fetchBookmark,
|
|
788
|
+
addBookmark,
|
|
789
|
+
moveBookmark,
|
|
790
|
+
deleteBookmark,
|
|
791
|
+
editBookmark }, BookmarkEditSlice.actions), BookmarkListSlice.actions),
|
|
788
792
|
selectors: {
|
|
789
793
|
bookmarkList: selectBookmarkList,
|
|
790
794
|
bookmarkListIsInitialized: selectBookmarkListIsInitialized,
|
|
791
|
-
bookmarkEditBookmark: selectBookmarkEditBookmark
|
|
795
|
+
bookmarkEditBookmark: selectBookmarkEditBookmark,
|
|
792
796
|
},
|
|
793
797
|
getRTHandlers: getBookmarkRTHandlers,
|
|
794
798
|
};
|
|
@@ -801,7 +805,7 @@ const fetchFaqConfig = toolkit.createAsyncThunk('faqConfig/fetch', () => __await
|
|
|
801
805
|
try {
|
|
802
806
|
const [hookProperties, access] = yield Promise.all([
|
|
803
807
|
yield jamespot__default["default"].faq.getHookProperties(['_web', 'appImage', 'appImageText', '_displayComment']),
|
|
804
|
-
yield jamespot__default["default"].faq.getAccess()
|
|
808
|
+
yield jamespot__default["default"].faq.getAccess(),
|
|
805
809
|
]);
|
|
806
810
|
return {
|
|
807
811
|
_web: hookProperties.result._web,
|
|
@@ -1201,7 +1205,8 @@ const createMap = toolkit.createAsyncThunk('mapCreate/create', ({ map, jlandUrlB
|
|
|
1201
1205
|
};
|
|
1202
1206
|
const jApi = extra.jApi;
|
|
1203
1207
|
return yield new Promise((resolve, reject) => {
|
|
1204
|
-
jApi.article
|
|
1208
|
+
jApi.article
|
|
1209
|
+
.create(payload, 'raw-list')
|
|
1205
1210
|
.then((response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1206
1211
|
if (response.error) {
|
|
1207
1212
|
reject({ error: 1, errorMsg: response.errorMsg });
|
|
@@ -1558,8 +1563,20 @@ const selectMediaLibraryFilesStats = (state) => state.mediaLibrary.filesStats;
|
|
|
1558
1563
|
const mediaLibraryReducer = mediaLibrarySlice.reducer;
|
|
1559
1564
|
const MediaLibrary = {
|
|
1560
1565
|
slice: mediaLibrarySlice,
|
|
1561
|
-
actions: {
|
|
1562
|
-
|
|
1566
|
+
actions: {
|
|
1567
|
+
fetchMediaLibraryFolders,
|
|
1568
|
+
fetchMediaLibraryUnclassifiedFiles,
|
|
1569
|
+
fetchMediaLibraryConfig,
|
|
1570
|
+
fetchMediaLibraryStats,
|
|
1571
|
+
fetchMediaLibraryFilesStats,
|
|
1572
|
+
fetchMediaLibraryFoldersStats,
|
|
1573
|
+
},
|
|
1574
|
+
selectors: {
|
|
1575
|
+
selectMediaLibrary,
|
|
1576
|
+
selectMediaLibraryStats,
|
|
1577
|
+
selectMediaLibraryFoldersStats,
|
|
1578
|
+
selectMediaLibraryFilesStats,
|
|
1579
|
+
},
|
|
1563
1580
|
};
|
|
1564
1581
|
|
|
1565
1582
|
const adapter = toolkit.createEntityAdapter({
|
|
@@ -1568,7 +1585,7 @@ const adapter = toolkit.createEntityAdapter({
|
|
|
1568
1585
|
});
|
|
1569
1586
|
const getModelIconSrc = (model, size) => {
|
|
1570
1587
|
const imgProps = {
|
|
1571
|
-
from:
|
|
1588
|
+
from: 'imagestatic',
|
|
1572
1589
|
size: size !== null && size !== void 0 ? size : 'fitx600',
|
|
1573
1590
|
uri: `icons/${model && model.icon ? model.icon : `article`}-white`,
|
|
1574
1591
|
};
|
|
@@ -1585,9 +1602,9 @@ const slice$1 = toolkit.createSlice({
|
|
|
1585
1602
|
});
|
|
1586
1603
|
const selectors = adapter.getSelectors((state) => state.entities.models);
|
|
1587
1604
|
const utils = {
|
|
1588
|
-
getModelIconSrc
|
|
1605
|
+
getModelIconSrc,
|
|
1589
1606
|
};
|
|
1590
|
-
const selectByIds = (state, types) => types.map(type => state.entities.models.entities[type]).filter(model => !!model);
|
|
1607
|
+
const selectByIds = (state, types) => types.map((type) => state.entities.models.entities[type]).filter((model) => !!model);
|
|
1591
1608
|
const Model = {
|
|
1592
1609
|
slice: slice$1,
|
|
1593
1610
|
actions: Object.assign({}, slice$1.actions),
|
|
@@ -1634,7 +1651,7 @@ const Network = {
|
|
|
1634
1651
|
|
|
1635
1652
|
const initialState$9 = {
|
|
1636
1653
|
userHighlightFields: [],
|
|
1637
|
-
userAccountStatus: 0
|
|
1654
|
+
userAccountStatus: 0,
|
|
1638
1655
|
};
|
|
1639
1656
|
const PlatformConfigSlice = toolkit.createSlice({
|
|
1640
1657
|
name: 'config',
|
|
@@ -1702,7 +1719,7 @@ const initialState$8 = {
|
|
|
1702
1719
|
loading: 'idle',
|
|
1703
1720
|
loadingRecent: 'idle',
|
|
1704
1721
|
query: '',
|
|
1705
|
-
page: 1
|
|
1722
|
+
page: 1,
|
|
1706
1723
|
};
|
|
1707
1724
|
const WedocAppSlice = toolkit.createSlice({
|
|
1708
1725
|
name: 'wedoc',
|
|
@@ -1710,7 +1727,7 @@ const WedocAppSlice = toolkit.createSlice({
|
|
|
1710
1727
|
reducers: {
|
|
1711
1728
|
update: (state, action) => {
|
|
1712
1729
|
state.entities = [
|
|
1713
|
-
...state.entities.map((file) => file.id === action.payload.id ? Object.assign(Object.assign({}, file), action.payload) : file)
|
|
1730
|
+
...state.entities.map((file) => file.id === action.payload.id ? Object.assign(Object.assign({}, file), action.payload) : file),
|
|
1714
1731
|
];
|
|
1715
1732
|
},
|
|
1716
1733
|
setQuery: (state, action) => {
|
|
@@ -1757,7 +1774,7 @@ const WedocApp = {
|
|
|
1757
1774
|
loading: state.wedoc.loading === 'pending',
|
|
1758
1775
|
tab: state.wedoc.tab,
|
|
1759
1776
|
query: state.wedoc.query,
|
|
1760
|
-
page: state.wedoc.page
|
|
1777
|
+
page: state.wedoc.page,
|
|
1761
1778
|
};
|
|
1762
1779
|
},
|
|
1763
1780
|
getRecent: (state) => {
|
|
@@ -1770,7 +1787,7 @@ const WedocApp = {
|
|
|
1770
1787
|
},
|
|
1771
1788
|
actions: {
|
|
1772
1789
|
fetchFiles,
|
|
1773
|
-
fetchRecentFiles
|
|
1790
|
+
fetchRecentFiles,
|
|
1774
1791
|
},
|
|
1775
1792
|
};
|
|
1776
1793
|
|
|
@@ -1789,9 +1806,7 @@ const ShareSlice = toolkit.createSlice({
|
|
|
1789
1806
|
initialState: initialState$7,
|
|
1790
1807
|
reducers: {
|
|
1791
1808
|
remove: (state, action) => {
|
|
1792
|
-
state.entities = [
|
|
1793
|
-
...state.entities.filter((entity) => entity.id !== action.payload)
|
|
1794
|
-
];
|
|
1809
|
+
state.entities = [...state.entities.filter((entity) => entity.id !== action.payload)];
|
|
1795
1810
|
},
|
|
1796
1811
|
},
|
|
1797
1812
|
extraReducers: (builder) => {
|
|
@@ -1815,7 +1830,7 @@ const Share = {
|
|
|
1815
1830
|
requests: (state) => {
|
|
1816
1831
|
return {
|
|
1817
1832
|
loading: state.share.loading,
|
|
1818
|
-
entities: state.share.entities
|
|
1833
|
+
entities: state.share.entities,
|
|
1819
1834
|
};
|
|
1820
1835
|
},
|
|
1821
1836
|
},
|
|
@@ -2278,7 +2293,14 @@ const widgetsSlice = toolkit.createSlice({
|
|
|
2278
2293
|
registerWidget: (state, action) => {
|
|
2279
2294
|
const { uniqid, widget } = action.payload;
|
|
2280
2295
|
state.ids[uniqid] = widget;
|
|
2281
|
-
state.states[uniqid] = {
|
|
2296
|
+
state.states[uniqid] = {
|
|
2297
|
+
busy: false,
|
|
2298
|
+
initialized: false,
|
|
2299
|
+
loading: false,
|
|
2300
|
+
mounted: false,
|
|
2301
|
+
hover: false,
|
|
2302
|
+
empty: true,
|
|
2303
|
+
};
|
|
2282
2304
|
},
|
|
2283
2305
|
registerWidgetObject: (state, action) => {
|
|
2284
2306
|
const { uniqid, object } = action.payload;
|
|
@@ -2435,9 +2457,11 @@ const editorsSlice = toolkit.createSlice({
|
|
|
2435
2457
|
const ed = {
|
|
2436
2458
|
uniqid,
|
|
2437
2459
|
name,
|
|
2438
|
-
position: 'right'
|
|
2460
|
+
position: 'right',
|
|
2439
2461
|
};
|
|
2440
|
-
state.editors = state.editors.find((ed) => ed.uniqid === uniqid)
|
|
2462
|
+
state.editors = state.editors.find((ed) => ed.uniqid === uniqid)
|
|
2463
|
+
? state.editors
|
|
2464
|
+
: [...state.editors, ed];
|
|
2441
2465
|
},
|
|
2442
2466
|
registerEditorPopup: (state, action) => {
|
|
2443
2467
|
const { uniqid, view } = action.payload;
|
|
@@ -2448,7 +2472,7 @@ const editorsSlice = toolkit.createSlice({
|
|
|
2448
2472
|
flushEditorPopup: (state, action) => {
|
|
2449
2473
|
const { uniqid } = action.payload;
|
|
2450
2474
|
state.editors = [
|
|
2451
|
-
...state.editors.map((editor) =>
|
|
2475
|
+
...state.editors.map((editor) => editor.uniqid === uniqid ? Object.assign(Object.assign({}, editor), { popup: false }) : editor),
|
|
2452
2476
|
];
|
|
2453
2477
|
},
|
|
2454
2478
|
setEditorPosition: (state, action) => {
|
|
@@ -3743,20 +3767,21 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3743
3767
|
if (state.deleteStudioAppStatus === 'pending') {
|
|
3744
3768
|
state.deleteStudioAppStatus = 'idle';
|
|
3745
3769
|
}
|
|
3746
|
-
state.studioAppsList =
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
status
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
app.inWorkVersion
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3770
|
+
state.studioAppsList =
|
|
3771
|
+
(_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.reduce((acc, app) => {
|
|
3772
|
+
const { idApp } = action.meta.arg;
|
|
3773
|
+
let { status } = action.meta.arg;
|
|
3774
|
+
if (status === APP_STATUS_TYPE.INSTALLED)
|
|
3775
|
+
status = APP_STATUS_TYPE.SUSPENDED;
|
|
3776
|
+
if (app.idApp === idApp && app.status === status)
|
|
3777
|
+
return acc;
|
|
3778
|
+
if (app.inWorkVersion &&
|
|
3779
|
+
app.inWorkVersion.idApp === idApp &&
|
|
3780
|
+
app.inWorkVersion.status === status) {
|
|
3781
|
+
delete app.inWorkVersion;
|
|
3782
|
+
}
|
|
3783
|
+
return [...acc, app];
|
|
3784
|
+
}, [])) !== null && _b !== void 0 ? _b : [];
|
|
3760
3785
|
})
|
|
3761
3786
|
.addCase(deleteStudioApp.rejected, (state) => {
|
|
3762
3787
|
if (state.deleteStudioAppStatus === 'pending')
|
|
@@ -3771,14 +3796,15 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3771
3796
|
if (state.suspendStudioAppStatus === 'pending') {
|
|
3772
3797
|
state.suspendStudioAppStatus = 'idle';
|
|
3773
3798
|
}
|
|
3774
|
-
state.studioAppsList =
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
app.
|
|
3799
|
+
state.studioAppsList =
|
|
3800
|
+
(_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
|
|
3801
|
+
const { idApp } = action.meta.arg;
|
|
3802
|
+
if (app.idApp === idApp) {
|
|
3803
|
+
app.status = APP_STATUS_TYPE.SUSPENDED;
|
|
3804
|
+
return app;
|
|
3805
|
+
}
|
|
3778
3806
|
return app;
|
|
3779
|
-
}
|
|
3780
|
-
return app;
|
|
3781
|
-
})) !== null && _b !== void 0 ? _b : [];
|
|
3807
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
3782
3808
|
})
|
|
3783
3809
|
.addCase(suspendStudioApp.rejected, (state) => {
|
|
3784
3810
|
if (state.suspendStudioAppStatus === 'pending')
|
|
@@ -3793,14 +3819,15 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3793
3819
|
if (state.restartStudioAppStatus === 'pending') {
|
|
3794
3820
|
state.restartStudioAppStatus = 'idle';
|
|
3795
3821
|
}
|
|
3796
|
-
state.studioAppsList =
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
app.
|
|
3822
|
+
state.studioAppsList =
|
|
3823
|
+
(_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
|
|
3824
|
+
const { idApp } = action.meta.arg;
|
|
3825
|
+
if (app.idApp === idApp) {
|
|
3826
|
+
app.status = APP_STATUS_TYPE.INSTALLED;
|
|
3827
|
+
return app;
|
|
3828
|
+
}
|
|
3800
3829
|
return app;
|
|
3801
|
-
}
|
|
3802
|
-
return app;
|
|
3803
|
-
})) !== null && _b !== void 0 ? _b : [];
|
|
3830
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
3804
3831
|
})
|
|
3805
3832
|
.addCase(restartStudioApp.rejected, (state) => {
|
|
3806
3833
|
if (state.restartStudioAppStatus === 'pending')
|
|
@@ -3907,9 +3934,6 @@ exports.WidgetEditor = WidgetEditor;
|
|
|
3907
3934
|
exports.actions = actions;
|
|
3908
3935
|
exports.animationsReducer = animationsReducer;
|
|
3909
3936
|
exports.animationsSlice = animationsSlice;
|
|
3910
|
-
exports.deleteCurrentAnimation = deleteCurrentAnimation;
|
|
3911
|
-
exports.fetchCurrentAnimation = fetchCurrentAnimation;
|
|
3912
|
-
exports.fetchCurrentAnimationApp = fetchCurrentAnimationApp;
|
|
3913
3937
|
exports.fetchMediaLibraryConfig = fetchMediaLibraryConfig;
|
|
3914
3938
|
exports.fetchMediaLibraryFilesStats = fetchMediaLibraryFilesStats;
|
|
3915
3939
|
exports.fetchMediaLibraryFolders = fetchMediaLibraryFolders;
|
|
@@ -3921,10 +3945,8 @@ exports.jland = jland;
|
|
|
3921
3945
|
exports.magicPadSlice = magicPadSlice;
|
|
3922
3946
|
exports.mediaLibraryReducer = mediaLibraryReducer;
|
|
3923
3947
|
exports.mediaLibrarySlice = mediaLibrarySlice;
|
|
3924
|
-
exports.saveCurrentAnimation = saveCurrentAnimation;
|
|
3925
3948
|
exports.slice = slice;
|
|
3926
3949
|
exports.studio = studio;
|
|
3927
|
-
exports.toggleAnimationIsActive = toggleAnimationIsActive;
|
|
3928
3950
|
exports.updateWidgetContent = updateWidgetContent;
|
|
3929
3951
|
exports.viewsList = viewsList;
|
|
3930
3952
|
//# sourceMappingURL=cjs.js.map
|