@majoo-ui/react 1.54.1-rc.2 → 1.54.1

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.
package/index.esm.js CHANGED
@@ -3584,7 +3584,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
3584
3584
  onClick: e => {
3585
3585
  e.preventDefault();
3586
3586
  e.stopPropagation();
3587
- value == null ? void 0 : value.onRemove();
3587
+ value === null || value === void 0 ? void 0 : value.onRemove();
3588
3588
  },
3589
3589
  __self: undefined,
3590
3590
  __source: {
@@ -3661,7 +3661,7 @@ const SingleTagBanner = props => {
3661
3661
  onClick: e => {
3662
3662
  e.preventDefault();
3663
3663
  e.stopPropagation();
3664
- props == null ? void 0 : props.onRemove();
3664
+ props === null || props === void 0 ? void 0 : props.onRemove();
3665
3665
  },
3666
3666
  closeCenter: !props.title && !props.link,
3667
3667
  __self: undefined,
@@ -5703,7 +5703,7 @@ const Checkbox = _ref => {
5703
5703
  const [isChecked, setChecked] = useState(false);
5704
5704
  useEffect(() => {
5705
5705
  const checkValue = context && context.checkedItems.includes(value) || checked || indeterminate;
5706
- setChecked(checkValue != null ? checkValue : false);
5706
+ setChecked(checkValue !== null && checkValue !== void 0 ? checkValue : false);
5707
5707
  }, [checked, indeterminate, context]);
5708
5708
  return /*#__PURE__*/React__default.createElement(StyledCheckbox, _extends({
5709
5709
  id: id,
@@ -6311,15 +6311,15 @@ const InputTextArea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
6311
6311
  const textareaRef = useRef(null);
6312
6312
  useEffect(() => {
6313
6313
  if (textareaRef.current) {
6314
- textareaRef.current.style.height = '60px';
6315
- const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
6316
- textareaRef.current.style.height = scrollHeight + 20 + 'px';
6314
+ textareaRef.current.style.height = '50px';
6315
+ const scrollHeight = textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current.scrollHeight;
6316
+ textareaRef.current.style.height = scrollHeight + 5 + 'px';
6317
6317
  }
6318
6318
  }, []);
6319
6319
 
6320
6320
  function handleKeyDown(e) {
6321
- e.target.style.height = '60px';
6322
- e.target.style.height = `${e.target.scrollHeight + 20}px`;
6321
+ e.target.style.height = '50px';
6322
+ e.target.style.height = `${e.target.scrollHeight + 5}px`;
6323
6323
  }
6324
6324
 
6325
6325
  return /*#__PURE__*/React__default.createElement(StyledTextArea, _extends({
@@ -6354,7 +6354,7 @@ const InputRadioContext = /*#__PURE__*/React__default.createContext();
6354
6354
  var _jsxFileName$F = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputRadio\\InputRadioGroup.js";
6355
6355
  const RadioGroup = styled(RadioGroupPrimitive.Root, Flex$1);
6356
6356
  function InputRadioGroup(props) {
6357
- return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
6357
+ return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
6358
6358
  value: props,
6359
6359
  __self: this,
6360
6360
  __source: {
@@ -6369,7 +6369,7 @@ function InputRadioGroup(props) {
6369
6369
  lineNumber: 14,
6370
6370
  columnNumber: 9
6371
6371
  }
6372
- }), React__default.Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
6372
+ }), React__default.Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
6373
6373
  style: Object.assign({}, child.props.style, {
6374
6374
  opacity: 1
6375
6375
  })
@@ -6583,7 +6583,7 @@ const InputRadio = _ref => {
6583
6583
  value,
6584
6584
  outlined
6585
6585
  }) => {
6586
- const checked = value != null ? value : defaultValue;
6586
+ const checked = value !== null && value !== void 0 ? value : defaultValue;
6587
6587
  return /*#__PURE__*/React__default.createElement(Container$8, {
6588
6588
  direction: "column",
6589
6589
  outlined: outlined,
@@ -6833,7 +6833,7 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
6833
6833
  size: size,
6834
6834
  isInvalid: isInvalid,
6835
6835
  readOnly: readOnly,
6836
- isReadOnly: readOnly && !(props != null && props.inputGroup),
6836
+ isReadOnly: readOnly && !(props !== null && props !== void 0 && props.inputGroup),
6837
6837
  disabled: disabled
6838
6838
  }, props, {
6839
6839
  __self: undefined,
@@ -7649,18 +7649,18 @@ function TagsInput(_ref) {
7649
7649
  const addTags = event => {
7650
7650
  if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
7651
7651
  if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
7652
- onEnter == null ? void 0 : onEnter({
7652
+ onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7653
7653
  key: 'duplicate',
7654
7654
  value: event.target.value
7655
7655
  });
7656
7656
  return;
7657
7657
  }
7658
7658
 
7659
- if (pattern && pattern != null && pattern.regex) {
7659
+ if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
7660
7660
  const regex = new RegExp(pattern.regex);
7661
7661
 
7662
7662
  if (!regex.test(event.target.value)) {
7663
- onEnter == null ? void 0 : onEnter({
7663
+ onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7664
7664
  key: 'error',
7665
7665
  value: event.target.value
7666
7666
  });
@@ -7670,7 +7670,7 @@ function TagsInput(_ref) {
7670
7670
  }
7671
7671
 
7672
7672
  setRegexError(false);
7673
- onEnter == null ? void 0 : onEnter({
7673
+ onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7674
7674
  key: 'success',
7675
7675
  value: event.target.value
7676
7676
  });
@@ -7683,7 +7683,7 @@ function TagsInput(_ref) {
7683
7683
  if (disabled || readOnly) {
7684
7684
  return tags;
7685
7685
  } else if (key === 'removeTag' || key === 'Backspace') {
7686
- onRemoveItem == null ? void 0 : onRemoveItem(tags[index]);
7686
+ onRemoveItem === null || onRemoveItem === void 0 ? void 0 : onRemoveItem(tags[index]);
7687
7687
  setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
7688
7688
  }
7689
7689
  }; // const handleErrorMessage = () => {
@@ -7731,7 +7731,7 @@ function TagsInput(_ref) {
7731
7731
  lineNumber: 180,
7732
7732
  columnNumber: 9
7733
7733
  }
7734
- })), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
7734
+ })), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
7735
7735
  color: "red",
7736
7736
  __self: this,
7737
7737
  __source: {
@@ -8788,7 +8788,8 @@ function InputSelect(_a) {
8788
8788
  suppressRefError: true
8789
8789
  }), {
8790
8790
  css: {
8791
- display: isOpen ? 'block' : 'none'
8791
+ display: isOpen ? 'block' : 'none',
8792
+ zIndex: '$popover'
8792
8793
  },
8793
8794
  placement: placement
8794
8795
  }, {
@@ -9552,10 +9553,10 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9552
9553
  return setItems(sortValue);
9553
9554
  }
9554
9555
  } else {
9555
- let filterItems = option == null ? void 0 : option.filter(item => {
9556
- var _item$name, _item$name$toLowerCas;
9556
+ let filterItems = option === null || option === void 0 ? void 0 : option.filter(item => {
9557
+ var _item$name, _item$name$toLowerCas, _item$name$toLowerCas2, _input$toLocaleLowerC;
9557
9558
 
9558
- return item == null ? void 0 : (_item$name = item.name) == null ? void 0 : (_item$name$toLowerCas = _item$name.toLowerCase()) == null ? void 0 : _item$name$toLowerCas.includes == null ? void 0 : _item$name$toLowerCas.includes(input == null ? void 0 : input.toLocaleLowerCase == null ? void 0 : input.toLocaleLowerCase());
9559
+ return item === null || item === void 0 ? void 0 : (_item$name = item.name) === null || _item$name === void 0 ? void 0 : (_item$name$toLowerCas = _item$name.toLowerCase()) === null || _item$name$toLowerCas === void 0 ? void 0 : (_item$name$toLowerCas2 = _item$name$toLowerCas.includes) === null || _item$name$toLowerCas2 === void 0 ? void 0 : _item$name$toLowerCas2.call(_item$name$toLowerCas, input === null || input === void 0 ? void 0 : (_input$toLocaleLowerC = input.toLocaleLowerCase) === null || _input$toLocaleLowerC === void 0 ? void 0 : _input$toLocaleLowerC.call(input));
9559
9560
  });
9560
9561
  setItems(filterItems);
9561
9562
  }
@@ -9565,9 +9566,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9565
9566
  if (disabled || readOnly) {
9566
9567
  return selectedValue;
9567
9568
  } else {
9568
- if ((selected == null ? void 0 : selected.id) === 'counter') {
9569
+ if ((selected === null || selected === void 0 ? void 0 : selected.id) === 'counter') {
9569
9570
  setSelectedValue([]);
9570
- onChange == null ? void 0 : onChange([]);
9571
+ onChange === null || onChange === void 0 ? void 0 : onChange([]);
9571
9572
 
9572
9573
  for (let i = 0; i < selectedValue.length; i++) {
9573
9574
  removeSelectedItem(selectedValue[i]);
@@ -9578,7 +9579,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9578
9579
  setSelectedValue(filterItems);
9579
9580
 
9580
9581
  if (selected.id !== '!all') {
9581
- onChange == null ? void 0 : onChange(filterItems);
9582
+ onChange === null || onChange === void 0 ? void 0 : onChange(filterItems);
9582
9583
  }
9583
9584
  }
9584
9585
  }
@@ -9623,7 +9624,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9623
9624
  removeSelectedItem(item);
9624
9625
  });
9625
9626
  setSelectedValue([]);
9626
- onChange == null ? void 0 : onChange([]);
9627
+ onChange === null || onChange === void 0 ? void 0 : onChange([]);
9627
9628
  } else {
9628
9629
  removeItem(selectedItem);
9629
9630
  }
@@ -9638,12 +9639,12 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9638
9639
  itemIds.push(item.id);
9639
9640
  });
9640
9641
  setSelectedValue(itemIds);
9641
- onChange == null ? void 0 : onChange(itemIds.slice(1));
9642
+ onChange === null || onChange === void 0 ? void 0 : onChange(itemIds.slice(1));
9642
9643
  } else {
9643
9644
  addSelectedItem(selectedItem);
9644
9645
  setSelectedValue([...selectedValue, selectedItem.id]);
9645
9646
  const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
9646
- onChange == null ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
9647
+ onChange === null || onChange === void 0 ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
9647
9648
  }
9648
9649
 
9649
9650
  selectItem(null);
@@ -9795,7 +9796,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9795
9796
  lineNumber: 559,
9796
9797
  columnNumber: 11
9797
9798
  }
9798
- }, selectedItems == null ? void 0 : (_selectedItems$filter = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
9799
+ }, selectedItems === null || selectedItems === void 0 ? void 0 : (_selectedItems$filter = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter === void 0 ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
9799
9800
  disabled: disabled,
9800
9801
  isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
9801
9802
  size: size,
@@ -9819,7 +9820,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9819
9820
  lineNumber: 563,
9820
9821
  columnNumber: 17
9821
9822
  }
9822
- }), selectedItem.name))), showSelectedTag && showCounter && Boolean(selectedItems == null ? void 0 : selectedItems.length) && /*#__PURE__*/React__default.createElement(TagWrapper$1, {
9823
+ }), selectedItem.name))), showSelectedTag && showCounter && Boolean(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) && /*#__PURE__*/React__default.createElement(TagWrapper$1, {
9823
9824
  disabled: disabled,
9824
9825
  __self: undefined,
9825
9826
  __source: {
@@ -9832,7 +9833,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9832
9833
  maxWidth: '150px !important'
9833
9834
  },
9834
9835
  disabled: disabled,
9835
- isRemovable: readOnly || disabled || Boolean(selectedItems == null ? void 0 : selectedItems.length),
9836
+ isRemovable: readOnly || disabled || Boolean(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length),
9836
9837
  size: size,
9837
9838
  readOnly: readOnly // {...getSelectedItemProps({ selectedItem, index })}
9838
9839
  ,
@@ -9854,7 +9855,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9854
9855
  lineNumber: 586,
9855
9856
  columnNumber: 13
9856
9857
  }
9857
- }, `${selectedItems == null ? void 0 : selectedItems.length} ${labelCounter}`)), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
9858
+ }, `${selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length} ${labelCounter}`)), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
9858
9859
  placement: placement,
