oa-componentbook 1.0.1-stage.432 → 1.0.1-stage.433

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.
@@ -245,6 +245,7 @@ function CustomTableV1(_ref2) {
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, {
248
+ style: _objectSpread({}, typeof getByPath(record, option === null || option === void 0 ? void 0 : option.key) === "object" ? getByPath(record, option === null || option === void 0 ? void 0 : option.key) : {}),
248
249
  disabled: (record === null || record === void 0 ? void 0 : record[option === null || option === void 0 ? void 0 : option.disabled]) || false,
249
250
  type: (option === null || option === void 0 ? void 0 : option.subType) || "primary",
250
251
  label: (option === null || option === void 0 ? void 0 : option.label) || (record === null || record === void 0 ? void 0 : record[option === null || option === void 0 ? void 0 : option.key]) || "",
@@ -53,7 +53,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
53
53
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
54
54
  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 */
55
55
  function GenricLayOut(_ref) {
56
- var _state$misc31, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables7, _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;
56
+ var _state$misc30, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables5, _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;
57
57
  let {
58
58
  config,
59
59
  getInitialData,
@@ -960,37 +960,22 @@ function GenricLayOut(_ref) {
960
960
  }
961
961
  } else if ((configArgs === null || configArgs === void 0 ? void 0 : configArgs.action) === "CHANGE_ROW") {
962
962
  if (handleTableColumnClick) {
963
- var _state$misc14;
963
+ var _state$tables2, _state$misc14;
964
964
  const {
965
965
  error,
966
966
  data
967
967
  } = await (handleTableColumnClick === null || handleTableColumnClick === void 0 ? void 0 : handleTableColumnClick(_objectSpread({
968
+ tables: (_state$tables2 = state === null || state === void 0 ? void 0 : state.tables) !== null && _state$tables2 !== void 0 ? _state$tables2 : {},
968
969
  record: record,
969
970
  type: configArgs === null || configArgs === void 0 ? void 0 : configArgs.call
970
971
  }, (_state$misc14 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc14 !== void 0 ? _state$misc14 : {})));
971
972
  if (error) {
972
973
  showErrorNotification(error);
973
974
  } else {
974
- var _state$tables2, _state$tables3, _state$misc15;
975
- const {
976
- error,
977
- data: tableData
978
- } = await (handleActionOnTableCTAClick === null || handleActionOnTableCTAClick === void 0 ? void 0 : handleActionOnTableCTAClick(_objectSpread({
979
- record: state === null || state === void 0 || (_state$tables2 = state.tables) === null || _state$tables2 === void 0 ? void 0 : _state$tables2.data,
980
- currentChange: data,
981
- type: "changeRow",
982
- tableConfig: state === null || state === void 0 || (_state$tables3 = state.tables) === null || _state$tables3 === void 0 ? void 0 : _state$tables3.columns
983
- }, (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {})));
984
- console.log("tableData", tableData);
985
- if (error) {
986
- showErrorNotification(error);
987
- } else {
988
- var _tableData$record, _state$tables4;
989
- dispatch({
990
- type: _layoutReducer.actionTypes.CHANGE_ROW,
991
- payload: (_tableData$record = tableData === null || tableData === void 0 ? void 0 : tableData.record) !== null && _tableData$record !== void 0 ? _tableData$record : [...(state === null || state === void 0 || (_state$tables4 = state.tables) === null || _state$tables4 === void 0 ? void 0 : _state$tables4.data)]
992
- });
993
- }
975
+ dispatch({
976
+ type: _layoutReducer.actionTypes.CHANGE_ROW,
977
+ payload: data
978
+ });
994
979
  }
995
980
  }
996
981
  }
@@ -1058,11 +1043,11 @@ function GenricLayOut(_ref) {
1058
1043
  }
1059
1044
  } else if ((configData === null || configData === void 0 ? void 0 : configData.action) === "ACTION_ON_CTA") {
1060
1045
  if (handleTableFooterApi) {
1061
- var _state$tables5;
1046
+ var _state$tables3;
1062
1047
  const {
1063
1048
  error,
1064
1049
  data
1065
- } = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state === null || state === void 0 || (_state$tables5 = state.tables) === null || _state$tables5 === void 0 ? void 0 : _state$tables5.selectedRowKeys, state));
1050
+ } = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state === null || state === void 0 || (_state$tables3 = state.tables) === null || _state$tables3 === void 0 ? void 0 : _state$tables3.selectedRowKeys, state));
1066
1051
  if (error) {
1067
1052
  showErrorNotification(error);
1068
1053
  } else {
@@ -1160,7 +1145,7 @@ function GenricLayOut(_ref) {
1160
1145
  }
1161
1146
  });
