oa-componentbook 1.0.1-stage.363 → 1.0.1-stage.364

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.
@@ -51,7 +51,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
51
51
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
52
52
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
53
53
  function GenricLayOut(_ref) {
54
- var _parent$children, _state$misc20, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _customDrawer$applied12, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables3, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination33, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
54
+ var _state$misc22, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables4, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination17, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
55
55
  let {
56
56
  config,
57
57
  getInitialData,
@@ -76,10 +76,12 @@ function GenricLayOut(_ref) {
76
76
  handleActionOnTableCTAClick,
77
77
  handleModalCloseSuccess,
78
78
  handleSubHeadingSelectClick,
79
- handleCollapsibleKeyData
79
+ handleCollapsibleKeyData,
80
+ handleTableFooterApi
80
81
  } = {}
81
82
  } = _ref;
82
83
  const [state, dispatch] = (0, _react.useReducer)(_layoutReducer.genericLayoutReducer, config !== null && config !== void 0 ? config : _layoutReducer.initialState);
84
+ const [headerButtons, setHeaderButtons] = (0, _react.useState)(null);
83
85
  const stateRef = (0, _react.useRef)(state);
84
86
  const notificationRef = (0, _react.useRef)(null);
85
87
  const openNotification = (0, _react.useCallback)(params => notificationRef.current.openNotification(params), []);
@@ -108,10 +110,25 @@ function GenricLayOut(_ref) {
108
110
  (0, _react.useEffect)(() => {
109
111
  stateRef.current = state;
110
112
  }, [state]);
111
- const parent = document.querySelector(".oaheaderButtons");
112
- if ((parent === null || parent === void 0 || (_parent$children = parent.children) === null || _parent$children === void 0 ? void 0 : _parent$children.length) === 1) {
113
- parent.classList.add("single-child");
114
- }
113
+ (0, _react.useEffect)(() => {
114
+ const observer = new MutationObserver(e => {
115
+ const parent = document.querySelector(".oaheaderButtons");
116
+ if (parent) {
117
+ var _parent$children;
118
+ setHeaderButtons(parent);
119
+ if ((parent === null || parent === void 0 || (_parent$children = parent.children) === null || _parent$children === void 0 ? void 0 : _parent$children.length) === 1) {
120
+ parent.classList.add("single-child");
121
+ }
122
+ }
123
+ });
124
+ observer.observe(document.body, {
125
+ childList: true,
126
+ subtree: true
127
+ });
128
+ return () => {
129
+ observer.disconnect();
130
+ };
131
+ }, [headerButtons]);
115
132
 
116
133
  /**
117
134
  * Initializes the layout by fetching initial data and updating the state.
@@ -228,7 +245,7 @@ function GenricLayOut(_ref) {
228
245
  });
229
246
  if (value === "") {
230
247
  if (handleInputSearchChange) {
231
- var _state$inputSearch, _state$tabs2, _customDrawer$applied, _tables$pagination, _tables$pagination2, _tables$sorting, _tables$sorting2, _header$subHeading, _header$subHeading2;
248
+ var _state$inputSearch, _state$tabs2, _customDrawer$applied, _config$tables, _config$tables2, _tables$sorting, _tables$sorting2, _header$subHeading, _header$subHeading2;
232
249
  dispatch({
233
250
  type: _layoutReducer.actionTypes.SET_LOADING,
234
251
  payload: true
@@ -238,13 +255,9 @@ function GenricLayOut(_ref) {
238
255
  data
239
256
  } = await handleInputSearchChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, state === null || state === void 0 || (_state$inputSearch = state.inputSearch) === null || _state$inputSearch === void 0 ? void 0 : _state$inputSearch.request), state !== null && state !== void 0 && (_state$tabs2 = state.tabs) !== null && _state$tabs2 !== void 0 && _state$tabs2.active ? {
240
257
  selectedTab: state.tabs.active
241
- } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied !== void 0 ? _customDrawer$applied : {}).length > 0 && {
242
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
243
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
244
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
245
- }), {}, {
246
- current: tables === null || tables === void 0 || (_tables$pagination = tables.pagination) === null || _tables$pagination === void 0 ? void 0 : _tables$pagination.current,
247
- pageSize: tables === null || tables === void 0 || (_tables$pagination2 = tables.pagination) === null || _tables$pagination2 === void 0 ? void 0 : _tables$pagination2.pageSize,
258
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied !== void 0 ? _customDrawer$applied : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), {}, {
259
+ current: config === null || config === void 0 || (_config$tables = config.tables) === null || _config$tables === void 0 || (_config$tables = _config$tables.pagination) === null || _config$tables === void 0 ? void 0 : _config$tables.current,
260
+ pageSize: config === null || config === void 0 || (_config$tables2 = config.tables) === null || _config$tables2 === void 0 || (_config$tables2 = _config$tables2.pagination) === null || _config$tables2 === void 0 ? void 0 : _config$tables2.pageSize,
248
261
  field: tables === null || tables === void 0 || (_tables$sorting = tables.sorting) === null || _tables$sorting === void 0 ? void 0 : _tables$sorting.sortBy,
249
262
  order: tables === null || tables === void 0 || (_tables$sorting2 = tables.sorting) === null || _tables$sorting2 === void 0 ? void 0 : _tables$sorting2.sortDirection
250
263
  }, (header === null || header === void 0 || (_header$subHeading = header.subHeading) === null || _header$subHeading === void 0 || (_header$subHeading = _header$subHeading.jsxConfig) === null || _header$subHeading === void 0 ? void 0 : _header$subHeading.type) == "select" ? {
@@ -256,6 +269,7 @@ function GenricLayOut(_ref) {
256
269
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
257
270
  });
258
271
  } else {
272
+ var _config$tables3, _config$tables4;
259
273
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
260
274
  setStaticFilterData(data);
261
275
  }
@@ -263,6 +277,13 @@ function GenricLayOut(_ref) {
263
277
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
264
278
  payload: data
265
279
  });
280
+ dispatch({
281
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
282
+ payload: {
283
+ current: config === null || config === void 0 || (_config$tables3 = config.tables) === null || _config$tables3 === void 0 || (_config$tables3 = _config$tables3.pagination) === null || _config$tables3 === void 0 ? void 0 : _config$tables3.current,
284
+ pageSize: config === null || config === void 0 || (_config$tables4 = config.tables) === null || _config$tables4 === void 0 || (_config$tables4 = _config$tables4.pagination) === null || _config$tables4 === void 0 ? void 0 : _config$tables4.pageSize
285
+ }
286
+ });
266
287
  }
267
288
  dispatch({
268
289
  type: _layoutReducer.actionTypes.SET_LOADING,
@@ -302,7 +323,7 @@ function GenricLayOut(_ref) {
302
323
  payload: trimedValue
303
324
  });
304
325
  if (handleInputSearchEnter) {
305
- var _state$tabs3, _tables$pagination3, _tables$pagination4, _tables$sorting3, _tables$sorting4, _customDrawer$applied2, _header$subHeading3, _header$subHeading4;
326
+ var _state$tabs3, _config$tables5, _config$tables6, _tables$sorting3, _tables$sorting4, _customDrawer$applied2, _header$subHeading3, _header$subHeading4;
306
327
  const {
307
328
  error,
308
329
  data
@@ -310,15 +331,11 @@ function GenricLayOut(_ref) {
310
331
  selectedTab: state.tabs.active
311
332
  } : {}), {}, {
312
333
  searchedValue: trimedValue,
313
- current: tables === null || tables === void 0 || (_tables$pagination3 = tables.pagination) === null || _tables$pagination3 === void 0 ? void 0 : _tables$pagination3.current,
314
- pageSize: tables === null || tables === void 0 || (_tables$pagination4 = tables.pagination) === null || _tables$pagination4 === void 0 ? void 0 : _tables$pagination4.pageSize,
334
+ current: config === null || config === void 0 || (_config$tables5 = config.tables) === null || _config$tables5 === void 0 || (_config$tables5 = _config$tables5.pagination) === null || _config$tables5 === void 0 ? void 0 : _config$tables5.current,
335
+ pageSize: config === null || config === void 0 || (_config$tables6 = config.tables) === null || _config$tables6 === void 0 || (_config$tables6 = _config$tables6.pagination) === null || _config$tables6 === void 0 ? void 0 : _config$tables6.pageSize,
315
336
  field: tables === null || tables === void 0 || (_tables$sorting3 = tables.sorting) === null || _tables$sorting3 === void 0 ? void 0 : _tables$sorting3.sortBy,
316
337
  order: tables === null || tables === void 0 || (_tables$sorting4 = tables.sorting) === null || _tables$sorting4 === void 0 ? void 0 : _tables$sorting4.sortDirection
317
- }, (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied2 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied2 !== void 0 ? _customDrawer$applied2 : {}).length > 0 && {
318
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
319
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
320
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
321
- }), inputSearch !== null && inputSearch !== void 0 && inputSearch.queryField ? {
338
+ }, (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied2 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied2 !== void 0 ? _customDrawer$applied2 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), inputSearch !== null && inputSearch !== void 0 && inputSearch.queryField ? {
322
339
  queryField: inputSearch.queryField
323
340
  } : {}), (header === null || header === void 0 || (_header$subHeading3 = header.subHeading) === null || _header$subHeading3 === void 0 || (_header$subHeading3 = _header$subHeading3.jsxConfig) === null || _header$subHeading3 === void 0 ? void 0 : _header$subHeading3.type) == "select" ? {
324
341
  subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading4 = header.subHeading) === null || _header$subHeading4 === void 0 || (_header$subHeading4 = _header$subHeading4.jsxConfig) === null || _header$subHeading4 === void 0 ? void 0 : _header$subHeading4.value
@@ -329,6 +346,7 @@ function GenricLayOut(_ref) {
329
346
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
330
347
  });
331
348
  } else {
349
+ var _config$tables7, _config$tables8;
332
350
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
333
351
  setStaticFilterData(data);
334
352
  }
@@ -336,6 +354,13 @@ function GenricLayOut(_ref) {
336
354
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
337
355
  payload: data
338
356
  });
357
+ dispatch({
358
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
359
+ payload: {
360
+ current: config === null || config === void 0 || (_config$tables7 = config.tables) === null || _config$tables7 === void 0 || (_config$tables7 = _config$tables7.pagination) === null || _config$tables7 === void 0 ? void 0 : _config$tables7.current,
361
+ pageSize: config === null || config === void 0 || (_config$tables8 = config.tables) === null || _config$tables8 === void 0 || (_config$tables8 = _config$tables8.pagination) === null || _config$tables8 === void 0 ? void 0 : _config$tables8.pageSize
362
+ }
363
+ });
339
364
  }
340
365
  }
341
366
  };
@@ -365,7 +390,7 @@ function GenricLayOut(_ref) {
365
390
  });
366
391
  if (value === "") {
367
392
  if (handleDropdownSearchInputChange) {
368
- var _state$tabs4, _tables$pagination5, _tables$pagination6, _tables$sorting5, _tables$sorting6, _tables$filter, _staticFilter$data, _customDrawer$applied3, _state$misc2;
393
+ var _state$tabs4, _config$tables9, _config$tables10, _tables$sorting5, _tables$sorting6, _tables$filter, _staticFilter$data, _customDrawer$applied3, _header$subHeading5, _header$subHeading6, _state$misc2;
369
394
  dispatch({
370
395
  type: _layoutReducer.actionTypes.SET_LOADING,
371
396
  payload: true
@@ -373,27 +398,26 @@ function GenricLayOut(_ref) {
373
398
  const {
374
399
  error,
375
400
  data
376
- } = await handleDropdownSearchInputChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
401
+ } = await handleDropdownSearchInputChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
377
402
  selectedTab: state === null || state === void 0 || (_state$tabs4 = state.tabs) === null || _state$tabs4 === void 0 ? void 0 : _state$tabs4.active,
378
- current: tables === null || tables === void 0 || (_tables$pagination5 = tables.pagination) === null || _tables$pagination5 === void 0 ? void 0 : _tables$pagination5.current,
379
- pageSize: tables === null || tables === void 0 || (_tables$pagination6 = tables.pagination) === null || _tables$pagination6 === void 0 ? void 0 : _tables$pagination6.pageSize,
403
+ current: config === null || config === void 0 || (_config$tables9 = config.tables) === null || _config$tables9 === void 0 || (_config$tables9 = _config$tables9.pagination) === null || _config$tables9 === void 0 ? void 0 : _config$tables9.current,
404
+ pageSize: config === null || config === void 0 || (_config$tables10 = config.tables) === null || _config$tables10 === void 0 || (_config$tables10 = _config$tables10.pagination) === null || _config$tables10 === void 0 ? void 0 : _config$tables10.pageSize,
380
405
  field: tables === null || tables === void 0 || (_tables$sorting5 = tables.sorting) === null || _tables$sorting5 === void 0 ? void 0 : _tables$sorting5.sortBy,
381
406
  order: tables === null || tables === void 0 || (_tables$sorting6 = tables.sorting) === null || _tables$sorting6 === void 0 ? void 0 : _tables$sorting6.sortDirection
382
407
  }, (tables === null || tables === void 0 || (_tables$filter = tables.filter) === null || _tables$filter === void 0 ? void 0 : _tables$filter.key) && {
383
408
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
384
409
  }), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data = staticFilter.data) === null || _staticFilter$data === void 0 || (_staticFilter$data = _staticFilter$data.find(item => item.selected)) === null || _staticFilter$data === void 0 ? void 0 : _staticFilter$data.value) && {
385
410
  staticFilter: staticFilter.data.find(item => item.selected).value
386
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied3 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied3 !== void 0 ? _customDrawer$applied3 : {}).length > 0 && {
387
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
388
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
389
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
390
- }), (_state$misc2 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc2 !== void 0 ? _state$misc2 : {}));
411
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied3 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied3 !== void 0 ? _customDrawer$applied3 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading5 = header.subHeading) === null || _header$subHeading5 === void 0 || (_header$subHeading5 = _header$subHeading5.jsxConfig) === null || _header$subHeading5 === void 0 ? void 0 : _header$subHeading5.type) == "select" ? {
412
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading6 = header.subHeading) === null || _header$subHeading6 === void 0 || (_header$subHeading6 = _header$subHeading6.jsxConfig) === null || _header$subHeading6 === void 0 ? void 0 : _header$subHeading6.value
413
+ } : {}), (_state$misc2 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc2 !== void 0 ? _state$misc2 : {}));
391
414
  if (error) {
392
415
  showErrorNotification(error);
393
416
  dispatch({
394
417
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
395
418
  });
396
419
  } else {
420
+ var _config$tables11, _config$tables12;
397
421
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
398
422
  setStaticFilterData(data);
399
423
  }
@@ -401,6 +425,13 @@ function GenricLayOut(_ref) {
401
425
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
402
426
  payload: data
403
427
  });
428
+ dispatch({
429
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
430
+ payload: {
431
+ current: config === null || config === void 0 || (_config$tables11 = config.tables) === null || _config$tables11 === void 0 || (_config$tables11 = _config$tables11.pagination) === null || _config$tables11 === void 0 ? void 0 : _config$tables11.current,
432
+ pageSize: config === null || config === void 0 || (_config$tables12 = config.tables) === null || _config$tables12 === void 0 || (_config$tables12 = _config$tables12.pagination) === null || _config$tables12 === void 0 ? void 0 : _config$tables12.pageSize
433
+ }
434
+ });
404
435
  }
405
436
  dispatch({
406
437
  type: _layoutReducer.actionTypes.SET_LOADING,
@@ -449,33 +480,32 @@ function GenricLayOut(_ref) {
449
480
  payload: value
450
481
  });
451
482
  if (handleDropdownSearchEnter) {
452
- var _state$tabs5, _tables$pagination7, _tables$pagination8, _tables$sorting7, _tables$sorting8, _tables$filter2, _staticFilter$data2, _customDrawer$applied4, _state$misc3;
483
+ var _state$tabs5, _config$tables13, _config$tables14, _tables$sorting7, _tables$sorting8, _tables$filter2, _staticFilter$data2, _customDrawer$applied4, _header$subHeading7, _header$subHeading8, _state$misc3;
453
484
  const {
454
485
  error,
455
486
  data
456
- } = await handleDropdownSearchEnter(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
487
+ } = await handleDropdownSearchEnter(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
457
488
  searchedValue: value,
458
489
  selectedTab: state === null || state === void 0 || (_state$tabs5 = state.tabs) === null || _state$tabs5 === void 0 ? void 0 : _state$tabs5.active,
459
490
  selectedOption: state === null || state === void 0 ? void 0 : state.dropdownSearch.selectedOption,
460
- current: tables === null || tables === void 0 || (_tables$pagination7 = tables.pagination) === null || _tables$pagination7 === void 0 ? void 0 : _tables$pagination7.current,
461
- pageSize: tables === null || tables === void 0 || (_tables$pagination8 = tables.pagination) === null || _tables$pagination8 === void 0 ? void 0 : _tables$pagination8.pageSize,
491
+ current: config === null || config === void 0 || (_config$tables13 = config.tables) === null || _config$tables13 === void 0 || (_config$tables13 = _config$tables13.pagination) === null || _config$tables13 === void 0 ? void 0 : _config$tables13.current,
492
+ pageSize: config === null || config === void 0 || (_config$tables14 = config.tables) === null || _config$tables14 === void 0 || (_config$tables14 = _config$tables14.pagination) === null || _config$tables14 === void 0 ? void 0 : _config$tables14.pageSize,
462
493
  field: tables === null || tables === void 0 || (_tables$sorting7 = tables.sorting) === null || _tables$sorting7 === void 0 ? void 0 : _tables$sorting7.sortBy,
463
494
  order: tables === null || tables === void 0 || (_tables$sorting8 = tables.sorting) === null || _tables$sorting8 === void 0 ? void 0 : _tables$sorting8.sortDirection
464
495
  }, (tables === null || tables === void 0 || (_tables$filter2 = tables.filter) === null || _tables$filter2 === void 0 ? void 0 : _tables$filter2.key) && {
465
496
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
466
497
  }), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data2 = staticFilter.data) === null || _staticFilter$data2 === void 0 || (_staticFilter$data2 = _staticFilter$data2.find(item => item.selected)) === null || _staticFilter$data2 === void 0 ? void 0 : _staticFilter$data2.value) && {
467
498
  staticFilter: staticFilter.data.find(item => item.selected).value
468
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied4 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied4 !== void 0 ? _customDrawer$applied4 : {}).length > 0 && {
469
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
470
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
471
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
472
- }), (_state$misc3 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc3 !== void 0 ? _state$misc3 : {}));
499
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied4 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied4 !== void 0 ? _customDrawer$applied4 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading7 = header.subHeading) === null || _header$subHeading7 === void 0 || (_header$subHeading7 = _header$subHeading7.jsxConfig) === null || _header$subHeading7 === void 0 ? void 0 : _header$subHeading7.type) == "select" ? {
500
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading8 = header.subHeading) === null || _header$subHeading8 === void 0 || (_header$subHeading8 = _header$subHeading8.jsxConfig) === null || _header$subHeading8 === void 0 ? void 0 : _header$subHeading8.value
501
+ } : {}), (_state$misc3 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc3 !== void 0 ? _state$misc3 : {}));
473
502
  if (error) {
474
503
  showErrorNotification(error);
475
504
  dispatch({
476
505
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
477
506
  });
478
507
  } else {
508
+ var _config$tables15, _config$tables16;
479
509
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
480
510
  setStaticFilterData(data);
481
511
  }
@@ -483,6 +513,13 @@ function GenricLayOut(_ref) {
483
513
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
484
514
  payload: data
485
515
  });
516
+ dispatch({
517
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
518
+ payload: {
519
+ current: config === null || config === void 0 || (_config$tables15 = config.tables) === null || _config$tables15 === void 0 || (_config$tables15 = _config$tables15.pagination) === null || _config$tables15 === void 0 ? void 0 : _config$tables15.current,
520
+ pageSize: config === null || config === void 0 || (_config$tables16 = config.tables) === null || _config$tables16 === void 0 || (_config$tables16 = _config$tables16.pagination) === null || _config$tables16 === void 0 ? void 0 : _config$tables16.pageSize
521
+ }
522
+ });
486
523
  }
487
524
  }
488
525
  };
@@ -505,7 +542,7 @@ function GenricLayOut(_ref) {
505
542
  payload: option === null || option === void 0 ? void 0 : option.value
506
543
  });
507
544
  if (handleDropdownSearchOptionChange) {
508
- var _tables$pagination9, _tables$pagination10, _staticFilter$data3, _customDrawer$applied5, _state$misc4;
545
+ var _config$tables17, _config$tables18, _staticFilter$data3, _customDrawer$applied5, _header$subHeading9, _header$subHeading10, _state$misc4;
509
546
  dispatch({
510
547
  type: _layoutReducer.actionTypes.SET_LOADING,
511
548
  payload: true
@@ -513,23 +550,22 @@ function GenricLayOut(_ref) {
513
550
  const {
514
551
  error,
515
552
  data
516
- } = await handleDropdownSearchOptionChange(_objectSpread(_objectSpread(_objectSpread({
553
+ } = await handleDropdownSearchOptionChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
517
554
  selectedTab: tabs === null || tabs === void 0 ? void 0 : tabs.active,
518
- current: tables === null || tables === void 0 || (_tables$pagination9 = tables.pagination) === null || _tables$pagination9 === void 0 ? void 0 : _tables$pagination9.current,
519
- pageSize: tables === null || tables === void 0 || (_tables$pagination10 = tables.pagination) === null || _tables$pagination10 === void 0 ? void 0 : _tables$pagination10.pageSize
555
+ current: config === null || config === void 0 || (_config$tables17 = config.tables) === null || _config$tables17 === void 0 || (_config$tables17 = _config$tables17.pagination) === null || _config$tables17 === void 0 ? void 0 : _config$tables17.current,
556
+ pageSize: config === null || config === void 0 || (_config$tables18 = config.tables) === null || _config$tables18 === void 0 || (_config$tables18 = _config$tables18.pagination) === null || _config$tables18 === void 0 ? void 0 : _config$tables18.pageSize
520
557
  }, (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data3 = staticFilter.data) === null || _staticFilter$data3 === void 0 || (_staticFilter$data3 = _staticFilter$data3.find(item => item.selected)) === null || _staticFilter$data3 === void 0 ? void 0 : _staticFilter$data3.value) && {
521
558
  staticFilter: staticFilter.data.find(item => item.selected).value
522
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied5 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied5 !== void 0 ? _customDrawer$applied5 : {}).length > 0 && {
523
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
524
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
525
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
526
- }), (_state$misc4 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc4 !== void 0 ? _state$misc4 : {}));
559
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied5 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied5 !== void 0 ? _customDrawer$applied5 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading9 = header.subHeading) === null || _header$subHeading9 === void 0 || (_header$subHeading9 = _header$subHeading9.jsxConfig) === null || _header$subHeading9 === void 0 ? void 0 : _header$subHeading9.type) == "select" ? {
560
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading10 = header.subHeading) === null || _header$subHeading10 === void 0 || (_header$subHeading10 = _header$subHeading10.jsxConfig) === null || _header$subHeading10 === void 0 ? void 0 : _header$subHeading10.value
561
+ } : {}), (_state$misc4 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc4 !== void 0 ? _state$misc4 : {}));
527
562
  if (error) {
528
563
  showErrorNotification(error);
529
564
  dispatch({
530
565
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
531
566
  });
532
567
  } else {
568
+ var _config$tables19, _config$tables20;
533
569
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
534
570
  setStaticFilterData(data);
535
571
  }
@@ -537,6 +573,13 @@ function GenricLayOut(_ref) {
537
573
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
538
574
  payload: data
539
575
  });
576
+ dispatch({
577
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
578
+ payload: {
579
+ current: config === null || config === void 0 || (_config$tables19 = config.tables) === null || _config$tables19 === void 0 || (_config$tables19 = _config$tables19.pagination) === null || _config$tables19 === void 0 ? void 0 : _config$tables19.current,
580
+ pageSize: config === null || config === void 0 || (_config$tables20 = config.tables) === null || _config$tables20 === void 0 || (_config$tables20 = _config$tables20.pagination) === null || _config$tables20 === void 0 ? void 0 : _config$tables20.pageSize
581
+ }
582
+ });
540
583
  if (config !== null && config !== void 0 && config.tabs) {
541
584
  dispatch({
542
585
  type: _layoutReducer.actionTypes.TAB_CLICK,
@@ -615,31 +658,30 @@ function GenricLayOut(_ref) {
615
658
  payload: null
616
659
  });
617
660
  if (handleDropdownSearchClear) {
618
- var _state$tabs6, _tables$pagination11, _tables$pagination12, _tables$sorting9, _tables$sorting10, _tables$filter3, _staticFilter$data4, _customDrawer$applied6, _state$misc5;
661
+ var _state$tabs6, _config$tables21, _config$tables22, _tables$sorting9, _tables$sorting10, _tables$filter3, _staticFilter$data4, _customDrawer$applied6, _header$subHeading11, _header$subHeading12, _state$misc5;
619
662
  const {
620
663
  error,
621
664
  data
622
- } = await handleDropdownSearchClear(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
665
+ } = await handleDropdownSearchClear(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
623
666
  selectedTab: state === null || state === void 0 || (_state$tabs6 = state.tabs) === null || _state$tabs6 === void 0 ? void 0 : _state$tabs6.active,
624
- current: tables === null || tables === void 0 || (_tables$pagination11 = tables.pagination) === null || _tables$pagination11 === void 0 ? void 0 : _tables$pagination11.current,
625
- pageSize: tables === null || tables === void 0 || (_tables$pagination12 = tables.pagination) === null || _tables$pagination12 === void 0 ? void 0 : _tables$pagination12.pageSize,
667
+ current: config === null || config === void 0 || (_config$tables21 = config.tables) === null || _config$tables21 === void 0 || (_config$tables21 = _config$tables21.pagination) === null || _config$tables21 === void 0 ? void 0 : _config$tables21.current,
668
+ pageSize: config === null || config === void 0 || (_config$tables22 = config.tables) === null || _config$tables22 === void 0 || (_config$tables22 = _config$tables22.pagination) === null || _config$tables22 === void 0 ? void 0 : _config$tables22.pageSize,
626
669
  field: tables === null || tables === void 0 || (_tables$sorting9 = tables.sorting) === null || _tables$sorting9 === void 0 ? void 0 : _tables$sorting9.sortBy,
627
670
  order: tables === null || tables === void 0 || (_tables$sorting10 = tables.sorting) === null || _tables$sorting10 === void 0 ? void 0 : _tables$sorting10.sortDirection
628
671
  }, (tables === null || tables === void 0 || (_tables$filter3 = tables.filter) === null || _tables$filter3 === void 0 ? void 0 : _tables$filter3.key) && {
629
672
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
630
673
  }), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data4 = staticFilter.data) === null || _staticFilter$data4 === void 0 || (_staticFilter$data4 = _staticFilter$data4.find(item => item.selected)) === null || _staticFilter$data4 === void 0 ? void 0 : _staticFilter$data4.value) && {
631
674
  staticFilter: staticFilter.data.find(item => item.selected).value
632
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied6 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied6 !== void 0 ? _customDrawer$applied6 : {}).length > 0 && {
633
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
634
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
635
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
636
- }), (_state$misc5 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc5 !== void 0 ? _state$misc5 : {}));
675
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied6 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied6 !== void 0 ? _customDrawer$applied6 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading11 = header.subHeading) === null || _header$subHeading11 === void 0 || (_header$subHeading11 = _header$subHeading11.jsxConfig) === null || _header$subHeading11 === void 0 ? void 0 : _header$subHeading11.type) == "select" ? {
676
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading12 = header.subHeading) === null || _header$subHeading12 === void 0 || (_header$subHeading12 = _header$subHeading12.jsxConfig) === null || _header$subHeading12 === void 0 ? void 0 : _header$subHeading12.value
677
+ } : {}), (_state$misc5 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc5 !== void 0 ? _state$misc5 : {}));
637
678
  if (error) {
638
679
  showErrorNotification(error);
639
680
  dispatch({
640
681
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
641
682
  });
642
683
  } else {
684
+ var _config$tables23, _config$tables24;
643
685
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
644
686
  setStaticFilterData(data);
645
687
  }
@@ -647,6 +689,13 @@ function GenricLayOut(_ref) {
647
689
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
648
690
  payload: data
649
691
  });
692
+ dispatch({
693
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
694
+ payload: {
695
+ current: config === null || config === void 0 || (_config$tables23 = config.tables) === null || _config$tables23 === void 0 || (_config$tables23 = _config$tables23.pagination) === null || _config$tables23 === void 0 ? void 0 : _config$tables23.current,
696
+ pageSize: config === null || config === void 0 || (_config$tables24 = config.tables) === null || _config$tables24 === void 0 || (_config$tables24 = _config$tables24.pagination) === null || _config$tables24 === void 0 ? void 0 : _config$tables24.pageSize
697
+ }
698
+ });
650
699
  }
651
700
  }
652
701
  };
@@ -671,30 +720,27 @@ function GenricLayOut(_ref) {
671
720
  payload: null
672
721
  });
673
722
  if (handleInputSearchClear) {
674
- var _state$tabs7, _tables$pagination13, _tables$pagination14, _tables$sorting11, _tables$sorting12, _customDrawer$applied7, _header$subHeading5, _header$subHeading6;
723
+ var _state$tabs7, _config$tables25, _config$tables26, _tables$sorting11, _tables$sorting12, _customDrawer$applied7, _header$subHeading13, _header$subHeading14, _state$misc6;
675
724
  const {
676
725
  error,
677
726
  data
678
- } = await handleInputSearchClear(_objectSpread(_objectSpread(_objectSpread({}, state !== null && state !== void 0 && (_state$tabs7 = state.tabs) !== null && _state$tabs7 !== void 0 && _state$tabs7.active ? {
727
+ } = await handleInputSearchClear(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, state !== null && state !== void 0 && (_state$tabs7 = state.tabs) !== null && _state$tabs7 !== void 0 && _state$tabs7.active ? {
679
728
  selectedTab: state.tabs.active
680
729
  } : {}), {}, {
681
- current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
682
- pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
730
+ current: config === null || config === void 0 || (_config$tables25 = config.tables) === null || _config$tables25 === void 0 || (_config$tables25 = _config$tables25.pagination) === null || _config$tables25 === void 0 ? void 0 : _config$tables25.current,
731
+ pageSize: config === null || config === void 0 || (_config$tables26 = config.tables) === null || _config$tables26 === void 0 || (_config$tables26 = _config$tables26.pagination) === null || _config$tables26 === void 0 ? void 0 : _config$tables26.pageSize,
683
732
  field: tables === null || tables === void 0 || (_tables$sorting11 = tables.sorting) === null || _tables$sorting11 === void 0 ? void 0 : _tables$sorting11.sortBy,
684
733
  order: tables === null || tables === void 0 || (_tables$sorting12 = tables.sorting) === null || _tables$sorting12 === void 0 ? void 0 : _tables$sorting12.sortDirection
685
- }, (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied7 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied7 !== void 0 ? _customDrawer$applied7 : {}).length > 0 && {
686
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
687
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
688
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
689
- }), (header === null || header === void 0 || (_header$subHeading5 = header.subHeading) === null || _header$subHeading5 === void 0 || (_header$subHeading5 = _header$subHeading5.jsxConfig) === null || _header$subHeading5 === void 0 ? void 0 : _header$subHeading5.type) == "select" ? {
690
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading6 = header.subHeading) === null || _header$subHeading6 === void 0 || (_header$subHeading6 = _header$subHeading6.jsxConfig) === null || _header$subHeading6 === void 0 ? void 0 : _header$subHeading6.value
691
- } : {}));
734
+ }, (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied7 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied7 !== void 0 ? _customDrawer$applied7 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (header === null || header === void 0 || (_header$subHeading13 = header.subHeading) === null || _header$subHeading13 === void 0 || (_header$subHeading13 = _header$subHeading13.jsxConfig) === null || _header$subHeading13 === void 0 ? void 0 : _header$subHeading13.type) == "select" ? {
735
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading14 = header.subHeading) === null || _header$subHeading14 === void 0 || (_header$subHeading14 = _header$subHeading14.jsxConfig) === null || _header$subHeading14 === void 0 ? void 0 : _header$subHeading14.value
736
+ } : {}), (_state$misc6 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc6 !== void 0 ? _state$misc6 : {}));
692
737
  if (error) {
693
738
  showErrorNotification(error);
694
739
  dispatch({
695
740
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
696
741
  });
697
742
  } else {
743
+ var _config$tables27, _config$tables28;
698
744
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
699
745
  setStaticFilterData(data);
700
746
  }
@@ -702,6 +748,13 @@ function GenricLayOut(_ref) {
702
748
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
703
749
  payload: data
704
750
  });
751
+ dispatch({
752
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
753
+ payload: {
754
+ current: config === null || config === void 0 || (_config$tables27 = config.tables) === null || _config$tables27 === void 0 || (_config$tables27 = _config$tables27.pagination) === null || _config$tables27 === void 0 ? void 0 : _config$tables27.current,
755
+ pageSize: config === null || config === void 0 || (_config$tables28 = config.tables) === null || _config$tables28 === void 0 || (_config$tables28 = _config$tables28.pagination) === null || _config$tables28 === void 0 ? void 0 : _config$tables28.pageSize
756
+ }
757
+ });
705
758
  }
706
759
  }
707
760
  };
@@ -734,14 +787,14 @@ function GenricLayOut(_ref) {
734
787
  if ((configArgs === null || configArgs === void 0 ? void 0 : configArgs.action) === "OPEN_DRAWER_AND_FETCH") {
735
788
  const selectkey = optKey || (configArgs === null || configArgs === void 0 ? void 0 : configArgs.key);
736
789
  if (handleTableColumnClick) {
737
- var _state$misc6;
790
+ var _state$misc7;
738
791
  const {
739
792
  error,
740
793
  data
741
794
  } = await (handleTableColumnClick === null || handleTableColumnClick === void 0 ? void 0 : handleTableColumnClick(_objectSpread({
742
795
  record: record,
743
796
  type: configArgs === null || configArgs === void 0 ? void 0 : configArgs.call
744
- }, (_state$misc6 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc6 !== void 0 ? _state$misc6 : {})));
797
+ }, (_state$misc7 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc7 !== void 0 ? _state$misc7 : {})));
745
798
  if (error) {
746
799
  showErrorNotification(error);
747
800
  } else {
@@ -874,9 +927,9 @@ function GenricLayOut(_ref) {
874
927
  * If an error occurs during any action, an error notification is shown.
875
928
  */
876
929
  const customTableSelectFooterClick = async configData => {
877
- var _state$modal;
878
- const modalContent = state === null || state === void 0 || (_state$modal = state.modal) === null || _state$modal === void 0 ? void 0 : _state$modal.modalContent;
879
930
  if ((configData === null || configData === void 0 ? void 0 : configData.action) === "OPEN_MODAL") {
931
+ var _state$modal;
932
+ const modalContent = state === null || state === void 0 || (_state$modal = state.modal) === null || _state$modal === void 0 ? void 0 : _state$modal.modalContent;
880
933
  if (handleModalDataSet) {
881
934
  const {
882
935
  error,
@@ -898,6 +951,44 @@ function GenricLayOut(_ref) {
898
951
  });
899
952
  }
900
953
  }
954
+ } else if ((configData === null || configData === void 0 ? void 0 : configData.action) === "CALL_API") {
955
+ if (handleTableFooterApi) {
956
+ const {
957
+ error,
958
+ data
959
+ } = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state));
960
+ if (error) {
961
+ showErrorNotification(error);
962
+ } else {
963
+ const updatedModalContent = (0, _staticConfigResolver.default)(config === null || config === void 0 ? void 0 : config.modal, data);
964
+ dispatch({
965
+ type: _layoutReducer.actionTypes.SET_MODAL,
966
+ payload: {
967
+ modalData: updatedModalContent
968
+ }
969
+ });
970
+ dispatch({
971
+ type: _layoutReducer.actionTypes.TOGGLE_MODAL,
972
+ payload: true
973
+ });
974
+ }
975
+ }
976
+ } else if ((configData === null || configData === void 0 ? void 0 : configData.action) === "ACTION_ON_CTA") {
977
+ console.log("here");
978
+ console.log(state, "statedata");
979
+ if (handleTableFooterApi) {
980
+ var _state$tables2;
981
+ const {
982
+ error,
983
+ data
984
+ } = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state === null || state === void 0 || (_state$tables2 = state.tables) === null || _state$tables2 === void 0 ? void 0 : _state$tables2.selectedRowKeys, state));
985
+ if (error) {
986
+ showErrorNotification(error);
987
+ } else {
988
+ showSuccessNotification(data);
989
+ }
990
+ init();
991
+ }
901
992
  }
