jamespot-front-business 1.1.52 → 1.1.54

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
@@ -1,6 +1,6 @@
1
1
  import { createEntityAdapter, createSlice, createAsyncThunk, combineReducers } from '@reduxjs/toolkit';
2
2
  import { combineReducers as combineReducers$1 } from 'redux';
3
- import jamespot, { jEnsure, formatImgUrl, UserLevel, StudioApplicationStatus } from 'jamespot-user-api';
3
+ import jamespot, { jEnsure, formatImgUrl, UserLevel, WidgetsName, StudioApplicationStatus } from 'jamespot-user-api';
4
4
  import { v4 } from 'uuid';
5
5
 
6
6
  /******************************************************************************
@@ -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 });
@@ -1534,9 +1539,9 @@ const fetchMediaLibraryFilesStats = createAsyncThunk('MediaLibrary/fetchMediaLib
1534
1539
  return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary files stats' });
1535
1540
  }
1536
1541
  }));
1537
- const fetchMediaLibraryStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', ({ filters }, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
1542
+ const fetchMediaLibraryStats = createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
1538
1543
  try {
1539
- return yield extra.jApi.mediaLibrary.getStats(filters);
1544
+ return yield extra.jApi.mediaLibrary.getStats();
1540
1545
  }
1541
1546
  catch (error) {
1542
1547
  dispatch(Toast.actions.error({ label: error.errorMsg }));
@@ -1550,8 +1555,20 @@ const selectMediaLibraryFilesStats = (state) => state.mediaLibrary.filesStats;
1550
1555
  const mediaLibraryReducer = mediaLibrarySlice.reducer;
1551
1556
  const MediaLibrary = {
1552
1557
  slice: mediaLibrarySlice,
1553
- actions: { fetchMediaLibraryFolders, fetchMediaLibraryUnclassifiedFiles, fetchMediaLibraryConfig, fetchMediaLibraryStats, fetchMediaLibraryFilesStats, fetchMediaLibraryFoldersStats },
1554
- selectors: { selectMediaLibrary, selectMediaLibraryStats, selectMediaLibraryFoldersStats, selectMediaLibraryFilesStats }
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
+ },
1555
1572
  };
1556
1573
 
1557
1574
  const adapter = createEntityAdapter({
@@ -1560,7 +1577,7 @@ const adapter = createEntityAdapter({
1560
1577
  });
1561
1578
  const getModelIconSrc = (model, size) => {
1562
1579
  const imgProps = {
1563
- from: "imagestatic",
1580
+ from: 'imagestatic',
1564
1581
  size: size !== null && size !== void 0 ? size : 'fitx600',
1565
1582
  uri: `icons/${model && model.icon ? model.icon : `article`}-white`,
1566
1583
  };
@@ -1577,9 +1594,9 @@ const slice$1 = createSlice({
1577
1594
  });
1578
1595
  const selectors = adapter.getSelectors((state) => state.entities.models);
1579
1596
  const utils = {
1580
- getModelIconSrc
1597
+ getModelIconSrc,
1581
1598
  };
1582
- 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);
1583
1600
  const Model = {
1584
1601
  slice: slice$1,
1585
1602
  actions: Object.assign({}, slice$1.actions),
@@ -1626,7 +1643,7 @@ const Network = {
1626
1643
 
1627
1644
  const initialState$9 = {
1628
1645
  userHighlightFields: [],
1629
- userAccountStatus: 0
1646
+ userAccountStatus: 0,
1630
1647
  };
1631
1648
  const PlatformConfigSlice = createSlice({
1632
1649
  name: 'config',
@@ -1694,7 +1711,7 @@ const initialState$8 = {
1694
1711
  loading: 'idle',
1695
1712
  loadingRecent: 'idle',
1696
1713
  query: '',
1697
- page: 1
1714
+ page: 1,
1698
1715
  };
1699
1716
  const WedocAppSlice = createSlice({
1700
1717
  name: 'wedoc',
@@ -1702,7 +1719,7 @@ const WedocAppSlice = createSlice({
1702
1719
  reducers: {
1703
1720
  update: (state, action) => {
1704
1721
  state.entities = [
1705
- ...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),
1706
1723
  ];
1707
1724
  },
1708
1725
  setQuery: (state, action) => {
@@ -1749,7 +1766,7 @@ const WedocApp = {
1749
1766
  loading: state.wedoc.loading === 'pending',
1750
1767
  tab: state.wedoc.tab,
1751
1768
  query: state.wedoc.query,
1752
- page: state.wedoc.page
1769
+ page: state.wedoc.page,
1753
1770
  };
1754
1771
  },
1755
1772
  getRecent: (state) => {
@@ -1762,7 +1779,7 @@ const WedocApp = {
1762
1779
  },
1763
1780
  actions: {
1764
1781
  fetchFiles,
1765
- fetchRecentFiles
1782
+ fetchRecentFiles,
1766
1783
  },
1767
1784
  };
1768
1785
 
@@ -1781,9 +1798,7 @@ const ShareSlice = createSlice({
1781
1798
  initialState: initialState$7,
1782
1799
  reducers: {
1783
1800
  remove: (state, action) => {
1784
- state.entities = [
1785
- ...state.entities.filter((entity) => entity.id !== action.payload)
1786
- ];
1801
+ state.entities = [...state.entities.filter((entity) => entity.id !== action.payload)];
1787
1802
  },
1788
1803
  },
1789
1804
  extraReducers: (builder) => {
@@ -1807,7 +1822,7 @@ const Share = {
1807
1822
  requests: (state) => {
1808
1823
  return {
1809
1824
  loading: state.share.loading,
1810
- entities: state.share.entities
1825
+ entities: state.share.entities,
1811
1826
  };
1812
1827
  },
1813
1828
  },
@@ -2030,7 +2045,7 @@ var WIDGETS = /*#__PURE__*/Object.freeze({
2030
2045
  const widgetArticleTextDefinition = {
2031
2046
  label: 'WIDGET_Text',
2032
2047
  description: 'WIDGET_Text_Description',
2033
- name: 'widget-article-text',
2048
+ name: WidgetsName.ArticleText,
2034
2049
  img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
2035
2050
  available: true,
2036
2051
  panel: {
@@ -2046,7 +2061,7 @@ const widgetArticleTextContent = {
2046
2061
  const widgetArticleTitleDefinition = {
2047
2062
  label: 'WIDGET_Title',
2048
2063
  description: 'WIDGET_Title_Description',
2049
- name: 'widget-article-title',
2064
+ name: WidgetsName.ArticleTitle,
2050
2065
  img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
2051
2066
  available: true,
2052
2067
  panel: {
@@ -2064,7 +2079,7 @@ const widgetArticleTitleContent = {
2064
2079
  const widgetArticleAttachmentDefinition = {
2065
2080
  label: 'WIDGET_Article_Attachment',
2066
2081
  description: 'WIDGET_Article_Attachment_Description',
2067
- name: 'widget-article-attachment',
2082
+ name: WidgetsName.ArticleAttachment,
2068
2083
  img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
2069
2084
  available: true,
2070
2085
  panel: {
@@ -2080,7 +2095,7 @@ const widgetArticleAttachmentContent = {
2080
2095
  const widgetArticleGalleryDefinition = {
2081
2096
  label: 'WIDGET_Article_Gallery',
2082
2097
  description: 'WIDGET_Article_Gallery_Description',
2083
- name: 'widget-article-gallery',
2098
+ name: WidgetsName.ArticleGallery,
2084
2099
  img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
2085
2100
  available: true,
2086
2101
  panel: {
@@ -2098,7 +2113,7 @@ const widgetArticleGalleryContent = {
2098
2113
  const widgetArticleImageDefinition = {
2099
2114
  label: 'WIDGET_Article_Image',
2100
2115
  description: 'WIDGET_Article_Image_Description',
2101
- name: 'widget-article-image',
2116
+ name: WidgetsName.ArticleImage,
2102
2117
  img: '/img/article-widget-thumbnail/widget_thumbnail_illustration.png',
2103
2118
  available: true,
2104
2119
  panel: {
@@ -2112,7 +2127,7 @@ const widgetArticleImageContent = {};
2112
2127
  const widgetArticleButtonDefinition = {
2113
2128
  label: 'WIDGET_Button',
2114
2129
  description: 'WIDGET_Button_Description',
2115
- name: 'widget-article-button',
2130
+ name: WidgetsName.ArticleButton,
2116
2131
  img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
2117
2132
  available: true,
2118
2133
  panel: {
@@ -2139,7 +2154,7 @@ const widgetArticleButtonContent = {
2139
2154
  const widgetApiDefinition = {
2140
2155
  label: 'WIDGET_Api',
2141
2156
  description: 'WIDGET_Api_Description',
2142
- name: 'widget-api',
2157
+ name: WidgetsName.Api,
2143
2158
  img: '/img/fast-intranet/widget-text.png',
2144
2159
  available: true,
2145
2160
  panel: {
@@ -2155,7 +2170,7 @@ const widgetApiContent = {
2155
2170
  const widgetArticleSliderDefinition = {
2156
2171
  label: 'WIDGET_Slider',
2157
2172
  description: 'WIDGET_Slider_Description',
2158
- name: 'widget-article-slider',
2173
+ name: WidgetsName.ArticleSlider,
2159
2174
  img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
2160
2175
  available: true,
2161
2176
  panel: {
@@ -2175,7 +2190,7 @@ const widgetArticleSliderContent = {
2175
2190
  const widgetCheckListDefinition = {
2176
2191
  label: WIDGET_CHECK_LIST_LABEL,
2177
2192
  description: WIDGET_CHECK_LIST_DESCRIPTION,
2178
- name: WIDGET_CHECK_LIST,
2193
+ name: WidgetsName.CheckList,
2179
2194
  img: '/img/fast-intranet/widget-check-list.png',
2180
2195
  available: true,
2181
2196
  panel: {
@@ -2270,7 +2285,14 @@ const widgetsSlice = createSlice({
2270
2285
  registerWidget: (state, action) => {
2271
2286
  const { uniqid, widget } = action.payload;
2272
2287
  state.ids[uniqid] = widget;
2273
- 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
+ };
2274
2296
  },
2275
2297
  registerWidgetObject: (state, action) => {
2276
2298
  const { uniqid, object } = action.payload;
@@ -2427,9 +2449,11 @@ const editorsSlice = createSlice({
2427
2449
  const ed = {
2428
2450
  uniqid,
2429
2451
  name,
2430
- position: 'right'
2452
+ position: 'right',
2431
2453
  };
2432
- 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];
2433
2457
  },
2434
2458
  registerEditorPopup: (state, action) => {
2435
2459
  const { uniqid, view } = action.payload;
@@ -2440,7 +2464,8 @@ const editorsSlice = createSlice({
2440
2464
  flushEditorPopup: (state, action) => {
2441
2465
  const { uniqid } = action.payload;
2442
2466
  state.editors = [
2443
- ...state.editors.map((editor) => (editor.uniqid === uniqid ? Object.assign(Object.assign({}, editor), { popup: false }) : editor)),
2467
+ ...state.editors.map((editor) => editor.uniqid === uniqid
2468
+ ? Object.assign(Object.assign({}, editor), { popup: false }) : editor),
2444
2469
  ];
2445
2470
  },
2446
2471
  setEditorPosition: (state, action) => {
@@ -3735,20 +3760,21 @@ const StudioAppsListSlice = createSlice({
3735
3760
  if (state.deleteStudioAppStatus === 'pending') {
3736
3761
  state.deleteStudioAppStatus = 'idle';
3737
3762
  }
3738
- state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.reduce((acc, app) => {
3739
- const { idApp } = action.meta.arg;
3740
- let { status } = action.meta.arg;
3741
- if (status === APP_STATUS_TYPE.INSTALLED)
3742
- status = APP_STATUS_TYPE.SUSPENDED;
3743
- if (app.idApp === idApp && app.status === status)
3744
- return acc;
3745
- if (app.inWorkVersion &&
3746
- app.inWorkVersion.idApp === idApp &&
3747
- app.inWorkVersion.status === status) {
3748
- delete app.inWorkVersion;
3749
- }
3750
- return [...acc, app];
3751
- }, [])) !== null && _b !== void 0 ? _b : [];
3763
+ state.studioAppsList =
3764
+ (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.reduce((acc, app) => {
3765
+ const { idApp } = action.meta.arg;
3766
+ let { status } = action.meta.arg;
3767
+ if (status === APP_STATUS_TYPE.INSTALLED)
3768
+ status = APP_STATUS_TYPE.SUSPENDED;
3769
+ if (app.idApp === idApp && app.status === status)
3770
+ return acc;
3771
+ if (app.inWorkVersion &&
3772
+ app.inWorkVersion.idApp === idApp &&
3773
+ app.inWorkVersion.status === status) {
3774
+ delete app.inWorkVersion;
3775
+ }
3776
+ return [...acc, app];
3777
+ }, [])) !== null && _b !== void 0 ? _b : [];
3752
3778
  })
3753
3779
  .addCase(deleteStudioApp.rejected, (state) => {
3754
3780
  if (state.deleteStudioAppStatus === 'pending')
@@ -3763,14 +3789,15 @@ const StudioAppsListSlice = createSlice({
3763
3789
  if (state.suspendStudioAppStatus === 'pending') {
3764
3790
  state.suspendStudioAppStatus = 'idle';
3765
3791
  }
3766
- state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
3767
- const { idApp } = action.meta.arg;
3768
- if (app.idApp === idApp) {
3769
- app.status = APP_STATUS_TYPE.SUSPENDED;
3792
+ state.studioAppsList =
3793
+ (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
3794
+ const { idApp } = action.meta.arg;
3795
+ if (app.idApp === idApp) {
3796
+ app.status = APP_STATUS_TYPE.SUSPENDED;
3797
+ return app;
3798
+ }
3770
3799
  return app;
3771
- }
3772
- return app;
3773
- })) !== null && _b !== void 0 ? _b : [];
3800
+ })) !== null && _b !== void 0 ? _b : [];
3774
3801
  })
3775
3802
  .addCase(suspendStudioApp.rejected, (state) => {
3776
3803
  if (state.suspendStudioAppStatus === 'pending')
@@ -3785,14 +3812,15 @@ const StudioAppsListSlice = createSlice({
3785
3812
  if (state.restartStudioAppStatus === 'pending') {
3786
3813
  state.restartStudioAppStatus = 'idle';
3787
3814
  }
3788
- state.studioAppsList = (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
3789
- const { idApp } = action.meta.arg;
3790
- if (app.idApp === idApp) {
3791
- app.status = APP_STATUS_TYPE.INSTALLED;
3815
+ state.studioAppsList =
3816
+ (_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
3817
+ const { idApp } = action.meta.arg;
3818
+ if (app.idApp === idApp) {
3819
+ app.status = APP_STATUS_TYPE.INSTALLED;
3820
+ return app;
3821
+ }
3792
3822
  return app;
3793
- }
3794
- return app;
3795
- })) !== null && _b !== void 0 ? _b : [];
3823
+ })) !== null && _b !== void 0 ? _b : [];
3796
3824
  })
3797
3825
  .addCase(restartStudioApp.rejected, (state) => {
3798
3826
  if (state.restartStudioAppStatus === 'pending')
@@ -3862,5 +3890,5 @@ const studio = {
3862
3890
  },
3863
3891
  };
3864
3892
 
3865
- 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, fetchMediaLibraryFilesStats, fetchMediaLibraryFolders, fetchMediaLibraryFoldersStats, fetchMediaLibraryStats, fetchMediaLibraryUnclassifiedFiles, fetchPads, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, saveCurrentAnimation, slice, studio, toggleAnimationIsActive, updateWidgetContent, viewsList };
3893
+ 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 };
3866
3894
  //# sourceMappingURL=esm.js.map