1162
1147
  if (handleTableChange) {
1163
- var _state$dropdownSearch3, _state$inputSearch4, _state$tabs8, _header$subHeading15, _header$subHeading16, _staticFilter$data6, _customDrawer$applied8, _state$misc16, _state$staticFilter$m5, _state$staticFilter5;
1148
+ var _state$dropdownSearch3, _state$inputSearch4, _state$tabs8, _header$subHeading15, _header$subHeading16, _staticFilter$data6, _customDrawer$applied8, _state$misc15, _state$staticFilter$m5, _state$staticFilter5;
1164
1149
  dispatch({
1165
1150
  type: _layoutReducer.actionTypes.SET_LOADING,
1166
1151
  payload: true
@@ -1185,7 +1170,7 @@ function GenricLayOut(_ref) {
1185
1170
  staticFilter: staticFilter.data.find(item => item.selected).value
1186
1171
  }), (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)), {}, {
1187
1172
  order: (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "ascend" && "ASC" || (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "descend" && "DESC" || ""
1188
- }, (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}), {}, {
1173
+ }, (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {}), {}, {
1189
1174
  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 : []
1190
1175
  }));
1191
1176
  if (error) {
@@ -1268,7 +1253,7 @@ function GenricLayOut(_ref) {
1268
1253
  });
1269
1254
  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;
1270
1255
  if (handleTabClick) {
1271
- 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;
1256
+ var _state$misc16, _tables$pagination, _tables$pagination2, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _header$subHeading17, _header$subHeading18, _customDrawer$applied9, _state$misc17, _state$staticFilter$m6, _state$staticFilter6;
1272
1257
  dispatch({
1273
1258
  type: _layoutReducer.actionTypes.SET_LOADING,
1274
1259
  payload: true
@@ -1276,7 +1261,7 @@ function GenricLayOut(_ref) {
1276
1261
  const {
1277
1262
  error,
1278
1263
  data
1279
- } = 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 : {}), {}, {
1264
+ } = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}), {}, {
1280
1265
  selectedTab: key,
1281
1266
  current: tables === null || tables === void 0 || (_tables$pagination = tables.pagination) === null || _tables$pagination === void 0 ? void 0 : _tables$pagination.current,
1282
1267
  pageSize: tables === null || tables === void 0 || (_tables$pagination2 = tables.pagination) === null || _tables$pagination2 === void 0 ? void 0 : _tables$pagination2.pageSize,
@@ -1290,7 +1275,7 @@ function GenricLayOut(_ref) {
1290
1275
  selectedOption: state.dropdownSearch.selectedOption
1291
1276
  }), (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" ? {
1292
1277
  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
1293
- } : {}), (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 : {}), {}, {
1278
+ } : {}), (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$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {}), {}, {
1294
1279
  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 : []
1295
1280
  }));