902
993
  };
903
994
 
@@ -988,7 +1079,7 @@ function GenricLayOut(_ref) {
988
1079
  }
989
1080
  });
990
1081
  if (handleTableChange) {
991
- var _state$dropdownSearch3, _state$inputSearch4, _state$tabs9, _header$subHeading7, _header$subHeading8, _staticFilter$data5, _customDrawer$applied8, _state$misc7;
1082
+ var _state$dropdownSearch3, _state$inputSearch4, _state$tabs9, _header$subHeading15, _header$subHeading16, _staticFilter$data5, _customDrawer$applied8, _state$misc8;
992
1083
  dispatch({
993
1084
  type: _layoutReducer.actionTypes.SET_LOADING,
994
1085
  payload: true
@@ -1007,17 +1098,13 @@ function GenricLayOut(_ref) {
1007
1098
  pageSize: pageSize,
1008
1099
  columnFilterStatus: _f,
1009
1100
  field: sorter === null || sorter === void 0 ? void 0 : sorter.columnKey
1010
- }, (header === null || header === void 0 || (_header$subHeading7 = header.subHeading) === null || _header$subHeading7 === void 0 || (_header$subHeading7 = _header$subHeading7.jsxConfig) === null || _header$subHeading7 === void 0 ? void 0 : _header$subHeading7.type) == "select" ? {
1011
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading8 = header.subHeading) === null || _header$subHeading8 === void 0 || (_header$subHeading8 = _header$subHeading8.jsxConfig) === null || _header$subHeading8 === void 0 ? void 0 : _header$subHeading8.value
1101
+ }, (header === null || header === void 0 || (_header$subHeading15 = header.subHeading) === null || _header$subHeading15 === void 0 || (_header$subHeading15 = _header$subHeading15.jsxConfig) === null || _header$subHeading15 === void 0 ? void 0 : _header$subHeading15.type) == "select" ? {
1102
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading16 = header.subHeading) === null || _header$subHeading16 === void 0 || (_header$subHeading16 = _header$subHeading16.jsxConfig) === null || _header$subHeading16 === void 0 ? void 0 : _header$subHeading16.value
1012
1103
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data5 = staticFilter.data) === null || _staticFilter$data5 === void 0 || (_staticFilter$data5 = _staticFilter$data5.find(item => item.selected)) === null || _staticFilter$data5 === void 0 ? void 0 : _staticFilter$data5.value) && {
1013
1104
  staticFilter: staticFilter.data.find(item => item.selected).value
1014
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied8 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied8 !== void 0 ? _customDrawer$applied8 : {}).length > 0 && {
1015
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
1016
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
1017
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
1018
- }), {}, {
1105
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied8 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied8 !== void 0 ? _customDrawer$applied8 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), {}, {
1019
1106
  order: (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "ascend" && "ASC" || (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "descend" && "DESC" || ""
1020
- }, (_state$misc7 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc7 !== void 0 ? _state$misc7 : {}));
1107
+ }, (_state$misc8 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc8 !== void 0 ? _state$misc8 : {}));
1021
1108
  if (error) {
1022
1109
  showErrorNotification(error);
1023
1110
  dispatch({
@@ -1098,7 +1185,7 @@ function GenricLayOut(_ref) {
1098
1185
  });
1099
1186
  const selectedStaticFilterValue = tables !== null && tables !== void 0 && tables.staticFilterKey && (tables === null || tables === void 0 ? void 0 : tables.staticFilterKey) == key && Array.isArray(staticFilter.data) ? (_staticFilter$data$fi2 = staticFilter.data.find(item => item.selected)) === null || _staticFilter$data$fi2 === void 0 ? void 0 : _staticFilter$data$fi2.value : undefined;
1100
1187
  if (handleTabClick) {
1101
- var _state$misc8, _tables$pagination15, _tables$pagination16, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _customDrawer$applied9;
1188
+ var _state$misc9, _tables$pagination, _tables$pagination2, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _header$subHeading17, _header$subHeading18, _customDrawer$applied9, _state$misc10;
1102
1189
  dispatch({
1103
1190
  type: _layoutReducer.actionTypes.SET_LOADING,
1104
1191
  payload: true
@@ -1106,10 +1193,10 @@ function GenricLayOut(_ref) {
1106
1193
  const {
1107
1194
  error,
1108
1195
  data
1109
- } = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$misc8 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc8 !== void 0 ? _state$misc8 : {}), {}, {
1196
+ } = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$misc9 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc9 !== void 0 ? _state$misc9 : {}), {}, {
1110
1197
  selectedTab: key,
1111
- current: tables === null || tables === void 0 || (_tables$pagination15 = tables.pagination) === null || _tables$pagination15 === void 0 ? void 0 : _tables$pagination15.current,
1112
- pageSize: tables === null || tables === void 0 || (_tables$pagination16 = tables.pagination) === null || _tables$pagination16 === void 0 ? void 0 : _tables$pagination16.pageSize,
1198
+ current: tables === null || tables === void 0 || (_tables$pagination = tables.pagination) === null || _tables$pagination === void 0 ? void 0 : _tables$pagination.current,
1199
+ pageSize: tables === null || tables === void 0 || (_tables$pagination2 = tables.pagination) === null || _tables$pagination2 === void 0 ? void 0 : _tables$pagination2.pageSize,
1113
1200
  field: tables === null || tables === void 0 || (_tables$sorting13 = tables.sorting) === null || _tables$sorting13 === void 0 ? void 0 : _tables$sorting13.sortBy
1114
1201
  }, selectedStaticFilterValue && {
1115
1202
  staticFilter: selectedStaticFilterValue
@@ -1118,11 +1205,9 @@ function GenricLayOut(_ref) {
1118
1205
  }, (state === null || state === void 0 || (_state$dropdownSearch4 = state.dropdownSearch) === null || _state$dropdownSearch4 === void 0 || (_state$dropdownSearch4 = _state$dropdownSearch4.value) === null || _state$dropdownSearch4 === void 0 ? void 0 : _state$dropdownSearch4.trim()) && {
1119
1206
  searchedValue: state.dropdownSearch.value,
1120
1207
  selectedOption: state.dropdownSearch.selectedOption
1121
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied9 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied9 !== void 0 ? _customDrawer$applied9 : {}).length > 0 && {
1122
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
1123
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
1124
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
1125
- }));
1208
+ }), (header === null || header === void 0 || (_header$subHeading17 = header.subHeading) === null || _header$subHeading17 === void 0 || (_header$subHeading17 = _header$subHeading17.jsxConfig) === null || _header$subHeading17 === void 0 ? void 0 : _header$subHeading17.type) == "select" ? {
1209
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading18 = header.subHeading) === null || _header$subHeading18 === void 0 || (_header$subHeading18 = _header$subHeading18.jsxConfig) === null || _header$subHeading18 === void 0 ? void 0 : _header$subHeading18.value
1210
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied9 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied9 !== void 0 ? _customDrawer$applied9 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc10 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc10 !== void 0 ? _state$misc10 : {}));
1126
1211
  if (error) {
1127
1212
  showErrorNotification(error);
1128
1213
  dispatch({
@@ -1216,11 +1301,11 @@ function GenricLayOut(_ref) {
1216
1301
  return;
1217
1302
  }
1218
1303
  if (handleDrawerFormOnFinish) {
1219
- var _state$misc9;
1304
+ var _state$misc11;
1220
1305
  const {
1221
1306
  error,
1222
1307
  data
1223
- } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$misc9 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc9 !== void 0 ? _state$misc9 : {})));
1308
+ } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$misc11 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc11 !== void 0 ? _state$misc11 : {})));
1224
1309
  if (error) {
1225
1310
  showErrorNotification(error);
1226
1311
  } else {
@@ -1244,7 +1329,7 @@ function GenricLayOut(_ref) {
1244
1329
 
1245
1330
  // If there are remaining filters, reapply them
1246
1331
  if (Object.keys(currentFilters).length > 0) {
1247
- var _state$dropdownSearch5, _state$inputSearch5, _state$tabs12, _tables$pagination17, _tables$pagination18, _tables$filter6, _tables$sorting15, _header$subHeading9, _header$subHeading10, _staticFilter$data6, _tables$sorting16, _state$misc10;
1332
+ var _state$dropdownSearch5, _state$inputSearch5, _state$tabs12, _tables$pagination3, _tables$pagination4, _tables$filter6, _tables$sorting15, _header$subHeading19, _header$subHeading20, _staticFilter$data6, _tables$sorting16, _state$misc12;
1248
1333
  const {
1249
1334
  error,
1250
1335
  data
@@ -1258,19 +1343,19 @@ function GenricLayOut(_ref) {
1258
1343
  fromDate: currentFilters === null || currentFilters === void 0 ? void 0 : currentFilters.fromDate,
1259
1344
  toDate: currentFilters === null || currentFilters === void 0 ? void 0 : currentFilters.toDate,
1260
1345
  selectedTab: state === null || state === void 0 || (_state$tabs12 = state.tabs) === null || _state$tabs12 === void 0 ? void 0 : _state$tabs12.active,
1261
- current: tables === null || tables === void 0 || (_tables$pagination17 = tables.pagination) === null || _tables$pagination17 === void 0 ? void 0 : _tables$pagination17.current,
1262
- pageSize: tables === null || tables === void 0 || (_tables$pagination18 = tables.pagination) === null || _tables$pagination18 === void 0 ? void 0 : _tables$pagination18.pageSize
1346
+ current: tables === null || tables === void 0 || (_tables$pagination3 = tables.pagination) === null || _tables$pagination3 === void 0 ? void 0 : _tables$pagination3.current,
1347
+ pageSize: tables === null || tables === void 0 || (_tables$pagination4 = tables.pagination) === null || _tables$pagination4 === void 0 ? void 0 : _tables$pagination4.pageSize
1263
1348
  }, (tables === null || tables === void 0 || (_tables$filter6 = tables.filter) === null || _tables$filter6 === void 0 ? void 0 : _tables$filter6.key) && {
1264
1349
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1265
1350
  }), {}, {
1266
1351
  field: tables === null || tables === void 0 || (_tables$sorting15 = tables.sorting) === null || _tables$sorting15 === void 0 ? void 0 : _tables$sorting15.sortBy
1267
- }, (header === null || header === void 0 || (_header$subHeading9 = header.subHeading) === null || _header$subHeading9 === void 0 || (_header$subHeading9 = _header$subHeading9.jsxConfig) === null || _header$subHeading9 === void 0 ? void 0 : _header$subHeading9.type) == "select" ? {
1268
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading10 = header.subHeading) === null || _header$subHeading10 === void 0 || (_header$subHeading10 = _header$subHeading10.jsxConfig) === null || _header$subHeading10 === void 0 ? void 0 : _header$subHeading10.value
1352
+ }, (header === null || header === void 0 || (_header$subHeading19 = header.subHeading) === null || _header$subHeading19 === void 0 || (_header$subHeading19 = _header$subHeading19.jsxConfig) === null || _header$subHeading19 === void 0 ? void 0 : _header$subHeading19.type) == "select" ? {
1353
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading20 = header.subHeading) === null || _header$subHeading20 === void 0 || (_header$subHeading20 = _header$subHeading20.jsxConfig) === null || _header$subHeading20 === void 0 ? void 0 : _header$subHeading20.value
1269
1354
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data6 = staticFilter.data) === null || _staticFilter$data6 === void 0 || (_staticFilter$data6 = _staticFilter$data6.find(item => item.selected)) === null || _staticFilter$data6 === void 0 ? void 0 : _staticFilter$data6.value) && {
1270
1355
  staticFilter: staticFilter.data.find(item => item.selected).value
1271
1356
  }), {}, {
1272
1357
  order: tables === null || tables === void 0 || (_tables$sorting16 = tables.sorting) === null || _tables$sorting16 === void 0 ? void 0 : _tables$sorting16.sortDirection
1273
- }, (_state$misc10 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc10 !== void 0 ? _state$misc10 : {}));
1358
+ }, (_state$misc12 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc12 !== void 0 ? _state$misc12 : {}));
1274
1359
  if (error) {
1275
1360
  showErrorNotification(error);
1276
1361
  dispatch({
@@ -1302,7 +1387,13 @@ function GenricLayOut(_ref) {
1302
1387
  const filterFormOnFinish = async formData => {
1303
1388
  // Check if this is a cancel/clear action - check both buttonClickType and the actual button data
1304
1389
  if (formData.type === "FILTER-CANCEL") {
1305
- var _state$dropdownSearch6, _state$inputSearch6, _state$tabs13, _tables$pagination19, _tables$pagination20, _tables$filter7, _tables$sorting17, _header$subHeading11, _header$subHeading12, _staticFilter$data7, _tables$sorting18, _state$misc11;
1390
+ var _state$dropdownSearch6, _state$inputSearch6, _state$tabs13, _tables$pagination5, _tables$pagination6, _tables$filter7, _tables$sorting17, _header$subHeading21, _header$subHeading22, _staticFilter$data7, _tables$sorting18, _state$misc13;
1391
+ if (isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)) {
1392
+ dispatch({
1393
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1394
+ });
1395
+ return;
1396
+ }
1306
1397
  const {
1307
1398
  error,
1308
1399
  data
@@ -1313,19 +1404,19 @@ function GenricLayOut(_ref) {
1313
1404
  searchedValue: state.inputSearch.value
1314
1405
  }), {}, {
1315
1406
  selectedTab: state === null || state === void 0 || (_state$tabs13 = state.tabs) === null || _state$tabs13 === void 0 ? void 0 : _state$tabs13.active,
1316
- current: tables === null || tables === void 0 || (_tables$pagination19 = tables.pagination) === null || _tables$pagination19 === void 0 ? void 0 : _tables$pagination19.current,
1317
- pageSize: tables === null || tables === void 0 || (_tables$pagination20 = tables.pagination) === null || _tables$pagination20 === void 0 ? void 0 : _tables$pagination20.pageSize
1407
+ current: tables === null || tables === void 0 || (_tables$pagination5 = tables.pagination) === null || _tables$pagination5 === void 0 ? void 0 : _tables$pagination5.current,
1408
+ pageSize: tables === null || tables === void 0 || (_tables$pagination6 = tables.pagination) === null || _tables$pagination6 === void 0 ? void 0 : _tables$pagination6.pageSize
1318
1409
  }, (tables === null || tables === void 0 || (_tables$filter7 = tables.filter) === null || _tables$filter7 === void 0 ? void 0 : _tables$filter7.key) && {
1319
1410
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1320
1411
  }), {}, {
1321
1412
  field: tables === null || tables === void 0 || (_tables$sorting17 = tables.sorting) === null || _tables$sorting17 === void 0 ? void 0 : _tables$sorting17.sortBy
1322
- }, (header === null || header === void 0 || (_header$subHeading11 = header.subHeading) === null || _header$subHeading11 === void 0 || (_header$subHeading11 = _header$subHeading11.jsxConfig) === null || _header$subHeading11 === void 0 ? void 0 : _header$subHeading11.type) == "select" ? {
1323
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading12 = header.subHeading) === null || _header$subHeading12 === void 0 || (_header$subHeading12 = _header$subHeading12.jsxConfig) === null || _header$subHeading12 === void 0 ? void 0 : _header$subHeading12.value
1413
+ }, (header === null || header === void 0 || (_header$subHeading21 = header.subHeading) === null || _header$subHeading21 === void 0 || (_header$subHeading21 = _header$subHeading21.jsxConfig) === null || _header$subHeading21 === void 0 ? void 0 : _header$subHeading21.type) == "select" ? {
1414
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading22 = header.subHeading) === null || _header$subHeading22 === void 0 || (_header$subHeading22 = _header$subHeading22.jsxConfig) === null || _header$subHeading22 === void 0 ? void 0 : _header$subHeading22.value
1324
1415
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data7 = staticFilter.data) === null || _staticFilter$data7 === void 0 || (_staticFilter$data7 = _staticFilter$data7.find(item => item.selected)) === null || _staticFilter$data7 === void 0 ? void 0 : _staticFilter$data7.value) && {
1325
1416
  staticFilter: staticFilter.data.find(item => item.selected).value
1326
1417
  }), {}, {
1327
1418
  order: tables === null || tables === void 0 || (_tables$sorting18 = tables.sorting) === null || _tables$sorting18 === void 0 ? void 0 : _tables$sorting18.sortDirection
1328
- }, (_state$misc11 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc11 !== void 0 ? _state$misc11 : {}));
1419
+ }, (_state$misc13 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc13 !== void 0 ? _state$misc13 : {}));
1329
1420
  if (error) {
1330
1421
  showErrorNotification(error);
1331
1422
  dispatch({
@@ -1372,8 +1463,8 @@ function GenricLayOut(_ref) {
1372
1463
  }
1373
1464
 
1374
1465
  // Only process filter data if this is actually a filter drawer
1375
- if (formData.drawerKey === "filterData") {
1376
- var _state$dropdownSearch7, _state$inputSearch7, _ref4, _appliedFilters$filte, _state$tabs14, _tables$pagination21, _tables$pagination22, _tables$filter8, _tables$sorting19, _header$subHeading13, _header$subHeading14, _staticFilter$data8, _tables$sorting20, _state$misc12;
1466
+ if (formData.type === "FILTER-SUBMIT") {
1467
+ var _state$dropdownSearch7, _state$inputSearch7, _ref4, _appliedFilters$filte, _state$tabs14, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data8, _tables$sorting20, _state$misc14;
1377
1468
  const appliedFilters = {};
1378
1469
  Object.keys(formData).forEach(key => {
1379
1470
  const value = formData[key];
@@ -1381,38 +1472,45 @@ function GenricLayOut(_ref) {
1381
1472
  appliedFilters[key] = value;
1382
1473
  }
1383
1474
  });
1475
+ if (isFiltersEmpty(appliedFilters)) {
1476
+ dispatch({
1477
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1478
+ });
1479
+ return;
1480
+ }
1384
1481
  const {
1385
1482
  error,
1386
1483
  data
1387
- } = await handleTableChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$dropdownSearch7 = state.dropdownSearch) === null || _state$dropdownSearch7 === void 0 || (_state$dropdownSearch7 = _state$dropdownSearch7.value) === null || _state$dropdownSearch7 === void 0 ? void 0 : _state$dropdownSearch7.trim()) && {
1484
+ } = await handleTableChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$dropdownSearch7 = state.dropdownSearch) === null || _state$dropdownSearch7 === void 0 || (_state$dropdownSearch7 = _state$dropdownSearch7.value) === null || _state$dropdownSearch7 === void 0 ? void 0 : _state$dropdownSearch7.trim()) && {
1388
1485
  searchedValue: state.dropdownSearch.value,
1389
1486
  selectedOption: state.dropdownSearch.selectedOption
1390
1487
  }), (state === null || state === void 0 || (_state$inputSearch7 = state.inputSearch) === null || _state$inputSearch7 === void 0 || (_state$inputSearch7 = _state$inputSearch7.value) === null || _state$inputSearch7 === void 0 ? void 0 : _state$inputSearch7.trim()) && {
1391
1488
  searchedValue: state.inputSearch.value
1392
- }), {}, {
1489
+ }), appliedFilters), {}, {
1393
1490
  filterOn: (_ref4 = (_appliedFilters$filte = appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.filterBy) !== null && _appliedFilters$filte !== void 0 ? _appliedFilters$filte : customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.defaultAppliedFilter) !== null && _ref4 !== void 0 ? _ref4 : "",
1394
1491
  fromDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.fromDate,
1395
1492
  toDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toDate,
1396
1493
  selectedTab: state === null || state === void 0 || (_state$tabs14 = state.tabs) === null || _state$tabs14 === void 0 ? void 0 : _state$tabs14.active,
1397
- current: tables === null || tables === void 0 || (_tables$pagination21 = tables.pagination) === null || _tables$pagination21 === void 0 ? void 0 : _tables$pagination21.current,
1398
- pageSize: tables === null || tables === void 0 || (_tables$pagination22 = tables.pagination) === null || _tables$pagination22 === void 0 ? void 0 : _tables$pagination22.pageSize
1494
+ current: config === null || config === void 0 || (_config$tables29 = config.tables) === null || _config$tables29 === void 0 || (_config$tables29 = _config$tables29.pagination) === null || _config$tables29 === void 0 ? void 0 : _config$tables29.current,
1495
+ pageSize: config === null || config === void 0 || (_config$tables30 = config.tables) === null || _config$tables30 === void 0 || (_config$tables30 = _config$tables30.pagination) === null || _config$tables30 === void 0 ? void 0 : _config$tables30.pageSize
1399
1496
  }, (tables === null || tables === void 0 || (_tables$filter8 = tables.filter) === null || _tables$filter8 === void 0 ? void 0 : _tables$filter8.key) && {
1400
1497
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1401
1498
  }), {}, {
1402
1499
  field: tables === null || tables === void 0 || (_tables$sorting19 = tables.sorting) === null || _tables$sorting19 === void 0 ? void 0 : _tables$sorting19.sortBy
1403
- }, (header === null || header === void 0 || (_header$subHeading13 = header.subHeading) === null || _header$subHeading13 === void 0 || (_header$subHeading13 = _header$subHeading13.jsxConfig) === null || _header$subHeading13 === void 0 ? void 0 : _header$subHeading13.type) == "select" ? {
1404
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading14 = header.subHeading) === null || _header$subHeading14 === void 0 || (_header$subHeading14 = _header$subHeading14.jsxConfig) === null || _header$subHeading14 === void 0 ? void 0 : _header$subHeading14.value
1500
+ }, (header === null || header === void 0 || (_header$subHeading23 = header.subHeading) === null || _header$subHeading23 === void 0 || (_header$subHeading23 = _header$subHeading23.jsxConfig) === null || _header$subHeading23 === void 0 ? void 0 : _header$subHeading23.type) == "select" ? {
1501
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading24 = header.subHeading) === null || _header$subHeading24 === void 0 || (_header$subHeading24 = _header$subHeading24.jsxConfig) === null || _header$subHeading24 === void 0 ? void 0 : _header$subHeading24.value
1405
1502
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data8 = staticFilter.data) === null || _staticFilter$data8 === void 0 || (_staticFilter$data8 = _staticFilter$data8.find(item => item.selected)) === null || _staticFilter$data8 === void 0 ? void 0 : _staticFilter$data8.value) && {
1406
1503
  staticFilter: staticFilter.data.find(item => item.selected).value
1407
1504
  }), {}, {
1408
1505
  order: tables === null || tables === void 0 || (_tables$sorting20 = tables.sorting) === null || _tables$sorting20 === void 0 ? void 0 : _tables$sorting20.sortDirection
1409
- }, (_state$misc12 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc12 !== void 0 ? _state$misc12 : {}));
1506
+ }, (_state$misc14 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc14 !== void 0 ? _state$misc14 : {}));
1410
1507
  if (error) {
1411
1508
  showErrorNotification(error);
1412
1509
  dispatch({
1413
1510
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
1414
1511
  });
1415
1512
  } else {
1513
+ var _config$tables31, _config$tables32;
1416
1514
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
1417
1515
  var _staticFilter$data$fi3, _config$staticFilter2;
1418
1516
  const selectedKey = staticFilter === null || staticFilter === void 0 || (_staticFilter$data$fi3 = staticFilter.data.find(item => item.selected)) === null || _staticFilter$data$fi3 === void 0 ? void 0 : _staticFilter$data$fi3.value;
@@ -1438,39 +1536,52 @@ function GenricLayOut(_ref) {
1438
1536
  type: _layoutReducer.actionTypes.UPDATE_FILTER_DEFAULT_VALUES,
1439
1537
  payload: formData
1440
1538
  });
