oa-componentbook 0.18.391 → 0.18.392
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.
|
@@ -14,7 +14,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
14
14
|
var _default = exports.default = {};
|
|
15
15
|
const StyledButton = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 4px;\n cursor: pointer;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n .text-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px; \n text-align: left;\n }\n"])));
|
|
16
16
|
const EllipsisTypography = exports.EllipsisTypography = (0, _styledComponents.default)(_Typography.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: block; \n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 84px;\n"])));
|
|
17
|
-
const ColoredStyledButton = exports.ColoredStyledButton = (0, _styledComponents.default)(StyledButton)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 2.25rem;\n min-width: 100px;\n padding: 0.625rem 1rem;\n\n &.small {\n height: 30px;\n min-width: 80px;\n padding: 10px 16px;\n }\n\n &.medium {\n height: 36px;\n min-width: 100px;\n padding: 10px 16px;\n }\n\n &.large {\n height: 48px;\n min-width: 136px;\n padding: 10px 24px;\n }\n\n &.medium-text-only,\n &.small-text-only {\n min-width: auto;\n height: auto;\n padding: 4px 0;\n }\n\n &.large-text-only {\n min-width: auto;\n height: auto;\n padding: 8px 0;\n }\n\n &.primary {\n background: var(--color-primary);\n border: 1px solid var(--color-primary);\n color: var(--color-primary-background);\n }\n &.primary:hover {\n background: var(--color-primary-hover);\n border: 1px solid var(--color-primary-hover);\n }\n\n &.primary-disabled {\n background: var(--color-disabled-button);\n cursor: not-allowed;\n color: var(--color-primary-background);\n border: 1px solid var(--color-disabled-button);\n }\n\n &.gradient {\n background: var(--color-primary-background); /* solid fill inside */\n color: #014FC5; /* pick a readable color */\n border: 1px solid transparent;\n border-radius: 4px;\n background-image: linear-gradient(#fff, #fff), \n linear-gradient(90deg, #0098FF, #9A6CFF, #DF58D1, #FB6252, #FEA40A);\n background-origin: border-box;\n background-clip: padding-box, border-box;\n transition: all 0.3s ease;\n}\n\n&.gradient:hover {\n background-image: linear-gradient(#fff, #fff), \n linear-gradient(90deg, #FEA40A, #FB6252, #DF58D1, #9A6CFF, #0098FF);\n}\n\n&.gradient-disabled {\n background: var(--color-disabled-button);\n border: 1px solid var(--color-disabled-button);\n color: var(--color-primary-background);\n cursor: not-allowed;\n}\n\n\n &.secondary {\n background: transparent;\n border: 1px solid var(--color-primary);\n color: var(--color-primary);\n }\n &.secondary:hover {\n background: transparent;\n border: 1px solid var(--color-primary-hover);\n color: var(--color-primary-hover);\n }\n\n &.secondary-disabled {\n background: transparent;\n border: 1px solid var(--color-disabled-button);\n color: var(--color-disabled-button);\n cursor: not-allowed;\n }\n \n &.text-only {\n border: none;\n background: transparent;\n color: var(--color-primary);\n }\n &.text-only:hover {\n color: var(--color-primary-hover);\n }\n\n &.text-only-disabled {\n border: none;\n background: transparent;\n color: var(--color-disabled-button);\n cursor: not-allowed;\n }\n \n &.danger-primary {\n background: var(--color-negative);\n color: var(--color-primary-background);\n border: 1px solid var(--color-negative);\n }\n &.danger-primary:hover {\n background: var(--color-hover-negative);\n color: var(--color-primary-background);\n border: 1px solid var(--color-hover-negative);\n }\n\n &.danger-secondary {\n background: transparent;\n border: 1px solid var(--color-negative);\n color: var(--color-negative);\n }\n &.danger-secondary:hover {\n background: transparent;\n border: 1px solid var(--color-hover-negative);\n color: var(--color-hover-negative);\n }\n\n &.danger-text-only {\n border: none;\n color: var(--color-negative);\n background: transparent;\n }\n &.danger-text-only:hover {\n border: none;\n color: var(--color-hover-negative);\n background: transparent;\n }\n @media only screen and (max-width: 600px) {\n &.text-only:hover {\n color: var(--color-primary);\n }\n }\n"])));
|
|
17
|
+
const ColoredStyledButton = exports.ColoredStyledButton = (0, _styledComponents.default)(StyledButton)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 2.25rem;\n min-width: 100px;\n padding: 0.625rem 1rem;\n\n &.small {\n height: 30px;\n min-width: 80px;\n padding: 10px 16px;\n }\n\n &.medium {\n height: 36px;\n min-width: 100px;\n padding: 10px 16px;\n }\n\n &.large {\n height: 48px;\n min-width: 136px;\n padding: 10px 24px;\n }\n\n &.medium-text-only,\n &.small-text-only {\n min-width: auto;\n height: auto;\n padding: 4px 0;\n }\n\n &.large-text-only {\n min-width: auto;\n height: auto;\n padding: 8px 0;\n }\n\n &.primary {\n background: var(--color-primary);\n border: 1px solid var(--color-primary);\n color: var(--color-primary-background);\n }\n &.primary:hover {\n background: var(--color-primary-hover);\n border: 1px solid var(--color-primary-hover);\n }\n\n &.primary-disabled {\n background: var(--color-disabled-button);\n cursor: not-allowed;\n color: var(--color-primary-background);\n border: 1px solid var(--color-disabled-button);\n }\n\n &.gradient {\n background: var(--color-primary-background); /* solid fill inside */\n color: #014FC5; /* pick a readable color */\n border: 1px solid transparent;\n border-radius: 4px;\n background-image: linear-gradient(#fff, #fff), \n linear-gradient(90deg, #0098FF, #9A6CFF, #DF58D1, #FB6252, #FEA40A);\n background-origin: border-box;\n background-clip: padding-box, border-box;\n transition: all 0.3s ease;\n}\n\n&.gradient:hover {\n background-image: linear-gradient(#fff, #fff), \n linear-gradient(90deg, #FEA40A, #FB6252, #DF58D1, #9A6CFF, #0098FF);\n}\n\n&.gradient-disabled {\n background: var(--color-disabled-button);\n border: 1px solid var(--color-disabled-button);\n color: var(--color-primary-background);\n cursor: not-allowed;\n}\n\n\n &.secondary {\n background: transparent;\n border: 1px solid var(--color-primary);\n color: var(--color-primary);\n }\n &.secondary:hover {\n background: transparent;\n border: 1px solid var(--color-primary-hover);\n color: var(--color-primary-hover);\n }\n\n &.secondary-disabled {\n background: transparent;\n border: 1px solid var(--color-disabled-button);\n color: var(--color-disabled-button);\n cursor: not-allowed;\n }\n \n &.text-only {\n border: none;\n background: transparent;\n color: var(--color-primary);\n }\n &.text-only:hover {\n color: var(--color-primary-hover);\n }\n\n &.text-only-disabled {\n border: none;\n background: transparent;\n color: var(--color-disabled-button);\n cursor: not-allowed;\n }\n \n &.danger-primary {\n background: var(--color-negative);\n color: var(--color-primary-background);\n border: 1px solid var(--color-negative);\n }\n &.danger-primary:hover {\n background: var(--color-hover-negative);\n color: var(--color-primary-background);\n border: 1px solid var(--color-hover-negative);\n }\n\n &.danger-secondary {\n background: transparent;\n border: 1px solid var(--color-negative);\n color: var(--color-negative);\n }\n &.danger-secondary:hover {\n background: transparent;\n border: 1px solid var(--color-hover-negative);\n color: var(--color-hover-negative);\n }\n\n &.danger-text-only {\n border: none;\n color: var(--color-negative);\n background: transparent;\n }\n &.danger-text-only:hover {\n border: none;\n color: var(--color-hover-negative);\n background: transparent;\n }\n &.mt-neg-16 {\n margin-top: -16px;\n }\n\n @media only screen and (max-width: 600px) {\n &.text-only:hover {\n color: var(--color-primary);\n }\n }\n"])));
|
|
18
18
|
function getButtonTypography(size) {
|
|
19
19
|
switch (size) {
|
|
20
20
|
case 'large':
|
|
@@ -241,7 +241,7 @@ function CustomTableV1(_ref2) {
|
|
|
241
241
|
type: "text-only",
|
|
242
242
|
disabled: disabled || isRowSelected(record)
|
|
243
243
|
}), config === null || config === void 0 || (_config$options = config.options) === null || _config$options === void 0 ? void 0 : _config$options.map((option, idx) => {
|
|
244
|
-
var _record$option$styleK, _record$option$styleK2;
|
|
244
|
+
var _record$option$styleK, _record$option$styleK2, _option$prefix, _getByPath, _option$suffix;
|
|
245
245
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
246
246
|
key: idx
|
|
247
247
|
}, (option === null || option === void 0 ? void 0 : option.type) === "button" ? /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
@@ -258,7 +258,7 @@ function CustomTableV1(_ref2) {
|
|
|
258
258
|
}) : /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
259
259
|
typography: (option === null || option === void 0 ? void 0 : option.typography) || (col === null || col === void 0 ? void 0 : col.customStyle) && (record === null || record === void 0 || (_record$option$styleK = record[option === null || option === void 0 ? void 0 : option.styleKey]) === null || _record$option$styleK === void 0 ? void 0 : _record$option$styleK.typography) || "type-b2-400",
|
|
260
260
|
color: (option === null || option === void 0 ? void 0 : option.color) || (col === null || col === void 0 ? void 0 : col.customStyle) && (record === null || record === void 0 || (_record$option$styleK2 = record[option === null || option === void 0 ? void 0 : option.styleKey]) === null || _record$option$styleK2 === void 0 ? void 0 : _record$option$styleK2.color)
|
|
261
|
-
}, getByPath(record, option === null || option === void 0 ? void 0 : option.key)));
|
|
261
|
+
}, "".concat((_option$prefix = option === null || option === void 0 ? void 0 : option.prefix) !== null && _option$prefix !== void 0 ? _option$prefix : "").concat((_getByPath = getByPath(record, option === null || option === void 0 ? void 0 : option.key)) !== null && _getByPath !== void 0 ? _getByPath : "").concat((_option$suffix = option === null || option === void 0 ? void 0 : option.suffix) !== null && _option$suffix !== void 0 ? _option$suffix : "")));
|
|
262
262
|
}));
|
|
263
263
|
case "tag":
|
|
264
264
|
const tagType = typeof subType === "function" ? subType(_, record) : subType;
|
|
@@ -463,8 +463,8 @@ function CustomTableV1(_ref2) {
|
|
|
463
463
|
return col.render(value, row);
|
|
464
464
|
}
|
|
465
465
|
if (Array.isArray(col.dataIndex)) {
|
|
466
|
-
var
|
|
467
|
-
return (
|
|
466
|
+
var _getByPath2;
|
|
467
|
+
return (_getByPath2 = getByPath(row, col.dataIndex.join("."))) !== null && _getByPath2 !== void 0 ? _getByPath2 : "";
|
|
468
468
|
}
|
|
469
469
|
if (col.dataIndex) {
|
|
470
470
|
var _row$col$dataIndex;
|
|
@@ -58,7 +58,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
58
58
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
59
59
|
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 */
|
|
60
60
|
function GenricLayOut(_ref) {
|
|
61
|
-
var _state$
|
|
61
|
+
var _state$misc38, _headerRightFirstButt, _headerRightSecondBut, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _infoData$iconConfig, _infoData$iconConfig2, _infoData$iconConfig3, _infoData$iconConfig4, _leftHeaderFirstButto, _leftHeaderFirstButto2, _leftHeaderSecondButt, _leftHeaderSecondButt2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer4, _state$customDrawer5, _tabs$list, _ref7, _tabs$extraAction$che2, _tabs$extraAction$pro, _tabTableInfoPanel$da, _tabTableInfoPanel$da2, _tabTableInfoPanel$da3, _tabTableInfoPanel$da4, _tabTableInfoPanel$da5, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables5, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination19, _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;
|
|
62
62
|
let {
|
|
63
63
|
config,
|
|
64
64
|
getInitialData,
|
|
@@ -134,7 +134,6 @@ function GenricLayOut(_ref) {
|
|
|
134
134
|
infoData,
|
|
135
135
|
feedbackWidget
|
|
136
136
|
} = state !== null && state !== void 0 ? state : {};
|
|
137
|
-
console.log(infoData, "infoData");
|
|
138
137
|
(0, _react.useEffect)(() => {
|
|
139
138
|
init();
|
|
140
139
|
}, []);
|
|
@@ -410,7 +409,7 @@ function GenricLayOut(_ref) {
|
|
|
410
409
|
if (trimedValue === "" || !(validateInput !== null && validateInput !== void 0 && validateInput(trimedValue))) {
|
|
411
410
|
dispatch({
|
|
412
411
|
type: _layoutReducer.actionTypes.SET_INPUT_SEARCH_ERROR,
|
|
413
|
-
payload: trimedValue === "" ? null : "Please enter a valid "
|
|
412
|
+
payload: trimedValue === "" ? null : "Please enter a valid value"
|
|
414
413
|
});
|
|
415
414
|
return;
|
|
416
415
|
}
|
|
@@ -1053,6 +1052,50 @@ function GenricLayOut(_ref) {
|
|
|
1053
1052
|
if (handleCtaDownload) {
|
|
1054
1053
|
handleCtaDownload(record);
|
|
1055
1054
|
}
|
|
1055
|
+
} else if ((configArgs === null || configArgs === void 0 ? void 0 : configArgs.action) === "CTA_DOWNLOAD1") {
|
|
1056
|
+
if (handleCtaDownload) {
|
|
1057
|
+
const {
|
|
1058
|
+
error,
|
|
1059
|
+
data
|
|
1060
|
+
} = await handleCtaDownload(record);
|
|
1061
|
+
console.log(data, 'data123');
|
|
1062
|
+
if (error) {
|
|
1063
|
+
showErrorNotification(error);
|
|
1064
|
+
} else {
|
|
1065
|
+
showSuccessNotification(data);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
} else if ((configArgs === null || configArgs === void 0 ? void 0 : configArgs.action) === "MORE_ACTIONS") {
|
|
1069
|
+
var _configArgs$fileNames;
|
|
1070
|
+
const optFileName = (configArgs === null || configArgs === void 0 || (_configArgs$fileNames = configArgs.fileNames) === null || _configArgs$fileNames === void 0 ? void 0 : _configArgs$fileNames[optKey]) || (configArgs === null || configArgs === void 0 ? void 0 : configArgs.fileName);
|
|
1071
|
+
if (optKey === "export") {
|
|
1072
|
+
if (handleSecondaryTableCTAClick) {
|
|
1073
|
+
var _state$misc15;
|
|
1074
|
+
const {
|
|
1075
|
+
error,
|
|
1076
|
+
data
|
|
1077
|
+
} = await (handleSecondaryTableCTAClick === null || handleSecondaryTableCTAClick === void 0 ? void 0 : handleSecondaryTableCTAClick(_objectSpread({
|
|
1078
|
+
rentalId: record === null || record === void 0 ? void 0 : record.rentalId
|
|
1079
|
+
}, (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {})));
|
|
1080
|
+
if (error) {
|
|
1081
|
+
showErrorNotification(error);
|
|
1082
|
+
} else {
|
|
1083
|
+
(0, _downloadFile.default)(data, optFileName);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
} else if (optKey === "downloadInvoices") {
|
|
1087
|
+
if (handleCtaDownload) {
|
|
1088
|
+
const {
|
|
1089
|
+
error,
|
|
1090
|
+
data
|
|
1091
|
+
} = await handleCtaDownload(record);
|
|
1092
|
+
if (error) {
|
|
1093
|
+
showErrorNotification(error);
|
|
1094
|
+
} else {
|
|
1095
|
+
showSuccessNotification(data);
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1056
1099
|
}
|
|
1057
1100
|
};
|
|
1058
1101
|
|
|
@@ -1221,7 +1264,7 @@ function GenricLayOut(_ref) {
|
|
|
1221
1264
|
});
|
|
1222
1265
|
resetTabsExtraActionSwitch();
|
|
1223
1266
|
if (handleTableChange) {
|
|
1224
|
-
var _state$dropdownSearch3, _state$inputSearch4, _state$tabs8, _header$subHeading15, _header$subHeading16, _staticFilter$data6, _customDrawer$applied8, _state$
|
|
1267
|
+
var _state$dropdownSearch3, _state$inputSearch4, _state$tabs8, _header$subHeading15, _header$subHeading16, _staticFilter$data6, _customDrawer$applied8, _state$misc16, _state$staticFilter$m5, _state$staticFilter5;
|
|
1225
1268
|
dispatch({
|
|
1226
1269
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
1227
1270
|
payload: true
|
|
@@ -1246,7 +1289,7 @@ function GenricLayOut(_ref) {
|
|
|
1246
1289
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
1247
1290
|
}), (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)), {}, {
|
|
1248
1291
|
order: (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "ascend" && "ASC" || (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "descend" && "DESC" || ""
|
|
1249
|
-
}, (_state$
|
|
1292
|
+
}, (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}), {}, {
|
|
1250
1293
|
multiSelectValue: (_state$staticFilter$m5 = state === null || state === void 0 || (_state$staticFilter5 = state.staticFilter) === null || _state$staticFilter5 === void 0 ? void 0 : _state$staticFilter5.multiSelectValue) !== null && _state$staticFilter$m5 !== void 0 ? _state$staticFilter$m5 : []
|
|
1251
1294
|
}));
|
|
1252
1295
|
if (error) {
|
|
@@ -1331,7 +1374,7 @@ function GenricLayOut(_ref) {
|
|
|
1331
1374
|
});
|
|
1332
1375
|
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;
|
|
1333
1376
|
if (handleTabClick) {
|
|
1334
|
-
var _state$
|
|
1377
|
+
var _state$misc17, _tables$pagination, _tables$pagination2, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _header$subHeading17, _header$subHeading18, _customDrawer$applied9, _state$misc18, _state$staticFilter$m6, _state$staticFilter6;
|
|
1335
1378
|
dispatch({
|
|
1336
1379
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
1337
1380
|
payload: true
|
|
@@ -1339,7 +1382,7 @@ function GenricLayOut(_ref) {
|
|
|
1339
1382
|
const {
|
|
1340
1383
|
error,
|
|
1341
1384
|
data
|
|
1342
|
-
} = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$
|
|
1385
|
+
} = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {}), {}, {
|
|
1343
1386
|
selectedTab: key,
|
|
1344
1387
|
current: tables === null || tables === void 0 || (_tables$pagination = tables.pagination) === null || _tables$pagination === void 0 ? void 0 : _tables$pagination.current,
|
|
1345
1388
|
pageSize: tables === null || tables === void 0 || (_tables$pagination2 = tables.pagination) === null || _tables$pagination2 === void 0 ? void 0 : _tables$pagination2.pageSize,
|
|
@@ -1353,7 +1396,7 @@ function GenricLayOut(_ref) {
|
|
|
1353
1396
|
selectedOption: state.dropdownSearch.selectedOption
|
|
1354
1397
|
}), (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" ? {
|
|
1355
1398
|
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
|
|
1356
|
-
} : {}), (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$
|
|
1399
|
+
} : {}), (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$misc18 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc18 !== void 0 ? _state$misc18 : {}), {}, {
|
|
1357
1400
|
multiSelectValue: (_state$staticFilter$m6 = state === null || state === void 0 || (_state$staticFilter6 = state.staticFilter) === null || _state$staticFilter6 === void 0 ? void 0 : _state$staticFilter6.multiSelectValue) !== null && _state$staticFilter$m6 !== void 0 ? _state$staticFilter$m6 : []
|
|
1358
1401
|
}, (tabs === null || tabs === void 0 ? void 0 : tabs.extraAction) && extraActionChecked && {
|
|
1359
1402
|
checked: extraActionChecked
|
|
@@ -1451,11 +1494,11 @@ function GenricLayOut(_ref) {
|
|
|
1451
1494
|
return;
|
|
1452
1495
|
}
|
|
1453
1496
|
if (handleDrawerFormOnFinish) {
|
|
1454
|
-
var _state$
|
|
1497
|
+
var _state$misc19;
|
|
1455
1498
|
const {
|
|
1456
1499
|
error,
|
|
1457
1500
|
data
|
|
1458
|
-
} = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$
|
|
1501
|
+
} = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {})));
|
|
1459
1502
|
if (error) {
|
|
1460
1503
|
showErrorNotification(error);
|
|
1461
1504
|
} else {
|
|
@@ -1480,7 +1523,7 @@ function GenricLayOut(_ref) {
|
|
|
1480
1523
|
|
|
1481
1524
|
// If there are remaining filters, reapply them
|
|
1482
1525
|
if (Object.keys(currentFilters).length > 0) {
|
|
1483
|
-
var _state$dropdownSearch5, _state$inputSearch5, _state$tabs11, _tables$pagination3, _tables$pagination4, _tables$filter6, _tables$sorting15, _header$subHeading19, _header$subHeading20, _staticFilter$data7, _tables$sorting16, _state$
|
|
1526
|
+
var _state$dropdownSearch5, _state$inputSearch5, _state$tabs11, _tables$pagination3, _tables$pagination4, _tables$filter6, _tables$sorting15, _header$subHeading19, _header$subHeading20, _staticFilter$data7, _tables$sorting16, _state$misc20, _state$staticFilter$m7, _state$staticFilter7;
|
|
1484
1527
|
const {
|
|
1485
1528
|
error,
|
|
1486
1529
|
data
|
|
@@ -1506,7 +1549,7 @@ function GenricLayOut(_ref) {
|
|
|
1506
1549
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
1507
1550
|
}), {}, {
|
|
1508
1551
|
order: tables === null || tables === void 0 || (_tables$sorting16 = tables.sorting) === null || _tables$sorting16 === void 0 ? void 0 : _tables$sorting16.sortDirection
|
|
1509
|
-
}, (_state$
|
|
1552
|
+
}, (_state$misc20 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc20 !== void 0 ? _state$misc20 : {}), {}, {
|
|
1510
1553
|
multiSelectValue: (_state$staticFilter$m7 = state === null || state === void 0 || (_state$staticFilter7 = state.staticFilter) === null || _state$staticFilter7 === void 0 ? void 0 : _state$staticFilter7.multiSelectValue) !== null && _state$staticFilter$m7 !== void 0 ? _state$staticFilter$m7 : []
|
|
1511
1554
|
}));
|
|
1512
1555
|
if (error) {
|
|
@@ -1540,7 +1583,7 @@ function GenricLayOut(_ref) {
|
|
|
1540
1583
|
const filterFormOnFinish = async formData => {
|
|
1541
1584
|
// Check if this is a cancel/clear action - check both buttonClickType and the actual button data
|
|
1542
1585
|
if (formData.type === "FILTER-CANCEL") {
|
|
1543
|
-
var _state$dropdownSearch6, _state$inputSearch6, _state$tabs12, _tables$pagination5, _tables$pagination6, _tables$filter7, _tables$sorting17, _header$subHeading21, _header$subHeading22, _staticFilter$data8, _tables$sorting18, _state$
|
|
1586
|
+
var _state$dropdownSearch6, _state$inputSearch6, _state$tabs12, _tables$pagination5, _tables$pagination6, _tables$filter7, _tables$sorting17, _header$subHeading21, _header$subHeading22, _staticFilter$data8, _tables$sorting18, _state$misc21, _state$staticFilter$m8, _state$staticFilter8;
|
|
1544
1587
|
if (isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)) {
|
|
1545
1588
|
dispatch({
|
|
1546
1589
|
type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
|
|
@@ -1569,7 +1612,7 @@ function GenricLayOut(_ref) {
|
|
|
1569
1612
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
1570
1613
|
}), {}, {
|
|
1571
1614
|
order: tables === null || tables === void 0 || (_tables$sorting18 = tables.sorting) === null || _tables$sorting18 === void 0 ? void 0 : _tables$sorting18.sortDirection
|
|
1572
|
-
}, (_state$
|
|
1615
|
+
}, (_state$misc21 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc21 !== void 0 ? _state$misc21 : {}), {}, {
|
|
1573
1616
|
multiSelectValue: (_state$staticFilter$m8 = state === null || state === void 0 || (_state$staticFilter8 = state.staticFilter) === null || _state$staticFilter8 === void 0 ? void 0 : _state$staticFilter8.multiSelectValue) !== null && _state$staticFilter$m8 !== void 0 ? _state$staticFilter$m8 : []
|
|
1574
1617
|
}));
|
|
1575
1618
|
if (error) {
|
|
@@ -1619,7 +1662,7 @@ function GenricLayOut(_ref) {
|
|
|
1619
1662
|
|
|
1620
1663
|
// Only process filter data if this is actually a filter drawer
|
|
1621
1664
|
if (formData.type === "FILTER-SUBMIT") {
|
|
1622
|
-
var _state$dropdownSearch7, _state$inputSearch7, _ref5, _appliedFilters$filte, _state$tabs13, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data9, _tables$sorting20, _state$
|
|
1665
|
+
var _state$dropdownSearch7, _state$inputSearch7, _ref5, _appliedFilters$filte, _state$tabs13, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data9, _tables$sorting20, _state$misc22, _state$staticFilter$m9, _state$staticFilter9;
|
|
1623
1666
|
const appliedFilters = {};
|
|
1624
1667
|
Object.keys(formData).forEach(key => {
|
|
1625
1668
|
const value = formData[key];
|
|
@@ -1658,7 +1701,7 @@ function GenricLayOut(_ref) {
|
|
|
1658
1701
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
1659
1702
|
}), {}, {
|
|
1660
1703
|
order: tables === null || tables === void 0 || (_tables$sorting20 = tables.sorting) === null || _tables$sorting20 === void 0 ? void 0 : _tables$sorting20.sortDirection
|
|
1661
|
-
}, (_state$
|
|
1704
|
+
}, (_state$misc22 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc22 !== void 0 ? _state$misc22 : {}), {}, {
|
|
1662
1705
|
multiSelectValue: (_state$staticFilter$m9 = state === null || state === void 0 || (_state$staticFilter9 = state.staticFilter) === null || _state$staticFilter9 === void 0 ? void 0 : _state$staticFilter9.multiSelectValue) !== null && _state$staticFilter$m9 !== void 0 ? _state$staticFilter$m9 : []
|
|
1663
1706
|
}));
|
|
1664
1707
|
if (error) {
|
|
@@ -1713,7 +1756,7 @@ function GenricLayOut(_ref) {
|
|
|
1713
1756
|
}
|
|
1714
1757
|
});
|
|
1715
1758
|
if (handleSecondaryTableCTAClick) {
|
|
1716
|
-
var _state$dropdownSearch8, _state$inputSearch8, _state$tabs14, _tables$pagination7, _tables$pagination8, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading25, _header$subHeading26, _staticFilter$data10, _state$
|
|
1759
|
+
var _state$dropdownSearch8, _state$inputSearch8, _state$tabs14, _tables$pagination7, _tables$pagination8, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading25, _header$subHeading26, _staticFilter$data10, _state$misc23, _state$staticFilter$m10, _state$staticFilter10;
|
|
1717
1760
|
const {
|
|
1718
1761
|
error,
|
|
1719
1762
|
data
|
|
@@ -1738,7 +1781,7 @@ function GenricLayOut(_ref) {
|
|
|
1738
1781
|
toDate: formData === null || formData === void 0 ? void 0 : formData.toDate
|
|
1739
1782
|
}, appliedFilters), (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
|
|
1740
1783
|
exportType: formData === null || formData === void 0 ? void 0 : formData.exportType
|
|
1741
|
-
}), (_state$
|
|
1784
|
+
}), (_state$misc23 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc23 !== void 0 ? _state$misc23 : {}), {}, {
|
|
1742
1785
|
multiSelectValue: (_state$staticFilter$m10 = state === null || state === void 0 || (_state$staticFilter10 = state.staticFilter) === null || _state$staticFilter10 === void 0 ? void 0 : _state$staticFilter10.multiSelectValue) !== null && _state$staticFilter$m10 !== void 0 ? _state$staticFilter$m10 : []
|
|
1743
1786
|
})));
|
|
1744
1787
|
if (error) {
|
|
@@ -1753,8 +1796,8 @@ function GenricLayOut(_ref) {
|
|
|
1753
1796
|
}
|
|
1754
1797
|
} else if ((formData === null || formData === void 0 ? void 0 : formData.drawerKey) === "leftHeaderSecondButtonSubmit") {
|
|
1755
1798
|
if (handleLeftHeaderSecondButton) {
|
|
1756
|
-
var _state$
|
|
1757
|
-
const response = await handleLeftHeaderSecondButton(_objectSpread(_objectSpread({}, formData), (_state$
|
|
1799
|
+
var _state$misc24;
|
|
1800
|
+
const response = await handleLeftHeaderSecondButton(_objectSpread(_objectSpread({}, formData), (_state$misc24 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc24 !== void 0 ? _state$misc24 : {}));
|
|
1758
1801
|
const {
|
|
1759
1802
|
error,
|
|
1760
1803
|
data
|
|
@@ -1771,11 +1814,11 @@ function GenricLayOut(_ref) {
|
|
|
1771
1814
|
}
|
|
1772
1815
|
} else if ((formData === null || formData === void 0 ? void 0 : formData.type) === "BULK_CREATION") {
|
|
1773
1816
|
if (handleDrawerFormOnFinish) {
|
|
1774
|
-
var _state$
|
|
1817
|
+
var _state$misc25;
|
|
1775
1818
|
const {
|
|
1776
1819
|
error,
|
|
1777
1820
|
data
|
|
1778
|
-
} = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread({}, formData), (_state$
|
|
1821
|
+
} = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread({}, formData), (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {})));
|
|
1779
1822
|
if (error) {
|
|
1780
1823
|
showErrorNotification(error);
|
|
1781
1824
|
} else {
|
|
@@ -1788,11 +1831,11 @@ function GenricLayOut(_ref) {
|
|
|
1788
1831
|
}
|
|
1789
1832
|
} else if ((formData === null || formData === void 0 ? void 0 : formData.type) === "BULK_CREATION_WITH_ENTERPRISE_DATA") {
|
|
1790
1833
|
if (handleDrawerFormOnFinish) {
|
|
1791
|
-
var _state$
|
|
1834
|
+
var _state$misc26, _state$header;
|
|
1792
1835
|
const {
|
|
1793
1836
|
error,
|
|
1794
1837
|
data
|
|
1795
|
-
} = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, formData), (_state$
|
|
1838
|
+
} = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, formData), (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {}), state === null || state === void 0 || (_state$header = state.header) === null || _state$header === void 0 ? void 0 : _state$header.subHeading)));
|
|
1796
1839
|
if (error) {
|
|
1797
1840
|
showErrorNotification(error);
|
|
1798
1841
|
} else {
|
|
@@ -1806,7 +1849,7 @@ function GenricLayOut(_ref) {
|
|
|
1806
1849
|
}
|
|
1807
1850
|
};
|
|
1808
1851
|
const onClearAllAppliedFilters = async () => {
|
|
1809
|
-
var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$
|
|
1852
|
+
var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$misc27, _state$staticFilter$m11, _state$staticFilter11;
|
|
1810
1853
|
resetTabsExtraActionSwitch();
|
|
1811
1854
|
const {
|
|
1812
1855
|
error,
|
|
@@ -1830,7 +1873,7 @@ function GenricLayOut(_ref) {
|
|
|
1830
1873
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
1831
1874
|
}), {}, {
|
|
1832
1875
|
order: tables === null || tables === void 0 || (_tables$sorting24 = tables.sorting) === null || _tables$sorting24 === void 0 ? void 0 : _tables$sorting24.sortDirection
|
|
1833
|
-
}, (_state$
|
|
1876
|
+
}, (_state$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {}), {}, {
|
|
1834
1877
|
multiSelectValue: (_state$staticFilter$m11 = state === null || state === void 0 || (_state$staticFilter11 = state.staticFilter) === null || _state$staticFilter11 === void 0 ? void 0 : _state$staticFilter11.multiSelectValue) !== null && _state$staticFilter$m11 !== void 0 ? _state$staticFilter$m11 : []
|
|
1835
1878
|
}));
|
|
1836
1879
|
if (error) {
|
|
@@ -1966,14 +2009,14 @@ function GenricLayOut(_ref) {
|
|
|
1966
2009
|
return;
|
|
1967
2010
|
} else if (action === "CLOSE_MODAL_AND_FETCH") {
|
|
1968
2011
|
if (handleModalCloseSuccess) {
|
|
1969
|
-
var _stateRef$current, _state$
|
|
2012
|
+
var _stateRef$current, _state$misc28;
|
|
1970
2013
|
const {
|
|
1971
2014
|
error,
|
|
1972
2015
|
data
|
|
1973
2016
|
} = await (handleModalCloseSuccess === null || handleModalCloseSuccess === void 0 ? void 0 : handleModalCloseSuccess(_objectSpread({
|
|
1974
2017
|
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,
|
|
1975
2018
|
call: buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.call
|
|
1976
|
-
}, (_state$
|
|
2019
|
+
}, (_state$misc28 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc28 !== void 0 ? _state$misc28 : {})));
|
|
1977
2020
|
if (error) {
|
|
1978
2021
|
showErrorNotification(error);
|
|
1979
2022
|
} else {
|
|
@@ -1987,11 +2030,11 @@ function GenricLayOut(_ref) {
|
|
|
1987
2030
|
}
|
|
1988
2031
|
} else {
|
|
1989
2032
|
if (handleDrawerFormOnFinish) {
|
|
1990
|
-
var _state$tables$selecte, _state$tables4, _state$
|
|
2033
|
+
var _state$tables$selecte, _state$tables4, _state$misc29;
|
|
1991
2034
|
let req = {};
|
|
1992
2035
|
req.type = "APPROVE";
|
|
1993
2036
|
req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$tables4 = state.tables) === null || _state$tables4 === void 0 || (_state$tables4 = _state$tables4.selectedRowKeys) === null || _state$tables4 === void 0 ? void 0 : _state$tables4.map(item => item.orderUUID)) !== null && _state$tables$selecte !== void 0 ? _state$tables$selecte : [];
|
|
1994
|
-
req.misc = (_state$
|
|
2037
|
+
req.misc = (_state$misc29 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc29 !== void 0 ? _state$misc29 : {};
|
|
1995
2038
|
const {
|
|
1996
2039
|
error,
|
|
1997
2040
|
data
|
|
@@ -2123,9 +2166,9 @@ function GenricLayOut(_ref) {
|
|
|
2123
2166
|
*/
|
|
2124
2167
|
const rightHeaderFirstButtonClick = async () => {
|
|
2125
2168
|
if ((rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.action) === "OPEN_CUSTOM_DRAWER") {
|
|
2126
|
-
var _config$customDrawer6, _state$
|
|
2169
|
+
var _config$customDrawer6, _state$misc30, _state$customDrawer3;
|
|
2127
2170
|
const drawerData = config === null || config === void 0 || (_config$customDrawer6 = config.customDrawer) === null || _config$customDrawer6 === void 0 || (_config$customDrawer6 = _config$customDrawer6.data) === null || _config$customDrawer6 === void 0 ? void 0 : _config$customDrawer6[rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.drawerKey];
|
|
2128
|
-
const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, (_state$
|
|
2171
|
+
const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, (_state$misc30 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc30 !== void 0 ? _state$misc30 : {}));
|
|
2129
2172
|
dispatch({
|
|
2130
2173
|
type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
|
|
2131
2174
|
payload: dynamicConfig
|
|
@@ -2141,12 +2184,12 @@ function GenricLayOut(_ref) {
|
|
|
2141
2184
|
} else if ((rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.action) === "OPEN_DRAWER") {
|
|
2142
2185
|
// Check if button has a drawerKey for custom drawer, otherwise use key for regular drawer
|
|
2143
2186
|
if (rightHeaderFirstButton !== null && rightHeaderFirstButton !== void 0 && rightHeaderFirstButton.drawerKey) {
|
|
2144
|
-
var _config$customDrawer7, _state$
|
|
2187
|
+
var _config$customDrawer7, _state$misc31;
|
|
2145
2188
|
const drawerData = config === null || config === void 0 || (_config$customDrawer7 = config.customDrawer) === null || _config$customDrawer7 === void 0 || (_config$customDrawer7 = _config$customDrawer7.data) === null || _config$customDrawer7 === void 0 ? void 0 : _config$customDrawer7[rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.drawerKey];
|
|
2146
2189
|
const {
|
|
2147
2190
|
error,
|
|
2148
2191
|
data
|
|
2149
|
-
} = await handleRightHeaderButtonClick(_objectSpread({}, (_state$
|
|
2192
|
+
} = await handleRightHeaderButtonClick(_objectSpread({}, (_state$misc31 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc31 !== void 0 ? _state$misc31 : {}));
|
|
2150
2193
|
if (drawerData) {
|
|
2151
2194
|
const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, data !== null && data !== void 0 ? data : {}));
|
|
2152
2195
|
dispatch({
|
|
@@ -2167,7 +2210,7 @@ function GenricLayOut(_ref) {
|
|
|
2167
2210
|
};
|
|
2168
2211
|
const rightHeaderSecondButtonClick = async () => {
|
|
2169
2212
|
if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
|
|
2170
|
-
var _state$dropdownSearch10, _state$inputSearch10, _state$tabs17, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data12, _tables$sorting26, _state$
|
|
2213
|
+
var _state$dropdownSearch10, _state$inputSearch10, _state$tabs17, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data12, _tables$sorting26, _state$misc32, _state$staticFilter$m12, _state$staticFilter12;
|
|
2171
2214
|
resetTabsExtraActionSwitch();
|
|
2172
2215
|
const {
|
|
2173
2216
|
error,
|
|
@@ -2191,7 +2234,7 @@ function GenricLayOut(_ref) {
|
|
|
2191
2234
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
2192
2235
|
}), {}, {
|
|
2193
2236
|
order: tables === null || tables === void 0 || (_tables$sorting26 = tables.sorting) === null || _tables$sorting26 === void 0 ? void 0 : _tables$sorting26.sortDirection
|
|
2194
|
-
}, (_state$
|
|
2237
|
+
}, (_state$misc32 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc32 !== void 0 ? _state$misc32 : {}), {}, {
|
|
2195
2238
|
multiSelectValue: (_state$staticFilter$m12 = state === null || state === void 0 || (_state$staticFilter12 = state.staticFilter) === null || _state$staticFilter12 === void 0 ? void 0 : _state$staticFilter12.multiSelectValue) !== null && _state$staticFilter$m12 !== void 0 ? _state$staticFilter$m12 : []
|
|
2196
2239
|
}));
|
|
2197
2240
|
if (error) {
|
|
@@ -2229,8 +2272,8 @@ function GenricLayOut(_ref) {
|
|
|
2229
2272
|
var _config$customDrawer9;
|
|
2230
2273
|
const drawerData = config === null || config === void 0 || (_config$customDrawer9 = config.customDrawer) === null || _config$customDrawer9 === void 0 || (_config$customDrawer9 = _config$customDrawer9.data) === null || _config$customDrawer9 === void 0 ? void 0 : _config$customDrawer9[buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.drawerKey];
|
|
2231
2274
|
if (drawerData) {
|
|
2232
|
-
var _state$
|
|
2233
|
-
const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, (_state$
|
|
2275
|
+
var _state$misc33;
|
|
2276
|
+
const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, (_state$misc33 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc33 !== void 0 ? _state$misc33 : {}));
|
|
2234
2277
|
dispatch({
|
|
2235
2278
|
type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
|
|
2236
2279
|
payload: dynamicConfig
|
|
@@ -2279,11 +2322,11 @@ function GenricLayOut(_ref) {
|
|
|
2279
2322
|
return;
|
|
2280
2323
|
}
|
|
2281
2324
|
if (customHandler) {
|
|
2282
|
-
var _state$
|
|
2325
|
+
var _state$misc34;
|
|
2283
2326
|
const {
|
|
2284
2327
|
error,
|
|
2285
2328
|
data
|
|
2286
|
-
} = await customHandler(_objectSpread(_objectSpread({}, state), (_state$
|
|
2329
|
+
} = await customHandler(_objectSpread(_objectSpread({}, state), (_state$misc34 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc34 !== void 0 ? _state$misc34 : {}));
|
|
2287
2330
|
if (error) {
|
|
2288
2331
|
showErrorNotification(error);
|
|
2289
2332
|
} else if (data !== null && data !== void 0 && data.message) {
|
|
@@ -2365,7 +2408,7 @@ function GenricLayOut(_ref) {
|
|
|
2365
2408
|
};
|
|
2366
2409
|
const handleSubHeadingSelect = async val => {
|
|
2367
2410
|
if (val) {
|
|
2368
|
-
var _state$tabs18, _tables$pagination13, _tables$pagination14, _state$
|
|
2411
|
+
var _state$tabs18, _tables$pagination13, _tables$pagination14, _state$misc35;
|
|
2369
2412
|
dispatch({
|
|
2370
2413
|
type: _layoutReducer.actionTypes.SET_SUBHEADING_SELECTED_CONFIG,
|
|
2371
2414
|
payload: val
|
|
@@ -2379,7 +2422,7 @@ function GenricLayOut(_ref) {
|
|
|
2379
2422
|
current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
|
|
2380
2423
|
pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
|
|
2381
2424
|
subHeadingSelectVal: val
|
|
2382
|
-
}, (_state$
|
|
2425
|
+
}, (_state$misc35 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc35 !== void 0 ? _state$misc35 : {}));
|
|
2383
2426
|
if (error) {
|
|
2384
2427
|
showErrorNotification(error);
|
|
2385
2428
|
dispatch({
|
|
@@ -2416,7 +2459,7 @@ function GenricLayOut(_ref) {
|
|
|
2416
2459
|
|
|
2417
2460
|
// Call the handler if provided
|
|
2418
2461
|
if (handleTableChange) {
|
|
2419
|
-
var _state$dropdownSearch11, _state$inputSearch11, _state$tabs19, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$
|
|
2462
|
+
var _state$dropdownSearch11, _state$inputSearch11, _state$tabs19, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc36;
|
|
2420
2463
|
dispatch({
|
|
2421
2464
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
2422
2465
|
payload: true
|
|
@@ -2438,7 +2481,7 @@ function GenricLayOut(_ref) {
|
|
|
2438
2481
|
order: tables === null || tables === void 0 || (_tables$sorting28 = tables.sorting) === null || _tables$sorting28 === void 0 ? void 0 : _tables$sorting28.sortDirection
|
|
2439
2482
|
}, (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" ? {
|
|
2440
2483
|
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
|
|
2441
|
-
} : {}), (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$
|
|
2484
|
+
} : {}), (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$misc36 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc36 !== void 0 ? _state$misc36 : {}), {}, {
|
|
2442
2485
|
staticFilter: filterValue,
|
|
2443
2486
|
// Pass static filter value
|
|
2444
2487
|
multiSelectValue: multiSelectValue
|
|
@@ -2483,7 +2526,7 @@ function GenricLayOut(_ref) {
|
|
|
2483
2526
|
}
|
|
2484
2527
|
});
|
|
2485
2528
|
if (handleTableChange) {
|
|
2486
|
-
var _state$dropdownSearch12, _state$inputSearch12, _state$tabs20, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data13, _customDrawer$applied11, _state$
|
|
2529
|
+
var _state$dropdownSearch12, _state$inputSearch12, _state$tabs20, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data13, _customDrawer$applied11, _state$misc37, _state$staticFilter$m13, _state$staticFilter13;
|
|
2487
2530
|
const {
|
|
2488
2531
|
error,
|
|
2489
2532
|
data
|
|
@@ -2503,7 +2546,7 @@ function GenricLayOut(_ref) {
|
|
|
2503
2546
|
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
|
|
2504
2547
|
} : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data13 = staticFilter.data) === null || _staticFilter$data13 === void 0 || (_staticFilter$data13 = _staticFilter$data13.find(item => item.selected)) === null || _staticFilter$data13 === void 0 ? void 0 : _staticFilter$data13.value) && {
|
|
2505
2548
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
2506
|
-
}), (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$
|
|
2549
|
+
}), (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$misc37 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc37 !== void 0 ? _state$misc37 : {}), {}, {
|
|
2507
2550
|
multiSelectValue: (_state$staticFilter$m13 = state === null || state === void 0 || (_state$staticFilter13 = state.staticFilter) === null || _state$staticFilter13 === void 0 ? void 0 : _state$staticFilter13.multiSelectValue) !== null && _state$staticFilter$m13 !== void 0 ? _state$staticFilter$m13 : []
|
|
2508
2551
|
}));
|
|
2509
2552
|
if (error) {
|
|
@@ -2534,7 +2577,7 @@ function GenricLayOut(_ref) {
|
|
|
2534
2577
|
console.log(state, "GenricLayOutstate");
|
|
2535
2578
|
return /*#__PURE__*/_react.default.createElement(_styles.OapageWithDataStyle, {
|
|
2536
2579
|
marginBottom: infoPanel !== null && infoPanel !== void 0 && infoPanel.bottomMarginRequired ? "18px" : "0",
|
|
2537
|
-
className: (state === null || state === void 0 || (_state$
|
|
2580
|
+
className: (state === null || state === void 0 || (_state$misc38 = state.misc) === null || _state$misc38 === void 0 ? void 0 : _state$misc38.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
|
|
2538
2581
|
}, /*#__PURE__*/_react.default.createElement(_styles.DrawerWithOutFooter, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
2539
2582
|
className: "fullPageLayout"
|
|
2540
2583
|
}, /*#__PURE__*/_react.default.createElement(_GlobalCss.default, null, (sidebar === null || sidebar === void 0 ? void 0 : sidebar.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
|
|
@@ -2620,14 +2663,14 @@ function GenricLayOut(_ref) {
|
|
|
2620
2663
|
closable: infoData === null || infoData === void 0 ? void 0 : infoData.closable,
|
|
2621
2664
|
description: infoData === null || infoData === void 0 ? void 0 : infoData.description,
|
|
2622
2665
|
className: infoData === null || infoData === void 0 ? void 0 : infoData.className,
|
|
2666
|
+
closeIconPosition: infoData === null || infoData === void 0 ? void 0 : infoData.closeIconPosition,
|
|
2623
2667
|
iconConfig: {
|
|
2624
2668
|
icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
2625
2669
|
color: (infoData === null || infoData === void 0 || (_infoData$iconConfig = infoData.iconConfig) === null || _infoData$iconConfig === void 0 ? void 0 : _infoData$iconConfig.color) || "primary-content",
|
|
2626
2670
|
icon: infoData === null || infoData === void 0 || (_infoData$iconConfig2 = infoData.iconConfig) === null || _infoData$iconConfig2 === void 0 ? void 0 : _infoData$iconConfig2.icon,
|
|
2627
2671
|
size: (infoData === null || infoData === void 0 || (_infoData$iconConfig3 = infoData.iconConfig) === null || _infoData$iconConfig3 === void 0 ? void 0 : _infoData$iconConfig3.size) || 16
|
|
2628
2672
|
}),
|
|
2629
|
-
position: (infoData === null || infoData === void 0 || (_infoData$iconConfig4 = infoData.iconConfig) === null || _infoData$iconConfig4 === void 0 ? void 0 : _infoData$iconConfig4.position) || "left"
|
|
2630
|
-
closeIconPosition: infoData === null || infoData === void 0 ? void 0 : infoData.closeIconPosition
|
|
2673
|
+
position: (infoData === null || infoData === void 0 || (_infoData$iconConfig4 = infoData.iconConfig) === null || _infoData$iconConfig4 === void 0 ? void 0 : _infoData$iconConfig4.position) || "left"
|
|
2631
2674
|
}
|
|
2632
2675
|
})), (cards === null || cards === void 0 ? void 0 : cards.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
|
|
2633
2676
|
loading: state === null || state === void 0 ? void 0 : state.isLoading,
|
|
@@ -2803,7 +2846,7 @@ function GenricLayOut(_ref) {
|
|
|
2803
2846
|
}
|
|
2804
2847
|
// Call handleTabExtraActionChange
|
|
2805
2848
|
if (handleTabExtraActionChange) {
|
|
2806
|
-
var _tables$pagination17, _tables$pagination18, _tables$sorting31, _tables$sorting32, _tables$filter13, _staticFilter$data14, _state$
|
|
2849
|
+
var _tables$pagination17, _tables$pagination18, _tables$sorting31, _tables$sorting32, _tables$filter13, _staticFilter$data14, _state$misc39;
|
|
2807
2850
|
dispatch({
|
|
2808
2851
|
type: _layoutReducer.actionTypes.SET_LOADING,
|
|
2809
2852
|
payload: true
|
|
@@ -2822,7 +2865,7 @@ function GenricLayOut(_ref) {
|
|
|
2822
2865
|
columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
|
|
2823
2866
|
}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data14 = staticFilter.data) === null || _staticFilter$data14 === void 0 || (_staticFilter$data14 = _staticFilter$data14.find(item => item.selected)) === null || _staticFilter$data14 === void 0 ? void 0 : _staticFilter$data14.value) && {
|
|
2824
2867
|
staticFilter: staticFilter.data.find(item => item.selected).value
|
|
2825
|
-
}), (_state$
|
|
2868
|
+
}), (_state$misc39 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc39 !== void 0 ? _state$misc39 : {}));
|
|
2826
2869
|
if (error) {
|
|
2827
2870
|
showErrorNotification(error);
|
|
2828
2871
|
dispatch({
|