oa-componentbook 0.18.382 → 0.18.383

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.
@@ -15,7 +15,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
15
15
  /**
16
16
  * Styled container for the details panel
17
17
  */
18
- const PanelContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: var(--color-background, #fff);\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n\n .panel-title {\n margin: 0 0 24px 0;\n }\n\n .table-container {\n border: 1px solid var(--color-border, #e8e8e8);\n border-radius: 4px;\n overflow: hidden;\n margin-bottom: 24px;\n }\n\n .section-header {\n background: var(--color-background-secondary, #f5f5f5);\n padding: 12px 16px;\n margin: 0;\n border-bottom: 1px solid var(--color-border, #e8e8e8);\n }\n\n .details-table {\n width: 100%;\n margin: 0;\n border-collapse: collapse;\n background: var(--color-background, #fff);\n }\n\n .details-row {\n border-bottom: 1px solid var(--color-border-light, #f0f0f0);\n }\n\n .details-row:last-child {\n border-bottom: none;\n }\n\n .details-label {\n width: 140px;\n min-width: 140px;\n padding: 16px;\n padding-right: 16px;\n text-align: left;\n vertical-align: top;\n }\n\n .details-value {\n padding: 16px;\n word-break: break-word;\n font-weight: 500;\n vertical-align: top;\n }\n\n .details-actions {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 0;\n padding-top: 0;\n border-top: none;\n }\n\n .details-actions button {\n padding: 0;\n color: #1890ff !important;\n }\n .details-actions button:hover {\n color: #1890ff !important;\n }\n\n .children-container {\n margin-top: 24px;\n }\n"])));
18
+ const PanelContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: var(--color-background, #fff);\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n\n .panel-title {\n margin: 0 0 24px 0;\n }\n\n .table-container {\n border: 1px solid var(--color-border, #e8e8e8);\n border-radius: 4px;\n overflow: hidden;\n margin-bottom: 24px;\n }\n\n .section-header {\n background: var(--color-background-secondary, #f5f5f5);\n padding: 12px 16px;\n margin: 0;\n border-bottom: 1px solid var(--color-border, #e8e8e8);\n }\n\n .details-table {\n width: 100%;\n margin: 0;\n border-collapse: collapse;\n background: var(--color-background, #fff);\n }\n\n .details-row {\n border-bottom: 1px solid var(--color-border-light, #f0f0f0);\n }\n\n .details-row:last-child {\n border-bottom: none;\n }\n\n .details-label {\n width: 140px;\n min-width: 140px;\n padding: 16px;\n padding-right: 16px;\n text-align: left;\n vertical-align: top;\n }\n\n .details-value {\n padding: 16px;\n word-break: break-word;\n font-weight: 500;\n vertical-align: top;\n }\n\n .details-actions {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 0;\n padding-top: 0;\n border-top: none;\n }\n\n\n .children-container {\n margin-top: 24px;\n }\n"])));
19
19
 
20
20
  /**
21
21
  * DocumentDetailsPanel Component
@@ -263,7 +263,6 @@ function CustomTableV1(_ref2) {
263
263
  case "tag":
264
264
  const tagType = typeof subType === "function" ? subType(_, record) : subType;
265
265
  const tagLabel = label || _;
266
- console.log("tagLabel", tagLabel);
267
266
  return tagLabel ? /*#__PURE__*/_react.default.createElement(_CustomTag.default, {
268
267
  key: index,
269
268
  label: tagLabel,
@@ -421,10 +421,6 @@ function TableWithSearchAndFilter(_ref) {
421
421
  icon: _FilterList.default
422
422
  }),
423
423
  position: 'left'
424
- },
425
- style: {
426
- borderColor: '#1890ff',
427
- color: '#1890ff'
428
424
  }
429
425
  }), hasAppliedFilters && /*#__PURE__*/_react.default.createElement(_styles.FilterIndicatorDot, null))), showFilters && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
430
426
  title: filterDrawerTitle,