1539
+ dispatch({
1540
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
1541
+ payload: {
1542
+ current: config === null || config === void 0 || (_config$tables31 = config.tables) === null || _config$tables31 === void 0 || (_config$tables31 = _config$tables31.pagination) === null || _config$tables31 === void 0 ? void 0 : _config$tables31.current,
1543
+ pageSize: config === null || config === void 0 || (_config$tables32 = config.tables) === null || _config$tables32 === void 0 || (_config$tables32 = _config$tables32.pagination) === null || _config$tables32 === void 0 ? void 0 : _config$tables32.pageSize
1544
+ }
1545
+ });
1441
1546
  dispatch({
1442
1547
  type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1443
1548
  });
1444
1549
  }
1445
1550
  } else if (formData.drawerKey === "exportDrawer") {
1446
- console.log(formData, "formData");
1551
+ const appliedFilters = {};
1552
+ Object.keys(formData).forEach(key => {
1553
+ const value = formData[key];
1554
+ if (value !== undefined && value !== "" && value !== null) {
1555
+ appliedFilters[key] = value;
1556
+ }
1557
+ });
1447
1558
  if (handleSecondaryTableCTAClick) {
1448
- var _state$dropdownSearch8, _state$inputSearch8, _state$tabs15, _tables$pagination23, _tables$pagination24, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading15, _header$subHeading16, _staticFilter$data9, _state$misc13;
1559
+ var _state$dropdownSearch8, _state$inputSearch8, _state$tabs15, _tables$pagination7, _tables$pagination8, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading25, _header$subHeading26, _staticFilter$data9, _state$misc15;
1449
1560
  const {
1450
1561
  error,
1451
1562
  data
1452
- } = await (handleSecondaryTableCTAClick === null || handleSecondaryTableCTAClick === void 0 ? void 0 : handleSecondaryTableCTAClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$dropdownSearch8 = state.dropdownSearch) === null || _state$dropdownSearch8 === void 0 || (_state$dropdownSearch8 = _state$dropdownSearch8.value) === null || _state$dropdownSearch8 === void 0 ? void 0 : _state$dropdownSearch8.trim()) && {
1563
+ } = await (handleSecondaryTableCTAClick === null || handleSecondaryTableCTAClick === void 0 ? void 0 : handleSecondaryTableCTAClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$dropdownSearch8 = state.dropdownSearch) === null || _state$dropdownSearch8 === void 0 || (_state$dropdownSearch8 = _state$dropdownSearch8.value) === null || _state$dropdownSearch8 === void 0 ? void 0 : _state$dropdownSearch8.trim()) && {
1453
1564
  searchedValue: state.dropdownSearch.value,
1454
1565
  selectedOption: state.dropdownSearch.selectedOption
1455
1566
  }), (state === null || state === void 0 || (_state$inputSearch8 = state.inputSearch) === null || _state$inputSearch8 === void 0 || (_state$inputSearch8 = _state$inputSearch8.value) === null || _state$inputSearch8 === void 0 ? void 0 : _state$inputSearch8.trim()) && {
1456
1567
  searchedValue: state.inputSearch.value
1457
1568
  }), {}, {
1458
1569
  selectedTab: state === null || state === void 0 || (_state$tabs15 = state.tabs) === null || _state$tabs15 === void 0 ? void 0 : _state$tabs15.active,
1459
- current: tables === null || tables === void 0 || (_tables$pagination23 = tables.pagination) === null || _tables$pagination23 === void 0 ? void 0 : _tables$pagination23.current,
1460
- pageSize: tables === null || tables === void 0 || (_tables$pagination24 = tables.pagination) === null || _tables$pagination24 === void 0 ? void 0 : _tables$pagination24.pageSize,
1570
+ current: tables === null || tables === void 0 || (_tables$pagination7 = tables.pagination) === null || _tables$pagination7 === void 0 ? void 0 : _tables$pagination7.current,
1571
+ pageSize: tables === null || tables === void 0 || (_tables$pagination8 = tables.pagination) === null || _tables$pagination8 === void 0 ? void 0 : _tables$pagination8.pageSize,
1461
1572
  columnFilterStatus: tables === null || tables === void 0 || (_tables$filter9 = tables.filter) === null || _tables$filter9 === void 0 ? void 0 : _tables$filter9.value,
1462
1573
  field: tables === null || tables === void 0 || (_tables$sorting21 = tables.sorting) === null || _tables$sorting21 === void 0 ? void 0 : _tables$sorting21.sortBy,
1463
1574
  order: tables === null || tables === void 0 || (_tables$sorting22 = tables.sorting) === null || _tables$sorting22 === void 0 ? void 0 : _tables$sorting22.sortDirection
1464
- }, (header === null || header === void 0 || (_header$subHeading15 = header.subHeading) === null || _header$subHeading15 === void 0 || (_header$subHeading15 = _header$subHeading15.jsxConfig) === null || _header$subHeading15 === void 0 ? void 0 : _header$subHeading15.type) == "select" ? {
1465
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading16 = header.subHeading) === null || _header$subHeading16 === void 0 || (_header$subHeading16 = _header$subHeading16.jsxConfig) === null || _header$subHeading16 === void 0 ? void 0 : _header$subHeading16.value
1575
+ }, (header === null || header === void 0 || (_header$subHeading25 = header.subHeading) === null || _header$subHeading25 === void 0 || (_header$subHeading25 = _header$subHeading25.jsxConfig) === null || _header$subHeading25 === void 0 ? void 0 : _header$subHeading25.type) == "select" ? {
1576
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading26 = header.subHeading) === null || _header$subHeading26 === void 0 || (_header$subHeading26 = _header$subHeading26.jsxConfig) === null || _header$subHeading26 === void 0 ? void 0 : _header$subHeading26.value
1466
1577
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data9 = staticFilter.data) === null || _staticFilter$data9 === void 0 || (_staticFilter$data9 = _staticFilter$data9.find(item => item.selected)) === null || _staticFilter$data9 === void 0 ? void 0 : _staticFilter$data9.value) && {
1467
1578
  staticFilter: staticFilter.data.find(item => item.selected).value
1468
1579
  }), {}, {
1469
1580
  fromDate: formData === null || formData === void 0 ? void 0 : formData.fromDate,
1470
1581
  toDate: formData === null || formData === void 0 ? void 0 : formData.toDate
1471
- }, (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
1582
+ }, appliedFilters), (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
1472
1583
  exportType: formData === null || formData === void 0 ? void 0 : formData.exportType
1473
- }), (_state$misc13 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc13 !== void 0 ? _state$misc13 : {})));
1584
+ }), (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {})));
1474
1585
  if (error) {
1475
1586
  showErrorNotification(error);
1476
1587
  } else {
@@ -1484,7 +1595,7 @@ function GenricLayOut(_ref) {
1484
1595
  }
1485
1596
  };
