oa-componentbook 0.18.387 → 0.18.389

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.
@@ -53,9 +53,11 @@ function CustomInfo(_ref) {
53
53
  borderColor,
54
54
  closable,
55
55
  onClose,
56
- position
56
+ position,
57
+ closeIconPosition
57
58
  } = _ref;
58
59
  const [visible, setVisible] = (0, _react.useState)(true);
60
+ console.log(closeIconPosition, "closeIconPosition");
59
61
  const handleClose = () => {
60
62
  setVisible(false);
61
63
  if (onClose) {
@@ -111,7 +113,10 @@ function CustomInfo(_ref) {
111
113
  color: "var(--color-".concat(fontColor, ")")
112
114
  }
113
115
  }, description)), iconConfig.position === 'right' && conditionallyAddTooltipToIcon(), closable && /*#__PURE__*/_react.default.createElement(_styles.CloseButton, {
114
- onClick: handleClose
116
+ onClick: handleClose,
117
+ style: closeIconPosition === 'end' ? {
118
+ marginLeft: 'auto'
119
+ } : {}
115
120
  }, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
116
121
  icon: _CloseRounded.default,
117
122
  color: "secondary-content",
@@ -135,14 +140,15 @@ CustomInfo.propTypes = {
135
140
  fontColor: _propTypes.default.oneOf(_colorOptions.colorOptions),
136
141
  iconConfig: _propTypes.default.shape({
137
142
  icon: _propTypes.default.node,
138
- position: _propTypes.default.oneOf(['left', 'right']),
143
+ position: _propTypes.default.oneOf(['left', 'right', 'end']),
139
144
  tooltipText: _propTypes.default.string
140
145
  }),
141
146
  title: _propTypes.default.string,
142
147
  borderColor: _propTypes.default.string,
143
148
  closable: _propTypes.default.bool,
144
149
  onClose: _propTypes.default.func,
145
- position: _propTypes.default.oneOf(['left', 'center', 'right'])
150
+ position: _propTypes.default.oneOf(['left', 'center', 'right']),
151
+ closeIconPosition: _propTypes.default.string
146
152
  };
147
153
  CustomInfo.defaultProps = {
148
154
  buttonConfig: {
@@ -160,5 +166,6 @@ CustomInfo.defaultProps = {
160
166
  borderColor: '',
161
167
  closable: false,
162
168
  onClose: null,
163
- position: 'left'
169
+ position: 'left',
170
+ closeIconPosition: ''
164
171
  };
@@ -32,7 +32,7 @@ function CustomTag(_ref) {
32
32
  textColor,
33
33
  style
34
34
  } = _ref;
35
- return /*#__PURE__*/_react.default.createElement(_styles.StyledTag, _extends({
35
+ const tag = /*#__PURE__*/_react.default.createElement(_styles.StyledTag, _extends({
36
36
  "data-test": dataTest,
37
37
  type: type,
38
38
  visible: visible,
@@ -44,11 +44,15 @@ function CustomTag(_ref) {
44
44
  }), /*#__PURE__*/_react.default.createElement(_styles.CenteredTextContainer, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
45
45
  typography: "type-button-500"
46
46
  }, label)));
47
+ if (type === "ai") {
48
+ return /*#__PURE__*/_react.default.createElement(_styles.AIGradientWrapper, null, tag);
49
+ }
50
+ return tag;
47
51
  }
48
52
  CustomTag.propTypes = {
49
53
  "data-test": _propTypes.default.string,
50
54
  label: _propTypes.default.string.isRequired,
51
- type: _propTypes.default.oneOf(["success", "pending", "failed", "recommended", "primary", "blue", "custom"]),
55
+ type: _propTypes.default.oneOf(["success", "pending", "failed", "recommended", "primary", "blue", "custom", "ai"]),
52
56
  visible: _propTypes.default.bool,
53
57
  bgColor: _propTypes.default.string,
54
58
  borderColor: _propTypes.default.string,
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.StyledTag = exports.CenteredTextContainer = void 0;
6
+ exports.default = exports.StyledTag = exports.CenteredTextContainer = exports.AIGradientWrapper = void 0;
7
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
8
- var _templateObject, _templateObject2;
8
+ var _templateObject, _templateObject2, _templateObject3;
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
+ const AIGradientWrapper = exports.AIGradientWrapper = _styledComponents.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n padding: 1px;\n border-radius: 4px;\n background: linear-gradient(\n 135deg,\n #4fc3f7 0%,\n #ff69b4 25%,\n #ffa500 50%,\n #ffd700 75%,\n #ff69b4 100%\n );\n"])));
11
12
  const getColorStyles = props => {
12
13
  const {
13
14
  type,
@@ -57,6 +58,13 @@ const getColorStyles = props => {
57
58
  textColor: 'var(--color-primary)'
58
59
  };
59
60
  }
61
+ if (type === 'ai') {
62
+ return {
63
+ backgroundColor: '#ffffff',
64
+ borderColor: 'transparent',
65
+ textColor: '#212121'
66
+ };
67
+ }
60
68
  if (type === 'custom') {
61
69
  return {
62
70
  backgroundColor: bgColor,
@@ -71,5 +79,5 @@ const getColorStyles = props => {
71
79
  };
72
80
  };
73
81
  var _default = exports.default = {};
74
- const StyledTag = exports.StyledTag = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n padding: 1px 12px;\n\n color: ", ";\n\n background-color: ", ";\n\n border: 1px solid ", ";\n border-radius: 4px;\n\n visibility: ", ";\n"])), props => getColorStyles(props).textColor, props => getColorStyles(props).backgroundColor, props => getColorStyles(props).borderColor, props => props.visible ? 'visible' : 'hidden');
75
- const CenteredTextContainer = exports.CenteredTextContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex; white-space: nowrap;\n"])));
82
+ const StyledTag = exports.StyledTag = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n padding: 1px 12px;\n\n color: ", ";\n\n background-color: ", ";\n\n border: ", ";\n border-radius: 4px;\n\n visibility: ", ";\n"])), props => getColorStyles(props).textColor, props => getColorStyles(props).backgroundColor, props => props.type === 'ai' ? 'none' : "1px solid ".concat(getColorStyles(props).borderColor), props => props.visible ? 'visible' : 'hidden');
83
+ const CenteredTextContainer = exports.CenteredTextContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex; white-space: nowrap;\n"])));
@@ -197,7 +197,6 @@ function DocumentUpload(_ref) {
197
197
  return modifiedFile;
198
198
  }
199
199
  response = (_response5 = response) === null || _response5 === void 0 ? void 0 : _response5.data;
200
- s3ResponseReturn(response);
201
200
  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
201
  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
202
  var _response8;
@@ -206,6 +205,7 @@ function DocumentUpload(_ref) {
206
205
  if (!isImageFile(files === null || files === void 0 ? void 0 : files.name)) {
207
206
  modifiedFile.url = _PdfSampleImage.default;
208
207
  }
208
+ await s3ResponseReturn(response);
209
209
  } else {
210
210
  modifiedFile.status = "failed";
211
211
  modifiedFile = null;
@@ -16,6 +16,8 @@ function DetailDataLayout(props) {
16
16
  handleDrawerFormOnFinish: props === null || props === void 0 ? void 0 : props.handleDrawerFormOnFinish,
17
17
  onSelectHandlers: props === null || props === void 0 ? void 0 : props.onSelectHandlers,
18
18
  handleCollapsibleKeyData: props === null || props === void 0 ? void 0 : props.handleCollapsibleKeyData,
19
- misc: props === null || props === void 0 ? void 0 : props.misc
19
+ handleDownloadTemplate: props === null || props === void 0 ? void 0 : props.handleDownloadTemplate,
20
+ misc: props === null || props === void 0 ? void 0 : props.misc,
21
+ postUploadCall: props === null || props === void 0 ? void 0 : props.postUploadCall
20
22
  })));
21
23
  }
@@ -8,6 +8,8 @@ exports.default = void 0;
8
8
  require("core-js/modules/web.dom-collections.iterator.js");
9
9
  require("core-js/modules/es.promise.js");
10
10
  require("core-js/modules/es.string.trim.js");
11
+ require("core-js/modules/es.regexp.exec.js");
12
+ require("core-js/modules/es.regexp.test.js");
11
13
  require("core-js/modules/es.symbol.description.js");
12
14
  require("core-js/modules/es.object.assign.js");
13
15
  var _react = _interopRequireWildcard(require("react"));
@@ -56,12 +58,13 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
56
58
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
57
59
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
58
60
  function GenricLayOut(_ref) {
59
- 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;
61
+ var _state$misc37, _headerRightFirstButt, _headerRightSecondBut, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _infoData$iconConfig, _infoData$iconConfig2, _infoData$iconConfig3, _infoData$iconConfig4, _leftHeaderFirstButto, _leftHeaderFirstButto2, _leftHeaderSecondButt, _leftHeaderSecondButt2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer4, _state$customDrawer5, _tabs$list, _ref7, _tabs$extraAction$che2, _tabs$extraAction$pro, _tabTableInfoPanel$da, _tabTableInfoPanel$da2, _tabTableInfoPanel$da3, _tabTableInfoPanel$da4, _tabTableInfoPanel$da5, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables5, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination19, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
60
62
  let {
61
63
  config,
62
64
  getInitialData,
63
65
  generateS3Url,
64
66
  uploadOnS3,
67
+ postUploadCall,
65
68
  handlers: {
66
69
  handleTabClick,
67
70
  handleFooterClick,
@@ -89,6 +92,8 @@ function GenricLayOut(_ref) {
89
92
  handleLeftHeaderFirstButton,
90
93
  handleLeftHeaderSecondButton,
91
94
  handleRightHeaderButtonClick,
95
+ handleHeaderRightFirstButton,
96
+ handleHeaderRightSecondButton,
92
97
  handleDownloadTemplate,
93
98
  handleCtaDownload,
94
99
  handleTabExtraActionChange,
@@ -116,6 +121,8 @@ function GenricLayOut(_ref) {
116
121
  modal,
117
122
  leftHeaderFirstButton,
118
123
  leftHeaderSecondButton,
124
+ headerRightFirstButton,
125
+ headerRightSecondButton,
119
126
  rightHeaderFirstButton,
120
127
  rightHeaderSecondButton,
121
128
  imageViewer,
@@ -123,9 +130,11 @@ function GenricLayOut(_ref) {
123
130
  staticFilter,
124
131
  profileData,
125
132
  infoPanel,
133
+ tabTableInfoPanel,
126
134
  infoData,
127
135
  feedbackWidget
128
136
  } = state !== null && state !== void 0 ? state : {};
137
+ console.log(infoData, "infoData");
129
138
  (0, _react.useEffect)(() => {
130
139
  init();
131
140
  }, []);
@@ -1777,10 +1786,27 @@ function GenricLayOut(_ref) {
1777
1786
  init();
1778
1787
  }
1779
1788
  }
1789
+ } else if ((formData === null || formData === void 0 ? void 0 : formData.type) === "BULK_CREATION_WITH_ENTERPRISE_DATA") {
1790
+ if (handleDrawerFormOnFinish) {
1791
+ var _state$misc25, _state$header;
1792
+ const {
1793
+ error,
1794
+ data
1795
+ } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, formData), (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {}), state === null || state === void 0 || (_state$header = state.header) === null || _state$header === void 0 ? void 0 : _state$header.subHeading)));
1796
+ if (error) {
1797
+ showErrorNotification(error);
1798
+ } else {
1799
+ dispatch({
1800
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
1801
+ });
1802
+ showSuccessNotification(data === null || data === void 0 ? void 0 : data.message);
1803
+ init();
1804
+ }
1805
+ }
1780
1806
  }
1781
1807
  };
1782
1808
  const onClearAllAppliedFilters = async () => {
1783
- 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;
1809
+ var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$misc26, _state$staticFilter$m11, _state$staticFilter11;
1784
1810
  resetTabsExtraActionSwitch();
1785
1811
  const {
1786
1812
  error,
@@ -1804,7 +1830,7 @@ function GenricLayOut(_ref) {
1804
1830
  staticFilter: staticFilter.data.find(item => item.selected).value
1805
1831
  }), {}, {
1806
1832
  order: tables === null || tables === void 0 || (_tables$sorting24 = tables.sorting) === null || _tables$sorting24 === void 0 ? void 0 : _tables$sorting24.sortDirection
1807
- }, (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {}), {}, {
1833
+ }, (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {}), {}, {
1808
1834
  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 : []
1809
1835
  }));
1810
1836
  if (error) {
@@ -1833,6 +1859,83 @@ function GenricLayOut(_ref) {
1833
1859
  }
1834
1860
  });
1835
1861
  };