@@ -437,6 +433,7 @@ function TableWithSearchAndFilter(_ref) {
437
433
  width: 400,
438
434
  buttonConfig: filterDrawerButtonConfig
439
435
  }, /*#__PURE__*/_react.default.createElement(_styles.FilterDrawerContent, null, /*#__PURE__*/_react.default.createElement(_styles.FilterDrawerBody, null, filterConfig.length > 0 ? filterConfig.map(filter => /*#__PURE__*/_react.default.createElement(_styles.FilterSection, {
436
+ className: "formSecBox",
440
437
  key: filter.key
441
438
  }, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, filter.label, filter.required && /*#__PURE__*/_react.default.createElement(_styles.RequiredMark, null, "*")), renderFilterInput(filter))) : /*#__PURE__*/_react.default.createElement(_styles.FilterSection, null, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, "No filters configured"))))), /*#__PURE__*/_react.default.createElement(_CustomTable.default, _extends({
442
439
  rowKey: rowKey,
@@ -9,7 +9,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
11
  const TableWithSearchAndFilterContainer = exports.TableWithSearchAndFilterContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n"])));
12
- const Toolbar = exports.Toolbar = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n gap: 16px;\n\n button.secondary {\n border-color: #1890ff !important;\n color: #1890ff !important;\n }\n button.secondary:hover {\n border-color: #1890ff !important;\n color: #1890ff !important;\n }\n\n @media screen and (max-width: 768px) {\n flex-direction: column;\n align-items: stretch;\n }\n"])));
12
+ const Toolbar = exports.Toolbar = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n gap: 16px;\n\n @media screen and (max-width: 768px) {\n flex-direction: column;\n align-items: stretch;\n }\n"])));
13
13
  const FilterSection = exports.FilterSection = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-bottom: 24px;\n"])));
14
14
  const FilterLabel = exports.FilterLabel = _styledComponents.default.label(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-weight: 600;\n font-size: 14px;\n color: var(--color-primary-content, #212121);\n margin-bottom: 12px;\n"])));
15
15
  const RequiredMark = exports.RequiredMark = _styledComponents.default.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: #ff4d4f;\n margin-left: 2px;\n font-weight: 400;\n"])));
@@ -32,7 +32,6 @@ function CustomTag(_ref) {
32
32
  textColor,
33
33
  style
34
34
  } = _ref;
35
- console.log("style", style);
36
35
  return /*#__PURE__*/_react.default.createElement(_styles.StyledTag, _extends({
37
36
  "data-test": dataTest,
38
37
  type: type,
@@ -175,19 +175,34 @@ function DocumentUpload(_ref) {
175
175
  try {
176
176
  if ((file === null || file === void 0 ? void 0 : file.uid) === (files === null || files === void 0 ? void 0 : files.uid)) {
177
177
  if (generateS3Url) {
178
- var _response, _response2, _response3;
178
+ var _response, _response2, _response3, _response5, _response6, _response7;
179
179
  if (beforeUploadFileValidations && formName && !beforeUpload(file, allowedMediaType, maxAllowedSize)) {
180
180
  setLoading(false);
181
181
  return false;
182
182
  }
183
183
  let response = await generateS3Url(files.name);
184
- response = (_response = response) === null || _response === void 0 ? void 0 : _response.data;
185
- s3ResponseReturn(response);
186
- await uploadOnS3((_response2 = response) === null || _response2 === void 0 || (_response2 = _response2.response) === null || _response2 === void 0 || (_response2 = _response2.data) === null || _response2 === void 0 ? void 0 : _response2.uploadUrl, files);
187
- if (((_response3 = response) === null || _response3 === void 0 || (_response3 = _response3.response) === null || _response3 === void 0 || (_response3 = _response3.status) === null || _response3 === void 0 ? void 0 : _response3.toLowerCase()) == "success") {
184
+ // Handle error case: if response.data is null and response.error exists
185
+ if ((((_response = response) === null || _response === void 0 ? void 0 : _response.data) === null || !((_response2 = response) !== null && _response2 !== void 0 && _response2.data)) && (_response3 = response) !== null && _response3 !== void 0 && _response3.error) {
188
186
  var _response4;
187
+ openNotification({
188
+ description: ((_response4 = response) === null || _response4 === void 0 ? void 0 : _response4.error) || "Failed to generate upload URL. Please try again.",
189
+ type: "failure",
190
+ mode: "dark",
191
+ showIcon: true,
192
+ placement: "bottomRight"
193
+ });
194
+ modifiedFile.status = "failed";
195
+ modifiedFile = null;
196
+ setLoading(false);
197
+ return modifiedFile;
198
+ }
199
+ response = (_response5 = response) === null || _response5 === void 0 ? void 0 : _response5.data;
200
+ s3ResponseReturn(response);
201
+ await uploadOnS3((_response6 = response) === null || _response6 === void 0 || (_response6 = _response6.response) === null || _response6 === void 0 || (_response6 = _response6.data) === null || _response6 === void 0 ? void 0 : _response6.uploadUrl, files);
202
+ if (((_response7 = response) === null || _response7 === void 0 || (_response7 = _response7.response) === null || _response7 === void 0 || (_response7 = _response7.status) === null || _response7 === void 0 ? void 0 : _response7.toLowerCase()) == "success") {
203
+ var _response8;
189
204
  modifiedFile.status = "done";
190
- modifiedFile.s3Uid = (_response4 = response) === null || _response4 === void 0 || (_response4 = _response4.response) === null || _response4 === void 0 || (_response4 = _response4.data) === null || _response4 === void 0 ? void 0 : _response4.uuid;
205
+ modifiedFile.s3Uid = (_response8 = response) === null || _response8 === void 0 || (_response8 = _response8.response) === null || _response8 === void 0 || (_response8 = _response8.data) === null || _response8 === void 0 ? void 0 : _response8.uuid;
191
206
  if (!isImageFile(files === null || files === void 0 ? void 0 : files.name)) {
192
207
  modifiedFile.url = _PdfSampleImage.default;
193
208
  }
@@ -38,6 +38,8 @@ var _downloadFile = _interopRequireDefault(require("../../utils/download-file"))
38
38
  var _AppliedFilters = _interopRequireDefault(require("./components/AppliedFilters"));
39
39
  var _ProfileSection = _interopRequireDefault(require("./components/ProfileSection"));
40
40
  var _FilterListRounded = _interopRequireDefault(require("@material-ui/icons/FilterListRounded"));
41
+ var _MoreVert = _interopRequireDefault(require("@material-ui/icons/MoreVert"));
42
+ var _CustomDropdown = _interopRequireDefault(require("../../components/oa-component-dropdown/CustomDropdown"));
41
43
  var _CustomInfo = _interopRequireDefault(require("../../components/oa-component-info/CustomInfo"));
42
44
  const _excluded = ["filteredValue"],
43
45
  _excluded2 = ["sortOrder"];
@@ -53,7 +55,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
53
55
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
54
56
  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
57
  function GenricLayOut(_ref) {
56
- var _state$misc30, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _infoData$iconConfig, _infoData$iconConfig2, _infoData$iconConfig3, _infoData$iconConfig4, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list, _ref7, _tabs$extraAction$che2, _tabs$extraAction$pro, _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;
58
+ var _state$misc34, _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$customDrawer3, _state$customDrawer4, _tabs$list, _ref7, _tabs$extraAction$che2, _tabs$extraAction$pro, _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;
57
59
  let {
58
60
  config,
59
61
  getInitialData,
@@ -84,6 +86,10 @@ function GenricLayOut(_ref) {
84
86
  handleSwitchSelectItem,
85
87
  handleTableColumnClickParent,
86
88
  handleLeftHeaderFirstButton,
89
+ handleLeftHeaderSecondButton,
90
+ handleRightHeaderButtonClick,
91
+ handleDownloadTemplate,
92
+ handleCtaDownload,
87
93
  handleTabExtraActionChange
88
94
  } = {}
89
95
  } = _ref;
@@ -105,6 +111,7 @@ function GenricLayOut(_ref) {
105
111
  nestedDrawer,
106
112
  modal,
107
113
  leftHeaderFirstButton,
114
+ leftHeaderSecondButton,
108
115
  rightHeaderFirstButton,
109
116
  rightHeaderSecondButton,
110
117
  imageViewer,
@@ -151,7 +158,6 @@ function GenricLayOut(_ref) {
151
158
  showSuccessNotification(message);
152
159
  sessionStorage.removeItem("showEnterpriseNotification");
153
160
  } catch (error) {
154
- console.error("Error parsing notification data:", error);
155
161
  sessionStorage.removeItem("showEnterpriseNotification");
156
162
  }
157
163
  }
@@ -999,6 +1005,10 @@ function GenricLayOut(_ref) {
999
1005
  });
1000
1006
  }
1001
1007
  }
1008
+ } else if ((configArgs === null || configArgs === void 0 ? void 0 : configArgs.action) === "CTA_DOWNLOAD") {
1009
+ if (handleCtaDownload) {
1010
+ handleCtaDownload(record);
1011
+ }
1002
1012
  }
1003
1013
  };
1004
1014
 
@@ -1691,16 +1701,51 @@ function GenricLayOut(_ref) {
1691
1701
  showErrorNotification(error);
1692
1702
  } else {
1693
1703
  var _formData$fileName;
1694
- (0, _downloadFile.default)(data, (_formData$fileName = formData.fileName) !== null && _formData$fileName !== void 0 ? _formData$fileName : undefined);
1704
+ (0, _downloadFile.default)(data, formData !== null && formData !== void 0 && formData.exportType ? "".concat(formData === null || formData === void 0 ? void 0 : formData.exportType, "_").concat(formData === null || formData === void 0 ? void 0 : formData.fileName) : (_formData$fileName = formData === null || formData === void 0 ? void 0 : formData.fileName) !== null && _formData$fileName !== void 0 ? _formData$fileName : undefined);
1705
+ dispatch({
1706
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1707
+ });
1708
+ }
1709
+ }
1710
+ } else if ((formData === null || formData === void 0 ? void 0 : formData.drawerKey) === "leftHeaderSecondButtonSubmit") {
1711
+ if (handleLeftHeaderSecondButton) {
1712
+ var _state$misc23;
1713
+ const response = await handleLeftHeaderSecondButton(_objectSpread(_objectSpread({}, formData), (_state$misc23 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc23 !== void 0 ? _state$misc23 : {}));
1714
+ const {
1715
+ error,
1716
+ data
1717
+ } = response;
1718
+ if (error) {
1719
+ showErrorNotification(error);
1720
+ } else {
1721
+ var _formData$fileName2;
1722
+ (0, _downloadFile.default)(data, formData !== null && formData !== void 0 && formData.exportType ? "".concat(formData === null || formData === void 0 ? void 0 : formData.exportType, "_").concat(formData === null || formData === void 0 ? void 0 : formData.fileName) : (_formData$fileName2 = formData === null || formData === void 0 ? void 0 : formData.fileName) !== null && _formData$fileName2 !== void 0 ? _formData$fileName2 : undefined);
1723
+ dispatch({
1724
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1725
+ });
1726
+ }
1727
+ }
1728
+ } else if ((formData === null || formData === void 0 ? void 0 : formData.type) === "BULK_CREATION") {
1729
+ if (handleDrawerFormOnFinish) {
1730
+ var _state$misc24;
1731
+ const {
1732
+ error,
1733
+ data
1734
+ } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread({}, formData), (_state$misc24 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc24 !== void 0 ? _state$misc24 : {})));
1735
+ if (error) {
1736
+ showErrorNotification(error);
1737
+ } else {
1695
1738
  dispatch({
1696
1739
  type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1697
1740
  });
1741
+ showSuccessNotification(data === null || data === void 0 ? void 0 : data.message);
1742
+ init();
1698
1743
  }
1699
1744
  }
1700
1745
  }
1701
1746
  };
1702
1747
  const onClearAllAppliedFilters = async () => {
1703
- 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;
1748
+ var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$misc25, _state$staticFilter$m11, _state$staticFilter11;
1704
1749
  resetTabsExtraActionSwitch();
1705
1750
  const {
1706
1751
  error,
@@ -1724,7 +1769,7 @@ function GenricLayOut(_ref) {
1724
1769
  staticFilter: staticFilter.data.find(item => item.selected).value
1725
1770
  }), {}, {
1726
1771
  order: tables === null || tables === void 0 || (_tables$sorting24 = tables.sorting) === null || _tables$sorting24 === void 0 ? void 0 : _tables$sorting24.sortDirection
1727
- }, (_state$misc23 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc23 !== void 0 ? _state$misc23 : {}), {}, {
1772
+ }, (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {}), {}, {
1728
1773
  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 : []
1729
1774
  }));
1730
1775
  if (error) {
@@ -1783,14 +1828,14 @@ function GenricLayOut(_ref) {
1783
1828
  return;
1784
1829
  } else if (action === "CLOSE_MODAL_AND_FETCH") {
1785
1830
  if (handleModalCloseSuccess) {
1786
- var _stateRef$current, _state$misc24;
1831
+ var _stateRef$current, _state$misc26;
1787
1832
  const {
1788
1833
  error,
1789
1834
  data
1790
1835
  } = await (handleModalCloseSuccess === null || handleModalCloseSuccess === void 0 ? void 0 : handleModalCloseSuccess(_objectSpread({
1791
1836
  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,
1792
1837
  call: buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.call
1793
- }, (_state$misc24 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc24 !== void 0 ? _state$misc24 : {})));
1838
+ }, (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {})));
1794
1839
  if (error) {
1795
1840
  showErrorNotification(error);
1796
1841
  } else {
@@ -1804,11 +1849,11 @@ function GenricLayOut(_ref) {
1804
1849
  }
1805
1850
  } else {
1806
1851
  if (handleDrawerFormOnFinish) {
1807
- var _state$tables$selecte, _state$tables4, _state$misc25;
1852
+ var _state$tables$selecte, _state$tables4, _state$misc27;
1808
1853
  let req = {};
1809
1854
  req.type = "APPROVE";
1810
1855
  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 : [];
1811
- req.misc = (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {};
1856
+ req.misc = (_state$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {};
1812
1857
  const {
1813
1858
  error,
1814
1859
  data
@@ -1887,6 +1932,45 @@ function GenricLayOut(_ref) {
1887
1932
  }
1888
1933
  };
1889
1934
 
1935
+ /**
1936
+ * Handles the left header second button click event.
1937
+ *
1938
+ * @async
1939
+ * @function
1940
+ * @returns {Promise<void>} - Resolves after the action is handled.
1941
+ *
1942
+ * Handles the left header second button clicks with the following actions:
1943
+ * - "OPEN_CUSTOM_DRAWER": Opens a custom drawer with the specified key.
1944
+ * - "EXPORT_DATA": Triggers data export functionality.
1945
+ */
1946
+ const leftHeaderSecondButtonClick = async () => {
1947
+ if ((leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.action) === "OPEN_CUSTOM_DRAWER") {
1948
+ var _config$customDrawer4;
1949
+ const drawerData = config === null || config === void 0 || (_config$customDrawer4 = config.customDrawer) === null || _config$customDrawer4 === void 0 || (_config$customDrawer4 = _config$customDrawer4.data) === null || _config$customDrawer4 === void 0 ? void 0 : _config$customDrawer4[leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.drawerKey];
1950
+ dispatch({
1951
+ type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
1952
+ payload: drawerData
1953
+ });
1954
+ dispatch({
1955
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_OPEN
1956
+ });
1957
+ } else if ((leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.action) === "EXPORT_DATA") {
1958
+ handleLeftHeaderSecondButton(state).then(res => {
1959
+ const {
1960
+ error,
1961
+ data
1962
+ } = res;
1963
+ if (error) {
1964
+ showErrorNotification(error);
1965
+ } else {
1966
+ showSuccessNotification((data === null || data === void 0 ? void 0 : data.message) || "Export initiated successfully");
1967
+ }
1968
+ }).catch(err => {
1969
+ showErrorNotification(err.message || "An error occurred during export");
1970
+ });
1971
+ }
1972
+ };
1973
+
1890
1974
  /**
1891
1975
  * Handles the right header button click event.
1892
1976
  *
@@ -1901,11 +1985,12 @@ function GenricLayOut(_ref) {
1901
1985
  */
1902
1986
  const rightHeaderFirstButtonClick = async () => {
1903
1987
  if ((rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.action) === "OPEN_CUSTOM_DRAWER") {
1904
- var _config$customDrawer4, _state$customDrawer2;
1905
- const drawerData = config === null || config === void 0 || (_config$customDrawer4 = config.customDrawer) === null || _config$customDrawer4 === void 0 || (_config$customDrawer4 = _config$customDrawer4.data) === null || _config$customDrawer4 === void 0 ? void 0 : _config$customDrawer4[rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.drawerKey];
1988
+ var _config$customDrawer5, _state$misc28, _state$customDrawer2;
1989
+ const drawerData = config === null || config === void 0 || (_config$customDrawer5 = config.customDrawer) === null || _config$customDrawer5 === void 0 || (_config$customDrawer5 = _config$customDrawer5.data) === null || _config$customDrawer5 === void 0 ? void 0 : _config$customDrawer5[rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.drawerKey];
1990
+ const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, (_state$misc28 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc28 !== void 0 ? _state$misc28 : {}));
1906
1991
  dispatch({
1907
1992
  type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
1908
- payload: drawerData
1993
+ payload: dynamicConfig
1909
1994
  });
1910
1995
  dispatch({
1911
1996
  type: _layoutReducer.actionTypes.CUSTOM_DRAWER_OPEN
@@ -1916,15 +2001,35 @@ function GenricLayOut(_ref) {
1916
2001
  syncFilterFormWithAppliedFilters(state.customDrawer.appliedFilters);
1917
2002
  }
1918
2003
  } else if ((rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.action) === "OPEN_DRAWER") {
1919
- dispatch({
1920
- type: _layoutReducer.actionTypes.TOGGLE_DRAWER,
1921
- payload: rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.key
1922
- });
2004
+ // Check if button has a drawerKey for custom drawer, otherwise use key for regular drawer
2005
+ if (rightHeaderFirstButton !== null && rightHeaderFirstButton !== void 0 && rightHeaderFirstButton.drawerKey) {
2006
+ var _config$customDrawer6, _state$misc29;
2007
+ 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];
2008
+ const {
2009
+ error,
2010
+ data
2011
+ } = await handleRightHeaderButtonClick(_objectSpread({}, (_state$misc29 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc29 !== void 0 ? _state$misc29 : {}));
2012
+ if (drawerData) {
2013
+ const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, data !== null && data !== void 0 ? data : {}));
2014
+ dispatch({
2015
+ type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
2016
+ payload: dynamicConfig
2017
+ });
2018
+ dispatch({
2019
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_OPEN
2020
+ });
2021
+ }
2022
+ } else {
2023
+ dispatch({
2024
+ type: _layoutReducer.actionTypes.TOGGLE_DRAWER,
2025
+ payload: rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.key
2026
+ });
2027
+ }
1923
2028
  }
1924
2029
  };
1925
2030
  const rightHeaderSecondButtonClick = async () => {
1926
2031
  if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
1927
- 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;
2032
+ var _state$dropdownSearch10, _state$inputSearch10, _state$tabs16, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data12, _tables$sorting26, _state$misc30, _state$staticFilter$m12, _state$staticFilter12;
1928
2033
  resetTabsExtraActionSwitch();
1929
2034
  const {
1930
2035
  error,
@@ -1948,7 +2053,7 @@ function GenricLayOut(_ref) {
1948
2053
  staticFilter: staticFilter.data.find(item => item.selected).value
1949
2054
  }), {}, {
1950
2055
  order: tables === null || tables === void 0 || (_tables$sorting26 = tables.sorting) === null || _tables$sorting26 === void 0 ? void 0 : _tables$sorting26.sortDirection
1951
- }, (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {}), {}, {
2056
+ }, (_state$misc30 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc30 !== void 0 ? _state$misc30 : {}), {}, {
1952
2057
  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 : []
1953
2058
  }));
1954
2059
  if (error) {
@@ -1957,7 +2062,7 @@ function GenricLayOut(_ref) {
1957
2062
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
1958
2063
  });
1959
2064
  } else {
1960
- var _config$customDrawer5;
2065
+ var _config$customDrawer7;
1961
2066
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
1962
2067
  setStaticFilterData(data);
1963
2068
  }
@@ -1968,7 +2073,7 @@ function GenricLayOut(_ref) {
1968
2073
  dispatch({
1969
2074
  type: _layoutReducer.actionTypes.CLEAR_ALL_APPLIED_FILTERS
1970
2075
  });
1971
- const drawerData = config === null || config === void 0 || (_config$customDrawer5 = config.customDrawer) === null || _config$customDrawer5 === void 0 || (_config$customDrawer5 = _config$customDrawer5.data) === null || _config$customDrawer5 === void 0 ? void 0 : _config$customDrawer5[rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.drawerKey];
2076
+ 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[rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.drawerKey];
1972
2077
  if (drawerData) {
1973
2078
  dispatch({
1974
2079
  type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
@@ -1979,6 +2084,41 @@ function GenricLayOut(_ref) {
1979
2084
  }
1980
2085
  };
1981
2086
 
2087
+ /**
2088
+ * Handles the menu item click for rightHeaderFirstButton menu
2089
+ * @param {Object} menuItem - The clicked menu item
2090
+ */
2091
+ const handleRightHeaderFirstButtonMenuClick = menuItem => {
2092
+ // Check if menuItem has drawerKey to open a drawer
2093
+ if (menuItem !== null && menuItem !== void 0 && menuItem.drawerKey) {
2094
+ // Check if it's a custom drawer or regular drawer
2095
+ if ((menuItem === null || menuItem === void 0 ? void 0 : menuItem.drawerType) === "custom") {
2096
+ var _config$customDrawer8;
2097
+ const drawerData = config === null || config === void 0 || (_config$customDrawer8 = config.customDrawer) === null || _config$customDrawer8 === void 0 || (_config$customDrawer8 = _config$customDrawer8.data) === null || _config$customDrawer8 === void 0 ? void 0 : _config$customDrawer8[menuItem.drawerKey];
2098
+ if (drawerData) {
2099
+ dispatch({
2100
+ type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
2101
+ payload: drawerData
2102
+ });
2103
+ dispatch({
2104
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_OPEN
2105
+ });
2106
+ }
2107
+ } else {
2108
+ // Regular drawer - open using drawer key
2109
+ dispatch({
2110
+ type: _layoutReducer.actionTypes.TOGGLE_DRAWER,
2111
+ payload: menuItem.drawerKey
2112
+ });
2113
+ }
2114
+ }
2115
+
2116
+ // Call custom handler if provided
2117
+ if (rightHeaderFirstButton !== null && rightHeaderFirstButton !== void 0 && rightHeaderFirstButton.onMenuClick) {
2118
+ rightHeaderFirstButton.onMenuClick(menuItem, state);
2119
+ }
2120
+ };
2121
+
1982
2122
  /**
1983
2123
  * @function
1984
2124
  * @param {Object} selectedOption - The selected option from the custom select.
@@ -2001,7 +2141,7 @@ function GenricLayOut(_ref) {
2001
2141
  };
2002
2142
  const handleSubHeadingSelect = async val => {
2003
2143
  if (val) {
2004
- var _state$tabs17, _tables$pagination13, _tables$pagination14, _state$misc27;
2144
+ var _state$tabs17, _tables$pagination13, _tables$pagination14, _state$misc31;
2005
2145
  dispatch({
2006
2146
  type: _layoutReducer.actionTypes.SET_SUBHEADING_SELECTED_CONFIG,
2007
2147
  payload: val
@@ -2015,7 +2155,7 @@ function GenricLayOut(_ref) {
2015
2155
  current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
2016
2156
  pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
2017
2157
  subHeadingSelectVal: val
2018
- }, (_state$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {}));
2158
+ }, (_state$misc31 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc31 !== void 0 ? _state$misc31 : {}));
2019
2159
  if (error) {
2020
2160
  showErrorNotification(error);
2021
2161
  dispatch({
@@ -2052,7 +2192,7 @@ function GenricLayOut(_ref) {
2052
2192
 
2053
2193
  // Call the handler if provided
2054
2194
  if (handleTableChange) {
2055
- var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc28;
2195
+ var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc32;
2056
2196
  dispatch({
2057
2197
  type: _layoutReducer.actionTypes.SET_LOADING,
2058
2198
  payload: true
@@ -2074,7 +2214,7 @@ function GenricLayOut(_ref) {
2074
2214
  order: tables === null || tables === void 0 || (_tables$sorting28 = tables.sorting) === null || _tables$sorting28 === void 0 ? void 0 : _tables$sorting28.sortDirection
2075
2215
  }, (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" ? {
2076
2216
  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
2077
- } : {}), (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 : {}), {}, {
2217
+ } : {}), (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$misc32 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc32 !== void 0 ? _state$misc32 : {}), {}, {
2078
2218
  staticFilter: filterValue,
2079
2219
  // Pass static filter value
2080
2220
  multiSelectValue: multiSelectValue
@@ -2119,7 +2259,7 @@ function GenricLayOut(_ref) {
2119
2259
  }
2120
2260
  });
2121
2261
  if (handleTableChange) {
2122
- 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;
2262
+ var _state$dropdownSearch12, _state$inputSearch12, _state$tabs19, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data13, _customDrawer$applied11, _state$misc33, _state$staticFilter$m13, _state$staticFilter13;
2123
2263
  const {
2124
2264
  error,
2125
2265
  data
@@ -2139,7 +2279,7 @@ function GenricLayOut(_ref) {
2139
2279
  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
2140
2280
  } : {}), (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) && {
2141
2281
  staticFilter: staticFilter.data.find(item => item.selected).value
2142
- }), (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 : {}), {}, {
2282
+ }), (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$misc33 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc33 !== void 0 ? _state$misc33 : {}), {}, {
2143
2283
  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 : []
2144
2284
  }));
2145
2285
  if (error) {
@@ -2170,7 +2310,7 @@ function GenricLayOut(_ref) {
2170
2310
  console.log(state, "GenricLayOutstate");
2171
2311
  return /*#__PURE__*/_react.default.createElement(_styles.OapageWithDataStyle, {
2172
2312
  marginBottom: infoPanel !== null && infoPanel !== void 0 && infoPanel.bottomMarginRequired ? "18px" : "0",
2173
- className: (state === null || state === void 0 || (_state$misc30 = state.misc) === null || _state$misc30 === void 0 ? void 0 : _state$misc30.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2313
+ className: (state === null || state === void 0 || (_state$misc34 = state.misc) === null || _state$misc34 === void 0 ? void 0 : _state$misc34.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2174
2314
  }, /*#__PURE__*/_react.default.createElement(_styles.DrawerWithOutFooter, null), /*#__PURE__*/_react.default.createElement("div", {
2175
2315
  className: "fullPageLayout"
2176
2316
  }, /*#__PURE__*/_react.default.createElement(_GlobalCss.default, null, (sidebar === null || sidebar === void 0 ? void 0 : sidebar.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
@@ -2278,6 +2418,20 @@ function GenricLayOut(_ref) {
2278
2418
  }),
2279
2419
  position: leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 || (_leftHeaderFirstButto2 = leftHeaderFirstButton.iconConfig) === null || _leftHeaderFirstButto2 === void 0 ? void 0 : _leftHeaderFirstButto2.position
2280
2420
  }
2421
+ })), (leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.visible) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, _extends({
2422
+ label: leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.label,
2423
+ onClick: leftHeaderSecondButtonClick,
2424
+ type: leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.type,
2425
+ size: leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.size
2426
+ }, (leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.iconConfig) && {
2427
+ iconConfig: {
2428
+ icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
2429
+ icon: leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 || (_leftHeaderSecondButt = leftHeaderSecondButton.iconConfig) === null || _leftHeaderSecondButt === void 0 ? void 0 : _leftHeaderSecondButt.icon,
2430
+ size: 24,
2431
+ color: "primary"
2432
+ }),
2433
+ position: leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 || (_leftHeaderSecondButt2 = leftHeaderSecondButton.iconConfig) === null || _leftHeaderSecondButt2 === void 0 ? void 0 : _leftHeaderSecondButt2.position
2434
+ }
2281
2435
  })), /*#__PURE__*/_react.default.createElement("div", {
2282
2436
  className: "oaheaderButtonsRight"
2283
2437
  }, !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
@@ -2285,7 +2439,13 @@ function GenricLayOut(_ref) {
2285
2439
  onClick: rightHeaderSecondButtonClick,
2286
2440
  type: rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.type,
2287
2441
  size: rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.size
2288
- }), (rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.visible) && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
2442
+ }), (rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.visible) && /*#__PURE__*/_react.default.createElement("div", {
2443
+ style: {
2444
+ display: "flex",
2445
+ alignItems: "center",
2446
+ gap: "8px"
2447
+ }
2448
+ }, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
2289
2449
  label: rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.label,
2290
2450
  onClick: rightHeaderFirstButtonClick,
2291
2451
  type: rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.type,
@@ -2298,7 +2458,25 @@ function GenricLayOut(_ref) {
2298
2458
  }),
2299
2459
  position: "left"
2300
2460
  })
2301
- }), !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && /*#__PURE__*/_react.default.createElement("span", {
2461
+ }), (rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.menuItems) && Array.isArray(rightHeaderFirstButton.menuItems) && rightHeaderFirstButton.menuItems.length > 0 && /*#__PURE__*/_react.default.createElement(_CustomDropdown.default, {
2462
+ items: rightHeaderFirstButton.menuItems,
2463
+ onMenuItemClick: handleRightHeaderFirstButtonMenuClick,
2464
+ trigger: ["click"],
2465
+ placement: "bottomRight",
2466
+ type: "default"
2467
+ }, /*#__PURE__*/_react.default.createElement("div", {
2468
+ style: {
2469
+ cursor: "pointer",
2470
+ display: "flex",
2471
+ alignItems: "center",
2472
+ padding: "4px",
2473
+ marginTop: "14px"
2474
+ }
2475
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
2476
+ icon: _MoreVert.default,
2477
+ size: 24,
2478
+ color: "secondary-content"
2479
+ }))), !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && /*#__PURE__*/_react.default.createElement("span", {
2302
2480
  className: "notifyDot"
2303
2481
  })))))), (inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2304
2482
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
@@ -2374,7 +2552,7 @@ function GenricLayOut(_ref) {
2374
2552
  }
2375
2553
  // Call handleTabExtraActionChange
2376
2554
  if (handleTabExtraActionChange) {
2377
- var _tables$pagination17, _tables$pagination18, _tables$sorting31, _tables$sorting32, _tables$filter13, _staticFilter$data14, _state$misc31;
2555
+ var _tables$pagination17, _tables$pagination18, _tables$sorting31, _tables$sorting32, _tables$filter13, _staticFilter$data14, _state$misc35;
2378
2556
  dispatch({
2379
2557
  type: _layoutReducer.actionTypes.SET_LOADING,
2380
2558
  payload: true
@@ -2393,7 +2571,7 @@ function GenricLayOut(_ref) {
2393
2571
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
2394
2572
  }), (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) && {
2395
2573
  staticFilter: staticFilter.data.find(item => item.selected).value
2396
- }), (_state$misc31 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc31 !== void 0 ? _state$misc31 : {}));
2574
+ }), (_state$misc35 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc35 !== void 0 ? _state$misc35 : {}));
2397
2575
  if (error) {
2398
2576
  showErrorNotification(error);
2399
2577
  dispatch({
@@ -2499,7 +2677,11 @@ function GenricLayOut(_ref) {
2499
2677
  destroyOnClose: true,
2500
2678
  zIndex: 1000
2501
2679
  }, /*#__PURE__*/_react.default.createElement(_DetailDataLayout.default, _extends({}, (_nestedDrawer$data$ca = nestedDrawer === null || nestedDrawer === void 0 || (_nestedDrawer$data2 = nestedDrawer.data) === null || _nestedDrawer$data2 === void 0 ? void 0 : _nestedDrawer$data2.cancelOrder) !== null && _nestedDrawer$data$ca !== void 0 ? _nestedDrawer$data$ca : {}, {
2502
- handleDrawerFormOnFinish: drawerFormOnFinish
2680
+ handleDrawerFormOnFinish: drawerFormOnFinish,
2681
+ generateS3Url: generateS3Url,
2682
+ downloadFileOnS3: downloadFileOnS3,
2683
+ uploadOnS3: uploadOnS3,
2684
+ handleCollapsibleKeyData: handleCollapsibleKeyData
2503
2685
  }))), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.visible) && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
2504
2686
  className: "oaDrawer",
2505
2687
  title: customDrawer === null || customDrawer === void 0 || (_customDrawer$data = customDrawer.data) === null || _customDrawer$data === void 0 ? void 0 : _customDrawer$data.title,
@@ -2510,7 +2692,12 @@ function GenricLayOut(_ref) {
2510
2692
  destroyOnClose: true,
2511
2693
  zIndex: 1000
2512
2694
  }, /*#__PURE__*/_react.default.createElement(_DetailDataLayout.default, _extends({}, (_customDrawer$data2 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.data) !== null && _customDrawer$data2 !== void 0 ? _customDrawer$data2 : {}, {
2513
- handleDrawerFormOnFinish: filterFormOnFinish
2695
+ handleDrawerFormOnFinish: filterFormOnFinish,
2696
+ generateS3Url: generateS3Url,
2697
+ downloadFileOnS3: downloadFileOnS3,
2698
+ uploadOnS3: uploadOnS3,
2699
+ handleCollapsibleKeyData: handleCollapsibleKeyData,
2700
+ handleDownloadTemplate: handleDownloadTemplate
2514
2701
  }))), (contentPanel === null || contentPanel === void 0 ? void 0 : contentPanel.visible) && Array.isArray(contentPanel === null || contentPanel === void 0 ? void 0 : contentPanel.dataSource) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2515