1486
1597
  const onClearAllAppliedFilters = async () => {
1487
- var _state$dropdownSearch9, _state$inputSearch9, _state$tabs16, _tables$pagination25, _tables$pagination26, _tables$filter10, _tables$sorting23, _header$subHeading17, _header$subHeading18, _staticFilter$data10, _tables$sorting24, _state$misc14;
1598
+ var _state$dropdownSearch9, _state$inputSearch9, _state$tabs16, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data10, _tables$sorting24, _state$misc16;
1488
1599
  const {
1489
1600
  error,
1490
1601
  data
@@ -1495,19 +1606,19 @@ function GenricLayOut(_ref) {
1495
1606
  searchedValue: state.inputSearch.value
1496
1607
  }), {}, {
1497
1608
  selectedTab: state === null || state === void 0 || (_state$tabs16 = state.tabs) === null || _state$tabs16 === void 0 ? void 0 : _state$tabs16.active,
1498
- current: tables === null || tables === void 0 || (_tables$pagination25 = tables.pagination) === null || _tables$pagination25 === void 0 ? void 0 : _tables$pagination25.current,
1499
- pageSize: tables === null || tables === void 0 || (_tables$pagination26 = tables.pagination) === null || _tables$pagination26 === void 0 ? void 0 : _tables$pagination26.pageSize
1609
+ current: tables === null || tables === void 0 || (_tables$pagination9 = tables.pagination) === null || _tables$pagination9 === void 0 ? void 0 : _tables$pagination9.current,
1610
+ pageSize: tables === null || tables === void 0 || (_tables$pagination10 = tables.pagination) === null || _tables$pagination10 === void 0 ? void 0 : _tables$pagination10.pageSize
1500
1611
  }, (tables === null || tables === void 0 || (_tables$filter10 = tables.filter) === null || _tables$filter10 === void 0 ? void 0 : _tables$filter10.key) && {
1501
1612
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1502
1613
  }), {}, {
1503
1614
  field: tables === null || tables === void 0 || (_tables$sorting23 = tables.sorting) === null || _tables$sorting23 === void 0 ? void 0 : _tables$sorting23.sortBy
1504
- }, (header === null || header === void 0 || (_header$subHeading17 = header.subHeading) === null || _header$subHeading17 === void 0 || (_header$subHeading17 = _header$subHeading17.jsxConfig) === null || _header$subHeading17 === void 0 ? void 0 : _header$subHeading17.type) == "select" ? {
1505
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading18 = header.subHeading) === null || _header$subHeading18 === void 0 || (_header$subHeading18 = _header$subHeading18.jsxConfig) === null || _header$subHeading18 === void 0 ? void 0 : _header$subHeading18.value
1615
+ }, (header === null || header === void 0 || (_header$subHeading27 = header.subHeading) === null || _header$subHeading27 === void 0 || (_header$subHeading27 = _header$subHeading27.jsxConfig) === null || _header$subHeading27 === void 0 ? void 0 : _header$subHeading27.type) == "select" ? {
1616
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading28 = header.subHeading) === null || _header$subHeading28 === void 0 || (_header$subHeading28 = _header$subHeading28.jsxConfig) === null || _header$subHeading28 === void 0 ? void 0 : _header$subHeading28.value
1506
1617
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data10 = staticFilter.data) === null || _staticFilter$data10 === void 0 || (_staticFilter$data10 = _staticFilter$data10.find(item => item.selected)) === null || _staticFilter$data10 === void 0 ? void 0 : _staticFilter$data10.value) && {
1507
1618
  staticFilter: staticFilter.data.find(item => item.selected).value
1508
1619
  }), {}, {
1509
1620
  order: tables === null || tables === void 0 || (_tables$sorting24 = tables.sorting) === null || _tables$sorting24 === void 0 ? void 0 : _tables$sorting24.sortDirection
1510
- }, (_state$misc14 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc14 !== void 0 ? _state$misc14 : {}));
1621
+ }, (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}));
1511
1622
  if (error) {
1512
1623
  showErrorNotification(error);
1513
1624
  dispatch({
@@ -1545,7 +1656,7 @@ function GenricLayOut(_ref) {
1545
1656
  * @returns {Promise<void>} - Resolves after the action is handled.
1546
1657
  *
1547
1658
  * Handles the modal footer button clicks with the following actions:
1548
- * - "CLOSE_MODAL_ONLEY": Closes the modal.
1659
+ * - "CLOSE_MODAL": Closes the modal.
1549
1660
  * - "CLOSE_MODAL_AND_FETCH": Calls the `handleModalCloseSuccess` function
1550
1661
  * if provided, and closes the modal if successful. Also re-initializes the
1551
1662
  * state.
@@ -1556,7 +1667,7 @@ function GenricLayOut(_ref) {
1556
1667
  */
1557
1668
 
1558
1669
  const onClickModalFooter = async (action, buttonConfig) => {
1559
- if (action === "CLOSE_MODAL_ONLEY") {
1670
+ if (action === "CLOSE_MODAL") {
1560
1671
  dispatch({
1561
1672
  type: _layoutReducer.actionTypes.TOGGLE_MODAL,
1562
1673
  payload: false
@@ -1564,14 +1675,14 @@ function GenricLayOut(_ref) {
1564
1675
  return;
1565
1676
  } else if (action === "CLOSE_MODAL_AND_FETCH") {
1566
1677
  if (handleModalCloseSuccess) {
1567
- var _stateRef$current, _state$misc15;
1678
+ var _stateRef$current, _state$misc17;
1568
1679
  const {
1569
1680
  error,
1570
1681
  data
1571
1682
  } = await (handleModalCloseSuccess === null || handleModalCloseSuccess === void 0 ? void 0 : handleModalCloseSuccess(_objectSpread({
1572
1683
  modalValue: stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.modal) === null || _stateRef$current === void 0 ? void 0 : _stateRef$current.value,
1573
1684
  call: buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.call
1574
- }, (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {})));
1685
+ }, (_state$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {})));
1575
1686
  if (error) {
1576
1687
  showErrorNotification(error);
1577
1688
  } else {
@@ -1585,10 +1696,10 @@ function GenricLayOut(_ref) {
1585
1696
  }
1586
1697
  } else {
1587
1698
  if (handleDrawerFormOnFinish) {
1588
- var _state$tables$selecte, _state$tables2;
1699
+ var _state$tables$selecte, _state$tables3;
1589
1700
  let req = {};
1590
1701
  req.type = "APPROVE";
1591
- req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$tables2 = state.tables) === null || _state$tables2 === void 0 || (_state$tables2 = _state$tables2.selectedRowKeys) === null || _state$tables2 === void 0 ? void 0 : _state$tables2.map(item => item.orderUUID)) !== null && _state$tables$selecte !== void 0 ? _state$tables$selecte : [];
1702
+ req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$tables3 = state.tables) === null || _state$tables3 === void 0 || (_state$tables3 = _state$tables3.selectedRowKeys) === null || _state$tables3 === void 0 ? void 0 : _state$tables3.map(item => item.orderUUID)) !== null && _state$tables$selecte !== void 0 ? _state$tables$selecte : [];
1592
1703
  const {
1593
1704
  error,
1594
1705
  data
@@ -1638,7 +1749,6 @@ function GenricLayOut(_ref) {
1638
1749
  * - "OPEN_MODAL": Opens a modal with updated content.
1639
1750
  */
1640
1751
  const leftHeaderFirstButtonClick = async () => {
1641
- console.log(leftHeaderFirstButton, "leftHeaderFirstButton");
1642
1752
  if ((leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 ? void 0 : leftHeaderFirstButton.action) === "OPEN_CUSTOM_DRAWER") {
1643
1753
  var _config$customDrawer3;
1644
1754
  const drawerData = config === null || config === void 0 || (_config$customDrawer3 = config.customDrawer) === null || _config$customDrawer3 === void 0 || (_config$customDrawer3 = _config$customDrawer3.data) === null || _config$customDrawer3 === void 0 ? void 0 : _config$customDrawer3[leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 ? void 0 : leftHeaderFirstButton.drawerKey];
@@ -1689,7 +1799,7 @@ function GenricLayOut(_ref) {
1689
1799
  };
1690
1800
  const rightHeaderSecondButtonClick = async () => {
1691
1801
  if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
1692
- var _state$dropdownSearch10, _state$inputSearch10, _state$tabs17, _tables$pagination27, _tables$pagination28, _tables$filter11, _tables$sorting25, _header$subHeading19, _header$subHeading20, _staticFilter$data11, _tables$sorting26, _state$misc16;
1802
+ var _state$dropdownSearch10, _state$inputSearch10, _state$tabs17, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data11, _tables$sorting26, _state$misc18;
1693
1803
  const {
1694
1804
  error,
1695
1805
  data
@@ -1700,19 +1810,19 @@ function GenricLayOut(_ref) {
1700
1810
  searchedValue: state.inputSearch.value
1701
1811
  }), {}, {
1702
1812
  selectedTab: state === null || state === void 0 || (_state$tabs17 = state.tabs) === null || _state$tabs17 === void 0 ? void 0 : _state$tabs17.active,
1703
- current: tables === null || tables === void 0 || (_tables$pagination27 = tables.pagination) === null || _tables$pagination27 === void 0 ? void 0 : _tables$pagination27.current,
1704
- pageSize: tables === null || tables === void 0 || (_tables$pagination28 = tables.pagination) === null || _tables$pagination28 === void 0 ? void 0 : _tables$pagination28.pageSize
1813
+ current: tables === null || tables === void 0 || (_tables$pagination11 = tables.pagination) === null || _tables$pagination11 === void 0 ? void 0 : _tables$pagination11.current,
1814
+ pageSize: tables === null || tables === void 0 || (_tables$pagination12 = tables.pagination) === null || _tables$pagination12 === void 0 ? void 0 : _tables$pagination12.pageSize
1705
1815
  }, (tables === null || tables === void 0 || (_tables$filter11 = tables.filter) === null || _tables$filter11 === void 0 ? void 0 : _tables$filter11.key) && {
1706
1816
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
1707
1817
  }), {}, {
1708
1818
  field: tables === null || tables === void 0 || (_tables$sorting25 = tables.sorting) === null || _tables$sorting25 === void 0 ? void 0 : _tables$sorting25.sortBy
1709
- }, (header === null || header === void 0 || (_header$subHeading19 = header.subHeading) === null || _header$subHeading19 === void 0 || (_header$subHeading19 = _header$subHeading19.jsxConfig) === null || _header$subHeading19 === void 0 ? void 0 : _header$subHeading19.type) == "select" ? {
1710
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading20 = header.subHeading) === null || _header$subHeading20 === void 0 || (_header$subHeading20 = _header$subHeading20.jsxConfig) === null || _header$subHeading20 === void 0 ? void 0 : _header$subHeading20.value
1819
+ }, (header === null || header === void 0 || (_header$subHeading29 = header.subHeading) === null || _header$subHeading29 === void 0 || (_header$subHeading29 = _header$subHeading29.jsxConfig) === null || _header$subHeading29 === void 0 ? void 0 : _header$subHeading29.type) == "select" ? {
1820
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading30 = header.subHeading) === null || _header$subHeading30 === void 0 || (_header$subHeading30 = _header$subHeading30.jsxConfig) === null || _header$subHeading30 === void 0 ? void 0 : _header$subHeading30.value
1711
1821
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data11 = staticFilter.data) === null || _staticFilter$data11 === void 0 || (_staticFilter$data11 = _staticFilter$data11.find(item => item.selected)) === null || _staticFilter$data11 === void 0 ? void 0 : _staticFilter$data11.value) && {
1712
1822
  staticFilter: staticFilter.data.find(item => item.selected).value
1713
1823
  }), {}, {
1714
1824
  order: tables === null || tables === void 0 || (_tables$sorting26 = tables.sorting) === null || _tables$sorting26 === void 0 ? void 0 : _tables$sorting26.sortDirection
1715
- }, (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}));
1825
+ }, (_state$misc18 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc18 !== void 0 ? _state$misc18 : {}));
1716
1826
  if (error) {
1717
1827
  showErrorNotification(error);
1718
1828
  dispatch({
@@ -1763,7 +1873,7 @@ function GenricLayOut(_ref) {
1763
1873
  };
1764
1874
  const handleSubHeadingSelect = async val => {
1765
1875
  if (val) {
1766
- var _tables$pagination29, _tables$pagination30, _state$misc17;
1876
+ var _state$tabs18, _tables$pagination13, _tables$pagination14, _state$misc19;
1767
1877
  dispatch({
1768
1878
  type: _layoutReducer.actionTypes.SET_SUBHEADING_SELECTED_CONFIG,
1769
1879
  payload: val
@@ -1772,11 +1882,12 @@ function GenricLayOut(_ref) {
1772
1882
  error,
1773
1883
  data
1774
1884
  } = await handleSubHeadingSelectClick(_objectSpread({
1885
+ selectedTab: state === null || state === void 0 || (_state$tabs18 = state.tabs) === null || _state$tabs18 === void 0 ? void 0 : _state$tabs18.active,
1775
1886
  searchedValue: inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.value,
1776
- current: tables === null || tables === void 0 || (_tables$pagination29 = tables.pagination) === null || _tables$pagination29 === void 0 ? void 0 : _tables$pagination29.current,
1777
- pageSize: tables === null || tables === void 0 || (_tables$pagination30 = tables.pagination) === null || _tables$pagination30 === void 0 ? void 0 : _tables$pagination30.pageSize,
1887
+ current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
1888
+ pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
1778
1889
  subHeadingSelectVal: val
1779
- }, (_state$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {}));
1890
+ }, (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {}));
1780
1891
  if (error) {
1781
1892
  showErrorNotification(error);
1782
1893
  dispatch({
@@ -1803,7 +1914,7 @@ function GenricLayOut(_ref) {
1803
1914
 
1804
1915
  // Call the handler if provided
1805
1916
  if (handleTableChange) {
1806
- var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination31, _tables$sorting27, _tables$sorting28, _header$subHeading21, _header$subHeading22, _customDrawer$applied10, _state$misc18;
1917
+ var _state$dropdownSearch11, _state$inputSearch11, _state$tabs19, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc20;
1807
1918
  dispatch({
1808
1919
  type: _layoutReducer.actionTypes.SET_LOADING,
1809
1920
  payload: true
@@ -1817,20 +1928,16 @@ function GenricLayOut(_ref) {
1817
1928
  }), (state === null || state === void 0 || (_state$inputSearch11 = state.inputSearch) === null || _state$inputSearch11 === void 0 || (_state$inputSearch11 = _state$inputSearch11.value) === null || _state$inputSearch11 === void 0 ? void 0 : _state$inputSearch11.trim()) && {
1818
1929
  searchedValue: state.inputSearch.value
1819
1930
  }), {}, {
1820
- selectedTab: state === null || state === void 0 || (_state$tabs18 = state.tabs) === null || _state$tabs18 === void 0 ? void 0 : _state$tabs18.active,
1931
+ selectedTab: state === null || state === void 0 || (_state$tabs19 = state.tabs) === null || _state$tabs19 === void 0 ? void 0 : _state$tabs19.active,
1821
1932
  current: 1,
1822
1933
  // Reset to first page when filtering
1823
- pageSize: tables === null || tables === void 0 || (_tables$pagination31 = tables.pagination) === null || _tables$pagination31 === void 0 ? void 0 : _tables$pagination31.pageSize,
1934
+ pageSize: tables === null || tables === void 0 || (_tables$pagination15 = tables.pagination) === null || _tables$pagination15 === void 0 ? void 0 : _tables$pagination15.pageSize,
1824
1935
  filterStatus: filterValue,
1825
1936
  field: tables === null || tables === void 0 || (_tables$sorting27 = tables.sorting) === null || _tables$sorting27 === void 0 ? void 0 : _tables$sorting27.sortBy,
1826
1937
  order: tables === null || tables === void 0 || (_tables$sorting28 = tables.sorting) === null || _tables$sorting28 === void 0 ? void 0 : _tables$sorting28.sortDirection
1827
- }, (header === null || header === void 0 || (_header$subHeading21 = header.subHeading) === null || _header$subHeading21 === void 0 || (_header$subHeading21 = _header$subHeading21.jsxConfig) === null || _header$subHeading21 === void 0 ? void 0 : _header$subHeading21.type) == "select" ? {
1828
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading22 = header.subHeading) === null || _header$subHeading22 === void 0 || (_header$subHeading22 = _header$subHeading22.jsxConfig) === null || _header$subHeading22 === void 0 ? void 0 : _header$subHeading22.value
1829
- } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied10 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied10 !== void 0 ? _customDrawer$applied10 : {}).length > 0 && {
1830
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
1831
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
1832
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
1833
- }), (_state$misc18 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc18 !== void 0 ? _state$misc18 : {}), {}, {
1938
+ }, (header === null || header === void 0 || (_header$subHeading31 = header.subHeading) === null || _header$subHeading31 === void 0 || (_header$subHeading31 = _header$subHeading31.jsxConfig) === null || _header$subHeading31 === void 0 ? void 0 : _header$subHeading31.type) == "select" ? {
1939
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading32 = header.subHeading) === null || _header$subHeading32 === void 0 || (_header$subHeading32 = _header$subHeading32.jsxConfig) === null || _header$subHeading32 === void 0 ? void 0 : _header$subHeading32.value
1940
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied10 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied10 !== void 0 ? _customDrawer$applied10 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc20 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc20 !== void 0 ? _state$misc20 : {}), {}, {
1834
1941
  staticFilter: filterValue // Pass static filter value
1835
1942
  }));
1836
1943
  if (error) {
@@ -1839,7 +1946,7 @@ function GenricLayOut(_ref) {
1839
1946
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
1840
1947
  });
1841
1948
  } else {
1842
- var _tables$pagination32;
1949
+ var _tables$pagination16;
1843
1950
  dispatch({
1844
1951
  type: _layoutReducer.actionTypes.SET_TABLE_DATA,
1845
1952
  payload: data
@@ -1849,7 +1956,7 @@ function GenricLayOut(_ref) {
1849
1956
  type: _layoutReducer.actionTypes.SET_PAGINATION,
1850
1957
  payload: {
1851
1958
  current: 1,
1852
- pageSize: tables === null || tables === void 0 || (_tables$pagination32 = tables.pagination) === null || _tables$pagination32 === void 0 ? void 0 : _tables$pagination32.pageSize
1959
+ pageSize: tables === null || tables === void 0 || (_tables$pagination16 = tables.pagination) === null || _tables$pagination16 === void 0 ? void 0 : _tables$pagination16.pageSize
1853
1960
  }
1854
1961
  });
1855
1962
  }
@@ -1872,7 +1979,7 @@ function GenricLayOut(_ref) {
1872
1979
  }
1873
1980
  });
1874
1981
  if (handleTableChange) {
1875
- var _state$dropdownSearch12, _state$inputSearch12, _state$tabs19, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading23, _header$subHeading24, _staticFilter$data12, _customDrawer$applied11, _state$misc19;
1982
+ var _state$dropdownSearch12, _state$inputSearch12, _state$tabs20, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data12, _customDrawer$applied11, _state$misc21;
1876
1983
  const {
1877
1984
  error,
1878
1985
  data
@@ -1882,21 +1989,17 @@ function GenricLayOut(_ref) {
1882
1989
  }), (state === null || state === void 0 || (_state$inputSearch12 = state.inputSearch) === null || _state$inputSearch12 === void 0 || (_state$inputSearch12 = _state$inputSearch12.value) === null || _state$inputSearch12 === void 0 ? void 0 : _state$inputSearch12.trim()) && {
1883
1990
  searchedValue: state.inputSearch.value
1884
1991
  }), {}, {
1885
- selectedTab: state === null || state === void 0 || (_state$tabs19 = state.tabs) === null || _state$tabs19 === void 0 ? void 0 : _state$tabs19.active,
1992
+ selectedTab: state === null || state === void 0 || (_state$tabs20 = state.tabs) === null || _state$tabs20 === void 0 ? void 0 : _state$tabs20.active,
1886
1993
  current,
1887
1994
  pageSize,
1888
1995
  columnFilterStatus: tables === null || tables === void 0 || (_tables$filter12 = tables.filter) === null || _tables$filter12 === void 0 ? void 0 : _tables$filter12.value,
1889
1996
  field: tables === null || tables === void 0 || (_tables$sorting29 = tables.sorting) === null || _tables$sorting29 === void 0 ? void 0 : _tables$sorting29.sortBy,
1890
1997
  order: tables === null || tables === void 0 || (_tables$sorting30 = tables.sorting) === null || _tables$sorting30 === void 0 ? void 0 : _tables$sorting30.sortDirection
1891
- }, (header === null || header === void 0 || (_header$subHeading23 = header.subHeading) === null || _header$subHeading23 === void 0 || (_header$subHeading23 = _header$subHeading23.jsxConfig) === null || _header$subHeading23 === void 0 ? void 0 : _header$subHeading23.type) == "select" ? {
1892
- subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading24 = header.subHeading) === null || _header$subHeading24 === void 0 || (_header$subHeading24 = _header$subHeading24.jsxConfig) === null || _header$subHeading24 === void 0 ? void 0 : _header$subHeading24.value
1998
+ }, (header === null || header === void 0 || (_header$subHeading33 = header.subHeading) === null || _header$subHeading33 === void 0 || (_header$subHeading33 = _header$subHeading33.jsxConfig) === null || _header$subHeading33 === void 0 ? void 0 : _header$subHeading33.type) == "select" ? {
1999
+ subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading34 = header.subHeading) === null || _header$subHeading34 === void 0 || (_header$subHeading34 = _header$subHeading34.jsxConfig) === null || _header$subHeading34 === void 0 ? void 0 : _header$subHeading34.value
1893
2000
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data12 = staticFilter.data) === null || _staticFilter$data12 === void 0 || (_staticFilter$data12 = _staticFilter$data12.find(item => item.selected)) === null || _staticFilter$data12 === void 0 ? void 0 : _staticFilter$data12.value) && {
1894
2001
  staticFilter: staticFilter.data.find(item => item.selected).value
1895
- }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied11 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied11 !== void 0 ? _customDrawer$applied11 : {}).length > 0 && {
1896
- filterOn: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.filterBy,
1897
- fromDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.fromDate,
1898
- toDate: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters.toDate
1899
- }), (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {}));
2002
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied11 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied11 !== void 0 ? _customDrawer$applied11 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc21 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc21 !== void 0 ? _state$misc21 : {}));
1900
2003
  if (error) {
1901
2004
  showErrorNotification(error);
1902
2005
  dispatch({
@@ -1913,9 +2016,18 @@ function GenricLayOut(_ref) {
1913
2016
  }
1914
2017
  }
1915
2018
  };
2019
+ function isFiltersEmpty() {
2020
+ let filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2021
+ const filtersKeyLength = Object.keys(filters).length;
2022
+ if (filtersKeyLength === 0) return true;
2023
+ if (filtersKeyLength === 2) {
2024
+ return (filters === null || filters === void 0 ? void 0 : filters.drawerKey) && (filters === null || filters === void 0 ? void 0 : filters.type);
2025
+ }
2026
+ return false;
2027
+ }
1916
2028
  console.log(state, "GenricLayOutstate");
1917
2029
  return /*#__PURE__*/_react.default.createElement(_styles.OapageWithDataStyle, {
1918
- className: (state === null || state === void 0 || (_state$misc20 = state.misc) === null || _state$misc20 === void 0 ? void 0 : _state$misc20.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2030
+ className: (state === null || state === void 0 || (_state$misc22 = state.misc) === null || _state$misc22 === void 0 ? void 0 : _state$misc22.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
1919
2031
  }, /*#__PURE__*/_react.default.createElement(_styles.DrawerWithOutFooter, null), /*#__PURE__*/_react.default.createElement("div", {
1920
2032
  className: "fullPageLayout"
1921
2033
  }, /*#__PURE__*/_react.default.createElement(_GlobalCss.default, null, (sidebar === null || sidebar === void 0 ? void 0 : sidebar.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
@@ -2008,7 +2120,7 @@ function GenricLayOut(_ref) {
2008
2120
  }),
2009
2121
  position: "left"
2010
2122
  })
2011
- }), Object.keys((_customDrawer$applied12 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied12 !== void 0 ? _customDrawer$applied12 : {}).length > 0 && /*#__PURE__*/_react.default.createElement("span", {
2123
+ }), !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && /*#__PURE__*/_react.default.createElement("span", {
2012
2124
  className: "notifyDot"
2013
2125
  })))))), (inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2014
2126
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
@@ -2073,7 +2185,7 @@ function GenricLayOut(_ref) {
2073
2185
  onChange: onTableChange,
2074
2186
  customTableChange: customTableChange,
2075
2187
  pagination: tables === null || tables === void 0 ? void 0 : tables.pagination,
2076
- selectedRows: (state === null || state === void 0 || (_state$tables3 = state.tables) === null || _state$tables3 === void 0 ? void 0 : _state$tables3.selectedRowKeys) || [],
2188
+ selectedRows: (state === null || state === void 0 || (_state$tables4 = state.tables) === null || _state$tables4 === void 0 ? void 0 : _state$tables4.selectedRowKeys) || [],
2077
2189
  rowSelection: (tables === null || tables === void 0 || (_tables$selectionType = tables.selectionType) === null || _tables$selectionType === void 0 ? void 0 : _tables$selectionType[(_tabs$active4 = tabs === null || tabs === void 0 ? void 0 : tabs.active) !== null && _tabs$active4 !== void 0 ? _tabs$active4 : "default"]) && Object.assign({
2078
2190
  type: tables === null || tables === void 0 || (_tables$selectionType2 = tables.selectionType) === null || _tables$selectionType2 === void 0 ? void 0 : _tables$selectionType2[tabs === null || tabs === void 0 ? void 0 : tabs.active]
2079
2191
  }, rowSelection),
@@ -2081,7 +2193,7 @@ function GenricLayOut(_ref) {
2081
2193
  emptyText: emptyTableState
2082
2194
  },
2083
2195
  emptyStateCard: emptyTableState,
2084
- onMobilePageChange: tables !== null && tables !== void 0 && (_tables$pagination33 = tables.pagination) !== null && _tables$pagination33 !== void 0 && _tables$pagination33.mwebPagination ? onMobilePageChange : undefined
2196
+ onMobilePageChange: tables !== null && tables !== void 0 && (_tables$pagination17 = tables.pagination) !== null && _tables$pagination17 !== void 0 && _tables$pagination17.mwebPagination ? onMobilePageChange : undefined
2085
2197
  })))), (drawer === null || drawer === void 0 ? void 0 : drawer.visible) && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
