jamespot-front-business 1.1.70 → 1.1.72

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
@@ -82,6 +82,10 @@ const Toast = {
82
82
  selectors: selectors$3,
83
83
  };
84
84
 
85
+ const isAbortError = (error) => {
86
+ return !!error && typeof error === 'object' && 'aborted' in error && !!error.aborted;
87
+ };
88
+
85
89
  const initialState$m = {
86
90
  animationConfiguration: null,
87
91
  isActiveForCurrentUser: false,
@@ -114,14 +118,16 @@ const animationsListSlice = createSlice({
114
118
  });
115
119
  },
116
120
  });
117
- const fetchCurrentAnimation = createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
121
+ const fetchCurrentAnimation = createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch, signal }) => __awaiter(void 0, void 0, void 0, function* () {
118
122
  try {
119
- const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
120
- const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
123
+ const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation({ signal })).result;
124
+ const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive({ signal })).result;
121
125
  return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
122
126
  }
123
- catch (_) {
124
- dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
127
+ catch (err) {
128
+ if (!isAbortError(err)) {
129
+ dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
130
+ }
125
131
  return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
126
132
  }
127
133
  }));
@@ -2458,6 +2464,7 @@ const initialState$3 = {
2458
2464
  widgetObject: {},
2459
2465
  widgetObjectRights: {},
2460
2466
  widgetAuthor: {},
2467
+ flushedWidgets: [],
2461
2468
  rtObjectStack: [],
2462
2469
  };
2463
2470
  const IS_EMPTY = [
@@ -2518,8 +2525,10 @@ const widgetsSlice = createSlice({
2518
2525
  const { uniqid } = action.payload;
2519
2526
  delete state.ids[uniqid];
2520
2527
  delete state.states[uniqid];
2528
+ state.flushedWidgets.push(uniqid);
2521
2529
  },
2522
2530
  flushAllWidget: (state) => {
2531
+ state.flushedWidgets = [...state.flushedWidgets, ...Object.keys(state.ids)];
2523
2532
  state.ids = {};
2524
2533
  state.states = {};
2525
2534
  },
@@ -2639,6 +2648,7 @@ const getWidgetRTHandlers = function (dispatch, uniqid) {
2639
2648
  const selectToken = (state) => state.widgets.token;
2640
2649
  const selectModal = (state) => state.widgets.modal;
2641
2650
  const selectWidgets = (state) => state.widgets.ids;
2651
+ const selectFlushedWidgets = (state) => state.widgets.flushedWidgets;
2642
2652
  const selectWidgetState = (state, uniqid) => { var _a; return (_a = state.widgets.states[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
2643
2653
  const selectWidget = (state, uniqid) => { var _a; return (_a = state.widgets.ids[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
2644
2654
  const selectWidgetObject = (state, uniqid) => { var _a; return (_a = state.widgets.widgetObject[uniqid]) !== null && _a !== void 0 ? _a : undefined; };
@@ -2667,6 +2677,7 @@ const Widget = {
2667
2677
  selectWidgetAuthor,
2668
2678
  selectWidgetObjectRights,
2669
2679
  selectAllWidgetRTObject,
2680
+ selectFlushedWidgets,
2670
2681
  },
2671
2682
  };
2672
2683
 
@@ -4015,7 +4026,9 @@ function renderAppView(viewSolr, listView) {
4015
4026
  if (viewSolr === STUDIO_VIEW.SOLR) {
4016
4027
  let xml = '<AppView>solr</AppView>';
4017
4028
  const formItemIdInList = [];
4018
- Object.entries(listView).sort((a, b) => a[1].pos - b[1].pos).forEach(([fieldId, field]) => {
4029
+ Object.entries(listView)
4030
+ .sort((a, b) => a[1].pos - b[1].pos)
4031
+ .forEach(([fieldId, field]) => {
4019
4032
  if (!field.isUsed) {
4020
4033
  return;
4021
4034
  }
@@ -4031,7 +4044,9 @@ function renderAppView(viewSolr, listView) {
4031
4044
  }
4032
4045
  function renderAppSearch(searchView) {
4033
4046
  const formItemIdInFilter = [];
4034
- Object.entries(searchView).sort((a, b) => a[1].pos - b[1].pos).forEach(([fieldId, field]) => {
4047
+ Object.entries(searchView)
4048
+ .sort((a, b) => a[1].pos - b[1].pos)
4049
+ .forEach(([fieldId, field]) => {
4035
4050
  if (!field.isUsed) {
4036
4051
  return;
4037
4052
  }
@@ -4108,7 +4123,11 @@ function formItem2xml(field) {
4108
4123
  solr.indexed="true"
4109
4124
  solr.stored="true"
4110
4125
  solr.searchable="true"
4111
- solr.multiValued="${field.type === AppFormItemTypes.TAGS || field.type === AppFormItemTypes.CHECKBOX ? true : false}"
4126
+ solr.multiValued="${field.type === AppFormItemTypes.TAGS ||
4127
+ field.type === AppFormItemTypes.CHECKBOX ||
4128
+ field.type === AppFormItemTypes.SELECT
4129
+ ? true
4130
+ : false}"
4112
4131
  teaser="true"
4113
4132
  display="true"
4114
4133
  >