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/esm.js CHANGED
@@ -79,7 +79,7 @@ const oneMonthAgo$2 = () => {
79
79
  date.setMonth(date.getMonth() - 1);
80
80
  return date;
81
81
  };
82
- const initialState$t = {
82
+ const initialState$u = {
83
83
  data: [],
84
84
  loading: 'idle',
85
85
  page: 1,
@@ -111,7 +111,7 @@ const fetchLogsNavigation = createAsyncThunk('admin/fetchLogsNavigation', async
111
111
  });
112
112
  const adminLogsNavigationSlice = createSlice({
113
113
  name: 'logsNavigation',
114
- initialState: initialState$t,
114
+ initialState: initialState$u,
115
115
  reducers: {
116
116
  setNavigationOrder: (state, action) => {
117
117
  state.orders = [...action.payload];
@@ -148,7 +148,7 @@ const oneMonthAgo$1 = () => {
148
148
  date.setMonth(date.getMonth() - 1);
149
149
  return date;
150
150
  };
151
- const initialState$s = {
151
+ const initialState$t = {
152
152
  data: [],
153
153
  loading: 'idle',
154
154
  page: 1,
@@ -180,7 +180,7 @@ const fetchLogsObjects = createAsyncThunk('admin/fetchLogsObjects', async (param
180
180
  });
181
181
  const adminLogsObjectsSlice = createSlice({
182
182
  name: 'logsObjects',
183
- initialState: initialState$s,
183
+ initialState: initialState$t,
184
184
  reducers: {
185
185
  setObjectsOrder: (state, action) => {
186
186
  state.orders = [...action.payload];
@@ -217,7 +217,7 @@ const oneMonthAgo = () => {
217
217
  date.setMonth(date.getMonth() - 1);
218
218
  return date;
219
219
  };
220
- const initialState$r = {
220
+ const initialState$s = {
221
221
  data: [],
222
222
  loading: 'idle',
223
223
  page: 1,
@@ -249,7 +249,7 @@ const fetchLogsSearch = createAsyncThunk('admin/fetchLogsSearch', async (params,
249
249
  });
250
250
  const adminLogsSearchSlice = createSlice({
251
251
  name: 'logsSearch',
252
- initialState: initialState$r,
252
+ initialState: initialState$s,
253
253
  reducers: {
254
254
  setSearchOrder: (state, action) => {
255
255
  state.orders = [...action.payload];
@@ -306,7 +306,7 @@ const AdminLogs = {
306
306
  selectors: { selectAdminLogsNavigation, selectAdminLogsObjects, selectAdminLogsSearch },
307
307
  };
308
308
 
309
- const initialState$q = {
309
+ const initialState$r = {
310
310
  animationConfiguration: null,
311
311
  isActiveForCurrentUser: false,
312
312
  isInitialized: false,
@@ -314,7 +314,7 @@ const initialState$q = {
314
314
  };
315
315
  const animationsListSlice = createSlice({
316
316
  name: 'animationsList',
317
- initialState: initialState$q,
317
+ initialState: initialState$r,
318
318
  reducers: {},
319
319
  extraReducers: (builder) => {
320
320
  builder.addCase(fetchCurrentAnimation.fulfilled, (state, action) => {
@@ -549,7 +549,7 @@ const Application = {
549
549
  selectors: selectors$2,
550
550
  };
551
551
 
552
- const initialState$p = {
552
+ const initialState$q = {
553
553
  entities: [],
554
554
  loading: 'idle',
555
555
  nbResults: 0,
@@ -566,7 +566,7 @@ const fetchBookableAsset = createAsyncThunk('BookableAsset/fetchBookableAsset',
566
566
  });
567
567
  const BookableAssetSlice = createSlice({
568
568
  name: 'bookableAsset',
569
- initialState: initialState$p,
569
+ initialState: initialState$q,
570
570
  reducers: {},
571
571
  extraReducers: (builder) => {
572
572
  builder
@@ -587,7 +587,7 @@ const BookableAssetSlice = createSlice({
587
587
  const fetchConfiguration = createAsyncThunk('AssetReservation/configuration', async (_, { extra }) => {
588
588
  return await extra.jApi.assetReservation.configuration();
589
589
  });
590
- const initialState$o = {
590
+ const initialState$p = {
591
591
  description: '',
592
592
  right: {
593
593
  manage: false,
@@ -601,7 +601,7 @@ const initialState$o = {
601
601
  };
602
602
  const AssetReservationConfigurationSlice = createSlice({
603
603
  name: 'configuration',
604
- initialState: initialState$o,
604
+ initialState: initialState$p,
605
605
  reducers: {},
606
606
  extraReducers: (builder) => {
607
607
  builder
@@ -625,7 +625,7 @@ const initForm = {
625
625
  hourStart: '',
626
626
  hourEnd: '',
627
627
  };
628
- const initialState$n = {
628
+ const initialState$o = {
629
629
  entities: [],
630
630
  loading: 'idle',
631
631
  nbResults: 0,
@@ -641,7 +641,7 @@ const fetchReservation = createAsyncThunk('Reservation/fetchReservation', async
641
641
  });
642
642
  const ReservationSlice = createSlice({
643
643
  name: 'reservation',
644
- initialState: initialState$n,
644
+ initialState: initialState$o,
645
645
  reducers: {
646
646
  setForm: (state, action) => {
647
647
  state.form = action.payload;
@@ -697,7 +697,7 @@ const AssetReservation = {
697
697
  },
698
698
  };
699
699
 
700
- const initialState$m = {
700
+ const initialState$n = {
701
701
  loading: 'idle',
702
702
  reports: [],
703
703
  page: 1,
@@ -710,7 +710,7 @@ const initialState$m = {
710
710
  };
711
711
  const contentReportSlice = createSlice({
712
712
  name: 'contentReport',
713
- initialState: initialState$m,
713
+ initialState: initialState$n,
714
714
  reducers: {
715
715
  setTab: (state, action) => {
716
716
  state.tab = action.payload;
@@ -820,7 +820,7 @@ const ContentReport = {
820
820
  selectors: { selectContentReport },
821
821
  };
822
822
 
823
- const initialState$l = {
823
+ const initialState$m = {
824
824
  bookmarks: [],
825
825
  loading: 'idle',
826
826
  status: undefined,
@@ -882,7 +882,7 @@ const deleteBookmark = createAsyncThunk('bookmarkList/deleteBookmark', async (bo
882
882
  });
883
883
  const BookmarkListSlice = createSlice({
884
884
  name: 'bookmarkList',
885
- initialState: initialState$l,
885
+ initialState: initialState$m,
886
886
  reducers: {
887
887
  resetAddBookmarkStatus: (state, action) => {
888
888
  if (state.add[action.payload]) {
@@ -1045,7 +1045,7 @@ const getBookmarkRTHandlers = function (dispatch) {
1045
1045
  ];
1046
1046
  };
1047
1047
 
1048
- const initialState$k = {
1048
+ const initialState$l = {
1049
1049
  bookmark: undefined,
1050
1050
  status: undefined,
1051
1051
  loading: 'idle',
@@ -1066,7 +1066,7 @@ const editBookmark = createAsyncThunk('bookmarkEdit/editBookmark', async (bookma
1066
1066
  });
1067
1067
  const BookmarkEditSlice = createSlice({
1068
1068
  name: 'bookmarkEdit',
1069
- initialState: initialState$k,
1069
+ initialState: initialState$l,
1070
1070
  reducers: {
1071
1071
  setEditBookmark: (state, action) => {
1072
1072
  state.bookmark = { ...action.payload };
@@ -1129,7 +1129,7 @@ const Bookmark = {
1129
1129
  getRTHandlers: getBookmarkRTHandlers,
1130
1130
  };
1131
1131
 
1132
- const initialState$j = {
1132
+ const initialState$k = {
1133
1133
  list: [],
1134
1134
  statuses: ['subscribed', 'unanswered'],
1135
1135
  loading: 'idle',
@@ -1198,7 +1198,7 @@ const changeResponse = createAsyncThunk('calendarEvents/changeResponse', async (
1198
1198
  });
1199
1199
  const CalendarEventsSlice = createSlice({
1200
1200
  name: 'events',
1201
- initialState: initialState$j,
1201
+ initialState: initialState$k,
1202
1202
  reducers: {
1203
1203
  addEvent: (state, action) => {
1204
1204
  state.list = [action.payload, ...state.list];
@@ -1209,7 +1209,7 @@ const CalendarEventsSlice = createSlice({
1209
1209
  updateEvent: (state, action) => {
1210
1210
  state.list = state.list.map((event) => (event.uri === action.payload.uri ? action.payload : event));
1211
1211
  },
1212
- reset: () => initialState$j,
1212
+ reset: () => initialState$k,
1213
1213
  },
1214
1214
  extraReducers: (builder) => {
1215
1215
  builder
@@ -1373,7 +1373,7 @@ const Calendar = {
1373
1373
  getCalendarRTHandlers,
1374
1374
  };
1375
1375
 
1376
- const initialState$i = {
1376
+ const initialState$j = {
1377
1377
  loading: 'idle',
1378
1378
  comments: [],
1379
1379
  };
@@ -1381,7 +1381,7 @@ const fetchComments = createAsyncThunk('commentList/fetchCommentList', async (pa
1381
1381
  try {
1382
1382
  const res = await extra.jApi.article.getComments(params, {
1383
1383
  format: 'raw-list',
1384
- formatExtension: ['actions'],
1384
+ formatExtension: ['actions', 'quarantine'],
1385
1385
  });
1386
1386
  return { idArticle: params.idArticle, list: res.result };
1387
1387
  }
@@ -1402,7 +1402,7 @@ const deleteComment = createAsyncThunk('commentList/deleteComment', async (param
1402
1402
  });
1403
1403
  const CommentListSlice = createSlice({
1404
1404
  name: 'commentList',
1405
- initialState: initialState$i,
1405
+ initialState: initialState$j,
1406
1406
  reducers: {
1407
1407
  discardComments: (state, action) => {
1408
1408
  state.comments = state.comments.filter((c) => c.idArticle !== action.payload.idArticle);
@@ -1567,7 +1567,7 @@ const ExtraBotConst = {
1567
1567
  listDefaultPage: 1,
1568
1568
  };
1569
1569
 
1570
- const initialState$h = {
1570
+ const initialState$i = {
1571
1571
  global: {
1572
1572
  loading: 'idle',
1573
1573
  },
@@ -1699,7 +1699,7 @@ const updateListBotProperty = (state, extraBotUri, property, value) => {
1699
1699
  };
1700
1700
  const extraBotSlice = createSlice({
1701
1701
  name: 'extraBot',
1702
- initialState: initialState$h,
1702
+ initialState: initialState$i,
1703
1703
  reducers: {
1704
1704
  setListAllOrder: (state, action) => {
1705
1705
  state.listAll.orders = [...action.payload];
@@ -1798,7 +1798,7 @@ const ExtraBot = {
1798
1798
  selectors: { selectExtraBotListAll, selectExtraBotListMines },
1799
1799
  };
1800
1800
 
1801
- const initialState$g = {
1801
+ const initialState$h = {
1802
1802
  loading: 'idle',
1803
1803
  access: { createCategory: false },
1804
1804
  };
@@ -1827,7 +1827,7 @@ const fetchFaqConfig = createAsyncThunk('faqConfig/fetch', async () => {
1827
1827
  });
1828
1828
  const FaqConfigSlice = createSlice({
1829
1829
  name: 'config',
1830
- initialState: initialState$g,
1830
+ initialState: initialState$h,
1831
1831
  reducers: {},
1832
1832
  extraReducers: (builder) => {
1833
1833
  builder
@@ -1862,7 +1862,7 @@ const FaqConfigSlice = createSlice({
1862
1862
  },
1863
1863
  });
1864
1864
 
1865
- const initialState$f = {
1865
+ const initialState$g = {
1866
1866
  loading: 'idle',
1867
1867
  categories: null,
1868
1868
  };
@@ -1874,7 +1874,7 @@ const fetchFaqCategories = createAsyncThunk('faqCategories/fetch', async () => {
1874
1874
  });
1875
1875
  const FaqCategoriesSlice = createSlice({
1876
1876
  name: 'categories',
1877
- initialState: initialState$f,
1877
+ initialState: initialState$g,
1878
1878
  reducers: {},
1879
1879
  extraReducers: (builder) => {
1880
1880
  builder
@@ -1921,6 +1921,133 @@ const Faq = {
1921
1921
  },
1922
1922
  };
1923
1923
 
1924
+ const FileIntegrityConst = {
1925
+ listLimit: 50,
1926
+ listDefaultPage: 1,
1927
+ };
1928
+
1929
+ const initialState$f = {
1930
+ list: {
1931
+ loading: 'idle',
1932
+ data: [],
1933
+ limit: FileIntegrityConst.listLimit,
1934
+ nbResults: 0,
1935
+ page: FileIntegrityConst.listDefaultPage,
1936
+ filters: [],
1937
+ orders: [
1938
+ {
1939
+ name: 'dateCreation',
1940
+ sort: 'DESC',
1941
+ },
1942
+ ],
1943
+ },
1944
+ action: {
1945
+ loading: 'idle',
1946
+ },
1947
+ };
1948
+ const fetchFileIntegrityList = createAsyncThunk('fileIntegrity/fetchAll', async (_, { extra, rejectWithValue, dispatch, getState }) => {
1949
+ const state = getState().fileIntegrity.list;
1950
+ try {
1951
+ return (await extra.jApi.fileIntegrity.list({
1952
+ limit: state.limit,
1953
+ page: state.page,
1954
+ filters: state.filters,
1955
+ orders: state.orders,
1956
+ })).result;
1957
+ }
1958
+ catch (err) {
1959
+ if (!isAbortError(err)) {
1960
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
1961
+ }
1962
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve file integrity list' });
1963
+ }
1964
+ });
1965
+ const releaseQuarantine = createAsyncThunk('fileIntegrity/releaseQuarantine', async (id, { extra, rejectWithValue, dispatch }) => {
1966
+ try {
1967
+ return (await extra.jApi.fileIntegrity.release(id)).result;
1968
+ }
1969
+ catch (err) {
1970
+ if (!isAbortError(err)) {
1971
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
1972
+ }
1973
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot release quarantined file' });
1974
+ }
1975
+ });
1976
+ const deleteQuarantine = createAsyncThunk('fileIntegrity/deleteQuarantine', async (id, { extra, rejectWithValue, dispatch }) => {
1977
+ try {
1978
+ return (await extra.jApi.fileIntegrity.delete(id)).result;
1979
+ }
1980
+ catch (err) {
1981
+ if (!isAbortError(err)) {
1982
+ dispatch(Toast.actions.error({ label: getErrorMessage(err) }));
1983
+ }
1984
+ return rejectWithValue({ error: 1, errorMsg: 'Cannot delete quarantined file' });
1985
+ }
1986
+ });
1987
+ const FileIntegritySlice = createSlice({
1988
+ name: 'fileIntegrity',
1989
+ initialState: initialState$f,
1990
+ reducers: {
1991
+ setListOrder: (state, action) => {
1992
+ state.list.orders = [...action.payload];
1993
+ state.list.page = FileIntegrityConst.listDefaultPage;
1994
+ },
1995
+ setListFilter: (state, action) => {
1996
+ state.list.filters = [...action.payload];
1997
+ state.list.page = FileIntegrityConst.listDefaultPage;
1998
+ },
1999
+ setListPage: (state, action) => {
2000
+ state.list.page = action.payload;
2001
+ },
2002
+ },
2003
+ extraReducers: (builder) => {
2004
+ builder
2005
+ .addCase(fetchFileIntegrityList.pending, (state) => {
2006
+ state.list.loading = 'pending';
2007
+ })
2008
+ .addCase(fetchFileIntegrityList.fulfilled, (state, action) => {
2009
+ state.list.data = action.payload.data;
2010
+ state.list.nbResults = action.payload.cnt;
2011
+ state.list.limit = action.payload.limit ?? FileIntegrityConst.listLimit;
2012
+ state.list.page = action.payload.page;
2013
+ state.list.loading = 'idle';
2014
+ })
2015
+ .addCase(fetchFileIntegrityList.rejected, (state) => {
2016
+ state.list.loading = 'idle';
2017
+ })
2018
+ .addCase(releaseQuarantine.pending, (state) => {
2019
+ state.action.loading = 'pending';
2020
+ })
2021
+ .addCase(releaseQuarantine.fulfilled, (state) => {
2022
+ state.action.loading = 'idle';
2023
+ })
2024
+ .addCase(releaseQuarantine.rejected, (state) => {
2025
+ state.action.loading = 'idle';
2026
+ })
2027
+ .addCase(deleteQuarantine.pending, (state) => {
2028
+ state.action.loading = 'pending';
2029
+ })
2030
+ .addCase(deleteQuarantine.fulfilled, (state) => {
2031
+ state.action.loading = 'idle';
2032
+ })
2033
+ .addCase(deleteQuarantine.rejected, (state) => {
2034
+ state.action.loading = 'idle';
2035
+ });
2036
+ },
2037
+ });
2038
+ const selectFileIntegrityAction = (state) => state.fileIntegrity.action;
2039
+ const selectFileIntegrityList = (state) => state.fileIntegrity.list;
2040
+ const FileIntegrity = {
2041
+ slice: FileIntegritySlice,
2042
+ actions: {
2043
+ deleteQuarantine,
2044
+ fetchFileIntegrityList,
2045
+ releaseQuarantine,
2046
+ ...FileIntegritySlice.actions,
2047
+ },
2048
+ selectors: { selectFileIntegrityAction, selectFileIntegrityList },
2049
+ };
2050
+
1924
2051
  const buildDrivesArrayFromObject = (drives) => {
1925
2052
  if (!drives)
1926
2053
  return [];
@@ -6571,5 +6698,5 @@ const studio = {
6571
6698
  },
6572
6699
  };
6573
6700
 
6574
- 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, Article, AssetReservation, Bookmark, Calendar, 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 };
6701
+ 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, Article, AssetReservation, Bookmark, Calendar, Comment, ContentReport, Description, Element, ExtraAppFieldsItemName, ExtraAppFieldsItemViews, ExtraBot, Faq, FileIntegrity, FileIntegritySlice, 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, deleteQuarantine, extraBotSlice, fetchExtraBotListAll, fetchExtraBotListMines, fetchFileIntegrityList, fetchMediaLibraryConfig, fetchMediaLibraryFilesStats, fetchMediaLibraryFolders, fetchMediaLibraryFoldersStats, fetchMediaLibraryStats, fetchMediaLibraryUnclassifiedFiles, fetchPads, fetchReports, jland, magicPadSlice, mediaLibraryReducer, mediaLibrarySlice, releaseQuarantine, saveExtraBot, selectExtraBotListAll, selectExtraBotListMines, selectFileIntegrityAction, selectFileIntegrityList, slice$1 as slice, studio, teamWorkSlice, teamworkReducer, toggleExtraBotActivation, updateListBotProperty, updateStatus, updateWidgetContent, viewsList };
6575
6702
  //# sourceMappingURL=esm.js.map