1862
+ const handlePostUploadSuccess = data => {
1863
+ const wrappedData = {
1864
+ postUploadWidget: data
1865
+ };
1866
+ const fieldValues = {};
1867
+ const patchGroups = (currentGroups, staticGroups) => {
1868
+ if (!Array.isArray(currentGroups)) return currentGroups;
1869
+ return currentGroups.map((group, gIdx) => {
1870
+ var _group$items;
1871
+ const staticGroup = staticGroups === null || staticGroups === void 0 ? void 0 : staticGroups[gIdx];
1872
+ const updatedItems = group === null || group === void 0 || (_group$items = group.items) === null || _group$items === void 0 ? void 0 : _group$items.map((item, iIdx) => {
1873
+ var _staticGroup$items;
1874
+ const staticItem = staticGroup === null || staticGroup === void 0 || (_staticGroup$items = staticGroup.items) === null || _staticGroup$items === void 0 ? void 0 : _staticGroup$items[iIdx];
1875
+ if (typeof staticItem === "string" && /^{{\s*[^}]+\s*}}$/.test(staticItem)) {
1876
+ const resolved = (0, _staticConfigResolver.default)(staticItem, wrappedData);
1877
+ if (resolved !== "") {
1878
+ if (resolved !== null && resolved !== void 0 && resolved.name && (resolved === null || resolved === void 0 ? void 0 : resolved.value) !== undefined) {
1879
+ fieldValues[resolved.name] = resolved.value;
1880
+ }
1881
+ return resolved;
1882
+ }
1883
+ return item;
1884
+ }
1885
+ return item;
1886
+ });
1887
+ return _objectSpread(_objectSpread({}, group), {}, {
1888
+ items: updatedItems
1889
+ });
1890
+ });
1891
+ };
1892
+ if (drawer !== null && drawer !== void 0 && drawer.visible) {
1893
+ var _state$drawer3, _state$tabs$active3, _state$tabs16, _state$drawer4, _config$drawer2;
1894
+ const currentDrawerKey = state === null || state === void 0 || (_state$drawer3 = state.drawer) === null || _state$drawer3 === void 0 ? void 0 : _state$drawer3.active;
1895
+ const tabKey = (_state$tabs$active3 = state === null || state === void 0 || (_state$tabs16 = state.tabs) === null || _state$tabs16 === void 0 ? void 0 : _state$tabs16.active) !== null && _state$tabs$active3 !== void 0 ? _state$tabs$active3 : "default";
1896
+ const currentDrawerData = state === null || state === void 0 || (_state$drawer4 = state.drawer) === null || _state$drawer4 === void 0 || (_state$drawer4 = _state$drawer4.data) === null || _state$drawer4 === void 0 || (_state$drawer4 = _state$drawer4[tabKey]) === null || _state$drawer4 === void 0 ? void 0 : _state$drawer4[currentDrawerKey];
1897
+ const staticDrawerData = config === null || config === void 0 || (_config$drawer2 = config.drawer) === null || _config$drawer2 === void 0 || (_config$drawer2 = _config$drawer2.data) === null || _config$drawer2 === void 0 || (_config$drawer2 = _config$drawer2[tabKey]) === null || _config$drawer2 === void 0 ? void 0 : _config$drawer2[currentDrawerKey];
1898
+ if (!currentDrawerData) return fieldValues;
1899
+ const updatedGroups = patchGroups(currentDrawerData === null || currentDrawerData === void 0 ? void 0 : currentDrawerData.groups, staticDrawerData === null || staticDrawerData === void 0 ? void 0 : staticDrawerData.groups);
1900
+ const dynamicConfig = _objectSpread(_objectSpread({}, currentDrawerData), {}, {
1901
+ groups: updatedGroups
1902
+ });
1903
+ dispatch({
1904
+ type: _layoutReducer.actionTypes.SET_DRAWER,
1905
+ payload: {
1906
+ dynamicConfig,
1907
+ active: currentDrawerKey
1908
+ }
1909
+ });
1910
+ } else if (nestedDrawer !== null && nestedDrawer !== void 0 && nestedDrawer.visible) {
1911
+ var _state$nestedDrawer, _config$nestedDrawer2;
1912
+ const currentDrawerData = state === null || state === void 0 || (_state$nestedDrawer = state.nestedDrawer) === null || _state$nestedDrawer === void 0 || (_state$nestedDrawer = _state$nestedDrawer.data) === null || _state$nestedDrawer === void 0 ? void 0 : _state$nestedDrawer.cancelOrder;
1913
+ const staticDrawerData = config === null || config === void 0 || (_config$nestedDrawer2 = config.nestedDrawer) === null || _config$nestedDrawer2 === void 0 || (_config$nestedDrawer2 = _config$nestedDrawer2.data) === null || _config$nestedDrawer2 === void 0 ? void 0 : _config$nestedDrawer2.cancelOrder;
1914
+ if (!currentDrawerData) return fieldValues;
1915
+ const updatedGroups = patchGroups(currentDrawerData === null || currentDrawerData === void 0 ? void 0 : currentDrawerData.groups, staticDrawerData === null || staticDrawerData === void 0 ? void 0 : staticDrawerData.groups);
1916
+ const dynamicConfig = _objectSpread(_objectSpread({}, currentDrawerData), {}, {
1917
+ groups: updatedGroups
1918
+ });
1919
+ dispatch({
1920
+ type: _layoutReducer.actionTypes.SET_NESTED_DRAWER,
1921
+ payload: dynamicConfig
1922
+ });
1923
+ } else if (customDrawer !== null && customDrawer !== void 0 && customDrawer.visible) {
1924
+ var _state$customDrawer2, _config$customDrawer3;
1925
+ const currentDrawerData = state === null || state === void 0 || (_state$customDrawer2 = state.customDrawer) === null || _state$customDrawer2 === void 0 ? void 0 : _state$customDrawer2.data;
1926
+ const staticDrawerData = config === null || config === void 0 || (_config$customDrawer3 = config.customDrawer) === null || _config$customDrawer3 === void 0 || (_config$customDrawer3 = _config$customDrawer3.data) === null || _config$customDrawer3 === void 0 ? void 0 : _config$customDrawer3[(rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.drawerKey) || (rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.drawerKey) || (leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 ? void 0 : leftHeaderFirstButton.drawerKey) || (leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.drawerKey)];
1927
+ if (!currentDrawerData) return fieldValues;
1928
+ const updatedGroups = patchGroups(currentDrawerData === null || currentDrawerData === void 0 ? void 0 : currentDrawerData.groups, staticDrawerData === null || staticDrawerData === void 0 ? void 0 : staticDrawerData.groups);
1929
+ const dynamicConfig = _objectSpread(_objectSpread({}, currentDrawerData), {}, {
1930
+ groups: updatedGroups
1931
+ });
1932
+ dispatch({
1933
+ type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
1934
+ payload: dynamicConfig
1935
+ });
1936
+ }
1937
+ return fieldValues;
1938
+ };
1836
1939
 
