@majoo-ui/react 1.60.23-rc.1 → 1.60.23-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.umd.js CHANGED
@@ -2662,7 +2662,7 @@
2662
2662
  onClick: e => {
2663
2663
  e.preventDefault();
2664
2664
  e.stopPropagation();
2665
- value === null || value === void 0 ? void 0 : value.onRemove();
2665
+ value == null ? void 0 : value.onRemove();
2666
2666
  },
2667
2667
  __self: undefined,
2668
2668
  __source: {
@@ -2681,7 +2681,6 @@
2681
2681
  }
2682
2682
  })));
2683
2683
  const SingleTagBanner = props => {
2684
- var _props$icon;
2685
2684
  return /*#__PURE__*/React__namespace.createElement(Flex$1, {
2686
2685
  gap: 2,
2687
2686
  direction: "column",
@@ -2707,7 +2706,7 @@
2707
2706
  lineNumber: 212,
2708
2707
  columnNumber: 9
2709
2708
  }
2710
- }, (props === null || props === void 0 ? void 0 : props.icon) && /*#__PURE__*/React__namespace.createElement(Flex$1, {
2709
+ }, (props == null ? void 0 : props.icon) && /*#__PURE__*/React__namespace.createElement(Flex$1, {
2711
2710
  css: {
2712
2711
  marginTop: '-2px'
2713
2712
  },
@@ -2717,7 +2716,7 @@
2717
2716
  lineNumber: 213,
2718
2717
  columnNumber: 27
2719
2718
  }
2720
- }, props === null || props === void 0 ? void 0 : (_props$icon = props.icon) === null || _props$icon === void 0 ? void 0 : _props$icon.call(props)), /*#__PURE__*/React__namespace.createElement(Flex$1, {
2719
+ }, props == null ? void 0 : props.icon == null ? void 0 : props.icon()), /*#__PURE__*/React__namespace.createElement(Flex$1, {
2721
2720
  gap: 2,
2722
2721
  direction: "column",
2723
2722
  css: {
@@ -2748,7 +2747,7 @@
2748
2747
  onClick: e => {
2749
2748
  e.preventDefault();
2750
2749
  e.stopPropagation();
2751
- props === null || props === void 0 ? void 0 : props.onRemove();
2750
+ props == null ? void 0 : props.onRemove();
2752
2751
  },
2753
2752
  closeCenter: !props.title && !props.link,
2754
2753
  __self: undefined,
@@ -8506,7 +8505,7 @@
8506
8505
  React.useEffect(() => {
8507
8506
  if (textareaRef.current) {
8508
8507
  textareaRef.current.style.height = '50px';
8509
- const scrollHeight = textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current.scrollHeight;
8508
+ const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
8510
8509
  textareaRef.current.style.height = scrollHeight + 5 + 'px';
8511
8510
  }
8512
8511
  }, []);
@@ -8561,7 +8560,7 @@
8561
8560
  var _jsxFileName$G = "/Users/majoo/majoo-ui/packages/react/src/components/form/components/InputRadio/InputRadioGroup.js";
8562
8561
  const RadioGroup = styled(RadioGroupPrimitive__namespace.Root, Flex$1);
8563
8562
  function InputRadioGroup(props) {
8564
- return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default["default"].createElement(InputRadioContext.Provider, {
8563
+ return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default["default"].createElement(InputRadioContext.Provider, {
8565
8564
  value: props,
8566
8565
  __self: this,
8567
8566
  __source: {
@@ -8576,7 +8575,7 @@
8576
8575
  lineNumber: 14,
8577
8576
  columnNumber: 9
8578
8577
  }
8579
- }), React__default["default"].Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default["default"].cloneElement(child, {
8578
+ }), React__default["default"].Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default["default"].cloneElement(child, {
8580
8579
  style: Object.assign({}, child.props.style, {
8581
8580
  opacity: 1
8582
8581
  })
@@ -8764,9 +8763,8 @@
8764
8763
  return /*#__PURE__*/React__default["default"].createElement(InputNumber, _extends({}, inputProps, {
8765
8764
  readOnly: readOnly,
8766
8765
  onFocus: () => {
8767
- var _inputProps$onFocus;
8768
8766
  onValueChange(props.value);
8769
- inputProps === null || inputProps === void 0 ? void 0 : (_inputProps$onFocus = inputProps.onFocus) === null || _inputProps$onFocus === void 0 ? void 0 : _inputProps$onFocus.call(inputProps);
8767
+ inputProps == null ? void 0 : inputProps.onFocus == null ? void 0 : inputProps.onFocus();
8770
8768
  },
8771
8769
  asChild: true,
8772
8770
  __self: this,
@@ -8781,9 +8779,8 @@
8781
8779
  disabled: disabled,
8782
8780
  readOnly: readOnly,
8783
8781
  onFocus: () => {
8784
- var _inputProps$onFocus2;
8785
8782
  onValueChange(props.value);
8786
- inputProps === null || inputProps === void 0 ? void 0 : (_inputProps$onFocus2 = inputProps.onFocus) === null || _inputProps$onFocus2 === void 0 ? void 0 : _inputProps$onFocus2.call(inputProps);
8783
+ inputProps == null ? void 0 : inputProps.onFocus == null ? void 0 : inputProps.onFocus();
8787
8784
  },
8788
8785
  asChild: true,
8789
8786
  __self: this,
@@ -10747,24 +10744,24 @@
10747
10744
  allowLeadingZeros,
10748
10745
  format
10749
10746
  } = Object.assign({}, ref);
10750
- const formattedValueStartsWithZero = (_formattedValue = formattedValue) === null || _formattedValue === void 0 ? void 0 : _formattedValue.startsWith(`${prefix}0`);
10751
- const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) === null || _formattedValue2 === void 0 ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
10747
+ const formattedValueStartsWithZero = (_formattedValue = formattedValue) == null ? void 0 : _formattedValue.startsWith(`${prefix}0`);
10748
+ const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) == null ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
10752
10749
  const emptyFormattedValue = prefix || suffix || prefix + suffix || '';
10753
10750
  if ((formattedValueStartsWithZero || formattedWithZeroAndSuffix) && !allowLeadingZeros && !format) {
10754
10751
  var _formattedValue3, _input$value;
10755
10752
  const isSpecialChar = /^[+-]/.test(formattedValue);
10756
- if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) !== null && _formattedValue3 !== void 0 && _formattedValue3.includes('0,'))) {
10753
+ if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) != null && _formattedValue3.includes('0,'))) {
10757
10754
  var _formattedValue4, _numAsString;
10758
- formattedValue = (_formattedValue4 = formattedValue) === null || _formattedValue4 === void 0 ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
10759
- numAsString = (_numAsString = numAsString) === null || _numAsString === void 0 ? void 0 : _numAsString.replace(/^0+/, '');
10755
+ formattedValue = (_formattedValue4 = formattedValue) == null ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
10756
+ numAsString = (_numAsString = numAsString) == null ? void 0 : _numAsString.replace(/^0+/, '');
10760
10757
  }
10761
- if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input === null || input === void 0 ? void 0 : input.value)) {
10758
+ if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input == null ? void 0 : input.value)) {
10762
10759
  formattedValue = `${prefix}0${suffix}`;
10763
10760
  numAsString = '0';
10764
- } else if (input !== null && input !== void 0 && (_input$value = input.value) !== null && _input$value !== void 0 && _input$value.includes('0,')) {
10761
+ } else if (input != null && (_input$value = input.value) != null && _input$value.includes('0,')) {
10765
10762
  allowLeadingZeros = true;
10766
- formattedValue = input === null || input === void 0 ? void 0 : input.value;
10767
- numAsString = this.removeFormatting(input === null || input === void 0 ? void 0 : input.value);
10763
+ formattedValue = input == null ? void 0 : input.value;
10764
+ numAsString = this.removeFormatting(input == null ? void 0 : input.value);
10768
10765
  }
10769
10766
  }
10770
10767
  //end adjustment
@@ -11222,7 +11219,7 @@
11222
11219
  }
11223
11220
  function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
11224
11221
  const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
11225
- return maxValue + (prefix === null || prefix === void 0 ? void 0 : prefix.length) + (suffix === null || suffix === void 0 ? void 0 : suffix.length) + tsLength;
11222
+ return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
11226
11223
  }
11227
11224
  const InputNumber = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
11228
11225
  let {
@@ -11274,9 +11271,9 @@
11274
11271
  size: size,
11275
11272
  isInvalid: isInvalid,
11276
11273
  readOnly: readOnly,
11277
- isReadOnly: readOnly && !(props !== null && props !== void 0 && props.inputGroup) && !(props !== null && props !== void 0 && props.asChild),
11274
+ isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
11278
11275
  disabled: disabled,
11279
- maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props === null || props === void 0 ? void 0 : props.prefix, props === null || props === void 0 ? void 0 : props.suffix, thousandSeparator) : maxLength,
11276
+ maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
11280
11277
  thousandSeparator: thousandSeparator
