@majoo-ui/react 1.59.9 → 1.59.10-rc.2

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.
Files changed (3) hide show
  1. package/index.esm.js +237 -242
  2. package/index.umd.js +237 -242
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -3793,7 +3793,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
3793
3793
  onClick: e => {
3794
3794
  e.preventDefault();
3795
3795
  e.stopPropagation();
3796
- value === null || value === void 0 || value.onRemove();
3796
+ value == null || value.onRemove();
3797
3797
  },
3798
3798
  __self: undefined,
3799
3799
  __source: {
@@ -3812,7 +3812,6 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
3812
3812
  }
3813
3813
  })));
3814
3814
  const SingleTagBanner = props => {
3815
- var _props$icon;
3816
3815
  return /*#__PURE__*/React.createElement(Flex$1, {
3817
3816
  gap: 2,
3818
3817
  direction: "column",
@@ -3838,7 +3837,7 @@ const SingleTagBanner = props => {
3838
3837
  lineNumber: 212,
3839
3838
  columnNumber: 9
3840
3839
  }
3841
- }, (props === null || props === void 0 ? void 0 : props.icon) && /*#__PURE__*/React.createElement(Flex$1, {
3840
+ }, (props == null ? void 0 : props.icon) && /*#__PURE__*/React.createElement(Flex$1, {
3842
3841
  css: {
3843
3842
  marginTop: '-2px'
3844
3843
  },
@@ -3848,7 +3847,7 @@ const SingleTagBanner = props => {
3848
3847
  lineNumber: 213,
3849
3848
  columnNumber: 27
3850
3849
  }
3851
- }, props === null || props === void 0 || (_props$icon = props.icon) === null || _props$icon === void 0 ? void 0 : _props$icon.call(props)), /*#__PURE__*/React.createElement(Flex$1, {
3850
+ }, props == null || props.icon == null ? void 0 : props.icon()), /*#__PURE__*/React.createElement(Flex$1, {
3852
3851
  gap: 2,
3853
3852
  direction: "column",
3854
3853
  css: {
@@ -3879,7 +3878,7 @@ const SingleTagBanner = props => {
3879
3878
  onClick: e => {
3880
3879
  e.preventDefault();
3881
3880
  e.stopPropagation();
3882
- props === null || props === void 0 || props.onRemove();
3881
+ props == null || props.onRemove();
3883
3882
  },
3884
3883
  closeCenter: !props.title && !props.link,
3885
3884
  __self: undefined,
@@ -6744,7 +6743,7 @@ const InputTextArea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
6744
6743
  useEffect(() => {
6745
6744
  if (textareaRef.current) {
6746
6745
  textareaRef.current.style.height = '50px';
6747
- const scrollHeight = textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current.scrollHeight;
6746
+ const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
6748
6747
  textareaRef.current.style.height = scrollHeight + 5 + 'px';
6749
6748
  }
6750
6749
  }, []);
@@ -6799,7 +6798,7 @@ const InputRadioContext = /*#__PURE__*/React__default.createContext();
6799
6798
  var _jsxFileName$J = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputRadio/InputRadioGroup.js";
6800
6799
  const RadioGroup = styled(RadioGroupPrimitive.Root, Flex$1);
6801
6800
  function InputRadioGroup(props) {
6802
- return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
6801
+ return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
6803
6802
  value: props,
6804
6803
  __self: this,
6805
6804
  __source: {
@@ -6814,7 +6813,7 @@ function InputRadioGroup(props) {
6814
6813
  lineNumber: 14,
6815
6814
  columnNumber: 9
6816
6815
  }
6817
- }), React__default.Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
6816
+ }), React__default.Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
6818
6817
  style: Object.assign({}, child.props.style, {
6819
6818
  opacity: 1
6820
6819
  })
@@ -7002,9 +7001,8 @@ const InputRadio = _ref => {
7002
7001
  return /*#__PURE__*/React__default.createElement(InputNumber, _extends({}, inputProps, {
7003
7002
  readOnly: readOnly,
7004
7003
  onFocus: () => {
7005
- var _inputProps$onFocus;
7006
7004
  onValueChange(props.value);
7007
- inputProps === null || inputProps === void 0 || (_inputProps$onFocus = inputProps.onFocus) === null || _inputProps$onFocus === void 0 || _inputProps$onFocus.call(inputProps);
7005
+ inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
7008
7006
  },
7009
7007
  asChild: true,
7010
7008
  __self: this,
@@ -7019,9 +7017,8 @@ const InputRadio = _ref => {
7019
7017
  disabled: disabled,
7020
7018
  readOnly: readOnly,
7021
7019
  onFocus: () => {
7022
- var _inputProps$onFocus2;
7023
7020
  onValueChange(props.value);
7024
- inputProps === null || inputProps === void 0 || (_inputProps$onFocus2 = inputProps.onFocus) === null || _inputProps$onFocus2 === void 0 || _inputProps$onFocus2.call(inputProps);
7021
+ inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
7025
7022
  },
7026
7023
  asChild: true,
7027
7024
  __self: this,
@@ -9711,24 +9708,24 @@ var NumberFormat = /*@__PURE__*/function (superclass) {
9711
9708
  allowLeadingZeros,
9712
9709
  format
9713
9710
  } = Object.assign({}, ref);
9714
- const formattedValueStartsWithZero = (_formattedValue = formattedValue) === null || _formattedValue === void 0 ? void 0 : _formattedValue.startsWith(`${prefix}0`);
9715
- const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) === null || _formattedValue2 === void 0 ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
9711
+ const formattedValueStartsWithZero = (_formattedValue = formattedValue) == null ? void 0 : _formattedValue.startsWith(`${prefix}0`);
9712
+ const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) == null ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
9716
9713
  const emptyFormattedValue = prefix || suffix || prefix + suffix || '';
9717
9714
  if ((formattedValueStartsWithZero || formattedWithZeroAndSuffix) && !allowLeadingZeros && !format) {
9718
9715
  var _formattedValue3, _input$value;
9719
9716
  const isSpecialChar = /^[+-]/.test(formattedValue);
9720
- if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) !== null && _formattedValue3 !== void 0 && _formattedValue3.includes('0,'))) {
9717
+ if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) != null && _formattedValue3.includes('0,'))) {
9721
9718
  var _formattedValue4, _numAsString;
9722
- formattedValue = (_formattedValue4 = formattedValue) === null || _formattedValue4 === void 0 ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
9723
- numAsString = (_numAsString = numAsString) === null || _numAsString === void 0 ? void 0 : _numAsString.replace(/^0+/, '');
9719
+ formattedValue = (_formattedValue4 = formattedValue) == null ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
9720
+ numAsString = (_numAsString = numAsString) == null ? void 0 : _numAsString.replace(/^0+/, '');
9724
9721
  }
9725
- if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input === null || input === void 0 ? void 0 : input.value)) {
9722
+ if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input == null ? void 0 : input.value)) {
9726
9723
  formattedValue = `${prefix}0${suffix}`;
9727
9724
  numAsString = '0';
9728
- } else if (input !== null && input !== void 0 && (_input$value = input.value) !== null && _input$value !== void 0 && _input$value.includes('0,')) {
9725
+ } else if (input != null && (_input$value = input.value) != null && _input$value.includes('0,')) {
9729
9726
  allowLeadingZeros = true;
9730
- formattedValue = input === null || input === void 0 ? void 0 : input.value;
9731
- numAsString = this.removeFormatting(input === null || input === void 0 ? void 0 : input.value);
9727
+ formattedValue = input == null ? void 0 : input.value;
9728
+ numAsString = this.removeFormatting(input == null ? void 0 : input.value);
9732
9729
  }
9733
9730
  }
9734
9731
  //end adjustment
@@ -10186,7 +10183,7 @@ function countThousandSeparatorsByLength(numberLength) {
10186
10183
  }
10187
10184
  function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
10188
10185
  const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
10189
- return maxValue + (prefix === null || prefix === void 0 ? void 0 : prefix.length) + (suffix === null || suffix === void 0 ? void 0 : suffix.length) + tsLength;
10186
+ return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
10190
10187
  }
10191
10188
  const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
10192
10189
  let {
@@ -10238,9 +10235,9 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
10238
10235
  size: size,
10239
10236
  isInvalid: isInvalid,
10240
10237
  readOnly: readOnly,
10241
- isReadOnly: readOnly && !(props !== null && props !== void 0 && props.inputGroup) && !(props !== null && props !== void 0 && props.asChild),
10238
+ isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
10242
10239
  disabled: disabled,
10243
- maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props === null || props === void 0 ? void 0 : props.prefix, props === null || props === void 0 ? void 0 : props.suffix, thousandSeparator) : maxLength,
10240
+ maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
10244
10241
  thousandSeparator: thousandSeparator
