@majoo-ui/react 1.55.6 → 1.55.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -3588,7 +3588,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
3588
3588
  onClick: e => {
3589
3589
  e.preventDefault();
3590
3590
  e.stopPropagation();
3591
- value === null || value === void 0 ? void 0 : value.onRemove();
3591
+ value == null ? void 0 : value.onRemove();
3592
3592
  },
3593
3593
  __self: undefined,
3594
3594
  __source: {
@@ -3665,7 +3665,7 @@ const SingleTagBanner = props => {
3665
3665
  onClick: e => {
3666
3666
  e.preventDefault();
3667
3667
  e.stopPropagation();
3668
- props === null || props === void 0 ? void 0 : props.onRemove();
3668
+ props == null ? void 0 : props.onRemove();
3669
3669
  },
3670
3670
  closeCenter: !props.title && !props.link,
3671
3671
  __self: undefined,
@@ -5828,7 +5828,7 @@ const Checkbox = _ref => {
5828
5828
  const [isChecked, setChecked] = useState(false);
5829
5829
  useEffect(() => {
5830
5830
  const checkValue = context && context.checkedItems.includes(value) || checked || indeterminate;
5831
- setChecked(checkValue !== null && checkValue !== void 0 ? checkValue : false);
5831
+ setChecked(checkValue != null ? checkValue : false);
5832
5832
  }, [checked, indeterminate, context]);
5833
5833
  return /*#__PURE__*/React__default.createElement(StyledCheckbox, _extends({
5834
5834
  id: id,
@@ -6475,7 +6475,7 @@ const InputTextArea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
6475
6475
  useEffect(() => {
6476
6476
  if (textareaRef.current) {
6477
6477
  textareaRef.current.style.height = '50px';
6478
- const scrollHeight = textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current.scrollHeight;
6478
+ const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
6479
6479
  textareaRef.current.style.height = scrollHeight + 5 + 'px';
6480
6480
  }
6481
6481
  }, []);
@@ -6523,7 +6523,7 @@ const InputRadioContext = /*#__PURE__*/React__default.createContext();
6523
6523
  var _jsxFileName$G = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputRadio\\InputRadioGroup.js";
6524
6524
  const RadioGroup = styled(RadioGroupPrimitive.Root, Flex$1);
6525
6525
  function InputRadioGroup(props) {
6526
- return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
6526
+ return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
6527
6527
  value: props,
6528
6528
  __self: this,
6529
6529
  __source: {
@@ -6538,7 +6538,7 @@ function InputRadioGroup(props) {
6538
6538
  lineNumber: 14,
6539
6539
  columnNumber: 9
6540
6540
  }
6541
- }), React__default.Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
6541
+ }), React__default.Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
6542
6542
  style: Object.assign({}, child.props.style, {
6543
6543
  opacity: 1
6544
6544
  })
@@ -6765,7 +6765,7 @@ const InputRadio = _ref => {
6765
6765
  value,
6766
6766
  outlined
6767
6767
  }) => {
6768
- const checked = value !== null && value !== void 0 ? value : defaultValue;
6768
+ const checked = value != null ? value : defaultValue;
6769
6769
  return /*#__PURE__*/React__default.createElement(Container$a, {
6770
6770
  direction: "column",
6771
6771
  outlined: outlined,
@@ -7056,7 +7056,7 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
7056
7056
  size: size,
7057
7057
  isInvalid: isInvalid,
7058
7058
  readOnly: readOnly,
7059
- isReadOnly: readOnly && !(props !== null && props !== void 0 && props.inputGroup) && !(props !== null && props !== void 0 && props.asChild),
7059
+ isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
7060
7060
  disabled: disabled
7061
7061
  }, props, {
7062
7062
  __self: undefined,
@@ -7872,18 +7872,18 @@ function TagsInput(_ref) {
7872
7872
  const addTags = event => {
7873
7873
  if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
7874
7874
  if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
7875
- onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7875
+ onEnter == null ? void 0 : onEnter({
7876
7876
  key: 'duplicate',
7877
7877
  value: event.target.value
7878
7878
  });
7879
7879
  return;
7880
7880
  }
7881
7881
 
7882
- if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
7882
+ if (pattern && pattern != null && pattern.regex) {
7883
7883
  const regex = new RegExp(pattern.regex);
7884
7884
 
7885
7885
  if (!regex.test(event.target.value)) {
7886
- onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7886
+ onEnter == null ? void 0 : onEnter({
7887
7887
  key: 'error',
7888
7888
  value: event.target.value
7889
7889
  });
@@ -7893,7 +7893,7 @@ function TagsInput(_ref) {
7893
7893
  }
7894
7894
 
7895
7895
  setRegexError(false);
7896
- onEnter === null || onEnter === void 0 ? void 0 : onEnter({
7896
+ onEnter == null ? void 0 : onEnter({
7897
7897
  key: 'success',
7898
7898
  value: event.target.value
7899
7899
  });
@@ -7906,7 +7906,7 @@ function TagsInput(_ref) {
7906
7906
  if (disabled || readOnly) {
7907
7907
  return tags;
7908
7908
  } else if (key === 'removeTag' || key === 'Backspace') {
7909
- onRemoveItem === null || onRemoveItem === void 0 ? void 0 : onRemoveItem(tags[index]);
7909
+ onRemoveItem == null ? void 0 : onRemoveItem(tags[index]);
7910
7910
  setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
7911
7911
  }
7912
7912
  }; // const handleErrorMessage = () => {
@@ -7954,7 +7954,7 @@ function TagsInput(_ref) {
7954
7954
  lineNumber: 180,
7955
7955
  columnNumber: 9
7956
7956
  }
7957
- })), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
7957
+ })), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
7958
7958
  color: "red",
7959
7959
  __self: this,
7960
7960
  __source: {
@@ -8262,7 +8262,7 @@ const InputSearchbox = _ref => {
8262
8262
  props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
8263
8263
 
8264
8264
  const [value, setValue] = React__default.useState('');
8265
- const inputValue = (_props$value = props === null || props === void 0 ? void 0 : props.value) !== null && _props$value !== void 0 ? _props$value : value;
8265
+ const inputValue = (_props$value = props == null ? void 0 : props.value) != null ? _props$value : value;
8266
8266
  const handleChange = React__default.useCallback(e => {
8267
8267
  setValue(e.target.value);
8268
8268
 
@@ -9808,10 +9808,10 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9808
9808
  return setItems(sortValue);
9809
9809
  }
9810
9810
  } else {
9811
- let filterItems = option === null || option === void 0 ? void 0 : option.filter(item => {
9812
- var _item$name, _item$name$toLowerCas, _item$name$toLowerCas2, _input$toLocaleLowerC;
9811
+ let filterItems = option == null ? void 0 : option.filter(item => {
9812
+ var _item$name, _item$name$toLowerCas;
9813
9813
 
9814
- 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));
9814
+ 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());
9815
9815
  });
9816
9816
  setItems(filterItems);
9817
9817
  }
@@ -9821,9 +9821,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9821
9821
  if (disabled || readOnly) {
9822
9822
  return selectedValue;
9823
9823
  } else {
9824
- if ((selected === null || selected === void 0 ? void 0 : selected.id) === 'counter') {
9824
+ if ((selected == null ? void 0 : selected.id) === 'counter') {
9825
9825
  setSelectedValue([]);
9826
- onChange === null || onChange === void 0 ? void 0 : onChange([]);
9826
+ onChange == null ? void 0 : onChange([]);
9827
9827
 
9828
9828
  for (let i = 0; i < selectedValue.length; i++) {
9829
9829
  removeSelectedItem(selectedValue[i]);
@@ -9834,7 +9834,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9834
9834
  setSelectedValue(filterItems);
9835
9835
 
9836
9836
  if (selected.id !== '!all') {
9837
- onChange === null || onChange === void 0 ? void 0 : onChange(filterItems);
9837
+ onChange == null ? void 0 : onChange(filterItems);
9838
9838
  }
9839
9839
  }
9840
9840
  }
@@ -9879,7 +9879,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9879
9879
  removeSelectedItem(item);
9880
9880
  });
9881
9881
  setSelectedValue([]);
9882
- onChange === null || onChange === void 0 ? void 0 : onChange([]);
9882
+ onChange == null ? void 0 : onChange([]);
9883
9883
  } else {
9884
9884
  removeItem(selectedItem);
9885
9885
  }
@@ -9894,12 +9894,12 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
9894
9894
  itemIds.push(item.id);
9895
9895
  });
9896
9896
  setSelectedValue(itemIds);
9897
- onChange === null || onChange === void 0 ? void 0 : onChange(itemIds.slice(1));
9897
+ onChange == null ? void 0 : onChange(itemIds.slice(1));
9898
9898
  } else {
9899
9899
  addSelectedItem(selectedItem);
9900
9900
  setSelectedValue([...selectedValue, selectedItem.id]);
9901
9901
  const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
9902
- onChange === null || onChange === void 0 ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
9902
+ onChange == null ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
9903
9903
  }
9904
9904
 
9905
9905
  selectItem(null);
@@ -10054,13 +10054,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10054
10054
  lineNumber: 564,
10055
10055
  columnNumber: 13
10056
10056
  }
10057
- }, 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) => {
10057
+ }, 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) => {
10058
10058
  if (showAllTags || !collapsible) {
10059
10059
  return true;
10060
10060
  } else {
10061
10061
  return idx < 5;
10062
10062
  }
10063
- })) === null || _selectedItems$filter2 === void 0 ? void 0 : _selectedItems$filter2.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
10063
+ })) == null ? void 0 : _selectedItems$filter2.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
10064
10064
  disabled: disabled,