1837
1940
  /**
1838
1941
  * Handles the modal footer click event.
@@ -1863,14 +1966,14 @@ function GenricLayOut(_ref) {
1863
1966
  return;
1864
1967
  } else if (action === "CLOSE_MODAL_AND_FETCH") {
1865
1968
  if (handleModalCloseSuccess) {
1866
- var _stateRef$current, _state$misc26;
1969
+ var _stateRef$current, _state$misc27;
1867
1970
  const {
1868
1971
  error,
1869
1972
  data
1870
1973
  } = await (handleModalCloseSuccess === null || handleModalCloseSuccess === void 0 ? void 0 : handleModalCloseSuccess(_objectSpread({
1871
1974
  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,
1872
1975
  call: buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.call
1873
- }, (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {})));
1976
+ }, (_state$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {})));
1874
1977
  if (error) {
1875
1978
  showErrorNotification(error);
1876
1979
  } else {
@@ -1884,11 +1987,11 @@ function GenricLayOut(_ref) {
1884
1987
  }
1885
1988
  } else {
1886
1989
  if (handleDrawerFormOnFinish) {
1887
- var _state$tables$selecte, _state$tables4, _state$misc27;
1990
+ var _state$tables$selecte, _state$tables4, _state$misc28;
1888
1991
  let req = {};
1889
1992
  req.type = "APPROVE";
1890
1993
  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 : [];
1891
- req.misc = (_state$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {};
1994
+ req.misc = (_state$misc28 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc28 !== void 0 ? _state$misc28 : {};
1892
1995
  const {
1893
1996
  error,
1894
1997
  data
@@ -1939,8 +2042,8 @@ function GenricLayOut(_ref) {
1939
2042
  */