9859
9860
  css: {
9860
9861
  display: isOpen && disabled === false ? 'block' : 'none',
@@ -9922,7 +9923,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9922
9923
  lineNumber: 640,
9923
9924
  columnNumber: 27
9924
9925
  }
9925
- }), showSelectAll && (item == null ? void 0 : item.id) === '!all' && selectedValue != null && selectedValue.length && (selectedValue == null ? void 0 : selectedValue.length) < (items == null ? void 0 : items.length) ? /*#__PURE__*/React__default.createElement(IndeterminateFilled, {
9926
+ }), showSelectAll && (item === null || item === void 0 ? void 0 : item.id) === '!all' && selectedValue !== null && selectedValue !== void 0 && selectedValue.length && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) < (items === null || items === void 0 ? void 0 : items.length) ? /*#__PURE__*/React__default.createElement(IndeterminateFilled, {
9926
9927
  __self: undefined,
9927
9928
  __source: {
9928
9929
  fileName: _jsxFileName$v,
@@ -11166,8 +11167,8 @@ const PopoverContent = ({
11166
11167
  ref: floating,
11167
11168
  style: Object.assign({
11168
11169
  position: strategy,
11169
- top: isMobile ? 0 : y != null ? y : '',
11170
- left: isMobile ? 0 : x != null ? x : '',
11170
+ top: isMobile ? 0 : y !== null && y !== void 0 ? y : '',
11171
+ left: isMobile ? 0 : x !== null && x !== void 0 ? x : '',
11171
11172
  zIndex: zIndices.popover
11172
11173
  }, style)
11173
11174
  }), {
@@ -12400,7 +12401,7 @@ const NotificationBadge = _ref => {
12400
12401
  props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
12401
12402
 
12402
12403
  const getValue = () => {
12403
- let value = props == null ? void 0 : props.value;
12404
+ let value = props === null || props === void 0 ? void 0 : props.value;
12404
12405
 
12405
12406
  if (typeof value === 'number' || parseInt(value)) {
12406
12407
  if (Math.sign(value) === 1 || Math.sign(value) === 0) {
@@ -17148,7 +17149,7 @@ function PaginationInfo(_ref) {
17148
17149
  lineNumber: 40,
17149
17150
  columnNumber: 11
17150
17151
  }
17151
- }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
17152
+ }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
17152
17153
  key: limit,
17153
17154
  css: limitItemContainerStyle(selectedLimit === limit),
17154
17155
  onClick: () => onChange(limit),
@@ -17796,7 +17797,7 @@ const stickyPositionStyling = column => {
17796
17797
  return {};
17797
17798
  };
17798
17799
 
17799
- const stickyShadowStyling = column => {
17800
+ const stickyShadowStyling = (column, tableScrollPosition) => {
17800
17801
  const cssAfter = {
17801
17802
  position: 'absolute',
17802
17803
  top: 0,
@@ -17812,12 +17813,12 @@ const stickyShadowStyling = column => {
17812
17813
  return column.sticky === 'left' ? {
17813
17814
  '&::after': Object.assign(Object.assign({}, cssAfter), {
17814
17815
  right: 0,
17815
- boxShadow: 'inset 10px 0 10px -10px #00000026'
17816
+ boxShadow: tableScrollPosition === 'start' ? 'none' : 'inset 10px 0 10px -10px #00000026'
17816
17817
  })
17817
17818
  } : {
17818
17819
  '&::after': Object.assign(Object.assign({}, cssAfter), {
17819
17820
  left: 0,
17820
- boxShadow: 'inset -10px 0 10px -10px #00000026'
17821
+ boxShadow: tableScrollPosition === 'end' ? 'none' : 'inset -10px 0 10px -10px #00000026'
17821
17822
  })
17822
17823
  };
17823
17824
  }
@@ -17872,6 +17873,8 @@ function Table({
17872
17873
  }) {
17873
17874
  const [limit, setLimit] = useState(rowLimit);
17874
17875
  const [dataRow, setDataRow] = useState({});
17876
+ const [tableScrollPosition, setTableScrollPosition] = useState('start');
17877
+ const [scrollAreaWidth, setScrollAreaWidth] = useState(0);
17875
17878
 
17876
17879
  const getInitialState = () => {
17877
17880
  const initialState = {};
@@ -17905,6 +17908,8 @@ function Table({
17905
17908
  autoResetSelectedRows: false,
17906
17909
  getRowId: showDuplicatedData ? undefined : row => row[keyId] || JSON.stringify(row)
17907
17910
  }, useSortBy, useExpanded, usePagination, useRowSelect, useSticky, useColumnOrder);
17911
+ const scrollerRef = useRef(null);
17912
+ const isMobile = useMediaQuery(isMobileLayout === undefined ? '(max-width: 1024px)' : isMobileLayout ? '(max-width: 8000px)' : '(max-width: 0px)');
17908
17913
  const {
17909
17914
  getTableProps,
17910
17915
  getTableBodyProps,
@@ -17936,9 +17941,6 @@ function Table({
17936
17941
  if (fetchData) fetchData(fetchParams);
17937
17942
  };
17938
17943
 
17939
- const scrollerRef = useRef(null);
17940
- const isMobile = useMediaQuery(isMobileLayout === undefined ? '(max-width: 1024px)' : isMobileLayout ? '(max-width: 8000px)' : '(max-width: 0px)');
17941
-
17942
17944
  const renderFooter = () => jsx(Pagination, {
17943
17945
  limit: pageSize,
17944
17946
  currentPage: pageIndex + 1,
@@ -17980,43 +17982,6 @@ function Table({
17980
17982
  children: children
17981
17983
  }), void 0);
17982
17984
 
17983
- useEffect(() => {
17984
- if (hiddenColumns) setHiddenColumns(hiddenColumns);
17985
- }, [hiddenColumns]);
17986
- useEffect(() => {
17987
- if (columnOrder) setColumnOrder(columnOrder);
17988
- }, [columnOrder]);
17989
- useEffect(() => {
17990
- setPageSize(rowLimit);
17991
- }, [rowLimit]);
17992
- useEffect(() => {
17993
- gotoPage(controlledPageIndex);
17994
- }, [controlledPageIndex]);
17995
- useEffect(() => {
17996
- if (data && data.length > 0) doFetchData(0, isInfiniteScroll ? rowLimit : pageSize);
17997
- }, [sortBy]);
17998
- useMountedLayoutEffect(() => {
17999
- if (data && data.length > 0 && selectedRowIds && onSelectedChange) onSelectedChange(selectedRowIds ? Object.keys(selectedRowIds) : []);
18000
- }, [selectedRowIds]);
18001
- useEffect(() => {
18002
- var _a;
18003
-
18004
- if (isInfiniteScroll && data.length <= rowLimit) {
18005
- (_a = scrollerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
18006
- top: 0
18007
- });
18008
- }
18009
- }, [data]);
18010
- useEffect(() => {
18011
- if (selectedIds && data.length > 0) {
18012
- const selectedIdsKeys = Object.keys(selectedIds);
18013
- selectedIdsKeys.map(key => {
18014
- toggleRowSelected(key, true);
18015
- return key;
18016
- });
18017
- }
18018
- }, [data, selectedIds]);
18019
-
18020
17985
  const getOptionsMenu = () => {
18021
17986
  var _a, _b;
18022
17987
 
@@ -18064,6 +18029,47 @@ function Table({
18064
18029
  setDataRow(row);
18065
18030
  };
18066
18031
 
18032
+ useLayoutEffect(() => {
18033
+ if (scrollerRef && scrollerRef.current) {
18034
+ setScrollAreaWidth(scrollerRef.current.scrollWidth - scrollerRef.current.clientWidth);
18035
+ }
18036
+ }, [scrollerRef]);
18037
+ useEffect(() => {
18038
+ if (hiddenColumns) setHiddenColumns(hiddenColumns);
18039
+ }, [hiddenColumns]);
18040
+ useEffect(() => {
18041
+ if (columnOrder) setColumnOrder(columnOrder);
18042
+ }, [columnOrder]);
18043
+ useEffect(() => {
18044
+ setPageSize(rowLimit);
18045
+ }, [rowLimit]);
18046
+ useEffect(() => {
18047
+ gotoPage(controlledPageIndex);
18048
+ }, [controlledPageIndex]);
18049
+ useEffect(() => {
18050
+ if (data && data.length > 0) doFetchData(0, isInfiniteScroll ? rowLimit : pageSize);
18051
+ }, [sortBy]);
18052
+ useMountedLayoutEffect(() => {
18053
+ if (data && data.length > 0 && selectedRowIds && onSelectedChange) onSelectedChange(selectedRowIds ? Object.keys(selectedRowIds) : []);
18054
+ }, [selectedRowIds]);
18055
+ useEffect(() => {
18056
+ var _a;
18057
+
18058
+ if (isInfiniteScroll && data.length <= rowLimit) {
18059
+ (_a = scrollerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
18060
+ top: 0
18061
+ });
18062
+ }
18063
+ }, [data]);
18064
+ useEffect(() => {
18065
+ if (selectedIds && data.length > 0) {
18066
+ const selectedIdsKeys = Object.keys(selectedIds);
18067
+ selectedIdsKeys.map(key => {
18068
+ toggleRowSelected(key, true);
18069
+ return key;
18070
+ });
18071
+ }
18072
+ }, [data, selectedIds]);
18067
18073
  return jsxs(Box, Object.assign({
18068
18074
  css: {
18069
18075
  position: 'relative',
@@ -18093,7 +18099,18 @@ function Table({
18093
18099
  }), void 0), !isMobile ? jsxs(Fragment, {
18094
18100
  children: [jsxs(TableContainer$3, Object.assign({
18095
18101
  css: css,
18096
- ref: scrollerRef
18102
+ ref: scrollerRef,
18103
+ onScroll: e => {
18104
+ const scrollPosition = e.currentTarget.scrollLeft;
18105
+
18106
+ if (scrollPosition < 3) {
18107
+ setTableScrollPosition('start');
18108
+ } else if (scrollPosition > scrollAreaWidth - 3) {
18109
+ setTableScrollPosition('end');
18110
+ } else {
18111
+ setTableScrollPosition('between');
18112
+ }
18113
+ }
18097
18114
  }, {
18098
18115
  children: [renderInfiniteScrollWrapper(jsxs(TableContent$3, Object.assign({}, getTableProps(), {
18099
18116
  children: [jsx(TableHead$3, Object.assign({
@@ -18113,7 +18130,7 @@ function Table({
18113
18130
  minWidth: column.colMinWidth
18114
18131
  }
18115
18132
  }]), {
18116
- css: Object.assign(Object.assign({}, stickyPositionStyling(column)), stickyShadowStyling(column))
18133
+ css: Object.assign(Object.assign({}, stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition))
18117
18134
  }, {
18118
18135
  children: typeof headerRender === 'string' ? jsx(TableHeaderCellContainer, Object.assign({
18119
18136
  isSortedDesc: column.isSortedDesc,
@@ -18168,7 +18185,7 @@ function Table({
18168
18185
  padding: !isContextMenu || ['expander', 'selection', 'menu', 'eye'].includes((_a = cell === null || cell === void 0 ? void 0 : cell.column) === null || _a === void 0 ? void 0 : _a.id) ? cell.column.accessor ? '20px 8px' : '20px 20px' : '',
18169
18186
  verticalAlign: cell.column.accessor ? cellAlign : 'center',
18170
18187
  cursor: onRowClick ? 'pointer' : 'unset'
18171
- }, stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column)),
18188
+ }, stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition)),
18172
18189
  onClick: () => handleRowClick(row, i)
18173
18190
  }, {
18174
18191
  children: jsx(ConditionalWrapper, Object.assign({
@@ -19726,7 +19743,7 @@ const TemplateAlertFunction = props => {
19726
19743
  if (!props.onOpenAutoFocus) {
19727
19744
  e.preventDefault();
19728
19745
  } else {
19729
- props == null ? void 0 : props.onOpenAutoFocus();
19746
+ props === null || props === void 0 ? void 0 : props.onOpenAutoFocus();
19730
19747
  }
19731
19748
  },
19732
19749
  __self: undefined,
@@ -19847,8 +19864,8 @@ const TemplateAlertFunction = props => {
19847
19864
  size: "sm",
19848
19865
  onClick: buttonConfirm,
19849
19866
  buttonType: props.dialogType,
19850
- disabled: props == null ? void 0 : props.disabledButton
19851
- }, props == null ? void 0 : props.actionButtonProps, {
19867
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
19868
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
19852
19869
  __self: undefined,
19853
19870
  __source: {
19854
19871
  fileName: _jsxFileName$b,
@@ -19867,12 +19884,12 @@ const TemplateAlertFunction = props => {
19867
19884
  size: "sm",
19868
19885
  onClick: buttonCancel,
19869
19886
  css: {
19870
- color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$gray900 !important',
19887
+ color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$gray900 !important',
19871
19888
  flex: props.isMobile && 1
19872
19889
  },
19873
19890
  buttonType: "ghost",
19874
- disabled: props == null ? void 0 : props.disabledButton
19875
- }, props == null ? void 0 : props.cancelButtonProps, {
19891
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
19892
+ }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
19876
19893
  __self: undefined,
19877
19894
  __source: {
19878
19895
  fileName: _jsxFileName$b,
@@ -19894,8 +19911,8 @@ const TemplateAlertFunction = props => {
19894
19911
  css: {
19895
19912
  flex: props.isMobile && 1
19896
19913
  },
19897
- disabled: props == null ? void 0 : props.disabledButton
19898
- }, props == null ? void 0 : props.actionButtonProps, {
19914
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
19915
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
19899
19916
  __self: undefined,
19900
19917
  __source: {
19901
19918
  fileName: _jsxFileName$b,
@@ -20055,8 +20072,8 @@ function AlertDialog(props) {
20055
20072
  css: {
20056
20073
  flex: props.isMobile && 1
20057
20074
  },
20058
- disabled: props == null ? void 0 : props.disabledButton
20059
- }, props == null ? void 0 : props.actionButtonProps, {
20075
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
20076
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
20060
20077
  __self: this,
20061
20078
  __source: {
20062
20079
  fileName: _jsxFileName$b,
@@ -20075,12 +20092,12 @@ function AlertDialog(props) {
20075
20092
  size: "sm",
20076
20093
  onClick: props.onCancel,
20077
20094
  css: {
20078
- color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$gray900 !important',
20095
+ color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$gray900 !important',
20079
20096
  flex: props.isMobile && 1
20080
20097
  },
20081
20098
  buttonType: "ghost",
20082
- disabled: props == null ? void 0 : props.disabledButton
20083
- }, props == null ? void 0 : props.cancelButtonProps, {
20099
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
20100
+ }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
20084
20101
  __self: this,
20085
20102
  __source: {
20086
20103
  fileName: _jsxFileName$b,
@@ -20102,8 +20119,8 @@ function AlertDialog(props) {
20102
20119
  css: {
20103
20120
  flex: props.isMobile && 1
20104
20121
  },
20105
- disabled: props == null ? void 0 : props.disabledButton
20106
- }, props == null ? void 0 : props.actionButtonProps, {
20122
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
20123
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
20107
20124
  __self: this,
20108
20125
  __source: {
20109
20126
  fileName: _jsxFileName$b,
@@ -22585,7 +22602,7 @@ const Upload = ({
22585
22602
  upload({
22586
22603
  url: action,
22587
22604
  file: newFile,
22588
- customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
22605
+ customBody: customBodyRequest === null || customBodyRequest === void 0 ? void 0 : customBodyRequest(newFile),
22589
22606
  token,
22590
22607
  tokenKey,
22591
22608
  reqKey,
@@ -22608,12 +22625,12 @@ const Upload = ({
22608
22625
  }
22609
22626
  }
22610
22627
 
22611
- onChange == null ? void 0 : (_onChange = onChange({
22628
+ onChange === null || onChange === void 0 ? void 0 : (_onChange = onChange({
22612
22629
  fileList: arrProgress,
22613
22630
  file: fileProgress,
22614
22631
  indexReplace: indexReplace.current,
22615
22632
  isReplace: indexReplace.current !== null
22616
- })) == null ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) == null ? void 0 : _onChange$then.catch(error => setError(error.message));
22633
+ })) === null || _onChange === void 0 ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) === null || _onChange$then === void 0 ? void 0 : _onChange$then.catch(error => setError(error.message));
22617
22634
  }
22618
22635
  }).then(result => {
22619
22636
  var _onChange2, _onChange2$then;
@@ -22630,12 +22647,12 @@ const Upload = ({
22630
22647
  }
22631
22648
  }
22632
22649
 
22633
- onChange == null ? void 0 : (_onChange2 = onChange({
22650
+ onChange === null || onChange === void 0 ? void 0 : (_onChange2 = onChange({
22634
22651
  fileList: arrSuccess,
22635
22652
  file: fileSuccess,
22636
22653
  indexReplace: indexReplace.current,
22637
22654
  isReplace: indexReplace.current !== null
22638
- })) == null ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) == null ? void 0 : _onChange2$then.catch(error => setError(error.message));
22655
+ })) === null || _onChange2 === void 0 ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) === null || _onChange2$then === void 0 ? void 0 : _onChange2$then.catch(error => setError(error.message));
22639
22656
  }).catch(error => {
22640
22657
  var _onChange3, _onChange3$then;
22641
22658
 
@@ -22651,22 +22668,22 @@ const Upload = ({
22651
22668
  }
22652
22669
  }
22653
22670
 
22654
- onChange == null ? void 0 : (_onChange3 = onChange({
22671
+ onChange === null || onChange === void 0 ? void 0 : (_onChange3 = onChange({
22655
22672
  fileList: arrError,
22656
22673
  file: fileError,
22657
22674
  indexReplace: indexReplace.current,
22658
22675
  isReplace: indexReplace.current !== null
22659
- })) == null ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) == null ? void 0 : _onChange3$then.catch(error => setError(error.message));
22676
+ })) === null || _onChange3 === void 0 ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) === null || _onChange3$then === void 0 ? void 0 : _onChange3$then.catch(error => setError(error.message));
22660
22677
  });
22661
22678
  } else {
22662
22679
  var _onChange4, _onChange4$then;
22663
22680
 
22664
- onChange == null ? void 0 : (_onChange4 = onChange({
22681
+ onChange === null || onChange === void 0 ? void 0 : (_onChange4 = onChange({
22665
22682
  fileList: arrFile,
22666
22683
  file: newFile,
22667
22684
  indexReplace: indexReplace.current,
22668
22685
  isReplace: indexReplace.current !== null
22669
- })) == null ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) == null ? void 0 : _onChange4$then.catch(error => setError(error.message));
22686
+ })) === null || _onChange4 === void 0 ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) === null || _onChange4$then === void 0 ? void 0 : _onChange4$then.catch(error => setError(error.message));
22670
22687
  }
22671
22688
 
22672
22689
  if (indexReplace.current !== null) {
@@ -22691,24 +22708,24 @@ const Upload = ({
22691
22708
  // program to get the dimensions of an image
22692
22709
  const img = document.createElement('img');
22693
22710
  img.src = URL.createObjectURL(files[0]);
22694
- img.size = files == null ? void 0 : (_files$ = files[0]) == null ? void 0 : _files$.size;
22695
- img.type = files == null ? void 0 : (_files$2 = files[0]) == null ? void 0 : _files$2.type;
22711
+ img.size = files === null || files === void 0 ? void 0 : (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size;
22712
+ img.type = files === null || files === void 0 ? void 0 : (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.type;
22696
22713
 
22697
22714
  img.onload = () => {
22698
22715
  var _onBeforeCrop, _onBeforeCrop$then;
22699
22716
 
22700
- onBeforeCrop == null ? void 0 : (_onBeforeCrop = onBeforeCrop(img)) == null ? void 0 : (_onBeforeCrop$then = _onBeforeCrop.then(() => {
22717
+ onBeforeCrop === null || onBeforeCrop === void 0 ? void 0 : (_onBeforeCrop = onBeforeCrop(img)) === null || _onBeforeCrop === void 0 ? void 0 : (_onBeforeCrop$then = _onBeforeCrop.then(() => {
22701
22718
  setError(null);
22702
22719
  toggleModal();
22703
22720
  setFileState(files[0]);
22704
22721
  setPreviewImage(URL.createObjectURL(files[0]));
22705
- })) == null ? void 0 : _onBeforeCrop$then.catch(error => setError(error == null ? void 0 : error.message));
22722
+ })) === null || _onBeforeCrop$then === void 0 ? void 0 : _onBeforeCrop$then.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
22706
22723
  };
22707
22724
 
22708
22725
  img.onerror = error => {
22709
22726
  var _onBeforeCrop2, _onBeforeCrop2$then;
22710
22727
 
22711
- onBeforeCrop == null ? void 0 : (_onBeforeCrop2 = onBeforeCrop(img, error)) == null ? void 0 : (_onBeforeCrop2$then = _onBeforeCrop2.then(() => setError(null))) == null ? void 0 : _onBeforeCrop2$then.catch(error => setError(error == null ? void 0 : error.message));
22728
+ onBeforeCrop === null || onBeforeCrop === void 0 ? void 0 : (_onBeforeCrop2 = onBeforeCrop(img, error)) === null || _onBeforeCrop2 === void 0 ? void 0 : (_onBeforeCrop2$then = _onBeforeCrop2.then(() => setError(null))) === null || _onBeforeCrop2$then === void 0 ? void 0 : _onBeforeCrop2$then.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
22712
22729
  };
22713
22730
  } else {
22714
22731
  toggleModal();
@@ -22720,15 +22737,15 @@ const Upload = ({
22720
22737
  }
22721
22738
 
22722
22739
  function handleCrop() {
22723
- if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
22740
+ if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
22724
22741
  imgPreview(imgRef.current, completedCrop, 1, 0, ratio).then(blob => {
22725
- const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
22742
+ const sizeMB = (blob === null || blob === void 0 ? void 0 : blob.size) / 1024 / 1024;
22726
22743
 
22727
22744
  if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
22728
22745
  var _fileState$name;
22729
22746
 
22730
- const file = new File([blob], (fileState == null ? void 0 : (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
22731
- type: blob == null ? void 0 : blob.type
22747
+ const file = new File([blob], (fileState === null || fileState === void 0 ? void 0 : (_fileState$name = fileState.name) === null || _fileState$name === void 0 ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
22748
+ type: blob === null || blob === void 0 ? void 0 : blob.type
22732
22749
  });
22733
22750
  handleUpload([file]);
22734
22751
  setCrop(null);
@@ -22743,17 +22760,17 @@ const Upload = ({
22743
22760
  }).then(compressedFile => {
22744
22761
  var _fileState$name2;
22745
22762
 
22746
- const file = new File([compressedFile], (fileState == null ? void 0 : (_fileState$name2 = fileState.name) == null ? void 0 : _fileState$name2.replace(/\.[^/.]+$/, '')) + '.png', {
22747
- type: compressedFile == null ? void 0 : compressedFile.type
22763
+ const file = new File([compressedFile], (fileState === null || fileState === void 0 ? void 0 : (_fileState$name2 = fileState.name) === null || _fileState$name2 === void 0 ? void 0 : _fileState$name2.replace(/\.[^/.]+$/, '')) + '.png', {
22764
+ type: compressedFile === null || compressedFile === void 0 ? void 0 : compressedFile.type
22748
22765
  });
22749
22766
  handleUpload([file]);
22750
22767
  setCrop(null);
22751
22768
  setCompletedCrop(null);
22752
- }).catch(error => console.error(error == null ? void 0 : error.message));
22769
+ }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
22753
22770
  }
22754
22771
 
22755
22772
  toggleModal();
22756
- }).catch(error => console.error(error == null ? void 0 : error.message));
22773
+ }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
22757
22774
  } else {
22758
22775
  handleUpload([fileState]);
22759
22776
  toggleModal();
@@ -22784,7 +22801,7 @@ const Upload = ({
22784
22801
  const index = fileList.indexOf(file);
22785
22802
  const newFileList = fileList.slice();
22786
22803
  newFileList.splice(index, 1);
22787
- onChange == null ? void 0 : onChange({
22804
+ onChange === null || onChange === void 0 ? void 0 : onChange({
22788
22805
  fileList: newFileList,
22789
22806
  file
22790
22807
  });
@@ -22812,22 +22829,22 @@ const Upload = ({
22812
22829
  function handleOpenFile(file) {
22813
22830
  var _String, _file$name;
22814
22831
 
22815
- let extension = (_String = String(file == null ? void 0 : (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
22832
+ let extension = (_String = String(file === null || file === void 0 ? void 0 : (_file$name = file.name) === null || _file$name === void 0 ? void 0 : _file$name.split('.').pop())) === null || _String === void 0 ? void 0 : _String.toLowerCase();
22816
22833
 
22817
22834
  if (extension === 'pdf') {
22818
- window.open(file == null ? void 0 : file.url);
22835
+ window.open(file === null || file === void 0 ? void 0 : file.url);
22819
22836
  } else {
22820
- request.get(file == null ? void 0 : file.url).end((err, res) => {
22837
+ request.get(file === null || file === void 0 ? void 0 : file.url).end((err, res) => {
22821
22838
  if (err) {
22822
22839
  console.error(err.message);
22823
22840
  }
22824
22841
 
22825
- if (res && res != null && res.ok) {
22826
- const response = res == null ? void 0 : res.text;
22842
+ if (res && res !== null && res !== void 0 && res.ok) {
22843
+ const response = res === null || res === void 0 ? void 0 : res.text;
22827
22844
  const url = window.URL.createObjectURL(new Blob([response]));
22828
22845
  const link = document.createElement('a');
22829
22846
  link.href = url;
22830
- link.setAttribute('download', file == null ? void 0 : file.name);
22847
+ link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
22831
22848
  document.body.appendChild(link);
22832
22849
  link.click();
22833
22850
  document.body.removeChild(link);
@@ -22897,12 +22914,12 @@ const Upload = ({
22897
22914
  }
22898
22915
 
22899
22916
  const renderPicture = () => {
22900
- return fileList == null ? void 0 : fileList.map((item, index) => {
22901
- if ((item == null ? void 0 : item.status) === 'uploading') {
22917
+ return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
22918
+ if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
22902
22919
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
22903
22920
  key: index,
22904
- progress: item == null ? void 0 : item.percent,
22905
- loading: item == null ? void 0 : item.loading,
22921
+ progress: item === null || item === void 0 ? void 0 : item.percent,
22922
+ loading: item === null || item === void 0 ? void 0 : item.loading,
22906
22923
  __self: undefined,
22907
22924
  __source: {
22908
22925
  fileName: _jsxFileName$9,
@@ -22977,14 +22994,14 @@ const Upload = ({
22977
22994
  };
22978
22995
 
22979
22996
  const renderFile = () => {
22980
- return fileList == null ? void 0 : fileList.map((item, index) => {
22997
+ return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
22981
22998
  var _item$name;
22982
22999
 
22983
- if ((item == null ? void 0 : item.status) === 'uploading') {
23000
+ if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
22984
23001
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
22985
23002
  key: index,
22986
- progress: item == null ? void 0 : item.percent,
22987
- loading: item == null ? void 0 : item.loading,
23003
+ progress: item === null || item === void 0 ? void 0 : item.percent,
23004
+ loading: item === null || item === void 0 ? void 0 : item.loading,
22988
23005
  __self: undefined,
22989
23006
  __source: {
22990
23007
  fileName: _jsxFileName$9,
@@ -23051,7 +23068,7 @@ const Upload = ({
23051
23068
  lineNumber: 661,
23052
23069
  columnNumber: 17
23053
23070
  }
23054
- }, ".", item == null ? void 0 : (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
23071
+ }, ".", item === null || item === void 0 ? void 0 : (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
23055
23072
  label: item.name,
23056
23073
  __self: undefined,
23057
23074
  __source: {
@@ -23223,7 +23240,7 @@ const Upload = ({
23223
23240
  lineNumber: 736,
23224
23241
  columnNumber: 11
23225
23242
  }
23226
- }, children != null ? children : /*#__PURE__*/React__default.createElement(React__default.Fragment, {
23243
+ }, children !== null && children !== void 0 ? children : /*#__PURE__*/React__default.createElement(React__default.Fragment, {
23227
23244
  __self: this,
23228
23245
  __source: {
23229
23246
  fileName: _jsxFileName$9,
@@ -23257,7 +23274,7 @@ const Upload = ({
23257
23274
  lineNumber: 742,
23258
23275
  columnNumber: 17
23259
23276
  }
23260
- }, placeholder != null ? placeholder : `Pilih atau letakkan berkas di sini`)))), error && /*#__PURE__*/React__default.createElement(ErrorMessage, {
23277
+ }, placeholder !== null && placeholder !== void 0 ? placeholder : `Pilih atau letakkan berkas di sini`)))), error && /*#__PURE__*/React__default.createElement(ErrorMessage, {
23261
23278
  __self: this,
23262
23279
  __source: {
23263
23280
  fileName: _jsxFileName$9,
@@ -23417,7 +23434,7 @@ const Upload = ({
23417
23434
 
23418
23435
  return /*#__PURE__*/React__default.createElement(Flex$1, {
23419
23436
  direction: "row",
23420
- gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
23437
+ gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
23421
23438
  wrap: "wrap",
23422
23439
  css: {
23423
23440
  userSelect: 'none'
@@ -23674,6 +23691,8 @@ const CardMessage = styled('div', {
23674
23691
  color: '$textPrimary',
23675
23692
  fontSize: 12,
23676
23693
  fontWeight: 400,
23694
+ overflowWrap: 'break-word',
23695
+ wordWrap: 'break-word',
23677
23696
  variants: {
23678
23697
  variant: {
23679
23698
  sms: {
@@ -23901,8 +23920,7 @@ const Device = props => {
23901
23920
  border: 'none',
23902
23921
  width: '100%',
23903
23922
  height: '100%',
23904
- overflow: 'hidden',
23905
- zIndex: 1
23923
+ zIndex: 3
23906
23924
  }
23907
23925
  }, {
23908
23926
  children: jsxs(Box, Object.assign({
@@ -23915,13 +23933,29 @@ const Device = props => {
23915
23933
  height: "100%",
23916
23934
  objectFit: props.typeDevice === 'android' ? 'fill' : 'cover',
23917
23935
  src: img$g,
23918
- alt: "whatsapp-preview"
23936
+ alt: "whatsapp-preview",
23937
+ css: {
23938
+ borderRadius: 8
23939
+ }
23919
23940
  }, void 0), jsx(Box, Object.assign({
23941
+ className: "mobile-scrollbar",
23920
23942
  css: {
23921
23943
  position: 'absolute',
23922
23944
  right: '5%',
23923
23945
  bottom: '12%',
23924
- left: '10%'
23946
+ left: '10%',
23947
+ top: '10%',
23948
+ overflow: 'auto',
23949
+ '&::-webkit-scrollbar': {
23950
+ width: 3
23951
+ },
23952
+ '&::-webkit-scrollbar-track': {
23953
+ boxShadow: 'inset 0 0 6px $gray200'
23954
+ },
23955
+ '&::-webkit-scrollbar-thumb': {
23956
+ backgroundColor: '$gray150',
23957
+ outline: '1px solid $gray150'
23958
+ }
23925
23959
  }
23926
23960
  }, {
23927
23961
  children: typeof (content === null || content === void 0 ? void 0 : content.message) === 'string' ? jsx(CardMessage, Object.assign({
@@ -24037,7 +24071,9 @@ const Device = props => {
24037
24071
  css: {
24038
24072
  fontSize: 12,
24039
24073
  color: '$textPrimary',
24040
- lineHeight: '16px'
24074
+ lineHeight: '16px',
24075
+ overflowWrap: 'break-word',
24076
+ wordWrap: 'break-word'
24041
24077
  }
24042
24078
  }, {
24043
24079
  children: typeof (content === null || content === void 0 ? void 0 : content.message) === 'string' ? content === null || content === void 0 ? void 0 : content.message : (_f = content === null || content === void 0 ? void 0 : content.message) === null || _f === void 0 ? void 0 : _f.call(content)
@@ -24136,7 +24172,9 @@ const Device = props => {
24136
24172
  css: {
24137
24173
  fontSize: 9,
24138
24174
  color: '$textSecondary',
24139
- lineHeight: '14px !important'
24175
+ lineHeight: '14px !important',
24176
+ overflowWrap: 'break-word',
24177
+ wordWrap: 'break-word'
24140
24178
  }
24141
24179
  }, {
24142
24180
  children: typeof (content === null || content === void 0 ? void 0 : content.message) === 'string' ? content === null || content === void 0 ? void 0 : content.message : (_j = content === null || content === void 0 ? void 0 : content.message) === null || _j === void 0 ? void 0 : _j.call(content)
@@ -24180,7 +24218,7 @@ const Device = props => {
24180
24218
  style: {
24181
24219
  width: props.size ? props.size : undefined,
24182
24220
  position: 'relative',
24183
- zIndex: withComponent ? 1 : 2
24221
+ zIndex: withComponent || (props === null || props === void 0 ? void 0 : props.variant) === 'whatsapp' ? 1 : 2
24184
24222
  },
24185
24223
  src: properties.typeDevice,
24186
24224
  alt: "device-preview"
@@ -24243,10 +24281,10 @@ function InputColorPicker(props) {
24243
24281
  const [isPopover, setIsPopover] = useState(false);
24244
24282
 
24245
24283
  function getColor() {
24246
- const color = props == null ? void 0 : props.color;
24284
+ const color = props === null || props === void 0 ? void 0 : props.color;
24247
24285
 
24248
24286
  if (typeof color === 'string') {
24249
- return color == null ? void 0 : color.toUpperCase();
24287
+ return color === null || color === void 0 ? void 0 : color.toUpperCase();
24250
24288
  }
24251
24289
 
24252
24290
  return `rgba(${color.r},${color.g},${color.b},${color.a})`;
@@ -27218,9 +27256,9 @@ const Navigation = props => {
27218
27256
  lineNumber: 120,
27219
27257
  columnNumber: 30
27220
27258
  }
27221
- }), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data = data[i - 1]).title) == null ? void 0 : _data$title.call(_data), ((_data2 = data[i - 1]) == null ? void 0 : _data2.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
27259
+ }), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data = data[i - 1]).title) === null || _data$title === void 0 ? void 0 : _data$title.call(_data), ((_data2 = data[i - 1]) === null || _data2 === void 0 ? void 0 : _data2.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
27222
27260
  align: "center",
27223
- label: (_data3 = data[i - 1]) == null ? void 0 : _data3.tooltipsContents,
27261
+ label: (_data3 = data[i - 1]) === null || _data3 === void 0 ? void 0 : _data3.tooltipsContents,
27224
27262
  __self: undefined,
27225
27263
  __source: {
27226
27264
  fileName: _jsxFileName$4,
@@ -27239,9 +27277,9 @@ const Navigation = props => {
27239
27277
  lineNumber: 124,
27240
27278
  columnNumber: 19
27241
27279
  }
27242
- })), ((_data4 = data[i - 1]) == null ? void 0 : _data4.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
27280
+ })), ((_data4 = data[i - 1]) === null || _data4 === void 0 ? void 0 : _data4.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
27243
27281
  css: {
27244
- marginLeft: (_data5 = data[i - 1]) != null && _data5.withTolltip ? 0 : '$spacing-03'
27282
+ marginLeft: (_data5 = data[i - 1]) !== null && _data5 !== void 0 && _data5.withTolltip ? 0 : '$spacing-03'
27245
27283
  },
27246
27284
  align: "center",
27247
27285
  __self: undefined,
@@ -27293,7 +27331,7 @@ const Navigation = props => {
27293
27331
  height: 24,
27294
27332
  borderRadius: '$round',
27295
27333
  border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
27296
- backgroundColor: (_data6 = data[i - 1]) != null && _data6.disabled ? '$gray200' : '$white'
27334
+ backgroundColor: (_data6 = data[i - 1]) !== null && _data6 !== void 0 && _data6.disabled ? '$gray200' : '$white'
27297
27335
  },
27298
27336
  __self: undefined,
27299
27337
  __source: {
@@ -27311,10 +27349,10 @@ const Navigation = props => {
27311
27349
  lineNumber: 163,
27312
27350
  columnNumber: 15
27313
27351
  }
27314
- }, isActive ? typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data7 = data[i - 1]).title) == null ? void 0 : _data$title2.call(_data7) : ''), isActive && ((_data8 = data[i - 1]) == null ? void 0 : _data8.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
27352
+ }, isActive ? typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data7 = data[i - 1]).title) === null || _data$title2 === void 0 ? void 0 : _data$title2.call(_data7) : ''), isActive && ((_data8 = data[i - 1]) === null || _data8 === void 0 ? void 0 : _data8.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
27315
27353
  align: "center",
27316
27354
  withClick: true,
27317
- label: (_data9 = data[i - 1]) == null ? void 0 : _data9.tooltipsContents,
27355
+ label: (_data9 = data[i - 1]) === null || _data9 === void 0 ? void 0 : _data9.tooltipsContents,
27318
27356
  __self: undefined,
27319
27357
  __source: {
27320
27358
  fileName: _jsxFileName$4,
@@ -27330,11 +27368,11 @@ const Navigation = props => {
27330
27368
  lineNumber: 168,
27331
27369
  columnNumber: 19
27332
27370
  }
27333
- })), isActive && ((_data10 = data[i - 1]) == null ? void 0 : _data10.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
27371
+ })), isActive && ((_data10 = data[i - 1]) === null || _data10 === void 0 ? void 0 : _data10.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
27334
27372
  align: "center",
27335
27373
  justify: "center",
27336
27374
  css: {
27337
- marginTop: (_data11 = data[i - 1]) != null && _data11.withTolltip ? 0 : '$spacing-03'
27375
+ marginTop: (_data11 = data[i - 1]) !== null && _data11 !== void 0 && _data11.withTolltip ? 0 : '$spacing-03'
27338
27376
  },
27339
27377
  __self: undefined,
27340
27378
  __source: {
@@ -27416,7 +27454,9 @@ const Default = props => {
27416
27454
  }));
27417
27455
  }, [props.hide]);
27418
27456
  useEffect(() => {
27419
- props == null ? void 0 : props.onChangeVisibility == null ? void 0 : props.onChangeVisibility(state.hide);
27457
+ var _props$onChangeVisibi;
27458
+
27459
+ props === null || props === void 0 ? void 0 : (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 ? void 0 : _props$onChangeVisibi.call(props, state.hide);
27420
27460
  }, [state.hide]);
27421
27461
 
27422
27462
  const toogleVisibility = value => {
@@ -27428,13 +27468,13 @@ const Default = props => {
27428
27468
  const getIsComplete = currentStep => {
27429
27469
  var _state$isComplete;
27430
27470
 
27431
- return state == null ? void 0 : (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
27471
+ return state === null || state === void 0 ? void 0 : (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
27432
27472
  };
27433
27473
 
27434
27474
  const getTitleStep = currentStep => {
27435
27475
  var _props$navContents, _props$navContents2;
27436
27476
 
27437
- return props == null ? void 0 : (_props$navContents = props.navContents) == null ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents2.title;
27477
+ return props === null || props === void 0 ? void 0 : (_props$navContents = props.navContents) === null || _props$navContents === void 0 ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) === null || _props$navContents2 === void 0 ? void 0 : _props$navContents2.title;
27438
27478
  };
27439
27479
 
27440
27480
  const setState = value => {
@@ -27476,15 +27516,15 @@ const Default = props => {
27476
27516
  });
27477
27517
  props.onStepChange && props.onStepChange(e);
27478
27518
 
27479
- if (props != null && (_props$navContents3 = props.navContents) != null && (_props$navContents4 = _props$navContents3[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents4.disabled) {
27480
- if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
27519
+ if (props !== null && props !== void 0 && (_props$navContents3 = props.navContents) !== null && _props$navContents3 !== void 0 && (_props$navContents4 = _props$navContents3[(e === null || e === void 0 ? void 0 : e.activeStep) - 1]) !== null && _props$navContents4 !== void 0 && _props$navContents4.disabled) {
27520
+ if ((e === null || e === void 0 ? void 0 : e.activeStep) > (e === null || e === void 0 ? void 0 : e.previousStep)) {
27481
27521
  var _state$SW;
27482
27522
 
27483
- state == null ? void 0 : (_state$SW = state.SW) == null ? void 0 : _state$SW.nextStep();
27523
+ state === null || state === void 0 ? void 0 : (_state$SW = state.SW) === null || _state$SW === void 0 ? void 0 : _state$SW.nextStep();
27484
27524
  } else {
27485
27525
  var _state$SW2;
27486
27526
 
27487
- state == null ? void 0 : (_state$SW2 = state.SW) == null ? void 0 : _state$SW2.previousStep();
27527
+ state === null || state === void 0 ? void 0 : (_state$SW2 = state.SW) === null || _state$SW2 === void 0 ? void 0 : _state$SW2.previousStep();
27488
27528
  }
27489
27529
  }
27490
27530
  };
@@ -27500,11 +27540,11 @@ const Default = props => {
27500
27540
  }, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
27501
27541
  value: {
27502
27542
  toogleVisibility,
27503
- isHide: state == null ? void 0 : state.hide,
27543
+ isHide: state === null || state === void 0 ? void 0 : state.hide,
27504
27544
  setComplete,
27505
27545
  setState,
27506
27546
  state,
27507
- SW: state == null ? void 0 : state.SW,
27547
+ SW: state === null || state === void 0 ? void 0 : state.SW,
27508
27548
  forbidClickNav: props.forbidClickNav,
27509
27549
  titles: props.titles,
27510
27550
  isMobile: props.isMobile,
@@ -27677,10 +27717,10 @@ function Content({
27677
27717
  function getDatasets(content, activeId, isCollapse) {
27678
27718
  const datasets = [];
27679
27719
 
27680
- for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
27720
+ for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
27681
27721
  var _content$i;
27682
27722
 
27683
- if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
27723
+ if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
27684
27724
  datasets.unshift(content[i]);
27685
27725
  } else {
27686
27726
  datasets.push(content[i]);
@@ -27720,7 +27760,7 @@ function Content({
27720
27760
  lineNumber: 99,
27721
27761
  columnNumber: 7
27722
27762
  }
27723
- }, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
27763
+ }, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
27724
27764
  return /*#__PURE__*/React__default.createElement(List, {
27725
27765
  key: index,
27726
27766
  __self: this,
@@ -27737,11 +27777,11 @@ function Content({
27737
27777
  marginLeft: '-4px !important',
27738
27778
  borderLeftWidth: '4px !important',
27739
27779
  borderLeftStyle: 'solid !important',
27740
- borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
27780
+ borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
27741
27781
  paddingLeft: '16px !important',
27742
27782
  minHeight: 25
27743
27783
  },
27744
- "data-to-scrollspy-id": item == null ? void 0 : item.id,
27784
+ "data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
27745
27785
  __self: this,
27746
27786
  __source: {
27747
27787
  fileName: _jsxFileName$2,
@@ -27750,8 +27790,8 @@ function Content({
27750
27790
  }
27751
27791
  }, /*#__PURE__*/React__default.createElement(Title$1, {
27752
27792
  className: "link-title",
27753
- active: (item == null ? void 0 : item.id) === activeId,
27754
- href: `#${item == null ? void 0 : item.id}`,
27793
+ active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
27794
+ href: `#${item === null || item === void 0 ? void 0 : item.id}`,
27755
27795
  onClick: e => {
27756
27796
  e.preventDefault();
27757
27797
  const target = window.document.getElementById(e.currentTarget.href.split('#')[1]);
@@ -27780,7 +27820,7 @@ function Content({
27780
27820
  lineNumber: 117,
27781
27821
  columnNumber: 17
27782
27822
  }
27783
- }, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
27823
+ }, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
27784
27824
  })));
27785
27825
  }
27786
27826
 
@@ -28044,7 +28084,8 @@ function EditableTableMobile(props) {
28044
28084
  instance,
28045
28085
  emptyDataMessage,
28046
28086
  showCheckbox,
28047
- customRows
28087
+ customRows,
28088
+ onExpand
28048
28089
  } = props;
28049
28090
  const {
28050
28091
  getTableProps,
@@ -28126,6 +28167,7 @@ function EditableTableMobile(props) {
28126
28167
  }
28127
28168
 
28128
28169
  row.toggleRowExpanded(!row.isExpanded);
28170
+ onExpand === null || onExpand === void 0 ? void 0 : onExpand(!row.isExpanded);
28129
28171
  }
28130
28172
  }, {
28131
28173
  children: row.isExpanded ? jsx(ChevronUpOutline, {}, void 0) : jsx(ChevronDownOutline, {}, void 0)
@@ -28572,7 +28614,8 @@ function EditableTable(props) {
28572
28614
  onSelectedChange,
28573
28615
  getCheckboxProps,
28574
28616
  keyId = 'id',
28575
- selectedIds
28617
+ selectedIds,
28618
+ onExpand
28576
28619
  } = props;
28577
28620
  const [selectedIndex, setSelectedIndex] = useState(null);
28578
28621
 
@@ -28821,7 +28864,8 @@ function EditableTable(props) {
28821
28864
  instance: instance,
28822
28865
  emptyDataMessage: emptyDataMessage,
28823
28866
  showCheckbox: showCheckbox,
28824
- customRows: customRows
28867
+ customRows: customRows,
28868
+ onExpand: onExpand
28825
28869
  }, void 0);
28826
28870
  }
28827
28871