jamespot-front-business 1.1.46 → 1.1.48

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
@@ -117,7 +117,7 @@ const getAnimationsRTHandlers = function (dispatch) {
117
117
  ];
118
118
  };
119
119
 
120
- const initialState$l = {
120
+ const initialState$m = {
121
121
  animationConfiguration: null,
122
122
  isActiveForCurrentUser: false,
123
123
  isInitialized: false,
@@ -125,7 +125,7 @@ const initialState$l = {
125
125
  };
126
126
  const animationsSlice = createSlice({
127
127
  name: 'animations',
128
- initialState: initialState$l,
128
+ initialState: initialState$m,
129
129
  reducers: {},
130
130
  extraReducers: (builder) => {
131
131
  builder.addCase(fetchCurrentAnimation.fulfilled, (state, action) => {
@@ -237,7 +237,7 @@ const Application = {
237
237
  selectors: selectors$1,
238
238
  };
239
239
 
240
- const initialState$k = {
240
+ const initialState$l = {
241
241
  entities: [],
242
242
  loading: 'idle',
243
243
  nbResults: 0,
@@ -248,7 +248,7 @@ const fetchBookableAsset = createAsyncThunk('BookableAsset/fetchBookableAsset',
248
248
  }));
249
249
  const BookableAssetSlice = createSlice({
250
250
  name: 'bookableAsset',
251
- initialState: initialState$k,
251
+ initialState: initialState$l,
252
252
  reducers: {},
253
253
  extraReducers: (builder) => {
254
254
  builder
@@ -269,7 +269,7 @@ const BookableAssetSlice = createSlice({
269
269
  const fetchConfiguration = createAsyncThunk('AssetReservation/configuration', (_, { extra }) => __awaiter(void 0, void 0, void 0, function* () {
270
270
  return yield extra.jApi.assetReservation.configuration();
271
271
  }));
272
- const initialState$j = {
272
+ const initialState$k = {
273
273
  description: '',
274
274
  right: {
275
275
  manage: false,
@@ -283,7 +283,7 @@ const initialState$j = {
283
283
  };
284
284
  const AssetReservationConfigurationSlice = createSlice({
285
285
  name: 'configuration',
286
- initialState: initialState$j,
286
+ initialState: initialState$k,
287
287
  reducers: {},
288
288
  extraReducers: (builder) => {
289
289
  builder
@@ -304,7 +304,7 @@ const initForm = {
304
304
  hourStart: '',
305
305
  hourEnd: '',
306
306
  };
307
- const initialState$i = {
307
+ const initialState$j = {
308
308
  entities: [],
309
309
  loading: 'idle',
310
310
  nbResults: 0,
@@ -316,7 +316,7 @@ const fetchReservation = createAsyncThunk('Reservation/fetchReservation', (viewM
316
316
  }));
317
317
  const ReservationSlice = createSlice({
318
318
  name: 'reservation',
319
- initialState: initialState$i,
319
+ initialState: initialState$j,
320
320
  reducers: {
321
321
  setForm: (state, action) => {
322
322
  state.form = action.payload;
@@ -372,7 +372,7 @@ const AssetReservation = {
372
372
  },
373
373
  };
374
374
 
375
- const initialState$h = {
375
+ const initialState$i = {
376
376
  loading: 'idle',
377
377
  comments: [],
378
378
  };
@@ -389,7 +389,7 @@ const fetchComments = createAsyncThunk('commentList/fetchCommentList', (params,
389
389
  }));
390
390
  const CommentListSlice = createSlice({
391
391
  name: 'commentList',
392
- initialState: initialState$h,
392
+ initialState: initialState$i,
393
393
  reducers: {
394
394
  discardComments: (state, action) => {
395
395
  state.comments = state.comments.filter((c) => c.idArticle !== action.payload.idArticle);
@@ -480,7 +480,7 @@ const Comment = {
480
480
  getCommentsLikeRTHandlers,
481
481
  };
482
482
 
483
- const initialState$g = {
483
+ const initialState$h = {
484
484
  bookmarks: [],
485
485
  loading: 'idle',
486
486
  status: undefined,
@@ -543,7 +543,7 @@ const deleteBookmark = createAsyncThunk('bookmarkList/deleteBookmark', (bookmark
543
543
  }));
544
544
  const BookmarkListSlice = createSlice({
545
545
  name: 'bookmarkList',
546
- initialState: initialState$g,
546
+ initialState: initialState$h,
547
547
  reducers: {
548
548
  resetAddBookmarkStatus: (state, action) => {
549
549
  if (state.add[action.payload]) {
@@ -706,7 +706,7 @@ const getBookmarkRTHandlers = function (dispatch) {
706
706
  ];
707
707
  };
708
708
 
709
- const initialState$f = {
709
+ const initialState$g = {
710
710
  bookmark: undefined,
711
711
  status: undefined,
712
712
  loading: 'idle',
@@ -728,7 +728,7 @@ const editBookmark = createAsyncThunk('bookmarkEdit/editBookmark', (bookmark, {
728
728
  }));
729
729
  const BookmarkEditSlice = createSlice({
730
730
  name: 'bookmarkEdit',
731
- initialState: initialState$f,
731
+ initialState: initialState$g,
732
732
  reducers: {
733
733
  setEditBookmark: (state, action) => {
734
734
  state.bookmark = Object.assign({}, action.payload);
@@ -781,7 +781,7 @@ const Bookmark = {
781
781
  getRTHandlers: getBookmarkRTHandlers,
782
782
  };
783
783
 
784
- const initialState$e = {
784
+ const initialState$f = {
785
785
  loading: 'idle',
786
786
  access: { createCategory: false },
787
787
  };
@@ -810,7 +810,7 @@ const fetchFaqConfig = createAsyncThunk('faqConfig/fetch', () => __awaiter(void
810
810
  }));
811
811
  const FaqConfigSlice = createSlice({
812
812
  name: 'config',
813
- initialState: initialState$e,
813
+ initialState: initialState$f,
814
814
  reducers: {},
815
815
  extraReducers: (builder) => {
816
816
  builder
@@ -845,7 +845,7 @@ const FaqConfigSlice = createSlice({
845
845
  },
846
846
  });
847
847
 
848
- const initialState$d = {
848
+ const initialState$e = {
849
849
  loading: 'idle',
850
850
  categories: null,
851
851
  };
@@ -857,7 +857,7 @@ const fetchFaqCategories = createAsyncThunk('faqCategories/fetch', () => __await
857
857
  }));
858
858
  const FaqCategoriesSlice = createSlice({
859
859
  name: 'categories',
860
- initialState: initialState$d,
860
+ initialState: initialState$e,
861
861
  reducers: {},
862
862
  extraReducers: (builder) => {
863
863
  builder
@@ -1165,7 +1165,7 @@ const initialMap = {
1165
1165
  illustration: '',
1166
1166
  assignLicense: false,
1167
1167
  };
1168
- const initialState$c = {
1168
+ const initialState$d = {
1169
1169
  map: Object.assign({}, initialMap),
1170
1170
  loading: 'idle',
1171
1171
  status: undefined,
@@ -1209,13 +1209,13 @@ const createMap = createAsyncThunk('mapCreate/create', ({ map, jlandUrlBase }, {
1209
1209
  }));
1210
1210
  const MapCreateSlice = createSlice({
1211
1211
  name: 'mapCreate',
1212
- initialState: initialState$c,
1212
+ initialState: initialState$d,
1213
1213
  reducers: {
1214
1214
  setMap: (state, action) => {
1215
1215
  state.map = action.payload;
1216
1216
  },
1217
1217
  resetCreateMapState: () => {
1218
- return initialState$c;
1218
+ return initialState$d;
1219
1219
  },
1220
1220
  },
1221
1221
  extraReducers: (builder) => {
@@ -1269,6 +1269,104 @@ const jland = {
1269
1269
  utils: { buildUrlToJland },
1270
1270
  };
1271
1271
 
1272
+ const initialState$c = {
1273
+ loading: 'idle',
1274
+ pads: [],
1275
+ query: '',
1276
+ page: 1,
1277
+ tab: 'all-pads',
1278
+ filters: [],
1279
+ orders: [],
1280
+ limit: 10,
1281
+ nbResults: 0,
1282
+ };
1283
+ const magicPadSlice = createSlice({
1284
+ name: 'magicPad',
1285
+ initialState: initialState$c,
1286
+ reducers: {
1287
+ setTab: (state, action) => {
1288
+ state.tab = action.payload;
1289
+ state.page = 1;
1290
+ state.orders = [];
1291
+ state.filters = [];
1292
+ },
1293
+ setQuery: (state, action) => {
1294
+ state.query = action.payload;
1295
+ state.page = 1;
1296
+ state.orders = [];
1297
+ state.filters = [];
1298
+ },
1299
+ setPage: (state, action) => {
1300
+ state.page = action.payload;
1301
+ },
1302
+ setFilters: (state, action) => {
1303
+ state.filters = action.payload;
1304
+ },
1305
+ setOrders: (state, action) => {
1306
+ state.orders = action.payload;
1307
+ },
1308
+ },
1309
+ extraReducers: (builder) => {
1310
+ builder
1311
+ .addCase(fetchPads.pending, (state) => {
1312
+ if (state.loading === 'idle')
1313
+ state.loading = 'pending';
1314
+ })
1315
+ .addCase(fetchPads.fulfilled, (state, action) => {
1316
+ if (state.loading == 'pending')
1317
+ state.loading = 'idle';
1318
+ state.pads = action.payload.data;
1319
+ state.nbResults = action.payload.cnt;
1320
+ return state;
1321
+ })
1322
+ .addCase(fetchPads.rejected, (state) => {
1323
+ if (state.loading == 'pending')
1324
+ state.loading = 'idle';
1325
+ });
1326
+ },
1327
+ });
1328
+ const fetchPads = createAsyncThunk('magicPad/fetchPads', (params, { extra, rejectWithValue, dispatch, getState }) => __awaiter(void 0, void 0, void 0, function* () {
1329
+ var _a;
1330
+ try {
1331
+ const state = getState().magicPad;
1332
+ const page = state.page;
1333
+ const query = state.query;
1334
+ const filters = [
1335
+ ...state.filters,
1336
+ ...(state.tab === 'my-pads'
1337
+ ? [
1338
+ {
1339
+ name: 'idUser',
1340
+ value: params.idUserLogged,
1341
+ },
1342
+ ]
1343
+ : []),
1344
+ ];
1345
+ const orders = state.orders.length > 0 ? state.orders : [{ name: 'dateCreation', sort: 'DESC' }];
1346
+ return (yield extra.jApi.article.list({
1347
+ type: 'magicpad',
1348
+ limit: state.limit,
1349
+ format: 'raw-list',
1350
+ page,
1351
+ query,
1352
+ orders,
1353
+ filters,
1354
+ })).result;
1355
+ }
1356
+ catch (e) {
1357
+ dispatch(Toast.actions.error({ label: (_a = e.errorMsg) !== null && _a !== void 0 ? _a : 'GLOBAL_Technical_Error' }));
1358
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot fetch pads' });
1359
+ }
1360
+ }));
1361
+ const selectMagicPad = (state) => state.magicPad;
1362
+ const MagicPad = {
1363
+ slice: magicPadSlice,
1364
+ actions: {
1365
+ fetchPads,
1366
+ },
1367
+ selectors: { selectMagicPad },
1368
+ };
1369
+
1272
1370
  const MediaLibraryAppConst = {
1273
1371
  route: 'media-library',
1274
1372
  moduleName: 'MediaLibraryHook',
@@ -1824,6 +1922,22 @@ const UserCurrent = {
1824
1922
  utils: { isAdmin, isLogged },
1825
1923
  };
1826
1924
 
1925
+ const widgetApiDefinition = {
1926
+ label: 'WIDGET_Api',
1927
+ description: 'WIDGET_Api_Description',
1928
+ name: 'widget-api',
1929
+ img: '/img/fast-intranet/widget-text.png',
1930
+ available: true,
1931
+ panel: {
1932
+ useWrapper: false,
1933
+ useEditor: true,
1934
+ useWidgets: false,
1935
+ },
1936
+ };
1937
+ const widgetApiContent = {
1938
+ url: '',
1939
+ };
1940
+
1827
1941
  const widgetArticleAttachmentDefinition = {
1828
1942
  label: 'WIDGET_Article_Attachment',
1829
1943
  description: 'WIDGET_Article_Attachment_Description',
@@ -1840,6 +1954,33 @@ const widgetArticleAttachmentContent = {
1840
1954
  files: [],
1841
1955
  };
1842
1956
 
1957
+ const widgetArticleButtonDefinition = {
1958
+ label: 'WIDGET_Button',
1959
+ description: 'WIDGET_Button_Description',
1960
+ name: 'widget-article-button',
1961
+ img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
1962
+ available: true,
1963
+ panel: {
1964
+ useWrapper: false,
1965
+ useEditor: true,
1966
+ useWidgets: false,
1967
+ },
1968
+ };
1969
+ const widgetArticleButtonContent = {
1970
+ text: '',
1971
+ openingType: 'link',
1972
+ openingTypeLink: {
1973
+ url: '',
1974
+ target: '_blank',
1975
+ },
1976
+ variant: 'contained',
1977
+ fontSize: '14',
1978
+ color: '#fff',
1979
+ backgroundColor: '#4dbf96',
1980
+ buttonSize: 'lg',
1981
+ borderRadius: '4',
1982
+ };
1983
+
1843
1984
  const widgetArticleGalleryDefinition = {
1844
1985
  label: 'WIDGET_Article_Gallery',
1845
1986
  description: 'WIDGET_Article_Gallery_Description',
@@ -1872,11 +2013,11 @@ const widgetArticleImageDefinition = {
1872
2013
  };
1873
2014
  const widgetArticleImageContent = {};
1874
2015
 
1875
- const widgetArticleButtonDefinition = {
1876
- label: 'WIDGET_Button',
1877
- description: 'WIDGET_Button_Description',
1878
- name: 'widget-article-button',
1879
- img: '/img/article-widget-thumbnail/widget_thumbnail_button.png',
2016
+ const widgetArticleSliderDefinition = {
2017
+ label: 'WIDGET_Slider',
2018
+ description: 'WIDGET_Slider_Description',
2019
+ name: 'widget-article-slider',
2020
+ img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
1880
2021
  available: true,
1881
2022
  panel: {
1882
2023
  useWrapper: false,
@@ -1884,19 +2025,12 @@ const widgetArticleButtonDefinition = {
1884
2025
  useWidgets: false,
1885
2026
  },
1886
2027
  };
1887
- const widgetArticleButtonContent = {
1888
- text: '',
1889
- openingType: 'link',
1890
- openingTypeLink: {
1891
- url: '',
1892
- target: '_blank',
1893
- },
1894
- variant: 'contained',
1895
- fontSize: '14',
1896
- color: '#fff',
1897
- backgroundColor: '#4dbf96',
1898
- buttonSize: 'lg',
1899
- borderRadius: '4',
2028
+ const widgetArticleSliderContent = {
2029
+ slides: [],
2030
+ maxWidth: 800,
2031
+ loop: false,
2032
+ useDots: true,
2033
+ startAt: 0,
1900
2034
  };
1901
2035
 
1902
2036
  const widgetArticleTextDefinition = {
@@ -1935,27 +2069,34 @@ const widgetArticleTitleContent = {
1935
2069
  backgroundColor: 'transparent',
1936
2070
  };
1937
2071
 
1938
- const widgetApiDefinition = {
1939
- label: 'WIDGET_Api',
1940
- description: 'WIDGET_Api_Description',
1941
- name: 'widget-api',
1942
- img: '/img/fast-intranet/widget-text.png',
1943
- available: true,
1944
- panel: {
1945
- useWrapper: false,
1946
- useEditor: true,
1947
- useWidgets: false,
1948
- },
1949
- };
1950
- const widgetApiContent = {
1951
- url: '',
1952
- };
2072
+ const WIDGET_ARTICLE_TITLE = 'widget-article-title';
2073
+ const WIDGET_ARTICLE_TEXT = 'widget-article-text';
2074
+ const WIDGET_ARTICLE_IMAGE = 'widget-article-image';
2075
+ const WIDGET_ARTICLE_BUTTON = 'widget-article-button';
2076
+ const WIDGET_ARTICLE_GALLERY = 'widget-article-gallery';
2077
+ const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
2078
+ const WIDGET_CHECK_LIST = 'widget-check-list';
2079
+ const WIDGET_CHECK_LIST_LABEL = 'WIDGET_Check_List';
2080
+ const WIDGET_CHECK_LIST_DESCRIPTION = 'WIDGET_Check_List_Description';
1953
2081
 
1954
- const widgetArticleSliderDefinition = {
1955
- label: 'WIDGET_Slider',
1956
- description: 'WIDGET_Slider_Description',
1957
- name: 'widget-article-slider',
1958
- img: '/img/article-widget-thumbnail/widget_thumbnail_slider.png',
2082
+ var WIDGETS = /*#__PURE__*/Object.freeze({
2083
+ __proto__: null,
2084
+ WIDGET_ARTICLE_TITLE: WIDGET_ARTICLE_TITLE,
2085
+ WIDGET_ARTICLE_TEXT: WIDGET_ARTICLE_TEXT,
2086
+ WIDGET_ARTICLE_IMAGE: WIDGET_ARTICLE_IMAGE,
2087
+ WIDGET_ARTICLE_BUTTON: WIDGET_ARTICLE_BUTTON,
2088
+ WIDGET_ARTICLE_GALLERY: WIDGET_ARTICLE_GALLERY,
2089
+ WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT,
2090
+ WIDGET_CHECK_LIST: WIDGET_CHECK_LIST,
2091
+ WIDGET_CHECK_LIST_LABEL: WIDGET_CHECK_LIST_LABEL,
2092
+ WIDGET_CHECK_LIST_DESCRIPTION: WIDGET_CHECK_LIST_DESCRIPTION
2093
+ });
2094
+
2095
+ const widgetCheckListDefinition = {
2096
+ label: WIDGET_CHECK_LIST_LABEL,
2097
+ description: WIDGET_CHECK_LIST_DESCRIPTION,
2098
+ name: WIDGET_CHECK_LIST,
2099
+ img: '/img/fast-intranet/widget-check-list.png',
1959
2100
  available: true,
1960
2101
  panel: {
1961
2102
  useWrapper: false,
@@ -1963,12 +2104,8 @@ const widgetArticleSliderDefinition = {
1963
2104
  useWidgets: false,
1964
2105
  },
1965
2106
  };
1966
- const widgetArticleSliderContent = {
1967
- slides: [],
1968
- maxWidth: 800,
1969
- loop: false,
1970
- useDots: true,
1971
- startAt: 0,
2107
+ const widgetCheckListContent = {
2108
+ arr: [],
1972
2109
  };
1973
2110
 
1974
2111
  function uniqid() {
@@ -2011,26 +2148,11 @@ function content(name) {
2011
2148
  return Object.assign({}, widgetArticleImageContent);
2012
2149
  case 'widget-article-text':
2013
2150
  return Object.assign({}, widgetArticleTextContent);
2151
+ case 'widget-check-list':
2152
+ return Object.assign({}, widgetCheckListContent);
2014
2153
  }
2015
2154
  }
2016
2155
 
2017
- const WIDGET_ARTICLE_TITLE = 'widget-article-title';
2018
- const WIDGET_ARTICLE_TEXT = 'widget-article-text';
2019
- const WIDGET_ARTICLE_IMAGE = 'widget-article-image';
2020
- const WIDGET_ARTICLE_BUTTON = 'widget-article-button';
2021
- const WIDGET_ARTICLE_GALLERY = 'widget-article-gallery';
2022
- const WIDGET_ARTICLE_ATTACHMENT = 'widget-article-attachment';
2023
-
2024
- var WIDGETS = /*#__PURE__*/Object.freeze({
2025
- __proto__: null,
2026
- WIDGET_ARTICLE_TITLE: WIDGET_ARTICLE_TITLE,
2027
- WIDGET_ARTICLE_TEXT: WIDGET_ARTICLE_TEXT,
2028
- WIDGET_ARTICLE_IMAGE: WIDGET_ARTICLE_IMAGE,
2029
- WIDGET_ARTICLE_BUTTON: WIDGET_ARTICLE_BUTTON,
2030
- WIDGET_ARTICLE_GALLERY: WIDGET_ARTICLE_GALLERY,
2031
- WIDGET_ARTICLE_ATTACHMENT: WIDGET_ARTICLE_ATTACHMENT
2032
- });
2033
-
2034
2156
  function widgetDefinition(name) {
2035
2157
  switch (name) {
2036
2158
  default:
@@ -2051,6 +2173,8 @@ function widgetDefinition(name) {
2051
2173
  return widgetApiDefinition;
2052
2174
  case 'widget-article-button':
2053
2175
  return widgetArticleButtonDefinition;
2176
+ case 'widget-check-list':
2177
+ return widgetCheckListDefinition;
2054
2178
  }
2055
2179
  }
2056
2180
 
@@ -3658,5 +3782,5 @@ const studio = {
3658
3782
  },
3659
3783
  };
3660
3784
 
3661
- 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, 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, jland, mediaLibraryReducer, mediaLibrarySlice, saveCurrentAnimation, slice, studio, toggleAnimationIsActive, updateWidgetContent, viewsList };
3785
+ 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 };
3662
3786
  //# sourceMappingURL=esm.js.map