@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.umd.js CHANGED
@@ -5093,7 +5093,7 @@
5093
5093
  onClick: e => {
5094
5094
  e.preventDefault();
5095
5095
  e.stopPropagation();
5096
- value === null || value === void 0 || value.onRemove();
5096
+ value == null || value.onRemove();
5097
5097
  },
5098
5098
  __self: undefined,
5099
5099
  __source: {
@@ -5112,7 +5112,6 @@
5112
5112
  }
5113
5113
  })));
5114
5114
  const SingleTagBanner = props => {
5115
- var _props$icon;
5116
5115
  return /*#__PURE__*/React__namespace.createElement(Flex$1, {
5117
5116
  gap: 2,
5118
5117
  direction: "column",
@@ -5138,7 +5137,7 @@
5138
5137
  lineNumber: 212,
5139
5138
  columnNumber: 9
5140
5139
  }
5141
- }, (props === null || props === void 0 ? void 0 : props.icon) && /*#__PURE__*/React__namespace.createElement(Flex$1, {
5140
+ }, (props == null ? void 0 : props.icon) && /*#__PURE__*/React__namespace.createElement(Flex$1, {
5142
5141
  css: {
5143
5142
  marginTop: '-2px'
5144
5143
  },
@@ -5148,7 +5147,7 @@
5148
5147
  lineNumber: 213,
5149
5148
  columnNumber: 27
5150
5149
  }
5151
- }, props === null || props === void 0 || (_props$icon = props.icon) === null || _props$icon === void 0 ? void 0 : _props$icon.call(props)), /*#__PURE__*/React__namespace.createElement(Flex$1, {
5150
+ }, props == null || props.icon == null ? void 0 : props.icon()), /*#__PURE__*/React__namespace.createElement(Flex$1, {
5152
5151
  gap: 2,
5153
5152
  direction: "column",
5154
5153
  css: {
@@ -5179,7 +5178,7 @@
5179
5178
  onClick: e => {
5180
5179
  e.preventDefault();
5181
5180
  e.stopPropagation();
5182
- props === null || props === void 0 || props.onRemove();
5181
+ props == null || props.onRemove();
5183
5182
  },
5184
5183
  closeCenter: !props.title && !props.link,
5185
5184
  __self: undefined,
@@ -7997,7 +7996,7 @@
7997
7996
  React.useEffect(() => {
7998
7997
  if (textareaRef.current) {
7999
7998
  textareaRef.current.style.height = '50px';
8000
- const scrollHeight = textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current.scrollHeight;
7999
+ const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
8001
8000
  textareaRef.current.style.height = scrollHeight + 5 + 'px';
8002
8001
  }
8003
8002
  }, []);
@@ -8052,7 +8051,7 @@
8052
8051
  var _jsxFileName$I = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputRadio/InputRadioGroup.js";
8053
8052
  const RadioGroup = styled(RadioGroupPrimitive__namespace.Root, Flex$1);
8054
8053
  function InputRadioGroup(props) {
8055
- return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default["default"].createElement(InputRadioContext.Provider, {
8054
+ return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default["default"].createElement(InputRadioContext.Provider, {
8056
8055
  value: props,
8057
8056
  __self: this,
8058
8057
  __source: {
@@ -8067,7 +8066,7 @@
8067
8066
  lineNumber: 14,
8068
8067
  columnNumber: 9
8069
8068
  }
8070
- }), React__default["default"].Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default["default"].cloneElement(child, {
8069
+ }), React__default["default"].Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default["default"].cloneElement(child, {
8071
8070
  style: Object.assign({}, child.props.style, {
8072
8071
  opacity: 1
8073
8072
  })
@@ -8255,9 +8254,8 @@
8255
8254
  return /*#__PURE__*/React__default["default"].createElement(InputNumber, _extends({}, inputProps, {
8256
8255
  readOnly: readOnly,
8257
8256
  onFocus: () => {
8258
- var _inputProps$onFocus;
8259
8257
  onValueChange(props.value);
8260
- inputProps === null || inputProps === void 0 || (_inputProps$onFocus = inputProps.onFocus) === null || _inputProps$onFocus === void 0 || _inputProps$onFocus.call(inputProps);
8258
+ inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
8261
8259
  },
8262
8260
  asChild: true,
8263
8261
  __self: this,
@@ -8272,9 +8270,8 @@
8272
8270
  disabled: disabled,
8273
8271
  readOnly: readOnly,
8274
8272
  onFocus: () => {
8275
- var _inputProps$onFocus2;
8276
8273
  onValueChange(props.value);
8277
- inputProps === null || inputProps === void 0 || (_inputProps$onFocus2 = inputProps.onFocus) === null || _inputProps$onFocus2 === void 0 || _inputProps$onFocus2.call(inputProps);
8274
+ inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
8278
8275
  },
8279
8276
  asChild: true,
8280
8277
  __self: this,
@@ -10768,24 +10765,24 @@
10768
10765
  allowLeadingZeros,
10769
10766
  format
10770
10767
  } = Object.assign({}, ref);
10771
- const formattedValueStartsWithZero = (_formattedValue = formattedValue) === null || _formattedValue === void 0 ? void 0 : _formattedValue.startsWith(`${prefix}0`);
10772
- const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) === null || _formattedValue2 === void 0 ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
10768
+ const formattedValueStartsWithZero = (_formattedValue = formattedValue) == null ? void 0 : _formattedValue.startsWith(`${prefix}0`);
10769
+ const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) == null ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
10773
10770
  const emptyFormattedValue = prefix || suffix || prefix + suffix || '';
10774
10771
  if ((formattedValueStartsWithZero || formattedWithZeroAndSuffix) && !allowLeadingZeros && !format) {
10775
10772
  var _formattedValue3, _input$value;
10776
10773
  const isSpecialChar = /^[+-]/.test(formattedValue);
10777
- if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) !== null && _formattedValue3 !== void 0 && _formattedValue3.includes('0,'))) {
10774
+ if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) != null && _formattedValue3.includes('0,'))) {
10778
10775
  var _formattedValue4, _numAsString;
10779
- formattedValue = (_formattedValue4 = formattedValue) === null || _formattedValue4 === void 0 ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
10780
- numAsString = (_numAsString = numAsString) === null || _numAsString === void 0 ? void 0 : _numAsString.replace(/^0+/, '');
10776
+ formattedValue = (_formattedValue4 = formattedValue) == null ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
10777
+ numAsString = (_numAsString = numAsString) == null ? void 0 : _numAsString.replace(/^0+/, '');
10781
10778
  }
10782
- if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input === null || input === void 0 ? void 0 : input.value)) {
10779
+ if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input == null ? void 0 : input.value)) {
10783
10780
  formattedValue = `${prefix}0${suffix}`;
10784
10781
  numAsString = '0';
10785
- } else if (input !== null && input !== void 0 && (_input$value = input.value) !== null && _input$value !== void 0 && _input$value.includes('0,')) {
10782
+ } else if (input != null && (_input$value = input.value) != null && _input$value.includes('0,')) {
10786
10783
  allowLeadingZeros = true;
10787
- formattedValue = input === null || input === void 0 ? void 0 : input.value;
10788
- numAsString = this.removeFormatting(input === null || input === void 0 ? void 0 : input.value);
10784
+ formattedValue = input == null ? void 0 : input.value;
10785
+ numAsString = this.removeFormatting(input == null ? void 0 : input.value);
10789
10786
  }
10790
10787
  }
10791
10788
  //end adjustment
@@ -11243,7 +11240,7 @@
11243
11240
  }
11244
11241
  function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
11245
11242
  const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
11246
- return maxValue + (prefix === null || prefix === void 0 ? void 0 : prefix.length) + (suffix === null || suffix === void 0 ? void 0 : suffix.length) + tsLength;
11243
+ return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
11247
11244
  }
11248
11245
  const InputNumber = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
11249
11246
  let {
@@ -11295,9 +11292,9 @@
11295
11292
  size: size,
11296
11293
  isInvalid: isInvalid,
11297
11294
  readOnly: readOnly,
11298
- isReadOnly: readOnly && !(props !== null && props !== void 0 && props.inputGroup) && !(props !== null && props !== void 0 && props.asChild),
11295
+ isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
11299
11296
  disabled: disabled,
11300
- maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props === null || props === void 0 ? void 0 : props.prefix, props === null || props === void 0 ? void 0 : props.suffix, thousandSeparator) : maxLength,
11297
+ maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
11301
11298
  thousandSeparator: thousandSeparator
