oa-componentbook 0.18.380 → 0.18.381

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
15
15
  /**
16
16
  * Styled container for the details panel
17
17
  */
18
- const PanelContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: var(--color-background, #fff);\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n\n .panel-title {\n margin: 0 0 24px 0;\n }\n\n .table-container {\n border: 1px solid var(--color-border, #e8e8e8);\n border-radius: 4px;\n overflow: hidden;\n margin-bottom: 24px;\n }\n\n .section-header {\n background: var(--color-background-secondary, #f5f5f5);\n padding: 12px 16px;\n margin: 0;\n border-bottom: 1px solid var(--color-border, #e8e8e8);\n }\n\n .details-table {\n width: 100%;\n margin: 0;\n border-collapse: collapse;\n background: var(--color-background, #fff);\n }\n\n .details-row {\n border-bottom: 1px solid var(--color-border-light, #f0f0f0);\n }\n\n .details-row:last-child {\n border-bottom: none;\n }\n\n .details-label {\n width: 140px;\n min-width: 140px;\n padding: 16px;\n padding-right: 16px;\n text-align: left;\n vertical-align: top;\n }\n\n .details-value {\n padding: 16px;\n word-break: break-word;\n font-weight: 500;\n vertical-align: top;\n }\n\n .details-actions {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 0;\n padding-top: 0;\n border-top: none;\n }\n\n .details-actions button {\n padding: 0;\n }\n\n .children-container {\n margin-top: 24px;\n }\n"])));
18
+ const PanelContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: var(--color-background, #fff);\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n\n .panel-title {\n margin: 0 0 24px 0;\n }\n\n .table-container {\n border: 1px solid var(--color-border, #e8e8e8);\n border-radius: 4px;\n overflow: hidden;\n margin-bottom: 24px;\n }\n\n .section-header {\n background: var(--color-background-secondary, #f5f5f5);\n padding: 12px 16px;\n margin: 0;\n border-bottom: 1px solid var(--color-border, #e8e8e8);\n }\n\n .details-table {\n width: 100%;\n margin: 0;\n border-collapse: collapse;\n background: var(--color-background, #fff);\n }\n\n .details-row {\n border-bottom: 1px solid var(--color-border-light, #f0f0f0);\n }\n\n .details-row:last-child {\n border-bottom: none;\n }\n\n .details-label {\n width: 140px;\n min-width: 140px;\n padding: 16px;\n padding-right: 16px;\n text-align: left;\n vertical-align: top;\n }\n\n .details-value {\n padding: 16px;\n word-break: break-word;\n font-weight: 500;\n vertical-align: top;\n }\n\n .details-actions {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 0;\n padding-top: 0;\n border-top: none;\n }\n\n .details-actions button {\n padding: 0;\n color: #1890ff !important;\n }\n .details-actions button:hover {\n color: #1890ff !important;\n }\n\n .children-container {\n margin-top: 24px;\n }\n"])));
19
19
 
20
20
  /**
21
21
  * DocumentDetailsPanel Component
@@ -1,19 +1,27 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.weak-map.js");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = CustomInfo;
7
8
  require("core-js/modules/es.symbol.description.js");
8
- var _react = _interopRequireDefault(require("react"));
9
+ require("core-js/modules/web.dom-collections.iterator.js");
10
+ var _react = _interopRequireWildcard(require("react"));
9
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
12
  var _antd = require("antd");
13
+ var _CloseRounded = _interopRequireDefault(require("@material-ui/icons/CloseRounded"));
11
14
  var _styles = require("./styles");
12
15
  var _CustomButton = _interopRequireDefault(require("../oa-component-button/CustomButton"));
13
16
  var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
17
+ var _MaterialIcon = _interopRequireDefault(require("../oa-component-icons/MaterialIcon"));
14
18
  var _colorOptions = require("../../global-css/color-options");
15
19
  require("antd/dist/reset.css");
16
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
+ /* eslint-disable */
24
+
17
25
  /**
18
26
  * A component for displaying a single piece of information with an optional icon
19
27
  * and/or button. The icon can be placed on either the left or right of the text.
@@ -28,19 +36,34 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
28
36
  * @param {object} iconConfig - Configuration for the icon.
29
37
  * @param {string} title - The title to be displayed.
30
38
  * @param {string} borderColor - The border color of the component.
39
+ * @param {boolean} closable - Whether to show a close button.
40
+ * @param {function} onClose - Callback function called when close button is clicked.
31
41
  *
32
42
  * @returns {ReactElement} A styled component with the specified properties.
33
43
  */
34
44
  function CustomInfo(_ref) {
35
45
  let {
46
+ className,
36
47
  buttonConfig,
37
48
  color,
38
49
  description,
39
50
  fontColor,
40
51
  iconConfig,
41
52
  title,
42
- borderColor
53
+ borderColor,
54
+ closable,
55
+ onClose
43
56
  } = _ref;
57
+ const [visible, setVisible] = (0, _react.useState)(true);
58
+ const handleClose = () => {
59
+ setVisible(false);
60
+ if (onClose) {
61
+ onClose();
62
+ }
63
+ };
64
+ if (!visible) {
65
+ return null;
66
+ }
44
67
  /**
45
68
  * Renders the icon based on the presence of a title.
46
69
  * If a title is not provided and the icon is a valid React element,
@@ -68,8 +91,13 @@ function CustomInfo(_ref) {
68
91
  };
69
92
  return /*#__PURE__*/_react.default.createElement(_styles.InfoContainer, {
70
93
  $color: color,
71
- $borderColor: borderColor
72
- }, /*#__PURE__*/_react.default.createElement(_styles.RowFlex, null, iconConfig.position === 'left' && conditionallyAddTooltipToIcon(), /*#__PURE__*/_react.default.createElement(_styles.ColFlex, null, title && /*#__PURE__*/_react.default.createElement(_Typography.default, {
94
+ $borderColor: borderColor,
95
+ className: className
96
+ }, /*#__PURE__*/_react.default.createElement(_styles.RowFlex, null, iconConfig.position === 'left' && conditionallyAddTooltipToIcon(), /*#__PURE__*/_react.default.createElement(_styles.ColFlex, {
97
+ style: {
98
+ flex: 1
99
+ }
100
+ }, title && /*#__PURE__*/_react.default.createElement(_Typography.default, {
73
101
  color: fontColor,
74
102
  typography: "type-t2-700"
75
103
  }, title), description && /*#__PURE__*/_react.default.createElement("div", {
@@ -77,7 +105,13 @@ function CustomInfo(_ref) {
77
105
  style: {
78
106
  color: "var(--color-".concat(fontColor, ")")
79
107
  }
80
- }, description)), iconConfig.position === 'right' && conditionallyAddTooltipToIcon()), (buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.label) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, buttonConfig));
108
+ }, description)), iconConfig.position === 'right' && conditionallyAddTooltipToIcon(), closable && /*#__PURE__*/_react.default.createElement(_styles.CloseButton, {
109
+ onClick: handleClose
110
+ }, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
111
+ icon: _CloseRounded.default,
112
+ color: "secondary-content",
113
+ size: title ? 24 : 20
114
+ }))), (buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.label) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, buttonConfig));
81
115
  }
