jamespot-front-business 1.1.46 → 1.1.47
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/cjs.js +122 -21
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +120 -22
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +133 -49
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -125,7 +125,7 @@ const getAnimationsRTHandlers = function (dispatch) {
|
|
|
125
125
|
];
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
const initialState$
|
|
128
|
+
const initialState$m = {
|
|
129
129
|
animationConfiguration: null,
|
|
130
130
|
isActiveForCurrentUser: false,
|
|
131
131
|
isInitialized: false,
|
|
@@ -133,7 +133,7 @@ const initialState$l = {
|
|
|
133
133
|
};
|
|
134
134
|
const animationsSlice = toolkit.createSlice({
|
|
135
135
|
name: 'animations',
|
|
136
|
-
initialState: initialState$
|
|
136
|
+
initialState: initialState$m,
|
|
137
137
|
reducers: {},
|
|
138
138
|
extraReducers: (builder) => {
|
|
139
139
|
builder.addCase(fetchCurrentAnimation.fulfilled, (state, action) => {
|
|
@@ -245,7 +245,7 @@ const Application = {
|
|
|
245
245
|
selectors: selectors$1,
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
-
const initialState$
|
|
248
|
+
const initialState$l = {
|
|
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$l,
|
|
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$k = {
|
|
281
281
|
description: '',
|
|
282
282
|
right: {
|
|
283
283
|
manage: false,
|
|
@@ -291,7 +291,7 @@ const initialState$j = {
|
|
|
291
291
|
};
|
|
292
292
|
const AssetReservationConfigurationSlice = toolkit.createSlice({
|
|
293
293
|
name: 'configuration',
|
|
294
|
-
initialState: initialState$
|
|
294
|
+
initialState: initialState$k,
|
|
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$j = {
|
|
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$j,
|
|
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$i = {
|
|
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$i,
|
|
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$h = {
|
|
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$h,
|
|
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$g = {
|
|
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$g,
|
|
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$f = {
|
|
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$f,
|
|
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$e = {
|
|
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$e,
|
|
869
869
|
reducers: {},
|
|
870
870
|
extraReducers: (builder) => {
|
|
871
871
|
builder
|
|
@@ -1173,7 +1173,7 @@ const initialMap = {
|
|
|
1173
1173
|
illustration: '',
|
|
1174
1174
|
assignLicense: false,
|
|
1175
1175
|
};
|
|
1176
|
-
const initialState$
|
|
1176
|
+
const initialState$d = {
|
|
1177
1177
|
map: Object.assign({}, initialMap),
|
|
1178
1178
|
loading: 'idle',
|
|
1179
1179
|
status: undefined,
|
|
@@ -1217,13 +1217,13 @@ const createMap = toolkit.createAsyncThunk('mapCreate/create', ({ map, jlandUrlB
|
|
|
1217
1217
|
}));
|
|
1218
1218
|
const MapCreateSlice = toolkit.createSlice({
|
|
1219
1219
|
name: 'mapCreate',
|
|
1220
|
-
initialState: initialState$
|
|
1220
|
+
initialState: initialState$d,
|
|
1221
1221
|
reducers: {
|
|
1222
1222
|
setMap: (state, action) => {
|
|
1223
1223
|
state.map = action.payload;
|
|
1224
1224
|
},
|
|
1225
1225
|
resetCreateMapState: () => {
|
|
1226
|
-
return initialState$
|
|
1226
|
+
return initialState$d;
|
|
1227
1227
|
},
|
|
1228
1228
|
},
|
|
1229
1229
|
extraReducers: (builder) => {
|
|
@@ -1277,6 +1277,104 @@ const jland = {
|
|
|
1277
1277
|
utils: { buildUrlToJland },
|
|
1278
1278
|
};
|
|
1279
1279
|
|
|
1280
|
+
const initialState$c = {
|
|
1281
|
+
loading: 'idle',
|
|
1282
|
+
pads: [],
|
|
1283
|
+
query: '',
|
|
1284
|
+
page: 1,
|
|
1285
|
+
tab: 'all-pads',
|
|
1286
|
+
filters: [],
|
|
1287
|
+
orders: [],
|
|
1288
|
+
limit: 10,
|
|
1289
|
+
nbResults: 0,
|
|
1290
|
+
};
|
|
1291
|
+
const magicPadSlice = toolkit.createSlice({
|
|
1292
|
+
name: 'magicPad',
|
|
1293
|
+
initialState: initialState$c,
|
|
1294
|
+
reducers: {
|
|
1295
|
+
setTab: (state, action) => {
|
|
1296
|
+
state.tab = action.payload;
|
|
1297
|
+
state.page = 1;
|
|
1298
|
+
state.orders = [];
|
|
1299
|
+
state.filters = [];
|
|
1300
|
+
},
|
|
1301
|
+
setQuery: (state, action) => {
|
|
1302
|
+
state.query = action.payload;
|
|
1303
|
+
state.page = 1;
|
|
1304
|
+
state.orders = [];
|
|
1305
|
+
state.filters = [];
|
|
1306
|
+
},
|
|
1307
|
+
setPage: (state, action) => {
|
|
1308
|
+
state.page = action.payload;
|
|
1309
|
+
},
|
|
1310
|
+
setFilters: (state, action) => {
|
|
1311
|
+
state.filters = action.payload;
|
|
1312
|
+
},
|
|
1313
|
+
setOrders: (state, action) => {
|
|
1314
|
+
state.orders = action.payload;
|
|
1315
|
+
},
|
|
1316
|
+
},
|
|
1317
|
+
extraReducers: (builder) => {
|
|
1318
|
+
builder
|
|
1319
|
+
.addCase(fetchPads.pending, (state) => {
|
|
1320
|
+
if (state.loading === 'idle')
|
|
1321
|
+
state.loading = 'pending';
|
|
1322
|
+
})
|
|
1323
|
+
.addCase(fetchPads.fulfilled, (state, action) => {
|
|
1324
|
+
if (state.loading == 'pending')
|
|
1325
|
+
state.loading = 'idle';
|
|
1326
|
+
state.pads = action.payload.data;
|
|
1327
|
+
state.nbResults = action.payload.cnt;
|
|
1328
|
+
return state;
|
|
1329
|
+
})
|
|
1330
|
+
.addCase(fetchPads.rejected, (state) => {
|
|
1331
|
+
if (state.loading == 'pending')
|
|
1332
|
+
state.loading = 'idle';
|
|
1333
|
+
});
|
|
1334
|
+
},
|
|
1335
|
+
});
|
|
1336
|
+
const fetchPads = toolkit.createAsyncThunk('magicPad/fetchPads', (params, { extra, rejectWithValue, dispatch, getState }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1337
|
+
var _a;
|
|
1338
|
+
try {
|
|
1339
|
+
const state = getState().magicPad;
|
|
1340
|
+
const page = state.page;
|
|
1341
|
+
const query = state.query;
|
|
1342
|
+
const filters = [
|
|
1343
|
+
...state.filters,
|
|
1344
|
+
...(state.tab === 'my-pads'
|
|
1345
|
+
? [
|
|
1346
|
+
{
|
|
1347
|
+
name: 'idUser',
|
|
1348
|
+
value: params.idUserLogged,
|
|
1349
|
+
},
|
|
1350
|
+
]
|
|
1351
|
+
: []),
|
|
1352
|
+
];
|
|
1353
|
+
const orders = state.orders.length > 0 ? state.orders : [{ name: 'dateCreation', sort: 'DESC' }];
|
|
1354
|
+
return (yield extra.jApi.article.list({
|
|
1355
|
+
type: 'magicpad',
|
|
1356
|
+
limit: state.limit,
|
|
1357
|
+
format: 'raw-list',
|
|
1358
|
+
page,
|
|
1359
|
+
query,
|
|
1360
|
+
orders,
|
|
1361
|
+
filters,
|
|
1362
|
+
})).result;
|
|
1363
|
+
}
|
|
1364
|
+
catch (e) {
|
|
1365
|
+
dispatch(Toast.actions.error({ label: (_a = e.errorMsg) !== null && _a !== void 0 ? _a : 'GLOBAL_Technical_Error' }));
|
|
1366
|
+
return rejectWithValue({ error: 1, errorMsg: 'Cannot fetch pads' });
|
|
1367
|
+
}
|
|
1368
|
+
}));
|
|
1369
|
+
const selectMagicPad = (state) => state.magicPad;
|
|
1370
|
+
const MagicPad = {
|
|
1371
|
+
slice: magicPadSlice,
|
|
1372
|
+
actions: {
|
|
1373
|
+
fetchPads,
|
|
1374
|
+
},
|
|
1375
|
+
selectors: { selectMagicPad },
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1280
1378
|
const MediaLibraryAppConst = {
|
|
1281
1379
|
route: 'media-library',
|
|
1282
1380
|
moduleName: 'MediaLibraryHook',
|
|
@@ -3685,6 +3783,7 @@ exports.Faq = Faq;
|
|
|
3685
3783
|
exports.Hook = Hook;
|
|
3686
3784
|
exports.MODE_EDIT = MODE_EDIT;
|
|
3687
3785
|
exports.MODE_VIEW = MODE_VIEW;
|
|
3786
|
+
exports.MagicPad = MagicPad;
|
|
3688
3787
|
exports.MapExtraFieldsWithView = MapExtraFieldsWithView;
|
|
3689
3788
|
exports.MediaLibrary = MediaLibrary;
|
|
3690
3789
|
exports.Model = Model;
|
|
@@ -3708,7 +3807,9 @@ exports.fetchCurrentAnimationApp = fetchCurrentAnimationApp;
|
|
|
3708
3807
|
exports.fetchMediaLibraryConfig = fetchMediaLibraryConfig;
|
|
3709
3808
|
exports.fetchMediaLibraryFolders = fetchMediaLibraryFolders;
|
|
3710
3809
|
exports.fetchMediaLibraryUnclassifiedFiles = fetchMediaLibraryUnclassifiedFiles;
|
|
3810
|
+
exports.fetchPads = fetchPads;
|
|
3711
3811
|
exports.jland = jland;
|
|
3812
|
+
exports.magicPadSlice = magicPadSlice;
|
|
3712
3813
|
exports.mediaLibraryReducer = mediaLibraryReducer;
|
|
3713
3814
|
exports.mediaLibrarySlice = mediaLibrarySlice;
|
|
3714
3815
|
exports.saveCurrentAnimation = saveCurrentAnimation;
|