11302
11299
  }, props, {
11303
11300
  __self: undefined,
@@ -11599,16 +11596,16 @@
11599
11596
  const addTags = event => {
11600
11597
  if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
11601
11598
  if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
11602
- onEnter === null || onEnter === void 0 || onEnter({
11599
+ onEnter == null || onEnter({
11603
11600
  key: 'duplicate',
11604
11601
  value: event.target.value
11605
11602
  });
11606
11603
  return;
11607
11604
  }
11608
- if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
11605
+ if (pattern && pattern != null && pattern.regex) {
11609
11606
  const regex = new RegExp(pattern.regex);
11610
11607
  if (!regex.test(event.target.value)) {
11611
- onEnter === null || onEnter === void 0 || onEnter({
11608
+ onEnter == null || onEnter({
11612
11609
  key: 'error',
11613
11610
  value: event.target.value
11614
11611
  });
@@ -11617,7 +11614,7 @@
11617
11614
  }
11618
11615
  }
11619
11616
  setRegexError(false);
11620
- onEnter === null || onEnter === void 0 || onEnter({
11617
+ onEnter == null || onEnter({
11621
11618
  key: 'success',
11622
11619
  value: event.target.value
11623
11620
  });
@@ -11629,7 +11626,7 @@
11629
11626
  if (disabled || readOnly) {
11630
11627
  return tags;
11631
11628
  } else if (key === 'removeTag' || key === 'Backspace') {
11632
- onRemoveItem === null || onRemoveItem === void 0 || onRemoveItem(tags[index]);
11629
+ onRemoveItem == null || onRemoveItem(tags[index]);
11633
11630
  setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
11634
11631
  }
11635
11632
  };
@@ -11680,7 +11677,7 @@
11680
11677
  lineNumber: 180,
11681
11678
  columnNumber: 9
11682
11679
  }
11683
- })), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default["default"].createElement(FormHelper, {
11680
+ })), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default["default"].createElement(FormHelper, {
11684
11681
  color: "red",
11685
11682
  __self: this,
11686
11683
  __source: {
@@ -11988,14 +11985,14 @@
11988
11985
  t
11989
11986
  } = reactI18next.useTranslation(['MajooUI/inputSearchbox', 'translation']);
11990
11987
  const [value, setValue] = React.useState(defaultValue);
11991
- const inputValue = (_props$value = props === null || props === void 0 ? void 0 : props.value) != null ? _props$value : value;
11992
- const debounceChange = React.useCallback(debounce__default["default"](e => onChange === null || onChange === void 0 ? void 0 : onChange(e), 1000), [onChange]);
11988
+ const inputValue = (_props$value = props == null ? void 0 : props.value) != null ? _props$value : value;
11989
+ const debounceChange = React.useCallback(debounce__default["default"](e => onChange == null ? void 0 : onChange(e), 1000), [onChange]);
11993
11990
  const handleChange = React.useCallback(e => {
11994
11991
  setValue(e.target.value);
11995
11992
  if (withDebounce) {
11996
11993
  debounceChange(e.target.value);
11997
11994
  } else {
11998
- onChange === null || onChange === void 0 || onChange(e.target.value);
11995
+ onChange == null || onChange(e.target.value);
11999
11996
  }
12000
11997
  }, [onChange, debounceChange, withDebounce]);
12001
11998
  const handleClearButtonClick = e => {
@@ -12048,7 +12045,7 @@
12048
12045
  columnNumber: 7
12049
12046
  }
12050
12047
  })), /*#__PURE__*/React__default["default"].createElement(InputRightElement, {
12051
- children: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(SvgCloseFilled, {
12048
+ children: (inputValue == null ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(SvgCloseFilled, {
12052
12049
  color: colors$7.iconSecondary,
12053
12050
  __self: undefined,
12054
12051
  __source: {
@@ -12293,7 +12290,7 @@
12293
12290
  middleware: [react$1.offset(_sideOffset), react$1.shift(), _flip && react$1.flip()],
12294
12291
  onOpenChange: isOpen => {
12295
12292
  setOpenState(isOpen);
12296
- !isOpen && (onClose === null || onClose === void 0 ? void 0 : onClose());
12293
+ !isOpen && (onClose == null ? void 0 : onClose());
12297
12294
  },
12298
12295
  placement
12299
12296
  });
@@ -13157,14 +13154,32 @@
13157
13154
  var _x = React.useState(value),
13158
13155
  selectedValue = _x[0],
13159
13156
  setSelectedValue = _x[1];
13160
- var _y = React.useState(),
13161
- query = _y[0],
13162
- setQuery = _y[1];
13163
- var _z = React.useState(false),
13164
- openOptions = _z[0],
13165
- setOpenOptions = _z[1];
13157
+ var _y = React.useState(0),
13158
+ selectedIndex = _y[0],
13159
+ setSelectedIndex = _y[1];
13160
+ var _z = React.useState(),
13161
+ query = _z[0],
13162
+ setQuery = _z[1];
13163
+ var _0 = React.useState(false),
13164
+ openOptions = _0[0],
13165
+ setOpenOptions = _0[1];
13166
+ var _1 = React.useState(false),
13167
+ open = _1[0],
13168
+ setOpen = _1[1];
13166
13169
  var selectBoxRef = React.useRef(null);
13167
13170
  var scrollerRef = React.useRef(null);
13171
+ React.useEffect(function () {
13172
+ var _a, _b;
13173
+ if (search && Boolean(query)) {
13174
+ (_a = scrollerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
13175
+ top: 0
13176
+ });
13177
+ return;
13178
+ }
13179
+ (_b = scrollerRef.current) === null || _b === void 0 ? void 0 : _b.scrollTo({
13180
+ top: selectedIndex * 30
13181
+ });
13182
+ }, [query, search, openOptions, open, selectedIndex]);
13168
13183
  var handleInputValue = function handleInputValue(value, isReset) {
13169
13184
  if (isReset === void 0) {
13170
13185
  isReset = false;
@@ -13320,6 +13335,7 @@
13320
13335
  }, void 0)
13321
13336
  }), void 0);
13322
13337
  };
13338
+ setOpen(isOpen);
13323
13339
  return !isMobile ? jsxRuntime.jsx(Popover, __assign({
13324
13340
  open: openOptions,
13325
13341
  onOpenChange: setOpenOptions,
@@ -13509,7 +13525,10 @@
13509
13525
  var _a;
13510
13526
  return /*#__PURE__*/React.createElement(SelectItem, __assign({}, getItemProps({
13511
13527
  item: item,
13512
- disabled: item.isDisabled || item.isGroup
13528
+ disabled: item.isDisabled || item.isGroup,
13529
+ onClick: function () {
13530
+ return setSelectedIndex(index);
13531
+ }
13513
13532
  }), {
13514
13533
  key: (_a = item.value) !== null && _a !== void 0 ? _a : index,
13515
13534
  hasGroup: !!item.group,
@@ -14146,13 +14165,13 @@
14146
14165
  const isShowSelectAll = showSelectAll && !maxSelectedItem;
14147
14166
  React.useEffect(() => {
14148
14167
  var _scrollerRef$current;
14149
- (_scrollerRef$current = scrollerRef.current) === null || _scrollerRef$current === void 0 || _scrollerRef$current.scrollTo({
14168
+ (_scrollerRef$current = scrollerRef.current) == null || _scrollerRef$current.scrollTo({
14150
14169
  top: 0
14151
14170
  });
14152
14171
  }, [query]);
14153
14172
  React.useEffect(() => {
14154
- if (defaultValue !== null && defaultValue !== void 0 && defaultValue.length) {
14155
- if (value !== null && value !== void 0 && value.length) {
14173
+ if (defaultValue != null && defaultValue.length) {
14174
+ if (value != null && value.length) {
14156
14175
  setInputSelectValue(value);
14157
14176
  }
14158
14177
  } else {
@@ -14217,7 +14236,7 @@
14217
14236
  removeSelectedItem,
14218
14237
  selectedItems
14219
14238
  } = Downshift.useMultipleSelection({
14220
- 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)) : []
14239
+ 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)) : []
14221
14240
  });
14222
14241
  const generateOptions = data => {
14223
14242
  return data.map(option => {
@@ -14239,7 +14258,7 @@
14239
14258
  };
14240
14259
  const debouncedSearch = React__default["default"].useRef(debounce__default["default"](_async(function (query) {
14241
14260
  setQuery(query);
14242
- onSearch === null || onSearch === void 0 || onSearch(query);
14261
+ onSearch == null || onSearch(query);
14243
14262
  return _await();
14244
14263
  }), 1000)).current;
14245
14264
  React__default["default"].useEffect(() => {
@@ -14248,7 +14267,7 @@
14248
14267
  };
14249
14268
  }, [debouncedSearch]);
14250
14269
  const handleInputValue = input => {
14251
- onSearch === null || onSearch === void 0 || onSearch(input);
14270
+ onSearch == null || onSearch(input);
14252
14271
  if (input === '') {
14253
14272
  if (disabledOptions.length > 0) {
14254
14273
  setItems(generateOptions(sortDisabled));
@@ -14256,9 +14275,9 @@
14256
14275
  return setItems(sortValue);
14257
14276
  }
14258
14277
  } else {
14259
- let filterItems = option === null || option === void 0 ? void 0 : option.filter(item => {
14260
- var _item$name, _item$name$includes, _input$toLocaleLowerC;
14261
- 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));
14278
+ let filterItems = option == null ? void 0 : option.filter(item => {
14279
+ var _item$name;
14280
+ 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());
14262
14281
  });
14263
14282
  setItems(filterItems);
14264
14283
  }
@@ -14267,10 +14286,10 @@
14267
14286
  if (disabled || readOnly) {
14268
14287
  return selectedValue;
14269
14288
  } else {
14270
- if ((selected === null || selected === void 0 ? void 0 : selected.id) === 'counter') {
14289
+ if ((selected == null ? void 0 : selected.id) === 'counter') {
14271
14290
  setSelectedValue([]);
14272
14291
  setInputSelectValue([]);
14273
- onChange === null || onChange === void 0 || onChange([]);
14292
+ onChange == null || onChange([]);
14274
14293
  for (let i = 0; i < selectedValue.length; i++) {
14275
14294
  removeSelectedItem(selectedValue[i]);
14276
14295
  }
@@ -14280,7 +14299,7 @@
14280
14299
  setSelectedValue(filterItems);
14281
14300
  setInputSelectValue(filterItems);
14282
14301
  if (selected.id !== '!all') {
14283
- onChange === null || onChange === void 0 || onChange(filterItems);
14302
+ onChange == null || onChange(filterItems);
14284
14303
  }
14285
14304
  }
14286
14305
  }
@@ -14318,9 +14337,9 @@
14318
14337
  if (selectedItem.id === '!all') {
14319
14338
  items.forEach(item => {
14320
14339
  var _item$children;
14321
- if (item !== null && item !== void 0 && (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
14340
+ if (item != null && (_item$children = item.children) != null && _item$children.length) {
14322
14341
  var _item$children2;
14323
- item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 || _item$children2.forEach(item => {
14342
+ item == null || (_item$children2 = item.children) == null || _item$children2.forEach(item => {
14324
14343
  removeSelectedItem(item);
14325
14344
  });
14326
14345
  } else {
@@ -14329,7 +14348,7 @@
14329
14348
  });
14330
14349
  setSelectedValue([]);
14331
14350
  setInputSelectValue([]);
14332
- onChange === null || onChange === void 0 || onChange([]);
14351
+ onChange == null || onChange([]);
14333
14352
  } else {
14334
14353
  removeItem(selectedItem);
14335
14354
  }
@@ -14340,9 +14359,9 @@
14340
14359
  const itemIds = [];
14341
14360
  items.forEach(item => {
14342
14361
  var _item$children3;
14343
- if (item !== null && item !== void 0 && (_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length) {
14362
+ if (item != null && (_item$children3 = item.children) != null && _item$children3.length) {
14344
14363
  var _item$children4;
14345
- item === null || item === void 0 || (_item$children4 = item.children) === null || _item$children4 === void 0 || _item$children4.forEach(item => {
14364
+ item == null || (_item$children4 = item.children) == null || _item$children4.forEach(item => {
14346
14365
  addSelectedItem(item);
14347
14366
  itemIds.push(item.id);
14348
14367
  });
@@ -14354,16 +14373,16 @@
14354
14373
  setSelectedValue(itemIds);
14355
14374
  setInputSelectValue(itemIds);
14356
14375
  // onChange?.(itemIds.slice(1).filter(id => !items.find(item => item.id === id)?.children?.length));
14357
- onChange === null || onChange === void 0 || onChange(itemIds.slice(1));
14376
+ onChange == null || onChange(itemIds.slice(1));
14358
14377
  } else {
14359
14378
  var _selectedItem$childre;
14360
14379
  //start check if item have children (option group)
14361
- if (selectedItem !== null && selectedItem !== void 0 && (_selectedItem$childre = selectedItem.children) !== null && _selectedItem$childre !== void 0 && _selectedItem$childre.length) {
14380
+ if (selectedItem != null && (_selectedItem$childre = selectedItem.children) != null && _selectedItem$childre.length) {
14362
14381
  var _selectedItem$childre2;
14363
14382
  const itemIdsSelect = [];
14364
14383
  const itemIdsUnSelect = [];
14365
- selectedItem === null || selectedItem === void 0 || (_selectedItem$childre2 = selectedItem.children) === null || _selectedItem$childre2 === void 0 || _selectedItem$childre2.forEach(item => {
14366
- if (selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id)) {
14384
+ selectedItem == null || (_selectedItem$childre2 = selectedItem.children) == null || _selectedItem$childre2.forEach(item => {
14385
+ if (selectedValue != null && selectedValue.includes(item.id)) {
14367
14386
  removeSelectedItem(item);
14368
14387
  itemIdsUnSelect.push(item.id);
14369
14388
  } else {
@@ -14377,19 +14396,19 @@
14377
14396
  setSelectedValue([...selectedValue, ...itemIdsSelect]);
14378
14397
  setInputSelectValue([...selectedValue, ...itemIdsSelect]);
14379
14398
  const _filteredSelectedValues = selectedValue.filter(val => val !== '!all');
14380
- onChange === null || onChange === void 0 || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
14399
+ onChange == null || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
14381
14400
  }
14382
14401
 
14383
14402
  //unselect all child in one of the option groups
14384
14403
  if (itemIdsUnSelect.length) {
14385
14404
  const newSelectedValue = selectedValue.filter(selId => {
14386
14405
  var _itemIdsUnSelect$filt;
14387
- return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) === null || _itemIdsUnSelect$filt === void 0 ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
14406
+ return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) == null ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
14388
14407
  });
14389
14408
  setSelectedValue(newSelectedValue);
14390
14409
  setInputSelectValue(newSelectedValue);
14391
14410
  const _filteredSelectedValues2 = newSelectedValue.filter(val => val !== '!all');
14392
- onChange === null || onChange === void 0 || onChange(_filteredSelectedValues2);
14411
+ onChange == null || onChange(_filteredSelectedValues2);
14393
14412
  }
14394
14413
  return;
14395
14414
  }
@@ -14406,7 +14425,7 @@
14406
14425
  setSelectedValue([...selectedValue, selectedItem.id]);
14407
14426
  setInputSelectValue([...selectedValue, selectedItem.id]);
14408
14427
  const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
14409
- onChange === null || onChange === void 0 || onChange([...filteredSelectedValues, selectedItem.id]);
14428
+ onChange == null || onChange([...filteredSelectedValues, selectedItem.id]);
14410
14429
  }
14411
14430
  selectItem(null);
14412
14431
  }
@@ -14438,9 +14457,9 @@
14438
14457
  }
14439
14458
  }
14440
14459
  });
14441
- const getOption = React.useCallback(() => maxSelectedItem ? option === null || option === void 0 ? void 0 : option.map(item => {
14442
- const isMaxSelectedItem = maxSelectedItem && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) >= maxSelectedItem;
14443
- if (isMaxSelectedItem && !(selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id))) {
14460
+ const getOption = React.useCallback(() => maxSelectedItem ? option == null ? void 0 : option.map(item => {
14461
+ const isMaxSelectedItem = maxSelectedItem && (selectedValue == null ? void 0 : selectedValue.length) >= maxSelectedItem;
14462
+ if (isMaxSelectedItem && !(selectedValue != null && selectedValue.includes(item.id))) {
14444
14463
  item.hideCheck = true;
14445
14464
  item.isDisabled = true;
14446
14465
  } else {
@@ -14449,7 +14468,7 @@
14449
14468
  }
14450
14469
  return item;
14451
14470
  }) : option, [maxSelectedItem, option, selectedValue]);
14452
- const itemsLength = items === null || items === void 0 ? void 0 : items.reduce((acc, item) => {
14471
+ const itemsLength = items == null ? void 0 : items.reduce((acc, item) => {
14453
14472
  return [...acc, ...(item.children ? item.children : [item])];
14454
14473
  }, []).length;
14455
14474
  React.useEffect(() => {
@@ -14496,16 +14515,15 @@
14496
14515
  }, [label, isOpen]);
14497
14516
  const toggleCollapsible = () => setShowAllTags(!showAllTags);
14498
14517
  const handleRemoveAllItem = () => {
14499
- onChange === null || onChange === void 0 || onChange([]);
14518
+ onChange == null || onChange([]);
14500
14519
  setSelectedValue([]);
14501
14520
  setInputSelectValue([]);
14502
14521
  for (let i = 0; i < selectedValue.length; i++) {
14503
14522
  removeSelectedItem(selectedValue[i]);
14504
14523
  }
14505
14524
  };
14506
- const isShowTagSelectAll = showTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > (option === null || option === void 0 ? void 0 : option.length);
14525
+ const isShowTagSelectAll = showTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > (option == null ? void 0 : option.length);
14507
14526
  const renderOptionItem = (item, index, asChild) => {
14508
- var _item$render;
14509
14527
  return /*#__PURE__*/React__default["default"].createElement(ItemWrapper$1, _extends({
14510
14528
  key: item.id
14511
14529
  }, getItemProps({
@@ -14538,7 +14556,7 @@
14538
14556
  lineNumber: 745,
14539
14557
  columnNumber: 11
14540
14558
  }
14541
- }, !(item !== null && item !== void 0 && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14559
+ }, !(item != null && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14542
14560
  color: colors$8.iconDisable,
14543
14561
  __self: undefined,
14544
14562
  __source: {
@@ -14554,7 +14572,7 @@
14554
14572
  lineNumber: 760,
14555
14573
  columnNumber: 19
14556
14574
  }
14557
- })), 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, {
14575
+ })), 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, {
14558
14576
  __self: undefined,
14559
14577
  __source: {
14560
14578
  fileName: _jsxFileName$y,
@@ -14579,15 +14597,15 @@
14579
14597
  lineNumber: 769,
14580
14598
  columnNumber: 11
14581
14599
  }
14582
- }, item.render ? (_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.call(item, item.name) : item.name));
14600
+ }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name));
14583
14601
  };
14584
14602
  let lastGroupIndex = showSelectAll ? 1 : 0;
14585
14603
  const renderOptionGroupItem = (item, index) => {
14586
- var _item$children5, _item$children6, _item$children7, _item$render2, _item$children8;
14604
+ var _item$children5, _item$children6, _item$children7, _item$children8;
14587
14605
  // const groupIndex = (index > (showSelectAll ? 1 : 0)) ? lastGroupIndex : 0;
14588
14606
  const groupIndex = lastGroupIndex;
14589
- lastGroupIndex += ((item === null || item === void 0 || (_item$children5 = item.children) === null || _item$children5 === void 0 ? void 0 : _item$children5.length) || 0) + 1;
14590
- 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);
14607
+ lastGroupIndex += ((item == null || (_item$children5 = item.children) == null ? void 0 : _item$children5.length) || 0) + 1;
14608
+ const filterSelectedChild = item == null || (_item$children6 = item.children) == null ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
14591
14609
  return /*#__PURE__*/React__default["default"].createElement(OptionGroupItem, {
14592
14610
  item: /*#__PURE__*/React__default["default"].createElement(ItemWrapper$1, _extends({
14593
14611
  key: item.id
@@ -14620,7 +14638,7 @@
14620
14638
  lineNumber: 799,
14621
14639
  columnNumber: 15
14622
14640
  }
14623
- }, !(item !== null && item !== void 0 && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14641
+ }, !(item != null && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
14624
14642
  color: colors$8.iconDisable,
14625
14643
  __self: undefined,
14626
14644
  __source: {
@@ -14628,7 +14646,7 @@
14628
14646
  lineNumber: 809,
14629
14647
  columnNumber: 19
14630
14648
  }
14631
- }) : (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["default"].createElement(CheckOutline, {
14649
+ }) : (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["default"].createElement(CheckOutline, {
14632
14650
  color: colors$8.iconGreen,
14633
14651
  __self: undefined,
14634
14652
  __source: {
@@ -14636,7 +14654,7 @@
14636
14654
  lineNumber: 811,
14637
14655
  columnNumber: 19
14638
14656
  }
14639
- }) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
14657
+ }) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
14640
14658
  __self: undefined,
14641
14659
  __source: {
14642
14660
  fileName: _jsxFileName$y,
@@ -14654,14 +14672,14 @@
14654
14672
  lineNumber: 816,
14655
14673
  columnNumber: 15
14656
14674
  }
14657
- }, item.render ? (_item$render2 = item.render) === null || _item$render2 === void 0 ? void 0 : _item$render2.call(item, item.name) : item.name)),
14675
+ }, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name)),
14658
14676
  __self: undefined,
14659
14677
  __source: {
14660
14678
  fileName: _jsxFileName$y,
14661
14679
  lineNumber: 784,
14662
14680
  columnNumber: 9
14663
14681
  }
14664
- }, 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)));
14682
+ }, item == null || (_item$children8 = item.children) == null ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
14665
14683
  };
14666
14684
  return /*#__PURE__*/React__default["default"].createElement(Wrapper$1, _extends({
14667
14685
  css: css
@@ -14792,13 +14810,13 @@
14792
14810
  lineNumber: 875,
14793
14811
  columnNumber: 17
14794
14812
  }
14795
- }), 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) => {
14813
+ }), 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) => {
14796
14814
  if (showAllTags || !collapsible) {
14797
14815
  return true;
14798
14816
  } else {
14799
14817
  return idx < 5;
14800
14818
  }
14801
- })) === null || _selectedItems$filter === void 0 ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends({
14819
+ })) == null ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends({
14802
14820
  disabled: disabled,
14803
14821
  isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
14804
14822
  size: "lg",
@@ -14823,7 +14841,7 @@
14823
14841
  lineNumber: 904,
14824
14842
  columnNumber: 21
14825
14843
  }
14826
- }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
14844
+ }), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
14827
14845
  direction: "column",
