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

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 +253 -236
  2. package/index.umd.js +253 -236
  3. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -5002,7 +5002,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
5002
5002
  onClick: e => {
5003
5003
  e.preventDefault();
5004
5004
  e.stopPropagation();
5005
- value == null || value.onRemove();
5005
+ value === null || value === void 0 || value.onRemove();
5006
5006
  },
5007
5007
  __self: undefined,
5008
5008
  __source: {
@@ -5021,6 +5021,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
5021
5021
  }
5022
5022
  })));
5023
5023
  const SingleTagBanner = props => {
5024
+ var _props$icon;
5024
5025
  return /*#__PURE__*/React.createElement(Flex$1, {
5025
5026
  gap: 2,
5026
5027
  direction: "column",
@@ -5046,7 +5047,7 @@ const SingleTagBanner = props => {
5046
5047
  lineNumber: 212,
5047
5048
  columnNumber: 9
5048
5049
  }
5049
- }, (props == null ? void 0 : props.icon) && /*#__PURE__*/React.createElement(Flex$1, {
5050
+ }, (props === null || props === void 0 ? void 0 : props.icon) && /*#__PURE__*/React.createElement(Flex$1, {
5050
5051
  css: {
5051
5052
  marginTop: '-2px'
5052
5053
  },
@@ -5056,7 +5057,7 @@ const SingleTagBanner = props => {
5056
5057
  lineNumber: 213,
5057
5058
  columnNumber: 27
5058
5059
  }
5059
- }, props == null || props.icon == null ? void 0 : props.icon()), /*#__PURE__*/React.createElement(Flex$1, {
5060
+ }, 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, {
5060
5061
  gap: 2,
5061
5062
  direction: "column",
5062
5063
  css: {
@@ -5087,7 +5088,7 @@ const SingleTagBanner = props => {
5087
5088
  onClick: e => {
5088
5089
  e.preventDefault();
5089
5090
  e.stopPropagation();
5090
- props == null || props.onRemove();
5091
+ props === null || props === void 0 || props.onRemove();
5091
5092
  },
5092
5093
  closeCenter: !props.title && !props.link,
5093
5094
  __self: undefined,
@@ -7904,7 +7905,7 @@ const InputTextArea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
7904
7905
  useEffect(() => {
7905
7906
  if (textareaRef.current) {
7906
7907
  textareaRef.current.style.height = '50px';
7907
- const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
7908
+ const scrollHeight = textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current.scrollHeight;
7908
7909
  textareaRef.current.style.height = scrollHeight + 5 + 'px';
7909
7910
  }
7910
7911
  }, []);
@@ -7959,7 +7960,7 @@ const InputRadioContext = /*#__PURE__*/React__default.createContext();
7959
7960
  var _jsxFileName$I = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputRadio/InputRadioGroup.js";
7960
7961
  const RadioGroup = styled(RadioGroupPrimitive.Root, Flex$1);
7961
7962
  function InputRadioGroup(props) {
7962
- return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
7963
+ return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
7963
7964
  value: props,
7964
7965
  __self: this,
7965
7966
  __source: {
@@ -7974,7 +7975,7 @@ function InputRadioGroup(props) {
7974
7975
  lineNumber: 14,
7975
7976
  columnNumber: 9
7976
7977
  }
7977
- }), React__default.Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
7978
+ }), React__default.Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
7978
7979
  style: Object.assign({}, child.props.style, {
7979
7980
  opacity: 1
7980
7981
  })
@@ -8162,8 +8163,9 @@ const InputRadio = _ref => {
8162
8163
  return /*#__PURE__*/React__default.createElement(InputNumber, _extends({}, inputProps, {
8163
8164
  readOnly: readOnly,
8164
8165
  onFocus: () => {
8166
+ var _inputProps$onFocus;
8165
8167
  onValueChange(props.value);
8166
- inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
8168
+ inputProps === null || inputProps === void 0 || (_inputProps$onFocus = inputProps.onFocus) === null || _inputProps$onFocus === void 0 || _inputProps$onFocus.call(inputProps);
8167
8169
  },
8168
8170
  asChild: true,
8169
8171
  __self: this,
@@ -8178,8 +8180,9 @@ const InputRadio = _ref => {
8178
8180
  disabled: disabled,
8179
8181
  readOnly: readOnly,
8180
8182
  onFocus: () => {
8183
+ var _inputProps$onFocus2;
8181
8184
  onValueChange(props.value);
8182
- inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
8185
+ inputProps === null || inputProps === void 0 || (_inputProps$onFocus2 = inputProps.onFocus) === null || _inputProps$onFocus2 === void 0 || _inputProps$onFocus2.call(inputProps);
8183
8186
  },
8184
8187
  asChild: true,
8185
8188
  __self: this,
@@ -10673,24 +10676,24 @@ var NumberFormat = /*@__PURE__*/function (superclass) {
10673
10676
  allowLeadingZeros,
10674
10677
  format
10675
10678
  } = Object.assign({}, ref);
10676
- const formattedValueStartsWithZero = (_formattedValue = formattedValue) == null ? void 0 : _formattedValue.startsWith(`${prefix}0`);
10677
- const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) == null ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
10679
+ const formattedValueStartsWithZero = (_formattedValue = formattedValue) === null || _formattedValue === void 0 ? void 0 : _formattedValue.startsWith(`${prefix}0`);
10680
+ const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) === null || _formattedValue2 === void 0 ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
10678
10681
  const emptyFormattedValue = prefix || suffix || prefix + suffix || '';
10679
10682
  if ((formattedValueStartsWithZero || formattedWithZeroAndSuffix) && !allowLeadingZeros && !format) {
10680
10683
  var _formattedValue3, _input$value;
10681
10684
  const isSpecialChar = /^[+-]/.test(formattedValue);
10682
- if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) != null && _formattedValue3.includes('0,'))) {
10685
+ if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) !== null && _formattedValue3 !== void 0 && _formattedValue3.includes('0,'))) {
10683
10686
  var _formattedValue4, _numAsString;
10684
- formattedValue = (_formattedValue4 = formattedValue) == null ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
10685
- numAsString = (_numAsString = numAsString) == null ? void 0 : _numAsString.replace(/^0+/, '');
10687
+ formattedValue = (_formattedValue4 = formattedValue) === null || _formattedValue4 === void 0 ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
10688
+ numAsString = (_numAsString = numAsString) === null || _numAsString === void 0 ? void 0 : _numAsString.replace(/^0+/, '');
10686
10689
  }
10687
- if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input == null ? void 0 : input.value)) {
10690
+ if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input === null || input === void 0 ? void 0 : input.value)) {
10688
10691
  formattedValue = `${prefix}0${suffix}`;
10689
10692
  numAsString = '0';
10690
- } else if (input != null && (_input$value = input.value) != null && _input$value.includes('0,')) {
10693
+ } else if (input !== null && input !== void 0 && (_input$value = input.value) !== null && _input$value !== void 0 && _input$value.includes('0,')) {
10691
10694
  allowLeadingZeros = true;
10692
- formattedValue = input == null ? void 0 : input.value;
10693
- numAsString = this.removeFormatting(input == null ? void 0 : input.value);
10695
+ formattedValue = input === null || input === void 0 ? void 0 : input.value;
10696
+ numAsString = this.removeFormatting(input === null || input === void 0 ? void 0 : input.value);
10694
10697
  }
10695
10698
  }
10696
10699
  //end adjustment
@@ -11148,7 +11151,7 @@ function countThousandSeparatorsByLength(numberLength) {
11148
11151
  }
11149
11152
  function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
11150
11153
  const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
11151
- return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
11154
+ return maxValue + (prefix === null || prefix === void 0 ? void 0 : prefix.length) + (suffix === null || suffix === void 0 ? void 0 : suffix.length) + tsLength;
11152
11155
  }
11153
11156
  const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
11154
11157
  let {
@@ -11200,9 +11203,9 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
11200
11203
  size: size,
11201
11204
  isInvalid: isInvalid,
11202
11205
  readOnly: readOnly,
11203
- isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
11206
+ isReadOnly: readOnly && !(props !== null && props !== void 0 && props.inputGroup) && !(props !== null && props !== void 0 && props.asChild),
11204
11207
  disabled: disabled,
11205
- maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
11208
+ maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props === null || props === void 0 ? void 0 : props.prefix, props === null || props === void 0 ? void 0 : props.suffix, thousandSeparator) : maxLength,
11206
11209
  thousandSeparator: thousandSeparator