1940
2043
  const leftHeaderFirstButtonClick = async () => {
1941
2044
  if ((leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 ? void 0 : leftHeaderFirstButton.action) === "OPEN_CUSTOM_DRAWER") {
1942
- var _config$customDrawer3;
1943
- const drawerData = config === null || config === void 0 || (_config$customDrawer3 = config.customDrawer) === null || _config$customDrawer3 === void 0 || (_config$customDrawer3 = _config$customDrawer3.data) === null || _config$customDrawer3 === void 0 ? void 0 : _config$customDrawer3[leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 ? void 0 : leftHeaderFirstButton.drawerKey];
2045
+ var _config$customDrawer4;
2046
+ 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[leftHeaderFirstButton === null || leftHeaderFirstButton === void 0 ? void 0 : leftHeaderFirstButton.drawerKey];
1944
2047
  dispatch({
1945
2048
  type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
1946
2049
  payload: drawerData
@@ -1980,8 +2083,8 @@ function GenricLayOut(_ref) {
1980
2083
  */
1981
2084
  const leftHeaderSecondButtonClick = async () => {
1982
2085
  if ((leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.action) === "OPEN_CUSTOM_DRAWER") {
1983
- var _config$customDrawer4;
1984
- 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];
2086
+ var _config$customDrawer5;
2087
+ 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[leftHeaderSecondButton === null || leftHeaderSecondButton === void 0 ? void 0 : leftHeaderSecondButton.drawerKey];
1985
2088
  dispatch({
1986
2089
  type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
1987
2090
  payload: drawerData
@@ -2020,9 +2123,9 @@ function GenricLayOut(_ref) {
2020
2123
  */
2021
2124
  const rightHeaderFirstButtonClick = async () => {
2022
2125
  if ((rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.action) === "OPEN_CUSTOM_DRAWER") {
2023
- var _config$customDrawer5, _state$misc28, _state$customDrawer2;
2024
- 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];
2025
- 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 : {}));
2126
+ var _config$customDrawer6, _state$misc29, _state$customDrawer3;
2127
+ const drawerData = config === null || config === void 0 || (_config$customDrawer6 = config.customDrawer) === null || _config$customDrawer6 === void 0 || (_config$customDrawer6 = _config$customDrawer6.data) === null || _config$customDrawer6 === void 0 ? void 0 : _config$customDrawer6[rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.drawerKey];
2128
+ const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, (_state$misc29 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc29 !== void 0 ? _state$misc29 : {}));
2026
2129
  dispatch({
2027
2130
  type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
2028
2131
  payload: dynamicConfig
@@ -2032,18 +2135,18 @@ function GenricLayOut(_ref) {
2032
2135
  });
2033
2136
 
2034
2137
  // Sync the filter form with applied filters if they exist
2035
- if (state !== null && state !== void 0 && (_state$customDrawer2 = state.customDrawer) !== null && _state$customDrawer2 !== void 0 && _state$customDrawer2.appliedFilters && Object.keys(state.customDrawer.appliedFilters).length > 0) {
2138
+ if (state !== null && state !== void 0 && (_state$customDrawer3 = state.customDrawer) !== null && _state$customDrawer3 !== void 0 && _state$customDrawer3.appliedFilters && Object.keys(state.customDrawer.appliedFilters).length > 0) {
2036
2139
  syncFilterFormWithAppliedFilters(state.customDrawer.appliedFilters);
2037
2140
  }
2038
2141
  } else if ((rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.action) === "OPEN_DRAWER") {
2039
2142
  // Check if button has a drawerKey for custom drawer, otherwise use key for regular drawer
2040
2143
  if (rightHeaderFirstButton !== null && rightHeaderFirstButton !== void 0 && rightHeaderFirstButton.drawerKey) {
2041
- var _config$customDrawer6, _state$misc29;
2042
- 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];
2144
+ var _config$customDrawer7, _state$misc30;
2145
+ const drawerData = config === null || config === void 0 || (_config$customDrawer7 = config.customDrawer) === null || _config$customDrawer7 === void 0 || (_config$customDrawer7 = _config$customDrawer7.data) === null || _config$customDrawer7 === void 0 ? void 0 : _config$customDrawer7[rightHeaderFirstButton === null || rightHeaderFirstButton === void 0 ? void 0 : rightHeaderFirstButton.drawerKey];
2043
2146
  const {
2044
2147
  error,
2045
2148
  data
2046
- } = await handleRightHeaderButtonClick(_objectSpread({}, (_state$misc29 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc29 !== void 0 ? _state$misc29 : {}));
2149
+ } = await handleRightHeaderButtonClick(_objectSpread({}, (_state$misc30 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc30 !== void 0 ? _state$misc30 : {}));
2047
2150
  if (drawerData) {
2048
2151
  const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, data !== null && data !== void 0 ? data : {}));
2049
2152
  dispatch({
@@ -2064,7 +2167,7 @@ function GenricLayOut(_ref) {
2064
2167
  };
2065
2168
  const rightHeaderSecondButtonClick = async () => {
2066
2169
  if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
2067
- 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;
2170
+ var _state$dropdownSearch10, _state$inputSearch10, _state$tabs17, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data12, _tables$sorting26, _state$misc31, _state$staticFilter$m12, _state$staticFilter12;
2068
2171
  resetTabsExtraActionSwitch();
2069
2172
  const {
2070
2173
  error,
@@ -2075,7 +2178,7 @@ function GenricLayOut(_ref) {
2075
2178
  }), (state === null || state === void 0 || (_state$inputSearch10 = state.inputSearch) === null || _state$inputSearch10 === void 0 || (_state$inputSearch10 = _state$inputSearch10.value) === null || _state$inputSearch10 === void 0 ? void 0 : _state$inputSearch10.trim()) && {
2076
2179
  searchedValue: state.inputSearch.value
2077
2180
  }), {}, {
2078
- selectedTab: state === null || state === void 0 || (_state$tabs16 = state.tabs) === null || _state$tabs16 === void 0 ? void 0 : _state$tabs16.active,
2181
+ selectedTab: state === null || state === void 0 || (_state$tabs17 = state.tabs) === null || _state$tabs17 === void 0 ? void 0 : _state$tabs17.active,
2079
2182
  current: tables === null || tables === void 0 || (_tables$pagination11 = tables.pagination) === null || _tables$pagination11 === void 0 ? void 0 : _tables$pagination11.current,
2080
2183
  pageSize: tables === null || tables === void 0 || (_tables$pagination12 = tables.pagination) === null || _tables$pagination12 === void 0 ? void 0 : _tables$pagination12.pageSize
2081
2184
  }, (tables === null || tables === void 0 || (_tables$filter11 = tables.filter) === null || _tables$filter11 === void 0 ? void 0 : _tables$filter11.key) && {
@@ -2088,7 +2191,7 @@ function GenricLayOut(_ref) {
2088
2191
  staticFilter: staticFilter.data.find(item => item.selected).value
2089
2192
  }), {}, {
2090
2193
  order: tables === null || tables === void 0 || (_tables$sorting26 = tables.sorting) === null || _tables$sorting26 === void 0 ? void 0 : _tables$sorting26.sortDirection
2091
- }, (_state$misc30 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc30 !== void 0 ? _state$misc30 : {}), {}, {
2194
+ }, (_state$misc31 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc31 !== void 0 ? _state$misc31 : {}), {}, {
2092
2195
  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 : []
2093
2196
  }));
2094
2197
  if (error) {
@@ -2097,7 +2200,7 @@ function GenricLayOut(_ref) {
2097
2200
  type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
2098
2201
  });
2099
2202
  } else {
2100
- var _config$customDrawer7;
2203
+ var _config$customDrawer8;
2101
2204
  if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
2102
2205
  setStaticFilterData(data);
2103
2206
  }
@@ -2108,14 +2211,100 @@ function GenricLayOut(_ref) {
2108
2211
  dispatch({
2109
2212
  type: _layoutReducer.actionTypes.CLEAR_ALL_APPLIED_FILTERS
2110
2213
  });
2111
- 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];
2214
+ 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[rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.drawerKey];
2215
+ if (drawerData) {
2216
+ dispatch({
2217
+ type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
2218
+ payload: drawerData
2219
+ });
2220
+ }
2221
+ }
2222
+ }
2223
+ };
2224
+ const handleHeaderActionButtonClick = async (buttonConfig, customHandler) => {
2225
+ if (!(buttonConfig !== null && buttonConfig !== void 0 && buttonConfig.action)) {
2226
+ return;
2227
+ }
2228
+ if (buttonConfig.action === "OPEN_CUSTOM_DRAWER") {
2229
+ var _config$customDrawer9;
2230
+ const drawerData = config === null || config === void 0 || (_config$customDrawer9 = config.customDrawer) === null || _config$customDrawer9 === void 0 || (_config$customDrawer9 = _config$customDrawer9.data) === null || _config$customDrawer9 === void 0 ? void 0 : _config$customDrawer9[buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.drawerKey];
2231
+ if (drawerData) {
2232
+ var _state$misc32;
2233
+ const dynamicConfig = (0, _staticConfigResolver.removeHidden)((0, _staticConfigResolver.default)(drawerData, (_state$misc32 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc32 !== void 0 ? _state$misc32 : {}));
2234
+ dispatch({
2235
+ type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
2236
+ payload: dynamicConfig
2237
+ });
2238
+ dispatch({
2239
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_OPEN
2240
+ });
2241
+ }
2242
+ return;
2243
+ }
2244
+ if (buttonConfig.action === "OPEN_DRAWER") {
2245
+ if (buttonConfig !== null && buttonConfig !== void 0 && buttonConfig.drawerKey) {
2246
+ var _config$customDrawer10;
2247
+ const drawerData = config === null || config === void 0 || (_config$customDrawer10 = config.customDrawer) === null || _config$customDrawer10 === void 0 || (_config$customDrawer10 = _config$customDrawer10.data) === null || _config$customDrawer10 === void 0 ? void 0 : _config$customDrawer10[buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.drawerKey];
2112
2248
  if (drawerData) {
2113
2249
  dispatch({
2114
2250
  type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
2115
2251
  payload: drawerData
2116
2252
  });
2253
+ dispatch({
2254
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_OPEN
2255
+ });
2117
2256
  }
2257
+ } else if (buttonConfig !== null && buttonConfig !== void 0 && buttonConfig.key) {
2258
+ dispatch({
2259
+ type: _layoutReducer.actionTypes.TOGGLE_DRAWER,
2260
+ payload: buttonConfig.key
2261
+ });
2118
2262
  }
2263
+ return;
2264
+ }
2265
+ if (buttonConfig.action === "EXPORT_DATA" && customHandler) {
2266
+ customHandler(state).then(res => {
2267
+ const {
2268
+ error,
2269
+ data
2270
+ } = res;
2271
+ if (error) {
2272
+ showErrorNotification(error);
2273
+ } else if (data) {
2274
+ showSuccessNotification((data === null || data === void 0 ? void 0 : data.message) || "Export initiated successfully");
2275
+ }
2276
+ }).catch(err => {
2277
+ showErrorNotification((err === null || err === void 0 ? void 0 : err.message) || "An error occurred during export");
2278
+ });
2279
+ return;
2280
+ }
2281
+ if (customHandler) {
2282
+ var _state$misc33;
2283
+ const {
2284
+ error,
2285
+ data
2286
+ } = await customHandler(_objectSpread(_objectSpread({}, state), (_state$misc33 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc33 !== void 0 ? _state$misc33 : {}));
2287
+ if (error) {
2288
+ showErrorNotification(error);
2289
+ } else if (data !== null && data !== void 0 && data.message) {
2290
+ showSuccessNotification(data.message);
2291
+ }
2292
+ }
2293
+ };
2294
+ const headerRightFirstButtonClick = async () => {
2295
+ console.log(headerRightFirstButton, "headerRightFirstButton");
2296
+ };
2297
+ const headerRightSecondButtonClick = async () => {
2298
+ if ((headerRightSecondButton === null || headerRightSecondButton === void 0 ? void 0 : headerRightSecondButton.action) === "OPEN_CUSTOM_DRAWER") {
2299
+ var _config$customDrawer11;
2300
+ const drawerData = config === null || config === void 0 || (_config$customDrawer11 = config.customDrawer) === null || _config$customDrawer11 === void 0 || (_config$customDrawer11 = _config$customDrawer11.data) === null || _config$customDrawer11 === void 0 ? void 0 : _config$customDrawer11[headerRightSecondButton === null || headerRightSecondButton === void 0 ? void 0 : headerRightSecondButton.drawerKey];
2301
+ dispatch({
2302
+ type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
2303
+ payload: drawerData
2304
+ });
2305
+ dispatch({
2306
+ type: _layoutReducer.actionTypes.CUSTOM_DRAWER_OPEN
2307
+ });
2119
2308
  }
2120
2309
  };
2121
2310
 
@@ -2128,8 +2317,8 @@ function GenricLayOut(_ref) {
2128
2317
  if (menuItem !== null && menuItem !== void 0 && menuItem.drawerKey) {
2129
2318
  // Check if it's a custom drawer or regular drawer
2130
2319
  if ((menuItem === null || menuItem === void 0 ? void 0 : menuItem.drawerType) === "custom") {
2131
- var _config$customDrawer8;
2132
- 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];
2320
+ var _config$customDrawer12;
2321
+ const drawerData = config === null || config === void 0 || (_config$customDrawer12 = config.customDrawer) === null || _config$customDrawer12 === void 0 || (_config$customDrawer12 = _config$customDrawer12.data) === null || _config$customDrawer12 === void 0 ? void 0 : _config$customDrawer12[menuItem.drawerKey];
2133
2322
  if (drawerData) {
2134
2323
  dispatch({
2135
2324
  type: _layoutReducer.actionTypes.SET_CUSTOM_DRAWER,
@@ -2176,7 +2365,7 @@ function GenricLayOut(_ref) {
2176
2365
  };
2177
2366
  const handleSubHeadingSelect = async val => {
2178
2367
  if (val) {
2179
- var _state$tabs17, _tables$pagination13, _tables$pagination14, _state$misc31;
2368
+ var _state$tabs18, _tables$pagination13, _tables$pagination14, _state$misc34;
2180
2369
  dispatch({
2181
2370
  type: _layoutReducer.actionTypes.SET_SUBHEADING_SELECTED_CONFIG,
2182
2371
  payload: val
@@ -2185,12 +2374,12 @@ function GenricLayOut(_ref) {
2185
2374
  error,
2186
2375
  data
2187
2376
  } = await handleSubHeadingSelectClick(_objectSpread({
2188
- selectedTab: state === null || state === void 0 || (_state$tabs17 = state.tabs) === null || _state$tabs17 === void 0 ? void 0 : _state$tabs17.active,
2377
+ selectedTab: state === null || state === void 0 || (_state$tabs18 = state.tabs) === null || _state$tabs18 === void 0 ? void 0 : _state$tabs18.active,
2189
2378
  searchedValue: inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.value,
2190
2379
  current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
2191
2380
  pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
2192
2381
  subHeadingSelectVal: val
2193
- }, (_state$misc31 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc31 !== void 0 ? _state$misc31 : {}));
2382
+ }, (_state$misc34 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc34 !== void 0 ? _state$misc34 : {}));
2194
2383
  if (error) {
2195
2384
  showErrorNotification(error);
2196
2385
  dispatch({
@@ -2227,7 +2416,7 @@ function GenricLayOut(_ref) {
2227
2416
 
2228
2417
  // Call the handler if provided
2229
2418
  if (handleTableChange) {
2230
- var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc32;
2419
+ var _state$dropdownSearch11, _state$inputSearch11, _state$tabs19, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc35;
2231
2420
  dispatch({
2232
2421
  type: _layoutReducer.actionTypes.SET_LOADING,
2233
2422
  payload: true
@@ -2241,7 +2430,7 @@ function GenricLayOut(_ref) {
2241
2430
  }), (state === null || state === void 0 || (_state$inputSearch11 = state.inputSearch) === null || _state$inputSearch11 === void 0 || (_state$inputSearch11 = _state$inputSearch11.value) === null || _state$inputSearch11 === void 0 ? void 0 : _state$inputSearch11.trim()) && {
2242
2431
  searchedValue: state.inputSearch.value
2243
2432
  }), {}, {
2244
- selectedTab: state === null || state === void 0 || (_state$tabs18 = state.tabs) === null || _state$tabs18 === void 0 ? void 0 : _state$tabs18.active,
2433
+ selectedTab: state === null || state === void 0 || (_state$tabs19 = state.tabs) === null || _state$tabs19 === void 0 ? void 0 : _state$tabs19.active,
2245
2434
  current: 1,
2246
2435
  pageSize: tables === null || tables === void 0 || (_tables$pagination15 = tables.pagination) === null || _tables$pagination15 === void 0 ? void 0 : _tables$pagination15.pageSize,
2247
2436
  filterStatus: filterValue,
@@ -2249,7 +2438,7 @@ function GenricLayOut(_ref) {
2249
2438
  order: tables === null || tables === void 0 || (_tables$sorting28 = tables.sorting) === null || _tables$sorting28 === void 0 ? void 0 : _tables$sorting28.sortDirection
2250
2439
  }, (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" ? {
2251
2440
  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
2252
- } : {}), (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 : {}), {}, {
2441
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied10 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied10 !== void 0 ? _customDrawer$applied10 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc35 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc35 !== void 0 ? _state$misc35 : {}), {}, {
2253
2442
  staticFilter: filterValue,
2254
2443
  // Pass static filter value
2255
2444
  multiSelectValue: multiSelectValue
@@ -2294,7 +2483,7 @@ function GenricLayOut(_ref) {
2294
2483
  }
2295
2484
  });
2296
2485
  if (handleTableChange) {
2297
- 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;
2486
+ var _state$dropdownSearch12, _state$inputSearch12, _state$tabs20, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data13, _customDrawer$applied11, _state$misc36, _state$staticFilter$m13, _state$staticFilter13;
2298
2487
  const {
2299
2488
  error,
2300
2489
  data
@@ -2304,7 +2493,7 @@ function GenricLayOut(_ref) {
2304
2493
  }), (state === null || state === void 0 || (_state$inputSearch12 = state.inputSearch) === null || _state$inputSearch12 === void 0 || (_state$inputSearch12 = _state$inputSearch12.value) === null || _state$inputSearch12 === void 0 ? void 0 : _state$inputSearch12.trim()) && {
2305
2494
  searchedValue: state.inputSearch.value
2306
2495
  }), {}, {
2307
- selectedTab: state === null || state === void 0 || (_state$tabs19 = state.tabs) === null || _state$tabs19 === void 0 ? void 0 : _state$tabs19.active,
2496
+ selectedTab: state === null || state === void 0 || (_state$tabs20 = state.tabs) === null || _state$tabs20 === void 0 ? void 0 : _state$tabs20.active,
2308
2497
  current,
2309
2498
  pageSize,
2310
2499
  columnFilterStatus: tables === null || tables === void 0 || (_tables$filter12 = tables.filter) === null || _tables$filter12 === void 0 ? void 0 : _tables$filter12.value,
@@ -2314,7 +2503,7 @@ function GenricLayOut(_ref) {
2314
2503
  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
2315
2504
  } : {}), (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) && {
2316
2505
  staticFilter: staticFilter.data.find(item => item.selected).value
2317
- }), (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 : {}), {}, {
2506
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied11 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied11 !== void 0 ? _customDrawer$applied11 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc36 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc36 !== void 0 ? _state$misc36 : {}), {}, {
2318
2507
  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 : []
2319
2508
  }));
2320
2509
  if (error) {
@@ -2345,7 +2534,7 @@ function GenricLayOut(_ref) {
2345
2534
  console.log(state, "GenricLayOutstate");
2346
2535
  return /*#__PURE__*/_react.default.createElement(_styles.OapageWithDataStyle, {
2347
2536
  marginBottom: infoPanel !== null && infoPanel !== void 0 && infoPanel.bottomMarginRequired ? "18px" : "0",
2348
- className: (state === null || state === void 0 || (_state$misc34 = state.misc) === null || _state$misc34 === void 0 ? void 0 : _state$misc34.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2537
+ className: (state === null || state === void 0 || (_state$misc37 = state.misc) === null || _state$misc37 === void 0 ? void 0 : _state$misc37.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2349
2538
  }, /*#__PURE__*/_react.default.createElement(_styles.DrawerWithOutFooter, null), /*#__PURE__*/_react.default.createElement("div", {
2350
2539
  className: "fullPageLayout"
2351
2540
  }, /*#__PURE__*/_react.default.createElement(_GlobalCss.default, null, (sidebar === null || sidebar === void 0 ? void 0 : sidebar.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
@@ -2374,6 +2563,32 @@ function GenricLayOut(_ref) {
2374
2563
  }))), /*#__PURE__*/_react.default.createElement("div", {
2375
2564
  className: "headerRight"
2376
2565
  }, /*#__PURE__*/_react.default.createElement("div", {
2566
+ className: "headerTopActionButtons"
2567
+ }, (headerRightFirstButton === null || headerRightFirstButton === void 0 ? void 0 : headerRightFirstButton.visible) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
2568
+ label: headerRightFirstButton === null || headerRightFirstButton === void 0 ? void 0 : headerRightFirstButton.label,
2569
+ onClick: headerRightFirstButtonClick,
2570
+ type: headerRightFirstButton === null || headerRightFirstButton === void 0 ? void 0 : headerRightFirstButton.type,
2571
+ size: headerRightFirstButton === null || headerRightFirstButton === void 0 ? void 0 : headerRightFirstButton.size,
2572
+ iconConfig: {
2573
+ icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
2574
+ icon: headerRightFirstButton === null || headerRightFirstButton === void 0 || (_headerRightFirstButt = headerRightFirstButton.iconConfig) === null || _headerRightFirstButt === void 0 ? void 0 : _headerRightFirstButt.icon,
2575
+ size: 24,
2576
+ color: "primary"
2577
+ })
2578
+ }
2579
+ }), (headerRightSecondButton === null || headerRightSecondButton === void 0 ? void 0 : headerRightSecondButton.visible) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
2580
+ label: headerRightSecondButton === null || headerRightSecondButton === void 0 ? void 0 : headerRightSecondButton.label,
2581
+ onClick: headerRightSecondButtonClick,
2582
+ type: headerRightSecondButton === null || headerRightSecondButton === void 0 ? void 0 : headerRightSecondButton.type,
2583
+ size: headerRightSecondButton === null || headerRightSecondButton === void 0 ? void 0 : headerRightSecondButton.size,
2584
+ iconConfig: {
2585
+ icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
2586
+ icon: headerRightSecondButton === null || headerRightSecondButton === void 0 || (_headerRightSecondBut = headerRightSecondButton.iconConfig) === null || _headerRightSecondBut === void 0 ? void 0 : _headerRightSecondBut.icon,
2587
+ size: 24,
2588
+ color: "primary"
2589
+ })
2590
+ }
2591
+ })), /*#__PURE__*/_react.default.createElement("div", {
2377
2592
  className: (sidebar === null || sidebar === void 0 || (_sidebar$mobileMenuIt = sidebar.mobileMenuItems) === null || _sidebar$mobileMenuIt === void 0 || (_sidebar$mobileMenuIt = _sidebar$mobileMenuIt.items) === null || _sidebar$mobileMenuIt === void 0 ? void 0 : _sidebar$mobileMenuIt.length) > 0 ? "hideProfileOnMobile" : ""
2378
2593
  }, /*#__PURE__*/_react.default.createElement(_ProfileSection.default, {
2379
2594
  profileData: profileData,
@@ -2411,7 +2626,8 @@ function GenricLayOut(_ref) {
2411
2626
  icon: infoData === null || infoData === void 0 || (_infoData$iconConfig2 = infoData.iconConfig) === null || _infoData$iconConfig2 === void 0 ? void 0 : _infoData$iconConfig2.icon,
2412
2627
  size: (infoData === null || infoData === void 0 || (_infoData$iconConfig3 = infoData.iconConfig) === null || _infoData$iconConfig3 === void 0 ? void 0 : _infoData$iconConfig3.size) || 16
2413
2628
  }),
2414
- position: (infoData === null || infoData === void 0 || (_infoData$iconConfig4 = infoData.iconConfig) === null || _infoData$iconConfig4 === void 0 ? void 0 : _infoData$iconConfig4.position) || "left"
2629
+ position: (infoData === null || infoData === void 0 || (_infoData$iconConfig4 = infoData.iconConfig) === null || _infoData$iconConfig4 === void 0 ? void 0 : _infoData$iconConfig4.position) || "left",
2630
+ closeIconPosition: infoData === null || infoData === void 0 ? void 0 : infoData.closeIconPosition
2415
2631
  }
2416
2632
  })), (cards === null || cards === void 0 ? void 0 : cards.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2417
2633
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
@@ -2469,7 +2685,7 @@ function GenricLayOut(_ref) {
2469
2685
  }
2470
2686
  })), /*#__PURE__*/_react.default.createElement("div", {
2471
2687
  className: "oaheaderButtonsRight"
2472
- }, !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
2688
+ }, !isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && (rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.visible) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
2473
2689
  label: rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.label,
2474
2690
  onClick: rightHeaderSecondButtonClick,
2475
2691
  type: rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.type,
@@ -2543,14 +2759,14 @@ function GenricLayOut(_ref) {
2543
2759
  }),
2544
2760
  position: (infoPanel === null || infoPanel === void 0 || (_infoPanel$data5 = infoPanel.data) === null || _infoPanel$data5 === void 0 || (_infoPanel$data5 = _infoPanel$data5.iconConfig) === null || _infoPanel$data5 === void 0 ? void 0 : _infoPanel$data5.position) || "left"
2545
2761
  }
2546
- }))), Object.keys((state === null || state === void 0 || (_state$customDrawer3 = state.customDrawer) === null || _state$customDrawer3 === void 0 ? void 0 : _state$customDrawer3.appliedFilters) || {}).length > 0 && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2762
+ }))), Object.keys((state === null || state === void 0 || (_state$customDrawer4 = state.customDrawer) === null || _state$customDrawer4 === void 0 ? void 0 : _state$customDrawer4.appliedFilters) || {}).length > 0 && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2547
2763
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
2548
2764
  active: true,
