@majoo-ui/react 1.59.9-rc.1 → 1.59.9-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.
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 === void 0 || value.onRemove();
5005
+ value == null || value.onRemove();
5006
5006
  },
5007
5007
  __self: undefined,
5008
5008
  __source: {
@@ -5021,7 +5021,6 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
5021
5021
  }
5022
5022
  })));
5023
5023
  const SingleTagBanner = props => {
5024
- var _props$icon;
5025
5024
  return /*#__PURE__*/React.createElement(Flex$1, {
5026
5025
  gap: 2,
5027
5026
  direction: "column",
@@ -5047,7 +5046,7 @@ const SingleTagBanner = props => {
5047
5046
  lineNumber: 212,
5048
5047
  columnNumber: 9
5049
5048
  }
5050
- }, (props === null || props === void 0 ? void 0 : props.icon) && /*#__PURE__*/React.createElement(Flex$1, {
5049
+ }, (props == null ? void 0 : props.icon) && /*#__PURE__*/React.createElement(Flex$1, {
5051
5050
  css: {
5052
5051
  marginTop: '-2px'
5053
5052
  },
@@ -5057,7 +5056,7 @@ const SingleTagBanner = props => {
5057
5056
  lineNumber: 213,
5058
5057
  columnNumber: 27
5059
5058
  }
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, {
5059
+ }, props == null || props.icon == null ? void 0 : props.icon()), /*#__PURE__*/React.createElement(Flex$1, {
5061
5060
  gap: 2,
5062
5061
  direction: "column",
5063
5062
  css: {
@@ -5088,7 +5087,7 @@ const SingleTagBanner = props => {
5088
5087
  onClick: e => {
5089
5088
  e.preventDefault();
5090
5089
  e.stopPropagation();
5091
- props === null || props === void 0 || props.onRemove();
5090
+ props == null || props.onRemove();
5092
5091
  },
5093
5092
  closeCenter: !props.title && !props.link,
5094
5093
  __self: undefined,
@@ -7905,7 +7904,7 @@ const InputTextArea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
7905
7904
  useEffect(() => {
7906
7905
  if (textareaRef.current) {
7907
7906
  textareaRef.current.style.height = '50px';
7908
- const scrollHeight = textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current.scrollHeight;
7907
+ const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
7909
7908
  textareaRef.current.style.height = scrollHeight + 5 + 'px';
7910
7909
  }
7911
7910
  }, []);
@@ -7960,7 +7959,7 @@ const InputRadioContext = /*#__PURE__*/React__default.createContext();
7960
7959
  var _jsxFileName$I = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputRadio/InputRadioGroup.js";
7961
7960
  const RadioGroup = styled(RadioGroupPrimitive.Root, Flex$1);
7962
7961
  function InputRadioGroup(props) {
7963
- return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
7962
+ return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
7964
7963
  value: props,
7965
7964
  __self: this,
7966
7965
  __source: {
@@ -7975,7 +7974,7 @@ function InputRadioGroup(props) {
7975
7974
  lineNumber: 14,
7976
7975
  columnNumber: 9
7977
7976
  }
7978
- }), React__default.Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
7977
+ }), React__default.Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
7979
7978
  style: Object.assign({}, child.props.style, {
7980
7979
  opacity: 1
7981
7980
  })
@@ -8163,9 +8162,8 @@ const InputRadio = _ref => {
8163
8162
  return /*#__PURE__*/React__default.createElement(InputNumber, _extends({}, inputProps, {
8164
8163
  readOnly: readOnly,
8165
8164
  onFocus: () => {
8166
- var _inputProps$onFocus;
8167
8165
  onValueChange(props.value);
8168
- inputProps === null || inputProps === void 0 || (_inputProps$onFocus = inputProps.onFocus) === null || _inputProps$onFocus === void 0 || _inputProps$onFocus.call(inputProps);
8166
+ inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
8169
8167
  },
8170
8168
  asChild: true,
8171
8169
  __self: this,
@@ -8180,9 +8178,8 @@ const InputRadio = _ref => {
8180
8178
  disabled: disabled,
8181
8179
  readOnly: readOnly,
8182
8180
  onFocus: () => {
8183
- var _inputProps$onFocus2;
8184
8181
  onValueChange(props.value);
8185
- inputProps === null || inputProps === void 0 || (_inputProps$onFocus2 = inputProps.onFocus) === null || _inputProps$onFocus2 === void 0 || _inputProps$onFocus2.call(inputProps);
8182
+ inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
8186
8183
  },
8187
8184
  asChild: true,
8188
8185
  __self: this,
@@ -10676,24 +10673,24 @@ var NumberFormat = /*@__PURE__*/function (superclass) {
10676
10673
  allowLeadingZeros,
10677
10674
  format
10678
10675
  } = Object.assign({}, ref);
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}`);
10676
+ const formattedValueStartsWithZero = (_formattedValue = formattedValue) == null ? void 0 : _formattedValue.startsWith(`${prefix}0`);
10677
+ const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) == null ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
10681
10678
  const emptyFormattedValue = prefix || suffix || prefix + suffix || '';
10682
10679
  if ((formattedValueStartsWithZero || formattedWithZeroAndSuffix) && !allowLeadingZeros && !format) {
10683
10680
  var _formattedValue3, _input$value;
10684
10681
  const isSpecialChar = /^[+-]/.test(formattedValue);
10685
- if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) !== null && _formattedValue3 !== void 0 && _formattedValue3.includes('0,'))) {
10682
+ if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) != null && _formattedValue3.includes('0,'))) {
10686
10683
  var _formattedValue4, _numAsString;
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+/, '');
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+/, '');
10689
10686
  }
10690
- if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input === null || input === void 0 ? void 0 : input.value)) {
10687
+ if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input == null ? void 0 : input.value)) {
10691
10688
  formattedValue = `${prefix}0${suffix}`;
10692
10689
  numAsString = '0';
10693
- } else if (input !== null && input !== void 0 && (_input$value = input.value) !== null && _input$value !== void 0 && _input$value.includes('0,')) {
10690
+ } else if (input != null && (_input$value = input.value) != null && _input$value.includes('0,')) {
10694
10691
  allowLeadingZeros = true;
10695
- formattedValue = input === null || input === void 0 ? void 0 : input.value;
10696
- numAsString = this.removeFormatting(input === null || input === void 0 ? void 0 : input.value);
10692
+ formattedValue = input == null ? void 0 : input.value;
10693
+ numAsString = this.removeFormatting(input == null ? void 0 : input.value);
10697
10694
  }
10698
10695
  }
10699
10696
  //end adjustment
@@ -11151,7 +11148,7 @@ function countThousandSeparatorsByLength(numberLength) {
11151
11148
  }
11152
11149
  function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
11153
11150
  const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
11154
- return maxValue + (prefix === null || prefix === void 0 ? void 0 : prefix.length) + (suffix === null || suffix === void 0 ? void 0 : suffix.length) + tsLength;
11151
+ return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
11155
11152
  }
11156
11153
  const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
11157
11154
  let {
@@ -11203,9 +11200,9 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
11203
11200
  size: size,
11204
11201
  isInvalid: isInvalid,
11205
11202
  readOnly: readOnly,
11206
- isReadOnly: readOnly && !(props !== null && props !== void 0 && props.inputGroup) && !(props !== null && props !== void 0 && props.asChild),
11203
+ isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
11207
11204
  disabled: disabled,
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,
11205
+ maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
11209
11206
  thousandSeparator: thousandSeparator
11210
11207
  }, props, {
11211
11208
  __self: undefined,
@@ -11509,16 +11506,16 @@ function TagsInput(_ref) {
11509
11506
  const addTags = event => {
11510
11507
  if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
11511
11508
  if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
11512
- onEnter === null || onEnter === void 0 || onEnter({
11509
+ onEnter == null || onEnter({
11513
11510
  key: 'duplicate',
11514
11511
  value: event.target.value
11515
11512
  });
11516
11513
  return;
11517
11514
  }
11518
- if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
11515
+ if (pattern && pattern != null && pattern.regex) {
11519
11516
  const regex = new RegExp(pattern.regex);
11520
11517
  if (!regex.test(event.target.value)) {
11521
- onEnter === null || onEnter === void 0 || onEnter({
11518
+ onEnter == null || onEnter({
11522
11519
  key: 'error',
11523
11520
  value: event.target.value
11524
11521
  });
@@ -11527,7 +11524,7 @@ function TagsInput(_ref) {
11527
11524
  }
11528
11525
  }
11529
11526
  setRegexError(false);
11530
- onEnter === null || onEnter === void 0 || onEnter({
11527
+ onEnter == null || onEnter({
11531
11528
  key: 'success',
11532
11529
  value: event.target.value
11533
11530
  });
@@ -11539,7 +11536,7 @@ function TagsInput(_ref) {
11539
11536
  if (disabled || readOnly) {
11540
11537
  return tags;
11541
11538
  } else if (key === 'removeTag' || key === 'Backspace') {
11542
- onRemoveItem === null || onRemoveItem === void 0 || onRemoveItem(tags[index]);
11539
+ onRemoveItem == null || onRemoveItem(tags[index]);
11543
11540
  setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
11544
11541
  }
11545
11542
  };
@@ -11590,7 +11587,7 @@ function TagsInput(_ref) {
11590
11587
  lineNumber: 180,
11591
11588
  columnNumber: 9
11592
11589
  }
11593
- })), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
11590
+ })), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
11594
11591
  color: "red",
11595
11592
  __self: this,
11596
11593
  __source: {
@@ -11898,14 +11895,14 @@ const InputSearchbox = _ref => {
11898
11895
  t
11899
11896
  } = useTranslation(['MajooUI/inputSearchbox', 'translation']);
11900
11897
  const [value, setValue] = useState(defaultValue);
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]);
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]);
11903
11900
  const handleChange = useCallback(e => {
11904
11901
  setValue(e.target.value);
11905
11902
  if (withDebounce) {
11906
11903
  debounceChange(e.target.value);
11907
11904
  } else {
11908
- onChange === null || onChange === void 0 || onChange(e.target.value);
11905
+ onChange == null || onChange(e.target.value);
11909
11906
  }
11910
11907
  }, [onChange, debounceChange, withDebounce]);
11911
11908
  const handleClearButtonClick = e => {
@@ -11958,7 +11955,7 @@ const InputSearchbox = _ref => {
11958
11955
  columnNumber: 7
11959
11956
  }
11960
11957
  })), /*#__PURE__*/React__default.createElement(InputRightElement, {
11961
- children: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default.createElement(SvgCloseFilled, {
11958
+ children: (inputValue == null ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default.createElement(SvgCloseFilled, {
11962
11959
  color: colors$7.iconSecondary,
11963
11960
  __self: undefined,
11964
11961
  __source: {
@@ -12203,7 +12200,7 @@ const Popover = ({
12203
12200
  middleware: [offset(_sideOffset), shift$2(), _flip && flip()],
12204
12201
  onOpenChange: isOpen => {
12205
12202
  setOpenState(isOpen);
12206
- !isOpen && (onClose === null || onClose === void 0 ? void 0 : onClose());
12203
+ !isOpen && (onClose == null ? void 0 : onClose());
12207
12204
  },
12208
12205
  placement
12209
12206
  });
@@ -13048,10 +13045,24 @@ const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
13048
13045
  const [item, setItem] = useState([]);
13049
13046
  const [groupedItems, setGroupedItems] = useState([]);
13050
13047
  const [selectedValue, setSelectedValue] = useState(value);
13048
+ const [selectedIndex, setSelectedIndex] = useState(0);
13051
13049
  const [query, setQuery] = useState();
13052
13050
  const [openOptions, setOpenOptions] = useState(false);
13051
+ const [open, setOpen] = useState(false);
13053
13052
  const selectBoxRef = useRef(null);
13054
13053
  const scrollerRef = useRef(null);
13054
+ useEffect(() => {
13055
+ var _a, _b;
13056
+ if (search && Boolean(query)) {
13057
+ (_a = scrollerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
13058
+ top: 0
13059
+ });
13060
+ return;
13061
+ }
13062
+ (_b = scrollerRef.current) === null || _b === void 0 ? void 0 : _b.scrollTo({
13063
+ top: selectedIndex * 30
13064
+ });
13065
+ }, [query, search, openOptions, open, selectedIndex]);
13055
13066
  const handleInputValue = (value, isReset = false) => {
13056
13067
  if (onSearch && !isReset) onSearch(value);
13057
13068
  if (fetchData) return;
@@ -13184,6 +13195,7 @@ const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
13184
13195
  }, void 0)
13185
13196
  }), void 0);
13186
13197
  };
13198
+ setOpen(isOpen);
13187
13199
  return !isMobile ? jsx(Popover, Object.assign({
13188
13200
  open: openOptions,
13189
13201
  onOpenChange: setOpenOptions,
@@ -13367,7 +13379,8 @@ const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
13367
13379
  var _a;
13368
13380
  return /*#__PURE__*/createElement$2(SelectItem, Object.assign({}, getItemProps({
13369
13381
  item,
13370
- disabled: item.isDisabled || item.isGroup
13382
+ disabled: item.isDisabled || item.isGroup,
13383
+ onClick: () => setSelectedIndex(index)
13371
13384
  }), {
13372
13385
  key: (_a = item.value) !== null && _a !== void 0 ? _a : index,
13373
13386
  hasGroup: !!item.group,
@@ -13976,13 +13989,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
13976
13989
  const isShowSelectAll = showSelectAll && !maxSelectedItem;
13977
13990
  useEffect(() => {
13978
13991
  var _scrollerRef$current;
13979
- (_scrollerRef$current = scrollerRef.current) === null || _scrollerRef$current === void 0 || _scrollerRef$current.scrollTo({
13992
+ (_scrollerRef$current = scrollerRef.current) == null || _scrollerRef$current.scrollTo({
13980
13993
  top: 0
13981
13994
  });
13982
13995
  }, [query]);
13983
13996
  useEffect(() => {
13984
- if (defaultValue !== null && defaultValue !== void 0 && defaultValue.length) {
13985
- if (value !== null && value !== void 0 && value.length) {
13997
+ if (defaultValue != null && defaultValue.length) {
13998
+ if (value != null && value.length) {
13986
13999
  setInputSelectValue(value);
13987
14000
  }
13988
14001
  } else {
@@ -14047,7 +14060,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14047
14060
  removeSelectedItem,
14048
14061
  selectedItems
14049
14062
  } = useMultipleSelection({
14050
- 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)) : []
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)) : []
14051
14064
  });
14052
14065
  const generateOptions = data => {
14053
14066
  return data.map(option => {
@@ -14069,7 +14082,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14069
14082
  };
14070
14083
  const debouncedSearch = React__default.useRef(debounce(async query => {
14071
14084
  setQuery(query);
14072
- onSearch === null || onSearch === void 0 || onSearch(query);
14085
+ onSearch == null || onSearch(query);
14073
14086
  }, 1000)).current;
14074
14087
  React__default.useEffect(() => {
14075
14088
  return () => {
@@ -14077,7 +14090,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14077
14090
  };
14078
14091
  }, [debouncedSearch]);
14079
14092
  const handleInputValue = input => {
14080
- onSearch === null || onSearch === void 0 || onSearch(input);
14093
+ onSearch == null || onSearch(input);
14081
14094
  if (input === '') {
14082
14095
  if (disabledOptions.length > 0) {
14083
14096
  setItems(generateOptions(sortDisabled));
@@ -14085,9 +14098,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14085
14098
  return setItems(sortValue);
14086
14099
  }
14087
14100
  } else {
14088
- let filterItems = option === null || option === void 0 ? void 0 : option.filter(item => {
14089
- var _item$name, _item$name$includes, _input$toLocaleLowerC;
14090
- 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));
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());
14091
14104
  });
14092
14105
  setItems(filterItems);
14093
14106
  }
@@ -14096,10 +14109,10 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14096
14109
  if (disabled || readOnly) {
14097
14110
  return selectedValue;
14098
14111
  } else {
14099
- if ((selected === null || selected === void 0 ? void 0 : selected.id) === 'counter') {
14112
+ if ((selected == null ? void 0 : selected.id) === 'counter') {
14100
14113
  setSelectedValue([]);
14101
14114
  setInputSelectValue([]);
14102
- onChange === null || onChange === void 0 || onChange([]);
14115
+ onChange == null || onChange([]);
14103
14116
  for (let i = 0; i < selectedValue.length; i++) {
14104
14117
  removeSelectedItem(selectedValue[i]);
14105
14118
  }
@@ -14109,7 +14122,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14109
14122
  setSelectedValue(filterItems);
14110
14123
  setInputSelectValue(filterItems);
14111
14124
  if (selected.id !== '!all') {
14112
- onChange === null || onChange === void 0 || onChange(filterItems);
14125
+ onChange == null || onChange(filterItems);
14113
14126
  }
14114
14127
  }
14115
14128
  }
@@ -14147,9 +14160,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14147
14160
  if (selectedItem.id === '!all') {
14148
14161
  items.forEach(item => {
14149
14162
  var _item$children;
14150
- if (item !== null && item !== void 0 && (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
14163
+ if (item != null && (_item$children = item.children) != null && _item$children.length) {
14151
14164
  var _item$children2;
14152
- item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 || _item$children2.forEach(item => {
14165
+ item == null || (_item$children2 = item.children) == null || _item$children2.forEach(item => {
14153
14166
  removeSelectedItem(item);
14154
14167
  });
14155
14168
  } else {
@@ -14158,7 +14171,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14158
14171
  });
14159
14172
  setSelectedValue([]);
14160
14173
  setInputSelectValue([]);
14161
- onChange === null || onChange === void 0 || onChange([]);
14174
+ onChange == null || onChange([]);
14162
14175
  } else {
14163
14176
  removeItem(selectedItem);
14164
14177
  }
@@ -14169,9 +14182,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14169
14182
  const itemIds = [];
14170
14183
  items.forEach(item => {
14171
14184
  var _item$children3;
14172
- if (item !== null && item !== void 0 && (_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length) {
14185
+ if (item != null && (_item$children3 = item.children) != null && _item$children3.length) {
14173
14186
  var _item$children4;
14174
- item === null || item === void 0 || (_item$children4 = item.children) === null || _item$children4 === void 0 || _item$children4.forEach(item => {
14187
+ item == null || (_item$children4 = item.children) == null || _item$children4.forEach(item => {
14175
14188
  addSelectedItem(item);
14176
14189
  itemIds.push(item.id);
14177
14190
  });
@@ -14183,16 +14196,16 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14183
14196
  setSelectedValue(itemIds);
14184
14197
  setInputSelectValue(itemIds);
14185
14198
  // onChange?.(itemIds.slice(1).filter(id => !items.find(item => item.id === id)?.children?.length));
14186
- onChange === null || onChange === void 0 || onChange(itemIds.slice(1));
14199
+ onChange == null || onChange(itemIds.slice(1));
14187
14200
  } else {
14188
14201
  var _selectedItem$childre;
14189
14202
  //start check if item have children (option group)
14190
- if (selectedItem !== null && selectedItem !== void 0 && (_selectedItem$childre = selectedItem.children) !== null && _selectedItem$childre !== void 0 && _selectedItem$childre.length) {
14203
+ if (selectedItem != null && (_selectedItem$childre = selectedItem.children) != null && _selectedItem$childre.length) {
14191
14204
  var _selectedItem$childre2;
14192
14205
  const itemIdsSelect = [];
14193
14206
  const itemIdsUnSelect = [];
14194
- selectedItem === null || selectedItem === void 0 || (_selectedItem$childre2 = selectedItem.children) === null || _selectedItem$childre2 === void 0 || _selectedItem$childre2.forEach(item => {
14195
- if (selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id)) {
14207
+ selectedItem == null || (_selectedItem$childre2 = selectedItem.children) == null || _selectedItem$childre2.forEach(item => {
14208
+ if (selectedValue != null && selectedValue.includes(item.id)) {
14196
14209
  removeSelectedItem(item);
14197
14210
  itemIdsUnSelect.push(item.id);
14198
14211
  } else {
@@ -14206,19 +14219,19 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14206
14219
  setSelectedValue([...selectedValue, ...itemIdsSelect]);
14207
14220
  setInputSelectValue([...selectedValue, ...itemIdsSelect]);
14208
14221
  const _filteredSelectedValues = selectedValue.filter(val => val !== '!all');
14209
- onChange === null || onChange === void 0 || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
14222
+ onChange == null || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
14210
14223
  }
14211
14224
 
14212
14225
  //unselect all child in one of the option groups
14213
14226
  if (itemIdsUnSelect.length) {
14214
14227
  const newSelectedValue = selectedValue.filter(selId => {
14215
14228
  var _itemIdsUnSelect$filt;
14216
- return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) === null || _itemIdsUnSelect$filt === void 0 ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
14229
+ return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) == null ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
14217
14230
  });
14218
14231
  setSelectedValue(newSelectedValue);
14219
14232
  setInputSelectValue(newSelectedValue);
14220
14233
  const _filteredSelectedValues2 = newSelectedValue.filter(val => val !== '!all');
14221
- onChange === null || onChange === void 0 || onChange(_filteredSelectedValues2);
14234
+ onChange == null || onChange(_filteredSelectedValues2);
14222
14235
  }
14223
14236
  return;
14224
14237
  }
@@ -14235,7 +14248,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14235
14248
  setSelectedValue([...selectedValue, selectedItem.id]);
14236
14249
  setInputSelectValue([...selectedValue, selectedItem.id]);
14237
14250
  const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
14238
- onChange === null || onChange === void 0 || onChange([...filteredSelectedValues, selectedItem.id]);
14251
+ onChange == null || onChange([...filteredSelectedValues, selectedItem.id]);
14239
14252
  }
14240
14253
  selectItem(null);
14241
14254
  }
@@ -14267,9 +14280,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14267
14280
  }
14268
14281
  }
14269
14282
  });
14270
- const getOption = useCallback(() => maxSelectedItem ? option === null || option === void 0 ? void 0 : option.map(item => {
14271
- const isMaxSelectedItem = maxSelectedItem && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) >= maxSelectedItem;
14272
- if (isMaxSelectedItem && !(selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id))) {
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))) {
14273
14286
  item.hideCheck = true;
14274
14287
  item.isDisabled = true;
14275
14288
  } else {
@@ -14278,7 +14291,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14278
14291
  }
14279
14292
  return item;
14280
14293
  }) : option, [maxSelectedItem, option, selectedValue]);
14281
- const itemsLength = items === null || items === void 0 ? void 0 : items.reduce((acc, item) => {
14294
+ const itemsLength = items == null ? void 0 : items.reduce((acc, item) => {
14282
14295
  return [...acc, ...(item.children ? item.children : [item])];
14283
14296
  }, []).length;
14284
14297
  useEffect(() => {
@@ -14325,16 +14338,15 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14325
14338
  }, [label, isOpen]);
14326
14339
  const toggleCollapsible = () => setShowAllTags(!showAllTags);
14327
14340
  const handleRemoveAllItem = () => {
14328
- onChange === null || onChange === void 0 || onChange([]);
14341
+ onChange == null || onChange([]);
14329
14342
  setSelectedValue([]);
14330
14343
  setInputSelectValue([]);
14331
14344
  for (let i = 0; i < selectedValue.length; i++) {
14332
14345
  removeSelectedItem(selectedValue[i]);
14333
14346
  }
14334
14347
  };
14335
- const isShowTagSelectAll = showTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > (option === null || option === void 0 ? void 0 : option.length);
14348
+ const isShowTagSelectAll = showTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > (option == null ? void 0 : option.length);
14336
14349
  const renderOptionItem = (item, index, asChild) => {
14337
- var _item$render;
14338
14350
  return /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
14339
14351
  key: item.id
14340
14352
  }, getItemProps({
@@ -14367,7 +14379,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14367
14379
  lineNumber: 745,
14368
14380
  columnNumber: 11
14369
14381
  }
14370
- }, !(item !== null && item !== void 0 && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14382
+ }, !(item != null && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14371
14383
  color: colors$8.iconDisable,
14372
14384
  __self: undefined,
14373
14385
  __source: {
@@ -14383,7 +14395,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14383
14395
  lineNumber: 760,
14384
14396
  columnNumber: 19
14385
14397
  }
14386
- })), 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, {
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, {
14387
14399
  __self: undefined,
14388
14400
  __source: {
14389
14401
  fileName: _jsxFileName$y,
@@ -14408,15 +14420,15 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14408
14420
  lineNumber: 769,
14409
14421
  columnNumber: 11
14410
14422
  }
14411
- }, item.render ? (_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.call(item, item.name) : item.name));
14423
+ }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name));
14412
14424
  };
14413
14425
  let lastGroupIndex = showSelectAll ? 1 : 0;
14414
14426
  const renderOptionGroupItem = (item, index) => {
14415
- var _item$children5, _item$children6, _item$children7, _item$render2, _item$children8;
14427
+ var _item$children5, _item$children6, _item$children7, _item$children8;
14416
14428
  // const groupIndex = (index > (showSelectAll ? 1 : 0)) ? lastGroupIndex : 0;
14417
14429
  const groupIndex = lastGroupIndex;
14418
- lastGroupIndex += ((item === null || item === void 0 || (_item$children5 = item.children) === null || _item$children5 === void 0 ? void 0 : _item$children5.length) || 0) + 1;
14419
- 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);
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);
14420
14432
  return /*#__PURE__*/React__default.createElement(OptionGroupItem, {
14421
14433
  item: /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
14422
14434
  key: item.id
@@ -14449,7 +14461,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14449
14461
  lineNumber: 799,
14450
14462
  columnNumber: 15
14451
14463
  }
14452
- }, !(item !== null && item !== void 0 && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14464
+ }, !(item != null && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
14453
14465
  color: colors$8.iconDisable,
14454
14466
  __self: undefined,
14455
14467
  __source: {
@@ -14457,7 +14469,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14457
14469
  lineNumber: 809,
14458
14470
  columnNumber: 19
14459
14471
  }
14460
- }) : (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, {
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, {
14461
14473
  color: colors$8.iconGreen,
14462
14474
  __self: undefined,
14463
14475
  __source: {
@@ -14465,7 +14477,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14465
14477
  lineNumber: 811,
14466
14478
  columnNumber: 19
14467
14479
  }
14468
- }) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
14480
+ }) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
14469
14481
  __self: undefined,
14470
14482
  __source: {
14471
14483
  fileName: _jsxFileName$y,
@@ -14483,14 +14495,14 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14483
14495
  lineNumber: 816,
14484
14496
  columnNumber: 15
14485
14497
  }
14486
- }, item.render ? (_item$render2 = item.render) === null || _item$render2 === void 0 ? void 0 : _item$render2.call(item, item.name) : item.name)),
14498
+ }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name)),
14487
14499
  __self: undefined,
14488
14500
  __source: {
14489
14501
  fileName: _jsxFileName$y,
14490
14502
  lineNumber: 784,
14491
14503
  columnNumber: 9
14492
14504
  }
14493
- }, 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)));
14505
+ }, item == null || (_item$children8 = item.children) == null ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
14494
14506
  };
14495
14507
  return /*#__PURE__*/React__default.createElement(Wrapper$1, _extends({
14496
14508
  css: css
@@ -14621,13 +14633,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14621
14633
  lineNumber: 875,
14622
14634
  columnNumber: 17
14623
14635
  }
14624
- }), 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) => {
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) => {
14625
14637
  if (showAllTags || !collapsible) {
14626
14638
  return true;
14627
14639
  } else {
14628
14640
  return idx < 5;
14629
14641
  }
14630
- })) === null || _selectedItems$filter === void 0 ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
14642
+ })) == null ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
14631
14643
  disabled: disabled,
14632
14644
  isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
14633
14645
  size: "lg",
@@ -14652,7 +14664,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14652
14664
  lineNumber: 904,
14653
14665
  columnNumber: 21
14654
14666
  }
14655
- }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default.createElement(Flex$1, {
14667
+ }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default.createElement(Flex$1, {
14656
14668
  direction: "column",
14657
14669
  gap: 4,
14658
14670
  __self: undefined,
@@ -14738,7 +14750,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14738
14750
  lineNumber: 947,
14739
14751
  columnNumber: 19
14740
14752
  }
14741
- }, `${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, {
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, {
14742
14754
  css: {
14743
14755
  fontSize: '$label',
14744
14756
  marginTop: '$spacing-01'
@@ -14750,7 +14762,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14750
14762
  lineNumber: 957,
14751
14763
  columnNumber: 11
14752
14764
  }
14753
- }, `${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, {
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, {
14754
14766
  placement: placement,
14755
14767
  css: {
14756
14768
  display: isOpen && disabled === false ? 'block' : 'none',
@@ -14808,7 +14820,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14808
14820
  }), /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
14809
14821
  condition: !!fetchData && items.length > 0,
14810
14822
  wrapper: child => /*#__PURE__*/React__default.createElement(InfiniteScroll, {
14811
- loadMore: () => !isLoading && (fetchData === null || fetchData === void 0 ? void 0 : fetchData({
14823
+ loadMore: () => !isLoading && (fetchData == null ? void 0 : fetchData({
14812
14824
  query
14813
14825
  })),
14814
14826
  hasMore: true,
@@ -14827,7 +14839,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
14827
14839
  lineNumber: 997,
14828
14840
  columnNumber: 15
14829
14841
  }
14830
- }, isOpen && items.map((item, index) => item !== null && item !== void 0 && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
14842
+ }, isOpen && items.map((item, index) => item != null && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
14831
14843
  css: {
14832
14844
  height: 'auto'
14833
14845
  }
@@ -18375,9 +18387,9 @@ const NativeTimePicker = ({
18375
18387
  }
18376
18388
  function handleInputChange(type, e) {
18377
18389
  var _e$target;
18378
- const value = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
18390
+ const value = e == null || (_e$target = e.target) == null ? void 0 : _e$target.value;
18379
18391
  const format = 'DD:MM:YYYY:HH:mm';
18380
- const minLength = (value === null || value === void 0 ? void 0 : value.length) > 1;
18392
+ const minLength = (value == null ? void 0 : value.length) > 1;
18381
18393
  const hourValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:mm')}:${params}`, 'DD:MM:YYYY:mm:HH').toDate());
18382
18394
  const minuteValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:HH')}:${params}`, 'DD:MM:YYYY:HH:mm').toDate());
18383
18395
  if (!disabled) {
@@ -20938,7 +20950,7 @@ const NotificationBadge = _ref => {
20938
20950
  };
20939
20951
  };
20940
20952
  const getValue = () => {
20941
- let value = props === null || props === void 0 ? void 0 : props.value;
20953
+ let value = props == null ? void 0 : props.value;
20942
20954
  const isTrailing = variantIcon === 'trailing';
20943
20955
  if (typeof value === 'number' || parseInt(value)) {
20944
20956
  if (Math.sign(value) === 1 || Math.sign(value) === 0) {
@@ -21571,7 +21583,7 @@ const PaginationButton = ({
21571
21583
  justify: "center",
21572
21584
  onClick: () => {
21573
21585
  var _dialogPageRef$curren;
21574
- return (_dialogPageRef$curren = dialogPageRef.current) === null || _dialogPageRef$curren === void 0 ? void 0 : _dialogPageRef$curren.click();
21586
+ return (_dialogPageRef$curren = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren.click();
21575
21587
  },
21576
21588
  __self: undefined,
21577
21589
  __source: {
@@ -21649,7 +21661,7 @@ const PaginationButton = ({
21649
21661
  onSubmit: () => {
21650
21662
  var _dialogPageRef$curren2;
21651
21663
  debouncedGoToPage(Number(goToPage));
21652
- (_dialogPageRef$curren2 = dialogPageRef.current) === null || _dialogPageRef$curren2 === void 0 || _dialogPageRef$curren2.click();
21664
+ (_dialogPageRef$curren2 = dialogPageRef.current) == null || _dialogPageRef$curren2.click();
21653
21665
  },
21654
21666
  __self: undefined,
21655
21667
  __source: {
@@ -21666,7 +21678,7 @@ const PaginationButton = ({
21666
21678
  allowNegative: false,
21667
21679
  onChange: e => {
21668
21680
  var _e$target;
21669
- return setGoToPage((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
21681
+ return setGoToPage((_e$target = e.target) == null ? void 0 : _e$target.value);
21670
21682
  },
21671
21683
  __self: undefined,
21672
21684
  __source: {
@@ -21699,7 +21711,7 @@ const PaginationButton = ({
21699
21711
  onClick: () => {
21700
21712
  var _dialogPageRef$curren3;
21701
21713
  setGoToPage(null);
21702
- (_dialogPageRef$curren3 = dialogPageRef.current) === null || _dialogPageRef$curren3 === void 0 || _dialogPageRef$curren3.click();
21714
+ (_dialogPageRef$curren3 = dialogPageRef.current) == null || _dialogPageRef$curren3.click();
21703
21715
  },
21704
21716
  __self: undefined,
21705
21717
  __source: {
@@ -21714,7 +21726,7 @@ const PaginationButton = ({
21714
21726
  onClick: () => {
21715
21727
  var _dialogPageRef$curren4;
21716
21728
  debouncedGoToPage(Number(goToPage));
21717
- (_dialogPageRef$curren4 = dialogPageRef.current) === null || _dialogPageRef$curren4 === void 0 || _dialogPageRef$curren4.click();
21729
+ (_dialogPageRef$curren4 = dialogPageRef.current) == null || _dialogPageRef$curren4.click();
21718
21730
  },
21719
21731
  __self: undefined,
21720
21732
  __source: {
@@ -21803,7 +21815,7 @@ function PaginationInfo(_ref) {
21803
21815
  onClick: () => {
21804
21816
  if (isMobilePagination) {
21805
21817
  var _dialogLimitRef$curre;
21806
- (_dialogLimitRef$curre = dialogLimitRef.current) === null || _dialogLimitRef$curre === void 0 || _dialogLimitRef$curre.click();
21818
+ (_dialogLimitRef$curre = dialogLimitRef.current) == null || _dialogLimitRef$curre.click();
21807
21819
  }
21808
21820
  },
21809
21821
  __self: this,
@@ -21849,7 +21861,7 @@ function PaginationInfo(_ref) {
21849
21861
  lineNumber: 60,
21850
21862
  columnNumber: 13
21851
21863
  }
21852
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
21864
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
21853
21865
  key: limit,
21854
21866
  css: limitItemContainerStyle(selectedLimit === limit),
21855
21867
  onClick: () => onChange(limit),
@@ -21932,7 +21944,7 @@ function PaginationInfo(_ref) {
21932
21944
  lineNumber: 100,
21933
21945
  columnNumber: 11
21934
21946
  }
21935
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
21947
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
21936
21948
  css: {
21937
21949
  height: 44,
21938
21950
  width: '100%',
@@ -21947,7 +21959,7 @@ function PaginationInfo(_ref) {
21947
21959
  onClick: () => {
21948
21960
  var _dialogLimitRef$curre2;
21949
21961
  onChange(limit);
21950
- (_dialogLimitRef$curre2 = dialogLimitRef.current) === null || _dialogLimitRef$curre2 === void 0 || _dialogLimitRef$curre2.click();
21962
+ (_dialogLimitRef$curre2 = dialogLimitRef.current) == null || _dialogLimitRef$curre2.click();
21951
21963
  },
21952
21964
  __self: this,
21953
21965
  __source: {
@@ -24069,7 +24081,7 @@ const rowMenuColumn = (options, icon, config) => ({
24069
24081
  onClick: () => {
24070
24082
  var _document$getElements;
24071
24083
  setOpenDrop(true);
24072
- const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) === null || _document$getElements === void 0 ? void 0 : _document$getElements[0];
24084
+ const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
24073
24085
  contextMenu.style.opacity = 0;
24074
24086
  },
24075
24087
  __self: undefined,
@@ -24718,7 +24730,7 @@ const TemplateAlertFunction = props => {
24718
24730
  if (!props.onOpenAutoFocus) {
24719
24731
  e.preventDefault();
24720
24732
  } else {
24721
- props === null || props === void 0 || props.onOpenAutoFocus();
24733
+ props == null || props.onOpenAutoFocus();
24722
24734
  }
24723
24735
  },
24724
24736
  __self: undefined,
@@ -24798,7 +24810,7 @@ const TemplateAlertFunction = props => {
24798
24810
  }, props.description)), /*#__PURE__*/React__default.createElement(Box, {
24799
24811
  css: {
24800
24812
  width: '100%',
24801
- display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
24813
+ display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
24802
24814
  },
24803
24815
  __self: undefined,
24804
24816
  __source: {
@@ -24840,8 +24852,8 @@ const TemplateAlertFunction = props => {
24840
24852
  size: props.btnSize,
24841
24853
  onClick: buttonConfirm,
24842
24854
  buttonType: props.dialogType,
24843
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24844
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
24855
+ disabled: props == null ? void 0 : props.disabledButton
24856
+ }, props == null ? void 0 : props.actionButtonProps, {
24845
24857
  __self: undefined,
24846
24858
  __source: {
24847
24859
  fileName: _jsxFileName$b,
@@ -24860,19 +24872,19 @@ const TemplateAlertFunction = props => {
24860
24872
  size: props.btnSize,
24861
24873
  onClick: buttonCancel,
24862
24874
  css: {
24863
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
24875
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
24864
24876
  flex: props.isMobile && 1
24865
24877
  },
24866
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
24867
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24868
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
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, {
24869
24881
  __self: undefined,
24870
24882
  __source: {
24871
24883
  fileName: _jsxFileName$b,
24872
24884
  lineNumber: 187,
24873
24885
  columnNumber: 19
24874
24886
  }
24875
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
24887
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
24876
24888
  asChild: true,
24877
24889
  __self: undefined,
24878
24890
  __source: {
@@ -24887,8 +24899,8 @@ const TemplateAlertFunction = props => {
24887
24899
  css: {
24888
24900
  flex: props.isMobile && 1
24889
24901
  },
24890
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
24891
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
24902
+ disabled: props == null ? void 0 : props.disabledButton
24903
+ }, props == null ? void 0 : props.actionButtonProps, {
24892
24904
  __self: undefined,
24893
24905
  __source: {
24894
24906
  fileName: _jsxFileName$b,
@@ -25018,7 +25030,7 @@ function AlertDialog(props) {
25018
25030
  }, props.description)), /*#__PURE__*/React__default.createElement(Box, {
25019
25031
  css: {
25020
25032
  width: '100%',
25021
- display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
25033
+ display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
25022
25034
  },
25023
25035
  __self: this,
25024
25036
  __source: {
@@ -25063,8 +25075,8 @@ function AlertDialog(props) {
25063
25075
  css: {
25064
25076
  flex: props.isMobile && 1
25065
25077
  },
25066
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25067
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25078
+ disabled: props == null ? void 0 : props.disabledButton
25079
+ }, props == null ? void 0 : props.actionButtonProps, {
25068
25080
  __self: this,
25069
25081
  __source: {
25070
25082
  fileName: _jsxFileName$b,
@@ -25083,19 +25095,19 @@ function AlertDialog(props) {
25083
25095
  size: props.btnSize,
25084
25096
  onClick: props.onCancel,
25085
25097
  css: {
25086
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
25098
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
25087
25099
  flex: props.isMobile && 1
25088
25100
  },
25089
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25090
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25091
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
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, {
25092
25104
  __self: this,
25093
25105
  __source: {
25094
25106
  fileName: _jsxFileName$b,
25095
25107
  lineNumber: 293,
25096
25108
  columnNumber: 19
25097
25109
  }
25098
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
25110
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
25099
25111
  asChild: true,
25100
25112
  __self: this,
25101
25113
  __source: {
@@ -25110,8 +25122,8 @@ function AlertDialog(props) {
25110
25122
  css: {
25111
25123
  flex: props.isMobile && 1
25112
25124
  },
25113
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25114
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25125
+ disabled: props == null ? void 0 : props.disabledButton
25126
+ }, props == null ? void 0 : props.actionButtonProps, {
25115
25127
  __self: this,
25116
25128
  __source: {
25117
25129
  fileName: _jsxFileName$b,
@@ -27601,7 +27613,7 @@ const Upload = ({
27601
27613
  upload({
27602
27614
  url: action,
27603
27615
  file: newFile,
27604
- customBody: customBodyRequest === null || customBodyRequest === void 0 ? void 0 : customBodyRequest(newFile),
27616
+ customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
27605
27617
  token,
27606
27618
  tokenKey,
27607
27619
  reqKey,
@@ -27621,12 +27633,12 @@ const Upload = ({
27621
27633
  arrProgress[i] = fileProgress;
27622
27634
  }
27623
27635
  }
27624
- onChange === null || onChange === void 0 || (_onChange = onChange({
27636
+ onChange == null || (_onChange = onChange({
27625
27637
  fileList: arrProgress,
27626
27638
  file: fileProgress,
27627
27639
  indexReplace: indexReplace.current,
27628
27640
  isReplace: indexReplace.current !== null
27629
- })) === null || _onChange === void 0 || (_onChange = _onChange.then(() => setError(null))) === null || _onChange === void 0 || _onChange.catch(error => setError(error.message));
27641
+ })) == null || (_onChange = _onChange.then(() => setError(null))) == null || _onChange.catch(error => setError(error.message));
27630
27642
  }
27631
27643
  }).then(result => {
27632
27644
  var _onChange2;
@@ -27639,12 +27651,12 @@ const Upload = ({
27639
27651
  arrFile[i] = fileSuccess;
27640
27652
  }
27641
27653
  }
27642
- onChange === null || onChange === void 0 || (_onChange2 = onChange({
27654
+ onChange == null || (_onChange2 = onChange({
27643
27655
  fileList: arrFile,
27644
27656
  file: fileSuccess,
27645
27657
  indexReplace: indexReplace.current,
27646
27658
  isReplace: indexReplace.current !== null
27647
- })) === null || _onChange2 === void 0 || (_onChange2 = _onChange2.then(() => setError(null))) === null || _onChange2 === void 0 || _onChange2.catch(error => setError(error.message));
27659
+ })) == null || (_onChange2 = _onChange2.then(() => setError(null))) == null || _onChange2.catch(error => setError(error.message));
27648
27660
  }).catch(error => {
27649
27661
  var _onChange3;
27650
27662
  let fileError = Object.assign({}, newFile);
@@ -27656,21 +27668,21 @@ const Upload = ({
27656
27668
  arrFile[i] = fileError;
27657
27669
  }
27658
27670
  }
27659
- onChange === null || onChange === void 0 || (_onChange3 = onChange({
27671
+ onChange == null || (_onChange3 = onChange({
27660
27672
  fileList: arrFile,
27661
27673
  file: fileError,
27662
27674
  indexReplace: indexReplace.current,
27663
27675
  isReplace: indexReplace.current !== null
27664
- })) === null || _onChange3 === void 0 || (_onChange3 = _onChange3.then(() => setError(null))) === null || _onChange3 === void 0 || _onChange3.catch(error => setError(error.message));
27676
+ })) == null || (_onChange3 = _onChange3.then(() => setError(null))) == null || _onChange3.catch(error => setError(error.message));
27665
27677
  });
27666
27678
  } else {
27667
27679
  var _onChange4;
27668
- onChange === null || onChange === void 0 || (_onChange4 = onChange({
27680
+ onChange == null || (_onChange4 = onChange({
27669
27681
  fileList: arrFile,
27670
27682
  file: newFile,
27671
27683
  indexReplace: indexReplace.current,
27672
27684
  isReplace: indexReplace.current !== null
27673
- })) === null || _onChange4 === void 0 || (_onChange4 = _onChange4.then(() => setError(null))) === null || _onChange4 === void 0 || _onChange4.catch(error => setError(error.message));
27685
+ })) == null || (_onChange4 = _onChange4.then(() => setError(null))) == null || _onChange4.catch(error => setError(error.message));
27674
27686
  }
27675
27687
  if (indexReplace.current !== null) {
27676
27688
  arrFile[indexReplace.current] = newFile;
@@ -27690,15 +27702,15 @@ const Upload = ({
27690
27702
  // program to get the dimensions of an image
27691
27703
  const img = document.createElement('img');
27692
27704
  img.src = URL.createObjectURL(files[0]);
27693
- img.size = files === null || files === void 0 || (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size;
27694
- img.type = files === null || files === void 0 || (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.type;
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;
27695
27707
  img.onload = () => {
27696
27708
  const imgRatio = img.width / img.height;
27697
27709
  setAspect(ratio || imgRatio);
27698
27710
  setCropperImgRatio(imgRatio);
27699
27711
  if (onBeforeCrop) {
27700
27712
  var _onBeforeCrop;
27701
- onBeforeCrop === null || onBeforeCrop === void 0 || (_onBeforeCrop = onBeforeCrop(img)) === null || _onBeforeCrop === void 0 || (_onBeforeCrop = _onBeforeCrop.then(() => {
27713
+ onBeforeCrop == null || (_onBeforeCrop = onBeforeCrop(img)) == null || (_onBeforeCrop = _onBeforeCrop.then(() => {
27702
27714
  setError(null);
27703
27715
  toggleModal();
27704
27716
  setTimeout(() => {
@@ -27712,7 +27724,7 @@ const Upload = ({
27712
27724
  }, 300);
27713
27725
  setFileState(files[0]);
27714
27726
  setPreviewImage(URL.createObjectURL(files[0]));
27715
- })) === null || _onBeforeCrop === void 0 || _onBeforeCrop.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
27727
+ })) == null || _onBeforeCrop.catch(error => setError(error == null ? void 0 : error.message));
27716
27728
  } else {
27717
27729
  toggleModal();
27718
27730
  setTimeout(() => {
@@ -27730,18 +27742,18 @@ const Upload = ({
27730
27742
  };
27731
27743
  img.onerror = error => {
27732
27744
  var _onBeforeCrop2;
27733
- 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));
27745
+ onBeforeCrop == null || (_onBeforeCrop2 = onBeforeCrop(img, error)) == null || (_onBeforeCrop2 = _onBeforeCrop2.then(() => setError(null))) == null || _onBeforeCrop2.catch(error => setError(error == null ? void 0 : error.message));
27734
27746
  };
27735
27747
  }
27736
27748
  }
27737
27749
  }
27738
27750
  function handleCrop() {
27739
- if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
27740
- imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState === null || fileState === void 0 ? void 0 : fileState.type).then(blob => {
27741
- const sizeMB = (blob === null || blob === void 0 ? void 0 : blob.size) / 1024 / 1024;
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;
27742
27754
  if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
27743
- const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
27744
- type: blob === null || blob === void 0 ? void 0 : blob.type
27755
+ const file = new File([blob], fileState == null ? void 0 : fileState.name, {
27756
+ type: blob == null ? void 0 : blob.type
27745
27757
  });
27746
27758
  handleUpload([file]);
27747
27759
  setCrop(null);
@@ -27755,16 +27767,16 @@ const Upload = ({
27755
27767
  alwaysKeepResolution: true
27756
27768
  }).then(compressedFile => {
27757
27769
  var _fileState$name;
27758
- 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', {
27759
- type: compressedFile === null || compressedFile === void 0 ? void 0 : compressedFile.type
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
27760
27772
  });
27761
27773
  handleUpload([file]);
27762
27774
  setCrop(null);
27763
27775
  setCompletedCrop(null);
27764
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
27776
+ }).catch(error => console.error(error == null ? void 0 : error.message));
27765
27777
  }
27766
27778
  toggleModal();
27767
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
27779
+ }).catch(error => console.error(error == null ? void 0 : error.message));
27768
27780
  } else {
27769
27781
  handleUpload([fileState]);
27770
27782
  toggleModal();
@@ -27793,7 +27805,7 @@ const Upload = ({
27793
27805
  const index = fileList.indexOf(file);
27794
27806
  const newFileList = fileList.slice();
27795
27807
  newFileList.splice(index, 1);
27796
- onChange === null || onChange === void 0 || onChange({
27808
+ onChange == null || onChange({
27797
27809
  fileList: newFileList,
27798
27810
  file
27799
27811
  });
@@ -27816,14 +27828,14 @@ const Upload = ({
27816
27828
  }
27817
27829
  function handleOpenFile(file) {
27818
27830
  var _String, _file$name;
27819
- 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();
27831
+ let extension = (_String = String(file == null || (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
27820
27832
  if (extension === 'pdf') {
27821
- window.open(file === null || file === void 0 ? void 0 : file.url);
27833
+ window.open(file == null ? void 0 : file.url);
27822
27834
  } else {
27823
- if (file !== null && file !== void 0 && file.url) {
27835
+ if (file != null && file.url) {
27824
27836
  const link = document.createElement('a');
27825
27837
  link.href = file.url;
27826
- link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
27838
+ link.setAttribute('download', file == null ? void 0 : file.name);
27827
27839
  document.body.appendChild(link);
27828
27840
  link.click();
27829
27841
  document.body.removeChild(link);
@@ -27885,12 +27897,12 @@ const Upload = ({
27885
27897
  }, replaceLabel && replaceLabel.length > 0 ? replaceLabel : t('replaceLabel', 'Ubah Berkas')));
27886
27898
  }
27887
27899
  const renderPicture = () => {
27888
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
27889
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
27900
+ return fileList == null ? void 0 : fileList.map((item, index) => {
27901
+ if ((item == null ? void 0 : item.status) === 'uploading') {
27890
27902
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
27891
27903
  key: index,
27892
- progress: item === null || item === void 0 ? void 0 : item.percent,
27893
- loading: item === null || item === void 0 ? void 0 : item.loading,
27904
+ progress: item == null ? void 0 : item.percent,
27905
+ loading: item == null ? void 0 : item.loading,
27894
27906
  __self: undefined,
27895
27907
  __source: {
27896
27908
  fileName: _jsxFileName$9,
@@ -27963,13 +27975,13 @@ const Upload = ({
27963
27975
  });
27964
27976
  };
27965
27977
  const renderFile = () => {
27966
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
27978
+ return fileList == null ? void 0 : fileList.map((item, index) => {
27967
27979
  var _item$name;
27968
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
27980
+ if ((item == null ? void 0 : item.status) === 'uploading') {
27969
27981
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
27970
27982
  key: index,
27971
- progress: item === null || item === void 0 ? void 0 : item.percent,
27972
- loading: item === null || item === void 0 ? void 0 : item.loading,
27983
+ progress: item == null ? void 0 : item.percent,
27984
+ loading: item == null ? void 0 : item.loading,
27973
27985
  __self: undefined,
27974
27986
  __source: {
27975
27987
  fileName: _jsxFileName$9,
@@ -28035,7 +28047,7 @@ const Upload = ({
28035
28047
  lineNumber: 666,
28036
28048
  columnNumber: 17
28037
28049
  }
28038
- }, ".", 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, {
28050
+ }, ".", item == null || (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
28039
28051
  label: item.name,
28040
28052
  __self: undefined,
28041
28053
  __source: {
@@ -28405,7 +28417,7 @@ const Upload = ({
28405
28417
  }
28406
28418
  return /*#__PURE__*/React__default.createElement(Flex$1, {
28407
28419
  direction: "row",
28408
- gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
28420
+ gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
28409
28421
  wrap: "wrap",
28410
28422
  css: {
28411
28423
  userSelect: 'none'
@@ -29226,9 +29238,9 @@ const Separator$1 = styled('div', {
29226
29238
  function InputColorPicker(props) {
29227
29239
  const [isPopover, setIsPopover] = useState(false);
29228
29240
  function getColor() {
29229
- const color = props === null || props === void 0 ? void 0 : props.color;
29241
+ const color = props == null ? void 0 : props.color;
29230
29242
  if (typeof color === 'string') {
29231
- return color === null || color === void 0 ? void 0 : color.toUpperCase();
29243
+ return color == null ? void 0 : color.toUpperCase();
29232
29244
  }
29233
29245
  return `rgba(${color.r},${color.g},${color.b},${color.a})`;
29234
29246
  }
@@ -32247,7 +32259,7 @@ const Navigation = props => {
32247
32259
  var _data;
32248
32260
  const isActive = props.currentStep === i;
32249
32261
  const isComplete = props.isComplete[i - 1];
32250
- const isAdditional = (_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.additional;
32262
+ const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional;
32251
32263
  const lastItem = navMobileItems.indexOf(data[i - 1]) + 1 === navMobileItems.length;
32252
32264
  // eslint-disable-next-line no-lone-blocks
32253
32265
  {
@@ -32262,7 +32274,7 @@ const Navigation = props => {
32262
32274
  key: `step-${i}`,
32263
32275
  onClick: () => {
32264
32276
  var _data2;
32265
- if (props.onNavClicked && !((_data2 = data[i - 1]) !== null && _data2 !== void 0 && _data2.disabled) || isAdditional) props.onNavClicked(i);
32277
+ if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
32266
32278
  if (!forbidClickNav && isComplete && !isHide || isAdditional) {
32267
32279
  props.goToStep(i);
32268
32280
  }
@@ -32295,9 +32307,9 @@ const Navigation = props => {
32295
32307
  lineNumber: 176,
32296
32308
  columnNumber: 17
32297
32309
  }
32298
- }), 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, {
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, {
32299
32311
  align: "center",
32300
- label: (_data5 = data[i - 1]) === null || _data5 === void 0 ? void 0 : _data5.tooltipsContents,
32312
+ label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
32301
32313
  __self: undefined,
32302
32314
  __source: {
32303
32315
  fileName: _jsxFileName$4,
@@ -32316,9 +32328,9 @@ const Navigation = props => {
32316
32328
  lineNumber: 181,
32317
32329
  columnNumber: 19
32318
32330
  }
32319
- })), ((_data6 = data[i - 1]) === null || _data6 === void 0 ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32331
+ })), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32320
32332
  css: {
32321
- marginLeft: (_data7 = data[i - 1]) !== null && _data7 !== void 0 && _data7.withTolltip ? 0 : '$spacing-03'
32333
+ marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
32322
32334
  },
32323
32335
  align: "center",
32324
32336
  __self: undefined,
@@ -32369,10 +32381,10 @@ const Navigation = props => {
32369
32381
  lineNumber: 198,
32370
32382
  columnNumber: 21
32371
32383
  }
32372
- }, 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, {
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, {
32373
32385
  align: "center",
32374
32386
  withClick: true,
32375
- label: (_data10 = data[i - 1]) === null || _data10 === void 0 ? void 0 : _data10.tooltipsContents,
32387
+ label: (_data10 = data[i - 1]) == null ? void 0 : _data10.tooltipsContents,
32376
32388
  __self: undefined,
32377
32389
  __source: {
32378
32390
  fileName: _jsxFileName$4,
@@ -32388,11 +32400,11 @@ const Navigation = props => {
32388
32400
  lineNumber: 209,
32389
32401
  columnNumber: 25
32390
32402
  }
32391
- })), ((_data11 = data[i - 1]) === null || _data11 === void 0 ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32403
+ })), ((_data11 = data[i - 1]) == null ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
32392
32404
  align: "center",
32393
32405
  justify: "center",
32394
32406
  css: {
32395
- marginTop: (_data12 = data[i - 1]) !== null && _data12 !== void 0 && _data12.withTolltip ? 0 : '$spacing-03'
32407
+ marginTop: (_data12 = data[i - 1]) != null && _data12.withTolltip ? 0 : '$spacing-03'
32396
32408
  },
32397
32409
  __self: undefined,
32398
32410
  __source: {
@@ -32416,7 +32428,7 @@ const Navigation = props => {
32416
32428
  userSelect: 'none',
32417
32429
  fontSize: '12px',
32418
32430
  textAlign: '-webkit-center',
32419
- display: ((_data13 = data[i - 1]) === null || _data13 === void 0 ? void 0 : _data13.disabled) && 'none',
32431
+ display: ((_data13 = data[i - 1]) == null ? void 0 : _data13.disabled) && 'none',
32420
32432
  marginTop: '$spacing-07',
32421
32433
  flex: 1,
32422
32434
  maxWidth: lastItem && 26
@@ -32496,7 +32508,7 @@ const Navigation = props => {
32496
32508
  height: 24,
32497
32509
  borderRadius: '$round',
32498
32510
  border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
32499
- backgroundColor: (_data14 = data[i - 1]) !== null && _data14 !== void 0 && _data14.disabled ? '$gray200' : '$white'
32511
+ backgroundColor: (_data14 = data[i - 1]) != null && _data14.disabled ? '$gray200' : '$white'
32500
32512
  },
32501
32513
  __self: undefined,
32502
32514
  __source: {
@@ -32525,53 +32537,50 @@ const Navigation = props => {
32525
32537
  }
32526
32538
  return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
32527
32539
  condition: !isMobile,
32528
- wrapper: child => {
32529
- var _props$appendContent;
32530
- return /*#__PURE__*/React__default.createElement(Box, {
32531
- css: {
32532
- opacity: isHide ? 0 : undefined,
32533
- maxWidth: 311
32534
- },
32535
- __self: undefined,
32536
- __source: {
32537
- fileName: _jsxFileName$4,
32538
- lineNumber: 281,
32539
- columnNumber: 9
32540
- }
32541
- }, /*#__PURE__*/React__default.createElement(Flex$1, {
32542
- css: {
32543
- position: !isMobile && 'sticky',
32544
- top: !isMobile ? 44 : 40
32545
- },
32546
- direction: "column",
32547
- gap: 7,
32548
- __self: undefined,
32549
- __source: {
32550
- fileName: _jsxFileName$4,
32551
- lineNumber: 282,
32552
- columnNumber: 11
32553
- }
32554
- }, /*#__PURE__*/React__default.createElement(Card, {
32555
- css: {
32556
- height: 'fit-content',
32557
- padding: 0
32558
- },
32559
- showBottomLine: false,
32560
- __self: undefined,
32561
- __source: {
32562
- fileName: _jsxFileName$4,
32563
- lineNumber: 283,
32564
- columnNumber: 13
32565
- }
32566
- }, child), /*#__PURE__*/React__default.createElement(Box, {
32567
- __self: undefined,
32568
- __source: {
32569
- fileName: _jsxFileName$4,
32570
- lineNumber: 292,
32571
- columnNumber: 13
32572
- }
32573
- }, 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)));
32574
- },
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))),
32575
32584
  __self: undefined,
32576
32585
  __source: {
32577
32586
  fileName: _jsxFileName$4,
@@ -32636,8 +32645,7 @@ const Default = props => {
32636
32645
  }));
32637
32646
  }, [props.hide]);
32638
32647
  useEffect(() => {
32639
- var _props$onChangeVisibi;
32640
- props === null || props === void 0 || (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 || _props$onChangeVisibi.call(props, state.hide);
32648
+ props == null || props.onChangeVisibility == null || props.onChangeVisibility(state.hide);
32641
32649
  }, [state.hide]);
32642
32650
  const toogleVisibility = value => {
32643
32651
  updateState(prev => Object.assign({}, prev, {
@@ -32646,11 +32654,11 @@ const Default = props => {
32646
32654
  };
32647
32655
  const getIsComplete = currentStep => {
32648
32656
  var _state$isComplete;
32649
- return state === null || state === void 0 || (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
32657
+ return state == null || (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
32650
32658
  };
32651
32659
  const getTitleStep = currentStep => {
32652
32660
  var _props$navContents;
32653
- 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;
32661
+ return props == null || (_props$navContents = props.navContents) == null || (_props$navContents = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents.title;
32654
32662
  };
32655
32663
  const setState = value => {
32656
32664
  updateState(Object.assign({}, state, value));
@@ -32684,13 +32692,13 @@ const Default = props => {
32684
32692
  block: 'start'
32685
32693
  });
32686
32694
  props.onStepChange && props.onStepChange(e);
32687
- 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) {
32688
- if ((e === null || e === void 0 ? void 0 : e.activeStep) > (e === null || e === void 0 ? void 0 : e.previousStep)) {
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)) {
32689
32697
  var _state$SW;
32690
- state === null || state === void 0 || (_state$SW = state.SW) === null || _state$SW === void 0 || _state$SW.nextStep();
32698
+ state == null || (_state$SW = state.SW) == null || _state$SW.nextStep();
32691
32699
  } else {
32692
32700
  var _state$SW2;
32693
- state === null || state === void 0 || (_state$SW2 = state.SW) === null || _state$SW2 === void 0 || _state$SW2.previousStep();
32701
+ state == null || (_state$SW2 = state.SW) == null || _state$SW2.previousStep();
32694
32702
  }
32695
32703
  }
32696
32704
  };
@@ -32705,11 +32713,11 @@ const Default = props => {
32705
32713
  }, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
32706
32714
  value: {
32707
32715
  toogleVisibility,
32708
- isHide: state === null || state === void 0 ? void 0 : state.hide,
32716
+ isHide: state == null ? void 0 : state.hide,
32709
32717
  setComplete,
32710
32718
  setState,
32711
32719
  state,
32712
- SW: state === null || state === void 0 ? void 0 : state.SW,
32720
+ SW: state == null ? void 0 : state.SW,
32713
32721
  forbidClickNav: props.forbidClickNav,
32714
32722
  titles: props.titles,
32715
32723
  isMobile: props.isMobile,
@@ -32732,7 +32740,7 @@ const Default = props => {
32732
32740
  nav: /*#__PURE__*/React__default.createElement(Navigation, {
32733
32741
  onNavClicked: props.onNavClicked,
32734
32742
  isComplete: state.isComplete,
32735
- appendContent: props === null || props === void 0 ? void 0 : props.appendContent,
32743
+ appendContent: props == null ? void 0 : props.appendContent,
32736
32744
  __self: undefined,
32737
32745
  __source: {
32738
32746
  fileName: _jsxFileName$4,
@@ -32742,7 +32750,7 @@ const Default = props => {
32742
32750
  }),
32743
32751
  initialStep: props.initialStep,
32744
32752
  onStepChange: handleStepChange,
32745
- isLazyMount: props === null || props === void 0 ? void 0 : props.isLazyMount,
32753
+ isLazyMount: props == null ? void 0 : props.isLazyMount,
32746
32754
  __self: undefined,
32747
32755
  __source: {
32748
32756
  fileName: _jsxFileName$4,
@@ -32889,9 +32897,9 @@ function Content({
32889
32897
  var _getDatasets;
32890
32898
  function getDatasets(content, activeId, isCollapse) {
32891
32899
  const datasets = [];
32892
- for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
32900
+ for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
32893
32901
  var _content$i;
32894
- if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
32902
+ if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
32895
32903
  datasets.unshift(content[i]);
32896
32904
  } else {
32897
32905
  datasets.push(content[i]);
@@ -32929,7 +32937,7 @@ function Content({
32929
32937
  lineNumber: 107,
32930
32938
  columnNumber: 7
32931
32939
  }
32932
- }, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
32940
+ }, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
32933
32941
  return /*#__PURE__*/React__default.createElement(List, {
32934
32942
  key: index,
32935
32943
  __self: this,
@@ -32946,11 +32954,11 @@ function Content({
32946
32954
  marginLeft: '-4px !important',
32947
32955
  borderLeftWidth: '4px !important',
32948
32956
  borderLeftStyle: 'solid !important',
32949
- borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
32957
+ borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
32950
32958
  paddingLeft: '16px !important',
32951
32959
  minHeight: 25
32952
32960
  },
32953
- "data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
32961
+ "data-to-scrollspy-id": item == null ? void 0 : item.id,
32954
32962
  __self: this,
32955
32963
  __source: {
32956
32964
  fileName: _jsxFileName$2,
@@ -32959,13 +32967,13 @@ function Content({
32959
32967
  }
32960
32968
  }, /*#__PURE__*/React__default.createElement(Title$1, {
32961
32969
  className: "link-title",
32962
- active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
32963
- href: `#${item === null || item === void 0 ? void 0 : item.id}`,
32970
+ active: (item == null ? void 0 : item.id) === activeId,
32971
+ href: `#${item == null ? void 0 : item.id}`,
32964
32972
  onClick: e => {
32965
32973
  var _e$currentTarget, _e$currentTarget2;
32966
32974
  e.preventDefault();
32967
- 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]);
32968
- 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]);
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]);
32969
32977
  if (target) {
32970
32978
  var headerOffset = 20;
32971
32979
  var elementPosition = target.getBoundingClientRect().top;
@@ -32989,7 +32997,7 @@ function Content({
32989
32997
  lineNumber: 125,
32990
32998
  columnNumber: 17
32991
32999
  }
32992
- }, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
33000
+ }, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
32993
33001
  })));
32994
33002
  }
32995
33003
  function TableOfContent({