11207
11210
  }, props, {
11208
11211
  __self: undefined,
@@ -11506,16 +11509,16 @@ function TagsInput(_ref) {
11506
11509
  const addTags = event => {
11507
11510
  if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
11508
11511
  if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
11509
- onEnter == null || onEnter({
11512
+ onEnter === null || onEnter === void 0 || onEnter({
11510
11513
  key: 'duplicate',
11511
11514
  value: event.target.value
11512
11515
  });
11513
11516
  return;
11514
11517
  }
11515
- if (pattern && pattern != null && pattern.regex) {
11518
+ if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
11516
11519
  const regex = new RegExp(pattern.regex);
11517
11520
  if (!regex.test(event.target.value)) {
11518
- onEnter == null || onEnter({
11521
+ onEnter === null || onEnter === void 0 || onEnter({
11519
11522
  key: 'error',
11520
11523
  value: event.target.value
11521
11524
  });
@@ -11524,7 +11527,7 @@ function TagsInput(_ref) {
11524
11527
  }
11525
11528
  }
11526
11529
  setRegexError(false);
11527
- onEnter == null || onEnter({
11530
+ onEnter === null || onEnter === void 0 || onEnter({
11528
11531
  key: 'success',
11529
11532
  value: event.target.value
11530
11533
  });
@@ -11536,7 +11539,7 @@ function TagsInput(_ref) {
11536
11539
  if (disabled || readOnly) {
11537
11540
  return tags;
11538
11541
  } else if (key === 'removeTag' || key === 'Backspace') {
11539
- onRemoveItem == null || onRemoveItem(tags[index]);
11542
+ onRemoveItem === null || onRemoveItem === void 0 || onRemoveItem(tags[index]);
11540
11543
  setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
11541
11544
  }
11542
11545
  };
@@ -11587,7 +11590,7 @@ function TagsInput(_ref) {
11587
11590
  lineNumber: 180,
11588
11591
  columnNumber: 9
11589
11592
  }
11590
- })), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
11593
+ })), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
11591
11594
  color: "red",
11592
11595
  __self: this,
11593
11596
  __source: {
@@ -11895,14 +11898,14 @@ const InputSearchbox = _ref => {
11895
11898
  t
11896
11899
  } = useTranslation(['MajooUI/inputSearchbox', 'translation']);
11897
11900
  const [value, setValue] = useState(defaultValue);
11898
- const inputValue = (_props$value = props == null ? void 0 : props.value) != null ? _props$value : value;
11899
- const debounceChange = useCallback(debounce(e => onChange == null ? void 0 : onChange(e), 1000), [onChange]);
11901
+ const inputValue = (_props$value = props === null || props === void 0 ? void 0 : props.value) != null ? _props$value : value;
11902
+ const debounceChange = useCallback(debounce(e => onChange === null || onChange === void 0 ? void 0 : onChange(e), 1000), [onChange]);
11900
11903
  const handleChange = useCallback(e => {
11901
11904
  setValue(e.target.value);
11902
11905
  if (withDebounce) {
11903
11906
  debounceChange(e.target.value);
11904
11907
  } else {
11905
- onChange == null || onChange(e.target.value);
11908
+ onChange === null || onChange === void 0 || onChange(e.target.value);
11906
11909
  }
11907
11910
  }, [onChange, debounceChange, withDebounce]);
11908
11911
  const handleClearButtonClick = e => {
@@ -11955,7 +11958,7 @@ const InputSearchbox = _ref => {
11955
11958
  columnNumber: 7
11956
11959
  }
11957
11960
  })), /*#__PURE__*/React__default.createElement(InputRightElement, {
11958
- children: (inputValue == null ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default.createElement(SvgCloseFilled, {
11961
+ children: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default.createElement(SvgCloseFilled, {
11959
11962
  color: colors$7.iconSecondary,
11960
11963
  __self: undefined,
11961
11964
  __source: {
@@ -12200,7 +12203,7 @@ const Popover = ({
12200
12203
  middleware: [offset(_sideOffset), shift$2(), _flip && flip()],
12201
12204
  onOpenChange: isOpen => {
12202
12205
  setOpenState(isOpen);
12203
- !isOpen && (onClose == null ? void 0 : onClose());
12206
+ !isOpen && (onClose === null || onClose === void 0 ? void 0 : onClose());
12204
12207
  },
12205
12208
  placement
12206
12209
  });
@@ -13052,16 +13055,24 @@ const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
13052
13055
  const selectBoxRef = useRef(null);
13053
13056
  const scrollerRef = useRef(null);
13054
13057
  useEffect(() => {
13055
- var _a, _b;
13058
+ var _a;
13056
13059
  if (search && Boolean(query)) {
13057
13060
  (_a = scrollerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
13058
13061
  top: 0
13059
13062
  });
13060
13063
  return;
13061
13064
  }
13062
- (_b = scrollerRef.current) === null || _b === void 0 ? void 0 : _b.scrollTo({
13063
- top: selectedIndex * 30
13064
- });
13065
+ const scrollToSelectedElement = () => {
13066
+ const element = document.querySelector(`[data-index="${selectedIndex}"]`);
13067
+ if (element) {
13068
+ const scrollContainer = scrollerRef.current;
13069
+ //@ts-ignore
13070
+ const elementPosition = element.offsetTop - scrollContainer.offsetTop;
13071
+ //@ts-ignore
13072
+ scrollContainer.scrollTop = elementPosition;
13073
+ }
13074
+ };
13075
+ scrollToSelectedElement();
13065
13076
  }, [query, search, openOptions, open, selectedIndex]);
13066
13077
  const handleInputValue = (value, isReset = false) => {
13067
13078
  if (onSearch && !isReset) onSearch(value);
@@ -13385,6 +13396,7 @@ const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
13385
13396
  key: (_a = item.value) !== null && _a !== void 0 ? _a : index,
13386
13397
  hasGroup: !!item.group,
13387
13398
  isGroup: item.isGroup,
13399
+ "data-index": index,
13388
13400
  css: Object.assign({}, !item.isGroup ? item.isDisabled ? {
13389
13401
  backgroundColor: 'unset',
13390
13402
  cursor: 'not-allowed',
@@ -13989,13 +14001,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13989
14001
  const isShowSelectAll = showSelectAll && !maxSelectedItem;
13990
14002
  useEffect(() => {
13991
14003
  var _scrollerRef$current;
13992
- (_scrollerRef$current = scrollerRef.current) == null || _scrollerRef$current.scrollTo({
14004
+ (_scrollerRef$current = scrollerRef.current) === null || _scrollerRef$current === void 0 || _scrollerRef$current.scrollTo({
13993
14005
  top: 0
13994
14006
  });
13995
14007
  }, [query]);
13996
14008
  useEffect(() => {
13997
- if (defaultValue != null && defaultValue.length) {
13998
- if (value != null && value.length) {
14009
+ if (defaultValue !== null && defaultValue !== void 0 && defaultValue.length) {
14010
+ if (value !== null && value !== void 0 && value.length) {
13999
14011
  setInputSelectValue(value);
14000
14012
  }
14001
14013
  } else {
@@ -14060,7 +14072,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14060
14072
  removeSelectedItem,
14061
14073
  selectedItems
14062
14074
  } = useMultipleSelection({
14063
- 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)) : []
14075
+ 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)) : []
14064
14076
  });
14065
14077
  const generateOptions = data => {
14066
14078
  return data.map(option => {
@@ -14082,7 +14094,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14082
14094
  };
14083
14095
  const debouncedSearch = React__default.useRef(debounce(async query => {
14084
14096
  setQuery(query);
14085
- onSearch == null || onSearch(query);
14097
+ onSearch === null || onSearch === void 0 || onSearch(query);
14086
14098
  }, 1000)).current;
14087
14099
  React__default.useEffect(() => {
14088
14100
  return () => {
@@ -14090,7 +14102,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14090
14102
  };
14091
14103
  }, [debouncedSearch]);
14092
14104
  const handleInputValue = input => {
14093
- onSearch == null || onSearch(input);
14105
+ onSearch === null || onSearch === void 0 || onSearch(input);
14094
14106
  if (input === '') {
14095
14107
  if (disabledOptions.length > 0) {
14096
14108
  setItems(generateOptions(sortDisabled));
@@ -14098,9 +14110,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14098
14110
  return setItems(sortValue);
14099
14111
  }
14100
14112
  } else {
14101
- let filterItems = option == null ? void 0 : option.filter(item => {
14102
- var _item$name;
14103
- 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());
14113
+ let filterItems = option === null || option === void 0 ? void 0 : option.filter(item => {
14114
+ var _item$name, _item$name$includes, _input$toLocaleLowerC;
14115
+ 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));
14104
14116
  });
14105
14117
  setItems(filterItems);
14106
14118
  }
@@ -14109,10 +14121,10 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14109
14121
  if (disabled || readOnly) {
14110
14122
  return selectedValue;
14111
14123
  } else {
14112
- if ((selected == null ? void 0 : selected.id) === 'counter') {
14124
+ if ((selected === null || selected === void 0 ? void 0 : selected.id) === 'counter') {
14113
14125
  setSelectedValue([]);
14114
14126
  setInputSelectValue([]);
14115
- onChange == null || onChange([]);
14127
+ onChange === null || onChange === void 0 || onChange([]);
14116
14128
  for (let i = 0; i < selectedValue.length; i++) {
14117
14129
  removeSelectedItem(selectedValue[i]);
14118
14130
  }
@@ -14122,7 +14134,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14122
14134
  setSelectedValue(filterItems);
14123
14135
  setInputSelectValue(filterItems);
14124
14136
  if (selected.id !== '!all') {
14125
- onChange == null || onChange(filterItems);
14137
+ onChange === null || onChange === void 0 || onChange(filterItems);
14126
14138
  }
14127
14139
  }
14128
14140
  }
@@ -14160,9 +14172,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14160
14172
  if (selectedItem.id === '!all') {
14161
14173
  items.forEach(item => {
14162
14174
  var _item$children;
14163
- if (item != null && (_item$children = item.children) != null && _item$children.length) {
14175
+ if (item !== null && item !== void 0 && (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
14164
14176
  var _item$children2;
14165
- item == null || (_item$children2 = item.children) == null || _item$children2.forEach(item => {
14177
+ item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 || _item$children2.forEach(item => {
14166
14178
  removeSelectedItem(item);
14167
14179
  });
14168
14180
  } else {
@@ -14171,7 +14183,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14171
14183
  });
14172
14184
  setSelectedValue([]);
14173
14185
  setInputSelectValue([]);
14174
- onChange == null || onChange([]);
14186
+ onChange === null || onChange === void 0 || onChange([]);
14175
14187
  } else {
14176
14188
  removeItem(selectedItem);
14177
14189
  }
@@ -14182,9 +14194,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14182
14194
  const itemIds = [];
14183
14195
  items.forEach(item => {
14184
14196
  var _item$children3;
14185
- if (item != null && (_item$children3 = item.children) != null && _item$children3.length) {
14197
+ if (item !== null && item !== void 0 && (_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length) {
14186
14198
  var _item$children4;
14187
- item == null || (_item$children4 = item.children) == null || _item$children4.forEach(item => {
14199
+ item === null || item === void 0 || (_item$children4 = item.children) === null || _item$children4 === void 0 || _item$children4.forEach(item => {
14188
14200
  addSelectedItem(item);
14189
14201
  itemIds.push(item.id);
14190
14202
  });
@@ -14196,16 +14208,16 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14196
14208
  setSelectedValue(itemIds);
14197
14209
  setInputSelectValue(itemIds);
14198
14210
  // onChange?.(itemIds.slice(1).filter(id => !items.find(item => item.id === id)?.children?.length));
14199
- onChange == null || onChange(itemIds.slice(1));
14211
+ onChange === null || onChange === void 0 || onChange(itemIds.slice(1));
14200
14212
  } else {
14201
14213
  var _selectedItem$childre;
14202
14214
  //start check if item have children (option group)
14203
- if (selectedItem != null && (_selectedItem$childre = selectedItem.children) != null && _selectedItem$childre.length) {
14215
+ if (selectedItem !== null && selectedItem !== void 0 && (_selectedItem$childre = selectedItem.children) !== null && _selectedItem$childre !== void 0 && _selectedItem$childre.length) {
14204
14216
  var _selectedItem$childre2;
14205
14217
  const itemIdsSelect = [];
14206
14218
  const itemIdsUnSelect = [];
14207
- selectedItem == null || (_selectedItem$childre2 = selectedItem.children) == null || _selectedItem$childre2.forEach(item => {
14208
- if (selectedValue != null && selectedValue.includes(item.id)) {
14219
+ selectedItem === null || selectedItem === void 0 || (_selectedItem$childre2 = selectedItem.children) === null || _selectedItem$childre2 === void 0 || _selectedItem$childre2.forEach(item => {
14220
+ if (selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id)) {
14209
14221
  removeSelectedItem(item);
14210
14222
  itemIdsUnSelect.push(item.id);
14211
14223
  } else {
@@ -14219,19 +14231,19 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14219
14231
  setSelectedValue([...selectedValue, ...itemIdsSelect]);
14220
14232
  setInputSelectValue([...selectedValue, ...itemIdsSelect]);
14221
14233
  const _filteredSelectedValues = selectedValue.filter(val => val !== '!all');
14222
- onChange == null || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
14234
+ onChange === null || onChange === void 0 || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
14223
14235
  }
14224
14236
 
14225
14237
  //unselect all child in one of the option groups
14226
14238
  if (itemIdsUnSelect.length) {
14227
14239
  const newSelectedValue = selectedValue.filter(selId => {
14228
14240
  var _itemIdsUnSelect$filt;
14229
- return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) == null ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
14241
+ return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) === null || _itemIdsUnSelect$filt === void 0 ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
14230
14242
  });
14231
14243
  setSelectedValue(newSelectedValue);
14232
14244
  setInputSelectValue(newSelectedValue);
14233
14245
  const _filteredSelectedValues2 = newSelectedValue.filter(val => val !== '!all');
14234
- onChange == null || onChange(_filteredSelectedValues2);
14246
+ onChange === null || onChange === void 0 || onChange(_filteredSelectedValues2);
14235
14247
  }
14236
14248
  return;
14237
14249
  }
@@ -14248,7 +14260,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14248
14260
  setSelectedValue([...selectedValue, selectedItem.id]);
14249
14261
  setInputSelectValue([...selectedValue, selectedItem.id]);
14250
14262
  const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
14251
- onChange == null || onChange([...filteredSelectedValues, selectedItem.id]);
14263
+ onChange === null || onChange === void 0 || onChange([...filteredSelectedValues, selectedItem.id]);
14252
14264
  }
14253
14265
  selectItem(null);
14254
14266
  }
@@ -14280,9 +14292,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14280
14292
  }
14281
14293
  }
14282
14294
  });
14283
- const getOption = useCallback(() => maxSelectedItem ? option == null ? void 0 : option.map(item => {
14284
- const isMaxSelectedItem = maxSelectedItem && (selectedValue == null ? void 0 : selectedValue.length) >= maxSelectedItem;
14285
- if (isMaxSelectedItem && !(selectedValue != null && selectedValue.includes(item.id))) {
14295
+ const getOption = useCallback(() => maxSelectedItem ? option === null || option === void 0 ? void 0 : option.map(item => {
14296
+ const isMaxSelectedItem = maxSelectedItem && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) >= maxSelectedItem;
14297
+ if (isMaxSelectedItem && !(selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id))) {
14286
14298
  item.hideCheck = true;
14287
14299
  item.isDisabled = true;
14288
14300
  } else {
@@ -14291,7 +14303,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14291
14303
  }
14292
14304
  return item;
14293
14305
  }) : option, [maxSelectedItem, option, selectedValue]);
14294
- const itemsLength = items == null ? void 0 : items.reduce((acc, item) => {
14306
+ const itemsLength = items === null || items === void 0 ? void 0 : items.reduce((acc, item) => {
14295
14307
  return [...acc, ...(item.children ? item.children : [item])];
14296
14308
  }, []).length;
14297
14309
  useEffect(() => {
@@ -14338,15 +14350,16 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14338
14350
  }, [label, isOpen]);
14339
14351
  const toggleCollapsible = () => setShowAllTags(!showAllTags);
14340
14352
  const handleRemoveAllItem = () => {
14341
- onChange == null || onChange([]);
14353
+ onChange === null || onChange === void 0 || onChange([]);
14342
14354
  setSelectedValue([]);
14343
14355
  setInputSelectValue([]);
14344
14356
  for (let i = 0; i < selectedValue.length; i++) {
14345
14357
  removeSelectedItem(selectedValue[i]);
14346
14358
  }
14347
14359
  };
14348
- const isShowTagSelectAll = showTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > (option == null ? void 0 : option.length);
14360
+ const isShowTagSelectAll = showTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > (option === null || option === void 0 ? void 0 : option.length);
14349
14361
  const renderOptionItem = (item, index, asChild) => {
14362
+ var _item$render;
14350
14363
  return /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
14351
14364
  key: item.id
14352
14365
  }, getItemProps({
@@ -14379,7 +14392,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14379
14392
  lineNumber: 745,
14380
14393
  columnNumber: 11
14381
14394
  }
14382
- }, !(item != null && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14395
+ }, !(item !== null && item !== void 0 && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14383
14396
  color: colors$8.iconDisable,
14384
14397
  __self: undefined,
14385
14398
  __source: {
@@ -14395,7 +14408,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14395
14408
  lineNumber: 760,
14396
14409
  columnNumber: 19
14397
14410
  }
14398
- })), 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, {
14411
+ })), 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, {
14399
14412
  __self: undefined,
14400
14413
  __source: {
14401
14414
  fileName: _jsxFileName$y,
@@ -14420,15 +14433,15 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14420
14433
  lineNumber: 769,
14421
14434
  columnNumber: 11
14422
14435
  }
14423
- }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name));
14436
+ }, item.render ? (_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.call(item, item.name) : item.name));
14424
14437
  };
14425
14438
  let lastGroupIndex = showSelectAll ? 1 : 0;
14426
14439
  const renderOptionGroupItem = (item, index) => {
14427
- var _item$children5, _item$children6, _item$children7, _item$children8;
14440
+ var _item$children5, _item$children6, _item$children7, _item$render2, _item$children8;
14428
14441
  // const groupIndex = (index > (showSelectAll ? 1 : 0)) ? lastGroupIndex : 0;
14429
14442
  const groupIndex = lastGroupIndex;
14430
- lastGroupIndex += ((item == null || (_item$children5 = item.children) == null ? void 0 : _item$children5.length) || 0) + 1;
14431
- const filterSelectedChild = item == null || (_item$children6 = item.children) == null ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
14443
+ lastGroupIndex += ((item === null || item === void 0 || (_item$children5 = item.children) === null || _item$children5 === void 0 ? void 0 : _item$children5.length) || 0) + 1;
14444
+ 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);
14432
14445
  return /*#__PURE__*/React__default.createElement(OptionGroupItem, {
14433
14446
  item: /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
14434
14447
  key: item.id
@@ -14461,7 +14474,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14461
14474
  lineNumber: 799,
14462
14475
  columnNumber: 15
14463
14476
  }
14464
- }, !(item != null && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14477
+ }, !(item !== null && item !== void 0 && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14465
14478
  color: colors$8.iconDisable,
14466
14479
  __self: undefined,
14467
14480
  __source: {
@@ -14469,7 +14482,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14469
14482
  lineNumber: 809,
14470
14483
  columnNumber: 19
14471
14484
  }
14472
- }) : (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, {
14485
+ }) : (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, {
14473
14486
  color: colors$8.iconGreen,
14474
14487
  __self: undefined,
14475
14488
  __source: {
@@ -14477,7 +14490,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14477
14490
  lineNumber: 811,
14478
14491
  columnNumber: 19
14479
14492
  }
14480
- }) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
14493
+ }) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
14481
14494
  __self: undefined,
14482
14495
  __source: {
14483
14496
  fileName: _jsxFileName$y,
@@ -14495,14 +14508,14 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14495
14508
  lineNumber: 816,
14496
14509
  columnNumber: 15
14497
14510
  }
14498
- }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name)),
14511
+ }, item.render ? (_item$render2 = item.render) === null || _item$render2 === void 0 ? void 0 : _item$render2.call(item, item.name) : item.name)),
14499
14512
  __self: undefined,
14500
14513
  __source: {
14501
14514
  fileName: _jsxFileName$y,
14502
14515
  lineNumber: 784,
14503
14516
  columnNumber: 9
14504
14517
  }
14505
- }, item == null || (_item$children8 = item.children) == null ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
14518
+ }, 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)));
14506
14519
  };
14507
14520
  return /*#__PURE__*/React__default.createElement(Wrapper$1, _extends({
14508
14521
  css: css
@@ -14633,13 +14646,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14633
14646
  lineNumber: 875,
14634
14647
  columnNumber: 17
14635
14648
  }
14636
- }), 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) => {
14649
+ }), 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) => {
14637
14650
  if (showAllTags || !collapsible) {
14638
14651
  return true;
14639
14652
  } else {
14640
14653
  return idx < 5;
14641
14654
  }
14642
- })) == null ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
14655
+ })) === null || _selectedItems$filter === void 0 ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
14643
14656
  disabled: disabled,
