jamespot-front-business 1.2.30 → 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/cjs.js CHANGED
@@ -112,7 +112,7 @@ const oneMonthAgo$2 = () => {
112
112
  date.setMonth(date.getMonth() - 1);
113
113
  return date;
114
114
  };
115
- const initialState$r = {
115
+ const initialState$s = {
116
116
  data: [],
117
117
  loading: 'idle',
118
118
  page: 1,
@@ -144,7 +144,7 @@ const fetchLogsNavigation = toolkit.createAsyncThunk('admin/fetchLogsNavigation'
144
144
  }));
145
145
  const adminLogsNavigationSlice = toolkit.createSlice({
146
146
  name: 'logsNavigation',
147
- initialState: initialState$r,
147
+ initialState: initialState$s,
148
148
  reducers: {
149
149
  setNavigationOrder: (state, action) => {
150
150
  state.orders = [...action.payload];
@@ -182,7 +182,7 @@ const oneMonthAgo$1 = () => {
182
182
  date.setMonth(date.getMonth() - 1);
183
183
  return date;
184
184
  };
185
- const initialState$q = {
185
+ const initialState$r = {
186
186
  data: [],
187
187
  loading: 'idle',
188
188
  page: 1,
@@ -214,7 +214,7 @@ const fetchLogsObjects = toolkit.createAsyncThunk('admin/fetchLogsObjects', (par
214
214
  }));
215
215
  const adminLogsObjectsSlice = toolkit.createSlice({
216
216
  name: 'logsObjects',
217
- initialState: initialState$q,
217
+ initialState: initialState$r,
218
218
  reducers: {
219
219
  setObjectsOrder: (state, action) => {
220
220
  state.orders = [...action.payload];
@@ -251,7 +251,7 @@ const oneMonthAgo = () => {
251
251
  date.setMonth(date.getMonth() - 1);
252
252
  return date;
253
253
  };
254
- const initialState$p = {
254
+ const initialState$q = {
255
255
  data: [],
256
256
  loading: 'idle',
257
257
  page: 1,
@@ -283,7 +283,7 @@ const fetchLogsSearch = toolkit.createAsyncThunk('admin/fetchLogsSearch', (param
283
283
  }));
284
284
  const adminLogsSearchSlice = toolkit.createSlice({
285
285
  name: 'logsSearch',
286
- initialState: initialState$p,
286
+ initialState: initialState$q,
287
287
  reducers: {
288
288
  setSearchOrder: (state, action) => {
289
289
  state.orders = [...action.payload];
@@ -336,7 +336,7 @@ const AdminLogs = {
336
336
  selectors: { selectAdminLogsNavigation, selectAdminLogsObjects, selectAdminLogsSearch },
337
337
  };
338
338
 
339
- const initialState$o = {
339
+ const initialState$p = {
340
340
  animationConfiguration: null,
341
341
  isActiveForCurrentUser: false,
342
342
  isInitialized: false,
@@ -344,7 +344,7 @@ const initialState$o = {
344
344
  };
345
345
  const animationsListSlice = toolkit.createSlice({
346
346
  name: 'animationsList',
347
- initialState: initialState$o,
347
+ initialState: initialState$p,
348
348
  reducers: {},
349
349
  extraReducers: (builder) => {
350
350
  builder.addCase(fetchCurrentAnimation.fulfilled, (state, action) => {
@@ -579,7 +579,7 @@ const Application = {
579
579
  selectors: selectors$2,
580
580
  };
581
581
 
582
- const initialState$n = {
582
+ const initialState$o = {
583
583
  entities: [],
584
584
  loading: 'idle',
585
585
  nbResults: 0,
@@ -595,7 +595,7 @@ const fetchBookableAsset = toolkit.createAsyncThunk('BookableAsset/fetchBookable
595
595
  }));
596
596
  const BookableAssetSlice = toolkit.createSlice({
597
597
  name: 'bookableAsset',
598
- initialState: initialState$n,
598
+ initialState: initialState$o,
599
599
  reducers: {},
600
600
  extraReducers: (builder) => {
601
601
  builder
@@ -616,7 +616,7 @@ const BookableAssetSlice = toolkit.createSlice({
616
616
  const fetchConfiguration = toolkit.createAsyncThunk('AssetReservation/configuration', (_, { extra }) => __awaiter(void 0, void 0, void 0, function* () {
617
617
  return yield extra.jApi.assetReservation.configuration();
618
618
  }));
619
- const initialState$m = {
619
+ const initialState$n = {
620
620
  description: '',
621
621
  right: {
622
622
  manage: false,
@@ -630,7 +630,7 @@ const initialState$m = {
630
630
  };
631
631
  const AssetReservationConfigurationSlice = toolkit.createSlice({
632
632
  name: 'configuration',
633
- initialState: initialState$m,
633
+ initialState: initialState$n,
634
634
  reducers: {},
635
635
  extraReducers: (builder) => {
636
636
  builder
@@ -651,7 +651,7 @@ const initForm = {
651
651
  hourStart: '',
652
652
  hourEnd: '',
653
653
  };
654
- const initialState$l = {
654
+ const initialState$m = {
655
655
  entities: [],
656
656
  loading: 'idle',
657
657
  nbResults: 0,
@@ -667,7 +667,7 @@ const fetchReservation = toolkit.createAsyncThunk('Reservation/fetchReservation'
667
667
  }));
668
668
  const ReservationSlice = toolkit.createSlice({
669
669
  name: 'reservation',
670
- initialState: initialState$l,
670
+ initialState: initialState$m,
671
671
  reducers: {
672
672
  setForm: (state, action) => {
673
673
  state.form = action.payload;
@@ -723,7 +723,7 @@ const AssetReservation = {
723
723
  },
724
724
  };
725
725
 
726
- const initialState$k = {
726
+ const initialState$l = {
727
727
  loading: 'idle',
728
728
  reports: [],
729
729
  page: 1,
@@ -736,7 +736,7 @@ const initialState$k = {
736
736
  };
737
737
  const contentReportSlice = toolkit.createSlice({
738
738
  name: 'contentReport',
739
- initialState: initialState$k,
739
+ initialState: initialState$l,
740
740
  reducers: {
741
741
  setTab: (state, action) => {
742
742
  state.tab = action.payload;
@@ -842,7 +842,7 @@ const ContentReport = {
842
842
  selectors: { selectContentReport },
843
843
  };
844
844
 
845
- const initialState$j = {
845
+ const initialState$k = {
846
846
  bookmarks: [],
847
847
  loading: 'idle',
848
848
  status: undefined,
@@ -904,7 +904,7 @@ const deleteBookmark = toolkit.createAsyncThunk('bookmarkList/deleteBookmark', (
904
904
  }));
905
905
  const BookmarkListSlice = toolkit.createSlice({
906
906
  name: 'bookmarkList',
907
- initialState: initialState$j,
907
+ initialState: initialState$k,
908
908
  reducers: {
909
909
  resetAddBookmarkStatus: (state, action) => {
910
910
  if (state.add[action.payload]) {
@@ -1067,7 +1067,7 @@ const getBookmarkRTHandlers = function (dispatch) {
1067
1067
  ];
1068
1068
  };
1069
1069
 
1070
- const initialState$i = {
1070
+ const initialState$j = {
1071
1071
  bookmark: undefined,
1072
1072
  status: undefined,
1073
1073
  loading: 'idle',
@@ -1089,7 +1089,7 @@ const editBookmark = toolkit.createAsyncThunk('bookmarkEdit/editBookmark', (book
1089
1089
  }));
1090
1090
  const BookmarkEditSlice = toolkit.createSlice({
1091
1091
  name: 'bookmarkEdit',
1092
- initialState: initialState$i,
1092
+ initialState: initialState$j,
1093
1093
  reducers: {
1094
1094
  setEditBookmark: (state, action) => {
1095
1095
  state.bookmark = Object.assign({}, action.payload);
@@ -1148,7 +1148,7 @@ const Bookmark = {
1148
1148
  getRTHandlers: getBookmarkRTHandlers,
1149
1149
  };
1150
1150
 
1151
- const initialState$h = {
1151
+ const initialState$i = {
1152
1152
  loading: 'idle',
1153
1153
  comments: [],
1154
1154
  };
@@ -1177,7 +1177,7 @@ const deleteComment = toolkit.createAsyncThunk('commentList/deleteComment', (par
1177
1177
  }));
1178
1178
  const CommentListSlice = toolkit.createSlice({
1179
1179
  name: 'commentList',
1180
- initialState: initialState$h,
1180
+ initialState: initialState$i,
1181
1181
  reducers: {
1182
1182
  discardComments: (state, action) => {
1183
1183
  state.comments = state.comments.filter((c) => c.idArticle !== action.payload.idArticle);
@@ -1328,7 +1328,7 @@ const ExtraBotConst = {
1328
1328
  listDefaultPage: 1,
1329
1329
  };
1330
1330
 
1331
- const initialState$g = {
1331
+ const initialState$h = {
1332
1332
  global: {
1333
1333
  loading: 'idle',
1334
1334
  },
@@ -1458,7 +1458,7 @@ const updateListBotProperty = (state, extraBotUri, property, value) => {
1458
1458
  };
1459
1459
  const extraBotSlice = toolkit.createSlice({
1460
1460
  name: 'extraBot',
1461
- initialState: initialState$g,
1461
+ initialState: initialState$h,
1462
1462
  reducers: {
1463
1463
  setListAllOrder: (state, action) => {
1464
1464
  state.listAll.orders = [...action.payload];
@@ -1556,7 +1556,7 @@ const ExtraBot = {
1556
1556
  selectors: { selectExtraBotListAll, selectExtraBotListMines },
1557
1557
  };
1558
1558
 
1559
- const initialState$f = {
1559
+ const initialState$g = {
1560
1560
  loading: 'idle',
1561
1561
  access: { createCategory: false },
1562
1562
  };
@@ -1585,7 +1585,7 @@ const fetchFaqConfig = toolkit.createAsyncThunk('faqConfig/fetch', () => __await
1585
1585
  }));
1586
1586
  const FaqConfigSlice = toolkit.createSlice({
1587
1587
  name: 'config',
1588
- initialState: initialState$f,
1588
+ initialState: initialState$g,
1589
1589
  reducers: {},
1590
1590
  extraReducers: (builder) => {
1591
1591
  builder
@@ -1620,7 +1620,7 @@ const FaqConfigSlice = toolkit.createSlice({
1620
1620
  },
1621
1621
  });
1622
1622
 
1623
- const initialState$e = {
1623
+ const initialState$f = {
1624
1624
  loading: 'idle',
1625
1625
  categories: null,
1626
1626
  };
@@ -1632,7 +1632,7 @@ const fetchFaqCategories = toolkit.createAsyncThunk('faqCategories/fetch', () =>
1632
1632
  }));
1633
1633
  const FaqCategoriesSlice = toolkit.createSlice({
1634
1634
  name: 'categories',
1635
- initialState: initialState$e,
1635
+ initialState: initialState$f,
1636
1636
  reducers: {},
1637
1637
  extraReducers: (builder) => {
1638
1638
  builder
@@ -1945,7 +1945,7 @@ const initialMap = {
1945
1945
  illustration: '',
1946
1946
  assignLicense: false,
1947
1947
  };
1948
- const initialState$d = {
1948
+ const initialState$e = {
1949
1949
  map: Object.assign({}, initialMap),
1950
1950
  loading: 'idle',
1951
1951
  status: undefined,
@@ -1990,13 +1990,13 @@ const createMap = toolkit.createAsyncThunk('mapCreate/create', ({ map, jlandUrlB
1990
1990
  }));
1991
1991
  const MapCreateSlice = toolkit.createSlice({
1992
1992
  name: 'mapCreate',
1993
- initialState: initialState$d,
1993
+ initialState: initialState$e,
1994
1994
  reducers: {
1995
1995
  setMap: (state, action) => {
1996
1996
  state.map = action.payload;
1997
1997
  },
1998
1998
  resetCreateMapState: () => {
1999
- return initialState$d;
1999
+ return initialState$e;
2000
2000
  },
2001
2001
  },
2002
2002
  extraReducers: (builder) => {
@@ -2050,7 +2050,7 @@ const jland = {
2050
2050
  utils: { buildUrlToJland },
2051
2051
  };
2052
2052
 
2053
- const initialState$c = {
2053
+ const initialState$d = {
2054
2054
  loading: 'idle',
2055
2055
  pads: [],
2056
2056
  query: '',
@@ -2063,7 +2063,7 @@ const initialState$c = {
2063
2063
  };
2064
2064
  const magicPadSlice = toolkit.createSlice({
2065
2065
  name: 'magicPad',
2066
- initialState: initialState$c,
2066
+ initialState: initialState$d,
2067
2067
  reducers: {
2068
2068
  setTab: (state, action) => {
2069
2069
  state.tab = action.payload;
@@ -2155,7 +2155,7 @@ const MediaLibraryAppConst = {
2155
2155
  };
2156
2156
  const FILES_PER_PAGE = 18;
2157
2157
 
2158
- const initialState$b = {
2158
+ const initialState$c = {
2159
2159
  loading: 'idle',
2160
2160
  page: 1,
2161
2161
  nbResults: 0,
@@ -2168,7 +2168,7 @@ const initialState$b = {
2168
2168
  };
2169
2169
  const mediaLibrarySlice = toolkit.createSlice({
2170
2170
  name: 'mediaLibrary',
2171
- initialState: initialState$b,
2171
+ initialState: initialState$c,
2172
2172
  reducers: {
2173
2173
  setPage(state, action) {
2174
2174
  return Object.assign(Object.assign({}, state), { page: action.payload });
@@ -2417,10 +2417,10 @@ const Model = {
2417
2417
  selectors: Object.assign(Object.assign({}, selectors$1), { selectByIds }),
2418
2418
  };
2419
2419
 
2420
- const initialState$a = {};
2420
+ const initialState$b = {};
2421
2421
  const NetworkStaticsSlice = toolkit.createSlice({
2422
2422
  name: 'statics',
2423
- initialState: initialState$a,
2423
+ initialState: initialState$b,
2424
2424
  reducers: {
2425
2425
  initNetworkStatics: (_, { payload }) => {
2426
2426
  return payload;
@@ -2454,13 +2454,13 @@ const Network = {
2454
2454
  },
2455
2455
  };
2456
2456
 
2457
- const initialState$9 = {
2457
+ const initialState$a = {
2458
2458
  userHighlightFields: [],
2459
2459
  userAccountStatus: 0,
2460
2460
  };
2461
2461
  const PlatformConfigSlice = toolkit.createSlice({
2462
2462
  name: 'config',
2463
- initialState: initialState$9,
2463
+ initialState: initialState$a,
2464
2464
  reducers: {
2465
2465
  initPlatformConfig: (_, { payload }) => {
2466
2466
  return payload;
@@ -2516,7 +2516,7 @@ const fetchRecentFiles = toolkit.createAsyncThunk('/fetchRecentFiles', (_, { ext
2516
2516
  return yield jApi.wedoc.getFiles(Object.assign(Object.assign({}, initialQuery), { filters, limit: 3 }));
2517
2517
  }));
2518
2518
 
2519
- const initialState$8 = {
2519
+ const initialState$9 = {
2520
2520
  entities: [],
2521
2521
  nbEntities: 0,
2522
2522
  entitiesRecent: [],
@@ -2528,7 +2528,7 @@ const initialState$8 = {
2528
2528
  };
2529
2529
  const WedocAppSlice = toolkit.createSlice({
2530
2530
  name: 'wedoc',
2531
- initialState: initialState$8,
2531
+ initialState: initialState$9,
2532
2532
  reducers: {
2533
2533
  update: (state, action) => {
2534
2534
  state.entities = [
@@ -2601,14 +2601,14 @@ const fetchRequest = toolkit.createAsyncThunk('/fetchRequest', ({ uri, idUser },
2601
2601
  return yield jApi.object.getAccessRequest(uri, idUser);
2602
2602
  }));
2603
2603
 
2604
- const initialState$7 = {
2604
+ const initialState$8 = {
2605
2605
  entities: [],
2606
2606
  nbEntities: 0,
2607
2607
  loading: 'idle',
2608
2608
  };
2609
2609
  const ShareSlice = toolkit.createSlice({
2610
2610
  name: 'share',
2611
- initialState: initialState$7,
2611
+ initialState: initialState$8,
2612
2612
  reducers: {
2613
2613
  remove: (state, action) => {
2614
2614
  state.entities = [...state.entities.filter((entity) => entity.id !== action.payload)];
@@ -2644,6 +2644,80 @@ const Share = {
2644
2644
  },
2645
2645
  };
2646
2646
 
2647
+ const initialState$7 = {
2648
+ message: undefined,
2649
+ status: 'idle',
2650
+ };
2651
+ const teamWorkToDoSlice = toolkit.createSlice({
2652
+ name: 'teamWorkToDo',
2653
+ initialState: initialState$7,
2654
+ reducers: {
2655
+ setMessageAndStatus: (state, action) => {
2656
+ const { status, message } = action.payload;
2657
+ state.status = status;
2658
+ state.message = message;
2659
+ },
2660
+ },
2661
+ extraReducers: (builder) => {
2662
+ builder.addCase(startToDoCreation.fulfilled, (state, action) => {
2663
+ if (action.payload) {
2664
+ state.status = 'processing';
2665
+ }
2666
+ else {
2667
+ state.status = 'error';
2668
+ }
2669
+ });
2670
+ builder.addCase(startToDoCreation.rejected, (state, action) => {
2671
+ var _a, _b;
2672
+ state.status = 'error';
2673
+ state.message = (_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.errorMsg) !== null && _b !== void 0 ? _b : 'GLOBAL_Technical_Error';
2674
+ });
2675
+ },
2676
+ });
2677
+ const startToDoCreation = toolkit.createAsyncThunk('teamWork/startToDoCreation', (_, { extra, rejectWithValue, dispatch, signal }) => __awaiter(void 0, void 0, void 0, function* () {
2678
+ try {
2679
+ const isSent = (yield extra.jApi.teamWork.aiGeneratedToDo({ signal })).result;
2680
+ return isSent;
2681
+ }
2682
+ catch (err) {
2683
+ if (!isAbortError(err)) {
2684
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
2685
+ }
2686
+ return rejectWithValue({ error: 1, errorMsg: 'APP_TEAMWORK_ToDo_Not_Sent' });
2687
+ }
2688
+ }));
2689
+
2690
+ const getTeamWorkRTHandlers = function (dispatch) {
2691
+ const toDoUpdateHandler = function (message) {
2692
+ if (message.namespace === 'TEAMWORK' && message.function === 'update') {
2693
+ dispatch(teamWorkToDoSlice.actions.setMessageAndStatus({ status: message.state, message: message.msg }));
2694
+ }
2695
+ };
2696
+ return [
2697
+ {
2698
+ namespace: 'TEAMWORK',
2699
+ function: 'update',
2700
+ handler: toDoUpdateHandler,
2701
+ },
2702
+ ];
2703
+ };
2704
+
2705
+ const selectToDoState = (state) => state.teamWork.teamWorkToDo;
2706
+ const teamWorkSliceReducer = toolkit.combineReducers({
2707
+ [teamWorkToDoSlice.name]: teamWorkToDoSlice.reducer,
2708
+ });
2709
+ const teamWorkSlice = {
2710
+ name: 'teamWork',
2711
+ reducer: teamWorkSliceReducer,
2712
+ };
2713
+ const teamworkReducer = teamWorkSlice.reducer;
2714
+ const TeamWork = {
2715
+ slice: teamWorkSlice,
2716
+ actions: Object.assign(Object.assign({}, teamWorkToDoSlice.actions), { startToDoCreation }),
2717
+ selectors: { selectToDoState },
2718
+ getTeamWorkRTHandlers,
2719
+ };
2720
+
2647
2721
  const initialState$6 = {
2648
2722
  channels: undefined,
2649
2723
  loading: 'idle',
@@ -6139,6 +6213,7 @@ exports.Share = Share;
6139
6213
  exports.SocialActions = SocialActions;
6140
6214
  exports.StatusType = StatusType$1;
6141
6215
  exports.TVDisplay = TVDisplay;
6216
+ exports.TeamWork = TeamWork;
6142
6217
  exports.TinyMCE = TinyMCE;
6143
6218
  exports.Toast = Toast;
6144
6219
  exports.UserCurrent = UserCurrent;
@@ -6171,6 +6246,8 @@ exports.selectExtraBotListAll = selectExtraBotListAll;
6171
6246
  exports.selectExtraBotListMines = selectExtraBotListMines;
6172
6247
  exports.slice = slice$1;
6173
6248
  exports.studio = studio;
6249
+ exports.teamWorkSlice = teamWorkSlice;
6250
+ exports.teamworkReducer = teamworkReducer;
6174
6251
  exports.toggleExtraBotActivation = toggleExtraBotActivation;
6175
6252
  exports.updateListBotProperty = updateListBotProperty;
6176
6253
  exports.updateStatus = updateStatus;