2549
2765
  paragraph: {
2550
2766
  rows: 1
2551
2767
  }
2552
2768
  }, /*#__PURE__*/_react.default.createElement(_AppliedFilters.default, {
2553
- appliedFilters: state === null || state === void 0 || (_state$customDrawer4 = state.customDrawer) === null || _state$customDrawer4 === void 0 ? void 0 : _state$customDrawer4.appliedFilters,
2769
+ appliedFilters: state === null || state === void 0 || (_state$customDrawer5 = state.customDrawer) === null || _state$customDrawer5 === void 0 ? void 0 : _state$customDrawer5.appliedFilters,
2554
2770
  filterConfig: customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.data,
2555
2771
  onRemoveFilter: onRemoveAppliedFilter,
2556
2772
  onClearAll: onClearAllAppliedFilters,
@@ -2587,7 +2803,7 @@ function GenricLayOut(_ref) {
2587
2803
  }
2588
2804
  // Call handleTabExtraActionChange
2589
2805
  if (handleTabExtraActionChange) {
2590
- var _tables$pagination17, _tables$pagination18, _tables$sorting31, _tables$sorting32, _tables$filter13, _staticFilter$data14, _state$misc35;
2806
+ var _tables$pagination17, _tables$pagination18, _tables$sorting31, _tables$sorting32, _tables$filter13, _staticFilter$data14, _state$misc38;
2591
2807
  dispatch({
2592
2808
  type: _layoutReducer.actionTypes.SET_LOADING,
2593
2809
  payload: true
@@ -2606,7 +2822,7 @@ function GenricLayOut(_ref) {
2606
2822
  columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
2607
2823
  }), (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) && {
2608
2824
  staticFilter: staticFilter.data.find(item => item.selected).value
2609
- }), (_state$misc35 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc35 !== void 0 ? _state$misc35 : {}));
2825
+ }), (_state$misc38 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc38 !== void 0 ? _state$misc38 : {}));
2610
2826
  if (error) {
2611
2827
  showErrorNotification(error);
2612
2828
  dispatch({
@@ -2653,6 +2869,24 @@ function GenricLayOut(_ref) {
2653
2869
  }
2654
2870
  })
2655
2871
  }) : null