10065
10065
  isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
10066
10066
  size: "lg",
@@ -10084,7 +10084,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10084
10084
  lineNumber: 575,
10085
10085
  columnNumber: 19
10086
10086
  }
10087
- }), selectedItem.name))), collapsible && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > 5 && /*#__PURE__*/React__default.createElement(Flex$1, {
10087
+ }), selectedItem.name))), collapsible && (selectedItems == null ? void 0 : selectedItems.length) > 5 && /*#__PURE__*/React__default.createElement(Flex$1, {
10088
10088
  align: "center",
10089
10089
  justify: "center",
10090
10090
  onClick: toggleCollapsible,
@@ -10150,7 +10150,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10150
10150
  lineNumber: 612,
10151
10151
  columnNumber: 17
10152
10152
  }
10153
- }))), showSelectedTag && showCounter && Boolean(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) && /*#__PURE__*/React__default.createElement(TagWrapper$1, {
10153
+ }))), showSelectedTag && showCounter && Boolean(selectedItems == null ? void 0 : selectedItems.length) && /*#__PURE__*/React__default.createElement(TagWrapper$1, {
10154
10154
  disabled: disabled,
10155
10155
  __self: undefined,
10156
10156
  __source: {
@@ -10163,7 +10163,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10163
10163
  maxWidth: '150px !important'
10164
10164
  },
10165
10165
  disabled: disabled,
10166
- isRemovable: readOnly || disabled || Boolean(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length),
10166
+ isRemovable: readOnly || disabled || Boolean(selectedItems == null ? void 0 : selectedItems.length),
10167
10167
  size: "lg",
10168
10168
  readOnly: readOnly // {...getSelectedItemProps({ selectedItem, index })}
10169
10169
  ,
@@ -10185,7 +10185,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10185
10185
  lineNumber: 619,
10186
10186
  columnNumber: 13
10187
10187
  }
10188
- }, `${selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length} ${labelCounter}`)), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
10188
+ }, `${selectedItems == null ? void 0 : selectedItems.length} ${labelCounter}`)), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
10189
10189
  placement: placement,
10190
10190
  css: {
10191
10191
  display: isOpen && disabled === false ? 'block' : 'none',
@@ -10253,7 +10253,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
10253
10253
  lineNumber: 673,
10254
10254
  columnNumber: 27
10255
10255
  }
