@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/components/form/components/InputSelect/InputSelect.d.ts +1 -1
- package/components/progressIndicator/ProgressIndicator.d.ts +4 -2
- package/components/table/Table.d.ts +5 -1
- package/components/upload/utils/imgPreview.d.ts +1 -1
- package/index.esm.js +333 -225
- package/index.umd.js +353 -242
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -3664,7 +3664,7 @@
|
|
|
3664
3664
|
onClick: e => {
|
|
3665
3665
|
e.preventDefault();
|
|
3666
3666
|
e.stopPropagation();
|
|
3667
|
-
value
|
|
3667
|
+
value == null ? void 0 : value.onRemove();
|
|
3668
3668
|
},
|
|
3669
3669
|
__self: undefined,
|
|
3670
3670
|
__source: {
|
|
@@ -3741,7 +3741,7 @@
|
|
|
3741
3741
|
onClick: e => {
|
|
3742
3742
|
e.preventDefault();
|
|
3743
3743
|
e.stopPropagation();
|
|
3744
|
-
props
|
|
3744
|
+
props == null ? void 0 : props.onRemove();
|
|
3745
3745
|
},
|
|
3746
3746
|
closeCenter: !props.title && !props.link,
|
|
3747
3747
|
__self: undefined,
|
|
@@ -5905,7 +5905,7 @@
|
|
|
5905
5905
|
const [isChecked, setChecked] = React.useState(false);
|
|
5906
5906
|
React.useEffect(() => {
|
|
5907
5907
|
const checkValue = context && context.checkedItems.includes(value) || checked || indeterminate;
|
|
5908
|
-
setChecked(checkValue
|
|
5908
|
+
setChecked(checkValue != null ? checkValue : false);
|
|
5909
5909
|
}, [checked, indeterminate, context]);
|
|
5910
5910
|
return /*#__PURE__*/React__default["default"].createElement(StyledCheckbox, _extends({
|
|
5911
5911
|
id: id,
|
|
@@ -6552,7 +6552,7 @@
|
|
|
6552
6552
|
React.useEffect(() => {
|
|
6553
6553
|
if (textareaRef.current) {
|
|
6554
6554
|
textareaRef.current.style.height = '50px';
|
|
6555
|
-
const scrollHeight = textareaRef
|
|
6555
|
+
const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
|
|
6556
6556
|
textareaRef.current.style.height = scrollHeight + 5 + 'px';
|
|
6557
6557
|
}
|
|
6558
6558
|
}, []);
|
|
@@ -6600,7 +6600,7 @@
|
|
|
6600
6600
|
var _jsxFileName$G = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputRadio\\InputRadioGroup.js";
|
|
6601
6601
|
const RadioGroup = styled(RadioGroupPrimitive__namespace.Root, Flex$1);
|
|
6602
6602
|
function InputRadioGroup(props) {
|
|
6603
|
-
return (props
|
|
6603
|
+
return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default["default"].createElement(InputRadioContext.Provider, {
|
|
6604
6604
|
value: props,
|
|
6605
6605
|
__self: this,
|
|
6606
6606
|
__source: {
|
|
@@ -6615,7 +6615,7 @@
|
|
|
6615
6615
|
lineNumber: 14,
|
|
6616
6616
|
columnNumber: 9
|
|
6617
6617
|
}
|
|
6618
|
-
}), React__default["default"].Children.map(props
|
|
6618
|
+
}), React__default["default"].Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
6619
6619
|
style: Object.assign({}, child.props.style, {
|
|
6620
6620
|
opacity: 1
|
|
6621
6621
|
})
|
|
@@ -6842,7 +6842,7 @@
|
|
|
6842
6842
|
value,
|
|
6843
6843
|
outlined
|
|
6844
6844
|
}) => {
|
|
6845
|
-
const checked = value
|
|
6845
|
+
const checked = value != null ? value : defaultValue;
|
|
6846
6846
|
return /*#__PURE__*/React__default["default"].createElement(Container$a, {
|
|
6847
6847
|
direction: "column",
|
|
6848
6848
|
outlined: outlined,
|
|
@@ -7133,7 +7133,7 @@
|
|
|
7133
7133
|
size: size,
|
|
7134
7134
|
isInvalid: isInvalid,
|
|
7135
7135
|
readOnly: readOnly,
|
|
7136
|
-
isReadOnly: readOnly && !(props
|
|
7136
|
+
isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
|
|
7137
7137
|
disabled: disabled
|
|
7138
7138
|
}, props, {
|
|
7139
7139
|
__self: undefined,
|
|
@@ -7949,18 +7949,18 @@
|
|
|
7949
7949
|
const addTags = event => {
|
|
7950
7950
|
if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
|
|
7951
7951
|
if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
|
|
7952
|
-
onEnter
|
|
7952
|
+
onEnter == null ? void 0 : onEnter({
|
|
7953
7953
|
key: 'duplicate',
|
|
7954
7954
|
value: event.target.value
|
|
7955
7955
|
});
|
|
7956
7956
|
return;
|
|
7957
7957
|
}
|
|
7958
7958
|
|
|
7959
|
-
if (pattern && pattern
|
|
7959
|
+
if (pattern && pattern != null && pattern.regex) {
|
|
7960
7960
|
const regex = new RegExp(pattern.regex);
|
|
7961
7961
|
|
|
7962
7962
|
if (!regex.test(event.target.value)) {
|
|
7963
|
-
onEnter
|
|
7963
|
+
onEnter == null ? void 0 : onEnter({
|
|
7964
7964
|
key: 'error',
|
|
7965
7965
|
value: event.target.value
|
|
7966
7966
|
});
|
|
@@ -7970,7 +7970,7 @@
|
|
|
7970
7970
|
}
|
|
7971
7971
|
|
|
7972
7972
|
setRegexError(false);
|
|
7973
|
-
onEnter
|
|
7973
|
+
onEnter == null ? void 0 : onEnter({
|
|
7974
7974
|
key: 'success',
|
|
7975
7975
|
value: event.target.value
|
|
7976
7976
|
});
|
|
@@ -7983,7 +7983,7 @@
|
|
|
7983
7983
|
if (disabled || readOnly) {
|
|
7984
7984
|
return tags;
|
|
7985
7985
|
} else if (key === 'removeTag' || key === 'Backspace') {
|
|
7986
|
-
onRemoveItem
|
|
7986
|
+
onRemoveItem == null ? void 0 : onRemoveItem(tags[index]);
|
|
7987
7987
|
setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
|
|
7988
7988
|
}
|
|
7989
7989
|
}; // const handleErrorMessage = () => {
|
|
@@ -8031,7 +8031,7 @@
|
|
|
8031
8031
|
lineNumber: 180,
|
|
8032
8032
|
columnNumber: 9
|
|
8033
8033
|
}
|
|
8034
|
-
})), regexError && pattern && (pattern
|
|
8034
|
+
})), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default["default"].createElement(FormHelper, {
|
|
8035
8035
|
color: "red",
|
|
8036
8036
|
__self: this,
|
|
8037
8037
|
__source: {
|
|
@@ -8339,7 +8339,7 @@
|
|
|
8339
8339
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
8340
8340
|
|
|
8341
8341
|
const [value, setValue] = React__default["default"].useState('');
|
|
8342
|
-
const inputValue = (_props$value = props
|
|
8342
|
+
const inputValue = (_props$value = props == null ? void 0 : props.value) != null ? _props$value : value;
|
|
8343
8343
|
const handleChange = React__default["default"].useCallback(e => {
|
|
8344
8344
|
setValue(e.target.value);
|
|
8345
8345
|
|
|
@@ -9944,10 +9944,10 @@
|
|
|
9944
9944
|
return setItems(sortValue);
|
|
9945
9945
|
}
|
|
9946
9946
|
} else {
|
|
9947
|
-
let filterItems = option
|
|
9948
|
-
var _item$name, _item$name$toLowerCas
|
|
9947
|
+
let filterItems = option == null ? void 0 : option.filter(item => {
|
|
9948
|
+
var _item$name, _item$name$toLowerCas;
|
|
9949
9949
|
|
|
9950
|
-
return item
|
|
9950
|
+
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());
|
|
9951
9951
|
});
|
|
9952
9952
|
setItems(filterItems);
|
|
9953
9953
|
}
|
|
@@ -9957,9 +9957,9 @@
|
|
|
9957
9957
|
if (disabled || readOnly) {
|
|
9958
9958
|
return selectedValue;
|
|
9959
9959
|
} else {
|
|
9960
|
-
if ((selected
|
|
9960
|
+
if ((selected == null ? void 0 : selected.id) === 'counter') {
|
|
9961
9961
|
setSelectedValue([]);
|
|
9962
|
-
onChange
|
|
9962
|
+
onChange == null ? void 0 : onChange([]);
|
|
9963
9963
|
|
|
9964
9964
|
for (let i = 0; i < selectedValue.length; i++) {
|
|
9965
9965
|
removeSelectedItem(selectedValue[i]);
|
|
@@ -9970,7 +9970,7 @@
|
|
|
9970
9970
|
setSelectedValue(filterItems);
|
|
9971
9971
|
|
|
9972
9972
|
if (selected.id !== '!all') {
|
|
9973
|
-
onChange
|
|
9973
|
+
onChange == null ? void 0 : onChange(filterItems);
|
|
9974
9974
|
}
|
|
9975
9975
|
}
|
|
9976
9976
|
}
|
|
@@ -10015,7 +10015,7 @@
|
|
|
10015
10015
|
removeSelectedItem(item);
|
|
10016
10016
|
});
|
|
10017
10017
|
setSelectedValue([]);
|
|
10018
|
-
onChange
|
|
10018
|
+
onChange == null ? void 0 : onChange([]);
|
|
10019
10019
|
} else {
|
|
10020
10020
|
removeItem(selectedItem);
|
|
10021
10021
|
}
|
|
@@ -10030,12 +10030,12 @@
|
|
|
10030
10030
|
itemIds.push(item.id);
|
|
10031
10031
|
});
|
|
10032
10032
|
setSelectedValue(itemIds);
|
|
10033
|
-
onChange
|
|
10033
|
+
onChange == null ? void 0 : onChange(itemIds.slice(1));
|
|
10034
10034
|
} else {
|
|
10035
10035
|
addSelectedItem(selectedItem);
|
|
10036
10036
|
setSelectedValue([...selectedValue, selectedItem.id]);
|
|
10037
10037
|
const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
|
|
10038
|
-
onChange
|
|
10038
|
+
onChange == null ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
|
|
10039
10039
|
}
|
|
10040
10040
|
|
|
10041
10041
|
selectItem(null);
|
|
@@ -10190,13 +10190,13 @@
|
|
|
10190
10190
|
lineNumber: 564,
|
|
10191
10191
|
columnNumber: 13
|
|
10192
10192
|
}
|
|
10193
|
-
}, selectedItems
|
|
10193
|
+
}, 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) => {
|
|
10194
10194
|
if (showAllTags || !collapsible) {
|
|
10195
10195
|
return true;
|
|
10196
10196
|
} else {
|
|
10197
10197
|
return idx < 5;
|
|
10198
10198
|
}
|
|
10199
|
-
}))
|
|
10199
|
+
})) == null ? void 0 : _selectedItems$filter2.map((selectedItem, index) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends({
|
|
10200
10200
|
disabled: disabled,
|
|
10201
10201
|
isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
|
|
10202
10202
|
size: "lg",
|
|
@@ -10220,7 +10220,7 @@
|
|
|
10220
10220
|
lineNumber: 575,
|
|
10221
10221
|
columnNumber: 19
|
|
10222
10222
|
}
|
|
10223
|
-
}), selectedItem.name))), collapsible && (selectedItems
|
|
10223
|
+
}), selectedItem.name))), collapsible && (selectedItems == null ? void 0 : selectedItems.length) > 5 && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
10224
10224
|
align: "center",
|
|
10225
10225
|
justify: "center",
|
|
10226
10226
|
onClick: toggleCollapsible,
|
|
@@ -10286,7 +10286,7 @@
|
|
|
10286
10286
|
lineNumber: 612,
|
|
10287
10287
|
columnNumber: 17
|
|
10288
10288
|
}
|
|
10289
|
-
}))), showSelectedTag && showCounter && Boolean(selectedItems
|
|
10289
|
+
}))), showSelectedTag && showCounter && Boolean(selectedItems == null ? void 0 : selectedItems.length) && /*#__PURE__*/React__default["default"].createElement(TagWrapper$1, {
|
|
10290
10290
|
disabled: disabled,
|
|
10291
10291
|
__self: undefined,
|
|
10292
10292
|
__source: {
|
|
@@ -10299,7 +10299,7 @@
|
|
|
10299
10299
|
maxWidth: '150px !important'
|
|
10300
10300
|
},
|
|
10301
10301
|
disabled: disabled,
|
|
10302
|
-
isRemovable: readOnly || disabled || Boolean(selectedItems
|
|
10302
|
+
isRemovable: readOnly || disabled || Boolean(selectedItems == null ? void 0 : selectedItems.length),
|
|
10303
10303
|
size: "lg",
|
|
10304
10304
|
readOnly: readOnly // {...getSelectedItemProps({ selectedItem, index })}
|
|
10305
10305
|
,
|
|
@@ -10321,7 +10321,7 @@
|
|
|
10321
10321
|
lineNumber: 619,
|
|
10322
10322
|
columnNumber: 13
|
|
10323
10323
|
}
|
|
10324
|
-
}, `${selectedItems
|
|
10324
|
+
}, `${selectedItems == null ? void 0 : selectedItems.length} ${labelCounter}`)), /*#__PURE__*/React__default["default"].createElement(OptionWrapper$1, {
|
|
10325
10325
|
placement: placement,
|
|
10326
10326
|
css: {
|
|
10327
10327
|
display: isOpen && disabled === false ? 'block' : 'none',
|
|
@@ -10389,7 +10389,7 @@
|
|
|
10389
10389
|
lineNumber: 673,
|
|
10390
10390
|
columnNumber: 27
|
|
10391
10391
|
}
|
|
10392
|
-
}), showSelectAll && (item
|
|
10392
|
+
}), 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["default"].createElement(IndeterminateFilled, {
|
|
10393
10393
|
__self: undefined,
|
|
10394
10394
|
__source: {
|
|
10395
10395
|
fileName: _jsxFileName$w,
|
|
@@ -11101,7 +11101,7 @@
|
|
|
11101
11101
|
},
|
|
11102
11102
|
ref: scrollerRef
|
|
11103
11103
|
}, {
|
|
11104
|
-
children: [data.length <= 0 && (value || checkedResources).length <= 0 && !isLoading || defaultSort && data.length < 1
|
|
11104
|
+
children: [data.length <= 0 && (value || checkedResources).length <= 0 && !isLoading || defaultSort && data.length < 1 ? jsxRuntime.jsx(Flex$1, __assign({
|
|
11105
11105
|
justify: "center",
|
|
11106
11106
|
align: "center",
|
|
11107
11107
|
css: {
|
|
@@ -11117,7 +11117,7 @@
|
|
|
11117
11117
|
ns: 'translation'
|
|
11118
11118
|
})
|
|
11119
11119
|
}), void 0)
|
|
11120
|
-
}), void 0), jsxRuntime.jsx(ConditionalWrapper, __assign({
|
|
11120
|
+
}), void 0) : null, jsxRuntime.jsx(ConditionalWrapper, __assign({
|
|
11121
11121
|
condition: !!fetchData && data.length > 0,
|
|
11122
11122
|
wrapper: function (children) {
|
|
11123
11123
|
return jsxRuntime.jsx(InfiniteScroll__default["default"], __assign({
|
|
@@ -11688,8 +11688,8 @@
|
|
|
11688
11688
|
ref: floating,
|
|
11689
11689
|
style: Object.assign({
|
|
11690
11690
|
position: strategy,
|
|
11691
|
-
top: isMobile ? 0 : y
|
|
11692
|
-
left: isMobile ? 0 : x
|
|
11691
|
+
top: isMobile ? 0 : y != null ? y : '',
|
|
11692
|
+
left: isMobile ? 0 : x != null ? x : '',
|
|
11693
11693
|
zIndex: zIndices.popover
|
|
11694
11694
|
}, style)
|
|
11695
11695
|
}), {
|
|
@@ -13092,7 +13092,7 @@
|
|
|
13092
13092
|
};
|
|
13093
13093
|
|
|
13094
13094
|
const getValue = () => {
|
|
13095
|
-
let value = props
|
|
13095
|
+
let value = props == null ? void 0 : props.value;
|
|
13096
13096
|
const isTrailing = variantIcon === 'trailing';
|
|
13097
13097
|
|
|
13098
13098
|
if (typeof value === 'number' || parseInt(value)) {
|
|
@@ -18529,7 +18529,7 @@
|
|
|
18529
18529
|
lineNumber: 42,
|
|
18530
18530
|
columnNumber: 11
|
|
18531
18531
|
}
|
|
18532
|
-
}, limits
|
|
18532
|
+
}, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(PopoverClose, {
|
|
18533
18533
|
key: limit,
|
|
18534
18534
|
css: limitItemContainerStyle(selectedLimit === limit),
|
|
18535
18535
|
onClick: () => onChange(limit),
|
|
@@ -18563,7 +18563,7 @@
|
|
|
18563
18563
|
})));
|
|
18564
18564
|
}
|
|
18565
18565
|
|
|
18566
|
-
const _excluded$2 = ["limit", "currentPage", "totalData", "totalPage", "hideDataInfo", "onLimitChange", "onPageChange", "rowsPerPageOptions"];
|
|
18566
|
+
const _excluded$2 = ["limit", "currentPage", "totalData", "totalPage", "hideDataInfo", "onLimitChange", "onPageChange", "rowsPerPageOptions", "hidePagination"];
|
|
18567
18567
|
var _jsxFileName$h = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\pagination\\Pagination.js";
|
|
18568
18568
|
|
|
18569
18569
|
function Pagination(_ref) {
|
|
@@ -18575,7 +18575,8 @@
|
|
|
18575
18575
|
hideDataInfo,
|
|
18576
18576
|
onLimitChange,
|
|
18577
18577
|
onPageChange,
|
|
18578
|
-
rowsPerPageOptions
|
|
18578
|
+
rowsPerPageOptions,
|
|
18579
|
+
hidePagination
|
|
18579
18580
|
} = _ref,
|
|
18580
18581
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
18581
18582
|
|
|
@@ -18590,7 +18591,7 @@
|
|
|
18590
18591
|
__self: this,
|
|
18591
18592
|
__source: {
|
|
18592
18593
|
fileName: _jsxFileName$h,
|
|
18593
|
-
lineNumber:
|
|
18594
|
+
lineNumber: 23,
|
|
18594
18595
|
columnNumber: 5
|
|
18595
18596
|
}
|
|
18596
18597
|
}), !hideDataInfo ? /*#__PURE__*/React__default["default"].createElement(PaginationInfo, {
|
|
@@ -18602,25 +18603,25 @@
|
|
|
18602
18603
|
__self: this,
|
|
18603
18604
|
__source: {
|
|
18604
18605
|
fileName: _jsxFileName$h,
|
|
18605
|
-
lineNumber:
|
|
18606
|
+
lineNumber: 25,
|
|
18606
18607
|
columnNumber: 9
|
|
18607
18608
|
}
|
|
18608
18609
|
}) : /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
18609
18610
|
__self: this,
|
|
18610
18611
|
__source: {
|
|
18611
18612
|
fileName: _jsxFileName$h,
|
|
18612
|
-
lineNumber:
|
|
18613
|
+
lineNumber: 33,
|
|
18613
18614
|
columnNumber: 9
|
|
18614
18615
|
}
|
|
18615
|
-
}), /*#__PURE__*/React__default["default"].createElement(PaginationButton, {
|
|
18616
|
+
}), !hidePagination && /*#__PURE__*/React__default["default"].createElement(PaginationButton, {
|
|
18616
18617
|
currentPage: currentPage,
|
|
18617
18618
|
totalPages: totalPages,
|
|
18618
18619
|
onSelect: onPageChange,
|
|
18619
18620
|
__self: this,
|
|
18620
18621
|
__source: {
|
|
18621
18622
|
fileName: _jsxFileName$h,
|
|
18622
|
-
lineNumber:
|
|
18623
|
-
columnNumber:
|
|
18623
|
+
lineNumber: 37,
|
|
18624
|
+
columnNumber: 9
|
|
18624
18625
|
}
|
|
18625
18626
|
}));
|
|
18626
18627
|
}
|
|
@@ -19392,23 +19393,25 @@
|
|
|
19392
19393
|
customRowsStyle = _a.customRowsStyle,
|
|
19393
19394
|
isMobileLayout = _a.isMobileLayout,
|
|
19394
19395
|
showDuplicatedData = _a.showDuplicatedData,
|
|
19395
|
-
onRowClick = _a.onRowClick
|
|
19396
|
+
onRowClick = _a.onRowClick,
|
|
19397
|
+
_o = _a.hidePagination,
|
|
19398
|
+
hidePagination = _o === void 0 ? false : _o;
|
|
19396
19399
|
|
|
19397
|
-
var
|
|
19398
|
-
limit =
|
|
19399
|
-
setLimit =
|
|
19400
|
+
var _p = React.useState(rowLimit),
|
|
19401
|
+
limit = _p[0],
|
|
19402
|
+
setLimit = _p[1];
|
|
19400
19403
|
|
|
19401
|
-
var
|
|
19402
|
-
dataRow =
|
|
19403
|
-
setDataRow =
|
|
19404
|
+
var _q = React.useState({}),
|
|
19405
|
+
dataRow = _q[0],
|
|
19406
|
+
setDataRow = _q[1];
|
|
19404
19407
|
|
|
19405
|
-
var
|
|
19406
|
-
tableScrollPosition =
|
|
19407
|
-
setTableScrollPosition =
|
|
19408
|
+
var _r = React.useState('start'),
|
|
19409
|
+
tableScrollPosition = _r[0],
|
|
19410
|
+
setTableScrollPosition = _r[1];
|
|
19408
19411
|
|
|
19409
|
-
var
|
|
19410
|
-
scrollAreaWidth =
|
|
19411
|
-
setScrollAreaWidth =
|
|
19412
|
+
var _s = React.useState(0),
|
|
19413
|
+
scrollAreaWidth = _s[0],
|
|
19414
|
+
setScrollAreaWidth = _s[1];
|
|
19412
19415
|
|
|
19413
19416
|
var t = reactI18next.useTranslation('MajooUI/table').t;
|
|
19414
19417
|
var customEmptyDataProps = emptyDataProps || defaultEmptyDataProps(t);
|
|
@@ -19461,11 +19464,11 @@
|
|
|
19461
19464
|
gotoPage = instance.gotoPage,
|
|
19462
19465
|
setPageSize = instance.setPageSize,
|
|
19463
19466
|
toggleRowSelected = instance.toggleRowSelected,
|
|
19464
|
-
|
|
19465
|
-
pageIndex =
|
|
19466
|
-
pageSize =
|
|
19467
|
-
sortBy =
|
|
19468
|
-
selectedRowIds =
|
|
19467
|
+
_t = instance.state,
|
|
19468
|
+
pageIndex = _t.pageIndex,
|
|
19469
|
+
pageSize = _t.pageSize,
|
|
19470
|
+
sortBy = _t.sortBy,
|
|
19471
|
+
selectedRowIds = _t.selectedRowIds,
|
|
19469
19472
|
setHiddenColumns = instance.setHiddenColumns,
|
|
19470
19473
|
setColumnOrder = instance.setColumnOrder;
|
|
19471
19474
|
|
|
@@ -19489,6 +19492,7 @@
|
|
|
19489
19492
|
|
|
19490
19493
|
var renderFooter = function renderFooter() {
|
|
19491
19494
|
return jsxRuntime.jsx(Pagination, {
|
|
19495
|
+
hidePagination: hidePagination,
|
|
19492
19496
|
limit: pageSize,
|
|
19493
19497
|
currentPage: pageIndex + 1,
|
|
19494
19498
|
totalData: totalData,
|
|
@@ -20680,7 +20684,7 @@
|
|
|
20680
20684
|
var _document$getElements;
|
|
20681
20685
|
|
|
20682
20686
|
setOpenDrop(true);
|
|
20683
|
-
const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu'))
|
|
20687
|
+
const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
|
|
20684
20688
|
contextMenu.style.opacity = 0;
|
|
20685
20689
|
},
|
|
20686
20690
|
__self: undefined,
|
|
@@ -21380,7 +21384,7 @@
|
|
|
21380
21384
|
if (!props.onOpenAutoFocus) {
|
|
21381
21385
|
e.preventDefault();
|
|
21382
21386
|
} else {
|
|
21383
|
-
props
|
|
21387
|
+
props == null ? void 0 : props.onOpenAutoFocus();
|
|
21384
21388
|
}
|
|
21385
21389
|
},
|
|
21386
21390
|
__self: undefined,
|
|
@@ -21501,8 +21505,8 @@
|
|
|
21501
21505
|
size: props.btnSize,
|
|
21502
21506
|
onClick: buttonConfirm,
|
|
21503
21507
|
buttonType: props.dialogType,
|
|
21504
|
-
disabled: props
|
|
21505
|
-
}, props
|
|
21508
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
21509
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
21506
21510
|
__self: undefined,
|
|
21507
21511
|
__source: {
|
|
21508
21512
|
fileName: _jsxFileName$b,
|
|
@@ -21521,12 +21525,12 @@
|
|
|
21521
21525
|
size: props.btnSize,
|
|
21522
21526
|
onClick: buttonCancel,
|
|
21523
21527
|
css: {
|
|
21524
|
-
color: props.dialogType === 'negative' && !(props
|
|
21528
|
+
color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
|
|
21525
21529
|
flex: props.isMobile && 1
|
|
21526
21530
|
},
|
|
21527
|
-
buttonType: props.dialogType === 'negative' && !(props
|
|
21528
|
-
disabled: props
|
|
21529
|
-
}, props
|
|
21531
|
+
buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
|
|
21532
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
21533
|
+
}, props == null ? void 0 : props.cancelButtonProps, {
|
|
21530
21534
|
__self: undefined,
|
|
21531
21535
|
__source: {
|
|
21532
21536
|
fileName: _jsxFileName$b,
|
|
@@ -21548,8 +21552,8 @@
|
|
|
21548
21552
|
css: {
|
|
21549
21553
|
flex: props.isMobile && 1
|
|
21550
21554
|
},
|
|
21551
|
-
disabled: props
|
|
21552
|
-
}, props
|
|
21555
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
21556
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
21553
21557
|
__self: undefined,
|
|
21554
21558
|
__source: {
|
|
21555
21559
|
fileName: _jsxFileName$b,
|
|
@@ -21712,8 +21716,8 @@
|
|
|
21712
21716
|
css: {
|
|
21713
21717
|
flex: props.isMobile && 1
|
|
21714
21718
|
},
|
|
21715
|
-
disabled: props
|
|
21716
|
-
}, props
|
|
21719
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
21720
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
21717
21721
|
__self: this,
|
|
21718
21722
|
__source: {
|
|
21719
21723
|
fileName: _jsxFileName$b,
|
|
@@ -21732,12 +21736,12 @@
|
|
|
21732
21736
|
size: props.btnSize,
|
|
21733
21737
|
onClick: props.onCancel,
|
|
21734
21738
|
css: {
|
|
21735
|
-
color: props.dialogType === 'negative' && !(props
|
|
21739
|
+
color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
|
|
21736
21740
|
flex: props.isMobile && 1
|
|
21737
21741
|
},
|
|
21738
|
-
buttonType: props.dialogType === 'negative' && !(props
|
|
21739
|
-
disabled: props
|
|
21740
|
-
}, props
|
|
21742
|
+
buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
|
|
21743
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
21744
|
+
}, props == null ? void 0 : props.cancelButtonProps, {
|
|
21741
21745
|
__self: this,
|
|
21742
21746
|
__source: {
|
|
21743
21747
|
fileName: _jsxFileName$b,
|
|
@@ -21759,8 +21763,8 @@
|
|
|
21759
21763
|
css: {
|
|
21760
21764
|
flex: props.isMobile && 1
|
|
21761
21765
|
},
|
|
21762
|
-
disabled: props
|
|
21763
|
-
}, props
|
|
21766
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
21767
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
21764
21768
|
__self: this,
|
|
21765
21769
|
__source: {
|
|
21766
21770
|
fileName: _jsxFileName$b,
|
|
@@ -23877,13 +23881,13 @@
|
|
|
23877
23881
|
});
|
|
23878
23882
|
}
|
|
23879
23883
|
|
|
23880
|
-
function toBlob(canvas) {
|
|
23884
|
+
function toBlob(canvas, type) {
|
|
23881
23885
|
return new Promise(function (resolve) {
|
|
23882
|
-
canvas.toBlob(resolve);
|
|
23886
|
+
canvas.toBlob(resolve, type);
|
|
23883
23887
|
});
|
|
23884
23888
|
}
|
|
23885
23889
|
|
|
23886
|
-
function imgPreview(image, crop, scale, rotate, ratio) {
|
|
23890
|
+
function imgPreview(image, crop, scale, rotate, ratio, type) {
|
|
23887
23891
|
if (scale === void 0) {
|
|
23888
23892
|
scale = 1;
|
|
23889
23893
|
}
|
|
@@ -23905,7 +23909,7 @@
|
|
|
23905
23909
|
canvasPreview(image, canvas, crop, scale, rotate, ratio);
|
|
23906
23910
|
return [4
|
|
23907
23911
|
/*yield*/
|
|
23908
|
-
, toBlob(canvas)];
|
|
23912
|
+
, toBlob(canvas, type)];
|
|
23909
23913
|
|
|
23910
23914
|
case 1:
|
|
23911
23915
|
blob = _a.sent();
|
|
@@ -23946,6 +23950,8 @@
|
|
|
23946
23950
|
onProgress === null || onProgress === void 0 ? void 0 : onProgress(e);
|
|
23947
23951
|
progress === null || progress === void 0 ? void 0 : progress(Math.round(e.percent));
|
|
23948
23952
|
}).end(function (err, res) {
|
|
23953
|
+
var _a, _b;
|
|
23954
|
+
|
|
23949
23955
|
if (err) {
|
|
23950
23956
|
var error = new Error(err.message);
|
|
23951
23957
|
onError === null || onError === void 0 ? void 0 : onError(error, (res === null || res === void 0 ? void 0 : res.text) && JSON.parse(res.text));
|
|
@@ -23955,7 +23961,9 @@
|
|
|
23955
23961
|
if (res && (res === null || res === void 0 ? void 0 : res.ok)) {
|
|
23956
23962
|
var response = JSON.parse(res === null || res === void 0 ? void 0 : res.text);
|
|
23957
23963
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(response);
|
|
23958
|
-
resolve(response
|
|
23964
|
+
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) {
|
|
23965
|
+
return a[b];
|
|
23966
|
+
}));
|
|
23959
23967
|
}
|
|
23960
23968
|
});
|
|
23961
23969
|
});
|
|
@@ -24283,7 +24291,7 @@
|
|
|
24283
24291
|
upload({
|
|
24284
24292
|
url: action,
|
|
24285
24293
|
file: newFile,
|
|
24286
|
-
customBody: customBodyRequest
|
|
24294
|
+
customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
|
|
24287
24295
|
token,
|
|
24288
24296
|
tokenKey,
|
|
24289
24297
|
reqKey,
|
|
@@ -24306,12 +24314,12 @@
|
|
|
24306
24314
|
}
|
|
24307
24315
|
}
|
|
24308
24316
|
|
|
24309
|
-
onChange
|
|
24317
|
+
onChange == null ? void 0 : (_onChange = onChange({
|
|
24310
24318
|
fileList: arrProgress,
|
|
24311
24319
|
file: fileProgress,
|
|
24312
24320
|
indexReplace: indexReplace.current,
|
|
24313
24321
|
isReplace: indexReplace.current !== null
|
|
24314
|
-
}))
|
|
24322
|
+
})) == null ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) == null ? void 0 : _onChange$then.catch(error => setError(error.message));
|
|
24315
24323
|
}
|
|
24316
24324
|
}).then(result => {
|
|
24317
24325
|
var _onChange2, _onChange2$then;
|
|
@@ -24328,12 +24336,12 @@
|
|
|
24328
24336
|
}
|
|
24329
24337
|
}
|
|
24330
24338
|
|
|
24331
|
-
onChange
|
|
24339
|
+
onChange == null ? void 0 : (_onChange2 = onChange({
|
|
24332
24340
|
fileList: arrSuccess,
|
|
24333
24341
|
file: fileSuccess,
|
|
24334
24342
|
indexReplace: indexReplace.current,
|
|
24335
24343
|
isReplace: indexReplace.current !== null
|
|
24336
|
-
}))
|
|
24344
|
+
})) == null ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) == null ? void 0 : _onChange2$then.catch(error => setError(error.message));
|
|
24337
24345
|
}).catch(error => {
|
|
24338
24346
|
var _onChange3, _onChange3$then;
|
|
24339
24347
|
|
|
@@ -24349,22 +24357,22 @@
|
|
|
24349
24357
|
}
|
|
24350
24358
|
}
|
|
24351
24359
|
|
|
24352
|
-
onChange
|
|
24360
|
+
onChange == null ? void 0 : (_onChange3 = onChange({
|
|
24353
24361
|
fileList: arrError,
|
|
24354
24362
|
file: fileError,
|
|
24355
24363
|
indexReplace: indexReplace.current,
|
|
24356
24364
|
isReplace: indexReplace.current !== null
|
|
24357
|
-
}))
|
|
24365
|
+
})) == null ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) == null ? void 0 : _onChange3$then.catch(error => setError(error.message));
|
|
24358
24366
|
});
|
|
24359
24367
|
} else {
|
|
24360
24368
|
var _onChange4, _onChange4$then;
|
|
24361
24369
|
|
|
24362
|
-
onChange
|
|
24370
|
+
onChange == null ? void 0 : (_onChange4 = onChange({
|
|
24363
24371
|
fileList: arrFile,
|
|
24364
24372
|
file: newFile,
|
|
24365
24373
|
indexReplace: indexReplace.current,
|
|
24366
24374
|
isReplace: indexReplace.current !== null
|
|
24367
|
-
}))
|
|
24375
|
+
})) == null ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) == null ? void 0 : _onChange4$then.catch(error => setError(error.message));
|
|
24368
24376
|
}
|
|
24369
24377
|
|
|
24370
24378
|
if (indexReplace.current !== null) {
|
|
@@ -24389,24 +24397,24 @@
|
|
|
24389
24397
|
// program to get the dimensions of an image
|
|
24390
24398
|
const img = document.createElement('img');
|
|
24391
24399
|
img.src = URL.createObjectURL(files[0]);
|
|
24392
|
-
img.size = files
|
|
24393
|
-
img.type = files
|
|
24400
|
+
img.size = files == null ? void 0 : (_files$ = files[0]) == null ? void 0 : _files$.size;
|
|
24401
|
+
img.type = files == null ? void 0 : (_files$2 = files[0]) == null ? void 0 : _files$2.type;
|
|
24394
24402
|
|
|
24395
24403
|
img.onload = () => {
|
|
24396
24404
|
var _onBeforeCrop, _onBeforeCrop$then;
|
|
24397
24405
|
|
|
24398
|
-
onBeforeCrop
|
|
24406
|
+
onBeforeCrop == null ? void 0 : (_onBeforeCrop = onBeforeCrop(img)) == null ? void 0 : (_onBeforeCrop$then = _onBeforeCrop.then(() => {
|
|
24399
24407
|
setError(null);
|
|
24400
24408
|
toggleModal();
|
|
24401
24409
|
setFileState(files[0]);
|
|
24402
24410
|
setPreviewImage(URL.createObjectURL(files[0]));
|
|
24403
|
-
}))
|
|
24411
|
+
})) == null ? void 0 : _onBeforeCrop$then.catch(error => setError(error == null ? void 0 : error.message));
|
|
24404
24412
|
};
|
|
24405
24413
|
|
|
24406
24414
|
img.onerror = error => {
|
|
24407
24415
|
var _onBeforeCrop2, _onBeforeCrop2$then;
|
|
24408
24416
|
|
|
24409
|
-
onBeforeCrop
|
|
24417
|
+
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));
|
|
24410
24418
|
};
|
|
24411
24419
|
} else {
|
|
24412
24420
|
toggleModal();
|
|
@@ -24418,15 +24426,13 @@
|
|
|
24418
24426
|
}
|
|
24419
24427
|
|
|
24420
24428
|
function handleCrop() {
|
|
24421
|
-
if (completedCrop
|
|
24422
|
-
imgPreview(imgRef.current, completedCrop, 1, 0, ratio).then(blob => {
|
|
24423
|
-
const sizeMB = (blob
|
|
24429
|
+
if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
|
|
24430
|
+
imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState == null ? void 0 : fileState.type).then(blob => {
|
|
24431
|
+
const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
|
|
24424
24432
|
|
|
24425
24433
|
if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
|
|
24426
|
-
|
|
24427
|
-
|
|
24428
|
-
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', {
|
|
24429
|
-
type: blob === null || blob === void 0 ? void 0 : blob.type
|
|
24434
|
+
const file = new File([blob], fileState == null ? void 0 : fileState.name, {
|
|
24435
|
+
type: blob == null ? void 0 : blob.type
|
|
24430
24436
|
});
|
|
24431
24437
|
handleUpload([file]);
|
|
24432
24438
|
setCrop(null);
|
|
@@ -24439,19 +24445,19 @@
|
|
|
24439
24445
|
useWebWorker: true,
|
|
24440
24446
|
alwaysKeepResolution: true
|
|
24441
24447
|
}).then(compressedFile => {
|
|
24442
|
-
var _fileState$
|
|
24448
|
+
var _fileState$name;
|
|
24443
24449
|
|
|
24444
|
-
const file = new File([compressedFile], (fileState
|
|
24445
|
-
type: compressedFile
|
|
24450
|
+
const file = new File([compressedFile], (fileState == null ? void 0 : (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
|
|
24451
|
+
type: compressedFile == null ? void 0 : compressedFile.type
|
|
24446
24452
|
});
|
|
24447
24453
|
handleUpload([file]);
|
|
24448
24454
|
setCrop(null);
|
|
24449
24455
|
setCompletedCrop(null);
|
|
24450
|
-
}).catch(error => console.error(error
|
|
24456
|
+
}).catch(error => console.error(error == null ? void 0 : error.message));
|
|
24451
24457
|
}
|
|
24452
24458
|
|
|
24453
24459
|
toggleModal();
|
|
24454
|
-
}).catch(error => console.error(error
|
|
24460
|
+
}).catch(error => console.error(error == null ? void 0 : error.message));
|
|
24455
24461
|
} else {
|
|
24456
24462
|
handleUpload([fileState]);
|
|
24457
24463
|
toggleModal();
|
|
@@ -24482,7 +24488,7 @@
|
|
|
24482
24488
|
const index = fileList.indexOf(file);
|
|
24483
24489
|
const newFileList = fileList.slice();
|
|
24484
24490
|
newFileList.splice(index, 1);
|
|
24485
|
-
onChange
|
|
24491
|
+
onChange == null ? void 0 : onChange({
|
|
24486
24492
|
fileList: newFileList,
|
|
24487
24493
|
file
|
|
24488
24494
|
});
|
|
@@ -24510,22 +24516,22 @@
|
|
|
24510
24516
|
function handleOpenFile(file) {
|
|
24511
24517
|
var _String, _file$name;
|
|
24512
24518
|
|
|
24513
|
-
let extension = (_String = String(file
|
|
24519
|
+
let extension = (_String = String(file == null ? void 0 : (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
|
|
24514
24520
|
|
|
24515
24521
|
if (extension === 'pdf') {
|
|
24516
|
-
window.open(file
|
|
24522
|
+
window.open(file == null ? void 0 : file.url);
|
|
24517
24523
|
} else {
|
|
24518
|
-
request__default["default"].get(file
|
|
24524
|
+
request__default["default"].get(file == null ? void 0 : file.url).end((err, res) => {
|
|
24519
24525
|
if (err) {
|
|
24520
24526
|
console.error(err.message);
|
|
24521
24527
|
}
|
|
24522
24528
|
|
|
24523
|
-
if (res && res
|
|
24524
|
-
const response = res
|
|
24529
|
+
if (res && res != null && res.ok) {
|
|
24530
|
+
const response = res == null ? void 0 : res.text;
|
|
24525
24531
|
const url = window.URL.createObjectURL(new Blob([response]));
|
|
24526
24532
|
const link = document.createElement('a');
|
|
24527
24533
|
link.href = url;
|
|
24528
|
-
link.setAttribute('download', file
|
|
24534
|
+
link.setAttribute('download', file == null ? void 0 : file.name);
|
|
24529
24535
|
document.body.appendChild(link);
|
|
24530
24536
|
link.click();
|
|
24531
24537
|
document.body.removeChild(link);
|
|
@@ -24595,12 +24601,12 @@
|
|
|
24595
24601
|
}
|
|
24596
24602
|
|
|
24597
24603
|
const renderPicture = () => {
|
|
24598
|
-
return fileList
|
|
24599
|
-
if ((item
|
|
24604
|
+
return fileList == null ? void 0 : fileList.map((item, index) => {
|
|
24605
|
+
if ((item == null ? void 0 : item.status) === 'uploading') {
|
|
24600
24606
|
return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
|
|
24601
24607
|
key: index,
|
|
24602
|
-
progress: item
|
|
24603
|
-
loading: item
|
|
24608
|
+
progress: item == null ? void 0 : item.percent,
|
|
24609
|
+
loading: item == null ? void 0 : item.loading,
|
|
24604
24610
|
__self: undefined,
|
|
24605
24611
|
__source: {
|
|
24606
24612
|
fileName: _jsxFileName$9,
|
|
@@ -24675,14 +24681,14 @@
|
|
|
24675
24681
|
};
|
|
24676
24682
|
|
|
24677
24683
|
const renderFile = () => {
|
|
24678
|
-
return fileList
|
|
24684
|
+
return fileList == null ? void 0 : fileList.map((item, index) => {
|
|
24679
24685
|
var _item$name;
|
|
24680
24686
|
|
|
24681
|
-
if ((item
|
|
24687
|
+
if ((item == null ? void 0 : item.status) === 'uploading') {
|
|
24682
24688
|
return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
|
|
24683
24689
|
key: index,
|
|
24684
|
-
progress: item
|
|
24685
|
-
loading: item
|
|
24690
|
+
progress: item == null ? void 0 : item.percent,
|
|
24691
|
+
loading: item == null ? void 0 : item.loading,
|
|
24686
24692
|
__self: undefined,
|
|
24687
24693
|
__source: {
|
|
24688
24694
|
fileName: _jsxFileName$9,
|
|
@@ -24749,7 +24755,7 @@
|
|
|
24749
24755
|
lineNumber: 665,
|
|
24750
24756
|
columnNumber: 17
|
|
24751
24757
|
}
|
|
24752
|
-
}, ".", item
|
|
24758
|
+
}, ".", item == null ? void 0 : (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
|
|
24753
24759
|
label: item.name,
|
|
24754
24760
|
__self: undefined,
|
|
24755
24761
|
__source: {
|
|
@@ -24921,7 +24927,7 @@
|
|
|
24921
24927
|
lineNumber: 742,
|
|
24922
24928
|
columnNumber: 11
|
|
24923
24929
|
}
|
|
24924
|
-
}, children
|
|
24930
|
+
}, children != null ? children : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
24925
24931
|
__self: this,
|
|
24926
24932
|
__source: {
|
|
24927
24933
|
fileName: _jsxFileName$9,
|
|
@@ -24955,7 +24961,7 @@
|
|
|
24955
24961
|
lineNumber: 748,
|
|
24956
24962
|
columnNumber: 17
|
|
24957
24963
|
}
|
|
24958
|
-
}, placeholder
|
|
24964
|
+
}, placeholder != null ? placeholder : t('uploadPlaceholder', 'Pilih atau letakkan berkas di sini'))))), error && /*#__PURE__*/React__default["default"].createElement(ErrorMessage, {
|
|
24959
24965
|
css: {
|
|
24960
24966
|
width: width - 5
|
|
24961
24967
|
},
|
|
@@ -25122,7 +25128,7 @@
|
|
|
25122
25128
|
|
|
25123
25129
|
return /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
25124
25130
|
direction: "row",
|
|
25125
|
-
gap: (fileList
|
|
25131
|
+
gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
|
|
25126
25132
|
wrap: "wrap",
|
|
25127
25133
|
css: {
|
|
25128
25134
|
userSelect: 'none'
|
|
@@ -26011,10 +26017,10 @@
|
|
|
26011
26017
|
const [isPopover, setIsPopover] = React.useState(false);
|
|
26012
26018
|
|
|
26013
26019
|
function getColor() {
|
|
26014
|
-
const color = props
|
|
26020
|
+
const color = props == null ? void 0 : props.color;
|
|
26015
26021
|
|
|
26016
26022
|
if (typeof color === 'string') {
|
|
26017
|
-
return color
|
|
26023
|
+
return color == null ? void 0 : color.toUpperCase();
|
|
26018
26024
|
}
|
|
26019
26025
|
|
|
26020
26026
|
return `rgba(${color.r},${color.g},${color.b},${color.a})`;
|
|
@@ -28943,7 +28949,7 @@
|
|
|
28943
28949
|
|
|
28944
28950
|
const isActive = props.currentStep === i;
|
|
28945
28951
|
const isComplete = props.isComplete[i - 1];
|
|
28946
|
-
const isAdditional = (_data = data[i - 1])
|
|
28952
|
+
const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional; // eslint-disable-next-line no-lone-blocks
|
|
28947
28953
|
|
|
28948
28954
|
{
|
|
28949
28955
|
var _data$title, _data3, _data4, _data5, _data6, _data7, _data8, _data9, _data$title2, _data10, _data11, _data12, _data13, _data14;
|
|
@@ -28959,7 +28965,7 @@
|
|
|
28959
28965
|
onClick: () => {
|
|
28960
28966
|
var _data2;
|
|
28961
28967
|
|
|
28962
|
-
if (props.onNavClicked && !((_data2 = data[i - 1])
|
|
28968
|
+
if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
|
|
28963
28969
|
|
|
28964
28970
|
if (!forbidClickNav && isComplete && !isHide || isAdditional) {
|
|
28965
28971
|
props.goToStep(i);
|
|
@@ -28993,9 +28999,9 @@
|
|
|
28993
28999
|
lineNumber: 130,
|
|
28994
29000
|
columnNumber: 17
|
|
28995
29001
|
}
|
|
28996
|
-
}), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title)
|
|
29002
|
+
}), 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, {
|
|
28997
29003
|
align: "center",
|
|
28998
|
-
label: (_data5 = data[i - 1])
|
|
29004
|
+
label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
|
|
28999
29005
|
__self: undefined,
|
|
29000
29006
|
__source: {
|
|
29001
29007
|
fileName: _jsxFileName$4,
|
|
@@ -29014,9 +29020,9 @@
|
|
|
29014
29020
|
lineNumber: 135,
|
|
29015
29021
|
columnNumber: 19
|
|
29016
29022
|
}
|
|
29017
|
-
})), ((_data6 = data[i - 1])
|
|
29023
|
+
})), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
29018
29024
|
css: {
|
|
29019
|
-
marginLeft: (_data7 = data[i - 1])
|
|
29025
|
+
marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
|
|
29020
29026
|
},
|
|
29021
29027
|
align: "center",
|
|
29022
29028
|
__self: undefined,
|
|
@@ -29044,7 +29050,7 @@
|
|
|
29044
29050
|
userSelect: 'none',
|
|
29045
29051
|
fontSize: '12px',
|
|
29046
29052
|
textAlign: '-webkit-center',
|
|
29047
|
-
display: ((_data8 = data[i - 1])
|
|
29053
|
+
display: ((_data8 = data[i - 1]) == null ? void 0 : _data8.disabled) && 'none'
|
|
29048
29054
|
},
|
|
29049
29055
|
onClick: () => {
|
|
29050
29056
|
if (props.onNavClicked) props.onNavClicked(i);
|
|
@@ -29076,7 +29082,7 @@
|
|
|
29076
29082
|
height: 24,
|
|
29077
29083
|
borderRadius: '$round',
|
|
29078
29084
|
border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
|
|
29079
|
-
backgroundColor: (_data9 = data[i - 1])
|
|
29085
|
+
backgroundColor: (_data9 = data[i - 1]) != null && _data9.disabled ? '$gray200' : '$white'
|
|
29080
29086
|
},
|
|
29081
29087
|
__self: undefined,
|
|
29082
29088
|
__source: {
|
|
@@ -29094,10 +29100,10 @@
|
|
|
29094
29100
|
lineNumber: 181,
|
|
29095
29101
|
columnNumber: 15
|
|
29096
29102
|
}
|
|
29097
|
-
}, isActive ? typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data10 = data[i - 1]).title)
|
|
29103
|
+
}, 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["default"].createElement(Tooltip$1, {
|
|
29098
29104
|
align: "center",
|
|
29099
29105
|
withClick: true,
|
|
29100
|
-
label: (_data12 = data[i - 1])
|
|
29106
|
+
label: (_data12 = data[i - 1]) == null ? void 0 : _data12.tooltipsContents,
|
|
29101
29107
|
__self: undefined,
|
|
29102
29108
|
__source: {
|
|
29103
29109
|
fileName: _jsxFileName$4,
|
|
@@ -29113,11 +29119,11 @@
|
|
|
29113
29119
|
lineNumber: 186,
|
|
29114
29120
|
columnNumber: 19
|
|
29115
29121
|
}
|
|
29116
|
-
})), isActive && ((_data13 = data[i - 1])
|
|
29122
|
+
})), isActive && ((_data13 = data[i - 1]) == null ? void 0 : _data13.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
29117
29123
|
align: "center",
|
|
29118
29124
|
justify: "center",
|
|
29119
29125
|
css: {
|
|
29120
|
-
marginTop: (_data14 = data[i - 1])
|
|
29126
|
+
marginTop: (_data14 = data[i - 1]) != null && _data14.withTolltip ? 0 : '$spacing-03'
|
|
29121
29127
|
},
|
|
29122
29128
|
__self: undefined,
|
|
29123
29129
|
__source: {
|
|
@@ -29140,54 +29146,50 @@
|
|
|
29140
29146
|
|
|
29141
29147
|
return /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
|
|
29142
29148
|
condition: !isMobile,
|
|
29143
|
-
wrapper: child => {
|
|
29144
|
-
|
|
29145
|
-
|
|
29146
|
-
|
|
29147
|
-
|
|
29148
|
-
|
|
29149
|
-
|
|
29150
|
-
|
|
29151
|
-
|
|
29152
|
-
|
|
29153
|
-
|
|
29154
|
-
|
|
29155
|
-
|
|
29156
|
-
|
|
29157
|
-
|
|
29158
|
-
|
|
29159
|
-
|
|
29160
|
-
|
|
29161
|
-
|
|
29162
|
-
|
|
29163
|
-
|
|
29164
|
-
|
|
29165
|
-
|
|
29166
|
-
|
|
29167
|
-
|
|
29168
|
-
|
|
29169
|
-
|
|
29170
|
-
|
|
29171
|
-
|
|
29172
|
-
|
|
29173
|
-
|
|
29174
|
-
|
|
29175
|
-
|
|
29176
|
-
|
|
29177
|
-
|
|
29178
|
-
|
|
29179
|
-
|
|
29180
|
-
|
|
29181
|
-
|
|
29182
|
-
|
|
29183
|
-
|
|
29184
|
-
|
|
29185
|
-
|
|
29186
|
-
|
|
29187
|
-
columnNumber: 13
|
|
29188
|
-
}
|
|
29189
|
-
}, 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)));
|
|
29190
|
-
},
|
|
29149
|
+
wrapper: child => /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
29150
|
+
css: {
|
|
29151
|
+
opacity: isHide ? 0 : undefined,
|
|
29152
|
+
maxWidth: 311
|
|
29153
|
+
},
|
|
29154
|
+
__self: undefined,
|
|
29155
|
+
__source: {
|
|
29156
|
+
fileName: _jsxFileName$4,
|
|
29157
|
+
lineNumber: 204,
|
|
29158
|
+
columnNumber: 9
|
|
29159
|
+
}
|
|
29160
|
+
}, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
29161
|
+
css: {
|
|
29162
|
+
position: !isMobile && 'sticky',
|
|
29163
|
+
top: !isMobile ? 44 : 40
|
|
29164
|
+
},
|
|
29165
|
+
direction: "column",
|
|
29166
|
+
gap: 7,
|
|
29167
|
+
__self: undefined,
|
|
29168
|
+
__source: {
|
|
29169
|
+
fileName: _jsxFileName$4,
|
|
29170
|
+
lineNumber: 205,
|
|
29171
|
+
columnNumber: 11
|
|
29172
|
+
}
|
|
29173
|
+
}, /*#__PURE__*/React__default["default"].createElement(Card, {
|
|
29174
|
+
css: {
|
|
29175
|
+
height: 'fit-content',
|
|
29176
|
+
padding: 0
|
|
29177
|
+
},
|
|
29178
|
+
showBottomLine: false,
|
|
29179
|
+
__self: undefined,
|
|
29180
|
+
__source: {
|
|
29181
|
+
fileName: _jsxFileName$4,
|
|
29182
|
+
lineNumber: 206,
|
|
29183
|
+
columnNumber: 13
|
|
29184
|
+
}
|
|
29185
|
+
}, child), /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
29186
|
+
__self: undefined,
|
|
29187
|
+
__source: {
|
|
29188
|
+
fileName: _jsxFileName$4,
|
|
29189
|
+
lineNumber: 215,
|
|
29190
|
+
columnNumber: 13
|
|
29191
|
+
}
|
|
29192
|
+
}, 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))),
|
|
29191
29193
|
__self: undefined,
|
|
29192
29194
|
__source: {
|
|
29193
29195
|
fileName: _jsxFileName$4,
|
|
@@ -29255,9 +29257,7 @@
|
|
|
29255
29257
|
}));
|
|
29256
29258
|
}, [props.hide]);
|
|
29257
29259
|
React.useEffect(() => {
|
|
29258
|
-
|
|
29259
|
-
|
|
29260
|
-
props === null || props === void 0 ? void 0 : (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 ? void 0 : _props$onChangeVisibi.call(props, state.hide);
|
|
29260
|
+
props == null ? void 0 : props.onChangeVisibility == null ? void 0 : props.onChangeVisibility(state.hide);
|
|
29261
29261
|
}, [state.hide]);
|
|
29262
29262
|
|
|
29263
29263
|
const toogleVisibility = value => {
|
|
@@ -29269,13 +29269,13 @@
|
|
|
29269
29269
|
const getIsComplete = currentStep => {
|
|
29270
29270
|
var _state$isComplete;
|
|
29271
29271
|
|
|
29272
|
-
return state
|
|
29272
|
+
return state == null ? void 0 : (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
|
|
29273
29273
|
};
|
|
29274
29274
|
|
|
29275
29275
|
const getTitleStep = currentStep => {
|
|
29276
29276
|
var _props$navContents, _props$navContents2;
|
|
29277
29277
|
|
|
29278
|
-
return props
|
|
29278
|
+
return props == null ? void 0 : (_props$navContents = props.navContents) == null ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents2.title;
|
|
29279
29279
|
};
|
|
29280
29280
|
|
|
29281
29281
|
const setState = value => {
|
|
@@ -29317,15 +29317,15 @@
|
|
|
29317
29317
|
});
|
|
29318
29318
|
props.onStepChange && props.onStepChange(e);
|
|
29319
29319
|
|
|
29320
|
-
if (props
|
|
29321
|
-
if ((e
|
|
29320
|
+
if (props != null && (_props$navContents3 = props.navContents) != null && (_props$navContents4 = _props$navContents3[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents4.disabled) {
|
|
29321
|
+
if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
|
|
29322
29322
|
var _state$SW;
|
|
29323
29323
|
|
|
29324
|
-
state
|
|
29324
|
+
state == null ? void 0 : (_state$SW = state.SW) == null ? void 0 : _state$SW.nextStep();
|
|
29325
29325
|
} else {
|
|
29326
29326
|
var _state$SW2;
|
|
29327
29327
|
|
|
29328
|
-
state
|
|
29328
|
+
state == null ? void 0 : (_state$SW2 = state.SW) == null ? void 0 : _state$SW2.previousStep();
|
|
29329
29329
|
}
|
|
29330
29330
|
}
|
|
29331
29331
|
};
|
|
@@ -29341,11 +29341,11 @@
|
|
|
29341
29341
|
}, /*#__PURE__*/React__default["default"].createElement(StepWizardContext.Provider, {
|
|
29342
29342
|
value: {
|
|
29343
29343
|
toogleVisibility,
|
|
29344
|
-
isHide: state
|
|
29344
|
+
isHide: state == null ? void 0 : state.hide,
|
|
29345
29345
|
setComplete,
|
|
29346
29346
|
setState,
|
|
29347
29347
|
state,
|
|
29348
|
-
SW: state
|
|
29348
|
+
SW: state == null ? void 0 : state.SW,
|
|
29349
29349
|
forbidClickNav: props.forbidClickNav,
|
|
29350
29350
|
titles: props.titles,
|
|
29351
29351
|
isMobile: props.isMobile,
|
|
@@ -29368,7 +29368,7 @@
|
|
|
29368
29368
|
nav: /*#__PURE__*/React__default["default"].createElement(Navigation, {
|
|
29369
29369
|
onNavClicked: props.onNavClicked,
|
|
29370
29370
|
isComplete: state.isComplete,
|
|
29371
|
-
appendContent: props
|
|
29371
|
+
appendContent: props == null ? void 0 : props.appendContent,
|
|
29372
29372
|
__self: undefined,
|
|
29373
29373
|
__source: {
|
|
29374
29374
|
fileName: _jsxFileName$4,
|
|
@@ -29527,10 +29527,10 @@
|
|
|
29527
29527
|
function getDatasets(content, activeId, isCollapse) {
|
|
29528
29528
|
const datasets = [];
|
|
29529
29529
|
|
|
29530
|
-
for (let i = 0; i < (content
|
|
29530
|
+
for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
|
|
29531
29531
|
var _content$i;
|
|
29532
29532
|
|
|
29533
|
-
if (((_content$i = content[i])
|
|
29533
|
+
if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
|
|
29534
29534
|
datasets.unshift(content[i]);
|
|
29535
29535
|
} else {
|
|
29536
29536
|
datasets.push(content[i]);
|
|
@@ -29570,7 +29570,7 @@
|
|
|
29570
29570
|
lineNumber: 107,
|
|
29571
29571
|
columnNumber: 7
|
|
29572
29572
|
}
|
|
29573
|
-
}, (_getDatasets = getDatasets(content, activeId, isCollapse))
|
|
29573
|
+
}, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
|
|
29574
29574
|
return /*#__PURE__*/React__default["default"].createElement(List, {
|
|
29575
29575
|
key: index,
|
|
29576
29576
|
__self: this,
|
|
@@ -29587,11 +29587,11 @@
|
|
|
29587
29587
|
marginLeft: '-4px !important',
|
|
29588
29588
|
borderLeftWidth: '4px !important',
|
|
29589
29589
|
borderLeftStyle: 'solid !important',
|
|
29590
|
-
borderLeftColor: `${(item
|
|
29590
|
+
borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
|
|
29591
29591
|
paddingLeft: '16px !important',
|
|
29592
29592
|
minHeight: 25
|
|
29593
29593
|
},
|
|
29594
|
-
"data-to-scrollspy-id": item
|
|
29594
|
+
"data-to-scrollspy-id": item == null ? void 0 : item.id,
|
|
29595
29595
|
__self: this,
|
|
29596
29596
|
__source: {
|
|
29597
29597
|
fileName: _jsxFileName$2,
|
|
@@ -29600,14 +29600,14 @@
|
|
|
29600
29600
|
}
|
|
29601
29601
|
}, /*#__PURE__*/React__default["default"].createElement(Title$1, {
|
|
29602
29602
|
className: "link-title",
|
|
29603
|
-
active: (item
|
|
29604
|
-
href: `#${item
|
|
29603
|
+
active: (item == null ? void 0 : item.id) === activeId,
|
|
29604
|
+
href: `#${item == null ? void 0 : item.id}`,
|
|
29605
29605
|
onClick: e => {
|
|
29606
29606
|
var _e$currentTarget, _e$currentTarget$href, _e$currentTarget$href2, _e$currentTarget2, _e$currentTarget2$hre, _e$currentTarget2$hre2;
|
|
29607
29607
|
|
|
29608
29608
|
e.preventDefault();
|
|
29609
|
-
onNavClick
|
|
29610
|
-
const target = window.document.getElementById(e
|
|
29609
|
+
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]);
|
|
29610
|
+
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]);
|
|
29611
29611
|
|
|
29612
29612
|
if (target) {
|
|
29613
29613
|
var headerOffset = 20;
|
|
@@ -29633,7 +29633,7 @@
|
|
|
29633
29633
|
lineNumber: 125,
|
|
29634
29634
|
columnNumber: 17
|
|
29635
29635
|
}
|
|
29636
|
-
}, item
|
|
29636
|
+
}, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
|
|
29637
29637
|
})));
|
|
29638
29638
|
}
|
|
29639
29639
|
|
|
@@ -30863,40 +30863,56 @@
|
|
|
30863
30863
|
width: 16,
|
|
30864
30864
|
height: 16,
|
|
30865
30865
|
background: '$bgWhite',
|
|
30866
|
-
|
|
30866
|
+
borderWidth: 4,
|
|
30867
|
+
borderStyle: 'solid',
|
|
30868
|
+
borderColor: '$primary500',
|
|
30867
30869
|
borderRadius: 50,
|
|
30868
30870
|
boxSizing: 'border-box',
|
|
30871
|
+
position: 'relative',
|
|
30869
30872
|
variants: {
|
|
30870
30873
|
state: {
|
|
30871
30874
|
active: {
|
|
30872
|
-
|
|
30875
|
+
borderColor: '$primary500'
|
|
30873
30876
|
},
|
|
30874
30877
|
inActive: {
|
|
30875
|
-
|
|
30878
|
+
borderColor: '$gray150'
|
|
30876
30879
|
},
|
|
30877
30880
|
error: {
|
|
30878
|
-
|
|
30881
|
+
borderColor: '$red400'
|
|
30882
|
+
}
|
|
30883
|
+
},
|
|
30884
|
+
withIcon: {
|
|
30885
|
+
true: {
|
|
30886
|
+
display: 'flex',
|
|
30887
|
+
justifyContent: 'center',
|
|
30888
|
+
alignItems: 'center',
|
|
30889
|
+
width: 40,
|
|
30890
|
+
height: 40,
|
|
30891
|
+
borderWidth: 2
|
|
30892
|
+
}
|
|
30893
|
+
},
|
|
30894
|
+
completed: {
|
|
30895
|
+
true: {
|
|
30896
|
+
backgroundColor: '$primary500'
|
|
30879
30897
|
}
|
|
30880
30898
|
}
|
|
30881
30899
|
}
|
|
30882
30900
|
});
|
|
30883
30901
|
var Title = styled('p', {
|
|
30884
30902
|
fontStyle: 'normal',
|
|
30885
|
-
fontWeight: 600,
|
|
30886
30903
|
fontSize: 14,
|
|
30887
30904
|
color: '$textPrimary',
|
|
30888
30905
|
margin: 0,
|
|
30906
|
+
zIndex: 10,
|
|
30889
30907
|
variants: {
|
|
30890
30908
|
state: {
|
|
30891
30909
|
active: {
|
|
30892
|
-
|
|
30910
|
+
fontWeight: 600
|
|
30893
30911
|
},
|
|
30894
30912
|
inActive: {
|
|
30895
|
-
color: '$textDisable',
|
|
30896
30913
|
fontWeight: 400
|
|
30897
30914
|
},
|
|
30898
30915
|
error: {
|
|
30899
|
-
color: '$textRed',
|
|
30900
30916
|
fontWeight: 400
|
|
30901
30917
|
}
|
|
30902
30918
|
}
|
|
@@ -30912,18 +30928,46 @@
|
|
|
30912
30928
|
backgroundColor: '$primary500'
|
|
30913
30929
|
},
|
|
30914
30930
|
inActive: {
|
|
30915
|
-
backgroundColor: '$
|
|
30931
|
+
backgroundColor: '$gray150'
|
|
30916
30932
|
},
|
|
30917
30933
|
error: {
|
|
30918
30934
|
backgroundColor: '$red400'
|
|
30919
30935
|
}
|
|
30936
|
+
},
|
|
30937
|
+
withIcon: {
|
|
30938
|
+
true: {
|
|
30939
|
+
width: 'calc(100% - 40px)'
|
|
30940
|
+
}
|
|
30920
30941
|
}
|
|
30921
30942
|
}
|
|
30922
30943
|
});
|
|
30944
|
+
|
|
30945
|
+
var SvgCheckFilled = function SvgCheckFilled() {
|
|
30946
|
+
return jsxRuntime.jsx("svg", __assign({
|
|
30947
|
+
width: "24",
|
|
30948
|
+
height: "24",
|
|
30949
|
+
viewBox: "0 0 24 24",
|
|
30950
|
+
fill: "none",
|
|
30951
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
30952
|
+
}, {
|
|
30953
|
+
children: jsxRuntime.jsx("path", {
|
|
30954
|
+
d: "M5 11.5L10 16.5L19 7.5",
|
|
30955
|
+
stroke: "white",
|
|
30956
|
+
"stroke-width": "2",
|
|
30957
|
+
"stroke-linecap": "round",
|
|
30958
|
+
"stroke-linejoin": "round"
|
|
30959
|
+
}, void 0)
|
|
30960
|
+
}), void 0);
|
|
30961
|
+
};
|
|
30962
|
+
|
|
30923
30963
|
function ProgressIndicator(props) {
|
|
30964
|
+
var _a;
|
|
30965
|
+
|
|
30924
30966
|
var progressList = props.progressList,
|
|
30925
30967
|
progress = props.progress,
|
|
30926
30968
|
progressError = props.progressError;
|
|
30969
|
+
var isMobile = useMediaQuery('(max-width: 767px)');
|
|
30970
|
+
var isIcon = Boolean((_a = progressList === null || progressList === void 0 ? void 0 : progressList[0]) === null || _a === void 0 ? void 0 : _a.icon);
|
|
30927
30971
|
|
|
30928
30972
|
function getState(itemProgress) {
|
|
30929
30973
|
if (itemProgress === progressError) {
|
|
@@ -30937,41 +30981,108 @@
|
|
|
30937
30981
|
}
|
|
30938
30982
|
}
|
|
30939
30983
|
|
|
30940
|
-
|
|
30984
|
+
function renderIcon(item) {
|
|
30985
|
+
var isCompleted = (item === null || item === void 0 ? void 0 : item.progress) < progress && (item === null || item === void 0 ? void 0 : item.progress) !== progressError;
|
|
30986
|
+
var state = getState(item === null || item === void 0 ? void 0 : item.progress);
|
|
30987
|
+
|
|
30988
|
+
var getColor = function getColor(state) {
|
|
30989
|
+
switch (state) {
|
|
30990
|
+
case 'error':
|
|
30991
|
+
return colors$4.red400;
|
|
30992
|
+
|
|
30993
|
+
case 'active':
|
|
30994
|
+
return colors$4.primary500;
|
|
30995
|
+
|
|
30996
|
+
default:
|
|
30997
|
+
return colors$4.gray150;
|
|
30998
|
+
}
|
|
30999
|
+
};
|
|
31000
|
+
|
|
31001
|
+
var iconProps = {
|
|
31002
|
+
size: 24,
|
|
31003
|
+
color: getColor(state)
|
|
31004
|
+
};
|
|
31005
|
+
return isCompleted ? jsxRuntime.jsx(SvgCheckFilled, {}, void 0) : /*#__PURE__*/React.cloneElement(item === null || item === void 0 ? void 0 : item.icon, iconProps);
|
|
31006
|
+
}
|
|
31007
|
+
|
|
31008
|
+
return jsxRuntime.jsx(Container$4, __assign({
|
|
30941
31009
|
direction: "column"
|
|
30942
31010
|
}, {
|
|
30943
|
-
children:
|
|
30944
|
-
|
|
30945
|
-
|
|
30946
|
-
|
|
30947
|
-
|
|
30948
|
-
|
|
30949
|
-
|
|
30950
|
-
|
|
30951
|
-
|
|
30952
|
-
|
|
30953
|
-
|
|
30954
|
-
|
|
31011
|
+
children: jsxRuntime.jsx(Flex$1, __assign({
|
|
31012
|
+
css: {
|
|
31013
|
+
margin: '0px 8px',
|
|
31014
|
+
'@md': {
|
|
31015
|
+
margin: '0px 4px'
|
|
31016
|
+
},
|
|
31017
|
+
'& > div:not(:first-child):not(:last-child)': {
|
|
31018
|
+
'.title-progress': {
|
|
31019
|
+
display: 'flex',
|
|
31020
|
+
justifyContent: 'center'
|
|
31021
|
+
}
|
|
31022
|
+
},
|
|
31023
|
+
'& > div:first-child': {
|
|
31024
|
+
'.title-progress': {
|
|
31025
|
+
display: 'flex',
|
|
31026
|
+
justifyContent: 'start',
|
|
31027
|
+
left: '-10%',
|
|
31028
|
+
right: "-".concat(isIcon ? 500 : 3000, "%")
|
|
31029
|
+
}
|
|
31030
|
+
},
|
|
31031
|
+
'& > div:last-child': {
|
|
31032
|
+
'.title-progress': {
|
|
31033
|
+
display: 'flex',
|
|
31034
|
+
justifyContent: 'end',
|
|
31035
|
+
right: '-10%',
|
|
31036
|
+
left: "-".concat(isIcon ? 500 : 3000, "%")
|
|
31037
|
+
}
|
|
31038
|
+
}
|
|
31039
|
+
},
|
|
30955
31040
|
justify: "between"
|
|
30956
31041
|
}, {
|
|
30957
31042
|
children: progressList === null || progressList === void 0 ? void 0 : progressList.map(function (item, index) {
|
|
31043
|
+
var _a;
|
|
31044
|
+
|
|
31045
|
+
var isCompleted = (item === null || item === void 0 ? void 0 : item.progress) < progress && (item === null || item === void 0 ? void 0 : item.progress) !== progressError;
|
|
30958
31046
|
return jsxRuntime.jsxs(Flex$1, __assign({
|
|
30959
31047
|
align: "center",
|
|
30960
31048
|
css: {
|
|
30961
|
-
flex: (progressList === null || progressList === void 0 ? void 0 : progressList.length) !== index + 1 ? 1 : 0
|
|
31049
|
+
flex: (progressList === null || progressList === void 0 ? void 0 : progressList.length) !== index + 1 ? 1 : 0,
|
|
31050
|
+
paddingTop: 45
|
|
30962
31051
|
}
|
|
30963
31052
|
}, {
|
|
30964
|
-
children: [jsxRuntime.
|
|
30965
|
-
state: getState(item === null || item === void 0 ? void 0 : item.progress)
|
|
30966
|
-
}, void 0), jsxRuntime.jsx(Line, {
|
|
31053
|
+
children: [jsxRuntime.jsxs(Status, __assign({
|
|
30967
31054
|
state: getState(item === null || item === void 0 ? void 0 : item.progress),
|
|
31055
|
+
withIcon: isIcon,
|
|
31056
|
+
completed: isCompleted
|
|
31057
|
+
}, {
|
|
31058
|
+
children: [isIcon && renderIcon(item), jsxRuntime.jsx(Box, __assign({
|
|
31059
|
+
className: "title-progress",
|
|
31060
|
+
css: {
|
|
31061
|
+
position: 'absolute',
|
|
31062
|
+
top: -45,
|
|
31063
|
+
left: "-".concat(isIcon ? 250 : 2000, "%"),
|
|
31064
|
+
right: "-".concat(isIcon ? 250 : 2000, "%")
|
|
31065
|
+
}
|
|
31066
|
+
}, {
|
|
31067
|
+
children: jsxRuntime.jsx(Title, __assign({
|
|
31068
|
+
css: {
|
|
31069
|
+
opacity: isMobile && (item === null || item === void 0 ? void 0 : item.progress) !== progress ? 0 : 1
|
|
31070
|
+
},
|
|
31071
|
+
state: getState(item === null || item === void 0 ? void 0 : item.progress)
|
|
31072
|
+
}, {
|
|
31073
|
+
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
|
|
31074
|
+
}), index)
|
|
31075
|
+
}), void 0)]
|
|
31076
|
+
}), void 0), jsxRuntime.jsx(Line, {
|
|
31077
|
+
state: getState((item === null || item === void 0 ? void 0 : item.progress) + 1),
|
|
31078
|
+
withIcon: isIcon,
|
|
30968
31079
|
css: {
|
|
30969
31080
|
display: (progressList === null || progressList === void 0 ? void 0 : progressList.length) === index + 1 ? 'none' : 'unset'
|
|
30970
31081
|
}
|
|
30971
31082
|
}, void 0)]
|
|
30972
31083
|
}), index);
|
|
30973
31084
|
})
|
|
30974
|
-
}), void 0)
|
|
31085
|
+
}), void 0)
|
|
30975
31086
|
}), void 0);
|
|
30976
31087
|
}
|
|
30977
31088
|
|