jamespot-front-business 1.1.51 → 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 +206 -116
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +204 -112
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +573 -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 });
|
|
@@ -1395,6 +1400,9 @@ const initialState$b = {
|
|
|
1395
1400
|
folders: [],
|
|
1396
1401
|
unclassifiedFiles: { list: [], page: 0, totalPages: 0 },
|
|
1397
1402
|
mediaLibraryAccess: false,
|
|
1403
|
+
stats: null,
|
|
1404
|
+
foldersStats: { loading: false, pager: null },
|
|
1405
|
+
filesStats: { loading: false, pager: null },
|
|
1398
1406
|
};
|
|
1399
1407
|
const mediaLibrarySlice = toolkit.createSlice({
|
|
1400
1408
|
name: 'mediaLibrary',
|
|
@@ -1450,6 +1458,38 @@ const mediaLibrarySlice = toolkit.createSlice({
|
|
|
1450
1458
|
.addCase(fetchMediaLibraryConfig.pending, (state) => {
|
|
1451
1459
|
state.loading = 'pending';
|
|
1452
1460
|
state.mediaLibraryAccess = false;
|
|
1461
|
+
})
|
|
1462
|
+
.addCase(fetchMediaLibraryStats.fulfilled, (state, action) => {
|
|
1463
|
+
var _a;
|
|
1464
|
+
state.loading = 'idle';
|
|
1465
|
+
state.stats = Object.assign({}, (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result);
|
|
1466
|
+
})
|
|
1467
|
+
.addCase(fetchMediaLibraryStats.rejected, (state) => {
|
|
1468
|
+
state.loading = 'idle';
|
|
1469
|
+
state.stats = null;
|
|
1470
|
+
})
|
|
1471
|
+
.addCase(fetchMediaLibraryStats.pending, (state) => {
|
|
1472
|
+
state.loading = 'pending';
|
|
1473
|
+
})
|
|
1474
|
+
.addCase(fetchMediaLibraryFoldersStats.fulfilled, (state, action) => {
|
|
1475
|
+
var _a;
|
|
1476
|
+
state.foldersStats = { loading: false, pager: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result };
|
|
1477
|
+
})
|
|
1478
|
+
.addCase(fetchMediaLibraryFoldersStats.rejected, (state) => {
|
|
1479
|
+
state.foldersStats = { loading: false, pager: null };
|
|
1480
|
+
})
|
|
1481
|
+
.addCase(fetchMediaLibraryFoldersStats.pending, (state) => {
|
|
1482
|
+
state.foldersStats.loading = true;
|
|
1483
|
+
})
|
|
1484
|
+
.addCase(fetchMediaLibraryFilesStats.fulfilled, (state, action) => {
|
|
1485
|
+
var _a;
|
|
1486
|
+
state.filesStats = { loading: false, pager: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result };
|
|
1487
|
+
})
|
|
1488
|
+
.addCase(fetchMediaLibraryFilesStats.rejected, (state) => {
|
|
1489
|
+
state.filesStats = { loading: false, pager: null };
|
|
1490
|
+
})
|
|
1491
|
+
.addCase(fetchMediaLibraryFilesStats.pending, (state) => {
|
|
1492
|
+
state.filesStats.loading = true;
|
|
1453
1493
|
});
|
|
1454
1494
|
},
|
|
1455
1495
|
});
|
|
@@ -1489,12 +1529,54 @@ const fetchMediaLibraryConfig = toolkit.createAsyncThunk('MediaLibrary/fetchMedi
|
|
|
1489
1529
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary Config' });
|
|
1490
1530
|
}
|
|
1491
1531
|
}));
|
|
1532
|
+
const fetchMediaLibraryFoldersStats = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryFoldersStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1533
|
+
try {
|
|
1534
|
+
return yield extra.jApi.mediaLibrary.getFoldersStatsList(filters, orders, page);
|
|
1535
|
+
}
|
|
1536
|
+
catch (error) {
|
|
1537
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1538
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary folders stats' });
|
|
1539
|
+
}
|
|
1540
|
+
}));
|
|
1541
|
+
const fetchMediaLibraryFilesStats = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryFilesStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1542
|
+
try {
|
|
1543
|
+
return yield extra.jApi.mediaLibrary.getFilesStatsList(filters, orders, page);
|
|
1544
|
+
}
|
|
1545
|
+
catch (error) {
|
|
1546
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1547
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary files stats' });
|
|
1548
|
+
}
|
|
1549
|
+
}));
|
|
1550
|
+
const fetchMediaLibraryStats = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', ({ filters }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1551
|
+
try {
|
|
1552
|
+
return yield extra.jApi.mediaLibrary.getStats(filters);
|
|
1553
|
+
}
|
|
1554
|
+
catch (error) {
|
|
1555
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1556
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary stats' });
|
|
1557
|
+
}
|
|
1558
|
+
}));
|
|
1492
1559
|
const selectMediaLibrary = (state) => state.mediaLibrary;
|
|
1560
|
+
const selectMediaLibraryStats = (state) => state.mediaLibrary.stats;
|
|
1561
|
+
const selectMediaLibraryFoldersStats = (state) => state.mediaLibrary.foldersStats;
|
|
1562
|
+
const selectMediaLibraryFilesStats = (state) => state.mediaLibrary.filesStats;
|
|
1493
1563
|
const mediaLibraryReducer = mediaLibrarySlice.reducer;
|
|
1494
1564
|
const MediaLibrary = {
|
|
1495
1565
|
slice: mediaLibrarySlice,
|
|
1496
|
-
actions: {
|
|
1497
|
-
|
|
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
|
+
},
|
|
1498
1580
|
};
|
|
1499
1581
|
|
|
1500
1582
|
const adapter = toolkit.createEntityAdapter({
|
|
@@ -1503,7 +1585,7 @@ const adapter = toolkit.createEntityAdapter({
|
|
|
1503
1585
|
});
|
|
1504
1586
|
const getModelIconSrc = (model, size) => {
|
|
1505
1587
|
const imgProps = {
|
|
1506
|
-
from:
|
|
1588
|
+
from: 'imagestatic',
|
|
1507
1589
|
size: size !== null && size !== void 0 ? size : 'fitx600',
|
|
1508
1590
|
uri: `icons/${model && model.icon ? model.icon : `article`}-white`,
|
|
1509
1591
|
};
|
|
@@ -1520,9 +1602,9 @@ const slice$1 = toolkit.createSlice({
|
|
|
1520
1602
|
});
|
|
1521
1603
|
const selectors = adapter.getSelectors((state) => state.entities.models);
|
|
1522
1604
|
const utils = {
|
|
1523
|
-
getModelIconSrc
|
|
1605
|
+
getModelIconSrc,
|
|
1524
1606
|
};
|
|
1525
|
-
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);
|
|
1526
1608
|
const Model = {
|
|
1527
1609
|
slice: slice$1,
|
|
1528
1610
|
actions: Object.assign({}, slice$1.actions),
|
|
@@ -1569,7 +1651,7 @@ const Network = {
|
|
|
1569
1651
|
|
|
1570
1652
|
const initialState$9 = {
|
|
1571
1653
|
userHighlightFields: [],
|
|
1572
|
-
userAccountStatus: 0
|
|
1654
|
+
userAccountStatus: 0,
|
|
1573
1655
|
};
|
|
1574
1656
|
const PlatformConfigSlice = toolkit.createSlice({
|
|
1575
1657
|
name: 'config',
|
|
@@ -1637,7 +1719,7 @@ const initialState$8 = {
|
|
|
1637
1719
|
loading: 'idle',
|
|
1638
1720
|
loadingRecent: 'idle',
|
|
1639
1721
|
query: '',
|
|
1640
|
-
page: 1
|
|
1722
|
+
page: 1,
|
|
1641
1723
|
};
|
|
1642
1724
|
const WedocAppSlice = toolkit.createSlice({
|
|
1643
1725
|
name: 'wedoc',
|
|
@@ -1645,7 +1727,7 @@ const WedocAppSlice = toolkit.createSlice({
|
|
|
1645
1727
|
reducers: {
|
|
1646
1728
|
update: (state, action) => {
|
|
1647
1729
|
state.entities = [
|
|
1648
|
-
...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),
|
|
1649
1731
|
];
|
|
1650
1732
|
},
|
|
1651
1733
|
setQuery: (state, action) => {
|
|
@@ -1692,7 +1774,7 @@ const WedocApp = {
|
|
|
1692
1774
|
loading: state.wedoc.loading === 'pending',
|
|
1693
1775
|
tab: state.wedoc.tab,
|
|
1694
1776
|
query: state.wedoc.query,
|
|
1695
|
-
page: state.wedoc.page
|
|
1777
|
+
page: state.wedoc.page,
|
|
1696
1778
|
};
|
|
1697
1779
|
},
|
|
1698
1780
|
getRecent: (state) => {
|
|
@@ -1705,7 +1787,7 @@ const WedocApp = {
|
|
|
1705
1787
|
},
|
|
1706
1788
|
actions: {
|
|
1707
1789
|
fetchFiles,
|
|
1708
|
-
fetchRecentFiles
|
|
1790
|
+
fetchRecentFiles,
|
|
1709
1791
|
},
|
|
1710
1792
|
};
|
|
1711
1793
|
|
|
@@ -1724,9 +1806,7 @@ const ShareSlice = toolkit.createSlice({
|
|
|
1724
1806
|
initialState: initialState$7,
|
|
1725
1807
|
reducers: {
|
|
1726
1808
|
remove: (state, action) => {
|
|
1727
|
-
state.entities = [
|
|
1728
|
-
...state.entities.filter((entity) => entity.id !== action.payload)
|
|
1729
|
-
];
|
|
1809
|
+
state.entities = [...state.entities.filter((entity) => entity.id !== action.payload)];
|
|
1730
1810
|
},
|
|
1731
1811
|
},
|
|
1732
1812
|
extraReducers: (builder) => {
|
|
@@ -1750,7 +1830,7 @@ const Share = {
|
|
|
1750
1830
|
requests: (state) => {
|
|
1751
1831
|
return {
|
|
1752
1832
|
loading: state.share.loading,
|
|
1753
|
-
entities: state.share.entities
|
|
1833
|
+
entities: state.share.entities,
|
|
1754
1834
|
};
|
|
1755
1835
|
},
|
|
1756
1836
|
},
|
|
@@ -2213,7 +2293,14 @@ const widgetsSlice = toolkit.createSlice({
|
|
|
2213
2293
|
registerWidget: (state, action) => {
|
|
2214
2294
|
const { uniqid, widget } = action.payload;
|
|
2215
2295
|
state.ids[uniqid] = widget;
|
|
2216
|
-
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
|
+
};
|
|
2217
2304
|
},
|
|
2218
2305
|
registerWidgetObject: (state, action) => {
|
|
2219
2306
|
const { uniqid, object } = action.payload;
|
|
@@ -2370,9 +2457,11 @@ const editorsSlice = toolkit.createSlice({
|
|
|
2370
2457
|
const ed = {
|
|
2371
2458
|
uniqid,
|
|
2372
2459
|
name,
|
|
2373
|
-
position: 'right'
|
|
2460
|
+
position: 'right',
|
|
2374
2461
|
};
|
|
2375
|
-
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];
|
|
2376
2465
|
},
|
|
2377
2466
|
registerEditorPopup: (state, action) => {
|
|
2378
2467
|
const { uniqid, view } = action.payload;
|
|
@@ -2383,7 +2472,7 @@ const editorsSlice = toolkit.createSlice({
|
|
|
2383
2472
|
flushEditorPopup: (state, action) => {
|
|
2384
2473
|
const { uniqid } = action.payload;
|
|
2385
2474
|
state.editors = [
|
|
2386
|
-
...state.editors.map((editor) =>
|
|
2475
|
+
...state.editors.map((editor) => editor.uniqid === uniqid ? Object.assign(Object.assign({}, editor), { popup: false }) : editor),
|
|
2387
2476
|
];
|
|
2388
2477
|
},
|
|
2389
2478
|
setEditorPosition: (state, action) => {
|
|
@@ -3678,20 +3767,21 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3678
3767
|
if (state.deleteStudioAppStatus === 'pending') {
|
|
3679
3768
|
state.deleteStudioAppStatus = 'idle';
|
|
3680
3769
|
}
|
|
3681
|
-
state.studioAppsList =
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
status
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
app.inWorkVersion
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
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 : [];
|
|
3695
3785
|
})
|
|
3696
3786
|
.addCase(deleteStudioApp.rejected, (state) => {
|
|
3697
3787
|
if (state.deleteStudioAppStatus === 'pending')
|
|
@@ -3706,14 +3796,15 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3706
3796
|
if (state.suspendStudioAppStatus === 'pending') {
|
|
3707
3797
|
state.suspendStudioAppStatus = 'idle';
|
|
3708
3798
|
}
|
|
3709
|
-
state.studioAppsList =
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
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
|
+
}
|
|
3713
3806
|
return app;
|
|
3714
|
-
}
|
|
3715
|
-
return app;
|
|
3716
|
-
})) !== null && _b !== void 0 ? _b : [];
|
|
3807
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
3717
3808
|
})
|
|
3718
3809
|
.addCase(suspendStudioApp.rejected, (state) => {
|
|
3719
3810
|
if (state.suspendStudioAppStatus === 'pending')
|
|
@@ -3728,14 +3819,15 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3728
3819
|
if (state.restartStudioAppStatus === 'pending') {
|
|
3729
3820
|
state.restartStudioAppStatus = 'idle';
|
|
3730
3821
|
}
|
|
3731
|
-
state.studioAppsList =
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
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
|
+
}
|
|
3735
3829
|
return app;
|
|
3736
|
-
}
|
|
3737
|
-
return app;
|
|
3738
|
-
})) !== null && _b !== void 0 ? _b : [];
|
|
3830
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
3739
3831
|
})
|
|
3740
3832
|
.addCase(restartStudioApp.rejected, (state) => {
|
|
3741
3833
|
if (state.restartStudioAppStatus === 'pending')
|
|
@@ -3842,21 +3934,19 @@ exports.WidgetEditor = WidgetEditor;
|
|
|
3842
3934
|
exports.actions = actions;
|
|
3843
3935
|
exports.animationsReducer = animationsReducer;
|
|
3844
3936
|
exports.animationsSlice = animationsSlice;
|
|
3845
|
-
exports.deleteCurrentAnimation = deleteCurrentAnimation;
|
|
3846
|
-
exports.fetchCurrentAnimation = fetchCurrentAnimation;
|
|
3847
|
-
exports.fetchCurrentAnimationApp = fetchCurrentAnimationApp;
|
|
3848
3937
|
exports.fetchMediaLibraryConfig = fetchMediaLibraryConfig;
|
|
3938
|
+
exports.fetchMediaLibraryFilesStats = fetchMediaLibraryFilesStats;
|
|
3849
3939
|
exports.fetchMediaLibraryFolders = fetchMediaLibraryFolders;
|
|
3940
|
+
exports.fetchMediaLibraryFoldersStats = fetchMediaLibraryFoldersStats;
|
|
3941
|
+
exports.fetchMediaLibraryStats = fetchMediaLibraryStats;
|
|
3850
3942
|
exports.fetchMediaLibraryUnclassifiedFiles = fetchMediaLibraryUnclassifiedFiles;
|
|
3851
3943
|
exports.fetchPads = fetchPads;
|
|
3852
3944
|
exports.jland = jland;
|
|
3853
3945
|
exports.magicPadSlice = magicPadSlice;
|
|
3854
3946
|
exports.mediaLibraryReducer = mediaLibraryReducer;
|
|
3855
3947
|
exports.mediaLibrarySlice = mediaLibrarySlice;
|
|
3856
|
-
exports.saveCurrentAnimation = saveCurrentAnimation;
|
|
3857
3948
|
exports.slice = slice;
|
|
3858
3949
|
exports.studio = studio;
|
|
3859
|
-
exports.toggleAnimationIsActive = toggleAnimationIsActive;
|
|
3860
3950
|
exports.updateWidgetContent = updateWidgetContent;
|
|
3861
3951
|
exports.viewsList = viewsList;
|
|
3862
3952
|
//# sourceMappingURL=cjs.js.map
|