2872
+ }))), (tabTableInfoPanel === null || tabTableInfoPanel === void 0 ? void 0 : tabTableInfoPanel.visible) && (tabTableInfoPanel === null || tabTableInfoPanel === void 0 ? void 0 : tabTableInfoPanel.data) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2873
+ loading: state === null || state === void 0 ? void 0 : state.isLoading,
2874
+ active: true,
2875
+ paragraph: {
2876
+ rows: 1
2877
+ }
2878
+ }, /*#__PURE__*/_react.default.createElement("div", {
2879
+ className: "margin-bottom-12"
2880
+ }, /*#__PURE__*/_react.default.createElement(_CustomInfo.default, {
2881
+ description: tabTableInfoPanel === null || tabTableInfoPanel === void 0 || (_tabTableInfoPanel$da = tabTableInfoPanel.data) === null || _tabTableInfoPanel$da === void 0 ? void 0 : _tabTableInfoPanel$da.description,
2882
+ color: tabTableInfoPanel === null || tabTableInfoPanel === void 0 || (_tabTableInfoPanel$da2 = tabTableInfoPanel.data) === null || _tabTableInfoPanel$da2 === void 0 ? void 0 : _tabTableInfoPanel$da2.color,
2883
+ iconConfig: {
2884
+ icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
2885
+ color: (tabTableInfoPanel === null || tabTableInfoPanel === void 0 || (_tabTableInfoPanel$da3 = tabTableInfoPanel.data) === null || _tabTableInfoPanel$da3 === void 0 || (_tabTableInfoPanel$da3 = _tabTableInfoPanel$da3.iconConfig) === null || _tabTableInfoPanel$da3 === void 0 ? void 0 : _tabTableInfoPanel$da3.color) || "warning",
2886
+ icon: tabTableInfoPanel === null || tabTableInfoPanel === void 0 || (_tabTableInfoPanel$da4 = tabTableInfoPanel.data) === null || _tabTableInfoPanel$da4 === void 0 || (_tabTableInfoPanel$da4 = _tabTableInfoPanel$da4.iconConfig) === null || _tabTableInfoPanel$da4 === void 0 ? void 0 : _tabTableInfoPanel$da4.icon
2887
+ }),
2888
+ position: (tabTableInfoPanel === null || tabTableInfoPanel === void 0 || (_tabTableInfoPanel$da5 = tabTableInfoPanel.data) === null || _tabTableInfoPanel$da5 === void 0 || (_tabTableInfoPanel$da5 = _tabTableInfoPanel$da5.iconConfig) === null || _tabTableInfoPanel$da5 === void 0 ? void 0 : _tabTableInfoPanel$da5.position) || "left"
2889
+ }
2656
2890
  }))), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2657
