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/dist/esm.js CHANGED
@@ -77,24 +77,72 @@ const Toast = {
77
77
  selectors: selectors$2,
78
78
  };
79
79
 
80
+ const fetchCurrentAnimation = createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
81
+ try {
82
+ const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
83
+ const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
84
+ return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
85
+ }
86
+ catch (_) {
87
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
88
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
89
+ }
90
+ }));
91
+ const fetchCurrentAnimationApp = createAsyncThunk('animations/fetchCurrentAnimationApp', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
92
+ try {
93
+ return (yield extra.jApi.animations.GetCurrentAnimationApp()).result;
94
+ }
95
+ catch (_) {
96
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
97
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
98
+ }
99
+ }));
100
+ const deleteCurrentAnimation = createAsyncThunk('animations/deleteCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
101
+ try {
102
+ yield extra.jApi.animations.DeleteAnimation();
103
+ return;
104
+ }
105
+ catch (_) {
106
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
107
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot delete animation' });
108
+ }
109
+ }));
110
+ const saveCurrentAnimation = createAsyncThunk('animations/saveCurrentAnimation', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
111
+ try {
112
+ yield extra.jApi.animations.SaveAnimationConfiguration(params);
113
+ return;
114
+ }
115
+ catch (_) {
116
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
117
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
118
+ }
119
+ }));
120
+ const toggleAnimationIsActive = createAsyncThunk('animations/toggleAnimationIsActive', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
121
+ try {
122
+ yield extra.jApi.animations.ToggleAnimationActive();
123
+ return;
124
+ }
125
+ catch (_) {
126
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
127
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
128
+ }
129
+ }));
130
+
80
131
  const getAnimationsRTHandlers = function (dispatch) {
81
132
  const addAnimationHandler = function (message) {
82
- if (message.namespace === 'ANIMATIONS' &&
83
- message.function === 'add') {
133
+ if (message.namespace === 'ANIMATIONS' && message.function === 'add') {
84
134
  dispatch(fetchCurrentAnimation());
85
135
  dispatch(fetchCurrentAnimationApp());
86
136
  }
87
137
  };
88
138
  const deleteAnimationHandler = function (message) {
89
- if (message.namespace === 'ANIMATIONS' &&
90
- message.function === 'delete') {
139
+ if (message.namespace === 'ANIMATIONS' && message.function === 'delete') {
91
140
  dispatch(fetchCurrentAnimation());
92
141
  dispatch(fetchCurrentAnimationApp());
93
142
  }
94
143
  };
95
144
  const toggleIsActiveAnimationHandler = function (message) {
96
- if (message.namespace === 'ANIMATIONS' &&
97
- message.function === 'toggle') {
145
+ if (message.namespace === 'ANIMATIONS' && message.function === 'toggle') {
98
146
  dispatch(fetchCurrentAnimation());
99
147
  }
100
148
  };
@@ -149,56 +197,6 @@ const animationsSlice = createSlice({
149
197
  });
150
198
  },
151
199
  });
152
- const fetchCurrentAnimation = createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
153
- try {
154
- const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
155
- const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
156
- return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
157
- }
158
- catch (_) {
159
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
160
- return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
161
- }
162
- }));
163
- const fetchCurrentAnimationApp = createAsyncThunk('animations/fetchCurrentAnimationApp', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
164
- try {
165
- return (yield extra.jApi.animations.GetCurrentAnimationApp()).result;
166
- }
167
- catch (_) {
168
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
169
- return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
170
- }
171
- }));
172
- const deleteCurrentAnimation = createAsyncThunk('animations/deleteCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
173
- try {
174
- yield extra.jApi.animations.DeleteAnimation();
175
- return;
176
- }
177
- catch (_) {
178
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
179
- return rejectWithValue({ error: 1, errorMsg: 'Cannot delete animation' });
180
- }
181
- }));
182
- const saveCurrentAnimation = createAsyncThunk('animations/saveCurrentAnimation', (params, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
183
- try {
184
- yield extra.jApi.animations.SaveAnimationConfiguration(params);
185
- return;
186
- }
187
- catch (_) {
188
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
189
- return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
190
- }
191
- }));
192
- const toggleAnimationIsActive = createAsyncThunk('animations/toggleAnimationIsActive', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
193
- try {
194
- yield extra.jApi.animations.ToggleAnimationActive();
195
- return;
196
- }
197
- catch (_) {
198
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
199
- return rejectWithValue({ error: 1, errorMsg: 'Cannot update animation' });
200
- }
201
- }));
202
200
  const selectCurrentAnimation = (state) => state.animations.animationConfiguration;