82
116
  CustomInfo.propTypes = {
83
117
  buttonConfig: _propTypes.default.shape({
@@ -100,7 +134,9 @@ CustomInfo.propTypes = {
100
134
  tooltipText: _propTypes.default.string
101
135
  }),
102
136
  title: _propTypes.default.string,
103
- borderColor: _propTypes.default.string
137
+ borderColor: _propTypes.default.string,
138
+ closable: _propTypes.default.bool,
139
+ onClose: _propTypes.default.func
104
140
  };
105
141
  CustomInfo.defaultProps = {
106
142
  buttonConfig: {
@@ -115,5 +151,7 @@ CustomInfo.defaultProps = {
115
151
  fontColor: 'primary-content',
116
152
  title: '',
117
153
  description: '',
118
- borderColor: ''
154
+ borderColor: '',
155
+ closable: false,
156
+ onClose: null
119
157
  };
@@ -3,13 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.RowFlex = exports.InfoContainer = exports.ColFlex = void 0;
6
+ exports.RowFlex = exports.InfoContainer = exports.ColFlex = exports.CloseButton = void 0;
7
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
8
- var _templateObject, _templateObject2, _templateObject3;
8
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
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 RowFlex = exports.RowFlex = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n"])));
11
+ const RowFlex = exports.RowFlex = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n width: 100%;\n"])));
12
12
  const ColFlex = exports.ColFlex = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"])));
13
13
  const InfoContainer = exports.InfoContainer = (0, _styledComponents.default)(RowFlex).attrs({
14
14
  as: 'section'
15
- })(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 12px;\n align-items: center;\n border-radius: 8px;\n background-color: var(--color-", ");\n border: 1px solid var(--color-", ");\n\n button {\n margin-left: 8px;\n }\n"])), props => props.$color, props => props.$borderColor);
15
+ })(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 12px;\n align-items: center;\n border-radius: 8px;\n background-color: var(--color-", ");\n border: 1px solid var(--color-", ");\n\n button {\n margin-left: 8px;\n }\n"])), props => props.$color, props => props.$borderColor);
16
+ const CloseButton = exports.CloseButton = _styledComponents.default.button(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: none;\n border: none;\n cursor: pointer;\n padding: 0;\n margin-left: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n transition: opacity 0.2s;\n\n &:hover {\n opacity: 0.7;\n }\n\n &:active {\n opacity: 0.5;\n }\n"])));
@@ -251,9 +251,10 @@ function CustomTableV1(_ref2) {
251
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]) || "",
252
252
  onClick: () => customTableChange(record, config)
253
253
  }) : (option === null || option === void 0 ? void 0 : option.type) === "tag" ? /*#__PURE__*/_react.default.createElement(_CustomTag.default, {
254
+ style: _objectSpread({}, typeof getByPath(record, option === null || option === void 0 ? void 0 : option.styleKey) === "object" ? getByPath(record, option === null || option === void 0 ? void 0 : option.styleKey) : {}),
254
255
  label: getByPath(record, option === null || option === void 0 ? void 0 : option.key) || "",
255
- type: getByPath(record, option === null || option === void 0 ? void 0 : option.tagType) || (option === null || option === void 0 ? void 0 : option.tagType) || "primary",
256
- visible: true
256
+ type: getByPath(record, option === null || option === void 0 ? void 0 : option.tagType) || (option === null || option === void 0 ? void 0 : option.tagType) || "primary"
257
+ // visible={option?.visible??true}
257
258
  }) : /*#__PURE__*/_react.default.createElement(_Typography.default, {
258
259
  typography: (option === null || option === void 0 ? void 0 : option.typography) || (col === null || col === void 0 ? void 0 : col.customStyle) && (record === null || record === void 0 || (_record$option$styleK = record[option === null || option === void 0 ? void 0 : option.styleKey]) === null || _record$option$styleK === void 0 ? void 0 : _record$option$styleK.typography) || "type-b2-400",
259
260
  color: (option === null || option === void 0 ? void 0 : option.color) || (col === null || col === void 0 ? void 0 : col.customStyle) && (record === null || record === void 0 || (_record$option$styleK2 = record[option === null || option === void 0 ? void 0 : option.styleKey]) === null || _record$option$styleK2 === void 0 ? void 0 : _record$option$styleK2.color)
@@ -116,6 +116,7 @@ function TableWithSearchAndFilter(_ref) {
116
116
  // Filter drawer state
117
117
  const [isFilterDrawerVisible, setIsFilterDrawerVisible] = (0, _react.useState)(false);
118
118
  const [filterValues, setFilterValues] = (0, _react.useState)({});
119
+ const [appliedFilters, setAppliedFilters] = (0, _react.useState)({});
119
120
 
120
121
  // Search handlers
121
122
  const handleSearchChange = e => {
@@ -134,8 +135,16 @@ function TableWithSearchAndFilter(_ref) {
134
135
  };
135
136
 
136
137
  // Filter handlers
137
- const handleOpenFilterDrawer = () => setIsFilterDrawerVisible(true);
138
- const handleCloseFilterDrawer = () => setIsFilterDrawerVisible(false);
138
+ const handleOpenFilterDrawer = () => {
139
+ // Sync filterValues with appliedFilters when opening drawer
140
+ setFilterValues(appliedFilters);
141
+ setIsFilterDrawerVisible(true);
142
+ };
143
+ const handleCloseFilterDrawer = () => {
144
+ // Revert filterValues to appliedFilters when closing without applying
145
+ setFilterValues(appliedFilters);
146
+ setIsFilterDrawerVisible(false);
147
+ };
139
148
  const handleFilterChange = function handleFilterChange(key, value) {
140
149
  let action = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'change';
141
150
  // Normalize empty values: convert empty string to null for consistency
@@ -152,12 +161,15 @@ function TableWithSearchAndFilter(_ref) {
152
161
  };
153
162
  const handleApplyFilters = () => {
154
163
  setIsFilterDrawerVisible(false);
164
+ // Save applied filters
165
+ setAppliedFilters(filterValues);
155
166
  if (onFiltersApply) {
156
167
  onFiltersApply(filterValues);
157
168
  }
158
169
  };
159
170
  const handleClearFilters = () => {
160
171
  setFilterValues({});
172
+ setAppliedFilters({});
161
173
  if (onFiltersClear) {
162
174
  onFiltersClear();
163
175
  }
@@ -226,6 +238,36 @@ function TableWithSearchAndFilter(_ref) {
226
238
  });
227
239
  }, [requiredKeys, requiredFieldsSignature, filterValues]);
228
240
 
241
+ // Helper function to check if a value is non-empty
242
+ const isValueNonEmpty = value => {
243
+ if (value === undefined || value === null || value === '') {
244
+ return false;
245
+ }
246
+
247
+ // Handle arrays
248
+ if (Array.isArray(value)) {
249
+ return value.length > 0;
250
+ }
251
+
252
+ // Handle objects (but allow Date objects and other valid objects)
253
+ if (typeof value === 'object' && !(value instanceof Date)) {
254
+ return Object.keys(value).length > 0;
255
+ }
256
+ return true;
257
+ };
258
+
259
+ // Helper function to check if filters are applied
260
+ const hasAppliedFilters = (0, _react.useMemo)(() => {
261
+ // Check if filters were actually applied (Apply Filter button was clicked)
262
+ const appliedFilterKeys = Object.keys(appliedFilters);
263
+ if (appliedFilterKeys.length === 0) {
264
+ return false;
265
+ }
266
+
267
+ // Check if any applied filter has a non-empty value
268
+ return appliedFilterKeys.some(key => isValueNonEmpty(appliedFilters[key]));
269
+ }, [appliedFilters]);
270
+
229
271
  // Helper function to determine notFoundContent message
230
272
  const getNotFoundContent = (isApiCallInProgress, query) => {
231
273
  if (!isApiCallInProgress && (query === null || query === void 0 ? void 0 : query.length) < 3) {
@@ -289,6 +331,7 @@ function TableWithSearchAndFilter(_ref) {
289
331
  return /*#__PURE__*/_react.default.createElement(_CustomDatePicker.default, {
290
332
  placeholder: placeholder || 'Select date',
291
333
  value: fieldValue,
334
+ containerSize: "small",
292
335
  onChange: date => handleFilterChange(fieldKey, date, 'change')
293
336
  });
294
337
  };
@@ -320,9 +363,9 @@ function TableWithSearchAndFilter(_ref) {
320
363
  case 'radio':
321
364
  return renderRadioGroup(key, filter);
322
365
  case 'select':
323
- return renderSelect(key, filter);
366
+ return /*#__PURE__*/_react.default.createElement(_styles.FilterSubField, null, renderSelect(key, filter));
324
367
  case 'date':
325
- return renderDatePicker(key, filter);
368
+ return /*#__PURE__*/_react.default.createElement(_styles.FilterSubField, null, renderDatePicker(key, filter));
326
369
  case 'dateRange':
327
370
  return /*#__PURE__*/_react.default.createElement(_styles.DateRangeContainer, null, fields.map(field => /*#__PURE__*/_react.default.createElement(_styles.FilterSubField, {
328
371
  key: field.key
@@ -337,6 +380,18 @@ function TableWithSearchAndFilter(_ref) {
337
380
  };
338
381
  const displayData = dataSource;
339
382
  const totalRecords = total !== null && total !== void 0 ? total : displayData.length;
383
+
384
+ // Button configuration for filter drawer footer
385
+ const filterDrawerButtonConfig = [{
386
+ callback: handleClearFilters,
387
+ label: 'Clear All',
388
+ type: 'secondary'
389
+ }, {
390
+ callback: handleApplyFilters,
391
+ label: 'Apply Filter',
392
+ type: 'primary',
393
+ disabled: !areAllRequiredFieldsFilled
394
+ }];
340
395
  return /*#__PURE__*/_react.default.createElement(_styles.TableWithSearchAndFilterContainer, {
341
396
  className: className
342
397
  }, (showSearch || showFilters) && /*#__PURE__*/_react.default.createElement(_styles.Toolbar, null, showSearch && /*#__PURE__*/_react.default.createElement(_CustomInput.default, {
@@ -356,7 +411,7 @@ function TableWithSearchAndFilter(_ref) {
356
411
  width: SEARCH_INPUT_WIDTH,
357
412
  flexShrink: 0
358
413
  }
359
- }), showFilters && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
414
+ }), showFilters && /*#__PURE__*/_react.default.createElement(_styles.FilterButtonWrapper, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
360
415
  label: filterButtonLabel,
361
416
  onClick: handleOpenFilterDrawer,
362
417
  type: "secondary",
@@ -366,8 +421,12 @@ function TableWithSearchAndFilter(_ref) {
366
421
  icon: _FilterList.default
367
422
  }),
368
423
  position: 'left'
424
+ },
425
+ style: {
426
+ borderColor: '#1890ff',
427
+ color: '#1890ff'
369
428
  }
370
- })), showFilters && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
429
+ }), hasAppliedFilters && /*#__PURE__*/_react.default.createElement(_styles.FilterIndicatorDot, null))), showFilters && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
371
430
  title: filterDrawerTitle,
372
431
  placement: "right",
373
432
  isBaseDrawer: true,
@@ -375,21 +434,11 @@ function TableWithSearchAndFilter(_ref) {
375
434
  open: isFilterDrawerVisible,
376
435
  visible: isFilterDrawerVisible,
377
436
  closable: false,
378
- width: 400
437
+ width: 400,
438
+ buttonConfig: filterDrawerButtonConfig
379
439
  }, /*#__PURE__*/_react.default.createElement(_styles.FilterDrawerContent, null, /*#__PURE__*/_react.default.createElement(_styles.FilterDrawerBody, null, filterConfig.length > 0 ? filterConfig.map(filter => /*#__PURE__*/_react.default.createElement(_styles.FilterSection, {
380
440
  key: filter.key
381
- }, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, filter.label, filter.required && /*#__PURE__*/_react.default.createElement(_styles.RequiredMark, null, "*")), renderFilterInput(filter))) : /*#__PURE__*/_react.default.createElement(_styles.FilterSection, null, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, "No filters configured"))), /*#__PURE__*/_react.default.createElement(_styles.FilterDrawerFooter, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
382
- label: "Clear All",
383
- onClick: handleClearFilters,
384
- type: "secondary",
385
- size: "medium"
386
- }), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
387
- label: "Apply Filter",
388
- onClick: handleApplyFilters,
389
- type: "primary",
390
- size: "medium",
391
- disabled: !areAllRequiredFieldsFilled
392
- })))), /*#__PURE__*/_react.default.createElement(_CustomTable.default, _extends({
441
+ }, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, filter.label, filter.required && /*#__PURE__*/_react.default.createElement(_styles.RequiredMark, null, "*")), renderFilterInput(filter))) : /*#__PURE__*/_react.default.createElement(_styles.FilterSection, null, /*#__PURE__*/_react.default.createElement(_styles.FilterLabel, null, "No filters configured"))))), /*#__PURE__*/_react.default.createElement(_CustomTable.default, _extends({
393
442
  rowKey: rowKey,
394
443
  dataSource: displayData,
395
444
  columns: columns,
@@ -3,22 +3,23 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Toolbar = exports.TableWithSearchAndFilterContainer = exports.RequiredMark = exports.PaginationContainer = exports.FilterSubLabelText = exports.FilterSubLabel = exports.FilterSubField = exports.FilterSection = exports.FilterLabel = exports.FilterGroup = exports.FilterDrawerFooter = exports.FilterDrawerContent = exports.FilterDrawerBody = exports.DateRangeContainer = void 0;
6
+ exports.Toolbar = exports.TableWithSearchAndFilterContainer = exports.RequiredMark = exports.PaginationContainer = exports.FilterSubLabelText = exports.FilterSubLabel = exports.FilterSubField = exports.FilterSection = exports.FilterLabel = exports.FilterIndicatorDot = exports.FilterGroup = exports.FilterDrawerContent = exports.FilterDrawerBody = exports.FilterButtonWrapper = exports.DateRangeContainer = void 0;
7
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
8
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
8
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15;
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
11
  const TableWithSearchAndFilterContainer = exports.TableWithSearchAndFilterContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n"])));
12
- const Toolbar = exports.Toolbar = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n gap: 16px;\n\n @media screen and (max-width: 768px) {\n flex-direction: column;\n align-items: stretch;\n }\n"])));
12
+ const Toolbar = exports.Toolbar = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n gap: 16px;\n\n button.secondary {\n border-color: #1890ff !important;\n color: #1890ff !important;\n }\n button.secondary:hover {\n border-color: #1890ff !important;\n color: #1890ff !important;\n }\n\n @media screen and (max-width: 768px) {\n flex-direction: column;\n align-items: stretch;\n }\n"])));
13
13
  const FilterSection = exports.FilterSection = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-bottom: 24px;\n"])));
14
14
  const FilterLabel = exports.FilterLabel = _styledComponents.default.label(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-weight: 600;\n font-size: 14px;\n color: var(--color-primary-content, #212121);\n margin-bottom: 12px;\n"])));
15
15
  const RequiredMark = exports.RequiredMark = _styledComponents.default.span(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: #ff4d4f;\n margin-left: 2px;\n font-weight: 400;\n"])));
16
16
  const PaginationContainer = exports.PaginationContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-top: 16px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n"])));
17
17
  const FilterDrawerContent = exports.FilterDrawerContent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n min-height: calc(100vh - 150px);\n"])));
18
18
  const FilterDrawerBody = exports.FilterDrawerBody = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n flex: 1;\n overflow-y: auto;\n \n /* Make radio buttons horizontal */\n .ant-radio-group {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n }\n \n /* Ensure radio wrapper is visible - override line-height: 0 */\n .ant-radio-wrapper {\n display: inline-flex !important;\n align-items: center !important;\n margin-right: 0 !important;\n line-height: 1.5 !important;\n }\n \n /* Ensure radio label text is visible */\n .ant-radio-wrapper span:not(.ant-radio) {\n line-height: 1.5 !important;\n }\n \n .ant-radio-wrapper p {\n margin: 0;\n line-height: 1.5 !important;\n }\n"])));
19
- const FilterDrawerFooter = exports.FilterDrawerFooter = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n padding: 16px 0;\n border-top: 1px solid #e8e8e8;\n margin-top: auto;\n"])));
20
- const FilterGroup = exports.FilterGroup = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n"])));
21
- const FilterSubField = exports.FilterSubField = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"])));
22
- const FilterSubLabel = exports.FilterSubLabel = _styledComponents.default.label(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-weight: 400;\n font-size: 14px;\n color: var(--color-primary-content, #212121);\n"])));
23
- const FilterSubLabelText = exports.FilterSubLabelText = _styledComponents.default.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n color: var(--color-primary-content, #212121);\n"])));
24
- const DateRangeContainer = exports.DateRangeContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n"])));
19
+ const FilterGroup = exports.FilterGroup = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n"])));
20
+ const FilterSubField = exports.FilterSubField = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"])));
21
+ const FilterSubLabel = exports.FilterSubLabel = _styledComponents.default.label(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n font-weight: 400;\n font-size: 14px;\n color: var(--color-primary-content, #212121);\n"])));
22
+ const FilterSubLabelText = exports.FilterSubLabelText = _styledComponents.default.span(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: var(--color-primary-content, #212121);\n"])));
23
+ const DateRangeContainer = exports.DateRangeContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n"])));
24
+ const FilterButtonWrapper = exports.FilterButtonWrapper = _styledComponents.default.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: relative;\n"])));
25
+ const FilterIndicatorDot = exports.FilterIndicatorDot = _styledComponents.default.span(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n background: #de350b;\n position: absolute;\n top: -4px;\n right: -4px;\n border-radius: 50%;\n z-index: 1;\n"])));
@@ -10,9 +10,12 @@ var _react = _interopRequireDefault(require("react"));
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
  var _antd = require("antd");
12
12
  var _utils = require("../../utils");
13
+ var _CustomToggle = _interopRequireDefault(require("../oa-component-toggle/CustomToggle"));
14
+ var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
13
15
  var _styles = require("./styles");
14
- const _excluded = ["data", "data-test", "defaultActiveKey", "disabled", "style", "tabPosition", "type"],
16
+ const _excluded = ["data", "data-test", "defaultActiveKey", "disabled", "extraAction", "style", "tabPosition", "type"],
15
17
  _excluded2 = ["body", "disabled", "key", "label"];
18
+ /* eslint-disable */
16
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
20
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
21
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -29,6 +32,10 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
29
32
  * @param {string} [data-test] - A string to be used as data-test attribute.
30
33
  * @param {string} defaultActiveKey - Key of the initially active tab.
31
34
  * @param {boolean} disabled - Whether the tabs are disabled.
35
+ * @param {Object} extraAction - Configuration for extra action on the right side of tabs.
36
+ * @param {string} extraAction.type - Type of extra action ('switch').
37
+ * @param {boolean} extraAction.visible - Whether to show the extra action (default: true).
38
+ * @param {Object} extraAction.props - Props to pass to the extra action component.
32
39
  * @param {Object} style - An object containing CSS styles for the component.
33
40
  * @param {'top'|'right'|'bottom'|'left'} tabPosition - Position of the tab headers.
34
41
  * @param {'line'|'card'} type - Type of the tabs.
@@ -41,6 +48,7 @@ function CustomTabs(_ref) {
41
48
  'data-test': dataTest,
42
49
  defaultActiveKey,
43
50
  disabled,
51
+ extraAction,
44
52
  style,
45
53
  tabPosition,
46
54
  type
@@ -63,13 +71,42 @@ function CustomTabs(_ref) {
63
71
  }, label) : label
64
72
  }, otherProps);
65
73
  });
74
+
75
+ /**
76
+ * Renders the extra action component based on the type.
77
+ * @returns {React.ReactNode} The rendered extra action component or null.
78
+ */
79
+ const renderExtraAction = () => {
80
+ if (!extraAction || !extraAction.type) {
81
+ return null;
82
+ }
83
+
84
+ // Check if extraAction is visible (defaults to true if not specified)
85
+ if (extraAction.visible === false) {
86
+ return null;
87
+ }
88
+ switch (extraAction.type) {
89
+ case 'switch':
90
+ return /*#__PURE__*/_react.default.createElement(_styles.ExtraActionWrapper, null, extraAction.label && /*#__PURE__*/_react.default.createElement(_Typography.default, {
91
+ color: extraAction.labelColor || 'secondary-content',
92
+ typography: extraAction.labelTypography || 'type-b2-400'
93
+ }, extraAction.label), /*#__PURE__*/_react.default.createElement(_CustomToggle.default, _extends({
94
+ "data-test": dataTest ? "".concat(dataTest, "--extra-action-switch") : undefined,
95
+ size: extraAction.size || 'small'
96
+ }, extraAction.props)));
97
+ default:
98
+ return null;
99
+ }
100
+ };
101
+ const tabBarExtraContent = renderExtraAction();
66
102
  return /*#__PURE__*/_react.default.createElement(_styles.StyledTabs, null, /*#__PURE__*/_react.default.createElement(_antd.Tabs, _extends({
67
103
  defaultActiveKey: defaultActiveKey,
68
- disabled: true,
104
+ disabled: disabled,
69
105
  items: items,
70
106
  style: _objectSpread({}, style),
71
107
  tabPosition: tabPosition,
72
- type: type
108
+ type: type,
109
+ tabBarExtraContent: tabBarExtraContent
73
110
  }, antDesignProps)));
74
111
  }
75
112
  CustomTabs.propTypes = {
@@ -84,6 +121,15 @@ CustomTabs.propTypes = {
84
121
  'data-test': _propTypes.default.string,
85
122
  defaultActiveKey: _propTypes.default.string,
86
123
  disabled: _propTypes.default.bool,
124
+ extraAction: _propTypes.default.shape({
125
+ type: _propTypes.default.oneOf(['switch']).isRequired,
126
+ visible: _propTypes.default.bool,
127
+ label: _propTypes.default.string,
128
+ labelColor: _propTypes.default.string,
129
+ labelTypography: _propTypes.default.string,
130
+ size: _propTypes.default.oneOf(['large', 'small']),
131
+ props: _propTypes.default.objectOf(_propTypes.default.any)
132
+ }),
87
133
  tabPosition: _propTypes.default.oneOf(['top', 'right', 'bottom', 'left']),
88
134
  type: _propTypes.default.oneOf(['line', 'card'
89
135
  // 'editable-card',
@@ -97,6 +143,7 @@ CustomTabs.defaultProps = {
97
143
  tabPosition: 'top',
98
144
  type: 'line',
99
145
  disabled: false,
146
+ extraAction: null,
100
147
  style: {}
101
148
  };
102
149
  var _default = exports.default = CustomTabs;
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.StyledTabs = void 0;
6
+ exports.default = exports.StyledTabs = exports.ExtraActionWrapper = void 0;
7
7
  var _antd = require("antd");
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
- var _templateObject;
9
+ var _templateObject, _templateObject2;
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
12
12
  var _default = exports.default = {};
13
- const StyledTabs = exports.StyledTabs = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-tabs .ant-tabs-tab{\n color: var(--color-secondary-content);\n padding: 12px;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n .ant-tabs-tab-disabled{\n color: var(--color-disabled-button) !important;\n }\n s.ant-tabs-tab-disabled:hover {\n color: var(--color-disabled-button) !important;\n}\n .ant-tabs .ant-tabs-tab+.ant-tabs-tab{\n margin: 0;\n }\n .ant-tabs-top >.ant-tabs-nav::before{\n border-bottom: 1px solid var(--color-divider)\n }\n .ant-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: var(--color-primary);\n font-size: 14px;\n font-weight: 500;\n line-height: 20px; \n }\n .ant-tabs .ant-tabs-tab:hover{\n color: var(--color-primary-hover);\n }\n .ant-tabs .ant-tabs-ink-bar{\n background: var(--color-primary);\n }\n"])));
13
+ const StyledTabs = exports.StyledTabs = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.ant-tabs .ant-tabs-tab{\n color: var(--color-secondary-content);\n padding: 12px;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n .ant-tabs-tab-disabled{\n color: var(--color-disabled-button) !important;\n }\n s.ant-tabs-tab-disabled:hover {\n color: var(--color-disabled-button) !important;\n}\n .ant-tabs .ant-tabs-tab+.ant-tabs-tab{\n margin: 0;\n }\n .ant-tabs-top >.ant-tabs-nav::before{\n border-bottom: 1px solid var(--color-divider)\n }\n .ant-tabs .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {\n color: var(--color-primary);\n font-size: 14px;\n font-weight: 500;\n line-height: 20px; \n }\n .ant-tabs .ant-tabs-tab:hover{\n color: var(--color-primary-hover);\n }\n .ant-tabs .ant-tabs-ink-bar{\n background: var(--color-primary);\n }\n"])));
14
+ const ExtraActionWrapper = exports.ExtraActionWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n gap: 12px;\n"])));
@@ -32,6 +32,7 @@ function CustomTag(_ref) {
32
32
  textColor,
33
33
  style
34
34
  } = _ref;
35
+ console.log("style", style);
35
36
  return /*#__PURE__*/_react.default.createElement(_styles.StyledTag, _extends({
36
37
  "data-test": dataTest,
37
38
  type: type,
@@ -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$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;
56
+ var _state$misc30, _sidebar$mobileMenuIt, _imageViewer$content, _imageViewer$content2, _infoData$iconConfig, _infoData$iconConfig2, _infoData$iconConfig3, _infoData$iconConfig4, _leftHeaderFirstButto, _leftHeaderFirstButto2, _infoPanel$data, _infoPanel$data2, _infoPanel$data3, _infoPanel$data4, _infoPanel$data5, _state$customDrawer3, _state$customDrawer4, _tabs$list, _ref7, _tabs$extraAction$che2, _tabs$extraAction$pro, _tables$columns3, _tables$columns4, _tabs$active3, _state$tables5, _tables$selectionType, _tabs$active4, _tables$selectionType2, _tables$pagination19, _drawer$data, _tabs$active5, _drawer$data$drawer$a, _drawer$data2, _tabs$active6, _tabs$active7, _nestedDrawer$data, _nestedDrawer$data$ca, _nestedDrawer$data2, _customDrawer$data, _customDrawer$data2, _contentPanel$dataSou, _tables$tableFooter, _tables$selectedRowKe, _tables$tableFooter2, _tables$tableFooter3, _tables$tableFooter5;
57
57
  let {
58
58
  config,
59
59
  getInitialData,
@@ -83,7 +83,8 @@ function GenricLayOut(_ref) {
83
83
  handleTableFooterApi,
84
84
  handleSwitchSelectItem,
85
85
  handleTableColumnClickParent,
86
- handleLeftHeaderFirstButton
86
+ handleLeftHeaderFirstButton,
87
+ handleTabExtraActionChange
87
88
  } = {}
88
89
  } = _ref;
89
90
  const [state, dispatch] = (0, _react.useReducer)(_layoutReducer.genericLayoutReducer, config !== null && config !== void 0 ? config : _layoutReducer.initialState);
@@ -110,7 +111,8 @@ function GenricLayOut(_ref) {
110
111
  customDrawer,
111
112
  staticFilter,
112
113
  profileData,
113
- infoPanel
114
+ infoPanel,
115
+ infoData
114
116
  } = state !== null && state !== void 0 ? state : {};
115
117
  (0, _react.useEffect)(() => {
116
118
  init();
@@ -253,6 +255,18 @@ function GenricLayOut(_ref) {
253
255
  });
254
256
  };
255
257
 
258
+ /**
259
+ * Resets the tabs extra action switch state to unchecked
260
+ */
261
+ const resetTabsExtraActionSwitch = () => {
262
+ if (tabs !== null && tabs !== void 0 && tabs.extraAction) {
263
+ dispatch({
264
+ type: _layoutReducer.actionTypes.SET_TABS_EXTRA_ACTION_CHECKED,
265
+ payload: false
266
+ });
267
+ }
268
+ };
269
+
256
270
  /**
257
271
  * Handles the change of the search input value.
258
272
  *
@@ -275,6 +289,7 @@ function GenricLayOut(_ref) {
275
289
  payload: value
276
290
  });
277
291
  if (value === "") {
292
+ resetTabsExtraActionSwitch();
278
293
  if (handleInputSearchChange) {
279
294
  var _state$inputSearch, _state$tabs, _customDrawer$applied, _config$tables, _config$tables2, _tables$sorting, _tables$sorting2, _header$subHeading, _header$subHeading2, _state$misc;
280
295
  dispatch({
@@ -353,6 +368,7 @@ function GenricLayOut(_ref) {
353
368
  type: _layoutReducer.actionTypes.SET_INPUT_SEARCH_VALUE,
354
369
  payload: trimedValue
355
370
  });
371
+ resetTabsExtraActionSwitch();
356
372
  if (handleInputSearchEnter) {
357
373
  var _state$tabs2, _config$tables5, _config$tables6, _tables$sorting3, _tables$sorting4, _customDrawer$applied2, _header$subHeading3, _header$subHeading4, _state$misc2;
358
374
  const {
@@ -420,6 +436,7 @@ function GenricLayOut(_ref) {
420
436
  payload: value
421
437
  });
422
438
  if (value === "") {
439
+ resetTabsExtraActionSwitch();
423
440
  if (handleDropdownSearchInputChange) {
424
441
  var _state$tabs3, _config$tables9, _config$tables10, _tables$sorting5, _tables$sorting6, _tables$filter, _staticFilter$data2, _customDrawer$applied3, _header$subHeading5, _header$subHeading6, _state$misc3, _state$staticFilter$m, _state$staticFilter;
425
442
  dispatch({
@@ -512,6 +529,7 @@ function GenricLayOut(_ref) {
512
529
  type: _layoutReducer.actionTypes.SET_DROPDOWN_SEARCH_VALUE,
513
530
  payload: value
514
531
  });
532
+ resetTabsExtraActionSwitch();
515
533
  if (handleDropdownSearchEnter) {
516
534
  var _state$tabs4, _config$tables13, _config$tables14, _tables$sorting7, _tables$sorting8, _tables$filter2, _staticFilter$data3, _customDrawer$applied4, _header$subHeading7, _header$subHeading8, _state$misc4, _state$staticFilter$m2, _state$staticFilter2;
517
535
  const {
@@ -572,6 +590,7 @@ function GenricLayOut(_ref) {
572
590
  * @returns {Promise<void>} - Resolves when the data has been fetched and the state has been updated.
573
591
  */
574
592
  const onDropdownSearchOptionChange = async option => {
593
+ resetTabsExtraActionSwitch();
575
594
  dispatch({
576
595
  type: _layoutReducer.actionTypes.SET_DROPDOWN_SEARCH_OPTION,
577
596
  payload: option === null || option === void 0 ? void 0 : option.value
@@ -690,6 +709,7 @@ function GenricLayOut(_ref) {
690
709
  * @returns {Promise<void>} - Resolves when the table data has been updated.
691
710
  */
692
711
  const onDropdownSearchClear = async () => {
712
+ resetTabsExtraActionSwitch();
693
713
  dispatch({
694
714
  type: _layoutReducer.actionTypes.SET_DROPDOWN_SEARCH_VALUE,
695
715
  payload: null
@@ -754,6 +774,7 @@ function GenricLayOut(_ref) {
754
774
  * @returns {Promise<void>} - Resolves when the table data has been updated.
755
775
  */
756
776
  const onInputSearchClear = async () => {
777
+ resetTabsExtraActionSwitch();
757
778
  dispatch({
758
779
  type: _layoutReducer.actionTypes.SET_INPUT_SEARCH_VALUE,
759
780
  payload: null
@@ -1144,6 +1165,7 @@ function GenricLayOut(_ref) {
1144
1165
  sortDirection: (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "ascend" && "ASC" || (sorter === null || sorter === void 0 ? void 0 : sorter.order) === "descend" && "DESC" || ""
1145
1166
  }
1146
1167
  });
1168
+ resetTabsExtraActionSwitch();
1147
1169
  if (handleTableChange) {
1148
1170
  var _state$dropdownSearch3, _state$inputSearch4, _state$tabs8, _header$subHeading15, _header$subHeading16, _staticFilter$data6, _customDrawer$applied8, _state$misc15, _state$staticFilter$m5, _state$staticFilter5;
1149
1171
  dispatch({
@@ -1201,7 +1223,9 @@ function GenricLayOut(_ref) {
1201
1223
  * @returns {void}
1202
1224
  */
1203
1225
  const onTabClick = async key => {
1204
- var _tables$filter5, _tables$columns2, _staticFilter$data$fi2;
1226
+ var _ref4, _tabs$extraAction$che, _tabs$extraAction, _tabs$extraAction2, _tables$filter5, _tables$columns2, _staticFilter$data$fi2;
1227
+ // Store the checked value to pass to handleTabClick
1228
+ const extraActionChecked = (_ref4 = (_tabs$extraAction$che = tabs === null || tabs === void 0 || (_tabs$extraAction = tabs.extraAction) === null || _tabs$extraAction === void 0 ? void 0 : _tabs$extraAction.checked) !== null && _tabs$extraAction$che !== void 0 ? _tabs$extraAction$che : tabs === null || tabs === void 0 || (_tabs$extraAction2 = tabs.extraAction) === null || _tabs$extraAction2 === void 0 || (_tabs$extraAction2 = _tabs$extraAction2.props) === null || _tabs$extraAction2 === void 0 ? void 0 : _tabs$extraAction2.defaultChecked) !== null && _ref4 !== void 0 ? _ref4 : false;
1205
1229
  dispatch({
1206
1230
  type: _layoutReducer.actionTypes.TAB_CLICK,
1207
1231
  payload: {
@@ -1277,6 +1301,8 @@ function GenricLayOut(_ref) {
1277
1301
  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
1278
1302
  } : {}), (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 : {}), {}, {
1279
1303
  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 : []
1304
+ }, (tabs === null || tabs === void 0 ? void 0 : tabs.extraAction) && extraActionChecked && {
1305
+ checked: extraActionChecked
1280
1306
  }));
1281
1307
  if (error) {
1282
1308
  showErrorNotification(error);
@@ -1392,6 +1418,7 @@ function GenricLayOut(_ref) {
1392
1418
  };
1393
1419
  const onRemoveAppliedFilter = async filterKey => {
1394
1420
  var _state$customDrawer;
1421
+ resetTabsExtraActionSwitch();
1395
1422
  const currentFilters = _objectSpread({}, state === null || state === void 0 || (_state$customDrawer = state.customDrawer) === null || _state$customDrawer === void 0 ? void 0 : _state$customDrawer.appliedFilters);
1396
1423
 
1397
1424
  // Remove the specific filter
@@ -1538,7 +1565,7 @@ function GenricLayOut(_ref) {
1538
1565
 
1539
1566
  // Only process filter data if this is actually a filter drawer
1540
1567
  if (formData.type === "FILTER-SUBMIT") {
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;
1568
+ var _state$dropdownSearch7, _state$inputSearch7, _ref5, _appliedFilters$filte, _state$tabs13, _config$tables29, _config$tables30, _tables$filter8, _tables$sorting19, _header$subHeading23, _header$subHeading24, _staticFilter$data9, _tables$sorting20, _state$misc21, _state$staticFilter$m9, _state$staticFilter9;
1542
1569
  const appliedFilters = {};
1543
1570
  Object.keys(formData).forEach(key => {
1544
1571
  const value = formData[key];
@@ -1561,7 +1588,7 @@ function GenricLayOut(_ref) {
1561
1588
  }), (state === null || state === void 0 || (_state$inputSearch7 = state.inputSearch) === null || _state$inputSearch7 === void 0 || (_state$inputSearch7 = _state$inputSearch7.value) === null || _state$inputSearch7 === void 0 ? void 0 : _state$inputSearch7.trim()) && {
1562
1589
  searchedValue: state.inputSearch.value
1563
1590
  }), appliedFilters), {}, {
1564
- filterOn: (_ref4 = (_appliedFilters$filte = appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.filterBy) !== null && _appliedFilters$filte !== void 0 ? _appliedFilters$filte : customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.defaultAppliedFilter) !== null && _ref4 !== void 0 ? _ref4 : "",
1591
+ filterOn: (_ref5 = (_appliedFilters$filte = appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.filterBy) !== null && _appliedFilters$filte !== void 0 ? _appliedFilters$filte : customDrawer === null || customDrawer === void 0 ? void 0 : customDrawer.defaultAppliedFilter) !== null && _ref5 !== void 0 ? _ref5 : "",
1565
1592
  fromDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.fromDate,
1566
1593
  toDate: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toDate,
1567
1594
  selectedTab: state === null || state === void 0 || (_state$tabs13 = state.tabs) === null || _state$tabs13 === void 0 ? void 0 : _state$tabs13.active,
@@ -1674,6 +1701,7 @@ function GenricLayOut(_ref) {
1674
1701
  };
1675
1702
  const onClearAllAppliedFilters = async () => {
1676
1703
  var _state$dropdownSearch9, _state$inputSearch9, _state$tabs15, _tables$pagination9, _tables$pagination10, _tables$filter10, _tables$sorting23, _header$subHeading27, _header$subHeading28, _staticFilter$data11, _tables$sorting24, _state$misc23, _state$staticFilter$m11, _state$staticFilter11;
1704
+ resetTabsExtraActionSwitch();
1677
1705
  const {
1678
1706
  error,
1679
1707
  data
@@ -1895,6 +1923,7 @@ function GenricLayOut(_ref) {
1895
1923
  const rightHeaderSecondButtonClick = async () => {
1896
1924
  if ((rightHeaderSecondButton === null || rightHeaderSecondButton === void 0 ? void 0 : rightHeaderSecondButton.action) === "RESET_CUSTOM_DRAWER") {
1897
1925
  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;
1926
+ resetTabsExtraActionSwitch();
1898
1927
  const {
1899
1928
  error,
1900
1929
  data
@@ -2004,6 +2033,7 @@ function GenricLayOut(_ref) {
2004
2033
  * @param {string} filterValue - The value of the selected filter
2005
2034
  */
2006
2035
  const onStaticFilterSelect = async filterValue => {
2036
+ resetTabsExtraActionSwitch();
2007
2037
  const selectedFilterStatus = staticFilter.data.map(item => item.selected ? item.value : null).filter(Boolean);
2008
2038
  const currentSelectedIndex = selectedFilterStatus.indexOf(filterValue);
2009
2039
  if (currentSelectedIndex === -1) {
@@ -2073,11 +2103,12 @@ function GenricLayOut(_ref) {
2073
2103
  });
2074
2104
  }
2075
2105
  };
2076
- const onMobilePageChange = async _ref5 => {
2106
+ const onMobilePageChange = async _ref6 => {
2077
2107
  let {
2078
2108
  current,
2079
2109
  pageSize
2080
- } = _ref5;
2110
+ } = _ref6;
2111
+ resetTabsExtraActionSwitch();
2081
2112
  dispatch({
2082
2113
  type: _layoutReducer.actionTypes.SET_PAGINATION,
2083
2114
  payload: {
@@ -2187,7 +2218,25 @@ function GenricLayOut(_ref) {
2187
2218
  url: imageViewer === null || imageViewer === void 0 || (_imageViewer$content3 = imageViewer.content) === null || _imageViewer$content3 === void 0 ? void 0 : _imageViewer$content3.url
2188
2219
  });
2189
2220
  }
2190
- }), (cards === null || cards === void 0 ? void 0 : cards.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2221
+ }), (infoData === null || infoData === void 0 ? void 0 : infoData.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2222
+ loading: state === null || state === void 0 ? void 0 : state.isLoading,
2223
+ active: true,
2224
+ paragraph: {
2225
+ rows: 1
2226
+ }
2227
+ }, /*#__PURE__*/_react.default.createElement(_CustomInfo.default, {
2228
+ closable: infoData === null || infoData === void 0 ? void 0 : infoData.closable,
2229
+ description: infoData === null || infoData === void 0 ? void 0 : infoData.description,
2230
+ className: infoData === null || infoData === void 0 ? void 0 : infoData.className,
2231
+ iconConfig: {
2232
+ icon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
2233
+ color: (infoData === null || infoData === void 0 || (_infoData$iconConfig = infoData.iconConfig) === null || _infoData$iconConfig === void 0 ? void 0 : _infoData$iconConfig.color) || "primary-content",
2234
+ icon: infoData === null || infoData === void 0 || (_infoData$iconConfig2 = infoData.iconConfig) === null || _infoData$iconConfig2 === void 0 ? void 0 : _infoData$iconConfig2.icon,
2235
+ size: (infoData === null || infoData === void 0 || (_infoData$iconConfig3 = infoData.iconConfig) === null || _infoData$iconConfig3 === void 0 ? void 0 : _infoData$iconConfig3.size) || 16
2236
+ }),
2237
+ position: (infoData === null || infoData === void 0 || (_infoData$iconConfig4 = infoData.iconConfig) === null || _infoData$iconConfig4 === void 0 ? void 0 : _infoData$iconConfig4.position) || "left"
2238
+ }
2239
+ })), (cards === null || cards === void 0 ? void 0 : cards.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2191
2240
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
2192
2241
  active: true,
2193
2242
  paragraph: {
@@ -2306,7 +2355,89 @@ function GenricLayOut(_ref) {
2306
2355
  }))
2307
2356
  },
2308
2357
  activeKey: tabs === null || tabs === void 0 ? void 0 : tabs.active,
2309
- onTabClick: onTabClick
2358
+ onTabClick: onTabClick,
2359
+ extraAction: tabs !== null && tabs !== void 0 && tabs.extraAction ? _objectSpread(_objectSpread({}, tabs.extraAction), {}, {
2360
+ props: _objectSpread(_objectSpread({}, tabs.extraAction.props), {}, {
2361
+ checked: (_ref7 = (_tabs$extraAction$che2 = tabs.extraAction.checked) !== null && _tabs$extraAction$che2 !== void 0 ? _tabs$extraAction$che2 : (_tabs$extraAction$pro = tabs.extraAction.props) === null || _tabs$extraAction$pro === void 0 ? void 0 : _tabs$extraAction$pro.defaultChecked) !== null && _ref7 !== void 0 ? _ref7 : false,
2362
+ onChange: async checked => {
2363
+ var _tabs$extraAction$pro2;
2364
+ // Update switch state immediately
2365
+ dispatch({
2366
+ type: _layoutReducer.actionTypes.SET_TABS_EXTRA_ACTION_CHECKED,
2367
+ payload: checked
2368
+ });
2369
+ // Call the original onChange if provided
2370
+ if ((_tabs$extraAction$pro2 = tabs.extraAction.props) !== null && _tabs$extraAction$pro2 !== void 0 && _tabs$extraAction$pro2.onChange) {
2371
+ tabs.extraAction.props.onChange(checked);
2372
+ }
2373
+ // Call handleTabExtraActionChange
2374
+ if (handleTabExtraActionChange) {
2375
+ var _tables$pagination17, _tables$pagination18, _tables$sorting31, _tables$sorting32, _tables$filter13, _staticFilter$data14, _state$misc31;
2376
+ dispatch({
2377
+ type: _layoutReducer.actionTypes.SET_LOADING,
2378
+ payload: true
2379
+ });
2380
+ const {
2381
+ error,
2382
+ data
2383
+ } = await handleTabExtraActionChange(_objectSpread(_objectSpread(_objectSpread({
2384
+ checked,
2385
+ selectedTab: tabs === null || tabs === void 0 ? void 0 : tabs.active,
2386
+ current: tables === null || tables === void 0 || (_tables$pagination17 = tables.pagination) === null || _tables$pagination17 === void 0 ? void 0 : _tables$pagination17.current,
2387
+ pageSize: tables === null || tables === void 0 || (_tables$pagination18 = tables.pagination) === null || _tables$pagination18 === void 0 ? void 0 : _tables$pagination18.pageSize,
2388
+ field: tables === null || tables === void 0 || (_tables$sorting31 = tables.sorting) === null || _tables$sorting31 === void 0 ? void 0 : _tables$sorting31.sortBy,
2389
+ order: tables === null || tables === void 0 || (_tables$sorting32 = tables.sorting) === null || _tables$sorting32 === void 0 ? void 0 : _tables$sorting32.sortDirection
2390
+ }, (tables === null || tables === void 0 || (_tables$filter13 = tables.filter) === null || _tables$filter13 === void 0 ? void 0 : _tables$filter13.key) && {
2391
+ columnFilterStatus: tables === null || tables === void 0 ? void 0 : tables.filter
2392
+ }), (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) && {
2393
+ staticFilter: staticFilter.data.find(item => item.selected).value
2394
+ }), (_state$misc31 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc31 !== void 0 ? _state$misc31 : {}));
2395
+ if (error) {
2396
+ showErrorNotification(error);
2397
+ dispatch({
2398
+ type: _layoutReducer.actionTypes.SET_TABLE_EMPTY
2399
+ });
2400
+ } else {
2401
+ var _config$tables33, _config$tables34, _config$tabs2;
2402
+ if (staticFilter !== null && staticFilter !== void 0 && staticFilter.visible) {
2403
+ setStaticFilterData(data);
2404
+ }
2405
+ dispatch({
2406
+ type: _layoutReducer.actionTypes.SET_TABLE_DATA,
2407
+ payload: data
2408
+ });
2409
+ dispatch({
2410
+ type: _layoutReducer.actionTypes.SET_PAGINATION,
2411
+ payload: {
2412
+ current: config === null || config === void 0 || (_config$tables33 = config.tables) === null || _config$tables33 === void 0 || (_config$tables33 = _config$tables33.pagination) === null || _config$tables33 === void 0 ? void 0 : _config$tables33.current,
2413
+ pageSize: config === null || config === void 0 || (_config$tables34 = config.tables) === null || _config$tables34 === void 0 || (_config$tables34 = _config$tables34.pagination) === null || _config$tables34 === void 0 ? void 0 : _config$tables34.pageSize
2414
+ }
2415
+ });
2416
+ // Update tabs extraAction using replaceVariables with response data
2417
+ if (config !== null && config !== void 0 && (_config$tabs2 = config.tabs) !== null && _config$tabs2 !== void 0 && _config$tabs2.extraAction) {
2418
+ const updatedExtraAction = (0, _staticConfigResolver.default)(config.tabs.extraAction, data);
2419
+ dispatch({
2420
+ type: _layoutReducer.actionTypes.SET_TABS_EXTRA_ACTION,
2421
+ payload: updatedExtraAction
2422
+ });
2423
+ }
2424
+ // Update infoData using replaceVariables with response data
2425
+ if (config !== null && config !== void 0 && config.infoData) {
2426
+ const updatedInfoData = (0, _staticConfigResolver.default)(config.infoData, data);
2427
+ dispatch({
2428
+ type: _layoutReducer.actionTypes.SET_INFO_DATA,
2429
+ payload: updatedInfoData
2430
+ });
2431
+ }
2432
+ }
2433
+ dispatch({
2434
+ type: _layoutReducer.actionTypes.SET_LOADING,
2435
+ payload: false
2436
+ });
2437
+ }
2438
+ }
2439
+ })
2440
+ }) : null
2310
2441
  }))), (staticFilter === null || staticFilter === void 0 ? void 0 : staticFilter.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
2311
2442
  loading: state === null || state === void 0 ? void 0 : state.isLoading,
2312
2443
  active: true,
@@ -2338,7 +2469,7 @@ function GenricLayOut(_ref) {
2338
2469
  emptyText: emptyTableState
2339
2470
  },
2340
2471
  emptyStateCard: emptyTableState,
2341
- onMobilePageChange: tables !== null && tables !== void 0 && (_tables$pagination17 = tables.pagination) !== null && _tables$pagination17 !== void 0 && _tables$pagination17.mwebPagination ? onMobilePageChange : undefined
2472
+ onMobilePageChange: tables !== null && tables !== void 0 && (_tables$pagination19 = tables.pagination) !== null && _tables$pagination19 !== void 0 && _tables$pagination19.mwebPagination ? onMobilePageChange : undefined
2342
2473
  })))), (drawer === null || drawer === void 0 ? void 0 : drawer.visible) && /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
2343
2474
  className: "oaDrawer",
2344
2475
  title: drawer === null || drawer === void 0 || (_drawer$data = drawer.data) === null || _drawer$data === void 0 || (_drawer$data = _drawer$data[(_tabs$active5 = tabs === null || tabs === void 0 ? void 0 : tabs.active) !== null && _tabs$active5 !== void 0 ? _tabs$active5 : "default"]) === null || _drawer$data === void 0 || (_drawer$data = _drawer$data[drawer === null || drawer === void 0 ? void 0 : drawer.active]) === null || _drawer$data === void 0 ? void 0 : _drawer$data.title,
@@ -57,7 +57,10 @@ const actionTypes = exports.actionTypes = {
57
57
  UPDATE_FILTER_FORM_VALUES: "UPDATE_FILTER_FORM_VALUES",
58
58
  SET_STATIC_FILTER: "SET_STATIC_FILTER",
59
59
  SET_PROFILE_DATA: "SET_PROFILE_DATA",
60
- CHANGE_ROW: "CHANGE_ROW"
60
+ CHANGE_ROW: "CHANGE_ROW",
61
+ SET_TABS_EXTRA_ACTION_CHECKED: "SET_TABS_EXTRA_ACTION_CHECKED",
62
+ SET_TABS_EXTRA_ACTION: "SET_TABS_EXTRA_ACTION",
63
+ SET_INFO_DATA: "SET_INFO_DATA"
61
64
  };
62
65
  function getFieldDefaultValue(widget) {
63
66
  switch (widget) {
@@ -74,7 +77,7 @@ function getFieldDefaultValue(widget) {
74
77
  }
75
78
  }
76
79
  const genericLayoutReducer = exports.genericLayoutReducer = (0, _immer.produce)((draft, action) => {
77
- var _draft$imageViewer, _action$payload, _action$payload2, _draft$tabs, _draft$customDrawer$d, _draft$tables, _action$payload3, _action$payload4, _action$payload5, _draft$tabs$active, _draft$tabs2, _action$payload6, _action$payload7, _action$payload8, _draft$staticFilter, _draft$tables2, _draft$customDrawer$d2, _draft$customDrawer$d3, _draft$customDrawer$d4;
80
+ var _draft$imageViewer, _action$payload, _action$payload2, _draft$tabs, _draft$customDrawer$d, _draft$tables, _action$payload3, _action$payload4, _action$payload5, _draft$tabs$active, _draft$tabs2, _action$payload6, _action$payload7, _action$payload8, _draft$staticFilter, _draft$tables2, _draft$customDrawer$d2, _draft$customDrawer$d3, _draft$customDrawer$d4, _draft$tabs4, _draft$tabs5;
78
81
  switch (action.type) {
79
82
  case actionTypes.INIT:
80
83
  return (0, _staticConfigResolver.removeHidden)(action.payload);
@@ -304,6 +307,21 @@ const genericLayoutReducer = exports.genericLayoutReducer = (0, _immer.produce)(
304
307
  case actionTypes.CHANGE_ROW:
305
308
  draft.tables = action.payload.tables;
306
309
  break;
310
+ case actionTypes.SET_TABS_EXTRA_ACTION_CHECKED:
311
+ if ((_draft$tabs4 = draft.tabs) !== null && _draft$tabs4 !== void 0 && _draft$tabs4.extraAction) {
312
+ draft.tabs.extraAction.checked = action.payload;
313
+ }
314
+ break;
315
+ case actionTypes.SET_TABS_EXTRA_ACTION:
316
+ if ((_draft$tabs5 = draft.tabs) !== null && _draft$tabs5 !== void 0 && _draft$tabs5.extraAction && action.payload) {
317
+ draft.tabs.extraAction = _objectSpread(_objectSpread({}, draft.tabs.extraAction), action.payload);
318
+ }
319
+ break;
320
+ case actionTypes.SET_INFO_DATA:
321
+ if (action.payload) {
322
+ draft.infoData = _objectSpread(_objectSpread({}, draft.infoData), action.payload);
323
+ }
324
+ break;
307
325
  default:
308
326
  break;
309
327
  }
@@ -10,5 +10,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
10
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
11
  const Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: #ffffff;\n border-radius: 12px;\n display: flex;\n flex-direction: column;\n gap: 12px;\n"])));
12
12
  const TotalRow = exports.TotalRow = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n border-top: 1px solid #e0e0e0;\n padding: 16px 16px 0 16px;\n margin: 0 0 0 -16px;\n width: calc(100% + 32px);\n\n\n .gstAndCost{display: flex;\n flex-direction: column;\n align-items: flex-end;\n justify-content: center;}\n"])));
13
- const ItemInfoCard = exports.ItemInfoCard = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n.productBox{width:100%; display:flex; flex-direction:row; justify-content: space-between; padding:12px 0;}\n.productIcon{border-radius: 12px; background: #F6F6F6; width:80px; height:80px; display:flex; align-items:center; justify-content:center;}\n.productIcon img{height:64px;}\n.iconAndtextSec{display:flex; flex-direction:row; gap:12px; width:calc(100% - 88px);}\n.product-info {display: flex; flex-direction: column; width: calc(100% - 92px);}\n"])));
13
+ const ItemInfoCard = exports.ItemInfoCard = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n.productBox{width:100%; display:flex; flex-direction:row; justify-content: space-between; padding:12px 0;}\n.productIcon{border-radius: 12px; background: #F6F6F6; width:80px; height:80px; display:flex; align-items:center; justify-content:center;}\n.productIcon img{height:64px; max-width: 64px;}\n.iconAndtextSec{display:flex; flex-direction:row; gap:12px; width:calc(100% - 88px);}\n.product-info {display: flex; flex-direction: column; width: calc(100% - 92px);}\n"])));
14
14
  var _default = exports.default = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "0.18.380",
3
+ "version": "0.18.381",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",