2891
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
2658
2892
  active: true,
@@ -2700,6 +2934,8 @@ function GenricLayOut(_ref) {
2700
2934
  generateS3Url: generateS3Url,
2701
2935
  downloadFileOnS3: downloadFileOnS3,
2702
2936
  uploadOnS3: uploadOnS3,
2937
+ postUploadCall: postUploadCall,
2938
+ onPostUploadSuccess: handlePostUploadSuccess,
2703
2939
  onSelectHandlers: updateStateData,
2704
2940
  handleCollapsibleKeyData: handleCollapsibleKeyData,
2705
2941
  misc: state === null || state === void 0 ? void 0 : state.misc
@@ -2717,6 +2953,8 @@ function GenricLayOut(_ref) {
2717
2953
  generateS3Url: generateS3Url,
2718
2954
  downloadFileOnS3: downloadFileOnS3,
2719
2955
  uploadOnS3: uploadOnS3,
2956
+ postUploadCall: postUploadCall,
2957
+ onPostUploadSuccess: handlePostUploadSuccess,
2720
2958
  handleCollapsibleKeyData: handleCollapsibleKeyData,
2721
2959
  misc: state === null || state === void 0 ? void 0 : state.misc
2722
2960
  }))), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.visible) && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
@@ -2733,6 +2971,8 @@ function GenricLayOut(_ref) {
2733
2971
  generateS3Url: generateS3Url,
2734
2972
  downloadFileOnS3: downloadFileOnS3,
2735
2973
  uploadOnS3: uploadOnS3,
2974
+ postUploadCall: postUploadCall,
2975
+ onPostUploadSuccess: handlePostUploadSuccess,
2736
2976
  handleCollapsibleKeyData: handleCollapsibleKeyData,
2737
2977
  handleDownloadTemplate: handleDownloadTemplate,
2738
2978
  misc: state === null || state === void 0 ? void 0 : state.misc
@@ -208,7 +208,7 @@ const genericLayoutReducer = exports.genericLayoutReducer = (0, _immer.produce)(
208
208
  }
209
209
  case actionTypes.SET_SUBHEADING_SELECTED_CONFIG:
210
210
  draft.header.subHeading.jsxConfig.value = action.payload;
211
- draft.dropdownSearch.error = null;
211
+ if (draft.dropdownSearch) draft.dropdownSearch.error = null;
212
212
  break;
213
213
  case actionTypes.SET_STATIC_FILTER_SELECTION:
214
214
  if ((_draft$staticFilter = draft.staticFilter) !== null && _draft$staticFilter !== void 0 && _draft$staticFilter.data) {
@@ -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: 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 => {
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 .headerTopActionButtons {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-right: 16px;\n margin-top: 8px;\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 max-width: 500px;\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;
@@ -13,6 +13,7 @@ require("core-js/modules/es.regexp.exec.js");
13
13
  require("core-js/modules/es.regexp.to-string.js");
14
14
  require("core-js/modules/es.array.includes.js");
15
15
  require("core-js/modules/es.string.includes.js");
16
+ require("core-js/modules/es.promise.js");
16
17
  var _antd = require("antd");
17
18
  var _react = _interopRequireWildcard(require("react"));
18
19
  var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
@@ -58,6 +59,7 @@ function FormWidget(props) {
58
59
  uploadOnS3,
59
60
  handleCollapsibleKeyData,
60
61
  handleDownloadTemplate,
62
+ postUploadCall,
61
63
  misc
62
64
  } = props;
63
65
  const {
@@ -283,18 +285,34 @@ function FormWidget(props) {
283
285
  className: (_item$className = item === null || item === void 0 ? void 0 : item.className) !== null && _item$className !== void 0 ? _item$className : ""
284
286
  })));
285
287
  }
286
- const handleS3Response = (res, fieldName) => {
287
- var _res$data;
288
- const docId = res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.uuid;
288
+ const handleS3Response = async (res, fieldName, item) => {
289
+ var _res$data$uuid, _res$data, _res$response;
290
+ const docId = (_res$data$uuid = res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.uuid) !== null && _res$data$uuid !== void 0 ? _res$data$uuid : res === null || res === void 0 || (_res$response = res.response) === null || _res$response === void 0 || (_res$response = _res$response.data) === null || _res$response === void 0 ? void 0 : _res$response.uuid;
289
291
  if (docId != null) {
290
292
  form.setFieldsValue({
291
293
  [fieldName]: docId
292
294
  });
293
295
  }
296
+ if (item.postUploadCallApiRequired) {
297
+ const {
298
+ error,
299
+ data
300
+ } = await postUploadCall(item, docId);
301
+ if (!error && data) {
302
+ var _props$onPostUploadSu;
303
+ const fieldValues = await (props === null || props === void 0 || (_props$onPostUploadSu = props.onPostUploadSuccess) === null || _props$onPostUploadSu === void 0 ? void 0 : _props$onPostUploadSu.call(props, data));
304
+ if (fieldValues && typeof fieldValues === 'object' && Object.keys(fieldValues).length > 0) {
305
+ form.setFieldsValue(fieldValues);
306
+ }
307
+ }
308
+ }
294
309
  };
295
310
  if (item.widget === "upload") {
296
311
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
297
- className: dynamicClassInCaseOfUpload(item)
312
+ className: dynamicClassInCaseOfUpload(item),
313
+ style: item !== null && item !== void 0 && item.remarks ? {
314
+ marginBottom: '12px'
315
+ } : {}
298
316
  }, " ", /*#__PURE__*/_react.default.createElement(_CustomUpload.default, _extends({
299
317
  label: (item === null || item === void 0 ? void 0 : item.heading) && /*#__PURE__*/_react.default.createElement(_Typography.default, {
300
318
  color: "primary-content",
@@ -310,8 +328,13 @@ function FormWidget(props) {
310
328
  maxAllowedSize: item === null || item === void 0 ? void 0 : item.maxAllowedSize,
311
329
  downloadCallback: downloadFileOnS3,
312
330
  beforeUploadFileValidations: item === null || item === void 0 ? void 0 : item.beforeUploadFileValidations,
313
- s3ResponseReturn: res => handleS3Response(res, item.name)
314
- }, item === null || item === void 0 ? void 0 : item.uploadProps))));
331
+ s3ResponseReturn: res => handleS3Response(res, item.name, item)
332
+ }, item === null || item === void 0 ? void 0 : item.uploadProps))), /*#__PURE__*/_react.default.createElement("div", {
333
+ className: "margin-bottom-16"
334
+ }, (item === null || item === void 0 ? void 0 : item.remarks) && /*#__PURE__*/_react.default.createElement(_Typography.default, {
335
+ typography: "type-b2-400",
336
+ color: "secondary-content"
337
+ }, item.remarks)));
315
338
  }