14828
14846
  gap: 4,
14829
14847
  __self: undefined,
@@ -14909,7 +14927,7 @@
14909
14927
  lineNumber: 947,
14910
14928
  columnNumber: 19
14911
14929
  }
14912
- }, `${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["default"].createElement(Paragraph, {
14930
+ }, `${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["default"].createElement(Paragraph, {
14913
14931
  css: {
14914
14932
  fontSize: '$label',
14915
14933
  marginTop: '$spacing-01'
@@ -14921,7 +14939,7 @@
14921
14939
  lineNumber: 957,
14922
14940
  columnNumber: 11
14923
14941
  }
14924
- }, `${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["default"].createElement(OptionWrapper$1, {
14942
+ }, `${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["default"].createElement(OptionWrapper$1, {
14925
14943
  placement: placement,
14926
14944
  css: {
14927
14945
  display: isOpen && disabled === false ? 'block' : 'none',
@@ -14979,7 +14997,7 @@
14979
14997
  }), /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
14980
14998
  condition: !!fetchData && items.length > 0,
14981
14999
  wrapper: child => /*#__PURE__*/React__default["default"].createElement(InfiniteScroll__default["default"], {
14982
- loadMore: () => !isLoading && (fetchData === null || fetchData === void 0 ? void 0 : fetchData({
15000
+ loadMore: () => !isLoading && (fetchData == null ? void 0 : fetchData({
14983
15001
  query
14984
15002
  })),
14985
15003
  hasMore: true,
@@ -14998,7 +15016,7 @@
14998
15016
  lineNumber: 997,
14999
15017
  columnNumber: 15
15000
15018
  }
15001
- }, isOpen && items.map((item, index) => item !== null && item !== void 0 && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default["default"].createElement(Option, _extends({
15019
+ }, isOpen && items.map((item, index) => item != null && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default["default"].createElement(Option, _extends({
15002
15020
  css: {
15003
15021
  height: 'auto'
15004
15022
  }
@@ -18661,9 +18679,9 @@
18661
18679
  }
18662
18680
  function handleInputChange(type, e) {
18663
18681
  var _e$target;
18664
- const value = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
18682
+ const value = e == null || (_e$target = e.target) == null ? void 0 : _e$target.value;
18665
18683
  const format = 'DD:MM:YYYY:HH:mm';
18666
- const minLength = (value === null || value === void 0 ? void 0 : value.length) > 1;
18684
+ const minLength = (value == null ? void 0 : value.length) > 1;
18667
18685
  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());
18668
18686
  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());
18669
18687
  if (!disabled) {
@@ -21263,7 +21281,7 @@
21263
21281
  };
21264
21282
  };
21265
21283
  const getValue = () => {
21266
- let value = props === null || props === void 0 ? void 0 : props.value;
21284
+ let value = props == null ? void 0 : props.value;
21267
21285
  const isTrailing = variantIcon === 'trailing';
21268
21286
  if (typeof value === 'number' || parseInt(value)) {
21269
21287
  if (Math.sign(value) === 1 || Math.sign(value) === 0) {
@@ -21895,7 +21913,7 @@
21895
21913
  justify: "center",
21896
21914
  onClick: () => {
21897
21915
  var _dialogPageRef$curren;
21898
- return (_dialogPageRef$curren = dialogPageRef.current) === null || _dialogPageRef$curren === void 0 ? void 0 : _dialogPageRef$curren.click();
21916
+ return (_dialogPageRef$curren = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren.click();
21899
21917
  },
21900
21918
  __self: undefined,
21901
21919
  __source: {
@@ -21973,7 +21991,7 @@
21973
21991
  onSubmit: () => {
21974
21992
  var _dialogPageRef$curren2;
21975
21993
  debouncedGoToPage(Number(goToPage));
21976
- (_dialogPageRef$curren2 = dialogPageRef.current) === null || _dialogPageRef$curren2 === void 0 || _dialogPageRef$curren2.click();
21994
+ (_dialogPageRef$curren2 = dialogPageRef.current) == null || _dialogPageRef$curren2.click();
21977
21995
  },
21978
21996
  __self: undefined,
21979
21997
  __source: {
@@ -21990,7 +22008,7 @@
21990
22008
  allowNegative: false,
21991
22009
  onChange: e => {
21992
22010
  var _e$target;
21993
- return setGoToPage((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
22011
+ return setGoToPage((_e$target = e.target) == null ? void 0 : _e$target.value);
21994
22012
  },
21995
22013
  __self: undefined,
21996
22014
  __source: {
@@ -22023,7 +22041,7 @@
22023
22041
  onClick: () => {
22024
22042
  var _dialogPageRef$curren3;
22025
22043
  setGoToPage(null);
22026
- (_dialogPageRef$curren3 = dialogPageRef.current) === null || _dialogPageRef$curren3 === void 0 || _dialogPageRef$curren3.click();
22044
+ (_dialogPageRef$curren3 = dialogPageRef.current) == null || _dialogPageRef$curren3.click();
22027
22045
  },
22028
22046
  __self: undefined,
22029
22047
  __source: {
@@ -22038,7 +22056,7 @@
22038
22056
  onClick: () => {
22039
22057
  var _dialogPageRef$curren4;
22040
22058
  debouncedGoToPage(Number(goToPage));
22041
- (_dialogPageRef$curren4 = dialogPageRef.current) === null || _dialogPageRef$curren4 === void 0 || _dialogPageRef$curren4.click();
22059
+ (_dialogPageRef$curren4 = dialogPageRef.current) == null || _dialogPageRef$curren4.click();
22042
22060
  },
22043
22061
  __self: undefined,
22044
22062
  __source: {
@@ -22127,7 +22145,7 @@
22127
22145
  onClick: () => {
22128
22146
  if (isMobilePagination) {
22129
22147
  var _dialogLimitRef$curre;
22130
- (_dialogLimitRef$curre = dialogLimitRef.current) === null || _dialogLimitRef$curre === void 0 || _dialogLimitRef$curre.click();
22148
+ (_dialogLimitRef$curre = dialogLimitRef.current) == null || _dialogLimitRef$curre.click();
22131
22149
  }
22132
22150
  },
22133
22151
  __self: this,
@@ -22173,7 +22191,7 @@
22173
22191
  lineNumber: 60,
22174
22192
  columnNumber: 13
22175
22193
  }
22176
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(PopoverClose, {
22194
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(PopoverClose, {
22177
22195
  key: limit,
22178
22196
  css: limitItemContainerStyle(selectedLimit === limit),
22179
22197
  onClick: () => onChange(limit),
@@ -22256,7 +22274,7 @@
22256
22274
  lineNumber: 100,
22257
22275
  columnNumber: 11
22258
22276
  }
22259
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(Flex$1, {
22277
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(Flex$1, {
22260
22278
  css: {
22261
22279
  height: 44,
22262
22280
  width: '100%',
@@ -22271,7 +22289,7 @@
22271
22289
  onClick: () => {
22272
22290
  var _dialogLimitRef$curre2;
22273
22291
  onChange(limit);
22274
- (_dialogLimitRef$curre2 = dialogLimitRef.current) === null || _dialogLimitRef$curre2 === void 0 || _dialogLimitRef$curre2.click();
22292
+ (_dialogLimitRef$curre2 = dialogLimitRef.current) == null || _dialogLimitRef$curre2.click();
22275
22293
  },
22276
22294
  __self: this,
22277
22295
  __source: {
@@ -24538,7 +24556,7 @@
24538
24556
  onClick: () => {
24539
24557
  var _document$getElements;
24540
24558
  setOpenDrop(true);
24541
- const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) === null || _document$getElements === void 0 ? void 0 : _document$getElements[0];
24559
+ const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
24542
24560
  contextMenu.style.opacity = 0;
24543
24561
  },
24544
24562
  __self: undefined,
@@ -25194,7 +25212,7 @@
25194
25212
  if (!props.onOpenAutoFocus) {
25195
25213
  e.preventDefault();
25196
25214
  } else {
25197
- props === null || props === void 0 || props.onOpenAutoFocus();
25215
+ props == null || props.onOpenAutoFocus();
25198
25216
  }
25199
25217
  },
25200
25218
  __self: undefined,
@@ -25274,7 +25292,7 @@
25274
25292
  }, props.description)), /*#__PURE__*/React__default["default"].createElement(Box, {
25275
25293
  css: {
25276
25294
  width: '100%',
25277
- display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
25295
+ display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
25278
25296
  },
25279
25297
  __self: undefined,
25280
25298
  __source: {
@@ -25316,8 +25334,8 @@
25316
25334
  size: props.btnSize,
25317
25335
  onClick: buttonConfirm,
25318
25336
  buttonType: props.dialogType,
25319
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25320
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25337
+ disabled: props == null ? void 0 : props.disabledButton
25338
+ }, props == null ? void 0 : props.actionButtonProps, {
25321
25339
  __self: undefined,
25322
25340
  __source: {
25323
25341
  fileName: _jsxFileName$b,
@@ -25336,19 +25354,19 @@
25336
25354
  size: props.btnSize,
25337
25355
  onClick: buttonCancel,
25338
25356
  css: {
25339
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
25357
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
25340
25358
  flex: props.isMobile && 1
25341
25359
  },
25342
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25343
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25344
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
25360
+ buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25361
+ disabled: props == null ? void 0 : props.disabledButton
25362
+ }, props == null ? void 0 : props.cancelButtonProps, {
25345
25363
  __self: undefined,
25346
25364
  __source: {
25347
25365
  fileName: _jsxFileName$b,
25348
25366
  lineNumber: 187,
25349
25367
  columnNumber: 19
25350
25368
  }
25351
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
25369
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
25352
25370
  asChild: true,
25353
25371
  __self: undefined,
25354
25372
  __source: {
@@ -25363,8 +25381,8 @@
25363
25381
  css: {
25364
25382
  flex: props.isMobile && 1
25365
25383
  },
25366
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25367
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25384
+ disabled: props == null ? void 0 : props.disabledButton
25385
+ }, props == null ? void 0 : props.actionButtonProps, {
25368
25386
  __self: undefined,
25369
25387
  __source: {
25370
25388
  fileName: _jsxFileName$b,
@@ -25494,7 +25512,7 @@
25494
25512
  }, props.description)), /*#__PURE__*/React__default["default"].createElement(Box, {
25495
25513
  css: {
25496
25514
  width: '100%',
25497
- display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
25515
+ display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
25498
25516
  },
25499
25517
  __self: this,
25500
25518
  __source: {
@@ -25539,8 +25557,8 @@
25539
25557
  css: {
25540
25558
  flex: props.isMobile && 1
25541
25559
  },
25542
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25543
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25560
+ disabled: props == null ? void 0 : props.disabledButton
25561
+ }, props == null ? void 0 : props.actionButtonProps, {
25544
25562
  __self: this,
25545
25563
  __source: {
25546
25564
  fileName: _jsxFileName$b,
@@ -25559,19 +25577,19 @@
25559
25577
  size: props.btnSize,
25560
25578
  onClick: props.onCancel,
25561
25579
  css: {
25562
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
25580
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
25563
25581
  flex: props.isMobile && 1
25564
25582
  },
25565
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25566
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25567
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
25583
+ buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
25584
+ disabled: props == null ? void 0 : props.disabledButton
25585
+ }, props == null ? void 0 : props.cancelButtonProps, {
25568
25586
  __self: this,
25569
25587
  __source: {
25570
25588
  fileName: _jsxFileName$b,
25571
25589
  lineNumber: 293,
25572
25590
  columnNumber: 19
25573
25591
  }
25574
- }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
25592
+ }), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
25575
25593
  asChild: true,
25576
25594
  __self: this,
25577
25595
  __source: {
@@ -25586,8 +25604,8 @@
25586
25604
  css: {
25587
25605
  flex: props.isMobile && 1
25588
25606
  },
25589
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
25590
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
25607
+ disabled: props == null ? void 0 : props.disabledButton
25608
+ }, props == null ? void 0 : props.actionButtonProps, {
25591
25609
  __self: this,
25592
25610
  __source: {
25593
25611
  fileName: _jsxFileName$b,
@@ -28101,7 +28119,7 @@
28101
28119
  upload({
28102
28120
  url: action,
28103
28121
  file: newFile,
28104
- customBody: customBodyRequest === null || customBodyRequest === void 0 ? void 0 : customBodyRequest(newFile),
28122
+ customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
28105
28123
  token,
28106
28124
  tokenKey,
28107
28125
  reqKey,
@@ -28121,12 +28139,12 @@
28121
28139
  arrProgress[i] = fileProgress;
28122
28140
  }
28123
28141
  }
28124
- onChange === null || onChange === void 0 || (_onChange = onChange({
28142
+ onChange == null || (_onChange = onChange({
28125
28143
  fileList: arrProgress,
28126
28144
  file: fileProgress,
28127
28145
  indexReplace: indexReplace.current,
28128
28146
  isReplace: indexReplace.current !== null
28129
- })) === null || _onChange === void 0 || (_onChange = _onChange.then(() => setError(null))) === null || _onChange === void 0 || _onChange.catch(error => setError(error.message));
28147
+ })) == null || (_onChange = _onChange.then(() => setError(null))) == null || _onChange.catch(error => setError(error.message));
28130
28148
  }
28131
28149
  }).then(result => {
28132
28150
  var _onChange2;
@@ -28139,12 +28157,12 @@
28139
28157
  arrFile[i] = fileSuccess;
28140
28158
  }
28141
28159
  }
28142
- onChange === null || onChange === void 0 || (_onChange2 = onChange({
28160
+ onChange == null || (_onChange2 = onChange({
28143
28161
  fileList: arrFile,
28144
28162
  file: fileSuccess,
28145
28163
  indexReplace: indexReplace.current,
28146
28164
  isReplace: indexReplace.current !== null
28147
- })) === null || _onChange2 === void 0 || (_onChange2 = _onChange2.then(() => setError(null))) === null || _onChange2 === void 0 || _onChange2.catch(error => setError(error.message));
28165
+ })) == null || (_onChange2 = _onChange2.then(() => setError(null))) == null || _onChange2.catch(error => setError(error.message));
28148
28166
  }).catch(error => {
28149
28167
  var _onChange3;
28150
28168
  let fileError = Object.assign({}, newFile);
@@ -28156,21 +28174,21 @@
28156
28174
  arrFile[i] = fileError;
28157
28175
  }
28158
28176
  }
28159
- onChange === null || onChange === void 0 || (_onChange3 = onChange({
28177
+ onChange == null || (_onChange3 = onChange({
28160
28178
  fileList: arrFile,
28161
28179
  file: fileError,
28162
28180
  indexReplace: indexReplace.current,
28163
28181
  isReplace: indexReplace.current !== null
28164
- })) === null || _onChange3 === void 0 || (_onChange3 = _onChange3.then(() => setError(null))) === null || _onChange3 === void 0 || _onChange3.catch(error => setError(error.message));
28182
+ })) == null || (_onChange3 = _onChange3.then(() => setError(null))) == null || _onChange3.catch(error => setError(error.message));
28165
28183
  });
28166
28184
  } else {
28167
28185
  var _onChange4;
28168
- onChange === null || onChange === void 0 || (_onChange4 = onChange({
28186
+ onChange == null || (_onChange4 = onChange({
28169
28187
  fileList: arrFile,
28170
28188
  file: newFile,
28171
28189
  indexReplace: indexReplace.current,
28172
28190
  isReplace: indexReplace.current !== null
28173
- })) === null || _onChange4 === void 0 || (_onChange4 = _onChange4.then(() => setError(null))) === null || _onChange4 === void 0 || _onChange4.catch(error => setError(error.message));
28191
+ })) == null || (_onChange4 = _onChange4.then(() => setError(null))) == null || _onChange4.catch(error => setError(error.message));
28174
28192
  }
28175
28193
  if (indexReplace.current !== null) {
28176
28194
  arrFile[indexReplace.current] = newFile;
@@ -28190,15 +28208,15 @@
28190
28208
  // program to get the dimensions of an image
28191
28209
  const img = document.createElement('img');
28192
28210
  img.src = URL.createObjectURL(files[0]);
28193
- img.size = files === null || files === void 0 || (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size;
28194
- img.type = files === null || files === void 0 || (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.type;
28211
+ img.size = files == null || (_files$ = files[0]) == null ? void 0 : _files$.size;
28212
+ img.type = files == null || (_files$2 = files[0]) == null ? void 0 : _files$2.type;
28195
28213
  img.onload = () => {
28196
28214
  const imgRatio = img.width / img.height;
28197
28215
  setAspect(ratio || imgRatio);
28198
28216
  setCropperImgRatio(imgRatio);
28199
28217
  if (onBeforeCrop) {
28200
28218
  var _onBeforeCrop;
28201
- onBeforeCrop === null || onBeforeCrop === void 0 || (_onBeforeCrop = onBeforeCrop(img)) === null || _onBeforeCrop === void 0 || (_onBeforeCrop = _onBeforeCrop.then(() => {
28219
+ onBeforeCrop == null || (_onBeforeCrop = onBeforeCrop(img)) == null || (_onBeforeCrop = _onBeforeCrop.then(() => {
28202
28220
  setError(null);
28203
28221
  toggleModal();
28204
28222
  setTimeout(() => {
@@ -28212,7 +28230,7 @@
28212
28230
  }, 300);
28213
28231
  setFileState(files[0]);
28214
28232
  setPreviewImage(URL.createObjectURL(files[0]));
28215
- })) === null || _onBeforeCrop === void 0 || _onBeforeCrop.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
28233
+ })) == null || _onBeforeCrop.catch(error => setError(error == null ? void 0 : error.message));
28216
28234
  } else {
28217
28235
  toggleModal();
28218
28236
  setTimeout(() => {
@@ -28230,18 +28248,18 @@
28230
28248
  };
28231
28249
  img.onerror = error => {
28232
28250
  var _onBeforeCrop2;
28233
- 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));
28251
+ onBeforeCrop == null || (_onBeforeCrop2 = onBeforeCrop(img, error)) == null || (_onBeforeCrop2 = _onBeforeCrop2.then(() => setError(null))) == null || _onBeforeCrop2.catch(error => setError(error == null ? void 0 : error.message));
28234
28252
  };
28235
28253
  }
28236
28254
  }
28237
28255
  }
28238
28256
  function handleCrop() {
28239
- if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
28240
- imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState === null || fileState === void 0 ? void 0 : fileState.type).then(blob => {
28241
- const sizeMB = (blob === null || blob === void 0 ? void 0 : blob.size) / 1024 / 1024;
28257
+ if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
28258
+ imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState == null ? void 0 : fileState.type).then(blob => {
28259
+ const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
28242
28260
  if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
28243
- const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
28244
- type: blob === null || blob === void 0 ? void 0 : blob.type
28261
+ const file = new File([blob], fileState == null ? void 0 : fileState.name, {
28262
+ type: blob == null ? void 0 : blob.type
28245
28263
  });
28246
28264
  handleUpload([file]);
28247
28265
  setCrop(null);
@@ -28255,16 +28273,16 @@
28255
28273
  alwaysKeepResolution: true
28256
28274
  }).then(compressedFile => {
28257
28275
  var _fileState$name;
28258
- 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', {
28259
- type: compressedFile === null || compressedFile === void 0 ? void 0 : compressedFile.type
28276
+ const file = new File([compressedFile], (fileState == null || (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
28277
+ type: compressedFile == null ? void 0 : compressedFile.type
28260
28278
  });
28261
28279
  handleUpload([file]);
28262
28280
  setCrop(null);
28263
28281
  setCompletedCrop(null);
28264
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
28282
+ }).catch(error => console.error(error == null ? void 0 : error.message));
28265
28283
  }
28266
28284
  toggleModal();
28267
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
28285
+ }).catch(error => console.error(error == null ? void 0 : error.message));
28268
28286
  } else {
28269
28287
  handleUpload([fileState]);
28270
28288
  toggleModal();
@@ -28293,7 +28311,7 @@
28293
28311
  const index = fileList.indexOf(file);
28294
28312
  const newFileList = fileList.slice();
28295
28313
  newFileList.splice(index, 1);
28296
- onChange === null || onChange === void 0 || onChange({
28314
+ onChange == null || onChange({
28297
28315
  fileList: newFileList,
28298
28316
  file
28299
28317
  });
@@ -28316,14 +28334,14 @@
28316
28334
  }
28317
28335
  function handleOpenFile(file) {
28318
28336
  var _String, _file$name;
28319
- 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();
28337
+ let extension = (_String = String(file == null || (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
28320
28338
  if (extension === 'pdf') {
28321
- window.open(file === null || file === void 0 ? void 0 : file.url);
28339
+ window.open(file == null ? void 0 : file.url);
28322
28340
  } else {
28323
- if (file !== null && file !== void 0 && file.url) {
28341
+ if (file != null && file.url) {
28324
28342
  const link = document.createElement('a');
28325
28343
  link.href = file.url;
28326
- link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
28344
+ link.setAttribute('download', file == null ? void 0 : file.name);
28327
28345
  document.body.appendChild(link);
28328
28346
  link.click();
28329
28347
  document.body.removeChild(link);
@@ -28385,12 +28403,12 @@
28385
28403
  }, replaceLabel && replaceLabel.length > 0 ? replaceLabel : t('replaceLabel', 'Ubah Berkas')));
28386
28404
  }
28387
28405
  const renderPicture = () => {
28388
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
28389
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
28406
+ return fileList == null ? void 0 : fileList.map((item, index) => {
28407
+ if ((item == null ? void 0 : item.status) === 'uploading') {
28390
28408
  return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
28391
28409
  key: index,
28392
- progress: item === null || item === void 0 ? void 0 : item.percent,
28393
- loading: item === null || item === void 0 ? void 0 : item.loading,
28410
+ progress: item == null ? void 0 : item.percent,
28411
+ loading: item == null ? void 0 : item.loading,
28394
28412
  __self: undefined,
28395
28413
  __source: {
28396
28414
  fileName: _jsxFileName$9,
@@ -28463,13 +28481,13 @@
28463
28481
  });
28464
28482
  };
28465
28483
  const renderFile = () => {
28466
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
28484
+ return fileList == null ? void 0 : fileList.map((item, index) => {
28467
28485
  var _item$name;
28468
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
28486
+ if ((item == null ? void 0 : item.status) === 'uploading') {
28469
28487
  return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
28470
28488
  key: index,
28471
- progress: item === null || item === void 0 ? void 0 : item.percent,
28472
- loading: item === null || item === void 0 ? void 0 : item.loading,
28489
+ progress: item == null ? void 0 : item.percent,
28490
+ loading: item == null ? void 0 : item.loading,
28473
28491
  __self: undefined,
28474
28492
  __source: {
28475
28493
  fileName: _jsxFileName$9,
@@ -28535,7 +28553,7 @@
28535
28553
  lineNumber: 666,
28536
28554
  columnNumber: 17
28537
28555
  }
28538
- }, ".", item === null || item === void 0 || (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
28556
+ }, ".", item == null || (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
28539
28557
  label: item.name,
28540
28558
  __self: undefined,
28541
28559
  __source: {
@@ -28905,7 +28923,7 @@
28905
28923
  }
28906
28924
  return /*#__PURE__*/React__default["default"].createElement(Flex$1, {
28907
28925
  direction: "row",
28908
- gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
28926
+ gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
28909
28927
  wrap: "wrap",
28910
28928
  css: {
28911
28929
  userSelect: 'none'
@@ -29735,9 +29753,9 @@
29735
29753
  function InputColorPicker(props) {
29736
29754
  const [isPopover, setIsPopover] = React.useState(false);
29737
29755
  function getColor() {
29738
- const color = props === null || props === void 0 ? void 0 : props.color;
29756
+ const color = props == null ? void 0 : props.color;
29739
29757
  if (typeof color === 'string') {
29740
- return color === null || color === void 0 ? void 0 : color.toUpperCase();
29758
+ return color == null ? void 0 : color.toUpperCase();
29741
29759
  }
29742
29760
  return `rgba(${color.r},${color.g},${color.b},${color.a})`;
29743
29761
  }
@@ -32756,7 +32774,7 @@
32756
32774
  var _data;
32757
32775
  const isActive = props.currentStep === i;
32758
32776
  const isComplete = props.isComplete[i - 1];
32759
- const isAdditional = (_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.additional;
32777
+ const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional;
32760
32778
  const lastItem = navMobileItems.indexOf(data[i - 1]) + 1 === navMobileItems.length;
32761
32779
  // eslint-disable-next-line no-lone-blocks
32762
32780
  {
@@ -32771,7 +32789,7 @@
32771
32789
  key: `step-${i}`,
32772
32790
  onClick: () => {
32773
32791
  var _data2;
32774
- if (props.onNavClicked && !((_data2 = data[i - 1]) !== null && _data2 !== void 0 && _data2.disabled) || isAdditional) props.onNavClicked(i);
32792
+ if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
32775
32793
  if (!forbidClickNav && isComplete && !isHide || isAdditional) {
32776
32794
  props.goToStep(i);
32777
32795
  }
@@ -32804,9 +32822,9 @@
32804
32822
  lineNumber: 176,
32805
32823
  columnNumber: 17
32806
32824
  }
32807
- }), 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, {
32825
+ }), 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, {
32808
32826
  align: "center",
32809
- label: (_data5 = data[i - 1]) === null || _data5 === void 0 ? void 0 : _data5.tooltipsContents,
32827
+ label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
32810
32828
  __self: undefined,
32811
32829
  __source: {
32812
32830
  fileName: _jsxFileName$4,
@@ -32825,9 +32843,9 @@
32825
32843
  lineNumber: 181,
32826
32844
  columnNumber: 19
32827
32845
  }
32828
- })), ((_data6 = data[i - 1]) === null || _data6 === void 0 ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
32846
+ })), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
32829
32847
  css: {
32830
- marginLeft: (_data7 = data[i - 1]) !== null && _data7 !== void 0 && _data7.withTolltip ? 0 : '$spacing-03'
32848
+ marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
32831
32849
  },
32832
32850
  align: "center",
32833
32851
  __self: undefined,
@@ -32878,10 +32896,10 @@
32878
32896
  lineNumber: 198,
32879
32897
  columnNumber: 21
32880
32898
  }
32881
- }, 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, {
32899
+ }, 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, {
32882
32900
  align: "center",
32883
32901
  withClick: true,
32884
- label: (_data10 = data[i - 1]) === null || _data10 === void 0 ? void 0 : _data10.tooltipsContents,
32902
+ label: (_data10 = data[i - 1]) == null ? void 0 : _data10.tooltipsContents,
32885
32903
  __self: undefined,
32886
32904
  __source: {
32887
32905
  fileName: _jsxFileName$4,
@@ -32897,11 +32915,11 @@
32897
32915
  lineNumber: 209,
32898
32916
  columnNumber: 25
32899
32917
  }
32900
- })), ((_data11 = data[i - 1]) === null || _data11 === void 0 ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
32918
+ })), ((_data11 = data[i - 1]) == null ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
32901
32919
  align: "center",
32902
32920
  justify: "center",
32903
32921
  css: {
32904
- marginTop: (_data12 = data[i - 1]) !== null && _data12 !== void 0 && _data12.withTolltip ? 0 : '$spacing-03'
32922
+ marginTop: (_data12 = data[i - 1]) != null && _data12.withTolltip ? 0 : '$spacing-03'
32905
32923
  },
32906
32924
  __self: undefined,
32907
32925
  __source: {
@@ -32925,7 +32943,7 @@
32925
32943
  userSelect: 'none',
32926
32944
  fontSize: '12px',
32927
32945
  textAlign: '-webkit-center',
32928
- display: ((_data13 = data[i - 1]) === null || _data13 === void 0 ? void 0 : _data13.disabled) && 'none',
32946
+ display: ((_data13 = data[i - 1]) == null ? void 0 : _data13.disabled) && 'none',
32929
32947
  marginTop: '$spacing-07',
32930
32948
  flex: 1,
32931
32949
  maxWidth: lastItem && 26
@@ -33005,7 +33023,7 @@
33005
33023
  height: 24,
33006
33024
  borderRadius: '$round',
33007
33025
  border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
33008
- backgroundColor: (_data14 = data[i - 1]) !== null && _data14 !== void 0 && _data14.disabled ? '$gray200' : '$white'
33026
+ backgroundColor: (_data14 = data[i - 1]) != null && _data14.disabled ? '$gray200' : '$white'
33009
33027
  },
33010
33028
  __self: undefined,
33011
33029
  __source: {
@@ -33034,53 +33052,50 @@
33034
33052
  }
33035
33053
  return /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
33036
33054
  condition: !isMobile,
33037
- wrapper: child => {
33038
- var _props$appendContent;
33039
- return /*#__PURE__*/React__default["default"].createElement(Box, {
33040
- css: {
33041
- opacity: isHide ? 0 : undefined,
33042
- maxWidth: 311
33043
- },
33044
- __self: undefined,
33045
- __source: {
33046
- fileName: _jsxFileName$4,
33047
- lineNumber: 281,
33048
- columnNumber: 9
33049
- }
33050
- }, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
33051
- css: {
33052
- position: !isMobile && 'sticky',
33053
- top: !isMobile ? 44 : 40
33054
- },
33055
- direction: "column",
33056
- gap: 7,
33057
- __self: undefined,
33058
- __source: {
33059
- fileName: _jsxFileName$4,
33060
- lineNumber: 282,
33061
- columnNumber: 11
33062
- }
33063
- }, /*#__PURE__*/React__default["default"].createElement(Card, {
33064
- css: {
33065
- height: 'fit-content',
33066
- padding: 0
33067
- },
33068
- showBottomLine: false,
33069
- __self: undefined,
33070
- __source: {
33071
- fileName: _jsxFileName$4,
33072
- lineNumber: 283,
33073
- columnNumber: 13
33074
- }
33075
- }, child), /*#__PURE__*/React__default["default"].createElement(Box, {
33076
- __self: undefined,
33077
- __source: {
33078
- fileName: _jsxFileName$4,
33079
- lineNumber: 292,
33080
- columnNumber: 13
33081
- }
33082
- }, 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)));
33083
- },
33055
+ wrapper: child => /*#__PURE__*/React__default["default"].createElement(Box, {
33056
+ css: {
33057
+ opacity: isHide ? 0 : undefined,
33058
+ maxWidth: 311
33059
+ },
33060
+ __self: undefined,
33061
+ __source: {
33062
+ fileName: _jsxFileName$4,
33063
+ lineNumber: 281,
33064
+ columnNumber: 9
33065
+ }
33066
+ }, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
33067
+ css: {
33068
+ position: !isMobile && 'sticky',
33069
+ top: !isMobile ? 44 : 40
33070
+ },
33071
+ direction: "column",
33072
+ gap: 7,
33073
+ __self: undefined,
33074
+ __source: {
33075
+ fileName: _jsxFileName$4,
33076
+ lineNumber: 282,
33077
+ columnNumber: 11
33078
+ }
33079
+ }, /*#__PURE__*/React__default["default"].createElement(Card, {
33080
+ css: {
33081
+ height: 'fit-content',
33082
+ padding: 0
33083
+ },
33084
+ showBottomLine: false,
33085
+ __self: undefined,
33086
+ __source: {
33087
+ fileName: _jsxFileName$4,
33088
+ lineNumber: 283,
33089
+ columnNumber: 13
33090
+ }
33091
+ }, child), /*#__PURE__*/React__default["default"].createElement(Box, {
33092
+ __self: undefined,
33093
+ __source: {
33094
+ fileName: _jsxFileName$4,
33095
+ lineNumber: 292,
33096
+ columnNumber: 13
33097
+ }
33098
+ }, typeof (props == null ? void 0 : props.appendContent) === 'function' ? props == null || props.appendContent == null ? void 0 : props.appendContent() : props == null ? void 0 : props.appendContent))),
33084
33099
  __self: undefined,
33085
33100
  __source: {
33086
33101
  fileName: _jsxFileName$4,
@@ -33145,8 +33160,7 @@
33145
33160
  }));
33146
33161
  }, [props.hide]);
33147
33162
  React.useEffect(() => {
33148
- var _props$onChangeVisibi;
33149
- props === null || props === void 0 || (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 || _props$onChangeVisibi.call(props, state.hide);
33163
+ props == null || props.onChangeVisibility == null || props.onChangeVisibility(state.hide);
33150
33164
  }, [state.hide]);
33151
33165
  const toogleVisibility = value => {
33152
33166
  updateState(prev => Object.assign({}, prev, {
@@ -33155,11 +33169,11 @@
33155
33169
  };
33156
33170
  const getIsComplete = currentStep => {
33157
33171
  var _state$isComplete;
33158
- return state === null || state === void 0 || (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
33172
+ return state == null || (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
33159
33173
  };
33160
33174
  const getTitleStep = currentStep => {
33161
33175
  var _props$navContents;
33162
- 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;
33176
+ return props == null || (_props$navContents = props.navContents) == null || (_props$navContents = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents.title;
33163
33177
  };
33164
33178
  const setState = value => {
33165
33179
  updateState(Object.assign({}, state, value));
@@ -33193,13 +33207,13 @@
33193
33207
  block: 'start'
33194
33208
  });
33195
33209
  props.onStepChange && props.onStepChange(e);
33196
- 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) {
33197
- if ((e === null || e === void 0 ? void 0 : e.activeStep) > (e === null || e === void 0 ? void 0 : e.previousStep)) {
33210
+ if (props != null && (_props$navContents2 = props.navContents) != null && (_props$navContents2 = _props$navContents2[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents2.disabled) {
33211
+ if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
33198
33212
  var _state$SW;
33199
- state === null || state === void 0 || (_state$SW = state.SW) === null || _state$SW === void 0 || _state$SW.nextStep();
33213
+ state == null || (_state$SW = state.SW) == null || _state$SW.nextStep();
33200
33214
  } else {
33201
33215
  var _state$SW2;
33202
- state === null || state === void 0 || (_state$SW2 = state.SW) === null || _state$SW2 === void 0 || _state$SW2.previousStep();
33216
+ state == null || (_state$SW2 = state.SW) == null || _state$SW2.previousStep();
33203
33217
  }
33204
33218
  }
33205
33219
  };
@@ -33214,11 +33228,11 @@
33214
33228
  }, /*#__PURE__*/React__default["default"].createElement(StepWizardContext.Provider, {
33215
33229
  value: {
33216
33230
  toogleVisibility,
33217
- isHide: state === null || state === void 0 ? void 0 : state.hide,
33231
+ isHide: state == null ? void 0 : state.hide,
33218
33232
  setComplete,
33219
33233
  setState,
33220
33234
  state,
33221
- SW: state === null || state === void 0 ? void 0 : state.SW,
33235
+ SW: state == null ? void 0 : state.SW,
33222
33236
  forbidClickNav: props.forbidClickNav,
33223
33237
  titles: props.titles,
33224
33238
  isMobile: props.isMobile,
@@ -33241,7 +33255,7 @@
33241
33255
  nav: /*#__PURE__*/React__default["default"].createElement(Navigation, {
33242
33256
  onNavClicked: props.onNavClicked,
33243
33257
  isComplete: state.isComplete,
33244
- appendContent: props === null || props === void 0 ? void 0 : props.appendContent,
33258
+ appendContent: props == null ? void 0 : props.appendContent,
33245
33259
  __self: undefined,
33246
33260
  __source: {
33247
33261
  fileName: _jsxFileName$4,
@@ -33251,7 +33265,7 @@
33251
33265
  }),
33252
33266
  initialStep: props.initialStep,
33253
33267
  onStepChange: handleStepChange,
33254
- isLazyMount: props === null || props === void 0 ? void 0 : props.isLazyMount,
33268
+ isLazyMount: props == null ? void 0 : props.isLazyMount,
33255
33269
  __self: undefined,
33256
33270
  __source: {
33257
33271
  fileName: _jsxFileName$4,
@@ -33398,9 +33412,9 @@
33398
33412
  var _getDatasets;
33399
33413
  function getDatasets(content, activeId, isCollapse) {
33400
33414
  const datasets = [];
33401
- for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
33415
+ for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
33402
33416
  var _content$i;
33403
- if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
33417
+ if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
33404
33418
  datasets.unshift(content[i]);
33405
33419
  } else {
33406
33420
  datasets.push(content[i]);
@@ -33438,7 +33452,7 @@
33438
33452
  lineNumber: 107,
33439
33453
  columnNumber: 7
33440
33454
  }
33441
- }, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
33455
+ }, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
33442
33456
  return /*#__PURE__*/React__default["default"].createElement(List, {
33443
33457
  key: index,
33444
33458
  __self: this,
@@ -33455,11 +33469,11 @@
33455
33469
  marginLeft: '-4px !important',
33456
33470
  borderLeftWidth: '4px !important',
33457
33471
  borderLeftStyle: 'solid !important',
33458
- borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
33472
+ borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
33459
33473
  paddingLeft: '16px !important',
33460
33474
  minHeight: 25
33461
33475
  },
33462
- "data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
33476
+ "data-to-scrollspy-id": item == null ? void 0 : item.id,
33463
33477
  __self: this,
33464
33478
  __source: {
33465
33479
  fileName: _jsxFileName$2,
@@ -33468,13 +33482,13 @@
33468
33482
  }
33469
33483
  }, /*#__PURE__*/React__default["default"].createElement(Title$1, {
33470
33484
  className: "link-title",
33471
- active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
33472
- href: `#${item === null || item === void 0 ? void 0 : item.id}`,
33485
+ active: (item == null ? void 0 : item.id) === activeId,
33486
+ href: `#${item == null ? void 0 : item.id}`,
33473
33487
  onClick: e => {
33474
33488
  var _e$currentTarget, _e$currentTarget2;
33475
33489
  e.preventDefault();
33476
- 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]);
33477
- 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]);
33490
+ 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]);
33491
+ 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]);
33478
33492
  if (target) {
33479
33493
  var headerOffset = 20;
33480
33494
  var elementPosition = target.getBoundingClientRect().top;
@@ -33498,7 +33512,7 @@
33498
33512
  lineNumber: 125,
33499
33513
  columnNumber: 17
33500
33514
  }
33501
- }, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
33515
+ }, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
33502
33516
  })));
33503
33517
  }
33504
33518
  function TableOfContent({