11281
11278
  }, props, {
11282
11279
  __self: undefined,
@@ -11578,16 +11575,16 @@
11578
11575
  const addTags = event => {
11579
11576
  if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
11580
11577
  if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
11581
- onEnter === null || onEnter === void 0 ? void 0 : onEnter({
11578
+ onEnter == null ? void 0 : onEnter({
11582
11579
  key: 'duplicate',
11583
11580
  value: event.target.value
11584
11581
  });
11585
11582
  return;
11586
11583
  }
11587
- if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
11584
+ if (pattern && pattern != null && pattern.regex) {
11588
11585
  const regex = new RegExp(pattern.regex);
11589
11586
  if (!regex.test(event.target.value)) {
11590
- onEnter === null || onEnter === void 0 ? void 0 : onEnter({
11587
+ onEnter == null ? void 0 : onEnter({
11591
11588
  key: 'error',
11592
11589
  value: event.target.value
11593
11590
  });
@@ -11596,7 +11593,7 @@
11596
11593
  }
11597
11594
  }
11598
11595
  setRegexError(false);
11599
- onEnter === null || onEnter === void 0 ? void 0 : onEnter({
11596
+ onEnter == null ? void 0 : onEnter({
11600
11597
  key: 'success',
11601
11598
  value: event.target.value
11602
11599
  });
@@ -11608,7 +11605,7 @@
11608
11605
  if (disabled || readOnly) {
11609
11606
  return tags;
11610
11607
  } else if (key === 'removeTag' || key === 'Backspace') {
11611
- onRemoveItem === null || onRemoveItem === void 0 ? void 0 : onRemoveItem(tags[index]);
11608
+ onRemoveItem == null ? void 0 : onRemoveItem(tags[index]);
11612
11609
  setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
11613
11610
  }
11614
11611
  };
@@ -11659,7 +11656,7 @@
11659
11656
  lineNumber: 180,
11660
11657
  columnNumber: 9
11661
11658
  }
11662
- })), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default["default"].createElement(FormHelper, {
11659
+ })), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default["default"].createElement(FormHelper, {
11663
11660
  color: "red",
11664
11661
  __self: this,
11665
11662
  __source: {
@@ -11967,14 +11964,14 @@
11967
11964
  t
11968
11965
  } = reactI18next.useTranslation(['MajooUI/inputSearchbox', 'translation']);
11969
11966
  const [value, setValue] = React.useState(defaultValue);
11970
- const inputValue = (_props$value = props === null || props === void 0 ? void 0 : props.value) != null ? _props$value : value;
11971
- const debounceChange = React.useCallback(debounce__default["default"](e => onChange === null || onChange === void 0 ? void 0 : onChange(e), 1000), [onChange]);
11967
+ const inputValue = (_props$value = props == null ? void 0 : props.value) != null ? _props$value : value;
11968
+ const debounceChange = React.useCallback(debounce__default["default"](e => onChange == null ? void 0 : onChange(e), 1000), [onChange]);
11972
11969
  const handleChange = React.useCallback(e => {
11973
11970
  setValue(e.target.value);
11974
11971
  if (withDebounce) {
11975
11972
  debounceChange(e.target.value);
11976
11973
  } else {
11977
- onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
11974
+ onChange == null ? void 0 : onChange(e.target.value);
11978
11975
  }
11979
11976
  }, [onChange, debounceChange, withDebounce]);
11980
11977
  const handleClearButtonClick = e => {
@@ -12027,7 +12024,7 @@
12027
12024
  columnNumber: 7
12028
12025
  }
12029
12026
  })), /*#__PURE__*/React__default["default"].createElement(InputRightElement, {
12030
- children: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(SvgCloseFilled, {
12027
+ children: (inputValue == null ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(SvgCloseFilled, {
12031
12028
  color: colors$7.iconSecondary,
12032
12029
  __self: undefined,
12033
12030
  __source: {
@@ -12272,7 +12269,7 @@
12272
12269
  middleware: [react$1.offset(_sideOffset), react$1.shift(), _flip && react$1.flip()],
12273
12270
  onOpenChange: isOpen => {
12274
12271
  setOpenState(isOpen);
12275
- !isOpen && (onClose === null || onClose === void 0 ? void 0 : onClose());
12272
+ !isOpen && (onClose == null ? void 0 : onClose());
12276
12273
  },
12277
12274
  placement
12278
12275
  });
@@ -14174,13 +14171,13 @@
14174
14171
  const isShowSelectAll = showSelectAll && !maxSelectedItem;
14175
14172
  React.useEffect(() => {
14176
14173
  var _scrollerRef$current;
14177
- (_scrollerRef$current = scrollerRef.current) === null || _scrollerRef$current === void 0 ? void 0 : _scrollerRef$current.scrollTo({
14174
+ (_scrollerRef$current = scrollerRef.current) == null ? void 0 : _scrollerRef$current.scrollTo({
14178
14175
  top: 0
14179
14176
  });
14180
14177
  }, [query]);
14181
14178
  React.useEffect(() => {
14182
- if (defaultValue !== null && defaultValue !== void 0 && defaultValue.length) {
14183
- if (value !== null && value !== void 0 && value.length) {
14179
+ if (defaultValue != null && defaultValue.length) {
14180
+ if (value != null && value.length) {
14184
14181
  setInputSelectValue(value);
14185
14182
  }
14186
14183
  } else {
@@ -14245,14 +14242,14 @@
14245
14242
  removeSelectedItem,
14246
14243
  selectedItems
14247
14244
  } = Downshift.useMultipleSelection({
14248
- selectedItems: selectedValue.length > 0 ? initItem === null || initItem === void 0 ? 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)) : []
14245
+ selectedItems: selectedValue.length > 0 ? initItem == null ? void 0 : (_initItem$reduce = initItem.reduce((acc, item) => [...acc, item, ...(item.children ? item.children : [])], [])) == null ? void 0 : _initItem$reduce.filter(item => selectedValue.includes(item.id)) : []
14249
14246
  });
14250
14247
  const generateOptions = data => {
14251
14248
  return data.map(option => {
14252
14249
  if (typeof option === 'object') {
14253
14250
  const id = Object.values(option)[0];
14254
14251
  const name = Object.values(option)[1];
14255
- let children = option === null || option === void 0 ? void 0 : option.children;
14252
+ let children = option == null ? void 0 : option.children;
14256
14253
  let isDisabled = disabledOptions.length > 0 ? disabledOptions.includes(id) : false;
14257
14254
  if (children && Array.isArray(children)) {
14258
14255
  children = generateOptions(children);
@@ -14274,7 +14271,7 @@
14274
14271
  };
14275
14272
  const debouncedSearch = React__default["default"].useRef(debounce__default["default"](_async(function (query) {
14276
14273
  setQuery(query);
14277
- onSearch === null || onSearch === void 0 ? void 0 : onSearch(query);
14274
+ onSearch == null ? void 0 : onSearch(query);
14278
14275
  return _await();
14279
14276
  }), 1000)).current;
14280
14277
  React__default["default"].useEffect(() => {
@@ -14283,7 +14280,7 @@
14283
14280
  };
14284
14281
  }, [debouncedSearch]);
14285
14282
  const handleInputValue = input => {
14286
- onSearch === null || onSearch === void 0 ? void 0 : onSearch(input);
14283
+ onSearch == null ? void 0 : onSearch(input);
14287
14284
  if (input === '') {
14288
14285
  if (disabledOptions.length > 0) {
14289
14286
  const options = generateOptions(sortDisabled);
@@ -14298,9 +14295,9 @@
14298
14295
  }, ...option] : option);
14299
14296
  }
14300
14297
  } else {
14301
- let filterItems = option === null || option === void 0 ? void 0 : option.filter(item => {
14302
- var _item$name, _item$name$toLowerCas, _item$name$toLowerCas2, _input$toLocaleLowerC;
14303
- return item === null || item === void 0 ? void 0 : (_item$name = item.name) === null || _item$name === void 0 ? void 0 : (_item$name$toLowerCas = _item$name.toLowerCase()) === null || _item$name$toLowerCas === void 0 ? void 0 : (_item$name$toLowerCas2 = _item$name$toLowerCas.includes) === null || _item$name$toLowerCas2 === void 0 ? void 0 : _item$name$toLowerCas2.call(_item$name$toLowerCas, input === null || input === void 0 ? void 0 : (_input$toLocaleLowerC = input.toLocaleLowerCase) === null || _input$toLocaleLowerC === void 0 ? void 0 : _input$toLocaleLowerC.call(input));
14298
+ let filterItems = option == null ? void 0 : option.filter(item => {
14299
+ var _item$name, _item$name$toLowerCas;
14300
+ return item == null ? void 0 : (_item$name = item.name) == null ? void 0 : (_item$name$toLowerCas = _item$name.toLowerCase()) == null ? void 0 : _item$name$toLowerCas.includes == null ? void 0 : _item$name$toLowerCas.includes(input == null ? void 0 : input.toLocaleLowerCase == null ? void 0 : input.toLocaleLowerCase());
14304
14301
  });
14305
14302
  setItems(filterItems);
14306
14303
  }
@@ -14309,10 +14306,10 @@
14309
14306
  if (disabled || readOnly) {
14310
14307
  return selectedValue;
14311
14308
  } else {
14312
- if ((selected === null || selected === void 0 ? void 0 : selected.id) === 'counter') {
14309
+ if ((selected == null ? void 0 : selected.id) === 'counter') {
14313
14310
  setSelectedValue([]);
14314
14311
  setInputSelectValue([]);
14315
- onChange === null || onChange === void 0 ? void 0 : onChange([]);
14312
+ onChange == null ? void 0 : onChange([]);
14316
14313
  for (let i = 0; i < selectedValue.length; i++) {
14317
14314
  removeSelectedItem(selectedValue[i]);
14318
14315
  }
@@ -14322,7 +14319,7 @@
14322
14319
  setSelectedValue(filterItems);
14323
14320
  setInputSelectValue(filterItems);
14324
14321
  if (selected.id !== '!all') {
14325
- onChange === null || onChange === void 0 ? void 0 : onChange(filterItems);
14322
+ onChange == null ? void 0 : onChange(filterItems);
14326
14323
  }
14327
14324
  }
14328
14325
  }
@@ -14361,9 +14358,9 @@
14361
14358
  if (selectedItem.id === '!all') {
14362
14359
  items.forEach(item => {
14363
14360
  var _item$children;
14364
- if (item !== null && item !== void 0 && (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
14361
+ if (item != null && (_item$children = item.children) != null && _item$children.length) {
14365
14362
  var _item$children2;
14366
- item === null || item === void 0 ? void 0 : (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.forEach(item => {
14363
+ item == null ? void 0 : (_item$children2 = item.children) == null ? void 0 : _item$children2.forEach(item => {
14367
14364
  removeSelectedItem(item);
14368
14365
  });
14369
14366
  } else {
@@ -14372,7 +14369,7 @@
14372
14369
  });
14373
14370
  setSelectedValue([]);
14374
14371
  setInputSelectValue([]);
14375
- onChange === null || onChange === void 0 ? void 0 : onChange([]);
14372
+ onChange == null ? void 0 : onChange([]);
14376
14373
  } else {
14377
14374
  removeItem(selectedItem);
14378
14375
  }
@@ -14383,9 +14380,9 @@
14383
14380
  const itemIds = [];
14384
14381
  items.filter(item => !item.isDisabled).forEach(item => {
14385
14382
  var _item$children3;
14386
- if (item !== null && item !== void 0 && (_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length) {
14383
+ if (item != null && (_item$children3 = item.children) != null && _item$children3.length) {
14387
14384
  var _item$children4;
14388
- item === null || item === void 0 ? void 0 : (_item$children4 = item.children) === null || _item$children4 === void 0 ? void 0 : _item$children4.filter(item => !item.isDisabled).forEach(item => {
14385
+ item == null ? void 0 : (_item$children4 = item.children) == null ? void 0 : _item$children4.filter(item => !item.isDisabled).forEach(item => {
14389
14386
  addSelectedItem(item);
14390
14387
  itemIds.push(item.id);
14391
14388
  });
@@ -14400,17 +14397,17 @@
14400
14397
  if (onSelectAllChecked) {
14401
14398
  onSelectAllChecked(itemIds.slice(1));
14402
14399
  } else {
14403
- onChange === null || onChange === void 0 ? void 0 : onChange(itemIds.slice(1));
14400
+ onChange == null ? void 0 : onChange(itemIds.slice(1));
14404
14401
  }
14405
14402
  } else {
14406
14403
  var _selectedItem$childre;
14407
14404
  //start check if item have children (option group)
14408
- if (selectedItem !== null && selectedItem !== void 0 && (_selectedItem$childre = selectedItem.children) !== null && _selectedItem$childre !== void 0 && _selectedItem$childre.length) {
14405
+ if (selectedItem != null && (_selectedItem$childre = selectedItem.children) != null && _selectedItem$childre.length) {
14409
14406
  var _selectedItem$childre2;
14410
14407
  const itemIdsSelect = [];
14411
14408
  const itemIdsUnSelect = [];
14412
- selectedItem === null || selectedItem === void 0 ? void 0 : (_selectedItem$childre2 = selectedItem.children) === null || _selectedItem$childre2 === void 0 ? void 0 : _selectedItem$childre2.filter(item => !item.isDisabled).forEach(item => {
14413
- if (selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id)) {
14409
+ selectedItem == null ? void 0 : (_selectedItem$childre2 = selectedItem.children) == null ? void 0 : _selectedItem$childre2.filter(item => !item.isDisabled).forEach(item => {
14410
+ if (selectedValue != null && selectedValue.includes(item.id)) {
14414
14411
  removeSelectedItem(item);
14415
14412
  itemIdsUnSelect.push(item.id);
14416
14413
  } else {
@@ -14424,19 +14421,19 @@
14424
14421
  setSelectedValue([...selectedValue, ...itemIdsSelect]);
14425
14422
  setInputSelectValue([...selectedValue, ...itemIdsSelect]);
14426
14423
  const _filteredSelectedValues = selectedValue.filter(val => val !== '!all');
14427
- onChange === null || onChange === void 0 ? void 0 : onChange([..._filteredSelectedValues, ...itemIdsSelect]);
14424
+ onChange == null ? void 0 : onChange([..._filteredSelectedValues, ...itemIdsSelect]);
14428
14425
  }
14429
14426
 
14430
14427
  //unselect all child in one of the option groups
14431
14428
  if (itemIdsUnSelect.length) {
14432
14429
  const newSelectedValue = selectedValue.filter(selId => {
14433
14430
  var _itemIdsUnSelect$filt;
14434
- return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) === null || _itemIdsUnSelect$filt === void 0 ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
14431
+ return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) == null ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
14435
14432
  });
14436
14433
  setSelectedValue(newSelectedValue);
14437
14434
  setInputSelectValue(newSelectedValue);
14438
14435
  const _filteredSelectedValues2 = newSelectedValue.filter(val => val !== '!all');
14439
- onChange === null || onChange === void 0 ? void 0 : onChange(_filteredSelectedValues2);
14436
+ onChange == null ? void 0 : onChange(_filteredSelectedValues2);
14440
14437
  }
14441
14438
  return;
14442
14439
  }
@@ -14453,7 +14450,7 @@
14453
14450
  setSelectedValue([...selectedValue, selectedItem.id]);
14454
14451
  setInputSelectValue([...selectedValue, selectedItem.id]);
14455
14452
  const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
14456
- onChange === null || onChange === void 0 ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
14453
+ onChange == null ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
14457
14454
  }
14458
14455
  selectItem(null);
14459
14456
  }
@@ -14485,9 +14482,9 @@
14485
14482
  }
14486
14483
  }
14487
14484
  });
14488
- const getOption = React.useCallback(() => maxSelectedItem ? option === null || option === void 0 ? void 0 : option.map(item => {
14489
- const isMaxSelectedItem = maxSelectedItem && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) >= maxSelectedItem;
14490
- if (isMaxSelectedItem && !(selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id))) {
14485
+ const getOption = React.useCallback(() => maxSelectedItem ? option == null ? void 0 : option.map(item => {
14486
+ const isMaxSelectedItem = maxSelectedItem && (selectedValue == null ? void 0 : selectedValue.length) >= maxSelectedItem;
14487
+ if (isMaxSelectedItem && !(selectedValue != null && selectedValue.includes(item.id))) {
14491
14488
  item.hideCheck = true;
14492
14489
  item.isDisabled = true;
14493
14490
  } else {
@@ -14496,7 +14493,7 @@
14496
14493
  }
14497
14494
  return item;
14498
14495
  }) : option, [maxSelectedItem, option, selectedValue]);
14499
- const itemsLength = items === null || items === void 0 ? void 0 : items.reduce((acc, item) => {
14496
+ const itemsLength = items == null ? void 0 : items.reduce((acc, item) => {
14500
14497
  return [...acc, ...(item.children ? item.children : [item])];
14501
14498
  }, []).length;
14502
14499
  React.useEffect(() => {
@@ -14545,16 +14542,15 @@
14545
14542
  }, [label, isOpen]);
14546
14543
  const toggleCollapsible = () => setShowAllTags(!showAllTags);
14547
14544
  const handleRemoveAllItem = () => {
14548
- onChange === null || onChange === void 0 ? void 0 : onChange([]);
14545
+ onChange == null ? void 0 : onChange([]);
14549
14546
  setSelectedValue([]);
14550
14547
  setInputSelectValue([]);
14551
14548
  for (let i = 0; i < selectedValue.length; i++) {
14552
14549
  removeSelectedItem(selectedValue[i]);
14553
14550
  }
14554
14551
  };
14555
- const isShowTagSelectAll = showTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > (option === null || option === void 0 ? void 0 : option.length);
14552
+ const isShowTagSelectAll = showTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > (option == null ? void 0 : option.length);
14556
14553
  const renderOptionItem = (item, index, asChild) => {
14557
- var _item$render;
14558
14554
  return /*#__PURE__*/React__default["default"].createElement(ItemWrapper$1, _extends({
14559
14555
  key: item.id
14560
14556
  }, getItemProps({
@@ -14588,7 +14584,7 @@
14588
14584
  lineNumber: 777,
14589
14585
  columnNumber: 11
14590
14586
  }
14591
- }, !(item !== null && item !== void 0 && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14587
+ }, !(item != null && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14592
14588
  color: colors$8.iconDisable,
14593
14589
  __self: undefined,
14594
14590
  __source: {
@@ -14604,7 +14600,7 @@
14604
14600
  lineNumber: 793,
14605
14601
  columnNumber: 19
14606
14602
  }
14607
- })), 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["default"].createElement(IndeterminateFilled$1, {
14603
+ })), isShowSelectAll && (item == null ? void 0 : item.id) === '!all' && selectedValue != null && selectedValue.length && (selectedValue == null ? void 0 : selectedValue.length) < itemsLength ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
14608
14604
  __self: undefined,
14609
14605
  __source: {
14610
14606
  fileName: _jsxFileName$w,
@@ -14629,15 +14625,15 @@
14629
14625
  lineNumber: 802,
14630
14626
  columnNumber: 11
14631
14627
  }
14632
- }, item.render ? (_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.call(item, item.name) : item.name));
14628
+ }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name));
14633
14629
  };
14634
14630
  let lastGroupIndex = showSelectAll ? 1 : 0;
14635
14631
  const renderOptionGroupItem = (item, index) => {
14636
- var _item$children5, _item$children6, _item$children7, _item$children7$filte, _item$render2, _item$children8;
14632
+ var _item$children5, _item$children6, _item$children7, _item$children7$filte, _item$children8;
14637
14633
  // const groupIndex = (index > (showSelectAll ? 1 : 0)) ? lastGroupIndex : 0;
14638
14634
  const groupIndex = lastGroupIndex;
14639
- lastGroupIndex += ((item === null || item === void 0 ? void 0 : (_item$children5 = item.children) === null || _item$children5 === void 0 ? void 0 : _item$children5.length) || 0) + 1;
14640
- const filterSelectedChild = item === null || item === void 0 ? void 0 : (_item$children6 = item.children) === null || _item$children6 === void 0 ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
14635
+ lastGroupIndex += ((item == null ? void 0 : (_item$children5 = item.children) == null ? void 0 : _item$children5.length) || 0) + 1;
14636
+ const filterSelectedChild = item == null ? void 0 : (_item$children6 = item.children) == null ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
14641
14637
  return /*#__PURE__*/React__default["default"].createElement(OptionGroupItem, {
14642
14638
  item: /*#__PURE__*/React__default["default"].createElement(ItemWrapper$1, _extends({
14643
14639
  key: item.id
@@ -14670,7 +14666,7 @@
14670
14666
  lineNumber: 831,
14671
14667
  columnNumber: 15
14672
14668
  }
14673
- }, !(item !== null && item !== void 0 && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14669
+ }, !(item != null && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14674
14670
  color: colors$8.iconDisable,
14675
14671
  __self: undefined,
14676
14672
  __source: {
@@ -14678,7 +14674,7 @@
14678
14674
  lineNumber: 841,
14679
14675
  columnNumber: 19
14680
14676
  }
14681
- }) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) === (item === null || item === void 0 ? void 0 : (_item$children7 = item.children) === null || _item$children7 === void 0 ? void 0 : (_item$children7$filte = _item$children7.filter(e => !e.isDisabled)) === null || _item$children7$filte === void 0 ? void 0 : _item$children7$filte.length) ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14677
+ }) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) === (item == null ? void 0 : (_item$children7 = item.children) == null ? void 0 : (_item$children7$filte = _item$children7.filter(e => !e.isDisabled)) == null ? void 0 : _item$children7$filte.length) ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14682
14678
  color: colors$8.iconGreen,
14683
14679
  __self: undefined,
14684
14680
  __source: {
@@ -14686,7 +14682,7 @@
14686
14682
  lineNumber: 843,
14687
14683
  columnNumber: 19
14688
14684
  }
14689
- }) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
14685
+ }) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
14690
14686
  __self: undefined,
14691
14687
  __source: {
14692
14688
  fileName: _jsxFileName$w,
@@ -14704,14 +14700,14 @@
14704
14700
  lineNumber: 848,
14705
14701
  columnNumber: 15
14706
14702
  }
14707
- }, item.render ? (_item$render2 = item.render) === null || _item$render2 === void 0 ? void 0 : _item$render2.call(item, item.name) : item.name)),
14703
+ }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name)),
14708
14704
  __self: undefined,
14709
14705
  __source: {
14710
14706
  fileName: _jsxFileName$w,
14711
14707
  lineNumber: 816,
14712
14708
  columnNumber: 9
14713
14709
  }
14714
- }, item === null || item === void 0 ? void 0 : (_item$children8 = item.children) === null || _item$children8 === void 0 ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
14710
+ }, item == null ? void 0 : (_item$children8 = item.children) == null ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
14715
14711
  };
14716
14712
  return /*#__PURE__*/React__default["default"].createElement(Wrapper$1, _extends({
14717
14713
  css: css
@@ -14842,13 +14838,13 @@
14842
14838
  lineNumber: 907,
14843
14839
  columnNumber: 17
14844
14840
  }
14845
- }), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems === null || selectedItems === void 0 ? void 0 : (_selectedItems$filter = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter === void 0 ? void 0 : (_selectedItems$filter2 = _selectedItems$filter.filter((_, idx) => {
14841
+ }), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems == null ? void 0 : (_selectedItems$filter = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : (_selectedItems$filter2 = _selectedItems$filter.filter((_, idx) => {
14846
14842
  if (showAllTags || !collapsible) {
14847
14843
  return true;
14848
14844
  } else {
14849
14845
  return idx < 5;
14850
14846
  }
14851
- })) === null || _selectedItems$filter2 === void 0 ? void 0 : _selectedItems$filter2.map((selectedItem, index) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends({
14847
+ })) == null ? void 0 : _selectedItems$filter2.map((selectedItem, index) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends({
14852
14848
  disabled: disabled,
14853
14849
  isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
14854
14850
  size: "lg",
@@ -14873,7 +14869,7 @@
14873
14869
  lineNumber: 936,
14874
14870
  columnNumber: 21
14875
14871
  }
14876
- }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
14872
+ }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
14877
14873
  direction: "column",
14878
14874
  gap: 4,
14879
14875
  __self: undefined,
@@ -14959,7 +14955,7 @@
14959
14955
  lineNumber: 979,
14960
14956
  columnNumber: 19
14961
14957
  }
14962
- }, `${totalOptions ? totalOptions : selectedItems === null || selectedItems === void 0 ? 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')}`))), showCounter && !isShowTagSelectAll && Boolean(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) && /*#__PURE__*/React__default["default"].createElement(Paragraph, {
14958
+ }, `${totalOptions ? totalOptions : selectedItems == null ? void 0 : (_selectedItems$filter3 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter3.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`))), showCounter && !isShowTagSelectAll && Boolean(selectedItems == null ? void 0 : selectedItems.length) && /*#__PURE__*/React__default["default"].createElement(Paragraph, {
14963
14959
  css: {
14964
14960
  fontSize: '$label',
14965
14961
  marginTop: '$spacing-01'
@@ -14971,7 +14967,7 @@
14971
14967
  lineNumber: 989,
14972
14968
  columnNumber: 11
14973
14969
  }
14974
- }, `${totalOptions ? totalOptions : selectedItems === null || selectedItems === void 0 ? void 0 : (_selectedItems$filter4 = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter4 === void 0 ? void 0 : _selectedItems$filter4.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`), /*#__PURE__*/React__default["default"].createElement(OptionWrapper$1, {
14970
+ }, `${totalOptions ? totalOptions : selectedItems == null ? void 0 : (_selectedItems$filter4 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter4.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`), /*#__PURE__*/React__default["default"].createElement(OptionWrapper$1, {
14975
14971
  placement: placement,
14976
14972
  css: {
14977
14973
  display: isOpen && disabled === false ? 'block' : 'none',
@@ -15035,7 +15031,7 @@
15035
15031
  if (scrollerRef.current) {
15036
15032
  scrollerRef.current.scrollBy(0, -5);
15037
15033
  }
15038
- fetchData === null || fetchData === void 0 ? void 0 : fetchData({
15034
+ fetchData == null ? void 0 : fetchData({
15039
15035
  query
15040
15036
  });
15041
15037
  }
@@ -15056,7 +15052,7 @@
15056
15052
  lineNumber: 1029,
15057
15053
  columnNumber: 15
15058
15054
  }
15059
- }, isOpen && items.map((item, index) => item !== null && item !== void 0 && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default["default"].createElement(Option, _extends({
15055
+ }, isOpen && items.map((item, index) => item != null && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default["default"].createElement(Option, _extends({
15060
15056
  css: {
15061
15057
  height: 'auto'
15062
15058
  }
@@ -15784,7 +15780,7 @@
15784
15780
  padding: '$spacing-05',
15785
15781
  borderRadius: '$lg',
15786
15782
  maxHeight: 285,
15787
- height: isLoading ? 285 : 'unset',
15783
+ height: isLoading ? wrapperCss ? wrapperCss === null || wrapperCss === void 0 ? void 0 : wrapperCss.maxHeight : 285 : 'unset',
15788
15784
  overflow: 'auto',
15789
15785
  marginTop: '$spacing-03'
15790
15786
  }, wrapperCss && wrapperCss),
@@ -17492,9 +17488,9 @@
17492
17488
  }
17493
17489
  function handleInputChange(type, e) {
17494
17490
  var _e$target;
17495
- const value = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
17491
+ const value = e == null ? void 0 : (_e$target = e.target) == null ? void 0 : _e$target.value;
17496
17492
  const format = 'DD:MM:YYYY:HH:mm';
17497
- const minLength = (value === null || value === void 0 ? void 0 : value.length) > 1;
17493
+ const minLength = (value == null ? void 0 : value.length) > 1;
17498
17494
  const hourValue = params => moment__default["default"](moment__default["default"](`${moment__default["default"](date).format('DD:MM:YYYY:mm')}:${params}`, 'DD:MM:YYYY:mm:HH').toDate());
17499
17495
  const minuteValue = params => moment__default["default"](moment__default["default"](`${moment__default["default"](date).format('DD:MM:YYYY:HH')}:${params}`, 'DD:MM:YYYY:HH:mm').toDate());
17500
17496
  if (!disabled) {
@@ -21480,7 +21476,7 @@
21480
21476
  };
21481
21477
  };
21482
21478
  const getValue = () => {
21483
- let value = props === null || props === void 0 ? void 0 : props.value;
21479
+ let value = props == null ? void 0 : props.value;
21484
21480
  const isTrailing = variantIcon === 'trailing';
21485
21481
  if (typeof value === 'number' || parseInt(value)) {
21486
21482
  if (Math.sign(value) === 1 || Math.sign(value) === 0) {
@@ -22109,7 +22105,7 @@
22109
22105
  justify: "center",
22110
22106
  onClick: () => {
22111
22107
  var _dialogPageRef$curren;
22112
- return (_dialogPageRef$curren = dialogPageRef.current) === null || _dialogPageRef$curren === void 0 ? void 0 : _dialogPageRef$curren.click();
22108
+ return (_dialogPageRef$curren = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren.click();
22113
22109
  },
22114
22110
  __self: undefined,
22115
22111
  __source: {
@@ -22187,7 +22183,7 @@
22187
22183
  onSubmit: () => {
22188
22184
  var _dialogPageRef$curren2;
22189
22185
  debouncedGoToPage(Number(goToPage));
22190
- (_dialogPageRef$curren2 = dialogPageRef.current) === null || _dialogPageRef$curren2 === void 0 ? void 0 : _dialogPageRef$curren2.click();
22186
+ (_dialogPageRef$curren2 = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren2.click();
22191
22187
  },
22192
22188
  __self: undefined,
22193
22189
  __source: {
@@ -22204,7 +22200,7 @@
22204
22200
  allowNegative: false,
22205
22201
  onChange: e => {
22206
22202
  var _e$target;
22207
- return setGoToPage((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
22203
+ return setGoToPage((_e$target = e.target) == null ? void 0 : _e$target.value);
22208
22204
  },
22209
22205
  __self: undefined,
22210
22206
  __source: {
@@ -22237,7 +22233,7 @@
22237
22233
  onClick: () => {
22238
22234
  var _dialogPageRef$curren3;
22239
22235
  setGoToPage(null);
22240
- (_dialogPageRef$curren3 = dialogPageRef.current) === null || _dialogPageRef$curren3 === void 0 ? void 0 : _dialogPageRef$curren3.click();
22236
+ (_dialogPageRef$curren3 = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren3.click();
22241
22237
  },
22242
22238
  __self: undefined,
22243
22239
  __source: {
@@ -22252,7 +22248,7 @@
22252
22248
  onClick: () => {
22253
22249
  var _dialogPageRef$curren4;
22254
22250
  debouncedGoToPage(Number(goToPage));
22255
- (_dialogPageRef$curren4 = dialogPageRef.current) === null || _dialogPageRef$curren4 === void 0 ? void 0 : _dialogPageRef$curren4.click();
22251
+ (_dialogPageRef$curren4 = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren4.click();
22256
22252
  },
22257
22253
  __self: undefined,
22258
22254
  __source: {
@@ -22341,7 +22337,7 @@
22341
22337
  onClick: () => {
22342
22338
  if (isMobilePagination) {
22343
22339
  var _dialogLimitRef$curre;
22344
- (_dialogLimitRef$curre = dialogLimitRef.current) === null || _dialogLimitRef$curre === void 0 ? void 0 : _dialogLimitRef$curre.click();
22340
+ (_dialogLimitRef$curre = dialogLimitRef.current) == null ? void 0 : _dialogLimitRef$curre.click();
22345
22341
  }
22346
22342
  },
22347
22343
  __self: this,
@@ -22387,7 +22383,7 @@
22387
22383
  lineNumber: 60,
22388
22384
  columnNumber: 13
22389
22385
  }
22390
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(PopoverClose, {
22386
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(PopoverClose, {
22391
22387
  key: limit,
22392
22388
  css: limitItemContainerStyle(selectedLimit === limit),
22393
22389
  onClick: () => onChange(limit),
@@ -22470,7 +22466,7 @@
22470
22466
  lineNumber: 100,
22471
22467
  columnNumber: 11
22472
22468
  }
22473
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(Flex$1, {
22469
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(Flex$1, {
22474
22470
  css: {
22475
22471
  height: 44,
22476
22472
  width: '100%',
@@ -22485,7 +22481,7 @@
22485
22481
  onClick: () => {
22486
22482
  var _dialogLimitRef$curre2;
22487
22483
  onChange(limit);
22488
- (_dialogLimitRef$curre2 = dialogLimitRef.current) === null || _dialogLimitRef$curre2 === void 0 ? void 0 : _dialogLimitRef$curre2.click();
22484
+ (_dialogLimitRef$curre2 = dialogLimitRef.current) == null ? void 0 : _dialogLimitRef$curre2.click();
22489
22485
  },
22490
22486
  __self: this,
22491
22487
  __source: {
@@ -25046,7 +25042,7 @@
25046
25042
  onClick: () => {
25047
25043
  var _document$getElements;
25048
25044
  setOpenDrop(true);
25049
- const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) === null || _document$getElements === void 0 ? void 0 : _document$getElements[0];
25045
+ const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
25050
25046
  contextMenu.style.opacity = 0;
25051
25047
  },
25052
25048
  __self: undefined,
@@ -25702,7 +25698,7 @@
25702
25698
  if (!props.onOpenAutoFocus) {
25703
25699
  e.preventDefault();
25704
25700
  } else {
25705
- props === null || props === void 0 ? void 0 : props.onOpenAutoFocus();
25701
+ props == null ? void 0 : props.onOpenAutoFocus();
25706
25702
  }
25707
25703
  },
25708
25704
  __self: undefined,
@@ -25782,7 +25778,7 @@
25782
25778
  }, props.description)), /*#__PURE__*/React__default["default"].createElement(Box, {
25783
25779
  css: {
25784
25780
  width: '100%',
25785
- display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
25781
+ display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
25786
25782
  },
25787
25783
  __self: undefined,
25788
25784
  __source: {
@@ -25824,8 +25820,8 @@
25824
25820
  size: props.btnSize,
25825
25821
  onClick: buttonConfirm,
25826
25822
  buttonType: props.dialogType,
25827
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25828
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25823
+ disabled: props == null ? void 0 : props.disabledButton
25824
+ }, props == null ? void 0 : props.actionButtonProps, {
25829
25825
  __self: undefined,
25830
25826
  __source: {
25831
25827
  fileName: _jsxFileName$b,
@@ -25844,19 +25840,19 @@
25844
25840
  size: props.btnSize,
25845
25841
  onClick: buttonCancel,
25846
25842
  css: {
25847
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
25843
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
25848
25844
  flex: props.isMobile && 1
25849
25845
  },
25850
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25851
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25852
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
25846
+ buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25847
+ disabled: props == null ? void 0 : props.disabledButton
25848
+ }, props == null ? void 0 : props.cancelButtonProps, {
25853
25849
  __self: undefined,
25854
25850
  __source: {
25855
25851
  fileName: _jsxFileName$b,
25856
25852
  lineNumber: 187,
25857
25853
  columnNumber: 19
25858
25854
  }
25859
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
25855
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
25860
25856
  asChild: true,
25861
25857
  __self: undefined,
25862
25858
  __source: {
@@ -25871,8 +25867,8 @@
25871
25867
  css: {
25872
25868
  flex: props.isMobile && 1
25873
25869
  },
25874
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25875
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25870
+ disabled: props == null ? void 0 : props.disabledButton
25871
+ }, props == null ? void 0 : props.actionButtonProps, {
25876
25872
  __self: undefined,
25877
25873
  __source: {
25878
25874
  fileName: _jsxFileName$b,
@@ -26002,7 +25998,7 @@
26002
25998
  }, props.description)), /*#__PURE__*/React__default["default"].createElement(Box, {
26003
25999
  css: {
26004
26000
  width: '100%',
26005
- display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
26001
+ display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
26006
26002
  },
26007
26003
  __self: this,
26008
26004
  __source: {
@@ -26047,8 +26043,8 @@
26047
26043
  css: {
26048
26044
  flex: props.isMobile && 1
26049
26045
  },
26050
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
26051
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
26046
+ disabled: props == null ? void 0 : props.disabledButton
26047
+ }, props == null ? void 0 : props.actionButtonProps, {
26052
26048
  __self: this,
26053
26049
  __source: {
26054
26050
  fileName: _jsxFileName$b,
@@ -26067,19 +26063,19 @@
26067
26063
  size: props.btnSize,
26068
26064
  onClick: props.onCancel,
26069
26065
  css: {
26070
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
26066
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
26071
26067
  flex: props.isMobile && 1
26072
26068
  },
26073
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
26074
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
26075
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
26069
+ buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
26070
+ disabled: props == null ? void 0 : props.disabledButton
26071
+ }, props == null ? void 0 : props.cancelButtonProps, {
26076
26072
  __self: this,
26077
26073
  __source: {
26078
26074
  fileName: _jsxFileName$b,
26079
26075
  lineNumber: 293,
26080
26076
  columnNumber: 19
26081
26077
  }
26082
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
26078
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
26083
26079
  asChild: true,
26084
26080
  __self: this,
26085
26081
  __source: {
@@ -26094,8 +26090,8 @@
26094
26090
  css: {
26095
26091
  flex: props.isMobile && 1
26096
26092
  },
26097
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
26098
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
26093
+ disabled: props == null ? void 0 : props.disabledButton
26094
+ }, props == null ? void 0 : props.actionButtonProps, {
26099
26095
  __self: this,
26100
26096
  __source: {
26101
26097
  fileName: _jsxFileName$b,
@@ -28593,7 +28589,7 @@
28593
28589
  upload({
28594
28590
  url: action,
28595
28591
  file: newFile,
28596
- customBody: customBodyRequest === null || customBodyRequest === void 0 ? void 0 : customBodyRequest(newFile),
28592
+ customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
28597
28593
  token,
28598
28594
  tokenKey,
28599
28595
  reqKey,
@@ -28613,12 +28609,12 @@
28613
28609
  arrProgress[i] = fileProgress;
28614
28610
  }
28615
28611
  }
28616
- onChange === null || onChange === void 0 ? void 0 : (_onChange = onChange({
28612
+ onChange == null ? void 0 : (_onChange = onChange({
28617
28613
  fileList: arrProgress,
28618
28614
  file: fileProgress,
28619
28615
  indexReplace: indexReplace.current,
28620
28616
  isReplace: indexReplace.current !== null
28621
- })) === null || _onChange === void 0 ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) === null || _onChange$then === void 0 ? void 0 : _onChange$then.catch(error => setError(error.message));
28617
+ })) == null ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) == null ? void 0 : _onChange$then.catch(error => setError(error.message));
28622
28618
  }
28623
28619
  }).then(result => {
28624
28620
  var _onChange2, _onChange2$then;
@@ -28631,12 +28627,12 @@
28631
28627
  arrFile[i] = fileSuccess;
28632
28628
  }
28633
28629
  }
28634
- onChange === null || onChange === void 0 ? void 0 : (_onChange2 = onChange({
28630
+ onChange == null ? void 0 : (_onChange2 = onChange({
28635
28631
  fileList: arrFile,
28636
28632
  file: fileSuccess,
28637
28633
  indexReplace: indexReplace.current,
28638
28634
  isReplace: indexReplace.current !== null
28639
- })) === null || _onChange2 === void 0 ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) === null || _onChange2$then === void 0 ? void 0 : _onChange2$then.catch(error => setError(error.message));
28635
+ })) == null ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) == null ? void 0 : _onChange2$then.catch(error => setError(error.message));
28640
28636
  }).catch(error => {
28641
28637
  var _onChange3, _onChange3$then;
28642
28638
  let fileError = Object.assign({}, newFile);
@@ -28648,21 +28644,21 @@
28648
28644
  arrFile[i] = fileError;
28649
28645
  }
28650
28646
  }
28651
- onChange === null || onChange === void 0 ? void 0 : (_onChange3 = onChange({
28647
+ onChange == null ? void 0 : (_onChange3 = onChange({
28652
28648
  fileList: arrFile,
28653
28649
  file: fileError,
28654
28650
  indexReplace: indexReplace.current,
28655
28651
  isReplace: indexReplace.current !== null
28656
- })) === null || _onChange3 === void 0 ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) === null || _onChange3$then === void 0 ? void 0 : _onChange3$then.catch(error => setError(error.message));
28652
+ })) == null ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) == null ? void 0 : _onChange3$then.catch(error => setError(error.message));
28657
28653
  });
28658
28654
  } else {
28659
28655
  var _onChange4, _onChange4$then;
28660
- onChange === null || onChange === void 0 ? void 0 : (_onChange4 = onChange({
28656
+ onChange == null ? void 0 : (_onChange4 = onChange({
28661
28657
  fileList: arrFile,
28662
28658
  file: newFile,
28663
28659
  indexReplace: indexReplace.current,
28664
28660
  isReplace: indexReplace.current !== null
28665
- })) === null || _onChange4 === void 0 ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) === null || _onChange4$then === void 0 ? void 0 : _onChange4$then.catch(error => setError(error.message));
28661
+ })) == null ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) == null ? void 0 : _onChange4$then.catch(error => setError(error.message));
28666
28662
  }
28667
28663
  if (indexReplace.current !== null) {
28668
28664
  arrFile[indexReplace.current] = newFile;
@@ -28682,15 +28678,15 @@
28682
28678
  // program to get the dimensions of an image
28683
28679
  const img = document.createElement('img');
28684
28680
  img.src = URL.createObjectURL(files[0]);
28685
- img.size = files === null || files === void 0 ? void 0 : (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size;
28686
- img.type = files === null || files === void 0 ? void 0 : (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.type;
28681
+ img.size = files == null ? void 0 : (_files$ = files[0]) == null ? void 0 : _files$.size;
28682
+ img.type = files == null ? void 0 : (_files$2 = files[0]) == null ? void 0 : _files$2.type;
28687
28683
  img.onload = () => {
28688
28684
  const imgRatio = img.width / img.height;
28689
28685
  // setAspect(imgRatio);
28690
28686
  setCropperImgRatio(imgRatio);
28691
28687
  if (onBeforeCrop) {
28692
28688
  var _onBeforeCrop, _onBeforeCrop$then;
28693
- onBeforeCrop === null || onBeforeCrop === void 0 ? void 0 : (_onBeforeCrop = onBeforeCrop(img)) === null || _onBeforeCrop === void 0 ? void 0 : (_onBeforeCrop$then = _onBeforeCrop.then(() => {
28689
+ onBeforeCrop == null ? void 0 : (_onBeforeCrop = onBeforeCrop(img)) == null ? void 0 : (_onBeforeCrop$then = _onBeforeCrop.then(() => {
28694
28690
  setError(null);
28695
28691
  toggleModal();
28696
28692
  setTimeout(() => {
@@ -28704,7 +28700,7 @@
28704
28700
  }, 300);
28705
28701
  setFileState(files[0]);
28706
28702
  setPreviewImage(URL.createObjectURL(files[0]));
28707
- })) === null || _onBeforeCrop$then === void 0 ? void 0 : _onBeforeCrop$then.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
28703
+ })) == null ? void 0 : _onBeforeCrop$then.catch(error => setError(error == null ? void 0 : error.message));
28708
28704
  } else {
28709
28705
  toggleModal();
28710
28706
  setTimeout(() => {
@@ -28722,18 +28718,18 @@
28722
28718
  };
28723
28719
  img.onerror = error => {
28724
28720
  var _onBeforeCrop2, _onBeforeCrop2$then;
28725
- onBeforeCrop === null || onBeforeCrop === void 0 ? void 0 : (_onBeforeCrop2 = onBeforeCrop(img, error)) === null || _onBeforeCrop2 === void 0 ? void 0 : (_onBeforeCrop2$then = _onBeforeCrop2.then(() => setError(null))) === null || _onBeforeCrop2$then === void 0 ? void 0 : _onBeforeCrop2$then.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
28721
+ onBeforeCrop == null ? void 0 : (_onBeforeCrop2 = onBeforeCrop(img, error)) == null ? void 0 : (_onBeforeCrop2$then = _onBeforeCrop2.then(() => setError(null))) == null ? void 0 : _onBeforeCrop2$then.catch(error => setError(error == null ? void 0 : error.message));
28726
28722
  };
28727
28723
  }
28728
28724
  }
28729
28725
  }
28730
28726
  function handleCrop() {
28731
- if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
28732
- imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState === null || fileState === void 0 ? void 0 : fileState.type).then(blob => {
28733
- const sizeMB = (blob === null || blob === void 0 ? void 0 : blob.size) / 1024 / 1024;
28727
+ if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
28728
+ imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState == null ? void 0 : fileState.type).then(blob => {
28729
+ const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
28734
28730
  if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
28735
- const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
28736
- type: blob === null || blob === void 0 ? void 0 : blob.type
28731
+ const file = new File([blob], fileState == null ? void 0 : fileState.name, {
28732
+ type: blob == null ? void 0 : blob.type
28737
28733
  });
28738
28734
  handleUpload([file]);
28739
28735
  setCrop(null);
@@ -28747,16 +28743,16 @@
28747
28743
  alwaysKeepResolution: true
28748
28744
  }).then(compressedFile => {
28749
28745
  var _fileState$name;
28750
- const file = new File([compressedFile], (fileState === null || fileState === void 0 ? void 0 : (_fileState$name = fileState.name) === null || _fileState$name === void 0 ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
28751
- type: compressedFile === null || compressedFile === void 0 ? void 0 : compressedFile.type
28746
+ const file = new File([compressedFile], (fileState == null ? void 0 : (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
28747
+ type: compressedFile == null ? void 0 : compressedFile.type
28752
28748
  });
28753
28749
  handleUpload([file]);
28754
28750
  setCrop(null);
28755
28751
  setCompletedCrop(null);
28756
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
28752
+ }).catch(error => console.error(error == null ? void 0 : error.message));
28757
28753
  }
28758
28754
  toggleModal();
28759
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
28755
+ }).catch(error => console.error(error == null ? void 0 : error.message));
28760
28756
  } else {
28761
28757
  handleUpload([fileState]);
28762
28758
  toggleModal();
@@ -28785,7 +28781,7 @@
28785
28781
  const index = fileList.indexOf(file);
28786
28782
  const newFileList = fileList.slice();
28787
28783
  newFileList.splice(index, 1);
28788
- onChange === null || onChange === void 0 ? void 0 : onChange({
28784
+ onChange == null ? void 0 : onChange({
28789
28785
  fileList: newFileList,
28790
28786
  file
28791
28787
  });
@@ -28808,14 +28804,14 @@
28808
28804
  }
28809
28805
  function handleOpenFile(file) {
28810
28806
  var _String, _file$name;
28811
- let extension = (_String = String(file === null || file === void 0 ? void 0 : (_file$name = file.name) === null || _file$name === void 0 ? void 0 : _file$name.split('.').pop())) === null || _String === void 0 ? void 0 : _String.toLowerCase();
28807
+ let extension = (_String = String(file == null ? void 0 : (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
28812
28808
  if (extension === 'pdf') {
28813
- window.open(file === null || file === void 0 ? void 0 : file.url);
28809
+ window.open(file == null ? void 0 : file.url);
28814
28810
  } else {
28815
- if (file !== null && file !== void 0 && file.url) {
28811
+ if (file != null && file.url) {
28816
28812
  const link = document.createElement('a');
28817
28813
  link.href = file.url;
28818
- link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
28814
+ link.setAttribute('download', file == null ? void 0 : file.name);
28819
28815
  document.body.appendChild(link);
28820
28816
  link.click();
28821
28817
  document.body.removeChild(link);
@@ -28877,12 +28873,12 @@
28877
28873
  }, replaceLabel && replaceLabel.length > 0 ? replaceLabel : t('replaceLabel', 'Ubah Berkas')));
28878
28874
  }
28879
28875
  const renderPicture = () => {
28880
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
28881
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
28876
+ return fileList == null ? void 0 : fileList.map((item, index) => {
28877
+ if ((item == null ? void 0 : item.status) === 'uploading') {
28882
28878
  return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
28883
28879
  key: index,
28884
- progress: item === null || item === void 0 ? void 0 : item.percent,
28885
- loading: item === null || item === void 0 ? void 0 : item.loading,
28880
+ progress: item == null ? void 0 : item.percent,
28881
+ loading: item == null ? void 0 : item.loading,
28886
28882
  __self: undefined,
28887
28883
  __source: {
28888
28884
  fileName: _jsxFileName$9,
@@ -28955,13 +28951,13 @@
28955
28951
  });
28956
28952
  };
28957
28953
  const renderFile = () => {
28958
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
28954
+ return fileList == null ? void 0 : fileList.map((item, index) => {
28959
28955
  var _item$name;
28960
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
28956
+ if ((item == null ? void 0 : item.status) === 'uploading') {
28961
28957
  return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
28962
28958
  key: index,
28963
- progress: item === null || item === void 0 ? void 0 : item.percent,
28964
- loading: item === null || item === void 0 ? void 0 : item.loading,
28959
+ progress: item == null ? void 0 : item.percent,
28960
+ loading: item == null ? void 0 : item.loading,
28965
28961
  __self: undefined,
28966
28962
  __source: {
28967
28963
  fileName: _jsxFileName$9,
@@ -29027,7 +29023,7 @@
29027
29023
  lineNumber: 667,
29028
29024
  columnNumber: 17
29029
29025
  }
29030
- }, ".", item === null || item === void 0 ? void 0 : (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
29026
+ }, ".", item == null ? void 0 : (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
29031
29027
  label: item.name,
29032
29028
  __self: undefined,
29033
29029
  __source: {
@@ -29397,7 +29393,7 @@
29397
29393
  }
29398
29394
  return /*#__PURE__*/React__default["default"].createElement(Flex$1, {
29399
29395
  direction: "row",
29400
- gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
29396
+ gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
29401
29397
  wrap: "wrap",
29402
29398
  css: {
29403
29399
  userSelect: 'none'
@@ -30233,9 +30229,9 @@
30233
30229
  function InputColorPicker(props) {
30234
30230
  const [isPopover, setIsPopover] = React.useState(false);
30235
30231
  function getColor() {
30236
- const color = props === null || props === void 0 ? void 0 : props.color;
30232
+ const color = props == null ? void 0 : props.color;
30237
30233
  if (typeof color === 'string') {
30238
- return color === null || color === void 0 ? void 0 : color.toUpperCase();
30234
+ return color == null ? void 0 : color.toUpperCase();
30239
30235
  }
30240
30236
  return `rgba(${color.r},${color.g},${color.b},${color.a})`;
30241
30237
  }
@@ -33254,7 +33250,7 @@
33254
33250
  var _data;
33255
33251
  const isActive = props.currentStep === i;
33256
33252
  const isComplete = props.isComplete[i - 1];
33257
- const isAdditional = (_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.additional;
33253
+ const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional;
33258
33254
  const lastItem = navMobileItems.indexOf(data[i - 1]) + 1 === navMobileItems.length;
33259
33255
  // eslint-disable-next-line no-lone-blocks
33260
33256
  {
@@ -33269,7 +33265,7 @@
33269
33265
  key: `step-${i}`,
33270
33266
  onClick: () => {
33271
33267
  var _data2;
33272
- if (props.onNavClicked && !((_data2 = data[i - 1]) !== null && _data2 !== void 0 && _data2.disabled) || isAdditional) props.onNavClicked(i);
33268
+ if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
33273
33269
  if (!forbidClickNav && isComplete && !isHide || isAdditional) {
33274
33270
  props.goToStep(i);
33275
33271
  }
@@ -33302,9 +33298,9 @@
33302
33298
  lineNumber: 176,
33303
33299
  columnNumber: 17
33304
33300
  }
33305
- }), 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["default"].createElement(Tooltip$1, {
33301
+ }), 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["default"].createElement(Tooltip$1, {
33306
33302
  align: "center",
33307
- label: (_data5 = data[i - 1]) === null || _data5 === void 0 ? void 0 : _data5.tooltipsContents,
33303
+ label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
33308
33304
  __self: undefined,
33309
33305
  __source: {
33310
33306
  fileName: _jsxFileName$4,
@@ -33323,9 +33319,9 @@
33323
33319
  lineNumber: 181,
33324
33320
  columnNumber: 19
33325
33321
  }
33326
- })), ((_data6 = data[i - 1]) === null || _data6 === void 0 ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
33322
+ })), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
33327
33323
  css: {
33328
- marginLeft: (_data7 = data[i - 1]) !== null && _data7 !== void 0 && _data7.withTolltip ? 0 : '$spacing-03'
33324
+ marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
33329
33325
  },
33330
33326
  align: "center",
33331
33327
  __self: undefined,
@@ -33376,10 +33372,10 @@
33376
33372
  lineNumber: 198,
33377
33373
  columnNumber: 21
33378
33374
  }
33379
- }, 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["default"].createElement(Tooltip$1, {
33375
+ }, 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["default"].createElement(Tooltip$1, {
33380
33376
  align: "center",
33381
33377
  withClick: true,
33382
- label: (_data10 = data[i - 1]) === null || _data10 === void 0 ? void 0 : _data10.tooltipsContents,
33378
+ label: (_data10 = data[i - 1]) == null ? void 0 : _data10.tooltipsContents,
33383
33379
  __self: undefined,
33384
33380
  __source: {
33385
33381
  fileName: _jsxFileName$4,
@@ -33395,11 +33391,11 @@
33395
33391
  lineNumber: 209,
33396
33392
  columnNumber: 25
33397
33393
  }
33398
- })), ((_data11 = data[i - 1]) === null || _data11 === void 0 ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
33394
+ })), ((_data11 = data[i - 1]) == null ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
33399
33395
  align: "center",
33400
33396
  justify: "center",
33401
33397
  css: {
33402
- marginTop: (_data12 = data[i - 1]) !== null && _data12 !== void 0 && _data12.withTolltip ? 0 : '$spacing-03'
33398
+ marginTop: (_data12 = data[i - 1]) != null && _data12.withTolltip ? 0 : '$spacing-03'
33403
33399
  },
33404
33400
  __self: undefined,
33405
33401
  __source: {
@@ -33423,7 +33419,7 @@
33423
33419
  userSelect: 'none',
33424
33420
  fontSize: '12px',
33425
33421
  textAlign: '-webkit-center',
33426
- display: ((_data13 = data[i - 1]) === null || _data13 === void 0 ? void 0 : _data13.disabled) && 'none',
33422
+ display: ((_data13 = data[i - 1]) == null ? void 0 : _data13.disabled) && 'none',
33427
33423
  marginTop: '$spacing-07',
33428
33424
  flex: 1,
33429
33425
  maxWidth: lastItem && 26
@@ -33503,7 +33499,7 @@
33503
33499
  height: 24,
33504
33500
  borderRadius: '$round',
33505
33501
  border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
33506
- backgroundColor: (_data14 = data[i - 1]) !== null && _data14 !== void 0 && _data14.disabled ? '$gray200' : '$white'
33502
+ backgroundColor: (_data14 = data[i - 1]) != null && _data14.disabled ? '$gray200' : '$white'
33507
33503
  },
33508
33504
  __self: undefined,
33509
33505
  __source: {
@@ -33532,53 +33528,50 @@
33532
33528
  }
33533
33529
  return /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
33534
33530
  condition: !isMobile,
33535
- wrapper: child => {
33536
- var _props$appendContent;
33537
- return /*#__PURE__*/React__default["default"].createElement(Box, {
33538
- css: {
33539
- opacity: isHide ? 0 : undefined,
33540
- maxWidth: 311
33541
- },
33542
- __self: undefined,
33543
- __source: {
33544
- fileName: _jsxFileName$4,
33545
- lineNumber: 281,
33546
- columnNumber: 9
33547
- }
33548
- }, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
33549
- css: {
33550
- position: !isMobile && 'sticky',
33551
- top: !isMobile ? 44 : 40
33552
- },
33553
- direction: "column",
33554
- gap: 7,
33555
- __self: undefined,
33556
- __source: {
33557
- fileName: _jsxFileName$4,
33558
- lineNumber: 282,
33559
- columnNumber: 11
33560
- }
33561
- }, /*#__PURE__*/React__default["default"].createElement(Card, {
33562
- css: {
33563
- height: 'fit-content',
33564
- padding: 0
33565
- },
33566
- showBottomLine: false,
33567
- __self: undefined,
33568
- __source: {
33569
- fileName: _jsxFileName$4,
33570
- lineNumber: 283,
33571
- columnNumber: 13
33572
- }
33573
- }, child), /*#__PURE__*/React__default["default"].createElement(Box, {
33574
- __self: undefined,
33575
- __source: {
33576
- fileName: _jsxFileName$4,
33577
- lineNumber: 292,
33578
- columnNumber: 13
33579
- }
33580
- }, typeof (props === null || props === void 0 ? void 0 : props.appendContent) === 'function' ? props === null || props === void 0 ? 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)));
33581
- },
33531
+ wrapper: child => /*#__PURE__*/React__default["default"].createElement(Box, {
33532
+ css: {
33533
+ opacity: isHide ? 0 : undefined,
33534
+ maxWidth: 311
33535
+ },
33536
+ __self: undefined,
33537
+ __source: {
33538
+ fileName: _jsxFileName$4,
33539
+ lineNumber: 281,
33540
+ columnNumber: 9
33541
+ }
33542
+ }, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
33543
+ css: {
33544
+ position: !isMobile && 'sticky',
33545
+ top: !isMobile ? 44 : 40
33546
+ },
33547
+ direction: "column",
33548
+ gap: 7,
33549
+ __self: undefined,
33550
+ __source: {
33551
+ fileName: _jsxFileName$4,
33552
+ lineNumber: 282,
33553
+ columnNumber: 11
33554
+ }
33555
+ }, /*#__PURE__*/React__default["default"].createElement(Card, {
33556
+ css: {
33557
+ height: 'fit-content',
33558
+ padding: 0
33559
+ },
33560
+ showBottomLine: false,
33561
+ __self: undefined,
33562
+ __source: {
33563
+ fileName: _jsxFileName$4,
33564
+ lineNumber: 283,
33565
+ columnNumber: 13
33566
+ }
33567
+ }, child), /*#__PURE__*/React__default["default"].createElement(Box, {
33568
+ __self: undefined,
33569
+ __source: {
33570
+ fileName: _jsxFileName$4,
33571
+ lineNumber: 292,
33572
+ columnNumber: 13
33573
+ }
33574
+ }, typeof (props == null ? void 0 : props.appendContent) === 'function' ? props == null ? void 0 : props.appendContent == null ? void 0 : props.appendContent() : props == null ? void 0 : props.appendContent))),
33582
33575
  __self: undefined,
33583
33576
  __source: {
33584
33577
  fileName: _jsxFileName$4,
@@ -33643,8 +33636,7 @@
33643
33636
  }));
33644
33637
  }, [props.hide]);
33645
33638
  React.useEffect(() => {
33646
- var _props$onChangeVisibi;
33647
- props === null || props === void 0 ? void 0 : (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 ? void 0 : _props$onChangeVisibi.call(props, state.hide);
33639
+ props == null ? void 0 : props.onChangeVisibility == null ? void 0 : props.onChangeVisibility(state.hide);
33648
33640
  }, [state.hide]);
33649
33641
  const toogleVisibility = value => {
33650
33642
  updateState(prev => Object.assign({}, prev, {
@@ -33653,11 +33645,11 @@
33653
33645
  };
33654
33646
  const getIsComplete = currentStep => {
33655
33647
  var _state$isComplete;
33656
- return state === null || state === void 0 ? void 0 : (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
33648
+ return state == null ? void 0 : (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
33657
33649
  };
33658
33650
  const getTitleStep = currentStep => {
33659
33651
  var _props$navContents, _props$navContents2;
33660
- return props === null || props === void 0 ? void 0 : (_props$navContents = props.navContents) === null || _props$navContents === void 0 ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) === null || _props$navContents2 === void 0 ? void 0 : _props$navContents2.title;
33652
+ return props == null ? void 0 : (_props$navContents = props.navContents) == null ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents2.title;
33661
33653
  };
33662
33654
  const setState = value => {
33663
33655
  updateState(Object.assign({}, state, value));
@@ -33691,13 +33683,13 @@
33691
33683
  block: 'start'
33692
33684
  });
33693
33685
  props.onStepChange && props.onStepChange(e);
33694
- if (props !== null && props !== void 0 && (_props$navContents3 = props.navContents) !== null && _props$navContents3 !== void 0 && (_props$navContents4 = _props$navContents3[(e === null || e === void 0 ? void 0 : e.activeStep) - 1]) !== null && _props$navContents4 !== void 0 && _props$navContents4.disabled) {
33695
- if ((e === null || e === void 0 ? void 0 : e.activeStep) > (e === null || e === void 0 ? void 0 : e.previousStep)) {
33686
+ if (props != null && (_props$navContents3 = props.navContents) != null && (_props$navContents4 = _props$navContents3[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents4.disabled) {
33687
+ if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
33696
33688
  var _state$SW;
33697
- state === null || state === void 0 ? void 0 : (_state$SW = state.SW) === null || _state$SW === void 0 ? void 0 : _state$SW.nextStep();
33689
+ state == null ? void 0 : (_state$SW = state.SW) == null ? void 0 : _state$SW.nextStep();
33698
33690
  } else {
33699
33691
  var _state$SW2;
33700
- state === null || state === void 0 ? void 0 : (_state$SW2 = state.SW) === null || _state$SW2 === void 0 ? void 0 : _state$SW2.previousStep();
33692
+ state == null ? void 0 : (_state$SW2 = state.SW) == null ? void 0 : _state$SW2.previousStep();
33701
33693
  }
33702
33694
  }
33703
33695
  };
@@ -33712,11 +33704,11 @@
33712
33704
  }, /*#__PURE__*/React__default["default"].createElement(StepWizardContext.Provider, {
33713
33705
  value: {
33714
33706
  toogleVisibility,
33715
- isHide: state === null || state === void 0 ? void 0 : state.hide,
33707
+ isHide: state == null ? void 0 : state.hide,
33716
33708
  setComplete,
33717
33709
  setState,
33718
33710
  state,
33719
- SW: state === null || state === void 0 ? void 0 : state.SW,
33711
+ SW: state == null ? void 0 : state.SW,
33720
33712
  forbidClickNav: props.forbidClickNav,
33721
33713
  titles: props.titles,
33722
33714
  isMobile: props.isMobile,
@@ -33739,7 +33731,7 @@
33739
33731
  nav: /*#__PURE__*/React__default["default"].createElement(Navigation, {
33740
33732
  onNavClicked: props.onNavClicked,
33741
33733
  isComplete: state.isComplete,
33742
- appendContent: props === null || props === void 0 ? void 0 : props.appendContent,
33734
+ appendContent: props == null ? void 0 : props.appendContent,
33743
33735
  __self: undefined,
33744
33736
  __source: {
33745
33737
  fileName: _jsxFileName$4,
@@ -33749,7 +33741,7 @@
33749
33741
  }),
33750
33742
  initialStep: props.initialStep,
33751
33743
  onStepChange: handleStepChange,
33752
- isLazyMount: props === null || props === void 0 ? void 0 : props.isLazyMount,
33744
+ isLazyMount: props == null ? void 0 : props.isLazyMount,
33753
33745
  __self: undefined,
33754
33746
  __source: {
33755
33747
  fileName: _jsxFileName$4,
@@ -33896,9 +33888,9 @@
33896
33888
  var _getDatasets;
33897
33889
  function getDatasets(content, activeId, isCollapse) {
33898
33890
  const datasets = [];
33899
- for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
33891
+ for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
33900
33892
  var _content$i;
33901
- if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
33893
+ if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
33902
33894
  datasets.unshift(content[i]);
33903
33895
  } else {
33904
33896
  datasets.push(content[i]);
@@ -33936,7 +33928,7 @@
33936
33928
  lineNumber: 107,
33937
33929
  columnNumber: 7
33938
33930
  }
33939
- }, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
33931
+ }, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
33940
33932
  return /*#__PURE__*/React__default["default"].createElement(List, {
33941
33933
  key: index,
33942
33934
  __self: this,
@@ -33953,11 +33945,11 @@
33953
33945
  marginLeft: '-4px !important',
33954
33946
  borderLeftWidth: '4px !important',
33955
33947
  borderLeftStyle: 'solid !important',
33956
- borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
33948
+ borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
33957
33949
  paddingLeft: '16px !important',
33958
33950
  minHeight: 25
33959
33951
  },
33960
- "data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
33952
+ "data-to-scrollspy-id": item == null ? void 0 : item.id,
33961
33953
  __self: this,
33962
33954
  __source: {
33963
33955
  fileName: _jsxFileName$2,
@@ -33966,13 +33958,13 @@
33966
33958
  }
33967
33959
  }, /*#__PURE__*/React__default["default"].createElement(Title$1, {
33968
33960
  className: "link-title",
33969
- active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
33970
- href: `#${item === null || item === void 0 ? void 0 : item.id}`,
33961
+ active: (item == null ? void 0 : item.id) === activeId,
33962
+ href: `#${item == null ? void 0 : item.id}`,
33971
33963
  onClick: e => {
33972
33964
  var _e$currentTarget, _e$currentTarget$href, _e$currentTarget$href2, _e$currentTarget2, _e$currentTarget2$hre, _e$currentTarget2$hre2;
33973
33965
  e.preventDefault();
33974
- onNavClick === null || onNavClick === void 0 ? void 0 : onNavClick(e === null || e === void 0 ? void 0 : (_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 ? void 0 : (_e$currentTarget$href = _e$currentTarget.href) === null || _e$currentTarget$href === void 0 ? void 0 : (_e$currentTarget$href2 = _e$currentTarget$href.split('#')) === null || _e$currentTarget$href2 === void 0 ? void 0 : _e$currentTarget$href2[1]);
33975
- const target = window.document.getElementById(e === null || e === void 0 ? void 0 : (_e$currentTarget2 = e.currentTarget) === null || _e$currentTarget2 === void 0 ? void 0 : (_e$currentTarget2$hre = _e$currentTarget2.href) === null || _e$currentTarget2$hre === void 0 ? void 0 : (_e$currentTarget2$hre2 = _e$currentTarget2$hre.split('#')) === null || _e$currentTarget2$hre2 === void 0 ? void 0 : _e$currentTarget2$hre2[1]);
33966
+ onNavClick == null ? void 0 : onNavClick(e == null ? void 0 : (_e$currentTarget = e.currentTarget) == null ? void 0 : (_e$currentTarget$href = _e$currentTarget.href) == null ? void 0 : (_e$currentTarget$href2 = _e$currentTarget$href.split('#')) == null ? void 0 : _e$currentTarget$href2[1]);
33967
+ const target = window.document.getElementById(e == null ? void 0 : (_e$currentTarget2 = e.currentTarget) == null ? void 0 : (_e$currentTarget2$hre = _e$currentTarget2.href) == null ? void 0 : (_e$currentTarget2$hre2 = _e$currentTarget2$hre.split('#')) == null ? void 0 : _e$currentTarget2$hre2[1]);
33976
33968
  if (target) {
33977
33969
  var headerOffset = 20;
33978
33970
  var elementPosition = target.getBoundingClientRect().top;
@@ -33996,7 +33988,7 @@
33996
33988
  lineNumber: 125,
33997
33989
  columnNumber: 17
33998
33990
  }
33999
- }, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
33991
+ }, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
34000
33992
  })));
34001
33993
  }
34002
33994
  function TableOfContent({