jamespot-front-business 1.2.50 → 1.2.52

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
@@ -81,7 +81,7 @@ const oneMonthAgo$2 = () => {
81
81
  date.setMonth(date.getMonth() - 1);
82
82
  return date;
83
83
  };
84
- const initialState$t = {
84
+ const initialState$u = {
85
85
  data: [],
86
86
  loading: 'idle',
87
87
  page: 1,
@@ -113,7 +113,7 @@ const fetchLogsNavigation = toolkit.createAsyncThunk('admin/fetchLogsNavigation'
113
113
  });
114
114
  const adminLogsNavigationSlice = toolkit.createSlice({
115
115
  name: 'logsNavigation',
116
- initialState: initialState$t,
116
+ initialState: initialState$u,
117
117
  reducers: {
118
118
  setNavigationOrder: (state, action) => {
119
119
  state.orders = [...action.payload];
@@ -150,7 +150,7 @@ const oneMonthAgo$1 = () => {
150
150
  date.setMonth(date.getMonth() - 1);
151
151
  return date;
152
152
  };
153
- const initialState$s = {
153
+ const initialState$t = {
154
154
  data: [],
155
155
  loading: 'idle',
156
156
  page: 1,
@@ -182,7 +182,7 @@ const fetchLogsObjects = toolkit.createAsyncThunk('admin/fetchLogsObjects', asyn
182
182
  });
183
183
  const adminLogsObjectsSlice = toolkit.createSlice({
184
184
  name: 'logsObjects',
185
- initialState: initialState$s,
185
+ initialState: initialState$t,
186
186
  reducers: {
187
187
  setObjectsOrder: (state, action) => {
188
188
  state.orders = [...action.payload];
@@ -219,7 +219,7 @@ const oneMonthAgo = () => {
219
219
  date.setMonth(date.getMonth() - 1);
220
220
  return date;
221
221
  };
222
- const initialState$r = {
222
+ const initialState$s = {
223
223
  data: [],
224
224
  loading: 'idle',
225
225
  page: 1,
@@ -251,7 +251,7 @@ const fetchLogsSearch = toolkit.createAsyncThunk('admin/fetchLogsSearch', async
251
251
  });
252
252
  const adminLogsSearchSlice = toolkit.createSlice({
253
253
  name: 'logsSearch',
254
- initialState: initialState$r,
254
+ initialState: initialState$s,
255
255
  reducers: {
256
256
  setSearchOrder: (state, action) => {
257
257
  state.orders = [...action.payload];
@@ -308,7 +308,7 @@ const AdminLogs = {
308
308
  selectors: { selectAdminLogsNavigation, selectAdminLogsObjects, selectAdminLogsSearch },
309
309
  };
310
310
 
311
- const initialState$q = {
311
+ const initialState$r = {
312
312
  animationConfiguration: null,
313
313
  isActiveForCurrentUser: false,
314
314
  isInitialized: false,
@@ -316,7 +316,7 @@ const initialState$q = {
316
316
  };
317
317
  const animationsListSlice = toolkit.createSlice({
318
318
  name: 'animationsList',
319
- initialState: initialState$q,
319
+ initialState: initialState$r,
320
320
  reducers: {},
321
321
  extraReducers: (builder) => {
322
322
  builder.addCase(fetchCurrentAnimation.fulfilled, (state, action) => {
@@ -551,7 +551,7 @@ const Application = {
551
551
  selectors: selectors$2,
552
552
  };
553
553
 
554
- const initialState$p = {
554
+ const initialState$q = {
555
555
  entities: [],
556
556
  loading: 'idle',
557
557
  nbResults: 0,
@@ -568,7 +568,7 @@ const fetchBookableAsset = toolkit.createAsyncThunk('BookableAsset/fetchBookable
568
568
  });
569
569
  const BookableAssetSlice = toolkit.createSlice({
570
570
  name: 'bookableAsset',
571
- initialState: initialState$p,
571
+ initialState: initialState$q,
572
572
  reducers: {},
573
573
  extraReducers: (builder) => {
574
574
  builder
@@ -589,7 +589,7 @@ const BookableAssetSlice = toolkit.createSlice({
589
589
  const fetchConfiguration = toolkit.createAsyncThunk('AssetReservation/configuration', async (_, { extra }) => {
590
590
  return await extra.jApi.assetReservation.configuration();
591
591
  });
592
- const initialState$o = {
592
+ const initialState$p = {
593
593
  description: '',
594
594
  right: {
595
595
  manage: false,
@@ -603,7 +603,7 @@ const initialState$o = {
603
603
  };
604
604
  const AssetReservationConfigurationSlice = toolkit.createSlice({
605
605
  name: 'configuration',
606
- initialState: initialState$o,
606
+ initialState: initialState$p,
607
607
  reducers: {},
608
608
  extraReducers: (builder) => {
609
609
  builder
@@ -627,7 +627,7 @@ const initForm = {
627
627
  hourStart: '',
628
628
  hourEnd: '',
629
629
  };
630
- const initialState$n = {
630
+ const initialState$o = {
631
631
  entities: [],
632
632
  loading: 'idle',
633
633
  nbResults: 0,
@@ -643,7 +643,7 @@ const fetchReservation = toolkit.createAsyncThunk('Reservation/fetchReservation'
643
643
  });
644
644
  const ReservationSlice = toolkit.createSlice({
645
645
  name: 'reservation',
646
- initialState: initialState$n,
646
+ initialState: initialState$o,
647
647
  reducers: {
648
648
  setForm: (state, action) => {
649
649
  state.form = action.payload;
@@ -699,7 +699,7 @@ const AssetReservation = {
699
699
  },
700
700
  };
701
701
 
702
- const initialState$m = {
702
+ const initialState$n = {
703
703
  loading: 'idle',
704
704
  reports: [],
705
705
  page: 1,
@@ -712,7 +712,7 @@ const initialState$m = {
712
712
  };
713
713
  const contentReportSlice = toolkit.createSlice({
714
714
  name: 'contentReport',
715
- initialState: initialState$m,
715
+ initialState: initialState$n,
716
716
  reducers: {
717
717
  setTab: (state, action) => {
718
718
  state.tab = action.payload;
@@ -822,7 +822,7 @@ const ContentReport = {
822
822
  selectors: { selectContentReport },
823
823
  };
824
824
 
825
- const initialState$l = {
825
+ const initialState$m = {
826
826
  bookmarks: [],
827
827
  loading: 'idle',
828
828
  status: undefined,
@@ -884,7 +884,7 @@ const deleteBookmark = toolkit.createAsyncThunk('bookmarkList/deleteBookmark', a
884
884
  });
885
885
  const BookmarkListSlice = toolkit.createSlice({
886
886
  name: 'bookmarkList',
887
- initialState: initialState$l,
887
+ initialState: initialState$m,
888
888
  reducers: {
889
889
  resetAddBookmarkStatus: (state, action) => {
890
890
  if (state.add[action.payload]) {
@@ -1047,7 +1047,7 @@ const getBookmarkRTHandlers = function (dispatch) {
1047
1047
  ];
1048
1048
  };
1049
1049
 
1050
- const initialState$k = {
1050
+ const initialState$l = {
1051
1051
  bookmark: undefined,
1052
1052
  status: undefined,
1053
1053
  loading: 'idle',
@@ -1068,7 +1068,7 @@ const editBookmark = toolkit.createAsyncThunk('bookmarkEdit/editBookmark', async
1068
1068
  });
1069
1069
  const BookmarkEditSlice = toolkit.createSlice({
1070
1070
  name: 'bookmarkEdit',
1071
- initialState: initialState$k,
1071
+ initialState: initialState$l,
1072
1072
  reducers: {
1073
1073
  setEditBookmark: (state, action) => {
1074
1074
  state.bookmark = { ...action.payload };
@@ -1131,7 +1131,7 @@ const Bookmark = {
1131
1131
  getRTHandlers: getBookmarkRTHandlers,
1132
1132
  };
1133
1133
 
1134
- const initialState$j = {
1134
+ const initialState$k = {
1135
1135
  list: [],
1136
1136
  statuses: ['subscribed', 'unanswered'],
1137
1137
  loading: 'idle',
@@ -1200,7 +1200,7 @@ const changeResponse = toolkit.createAsyncThunk('calendarEvents/changeResponse',
1200
1200
  });
1201
1201
  const CalendarEventsSlice = toolkit.createSlice({
1202
1202
  name: 'events',
1203
- initialState: initialState$j,
1203
+ initialState: initialState$k,
1204
1204
  reducers: {
1205
1205
  addEvent: (state, action) => {
1206
1206
  state.list = [action.payload, ...state.list];
@@ -1211,7 +1211,7 @@ const CalendarEventsSlice = toolkit.createSlice({
1211
1211
  updateEvent: (state, action) => {
1212
1212
  state.list = state.list.map((event) => (event.uri === action.payload.uri ? action.payload : event));
1213
1213
  },
1214
- reset: () => initialState$j,
1214
+ reset: () => initialState$k,
1215
1215
  },
1216
1216
  extraReducers: (builder) => {
1217
1217
  builder
@@ -1375,7 +1375,7 @@ const Calendar = {
1375
1375
  getCalendarRTHandlers,
1376
1376
  };
1377
1377
 
1378
- const initialState$i = {
1378
+ const initialState$j = {
1379
1379
  loading: 'idle',
1380
1380
  comments: [],
1381
1381
  };
@@ -1383,7 +1383,7 @@ const fetchComments = toolkit.createAsyncThunk('commentList/fetchCommentList', a
1383
1383
  try {
1384
1384
  const res = await extra.jApi.article.getComments(params, {
1385
1385
  format: 'raw-list',
1386
- formatExtension: ['actions'],
1386
+ formatExtension: ['actions', 'quarantine'],
1387
1387
  });
1388
1388
  return { idArticle: params.idArticle, list: res.result };
1389
1389
  }
@@ -1404,7 +1404,7 @@ const deleteComment = toolkit.createAsyncThunk('commentList/deleteComment', asyn
1404
1404
  });
1405
1405
  const CommentListSlice = toolkit.createSlice({
1406
1406
  name: 'commentList',
1407
- initialState: initialState$i,
1407
+ initialState: initialState$j,
1408
1408
  reducers: {
1409
1409
  discardComments: (state, action) => {
1410
1410
  state.comments = state.comments.filter((c) => c.idArticle !== action.payload.idArticle);
@@ -1569,7 +1569,7 @@ const ExtraBotConst = {
1569
1569
  listDefaultPage: 1,
1570
1570
  };
1571
1571
 
1572
- const initialState$h = {
1572
+ const initialState$i = {
1573
1573
  global: {
1574
1574
  loading: 'idle',
1575
1575
  },
@@ -1701,7 +1701,7 @@ const updateListBotProperty = (state, extraBotUri, property, value) => {
1701
1701
  };
1702
1702
  const extraBotSlice = toolkit.createSlice({
1703
1703
  name: 'extraBot',
1704
- initialState: initialState$h,
1704
+ initialState: initialState$i,
1705
1705
  reducers: {
1706
1706
  setListAllOrder: (state, action) => {
1707
1707
  state.listAll.orders = [...action.payload];
@@ -1800,7 +1800,7 @@ const ExtraBot = {
1800
1800
  selectors: { selectExtraBotListAll, selectExtraBotListMines },
1801
1801
  };
1802
1802
 
1803
- const initialState$g = {
1803
+ const initialState$h = {
1804
1804
  loading: 'idle',
1805
1805
  access: { createCategory: false },
1806
1806
  };
@@ -1829,7 +1829,7 @@ const fetchFaqConfig = toolkit.createAsyncThunk('faqConfig/fetch', async () => {
1829
1829
  });
1830
1830
  const FaqConfigSlice = toolkit.createSlice({
1831
1831
  name: 'config',
1832
- initialState: initialState$g,
1832
+ initialState: initialState$h,
1833
1833
  reducers: {},
1834
1834
  extraReducers: (builder) => {
1835
1835
  builder
@@ -1864,7 +1864,7 @@ const FaqConfigSlice = toolkit.createSlice({
1864
1864
  },
1865
1865
  });
1866
1866
 
1867
- const initialState$f = {
1867
+ const initialState$g = {
1868
1868
  loading: 'idle',
1869
1869
  categories: null,
1870
1870
  };
@@ -1876,7 +1876,7 @@ const fetchFaqCategories = toolkit.createAsyncThunk('faqCategories/fetch', async
1876
1876
  });
1877
1877
  const FaqCategoriesSlice = toolkit.createSlice({
1878
1878
  name: 'categories',
1879
- initialState: initialState$f,
1879
+ initialState: initialState$g,
1880
1880
  reducers: {},
1881
1881
  extraReducers: (builder) => {
1882
1882
  builder
@@ -1923,6 +1923,133 @@ const Faq = {
1923
1923
  },
1924
1924
  };
1925
1925
 
1926
+ const FileIntegrityConst = {
1927
+ listLimit: 50,
1928
+ listDefaultPage: 1,
1929
+ };
1930
+
1931
+ const initialState$f = {
1932
+ list: {
1933
+ loading: 'idle',
1934
+ data: [],
1935
+ limit: FileIntegrityConst.listLimit,
1936
+ nbResults: 0,
1937
+ page: FileIntegrityConst.listDefaultPage,
1938
+ filters: [],
1939
+ orders: [
1940
+ {
1941
+ name: 'dateCreation',
1942
+ sort: 'DESC',
1943
+ },
1944
+ ],
1945
+ },
1946
+ action: {
1947
+ loading: 'idle',
1948
+ },
1949
+ };
1950
+ const fetchFileIntegrityList = toolkit.createAsyncThunk('fileIntegrity/fetchAll', async (_, { extra, rejectWithValue, dispatch, getState }) => {
1951
+ const state = getState().fileIntegrity.list;
1952
+ try {
1953
+ return (await extra.jApi.fileIntegrity.list({
1954
+ limit: state.limit,
1955
+ page: state.page,
1956
+ filters: state.filters,
1957
+ orders: state.orders,
1958
+ })).result;
1959
+ }
1960
+ catch (err) {
1961
+ if (!isAbortError(err)) {
1962
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
1963
+ }
1964
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve file integrity list' });
1965
+ }
1966
+ });
1967
+ const releaseQuarantine = toolkit.createAsyncThunk('fileIntegrity/releaseQuarantine', async (id, { extra, rejectWithValue, dispatch }) => {
1968
+ try {
1969
+ return (await extra.jApi.fileIntegrity.release(id)).result;
1970
+ }
1971
+ catch (err) {
1972
+ if (!isAbortError(err)) {
1973
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
1974
+ }
1975
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot release quarantined file' });
1976
+ }
1977
+ });
1978
+ const deleteQuarantine = toolkit.createAsyncThunk('fileIntegrity/deleteQuarantine', async (id, { extra, rejectWithValue, dispatch }) => {
1979
+ try {
1980
+ return (await extra.jApi.fileIntegrity.delete(id)).result;
1981
+ }
1982
+ catch (err) {
1983
+ if (!isAbortError(err)) {
1984
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
1985
+ }
1986
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot delete quarantined file' });
1987
+ }
1988
+ });
1989
+ const FileIntegritySlice = toolkit.createSlice({
1990
+ name: 'fileIntegrity',
1991
+ initialState: initialState$f,
1992
+ reducers: {
1993
+ setListOrder: (state, action) => {
1994
+ state.list.orders = [...action.payload];
1995
+ state.list.page = FileIntegrityConst.listDefaultPage;
1996
+ },
1997
+ setListFilter: (state, action) => {
1998
+ state.list.filters = [...action.payload];
1999
+ state.list.page = FileIntegrityConst.listDefaultPage;
2000
+ },
2001
+ setListPage: (state, action) => {
2002
+ state.list.page = action.payload;
2003
+ },
2004
+ },
2005
+ extraReducers: (builder) => {
2006
+ builder
2007
+ .addCase(fetchFileIntegrityList.pending, (state) => {
2008
+ state.list.loading = 'pending';
2009
+ })
2010
+ .addCase(fetchFileIntegrityList.fulfilled, (state, action) => {
2011
+ state.list.data = action.payload.data;
2012
+ state.list.nbResults = action.payload.cnt;
2013
+ state.list.limit = action.payload.limit ?? FileIntegrityConst.listLimit;
2014
+ state.list.page = action.payload.page;
2015
+ state.list.loading = 'idle';
2016
+ })
2017
+ .addCase(fetchFileIntegrityList.rejected, (state) => {
2018
+ state.list.loading = 'idle';
2019
+ })
2020
+ .addCase(releaseQuarantine.pending, (state) => {
2021
+ state.action.loading = 'pending';
2022
+ })
2023
+ .addCase(releaseQuarantine.fulfilled, (state) => {
2024
+ state.action.loading = 'idle';
2025
+ })
2026
+ .addCase(releaseQuarantine.rejected, (state) => {
2027
+ state.action.loading = 'idle';
2028
+ })
2029
+ .addCase(deleteQuarantine.pending, (state) => {
2030
+ state.action.loading = 'pending';
2031
+ })
2032
+ .addCase(deleteQuarantine.fulfilled, (state) => {
2033
+ state.action.loading = 'idle';
2034
+ })
2035
+ .addCase(deleteQuarantine.rejected, (state) => {
2036
+ state.action.loading = 'idle';
2037
+ });
2038
+ },
2039
+ });
2040
+ const selectFileIntegrityAction = (state) => state.fileIntegrity.action;
2041
+ const selectFileIntegrityList = (state) => state.fileIntegrity.list;
2042
+ const FileIntegrity = {
2043
+ slice: FileIntegritySlice,
2044
+ actions: {
2045
+ deleteQuarantine,
2046
+ fetchFileIntegrityList,
2047
+ releaseQuarantine,
2048
+ ...FileIntegritySlice.actions,
2049
+ },
2050
+ selectors: { selectFileIntegrityAction, selectFileIntegrityList },
2051
+ };
2052
+
1926
2053
  const buildDrivesArrayFromObject = (drives) => {
1927
2054
  if (!drives)
1928
2055
  return [];
@@ -6600,6 +6727,8 @@ exports.ExtraAppFieldsItemName = ExtraAppFieldsItemName;
6600
6727
  exports.ExtraAppFieldsItemViews = ExtraAppFieldsItemViews;
6601
6728
  exports.ExtraBot = ExtraBot;
6602
6729
  exports.Faq = Faq;
6730
+ exports.FileIntegrity = FileIntegrity;
6731
+ exports.FileIntegritySlice = FileIntegritySlice;
6603
6732
  exports.Hook = Hook;
6604
6733
  exports.MagicPad = MagicPad;
6605
6734
  exports.MapExtraFieldsWithView = MapExtraFieldsWithView;
@@ -6625,9 +6754,11 @@ exports.adminLogsSlice = adminLogsSlice;
6625
6754
  exports.animationsReducer = animationsReducer;
6626
6755
  exports.animationsSlice = animationsSlice;
6627
6756
  exports.contentReportSlice = contentReportSlice;
6757
+ exports.deleteQuarantine = deleteQuarantine;
6628
6758
  exports.extraBotSlice = extraBotSlice;
6629
6759
  exports.fetchExtraBotListAll = fetchExtraBotListAll;
6630
6760
  exports.fetchExtraBotListMines = fetchExtraBotListMines;
6761
+ exports.fetchFileIntegrityList = fetchFileIntegrityList;
6631
6762
  exports.fetchMediaLibraryConfig = fetchMediaLibraryConfig;
6632
6763
  exports.fetchMediaLibraryFilesStats = fetchMediaLibraryFilesStats;
6633
6764
  exports.fetchMediaLibraryFolders = fetchMediaLibraryFolders;
@@ -6640,9 +6771,12 @@ exports.jland = jland;
6640
6771
  exports.magicPadSlice = magicPadSlice;
6641
6772
  exports.mediaLibraryReducer = mediaLibraryReducer;
6642
6773
  exports.mediaLibrarySlice = mediaLibrarySlice;
6774
+ exports.releaseQuarantine = releaseQuarantine;
6643
6775
  exports.saveExtraBot = saveExtraBot;
6644
6776
  exports.selectExtraBotListAll = selectExtraBotListAll;
6645
6777
  exports.selectExtraBotListMines = selectExtraBotListMines;
6778
+ exports.selectFileIntegrityAction = selectFileIntegrityAction;
6779
+ exports.selectFileIntegrityList = selectFileIntegrityList;
6646
6780
  exports.slice = slice$1;
6647
6781
  exports.studio = studio;
6648
6782
  exports.teamWorkSlice = teamWorkSlice;