2702
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
2516
2703
  active: true,
@@ -16,7 +16,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
16
16
  const DrawerWithOutFooter = exports.DrawerWithOutFooter = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.hubAutomationContainer .fullPageLayout {padding: 0 !important; background: #fff !important;}\n.hubAutomationContainer .fullPageLayout .oaRightLayouts{\n max-width: 1154px;\n margin: 24px auto;\n padding: 0 16px;\n box-shadow: none;}\n.oaDrawer div + div.ant-drawer-body{padding-bottom:100px !important;}\n\n.ant-checkbox-indeterminate .ant-checkbox-inner:after {\n background-color: #014fc5;\n}\n\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::before {display:none;}\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::after{ content: \"*\"; color: #DE350B; visibility: visible !important;}\n\n\n.cstUplaodWithFullWidth{margin-bottom:24px;}\n.cstUplaodWithFullWidth:last-child{margin-bottom:0;}\n.cstUplaodWithFullWidth .uploadDiv{width:100%;}\n.cstUplaodWithFullWidth .uploadDiv .ant-upload-list-item-container, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper .ant-upload-list-picture-card .ant-upload-select, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container {\n width: 100%; \n height: 120px;\n}\n\n\n\n\n.oaDrawer .ant-form-item .ant-form-item-explain-error {\n color: #DE350B;\n font-size: 12px;\n margin: 4px 0 0 0;\n}\n.bottomSelectedSecion{background: #F6F6F6; padding: 16px 36px; position: fixed; bottom: 0; left: 0; right: 0;\nbox-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n display: flex; z-index: 2;\n align-items: center;\n justify-content: end;\n gap: 24px;}\n\n\n\n.listOfItems{ border-radius: 12px;\n border: 1px solid #E0E0E0;\n padding: 24px;\n margin: 24px 0 0 0;}\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n.listOfItemsWithoutBorder{\n padding: 24px 0;\n margin: 24px 0 0 0;}\n\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n\n\n\n.modalIconAndTextBox{display:flex; flex-direction:row; align-items: center; margin: 0 0 16px 0; gap:4px;}\n\n/* Select List Item Styles */\n.select-list-container {\n padding: 0;\n margin: 16px 0 0 0;\n}\n\n.select-list-item {\n display: flex;\n align-items: center;\n padding: 16px 0;\n cursor: pointer;\n transition: background-color 0.2s ease;\n border-bottom: 1px solid #f0f0f0;\n position: relative;\n}\n\n.select-list-item:hover {\n background-color: #f8f9fa;\n}\n\n.select-list-item:last-child {\n border-bottom: none;\n}\n\n.item-avatar {\n width: 48px;\n height: 48px;\n border-radius: 50%;\n background-color: #f0f0f0;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 12px;\n font-size: 28px;\n font-weight: 500;\n color: #333;\n flex-shrink: 0;\n}\n\n/* Different avatar colors for different items */\n.select-list-item:nth-child(1) .item-avatar {\n background-color: #717171;\n color: #fff;\n}\n\n.select-list-item:nth-child(2) .item-avatar {\n background-color: #014fc5;\n color: #fff;\n}\n\n.item-content {\n flex: 1;\n min-width: 0;\n}\n\n.item-arrow {\n flex-shrink: 0;\n margin-left: 8px;\n color: #014fc5;\n}\n"])));
17
17
  const FormWidgetStyle = exports.FormWidgetStyle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .formBottomAction {\n position: absolute;\n bottom: 0px;\n background-color: rgb(249, 249, 249);\n box-shadow: rgba(0, 0, 0, 0.1) 0px -2px 8px;\n padding: 16px;\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n z-index: 10;\n left: 0;\n right: 0;\n }\n\n .formBottomAction .ant-form-item {\n margin-bottom: 0px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n }\n .searchErrorMsg {\n font-size: 12px;\n }\n"])));
18
18
  const TableDataStyle = exports.TableDataStyle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .tableContainerList th,\n button {\n white-space: nowrap;\n }\n .tableContainerList th,\n button {\n white-space: nowrap;\n }\n"])));
19
- const OapageWithDataStyle = exports.OapageWithDataStyle = _styledComponents.default.aside(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .oaTopHeaderAndBtnSec {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n .headerContent {\n display: flex;\n align-items: flex-start; // Changed from 'center' to 'flex-start'\n justify-content: space-between;\n width: 100%;\n\n .headerLeft {\n flex: 1;\n }\n\n .headerRight {\n display: flex;\n align-items: flex-start; // Changed from 'center' to 'flex-start'\n justify-content: flex-end;\n }\n }\n }\n\n .fullPageLayout {\n display: flex;\n padding: 8px;\n background: #f6f6f6;\n }\n .ant-pagination {\n padding: 0 16px;\n justify-content: end;\n }\n .layoutHeadingPage {\n display: flex;\n gap: 8px;\n margin: 0 0 32px 0;\n flex-direction: column;\n justify-content: flex-start;\n }\n\n .topHadingWithIcon span {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .subHadingText {\n margin: 0 0 0 36px;\n }\n\n .subHading1Text {\n margin: 0 0 ", " 40px;\n }\n\n .marginNone {\n margin: 0 !important;\n }\n\n .subHadingText > span {\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n }\n\n .oaRightLayouts {\n width: 100%;\n min-height: calc(100vh - 16px);\n padding: 76px 48px;\n overflow-y: auto;\n border-radius: 16px;\n background: #fff;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n }\n\n .oaheaderSearchAndFilter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 16px 0;\n gap: 16px;\n }\n\n .oaRightLayouts .iconAndTextSecBox {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n .inLine {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n .customeSelectDropdown {\n margin: 4px 0 0 8px;\n }\n\n .cardData {\n padding: 28px 0 48px 0;\n }\n\n .ant-carousel .slick-dots {\n position: static;\n margin: 20px auto 12px 0;\n }\n .ant-carousel .slick-dots li {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li button {\n width: 8px;\n height: 8px;\n background: #cacaca;\n border-radius: 50%;\n opacity: 0.5;\n }\n .ant-carousel .slick-dots li.slick-active {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li.slick-active button {\n width: 8px;\n height: 8px;\n opacity: 1;\n }\n .ant-carousel .slick-dots li::after {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n opacity: 1;\n background: #717171;\n }\n\n .oaTabs .ant-tabs-nav {\n border-top: 1px solid #e0e0e0;\n border-left: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n padding: 12px 22px 0 22px;\n margin: 0 0 8px 0;\n background: #fff;\n border-radius: 4px 4px 0 0;\n }\n .ant-card-body {\n padding: 24px 16px !important;\n border-radius: 16px;\n background: #f6f6f6;\n }\n .cardContainer {\n display: flex;\n gap: 24px;\n }\n .selectAndSearch .noClear {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n margin: 4px 0px 0px;\n color: #de350b;\n }\n .searchOnly {\n margin: 0px 0px 16px;\n position: relative;\n }\n .searchOnly .ant-input-affix-wrapper {\n border-radius: 4px;\n max-width: 420px;\n padding-left: 44px;\n }\n .searchOnly .cstSearchIcon {\n position: absolute;\n left: 16px;\n top: 14px;\n z-index: 2;\n }\n\n .selectAndSearch .ant-input-affix-wrapper {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .selectAndSearch {\n flex-shrink: 0;\n }\n\n .customeSelectDropdown .ant-select-selector {\n border: none;\n padding: 0;\n max-width: 83vw;\n }\n .customeSelectDropdown .ant-select-selection-item > span {\n font-size: 24px;\n font-weight: 500;\n line-height: 32px;\n }\n\n .customeSelectDropdown .ant-select {\n margin: 0 0 0 32px;\n }\n\n .customeSelectDropdown .ant-select .ant-select-arrow {\n color: #014fc5;\n inset-inline-end: -6px;\n }\n\n .customeSelectDropdown .ant-select-selector {\n box-shadow: none !important;\n }\n\n .customeSelectDropdown .ant-select-selection-item {\n display: inline-block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n\n .oaheaderButtons {\n display: flex;\n gap: 24px;\n align-items: center;\n position: relative;\n flex-grow: 1;\n justify-content: space-between;\n }\n\n .oaheaderButtons.single-child {\n justify-content: flex-end;\n }\n\n .oaheaderButtonsRight {\n display: flex;\n flex-direction: row;\n gap: 16px;\n }\n\n .oaheaderButtons .notifyDot {\n width: 12px;\n height: 12px;\n background: #de350b;\n position: absolute;\n top: -4px;\n right: -4px;\n border-radius: 50%;\n }\n\n @media only screen and (max-width: 600px) {\n .selectAndSearch .ant-input-affix-wrapper {\n width: calc(100% - 84px);\n }\n .oaheaderSearchAndFilter .dropDownSearchContainer {\n width: 100%;\n }\n\n .oaheaderSearchAndFilter {\n align-items: flex-end;\n flex-direction: column;\n gap: 16px;\n }\n\n .inLine {\n flex-direction: column;\n gap: 0;\n align-items: flex-start;\n }\n\n .subHadingText > span {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .customeSelectDropdown {\n margin: 4px 0 0 0;\n }\n\n .customeSelectDropdown .ant-select {\n margin: 0 0 0 0;\n }\n\n .fullPageLayout {\n flex-direction: column;\n padding: 0;\n }\n .oaRightLayouts {\n padding: 16px;\n border-radius: 0;\n background: #fff;\n box-shadow: none;\n height: auto;\n background: #f6f6f6;\n }\n .oaTabs .ant-tabs-nav {\n margin: 0 0 28px 0;\n padding: 12px 0 0 0;\n }\n .layoutHeadingPage {\n margin: 0 0 16px 0;\n background: #fff;\n padding: 16px;\n border-radius: 8px;\n width: 100%;\n }\n .layoutHeadingAndSearch {\n background: #fff;\n padding: 20px 16px;\n margin: 0;\n width: 100%;\n border-radius: 8px;\n }\n\n /* Hide profile section on mobile when sidebar has profile icon */\n .hideProfileOnMobile {\n display: none !important;\n }\n }\n"])), _ref => {
19
+ const OapageWithDataStyle = exports.OapageWithDataStyle = _styledComponents.default.aside(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .oaTopHeaderAndBtnSec {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n .headerContent {\n display: flex;\n align-items: flex-start; // Changed from 'center' to 'flex-start'\n justify-content: space-between;\n width: 100%;\n\n .headerLeft {\n flex: 1;\n }\n\n .headerRight {\n display: flex;\n align-items: flex-start; // Changed from 'center' to 'flex-start'\n justify-content: flex-end;\n }\n }\n }\n\n .fullPageLayout {\n display: flex;\n padding: 8px;\n background: #f6f6f6;\n }\n .ant-pagination {\n padding: 0 16px;\n justify-content: end;\n }\n .layoutHeadingPage {\n display: flex;\n gap: 8px;\n margin: 0 0 32px 0;\n flex-direction: column;\n justify-content: flex-start;\n }\n\n .topHadingWithIcon span {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .subHadingText {\n margin: 0 0 0 36px;\n }\n\n .subHading1Text {\n margin: 0 0 ", " 40px;\n }\n\n .marginNone {\n margin: 0 !important;\n }\n\n .subHadingText > span {\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n }\n\n .oaRightLayouts {\n width: 100%;\n min-height: calc(100vh - 16px);\n padding: 76px 48px;\n overflow-y: auto;\n border-radius: 16px;\n background: #fff;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n }\n\n .oaheaderSearchAndFilter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 16px 0;\n gap: 16px;\n }\n\n .oaRightLayouts .iconAndTextSecBox {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n .inLine {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n .customeSelectDropdown {\n margin: 4px 0 0 8px;\n }\n\n .cardData {\n padding: 28px 0 48px 0;\n }\n\n .ant-carousel .slick-dots {\n position: static;\n margin: 20px auto 12px 0;\n }\n .ant-carousel .slick-dots li {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li button {\n width: 8px;\n height: 8px;\n background: #cacaca;\n border-radius: 50%;\n opacity: 0.5;\n }\n .ant-carousel .slick-dots li.slick-active {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li.slick-active button {\n width: 8px;\n height: 8px;\n opacity: 1;\n }\n .ant-carousel .slick-dots li::after {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n opacity: 1;\n background: #717171;\n }\n\n .oaTabs .ant-tabs-nav {\n border-top: 1px solid #e0e0e0;\n border-left: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n padding: 12px 22px 0 22px;\n margin: 0 0 8px 0;\n background: #fff;\n border-radius: 4px 4px 0 0;\n }\n .ant-card-body {\n padding: 24px 16px !important;\n border-radius: 16px;\n background: #f6f6f6;\n }\n .cardContainer {\n display: flex;\n gap: 24px;\n }\n .selectAndSearch .noClear {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n margin: 4px 0px 0px;\n color: #de350b;\n }\n .searchOnly {\n margin: 0px 0px 16px;\n position: relative;\n }\n .searchOnly .ant-input-affix-wrapper {\n border-radius: 4px;\n max-width: 420px;\n padding-left: 44px;\n }\n .searchOnly .cstSearchIcon {\n position: absolute;\n left: 16px;\n top: 14px;\n z-index: 2;\n }\n\n .selectAndSearch .ant-input-affix-wrapper {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .selectAndSearch {\n flex-shrink: 0;\n }\n\n .customeSelectDropdown .ant-select-selector {\n border: none;\n padding: 0;\n max-width: 83vw;\n }\n .customeSelectDropdown .ant-select-selection-item > span {\n font-size: 24px;\n font-weight: 500;\n line-height: 32px;\n }\n\n .customeSelectDropdown .ant-select {\n margin: 0 0 0 32px;\n }\n\n .customeSelectDropdown .ant-select .ant-select-arrow {\n color: #014fc5;\n inset-inline-end: -6px;\n }\n\n .customeSelectDropdown .ant-select-selector {\n box-shadow: none !important;\n }\n\n .customeSelectDropdown .ant-select-selection-item {\n display: inline-block;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n vertical-align: bottom;\n }\n\n .oaheaderButtons {\n display: flex;\n gap: 16px;\n align-items: center;\n position: relative;\n flex-grow: 1;\n justify-content: space-between;\n }\n\n .oaheaderButtons.single-child {\n justify-content: flex-end;\n }\n\n .oaheaderButtonsRight {\n display: flex;\n flex-direction: row;\n gap: 12px;\n margin-left: auto;\n padding-left: 24px;\n }\n\n .oaheaderButtons .notifyDot {\n width: 12px;\n height: 12px;\n background: #de350b;\n position: absolute;\n top: -4px;\n right: -4px;\n border-radius: 50%;\n }\n\n @media only screen and (max-width: 600px) {\n .selectAndSearch .ant-input-affix-wrapper {\n width: calc(100% - 84px);\n }\n .oaheaderSearchAndFilter .dropDownSearchContainer {\n width: 100%;\n }\n\n .oaheaderSearchAndFilter {\n align-items: flex-end;\n flex-direction: column;\n gap: 16px;\n }\n\n .inLine {\n flex-direction: column;\n gap: 0;\n align-items: flex-start;\n }\n\n .subHadingText > span {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .customeSelectDropdown {\n margin: 4px 0 0 0;\n }\n\n .customeSelectDropdown .ant-select {\n margin: 0 0 0 0;\n }\n\n .fullPageLayout {\n flex-direction: column;\n padding: 0;\n }\n .oaRightLayouts {\n padding: 16px;\n border-radius: 0;\n background: #fff;\n box-shadow: none;\n height: auto;\n background: #f6f6f6;\n }\n .oaTabs .ant-tabs-nav {\n margin: 0 0 28px 0;\n padding: 12px 0 0 0;\n }\n .layoutHeadingPage {\n margin: 0 0 16px 0;\n background: #fff;\n padding: 16px;\n border-radius: 8px;\n width: 100%;\n }\n .layoutHeadingAndSearch {\n background: #fff;\n padding: 20px 16px;\n margin: 0;\n width: 100%;\n border-radius: 8px;\n }\n\n /* Hide profile section on mobile when sidebar has profile icon */\n .hideProfileOnMobile {\n display: none !important;\n }\n }\n"])), _ref => {
20
20
  let {
21
21
  marginBottom
22
22
  } = _ref;
@@ -56,7 +56,8 @@ function FormWidget(props) {
56
56
  downloadFileOnS3,
57
57
  generateS3Url,
58
58
  uploadOnS3,
59
- handleCollapsibleKeyData
59
+ handleCollapsibleKeyData,
60
+ handleDownloadTemplate
60
61
  } = props;
61
62
  const {
62
63
  cancel,
@@ -420,7 +421,9 @@ function FormWidget(props) {
420
421
  label: item === null || item === void 0 ? void 0 : item.label,
421
422
  disabled: (_item$disabled5 = item === null || item === void 0 ? void 0 : item.disabled) !== null && _item$disabled5 !== void 0 ? _item$disabled5 : false,
422
423
  onClick: () => {
423
- if (item !== null && item !== void 0 && item.onClick) {
424
+ if ((item === null || item === void 0 ? void 0 : item.action) === "DOWNLOAD_TEMPLATE" && handleDownloadTemplate) {
425
+ handleDownloadTemplate(_objectSpread({}, (item === null || item === void 0 ? void 0 : item.params) || {}));
426
+ } else if (item !== null && item !== void 0 && item.onClick) {
424
427
  item.onClick(item === null || item === void 0 ? void 0 : item.action, item === null || item === void 0 ? void 0 : item.key);
425
428
  }
426
429
  }
@@ -171,11 +171,7 @@ function _default(_ref) {
171
171
  }
172
172
  }
173
173
  } else if (addingUser) {
174
- // Add new user
175
174
  if (addUserClick) {
176
- console.log("userData", userData);
177
- console.log("misc", misc);
178
- console.log("branchId", branchId);
179
175
  const {
180
176
  error,
181
177
  data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "0.18.382",
3
+ "version": "0.18.383",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",