2086
2198
  className: "oaDrawer",
2087
2199
  title: drawer === null || drawer === void 0 || (_drawer$data = drawer.data) === null || _drawer$data === void 0 || (_drawer$data = _drawer$data[(_tabs$active5 = tabs === null || tabs === void 0 ? void 0 : tabs.active) !== null && _tabs$active5 !== void 0 ? _tabs$active5 : "default"]) === null || _drawer$data === void 0 || (_drawer$data = _drawer$data[drawer === null || drawer === void 0 ? void 0 : drawer.active]) === null || _drawer$data === void 0 ? void 0 : _drawer$data.title,
@@ -2139,7 +2251,7 @@ function GenricLayOut(_ref) {
2139
2251
  className: "bottomSelectedSecion"
2140
2252
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
2141
2253
  color: "secondary-content",
2142
- typography: "ype-button-500"
2254
+ typography: "type-button-500"
2143
2255
  }, /*#__PURE__*/_react.default.createElement("span", null, "".concat(tables === null || tables === void 0 || (_tables$selectedRowKe = tables.selectedRowKeys) === null || _tables$selectedRowKe === void 0 ? void 0 : _tables$selectedRowKe.length, " ").concat(tables === null || tables === void 0 || (_tables$tableFooter2 = tables.tableFooter) === null || _tables$tableFooter2 === void 0 ? void 0 : _tables$tableFooter2.text))), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
2144
2256
  type: tables === null || tables === void 0 || (_tables$tableFooter3 = tables.tableFooter) === null || _tables$tableFooter3 === void 0 || (_tables$tableFooter3 = _tables$tableFooter3.jsxConfig) === null || _tables$tableFooter3 === void 0 ? void 0 : _tables$tableFooter3.buttonType,
2145
2257
  onClick: () => {