10256
- }), showSelectAll && (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) < (items === null || items === void 0 ? void 0 : items.length) ? /*#__PURE__*/React__default.createElement(IndeterminateFilled, {
10256
+ }), showSelectAll && (item == null ? void 0 : item.id) === '!all' && selectedValue != null && selectedValue.length && (selectedValue == null ? void 0 : selectedValue.length) < (items == null ? void 0 : items.length) ? /*#__PURE__*/React__default.createElement(IndeterminateFilled, {
10257
10257
  __self: undefined,
10258
10258
  __source: {
10259
10259
  fileName: _jsxFileName$w,
@@ -10940,7 +10940,7 @@ function InputResourceList({
10940
10940
  },
10941
10941
  ref: scrollerRef
10942
10942
  }, {
10943
- children: [data.length <= 0 && (value || checkedResources).length <= 0 && !isLoading || defaultSort && data.length < 1 && jsx(Flex$1, Object.assign({
10943
+ children: [data.length <= 0 && (value || checkedResources).length <= 0 && !isLoading || defaultSort && data.length < 1 ? jsx(Flex$1, Object.assign({
10944
10944
  justify: "center",
10945
10945
  align: "center",
10946
10946
  css: {
@@ -10956,7 +10956,7 @@ function InputResourceList({
10956
10956
  ns: 'translation'
10957
10957
  })
10958
10958
  }), void 0)
10959
- }), void 0), jsx(ConditionalWrapper, Object.assign({
10959
+ }), void 0) : null, jsx(ConditionalWrapper, Object.assign({
10960
10960
  condition: !!fetchData && data.length > 0,
10961
10961
  wrapper: children => jsx(InfiniteScroll, Object.assign({
10962
10962
  loadMore: _ => {
@@ -11517,8 +11517,8 @@ const PopoverContent = ({
11517
11517
  ref: floating,
11518
11518
  style: Object.assign({
11519
11519
  position: strategy,
11520
- top: isMobile ? 0 : y !== null && y !== void 0 ? y : '',
11521
- left: isMobile ? 0 : x !== null && x !== void 0 ? x : '',
11520
+ top: isMobile ? 0 : y != null ? y : '',
11521
+ left: isMobile ? 0 : x != null ? x : '',
11522
11522
  zIndex: zIndices.popover
11523
11523
  }, style)
11524
11524
  }), {
@@ -12921,7 +12921,7 @@ const NotificationBadge = _ref => {
12921
12921
  };
12922
12922
 
12923
12923
  const getValue = () => {
12924
- let value = props === null || props === void 0 ? void 0 : props.value;
12924
+ let value = props == null ? void 0 : props.value;
12925
12925
  const isTrailing = variantIcon === 'trailing';
12926
12926
 
12927
12927
  if (typeof value === 'number' || parseInt(value)) {
@@ -18227,7 +18227,7 @@ function PaginationInfo(_ref) {
18227
18227
  lineNumber: 42,
18228
18228
  columnNumber: 11
18229
18229
  }
18230
- }, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
18230
+ }, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
18231
18231
  key: limit,
18232
18232
  css: limitItemContainerStyle(selectedLimit === limit),
18233
18233
  onClick: () => onChange(limit),
@@ -18261,7 +18261,7 @@ function PaginationInfo(_ref) {
18261
18261
  })));
18262
18262
  }
18263
18263
 
18264
- const _excluded$2 = ["limit", "currentPage", "totalData", "totalPage", "hideDataInfo", "onLimitChange", "onPageChange", "rowsPerPageOptions"];
18264
+ const _excluded$2 = ["limit", "currentPage", "totalData", "totalPage", "hideDataInfo", "onLimitChange", "onPageChange", "rowsPerPageOptions", "hidePagination"];
18265
18265
  var _jsxFileName$h = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\pagination\\Pagination.js";
18266
18266
 
18267
18267
  function Pagination(_ref) {
@@ -18273,7 +18273,8 @@ function Pagination(_ref) {
18273
18273
  hideDataInfo,
18274
18274
  onLimitChange,
18275
18275
  onPageChange,
18276
- rowsPerPageOptions
18276
+ rowsPerPageOptions,
18277
+ hidePagination
18277
18278
  } = _ref,
18278
18279
  props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
18279
18280
 
@@ -18288,7 +18289,7 @@ function Pagination(_ref) {
18288
18289
  __self: this,
18289
18290
  __source: {
18290
18291
  fileName: _jsxFileName$h,
18291
- lineNumber: 22,
18292
+ lineNumber: 23,
18292
18293
  columnNumber: 5
18293
18294
  }
18294
18295
  }), !hideDataInfo ? /*#__PURE__*/React__default.createElement(PaginationInfo, {
@@ -18300,25 +18301,25 @@ function Pagination(_ref) {
18300
18301
  __self: this,
18301
18302
  __source: {
18302
18303
  fileName: _jsxFileName$h,
18303
- lineNumber: 24,
18304
+ lineNumber: 25,
18304
18305
  columnNumber: 9
18305
18306
  }
18306
18307
  }) : /*#__PURE__*/React__default.createElement(Box, {
18307
18308
  __self: this,
18308
18309
  __source: {
18309
18310
  fileName: _jsxFileName$h,
18310
- lineNumber: 32,
18311
+ lineNumber: 33,
18311
18312
  columnNumber: 9
18312
18313
  }
18313
- }), /*#__PURE__*/React__default.createElement(PaginationButton, {
18314
+ }), !hidePagination && /*#__PURE__*/React__default.createElement(PaginationButton, {
18314
18315
  currentPage: currentPage,
18315
18316
  totalPages: totalPages,
18316
18317
  onSelect: onPageChange,
18317
18318
  __self: this,
18318
18319
  __source: {
18319
18320
  fileName: _jsxFileName$h,
18320
- lineNumber: 35,
18321
- columnNumber: 7
18321
+ lineNumber: 37,
18322
+ columnNumber: 9
18322
18323
  }
18323
18324
  }));
18324
18325
  }
@@ -19065,7 +19066,8 @@ function Table({
19065
19066
  customRowsStyle,
19066
19067
  isMobileLayout,
19067
19068
  showDuplicatedData,
19068
- onRowClick
19069
+ onRowClick,
19070
+ hidePagination = false
19069
19071
  }) {
19070
19072
  const [limit, setLimit] = useState(rowLimit);
19071
19073
  const [dataRow, setDataRow] = useState({});
@@ -19142,6 +19144,7 @@ function Table({
19142
19144
  };
19143
19145
 
19144
19146
  const renderFooter = () => jsx(Pagination, {
19147
+ hidePagination: hidePagination,
19145
19148
  limit: pageSize,
19146
19149
  currentPage: pageIndex + 1,
19147
19150
  totalData: totalData,
@@ -20299,7 +20302,7 @@ const rowMenuColumn = (options, icon, config) => ({
20299
20302
  var _document$getElements;
20300
20303
 
20301
20304
  setOpenDrop(true);
20302
- const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) === null || _document$getElements === void 0 ? void 0 : _document$getElements[0];
20305
+ const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
20303
20306
  contextMenu.style.opacity = 0;
20304
20307
  },
20305
20308
  __self: undefined,
@@ -20997,7 +21000,7 @@ const TemplateAlertFunction = props => {
20997
21000
  if (!props.onOpenAutoFocus) {
20998
21001
  e.preventDefault();
20999
21002
  } else {
21000
- props === null || props === void 0 ? void 0 : props.onOpenAutoFocus();
21003
+ props == null ? void 0 : props.onOpenAutoFocus();
21001
21004
  }
21002
21005
  },
21003
21006
  __self: undefined,
@@ -21118,8 +21121,8 @@ const TemplateAlertFunction = props => {
21118
21121
  size: props.btnSize,
21119
21122
  onClick: buttonConfirm,
21120
21123
  buttonType: props.dialogType,
21121
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
21122
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
21124
+ disabled: props == null ? void 0 : props.disabledButton
21125
+ }, props == null ? void 0 : props.actionButtonProps, {
21123
21126
  __self: undefined,
21124
21127
  __source: {
21125
21128
  fileName: _jsxFileName$b,
@@ -21138,12 +21141,12 @@ const TemplateAlertFunction = props => {
21138
21141
  size: props.btnSize,
21139
21142
  onClick: buttonCancel,
21140
21143
  css: {
21141
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
21144
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
21142
21145
  flex: props.isMobile && 1
21143
21146
  },
21144
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
21145
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
21146
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
21147
+ buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
21148
+ disabled: props == null ? void 0 : props.disabledButton
21149
+ }, props == null ? void 0 : props.cancelButtonProps, {
21147
21150
  __self: undefined,
21148
21151
  __source: {
21149
21152
  fileName: _jsxFileName$b,
@@ -21165,8 +21168,8 @@ const TemplateAlertFunction = props => {
21165
21168
  css: {
21166
21169
  flex: props.isMobile && 1
21167
21170
  },
21168
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
21169
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
21171
+ disabled: props == null ? void 0 : props.disabledButton
21172
+ }, props == null ? void 0 : props.actionButtonProps, {
21170
21173
  __self: undefined,
21171
21174
  __source: {
21172
21175
  fileName: _jsxFileName$b,
@@ -21329,8 +21332,8 @@ function AlertDialog(props) {
21329
21332
  css: {
21330
21333
  flex: props.isMobile && 1
21331
21334
  },
21332
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
21333
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
21335
+ disabled: props == null ? void 0 : props.disabledButton
21336
+ }, props == null ? void 0 : props.actionButtonProps, {
21334
21337
  __self: this,
21335
21338
  __source: {
21336
21339
  fileName: _jsxFileName$b,
@@ -21349,12 +21352,12 @@ function AlertDialog(props) {
21349
21352
  size: props.btnSize,
21350
21353
  onClick: props.onCancel,
21351
21354
  css: {
21352
- color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
21355
+ color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
21353
21356
  flex: props.isMobile && 1
21354
21357
  },
21355
- buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
21356
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
21357
- }, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
21358
+ buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
21359
+ disabled: props == null ? void 0 : props.disabledButton
21360
+ }, props == null ? void 0 : props.cancelButtonProps, {
21358
21361
  __self: this,
21359
21362
  __source: {
21360
21363
  fileName: _jsxFileName$b,
@@ -21376,8 +21379,8 @@ function AlertDialog(props) {
21376
21379
  css: {
21377
21380
  flex: props.isMobile && 1
21378
21381
  },
21379
- disabled: props === null || props === void 0 ? void 0 : props.disabledButton
21380
- }, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
21382
+ disabled: props == null ? void 0 : props.disabledButton
21383
+ }, props == null ? void 0 : props.actionButtonProps, {
21381
21384
  __self: this,
21382
21385
  __source: {
21383
21386
  fileName: _jsxFileName$b,
@@ -23480,13 +23483,13 @@ function canvasPreview(image, canvas, crop, scale = 1, rotate = 0, ratio) {
23480
23483
  });
23481
23484
  }
23482
23485
 
23483
- function toBlob(canvas) {
23486
+ function toBlob(canvas, type) {
23484
23487
  return new Promise(resolve => {
23485
- canvas.toBlob(resolve);
23488
+ canvas.toBlob(resolve, type);
23486
23489
  });
23487
23490
  }
23488
23491
 
23489
- function imgPreview(image, crop, scale = 1, rotate = 0, ratio) {
23492
+ function imgPreview(image, crop, scale = 1, rotate = 0, ratio, type) {
23490
23493
  return __awaiter(this, void 0, void 0, function* () {
23491
23494
  if (ratio === 1) {
23492
23495
  crop.width = crop.height;
@@ -23494,7 +23497,7 @@ function imgPreview(image, crop, scale = 1, rotate = 0, ratio) {
23494
23497
 
23495
23498
  const canvas = document.createElement('canvas');
23496
23499
  canvasPreview(image, canvas, crop, scale, rotate, ratio);
23497
- const blob = yield toBlob(canvas);
23500
+ const blob = yield toBlob(canvas, type);
23498
23501
  return blob;
23499
23502
  });
23500
23503
  }
@@ -23529,6 +23532,8 @@ function upload({
23529
23532
  onProgress === null || onProgress === void 0 ? void 0 : onProgress(e);
23530
23533
  progress === null || progress === void 0 ? void 0 : progress(Math.round(e.percent));
23531
23534
  }).end((err, res) => {
23535
+ var _a, _b;
23536
+
23532
23537
  if (err) {
23533
23538
  const error = new Error(err.message);
23534
23539
  onError === null || onError === void 0 ? void 0 : onError(error, (res === null || res === void 0 ? void 0 : res.text) && JSON.parse(res.text));
@@ -23538,7 +23543,9 @@ function upload({
23538
23543
  if (res && (res === null || res === void 0 ? void 0 : res.ok)) {
23539
23544
  const response = JSON.parse(res === null || res === void 0 ? void 0 : res.text);
23540
23545
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(response);
23541
- resolve(response[resKey]);
23546
+ resolve((_b = (_a = [response]) === null || _a === void 0 ? void 0 : _a.concat(resKey === null || resKey === void 0 ? void 0 : resKey.split('.'))) === null || _b === void 0 ? void 0 : _b.reduce(function (a, b) {
23547
+ return a[b];
23548
+ }));
23542
23549
  }
23543
23550
  });
23544
23551
  });
@@ -23866,7 +23873,7 @@ const Upload = ({
23866
23873
  upload({
23867
23874
  url: action,
23868
23875
  file: newFile,
23869
- customBody: customBodyRequest === null || customBodyRequest === void 0 ? void 0 : customBodyRequest(newFile),
23876
+ customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
23870
23877
  token,
23871
23878
  tokenKey,
23872
23879
  reqKey,
@@ -23889,12 +23896,12 @@ const Upload = ({
23889
23896
  }
23890
23897
  }
23891
23898
 
23892
- onChange === null || onChange === void 0 ? void 0 : (_onChange = onChange({
23899
+ onChange == null ? void 0 : (_onChange = onChange({
23893
23900
  fileList: arrProgress,
23894
23901
  file: fileProgress,
23895
23902
  indexReplace: indexReplace.current,
23896
23903
  isReplace: indexReplace.current !== null
23897
- })) === 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));
23904
+ })) == null ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) == null ? void 0 : _onChange$then.catch(error => setError(error.message));
23898
23905
  }
23899
23906
  }).then(result => {
23900
23907
  var _onChange2, _onChange2$then;
@@ -23911,12 +23918,12 @@ const Upload = ({
23911
23918
  }
23912
23919
  }
23913
23920
 
23914
- onChange === null || onChange === void 0 ? void 0 : (_onChange2 = onChange({
23921
+ onChange == null ? void 0 : (_onChange2 = onChange({
23915
23922
  fileList: arrSuccess,
23916
23923
  file: fileSuccess,
23917
23924
  indexReplace: indexReplace.current,
23918
23925
  isReplace: indexReplace.current !== null
23919
- })) === 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));
23926
+ })) == null ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) == null ? void 0 : _onChange2$then.catch(error => setError(error.message));
23920
23927
  }).catch(error => {
23921
23928
  var _onChange3, _onChange3$then;
23922
23929
 
@@ -23932,22 +23939,22 @@ const Upload = ({
23932
23939
  }
23933
23940
  }
23934
23941
 
23935
- onChange === null || onChange === void 0 ? void 0 : (_onChange3 = onChange({
23942
+ onChange == null ? void 0 : (_onChange3 = onChange({
23936
23943
  fileList: arrError,
23937
23944
  file: fileError,
23938
23945
  indexReplace: indexReplace.current,
23939
23946
  isReplace: indexReplace.current !== null
23940
- })) === 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));
23947
+ })) == null ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) == null ? void 0 : _onChange3$then.catch(error => setError(error.message));
23941
23948
  });
23942
23949
  } else {
23943
23950
  var _onChange4, _onChange4$then;
23944
23951
 
23945
- onChange === null || onChange === void 0 ? void 0 : (_onChange4 = onChange({
23952
+ onChange == null ? void 0 : (_onChange4 = onChange({
23946
23953
  fileList: arrFile,
23947
23954
  file: newFile,
23948
23955
  indexReplace: indexReplace.current,
23949
23956
  isReplace: indexReplace.current !== null
23950
- })) === 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));
23957
+ })) == null ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) == null ? void 0 : _onChange4$then.catch(error => setError(error.message));
23951
23958
  }
23952
23959
 
23953
23960
  if (indexReplace.current !== null) {
@@ -23972,24 +23979,24 @@ const Upload = ({
23972
23979
  // program to get the dimensions of an image
23973
23980
  const img = document.createElement('img');
23974
23981
  img.src = URL.createObjectURL(files[0]);
23975
- img.size = files === null || files === void 0 ? void 0 : (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size;
23976
- img.type = files === null || files === void 0 ? void 0 : (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.type;
23982
+ img.size = files == null ? void 0 : (_files$ = files[0]) == null ? void 0 : _files$.size;
23983
+ img.type = files == null ? void 0 : (_files$2 = files[0]) == null ? void 0 : _files$2.type;
23977
23984
 
23978
23985
  img.onload = () => {
23979
23986
  var _onBeforeCrop, _onBeforeCrop$then;
23980
23987
 
23981
- onBeforeCrop === null || onBeforeCrop === void 0 ? void 0 : (_onBeforeCrop = onBeforeCrop(img)) === null || _onBeforeCrop === void 0 ? void 0 : (_onBeforeCrop$then = _onBeforeCrop.then(() => {
23988
+ onBeforeCrop == null ? void 0 : (_onBeforeCrop = onBeforeCrop(img)) == null ? void 0 : (_onBeforeCrop$then = _onBeforeCrop.then(() => {
23982
23989
  setError(null);
23983
23990
  toggleModal();
23984
23991
  setFileState(files[0]);
23985
23992
  setPreviewImage(URL.createObjectURL(files[0]));
23986
- })) === null || _onBeforeCrop$then === void 0 ? void 0 : _onBeforeCrop$then.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
23993
+ })) == null ? void 0 : _onBeforeCrop$then.catch(error => setError(error == null ? void 0 : error.message));
23987
23994
  };
23988
23995
 
23989
23996
  img.onerror = error => {
23990
23997
  var _onBeforeCrop2, _onBeforeCrop2$then;
23991
23998
 
23992
- 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));
23999
+ 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));
23993
24000
  };
23994
24001
  } else {
23995
24002
  toggleModal();
@@ -24001,15 +24008,13 @@ const Upload = ({
24001
24008
  }
24002
24009
 
24003
24010
  function handleCrop() {
24004
- if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
24005
- imgPreview(imgRef.current, completedCrop, 1, 0, ratio).then(blob => {
24006
- const sizeMB = (blob === null || blob === void 0 ? void 0 : blob.size) / 1024 / 1024;
24011
+ if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
24012
+ imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState == null ? void 0 : fileState.type).then(blob => {
24013
+ const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
24007
24014
 
24008
24015
  if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
24009
- var _fileState$name;
24010
-
24011
- const file = new File([blob], (fileState === null || fileState === void 0 ? void 0 : (_fileState$name = fileState.name) === null || _fileState$name === void 0 ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
24012
- type: blob === null || blob === void 0 ? void 0 : blob.type
24016
+ const file = new File([blob], fileState == null ? void 0 : fileState.name, {
24017
+ type: blob == null ? void 0 : blob.type
24013
24018
  });
24014
24019
  handleUpload([file]);
24015
24020
  setCrop(null);
@@ -24022,19 +24027,19 @@ const Upload = ({
24022
24027
  useWebWorker: true,
24023
24028
  alwaysKeepResolution: true
24024
24029
  }).then(compressedFile => {
24025
- var _fileState$name2;
24030
+ var _fileState$name;
24026
24031
 
24027
- const file = new File([compressedFile], (fileState === null || fileState === void 0 ? void 0 : (_fileState$name2 = fileState.name) === null || _fileState$name2 === void 0 ? void 0 : _fileState$name2.replace(/\.[^/.]+$/, '')) + '.png', {
24028
- type: compressedFile === null || compressedFile === void 0 ? void 0 : compressedFile.type
24032
+ const file = new File([compressedFile], (fileState == null ? void 0 : (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
24033
+ type: compressedFile == null ? void 0 : compressedFile.type
24029
24034
  });
24030
24035
  handleUpload([file]);
24031
24036
  setCrop(null);
24032
24037
  setCompletedCrop(null);
24033
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
24038
+ }).catch(error => console.error(error == null ? void 0 : error.message));
24034
24039
  }
24035
24040
 
24036
24041
  toggleModal();
24037
- }).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
24042
+ }).catch(error => console.error(error == null ? void 0 : error.message));
24038
24043
  } else {
24039
24044
  handleUpload([fileState]);
24040
24045
  toggleModal();
@@ -24065,7 +24070,7 @@ const Upload = ({
24065
24070
  const index = fileList.indexOf(file);
24066
24071
  const newFileList = fileList.slice();
24067
24072
  newFileList.splice(index, 1);
24068
- onChange === null || onChange === void 0 ? void 0 : onChange({
24073
+ onChange == null ? void 0 : onChange({
24069
24074
  fileList: newFileList,
24070
24075
  file
24071
24076
  });
@@ -24093,22 +24098,22 @@ const Upload = ({
24093
24098
  function handleOpenFile(file) {
24094
24099
  var _String, _file$name;
24095
24100
 
24096
- 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();
24101
+ let extension = (_String = String(file == null ? void 0 : (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
24097
24102
 
24098
24103
  if (extension === 'pdf') {
24099
- window.open(file === null || file === void 0 ? void 0 : file.url);
24104
+ window.open(file == null ? void 0 : file.url);
24100
24105
  } else {
24101
- request.get(file === null || file === void 0 ? void 0 : file.url).end((err, res) => {
24106
+ request.get(file == null ? void 0 : file.url).end((err, res) => {
24102
24107
  if (err) {
24103
24108
  console.error(err.message);
24104
24109
  }
24105
24110
 
24106
- if (res && res !== null && res !== void 0 && res.ok) {
24107
- const response = res === null || res === void 0 ? void 0 : res.text;
24111
+ if (res && res != null && res.ok) {
24112
+ const response = res == null ? void 0 : res.text;
24108
24113
  const url = window.URL.createObjectURL(new Blob([response]));
24109
24114
  const link = document.createElement('a');
24110
24115
  link.href = url;
24111
- link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
24116
+ link.setAttribute('download', file == null ? void 0 : file.name);
24112
24117
  document.body.appendChild(link);
24113
24118
  link.click();
24114
24119
  document.body.removeChild(link);
@@ -24178,12 +24183,12 @@ const Upload = ({
24178
24183
  }
24179
24184
 
24180
24185
  const renderPicture = () => {
24181
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
24182
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
24186
+ return fileList == null ? void 0 : fileList.map((item, index) => {
24187
+ if ((item == null ? void 0 : item.status) === 'uploading') {
24183
24188
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
24184
24189
  key: index,
24185
- progress: item === null || item === void 0 ? void 0 : item.percent,
24186
- loading: item === null || item === void 0 ? void 0 : item.loading,
24190
+ progress: item == null ? void 0 : item.percent,
24191
+ loading: item == null ? void 0 : item.loading,
24187
24192
  __self: undefined,
24188
24193
  __source: {
24189
24194
  fileName: _jsxFileName$9,
@@ -24258,14 +24263,14 @@ const Upload = ({
24258
24263
  };
24259
24264
 
24260
24265
  const renderFile = () => {
24261
- return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
24266
+ return fileList == null ? void 0 : fileList.map((item, index) => {
24262
24267
  var _item$name;
24263
24268
 
24264
- if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
24269
+ if ((item == null ? void 0 : item.status) === 'uploading') {
24265
24270
  return /*#__PURE__*/React__default.createElement(UploadProgress, {
24266
24271
  key: index,
24267
- progress: item === null || item === void 0 ? void 0 : item.percent,
24268
- loading: item === null || item === void 0 ? void 0 : item.loading,
24272
+ progress: item == null ? void 0 : item.percent,
24273
+ loading: item == null ? void 0 : item.loading,
24269
24274
  __self: undefined,
24270
24275
  __source: {
24271
24276
  fileName: _jsxFileName$9,
@@ -24332,7 +24337,7 @@ const Upload = ({
24332
24337
  lineNumber: 665,
24333
24338
  columnNumber: 17
24334
24339
  }
24335
- }, ".", 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.createElement(Tooltip$1, {
24340
+ }, ".", item == null ? void 0 : (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
24336
24341
  label: item.name,
24337
24342
  __self: undefined,
24338
24343
  __source: {
@@ -24504,7 +24509,7 @@ const Upload = ({
24504
24509
  lineNumber: 742,
24505
24510
  columnNumber: 11
24506
24511
  }
24507
- }, children !== null && children !== void 0 ? children : /*#__PURE__*/React__default.createElement(React__default.Fragment, {
24512
+ }, children != null ? children : /*#__PURE__*/React__default.createElement(React__default.Fragment, {
24508
24513
  __self: this,
24509
24514
  __source: {
24510
24515
  fileName: _jsxFileName$9,
@@ -24538,7 +24543,7 @@ const Upload = ({
24538
24543
  lineNumber: 748,
24539
24544
  columnNumber: 17
24540
24545
  }
24541
- }, placeholder !== null && placeholder !== void 0 ? placeholder : t('uploadPlaceholder', 'Pilih atau letakkan berkas di sini'))))), error && /*#__PURE__*/React__default.createElement(ErrorMessage, {
24546
+ }, placeholder != null ? placeholder : t('uploadPlaceholder', 'Pilih atau letakkan berkas di sini'))))), error && /*#__PURE__*/React__default.createElement(ErrorMessage, {
24542
24547
  css: {
24543
24548
  width: width - 5
24544
24549
  },
@@ -24705,7 +24710,7 @@ const Upload = ({
24705
24710
 
24706
24711
  return /*#__PURE__*/React__default.createElement(Flex$1, {
24707
24712
  direction: "row",
24708
- gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
24713
+ gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
24709
24714
  wrap: "wrap",
24710
24715
  css: {
24711
24716
  userSelect: 'none'
@@ -25580,10 +25585,10 @@ function InputColorPicker(props) {
25580
25585
  const [isPopover, setIsPopover] = useState(false);
25581
25586
 
25582
25587
  function getColor() {
25583
- const color = props === null || props === void 0 ? void 0 : props.color;
25588
+ const color = props == null ? void 0 : props.color;
25584
25589
 
25585
25590
  if (typeof color === 'string') {
25586
- return color === null || color === void 0 ? void 0 : color.toUpperCase();
25591
+ return color == null ? void 0 : color.toUpperCase();
25587
25592
  }
25588
25593
 
25589
25594
  return `rgba(${color.r},${color.g},${color.b},${color.a})`;
@@ -28512,7 +28517,7 @@ const Navigation = props => {
28512
28517
 
28513
28518
  const isActive = props.currentStep === i;
28514
28519
  const isComplete = props.isComplete[i - 1];
28515
- const isAdditional = (_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.additional; // eslint-disable-next-line no-lone-blocks
28520
+ const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional; // eslint-disable-next-line no-lone-blocks
28516
28521
 
28517
28522
  {
28518
28523
  var _data$title, _data3, _data4, _data5, _data6, _data7, _data8, _data9, _data$title2, _data10, _data11, _data12, _data13, _data14;
@@ -28528,7 +28533,7 @@ const Navigation = props => {
28528
28533
  onClick: () => {
28529
28534
  var _data2;
28530
28535
 
28531
- if (props.onNavClicked && !((_data2 = data[i - 1]) !== null && _data2 !== void 0 && _data2.disabled) || isAdditional) props.onNavClicked(i);
28536
+ if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
28532
28537
 
28533
28538
  if (!forbidClickNav && isComplete && !isHide || isAdditional) {
28534
28539
  props.goToStep(i);
@@ -28562,9 +28567,9 @@ const Navigation = props => {
28562
28567
  lineNumber: 130,
28563
28568
  columnNumber: 17
28564
28569
  }
28565
- }), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title) === null || _data$title === void 0 ? void 0 : _data$title.call(_data3), ((_data4 = data[i - 1]) === null || _data4 === void 0 ? void 0 : _data4.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
28570
+ }), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title) == null ? void 0 : _data$title.call(_data3), ((_data4 = data[i - 1]) == null ? void 0 : _data4.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
28566
28571
  align: "center",
28567
- label: (_data5 = data[i - 1]) === null || _data5 === void 0 ? void 0 : _data5.tooltipsContents,
28572
+ label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
28568
28573
  __self: undefined,
28569
28574
  __source: {
28570
28575
  fileName: _jsxFileName$4,
@@ -28583,9 +28588,9 @@ const Navigation = props => {
28583
28588
  lineNumber: 135,
28584
28589
  columnNumber: 19
28585
28590
  }
28586
- })), ((_data6 = data[i - 1]) === null || _data6 === void 0 ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
28591
+ })), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
28587
28592
  css: {
28588
- marginLeft: (_data7 = data[i - 1]) !== null && _data7 !== void 0 && _data7.withTolltip ? 0 : '$spacing-03'
28593
+ marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
28589
28594
  },
28590
28595
  align: "center",
28591
28596
  __self: undefined,
@@ -28613,7 +28618,7 @@ const Navigation = props => {
28613
28618
  userSelect: 'none',
28614
28619
  fontSize: '12px',
28615
28620
  textAlign: '-webkit-center',
28616
- display: ((_data8 = data[i - 1]) === null || _data8 === void 0 ? void 0 : _data8.disabled) && 'none'
28621
+ display: ((_data8 = data[i - 1]) == null ? void 0 : _data8.disabled) && 'none'
28617
28622
  },
28618
28623
  onClick: () => {
28619
28624
  if (props.onNavClicked) props.onNavClicked(i);
@@ -28645,7 +28650,7 @@ const Navigation = props => {
28645
28650
  height: 24,
28646
28651
  borderRadius: '$round',
28647
28652
  border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
28648
- backgroundColor: (_data9 = data[i - 1]) !== null && _data9 !== void 0 && _data9.disabled ? '$gray200' : '$white'
28653
+ backgroundColor: (_data9 = data[i - 1]) != null && _data9.disabled ? '$gray200' : '$white'
28649
28654
  },
28650
28655
  __self: undefined,
28651
28656
  __source: {
@@ -28663,10 +28668,10 @@ const Navigation = props => {
28663
28668
  lineNumber: 181,
28664
28669
  columnNumber: 15
28665
28670
  }
28666
- }, isActive ? typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data10 = data[i - 1]).title) === null || _data$title2 === void 0 ? void 0 : _data$title2.call(_data10) : ''), isActive && ((_data11 = data[i - 1]) === null || _data11 === void 0 ? void 0 : _data11.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
28671
+ }, isActive ? typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data10 = data[i - 1]).title) == null ? void 0 : _data$title2.call(_data10) : ''), isActive && ((_data11 = data[i - 1]) == null ? void 0 : _data11.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
28667
28672
  align: "center",
28668
28673
  withClick: true,
28669
- label: (_data12 = data[i - 1]) === null || _data12 === void 0 ? void 0 : _data12.tooltipsContents,
28674
+ label: (_data12 = data[i - 1]) == null ? void 0 : _data12.tooltipsContents,
28670
28675
  __self: undefined,
28671
28676
  __source: {
28672
28677
  fileName: _jsxFileName$4,
@@ -28682,11 +28687,11 @@ const Navigation = props => {
28682
28687
  lineNumber: 186,
28683
28688
  columnNumber: 19
28684
28689
  }
28685
- })), isActive && ((_data13 = data[i - 1]) === null || _data13 === void 0 ? void 0 : _data13.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
28690
+ })), isActive && ((_data13 = data[i - 1]) == null ? void 0 : _data13.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
28686
28691
  align: "center",
28687
28692
  justify: "center",
28688
28693
  css: {
28689
- marginTop: (_data14 = data[i - 1]) !== null && _data14 !== void 0 && _data14.withTolltip ? 0 : '$spacing-03'
28694
+ marginTop: (_data14 = data[i - 1]) != null && _data14.withTolltip ? 0 : '$spacing-03'
28690
28695
  },
28691
28696
  __self: undefined,
28692
28697
  __source: {
@@ -28709,54 +28714,50 @@ const Navigation = props => {
28709
28714
 
28710
28715
  return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
28711
28716
  condition: !isMobile,
28712
- wrapper: child => {
28713
- var _props$appendContent;
28714
-
28715
- return /*#__PURE__*/React__default.createElement(Box, {
28716
- css: {
28717
- opacity: isHide ? 0 : undefined,
28718
- maxWidth: 311
28719
- },
28720
- __self: undefined,
28721
- __source: {
28722
- fileName: _jsxFileName$4,
28723
- lineNumber: 204,
28724
- columnNumber: 9
28725
- }
28726
- }, /*#__PURE__*/React__default.createElement(Flex$1, {
28727
- css: {
28728
- position: !isMobile && 'sticky',
28729
- top: !isMobile ? 44 : 40
28730
- },
28731
- direction: "column",
28732
- gap: 7,
28733
- __self: undefined,
28734
- __source: {
28735
- fileName: _jsxFileName$4,
28736
- lineNumber: 205,
28737
- columnNumber: 11
28738
- }
28739
- }, /*#__PURE__*/React__default.createElement(Card, {
28740
- css: {
28741
- height: 'fit-content',
28742
- padding: 0
28743
- },
28744
- showBottomLine: false,
28745
- __self: undefined,
28746
- __source: {
28747
- fileName: _jsxFileName$4,
28748
- lineNumber: 206,
28749
- columnNumber: 13
28750
- }
28751
- }, child), /*#__PURE__*/React__default.createElement(Box, {
28752
- __self: undefined,
28753
- __source: {
28754
- fileName: _jsxFileName$4,
28755
- lineNumber: 215,
28756
- columnNumber: 13
28757
- }
28758
- }, 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)));
28759
- },
28717
+ wrapper: child => /*#__PURE__*/React__default.createElement(Box, {
28718
+ css: {
28719
+ opacity: isHide ? 0 : undefined,
28720
+ maxWidth: 311
28721
+ },
28722
+ __self: undefined,
28723
+ __source: {
28724
+ fileName: _jsxFileName$4,
28725
+ lineNumber: 204,
28726
+ columnNumber: 9
28727
+ }
28728
+ }, /*#__PURE__*/React__default.createElement(Flex$1, {
28729
+ css: {
28730
+ position: !isMobile && 'sticky',
28731
+ top: !isMobile ? 44 : 40
28732
+ },
28733
+ direction: "column",
28734
+ gap: 7,
28735
+ __self: undefined,
28736
+ __source: {
28737
+ fileName: _jsxFileName$4,
28738
+ lineNumber: 205,
28739
+ columnNumber: 11
28740
+ }
28741
+ }, /*#__PURE__*/React__default.createElement(Card, {
28742
+ css: {
28743
+ height: 'fit-content',
28744
+ padding: 0
28745
+ },
28746
+ showBottomLine: false,
28747
+ __self: undefined,
28748
+ __source: {
28749
+ fileName: _jsxFileName$4,
28750
+ lineNumber: 206,
28751
+ columnNumber: 13
28752
+ }
28753
+ }, child), /*#__PURE__*/React__default.createElement(Box, {
28754
+ __self: undefined,
28755
+ __source: {
28756
+ fileName: _jsxFileName$4,
28757
+ lineNumber: 215,
28758
+ columnNumber: 13
28759
+ }
28760
+ }, 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))),
28760
28761
  __self: undefined,
28761
28762
  __source: {
28762
28763
  fileName: _jsxFileName$4,
@@ -28824,9 +28825,7 @@ const Default = props => {
28824
28825
  }));
28825
28826
  }, [props.hide]);
28826
28827
  useEffect(() => {
28827
- var _props$onChangeVisibi;
28828
-
28829
- props === null || props === void 0 ? void 0 : (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 ? void 0 : _props$onChangeVisibi.call(props, state.hide);
28828
+ props == null ? void 0 : props.onChangeVisibility == null ? void 0 : props.onChangeVisibility(state.hide);
28830
28829
  }, [state.hide]);
28831
28830
 
28832
28831
  const toogleVisibility = value => {
@@ -28838,13 +28837,13 @@ const Default = props => {
28838
28837
  const getIsComplete = currentStep => {
28839
28838
  var _state$isComplete;
28840
28839
 
28841
- return state === null || state === void 0 ? void 0 : (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
28840
+ return state == null ? void 0 : (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
28842
28841
  };
28843
28842
 
28844
28843
  const getTitleStep = currentStep => {
28845
28844
  var _props$navContents, _props$navContents2;
28846
28845
 
28847
- 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;
28846
+ return props == null ? void 0 : (_props$navContents = props.navContents) == null ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents2.title;
28848
28847
  };
28849
28848
 
28850
28849
  const setState = value => {
@@ -28886,15 +28885,15 @@ const Default = props => {
28886
28885
  });
28887
28886
  props.onStepChange && props.onStepChange(e);
28888
28887
 
28889
- 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) {
28890
- if ((e === null || e === void 0 ? void 0 : e.activeStep) > (e === null || e === void 0 ? void 0 : e.previousStep)) {
28888
+ if (props != null && (_props$navContents3 = props.navContents) != null && (_props$navContents4 = _props$navContents3[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents4.disabled) {
28889
+ if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
28891
28890
  var _state$SW;
28892
28891
 
28893
- state === null || state === void 0 ? void 0 : (_state$SW = state.SW) === null || _state$SW === void 0 ? void 0 : _state$SW.nextStep();
28892
+ state == null ? void 0 : (_state$SW = state.SW) == null ? void 0 : _state$SW.nextStep();
28894
28893
  } else {
28895
28894
  var _state$SW2;
28896
28895
 
28897
- state === null || state === void 0 ? void 0 : (_state$SW2 = state.SW) === null || _state$SW2 === void 0 ? void 0 : _state$SW2.previousStep();
28896
+ state == null ? void 0 : (_state$SW2 = state.SW) == null ? void 0 : _state$SW2.previousStep();
28898
28897
  }
28899
28898
  }
28900
28899
  };
@@ -28910,11 +28909,11 @@ const Default = props => {
28910
28909
  }, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
28911
28910
  value: {
28912
28911
  toogleVisibility,
28913
- isHide: state === null || state === void 0 ? void 0 : state.hide,
28912
+ isHide: state == null ? void 0 : state.hide,
28914
28913
  setComplete,
28915
28914
  setState,
28916
28915
  state,
28917
- SW: state === null || state === void 0 ? void 0 : state.SW,
28916
+ SW: state == null ? void 0 : state.SW,
28918
28917
  forbidClickNav: props.forbidClickNav,
28919
28918
  titles: props.titles,
28920
28919
  isMobile: props.isMobile,
@@ -28937,7 +28936,7 @@ const Default = props => {
28937
28936
  nav: /*#__PURE__*/React__default.createElement(Navigation, {
28938
28937
  onNavClicked: props.onNavClicked,
28939
28938
  isComplete: state.isComplete,
28940
- appendContent: props === null || props === void 0 ? void 0 : props.appendContent,
28939
+ appendContent: props == null ? void 0 : props.appendContent,
28941
28940
  __self: undefined,
28942
28941
  __source: {
28943
28942
  fileName: _jsxFileName$4,
@@ -29096,10 +29095,10 @@ function Content({
29096
29095
  function getDatasets(content, activeId, isCollapse) {
29097
29096
  const datasets = [];
29098
29097
 
29099
- for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
29098
+ for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
29100
29099
  var _content$i;
29101
29100
 
29102
- if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
29101
+ if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
29103
29102
  datasets.unshift(content[i]);
29104
29103
  } else {
29105
29104
  datasets.push(content[i]);
@@ -29139,7 +29138,7 @@ function Content({
29139
29138
  lineNumber: 107,
29140
29139
  columnNumber: 7
29141
29140
  }
29142
- }, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
29141
+ }, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
29143
29142
  return /*#__PURE__*/React__default.createElement(List, {
29144
29143
  key: index,
29145
29144
  __self: this,
@@ -29156,11 +29155,11 @@ function Content({
29156
29155
  marginLeft: '-4px !important',
29157
29156
  borderLeftWidth: '4px !important',
29158
29157
  borderLeftStyle: 'solid !important',
29159
- borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
29158
+ borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
29160
29159
  paddingLeft: '16px !important',
29161
29160
  minHeight: 25
29162
29161
  },
29163
- "data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
29162
+ "data-to-scrollspy-id": item == null ? void 0 : item.id,
29164
29163
  __self: this,
29165
29164
  __source: {
29166
29165
  fileName: _jsxFileName$2,
@@ -29169,14 +29168,14 @@ function Content({
29169
29168
  }
29170
29169
  }, /*#__PURE__*/React__default.createElement(Title$1, {
29171
29170
  className: "link-title",
29172
- active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
29173
- href: `#${item === null || item === void 0 ? void 0 : item.id}`,
29171
+ active: (item == null ? void 0 : item.id) === activeId,
29172
+ href: `#${item == null ? void 0 : item.id}`,
29174
29173
  onClick: e => {
29175
29174
  var _e$currentTarget, _e$currentTarget$href, _e$currentTarget$href2, _e$currentTarget2, _e$currentTarget2$hre, _e$currentTarget2$hre2;
29176
29175
 
29177
29176
  e.preventDefault();
29178
- 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]);
29179
- 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]);
29177
+ 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]);
29178
+ 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]);
29180
29179
 
29181
29180
  if (target) {
29182
29181
  var headerOffset = 20;
@@ -29202,7 +29201,7 @@ function Content({
29202
29201
  lineNumber: 125,
29203
29202
  columnNumber: 17
29204
29203
  }
29205
- }, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
29204
+ }, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
29206
29205
  })));
29207
29206
  }
29208
29207
 
@@ -30417,40 +30416,56 @@ const Status = styled('div', {
30417
30416
  width: 16,
30418
30417
  height: 16,
30419
30418
  background: '$bgWhite',
30420
- border: '4px solid $primary500',
30419
+ borderWidth: 4,
30420
+ borderStyle: 'solid',
30421
+ borderColor: '$primary500',
30421
30422
  borderRadius: 50,
30422
30423
  boxSizing: 'border-box',
30424
+ position: 'relative',
30423
30425
  variants: {
30424
30426
  state: {
30425
30427
  active: {
30426
- border: '4px solid $primary500'
30428
+ borderColor: '$primary500'
30427
30429
  },
30428
30430
  inActive: {
30429
- border: '4px solid $gray100'
30431
+ borderColor: '$gray150'
30430
30432
  },
30431
30433
  error: {
30432
- border: '4px solid $red400'
30434
+ borderColor: '$red400'
30435
+ }
30436
+ },
30437
+ withIcon: {
30438
+ true: {
30439
+ display: 'flex',
30440
+ justifyContent: 'center',
30441
+ alignItems: 'center',
30442
+ width: 40,
30443
+ height: 40,
30444
+ borderWidth: 2
30445
+ }
30446
+ },
30447
+ completed: {
30448
+ true: {
30449
+ backgroundColor: '$primary500'
30433
30450
  }
30434
30451
  }
30435
30452
  }
30436
30453
  });
30437
30454
  const Title = styled('p', {
30438
30455
  fontStyle: 'normal',
30439
- fontWeight: 600,
30440
30456
  fontSize: 14,
30441
30457
  color: '$textPrimary',
30442
30458
  margin: 0,
30459
+ zIndex: 10,
30443
30460
  variants: {
30444
30461
  state: {
30445
30462
  active: {
30446
- color: '$textPrimary'
30463
+ fontWeight: 600
30447
30464
  },
30448
30465
  inActive: {
30449
- color: '$textDisable',
30450
30466
  fontWeight: 400
30451
30467
  },
30452
30468
  error: {
30453
- color: '$textRed',
30454
30469
  fontWeight: 400
30455
30470
  }
30456
30471
  }
@@ -30466,20 +30481,46 @@ const Line = styled('span', {
30466
30481
  backgroundColor: '$primary500'
30467
30482
  },
30468
30483
  inActive: {
30469
- backgroundColor: '$gray100'
30484
+ backgroundColor: '$gray150'
30470
30485
  },
30471
30486
  error: {
30472
30487
  backgroundColor: '$red400'
30473
30488
  }
30489
+ },
30490
+ withIcon: {
30491
+ true: {
30492
+ width: 'calc(100% - 40px)'
30493
+ }
30474
30494
  }
30475
30495
  }
30476
30496
  });
30497
+
30498
+ const SvgCheckFilled = () => jsx("svg", Object.assign({
30499
+ width: "24",
30500
+ height: "24",
30501
+ viewBox: "0 0 24 24",
30502
+ fill: "none",
30503
+ xmlns: "http://www.w3.org/2000/svg"
30504
+ }, {
30505
+ children: jsx("path", {
30506
+ d: "M5 11.5L10 16.5L19 7.5",
30507
+ stroke: "white",
30508
+ "stroke-width": "2",
30509
+ "stroke-linecap": "round",
30510
+ "stroke-linejoin": "round"
30511
+ }, void 0)
30512
+ }), void 0);
30513
+
30477
30514
  function ProgressIndicator(props) {
30515
+ var _a;
30516
+
30478
30517
  const {
30479
30518
  progressList,
30480
30519
  progress,
30481
30520
  progressError
30482
30521
  } = props;
30522
+ const isMobile = useMediaQuery('(max-width: 767px)');
30523
+ const isIcon = Boolean((_a = progressList === null || progressList === void 0 ? void 0 : progressList[0]) === null || _a === void 0 ? void 0 : _a.icon);
30483
30524
 
30484
30525
  function getState(itemProgress) {
30485
30526
  if (itemProgress === progressError) {
@@ -30493,41 +30534,108 @@ function ProgressIndicator(props) {
30493
30534
  }
30494
30535
  }
30495
30536
 
30496
- return jsxs(Container$4, Object.assign({
30537
+ function renderIcon(item) {
30538
+ const isCompleted = (item === null || item === void 0 ? void 0 : item.progress) < progress && (item === null || item === void 0 ? void 0 : item.progress) !== progressError;
30539
+ const state = getState(item === null || item === void 0 ? void 0 : item.progress);
30540
+
30541
+ const getColor = state => {
30542
+ switch (state) {
30543
+ case 'error':
30544
+ return colors$4.red400;
30545
+
30546
+ case 'active':
30547
+ return colors$4.primary500;
30548
+
30549
+ default:
30550
+ return colors$4.gray150;
30551
+ }
30552
+ };
30553
+
30554
+ const iconProps = {
30555
+ size: 24,
30556
+ color: getColor(state)
30557
+ };
30558
+ return isCompleted ? jsx(SvgCheckFilled, {}, void 0) : /*#__PURE__*/cloneElement(item === null || item === void 0 ? void 0 : item.icon, iconProps);
30559
+ }
30560
+
30561
+ return jsx(Container$4, Object.assign({
30497
30562
  direction: "column"
30498
30563
  }, {
30499
- children: [jsx(Flex$1, Object.assign({
30500
- align: "center",
30501
- justify: "between"
30502
- }, {
30503
- children: progressList === null || progressList === void 0 ? void 0 : progressList.map((item, index) => {
30504
- return jsx(Title, Object.assign({
30505
- state: getState(item === null || item === void 0 ? void 0 : item.progress)
30506
- }, {
30507
- children: item.title
30508
- }), index);
30509
- })
30510
- }), void 0), jsx(Flex$1, Object.assign({
30564
+ children: jsx(Flex$1, Object.assign({
30565
+ css: {
30566
+ margin: '0px 8px',
30567
+ '@md': {
30568
+ margin: '0px 4px'
30569
+ },
30570
+ '& > div:not(:first-child):not(:last-child)': {
30571
+ '.title-progress': {
30572
+ display: 'flex',
30573
+ justifyContent: 'center'
30574
+ }
30575
+ },
30576
+ '& > div:first-child': {
30577
+ '.title-progress': {
30578
+ display: 'flex',
30579
+ justifyContent: 'start',
30580
+ left: '-10%',
30581
+ right: `-${isIcon ? 500 : 3000}%`
30582
+ }
30583
+ },
30584
+ '& > div:last-child': {
30585
+ '.title-progress': {
30586
+ display: 'flex',
30587
+ justifyContent: 'end',
30588
+ right: '-10%',
30589
+ left: `-${isIcon ? 500 : 3000}%`
30590
+ }
30591
+ }
30592
+ },
30511
30593
  justify: "between"
30512
30594
  }, {
30513
30595
  children: progressList === null || progressList === void 0 ? void 0 : progressList.map((item, index) => {
30596
+ var _a;
30597
+
30598
+ const isCompleted = (item === null || item === void 0 ? void 0 : item.progress) < progress && (item === null || item === void 0 ? void 0 : item.progress) !== progressError;
30514
30599
  return jsxs(Flex$1, Object.assign({
30515
30600
  align: "center",
30516
30601
  css: {
30517
- flex: (progressList === null || progressList === void 0 ? void 0 : progressList.length) !== index + 1 ? 1 : 0
30602
+ flex: (progressList === null || progressList === void 0 ? void 0 : progressList.length) !== index + 1 ? 1 : 0,
30603
+ paddingTop: 45
30518
30604
  }
30519
30605
  }, {
30520
- children: [jsx(Status, {
30521
- state: getState(item === null || item === void 0 ? void 0 : item.progress)
30522
- }, void 0), jsx(Line, {
30606
+ children: [jsxs(Status, Object.assign({
30523
30607
  state: getState(item === null || item === void 0 ? void 0 : item.progress),
30608
+ withIcon: isIcon,
30609
+ completed: isCompleted
30610
+ }, {
30611
+ children: [isIcon && renderIcon(item), jsx(Box, Object.assign({
30612
+ className: "title-progress",
30613
+ css: {
30614
+ position: 'absolute',
30615
+ top: -45,
30616
+ left: `-${isIcon ? 250 : 2000}%`,
30617
+ right: `-${isIcon ? 250 : 2000}%`
30618
+ }
30619
+ }, {
30620
+ children: jsx(Title, Object.assign({
30621
+ css: {
30622
+ opacity: isMobile && (item === null || item === void 0 ? void 0 : item.progress) !== progress ? 0 : 1
30623
+ },
30624
+ state: getState(item === null || item === void 0 ? void 0 : item.progress)
30625
+ }, {
30626
+ children: typeof (item === null || item === void 0 ? void 0 : item.title) === 'function' ? (_a = item === null || item === void 0 ? void 0 : item.title) === null || _a === void 0 ? void 0 : _a.call(item) : item === null || item === void 0 ? void 0 : item.title
30627
+ }), index)
30628
+ }), void 0)]
30629
+ }), void 0), jsx(Line, {
30630
+ state: getState((item === null || item === void 0 ? void 0 : item.progress) + 1),
30631
+ withIcon: isIcon,
30524
30632
  css: {
30525
30633
  display: (progressList === null || progressList === void 0 ? void 0 : progressList.length) === index + 1 ? 'none' : 'unset'
30526
30634
  }
30527
30635
  }, void 0)]
30528
30636
  }), index);
30529
30637
  })
30530
- }), void 0)]
30638
+ }), void 0)
30531
30639
  }), void 0);
30532
30640
  }
30533
30641