jamespot-front-business 1.2.31 → 1.2.32

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
@@ -104,7 +104,7 @@ const oneMonthAgo$2 = () => {
104
104
  date.setMonth(date.getMonth() - 1);
105
105
  return date;
106
106
  };
107
- const initialState$r = {
107
+ const initialState$s = {
108
108
  data: [],
109
109
  loading: 'idle',
110
110
  page: 1,
@@ -136,7 +136,7 @@ const fetchLogsNavigation = createAsyncThunk('admin/fetchLogsNavigation', (param
136
136
  }));
137
137
  const adminLogsNavigationSlice = createSlice({
138
138
  name: 'logsNavigation',
139
- initialState: initialState$r,
139
+ initialState: initialState$s,
140
140
  reducers: {
141
141
  setNavigationOrder: (state, action) => {
142
142
  state.orders = [...action.payload];
@@ -174,7 +174,7 @@ const oneMonthAgo$1 = () => {
174
174
  date.setMonth(date.getMonth() - 1);
175
175
  return date;
176
176
  };
177
- const initialState$q = {
177
+ const initialState$r = {
178
178
  data: [],
179
179
  loading: 'idle',
180
180
  page: 1,
@@ -206,7 +206,7 @@ const fetchLogsObjects = createAsyncThunk('admin/fetchLogsObjects', (params, { e
206
206
  }));
207
207
  const adminLogsObjectsSlice = createSlice({
208
208
  name: 'logsObjects',
209
- initialState: initialState$q,
209
+ initialState: initialState$r,
210
210
  reducers: {
211
211
  setObjectsOrder: (state, action) => {
212
212
  state.orders = [...action.payload];
@@ -243,7 +243,7 @@ const oneMonthAgo = () => {
243
243
  date.setMonth(date.getMonth() - 1);
244
244
  return date;
245
245
  };
246
- const initialState$p = {
246
+ const initialState$q = {
247
247
  data: [],
248
248
  loading: 'idle',
249
249
  page: 1,
@@ -275,7 +275,7 @@ const fetchLogsSearch = createAsyncThunk('admin/fetchLogsSearch', (params, { ext
275
275
  }));
276
276
  const adminLogsSearchSlice = createSlice({
277
277
  name: 'logsSearch',
278
- initialState: initialState$p,
278
+ initialState: initialState$q,
279
279
  reducers: {
280
280
  setSearchOrder: (state, action) => {
281
281
  state.orders = [...action.payload];
@@ -328,7 +328,7 @@ const AdminLogs = {
328
328
  selectors: { selectAdminLogsNavigation, selectAdminLogsObjects, selectAdminLogsSearch },
329
329
  };
330
330
 
331
- const initialState$o = {
331
+ const initialState$p = {
332
332
  animationConfiguration: null,
333
333
  isActiveForCurrentUser: false,
334
334
  isInitialized: false,
@@ -336,7 +336,7 @@ const initialState$o = {
336
336
  };
337
337
  const animationsListSlice = createSlice({
338
338
  name: 'animationsList',
339
- initialState: initialState$o,
339
+ initialState: initialState$p,
340
340
  reducers: {},
341
341
  extraReducers: (builder) => {
342
342
  builder.addCase(fetchCurrentAnimation.fulfilled, (state, action) => {
@@ -571,7 +571,7 @@ const Application = {
571
571
  selectors: selectors$2,
572
572
  };
573
573
 
574
- const initialState$n = {
574
+ const initialState$o = {
575
575
  entities: [],
576
576
  loading: 'idle',
577
577
  nbResults: 0,
@@ -587,7 +587,7 @@ const fetchBookableAsset = createAsyncThunk('BookableAsset/fetchBookableAsset',
587
587
  }));
588
588
  const BookableAssetSlice = createSlice({
589
589
  name: 'bookableAsset',
590
- initialState: initialState$n,
590
+ initialState: initialState$o,
591
591
  reducers: {},
592
592
  extraReducers: (builder) => {
593
593
  builder
@@ -608,7 +608,7 @@ const BookableAssetSlice = createSlice({
608
608
  const fetchConfiguration = createAsyncThunk('AssetReservation/configuration', (_, { extra }) => __awaiter(void 0, void 0, void 0, function* () {
609
609
  return yield extra.jApi.assetReservation.configuration();
610
610
  }));
611
- const initialState$m = {
611
+ const initialState$n = {
612
612
  description: '',
613
613
  right: {
614
614
  manage: false,
@@ -622,7 +622,7 @@ const initialState$m = {
622
622
  };
623
623
  const AssetReservationConfigurationSlice = createSlice({
624
624
  name: 'configuration',
625
- initialState: initialState$m,
625
+ initialState: initialState$n,
626
626
  reducers: {},
627
627
  extraReducers: (builder) => {
628
628
  builder
@@ -643,7 +643,7 @@ const initForm = {
643
643
  hourStart: '',
644
644
  hourEnd: '',
645
645
  };
646
- const initialState$l = {
646
+ const initialState$m = {
647
647
  entities: [],
648
648
  loading: 'idle',
649
649
  nbResults: 0,
@@ -659,7 +659,7 @@ const fetchReservation = createAsyncThunk('Reservation/fetchReservation', (viewM
659
659
  }));
660
660
  const ReservationSlice = createSlice({
661
661
  name: 'reservation',
662
- initialState: initialState$l,
662
+ initialState: initialState$m,
663
663
  reducers: {
664
664
  setForm: (state, action) => {
665
665
  state.form = action.payload;
@@ -715,7 +715,7 @@ const AssetReservation = {
715
715
  },
716
716
  };
717
717
 
718
- const initialState$k = {
718
+ const initialState$l = {
719
719
  loading: 'idle',
720
720
  reports: [],
721
721
  page: 1,
@@ -728,7 +728,7 @@ const initialState$k = {
728
728
  };
729
729
  const contentReportSlice = createSlice({
730
730
  name: 'contentReport',
731
- initialState: initialState$k,
731
+ initialState: initialState$l,
732
732
  reducers: {
733
733
  setTab: (state, action) => {
734
734
  state.tab = action.payload;
@@ -834,7 +834,7 @@ const ContentReport = {
834
834
  selectors: { selectContentReport },
835
835
  };
836
836
 
837
- const initialState$j = {
837
+ const initialState$k = {
838
838
  bookmarks: [],
839
839
  loading: 'idle',
840
840
  status: undefined,
@@ -896,7 +896,7 @@ const deleteBookmark = createAsyncThunk('bookmarkList/deleteBookmark', (bookmark
896
896
  }));
897
897
  const BookmarkListSlice = createSlice({
898
898
  name: 'bookmarkList',
899
- initialState: initialState$j,
899
+ initialState: initialState$k,
900
900
  reducers: {
901
901
  resetAddBookmarkStatus: (state, action) => {
902
902
  if (state.add[action.payload]) {
@@ -1059,7 +1059,7 @@ const getBookmarkRTHandlers = function (dispatch) {
1059
1059
  ];
1060
1060
  };
1061
1061
 
1062
- const initialState$i = {
1062
+ const initialState$j = {
1063
1063
  bookmark: undefined,
1064
1064
  status: undefined,
1065
1065
  loading: 'idle',
@@ -1081,7 +1081,7 @@ const editBookmark = createAsyncThunk('bookmarkEdit/editBookmark', (bookmark, {
1081
1081
  }));
1082
1082
  const BookmarkEditSlice = createSlice({
1083
1083
  name: 'bookmarkEdit',
1084
- initialState: initialState$i,
1084
+ initialState: initialState$j,
1085
1085
  reducers: {
1086
1086
  setEditBookmark: (state, action) => {
1087
1087
  state.bookmark = Object.assign({}, action.payload);
@@ -1140,7 +1140,7 @@ const Bookmark = {
1140
1140
  getRTHandlers: getBookmarkRTHandlers,
1141
1141
  };
1142
1142
 
1143
- const initialState$h = {
1143
+ const initialState$i = {
1144
1144
  loading: 'idle',
1145
1145
  comments: [],
1146
1146
  };
@@ -1169,7 +1169,7 @@ const deleteComment = createAsyncThunk('commentList/deleteComment', (params, { e
1169
1169
  }));
1170
1170
  const CommentListSlice = createSlice({
1171
1171
  name: 'commentList',
1172
- initialState: initialState$h,
1172
+ initialState: initialState$i,
1173
1173
  reducers: {
1174
1174
  discardComments: (state, action) => {
1175
1175
  state.comments = state.comments.filter((c) => c.idArticle !== action.payload.idArticle);
@@ -1320,7 +1320,7 @@ const ExtraBotConst = {
1320
1320
  listDefaultPage: 1,
1321
1321
  };
1322
1322
 
1323
- const initialState$g = {
1323
+ const initialState$h = {
1324
1324
  global: {
1325
1325
  loading: 'idle',
1326
1326
  },
@@ -1450,7 +1450,7 @@ const updateListBotProperty = (state, extraBotUri, property, value) => {
1450
1450
  };
1451
1451
  const extraBotSlice = createSlice({
1452
1452
  name: 'extraBot',
1453
- initialState: initialState$g,
1453
+ initialState: initialState$h,
1454
1454
  reducers: {
1455
1455
  setListAllOrder: (state, action) => {
1456
1456
  state.listAll.orders = [...action.payload];
@@ -1548,7 +1548,7 @@ const ExtraBot = {
1548
1548
  selectors: { selectExtraBotListAll, selectExtraBotListMines },
1549
1549
  };
1550
1550
 
1551
- const initialState$f = {
1551
+ const initialState$g = {
1552
1552
  loading: 'idle',
1553
1553
  access: { createCategory: false },
1554
1554
  };
@@ -1577,7 +1577,7 @@ const fetchFaqConfig = createAsyncThunk('faqConfig/fetch', () => __awaiter(void
1577
1577
  }));
1578
1578
  const FaqConfigSlice = createSlice({
1579
1579
  name: 'config',
1580
- initialState: initialState$f,
1580
+ initialState: initialState$g,
1581
1581
  reducers: {},
1582
1582
  extraReducers: (builder) => {
1583
1583
  builder
@@ -1612,7 +1612,7 @@ const FaqConfigSlice = createSlice({
1612
1612
  },
1613
1613
  });
1614
1614
 
1615
- const initialState$e = {
1615
+ const initialState$f = {
1616
1616
  loading: 'idle',
1617
1617
  categories: null,
1618
1618
  };
@@ -1624,7 +1624,7 @@ const fetchFaqCategories = createAsyncThunk('faqCategories/fetch', () => __await
1624
1624
  }));
1625
1625
  const FaqCategoriesSlice = createSlice({
1626
1626
  name: 'categories',
1627
- initialState: initialState$e,
1627
+ initialState: initialState$f,
1628
1628
  reducers: {},
1629
1629
  extraReducers: (builder) => {
1630
1630
  builder
@@ -1937,7 +1937,7 @@ const initialMap = {
1937
1937
  illustration: '',
1938
1938
  assignLicense: false,
1939
1939
  };
1940
- const initialState$d = {
1940
+ const initialState$e = {
1941
1941
  map: Object.assign({}, initialMap),
1942
1942
  loading: 'idle',
1943
1943
  status: undefined,
@@ -1982,13 +1982,13 @@ const createMap = createAsyncThunk('mapCreate/create', ({ map, jlandUrlBase }, {
1982
1982
  }));
1983
1983
  const MapCreateSlice = createSlice({
1984
1984
  name: 'mapCreate',
1985
- initialState: initialState$d,
1985
+ initialState: initialState$e,
1986
1986
  reducers: {
1987
1987
  setMap: (state, action) => {
1988
1988
  state.map = action.payload;
1989
1989
  },
1990
1990
  resetCreateMapState: () => {
1991
- return initialState$d;
1991
+ return initialState$e;
1992
1992
  },
1993
1993
  },
1994
1994
  extraReducers: (builder) => {
@@ -2042,7 +2042,7 @@ const jland = {
2042
2042
  utils: { buildUrlToJland },
2043
2043
  };
2044
2044
 
2045
- const initialState$c = {
2045
+ const initialState$d = {
2046
2046
  loading: 'idle',
2047
2047
  pads: [],
2048
2048
  query: '',
@@ -2055,7 +2055,7 @@ const initialState$c = {
2055
2055
  };
2056
2056
  const magicPadSlice = createSlice({
2057
2057
  name: 'magicPad',
2058
- initialState: initialState$c,
2058
+ initialState: initialState$d,
2059
2059
  reducers: {
2060
2060
  setTab: (state, action) => {
2061
2061
  state.tab = action.payload;
@@ -2147,7 +2147,7 @@ const MediaLibraryAppConst = {
2147
2147
  };
2148
2148
  const FILES_PER_PAGE = 18;
2149
2149
 
2150
- const initialState$b = {
2150
+ const initialState$c = {
2151
2151
  loading: 'idle',
2152
2152
  page: 1,
2153
2153
  nbResults: 0,
@@ -2160,7 +2160,7 @@ const initialState$b = {
2160
2160
  };
2161
2161
  const mediaLibrarySlice = createSlice({
2162
2162
  name: 'mediaLibrary',
2163
- initialState: initialState$b,
2163
+ initialState: initialState$c,
2164
2164
  reducers: {
2165
2165
  setPage(state, action) {
2166
2166
  return Object.assign(Object.assign({}, state), { page: action.payload });
@@ -2409,10 +2409,10 @@ const Model = {
2409
2409
  selectors: Object.assign(Object.assign({}, selectors$1), { selectByIds }),
2410
2410
  };
2411
2411
 
2412
- const initialState$a = {};
2412
+ const initialState$b = {};
2413
2413
  const NetworkStaticsSlice = createSlice({
2414
2414
  name: 'statics',
2415
- initialState: initialState$a,
2415
+ initialState: initialState$b,
2416
2416
  reducers: {
2417
2417
  initNetworkStatics: (_, { payload }) => {
2418
2418
  return payload;
@@ -2446,13 +2446,13 @@ const Network = {
2446
2446
  },
2447
2447
  };
2448
2448
 
2449
- const initialState$9 = {
2449
+ const initialState$a = {
2450
2450
  userHighlightFields: [],
2451
2451
  userAccountStatus: 0,
2452
2452
  };
2453
2453
  const PlatformConfigSlice = createSlice({
2454
2454
  name: 'config',
2455
- initialState: initialState$9,
2455
+ initialState: initialState$a,
2456
2456
  reducers: {
2457
2457
  initPlatformConfig: (_, { payload }) => {
2458
2458
  return payload;
@@ -2508,7 +2508,7 @@ const fetchRecentFiles = createAsyncThunk('/fetchRecentFiles', (_, { extra, getS
2508
2508
  return yield jApi.wedoc.getFiles(Object.assign(Object.assign({}, initialQuery), { filters, limit: 3 }));
2509
2509
  }));
2510
2510
 
2511
- const initialState$8 = {
2511
+ const initialState$9 = {
2512
2512
  entities: [],
2513
2513
  nbEntities: 0,
2514
2514
  entitiesRecent: [],
@@ -2520,7 +2520,7 @@ const initialState$8 = {
2520
2520
  };
2521
2521
  const WedocAppSlice = createSlice({
2522
2522
  name: 'wedoc',
2523
- initialState: initialState$8,
2523
+ initialState: initialState$9,
2524
2524
  reducers: {
2525
2525
  update: (state, action) => {
2526
2526
  state.entities = [
@@ -2593,14 +2593,14 @@ const fetchRequest = createAsyncThunk('/fetchRequest', ({ uri, idUser }, { extra
2593
2593
  return yield jApi.object.getAccessRequest(uri, idUser);
2594
2594
  }));
2595
2595
 
2596
- const initialState$7 = {
2596
+ const initialState$8 = {
2597
2597
  entities: [],
2598
2598
  nbEntities: 0,
2599
2599
  loading: 'idle',
2600
2600
  };
2601
2601
  const ShareSlice = createSlice({
2602
2602
  name: 'share',
2603
- initialState: initialState$7,
2603
+ initialState: initialState$8,
2604
2604
  reducers: {
2605
2605
  remove: (state, action) => {
2606
2606
  state.entities = [...state.entities.filter((entity) => entity.id !== action.payload)];
@@ -2636,6 +2636,80 @@ const Share = {
2636
2636
  },
2637
2637
  };
2638
2638
 
2639
+ const initialState$7 = {
2640
+ message: undefined,
2641
+ status: 'idle',
2642
+ };
2643
+ const teamWorkToDoSlice = createSlice({
2644
+ name: 'teamWorkToDo',
2645
+ initialState: initialState$7,
2646
+ reducers: {
2647
+ setMessageAndStatus: (state, action) => {
2648
+ const { status, message } = action.payload;
2649
+ state.status = status;
2650
+ state.message = message;
2651
+ },
2652
+ },
2653
+ extraReducers: (builder) => {
2654
+ builder.addCase(startToDoCreation.fulfilled, (state, action) => {
2655
+ if (action.payload) {
2656
+ state.status = 'processing';
2657
+ }
2658
+ else {
2659
+ state.status = 'error';
2660
+ }
2661
+ });
2662
+ builder.addCase(startToDoCreation.rejected, (state, action) => {
2663
+ var _a, _b;
2664
+ state.status = 'error';
2665
+ state.message = (_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.errorMsg) !== null && _b !== void 0 ? _b : 'GLOBAL_Technical_Error';
2666
+ });
2667
+ },
2668
+ });
2669
+ const startToDoCreation = createAsyncThunk('teamWork/startToDoCreation', (_, { extra, rejectWithValue, dispatch, signal }) => __awaiter(void 0, void 0, void 0, function* () {
2670
+ try {
2671
+ const isSent = (yield extra.jApi.teamWork.aiGeneratedToDo({ signal })).result;
2672
+ return isSent;
2673
+ }
2674
+ catch (err) {
2675
+ if (!isAbortError(err)) {
2676
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
2677
+ }
2678
+ return rejectWithValue({ error: 1, errorMsg: 'APP_TEAMWORK_ToDo_Not_Sent' });
2679
+ }
2680
+ }));
2681
+
2682
+ const getTeamWorkRTHandlers = function (dispatch) {
2683
+ const toDoUpdateHandler = function (message) {
2684
+ if (message.namespace === 'TEAMWORK' && message.function === 'update') {
2685
+ dispatch(teamWorkToDoSlice.actions.setMessageAndStatus({ status: message.state, message: message.msg }));
2686
+ }
2687
+ };
2688
+ return [
2689
+ {
2690
+ namespace: 'TEAMWORK',
2691
+ function: 'update',
2692
+ handler: toDoUpdateHandler,
2693
+ },
2694
+ ];
2695
+ };
2696
+
2697
+ const selectToDoState = (state) => state.teamWork.teamWorkToDo;
2698
+ const teamWorkSliceReducer = combineReducers({
2699
+ [teamWorkToDoSlice.name]: teamWorkToDoSlice.reducer,
2700
+ });
2701
+ const teamWorkSlice = {
2702
+ name: 'teamWork',
2703
+ reducer: teamWorkSliceReducer,
2704
+ };
2705
+ const teamworkReducer = teamWorkSlice.reducer;
2706
+ const TeamWork = {
2707
+ slice: teamWorkSlice,
2708
+ actions: Object.assign(Object.assign({}, teamWorkToDoSlice.actions), { startToDoCreation }),
2709
+ selectors: { selectToDoState },
2710
+ getTeamWorkRTHandlers,
2711
+ };
2712
+
2639
2713
  const initialState$6 = {
2640
2714
  channels: undefined,
2641
2715
  loading: 'idle',
@@ -6094,5 +6168,5 @@ const studio = {
6094
6168
  },
6095
6169
  };
6096
6170
 
6097
- export { APP_STATUS_TYPE, AUDIENCE, AdminLogs, Animations, AppColumnsDefaultTypes, AppFieldFormPropertyTypes, AppFormBannedFromViews$1 as AppFormBannedFromViews, AppFormFieldOnlyInView, AppFormFixedList$1 as AppFormFixedList, AppFormItemTypes, AppFormNoAsFieldList, AppFormNonPrimaryList, AppFormPrimaryList, AppFormPrimaryListValues, AppFormUniqueList, AppFormUniqueListCheck, Application, AssetReservation, Bookmark, Comment, ContentReport, Description, Element, ExtraAppFieldsItemName, ExtraAppFieldsItemViews, ExtraBot, Faq, Hook, MagicPad, MapExtraFieldsWithView, MediaLibrary, Model, Network, Platform, STUDIO_VIEW, Share, SocialActions, StatusType$1 as StatusType, TVDisplay, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, adminLogsReducer, adminLogsSlice, animationsReducer, animationsSlice, contentReportSlice, extraBotSlice, fetchExtraBotListAll, fetchExtraBotListMines, fetchMediaLibraryConfig, fetchMediaLibraryFilesStats, fetchMediaLibraryFolders, fetchMediaLibraryFoldersStats, fetchMediaLibraryStats, fetchMediaLibraryUnclassifiedFiles, fetchPads, fetchReports, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, saveExtraBot, selectExtraBotListAll, selectExtraBotListMines, slice$1 as slice, studio, toggleExtraBotActivation, updateListBotProperty, updateStatus, updateWidgetContent, viewsList };
6171
+ export { APP_STATUS_TYPE, AUDIENCE, AdminLogs, Animations, AppColumnsDefaultTypes, AppFieldFormPropertyTypes, AppFormBannedFromViews$1 as AppFormBannedFromViews, AppFormFieldOnlyInView, AppFormFixedList$1 as AppFormFixedList, AppFormItemTypes, AppFormNoAsFieldList, AppFormNonPrimaryList, AppFormPrimaryList, AppFormPrimaryListValues, AppFormUniqueList, AppFormUniqueListCheck, Application, AssetReservation, Bookmark, Comment, ContentReport, Description, Element, ExtraAppFieldsItemName, ExtraAppFieldsItemViews, ExtraBot, Faq, Hook, MagicPad, MapExtraFieldsWithView, MediaLibrary, Model, Network, Platform, STUDIO_VIEW, Share, SocialActions, StatusType$1 as StatusType, TVDisplay, TeamWork, TinyMCE, Toast, UserCurrent, WedocApp, Widget, WidgetEditor, actions, adminLogsReducer, adminLogsSlice, animationsReducer, animationsSlice, contentReportSlice, extraBotSlice, fetchExtraBotListAll, fetchExtraBotListMines, fetchMediaLibraryConfig, fetchMediaLibraryFilesStats, fetchMediaLibraryFolders, fetchMediaLibraryFoldersStats, fetchMediaLibraryStats, fetchMediaLibraryUnclassifiedFiles, fetchPads, fetchReports, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, saveExtraBot, selectExtraBotListAll, selectExtraBotListMines, slice$1 as slice, studio, teamWorkSlice, teamworkReducer, toggleExtraBotActivation, updateListBotProperty, updateStatus, updateWidgetContent, viewsList };
6098
6172
  //# sourceMappingURL=esm.js.map