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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -245,6 +245,7 @@ function CustomTableV1(_ref2) {
245
245
  return /*#__PURE__*/_react.default.createElement("div", {
246
246
  key: idx
247
247
  }, (option === null || option === void 0 ? void 0 : option.type) === "button" ? /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
248
+ style: _objectSpread({}, typeof getByPath(record, option === null || option === void 0 ? void 0 : option.key) === "object" ? getByPath(record, option === null || option === void 0 ? void 0 : option.key) : {}),
248
249
  disabled: (record === null || record === void 0 ? void 0 : record[option === null || option === void 0 ? void 0 : option.disabled]) || false,
249
250
  type: (option === null || option === void 0 ? void 0 : option.subType) || "primary",
250
251
  label: (option === null || option === void 0 ? void 0 : option.label) || (record === null || record === void 0 ? void 0 : record[option === null || option === void 0 ? void 0 : option.key]) || "",
@@ -47,18 +47,18 @@ const getBase64 = file => new Promise((resolve, reject) => {
47
47
  * @returns {undefined}
48
48
  */
49
49
  const downloadFile = (base64String, fileName) => {
50
- const link = document.createElement("a");
50
+ const link = document.createElement('a');
51
51
  link.href = base64String;
52
- link.download = fileName || "download";
52
+ link.download = fileName || 'download';
53
53
  link.click();
54
54
  };
55
55
  function isImageFile(fileName) {
56
56
  var _fileName$split;
57
57
  // Extract the file extension from the file name
58
- const fileExtension = fileName === null || fileName === void 0 || (_fileName$split = fileName.split(".")) === null || _fileName$split === void 0 || (_fileName$split = _fileName$split.pop()) === null || _fileName$split === void 0 ? void 0 : _fileName$split.toLowerCase();
58
+ const fileExtension = fileName === null || fileName === void 0 || (_fileName$split = fileName.split('.')) === null || _fileName$split === void 0 || (_fileName$split = _fileName$split.pop()) === null || _fileName$split === void 0 ? void 0 : _fileName$split.toLowerCase();
59
59
 
60
60
  // Define an array of image file extensions
61
- const imageFileExtensions = ["jpg", "jpeg", "png"];
61
+ const imageFileExtensions = ['jpg', 'jpeg', 'png'];
62
62
 
63
63
  // Check if the file extension is in the array of image file extensions
64
64
  if (imageFileExtensions.indexOf(fileExtension) !== -1) {
@@ -107,7 +107,7 @@ function DocumentUpload(_ref) {
107
107
  antDesignProps = _objectWithoutProperties(_ref, _excluded);
108
108
  const [previewOpen, setPreviewOpen] = (0, _react.useState)(false);
109
109
  const [previewImage, setPreviewImage] = (0, _react.useState)(null);
110
- const [previewTitle, setPreviewTitle] = (0, _react.useState)("");
110
+ const [previewTitle, setPreviewTitle] = (0, _react.useState)('');
111
111
  const [loading, setLoading] = (0, _react.useState)(false);
112
112
  const [fileList, setFileList] = (0, _react.useState)(uploadedDocuments);
113
113
  const [deleteConfirmation, setDeleteConfirmation] = (0, _react.useState)(false);
@@ -125,7 +125,7 @@ function DocumentUpload(_ref) {
125
125
  }
126
126
  if (file !== null && file !== void 0 && file.originFileObj) {
127
127
  setPreviewImage(file);
128
- } else if ((file === null || file === void 0 ? void 0 : file.fileType) === "thumbnail") {
128
+ } else if ((file === null || file === void 0 ? void 0 : file.fileType) === 'thumbnail') {
129
129
  const url = await getPreview();
130
130
  setPreviewImage(url);
131
131
  } else {
@@ -141,17 +141,16 @@ function DocumentUpload(_ref) {
141
141
  file
142
142
  } = _ref2;
143
143
  if (antDesignProps !== null && antDesignProps !== void 0 && antDesignProps.customRequest) {
144
- const isError = newFileList.some(f => (f === null || f === void 0 ? void 0 : f.status) === "error");
144
+ const isError = newFileList.some(f => (f === null || f === void 0 ? void 0 : f.status) === 'error');
145
145
  if (isError) {
146
146
  setFileList([]);
147
147
  setIsError(true);
148
148
  setLoading(false);
149
149
  return;
150
- } else {
151
- setIsError(false);
152
150
  }
151
+ setIsError(false);
153
152
  setFileList(newFileList);
154
- const isUploading = newFileList.some(f => f.status === "uploading");
153
+ const isUploading = newFileList.some(f => f.status === 'uploading');
155
154
  setLoading(isUploading);
156
155
  return;
157
156
  }
@@ -163,7 +162,7 @@ function DocumentUpload(_ref) {
163
162
  try {
164
163
  if ((file === null || file === void 0 ? void 0 : file.uid) === (files === null || files === void 0 ? void 0 : files.uid)) {
165
164
  await handleCustomOnChange(files);
166
- modifiedFile.status = "done";
165
+ modifiedFile.status = 'done';
167
166
  if (!isImageFile(file === null || file === void 0 ? void 0 : file.name)) {
168
167
  modifiedFile.url = _PdfSampleImage.default;
169
168
  }
@@ -178,7 +177,7 @@ function DocumentUpload(_ref) {
178
177
  setFileList(tempList);
179
178
  };
180
179
  const getUploadButtonIcon = () => {
181
- if ((uploadButtonConfig === null || uploadButtonConfig === void 0 ? void 0 : uploadButtonConfig.icon) === "PlusOutlined") {
180
+ if ((uploadButtonConfig === null || uploadButtonConfig === void 0 ? void 0 : uploadButtonConfig.icon) === 'PlusOutlined') {
182
181
  return /*#__PURE__*/_react.default.createElement(_icons.PlusOutlined, null);
183
182
  }
184
183
  return /*#__PURE__*/_react.default.createElement(_icons.UploadOutlined, null);
@@ -186,10 +185,10 @@ function DocumentUpload(_ref) {
186
185
  const uploadButton = /*#__PURE__*/_react.default.createElement("button", {
187
186
  style: {
188
187
  border: 0,
189
- background: "none"
188
+ background: 'none'
190
189
  },
191
190
  type: "button"
192
- }, loading ? /*#__PURE__*/_react.default.createElement(_icons.LoadingOutlined, null) : getUploadButtonIcon(), /*#__PURE__*/_react.default.createElement("div", null, uploadButtonConfig !== null && uploadButtonConfig !== void 0 && uploadButtonConfig.text ? uploadButtonConfig === null || uploadButtonConfig === void 0 ? void 0 : uploadButtonConfig.text : "Upload"));
191
+ }, loading ? /*#__PURE__*/_react.default.createElement(_icons.LoadingOutlined, null) : getUploadButtonIcon(), /*#__PURE__*/_react.default.createElement("div", null, uploadButtonConfig !== null && uploadButtonConfig !== void 0 && uploadButtonConfig.text ? uploadButtonConfig === null || uploadButtonConfig === void 0 ? void 0 : uploadButtonConfig.text : 'Upload'));
193
192
  const DeleteFile = async () => {
194
193
  await deleteHandler(selectedFile, isEmptyFileList => {
195
194
  if (isEmptyFileList) {
@@ -203,7 +202,7 @@ function DocumentUpload(_ref) {
203
202
  };
204
203
  const handleRemove = file => new Promise((resolve, reject) => {
205
204
  // If file is uploading, cancel immediately without confirmation
206
- if ((file === null || file === void 0 ? void 0 : file.status) === "uploading") {
205
+ if ((file === null || file === void 0 ? void 0 : file.status) === 'uploading') {
207
206
  // Remove file from list immediately to cancel upload
208
207
  const newFileList = fileList.filter(f => f.uid !== file.uid);
209
208
  setFileList(newFileList);
@@ -213,7 +212,7 @@ function DocumentUpload(_ref) {
213
212
  }
214
213
 
215
214
  // If file is done or error, show confirmation modal
216
- if ((file === null || file === void 0 ? void 0 : file.status) === "done" || (file === null || file === void 0 ? void 0 : file.status) === "error") {
215
+ if ((file === null || file === void 0 ? void 0 : file.status) === 'done' || (file === null || file === void 0 ? void 0 : file.status) === 'error') {
217
216
  setSelectedFile(file);
218
217
  setDeleteConfirmation(true);
219
218
  resolve(false); // Prevent removal until confirmed
@@ -231,18 +230,18 @@ function DocumentUpload(_ref) {
231
230
  // Get the appropriate remove icon based on file status
232
231
  const getRemoveIcon = file => {
233
232
  // Show cross icon during upload (to cancel)
234
- if ((file === null || file === void 0 ? void 0 : file.status) === "uploading") {
233
+ if ((file === null || file === void 0 ? void 0 : file.status) === 'uploading') {
235
234
  return /*#__PURE__*/_react.default.createElement(_icons.CloseOutlined, null);
236
235
  }
237
236
  // Show delete icon after upload is done or if upload failed
238
- if ((file === null || file === void 0 ? void 0 : file.status) === "done" || (file === null || file === void 0 ? void 0 : file.status) === "error") {
237
+ if ((file === null || file === void 0 ? void 0 : file.status) === 'done' || (file === null || file === void 0 ? void 0 : file.status) === 'error') {
239
238
  return /*#__PURE__*/_react.default.createElement(_icons.DeleteOutlined, null);
240
239
  }
241
240
  // Default to delete icon
242
241
  return /*#__PURE__*/_react.default.createElement(_icons.DeleteOutlined, null);
243
242
  };
244
243
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styles.MainStyleSec, null, /*#__PURE__*/_react.default.createElement(_styles.StyledSection, null, /*#__PURE__*/_react.default.createElement("div", {
245
- onClick: listType === "picture" ? () => {
244
+ onClick: listType === 'picture' ? () => {
246
245
  var _inst$upload, _inst$nativeElement, _inst$nativeElement$q, _inst$querySelector, _input$click;
247
246
  if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) >= noOfUpload) return;
248
247
  const inst = uploadRef.current;
@@ -253,17 +252,17 @@ function DocumentUpload(_ref) {
253
252
  const input = (inst === null || inst === void 0 || (_inst$upload = inst.upload) === null || _inst$upload === void 0 ? void 0 : _inst$upload.input) || (inst === null || inst === void 0 ? void 0 : inst.fileInput) || (inst === null || inst === void 0 || (_inst$nativeElement = inst.nativeElement) === null || _inst$nativeElement === void 0 || (_inst$nativeElement$q = _inst$nativeElement.querySelector) === null || _inst$nativeElement$q === void 0 ? void 0 : _inst$nativeElement$q.call(_inst$nativeElement, 'input[type="file"]')) || (inst === null || inst === void 0 || (_inst$querySelector = inst.querySelector) === null || _inst$querySelector === void 0 ? void 0 : _inst$querySelector.call(inst, 'input[type="file"]'));
254
253
  input === null || input === void 0 || (_input$click = input.click) === null || _input$click === void 0 || _input$click.call(input);
255
254
  } : null,
256
- className: listType === "picture" ? "uploadSecPad ".concat(isError && "errorBorder") : "uploadDiv"
255
+ className: listType === 'picture' ? "uploadSecPad ".concat(isError && 'errorBorder') : 'uploadDiv'
257
256
  }, multipleDoc > 0 && /*#__PURE__*/_react.default.createElement("em", null, multipleDoc), /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
258
257
  theme: {
259
258
  token: {
260
- colorBorder: _ColorVariablesMap.default["--color-divider"],
259
+ colorBorder: _ColorVariablesMap.default['--color-divider'],
261
260
  borderRadiusLG: 4,
262
- colorPrimaryHover: _ColorVariablesMap.default["--color-primary"],
263
- colorPrimaryBorder: _ColorVariablesMap.default["--color-divider"],
264
- colorFillAlter: _ColorVariablesMap.default["--color-secondary-background"],
265
- colorError: _ColorVariablesMap.default["--color-negative"],
266
- colorText: _ColorVariablesMap.default["--color-secondary-content"]
261
+ colorPrimaryHover: _ColorVariablesMap.default['--color-primary'],
262
+ colorPrimaryBorder: _ColorVariablesMap.default['--color-divider'],
263
+ colorFillAlter: _ColorVariablesMap.default['--color-secondary-background'],
264
+ colorError: _ColorVariablesMap.default['--color-negative'],
265
+ colorText: _ColorVariablesMap.default['--color-secondary-content']
267
266
  }
268
267
  }
269
268
  }, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
@@ -271,10 +270,10 @@ function DocumentUpload(_ref) {
271
270
  rules: [{
272
271
  validator: (rule, value) => {
273
272
  if (isMandatory && !(value !== null && value !== void 0 && value.length)) {
274
- if (typeof value === "object" && Object.keys(value).length > 0) {
273
+ if (typeof value === 'object' && Object.keys(value).length > 0) {
275
274
  return Promise.resolve();
276
275
  }
277
- return Promise.reject(new Error("Please upload the document."));
276
+ return Promise.reject(new Error('Please upload the document.'));
278
277
  }
279
278
  return Promise.resolve();
280
279
  }
@@ -282,7 +281,7 @@ function DocumentUpload(_ref) {
282
281
  }, /*#__PURE__*/_react.default.createElement(_antd.Upload, _extends({
283
282
  onClick: e => e.stopPropagation(),
284
283
  ref: uploadRef,
285
- listType: listType ? listType : "picture-card",
284
+ listType: listType || 'picture-card',
286
285
  fileList: fileList,
287
286
  onPreview: notShowPreviewButton ? undefined : handlePreview,
288
287
  onChange: handleChange,
@@ -311,17 +310,17 @@ function DocumentUpload(_ref) {
311
310
  }), deleteConfirmation && /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
312
311
  buttonConfig: [{
313
312
  callback: () => DeleteFile(),
314
- label: "Yes, Delete",
315
- type: "danger-primary"
313
+ label: 'Yes, Delete',
314
+ type: 'danger-primary'
316
315
  }],
317
316
  imgSrc: deleteModalConfig !== null && deleteModalConfig !== void 0 && deleteModalConfig.deleteImage ? deleteModalConfig.deleteImage : _handIcon.default,
318
317
  open: deleteConfirmation,
319
318
  onCancel: () => {
320
319
  setDeleteConfirmation(false);
321
320
  },
322
- title: deleteModalConfig !== null && deleteModalConfig !== void 0 && deleteModalConfig.title ? deleteModalConfig.title : "Delete Item?",
321
+ title: deleteModalConfig !== null && deleteModalConfig !== void 0 && deleteModalConfig.title ? deleteModalConfig.title : 'Delete Item?',
323
322
  className: "delete-modal-confirmation"
324
- }, deleteModalConfig !== null && deleteModalConfig !== void 0 && deleteModalConfig.body ? deleteModalConfig.body : "This action will permanently delete the selected item"));
323
+ }, deleteModalConfig !== null && deleteModalConfig !== void 0 && deleteModalConfig.body ? deleteModalConfig.body : 'This action will permanently delete the selected item'));
325
324
  }
326
325
  DocumentUpload.propTypes = {
327
326
  uploadedDocuments: _propTypes.default.array,
@@ -350,7 +349,7 @@ DocumentUpload.propTypes = {
350
349
  DocumentUpload.defaultProps = {
351
350
  uploadedDocuments: [],
352
351
  handleCustomOnChange: () => {},
353
- formName: "",
352
+ formName: '',
354
353
  multipleDoc: 0,
355
354
  showDelete: true,
356
355
  getPreview: () => {},
@@ -53,7 +53,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
53
53
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
54
54
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
55
55
  function GenricLayOut(_ref) {
56
- var _state$misc29, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables4, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination17, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
56
+ var _state$misc30, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables5, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination17, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
57
57
  let {
58
58
  config,
59
59
  getInitialData,
@@ -958,6 +958,26 @@ function GenricLayOut(_ref) {
958
958
  });
959
959
  }
960
960
  }
961
+ } else if ((configArgs === null || configArgs === void 0 ? void 0 : configArgs.action) === "CHANGE_ROW") {
962
+ if (handleTableColumnClick) {
963
+ var _state$tables2, _state$misc14;
964
+ const {
965
+ error,
966
+ data
967
+ } = await (handleTableColumnClick === null || handleTableColumnClick === void 0 ? void 0 : handleTableColumnClick(_objectSpread({
968
+ tables: (_state$tables2 = state === null || state === void 0 ? void 0 : state.tables) !== null && _state$tables2 !== void 0 ? _state$tables2 : {},
969
+ record: record,
970
+ type: configArgs === null || configArgs === void 0 ? void 0 : configArgs.call
971
+ }, (_state$misc14 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc14 !== void 0 ? _state$misc14 : {})));
972
+ if (error) {
973
+ showErrorNotification(error);
974
+ } else {
975
+ dispatch({
976
+ type: _layoutReducer.actionTypes.CHANGE_ROW,
977
+ payload: data
978
+ });
979
+ }
980
+ }
961
981
  }
962
982
  };
963
983
 
@@ -1023,11 +1043,11 @@ function GenricLayOut(_ref) {
1023
1043
  }
1024
1044
  } else if ((configData === null || configData === void 0 ? void 0 : configData.action) === "ACTION_ON_CTA") {
1025
1045
  if (handleTableFooterApi) {
1026
- var _state$tables2;
1046
+ var _state$tables3;
1027
1047
  const {
1028
1048
  error,
1029
1049
  data
1030
- } = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state === null || state === void 0 || (_state$tables2 = state.tables) === null || _state$tables2 === void 0 ? void 0 : _state$tables2.selectedRowKeys, state));
1050
+ } = await (handleTableFooterApi === null || handleTableFooterApi === void 0 ? void 0 : handleTableFooterApi(state === null || state === void 0 || (_state$tables3 = state.tables) === null || _state$tables3 === void 0 ? void 0 : _state$tables3.selectedRowKeys, state));
1031
1051
  if (error) {
1032
1052
  showErrorNotification(error);
1033
1053
  } else {
@@ -1125,7 +1145,7 @@ function GenricLayOut(_ref) {
1125
1145
  }
1126
1146
  });
1127
1147
  if (handleTableChange) {
1128
- var _state$dropdownSearch3, _state$inputSearch4, _state$tabs8, _header$subHeading15, _header$subHeading16, _staticFilter$data6, _customDrawer$applied8, _state$misc14, _state$staticFilter$m5, _state$staticFilter5;
1148
+ var _state$dropdownSearch3, _state$inputSearch4, _state$tabs8, _header$subHeading15, _header$subHeading16, _staticFilter$data6, _customDrawer$applied8, _state$misc15, _state$staticFilter$m5, _state$staticFilter5;
1129
1149
  dispatch({
1130
1150
  type: _layoutReducer.actionTypes.SET_LOADING,
1131
1151
  payload: true
@@ -1150,7 +1170,7 @@ function GenricLayOut(_ref) {
1150
1170
  staticFilter: staticFilter.data.find(item => item.selected).value
1151
1171
  }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied8 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied8 !== void 0 ? _customDrawer$applied8 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), {}, {
1152
1172
  order: (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "ascend" && "ASC" || (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "descend" && "DESC" || ""
1153
- }, (_state$misc14 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc14 !== void 0 ? _state$misc14 : {}), {}, {
1173
+ }, (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {}), {}, {
1154
1174
  multiSelectValue: (_state$staticFilter$m5 = state === null || state === void 0 || (_state$staticFilter5 = state.staticFilter) === null || _state$staticFilter5 === void 0 ? void 0 : _state$staticFilter5.multiSelectValue) !== null && _state$staticFilter$m5 !== void 0 ? _state$staticFilter$m5 : []
1155
1175
  }));
1156
1176
  if (error) {
@@ -1233,7 +1253,7 @@ function GenricLayOut(_ref) {
1233
1253
  });
1234
1254
  const selectedStaticFilterValue = tables !== null && tables !== void 0 && tables.staticFilterKey && (tables === null || tables === void 0 ? void 0 : tables.staticFilterKey) == key && Array.isArray(staticFilter.data) ? (_staticFilter$data$fi2 = staticFilter.data.find(item => item.selected)) === null || _staticFilter$data$fi2 === void 0 ? void 0 : _staticFilter$data$fi2.value : undefined;
1235
1255
  if (handleTabClick) {
1236
- var _state$misc15, _tables$pagination, _tables$pagination2, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _header$subHeading17, _header$subHeading18, _customDrawer$applied9, _state$misc16, _state$staticFilter$m6, _state$staticFilter6;
1256
+ var _state$misc16, _tables$pagination, _tables$pagination2, _tables$sorting13, _tables$sorting14, _state$dropdownSearch4, _header$subHeading17, _header$subHeading18, _customDrawer$applied9, _state$misc17, _state$staticFilter$m6, _state$staticFilter6;
1237
1257
  dispatch({
1238
1258
  type: _layoutReducer.actionTypes.SET_LOADING,
1239
1259
  payload: true
@@ -1241,7 +1261,7 @@ function GenricLayOut(_ref) {
1241
1261
  const {
1242
1262
  error,
1243
1263
  data
1244
- } = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$misc15 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc15 !== void 0 ? _state$misc15 : {}), {}, {
1264
+ } = await handleTabClick(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}), {}, {
1245
1265
  selectedTab: key,
1246
1266
  current: tables === null || tables === void 0 || (_tables$pagination = tables.pagination) === null || _tables$pagination === void 0 ? void 0 : _tables$pagination.current,
1247
1267
  pageSize: tables === null || tables === void 0 || (_tables$pagination2 = tables.pagination) === null || _tables$pagination2 === void 0 ? void 0 : _tables$pagination2.pageSize,
@@ -1255,7 +1275,7 @@ function GenricLayOut(_ref) {
1255
1275
  selectedOption: state.dropdownSearch.selectedOption
1256
1276
  }), (header === null || header === void 0 || (_header$subHeading17 = header.subHeading) === null || _header$subHeading17 === void 0 || (_header$subHeading17 = _header$subHeading17.jsxConfig) === null || _header$subHeading17 === void 0 ? void 0 : _header$subHeading17.type) == "select" ? {
1257
1277
  subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading18 = header.subHeading) === null || _header$subHeading18 === void 0 || (_header$subHeading18 = _header$subHeading18.jsxConfig) === null || _header$subHeading18 === void 0 ? void 0 : _header$subHeading18.value
1258
- } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied9 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied9 !== void 0 ? _customDrawer$applied9 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc16 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc16 !== void 0 ? _state$misc16 : {}), {}, {
1278
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied9 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied9 !== void 0 ? _customDrawer$applied9 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {}), {}, {
1259
1279
  multiSelectValue: (_state$staticFilter$m6 = state === null || state === void 0 || (_state$staticFilter6 = state.staticFilter) === null || _state$staticFilter6 === void 0 ? void 0 : _state$staticFilter6.multiSelectValue) !== null && _state$staticFilter$m6 !== void 0 ? _state$staticFilter$m6 : []
1260
1280
  }));
1261
1281
  if (error) {
@@ -1351,11 +1371,11 @@ function GenricLayOut(_ref) {
1351
1371
  return;
1352
1372
  }
1353
1373
  if (handleDrawerFormOnFinish) {
1354
- var _state$misc17;
1374
+ var _state$misc18;
1355
1375
  const {
1356
1376
  error,
1357
1377
  data
1358
- } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$misc17 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc17 !== void 0 ? _state$misc17 : {})));
1378
+ } = await (handleDrawerFormOnFinish === null || handleDrawerFormOnFinish === void 0 ? void 0 : handleDrawerFormOnFinish(_objectSpread(_objectSpread(_objectSpread({}, record), formData), (_state$misc18 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc18 !== void 0 ? _state$misc18 : {})));
1359
1379
  if (error) {
1360
1380
  showErrorNotification(error);
1361
1381
  } else {
@@ -1379,7 +1399,7 @@ function GenricLayOut(_ref) {
1379
1399
 
1380
1400
  // If there are remaining filters, reapply them
1381
1401
  if (Object.keys(currentFilters).length > 0) {
1382
- var _state$dropdownSearch5, _state$inputSearch5, _state$tabs11, _tables$pagination3, _tables$pagination4, _tables$filter6, _tables$sorting15, _header$subHeading19, _header$subHeading20, _staticFilter$data7, _tables$sorting16, _state$misc18, _state$staticFilter$m7, _state$staticFilter7;
1402
+ var _state$dropdownSearch5, _state$inputSearch5, _state$tabs11, _tables$pagination3, _tables$pagination4, _tables$filter6, _tables$sorting15, _header$subHeading19, _header$subHeading20, _staticFilter$data7, _tables$sorting16, _state$misc19, _state$staticFilter$m7, _state$staticFilter7;
1383
1403
  const {
1384
1404
  error,
1385
1405
  data
@@ -1405,7 +1425,7 @@ function GenricLayOut(_ref) {
1405
1425
  staticFilter: staticFilter.data.find(item => item.selected).value
1406
1426
  }), {}, {
1407
1427
  order: tables === null || tables === void 0 || (_tables$sorting16 = tables.sorting) === null || _tables$sorting16 === void 0 ? void 0 : _tables$sorting16.sortDirection
1408
- }, (_state$misc18 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc18 !== void 0 ? _state$misc18 : {}), {}, {
1428
+ }, (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {}), {}, {
1409
1429
  multiSelectValue: (_state$staticFilter$m7 = state === null || state === void 0 || (_state$staticFilter7 = state.staticFilter) === null || _state$staticFilter7 === void 0 ? void 0 : _state$staticFilter7.multiSelectValue) !== null && _state$staticFilter$m7 !== void 0 ? _state$staticFilter$m7 : []
1410
1430
  }));
1411
1431
  if (error) {
@@ -1439,7 +1459,7 @@ function GenricLayOut(_ref) {
1439
1459
  const filterFormOnFinish = async formData => {
1440
1460
  // Check if this is a cancel/clear action - check both buttonClickType and the actual button data
1441
1461
  if (formData.type === "FILTER-CANCEL") {
1442
- var _state$dropdownSearch6, _state$inputSearch6, _state$tabs12, _tables$pagination5, _tables$pagination6, _tables$filter7, _tables$sorting17, _header$subHeading21, _header$subHeading22, _staticFilter$data8, _tables$sorting18, _state$misc19, _state$staticFilter$m8, _state$staticFilter8;
1462
+ var _state$dropdownSearch6, _state$inputSearch6, _state$tabs12, _tables$pagination5, _tables$pagination6, _tables$filter7, _tables$sorting17, _header$subHeading21, _header$subHeading22, _staticFilter$data8, _tables$sorting18, _state$misc20, _state$staticFilter$m8, _state$staticFilter8;
1443
1463
  if (isFiltersEmpty(customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)) {
1444
1464
  dispatch({
1445
1465
  type: _layoutReducer.actionTypes.CUSTOM_DRAWER_CLOSED
@@ -1468,7 +1488,7 @@ function GenricLayOut(_ref) {
1468
1488
  staticFilter: staticFilter.data.find(item => item.selected).value
1469
1489
  }), {}, {
1470
1490
  order: tables === null || tables === void 0 || (_tables$sorting18 = tables.sorting) === null || _tables$sorting18 === void 0 ? void 0 : _tables$sorting18.sortDirection
1471
- }, (_state$misc19 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc19 !== void 0 ? _state$misc19 : {}), {}, {
1491
+ }, (_state$misc20 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc20 !== void 0 ? _state$misc20 : {}), {}, {
1472
1492
  multiSelectValue: (_state$staticFilter$m8 = state === null || state === void 0 || (_state$staticFilter8 = state.staticFilter) === null || _state$staticFilter8 === void 0 ? void 0 : _state$staticFilter8.multiSelectValue) !== null && _state$staticFilter$m8 !== void 0 ? _state$staticFilter$m8 : []
1473
1493
  }));
1474
1494
  if (error) {
@@ -1518,7 +1538,7 @@ function GenricLayOut(_ref) {
1518
1538
 
1519
1539
  // Only process filter data if this is actually a filter drawer
1520
1540
  if (formData.type === "FILTER-SUBMIT") {
1521
- var _state$dropdownSearch7, _state$inputSearch7, _ref4, _appliedFilters$filte, _state$tabs13, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data9, _tables$sorting20, _state$misc20, _state$staticFilter$m9, _state$staticFilter9;
1541
+ var _state$dropdownSearch7, _state$inputSearch7, _ref4, _appliedFilters$filte, _state$tabs13, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data9, _tables$sorting20, _state$misc21, _state$staticFilter$m9, _state$staticFilter9;
1522
1542
  const appliedFilters = {};
1523
1543
  Object.keys(formData).forEach(key => {
1524
1544
  const value = formData[key];
@@ -1557,7 +1577,7 @@ function GenricLayOut(_ref) {
1557
1577
  staticFilter: staticFilter.data.find(item => item.selected).value
1558
1578
  }), {}, {
1559
1579
  order: tables === null || tables === void 0 || (_tables$sorting20 = tables.sorting) === null || _tables$sorting20 === void 0 ? void 0 : _tables$sorting20.sortDirection
1560
- }, (_state$misc20 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc20 !== void 0 ? _state$misc20 : {}), {}, {
1580
+ }, (_state$misc21 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc21 !== void 0 ? _state$misc21 : {}), {}, {
1561
1581
  multiSelectValue: (_state$staticFilter$m9 = state === null || state === void 0 || (_state$staticFilter9 = state.staticFilter) === null || _state$staticFilter9 === void 0 ? void 0 : _state$staticFilter9.multiSelectValue) !== null && _state$staticFilter$m9 !== void 0 ? _state$staticFilter$m9 : []
1562
1582
  }));
1563
1583
  if (error) {
@@ -1612,7 +1632,7 @@ function GenricLayOut(_ref) {
1612
1632
  }
1613
1633
  });
1614
1634
  if (handleSecondaryTableCTAClick) {
1615
- var _state$dropdownSearch8, _state$inputSearch8, _state$tabs14, _tables$pagination7, _tables$pagination8, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading25, _header$subHeading26, _staticFilter$data10, _state$misc21, _state$staticFilter$m10, _state$staticFilter10;
1635
+ var _state$dropdownSearch8, _state$inputSearch8, _state$tabs14, _tables$pagination7, _tables$pagination8, _tables$filter9, _tables$sorting21, _tables$sorting22, _header$subHeading25, _header$subHeading26, _staticFilter$data10, _state$misc22, _state$staticFilter$m10, _state$staticFilter10;
1616
1636
  const {
1617
1637
  error,
1618
1638
  data
@@ -1637,7 +1657,7 @@ function GenricLayOut(_ref) {
1637
1657
  toDate: formData === null || formData === void 0 ? void 0 : formData.toDate
1638
1658
  }, appliedFilters), (formData === null || formData === void 0 ? void 0 : formData.exportType) && {
1639
1659
  exportType: formData === null || formData === void 0 ? void 0 : formData.exportType
1640
- }), (_state$misc21 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc21 !== void 0 ? _state$misc21 : {}), {}, {
1660
+ }), (_state$misc22 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc22 !== void 0 ? _state$misc22 : {}), {}, {
1641
1661
  multiSelectValue: (_state$staticFilter$m10 = state === null || state === void 0 || (_state$staticFilter10 = state.staticFilter) === null || _state$staticFilter10 === void 0 ? void 0 : _state$staticFilter10.multiSelectValue) !== null && _state$staticFilter$m10 !== void 0 ? _state$staticFilter$m10 : []
1642
1662
  })));
1643
1663
  if (error) {
@@ -1653,7 +1673,7 @@ function GenricLayOut(_ref) {
1653
1673
  }
1654
1674
  };
1655
1675
  const onClearAllAppliedFilters = async () => {
1656
- var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$misc22, _state$staticFilter$m11, _state$staticFilter11;
1676
+ var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$misc23, _state$staticFilter$m11, _state$staticFilter11;
1657
1677
  const {
1658
1678
  error,
1659
1679
  data
@@ -1676,7 +1696,7 @@ function GenricLayOut(_ref) {
1676
1696
  staticFilter: staticFilter.data.find(item => item.selected).value
1677
1697
  }), {}, {
1678
1698
  order: tables === null || tables === void 0 || (_tables$sorting24 = tables.sorting) === null || _tables$sorting24 === void 0 ? void 0 : _tables$sorting24.sortDirection
1679
- }, (_state$misc22 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc22 !== void 0 ? _state$misc22 : {}), {}, {
1699
+ }, (_state$misc23 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc23 !== void 0 ? _state$misc23 : {}), {}, {
1680
1700
  multiSelectValue: (_state$staticFilter$m11 = state === null || state === void 0 || (_state$staticFilter11 = state.staticFilter) === null || _state$staticFilter11 === void 0 ? void 0 : _state$staticFilter11.multiSelectValue) !== null && _state$staticFilter$m11 !== void 0 ? _state$staticFilter$m11 : []
1681
1701
  }));
1682
1702
  if (error) {
@@ -1735,14 +1755,14 @@ function GenricLayOut(_ref) {
1735
1755
  return;
1736
1756
  } else if (action === "CLOSE_MODAL_AND_FETCH") {
1737
1757
  if (handleModalCloseSuccess) {
1738
- var _stateRef$current, _state$misc23;
1758
+ var _stateRef$current, _state$misc24;
1739
1759
  const {
1740
1760
  error,
1741
1761
  data
1742
1762
  } = await (handleModalCloseSuccess === null || handleModalCloseSuccess === void 0 ? void 0 : handleModalCloseSuccess(_objectSpread({
1743
1763
  modalValue: stateRef === null || stateRef === void 0 || (_stateRef$current = stateRef.current) === null || _stateRef$current === void 0 || (_stateRef$current = _stateRef$current.modal) === null || _stateRef$current === void 0 ? void 0 : _stateRef$current.value,
1744
1764
  call: buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.call
1745
- }, (_state$misc23 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc23 !== void 0 ? _state$misc23 : {})));
1765
+ }, (_state$misc24 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc24 !== void 0 ? _state$misc24 : {})));
1746
1766
  if (error) {
1747
1767
  showErrorNotification(error);
1748
1768
  } else {
@@ -1756,11 +1776,11 @@ function GenricLayOut(_ref) {
1756
1776
  }
1757
1777
  } else {
1758
1778
  if (handleDrawerFormOnFinish) {
1759
- var _state$tables$selecte, _state$tables3, _state$misc24;
1779
+ var _state$tables$selecte, _state$tables4, _state$misc25;
1760
1780
  let req = {};
1761
1781
  req.type = "APPROVE";
1762
- req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$tables3 = state.tables) === null || _state$tables3 === void 0 || (_state$tables3 = _state$tables3.selectedRowKeys) === null || _state$tables3 === void 0 ? void 0 : _state$tables3.map(item => item.orderUUID)) !== null && _state$tables$selecte !== void 0 ? _state$tables$selecte : [];
1763
- req.misc = (_state$misc24 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc24 !== void 0 ? _state$misc24 : {};
1782
+ req.orderUUID = (_state$tables$selecte = state === null || state === void 0 || (_state$tables4 = state.tables) === null || _state$tables4 === void 0 || (_state$tables4 = _state$tables4.selectedRowKeys) === null || _state$tables4 === void 0 ? void 0 : _state$tables4.map(item => item.orderUUID)) !== null && _state$tables$selecte !== void 0 ? _state$tables$selecte : [];
1783
+ req.misc = (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {};
1764
1784
  const {
1765
1785
  error,
1766
1786
  data
@@ -1874,7 +1894,7 @@ function GenricLayOut(_ref) {
1874
1894
  };
1875
1895
  const rightHeaderSecondButtonClick = async () => {
1876
1896
  if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
1877
- var _state$dropdownSearch10, _state$inputSearch10, _state$tabs16, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data12, _tables$sorting26, _state$misc25, _state$staticFilter$m12, _state$staticFilter12;
1897
+ var _state$dropdownSearch10, _state$inputSearch10, _state$tabs16, _tables$pagination11, _tables$pagination12, _tables$filter11, _tables$sorting25, _header$subHeading29, _header$subHeading30, _staticFilter$data12, _tables$sorting26, _state$misc26, _state$staticFilter$m12, _state$staticFilter12;
1878
1898
  const {
1879
1899
  error,
1880
1900
  data
@@ -1897,7 +1917,7 @@ function GenricLayOut(_ref) {
1897
1917
  staticFilter: staticFilter.data.find(item => item.selected).value
1898
1918
  }), {}, {
1899
1919
  order: tables === null || tables === void 0 || (_tables$sorting26 = tables.sorting) === null || _tables$sorting26 === void 0 ? void 0 : _tables$sorting26.sortDirection
1900
- }, (_state$misc25 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc25 !== void 0 ? _state$misc25 : {}), {}, {
1920
+ }, (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {}), {}, {
1901
1921
  multiSelectValue: (_state$staticFilter$m12 = state === null || state === void 0 || (_state$staticFilter12 = state.staticFilter) === null || _state$staticFilter12 === void 0 ? void 0 : _state$staticFilter12.multiSelectValue) !== null && _state$staticFilter$m12 !== void 0 ? _state$staticFilter$m12 : []
1902
1922
  }));
1903
1923
  if (error) {
@@ -1950,7 +1970,7 @@ function GenricLayOut(_ref) {
1950
1970
  };
1951
1971
  const handleSubHeadingSelect = async val => {
1952
1972
  if (val) {
1953
- var _state$tabs17, _tables$pagination13, _tables$pagination14, _state$misc26;
1973
+ var _state$tabs17, _tables$pagination13, _tables$pagination14, _state$misc27;
1954
1974
  dispatch({
1955
1975
  type: _layoutReducer.actionTypes.SET_SUBHEADING_SELECTED_CONFIG,
1956
1976
  payload: val
@@ -1964,7 +1984,7 @@ function GenricLayOut(_ref) {
1964
1984
  current: tables === null || tables === void 0 || (_tables$pagination13 = tables.pagination) === null || _tables$pagination13 === void 0 ? void 0 : _tables$pagination13.current,
1965
1985
  pageSize: tables === null || tables === void 0 || (_tables$pagination14 = tables.pagination) === null || _tables$pagination14 === void 0 ? void 0 : _tables$pagination14.pageSize,
1966
1986
  subHeadingSelectVal: val
1967
- }, (_state$misc26 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc26 !== void 0 ? _state$misc26 : {}));
1987
+ }, (_state$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {}));
1968
1988
  if (error) {
1969
1989
  showErrorNotification(error);
1970
1990
  dispatch({
@@ -2000,7 +2020,7 @@ function GenricLayOut(_ref) {
2000
2020
 
2001
2021
  // Call the handler if provided
2002
2022
  if (handleTableChange) {
2003
- var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc27;
2023
+ var _state$dropdownSearch11, _state$inputSearch11, _state$tabs18, _tables$pagination15, _tables$sorting27, _tables$sorting28, _header$subHeading31, _header$subHeading32, _customDrawer$applied10, _state$misc28;
2004
2024
  dispatch({
2005
2025
  type: _layoutReducer.actionTypes.SET_LOADING,
2006
2026
  payload: true
@@ -2022,7 +2042,7 @@ function GenricLayOut(_ref) {
2022
2042
  order: tables === null || tables === void 0 || (_tables$sorting28 = tables.sorting) === null || _tables$sorting28 === void 0 ? void 0 : _tables$sorting28.sortDirection
2023
2043
  }, (header === null || header === void 0 || (_header$subHeading31 = header.subHeading) === null || _header$subHeading31 === void 0 || (_header$subHeading31 = _header$subHeading31.jsxConfig) === null || _header$subHeading31 === void 0 ? void 0 : _header$subHeading31.type) == "select" ? {
2024
2044
  subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading32 = header.subHeading) === null || _header$subHeading32 === void 0 || (_header$subHeading32 = _header$subHeading32.jsxConfig) === null || _header$subHeading32 === void 0 ? void 0 : _header$subHeading32.value
2025
- } : {}), (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$misc27 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc27 !== void 0 ? _state$misc27 : {}), {}, {
2045
+ } : {}), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied10 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied10 !== void 0 ? _customDrawer$applied10 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc28 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc28 !== void 0 ? _state$misc28 : {}), {}, {
2026
2046
  staticFilter: filterValue,
2027
2047
  // Pass static filter value
2028
2048
  multiSelectValue: multiSelectValue
@@ -2066,7 +2086,7 @@ function GenricLayOut(_ref) {
2066
2086
  }
2067
2087
  });
2068
2088
  if (handleTableChange) {
2069
- var _state$dropdownSearch12, _state$inputSearch12, _state$tabs19, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data13, _customDrawer$applied11, _state$misc28, _state$staticFilter$m13, _state$staticFilter13;
2089
+ var _state$dropdownSearch12, _state$inputSearch12, _state$tabs19, _tables$filter12, _tables$sorting29, _tables$sorting30, _header$subHeading33, _header$subHeading34, _staticFilter$data13, _customDrawer$applied11, _state$misc29, _state$staticFilter$m13, _state$staticFilter13;
2070
2090
  const {
2071
2091
  error,
2072
2092
  data
@@ -2086,7 +2106,7 @@ function GenricLayOut(_ref) {
2086
2106
  subHeadingSelectVal: header === null || header === void 0 || (_header$subHeading34 = header.subHeading) === null || _header$subHeading34 === void 0 || (_header$subHeading34 = _header$subHeading34.jsxConfig) === null || _header$subHeading34 === void 0 ? void 0 : _header$subHeading34.value
2087
2107
  } : {}), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && ((_staticFilter$data13 = staticFilter.data) === null || _staticFilter$data13 === void 0 || (_staticFilter$data13 = _staticFilter$data13.find(item => item.selected)) === null || _staticFilter$data13 === void 0 ? void 0 : _staticFilter$data13.value) && {
2088
2108
  staticFilter: staticFilter.data.find(item => item.selected).value
2089
- }), (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$misc28 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc28 !== void 0 ? _state$misc28 : {}), {}, {
2109
+ }), (customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) && Object.keys((_customDrawer$applied11 = customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters) !== null && _customDrawer$applied11 !== void 0 ? _customDrawer$applied11 : {}).length > 0 && _objectSpread({}, customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.appliedFilters)), (_state$misc29 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc29 !== void 0 ? _state$misc29 : {}), {}, {
2090
2110
  multiSelectValue: (_state$staticFilter$m13 = state === null || state === void 0 || (_state$staticFilter13 = state.staticFilter) === null || _state$staticFilter13 === void 0 ? void 0 : _state$staticFilter13.multiSelectValue) !== null && _state$staticFilter$m13 !== void 0 ? _state$staticFilter$m13 : []
2091
2111
  }));
2092
2112
  if (error) {
@@ -2117,7 +2137,7 @@ function GenricLayOut(_ref) {
2117
2137
  console.log(state, "GenricLayOutstate");
2118
2138
  return /*#__PURE__*/_react.default.createElement(_styles.OapageWithDataStyle, {
2119
2139
  marginBottom: infoPanel !== null && infoPanel !== void 0 && infoPanel.bottomMarginRequired ? "18px" : "0",
2120
- className: (state === null || state === void 0 || (_state$misc29 = state.misc) === null || _state$misc29 === void 0 ? void 0 : _state$misc29.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2140
+ className: (state === null || state === void 0 || (_state$misc30 = state.misc) === null || _state$misc30 === void 0 ? void 0 : _state$misc30.flow) === "hubAutomation" ? "hubAutomationContainer" : ""
2121
2141
  }, /*#__PURE__*/_react.default.createElement(_styles.DrawerWithOutFooter, null), /*#__PURE__*/_react.default.createElement("div", {
2122
2142
  className: "fullPageLayout"
2123
2143
  }, /*#__PURE__*/_react.default.createElement(_GlobalCss.default, null, (sidebar === null || sidebar === void 0 ? void 0 : sidebar.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
@@ -2310,7 +2330,7 @@ function GenricLayOut(_ref) {
2310
2330
  onChange: onTableChange,
2311
2331
  customTableChange: customTableChange,
2312
2332
  pagination: tables === null || tables === void 0 ? void 0 : tables.pagination,
2313
- selectedRows: (state === null || state === void 0 || (_state$tables4 = state.tables) === null || _state$tables4 === void 0 ? void 0 : _state$tables4.selectedRowKeys) || [],
2333
+ selectedRows: (state === null || state === void 0 || (_state$tables5 = state.tables) === null || _state$tables5 === void 0 ? void 0 : _state$tables5.selectedRowKeys) || [],
2314
2334
  rowSelection: (tables === null || tables === void 0 || (_tables$selectionType = tables.selectionType) === null || _tables$selectionType === void 0 ? void 0 : _tables$selectionType[(_tabs$active4 = tabs === null || tabs === void 0 ? void 0 : tabs.active) !== null && _tabs$active4 !== void 0 ? _tabs$active4 : "default"]) && Object.assign({
2315
2335
  type: tables === null || tables === void 0 || (_tables$selectionType2 = tables.selectionType) === null || _tables$selectionType2 === void 0 ? void 0 : _tables$selectionType2[tabs === null || tabs === void 0 ? void 0 : tabs.active]
2316
2336
  }, rowSelection),
@@ -56,7 +56,8 @@ const actionTypes = exports.actionTypes = {
56
56
  CLEAR_ALL_APPLIED_FILTERS: "CLEAR_ALL_APPLIED_FILTERS",
57
57
  UPDATE_FILTER_FORM_VALUES: "UPDATE_FILTER_FORM_VALUES",
58
58
  SET_STATIC_FILTER: "SET_STATIC_FILTER",
59
- SET_PROFILE_DATA: "SET_PROFILE_DATA"
59
+ SET_PROFILE_DATA: "SET_PROFILE_DATA",
60
+ CHANGE_ROW: "CHANGE_ROW"
60
61
  };
61
62
  function getFieldDefaultValue(widget) {
62
63
  switch (widget) {
@@ -300,6 +301,9 @@ const genericLayoutReducer = exports.genericLayoutReducer = (0, _immer.produce)(
300
301
  case actionTypes.SET_PROFILE_DATA:
301
302
  draft.profileData = _objectSpread(_objectSpread({}, draft.profileData), action.payload);
302
303
  break;
304
+ case actionTypes.CHANGE_ROW:
305
+ draft.tables = action.payload.tables;
306
+ break;
303
307
  default:
304
308
  break;
305
309
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "1.0.1-stage.431",
3
+ "version": "1.0.1-stage.433",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",