14644
14657
  isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
14645
14658
  size: "lg",
@@ -14664,7 +14677,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14664
14677
  lineNumber: 904,
14665
14678
  columnNumber: 21
14666
14679
  }
14667
- }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default.createElement(Flex$1, {
14680
+ }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default.createElement(Flex$1, {
14668
14681
  direction: "column",
14669
14682
  gap: 4,
14670
14683
  __self: undefined,
@@ -14750,7 +14763,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14750
14763
  lineNumber: 947,
14751
14764
  columnNumber: 19
14752
14765
  }
14753
- }, `${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, {
14766
+ }, `${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, {
14754
14767
  css: {
14755
14768
  fontSize: '$label',
14756
14769
  marginTop: '$spacing-01'
@@ -14762,7 +14775,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14762
14775
  lineNumber: 957,
14763
14776
  columnNumber: 11
14764
14777
  }
14765
- }, `${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, {
14778
+ }, `${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, {
14766
14779
  placement: placement,
14767
14780
  css: {
14768
14781
  display: isOpen && disabled === false ? 'block' : 'none',
@@ -14820,7 +14833,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14820
14833
  }), /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
14821
14834
  condition: !!fetchData && items.length > 0,
14822
14835
  wrapper: child => /*#__PURE__*/React__default.createElement(InfiniteScroll, {
14823
- loadMore: () => !isLoading && (fetchData == null ? void 0 : fetchData({
14836
+ loadMore: () => !isLoading && (fetchData === null || fetchData === void 0 ? void 0 : fetchData({
14824
14837
  query
14825
14838
  })),
14826
14839
  hasMore: true,
@@ -14839,7 +14852,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14839
14852
  lineNumber: 997,
14840
14853
  columnNumber: 15
14841
14854
  }
14842
- }, isOpen && items.map((item, index) => item != null && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
14855
+ }, isOpen && items.map((item, index) => item !== null && item !== void 0 && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
14843
14856
  css: {
14844
14857
  height: 'auto'
14845
14858
  }
@@ -18387,9 +18400,9 @@ const NativeTimePicker = ({
18387
18400
  }
18388
18401
  function handleInputChange(type, e) {
18389
18402
  var _e$target;
18390
- const value = e == null || (_e$target = e.target) == null ? void 0 : _e$target.value;
18403
+ const value = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
18391
18404
  const format = 'DD:MM:YYYY:HH:mm';
18392
- const minLength = (value == null ? void 0 : value.length) > 1;
18405
+ const minLength = (value === null || value === void 0 ? void 0 : value.length) > 1;
18393
18406
  const hourValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:mm')}:${params}`, 'DD:MM:YYYY:mm:HH').toDate());
18394
18407
  const minuteValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:HH')}:${params}`, 'DD:MM:YYYY:HH:mm').toDate());
18395
18408
  if (!disabled) {
@@ -20950,7 +20963,7 @@ const NotificationBadge = _ref => {
20950
20963
  };
20951
20964
  };
20952
20965
  const getValue = () => {
20953
- let value = props == null ? void 0 : props.value;
20966
+ let value = props === null || props === void 0 ? void 0 : props.value;
20954
20967
  const isTrailing = variantIcon === 'trailing';
20955
20968
  if (typeof value === 'number' || parseInt(value)) {
20956
20969
  if (Math.sign(value) === 1 || Math.sign(value) === 0) {
@@ -21583,7 +21596,7 @@ const PaginationButton = ({
21583
21596
  justify: "center",
21584
21597
  onClick: () => {
21585
21598
  var _dialogPageRef$curren;
21586
- return (_dialogPageRef$curren = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren.click();
21599
+ return (_dialogPageRef$curren = dialogPageRef.current) === null || _dialogPageRef$curren === void 0 ? void 0 : _dialogPageRef$curren.click();
21587
21600
  },
21588
21601
  __self: undefined,
21589
21602
  __source: {
@@ -21661,7 +21674,7 @@ const PaginationButton = ({
21661
21674
  onSubmit: () => {
21662
21675
  var _dialogPageRef$curren2;
21663
21676
  debouncedGoToPage(Number(goToPage));
21664
- (_dialogPageRef$curren2 = dialogPageRef.current) == null || _dialogPageRef$curren2.click();
21677
+ (_dialogPageRef$curren2 = dialogPageRef.current) === null || _dialogPageRef$curren2 === void 0 || _dialogPageRef$curren2.click();
21665
21678
  },
21666
21679
  __self: undefined,
21667
21680
  __source: {
@@ -21678,7 +21691,7 @@ const PaginationButton = ({
21678
21691
  allowNegative: false,
21679
21692
  onChange: e => {
21680
21693
  var _e$target;
21681
- return setGoToPage((_e$target = e.target) == null ? void 0 : _e$target.value);
21694
+ return setGoToPage((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
21682
21695
  },
21683
21696
  __self: undefined,
21684
21697
  __source: {
@@ -21711,7 +21724,7 @@ const PaginationButton = ({
21711
21724
  onClick: () => {
21712
21725
  var _dialogPageRef$curren3;
21713
21726
  setGoToPage(null);
21714
- (_dialogPageRef$curren3 = dialogPageRef.current) == null || _dialogPageRef$curren3.click();
21727
+ (_dialogPageRef$curren3 = dialogPageRef.current) === null || _dialogPageRef$curren3 === void 0 || _dialogPageRef$curren3.click();
21715
21728
  },
21716
21729
  __self: undefined,
21717
21730
  __source: {
@@ -21726,7 +21739,7 @@ const PaginationButton = ({
21726
21739
  onClick: () => {
21727
21740
  var _dialogPageRef$curren4;
21728
21741
  debouncedGoToPage(Number(goToPage));
21729
- (_dialogPageRef$curren4 = dialogPageRef.current) == null || _dialogPageRef$curren4.click();
21742
+ (_dialogPageRef$curren4 = dialogPageRef.current) === null || _dialogPageRef$curren4 === void 0 || _dialogPageRef$curren4.click();
21730
21743
  },
21731
21744
  __self: undefined,
21732
21745
  __source: {
@@ -21815,7 +21828,7 @@ function PaginationInfo(_ref) {
21815
21828
  onClick: () => {
21816
21829
  if (isMobilePagination) {
21817
21830
  var _dialogLimitRef$curre;
21818
- (_dialogLimitRef$curre = dialogLimitRef.current) == null || _dialogLimitRef$curre.click();
21831
+ (_dialogLimitRef$curre = dialogLimitRef.current) === null || _dialogLimitRef$curre === void 0 || _dialogLimitRef$curre.click();
21819
21832
  }
21820
21833
  },
21821
21834
  __self: this,
@@ -21861,7 +21874,7 @@ function PaginationInfo(_ref) {
21861
21874
  lineNumber: 60,
21862
21875
  columnNumber: 13
21863
21876
  }
21864
- }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
21877
+ }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
21865
21878
  key: limit,
21866
21879
  css: limitItemContainerStyle(selectedLimit === limit),
21867
21880
  onClick: () => onChange(limit),
@@ -21944,7 +21957,7 @@ function PaginationInfo(_ref) {
21944
21957
  lineNumber: 100,
21945
21958
  columnNumber: 11
21946
21959
  }
21947
- }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
21960
+ }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
21948
21961
  css: {
21949
21962
  height: 44,
21950
21963
  width: '100%',
@@ -21959,7 +21972,7 @@ function PaginationInfo(_ref) {
21959
21972
  onClick: () => {
21960
21973
  var _dialogLimitRef$curre2;
21961
21974
  onChange(limit);
21962
- (_dialogLimitRef$curre2 = dialogLimitRef.current) == null || _dialogLimitRef$curre2.click();
21975
+ (_dialogLimitRef$curre2 = dialogLimitRef.current) === null || _dialogLimitRef$curre2 === void 0 || _dialogLimitRef$curre2.click();
21963
21976
  },
21964
21977
  __self: this,
21965
21978
  __source: {
@@ -24081,7 +24094,7 @@ const rowMenuColumn = (options, icon, config) => ({
24081
24094
  onClick: () => {
24082
24095
  var _document$getElements;
24083
24096
  setOpenDrop(true);
24084
- const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
24097
+ const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) === null || _document$getElements === void 0 ? void 0 : _document$getElements[0];
24085
24098
  contextMenu.style.opacity = 0;
24086
24099
  },
24087
24100
  __self: undefined,
@@ -24730,7 +24743,7 @@ const TemplateAlertFunction = props => {
24730
24743
  if (!props.onOpenAutoFocus) {
24731
24744
  e.preventDefault();
24732
24745
  } else {
24733
- props == null || props.onOpenAutoFocus();
24746
+ props === null || props === void 0 || props.onOpenAutoFocus();
24734
24747
  }
24735
24748
  },
24736
24749
  __self: undefined,
@@ -24810,7 +24823,7 @@ const TemplateAlertFunction = props => {
24810
24823
  }, props.description)), /*#__PURE__*/React__default.createElement(Box, {
24811
24824
  css: {
24812
24825
  width: '100%',
24813
- display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
24826
+ display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
24814
24827
  },
24815
24828
  __self: undefined,
24816
24829
  __source: {
@@ -24852,8 +24865,8 @@ const TemplateAlertFunction = props => {
24852
24865
  size: props.btnSize,
24853
24866
  onClick: buttonConfirm,
24854
24867
  buttonType: props.dialogType,
24855
- disabled: props == null ? void 0 : props.disabledButton
24856
- }, props == null ? void 0 : props.actionButtonProps, {
24868
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24869
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
24857
24870
  __self: undefined,
24858
24871
  __source: {
24859
24872
  fileName: _jsxFileName$b,
@@ -24872,19 +24885,19 @@ const TemplateAlertFunction = props => {
24872
24885
  size: props.btnSize,
24873
24886
  onClick: buttonCancel,
24874
24887
  css: {
24875
- color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
24888
+ color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
24876
24889
  flex: props.isMobile && 1
24877
24890
  },
24878
- buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
24879
- disabled: props == null ? void 0 : props.disabledButton
24880
- }, props == null ? void 0 : props.cancelButtonProps, {
24891
+ buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
24892
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24893
+ }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
24881
24894
  __self: undefined,
24882
24895
  __source: {
24883
24896
  fileName: _jsxFileName$b,
24884
24897
  lineNumber: 187,
24885
24898
  columnNumber: 19
24886
24899
  }
24887
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
24900
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
24888
24901
  asChild: true,
24889
24902
  __self: undefined,
24890
24903
  __source: {
@@ -24899,8 +24912,8 @@ const TemplateAlertFunction = props => {
24899
24912
  css: {
24900
24913
  flex: props.isMobile && 1
24901
24914
  },
24902
- disabled: props == null ? void 0 : props.disabledButton
24903
- }, props == null ? void 0 : props.actionButtonProps, {
24915
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24916
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
24904
24917
  __self: undefined,
24905
24918
  __source: {
24906
24919
  fileName: _jsxFileName$b,
@@ -25030,7 +25043,7 @@ function AlertDialog(props) {
25030
25043
  }, props.description)), /*#__PURE__*/React__default.createElement(Box, {
25031
25044
  css: {
25032
25045
  width: '100%',
25033
- display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
25046
+ display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
25034
25047
  },
25035
25048
  __self: this,
25036
25049
  __source: {
@@ -25075,8 +25088,8 @@ function AlertDialog(props) {
25075
25088
  css: {
25076
25089
  flex: props.isMobile && 1
25077
25090
  },
25078
- disabled: props == null ? void 0 : props.disabledButton
25079
- }, props == null ? void 0 : props.actionButtonProps, {
25091
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25092
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25080
25093
  __self: this,
25081
25094
  __source: {
25082
25095
  fileName: _jsxFileName$b,
@@ -25095,19 +25108,19 @@ function AlertDialog(props) {
25095
25108
  size: props.btnSize,
25096
25109
  onClick: props.onCancel,
25097
25110
  css: {
25098
- color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
25111
+ color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
25099
25112
  flex: props.isMobile && 1
25100
25113
  },
25101
- buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25102
- disabled: props == null ? void 0 : props.disabledButton
25103
- }, props == null ? void 0 : props.cancelButtonProps, {
25114
+ buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25115
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25116
+ }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
25104
25117
  __self: this,
25105
25118
  __source: {
25106
25119
  fileName: _jsxFileName$b,
25107
25120
  lineNumber: 293,
25108
25121
  columnNumber: 19
25109
25122
  }
25110
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
25123
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
25111
25124
  asChild: true,
25112
25125
  __self: this,
25113
25126
  __source: {
@@ -25122,8 +25135,8 @@ function AlertDialog(props) {
25122
25135
  css: {
25123
25136
  flex: props.isMobile && 1
25124
25137
  },
25125
- disabled: props == null ? void 0 : props.disabledButton
25126
- }, props == null ? void 0 : props.actionButtonProps, {
25138
+ disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25139
+ }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25127
25140
  __self: this,
25128
25141
  __source: {
25129
25142
  fileName: _jsxFileName$b,
@@ -27613,7 +27626,7 @@ const Upload = ({
27613
27626
  upload({
27614
27627
  url: action,
27615
27628
  file: newFile,
27616
- customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
27629
+ customBody: customBodyRequest === null || customBodyRequest === void 0 ? void 0 : customBodyRequest(newFile),
27617
27630
  token,
27618
27631
  tokenKey,
27619
27632
  reqKey,
@@ -27633,12 +27646,12 @@ const Upload = ({
27633
27646
  arrProgress[i] = fileProgress;
27634
27647
  }
27635
27648
  }
27636
- onChange == null || (_onChange = onChange({
27649
+ onChange === null || onChange === void 0 || (_onChange = onChange({
27637
27650
  fileList: arrProgress,
27638
27651
  file: fileProgress,
27639
27652
  indexReplace: indexReplace.current,
27640
27653
  isReplace: indexReplace.current !== null
27641
- })) == null || (_onChange = _onChange.then(() => setError(null))) == null || _onChange.catch(error => setError(error.message));
27654
+ })) === null || _onChange === void 0 || (_onChange = _onChange.then(() => setError(null))) === null || _onChange === void 0 || _onChange.catch(error => setError(error.message));
27642
27655
  }
27643
27656
  }).then(result => {
27644
27657
  var _onChange2;
@@ -27651,12 +27664,12 @@ const Upload = ({
27651
27664
  arrFile[i] = fileSuccess;
27652
27665
  }
27653
27666
  }
27654
- onChange == null || (_onChange2 = onChange({
27667
+ onChange === null || onChange === void 0 || (_onChange2 = onChange({
27655
27668
  fileList: arrFile,
27656
27669
  file: fileSuccess,
27657
27670
  indexReplace: indexReplace.current,
27658
27671
  isReplace: indexReplace.current !== null
27659
- })) == null || (_onChange2 = _onChange2.then(() => setError(null))) == null || _onChange2.catch(error => setError(error.message));
27672
+ })) === null || _onChange2 === void 0 || (_onChange2 = _onChange2.then(() => setError(null))) === null || _onChange2 === void 0 || _onChange2.catch(error => setError(error.message));
27660
27673
  }).catch(error => {
27661
27674
  var _onChange3;
27662
27675
  let fileError = Object.assign({}, newFile);
@@ -27668,21 +27681,21 @@ const Upload = ({
27668
27681
  arrFile[i] = fileError;
27669
27682
  }
27670
27683
  }
27671
- onChange == null || (_onChange3 = onChange({
27684
+ onChange === null || onChange === void 0 || (_onChange3 = onChange({
27672
27685
  fileList: arrFile,
27673
27686
  file: fileError,
27674
27687
  indexReplace: indexReplace.current,
27675
27688
  isReplace: indexReplace.current !== null
27676
- })) == null || (_onChange3 = _onChange3.then(() => setError(null))) == null || _onChange3.catch(error => setError(error.message));
27689
+ })) === null || _onChange3 === void 0 || (_onChange3 = _onChange3.then(() => setError(null))) === null || _onChange3 === void 0 || _onChange3.catch(error => setError(error.message));
27677
27690
  });
27678
27691
  } else {
27679
27692
  var _onChange4;
27680
- onChange == null || (_onChange4 = onChange({
27693
+ onChange === null || onChange === void 0 || (_onChange4 = onChange({
27681
27694
  fileList: arrFile,
27682
27695
  file: newFile,
27683
27696
  indexReplace: indexReplace.current,
27684
27697
  isReplace: indexReplace.current !== null
27685
- })) == null || (_onChange4 = _onChange4.then(() => setError(null))) == null || _onChange4.catch(error => setError(error.message));
27698
+ })) === null || _onChange4 === void 0 || (_onChange4 = _onChange4.then(() => setError(null))) === null || _onChange4 === void 0 || _onChange4.catch(error => setError(error.message));
27686
27699
  }
27687
27700
  if (indexReplace.current !== null) {
27688
27701
  arrFile[indexReplace.current] = newFile;
@@ -27702,15 +27715,15 @@ const Upload = ({
27702
27715
  // program to get the dimensions of an image
27703
27716
  const img = document.createElement('img');
27704
27717
  img.src = URL.createObjectURL(files[0]);
27705
- img.size = files == null || (_files$ = files[0]) == null ? void 0 : _files$.size;
27706
- img.type = files == null || (_files$2 = files[0]) == null ? void 0 : _files$2.type;
27718
+ img.size = files === null || files === void 0 || (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size;
27719
+ img.type = files === null || files === void 0 || (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.type;
27707
27720
  img.onload = () => {
27708
27721
  const imgRatio = img.width / img.height;
27709
27722
  setAspect(ratio || imgRatio);
27710
27723
  setCropperImgRatio(imgRatio);
27711
27724
  if (onBeforeCrop) {
27712
27725
  var _onBeforeCrop;
27713
- onBeforeCrop == null || (_onBeforeCrop = onBeforeCrop(img)) == null || (_onBeforeCrop = _onBeforeCrop.then(() => {
27726
+ onBeforeCrop === null || onBeforeCrop === void 0 || (_onBeforeCrop = onBeforeCrop(img)) === null || _onBeforeCrop === void 0 || (_onBeforeCrop = _onBeforeCrop.then(() => {
27714
27727
  setError(null);
27715
27728
  toggleModal();
27716
27729
  setTimeout(() => {
@@ -27724,7 +27737,7 @@ const Upload = ({
27724
27737
  }, 300);
27725
27738
  setFileState(files[0]);
27726
27739
  setPreviewImage(URL.createObjectURL(files[0]));
27727
- })) == null || _onBeforeCrop.catch(error => setError(error == null ? void 0 : error.message));
27740
+ })) === null || _onBeforeCrop === void 0 || _onBeforeCrop.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
27728
27741
  } else {
27729
27742
  toggleModal();
27730
27743
  setTimeout(() => {
@@ -27742,18 +27755,18 @@ const Upload = ({
27742
27755
  };
27743
27756
  img.onerror = error => {
27744
27757
  var _onBeforeCrop2;
27745
- onBeforeCrop == null || (_onBeforeCrop2 = onBeforeCrop(img, error)) == null || (_onBeforeCrop2 = _onBeforeCrop2.then(() => setError(null))) == null || _onBeforeCrop2.catch(error => setError(error == null ? void 0 : error.message));
27758
+ 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));
27746
27759
  };
27747
27760
  }
27748
27761
  }
27749
27762
  }
27750
27763
  function handleCrop() {
27751
- if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
27752
- imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState == null ? void 0 : fileState.type).then(blob => {
27753
- const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
27764
+ if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
27765
+ imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState === null || fileState === void 0 ? void 0 : fileState.type).then(blob => {
27766
+ const sizeMB = (blob === null || blob === void 0 ? void 0 : blob.size) / 1024 / 1024;
27754
27767
  if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
27755
- const file = new File([blob], fileState == null ? void 0 : fileState.name, {
27756
- type: blob == null ? void 0 : blob.type
27768
+ const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
27769
+ type: blob === null || blob === void 0 ? void 0 : blob.type
27757
27770
  });
27758
27771
  handleUpload([file]);
27759
27772
  setCrop(null);
@@ -27767,16 +27780,16 @@ const Upload = ({
27767
27780
  alwaysKeepResolution: true
27768
27781
  }).then(compressedFile => {
27769
27782
  var _fileState$name;
27770
- const file = new File([compressedFile], (fileState == null || (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
27771
- type: compressedFile == null ? void 0 : compressedFile.type
27783
+ 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', {
27784
+ type: compressedFile === null || compressedFile === void 0 ? void 0 : compressedFile.type
27772
27785
  });
27773
27786
  handleUpload([file]);
27774
27787
  setCrop(null);
27775
27788
  setCompletedCrop(null);
27776
- }).catch(error => console.error(error == null ? void 0 : error.message));
27789
+ }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
27777
27790
  }
27778
27791
  toggleModal();
27779
- }).catch(error => console.error(error == null ? void 0 : error.message));
27792
+ }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
27780
27793
  } else {
27781
27794
  handleUpload([fileState]);
27782
27795
  toggleModal();
@@ -27805,7 +27818,7 @@ const Upload = ({
27805
27818
  const index = fileList.indexOf(file);
27806
27819
  const newFileList = fileList.slice();
27807
27820
  newFileList.splice(index, 1);
27808
- onChange == null || onChange({
27821
+ onChange === null || onChange === void 0 || onChange({
27809
27822
  fileList: newFileList,
27810
27823
  file
27811
27824
  });
@@ -27828,14 +27841,14 @@ const Upload = ({
27828
27841
  }
27829
27842
  function handleOpenFile(file) {
27830
27843
  var _String, _file$name;
27831
- let extension = (_String = String(file == null || (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
27844
+ 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();
27832
27845
  if (extension === 'pdf') {
27833
- window.open(file == null ? void 0 : file.url);
27846
+ window.open(file === null || file === void 0 ? void 0 : file.url);
27834
27847
  } else {
27835
- if (file != null && file.url) {
27848
+ if (file !== null && file !== void 0 && file.url) {
27836
27849
  const link = document.createElement('a');
27837
27850
  link.href = file.url;
27838
- link.setAttribute('download', file == null ? void 0 : file.name);
27851
+ link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
27839
27852
  document.body.appendChild(link);
27840
27853
  link.click();
27841
27854
  document.body.removeChild(link);
@@ -27897,12 +27910,12 @@ const Upload = ({
27897
27910
  }, replaceLabel && replaceLabel.length > 0 ? replaceLabel : t('replaceLabel', 'Ubah Berkas')));
27898
27911
  }
27899
27912
  const renderPicture = () => {
27900
- return fileList == null ? void 0 : fileList.map((item, index) => {
27901
- if ((item == null ? void 0 : item.status) === 'uploading') {
27913
+ return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
27914
+ if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
27902
27915
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
27903
27916
  key: index,
27904
- progress: item == null ? void 0 : item.percent,
27905
- loading: item == null ? void 0 : item.loading,
27917
+ progress: item === null || item === void 0 ? void 0 : item.percent,
27918
+ loading: item === null || item === void 0 ? void 0 : item.loading,
27906
27919
  __self: undefined,
27907
27920
  __source: {
27908
27921
  fileName: _jsxFileName$9,
@@ -27975,13 +27988,13 @@ const Upload = ({
27975
27988
  });
27976
27989
  };
27977
27990
  const renderFile = () => {
27978
- return fileList == null ? void 0 : fileList.map((item, index) => {
27991
+ return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
27979
27992
  var _item$name;
27980
- if ((item == null ? void 0 : item.status) === 'uploading') {
27993
+ if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
27981
27994
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
27982
27995
  key: index,
27983
- progress: item == null ? void 0 : item.percent,
27984
- loading: item == null ? void 0 : item.loading,
27996
+ progress: item === null || item === void 0 ? void 0 : item.percent,
27997
+ loading: item === null || item === void 0 ? void 0 : item.loading,
27985
27998
  __self: undefined,
27986
27999
  __source: {
27987
28000
  fileName: _jsxFileName$9,
@@ -28047,7 +28060,7 @@ const Upload = ({
28047
28060
  lineNumber: 666,
28048
28061
  columnNumber: 17
28049
28062
  }
28050
- }, ".", item == null || (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
28063
+ }, ".", 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, {
28051
28064
  label: item.name,
28052
28065
  __self: undefined,
28053
28066
  __source: {
@@ -28417,7 +28430,7 @@ const Upload = ({
28417
28430
  }
28418
28431
  return /*#__PURE__*/React__default.createElement(Flex$1, {
28419
28432
  direction: "row",
28420
- gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
28433
+ gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
28421
28434
  wrap: "wrap",
28422
28435
  css: {
28423
28436
  userSelect: 'none'
@@ -29238,9 +29251,9 @@ const Separator$1 = styled('div', {
29238
29251
  function InputColorPicker(props) {
29239
29252
  const [isPopover, setIsPopover] = useState(false);
29240
29253
  function getColor() {
29241
- const color = props == null ? void 0 : props.color;
29254
+ const color = props === null || props === void 0 ? void 0 : props.color;
29242
29255
  if (typeof color === 'string') {
29243
- return color == null ? void 0 : color.toUpperCase();
29256
+ return color === null || color === void 0 ? void 0 : color.toUpperCase();
29244
29257
  }
29245
29258
  return `rgba(${color.r},${color.g},${color.b},${color.a})`;
29246
29259
  }
@@ -32259,7 +32272,7 @@ const Navigation = props => {
32259
32272
  var _data;
32260
32273
  const isActive = props.currentStep === i;
32261
32274
  const isComplete = props.isComplete[i - 1];
32262
- const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional;
32275
+ const isAdditional = (_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.additional;
32263
32276
  const lastItem = navMobileItems.indexOf(data[i - 1]) + 1 === navMobileItems.length;
32264
32277
  // eslint-disable-next-line no-lone-blocks
32265
32278
  {
@@ -32274,7 +32287,7 @@ const Navigation = props => {
32274
32287
  key: `step-${i}`,
32275
32288
  onClick: () => {
32276
32289
  var _data2;
32277
- if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
32290
+ if (props.onNavClicked && !((_data2 = data[i - 1]) !== null && _data2 !== void 0 && _data2.disabled) || isAdditional) props.onNavClicked(i);
32278
32291
  if (!forbidClickNav && isComplete && !isHide || isAdditional) {
32279
32292
  props.goToStep(i);
32280
32293
  }
@@ -32307,9 +32320,9 @@ const Navigation = props => {
32307
32320
  lineNumber: 176,
32308
32321
  columnNumber: 17
32309
32322
  }
32310
- }), 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, {
32323
+ }), 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, {
32311
32324
  align: "center",
32312
- label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
32325
+ label: (_data5 = data[i - 1]) === null || _data5 === void 0 ? void 0 : _data5.tooltipsContents,
32313
32326
  __self: undefined,
32314
32327
  __source: {
32315
32328
  fileName: _jsxFileName$4,
@@ -32328,9 +32341,9 @@ const Navigation = props => {
32328
32341
  lineNumber: 181,
32329
32342
  columnNumber: 19
32330
32343
  }
32331
- })), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32344
+ })), ((_data6 = data[i - 1]) === null || _data6 === void 0 ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32332
32345
  css: {
32333
- marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
32346
+ marginLeft: (_data7 = data[i - 1]) !== null && _data7 !== void 0 && _data7.withTolltip ? 0 : '$spacing-03'
32334
32347
  },
32335
32348
  align: "center",
32336
32349
  __self: undefined,
@@ -32381,10 +32394,10 @@ const Navigation = props => {
32381
32394
  lineNumber: 198,
32382
32395
  columnNumber: 21
32383
32396
  }
32384
- }, 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, {
32397
+ }, 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, {
32385
32398
  align: "center",
32386
32399
  withClick: true,
32387
- label: (_data10 = data[i - 1]) == null ? void 0 : _data10.tooltipsContents,
32400
+ label: (_data10 = data[i - 1]) === null || _data10 === void 0 ? void 0 : _data10.tooltipsContents,
32388
32401
  __self: undefined,
32389
32402
  __source: {
32390
32403
  fileName: _jsxFileName$4,
@@ -32400,11 +32413,11 @@ const Navigation = props => {
32400
32413
  lineNumber: 209,
32401
32414
  columnNumber: 25
32402
32415
  }
32403
- })), ((_data11 = data[i - 1]) == null ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32416
+ })), ((_data11 = data[i - 1]) === null || _data11 === void 0 ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32404
32417
  align: "center",
32405
32418
  justify: "center",
32406
32419
  css: {
32407
- marginTop: (_data12 = data[i - 1]) != null && _data12.withTolltip ? 0 : '$spacing-03'
32420
+ marginTop: (_data12 = data[i - 1]) !== null && _data12 !== void 0 && _data12.withTolltip ? 0 : '$spacing-03'
32408
32421
  },
32409
32422
  __self: undefined,
32410
32423
  __source: {
@@ -32428,7 +32441,7 @@ const Navigation = props => {
32428
32441
  userSelect: 'none',
32429
32442
  fontSize: '12px',
32430
32443
  textAlign: '-webkit-center',
32431
- display: ((_data13 = data[i - 1]) == null ? void 0 : _data13.disabled) && 'none',
32444
+ display: ((_data13 = data[i - 1]) === null || _data13 === void 0 ? void 0 : _data13.disabled) && 'none',
32432
32445
  marginTop: '$spacing-07',
32433
32446
  flex: 1,
32434
32447
  maxWidth: lastItem && 26
@@ -32508,7 +32521,7 @@ const Navigation = props => {
32508
32521
  height: 24,
32509
32522
  borderRadius: '$round',
32510
32523
  border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
32511
- backgroundColor: (_data14 = data[i - 1]) != null && _data14.disabled ? '$gray200' : '$white'
32524
+ backgroundColor: (_data14 = data[i - 1]) !== null && _data14 !== void 0 && _data14.disabled ? '$gray200' : '$white'
32512
32525
  },
32513
32526
  __self: undefined,
32514
32527
  __source: {
@@ -32537,50 +32550,53 @@ const Navigation = props => {
32537
32550
  }
32538
32551
  return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
32539
32552
  condition: !isMobile,
32540
- wrapper: child => /*#__PURE__*/React__default.createElement(Box, {
32541
- css: {
32542
- opacity: isHide ? 0 : undefined,
32543
- maxWidth: 311
32544
- },
32545
- __self: undefined,
32546
- __source: {
32547
- fileName: _jsxFileName$4,
32548
- lineNumber: 281,
32549
- columnNumber: 9
32550
- }
32551
- }, /*#__PURE__*/React__default.createElement(Flex$1, {
32552
- css: {
32553
- position: !isMobile && 'sticky',
32554
- top: !isMobile ? 44 : 40
32555
- },
32556
- direction: "column",
32557
- gap: 7,
32558
- __self: undefined,
32559
- __source: {
32560
- fileName: _jsxFileName$4,
32561
- lineNumber: 282,
32562
- columnNumber: 11
32563
- }
32564
- }, /*#__PURE__*/React__default.createElement(Card, {
32565
- css: {
32566
- height: 'fit-content',
32567
- padding: 0
32568
- },
32569
- showBottomLine: false,
32570
- __self: undefined,
32571
- __source: {
32572
- fileName: _jsxFileName$4,
32573
- lineNumber: 283,
32574
- columnNumber: 13
32575
- }
32576
- }, child), /*#__PURE__*/React__default.createElement(Box, {
32577
- __self: undefined,
32578
- __source: {
32579
- fileName: _jsxFileName$4,
32580
- lineNumber: 292,
32581
- columnNumber: 13
32582
- }
32583
- }, typeof (props == null ? void 0 : props.appendContent) === 'function' ? props == null || props.appendContent == null ? void 0 : props.appendContent() : props == null ? void 0 : props.appendContent))),
32553
+ wrapper: child => {
32554
+ var _props$appendContent;
32555
+ return /*#__PURE__*/React__default.createElement(Box, {
32556
+ css: {
32557
+ opacity: isHide ? 0 : undefined,
32558
+ maxWidth: 311
32559
+ },
32560
+ __self: undefined,
32561
+ __source: {
32562
+ fileName: _jsxFileName$4,
32563
+ lineNumber: 281,
32564
+ columnNumber: 9
32565
+ }
32566
+ }, /*#__PURE__*/React__default.createElement(Flex$1, {
32567
+ css: {
32568
+ position: !isMobile && 'sticky',
32569
+ top: !isMobile ? 44 : 40
32570
+ },
32571
+ direction: "column",
32572
+ gap: 7,
32573
+ __self: undefined,
32574
+ __source: {
32575
+ fileName: _jsxFileName$4,
32576
+ lineNumber: 282,
32577
+ columnNumber: 11
32578
+ }
32579
+ }, /*#__PURE__*/React__default.createElement(Card, {
32580
+ css: {
32581
+ height: 'fit-content',
32582
+ padding: 0
32583
+ },
32584
+ showBottomLine: false,
32585
+ __self: undefined,
32586
+ __source: {
32587
+ fileName: _jsxFileName$4,
32588
+ lineNumber: 283,
32589
+ columnNumber: 13
32590
+ }
32591
+ }, child), /*#__PURE__*/React__default.createElement(Box, {
32592
+ __self: undefined,
32593
+ __source: {
32594
+ fileName: _jsxFileName$4,
32595
+ lineNumber: 292,
32596
+ columnNumber: 13
32597
+ }
32598
+ }, 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)));
32599
+ },
32584
32600
  __self: undefined,
32585
32601
  __source: {
32586
32602
  fileName: _jsxFileName$4,
@@ -32645,7 +32661,8 @@ const Default = props => {
32645
32661
  }));
32646
32662
  }, [props.hide]);
32647
32663
  useEffect(() => {
32648
- props == null || props.onChangeVisibility == null || props.onChangeVisibility(state.hide);
32664
+ var _props$onChangeVisibi;
32665
+ props === null || props === void 0 || (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 || _props$onChangeVisibi.call(props, state.hide);
32649
32666
  }, [state.hide]);
32650
32667
  const toogleVisibility = value => {
32651
32668
  updateState(prev => Object.assign({}, prev, {
@@ -32654,11 +32671,11 @@ const Default = props => {
32654
32671
  };
32655
32672
  const getIsComplete = currentStep => {
32656
32673
  var _state$isComplete;
32657
- return state == null || (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
32674
+ return state === null || state === void 0 || (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
32658
32675
  };
32659
32676
  const getTitleStep = currentStep => {
32660
32677
  var _props$navContents;
32661
- return props == null || (_props$navContents = props.navContents) == null || (_props$navContents = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents.title;
32678
+ 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;
32662
32679
  };
32663
32680
  const setState = value => {
32664
32681
  updateState(Object.assign({}, state, value));
@@ -32692,13 +32709,13 @@ const Default = props => {
32692
32709
  block: 'start'
32693
32710
  });
32694
32711
  props.onStepChange && props.onStepChange(e);
32695
- if (props != null && (_props$navContents2 = props.navContents) != null && (_props$navContents2 = _props$navContents2[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents2.disabled) {
32696
- if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
32712
+ 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) {
32713
+ if ((e === null || e === void 0 ? void 0 : e.activeStep) > (e === null || e === void 0 ? void 0 : e.previousStep)) {
32697
32714
  var _state$SW;
32698
- state == null || (_state$SW = state.SW) == null || _state$SW.nextStep();
32715
+ state === null || state === void 0 || (_state$SW = state.SW) === null || _state$SW === void 0 || _state$SW.nextStep();
32699
32716
  } else {
32700
32717
  var _state$SW2;
32701
- state == null || (_state$SW2 = state.SW) == null || _state$SW2.previousStep();
32718
+ state === null || state === void 0 || (_state$SW2 = state.SW) === null || _state$SW2 === void 0 || _state$SW2.previousStep();
32702
32719
  }
32703
32720
  }
32704
32721
  };
@@ -32713,11 +32730,11 @@ const Default = props => {
32713
32730
  }, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
32714
32731
  value: {
32715
32732
  toogleVisibility,
32716
- isHide: state == null ? void 0 : state.hide,
32733
+ isHide: state === null || state === void 0 ? void 0 : state.hide,
32717
32734
  setComplete,
32718
32735
  setState,
32719
32736
  state,
32720
- SW: state == null ? void 0 : state.SW,
32737
+ SW: state === null || state === void 0 ? void 0 : state.SW,
32721
32738
  forbidClickNav: props.forbidClickNav,
32722
32739
  titles: props.titles,
32723
32740
  isMobile: props.isMobile,
@@ -32740,7 +32757,7 @@ const Default = props => {
32740
32757
  nav: /*#__PURE__*/React__default.createElement(Navigation, {
32741
32758
  onNavClicked: props.onNavClicked,
32742
32759
  isComplete: state.isComplete,
32743
- appendContent: props == null ? void 0 : props.appendContent,
32760
+ appendContent: props === null || props === void 0 ? void 0 : props.appendContent,
32744
32761
  __self: undefined,
32745
32762
  __source: {
32746
32763
  fileName: _jsxFileName$4,
@@ -32750,7 +32767,7 @@ const Default = props => {
32750
32767
  }),
32751
32768
  initialStep: props.initialStep,
32752
32769
  onStepChange: handleStepChange,
32753
- isLazyMount: props == null ? void 0 : props.isLazyMount,
32770
+ isLazyMount: props === null || props === void 0 ? void 0 : props.isLazyMount,
32754
32771
  __self: undefined,
32755
32772
  __source: {
32756
32773
  fileName: _jsxFileName$4,
@@ -32897,9 +32914,9 @@ function Content({
32897
32914
  var _getDatasets;
32898
32915
  function getDatasets(content, activeId, isCollapse) {
32899
32916
  const datasets = [];
32900
- for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
32917
+ for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
32901
32918
  var _content$i;
32902
- if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
32919
+ if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
32903
32920
  datasets.unshift(content[i]);
32904
32921
  } else {
32905
32922
  datasets.push(content[i]);
@@ -32937,7 +32954,7 @@ function Content({
32937
32954
  lineNumber: 107,
32938
32955
  columnNumber: 7
32939
32956
  }
32940
- }, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
32957
+ }, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
32941
32958
  return /*#__PURE__*/React__default.createElement(List, {
32942
32959
  key: index,
32943
32960
  __self: this,
@@ -32954,11 +32971,11 @@ function Content({
32954
32971
  marginLeft: '-4px !important',
32955
32972
  borderLeftWidth: '4px !important',
32956
32973
  borderLeftStyle: 'solid !important',
32957
- borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
32974
+ borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
32958
32975
  paddingLeft: '16px !important',
32959
32976
  minHeight: 25
32960
32977
  },
32961
- "data-to-scrollspy-id": item == null ? void 0 : item.id,
32978
+ "data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
32962
32979
  __self: this,
32963
32980
  __source: {
32964
32981
  fileName: _jsxFileName$2,
@@ -32967,13 +32984,13 @@ function Content({
32967
32984
  }
32968
32985
  }, /*#__PURE__*/React__default.createElement(Title$1, {
32969
32986
  className: "link-title",
32970
- active: (item == null ? void 0 : item.id) === activeId,
32971
- href: `#${item == null ? void 0 : item.id}`,
32987
+ active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
32988
+ href: `#${item === null || item === void 0 ? void 0 : item.id}`,
32972
32989
  onClick: e => {
32973
32990
  var _e$currentTarget, _e$currentTarget2;
32974
32991
  e.preventDefault();
32975
- 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]);
32976
- 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]);
32992
+ 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]);
32993
+ 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]);
32977
32994
  if (target) {
32978
32995
  var headerOffset = 20;
32979
32996
  var elementPosition = target.getBoundingClientRect().top;
@@ -32997,7 +33014,7 @@ function Content({
32997
33014
  lineNumber: 125,
32998
33015
  columnNumber: 17
32999
33016
  }
33000
- }, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
33017
+ }, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
33001
33018
  })));
33002
33019
  }
33003
33020
  function TableOfContent({