1296
1281
  if (error) {
@@ -1386,11 +1371,11 @@ function GenricLayOut(_ref) {
1386
1371
  return;
1387
1372
  }
1388
1373
  if (handleDrawerFormOnFinish) {
1389
- var _state$misc19;
1374
+ var _state$misc18;
1390
1375
  const {
1391
1376
  error,
1392
1377
  data
1393
- } = 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 : {})));
1378
+ } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$misc18 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc18 !== void 0 ? _state$misc18 : {})));
1394
1379
  if (error) {
1395
1380
  showErrorNotification(error);
1396
1381
  } else {
@@ -1414,7 +1399,7 @@ function GenricLayOut(_ref) {
1414
1399
 
1415
1400
  // If there are remaining filters, reapply them
1416
1401
  if (Object.keys(currentFilters).length > 0) {
1417
- 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;
1402
+ var _state$dropdownSearch5, _state$inputSearch5, _state$tabs11, _tables$pagination3, _tables$pagination4, _tables$filter6, _tables$sorting15, _header$subHeading19, _header$subHeading20, _staticFilter$data7, _tables$sorting16, _state$misc19, _state$staticFilter$m7, _state$staticFilter7;
1418
1403
  const {
1419
1404
  error,
1420
1405
  data
@@ -1440,7 +1425,7 @@ function GenricLayOut(_ref) {
1440
1425
  staticFilter: staticFilter.data.find(item => item.selected).value
1441
1426
  }), {}, {
1442
1427
  order: tables === null || tables === void 0 || (_tables$sorting16 = tables.sorting) === null || _tables$sorting16 === void 0 ? void 0 : _tables$sorting16.sortDirection
1443
- }, (_state$misc20 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc20 !== void 0 ? _state$misc20 : {}), {}, {
1428
+ }, (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {}), {}, {
1444
1429
  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 : []
1445
1430
  }));
1446
1431
  if (error) {
@@ -1474,7 +1459,7 @@ function GenricLayOut(_ref) {
1474
1459
  const filterFormOnFinish = async formData => {
1475
1460
  // Check if this is a cancel/clear action - check both buttonClickType and the actual button data
1476
1461
  if (formData.type === "FILTER-CANCEL") {
1477
- 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;
1462
+ var _state$dropdownSearch6, _state$inputSearch6, _state$tabs12, _tables$pagination5, _tables$pagination6, _tables$filter7, _tables$sorting17, _header$subHeading21, _header$subHeading22, _staticFilter$data8, _tables$sorting18, _state$misc20, _state$staticFilter$m8, _state$staticFilter8;
1478
1463
  if (isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)) {
1479
1464
  dispatch({
1480
1465
  type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
@@ -1503,7 +1488,7 @@ function GenricLayOut(_ref) {
1503
1488
  staticFilter: staticFilter.data.find(item => item.selected).value
1504
1489
  }), {}, {
1505
1490
  order: tables === null || tables === void 0 || (_tables$sorting18 = tables.sorting) === null || _tables$sorting18 === void 0 ? void 0 : _tables$sorting18.sortDirection
1506
- }, (_state$misc21 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc21 !== void 0 ? _state$misc21 : {}), {}, {
1491
+ }, (_state$misc20 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc20 !== void 0 ? _state$misc20 : {}), {}, {
1507
1492
  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 : []
1508
1493
  }));
1509
1494
  if (error) {
@@ -1553,7 +1538,7 @@ function GenricLayOut(_ref) {
1553
1538
 
1554
1539
  // Only process filter data if this is actually a filter drawer
1555
1540
  if (formData.type === "FILTER-SUBMIT") {
1556
- var _state$dropdownSearch7, _state$inputSearch7, _ref4, _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;
1541
+ var _state$dropdownSearch7, _state$inputSearch7, _ref4, _appliedFilters$filte, _state$tabs13, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data9, _tables$sorting20, _state$misc21, _state$staticFilter$m9, _state$staticFilter9;
1557
1542
  const appliedFilters = {};
1558
1543
  Object.keys(formData).forEach(key => {
1559
1544
  const value = formData[key];
@@ -1592,7 +1577,7 @@ function GenricLayOut(_ref) {
1592
1577
  staticFilter: staticFilter.data.find(item => item.selected).value
1593
1578
  }), {}, {
1594
1579
  order: tables === null || tables === void 0 || (_tables$sorting20 = tables.sorting) === null || _tables$sorting20 === void 0 ? void 0 : _tables$sorting20.sortDirection
1595
- }, (_state$misc22 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc22 !== void 0 ? _state$misc22 : {}), {}, {
1580
+ }, (_state$misc21 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc21 !== void 0 ? _state$misc21 : {}), {}, {
1596
1581
  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 : []
1597
1582
  }));
1598
1583
  if (error) {
@@ -1647,7 +1632,7 @@ function GenricLayOut(_ref) {
1647
1632
  }
1648
1633
  });
1649
1634
  if (handleSecondaryTableCTAClick) {
1650
- 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;
1635
+ var _state$dropdownSearch8, _state$inputSearch8, _state$tabs14, _tables$pagination7, _tables$pagination8, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading25, _header$subHeading26, _staticFilter$data10, _state$misc22, _state$staticFilter$m10, _state$staticFilter10;
1651
1636
  const {
1652
1637
  error,
1653
1638
  data
@@ -1672,7 +1657,7 @@ function GenricLayOut(_ref) {
1672
1657
  toDate: formData === null || formData === void 0 ? void 0 : formData.toDate
1673
1658
  }, appliedFilters), (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
1674
1659
  exportType: formData === null || formData === void 0 ? void 0 : formData.exportType
1675
- }), (_state$misc23 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc23 !== void 0 ? _state$misc23 : {}), {}, {
1660
+ }), (_state$misc22 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc22 !== void 0 ? _state$misc22 : {}), {}, {
1676
1661
  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 : []
1677
1662
  })));
1678
1663
  if (error) {
@@ -1688,7 +1673,7 @@ function GenricLayOut(_ref) {
1688
1673
  }
1689
1674
  };
1690
1675
  const onClearAllAppliedFilters = async () => {
1691
- var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$misc24, _state$staticFilter$m11, _state$staticFilter11;
1676
+ var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$misc23, _state$staticFilter$m11, _state$staticFilter11;
1692
1677
  const {
1693
1678
  error,
1694
1679
  data
@@ -1711,7 +1696,7 @@ function GenricLayOut(_ref) {
1711
1696
  staticFilter: staticFilter.data.find(item => item.selected).value
1712
1697
  }), {}, {
1713
1698
  order: tables === null || tables === void 0 || (_tables$sorting24 = tables.sorting) === null || _tables$sorting24 === void 0 ? void 0 : _tables$sorting24.sortDirection
1714
- }, (_state$misc24 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc24 !== void 0 ? _state$misc24 : {}), {}, {
1699
+ }, (_state$misc23 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc23 !== void 0 ? _state$misc23 : {}), {}, {
1715
1700
  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 : []
1716
1701
  }));
