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/README-internal.md +3 -4
- package/dist/cjs.js +150 -127
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +152 -124
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +87014 -828
- 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 });
|
|
@@ -1542,9 +1547,9 @@ const fetchMediaLibraryFilesStats = toolkit.createAsyncThunk('MediaLibrary/fetch
|
|
|
1542
1547
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot get MediaLibrary files stats' });
|
|
1543
1548
|
}
|
|
1544
1549
|
}));
|
|
1545
|
-
const fetchMediaLibraryStats = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', (
|
|
1550
|
+
const fetchMediaLibraryStats = toolkit.createAsyncThunk('MediaLibrary/fetchMediaLibraryStats', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1546
1551
|
try {
|
|
1547
|
-
return yield extra.jApi.mediaLibrary.getStats(
|
|
1552
|
+
return yield extra.jApi.mediaLibrary.getStats();
|
|
1548
1553
|
}
|
|
1549
1554
|
catch (error) {
|
|
1550
1555
|
dispatch(Toast.actions.error({ label: error.errorMsg }));
|
|
@@ -1558,8 +1563,20 @@ const selectMediaLibraryFilesStats = (state) => state.mediaLibrary.filesStats;
|
|
|
1558
1563
|
const mediaLibraryReducer = mediaLibrarySlice.reducer;
|
|
1559
1564
|
const MediaLibrary = {
|
|
1560
1565
|
slice: mediaLibrarySlice,
|
|
1561
|
-
actions: {
|
|
1562
|
-
|
|
1566
|
+
actions: {
|
|
1567
|
+
fetchMediaLibraryFolders,
|
|
1568
|
+
fetchMediaLibraryUnclassifiedFiles,
|
|
1569
|
+
fetchMediaLibraryConfig,
|
|
1570
|
+
fetchMediaLibraryStats,
|
|
1571
|
+
fetchMediaLibraryFilesStats,
|
|
1572
|
+
fetchMediaLibraryFoldersStats,
|
|
1573
|
+
},
|
|
1574
|
+
selectors: {
|
|
1575
|
+
selectMediaLibrary,
|
|
1576
|
+
selectMediaLibraryStats,
|
|
1577
|
+
selectMediaLibraryFoldersStats,
|
|
1578
|
+
selectMediaLibraryFilesStats,
|
|
1579
|
+
},
|
|
1563
1580
|
};
|
|
1564
1581
|
|
|
1565
1582
|
const adapter = toolkit.createEntityAdapter({
|
|
@@ -1568,7 +1585,7 @@ const adapter = toolkit.createEntityAdapter({
|
|
|
1568
1585
|
});
|
|
1569
1586
|
const getModelIconSrc = (model, size) => {
|
|
1570
1587
|
const imgProps = {
|
|
1571
|
-
from:
|
|
1588
|
+
from: 'imagestatic',
|
|
1572
1589
|
size: size !== null && size !== void 0 ? size : 'fitx600',
|
|
1573
1590
|
uri: `icons/${model && model.icon ? model.icon : `article`}-white`,
|
|
1574
1591
|
};
|
|
@@ -1585,9 +1602,9 @@ const slice$1 = toolkit.createSlice({
|
|
|
1585
1602
|
});
|
|
1586
1603
|
const selectors = adapter.getSelectors((state) => state.entities.models);
|
|
1587
1604
|
const utils = {
|
|
1588
|
-
getModelIconSrc
|
|
1605
|
+
getModelIconSrc,
|
|
1589
1606
|
};
|
|
1590
|
-
const selectByIds = (state, types) => types.map(type => state.entities.models.entities[type]).filter(model => !!model);
|
|
1607
|
+
const selectByIds = (state, types) => types.map((type) => state.entities.models.entities[type]).filter((model) => !!model);
|
|
1591
1608
|
const Model = {
|
|
1592
1609
|
slice: slice$1,
|
|
1593
1610
|
actions: Object.assign({}, slice$1.actions),
|
|
@@ -1634,7 +1651,7 @@ const Network = {
|
|
|
1634
1651
|
|
|
1635
1652
|
const initialState$9 = {
|
|
1636
1653
|
userHighlightFields: [],
|
|
1637
|
-
userAccountStatus: 0
|
|
1654
|
+
userAccountStatus: 0,
|
|
1638
1655
|
};
|
|
1639
1656
|
const PlatformConfigSlice = toolkit.createSlice({
|
|
1640
1657
|
name: 'config',
|
|
@@ -1702,7 +1719,7 @@ const initialState$8 = {
|
|
|
1702
1719
|
loading: 'idle',
|
|
1703
1720
|
loadingRecent: 'idle',
|
|
1704
1721
|
query: '',
|
|
1705
|
-
page: 1
|
|
1722
|
+
page: 1,
|
|
1706
1723
|
};
|
|
1707
1724
|
const WedocAppSlice = toolkit.createSlice({
|
|
1708
1725
|
name: 'wedoc',
|
|
@@ -1710,7 +1727,7 @@ const WedocAppSlice = toolkit.createSlice({
|
|
|
1710
1727
|
reducers: {
|
|
1711
1728
|
update: (state, action) => {
|
|
1712
1729
|
state.entities = [
|
|
1713
|
-
...state.entities.map((file) => file.id === action.payload.id ? Object.assign(Object.assign({}, file), action.payload) : file)
|
|
1730
|
+
...state.entities.map((file) => file.id === action.payload.id ? Object.assign(Object.assign({}, file), action.payload) : file),
|
|
1714
1731
|
];
|
|
1715
1732
|
},
|
|
1716
1733
|
setQuery: (state, action) => {
|
|
@@ -1757,7 +1774,7 @@ const WedocApp = {
|
|
|
1757
1774
|
loading: state.wedoc.loading === 'pending',
|
|
1758
1775
|
tab: state.wedoc.tab,
|
|
1759
1776
|
query: state.wedoc.query,
|
|
1760
|
-
page: state.wedoc.page
|
|
1777
|
+
page: state.wedoc.page,
|
|
1761
1778
|
};
|
|
1762
1779
|
},
|
|
1763
1780
|
getRecent: (state) => {
|
|
@@ -1770,7 +1787,7 @@ const WedocApp = {
|
|
|
1770
1787
|
},
|
|
1771
1788
|
actions: {
|
|
1772
1789
|
fetchFiles,
|
|
1773
|
-
fetchRecentFiles
|
|
1790
|
+
fetchRecentFiles,
|
|
1774
1791
|
},
|
|
1775
1792
|
};
|
|
1776
1793
|
|
|
@@ -1789,9 +1806,7 @@ const ShareSlice = toolkit.createSlice({
|
|
|
1789
1806
|
initialState: initialState$7,
|
|
1790
1807
|
reducers: {
|
|
1791
1808
|
remove: (state, action) => {
|
|
1792
|
-
state.entities = [
|
|
1793
|
-
...state.entities.filter((entity) => entity.id !== action.payload)
|
|
1794
|
-
];
|
|
1809
|
+
state.entities = [...state.entities.filter((entity) => entity.id !== action.payload)];
|
|
1795
1810
|
},
|
|
1796
1811
|
},
|
|
1797
1812
|
extraReducers: (builder) => {
|
|
@@ -1815,7 +1830,7 @@ const Share = {
|
|
|
1815
1830
|
requests: (state) => {
|
|
1816
1831
|
return {
|
|
1817
1832
|
loading: state.share.loading,
|
|
1818
|
-
entities: state.share.entities
|
|
1833
|
+
entities: state.share.entities,
|
|
1819
1834
|
};
|
|
1820
1835
|
},
|
|
1821
1836
|
},
|
|
@@ -2038,7 +2053,7 @@ var WIDGETS = /*#__PURE__*/Object.freeze({
|
|
|
2038
2053
|
const widgetArticleTextDefinition = {
|
|
2039
2054
|
label: 'WIDGET_Text',
|
|
2040
2055
|
description: 'WIDGET_Text_Description',
|
|
2041
|
-
name:
|
|
2056
|
+
name: jamespot.WidgetsName.ArticleText,
|
|
2042
2057
|
img: '/img/article-widget-thumbnail/widget_thumbnail_text.png',
|
|
2043
2058
|
available: true,
|
|
2044
2059
|
panel: {
|
|
@@ -2054,7 +2069,7 @@ const widgetArticleTextContent = {
|
|
|
2054
2069
|
const widgetArticleTitleDefinition = {
|
|
2055
2070
|
label: 'WIDGET_Title',
|
|
2056
2071
|
description: 'WIDGET_Title_Description',
|
|
2057
|
-
name:
|
|
2072
|
+
name: jamespot.WidgetsName.ArticleTitle,
|
|
2058
2073
|
img: '/img/article-widget-thumbnail/widget_thumbnail_title.png',
|
|
2059
2074
|
available: true,
|
|
2060
2075
|
panel: {
|
|
@@ -2072,7 +2087,7 @@ const widgetArticleTitleContent = {
|
|
|
2072
2087
|
const widgetArticleAttachmentDefinition = {
|
|
2073
2088
|
label: 'WIDGET_Article_Attachment',
|
|
2074
2089
|
description: 'WIDGET_Article_Attachment_Description',
|
|
2075
|
-
name:
|
|
2090
|
+
name: jamespot.WidgetsName.ArticleAttachment,
|
|
2076
2091
|
img: '/img/article-widget-thumbnail/widget_thumbnail_files.png',
|
|
2077
2092
|
available: true,
|
|
2078
2093
|
panel: {
|
|
@@ -2088,7 +2103,7 @@ const widgetArticleAttachmentContent = {
|
|
|
2088
2103
|
const widgetArticleGalleryDefinition = {
|
|
2089
2104
|
label: 'WIDGET_Article_Gallery',
|
|
2090
2105
|
description: 'WIDGET_Article_Gallery_Description',
|
|
2091
|
-
name:
|
|
2106
|
+
name: jamespot.WidgetsName.ArticleGallery,
|
|
2092
2107
|
img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
|
|
2093
2108
|
available: true,
|
|
2094
2109
|
panel: {
|
|
@@ -2106,7 +2121,7 @@ const widgetArticleGalleryContent = {
|
|
|
2106
2121
|
const widgetArticleImageDefinition = {
|
|
2107
2122
|
label: 'WIDGET_Article_Image',
|
|
2108
2123
|
description: 'WIDGET_Article_Image_Description',
|
|
2109
|
-
name:
|
|
2124
|
+
name: jamespot.WidgetsName.ArticleImage,
|
|
2110
2125
|
img: '/img/article-widget-thumbnail/widget_thumbnail_illustration.png',
|
|
2111
2126
|
available: true,
|
|
2112
2127
|
panel: {
|
|
@@ -2120,7 +2135,7 @@ const widgetArticleImageContent = {};
|
|
|
2120
2135
|
const widgetArticleButtonDefinition = {
|
|
2121
2136
|
label: 'WIDGET_Button',
|
|
2122
2137
|
description: 'WIDGET_Button_Description',
|
|
2123
|
-
name:
|
|
2138
|
+
name: jamespot.WidgetsName.ArticleButton,
|
|
2124
2139
|
img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
|
|
2125
2140
|
available: true,
|
|
2126
2141
|
panel: {
|
|
@@ -2147,7 +2162,7 @@ const widgetArticleButtonContent = {
|
|
|
2147
2162
|
const widgetApiDefinition = {
|
|
2148
2163
|
label: 'WIDGET_Api',
|
|
2149
2164
|
description: 'WIDGET_Api_Description',
|
|
2150
|
-
name:
|
|
2165
|
+
name: jamespot.WidgetsName.Api,
|
|
2151
2166
|
img: '/img/fast-intranet/widget-text.png',
|
|
2152
2167
|
available: true,
|
|
2153
2168
|
panel: {
|
|
@@ -2163,7 +2178,7 @@ const widgetApiContent = {
|
|
|
2163
2178
|
const widgetArticleSliderDefinition = {
|
|
2164
2179
|
label: 'WIDGET_Slider',
|
|
2165
2180
|
description: 'WIDGET_Slider_Description',
|
|
2166
|
-
name:
|
|
2181
|
+
name: jamespot.WidgetsName.ArticleSlider,
|
|
2167
2182
|
img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
|
|
2168
2183
|
available: true,
|
|
2169
2184
|
panel: {
|
|
@@ -2183,7 +2198,7 @@ const widgetArticleSliderContent = {
|
|
|
2183
2198
|
const widgetCheckListDefinition = {
|
|
2184
2199
|
label: WIDGET_CHECK_LIST_LABEL,
|
|
2185
2200
|
description: WIDGET_CHECK_LIST_DESCRIPTION,
|
|
2186
|
-
name:
|
|
2201
|
+
name: jamespot.WidgetsName.CheckList,
|
|
2187
2202
|
img: '/img/fast-intranet/widget-check-list.png',
|
|
2188
2203
|
available: true,
|
|
2189
2204
|
panel: {
|
|
@@ -2278,7 +2293,14 @@ const widgetsSlice = toolkit.createSlice({
|
|
|
2278
2293
|
registerWidget: (state, action) => {
|
|
2279
2294
|
const { uniqid, widget } = action.payload;
|
|
2280
2295
|
state.ids[uniqid] = widget;
|
|
2281
|
-
state.states[uniqid] = {
|
|
2296
|
+
state.states[uniqid] = {
|
|
2297
|
+
busy: false,
|
|
2298
|
+
initialized: false,
|
|
2299
|
+
loading: false,
|
|
2300
|
+
mounted: false,
|
|
2301
|
+
hover: false,
|
|
2302
|
+
empty: true,
|
|
2303
|
+
};
|
|
2282
2304
|
},
|
|
2283
2305
|
registerWidgetObject: (state, action) => {
|
|
2284
2306
|
const { uniqid, object } = action.payload;
|
|
@@ -2435,9 +2457,11 @@ const editorsSlice = toolkit.createSlice({
|
|
|
2435
2457
|
const ed = {
|
|
2436
2458
|
uniqid,
|
|
2437
2459
|
name,
|
|
2438
|
-
position: 'right'
|
|
2460
|
+
position: 'right',
|
|
2439
2461
|
};
|
|
2440
|
-
state.editors = state.editors.find((ed) => ed.uniqid === uniqid)
|
|
2462
|
+
state.editors = state.editors.find((ed) => ed.uniqid === uniqid)
|
|
2463
|
+
? state.editors
|
|
2464
|
+
: [...state.editors, ed];
|
|
2441
2465
|
},
|
|
2442
2466
|
registerEditorPopup: (state, action) => {
|
|
2443
2467
|
const { uniqid, view } = action.payload;
|
|
@@ -2448,7 +2472,8 @@ const editorsSlice = toolkit.createSlice({
|
|
|
2448
2472
|
flushEditorPopup: (state, action) => {
|
|
2449
2473
|
const { uniqid } = action.payload;
|
|
2450
2474
|
state.editors = [
|
|
2451
|
-
...state.editors.map((editor) =>
|
|
2475
|
+
...state.editors.map((editor) => editor.uniqid === uniqid
|
|
2476
|
+
? Object.assign(Object.assign({}, editor), { popup: false }) : editor),
|
|
2452
2477
|
];
|
|
2453
2478
|
},
|
|
2454
2479
|
setEditorPosition: (state, action) => {
|
|
@@ -3743,20 +3768,21 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3743
3768
|
if (state.deleteStudioAppStatus === 'pending') {
|
|
3744
3769
|
state.deleteStudioAppStatus = 'idle';
|
|
3745
3770
|
}
|
|
3746
|
-
state.studioAppsList =
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
status
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
app.inWorkVersion
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3771
|
+
state.studioAppsList =
|
|
3772
|
+
(_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.reduce((acc, app) => {
|
|
3773
|
+
const { idApp } = action.meta.arg;
|
|
3774
|
+
let { status } = action.meta.arg;
|
|
3775
|
+
if (status === APP_STATUS_TYPE.INSTALLED)
|
|
3776
|
+
status = APP_STATUS_TYPE.SUSPENDED;
|
|
3777
|
+
if (app.idApp === idApp && app.status === status)
|
|
3778
|
+
return acc;
|
|
3779
|
+
if (app.inWorkVersion &&
|
|
3780
|
+
app.inWorkVersion.idApp === idApp &&
|
|
3781
|
+
app.inWorkVersion.status === status) {
|
|
3782
|
+
delete app.inWorkVersion;
|
|
3783
|
+
}
|
|
3784
|
+
return [...acc, app];
|
|
3785
|
+
}, [])) !== null && _b !== void 0 ? _b : [];
|
|
3760
3786
|
})
|
|
3761
3787
|
.addCase(deleteStudioApp.rejected, (state) => {
|
|
3762
3788
|
if (state.deleteStudioAppStatus === 'pending')
|
|
@@ -3771,14 +3797,15 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3771
3797
|
if (state.suspendStudioAppStatus === 'pending') {
|
|
3772
3798
|
state.suspendStudioAppStatus = 'idle';
|
|
3773
3799
|
}
|
|
3774
|
-
state.studioAppsList =
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
app.
|
|
3800
|
+
state.studioAppsList =
|
|
3801
|
+
(_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
|
|
3802
|
+
const { idApp } = action.meta.arg;
|
|
3803
|
+
if (app.idApp === idApp) {
|
|
3804
|
+
app.status = APP_STATUS_TYPE.SUSPENDED;
|
|
3805
|
+
return app;
|
|
3806
|
+
}
|
|
3778
3807
|
return app;
|
|
3779
|
-
}
|
|
3780
|
-
return app;
|
|
3781
|
-
})) !== null && _b !== void 0 ? _b : [];
|
|
3808
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
3782
3809
|
})
|
|
3783
3810
|
.addCase(suspendStudioApp.rejected, (state) => {
|
|
3784
3811
|
if (state.suspendStudioAppStatus === 'pending')
|
|
@@ -3793,14 +3820,15 @@ const StudioAppsListSlice = toolkit.createSlice({
|
|
|
3793
3820
|
if (state.restartStudioAppStatus === 'pending') {
|
|
3794
3821
|
state.restartStudioAppStatus = 'idle';
|
|
3795
3822
|
}
|
|
3796
|
-
state.studioAppsList =
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
app.
|
|
3823
|
+
state.studioAppsList =
|
|
3824
|
+
(_b = (_a = state.studioAppsList) === null || _a === void 0 ? void 0 : _a.map((app) => {
|
|
3825
|
+
const { idApp } = action.meta.arg;
|
|
3826
|
+
if (app.idApp === idApp) {
|
|
3827
|
+
app.status = APP_STATUS_TYPE.INSTALLED;
|
|
3828
|
+
return app;
|
|
3829
|
+
}
|
|
3800
3830
|
return app;
|
|
3801
|
-
}
|
|
3802
|
-
return app;
|
|
3803
|
-
})) !== null && _b !== void 0 ? _b : [];
|
|
3831
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
3804
3832
|
})
|
|
3805
3833
|
.addCase(restartStudioApp.rejected, (state) => {
|
|
3806
3834
|
if (state.restartStudioAppStatus === 'pending')
|
|
@@ -3907,9 +3935,6 @@ exports.WidgetEditor = WidgetEditor;
|
|
|
3907
3935
|
exports.actions = actions;
|
|
3908
3936
|
exports.animationsReducer = animationsReducer;
|
|
3909
3937
|
exports.animationsSlice = animationsSlice;
|
|
3910
|
-
exports.deleteCurrentAnimation = deleteCurrentAnimation;
|
|
3911
|
-
exports.fetchCurrentAnimation = fetchCurrentAnimation;
|
|
3912
|
-
exports.fetchCurrentAnimationApp = fetchCurrentAnimationApp;
|
|
3913
3938
|
exports.fetchMediaLibraryConfig = fetchMediaLibraryConfig;
|
|
3914
3939
|
exports.fetchMediaLibraryFilesStats = fetchMediaLibraryFilesStats;
|
|
3915
3940
|
exports.fetchMediaLibraryFolders = fetchMediaLibraryFolders;
|
|
@@ -3921,10 +3946,8 @@ exports.jland = jland;
|
|
|
3921
3946
|
exports.magicPadSlice = magicPadSlice;
|
|
3922
3947
|
exports.mediaLibraryReducer = mediaLibraryReducer;
|
|
3923
3948
|
exports.mediaLibrarySlice = mediaLibrarySlice;
|
|
3924
|
-
exports.saveCurrentAnimation = saveCurrentAnimation;
|
|
3925
3949
|
exports.slice = slice;
|
|
3926
3950
|
exports.studio = studio;
|
|
3927
|
-
exports.toggleAnimationIsActive = toggleAnimationIsActive;
|
|
3928
3951
|
exports.updateWidgetContent = updateWidgetContent;
|
|
3929
3952
|
exports.viewsList = viewsList;
|
|
3930
3953
|
//# sourceMappingURL=cjs.js.map
|