oa-componentbook 1.0.1-stage.359 → 1.0.1-stage.360
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 _state$misc22, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$
|
|
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,7 +76,8 @@ 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);
|
|
@@ -244,7 +245,7 @@ function GenricLayOut(_ref) {
|
|
|
244
245
|
});
|
|
245
246
|
if (value === "") {
|
|
246
247
|
if (handleInputSearchChange) {
|
|
247
|
-
var _state$inputSearch, _state$tabs2, _customDrawer$applied,
|
|
248
|
+
var _state$inputSearch, _state$tabs2, _customDrawer$applied, _config$tables, _config$tables2, _tables$sorting, _tables$sorting2, _header$subHeading, _header$subHeading2;
|
|
248
249
|
dispatch({
|
|
249
250
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
250
251
|
payload: true
|
|
@@ -255,8 +256,8 @@ function GenricLayOut(_ref) {
|
|
|
255
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 ? {
|
|
256
257
|
selectedTab: state.tabs.active
|
|
257
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)), {}, {
|
|
258
|
-
current: tables === null || tables === void 0 || (
|
|
259
|
-
pageSize:
|
|
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,
|
|
260
261
|
field: tables === null || tables === void 0 || (_tables$sorting = tables.sorting) === null || _tables$sorting === void 0 ? void 0 : _tables$sorting.sortBy,
|
|
261
262
|
order: tables === null || tables === void 0 || (_tables$sorting2 = tables.sorting) === null || _tables$sorting2 === void 0 ? void 0 : _tables$sorting2.sortDirection
|
|
262
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" ? {
|
|
@@ -268,6 +269,7 @@ function GenricLayOut(_ref) {
|
|
|
268
269
|
type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
|
|
269
270
|
});
|
|
270
271
|
} else {
|
|
272
|
+
var _config$tables3, _config$tables4;
|
|
271
273
|
if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
|
|
272
274
|
setStaticFilterData(data);
|
|
273
275
|
}
|
|
@@ -275,6 +277,13 @@ function GenricLayOut(_ref) {
|
|
|
275
277
|
type: _layoutReducer.actionTypes.SET_TABLE_DATA,
|
|
276
278
|
payload: data
|
|
277
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
|
+
});
|
|
278
287
|
}
|
|
279
288
|
dispatch({
|
|
280
289
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
@@ -314,7 +323,7 @@ function GenricLayOut(_ref) {
|
|
|
314
323
|
payload: trimedValue
|
|
315
324
|
});
|
|
316
325
|
if (handleInputSearchEnter) {
|
|
317
|
-
var _state$tabs3,
|
|
326
|
+
var _state$tabs3, _config$tables5, _config$tables6, _tables$sorting3, _tables$sorting4, _customDrawer$applied2, _header$subHeading3, _header$subHeading4;
|
|
318
327
|
const {
|
|
319
328
|
error,
|
|
320
329
|
data
|
|
@@ -322,8 +331,8 @@ function GenricLayOut(_ref) {
|
|
|
322
331
|
selectedTab: state.tabs.active
|
|
323
332
|
} : {}), {}, {
|
|
324
333
|
searchedValue: trimedValue,
|
|
325
|
-
current:
|
|
326
|
-
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,
|
|
327
336
|
field: tables === null || tables === void 0 || (_tables$sorting3 = tables.sorting) === null || _tables$sorting3 === void 0 ? void 0 : _tables$sorting3.sortBy,
|
|
328
337
|
order: tables === null || tables === void 0 || (_tables$sorting4 = tables.sorting) === null || _tables$sorting4 === void 0 ? void 0 : _tables$sorting4.sortDirection
|
|
329
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 ? {
|
|
@@ -337,6 +346,7 @@ function GenricLayOut(_ref) {
|
|
|
337
346
|
type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
|
|
338
347
|
});
|
|
339
348
|
} else {
|
|
349
|
+
var _config$tables7, _config$tables8;
|
|
340
350
|
if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
|
|
341
351
|
setStaticFilterData(data);
|
|
342
352
|
}
|
|
@@ -344,6 +354,13 @@ function GenricLayOut(_ref) {
|
|
|
344
354
|
type: _layoutReducer.actionTypes.SET_TABLE_DATA,
|
|
345
355
|
payload: data
|
|
346
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
|
+
});
|
|
347
364
|
}
|
|
348
365
|
}
|
|
349
366
|
};
|
|
@@ -373,7 +390,7 @@ function GenricLayOut(_ref) {
|
|
|
373
390
|
});
|
|
374
391
|
if (value === "") {
|
|
375
392
|
if (handleDropdownSearchInputChange) {
|
|
376
|
-
var _state$tabs4,
|
|
393
|
+
var _state$tabs4, _config$tables9, _config$tables10, _tables$sorting5, _tables$sorting6, _tables$filter, _staticFilter$data, _customDrawer$applied3, _header$subHeading5, _header$subHeading6, _state$misc2;
|
|
377
394
|
dispatch({
|
|
378
395
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
379
396
|
payload: true
|
|
@@ -383,8 +400,8 @@ function GenricLayOut(_ref) {
|
|
|
383
400
|
data
|
|
384
401
|
} = await handleDropdownSearchInputChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
385
402
|
selectedTab: state === null || state === void 0 || (_state$tabs4 = state.tabs) === null || _state$tabs4 === void 0 ? void 0 : _state$tabs4.active,
|
|
386
|
-
current:
|
|
387
|
-
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,
|
|
388
405
|
field: tables === null || tables === void 0 || (_tables$sorting5 = tables.sorting) === null || _tables$sorting5 === void 0 ? void 0 : _tables$sorting5.sortBy,
|
|
389
406
|
order: tables === null || tables === void 0 || (_tables$sorting6 = tables.sorting) === null || _tables$sorting6 === void 0 ? void 0 : _tables$sorting6.sortDirection
|
|
390
407
|
}, (tables === null || tables === void 0 || (_tables$filter = tables.filter) === null || _tables$filter === void 0 ? void 0 : _tables$filter.key) && {
|
|
@@ -400,6 +417,7 @@ function GenricLayOut(_ref) {
|
|
|
400
417
|
type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
|
|
401
418
|
});
|
|
402
419
|
} else {
|
|
420
|
+
var _config$tables11, _config$tables12;
|
|
403
421
|
if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
|
|
404
422
|
setStaticFilterData(data);
|
|
405
423
|
}
|
|
@@ -407,6 +425,13 @@ function GenricLayOut(_ref) {
|
|
|
407
425
|
type: _layoutReducer.actionTypes.SET_TABLE_DATA,
|
|
408
426
|
payload: data
|
|
409
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
|
+
});
|
|
410
435
|
}
|
|
411
436
|
dispatch({
|
|
412
437
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
@@ -455,7 +480,7 @@ function GenricLayOut(_ref) {
|
|
|
455
480
|
payload: value
|
|
456
481
|
});
|
|
457
482
|
if (handleDropdownSearchEnter) {
|
|
458
|
-
var _state$tabs5,
|
|
483
|
+
var _state$tabs5, _config$tables13, _config$tables14, _tables$sorting7, _tables$sorting8, _tables$filter2, _staticFilter$data2, _customDrawer$applied4, _header$subHeading7, _header$subHeading8, _state$misc3;
|
|
459
484
|
const {
|
|
460
485
|
error,
|
|
461
486
|
data
|
|
@@ -463,8 +488,8 @@ function GenricLayOut(_ref) {
|
|
|
463
488
|
searchedValue: value,
|
|
464
489
|
selectedTab: state === null || state === void 0 || (_state$tabs5 = state.tabs) === null || _state$tabs5 === void 0 ? void 0 : _state$tabs5.active,
|
|
465
490
|
selectedOption: state === null || state === void 0 ? void 0 : state.dropdownSearch.selectedOption,
|
|
466
|
-
current:
|
|
467
|
-
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,
|
|
468
493
|
field: tables === null || tables === void 0 || (_tables$sorting7 = tables.sorting) === null || _tables$sorting7 === void 0 ? void 0 : _tables$sorting7.sortBy,
|
|
469
494
|
order: tables === null || tables === void 0 || (_tables$sorting8 = tables.sorting) === null || _tables$sorting8 === void 0 ? void 0 : _tables$sorting8.sortDirection
|
|
470
495
|
}, (tables === null || tables === void 0 || (_tables$filter2 = tables.filter) === null || _tables$filter2 === void 0 ? void 0 : _tables$filter2.key) && {
|
|
@@ -480,6 +505,7 @@ function GenricLayOut(_ref) {
|
|
|
480
505
|
type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
|
|
481
506
|
});
|
|
482
507
|
} else {
|
|
508
|
+
var _config$tables15, _config$tables16;
|
|
483
509
|
if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
|
|
484
510
|
setStaticFilterData(data);
|
|
485
511
|
}
|
|
@@ -487,6 +513,13 @@ function GenricLayOut(_ref) {
|
|
|
487
513
|
type: _layoutReducer.actionTypes.SET_TABLE_DATA,
|
|
488
514
|
payload: data
|
|
489
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
|
+
});
|
|
490
523
|
}
|
|
491
524
|
}
|
|
492
525
|
};
|
|
@@ -509,7 +542,7 @@ function GenricLayOut(_ref) {
|
|
|
509
542
|
payload: option === null || option === void 0 ? void 0 : option.value
|
|
510
543
|
});
|
|
511
544
|
if (handleDropdownSearchOptionChange) {
|
|
512
|
-
var
|
|
545
|
+
var _config$tables17, _config$tables18, _staticFilter$data3, _customDrawer$applied5, _header$subHeading9, _header$subHeading10, _state$misc4;
|
|
513
546
|
dispatch({
|
|
514
547
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
515
548
|
payload: true
|
|
@@ -519,8 +552,8 @@ function GenricLayOut(_ref) {
|
|
|
519
552
|
data
|
|
520
553
|
} = await handleDropdownSearchOptionChange(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
521
554
|
selectedTab: tabs === null || tabs === void 0 ? void 0 : tabs.active,
|
|
522
|
-
current:
|
|
523
|
-
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
|
|
524
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) && {
|
|
525
558
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
526
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" ? {
|
|
@@ -532,6 +565,7 @@ function GenricLayOut(_ref) {
|
|
|
532
565
|
type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
|
|
533
566
|
});
|
|
534
567
|
} else {
|
|
568
|
+
var _config$tables19, _config$tables20;
|
|
535
569
|
if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
|
|
536
570
|
setStaticFilterData(data);
|
|
537
571
|
}
|
|
@@ -539,6 +573,13 @@ function GenricLayOut(_ref) {
|
|
|
539
573
|
type: _layoutReducer.actionTypes.SET_TABLE_DATA,
|
|
540
574
|
payload: data
|
|
541
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
|
+
});
|
|
542
583
|
if (config !== null && config !== void 0 && config.tabs) {
|
|
543
584
|
dispatch({
|
|
544
585
|
type: _layoutReducer.actionTypes.TAB_CLICK,
|
|
@@ -617,14 +658,14 @@ function GenricLayOut(_ref) {
|
|
|
617
658
|
payload: null
|
|
618
659
|
});
|
|
619
660
|
if (handleDropdownSearchClear) {
|
|
620
|
-
var _state$tabs6,
|
|
661
|
+
var _state$tabs6, _config$tables21, _config$tables22, _tables$sorting9, _tables$sorting10, _tables$filter3, _staticFilter$data4, _customDrawer$applied6, _header$subHeading11, _header$subHeading12, _state$misc5;
|
|
621
662
|
const {
|
|
622
663
|
error,
|
|
623
664
|
data
|
|
624
665
|
} = await handleDropdownSearchClear(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
625
666
|
selectedTab: state === null || state === void 0 || (_state$tabs6 = state.tabs) === null || _state$tabs6 === void 0 ? void 0 : _state$tabs6.active,
|
|
626
|
-
current:
|
|
627
|
-
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,
|
|
628
669
|
field: tables === null || tables === void 0 || (_tables$sorting9 = tables.sorting) === null || _tables$sorting9 === void 0 ? void 0 : _tables$sorting9.sortBy,
|
|
629
670
|
order: tables === null || tables === void 0 || (_tables$sorting10 = tables.sorting) === null || _tables$sorting10 === void 0 ? void 0 : _tables$sorting10.sortDirection
|
|
630
671
|
}, (tables === null || tables === void 0 || (_tables$filter3 = tables.filter) === null || _tables$filter3 === void 0 ? void 0 : _tables$filter3.key) && {
|
|
@@ -640,6 +681,7 @@ function GenricLayOut(_ref) {
|
|
|
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,15 +720,15 @@ function GenricLayOut(_ref) {
|
|
|
671
720
|
payload: null
|
|
672
721
|
});
|
|
673
722
|
if (handleInputSearchClear) {
|
|
674
|
-
var _state$tabs7,
|
|
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
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:
|
|
682
|
-
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
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" ? {
|
|
@@ -691,6 +740,7 @@ function GenricLayOut(_ref) {
|
|
|
691
740
|
type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
|
|
692
741
|
});
|
|
693
742
|
} else {
|
|
743
|
+
var _config$tables27, _config$tables28;
|
|
694
744
|
if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
|
|
695
745
|
setStaticFilterData(data);
|
|
696
746
|
}
|
|
@@ -698,6 +748,13 @@ function GenricLayOut(_ref) {
|
|
|
698
748
|
type: _layoutReducer.actionTypes.SET_TABLE_DATA,
|
|
699
749
|
payload: data
|
|
700
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
|
+
});
|
|
701
758
|
}
|
|
702
759
|
}
|
|
703
760
|
};
|
|
@@ -896,11 +953,10 @@ function GenricLayOut(_ref) {
|
|
|
896
953
|
}
|
|
897
954
|
} else if ((configData === null || configData === void 0 ? void 0 : configData.action) === "CALL_API") {
|
|
898
955
|
if (handleTableFooterApi) {
|
|
899
|
-
var _handleTableFooterApi;
|
|
900
956
|
const {
|
|
901
957
|
error,
|
|
902
958
|
data
|
|
903
|
-
} = await (
|
|
959
|
+
} = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state));
|
|
904
960
|
if (error) {
|
|
905
961
|
showErrorNotification(error);
|
|
906
962
|
} else {
|
|
@@ -917,6 +973,22 @@ function GenricLayOut(_ref) {
|
|
|
917
973
|
});
|
|
918
974
|
}
|
|
919
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
|
+
}
|
|
920
992
|
}
|
|
921
993
|
};
|
|
922
994
|
|
|
@@ -1113,7 +1185,7 @@ function GenricLayOut(_ref) {
|
|
|
1113
1185
|
});
|
|
1114
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;
|
|
1115
1187
|
if (handleTabClick) {
|
|
1116
|
-
var _state$misc9, _tables$
|
|
1188
|
+
var _state$misc9, _tables$pagination, _tables$pagination2, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _header$subHeading17, _header$subHeading18, _customDrawer$applied9, _state$misc10;
|
|
1117
1189
|
dispatch({
|
|
1118
1190
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
1119
1191
|
payload: true
|
|
@@ -1123,8 +1195,8 @@ function GenricLayOut(_ref) {
|
|
|
1123
1195
|
data
|
|
1124
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 : {}), {}, {
|
|
1125
1197
|
selectedTab: key,
|
|
1126
|
-
current: tables === null || tables === void 0 || (_tables$
|
|
1127
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
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,
|
|
1128
1200
|
field: tables === null || tables === void 0 || (_tables$sorting13 = tables.sorting) === null || _tables$sorting13 === void 0 ? void 0 : _tables$sorting13.sortBy
|
|
1129
1201
|
}, selectedStaticFilterValue && {
|
|
1130
1202
|
staticFilter: selectedStaticFilterValue
|
|
@@ -1257,7 +1329,7 @@ function GenricLayOut(_ref) {
|
|
|
1257
1329
|
|
|
1258
1330
|
// If there are remaining filters, reapply them
|
|
1259
1331
|
if (Object.keys(currentFilters).length > 0) {
|
|
1260
|
-
var _state$dropdownSearch5, _state$inputSearch5, _state$tabs12, _tables$
|
|
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;
|
|
1261
1333
|
const {
|
|
1262
1334
|
error,
|
|
1263
1335
|
data
|
|
@@ -1271,8 +1343,8 @@ function GenricLayOut(_ref) {
|
|
|
1271
1343
|
fromDate: currentFilters === null || currentFilters === void 0 ? void 0 : currentFilters.fromDate,
|
|
1272
1344
|
toDate: currentFilters === null || currentFilters === void 0 ? void 0 : currentFilters.toDate,
|
|
1273
1345
|
selectedTab: state === null || state === void 0 || (_state$tabs12 = state.tabs) === null || _state$tabs12 === void 0 ? void 0 : _state$tabs12.active,
|
|
1274
|
-
current: tables === null || tables === void 0 || (_tables$
|
|
1275
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
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
|
|
1276
1348
|
}, (tables === null || tables === void 0 || (_tables$filter6 = tables.filter) === null || _tables$filter6 === void 0 ? void 0 : _tables$filter6.key) && {
|
|
1277
1349
|
columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
|
|
1278
1350
|
}), {}, {
|
|
@@ -1315,7 +1387,7 @@ function GenricLayOut(_ref) {
|
|
|
1315
1387
|
const filterFormOnFinish = async formData => {
|
|
1316
1388
|
// Check if this is a cancel/clear action - check both buttonClickType and the actual button data
|
|
1317
1389
|
if (formData.type === "FILTER-CANCEL") {
|
|
1318
|
-
var _state$dropdownSearch6, _state$inputSearch6, _state$tabs13, _tables$
|
|
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;
|
|
1319
1391
|
if (isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)) {
|
|
1320
1392
|
dispatch({
|
|
1321
1393
|
type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
|
|
@@ -1332,8 +1404,8 @@ function GenricLayOut(_ref) {
|
|
|
1332
1404
|
searchedValue: state.inputSearch.value
|
|
1333
1405
|
}), {}, {
|
|
1334
1406
|
selectedTab: state === null || state === void 0 || (_state$tabs13 = state.tabs) === null || _state$tabs13 === void 0 ? void 0 : _state$tabs13.active,
|
|
1335
|
-
current: tables === null || tables === void 0 || (_tables$
|
|
1336
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
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
|
|
1337
1409
|
}, (tables === null || tables === void 0 || (_tables$filter7 = tables.filter) === null || _tables$filter7 === void 0 ? void 0 : _tables$filter7.key) && {
|
|
1338
1410
|
columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
|
|
1339
1411
|
}), {}, {
|
|
@@ -1392,7 +1464,7 @@ function GenricLayOut(_ref) {
|
|
|
1392
1464
|
|
|
1393
1465
|
// Only process filter data if this is actually a filter drawer
|
|
1394
1466
|
if (formData.type === "FILTER-SUBMIT") {
|
|
1395
|
-
var _state$dropdownSearch7, _state$inputSearch7, _ref4, _appliedFilters$filte, _state$tabs14, _config$
|
|
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;
|
|
1396
1468
|
const appliedFilters = {};
|
|
1397
1469
|
Object.keys(formData).forEach(key => {
|
|
1398
1470
|
const value = formData[key];
|
|
@@ -1419,8 +1491,8 @@ function GenricLayOut(_ref) {
|
|
|
1419
1491
|
fromDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.fromDate,
|
|
1420
1492
|
toDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toDate,
|
|
1421
1493
|
selectedTab: state === null || state === void 0 || (_state$tabs14 = state.tabs) === null || _state$tabs14 === void 0 ? void 0 : _state$tabs14.active,
|
|
1422
|
-
current: config === null || config === void 0 || (_config$
|
|
1423
|
-
pageSize: config === null || config === void 0 || (_config$
|
|
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
|
|
1424
1496
|
}, (tables === null || tables === void 0 || (_tables$filter8 = tables.filter) === null || _tables$filter8 === void 0 ? void 0 : _tables$filter8.key) && {
|
|
1425
1497
|
columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
|
|
1426
1498
|
}), {}, {
|
|
@@ -1438,7 +1510,7 @@ function GenricLayOut(_ref) {
|
|
|
1438
1510
|
type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
|
|
1439
1511
|
});
|
|
1440
1512
|
} else {
|
|
1441
|
-
var _config$
|
|
1513
|
+
var _config$tables31, _config$tables32;
|
|
1442
1514
|
if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
|
|
1443
1515
|
var _staticFilter$data$fi3, _config$staticFilter2;
|
|
1444
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;
|
|
@@ -1467,8 +1539,8 @@ function GenricLayOut(_ref) {
|
|
|
1467
1539
|
dispatch({
|
|
1468
1540
|
type: _layoutReducer.actionTypes.SET_PAGINATION,
|
|
1469
1541
|
payload: {
|
|
1470
|
-
current: config === null || config === void 0 || (_config$
|
|
1471
|
-
pageSize: config === null || config === void 0 || (_config$
|
|
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
|
|
1472
1544
|
}
|
|
1473
1545
|
});
|
|
1474
1546
|
dispatch({
|
|
@@ -1476,20 +1548,27 @@ function GenricLayOut(_ref) {
|
|
|
1476
1548
|
});
|
|
1477
1549
|
}
|
|
1478
1550
|
} else if (formData.drawerKey === "exportDrawer") {
|
|
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
|
+
});
|
|
1479
1558
|
if (handleSecondaryTableCTAClick) {
|
|
1480
|
-
var _state$dropdownSearch8, _state$inputSearch8, _state$tabs15, _tables$
|
|
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;
|
|
1481
1560
|
const {
|
|
1482
1561
|
error,
|
|
1483
1562
|
data
|
|
1484
|
-
} = 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()) && {
|
|
1485
1564
|
searchedValue: state.dropdownSearch.value,
|
|
1486
1565
|
selectedOption: state.dropdownSearch.selectedOption
|
|
1487
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()) && {
|
|
1488
1567
|
searchedValue: state.inputSearch.value
|
|
1489
1568
|
}), {}, {
|
|
1490
1569
|
selectedTab: state === null || state === void 0 || (_state$tabs15 = state.tabs) === null || _state$tabs15 === void 0 ? void 0 : _state$tabs15.active,
|
|
1491
|
-
current: tables === null || tables === void 0 || (_tables$
|
|
1492
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
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,
|
|
1493
1572
|
columnFilterStatus: tables === null || tables === void 0 || (_tables$filter9 = tables.filter) === null || _tables$filter9 === void 0 ? void 0 : _tables$filter9.value,
|
|
1494
1573
|
field: tables === null || tables === void 0 || (_tables$sorting21 = tables.sorting) === null || _tables$sorting21 === void 0 ? void 0 : _tables$sorting21.sortBy,
|
|
1495
1574
|
order: tables === null || tables === void 0 || (_tables$sorting22 = tables.sorting) === null || _tables$sorting22 === void 0 ? void 0 : _tables$sorting22.sortDirection
|
|
@@ -1500,7 +1579,7 @@ function GenricLayOut(_ref) {
|
|
|
1500
1579
|
}), {}, {
|
|
1501
1580
|
fromDate: formData === null || formData === void 0 ? void 0 : formData.fromDate,
|
|
1502
1581
|
toDate: formData === null || formData === void 0 ? void 0 : formData.toDate
|
|
1503
|
-
}, (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
|
|
1582
|
+
}, appliedFilters), (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
|
|
1504
1583
|
exportType: formData === null || formData === void 0 ? void 0 : formData.exportType
|
|
1505
1584
|
}), (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {})));
|
|
1506
1585
|
if (error) {
|
|
@@ -1516,7 +1595,7 @@ function GenricLayOut(_ref) {
|
|
|
1516
1595
|
}
|
|
1517
1596
|
};
|
|
1518
1597
|
const onClearAllAppliedFilters = async () => {
|
|
1519
|
-
var _state$dropdownSearch9, _state$inputSearch9, _state$tabs16, _tables$
|
|
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;
|
|
1520
1599
|
const {
|
|
1521
1600
|
error,
|
|
1522
1601
|
data
|
|
@@ -1527,8 +1606,8 @@ function GenricLayOut(_ref) {
|
|
|
1527
1606
|
searchedValue: state.inputSearch.value
|
|
1528
1607
|
}), {}, {
|
|
1529
1608
|
selectedTab: state === null || state === void 0 || (_state$tabs16 = state.tabs) === null || _state$tabs16 === void 0 ? void 0 : _state$tabs16.active,
|
|
1530
|
-
current: tables === null || tables === void 0 || (_tables$
|
|
1531
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
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
|
|
1532
1611
|
}, (tables === null || tables === void 0 || (_tables$filter10 = tables.filter) === null || _tables$filter10 === void 0 ? void 0 : _tables$filter10.key) && {
|
|
1533
1612
|
columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
|
|
1534
1613
|
}), {}, {
|
|
@@ -1617,10 +1696,10 @@ function GenricLayOut(_ref) {
|
|
|
1617
1696
|
}
|
|
1618
1697
|
} else {
|
|
1619
1698
|
if (handleDrawerFormOnFinish) {
|
|
1620
|
-
var _state$tables$selecte, _state$
|
|
1699
|
+
var _state$tables$selecte, _state$tables3;
|
|
1621
1700
|
let req = {};
|
|
1622
1701
|
req.type = "APPROVE";
|
|
1623
|
-
req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$
|
|
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 : [];
|
|
1624
1703
|
const {
|
|
1625
1704
|
error,
|
|
1626
1705
|
data
|
|
@@ -1720,7 +1799,7 @@ function GenricLayOut(_ref) {
|
|
|
1720
1799
|
};
|
|
1721
1800
|
const rightHeaderSecondButtonClick = async () => {
|
|
1722
1801
|
if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
|
|
1723
|
-
var _state$dropdownSearch10, _state$inputSearch10, _state$tabs17, _tables$
|
|
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;
|
|
1724
1803
|
const {
|
|
1725
1804
|
error,
|
|
1726
1805
|
data
|
|
@@ -1731,8 +1810,8 @@ function GenricLayOut(_ref) {
|
|
|
1731
1810
|
searchedValue: state.inputSearch.value
|
|
1732
1811
|
}), {}, {
|
|
1733
1812
|
selectedTab: state === null || state === void 0 || (_state$tabs17 = state.tabs) === null || _state$tabs17 === void 0 ? void 0 : _state$tabs17.active,
|
|
1734
|
-
current: tables === null || tables === void 0 || (_tables$
|
|
1735
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
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
|
|
1736
1815
|
}, (tables === null || tables === void 0 || (_tables$filter11 = tables.filter) === null || _tables$filter11 === void 0 ? void 0 : _tables$filter11.key) && {
|
|
1737
1816
|
columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
|
|
1738
1817
|
}), {}, {
|
|
@@ -1794,7 +1873,7 @@ function GenricLayOut(_ref) {
|
|
|
1794
1873
|
};
|
|
1795
1874
|
const handleSubHeadingSelect = async val => {
|
|
1796
1875
|
if (val) {
|
|
1797
|
-
var _tables$
|
|
1876
|
+
var _state$tabs18, _tables$pagination13, _tables$pagination14, _state$misc19;
|
|
1798
1877
|
dispatch({
|
|
1799
1878
|
type: _layoutReducer.actionTypes.SET_SUBHEADING_SELECTED_CONFIG,
|
|
1800
1879
|
payload: val
|
|
@@ -1803,9 +1882,10 @@ function GenricLayOut(_ref) {
|
|
|
1803
1882
|
error,
|
|
1804
1883
|
data
|
|
1805
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,
|
|
1806
1886
|
searchedValue: inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.value,
|
|
1807
|
-
current: tables === null || tables === void 0 || (_tables$
|
|
1808
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
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,
|
|
1809
1889
|
subHeadingSelectVal: val
|
|
1810
1890
|
}, (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {}));
|
|
1811
1891
|
if (error) {
|
|
@@ -1834,7 +1914,7 @@ function GenricLayOut(_ref) {
|
|
|
1834
1914
|
|
|
1835
1915
|
// Call the handler if provided
|
|
1836
1916
|
if (handleTableChange) {
|
|
1837
|
-
var _state$dropdownSearch11, _state$inputSearch11, _state$
|
|
1917
|
+
var _state$dropdownSearch11, _state$inputSearch11, _state$tabs19, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc20;
|
|
1838
1918
|
dispatch({
|
|
1839
1919
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
1840
1920
|
payload: true
|
|
@@ -1848,10 +1928,10 @@ function GenricLayOut(_ref) {
|
|
|
1848
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()) && {
|
|
1849
1929
|
searchedValue: state.inputSearch.value
|
|
1850
1930
|
}), {}, {
|
|
1851
|
-
selectedTab: state === null || state === void 0 || (_state$
|
|
1931
|
+
selectedTab: state === null || state === void 0 || (_state$tabs19 = state.tabs) === null || _state$tabs19 === void 0 ? void 0 : _state$tabs19.active,
|
|
1852
1932
|
current: 1,
|
|
1853
1933
|
// Reset to first page when filtering
|
|
1854
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
1934
|
+
pageSize: tables === null || tables === void 0 || (_tables$pagination15 = tables.pagination) === null || _tables$pagination15 === void 0 ? void 0 : _tables$pagination15.pageSize,
|
|
1855
1935
|
filterStatus: filterValue,
|
|
1856
1936
|
field: tables === null || tables === void 0 || (_tables$sorting27 = tables.sorting) === null || _tables$sorting27 === void 0 ? void 0 : _tables$sorting27.sortBy,
|
|
1857
1937
|
order: tables === null || tables === void 0 || (_tables$sorting28 = tables.sorting) === null || _tables$sorting28 === void 0 ? void 0 : _tables$sorting28.sortDirection
|
|
@@ -1866,7 +1946,7 @@ function GenricLayOut(_ref) {
|
|
|
1866
1946
|
type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
|
|
1867
1947
|
});
|
|
1868
1948
|
} else {
|
|
1869
|
-
var _tables$
|
|
1949
|
+
var _tables$pagination16;
|
|
1870
1950
|
dispatch({
|
|
1871
1951
|
type: _layoutReducer.actionTypes.SET_TABLE_DATA,
|
|
1872
1952
|
payload: data
|
|
@@ -1876,7 +1956,7 @@ function GenricLayOut(_ref) {
|
|
|
1876
1956
|
type: _layoutReducer.actionTypes.SET_PAGINATION,
|
|
1877
1957
|
payload: {
|
|
1878
1958
|
current: 1,
|
|
1879
|
-
pageSize: tables === null || tables === void 0 || (_tables$
|
|
1959
|
+
pageSize: tables === null || tables === void 0 || (_tables$pagination16 = tables.pagination) === null || _tables$pagination16 === void 0 ? void 0 : _tables$pagination16.pageSize
|
|
1880
1960
|
}
|
|
1881
1961
|
});
|
|
1882
1962
|
}
|
|
@@ -1899,7 +1979,7 @@ function GenricLayOut(_ref) {
|
|
|
1899
1979
|
}
|
|
1900
1980
|
});
|
|
1901
1981
|
if (handleTableChange) {
|
|
1902
|
-
var _state$dropdownSearch12, _state$inputSearch12, _state$
|
|
1982
|
+
var _state$dropdownSearch12, _state$inputSearch12, _state$tabs20, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data12, _customDrawer$applied11, _state$misc21;
|
|
1903
1983
|
const {
|
|
1904
1984
|
error,
|
|
1905
1985
|
data
|
|
@@ -1909,7 +1989,7 @@ function GenricLayOut(_ref) {
|
|
|
1909
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()) && {
|
|
1910
1990
|
searchedValue: state.inputSearch.value
|
|
1911
1991
|
}), {}, {
|
|
1912
|
-
selectedTab: state === null || state === void 0 || (_state$
|
|
1992
|
+
selectedTab: state === null || state === void 0 || (_state$tabs20 = state.tabs) === null || _state$tabs20 === void 0 ? void 0 : _state$tabs20.active,
|
|
1913
1993
|
current,
|
|
1914
1994
|
pageSize,
|
|
1915
1995
|
columnFilterStatus: tables === null || tables === void 0 || (_tables$filter12 = tables.filter) === null || _tables$filter12 === void 0 ? void 0 : _tables$filter12.value,
|
|
@@ -2105,7 +2185,7 @@ function GenricLayOut(_ref) {
|
|
|
2105
2185
|
onChange: onTableChange,
|
|
2106
2186
|
customTableChange: customTableChange,
|
|
2107
2187
|
pagination: tables === null || tables === void 0 ? void 0 : tables.pagination,
|
|
2108
|
-
selectedRows: (state === null || state === void 0 || (_state$
|
|
2188
|
+
selectedRows: (state === null || state === void 0 || (_state$tables4 = state.tables) === null || _state$tables4 === void 0 ? void 0 : _state$tables4.selectedRowKeys) || [],
|
|
2109
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({
|
|
2110
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]
|
|
2111
2191
|
}, rowSelection),
|
|
@@ -2113,7 +2193,7 @@ function GenricLayOut(_ref) {
|
|
|
2113
2193
|
emptyText: emptyTableState
|
|
2114
2194
|
},
|
|
2115
2195
|
emptyStateCard: emptyTableState,
|
|
2116
|
-
onMobilePageChange: tables !== null && tables !== void 0 && (_tables$
|
|
2196
|
+
onMobilePageChange: tables !== null && tables !== void 0 && (_tables$pagination17 = tables.pagination) !== null && _tables$pagination17 !== void 0 && _tables$pagination17.mwebPagination ? onMobilePageChange : undefined
|
|
2117
2197
|
})))), (drawer === null || drawer === void 0 ? void 0 : drawer.visible) && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
|
|
2118
2198
|
className: "oaDrawer",
|
|
2119
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,
|
|
@@ -352,7 +352,8 @@ function FormWidget(props) {
|
|
|
352
352
|
key: item.key,
|
|
353
353
|
data: item.value,
|
|
354
354
|
info: keyValueInfo,
|
|
355
|
-
customClassName: item.className
|
|
355
|
+
customClassName: item.className,
|
|
356
|
+
tagStatus: item === null || item === void 0 ? void 0 : item.tagStatus
|
|
356
357
|
});
|
|
357
358
|
case "tag":
|
|
358
359
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -440,13 +441,15 @@ function FormWidget(props) {
|
|
|
440
441
|
heading,
|
|
441
442
|
headingInfo,
|
|
442
443
|
items,
|
|
443
|
-
topDividerRequired
|
|
444
|
+
topDividerRequired
|
|
444
445
|
} = group;
|
|
445
446
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
446
447
|
key: index
|
|
447
|
-
}, bordered ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
448
|
+
}, bordered ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, topDividerRequired === true && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
449
|
+
className: "dividerLine"
|
|
450
|
+
}), Heading(heading, headingInfo), /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldBoxBorder, null, items.map((item, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
448
451
|
key: i
|
|
449
|
-
}, renderWidget(item))))) : /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldWithoutBorder, null, topDividerRequired && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
452
|
+
}, renderWidget(item))))) : /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldWithoutBorder, null, topDividerRequired !== false && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
450
453
|
className: "dividerLine"
|
|
451
454
|
}), Heading(heading, headingInfo), items.map((item, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
452
455
|
key: i
|