1717
1702
  if (error) {
@@ -1770,14 +1755,14 @@ function GenricLayOut(_ref) {
1770
1755
  return;
1771
1756
  } else if (action === "CLOSE_MODAL_AND_FETCH") {
1772
1757
  if (handleModalCloseSuccess) {
1773
- var _stateRef$current, _state$misc25;
1758
+ var _stateRef$current, _state$misc24;
1774
1759
  const {
1775
1760
  error,
1776
1761
  data
1777
1762
  } = await (handleModalCloseSuccess === null || handleModalCloseSuccess === void 0 ? void 0 : handleModalCloseSuccess(_objectSpread({
1778
1763
  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,
1779
1764
  call: buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.call
1780
- }, (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {})));
1765
+ }, (_state$misc24 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc24 !== void 0 ? _state$misc24 : {})));
1781
1766
  if (error) {
1782
1767
  showErrorNotification(error);
1783
1768
  } else {
@@ -1791,11 +1776,11 @@ function GenricLayOut(_ref) {
1791
1776
  }
1792
1777
  } else {
1793
1778
  if (handleDrawerFormOnFinish) {
1794
- var _state$tables$selecte, _state$tables6, _state$misc26;
1779
+ var _state$tables$selecte, _state$tables4, _state$misc25;
1795
1780
  let req = {};
1796
1781
  req.type = "APPROVE";
1797
- req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$tables6 = state.tables) === null || _state$tables6 === void 0 || (_state$tables6 = _state$tables6.selectedRowKeys) === null || _state$tables6 === void 0 ? void 0 : _state$tables6.map(item => item.orderUUID)) !== null && _state$tables$selecte !== void 0 ? _state$tables$selecte : [];
1798
- req.misc = (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {};
1782
+ 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 : [];
1783
+ req.misc = (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {};
1799
1784
  const {
1800
1785
  error,
1801
1786
  data
@@ -1909,7 +1894,7 @@ function GenricLayOut(_ref) {
1909
1894
  };
1910
1895
  const rightHeaderSecondButtonClick = async () => {
1911
1896
  if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
1912
- var _state$dropdownSearch10, _state$inputSearch10, _state$tabs16, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data12, _tables$sorting26, _state$misc27, _state$staticFilter$m12, _state$staticFilter12;
1897
+ var _state$dropdownSearch10, _state$inputSearch10, _state$tabs16, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data12, _tables$sorting26, _state$misc26, _state$staticFilter$m12, _state$staticFilter12;
1913
1898
  const {
1914
1899
  error,
1915
1900
  data
@@ -1932,7 +1917,7 @@ function GenricLayOut(_ref) {
1932
1917
  staticFilter: staticFilter.data.find(item => item.selected).value
1933
1918
  }), {}, {
1934
1919
  order: tables === null || tables === void 0 || (_tables$sorting26 = tables.sorting) === null || _tables$sorting26 === void 0 ? void 0 : _tables$sorting26.sortDirection
1935
- }, (_state$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {}), {}, {
1920
+ }, (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {}), {}, {
1936
1921
  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 : []
1937
1922
  }));
1938
1923
  if (error) {
@@ -1985,7 +1970,7 @@ function GenricLayOut(_ref) {
1985
1970
  };
1986
1971
  const handleSubHeadingSelect = async val => {
1987
1972
  if (val) {
1988
- var _state$tabs17, _tables$pagination13, _tables$pagination14, _state$misc28;
1973
+ var _state$tabs17, _tables$pagination13, _tables$pagination14, _state$misc27;
1989
1974
  dispatch({
1990
1975
  type: _layoutReducer.actionTypes.SET_SUBHEADING_SELECTED_CONFIG,
1991
1976
  payload: val
@@ -1999,7 +1984,7 @@ function GenricLayOut(_ref) {
1999
1984
  current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
2000
1985
  pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
2001
1986
  subHeadingSelectVal: val
2002
- }, (_state$misc28 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc28 !== void 0 ? _state$misc28 : {}));
1987
+ }, (_state$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {}));
2003
1988
  if (error) {
2004
1989
  showErrorNotification(error);
2005
1990
  dispatch({
@@ -2035,7 +2020,7 @@ function GenricLayOut(_ref) {
2035
2020
 
2036
2021
  // Call the handler if provided
2037
2022
  if (handleTableChange) {
2038
- var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc29;
2023
+ var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc28;
2039
2024
  dispatch({
2040
2025
  type: _layoutReducer.actionTypes.SET_LOADING,
2041
2026
  payload: true
@@ -2057,7 +2042,7 @@ function GenricLayOut(_ref) {
2057
2042
  order: tables === null || tables === void 0 || (_tables$sorting28 = tables.sorting) === null || _tables$sorting28 === void 0 ? void 0 : _tables$sorting28.sortDirection
2058
2043
  }, (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" ? {
2059
2044
  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
2060
- } : {}), (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$misc29 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc29 !== void 0 ? _state$misc29 : {}), {}, {
2045
+ } : {}), (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$misc28 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc28 !== void 0 ? _state$misc28 : {}), {}, {
2061
2046
  staticFilter: filterValue,
2062
2047
  // Pass static filter value
2063
2048
  multiSelectValue: multiSelectValue
@@ -2101,7 +2086,7 @@ function GenricLayOut(_ref) {
2101
2086
  }
2102
2087
  });
2103
2088
  if (handleTableChange) {
2104
- var _state$dropdownSearch12, _state$inputSearch12, _state$tabs19, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data13, _customDrawer$applied11, _state$misc30, _state$staticFilter$m13, _state$staticFilter13;
2089
+ var _state$dropdownSearch12, _state$inputSearch12, _state$tabs19, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data13, _customDrawer$applied11, _state$misc29, _state$staticFilter$m13, _state$staticFilter13;
2105
2090
  const {
2106
2091
  error,
2107
2092
  data
@@ -2121,7 +2106,7 @@ function GenricLayOut(_ref) {
2121
2106
  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
2122
2107
  } : {}), (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) && {
2123
2108
  staticFilter: staticFilter.data.find(item => item.selected).value
2124
- }), (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$misc30 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc30 !== void 0 ? _state$misc30 : {}), {}, {
2109
+ }), (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$misc29 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc29 !== void 0 ? _state$misc29 : {}), {}, {
2125
2110
  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 : []
2126
2111
  }));
2127
2112
  if (error) {
@@ -2152,7 +2137,7 @@ function GenricLayOut(_ref) {
2152
2137
  console.log(state, "GenricLayOutstate");
2153
2138
  return /*#__PURE__*/_react.default.createElement(_styles.OapageWithDataStyle, {
2154
2139
  marginBottom: infoPanel !== null && infoPanel !== void 0 && infoPanel.bottomMarginRequired ? "18px" : "0",
2155
- className: (state === null || state === void 0 || (_state$misc31 = state.misc) === null || _state$misc31 === void 0 ? void 0 : _state$misc31.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2140
+ className: (state === null || state === void 0 || (_state$misc30 = state.misc) === null || _state$misc30 === void 0 ? void 0 : _state$misc30.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2156
2141
  }, /*#__PURE__*/_react.default.createElement(_styles.DrawerWithOutFooter, null), /*#__PURE__*/_react.default.createElement("div", {
2157
2142
  className: "fullPageLayout"
2158
2143
  }, /*#__PURE__*/_react.default.createElement(_GlobalCss.default, null, (sidebar === null || sidebar === void 0 ? void 0 : sidebar.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
@@ -2345,7 +2330,7 @@ function GenricLayOut(_ref) {
2345
2330
  onChange: onTableChange,
2346
2331
  customTableChange: customTableChange,
2347
2332
  pagination: tables === null || tables === void 0 ? void 0 : tables.pagination,
2348
- selectedRows: (state === null || state === void 0 || (_state$tables7 = state.tables) === null || _state$tables7 === void 0 ? void 0 : _state$tables7.selectedRowKeys) || [],
2333
+ selectedRows: (state === null || state === void 0 || (_state$tables5 = state.tables) === null || _state$tables5 === void 0 ? void 0 : _state$tables5.selectedRowKeys) || [],
2349
2334
  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({
2350
2335
  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]
2351
2336
  }, rowSelection),
@@ -302,8 +302,7 @@ const genericLayoutReducer = exports.genericLayoutReducer = (0, _immer.produce)(
302
302
  draft.profileData = _objectSpread(_objectSpread({}, draft.profileData), action.payload);
303
303
  break;
304
304
  case actionTypes.CHANGE_ROW:
305
- console.log("Row changed to:", action.payload);
306
- draft.tables.data = action.payload;
305
+ draft.tables = action.payload.tables;
307
306
  break;
308
307
  default:
309
308
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "1.0.1-stage.432",
3
+ "version": "1.0.1-stage.433",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",