316
339
  };
317
340
  const renderWidget = item => {
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  require("core-js/modules/web.dom-collections.iterator.js");
8
+ require("core-js/modules/es.promise.js");
9
+ require("core-js/modules/es.string.trim.js");
10
+ require("core-js/modules/es.regexp.exec.js");
11
+ require("core-js/modules/es.regexp.test.js");
8
12
  var _react = _interopRequireDefault(require("react"));
9
13
  var _antd = require("antd");
10
14
  var _CustomInput = _interopRequireDefault(require("../../components/oa-component-input/CustomInput"));
@@ -55,6 +59,18 @@ function AddressForm(props) {
55
59
  rules: [{
56
60
  required: true,
57
61
  message: "Please input your House no. / Flat / Floor!"
62
+ }, {
63
+ validator: (_, value) => {
64
+ if (!value) return Promise.resolve();
65
+ const trimmed = value.trim();
66
+ if (trimmed.length < 2) {
67
+ return Promise.reject(new Error('Please enter at least 2 characters.'));
68
+ }
69
+ if (!/[a-zA-Z0-9]/.test(trimmed)) {
70
+ return Promise.reject(new Error('Please enter a valid House no. / Flat / Floor!'));
71
+ }
72
+ return Promise.resolve();
73
+ }
58
74
  }]
59
75
  }, /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
60
76
  placeholder: "Type here",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "0.18.387",
3
+ "version": "0.18.389",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",