203
201
  const isActiveAnimation = (state) => state.animations.isActiveForCurrentUser;
204
202
  const isToggleLoading = (state) => state.animations.isToggleLoading;
@@ -460,10 +458,12 @@ const getCommentsLikeRTHandlers = function (dispatch, idComments, idArticle) {
460
458
  dispatch(fetchComments({ idArticle }));
461
459
  }
462
460
  };
463
- return idComments ? [
464
- { namespace: 'CUSTOM-ACTION', function: 'add', handler: commentLikeHandler },
465
- { namespace: 'CUSTOM-ACTION', function: 'remove', handler: commentLikeHandler },
466
- ] : [];
461
+ return idComments
462
+ ? [
463
+ { namespace: 'CUSTOM-ACTION', function: 'add', handler: commentLikeHandler },
464
+ { namespace: 'CUSTOM-ACTION', function: 'remove', handler: commentLikeHandler },
465
+ ]
466
+ : [];
467
467
  };
468
468
 
469
469
  const CommentReducer = combineReducers$1({
@@ -743,7 +743,7 @@ const BookmarkEditSlice = createSlice({
743
743
  resetStatus: (state) => {
744
744
  state.status = undefined;
745
745
  state.loading = 'idle';
746
- }
746
+ },
747
747
  },
748
748
  extraReducers: (builder) => {
749
749
  builder
@@ -776,11 +776,15 @@ const selectBookmarkListIsInitialized = (state) => state.bookmark.bookmarkList.i
776
776
  const selectBookmarkEditBookmark = (state) => state.bookmark.bookmarkEdit.bookmark;
777
777
  const Bookmark = {
778
778
  slice: bookmarkSlice,
779
- actions: Object.assign(Object.assign({ fetchBookmark, addBookmark, moveBookmark, deleteBookmark, editBookmark }, BookmarkEditSlice.actions), BookmarkListSlice.actions),
779
+ actions: Object.assign(Object.assign({ fetchBookmark,
780
+ addBookmark,
781
+ moveBookmark,
782
+ deleteBookmark,
783
+ editBookmark }, BookmarkEditSlice.actions), BookmarkListSlice.actions),
780
784
  selectors: {
781
785
  bookmarkList: selectBookmarkList,
782
786
  bookmarkListIsInitialized: selectBookmarkListIsInitialized,
783
- bookmarkEditBookmark: selectBookmarkEditBookmark
787
+ bookmarkEditBookmark: selectBookmarkEditBookmark,
784
788
  },
785
789
  getRTHandlers: getBookmarkRTHandlers,
786
790
  };
@@ -793,7 +797,7 @@ const fetchFaqConfig = createAsyncThunk('faqConfig/fetch', () => __awaiter(void
793
797
  try {
794
798
  const [hookProperties, access] = yield Promise.all([
795
799
  yield jamespot.faq.getHookProperties(['_web', 'appImage', 'appImageText', '_displayComment']),
796
- yield jamespot.faq.getAccess()
800
+ yield jamespot.faq.getAccess(),
797
801
  ]);
798
802
  return {
799
803
  _web: hookProperties.result._web,
@@ -1193,7 +1197,8 @@ const createMap = createAsyncThunk('mapCreate/create', ({ map, jlandUrlBase }, {
1193
1197
  };
1194
1198
  const jApi = extra.jApi;
1195
1199
  return yield new Promise((resolve, reject) => {
1196
- jApi.article.create(payload, 'raw-list')
1200
+ jApi.article
1201
+ .create(payload, 'raw-list')
1197
1202
  .then((response) => __awaiter(void 0, void 0, void 0, function* () {
1198
1203
  if (response.error) {
1199
1204
  reject({ error: 1, errorMsg: response.errorMsg });
@@ -1387,6 +1392,9 @@ const initialState$b = {
1387
1392
  folders: [],
1388
1393
  unclassifiedFiles: { list: [], page: 0, totalPages: 0 },
1389
1394
  mediaLibraryAccess: false,
1395
+ stats: null,
1396
+ foldersStats: { loading: false, pager: null },
1397
+ filesStats: { loading: false, pager: null },
1390
1398
  };
1391
1399
  const mediaLibrarySlice = createSlice({
1392
1400
  name: 'mediaLibrary',
@@ -1442,6 +1450,38 @@ const mediaLibrarySlice = createSlice({
1442
1450
  .addCase(fetchMediaLibraryConfig.pending, (state) => {
1443
1451
  state.loading = 'pending';
1444
1452
  state.mediaLibraryAccess = false;
1453
+ })
1454
+ .addCase(fetchMediaLibraryStats.fulfilled, (state, action) => {
1455
+ var _a;
1456
+ state.loading = 'idle';
1457
+ state.stats = Object.assign({}, (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result);
1458
+ })
1459
+ .addCase(fetchMediaLibraryStats.rejected, (state) => {
1460
+ state.loading = 'idle';
1461
+ state.stats = null;
1462
+ })
1463
+ .addCase(fetchMediaLibraryStats.pending, (state) => {
1464
+ state.loading = 'pending';
1465
+ })
1466
+ .addCase(fetchMediaLibraryFoldersStats.fulfilled, (state, action) => {
1467
+ var _a;
1468
+ state.foldersStats = { loading: false, pager: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result };
1469
+ })
1470
+ .addCase(fetchMediaLibraryFoldersStats.rejected, (state) => {
1471
+ state.foldersStats = { loading: false, pager: null };
1472
+ })
1473
+ .addCase(fetchMediaLibraryFoldersStats.pending, (state) => {
1474
+ state.foldersStats.loading = true;
1475
+ })
1476
+ .addCase(fetchMediaLibraryFilesStats.fulfilled, (state, action) => {
1477
+ var _a;
1478
+ state.filesStats = { loading: false, pager: (_a = action.payload) === null || _a === void 0 ? void 0 : _a.result };
1479
+ })
1480
+ .addCase(fetchMediaLibraryFilesStats.rejected, (state) => {
1481
+ state.filesStats = { loading: false, pager: null };
1482
+ })
1483
+ .addCase(fetchMediaLibraryFilesStats.pending, (state) => {
1484
+ state.filesStats.loading = true;
1445
1485
  });
1446
1486
  },
1447
1487
  });
@@ -1481,12 +1521,54 @@ const fetchMediaLibraryConfig = createAsyncThunk('MediaLibrary/fetchMediaLibrary
1481
1521
  return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary Config' });
1482
1522
  }
1483
1523
  }));
1524
+ const fetchMediaLibraryFoldersStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryFoldersStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
1525
+ try {
1526
+ return yield extra.jApi.mediaLibrary.getFoldersStatsList(filters, orders, page);
1527
+ }
1528
+ catch (error) {
1529
+ dispatch(Toast.actions.error({ label: error.errorMsg }));
1530
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary folders stats' });
1531
+ }
1532
+ }));
1533
+ const fetchMediaLibraryFilesStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryFilesStats', ({ page, filters, orders }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
1534
+ try {
1535
+ return yield extra.jApi.mediaLibrary.getFilesStatsList(filters, orders, page);
1536
+ }
1537
+ catch (error) {
1538
+ dispatch(Toast.actions.error({ label: error.errorMsg }));
1539
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary files stats' });
1540
+ }
1541
+ }));
1542
+ const fetchMediaLibraryStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', ({ filters }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
1543
+ try {
1544
+ return yield extra.jApi.mediaLibrary.getStats(filters);
1545
+ }
1546
+ catch (error) {
1547
+ dispatch(Toast.actions.error({ label: error.errorMsg }));
1548
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary stats' });
1549
+ }
1550
+ }));
1484
1551
  const selectMediaLibrary = (state) => state.mediaLibrary;
1552
+ const selectMediaLibraryStats = (state) => state.mediaLibrary.stats;
1553
+ const selectMediaLibraryFoldersStats = (state) => state.mediaLibrary.foldersStats;
1554
+ const selectMediaLibraryFilesStats = (state) => state.mediaLibrary.filesStats;
1485
1555
  const mediaLibraryReducer = mediaLibrarySlice.reducer;
1486
1556
  const MediaLibrary = {
1487
1557
  slice: mediaLibrarySlice,
1488
- actions: { fetchMediaLibraryFolders, fetchMediaLibraryUnclassifiedFiles, fetchMediaLibraryConfig },
1489
- selectors: { selectMediaLibrary },
1558
+ actions: {
1559
+ fetchMediaLibraryFolders,
1560
+ fetchMediaLibraryUnclassifiedFiles,
1561
+ fetchMediaLibraryConfig,
1562
+ fetchMediaLibraryStats,
1563
+ fetchMediaLibraryFilesStats,
1564
+ fetchMediaLibraryFoldersStats,
1565
+ },
1566
+ selectors: {
1567
+ selectMediaLibrary,
1568
+ selectMediaLibraryStats,
1569
+ selectMediaLibraryFoldersStats,
1570
+ selectMediaLibraryFilesStats,
1571
+ },
1490
1572
  };
1491
1573
 
1492
1574
  const adapter = createEntityAdapter({
@@ -1495,7 +1577,7 @@ const adapter = createEntityAdapter({
1495
1577
  });
1496
1578
  const getModelIconSrc = (model, size) => {
1497
1579
  const imgProps = {
1498
- from: "imagestatic",
1580
+ from: 'imagestatic',
1499
1581
  size: size !== null && size !== void 0 ? size : 'fitx600',
1500
1582
  uri: `icons/${model && model.icon ? model.icon : `article`}-white`,
1501
1583
  };
@@ -1512,9 +1594,9 @@ const slice$1 = createSlice({
1512
1594
  });
1513
1595
  const selectors = adapter.getSelectors((state) => state.entities.models);
1514
1596
  const utils = {
1515
- getModelIconSrc
1597
+ getModelIconSrc,
1516
1598
  };
1517
- const selectByIds = (state, types) => types.map(type => state.entities.models.entities[type]).filter(model => !!model);
1599
+ const selectByIds = (state, types) => types.map((type) => state.entities.models.entities[type]).filter((model) => !!model);
1518
1600
  const Model = {
1519
1601
  slice: slice$1,
1520
1602
  actions: Object.assign({}, slice$1.actions),
@@ -1561,7 +1643,7 @@ const Network = {
1561
1643
 
1562
1644
  const initialState$9 = {
1563
1645
  userHighlightFields: [],
1564
- userAccountStatus: 0
1646
+ userAccountStatus: 0,
1565
1647
  };
1566
1648
  const PlatformConfigSlice = createSlice({
1567
1649
  name: 'config',
@@ -1629,7 +1711,7 @@ const initialState$8 = {
1629
1711
  loading: 'idle',
1630
1712
  loadingRecent: 'idle',
1631
1713
  query: '',
1632
- page: 1
1714
+ page: 1,
1633
1715
  };
1634
1716
  const WedocAppSlice = createSlice({
1635
1717
  name: 'wedoc',
@@ -1637,7 +1719,7 @@ const WedocAppSlice = createSlice({
1637
1719
  reducers: {
1638
1720
  update: (state, action) => {
1639
1721
  state.entities = [
1640
- ...state.entities.map((file) => file.id === action.payload.id ? Object.assign(Object.assign({}, file), action.payload) : file)
1722
+ ...state.entities.map((file) => file.id === action.payload.id ? Object.assign(Object.assign({}, file), action.payload) : file),
1641
1723
  ];
1642
1724
  },
1643
1725
  setQuery: (state, action) => {
@@ -1684,7 +1766,7 @@ const WedocApp = {
1684
1766
  loading: state.wedoc.loading === 'pending',
1685
1767
  tab: state.wedoc.tab,
1686
1768
  query: state.wedoc.query,
1687
- page: state.wedoc.page
1769
+ page: state.wedoc.page,
1688
1770
  };
1689
1771
  },
1690
1772
  getRecent: (state) => {
@@ -1697,7 +1779,7 @@ const WedocApp = {
1697
1779
  },
1698
1780
  actions: {
1699
1781
  fetchFiles,
1700
- fetchRecentFiles
1782
+ fetchRecentFiles,
1701
1783
  },
1702
1784
  };
1703
1785
 
@@ -1716,9 +1798,7 @@ const ShareSlice = createSlice({
1716
1798
  initialState: initialState$7,
1717
1799
  reducers: {
1718
1800
  remove: (state, action) => {
1719
- state.entities = [
1720
- ...state.entities.filter((entity) => entity.id !== action.payload)
1721
- ];
1801
+ state.entities = [...state.entities.filter((entity) => entity.id !== action.payload)];
1722
1802
  },
1723
1803
  },
1724
1804
  extraReducers: (builder) => {
@@ -1742,7 +1822,7 @@ const Share = {
1742
1822
  requests: (state) => {
1743
1823
  return {
1744
1824
  loading: state.share.loading,
1745
- entities: state.share.entities
1825
+ entities: state.share.entities,
1746
1826
  };
1747
1827
  },
1748
1828
  },
@@ -2205,7 +2285,14 @@ const widgetsSlice = createSlice({
2205
2285
  registerWidget: (state, action) => {
2206
2286
  const { uniqid, widget } = action.payload;
2207
2287
  state.ids[uniqid] = widget;
2208
- state.states[uniqid] = { busy: false, initialized: false, loading: false, mounted: false, hover: false, empty: true };
2288
+ state.states[uniqid] = {
2289
+ busy: false,
2290
+ initialized: false,
2291
+ loading: false,
2292
+ mounted: false,
2293
+ hover: false,
2294
+ empty: true,
2295
+ };
2209
2296
  },
2210
2297
  registerWidgetObject: (state, action) => {
2211
2298
  const { uniqid, object } = action.payload;
@@ -2362,9 +2449,11 @@ const editorsSlice = createSlice({
2362
2449
  const ed = {
2363
2450
  uniqid,
2364
2451
  name,
2365
- position: 'right'
2452
+ position: 'right',
2366
2453
  };
2367
- state.editors = state.editors.find((ed) => ed.uniqid === uniqid) ? state.editors : [...state.editors, ed];
2454
+ state.editors = state.editors.find((ed) => ed.uniqid === uniqid)
2455
+ ? state.editors
2456
+ : [...state.editors, ed];
2368
2457
  },
2369
2458
  registerEditorPopup: (state, action) => {
2370
2459
  const { uniqid, view } = action.payload;
@@ -2375,7 +2464,7 @@ const editorsSlice = createSlice({
2375
2464
  flushEditorPopup: (state, action) => {
2376
2465
  const { uniqid } = action.payload;
2377
2466
  state.editors = [
2378
- ...state.editors.map((editor) => (editor.uniqid === uniqid ? Object.assign(Object.assign({}, editor), { popup: false }) : editor)),
2467
+ ...state.editors.map((editor) => editor.uniqid === uniqid ? Object.assign(Object.assign({}, editor), { popup: false }) : editor),
2379
2468
  ];
2380
2469
  },
2381
2470
  setEditorPosition: (state, action) => {
@@ -3670,20 +3759,21 @@ const StudioAppsListSlice = createSlice({
3670
3759
  if (state.deleteStudioAppStatus === 'pending') {
3671
3760
  state.deleteStudioAppStatus = 'idle';
3672
3761
  }
3673
- state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.reduce((acc, app) => {
3674
- const { idApp } = action.meta.arg;
3675
- let { status } = action.meta.arg;
3676
- if (status === APP_STATUS_TYPE.INSTALLED)
3677
- status = APP_STATUS_TYPE.SUSPENDED;
3678
- if (app.idApp === idApp && app.status === status)
3679
- return acc;
3680
- if (app.inWorkVersion &&
3681
- app.inWorkVersion.idApp === idApp &&
3682
- app.inWorkVersion.status === status) {
3683
- delete app.inWorkVersion;
3684
- }
3685
- return [...acc, app];
3686
- }, [])) !== null && _b !== void 0 ? _b : [];
3762
+ state.studioAppsList =
3763
+ (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.reduce((acc, app) => {
3764
+ const { idApp } = action.meta.arg;
3765
+ let { status } = action.meta.arg;
3766
+ if (status === APP_STATUS_TYPE.INSTALLED)
3767
+ status = APP_STATUS_TYPE.SUSPENDED;
3768
+ if (app.idApp === idApp && app.status === status)
3769
+ return acc;
3770
+ if (app.inWorkVersion &&
3771
+ app.inWorkVersion.idApp === idApp &&
3772
+ app.inWorkVersion.status === status) {
3773
+ delete app.inWorkVersion;
3774
+ }
3775
+ return [...acc, app];
3776
+ }, [])) !== null && _b !== void 0 ? _b : [];
3687
3777
  })
3688
3778
  .addCase(deleteStudioApp.rejected, (state) => {
3689
3779
  if (state.deleteStudioAppStatus === 'pending')
@@ -3698,14 +3788,15 @@ const StudioAppsListSlice = createSlice({
3698
3788
  if (state.suspendStudioAppStatus === 'pending') {
3699
3789
  state.suspendStudioAppStatus = 'idle';
3700
3790
  }
3701
- state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
3702
- const { idApp } = action.meta.arg;
3703
- if (app.idApp === idApp) {
3704
- app.status = APP_STATUS_TYPE.SUSPENDED;
3791
+ state.studioAppsList =
3792
+ (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
3793
+ const { idApp } = action.meta.arg;
3794
+ if (app.idApp === idApp) {
3795
+ app.status = APP_STATUS_TYPE.SUSPENDED;
3796
+ return app;
3797
+ }
3705
3798
  return app;
3706
- }
3707
- return app;
3708
- })) !== null && _b !== void 0 ? _b : [];
3799
+ })) !== null && _b !== void 0 ? _b : [];
3709
3800
  })
3710
3801
  .addCase(suspendStudioApp.rejected, (state) => {
3711
3802
  if (state.suspendStudioAppStatus === 'pending')
@@ -3720,14 +3811,15 @@ const StudioAppsListSlice = createSlice({
3720
3811
  if (state.restartStudioAppStatus === 'pending') {
3721
3812
  state.restartStudioAppStatus = 'idle';
3722
3813
  }
3723
- state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
3724
- const { idApp } = action.meta.arg;
3725
- if (app.idApp === idApp) {
3726
- app.status = APP_STATUS_TYPE.INSTALLED;
3814
+ state.studioAppsList =
3815
+ (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
3816
+ const { idApp } = action.meta.arg;
3817
+ if (app.idApp === idApp) {
3818
+ app.status = APP_STATUS_TYPE.INSTALLED;
3819
+ return app;
3820
+ }
3727
3821
  return app;
3728
- }
3729
- return app;
3730
- })) !== null && _b !== void 0 ? _b : [];
3822
+ })) !== null && _b !== void 0 ? _b : [];
3731
3823
  })
3732
3824
  .addCase(restartStudioApp.rejected, (state) => {
3733
3825
  if (state.restartStudioAppStatus === 'pending')
@@ -3797,5 +3889,5 @@ const studio = {
3797
3889
  },
3798
3890
  };
3799
3891
 
3800
- export { APP_STATUS_TYPE, AUDIENCE, Animations, AppColumnsDefaultTypes, AppFieldFormPropertyTypes, AppFormBannedFromViews$1 as AppFormBannedFromViews, AppFormFieldOnlyInView, AppFormFixedList$1 as AppFormFixedList, AppFormItemTypes, AppFormNoAsFieldList, AppFormNonPrimaryList, AppFormPrimaryList, AppFormUniqueList, Application, AssetReservation, Bookmark, Comment, ExtraAppFieldsItemViews, Faq, Hook, MODE_EDIT, MODE_VIEW, MagicPad, MapExtraFieldsWithView, MediaLibrary, Model, Network, Platform, STUDIO_VIEW, Share, StatusType$1 as StatusType, TVDisplay, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, animationsReducer, animationsSlice, deleteCurrentAnimation, fetchCurrentAnimation, fetchCurrentAnimationApp, fetchMediaLibraryConfig, fetchMediaLibraryFolders, fetchMediaLibraryUnclassifiedFiles, fetchPads, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, saveCurrentAnimation, slice, studio, toggleAnimationIsActive, updateWidgetContent, viewsList };
3892
+ export { APP_STATUS_TYPE, AUDIENCE, Animations, AppColumnsDefaultTypes, AppFieldFormPropertyTypes, AppFormBannedFromViews$1 as AppFormBannedFromViews, AppFormFieldOnlyInView, AppFormFixedList$1 as AppFormFixedList, AppFormItemTypes, AppFormNoAsFieldList, AppFormNonPrimaryList, AppFormPrimaryList, AppFormUniqueList, Application, AssetReservation, Bookmark, Comment, ExtraAppFieldsItemViews, Faq, Hook, MODE_EDIT, MODE_VIEW, MagicPad, MapExtraFieldsWithView, MediaLibrary, Model, Network, Platform, STUDIO_VIEW, Share, StatusType$1 as StatusType, TVDisplay, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, animationsReducer, animationsSlice, fetchMediaLibraryConfig, fetchMediaLibraryFilesStats, fetchMediaLibraryFolders, fetchMediaLibraryFoldersStats, fetchMediaLibraryStats, fetchMediaLibraryUnclassifiedFiles, fetchPads, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, slice, studio, updateWidgetContent, viewsList };
3801
3893
  //# sourceMappingURL=esm.js.map