jamespot-front-business 1.1.44 → 1.1.46
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.md +1 -1
- package/dist/cjs.js +192 -42
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +186 -43
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +326 -9
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/cjs.js
CHANGED
|
@@ -51,7 +51,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
51
51
|
const toastAdapter = toolkit.createEntityAdapter({
|
|
52
52
|
selectId: (toast) => toast.id,
|
|
53
53
|
});
|
|
54
|
-
const slice$
|
|
54
|
+
const slice$4 = toolkit.createSlice({
|
|
55
55
|
name: 'toasts',
|
|
56
56
|
initialState: toastAdapter.getInitialState(),
|
|
57
57
|
reducers: {
|
|
@@ -65,9 +65,9 @@ const addMessage = (_a, type, timeout) => {
|
|
|
65
65
|
if (type === void 0) { type = 'success'; }
|
|
66
66
|
if (timeout === void 0) { timeout = 3000; }
|
|
67
67
|
return (dispatch) => {
|
|
68
|
-
dispatch(slice$
|
|
68
|
+
dispatch(slice$4.actions.addOne(Object.assign(Object.assign({ id }, toast), { timeout, type })));
|
|
69
69
|
setTimeout(() => {
|
|
70
|
-
dispatch(slice$
|
|
70
|
+
dispatch(slice$4.actions.removeOne(id));
|
|
71
71
|
}, timeout);
|
|
72
72
|
return id;
|
|
73
73
|
};
|
|
@@ -80,8 +80,8 @@ const actions = {
|
|
|
80
80
|
};
|
|
81
81
|
const selectors$2 = toastAdapter.getSelectors((state) => state.toasts);
|
|
82
82
|
const Toast = {
|
|
83
|
-
slice: slice$
|
|
84
|
-
actions: Object.assign(Object.assign({}, actions), slice$
|
|
83
|
+
slice: slice$4,
|
|
84
|
+
actions: Object.assign(Object.assign({}, actions), slice$4.actions),
|
|
85
85
|
selectors: selectors$2,
|
|
86
86
|
};
|
|
87
87
|
|
|
@@ -125,7 +125,7 @@ const getAnimationsRTHandlers = function (dispatch) {
|
|
|
125
125
|
];
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
const initialState$
|
|
128
|
+
const initialState$l = {
|
|
129
129
|
animationConfiguration: null,
|
|
130
130
|
isActiveForCurrentUser: false,
|
|
131
131
|
isInitialized: false,
|
|
@@ -133,7 +133,7 @@ const initialState$k = {
|
|
|
133
133
|
};
|
|
134
134
|
const animationsSlice = toolkit.createSlice({
|
|
135
135
|
name: 'animations',
|
|
136
|
-
initialState: initialState$
|
|
136
|
+
initialState: initialState$l,
|
|
137
137
|
reducers: {},
|
|
138
138
|
extraReducers: (builder) => {
|
|
139
139
|
builder.addCase(fetchCurrentAnimation.fulfilled, (state, action) => {
|
|
@@ -229,7 +229,7 @@ const adapter$1 = toolkit.createEntityAdapter({
|
|
|
229
229
|
selectId: (app) => app.name,
|
|
230
230
|
sortComparer: (a, b) => a.label.localeCompare(b.label),
|
|
231
231
|
});
|
|
232
|
-
const slice$
|
|
232
|
+
const slice$3 = toolkit.createSlice({
|
|
233
233
|
name: 'applications',
|
|
234
234
|
initialState: adapter$1.getInitialState(),
|
|
235
235
|
reducers: {
|
|
@@ -240,12 +240,12 @@ const slice$2 = toolkit.createSlice({
|
|
|
240
240
|
});
|
|
241
241
|
const selectors$1 = adapter$1.getSelectors((state) => state.entities.applications);
|
|
242
242
|
const Application = {
|
|
243
|
-
slice: slice$
|
|
244
|
-
actions: Object.assign({}, slice$
|
|
243
|
+
slice: slice$3,
|
|
244
|
+
actions: Object.assign({}, slice$3.actions),
|
|
245
245
|
selectors: selectors$1,
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
-
const initialState$
|
|
248
|
+
const initialState$k = {
|
|
249
249
|
entities: [],
|
|
250
250
|
loading: 'idle',
|
|
251
251
|
nbResults: 0,
|
|
@@ -256,7 +256,7 @@ const fetchBookableAsset = toolkit.createAsyncThunk('BookableAsset/fetchBookable
|
|
|
256
256
|
}));
|
|
257
257
|
const BookableAssetSlice = toolkit.createSlice({
|
|
258
258
|
name: 'bookableAsset',
|
|
259
|
-
initialState: initialState$
|
|
259
|
+
initialState: initialState$k,
|
|
260
260
|
reducers: {},
|
|
261
261
|
extraReducers: (builder) => {
|
|
262
262
|
builder
|
|
@@ -277,7 +277,7 @@ const BookableAssetSlice = toolkit.createSlice({
|
|
|
277
277
|
const fetchConfiguration = toolkit.createAsyncThunk('AssetReservation/configuration', (_, { extra }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
278
278
|
return yield extra.jApi.assetReservation.configuration();
|
|
279
279
|
}));
|
|
280
|
-
const initialState$
|
|
280
|
+
const initialState$j = {
|
|
281
281
|
description: '',
|
|
282
282
|
right: {
|
|
283
283
|
manage: false,
|
|
@@ -291,7 +291,7 @@ const initialState$i = {
|
|
|
291
291
|
};
|
|
292
292
|
const AssetReservationConfigurationSlice = toolkit.createSlice({
|
|
293
293
|
name: 'configuration',
|
|
294
|
-
initialState: initialState$
|
|
294
|
+
initialState: initialState$j,
|
|
295
295
|
reducers: {},
|
|
296
296
|
extraReducers: (builder) => {
|
|
297
297
|
builder
|
|
@@ -312,7 +312,7 @@ const initForm = {
|
|
|
312
312
|
hourStart: '',
|
|
313
313
|
hourEnd: '',
|
|
314
314
|
};
|
|
315
|
-
const initialState$
|
|
315
|
+
const initialState$i = {
|
|
316
316
|
entities: [],
|
|
317
317
|
loading: 'idle',
|
|
318
318
|
nbResults: 0,
|
|
@@ -324,7 +324,7 @@ const fetchReservation = toolkit.createAsyncThunk('Reservation/fetchReservation'
|
|
|
324
324
|
}));
|
|
325
325
|
const ReservationSlice = toolkit.createSlice({
|
|
326
326
|
name: 'reservation',
|
|
327
|
-
initialState: initialState$
|
|
327
|
+
initialState: initialState$i,
|
|
328
328
|
reducers: {
|
|
329
329
|
setForm: (state, action) => {
|
|
330
330
|
state.form = action.payload;
|
|
@@ -380,7 +380,7 @@ const AssetReservation = {
|
|
|
380
380
|
},
|
|
381
381
|
};
|
|
382
382
|
|
|
383
|
-
const initialState$
|
|
383
|
+
const initialState$h = {
|
|
384
384
|
loading: 'idle',
|
|
385
385
|
comments: [],
|
|
386
386
|
};
|
|
@@ -397,7 +397,7 @@ const fetchComments = toolkit.createAsyncThunk('commentList/fetchCommentList', (
|
|
|
397
397
|
}));
|
|
398
398
|
const CommentListSlice = toolkit.createSlice({
|
|
399
399
|
name: 'commentList',
|
|
400
|
-
initialState: initialState$
|
|
400
|
+
initialState: initialState$h,
|
|
401
401
|
reducers: {
|
|
402
402
|
discardComments: (state, action) => {
|
|
403
403
|
state.comments = state.comments.filter((c) => c.idArticle !== action.payload.idArticle);
|
|
@@ -488,7 +488,7 @@ const Comment = {
|
|
|
488
488
|
getCommentsLikeRTHandlers,
|
|
489
489
|
};
|
|
490
490
|
|
|
491
|
-
const initialState$
|
|
491
|
+
const initialState$g = {
|
|
492
492
|
bookmarks: [],
|
|
493
493
|
loading: 'idle',
|
|
494
494
|
status: undefined,
|
|
@@ -551,7 +551,7 @@ const deleteBookmark = toolkit.createAsyncThunk('bookmarkList/deleteBookmark', (
|
|
|
551
551
|
}));
|
|
552
552
|
const BookmarkListSlice = toolkit.createSlice({
|
|
553
553
|
name: 'bookmarkList',
|
|
554
|
-
initialState: initialState$
|
|
554
|
+
initialState: initialState$g,
|
|
555
555
|
reducers: {
|
|
556
556
|
resetAddBookmarkStatus: (state, action) => {
|
|
557
557
|
if (state.add[action.payload]) {
|
|
@@ -714,7 +714,7 @@ const getBookmarkRTHandlers = function (dispatch) {
|
|
|
714
714
|
];
|
|
715
715
|
};
|
|
716
716
|
|
|
717
|
-
const initialState$
|
|
717
|
+
const initialState$f = {
|
|
718
718
|
bookmark: undefined,
|
|
719
719
|
status: undefined,
|
|
720
720
|
loading: 'idle',
|
|
@@ -736,7 +736,7 @@ const editBookmark = toolkit.createAsyncThunk('bookmarkEdit/editBookmark', (book
|
|
|
736
736
|
}));
|
|
737
737
|
const BookmarkEditSlice = toolkit.createSlice({
|
|
738
738
|
name: 'bookmarkEdit',
|
|
739
|
-
initialState: initialState$
|
|
739
|
+
initialState: initialState$f,
|
|
740
740
|
reducers: {
|
|
741
741
|
setEditBookmark: (state, action) => {
|
|
742
742
|
state.bookmark = Object.assign({}, action.payload);
|
|
@@ -789,7 +789,7 @@ const Bookmark = {
|
|
|
789
789
|
getRTHandlers: getBookmarkRTHandlers,
|
|
790
790
|
};
|
|
791
791
|
|
|
792
|
-
const initialState$
|
|
792
|
+
const initialState$e = {
|
|
793
793
|
loading: 'idle',
|
|
794
794
|
access: { createCategory: false },
|
|
795
795
|
};
|
|
@@ -818,7 +818,7 @@ const fetchFaqConfig = toolkit.createAsyncThunk('faqConfig/fetch', () => __await
|
|
|
818
818
|
}));
|
|
819
819
|
const FaqConfigSlice = toolkit.createSlice({
|
|
820
820
|
name: 'config',
|
|
821
|
-
initialState: initialState$
|
|
821
|
+
initialState: initialState$e,
|
|
822
822
|
reducers: {},
|
|
823
823
|
extraReducers: (builder) => {
|
|
824
824
|
builder
|
|
@@ -853,7 +853,7 @@ const FaqConfigSlice = toolkit.createSlice({
|
|
|
853
853
|
},
|
|
854
854
|
});
|
|
855
855
|
|
|
856
|
-
const initialState$
|
|
856
|
+
const initialState$d = {
|
|
857
857
|
loading: 'idle',
|
|
858
858
|
categories: null,
|
|
859
859
|
};
|
|
@@ -865,7 +865,7 @@ const fetchFaqCategories = toolkit.createAsyncThunk('faqCategories/fetch', () =>
|
|
|
865
865
|
}));
|
|
866
866
|
const FaqCategoriesSlice = toolkit.createSlice({
|
|
867
867
|
name: 'categories',
|
|
868
|
-
initialState: initialState$
|
|
868
|
+
initialState: initialState$d,
|
|
869
869
|
reducers: {},
|
|
870
870
|
extraReducers: (builder) => {
|
|
871
871
|
builder
|
|
@@ -912,6 +912,32 @@ const Faq = {
|
|
|
912
912
|
},
|
|
913
913
|
};
|
|
914
914
|
|
|
915
|
+
const buildDrivesArrayFromObject = (drives) => {
|
|
916
|
+
if (!drives)
|
|
917
|
+
return [];
|
|
918
|
+
return Object.keys(drives).filter((k) => drives[k]);
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
const slice$2 = toolkit.createSlice({
|
|
922
|
+
name: 'hooks',
|
|
923
|
+
initialState: {},
|
|
924
|
+
reducers: {
|
|
925
|
+
initHooks: (_, { payload }) => {
|
|
926
|
+
return payload;
|
|
927
|
+
},
|
|
928
|
+
},
|
|
929
|
+
});
|
|
930
|
+
const selectHooks = (state) => state.hooks;
|
|
931
|
+
const selectHook = (state, hook) => {
|
|
932
|
+
return state.hooks[hook];
|
|
933
|
+
};
|
|
934
|
+
const Hook = {
|
|
935
|
+
slice: slice$2,
|
|
936
|
+
actions: slice$2.actions,
|
|
937
|
+
selectors: { selectHooks, selectHook },
|
|
938
|
+
utils: { buildDrivesArrayFromObject },
|
|
939
|
+
};
|
|
940
|
+
|
|
915
941
|
const extractJlandUrlBaseFromMap = (map) => {
|
|
916
942
|
const mapUrl = map.urlToJland;
|
|
917
943
|
if (!mapUrl) {
|
|
@@ -1147,7 +1173,7 @@ const initialMap = {
|
|
|
1147
1173
|
illustration: '',
|
|
1148
1174
|
assignLicense: false,
|
|
1149
1175
|
};
|
|
1150
|
-
const initialState$
|
|
1176
|
+
const initialState$c = {
|
|
1151
1177
|
map: Object.assign({}, initialMap),
|
|
1152
1178
|
loading: 'idle',
|
|
1153
1179
|
status: undefined,
|
|
@@ -1191,13 +1217,13 @@ const createMap = toolkit.createAsyncThunk('mapCreate/create', ({ map, jlandUrlB
|
|
|
1191
1217
|
}));
|
|
1192
1218
|
const MapCreateSlice = toolkit.createSlice({
|
|
1193
1219
|
name: 'mapCreate',
|
|
1194
|
-
initialState: initialState$
|
|
1220
|
+
initialState: initialState$c,
|
|
1195
1221
|
reducers: {
|
|
1196
1222
|
setMap: (state, action) => {
|
|
1197
1223
|
state.map = action.payload;
|
|
1198
1224
|
},
|
|
1199
1225
|
resetCreateMapState: () => {
|
|
1200
|
-
return initialState$
|
|
1226
|
+
return initialState$c;
|
|
1201
1227
|
},
|
|
1202
1228
|
},
|
|
1203
1229
|
extraReducers: (builder) => {
|
|
@@ -1251,6 +1277,119 @@ const jland = {
|
|
|
1251
1277
|
utils: { buildUrlToJland },
|
|
1252
1278
|
};
|
|
1253
1279
|
|
|
1280
|
+
const MediaLibraryAppConst = {
|
|
1281
|
+
route: 'media-library',
|
|
1282
|
+
moduleName: 'MediaLibraryHook',
|
|
1283
|
+
typeMediaLibraryFolder: 'mediaLibraryFolder',
|
|
1284
|
+
typeMediaLibraryFile: 'mediaLibraryFile',
|
|
1285
|
+
};
|
|
1286
|
+
const FILES_PER_PAGE = 18;
|
|
1287
|
+
|
|
1288
|
+
const initialState$b = {
|
|
1289
|
+
loading: 'idle',
|
|
1290
|
+
page: 1,
|
|
1291
|
+
nbResults: 0,
|
|
1292
|
+
folders: [],
|
|
1293
|
+
unclassifiedFiles: { list: [], page: 0, totalPages: 0 },
|
|
1294
|
+
mediaLibraryAccess: false,
|
|
1295
|
+
};
|
|
1296
|
+
const mediaLibrarySlice = toolkit.createSlice({
|
|
1297
|
+
name: 'mediaLibrary',
|
|
1298
|
+
initialState: initialState$b,
|
|
1299
|
+
reducers: {
|
|
1300
|
+
setPage(state, action) {
|
|
1301
|
+
return Object.assign(Object.assign({}, state), { page: action.payload });
|
|
1302
|
+
},
|
|
1303
|
+
setFolderList(state, action) {
|
|
1304
|
+
return Object.assign(Object.assign({}, state), { entities: [...action.payload] });
|
|
1305
|
+
},
|
|
1306
|
+
setFileUnclassifiedList(state, action) {
|
|
1307
|
+
return Object.assign(Object.assign({}, state), { entitiesUnclassified: Object.assign({}, action.payload) });
|
|
1308
|
+
},
|
|
1309
|
+
},
|
|
1310
|
+
extraReducers: (builder) => {
|
|
1311
|
+
builder
|
|
1312
|
+
.addCase(fetchMediaLibraryFolders.pending, (state) => {
|
|
1313
|
+
state.loading = 'pending';
|
|
1314
|
+
})
|
|
1315
|
+
.addCase(fetchMediaLibraryFolders.fulfilled, (state, action) => {
|
|
1316
|
+
state.loading = 'idle';
|
|
1317
|
+
state.folders = [...action.payload.result.data];
|
|
1318
|
+
state.nbResults = 0;
|
|
1319
|
+
})
|
|
1320
|
+
.addCase(fetchMediaLibraryFolders.rejected, (state) => {
|
|
1321
|
+
state.loading = 'idle';
|
|
1322
|
+
})
|
|
1323
|
+
.addCase(fetchMediaLibraryUnclassifiedFiles.pending, (state) => {
|
|
1324
|
+
state.loading = 'pending';
|
|
1325
|
+
})
|
|
1326
|
+
.addCase(fetchMediaLibraryUnclassifiedFiles.fulfilled, (state, action) => {
|
|
1327
|
+
state.loading = 'idle';
|
|
1328
|
+
state.unclassifiedFiles = {
|
|
1329
|
+
list: [...action.payload.result.data],
|
|
1330
|
+
page: action.payload.result.page,
|
|
1331
|
+
totalPages: Math.ceil(action.payload.result.cnt / action.payload.result.limit),
|
|
1332
|
+
};
|
|
1333
|
+
state.nbResults = 0;
|
|
1334
|
+
})
|
|
1335
|
+
.addCase(fetchMediaLibraryUnclassifiedFiles.rejected, (state) => {
|
|
1336
|
+
state.loading = 'idle';
|
|
1337
|
+
})
|
|
1338
|
+
.addCase(fetchMediaLibraryConfig.fulfilled, (state, action) => {
|
|
1339
|
+
var _a, _b;
|
|
1340
|
+
state.loading = 'idle';
|
|
1341
|
+
state.mediaLibraryAccess = (_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result) !== null && _b !== void 0 ? _b : false;
|
|
1342
|
+
})
|
|
1343
|
+
.addCase(fetchMediaLibraryConfig.rejected, (state) => {
|
|
1344
|
+
state.loading = 'idle';
|
|
1345
|
+
state.mediaLibraryAccess = false;
|
|
1346
|
+
})
|
|
1347
|
+
.addCase(fetchMediaLibraryConfig.pending, (state) => {
|
|
1348
|
+
state.loading = 'pending';
|
|
1349
|
+
state.mediaLibraryAccess = false;
|
|
1350
|
+
});
|
|
1351
|
+
},
|
|
1352
|
+
});
|
|
1353
|
+
const fetchMediaLibraryFolders = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryFolders', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1354
|
+
const args = { type: MediaLibraryAppConst.typeMediaLibraryFolder, format: 'raw-little', limit: 10 };
|
|
1355
|
+
try {
|
|
1356
|
+
return yield extra.jApi.article.list(args);
|
|
1357
|
+
}
|
|
1358
|
+
catch (error) {
|
|
1359
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1360
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve folders' });
|
|
1361
|
+
}
|
|
1362
|
+
}));
|
|
1363
|
+
const fetchMediaLibraryUnclassifiedFiles = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryUnclassifiedFiles', (page, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1364
|
+
try {
|
|
1365
|
+
return yield extra.jApi.mediaLibrary.GetUnclassifiedFiles({
|
|
1366
|
+
format: 'raw-little',
|
|
1367
|
+
page,
|
|
1368
|
+
limit: FILES_PER_PAGE,
|
|
1369
|
+
});
|
|
1370
|
+
}
|
|
1371
|
+
catch (error) {
|
|
1372
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1373
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve UnclassifiedFiles' });
|
|
1374
|
+
}
|
|
1375
|
+
}));
|
|
1376
|
+
const fetchMediaLibraryConfig = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryConfig', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1377
|
+
try {
|
|
1378
|
+
return yield extra.jApi.mediaLibrary.getAccess();
|
|
1379
|
+
}
|
|
1380
|
+
catch (error) {
|
|
1381
|
+
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
1382
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary Config' });
|
|
1383
|
+
}
|
|
1384
|
+
}));
|
|
1385
|
+
const selectMediaLibrary = (state) => state.mediaLibrary;
|
|
1386
|
+
const mediaLibraryReducer = mediaLibrarySlice.reducer;
|
|
1387
|
+
const MediaLibrary = {
|
|
1388
|
+
slice: mediaLibrarySlice,
|
|
1389
|
+
actions: { fetchMediaLibraryFolders, fetchMediaLibraryUnclassifiedFiles, fetchMediaLibraryConfig },
|
|
1390
|
+
selectors: { selectMediaLibrary }
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1254
1393
|
const adapter = toolkit.createEntityAdapter({
|
|
1255
1394
|
selectId: (model) => model.type,
|
|
1256
1395
|
sortComparer: (a, b) => a.label.localeCompare(b.label),
|
|
@@ -2154,7 +2293,7 @@ const STUDIO_VIEW = {
|
|
|
2154
2293
|
SOLR: '1',
|
|
2155
2294
|
NOT_SOLR: '0',
|
|
2156
2295
|
};
|
|
2157
|
-
const viewsList = ['create', 'popup', 'edit', '
|
|
2296
|
+
const viewsList = ['create', 'popup', 'edit', 'filter', 'list', 'view'];
|
|
2158
2297
|
exports.AppFormItemTypes = void 0;
|
|
2159
2298
|
(function (AppFormItemTypes) {
|
|
2160
2299
|
AppFormItemTypes["IMAGE"] = "IMAGE";
|
|
@@ -3274,7 +3413,6 @@ function createNewStudioApp$1({ author, appName }) {
|
|
|
3274
3413
|
}
|
|
3275
3414
|
|
|
3276
3415
|
const initialState = {
|
|
3277
|
-
studioAppsList: [],
|
|
3278
3416
|
loadingStudioAppsList: 'idle',
|
|
3279
3417
|
deleteStudioAppStatus: 'idle',
|
|
3280
3418
|
suspendStudioAppStatus: 'idle',
|
|
@@ -3350,12 +3488,12 @@ const restartStudioApp = toolkit.createAsyncThunk('studio/restartStudioApp', ({
|
|
|
3350
3488
|
}
|
|
3351
3489
|
}));
|
|
3352
3490
|
const cloneStudioApp = toolkit.createAsyncThunk('studio/cloneStudioApp', ({ idApp }, { extra, getState, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
3353
|
-
var _b;
|
|
3491
|
+
var _b, _c;
|
|
3354
3492
|
const jApi = extra.jApi;
|
|
3355
|
-
const existingStudioApp = getState().studio.studioAppsList.studioAppsList.find((app) => app.idApp === idApp);
|
|
3493
|
+
const existingStudioApp = (_b = getState().studio.studioAppsList.studioAppsList) === null || _b === void 0 ? void 0 : _b.find((app) => app.idApp === idApp);
|
|
3356
3494
|
if (!existingStudioApp)
|
|
3357
3495
|
return rejectWithValue({ error: 1, errorMsg: 'Error cloning application' });
|
|
3358
|
-
const currentUser = (
|
|
3496
|
+
const currentUser = (_c = getState().userCurrent) === null || _c === void 0 ? void 0 : _c.uri;
|
|
3359
3497
|
const [clonedStudioApp, newAppId] = cloneStudioAppFromExistingApp(existingStudioApp, currentUser);
|
|
3360
3498
|
const clonedStudioAppReady = JSON.stringify(clonedStudioApp);
|
|
3361
3499
|
try {
|
|
@@ -3397,10 +3535,11 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3397
3535
|
state.deleteStudioAppStatus = 'pending';
|
|
3398
3536
|
})
|
|
3399
3537
|
.addCase(deleteStudioApp.fulfilled, (state, action) => {
|
|
3538
|
+
var _a, _b;
|
|
3400
3539
|
if (state.deleteStudioAppStatus === 'pending') {
|
|
3401
3540
|
state.deleteStudioAppStatus = 'idle';
|
|
3402
3541
|
}
|
|
3403
|
-
state.studioAppsList = state.studioAppsList.reduce((acc, app) => {
|
|
3542
|
+
state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.reduce((acc, app) => {
|
|
3404
3543
|
const { idApp } = action.meta.arg;
|
|
3405
3544
|
let { status } = action.meta.arg;
|
|
3406
3545
|
if (status === APP_STATUS_TYPE.INSTALLED)
|
|
@@ -3413,7 +3552,7 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3413
3552
|
delete app.inWorkVersion;
|
|
3414
3553
|
}
|
|
3415
3554
|
return [...acc, app];
|
|
3416
|
-
}, []);
|
|
3555
|
+
}, [])) !== null && _b !== void 0 ? _b : [];
|
|
3417
3556
|
})
|
|
3418
3557
|
.addCase(deleteStudioApp.rejected, (state) => {
|
|
3419
3558
|
if (state.deleteStudioAppStatus === 'pending')
|
|
@@ -3424,17 +3563,18 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3424
3563
|
state.suspendStudioAppStatus = 'pending';
|
|
3425
3564
|
})
|
|
3426
3565
|
.addCase(suspendStudioApp.fulfilled, (state, action) => {
|
|
3566
|
+
var _a, _b;
|
|
3427
3567
|
if (state.suspendStudioAppStatus === 'pending') {
|
|
3428
3568
|
state.suspendStudioAppStatus = 'idle';
|
|
3429
3569
|
}
|
|
3430
|
-
state.studioAppsList = state.studioAppsList.map((app) => {
|
|
3570
|
+
state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
|
|
3431
3571
|
const { idApp } = action.meta.arg;
|
|
3432
3572
|
if (app.idApp === idApp) {
|
|
3433
3573
|
app.status = APP_STATUS_TYPE.SUSPENDED;
|
|
3434
3574
|
return app;
|
|
3435
3575
|
}
|
|
3436
3576
|
return app;
|
|
3437
|
-
});
|
|
3577
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
3438
3578
|
})
|
|
3439
3579
|
.addCase(suspendStudioApp.rejected, (state) => {
|
|
3440
3580
|
if (state.suspendStudioAppStatus === 'pending')
|
|
@@ -3445,17 +3585,18 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3445
3585
|
state.restartStudioAppStatus = 'pending';
|
|
3446
3586
|
})
|
|
3447
3587
|
.addCase(restartStudioApp.fulfilled, (state, action) => {
|
|
3588
|
+
var _a, _b;
|
|
3448
3589
|
if (state.restartStudioAppStatus === 'pending') {
|
|
3449
3590
|
state.restartStudioAppStatus = 'idle';
|
|
3450
3591
|
}
|
|
3451
|
-
state.studioAppsList = state.studioAppsList.map((app) => {
|
|
3592
|
+
state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
|
|
3452
3593
|
const { idApp } = action.meta.arg;
|
|
3453
3594
|
if (app.idApp === idApp) {
|
|
3454
3595
|
app.status = APP_STATUS_TYPE.INSTALLED;
|
|
3455
3596
|
return app;
|
|
3456
3597
|
}
|
|
3457
3598
|
return app;
|
|
3458
|
-
});
|
|
3599
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
3459
3600
|
})
|
|
3460
3601
|
.addCase(restartStudioApp.rejected, (state) => {
|
|
3461
3602
|
if (state.restartStudioAppStatus === 'pending')
|
|
@@ -3466,10 +3607,11 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3466
3607
|
state.cloneStudioAppStatus = 'pending';
|
|
3467
3608
|
})
|
|
3468
3609
|
.addCase(cloneStudioApp.fulfilled, (state, action) => {
|
|
3610
|
+
var _a;
|
|
3469
3611
|
if (state.cloneStudioAppStatus === 'pending') {
|
|
3470
3612
|
state.cloneStudioAppStatus = 'idle';
|
|
3471
3613
|
}
|
|
3472
|
-
state.studioAppsList = [...state.studioAppsList, action.payload];
|
|
3614
|
+
state.studioAppsList = [...((_a = state.studioAppsList) !== null && _a !== void 0 ? _a : []), action.payload];
|
|
3473
3615
|
})
|
|
3474
3616
|
.addCase(cloneStudioApp.rejected, (state) => {
|
|
3475
3617
|
if (state.cloneStudioAppStatus === 'pending')
|
|
@@ -3480,10 +3622,11 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3480
3622
|
state.createNewStudioAppStatus = 'pending';
|
|
3481
3623
|
})
|
|
3482
3624
|
.addCase(createNewStudioApp.fulfilled, (state, action) => {
|
|
3625
|
+
var _a;
|
|
3483
3626
|
if (state.createNewStudioAppStatus === 'pending') {
|
|
3484
3627
|
state.createNewStudioAppStatus = 'idle';
|
|
3485
3628
|
}
|
|
3486
|
-
state.studioAppsList = [...state.studioAppsList, action.payload];
|
|
3629
|
+
state.studioAppsList = [...((_a = state.studioAppsList) !== null && _a !== void 0 ? _a : []), action.payload];
|
|
3487
3630
|
})
|
|
3488
3631
|
.addCase(createNewStudioApp.rejected, (state) => {
|
|
3489
3632
|
if (state.createNewStudioAppStatus === 'pending')
|
|
@@ -3539,9 +3682,11 @@ exports.AssetReservation = AssetReservation;
|
|
|
3539
3682
|
exports.Bookmark = Bookmark;
|
|
3540
3683
|
exports.Comment = Comment;
|
|
3541
3684
|
exports.Faq = Faq;
|
|
3685
|
+
exports.Hook = Hook;
|
|
3542
3686
|
exports.MODE_EDIT = MODE_EDIT;
|
|
3543
3687
|
exports.MODE_VIEW = MODE_VIEW;
|
|
3544
3688
|
exports.MapExtraFieldsWithView = MapExtraFieldsWithView;
|
|
3689
|
+
exports.MediaLibrary = MediaLibrary;
|
|
3545
3690
|
exports.Model = Model;
|
|
3546
3691
|
exports.Network = Network;
|
|
3547
3692
|
exports.Platform = Platform;
|
|
@@ -3560,7 +3705,12 @@ exports.animationsSlice = animationsSlice;
|
|
|
3560
3705
|
exports.deleteCurrentAnimation = deleteCurrentAnimation;
|
|
3561
3706
|
exports.fetchCurrentAnimation = fetchCurrentAnimation;
|
|
3562
3707
|
exports.fetchCurrentAnimationApp = fetchCurrentAnimationApp;
|
|
3708
|
+
exports.fetchMediaLibraryConfig = fetchMediaLibraryConfig;
|
|
3709
|
+
exports.fetchMediaLibraryFolders = fetchMediaLibraryFolders;
|
|
3710
|
+
exports.fetchMediaLibraryUnclassifiedFiles = fetchMediaLibraryUnclassifiedFiles;
|
|
3563
3711
|
exports.jland = jland;
|
|
3712
|
+
exports.mediaLibraryReducer = mediaLibraryReducer;
|
|
3713
|
+
exports.mediaLibrarySlice = mediaLibrarySlice;
|
|
3564
3714
|
exports.saveCurrentAnimation = saveCurrentAnimation;
|
|
3565
3715
|
exports.slice = slice;
|
|
3566
3716
|
exports.studio = studio;
|