10245
10242
  }, props, {
10246
10243
  __self: undefined,
@@ -10578,16 +10575,16 @@ function TagsInput(_ref) {
10578
10575
  const addTags = event => {
10579
10576
  if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
10580
10577
  if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
10581
- onEnter === null || onEnter === void 0 || onEnter({
10578
+ onEnter == null || onEnter({
10582
10579
  key: 'duplicate',
10583
10580
  value: event.target.value
10584
10581
  });
10585
10582
  return;
10586
10583
  }
10587
- if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
10584
+ if (pattern && pattern != null && pattern.regex) {
10588
10585
  const regex = new RegExp(pattern.regex);
10589
10586
  if (!regex.test(event.target.value)) {
10590
- onEnter === null || onEnter === void 0 || onEnter({
10587
+ onEnter == null || onEnter({
10591
10588
  key: 'error',
10592
10589
  value: event.target.value
10593
10590
  });
@@ -10596,7 +10593,7 @@ function TagsInput(_ref) {
10596
10593
  }
10597
10594
  }
10598
10595
  setRegexError(false);
10599
- onEnter === null || onEnter === void 0 || onEnter({
10596
+ onEnter == null || onEnter({
10600
10597
  key: 'success',
10601
10598
  value: event.target.value
10602
10599
  });
@@ -10608,7 +10605,7 @@ function TagsInput(_ref) {
10608
10605
  if (disabled || readOnly) {
10609
10606
  return tags;
10610
10607
  } else if (key === 'removeTag' || key === 'Backspace') {
10611
- onRemoveItem === null || onRemoveItem === void 0 || onRemoveItem(tags[index]);
10608
+ onRemoveItem == null || onRemoveItem(tags[index]);
10612
10609
  setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
10613
10610
  }
10614
10611
  };
@@ -10659,7 +10656,7 @@ function TagsInput(_ref) {
10659
10656
  lineNumber: 180,
10660
10657
  columnNumber: 9
10661
10658
  }
10662
- })), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
10659
+ })), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
10663
10660
  color: "red",
10664
10661
  __self: this,
10665
10662
  __source: {
@@ -10967,14 +10964,14 @@ const InputSearchbox = _ref => {
10967
10964
  t
10968
10965
  } = useTranslation(['MajooUI/inputSearchbox', 'translation']);
10969
10966
  const [value, setValue] = useState(defaultValue);
10970
- const inputValue = (_props$value = props === null || props === void 0 ? void 0 : props.value) != null ? _props$value : value;
10971
- const debounceChange = useCallback(debounce(e => onChange === null || onChange === void 0 ? void 0 : onChange(e), 1000), [onChange]);
10967
+ const inputValue = (_props$value = props == null ? void 0 : props.value) != null ? _props$value : value;
10968
+ const debounceChange = useCallback(debounce(e => onChange == null ? void 0 : onChange(e), 1000), [onChange]);
10972
10969
  const handleChange = useCallback(e => {
10973
10970
  setValue(e.target.value);
10974
10971
  if (withDebounce) {
10975
10972
  debounceChange(e.target.value);
10976
10973
  } else {
10977
- onChange === null || onChange === void 0 || onChange(e.target.value);
10974
+ onChange == null || onChange(e.target.value);
10978
10975
  }
10979
10976
  }, [onChange, debounceChange, withDebounce]);
10980
10977
  const handleClearButtonClick = e => {
@@ -11027,7 +11024,7 @@ const InputSearchbox = _ref => {
11027
11024
  columnNumber: 7
11028
11025
  }
11029
11026
  })), /*#__PURE__*/React__default.createElement(InputRightElement, {
11030
- children: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default.createElement(SvgCloseFilled, {
11027
+ children: (inputValue == null ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default.createElement(SvgCloseFilled, {
11031
11028
  color: colors$7.iconSecondary,
11032
11029
  __self: undefined,
11033
11030
  __source: {
@@ -11097,7 +11094,7 @@ const Popover = ({
11097
11094
  middleware: [offset(_sideOffset), shift$2(), _flip && flip()],
11098
11095
  onOpenChange: isOpen => {
11099
11096
  setOpenState(isOpen);
11100
- !isOpen && (onClose === null || onClose === void 0 ? void 0 : onClose());
11097
+ !isOpen && (onClose == null ? void 0 : onClose());
11101
11098
  },
11102
11099
  placement
11103
11100
  });
@@ -11542,6 +11539,9 @@ const SelectInputSearch$1 = /*#__PURE__*/React.forwardRef((_a, forwardedRef) =>
11542
11539
  }, void 0)]
11543
11540
  }), void 0);
11544
11541
  });
11542
+ function isHTMLElement(element) {
11543
+ return 'offsetTop' in element;
11544
+ }
11545
11545
  const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
11546
11546
  var {
11547
11547
  option,
@@ -11598,8 +11598,8 @@ const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
11598
11598
  }
11599
11599
  const scrollToSelectedElement = () => {
11600
11600
  const element = document.querySelector(`[data-index="${selectedIndex}"]`);
11601
- if (element) {
11602
- const scrollContainer = scrollerRef.current;
11601
+ const scrollContainer = scrollerRef.current;
11602
+ if (element && isHTMLElement(element) && scrollContainer) {
11603
11603
  const elementPosition = element.offsetTop - scrollContainer.offsetTop;
11604
11604
  scrollContainer.scrollTop = elementPosition;
11605
11605
  }
@@ -13451,13 +13451,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13451
13451
  const isShowSelectAll = showSelectAll && !maxSelectedItem;
13452
13452
  useEffect(() => {
13453
13453
  var _scrollerRef$current;
13454
- (_scrollerRef$current = scrollerRef.current) === null || _scrollerRef$current === void 0 || _scrollerRef$current.scrollTo({
13454
+ (_scrollerRef$current = scrollerRef.current) == null || _scrollerRef$current.scrollTo({
13455
13455
  top: 0
13456
13456
  });
13457
13457
  }, [query]);
13458
13458
  useEffect(() => {
13459
- if (defaultValue !== null && defaultValue !== void 0 && defaultValue.length) {
13460
- if (value !== null && value !== void 0 && value.length) {
13459
+ if (defaultValue != null && defaultValue.length) {
13460
+ if (value != null && value.length) {
13461
13461
  setInputSelectValue(value);
13462
13462
  }
13463
13463
  } else {
@@ -13522,7 +13522,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13522
13522
  removeSelectedItem,
13523
13523
  selectedItems
13524
13524
  } = useMultipleSelection({
13525
- selectedItems: selectedValue.length > 0 ? initItem === null || initItem === void 0 || (_initItem$reduce = initItem.reduce((acc, item) => [...acc, item, ...(item.children ? item.children : [])], [])) === null || _initItem$reduce === void 0 ? void 0 : _initItem$reduce.filter(item => selectedValue.includes(item.id)) : []
13525
+ selectedItems: selectedValue.length > 0 ? initItem == null || (_initItem$reduce = initItem.reduce((acc, item) => [...acc, item, ...(item.children ? item.children : [])], [])) == null ? void 0 : _initItem$reduce.filter(item => selectedValue.includes(item.id)) : []
13526
13526
  });
13527
13527
  const generateOptions = data => {
13528
13528
  return data.map(option => {
@@ -13544,7 +13544,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13544
13544
  };
13545
13545
  const debouncedSearch = React__default.useRef(debounce(async query => {
13546
13546
  setQuery(query);
13547
- onSearch === null || onSearch === void 0 || onSearch(query);
13547
+ onSearch == null || onSearch(query);
13548
13548
  }, 1000)).current;
13549
13549
  React__default.useEffect(() => {
13550
13550
  return () => {
@@ -13552,7 +13552,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13552
13552
  };
13553
13553
  }, [debouncedSearch]);
13554
13554
  const handleInputValue = input => {
13555
- onSearch === null || onSearch === void 0 || onSearch(input);
13555
+ onSearch == null || onSearch(input);
13556
13556
  if (input === '') {
13557
13557
  if (disabledOptions.length > 0) {
13558
13558
  setItems(generateOptions(sortDisabled));
@@ -13560,9 +13560,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13560
13560
  return setItems(sortValue);
13561
13561
  }
13562
13562
  } else {
13563
- let filterItems = option === null || option === void 0 ? void 0 : option.filter(item => {
13564
- var _item$name, _item$name$includes, _input$toLocaleLowerC;
13565
- return item === null || item === void 0 || (_item$name = item.name) === null || _item$name === void 0 || (_item$name = _item$name.toLowerCase()) === null || _item$name === void 0 || (_item$name$includes = _item$name.includes) === null || _item$name$includes === void 0 ? void 0 : _item$name$includes.call(_item$name, input === null || input === void 0 || (_input$toLocaleLowerC = input.toLocaleLowerCase) === null || _input$toLocaleLowerC === void 0 ? void 0 : _input$toLocaleLowerC.call(input));
13563
+ let filterItems = option == null ? void 0 : option.filter(item => {
13564
+ var _item$name;
13565
+ return item == null || (_item$name = item.name) == null || (_item$name = _item$name.toLowerCase()) == null || _item$name.includes == null ? void 0 : _item$name.includes(input == null || input.toLocaleLowerCase == null ? void 0 : input.toLocaleLowerCase());
13566
13566
  });
13567
13567
  setItems(filterItems);
13568
13568
  }
@@ -13571,10 +13571,10 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13571
13571
  if (disabled || readOnly) {
13572
13572
  return selectedValue;
13573
13573
  } else {
13574
- if ((selected === null || selected === void 0 ? void 0 : selected.id) === 'counter') {
13574
+ if ((selected == null ? void 0 : selected.id) === 'counter') {
13575
13575
  setSelectedValue([]);
13576
13576
  setInputSelectValue([]);
13577
- onChange === null || onChange === void 0 || onChange([]);
13577
+ onChange == null || onChange([]);
13578
13578
  for (let i = 0; i < selectedValue.length; i++) {
13579
13579
  removeSelectedItem(selectedValue[i]);
13580
13580
  }
@@ -13584,7 +13584,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13584
13584
  setSelectedValue(filterItems);
13585
13585
  setInputSelectValue(filterItems);
13586
13586
  if (selected.id !== '!all') {
13587
- onChange === null || onChange === void 0 || onChange(filterItems);
13587
+ onChange == null || onChange(filterItems);
13588
13588
  }
13589
13589
  }
13590
13590
  }
@@ -13622,9 +13622,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13622
13622
  if (selectedItem.id === '!all') {
13623
13623
  items.forEach(item => {
13624
13624
  var _item$children;
13625
- if (item !== null && item !== void 0 && (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
13625
+ if (item != null && (_item$children = item.children) != null && _item$children.length) {
13626
13626
  var _item$children2;
13627
- item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 || _item$children2.forEach(item => {
13627
+ item == null || (_item$children2 = item.children) == null || _item$children2.forEach(item => {
13628
13628
  removeSelectedItem(item);
13629
13629
  });
13630
13630
  } else {
@@ -13633,7 +13633,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13633
13633
  });
13634
13634
  setSelectedValue([]);
13635
13635
  setInputSelectValue([]);
13636
- onChange === null || onChange === void 0 || onChange([]);
13636
+ onChange == null || onChange([]);
13637
13637
  } else {
13638
13638
  removeItem(selectedItem);
13639
13639
  }
@@ -13644,9 +13644,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13644
13644
  const itemIds = [];
13645
13645
  items.forEach(item => {
13646
13646
  var _item$children3;
13647
- if (item !== null && item !== void 0 && (_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length) {
13647
+ if (item != null && (_item$children3 = item.children) != null && _item$children3.length) {
13648
13648
  var _item$children4;
13649
- item === null || item === void 0 || (_item$children4 = item.children) === null || _item$children4 === void 0 || _item$children4.forEach(item => {
13649
+ item == null || (_item$children4 = item.children) == null || _item$children4.forEach(item => {
13650
13650
  addSelectedItem(item);
13651
13651
  itemIds.push(item.id);
13652
13652
  });
@@ -13658,16 +13658,16 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13658
13658
  setSelectedValue(itemIds);
13659
13659
  setInputSelectValue(itemIds);
13660
13660
  // onChange?.(itemIds.slice(1).filter(id => !items.find(item => item.id === id)?.children?.length));
13661
- onChange === null || onChange === void 0 || onChange(itemIds.slice(1));
13661
+ onChange == null || onChange(itemIds.slice(1));
13662
13662
  } else {
13663
13663
  var _selectedItem$childre;
13664
13664
  //start check if item have children (option group)
13665
- if (selectedItem !== null && selectedItem !== void 0 && (_selectedItem$childre = selectedItem.children) !== null && _selectedItem$childre !== void 0 && _selectedItem$childre.length) {
13665
+ if (selectedItem != null && (_selectedItem$childre = selectedItem.children) != null && _selectedItem$childre.length) {
13666
13666
  var _selectedItem$childre2;
13667
13667
  const itemIdsSelect = [];
13668
13668
  const itemIdsUnSelect = [];
13669
- selectedItem === null || selectedItem === void 0 || (_selectedItem$childre2 = selectedItem.children) === null || _selectedItem$childre2 === void 0 || _selectedItem$childre2.forEach(item => {
13670
- if (selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id)) {
13669
+ selectedItem == null || (_selectedItem$childre2 = selectedItem.children) == null || _selectedItem$childre2.forEach(item => {
13670
+ if (selectedValue != null && selectedValue.includes(item.id)) {
13671
13671
  removeSelectedItem(item);
13672
13672
  itemIdsUnSelect.push(item.id);
13673
13673
  } else {
@@ -13681,19 +13681,19 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13681
13681
  setSelectedValue([...selectedValue, ...itemIdsSelect]);
13682
13682
  setInputSelectValue([...selectedValue, ...itemIdsSelect]);
13683
13683
  const _filteredSelectedValues = selectedValue.filter(val => val !== '!all');
13684
- onChange === null || onChange === void 0 || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
13684
+ onChange == null || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
13685
13685
  }
13686
13686
 
13687
13687
  //unselect all child in one of the option groups
13688
13688
  if (itemIdsUnSelect.length) {
13689
13689
  const newSelectedValue = selectedValue.filter(selId => {
13690
13690
  var _itemIdsUnSelect$filt;
13691
- return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) === null || _itemIdsUnSelect$filt === void 0 ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
13691
+ return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) == null ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
13692
13692
  });
13693
13693
  setSelectedValue(newSelectedValue);
13694
13694
  setInputSelectValue(newSelectedValue);
13695
13695
  const _filteredSelectedValues2 = newSelectedValue.filter(val => val !== '!all');
13696
- onChange === null || onChange === void 0 || onChange(_filteredSelectedValues2);
13696
+ onChange == null || onChange(_filteredSelectedValues2);
13697
13697
  }
13698
13698
  return;
13699
13699
  }
@@ -13710,7 +13710,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13710
13710
  setSelectedValue([...selectedValue, selectedItem.id]);
13711
13711
  setInputSelectValue([...selectedValue, selectedItem.id]);
13712
13712
  const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
13713
- onChange === null || onChange === void 0 || onChange([...filteredSelectedValues, selectedItem.id]);
13713
+ onChange == null || onChange([...filteredSelectedValues, selectedItem.id]);
13714
13714
  }
13715
13715
  selectItem(null);
13716
13716
  }
@@ -13742,9 +13742,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13742
13742
  }
13743
13743
  }
13744
13744
  });
13745
- const getOption = useCallback(() => maxSelectedItem ? option === null || option === void 0 ? void 0 : option.map(item => {
13746
- const isMaxSelectedItem = maxSelectedItem && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) >= maxSelectedItem;
13747
- if (isMaxSelectedItem && !(selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id))) {
13745
+ const getOption = useCallback(() => maxSelectedItem ? option == null ? void 0 : option.map(item => {
13746
+ const isMaxSelectedItem = maxSelectedItem && (selectedValue == null ? void 0 : selectedValue.length) >= maxSelectedItem;
13747
+ if (isMaxSelectedItem && !(selectedValue != null && selectedValue.includes(item.id))) {
13748
13748
  item.hideCheck = true;
13749
13749
  item.isDisabled = true;
13750
13750
  } else {
@@ -13753,7 +13753,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13753
13753
  }
13754
13754
  return item;
13755
13755
  }) : option, [maxSelectedItem, option, selectedValue]);
13756
- const itemsLength = items === null || items === void 0 ? void 0 : items.reduce((acc, item) => {
13756
+ const itemsLength = items == null ? void 0 : items.reduce((acc, item) => {
13757
13757
  return [...acc, ...(item.children ? item.children : [item])];
13758
13758
  }, []).length;
13759
13759
  useEffect(() => {
@@ -13800,16 +13800,15 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13800
13800
  }, [label, isOpen]);
13801
13801
  const toggleCollapsible = () => setShowAllTags(!showAllTags);
13802
13802
  const handleRemoveAllItem = () => {
13803
- onChange === null || onChange === void 0 || onChange([]);
13803
+ onChange == null || onChange([]);
13804
13804
  setSelectedValue([]);
13805
13805
  setInputSelectValue([]);
13806
13806
  for (let i = 0; i < selectedValue.length; i++) {
13807
13807
  removeSelectedItem(selectedValue[i]);
13808
13808
  }
13809
13809
  };
13810
- const isShowTagSelectAll = showTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > (option === null || option === void 0 ? void 0 : option.length);
13810
+ const isShowTagSelectAll = showTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > (option == null ? void 0 : option.length);
13811
13811
  const renderOptionItem = (item, index, asChild) => {
13812
- var _item$render;
13813
13812
  return /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
13814
13813
  key: item.id
13815
13814
  }, getItemProps({
@@ -13842,7 +13841,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13842
13841
  lineNumber: 740,
13843
13842
  columnNumber: 11
13844
13843
  }
13845
- }, !(item !== null && item !== void 0 && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13844
+ }, !(item != null && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13846
13845
  color: colors$8.iconDisable,
13847
13846
  __self: undefined,
13848
13847
  __source: {
@@ -13858,7 +13857,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13858
13857
  lineNumber: 754,
13859
13858
  columnNumber: 19
13860
13859
  }
13861
- })), isShowSelectAll && (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) < itemsLength ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
13860
+ })), isShowSelectAll && (item == null ? void 0 : item.id) === '!all' && selectedValue != null && selectedValue.length && (selectedValue == null ? void 0 : selectedValue.length) < itemsLength ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
13862
13861
  __self: undefined,
13863
13862
  __source: {
13864
13863
  fileName: _jsxFileName$y,
@@ -13883,15 +13882,15 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13883
13882
  lineNumber: 763,
13884
13883
  columnNumber: 11
13885
13884
  }
13886
- }, item.render ? (_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.call(item, item.name) : item.name));
13885
+ }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name));
13887
13886
  };
13888
13887
  let lastGroupIndex = showSelectAll ? 1 : 0;
13889
13888
  const renderOptionGroupItem = (item, index) => {
13890
- var _item$children5, _item$children6, _item$children7, _item$render2, _item$children8;
13889
+ var _item$children5, _item$children6, _item$children7, _item$children8;
13891
13890
  // const groupIndex = (index > (showSelectAll ? 1 : 0)) ? lastGroupIndex : 0;
13892
13891
  const groupIndex = lastGroupIndex;
13893
- lastGroupIndex += ((item === null || item === void 0 || (_item$children5 = item.children) === null || _item$children5 === void 0 ? void 0 : _item$children5.length) || 0) + 1;
13894
- const filterSelectedChild = item === null || item === void 0 || (_item$children6 = item.children) === null || _item$children6 === void 0 ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
13892
+ lastGroupIndex += ((item == null || (_item$children5 = item.children) == null ? void 0 : _item$children5.length) || 0) + 1;
13893
+ const filterSelectedChild = item == null || (_item$children6 = item.children) == null ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
13895
13894
  return /*#__PURE__*/React__default.createElement(OptionGroupItem, {
13896
13895
  item: /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
13897
13896
  key: item.id
@@ -13924,7 +13923,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13924
13923
  lineNumber: 793,
13925
13924
  columnNumber: 15
13926
13925
  }
13927
- }, !(item !== null && item !== void 0 && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13926
+ }, !(item != null && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13928
13927
  color: colors$8.iconDisable,
13929
13928
  __self: undefined,
13930
13929
  __source: {
@@ -13932,7 +13931,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13932
13931
  lineNumber: 802,
13933
13932
  columnNumber: 19
13934
13933
  }
13935
- }) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) === (item === null || item === void 0 || (_item$children7 = item.children) === null || _item$children7 === void 0 || (_item$children7 = _item$children7.filter(e => !e.isDisabled)) === null || _item$children7 === void 0 ? void 0 : _item$children7.length) ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13934
+ }) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) === (item == null || (_item$children7 = item.children) == null || (_item$children7 = _item$children7.filter(e => !e.isDisabled)) == null ? void 0 : _item$children7.length) ? /*#__PURE__*/React__default.createElement(CheckOutline, {
13936
13935
  color: colors$8.iconGreen,
13937
13936
  __self: undefined,
13938
13937
  __source: {
@@ -13940,7 +13939,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13940
13939
  lineNumber: 804,
13941
13940
  columnNumber: 19
13942
13941
  }
13943
- }) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
13942
+ }) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
13944
13943
  __self: undefined,
13945
13944
  __source: {
13946
13945
  fileName: _jsxFileName$y,
@@ -13958,14 +13957,14 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13958
13957
  lineNumber: 809,
13959
13958
  columnNumber: 15
13960
13959
  }
13961
- }, item.render ? (_item$render2 = item.render) === null || _item$render2 === void 0 ? void 0 : _item$render2.call(item, item.name) : item.name)),
13960
+ }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name)),
13962
13961
  __self: undefined,
13963
13962
  __source: {
13964
13963
  fileName: _jsxFileName$y,
13965
13964
  lineNumber: 778,
13966
13965
  columnNumber: 9
13967
13966
  }
13968
- }, item === null || item === void 0 || (_item$children8 = item.children) === null || _item$children8 === void 0 ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
13967
+ }, item == null || (_item$children8 = item.children) == null ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
13969
13968
  };
13970
13969
  return /*#__PURE__*/React__default.createElement(Wrapper$1, _extends({
13971
13970
  css: css
@@ -14095,13 +14094,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14095
14094
  lineNumber: 868,
14096
14095
  columnNumber: 17
14097
14096
  }
14098
- }), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems === null || selectedItems === void 0 || (_selectedItems$filter = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter === void 0 || (_selectedItems$filter = _selectedItems$filter.filter((_, idx) => {
14097
+ }), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems == null || (_selectedItems$filter = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null || (_selectedItems$filter = _selectedItems$filter.filter((_, idx) => {
14099
14098
  if (showAllTags || !collapsible) {
14100
14099
  return true;
14101
14100
  } else {
14102
14101
  return idx < 5;
14103
14102
  }
14104
- })) === null || _selectedItems$filter === void 0 ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
14103
+ })) == null ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
14105
14104
  disabled: disabled,
14106
14105
  isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
14107
14106
  size: "lg",
@@ -14125,7 +14124,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14125
14124
  lineNumber: 896,
14126
14125
  columnNumber: 21
14127
14126
  }
14128
- }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > 5 && /*#__PURE__*/React__default.createElement(Flex$1, {
14127
+ }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > 5 && /*#__PURE__*/React__default.createElement(Flex$1, {
14129
14128
  direction: "column",
14130
14129
  gap: 4,
14131
14130
  __self: undefined,
@@ -14211,7 +14210,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14211
14210
  lineNumber: 937,
14212
14211
  columnNumber: 17
14213
14212
  }
14214
- }, `${selectedItems === null || selectedItems === void 0 || (_selectedItems$filter2 = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter2 === void 0 ? void 0 : _selectedItems$filter2.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`))), showCounter && !isShowTagSelectAll && Boolean(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) && /*#__PURE__*/React__default.createElement(Paragraph, {
14213
+ }, `${selectedItems == null || (_selectedItems$filter2 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter2.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`))), showCounter && !isShowTagSelectAll && Boolean(selectedItems == null ? void 0 : selectedItems.length) && /*#__PURE__*/React__default.createElement(Paragraph, {
14215
14214
  css: {
14216
14215
  fontSize: '$label',
14217
14216
  marginTop: '$spacing-01'
@@ -14223,7 +14222,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14223
14222
  lineNumber: 946,
14224
14223
  columnNumber: 11
14225
14224
  }
14226
- }, `${selectedItems === null || selectedItems === void 0 || (_selectedItems$filter3 = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter3 === void 0 ? void 0 : _selectedItems$filter3.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
14225
+ }, `${selectedItems == null || (_selectedItems$filter3 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter3.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
14227
14226
  placement: placement,
14228
14227
  css: {
14229
14228
  display: isOpen && disabled === false ? 'block' : 'none',
@@ -14280,7 +14279,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14280
14279
  }), /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
14281
14280
  condition: !!fetchData && items.length > 0,
14282
14281
  wrapper: child => /*#__PURE__*/React__default.createElement(InfiniteScroll, {
14283
- loadMore: () => !isLoading && (fetchData === null || fetchData === void 0 ? void 0 : fetchData({
14282
+ loadMore: () => !isLoading && (fetchData == null ? void 0 : fetchData({
14284
14283
  query
14285
14284
  })),
14286
14285
  hasMore: true,
@@ -14299,7 +14298,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14299
14298
  lineNumber: 986,
14300
14299
  columnNumber: 15
14301
14300
  }
14302
- }, isOpen && items.map((item, index) => item !== null && item !== void 0 && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
14301
+ }, isOpen && items.map((item, index) => item != null && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
14303
14302
  css: {
14304
14303
  height: 'auto'
14305
14304
  }
@@ -17837,9 +17836,9 @@ const NativeTimePicker = ({
17837
17836
  }
17838
17837
  function handleInputChange(type, e) {
17839
17838
  var _e$target;
17840
- const value = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
17839
+ const value = e == null || (_e$target = e.target) == null ? void 0 : _e$target.value;
17841
17840
  const format = 'DD:MM:YYYY:HH:mm';
17842
- const minLength = (value === null || value === void 0 ? void 0 : value.length) > 1;
17841
+ const minLength = (value == null ? void 0 : value.length) > 1;
17843
17842
  const hourValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:mm')}:${params}`, 'DD:MM:YYYY:mm:HH').toDate());
17844
17843
  const minuteValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:HH')}:${params}`, 'DD:MM:YYYY:HH:mm').toDate());
17845
17844
  if (!disabled) {
@@ -20400,7 +20399,7 @@ const NotificationBadge = _ref => {
20400
20399
  };
20401
20400
  };
20402
20401
  const getValue = () => {
20403
- let value = props === null || props === void 0 ? void 0 : props.value;
20402
+ let value = props == null ? void 0 : props.value;
20404
20403
  const isTrailing = variantIcon === 'trailing';
20405
20404
  if (typeof value === 'number' || parseInt(value)) {
20406
20405
  if (Math.sign(value) === 1 || Math.sign(value) === 0) {
@@ -21366,7 +21365,7 @@ const PaginationButton = ({
21366
21365
  justify: "center",
21367
21366
  onClick: () => {
21368
21367
  var _dialogPageRef$curren;
21369
- return (_dialogPageRef$curren = dialogPageRef.current) === null || _dialogPageRef$curren === void 0 ? void 0 : _dialogPageRef$curren.click();
21368
+ return (_dialogPageRef$curren = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren.click();
21370
21369
  },
21371
21370
  __self: undefined,
21372
21371
  __source: {
@@ -21444,7 +21443,7 @@ const PaginationButton = ({
21444
21443
  onSubmit: () => {
21445
21444
  var _dialogPageRef$curren2;
21446
21445
  debouncedGoToPage(Number(goToPage));
21447
- (_dialogPageRef$curren2 = dialogPageRef.current) === null || _dialogPageRef$curren2 === void 0 || _dialogPageRef$curren2.click();
21446
+ (_dialogPageRef$curren2 = dialogPageRef.current) == null || _dialogPageRef$curren2.click();
21448
21447
  },
21449
21448
  __self: undefined,
21450
21449
  __source: {
@@ -21461,7 +21460,7 @@ const PaginationButton = ({
21461
21460
  allowNegative: false,
21462
21461
  onChange: e => {
21463
21462
  var _e$target;
21464
- return setGoToPage((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
21463
+ return setGoToPage((_e$target = e.target) == null ? void 0 : _e$target.value);
21465
21464
  },
21466
21465
  __self: undefined,
21467
21466
  __source: {
@@ -21494,7 +21493,7 @@ const PaginationButton = ({
21494
21493
  onClick: () => {
21495
21494
  var _dialogPageRef$curren3;
21496
21495
  setGoToPage(null);
21497
- (_dialogPageRef$curren3 = dialogPageRef.current) === null || _dialogPageRef$curren3 === void 0 || _dialogPageRef$curren3.click();
21496
+ (_dialogPageRef$curren3 = dialogPageRef.current) == null || _dialogPageRef$curren3.click();
21498
21497
  },
21499
21498
  __self: undefined,
21500
21499
  __source: {
@@ -21509,7 +21508,7 @@ const PaginationButton = ({
21509
21508
  onClick: () => {
21510
21509
  var _dialogPageRef$curren4;
21511
21510
  debouncedGoToPage(Number(goToPage));
21512
- (_dialogPageRef$curren4 = dialogPageRef.current) === null || _dialogPageRef$curren4 === void 0 || _dialogPageRef$curren4.click();
21511
+ (_dialogPageRef$curren4 = dialogPageRef.current) == null || _dialogPageRef$curren4.click();
21513
21512
  },
21514
21513
  __self: undefined,
21515
21514
  __source: {
@@ -21598,7 +21597,7 @@ function PaginationInfo(_ref) {
21598
21597
  onClick: () => {
21599
21598
  if (isMobilePagination) {
21600
21599
  var _dialogLimitRef$curre;
21601
- (_dialogLimitRef$curre = dialogLimitRef.current) === null || _dialogLimitRef$curre === void 0 || _dialogLimitRef$curre.click();
21600
+ (_dialogLimitRef$curre = dialogLimitRef.current) == null || _dialogLimitRef$curre.click();
21602
21601
  }
21603
21602
  },
21604
21603
  __self: this,
@@ -21644,7 +21643,7 @@ function PaginationInfo(_ref) {
21644
21643
  lineNumber: 60,
21645
21644
  columnNumber: 13
21646
21645
  }
21647
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
21646
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
21648
21647
  key: limit,
21649
21648
  css: limitItemContainerStyle(selectedLimit === limit),
21650
21649
  onClick: () => onChange(limit),
@@ -21727,7 +21726,7 @@ function PaginationInfo(_ref) {
21727
21726
  lineNumber: 100,
21728
21727
  columnNumber: 11
21729
21728
  }
21730
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
21729
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
21731
21730
  css: {
21732
21731
  height: 44,
21733
21732
  width: '100%',
@@ -21742,7 +21741,7 @@ function PaginationInfo(_ref) {
21742
21741
  onClick: () => {
21743
21742
  var _dialogLimitRef$curre2;
21744
21743
  onChange(limit);
21745
- (_dialogLimitRef$curre2 = dialogLimitRef.current) === null || _dialogLimitRef$curre2 === void 0 || _dialogLimitRef$curre2.click();
21744
+ (_dialogLimitRef$curre2 = dialogLimitRef.current) == null || _dialogLimitRef$curre2.click();
21746
21745
  },
21747
21746
  __self: this,
21748
21747
  __source: {
@@ -23864,7 +23863,7 @@ const rowMenuColumn = (options, icon, config) => ({
23864
23863
  onClick: () => {
23865
23864
  var _document$getElements;
23866
23865
  setOpenDrop(true);
23867
- const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) === null || _document$getElements === void 0 ? void 0 : _document$getElements[0];
23866
+ const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
23868
23867
  contextMenu.style.opacity = 0;
23869
23868
  },
23870
23869
  __self: undefined,
@@ -24513,7 +24512,7 @@ const TemplateAlertFunction = props => {
24513
24512
  if (!props.onOpenAutoFocus) {
24514
24513
  e.preventDefault();
24515
24514
  } else {
24516
- props === null || props === void 0 || props.onOpenAutoFocus();
24515
+ props == null || props.onOpenAutoFocus();
24517
24516
  }
24518
24517
  },
24519
24518
  __self: undefined,
@@ -24593,7 +24592,7 @@ const TemplateAlertFunction = props => {
24593
24592
  }, props.description)), /*#__PURE__*/React__default.createElement(Box, {
24594
24593
  css: {
24595
24594
  width: '100%',
24596
- display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
24595
+ display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
24597
24596
  },
24598
24597
  __self: undefined,
24599
24598
  __source: {
@@ -24635,8 +24634,8 @@ const TemplateAlertFunction = props => {
24635
24634
  size: props.btnSize,
24636
24635
  onClick: buttonConfirm,
24637
24636
  buttonType: props.dialogType,
24638
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24639
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
24637
+ disabled: props == null ? void 0 : props.disabledButton
24638
+ }, props == null ? void 0 : props.actionButtonProps, {
24640
24639
  __self: undefined,
24641
24640
  __source: {
24642
24641
  fileName: _jsxFileName$b,
@@ -24655,19 +24654,19 @@ const TemplateAlertFunction = props => {
24655
24654
  size: props.btnSize,
24656
24655
  onClick: buttonCancel,
24657
24656
  css: {
24658
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
24657
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
24659
24658
  flex: props.isMobile && 1
24660
24659
  },
24661
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
24662
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24663
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
24660
+ buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
24661
+ disabled: props == null ? void 0 : props.disabledButton
24662
+ }, props == null ? void 0 : props.cancelButtonProps, {
24664
24663
  __self: undefined,
24665
24664
  __source: {
24666
24665
  fileName: _jsxFileName$b,
24667
24666
  lineNumber: 187,
24668
24667
  columnNumber: 19
24669
24668
  }
24670
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
24669
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
24671
24670
  asChild: true,
24672
24671
  __self: undefined,
24673
24672
  __source: {
@@ -24682,8 +24681,8 @@ const TemplateAlertFunction = props => {
24682
24681
  css: {
24683
24682
  flex: props.isMobile && 1
24684
24683
  },
24685
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24686
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
24684
+ disabled: props == null ? void 0 : props.disabledButton
24685
+ }, props == null ? void 0 : props.actionButtonProps, {
24687
24686
  __self: undefined,
24688
24687
  __source: {
24689
24688
  fileName: _jsxFileName$b,
@@ -24813,7 +24812,7 @@ function AlertDialog(props) {
24813
24812
  }, props.description)), /*#__PURE__*/React__default.createElement(Box, {
24814
24813
  css: {
24815
24814
  width: '100%',
24816
- display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
24815
+ display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
24817
24816
  },
24818
24817
  __self: this,
24819
24818
  __source: {
@@ -24858,8 +24857,8 @@ function AlertDialog(props) {
24858
24857
  css: {
24859
24858
  flex: props.isMobile && 1
24860
24859
  },
24861
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24862
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
24860
+ disabled: props == null ? void 0 : props.disabledButton
24861
+ }, props == null ? void 0 : props.actionButtonProps, {
24863
24862
  __self: this,
24864
24863
  __source: {
24865
24864
  fileName: _jsxFileName$b,
@@ -24878,19 +24877,19 @@ function AlertDialog(props) {
24878
24877
  size: props.btnSize,
24879
24878
  onClick: props.onCancel,
24880
24879
  css: {
24881
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
24880
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
24882
24881
  flex: props.isMobile && 1
24883
24882
  },
24884
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
24885
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24886
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
24883
+ buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
24884
+ disabled: props == null ? void 0 : props.disabledButton
24885
+ }, props == null ? void 0 : props.cancelButtonProps, {
24887
24886
  __self: this,
24888
24887
  __source: {
24889
24888
  fileName: _jsxFileName$b,
24890
24889
  lineNumber: 293,
24891
24890
  columnNumber: 19
24892
24891
  }
24893
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
24892
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
24894
24893
  asChild: true,
24895
24894
  __self: this,
24896
24895
  __source: {
@@ -24905,8 +24904,8 @@ function AlertDialog(props) {
24905
24904
  css: {
24906
24905
  flex: props.isMobile && 1
24907
24906
  },
24908
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24909
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
24907
+ disabled: props == null ? void 0 : props.disabledButton
24908
+ }, props == null ? void 0 : props.actionButtonProps, {
24910
24909
  __self: this,
24911
24910
  __source: {
24912
24911
  fileName: _jsxFileName$b,
@@ -27441,7 +27440,7 @@ const Upload = ({
27441
27440
  upload({
27442
27441
  url: action,
27443
27442
  file: newFile,
27444
- customBody: customBodyRequest === null || customBodyRequest === void 0 ? void 0 : customBodyRequest(newFile),
27443
+ customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
27445
27444
  token,
27446
27445
  tokenKey,
27447
27446
  reqKey,
@@ -27461,12 +27460,12 @@ const Upload = ({
27461
27460
  arrProgress[i] = fileProgress;
27462
27461
  }
27463
27462
  }
27464
- onChange === null || onChange === void 0 || (_onChange = onChange({
27463
+ onChange == null || (_onChange = onChange({
27465
27464
  fileList: arrProgress,
27466
27465
  file: fileProgress,
27467
27466
  indexReplace: indexReplace.current,
27468
27467
  isReplace: indexReplace.current !== null
27469
- })) === null || _onChange === void 0 || (_onChange = _onChange.then(() => setError(null))) === null || _onChange === void 0 || _onChange.catch(error => setError(error.message));
27468
+ })) == null || (_onChange = _onChange.then(() => setError(null))) == null || _onChange.catch(error => setError(error.message));
27470
27469
  }
27471
27470
  }).then(result => {
27472
27471
  var _onChange2;
@@ -27479,12 +27478,12 @@ const Upload = ({
27479
27478
  arrFile[i] = fileSuccess;
27480
27479
  }
27481
27480
  }
27482
- onChange === null || onChange === void 0 || (_onChange2 = onChange({
27481
+ onChange == null || (_onChange2 = onChange({
27483
27482
  fileList: arrFile,
27484
27483
  file: fileSuccess,
27485
27484
  indexReplace: indexReplace.current,
27486
27485
  isReplace: indexReplace.current !== null
27487
- })) === null || _onChange2 === void 0 || (_onChange2 = _onChange2.then(() => setError(null))) === null || _onChange2 === void 0 || _onChange2.catch(error => setError(error.message));
27486
+ })) == null || (_onChange2 = _onChange2.then(() => setError(null))) == null || _onChange2.catch(error => setError(error.message));
27488
27487
  }).catch(error => {
27489
27488
  var _onChange3;
27490
27489
  let fileError = Object.assign({}, newFile);
@@ -27496,21 +27495,21 @@ const Upload = ({
27496
27495
  arrFile[i] = fileError;
27497
27496
  }
27498
27497
  }
27499
- onChange === null || onChange === void 0 || (_onChange3 = onChange({
27498
+ onChange == null || (_onChange3 = onChange({
27500
27499
  fileList: arrFile,
27501
27500
  file: fileError,
27502
27501
  indexReplace: indexReplace.current,
27503
27502
  isReplace: indexReplace.current !== null
27504
- })) === null || _onChange3 === void 0 || (_onChange3 = _onChange3.then(() => setError(null))) === null || _onChange3 === void 0 || _onChange3.catch(error => setError(error.message));
27503
+ })) == null || (_onChange3 = _onChange3.then(() => setError(null))) == null || _onChange3.catch(error => setError(error.message));
27505
27504
  });
27506
27505
  } else {
27507
27506
  var _onChange4;
27508
- onChange === null || onChange === void 0 || (_onChange4 = onChange({
27507
+ onChange == null || (_onChange4 = onChange({
27509
27508
  fileList: arrFile,
27510
27509
  file: newFile,
27511
27510
  indexReplace: indexReplace.current,
27512
27511
  isReplace: indexReplace.current !== null
27513
- })) === null || _onChange4 === void 0 || (_onChange4 = _onChange4.then(() => setError(null))) === null || _onChange4 === void 0 || _onChange4.catch(error => setError(error.message));
27512
+ })) == null || (_onChange4 = _onChange4.then(() => setError(null))) == null || _onChange4.catch(error => setError(error.message));
27514
27513
  }
27515
27514
  if (indexReplace.current !== null) {
27516
27515
  arrFile[indexReplace.current] = newFile;
@@ -27530,15 +27529,15 @@ const Upload = ({
27530
27529
  // program to get the dimensions of an image
27531
27530
  const img = document.createElement('img');
27532
27531
  img.src = URL.createObjectURL(files[0]);
27533
- img.size = files === null || files === void 0 || (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size;
27534
- img.type = files === null || files === void 0 || (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.type;
27532
+ img.size = files == null || (_files$ = files[0]) == null ? void 0 : _files$.size;
27533
+ img.type = files == null || (_files$2 = files[0]) == null ? void 0 : _files$2.type;
27535
27534
  img.onload = () => {
27536
27535
  const imgRatio = img.width / img.height;
27537
27536
  setAspect(ratio || imgRatio);
27538
27537
  setCropperImgRatio(imgRatio);
27539
27538
  if (onBeforeCrop) {
27540
27539
  var _onBeforeCrop;
27541
- onBeforeCrop === null || onBeforeCrop === void 0 || (_onBeforeCrop = onBeforeCrop(img)) === null || _onBeforeCrop === void 0 || (_onBeforeCrop = _onBeforeCrop.then(() => {
27540
+ onBeforeCrop == null || (_onBeforeCrop = onBeforeCrop(img)) == null || (_onBeforeCrop = _onBeforeCrop.then(() => {
27542
27541
  setError(null);
27543
27542
  toggleModal();
27544
27543
  setTimeout(() => {
@@ -27552,7 +27551,7 @@ const Upload = ({
27552
27551
  }, 300);
27553
27552
  setFileState(files[0]);
27554
27553
  setPreviewImage(URL.createObjectURL(files[0]));
27555
- })) === null || _onBeforeCrop === void 0 || _onBeforeCrop.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
27554
+ })) == null || _onBeforeCrop.catch(error => setError(error == null ? void 0 : error.message));
27556
27555
  } else {
27557
27556
  toggleModal();
27558
27557
  setTimeout(() => {
@@ -27570,18 +27569,18 @@ const Upload = ({
27570
27569
  };
27571
27570
  img.onerror = error => {
27572
27571
  var _onBeforeCrop2;
27573
- onBeforeCrop === null || onBeforeCrop === void 0 || (_onBeforeCrop2 = onBeforeCrop(img, error)) === null || _onBeforeCrop2 === void 0 || (_onBeforeCrop2 = _onBeforeCrop2.then(() => setError(null))) === null || _onBeforeCrop2 === void 0 || _onBeforeCrop2.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
27572
+ onBeforeCrop == null || (_onBeforeCrop2 = onBeforeCrop(img, error)) == null || (_onBeforeCrop2 = _onBeforeCrop2.then(() => setError(null))) == null || _onBeforeCrop2.catch(error => setError(error == null ? void 0 : error.message));
27574
27573
  };
27575
27574
  }
27576
27575
  }
27577
27576
  }
27578
27577
  function handleCrop() {
27579
- if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
27580
- imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState === null || fileState === void 0 ? void 0 : fileState.type).then(blob => {
27581
- const sizeMB = (blob === null || blob === void 0 ? void 0 : blob.size) / 1024 / 1024;
27578
+ if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
27579
+ imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState == null ? void 0 : fileState.type).then(blob => {
27580
+ const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
27582
27581
  if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
27583
- const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
27584
- type: blob === null || blob === void 0 ? void 0 : blob.type
27582
+ const file = new File([blob], fileState == null ? void 0 : fileState.name, {
27583
+ type: blob == null ? void 0 : blob.type
27585
27584
  });
27586
27585
  handleUpload([file]);
27587
27586
  setCrop(null);
@@ -27595,16 +27594,16 @@ const Upload = ({
27595
27594
  alwaysKeepResolution: true
27596
27595
  }).then(compressedFile => {
27597
27596
  var _fileState$name;
27598
- const file = new File([compressedFile], (fileState === null || fileState === void 0 || (_fileState$name = fileState.name) === null || _fileState$name === void 0 ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
27599
- type: compressedFile === null || compressedFile === void 0 ? void 0 : compressedFile.type
27597
+ const file = new File([compressedFile], (fileState == null || (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
27598
+ type: compressedFile == null ? void 0 : compressedFile.type
27600
27599
  });
27601
27600
  handleUpload([file]);
27602
27601
  setCrop(null);
27603
27602
  setCompletedCrop(null);
27604
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
27603
+ }).catch(error => console.error(error == null ? void 0 : error.message));
27605
27604
  }
27606
27605
  toggleModal();
27607
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
27606
+ }).catch(error => console.error(error == null ? void 0 : error.message));
27608
27607
  } else {
27609
27608
  handleUpload([fileState]);
27610
27609
  toggleModal();
@@ -27633,7 +27632,7 @@ const Upload = ({
27633
27632
  const index = fileList.indexOf(file);
27634
27633
  const newFileList = fileList.slice();
27635
27634
  newFileList.splice(index, 1);
27636
- onChange === null || onChange === void 0 || onChange({
27635
+ onChange == null || onChange({
27637
27636
  fileList: newFileList,
27638
27637
  file
27639
27638
  });
@@ -27656,14 +27655,14 @@ const Upload = ({
27656
27655
  }
27657
27656
  function handleOpenFile(file) {
27658
27657
  var _String, _file$name;
27659
- let extension = (_String = String(file === null || file === 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();
27658
+ let extension = (_String = String(file == null || (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
27660
27659
  if (extension === 'pdf') {
27661
- window.open(file === null || file === void 0 ? void 0 : file.url);
27660
+ window.open(file == null ? void 0 : file.url);
27662
27661
  } else {
27663
- if (file !== null && file !== void 0 && file.url) {
27662
+ if (file != null && file.url) {
27664
27663
  const link = document.createElement('a');
27665
27664
  link.href = file.url;
27666
- link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
27665
+ link.setAttribute('download', file == null ? void 0 : file.name);
27667
27666
  document.body.appendChild(link);
27668
27667
  link.click();
27669
27668
  document.body.removeChild(link);
@@ -27725,12 +27724,12 @@ const Upload = ({
27725
27724
  }, replaceLabel && replaceLabel.length > 0 ? replaceLabel : t('replaceLabel', 'Ubah Berkas')));
27726
27725
  }
27727
27726
  const renderPicture = () => {
27728
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
27729
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
27727
+ return fileList == null ? void 0 : fileList.map((item, index) => {
27728
+ if ((item == null ? void 0 : item.status) === 'uploading') {
27730
27729
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
27731
27730
  key: index,
27732
- progress: item === null || item === void 0 ? void 0 : item.percent,
27733
- loading: item === null || item === void 0 ? void 0 : item.loading,
27731
+ progress: item == null ? void 0 : item.percent,
27732
+ loading: item == null ? void 0 : item.loading,
27734
27733
  __self: undefined,
27735
27734
  __source: {
27736
27735
  fileName: _jsxFileName$9,
@@ -27803,13 +27802,13 @@ const Upload = ({
27803
27802
  });
27804
27803
  };
27805
27804
  const renderFile = () => {
27806
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
27805
+ return fileList == null ? void 0 : fileList.map((item, index) => {
27807
27806
  var _item$name;
27808
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
27807
+ if ((item == null ? void 0 : item.status) === 'uploading') {
27809
27808
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
27810
27809
  key: index,
27811
- progress: item === null || item === void 0 ? void 0 : item.percent,
27812
- loading: item === null || item === void 0 ? void 0 : item.loading,
27810
+ progress: item == null ? void 0 : item.percent,
27811
+ loading: item == null ? void 0 : item.loading,
27813
27812
  __self: undefined,
27814
27813
  __source: {
27815
27814
  fileName: _jsxFileName$9,
@@ -27875,7 +27874,7 @@ const Upload = ({
27875
27874
  lineNumber: 666,
27876
27875
  columnNumber: 17
27877
27876
  }
27878
- }, ".", item === null || item === void 0 || (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
27877
+ }, ".", item == null || (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
27879
27878
  label: item.name,
27880
27879
  __self: undefined,
27881
27880
  __source: {
@@ -28245,7 +28244,7 @@ const Upload = ({
28245
28244
  }
28246
28245
  return /*#__PURE__*/React__default.createElement(Flex$1, {
28247
28246
  direction: "row",
28248
- gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
28247
+ gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
28249
28248
  wrap: "wrap",
28250
28249
  css: {
28251
28250
  userSelect: 'none'
@@ -29066,9 +29065,9 @@ const Separator$1 = styled('div', {
29066
29065
  function InputColorPicker(props) {
29067
29066
  const [isPopover, setIsPopover] = useState(false);
29068
29067
  function getColor() {
29069
- const color = props === null || props === void 0 ? void 0 : props.color;
29068
+ const color = props == null ? void 0 : props.color;
29070
29069
  if (typeof color === 'string') {
29071
- return color === null || color === void 0 ? void 0 : color.toUpperCase();
29070
+ return color == null ? void 0 : color.toUpperCase();
29072
29071
  }
29073
29072
  return `rgba(${color.r},${color.g},${color.b},${color.a})`;
29074
29073
  }
@@ -32087,7 +32086,7 @@ const Navigation = props => {
32087
32086
  var _data;
32088
32087
  const isActive = props.currentStep === i;
32089
32088
  const isComplete = props.isComplete[i - 1];
32090
- const isAdditional = (_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.additional;
32089
+ const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional;
32091
32090
  const lastItem = navMobileItems.indexOf(data[i - 1]) + 1 === navMobileItems.length;
32092
32091
  // eslint-disable-next-line no-lone-blocks
32093
32092
  {
@@ -32102,7 +32101,7 @@ const Navigation = props => {
32102
32101
  key: `step-${i}`,
32103
32102
  onClick: () => {
32104
32103
  var _data2;
32105
- if (props.onNavClicked && !((_data2 = data[i - 1]) !== null && _data2 !== void 0 && _data2.disabled) || isAdditional) props.onNavClicked(i);
32104
+ if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
32106
32105
  if (!forbidClickNav && isComplete && !isHide || isAdditional) {
32107
32106
  props.goToStep(i);
32108
32107
  }
@@ -32135,9 +32134,9 @@ const Navigation = props => {
32135
32134
  lineNumber: 176,
32136
32135
  columnNumber: 17
32137
32136
  }
32138
- }), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title) === null || _data$title === void 0 ? void 0 : _data$title.call(_data3), ((_data4 = data[i - 1]) === null || _data4 === void 0 ? void 0 : _data4.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
32137
+ }), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title) == null ? void 0 : _data$title.call(_data3), ((_data4 = data[i - 1]) == null ? void 0 : _data4.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
32139
32138
  align: "center",
32140
- label: (_data5 = data[i - 1]) === null || _data5 === void 0 ? void 0 : _data5.tooltipsContents,
32139
+ label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
32141
32140
  __self: undefined,
32142
32141
  __source: {
32143
32142
  fileName: _jsxFileName$4,
@@ -32156,9 +32155,9 @@ const Navigation = props => {
32156
32155
  lineNumber: 181,
32157
32156
  columnNumber: 19
32158
32157
  }
32159
- })), ((_data6 = data[i - 1]) === null || _data6 === void 0 ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32158
+ })), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32160
32159
  css: {
32161
- marginLeft: (_data7 = data[i - 1]) !== null && _data7 !== void 0 && _data7.withTolltip ? 0 : '$spacing-03'
32160
+ marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
32162
32161
  },
32163
32162
  align: "center",
32164
32163
  __self: undefined,
@@ -32209,10 +32208,10 @@ const Navigation = props => {
32209
32208
  lineNumber: 198,
32210
32209
  columnNumber: 21
32211
32210
  }
32212
- }, typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data8 = data[i - 1]).title) === null || _data$title2 === void 0 ? void 0 : _data$title2.call(_data8)), ((_data9 = data[i - 1]) === null || _data9 === void 0 ? void 0 : _data9.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
32211
+ }, typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data8 = data[i - 1]).title) == null ? void 0 : _data$title2.call(_data8)), ((_data9 = data[i - 1]) == null ? void 0 : _data9.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
32213
32212
  align: "center",
32214
32213
  withClick: true,
32215
- label: (_data10 = data[i - 1]) === null || _data10 === void 0 ? void 0 : _data10.tooltipsContents,
32214
+ label: (_data10 = data[i - 1]) == null ? void 0 : _data10.tooltipsContents,
32216
32215
  __self: undefined,
32217
32216
  __source: {
32218
32217
  fileName: _jsxFileName$4,
@@ -32228,11 +32227,11 @@ const Navigation = props => {
32228
32227
  lineNumber: 209,
32229
32228
  columnNumber: 25
32230
32229
  }
32231
- })), ((_data11 = data[i - 1]) === null || _data11 === void 0 ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32230
+ })), ((_data11 = data[i - 1]) == null ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32232
32231
  align: "center",
32233
32232
  justify: "center",
32234
32233
  css: {
32235
- marginTop: (_data12 = data[i - 1]) !== null && _data12 !== void 0 && _data12.withTolltip ? 0 : '$spacing-03'
32234
+ marginTop: (_data12 = data[i - 1]) != null && _data12.withTolltip ? 0 : '$spacing-03'
32236
32235
  },
32237
32236
  __self: undefined,
32238
32237
  __source: {
@@ -32256,7 +32255,7 @@ const Navigation = props => {
32256
32255
  userSelect: 'none',
32257
32256
  fontSize: '12px',
32258
32257
  textAlign: '-webkit-center',
32259
- display: ((_data13 = data[i - 1]) === null || _data13 === void 0 ? void 0 : _data13.disabled) && 'none',
32258
+ display: ((_data13 = data[i - 1]) == null ? void 0 : _data13.disabled) && 'none',
32260
32259
  marginTop: '$spacing-07',
32261
32260
  flex: 1,
32262
32261
  maxWidth: lastItem && 26
@@ -32336,7 +32335,7 @@ const Navigation = props => {
32336
32335
  height: 24,
32337
32336
  borderRadius: '$round',
32338
32337
  border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
32339
- backgroundColor: (_data14 = data[i - 1]) !== null && _data14 !== void 0 && _data14.disabled ? '$gray200' : '$white'
32338
+ backgroundColor: (_data14 = data[i - 1]) != null && _data14.disabled ? '$gray200' : '$white'
32340
32339
  },
32341
32340
  __self: undefined,
32342
32341
  __source: {
@@ -32365,53 +32364,50 @@ const Navigation = props => {
32365
32364
  }
32366
32365
  return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
32367
32366
  condition: !isMobile,
32368
- wrapper: child => {
32369
- var _props$appendContent;
32370
- return /*#__PURE__*/React__default.createElement(Box, {
32371
- css: {
32372
- opacity: isHide ? 0 : undefined,
32373
- maxWidth: 311
32374
- },
32375
- __self: undefined,
32376
- __source: {
32377
- fileName: _jsxFileName$4,
32378
- lineNumber: 281,
32379
- columnNumber: 9
32380
- }
32381
- }, /*#__PURE__*/React__default.createElement(Flex$1, {
32382
- css: {
32383
- position: !isMobile && 'sticky',
32384
- top: !isMobile ? 44 : 40
32385
- },
32386
- direction: "column",
32387
- gap: 7,
32388
- __self: undefined,
32389
- __source: {
32390
- fileName: _jsxFileName$4,
32391
- lineNumber: 282,
32392
- columnNumber: 11
32393
- }
32394
- }, /*#__PURE__*/React__default.createElement(Card, {
32395
- css: {
32396
- height: 'fit-content',
32397
- padding: 0
32398
- },
32399
- showBottomLine: false,
32400
- __self: undefined,
32401
- __source: {
32402
- fileName: _jsxFileName$4,
32403
- lineNumber: 283,
32404
- columnNumber: 13
32405
- }
32406
- }, child), /*#__PURE__*/React__default.createElement(Box, {
32407
- __self: undefined,
32408
- __source: {
32409
- fileName: _jsxFileName$4,
32410
- lineNumber: 292,
32411
- columnNumber: 13
32412
- }
32413
- }, typeof (props === null || props === void 0 ? void 0 : props.appendContent) === 'function' ? props === null || props === void 0 || (_props$appendContent = props.appendContent) === null || _props$appendContent === void 0 ? void 0 : _props$appendContent.call(props) : props === null || props === void 0 ? void 0 : props.appendContent)));
32414
- },
32367
+ wrapper: child => /*#__PURE__*/React__default.createElement(Box, {
32368
+ css: {
32369
+ opacity: isHide ? 0 : undefined,
32370
+ maxWidth: 311
32371
+ },
32372
+ __self: undefined,
32373
+ __source: {
32374
+ fileName: _jsxFileName$4,
32375
+ lineNumber: 281,
32376
+ columnNumber: 9
32377
+ }
32378
+ }, /*#__PURE__*/React__default.createElement(Flex$1, {
32379
+ css: {
32380
+ position: !isMobile && 'sticky',
32381
+ top: !isMobile ? 44 : 40
32382
+ },
32383
+ direction: "column",
32384
+ gap: 7,
32385
+ __self: undefined,
32386
+ __source: {
32387
+ fileName: _jsxFileName$4,
32388
+ lineNumber: 282,
32389
+ columnNumber: 11
32390
+ }
32391
+ }, /*#__PURE__*/React__default.createElement(Card, {
32392
+ css: {
32393
+ height: 'fit-content',
32394
+ padding: 0
32395
+ },
32396
+ showBottomLine: false,
32397
+ __self: undefined,
32398
+ __source: {
32399
+ fileName: _jsxFileName$4,
32400
+ lineNumber: 283,
32401
+ columnNumber: 13
32402
+ }
32403
+ }, child), /*#__PURE__*/React__default.createElement(Box, {
32404
+ __self: undefined,
32405
+ __source: {
32406
+ fileName: _jsxFileName$4,
32407
+ lineNumber: 292,
32408
+ columnNumber: 13
32409
+ }
32410
+ }, typeof (props == null ? void 0 : props.appendContent) === 'function' ? props == null || props.appendContent == null ? void 0 : props.appendContent() : props == null ? void 0 : props.appendContent))),
32415
32411
  __self: undefined,
32416
32412
  __source: {
32417
32413
  fileName: _jsxFileName$4,
@@ -32476,8 +32472,7 @@ const Default = props => {
32476
32472
  }));
32477
32473
  }, [props.hide]);
32478
32474
  useEffect(() => {
32479
- var _props$onChangeVisibi;
32480
- props === null || props === void 0 || (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 || _props$onChangeVisibi.call(props, state.hide);
32475
+ props == null || props.onChangeVisibility == null || props.onChangeVisibility(state.hide);
32481
32476
  }, [state.hide]);
32482
32477
  const toogleVisibility = value => {
32483
32478
  updateState(prev => Object.assign({}, prev, {
@@ -32486,11 +32481,11 @@ const Default = props => {
32486
32481
  };
32487
32482
  const getIsComplete = currentStep => {
32488
32483
  var _state$isComplete;
32489
- return state === null || state === void 0 || (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
32484
+ return state == null || (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
32490
32485
  };
32491
32486
  const getTitleStep = currentStep => {
32492
32487
  var _props$navContents;
32493
- return props === null || props === void 0 || (_props$navContents = props.navContents) === null || _props$navContents === void 0 || (_props$navContents = _props$navContents[currentStep - 1]) === null || _props$navContents === void 0 ? void 0 : _props$navContents.title;
32488
+ return props == null || (_props$navContents = props.navContents) == null || (_props$navContents = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents.title;
32494
32489
  };
32495
32490
  const setState = value => {
32496
32491
  updateState(Object.assign({}, state, value));
@@ -32524,13 +32519,13 @@ const Default = props => {
32524
32519
  block: 'start'
32525
32520
  });
32526
32521
  props.onStepChange && props.onStepChange(e);
32527
- if (props !== null && props !== void 0 && (_props$navContents2 = props.navContents) !== null && _props$navContents2 !== void 0 && (_props$navContents2 = _props$navContents2[(e === null || e === void 0 ? void 0 : e.activeStep) - 1]) !== null && _props$navContents2 !== void 0 && _props$navContents2.disabled) {
32528
- if ((e === null || e === void 0 ? void 0 : e.activeStep) > (e === null || e === void 0 ? void 0 : e.previousStep)) {
32522
+ if (props != null && (_props$navContents2 = props.navContents) != null && (_props$navContents2 = _props$navContents2[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents2.disabled) {
32523
+ if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
32529
32524
  var _state$SW;
32530
- state === null || state === void 0 || (_state$SW = state.SW) === null || _state$SW === void 0 || _state$SW.nextStep();
32525
+ state == null || (_state$SW = state.SW) == null || _state$SW.nextStep();
32531
32526
  } else {
32532
32527
  var _state$SW2;
32533
- state === null || state === void 0 || (_state$SW2 = state.SW) === null || _state$SW2 === void 0 || _state$SW2.previousStep();
32528
+ state == null || (_state$SW2 = state.SW) == null || _state$SW2.previousStep();
32534
32529
  }
32535
32530
  }
32536
32531
  };
@@ -32545,11 +32540,11 @@ const Default = props => {
32545
32540
  }, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
32546
32541
  value: {
32547
32542
  toogleVisibility,
32548
- isHide: state === null || state === void 0 ? void 0 : state.hide,
32543
+ isHide: state == null ? void 0 : state.hide,
32549
32544
  setComplete,
32550
32545
  setState,
32551
32546
  state,
32552
- SW: state === null || state === void 0 ? void 0 : state.SW,
32547
+ SW: state == null ? void 0 : state.SW,
32553
32548
  forbidClickNav: props.forbidClickNav,
32554
32549
  titles: props.titles,
32555
32550
  isMobile: props.isMobile,
@@ -32572,7 +32567,7 @@ const Default = props => {
32572
32567
  nav: /*#__PURE__*/React__default.createElement(Navigation, {
32573
32568
  onNavClicked: props.onNavClicked,
32574
32569
  isComplete: state.isComplete,
32575
- appendContent: props === null || props === void 0 ? void 0 : props.appendContent,
32570
+ appendContent: props == null ? void 0 : props.appendContent,
32576
32571
  __self: undefined,
32577
32572
  __source: {
32578
32573
  fileName: _jsxFileName$4,
@@ -32582,7 +32577,7 @@ const Default = props => {
32582
32577
  }),
32583
32578
  initialStep: props.initialStep,
32584
32579
  onStepChange: handleStepChange,
32585
- isLazyMount: props === null || props === void 0 ? void 0 : props.isLazyMount,
32580
+ isLazyMount: props == null ? void 0 : props.isLazyMount,
32586
32581
  __self: undefined,
32587
32582
  __source: {
32588
32583
  fileName: _jsxFileName$4,
@@ -32729,9 +32724,9 @@ function Content({
32729
32724
  var _getDatasets;
32730
32725
  function getDatasets(content, activeId, isCollapse) {
32731
32726
  const datasets = [];
32732
- for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
32727
+ for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
32733
32728
  var _content$i;
32734
- if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
32729
+ if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
32735
32730
  datasets.unshift(content[i]);
32736
32731
  } else {
32737
32732
  datasets.push(content[i]);
@@ -32769,7 +32764,7 @@ function Content({
32769
32764
  lineNumber: 107,
32770
32765
  columnNumber: 7
32771
32766
  }
32772
- }, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
32767
+ }, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
32773
32768
  return /*#__PURE__*/React__default.createElement(List, {
32774
32769
  key: index,
32775
32770
  __self: this,
@@ -32786,11 +32781,11 @@ function Content({
32786
32781
  marginLeft: '-4px !important',
32787
32782
  borderLeftWidth: '4px !important',
32788
32783
  borderLeftStyle: 'solid !important',
32789
- borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
32784
+ borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
32790
32785
  paddingLeft: '16px !important',
32791
32786
  minHeight: 25
32792
32787
  },
32793
- "data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
32788
+ "data-to-scrollspy-id": item == null ? void 0 : item.id,
32794
32789
  __self: this,
32795
32790
  __source: {
32796
32791
  fileName: _jsxFileName$2,
@@ -32799,13 +32794,13 @@ function Content({
32799
32794
  }
32800
32795
  }, /*#__PURE__*/React__default.createElement(Title$1, {
32801
32796
  className: "link-title",
32802
- active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
32803
- href: `#${item === null || item === void 0 ? void 0 : item.id}`,
32797
+ active: (item == null ? void 0 : item.id) === activeId,
32798
+ href: `#${item == null ? void 0 : item.id}`,
32804
32799
  onClick: e => {
32805
32800
  var _e$currentTarget, _e$currentTarget2;
32806
32801
  e.preventDefault();
32807
- onNavClick === null || onNavClick === void 0 || onNavClick(e === null || e === void 0 || (_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.href) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.split('#')) === null || _e$currentTarget === void 0 ? void 0 : _e$currentTarget[1]);
32808
- const target = window.document.getElementById(e === null || e === void 0 || (_e$currentTarget2 = e.currentTarget) === null || _e$currentTarget2 === void 0 || (_e$currentTarget2 = _e$currentTarget2.href) === null || _e$currentTarget2 === void 0 || (_e$currentTarget2 = _e$currentTarget2.split('#')) === null || _e$currentTarget2 === void 0 ? void 0 : _e$currentTarget2[1]);
32802
+ onNavClick == null || onNavClick(e == null || (_e$currentTarget = e.currentTarget) == null || (_e$currentTarget = _e$currentTarget.href) == null || (_e$currentTarget = _e$currentTarget.split('#')) == null ? void 0 : _e$currentTarget[1]);
32803
+ const target = window.document.getElementById(e == null || (_e$currentTarget2 = e.currentTarget) == null || (_e$currentTarget2 = _e$currentTarget2.href) == null || (_e$currentTarget2 = _e$currentTarget2.split('#')) == null ? void 0 : _e$currentTarget2[1]);
32809
32804
  if (target) {
32810
32805
  var headerOffset = 20;
32811
32806
  var elementPosition = target.getBoundingClientRect().top;
@@ -32829,7 +32824,7 @@ function Content({
32829
32824
  lineNumber: 125,
32830
32825
  columnNumber: 17
32831
32826
  }
32832
- }, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
32827
+ }, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
32833
32828
  })));
32834
32829
  }
32835
32830
  function TableOfContent({