@majoo-ui/react 1.59.9 → 1.59.10-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +237 -242
- package/index.umd.js +237 -242
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -3871,7 +3871,7 @@
|
|
|
3871
3871
|
onClick: e => {
|
|
3872
3872
|
e.preventDefault();
|
|
3873
3873
|
e.stopPropagation();
|
|
3874
|
-
value
|
|
3874
|
+
value == null || value.onRemove();
|
|
3875
3875
|
},
|
|
3876
3876
|
__self: undefined,
|
|
3877
3877
|
__source: {
|
|
@@ -3890,7 +3890,6 @@
|
|
|
3890
3890
|
}
|
|
3891
3891
|
})));
|
|
3892
3892
|
const SingleTagBanner = props => {
|
|
3893
|
-
var _props$icon;
|
|
3894
3893
|
return /*#__PURE__*/React__namespace.createElement(Flex$1, {
|
|
3895
3894
|
gap: 2,
|
|
3896
3895
|
direction: "column",
|
|
@@ -3916,7 +3915,7 @@
|
|
|
3916
3915
|
lineNumber: 212,
|
|
3917
3916
|
columnNumber: 9
|
|
3918
3917
|
}
|
|
3919
|
-
}, (props
|
|
3918
|
+
}, (props == null ? void 0 : props.icon) && /*#__PURE__*/React__namespace.createElement(Flex$1, {
|
|
3920
3919
|
css: {
|
|
3921
3920
|
marginTop: '-2px'
|
|
3922
3921
|
},
|
|
@@ -3926,7 +3925,7 @@
|
|
|
3926
3925
|
lineNumber: 213,
|
|
3927
3926
|
columnNumber: 27
|
|
3928
3927
|
}
|
|
3929
|
-
}, props
|
|
3928
|
+
}, props == null || props.icon == null ? void 0 : props.icon()), /*#__PURE__*/React__namespace.createElement(Flex$1, {
|
|
3930
3929
|
gap: 2,
|
|
3931
3930
|
direction: "column",
|
|
3932
3931
|
css: {
|
|
@@ -3957,7 +3956,7 @@
|
|
|
3957
3956
|
onClick: e => {
|
|
3958
3957
|
e.preventDefault();
|
|
3959
3958
|
e.stopPropagation();
|
|
3960
|
-
props
|
|
3959
|
+
props == null || props.onRemove();
|
|
3961
3960
|
},
|
|
3962
3961
|
closeCenter: !props.title && !props.link,
|
|
3963
3962
|
__self: undefined,
|
|
@@ -6821,7 +6820,7 @@
|
|
|
6821
6820
|
React.useEffect(() => {
|
|
6822
6821
|
if (textareaRef.current) {
|
|
6823
6822
|
textareaRef.current.style.height = '50px';
|
|
6824
|
-
const scrollHeight = textareaRef
|
|
6823
|
+
const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
|
|
6825
6824
|
textareaRef.current.style.height = scrollHeight + 5 + 'px';
|
|
6826
6825
|
}
|
|
6827
6826
|
}, []);
|
|
@@ -6876,7 +6875,7 @@
|
|
|
6876
6875
|
var _jsxFileName$J = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputRadio/InputRadioGroup.js";
|
|
6877
6876
|
const RadioGroup = styled(RadioGroupPrimitive__namespace.Root, Flex$1);
|
|
6878
6877
|
function InputRadioGroup(props) {
|
|
6879
|
-
return (props
|
|
6878
|
+
return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default["default"].createElement(InputRadioContext.Provider, {
|
|
6880
6879
|
value: props,
|
|
6881
6880
|
__self: this,
|
|
6882
6881
|
__source: {
|
|
@@ -6891,7 +6890,7 @@
|
|
|
6891
6890
|
lineNumber: 14,
|
|
6892
6891
|
columnNumber: 9
|
|
6893
6892
|
}
|
|
6894
|
-
}), React__default["default"].Children.map(props
|
|
6893
|
+
}), React__default["default"].Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
6895
6894
|
style: Object.assign({}, child.props.style, {
|
|
6896
6895
|
opacity: 1
|
|
6897
6896
|
})
|
|
@@ -7079,9 +7078,8 @@
|
|
|
7079
7078
|
return /*#__PURE__*/React__default["default"].createElement(InputNumber, _extends({}, inputProps, {
|
|
7080
7079
|
readOnly: readOnly,
|
|
7081
7080
|
onFocus: () => {
|
|
7082
|
-
var _inputProps$onFocus;
|
|
7083
7081
|
onValueChange(props.value);
|
|
7084
|
-
inputProps
|
|
7082
|
+
inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
|
|
7085
7083
|
},
|
|
7086
7084
|
asChild: true,
|
|
7087
7085
|
__self: this,
|
|
@@ -7096,9 +7094,8 @@
|
|
|
7096
7094
|
disabled: disabled,
|
|
7097
7095
|
readOnly: readOnly,
|
|
7098
7096
|
onFocus: () => {
|
|
7099
|
-
var _inputProps$onFocus2;
|
|
7100
7097
|
onValueChange(props.value);
|
|
7101
|
-
inputProps
|
|
7098
|
+
inputProps == null || inputProps.onFocus == null || inputProps.onFocus();
|
|
7102
7099
|
},
|
|
7103
7100
|
asChild: true,
|
|
7104
7101
|
__self: this,
|
|
@@ -9788,24 +9785,24 @@
|
|
|
9788
9785
|
allowLeadingZeros,
|
|
9789
9786
|
format
|
|
9790
9787
|
} = Object.assign({}, ref);
|
|
9791
|
-
const formattedValueStartsWithZero = (_formattedValue = formattedValue)
|
|
9792
|
-
const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue)
|
|
9788
|
+
const formattedValueStartsWithZero = (_formattedValue = formattedValue) == null ? void 0 : _formattedValue.startsWith(`${prefix}0`);
|
|
9789
|
+
const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) == null ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
|
|
9793
9790
|
const emptyFormattedValue = prefix || suffix || prefix + suffix || '';
|
|
9794
9791
|
if ((formattedValueStartsWithZero || formattedWithZeroAndSuffix) && !allowLeadingZeros && !format) {
|
|
9795
9792
|
var _formattedValue3, _input$value;
|
|
9796
9793
|
const isSpecialChar = /^[+-]/.test(formattedValue);
|
|
9797
|
-
if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue)
|
|
9794
|
+
if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) != null && _formattedValue3.includes('0,'))) {
|
|
9798
9795
|
var _formattedValue4, _numAsString;
|
|
9799
|
-
formattedValue = (_formattedValue4 = formattedValue)
|
|
9800
|
-
numAsString = (_numAsString = numAsString)
|
|
9796
|
+
formattedValue = (_formattedValue4 = formattedValue) == null ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
|
|
9797
|
+
numAsString = (_numAsString = numAsString) == null ? void 0 : _numAsString.replace(/^0+/, '');
|
|
9801
9798
|
}
|
|
9802
|
-
if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input
|
|
9799
|
+
if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input == null ? void 0 : input.value)) {
|
|
9803
9800
|
formattedValue = `${prefix}0${suffix}`;
|
|
9804
9801
|
numAsString = '0';
|
|
9805
|
-
} else if (input
|
|
9802
|
+
} else if (input != null && (_input$value = input.value) != null && _input$value.includes('0,')) {
|
|
9806
9803
|
allowLeadingZeros = true;
|
|
9807
|
-
formattedValue = input
|
|
9808
|
-
numAsString = this.removeFormatting(input
|
|
9804
|
+
formattedValue = input == null ? void 0 : input.value;
|
|
9805
|
+
numAsString = this.removeFormatting(input == null ? void 0 : input.value);
|
|
9809
9806
|
}
|
|
9810
9807
|
}
|
|
9811
9808
|
//end adjustment
|
|
@@ -10263,7 +10260,7 @@
|
|
|
10263
10260
|
}
|
|
10264
10261
|
function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
|
|
10265
10262
|
const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
|
|
10266
|
-
return maxValue + (prefix
|
|
10263
|
+
return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
|
|
10267
10264
|
}
|
|
10268
10265
|
const InputNumber = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
10269
10266
|
let {
|
|
@@ -10315,9 +10312,9 @@
|
|
|
10315
10312
|
size: size,
|
|
10316
10313
|
isInvalid: isInvalid,
|
|
10317
10314
|
readOnly: readOnly,
|
|
10318
|
-
isReadOnly: readOnly && !(props
|
|
10315
|
+
isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
|
|
10319
10316
|
disabled: disabled,
|
|
10320
|
-
maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props
|
|
10317
|
+
maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
|
|
10321
10318
|
thousandSeparator: thousandSeparator
|
|
10322
10319
|
}, props, {
|
|
10323
10320
|
__self: undefined,
|
|
@@ -10655,16 +10652,16 @@
|
|
|
10655
10652
|
const addTags = event => {
|
|
10656
10653
|
if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
|
|
10657
10654
|
if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
|
|
10658
|
-
onEnter
|
|
10655
|
+
onEnter == null || onEnter({
|
|
10659
10656
|
key: 'duplicate',
|
|
10660
10657
|
value: event.target.value
|
|
10661
10658
|
});
|
|
10662
10659
|
return;
|
|
10663
10660
|
}
|
|
10664
|
-
if (pattern && pattern
|
|
10661
|
+
if (pattern && pattern != null && pattern.regex) {
|
|
10665
10662
|
const regex = new RegExp(pattern.regex);
|
|
10666
10663
|
if (!regex.test(event.target.value)) {
|
|
10667
|
-
onEnter
|
|
10664
|
+
onEnter == null || onEnter({
|
|
10668
10665
|
key: 'error',
|
|
10669
10666
|
value: event.target.value
|
|
10670
10667
|
});
|
|
@@ -10673,7 +10670,7 @@
|
|
|
10673
10670
|
}
|
|
10674
10671
|
}
|
|
10675
10672
|
setRegexError(false);
|
|
10676
|
-
onEnter
|
|
10673
|
+
onEnter == null || onEnter({
|
|
10677
10674
|
key: 'success',
|
|
10678
10675
|
value: event.target.value
|
|
10679
10676
|
});
|
|
@@ -10685,7 +10682,7 @@
|
|
|
10685
10682
|
if (disabled || readOnly) {
|
|
10686
10683
|
return tags;
|
|
10687
10684
|
} else if (key === 'removeTag' || key === 'Backspace') {
|
|
10688
|
-
onRemoveItem
|
|
10685
|
+
onRemoveItem == null || onRemoveItem(tags[index]);
|
|
10689
10686
|
setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
|
|
10690
10687
|
}
|
|
10691
10688
|
};
|
|
@@ -10736,7 +10733,7 @@
|
|
|
10736
10733
|
lineNumber: 180,
|
|
10737
10734
|
columnNumber: 9
|
|
10738
10735
|
}
|
|
10739
|
-
})), regexError && pattern && (pattern
|
|
10736
|
+
})), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default["default"].createElement(FormHelper, {
|
|
10740
10737
|
color: "red",
|
|
10741
10738
|
__self: this,
|
|
10742
10739
|
__source: {
|
|
@@ -11044,14 +11041,14 @@
|
|
|
11044
11041
|
t
|
|
11045
11042
|
} = reactI18next.useTranslation(['MajooUI/inputSearchbox', 'translation']);
|
|
11046
11043
|
const [value, setValue] = React.useState(defaultValue);
|
|
11047
|
-
const inputValue = (_props$value = props
|
|
11048
|
-
const debounceChange = React.useCallback(debounce__default["default"](e => onChange
|
|
11044
|
+
const inputValue = (_props$value = props == null ? void 0 : props.value) != null ? _props$value : value;
|
|
11045
|
+
const debounceChange = React.useCallback(debounce__default["default"](e => onChange == null ? void 0 : onChange(e), 1000), [onChange]);
|
|
11049
11046
|
const handleChange = React.useCallback(e => {
|
|
11050
11047
|
setValue(e.target.value);
|
|
11051
11048
|
if (withDebounce) {
|
|
11052
11049
|
debounceChange(e.target.value);
|
|
11053
11050
|
} else {
|
|
11054
|
-
onChange
|
|
11051
|
+
onChange == null || onChange(e.target.value);
|
|
11055
11052
|
}
|
|
11056
11053
|
}, [onChange, debounceChange, withDebounce]);
|
|
11057
11054
|
const handleClearButtonClick = e => {
|
|
@@ -11104,7 +11101,7 @@
|
|
|
11104
11101
|
columnNumber: 7
|
|
11105
11102
|
}
|
|
11106
11103
|
})), /*#__PURE__*/React__default["default"].createElement(InputRightElement, {
|
|
11107
|
-
children: (inputValue
|
|
11104
|
+
children: (inputValue == null ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(SvgCloseFilled, {
|
|
11108
11105
|
color: colors$7.iconSecondary,
|
|
11109
11106
|
__self: undefined,
|
|
11110
11107
|
__source: {
|
|
@@ -11174,7 +11171,7 @@
|
|
|
11174
11171
|
middleware: [react$1.offset(_sideOffset), react$1.shift(), _flip && react$1.flip()],
|
|
11175
11172
|
onOpenChange: isOpen => {
|
|
11176
11173
|
setOpenState(isOpen);
|
|
11177
|
-
!isOpen && (onClose
|
|
11174
|
+
!isOpen && (onClose == null ? void 0 : onClose());
|
|
11178
11175
|
},
|
|
11179
11176
|
placement
|
|
11180
11177
|
});
|
|
@@ -11617,6 +11614,9 @@
|
|
|
11617
11614
|
}, void 0)]
|
|
11618
11615
|
}), void 0);
|
|
11619
11616
|
});
|
|
11617
|
+
function isHTMLElement(element) {
|
|
11618
|
+
return 'offsetTop' in element;
|
|
11619
|
+
}
|
|
11620
11620
|
var InputSelect = /*#__PURE__*/React__namespace.forwardRef(function (_a, ref) {
|
|
11621
11621
|
var option = _a.option,
|
|
11622
11622
|
onChange = _a.onChange,
|
|
@@ -11697,8 +11697,8 @@
|
|
|
11697
11697
|
}
|
|
11698
11698
|
var scrollToSelectedElement = function scrollToSelectedElement() {
|
|
11699
11699
|
var element = document.querySelector("[data-index=\"".concat(selectedIndex, "\"]"));
|
|
11700
|
-
|
|
11701
|
-
|
|
11700
|
+
var scrollContainer = scrollerRef.current;
|
|
11701
|
+
if (element && isHTMLElement(element) && scrollContainer) {
|
|
11702
11702
|
var elementPosition = element.offsetTop - scrollContainer.offsetTop;
|
|
11703
11703
|
scrollContainer.scrollTop = elementPosition;
|
|
11704
11704
|
}
|
|
@@ -13601,13 +13601,13 @@
|
|
|
13601
13601
|
const isShowSelectAll = showSelectAll && !maxSelectedItem;
|
|
13602
13602
|
React.useEffect(() => {
|
|
13603
13603
|
var _scrollerRef$current;
|
|
13604
|
-
(_scrollerRef$current = scrollerRef.current)
|
|
13604
|
+
(_scrollerRef$current = scrollerRef.current) == null || _scrollerRef$current.scrollTo({
|
|
13605
13605
|
top: 0
|
|
13606
13606
|
});
|
|
13607
13607
|
}, [query]);
|
|
13608
13608
|
React.useEffect(() => {
|
|
13609
|
-
if (defaultValue
|
|
13610
|
-
if (value
|
|
13609
|
+
if (defaultValue != null && defaultValue.length) {
|
|
13610
|
+
if (value != null && value.length) {
|
|
13611
13611
|
setInputSelectValue(value);
|
|
13612
13612
|
}
|
|
13613
13613
|
} else {
|
|
@@ -13672,7 +13672,7 @@
|
|
|
13672
13672
|
removeSelectedItem,
|
|
13673
13673
|
selectedItems
|
|
13674
13674
|
} = Downshift.useMultipleSelection({
|
|
13675
|
-
selectedItems: selectedValue.length > 0 ? initItem
|
|
13675
|
+
selectedItems: selectedValue.length > 0 ? initItem == null || (_initItem$reduce = initItem.reduce((acc, item) => [...acc, item, ...(item.children ? item.children : [])], [])) == null ? void 0 : _initItem$reduce.filter(item => selectedValue.includes(item.id)) : []
|
|
13676
13676
|
});
|
|
13677
13677
|
const generateOptions = data => {
|
|
13678
13678
|
return data.map(option => {
|
|
@@ -13694,7 +13694,7 @@
|
|
|
13694
13694
|
};
|
|
13695
13695
|
const debouncedSearch = React__default["default"].useRef(debounce__default["default"](_async(function (query) {
|
|
13696
13696
|
setQuery(query);
|
|
13697
|
-
onSearch
|
|
13697
|
+
onSearch == null || onSearch(query);
|
|
13698
13698
|
return _await();
|
|
13699
13699
|
}), 1000)).current;
|
|
13700
13700
|
React__default["default"].useEffect(() => {
|
|
@@ -13703,7 +13703,7 @@
|
|
|
13703
13703
|
};
|
|
13704
13704
|
}, [debouncedSearch]);
|
|
13705
13705
|
const handleInputValue = input => {
|
|
13706
|
-
onSearch
|
|
13706
|
+
onSearch == null || onSearch(input);
|
|
13707
13707
|
if (input === '') {
|
|
13708
13708
|
if (disabledOptions.length > 0) {
|
|
13709
13709
|
setItems(generateOptions(sortDisabled));
|
|
@@ -13711,9 +13711,9 @@
|
|
|
13711
13711
|
return setItems(sortValue);
|
|
13712
13712
|
}
|
|
13713
13713
|
} else {
|
|
13714
|
-
let filterItems = option
|
|
13715
|
-
var _item$name
|
|
13716
|
-
return item
|
|
13714
|
+
let filterItems = option == null ? void 0 : option.filter(item => {
|
|
13715
|
+
var _item$name;
|
|
13716
|
+
return item == null || (_item$name = item.name) == null || (_item$name = _item$name.toLowerCase()) == null || _item$name.includes == null ? void 0 : _item$name.includes(input == null || input.toLocaleLowerCase == null ? void 0 : input.toLocaleLowerCase());
|
|
13717
13717
|
});
|
|
13718
13718
|
setItems(filterItems);
|
|
13719
13719
|
}
|
|
@@ -13722,10 +13722,10 @@
|
|
|
13722
13722
|
if (disabled || readOnly) {
|
|
13723
13723
|
return selectedValue;
|
|
13724
13724
|
} else {
|
|
13725
|
-
if ((selected
|
|
13725
|
+
if ((selected == null ? void 0 : selected.id) === 'counter') {
|
|
13726
13726
|
setSelectedValue([]);
|
|
13727
13727
|
setInputSelectValue([]);
|
|
13728
|
-
onChange
|
|
13728
|
+
onChange == null || onChange([]);
|
|
13729
13729
|
for (let i = 0; i < selectedValue.length; i++) {
|
|
13730
13730
|
removeSelectedItem(selectedValue[i]);
|
|
13731
13731
|
}
|
|
@@ -13735,7 +13735,7 @@
|
|
|
13735
13735
|
setSelectedValue(filterItems);
|
|
13736
13736
|
setInputSelectValue(filterItems);
|
|
13737
13737
|
if (selected.id !== '!all') {
|
|
13738
|
-
onChange
|
|
13738
|
+
onChange == null || onChange(filterItems);
|
|
13739
13739
|
}
|
|
13740
13740
|
}
|
|
13741
13741
|
}
|
|
@@ -13773,9 +13773,9 @@
|
|
|
13773
13773
|
if (selectedItem.id === '!all') {
|
|
13774
13774
|
items.forEach(item => {
|
|
13775
13775
|
var _item$children;
|
|
13776
|
-
if (item
|
|
13776
|
+
if (item != null && (_item$children = item.children) != null && _item$children.length) {
|
|
13777
13777
|
var _item$children2;
|
|
13778
|
-
item
|
|
13778
|
+
item == null || (_item$children2 = item.children) == null || _item$children2.forEach(item => {
|
|
13779
13779
|
removeSelectedItem(item);
|
|
13780
13780
|
});
|
|
13781
13781
|
} else {
|
|
@@ -13784,7 +13784,7 @@
|
|
|
13784
13784
|
});
|
|
13785
13785
|
setSelectedValue([]);
|
|
13786
13786
|
setInputSelectValue([]);
|
|
13787
|
-
onChange
|
|
13787
|
+
onChange == null || onChange([]);
|
|
13788
13788
|
} else {
|
|
13789
13789
|
removeItem(selectedItem);
|
|
13790
13790
|
}
|
|
@@ -13795,9 +13795,9 @@
|
|
|
13795
13795
|
const itemIds = [];
|
|
13796
13796
|
items.forEach(item => {
|
|
13797
13797
|
var _item$children3;
|
|
13798
|
-
if (item
|
|
13798
|
+
if (item != null && (_item$children3 = item.children) != null && _item$children3.length) {
|
|
13799
13799
|
var _item$children4;
|
|
13800
|
-
item
|
|
13800
|
+
item == null || (_item$children4 = item.children) == null || _item$children4.forEach(item => {
|
|
13801
13801
|
addSelectedItem(item);
|
|
13802
13802
|
itemIds.push(item.id);
|
|
13803
13803
|
});
|
|
@@ -13809,16 +13809,16 @@
|
|
|
13809
13809
|
setSelectedValue(itemIds);
|
|
13810
13810
|
setInputSelectValue(itemIds);
|
|
13811
13811
|
// onChange?.(itemIds.slice(1).filter(id => !items.find(item => item.id === id)?.children?.length));
|
|
13812
|
-
onChange
|
|
13812
|
+
onChange == null || onChange(itemIds.slice(1));
|
|
13813
13813
|
} else {
|
|
13814
13814
|
var _selectedItem$childre;
|
|
13815
13815
|
//start check if item have children (option group)
|
|
13816
|
-
if (selectedItem
|
|
13816
|
+
if (selectedItem != null && (_selectedItem$childre = selectedItem.children) != null && _selectedItem$childre.length) {
|
|
13817
13817
|
var _selectedItem$childre2;
|
|
13818
13818
|
const itemIdsSelect = [];
|
|
13819
13819
|
const itemIdsUnSelect = [];
|
|
13820
|
-
selectedItem
|
|
13821
|
-
if (selectedValue
|
|
13820
|
+
selectedItem == null || (_selectedItem$childre2 = selectedItem.children) == null || _selectedItem$childre2.forEach(item => {
|
|
13821
|
+
if (selectedValue != null && selectedValue.includes(item.id)) {
|
|
13822
13822
|
removeSelectedItem(item);
|
|
13823
13823
|
itemIdsUnSelect.push(item.id);
|
|
13824
13824
|
} else {
|
|
@@ -13832,19 +13832,19 @@
|
|
|
13832
13832
|
setSelectedValue([...selectedValue, ...itemIdsSelect]);
|
|
13833
13833
|
setInputSelectValue([...selectedValue, ...itemIdsSelect]);
|
|
13834
13834
|
const _filteredSelectedValues = selectedValue.filter(val => val !== '!all');
|
|
13835
|
-
onChange
|
|
13835
|
+
onChange == null || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
|
|
13836
13836
|
}
|
|
13837
13837
|
|
|
13838
13838
|
//unselect all child in one of the option groups
|
|
13839
13839
|
if (itemIdsUnSelect.length) {
|
|
13840
13840
|
const newSelectedValue = selectedValue.filter(selId => {
|
|
13841
13841
|
var _itemIdsUnSelect$filt;
|
|
13842
|
-
return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId))
|
|
13842
|
+
return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) == null ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
|
|
13843
13843
|
});
|
|
13844
13844
|
setSelectedValue(newSelectedValue);
|
|
13845
13845
|
setInputSelectValue(newSelectedValue);
|
|
13846
13846
|
const _filteredSelectedValues2 = newSelectedValue.filter(val => val !== '!all');
|
|
13847
|
-
onChange
|
|
13847
|
+
onChange == null || onChange(_filteredSelectedValues2);
|
|
13848
13848
|
}
|
|
13849
13849
|
return;
|
|
13850
13850
|
}
|
|
@@ -13861,7 +13861,7 @@
|
|
|
13861
13861
|
setSelectedValue([...selectedValue, selectedItem.id]);
|
|
13862
13862
|
setInputSelectValue([...selectedValue, selectedItem.id]);
|
|
13863
13863
|
const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
|
|
13864
|
-
onChange
|
|
13864
|
+
onChange == null || onChange([...filteredSelectedValues, selectedItem.id]);
|
|
13865
13865
|
}
|
|
13866
13866
|
selectItem(null);
|
|
13867
13867
|
}
|
|
@@ -13893,9 +13893,9 @@
|
|
|
13893
13893
|
}
|
|
13894
13894
|
}
|
|
13895
13895
|
});
|
|
13896
|
-
const getOption = React.useCallback(() => maxSelectedItem ? option
|
|
13897
|
-
const isMaxSelectedItem = maxSelectedItem && (selectedValue
|
|
13898
|
-
if (isMaxSelectedItem && !(selectedValue
|
|
13896
|
+
const getOption = React.useCallback(() => maxSelectedItem ? option == null ? void 0 : option.map(item => {
|
|
13897
|
+
const isMaxSelectedItem = maxSelectedItem && (selectedValue == null ? void 0 : selectedValue.length) >= maxSelectedItem;
|
|
13898
|
+
if (isMaxSelectedItem && !(selectedValue != null && selectedValue.includes(item.id))) {
|
|
13899
13899
|
item.hideCheck = true;
|
|
13900
13900
|
item.isDisabled = true;
|
|
13901
13901
|
} else {
|
|
@@ -13904,7 +13904,7 @@
|
|
|
13904
13904
|
}
|
|
13905
13905
|
return item;
|
|
13906
13906
|
}) : option, [maxSelectedItem, option, selectedValue]);
|
|
13907
|
-
const itemsLength = items
|
|
13907
|
+
const itemsLength = items == null ? void 0 : items.reduce((acc, item) => {
|
|
13908
13908
|
return [...acc, ...(item.children ? item.children : [item])];
|
|
13909
13909
|
}, []).length;
|
|
13910
13910
|
React.useEffect(() => {
|
|
@@ -13951,16 +13951,15 @@
|
|
|
13951
13951
|
}, [label, isOpen]);
|
|
13952
13952
|
const toggleCollapsible = () => setShowAllTags(!showAllTags);
|
|
13953
13953
|
const handleRemoveAllItem = () => {
|
|
13954
|
-
onChange
|
|
13954
|
+
onChange == null || onChange([]);
|
|
13955
13955
|
setSelectedValue([]);
|
|
13956
13956
|
setInputSelectValue([]);
|
|
13957
13957
|
for (let i = 0; i < selectedValue.length; i++) {
|
|
13958
13958
|
removeSelectedItem(selectedValue[i]);
|
|
13959
13959
|
}
|
|
13960
13960
|
};
|
|
13961
|
-
const isShowTagSelectAll = showTagSelectAll && (selectedItems
|
|
13961
|
+
const isShowTagSelectAll = showTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > (option == null ? void 0 : option.length);
|
|
13962
13962
|
const renderOptionItem = (item, index, asChild) => {
|
|
13963
|
-
var _item$render;
|
|
13964
13963
|
return /*#__PURE__*/React__default["default"].createElement(ItemWrapper$1, _extends({
|
|
13965
13964
|
key: item.id
|
|
13966
13965
|
}, getItemProps({
|
|
@@ -13993,7 +13992,7 @@
|
|
|
13993
13992
|
lineNumber: 740,
|
|
13994
13993
|
columnNumber: 11
|
|
13995
13994
|
}
|
|
13996
|
-
}, !(item
|
|
13995
|
+
}, !(item != null && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
13997
13996
|
color: colors$8.iconDisable,
|
|
13998
13997
|
__self: undefined,
|
|
13999
13998
|
__source: {
|
|
@@ -14009,7 +14008,7 @@
|
|
|
14009
14008
|
lineNumber: 754,
|
|
14010
14009
|
columnNumber: 19
|
|
14011
14010
|
}
|
|
14012
|
-
})), isShowSelectAll && (item
|
|
14011
|
+
})), isShowSelectAll && (item == null ? void 0 : item.id) === '!all' && selectedValue != null && selectedValue.length && (selectedValue == null ? void 0 : selectedValue.length) < itemsLength ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
|
|
14013
14012
|
__self: undefined,
|
|
14014
14013
|
__source: {
|
|
14015
14014
|
fileName: _jsxFileName$y,
|
|
@@ -14034,15 +14033,15 @@
|
|
|
14034
14033
|
lineNumber: 763,
|
|
14035
14034
|
columnNumber: 11
|
|
14036
14035
|
}
|
|
14037
|
-
}, item.render ?
|
|
14036
|
+
}, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name));
|
|
14038
14037
|
};
|
|
14039
14038
|
let lastGroupIndex = showSelectAll ? 1 : 0;
|
|
14040
14039
|
const renderOptionGroupItem = (item, index) => {
|
|
14041
|
-
var _item$children5, _item$children6, _item$children7, _item$
|
|
14040
|
+
var _item$children5, _item$children6, _item$children7, _item$children8;
|
|
14042
14041
|
// const groupIndex = (index > (showSelectAll ? 1 : 0)) ? lastGroupIndex : 0;
|
|
14043
14042
|
const groupIndex = lastGroupIndex;
|
|
14044
|
-
lastGroupIndex += ((item
|
|
14045
|
-
const filterSelectedChild = item
|
|
14043
|
+
lastGroupIndex += ((item == null || (_item$children5 = item.children) == null ? void 0 : _item$children5.length) || 0) + 1;
|
|
14044
|
+
const filterSelectedChild = item == null || (_item$children6 = item.children) == null ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
|
|
14046
14045
|
return /*#__PURE__*/React__default["default"].createElement(OptionGroupItem, {
|
|
14047
14046
|
item: /*#__PURE__*/React__default["default"].createElement(ItemWrapper$1, _extends({
|
|
14048
14047
|
key: item.id
|
|
@@ -14075,7 +14074,7 @@
|
|
|
14075
14074
|
lineNumber: 793,
|
|
14076
14075
|
columnNumber: 15
|
|
14077
14076
|
}
|
|
14078
|
-
}, !(item
|
|
14077
|
+
}, !(item != null && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
14079
14078
|
color: colors$8.iconDisable,
|
|
14080
14079
|
__self: undefined,
|
|
14081
14080
|
__source: {
|
|
@@ -14083,7 +14082,7 @@
|
|
|
14083
14082
|
lineNumber: 802,
|
|
14084
14083
|
columnNumber: 19
|
|
14085
14084
|
}
|
|
14086
|
-
}) : (filterSelectedChild
|
|
14085
|
+
}) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) === (item == null || (_item$children7 = item.children) == null || (_item$children7 = _item$children7.filter(e => !e.isDisabled)) == null ? void 0 : _item$children7.length) ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
14087
14086
|
color: colors$8.iconGreen,
|
|
14088
14087
|
__self: undefined,
|
|
14089
14088
|
__source: {
|
|
@@ -14091,7 +14090,7 @@
|
|
|
14091
14090
|
lineNumber: 804,
|
|
14092
14091
|
columnNumber: 19
|
|
14093
14092
|
}
|
|
14094
|
-
}) : (filterSelectedChild
|
|
14093
|
+
}) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default["default"].createElement(IndeterminateFilled$1, {
|
|
14095
14094
|
__self: undefined,
|
|
14096
14095
|
__source: {
|
|
14097
14096
|
fileName: _jsxFileName$y,
|
|
@@ -14109,14 +14108,14 @@
|
|
|
14109
14108
|
lineNumber: 809,
|
|
14110
14109
|
columnNumber: 15
|
|
14111
14110
|
}
|
|
14112
|
-
}, item.render ?
|
|
14111
|
+
}, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name)),
|
|
14113
14112
|
__self: undefined,
|
|
14114
14113
|
__source: {
|
|
14115
14114
|
fileName: _jsxFileName$y,
|
|
14116
14115
|
lineNumber: 778,
|
|
14117
14116
|
columnNumber: 9
|
|
14118
14117
|
}
|
|
14119
|
-
}, item
|
|
14118
|
+
}, item == null || (_item$children8 = item.children) == null ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
|
|
14120
14119
|
};
|
|
14121
14120
|
return /*#__PURE__*/React__default["default"].createElement(Wrapper$1, _extends({
|
|
14122
14121
|
css: css
|
|
@@ -14246,13 +14245,13 @@
|
|
|
14246
14245
|
lineNumber: 868,
|
|
14247
14246
|
columnNumber: 17
|
|
14248
14247
|
}
|
|
14249
|
-
}), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems
|
|
14248
|
+
}), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems == null || (_selectedItems$filter = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null || (_selectedItems$filter = _selectedItems$filter.filter((_, idx) => {
|
|
14250
14249
|
if (showAllTags || !collapsible) {
|
|
14251
14250
|
return true;
|
|
14252
14251
|
} else {
|
|
14253
14252
|
return idx < 5;
|
|
14254
14253
|
}
|
|
14255
|
-
}))
|
|
14254
|
+
})) == null ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends({
|
|
14256
14255
|
disabled: disabled,
|
|
14257
14256
|
isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
|
|
14258
14257
|
size: "lg",
|
|
@@ -14276,7 +14275,7 @@
|
|
|
14276
14275
|
lineNumber: 896,
|
|
14277
14276
|
columnNumber: 21
|
|
14278
14277
|
}
|
|
14279
|
-
}), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems
|
|
14278
|
+
}), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > 5 && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
14280
14279
|
direction: "column",
|
|
14281
14280
|
gap: 4,
|
|
14282
14281
|
__self: undefined,
|
|
@@ -14362,7 +14361,7 @@
|
|
|
14362
14361
|
lineNumber: 937,
|
|
14363
14362
|
columnNumber: 17
|
|
14364
14363
|
}
|
|
14365
|
-
}, `${selectedItems
|
|
14364
|
+
}, `${selectedItems == null || (_selectedItems$filter2 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter2.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`))), showCounter && !isShowTagSelectAll && Boolean(selectedItems == null ? void 0 : selectedItems.length) && /*#__PURE__*/React__default["default"].createElement(Paragraph, {
|
|
14366
14365
|
css: {
|
|
14367
14366
|
fontSize: '$label',
|
|
14368
14367
|
marginTop: '$spacing-01'
|
|
@@ -14374,7 +14373,7 @@
|
|
|
14374
14373
|
lineNumber: 946,
|
|
14375
14374
|
columnNumber: 11
|
|
14376
14375
|
}
|
|
14377
|
-
}, `${selectedItems
|
|
14376
|
+
}, `${selectedItems == null || (_selectedItems$filter3 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter3.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`), /*#__PURE__*/React__default["default"].createElement(OptionWrapper$1, {
|
|
14378
14377
|
placement: placement,
|
|
14379
14378
|
css: {
|
|
14380
14379
|
display: isOpen && disabled === false ? 'block' : 'none',
|
|
@@ -14431,7 +14430,7 @@
|
|
|
14431
14430
|
}), /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
|
|
14432
14431
|
condition: !!fetchData && items.length > 0,
|
|
14433
14432
|
wrapper: child => /*#__PURE__*/React__default["default"].createElement(InfiniteScroll__default["default"], {
|
|
14434
|
-
loadMore: () => !isLoading && (fetchData
|
|
14433
|
+
loadMore: () => !isLoading && (fetchData == null ? void 0 : fetchData({
|
|
14435
14434
|
query
|
|
14436
14435
|
})),
|
|
14437
14436
|
hasMore: true,
|
|
@@ -14450,7 +14449,7 @@
|
|
|
14450
14449
|
lineNumber: 986,
|
|
14451
14450
|
columnNumber: 15
|
|
14452
14451
|
}
|
|
14453
|
-
}, isOpen && items.map((item, index) => item
|
|
14452
|
+
}, isOpen && items.map((item, index) => item != null && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default["default"].createElement(Option, _extends({
|
|
14454
14453
|
css: {
|
|
14455
14454
|
height: 'auto'
|
|
14456
14455
|
}
|
|
@@ -18103,9 +18102,9 @@
|
|
|
18103
18102
|
}
|
|
18104
18103
|
function handleInputChange(type, e) {
|
|
18105
18104
|
var _e$target;
|
|
18106
|
-
const value = e
|
|
18105
|
+
const value = e == null || (_e$target = e.target) == null ? void 0 : _e$target.value;
|
|
18107
18106
|
const format = 'DD:MM:YYYY:HH:mm';
|
|
18108
|
-
const minLength = (value
|
|
18107
|
+
const minLength = (value == null ? void 0 : value.length) > 1;
|
|
18109
18108
|
const hourValue = params => moment__default["default"](moment__default["default"](`${moment__default["default"](date).format('DD:MM:YYYY:mm')}:${params}`, 'DD:MM:YYYY:mm:HH').toDate());
|
|
18110
18109
|
const minuteValue = params => moment__default["default"](moment__default["default"](`${moment__default["default"](date).format('DD:MM:YYYY:HH')}:${params}`, 'DD:MM:YYYY:HH:mm').toDate());
|
|
18111
18110
|
if (!disabled) {
|
|
@@ -20705,7 +20704,7 @@
|
|
|
20705
20704
|
};
|
|
20706
20705
|
};
|
|
20707
20706
|
const getValue = () => {
|
|
20708
|
-
let value = props
|
|
20707
|
+
let value = props == null ? void 0 : props.value;
|
|
20709
20708
|
const isTrailing = variantIcon === 'trailing';
|
|
20710
20709
|
if (typeof value === 'number' || parseInt(value)) {
|
|
20711
20710
|
if (Math.sign(value) === 1 || Math.sign(value) === 0) {
|
|
@@ -21670,7 +21669,7 @@
|
|
|
21670
21669
|
justify: "center",
|
|
21671
21670
|
onClick: () => {
|
|
21672
21671
|
var _dialogPageRef$curren;
|
|
21673
|
-
return (_dialogPageRef$curren = dialogPageRef.current)
|
|
21672
|
+
return (_dialogPageRef$curren = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren.click();
|
|
21674
21673
|
},
|
|
21675
21674
|
__self: undefined,
|
|
21676
21675
|
__source: {
|
|
@@ -21748,7 +21747,7 @@
|
|
|
21748
21747
|
onSubmit: () => {
|
|
21749
21748
|
var _dialogPageRef$curren2;
|
|
21750
21749
|
debouncedGoToPage(Number(goToPage));
|
|
21751
|
-
(_dialogPageRef$curren2 = dialogPageRef.current)
|
|
21750
|
+
(_dialogPageRef$curren2 = dialogPageRef.current) == null || _dialogPageRef$curren2.click();
|
|
21752
21751
|
},
|
|
21753
21752
|
__self: undefined,
|
|
21754
21753
|
__source: {
|
|
@@ -21765,7 +21764,7 @@
|
|
|
21765
21764
|
allowNegative: false,
|
|
21766
21765
|
onChange: e => {
|
|
21767
21766
|
var _e$target;
|
|
21768
|
-
return setGoToPage((_e$target = e.target)
|
|
21767
|
+
return setGoToPage((_e$target = e.target) == null ? void 0 : _e$target.value);
|
|
21769
21768
|
},
|
|
21770
21769
|
__self: undefined,
|
|
21771
21770
|
__source: {
|
|
@@ -21798,7 +21797,7 @@
|
|
|
21798
21797
|
onClick: () => {
|
|
21799
21798
|
var _dialogPageRef$curren3;
|
|
21800
21799
|
setGoToPage(null);
|
|
21801
|
-
(_dialogPageRef$curren3 = dialogPageRef.current)
|
|
21800
|
+
(_dialogPageRef$curren3 = dialogPageRef.current) == null || _dialogPageRef$curren3.click();
|
|
21802
21801
|
},
|
|
21803
21802
|
__self: undefined,
|
|
21804
21803
|
__source: {
|
|
@@ -21813,7 +21812,7 @@
|
|
|
21813
21812
|
onClick: () => {
|
|
21814
21813
|
var _dialogPageRef$curren4;
|
|
21815
21814
|
debouncedGoToPage(Number(goToPage));
|
|
21816
|
-
(_dialogPageRef$curren4 = dialogPageRef.current)
|
|
21815
|
+
(_dialogPageRef$curren4 = dialogPageRef.current) == null || _dialogPageRef$curren4.click();
|
|
21817
21816
|
},
|
|
21818
21817
|
__self: undefined,
|
|
21819
21818
|
__source: {
|
|
@@ -21902,7 +21901,7 @@
|
|
|
21902
21901
|
onClick: () => {
|
|
21903
21902
|
if (isMobilePagination) {
|
|
21904
21903
|
var _dialogLimitRef$curre;
|
|
21905
|
-
(_dialogLimitRef$curre = dialogLimitRef.current)
|
|
21904
|
+
(_dialogLimitRef$curre = dialogLimitRef.current) == null || _dialogLimitRef$curre.click();
|
|
21906
21905
|
}
|
|
21907
21906
|
},
|
|
21908
21907
|
__self: this,
|
|
@@ -21948,7 +21947,7 @@
|
|
|
21948
21947
|
lineNumber: 60,
|
|
21949
21948
|
columnNumber: 13
|
|
21950
21949
|
}
|
|
21951
|
-
}, limits
|
|
21950
|
+
}, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(PopoverClose, {
|
|
21952
21951
|
key: limit,
|
|
21953
21952
|
css: limitItemContainerStyle(selectedLimit === limit),
|
|
21954
21953
|
onClick: () => onChange(limit),
|
|
@@ -22031,7 +22030,7 @@
|
|
|
22031
22030
|
lineNumber: 100,
|
|
22032
22031
|
columnNumber: 11
|
|
22033
22032
|
}
|
|
22034
|
-
}, limits
|
|
22033
|
+
}, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
22035
22034
|
css: {
|
|
22036
22035
|
height: 44,
|
|
22037
22036
|
width: '100%',
|
|
@@ -22046,7 +22045,7 @@
|
|
|
22046
22045
|
onClick: () => {
|
|
22047
22046
|
var _dialogLimitRef$curre2;
|
|
22048
22047
|
onChange(limit);
|
|
22049
|
-
(_dialogLimitRef$curre2 = dialogLimitRef.current)
|
|
22048
|
+
(_dialogLimitRef$curre2 = dialogLimitRef.current) == null || _dialogLimitRef$curre2.click();
|
|
22050
22049
|
},
|
|
22051
22050
|
__self: this,
|
|
22052
22051
|
__source: {
|
|
@@ -24313,7 +24312,7 @@
|
|
|
24313
24312
|
onClick: () => {
|
|
24314
24313
|
var _document$getElements;
|
|
24315
24314
|
setOpenDrop(true);
|
|
24316
|
-
const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu'))
|
|
24315
|
+
const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
|
|
24317
24316
|
contextMenu.style.opacity = 0;
|
|
24318
24317
|
},
|
|
24319
24318
|
__self: undefined,
|
|
@@ -24969,7 +24968,7 @@
|
|
|
24969
24968
|
if (!props.onOpenAutoFocus) {
|
|
24970
24969
|
e.preventDefault();
|
|
24971
24970
|
} else {
|
|
24972
|
-
props
|
|
24971
|
+
props == null || props.onOpenAutoFocus();
|
|
24973
24972
|
}
|
|
24974
24973
|
},
|
|
24975
24974
|
__self: undefined,
|
|
@@ -25049,7 +25048,7 @@
|
|
|
25049
25048
|
}, props.description)), /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
25050
25049
|
css: {
|
|
25051
25050
|
width: '100%',
|
|
25052
|
-
display: props
|
|
25051
|
+
display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
|
|
25053
25052
|
},
|
|
25054
25053
|
__self: undefined,
|
|
25055
25054
|
__source: {
|
|
@@ -25091,8 +25090,8 @@
|
|
|
25091
25090
|
size: props.btnSize,
|
|
25092
25091
|
onClick: buttonConfirm,
|
|
25093
25092
|
buttonType: props.dialogType,
|
|
25094
|
-
disabled: props
|
|
25095
|
-
}, props
|
|
25093
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25094
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
25096
25095
|
__self: undefined,
|
|
25097
25096
|
__source: {
|
|
25098
25097
|
fileName: _jsxFileName$b,
|
|
@@ -25111,19 +25110,19 @@
|
|
|
25111
25110
|
size: props.btnSize,
|
|
25112
25111
|
onClick: buttonCancel,
|
|
25113
25112
|
css: {
|
|
25114
|
-
color: props.dialogType === 'negative' && !(props
|
|
25113
|
+
color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
|
|
25115
25114
|
flex: props.isMobile && 1
|
|
25116
25115
|
},
|
|
25117
|
-
buttonType: props.dialogType === 'negative' && !(props
|
|
25118
|
-
disabled: props
|
|
25119
|
-
}, props
|
|
25116
|
+
buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
|
|
25117
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25118
|
+
}, props == null ? void 0 : props.cancelButtonProps, {
|
|
25120
25119
|
__self: undefined,
|
|
25121
25120
|
__source: {
|
|
25122
25121
|
fileName: _jsxFileName$b,
|
|
25123
25122
|
lineNumber: 187,
|
|
25124
25123
|
columnNumber: 19
|
|
25125
25124
|
}
|
|
25126
|
-
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props
|
|
25125
|
+
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
|
|
25127
25126
|
asChild: true,
|
|
25128
25127
|
__self: undefined,
|
|
25129
25128
|
__source: {
|
|
@@ -25138,8 +25137,8 @@
|
|
|
25138
25137
|
css: {
|
|
25139
25138
|
flex: props.isMobile && 1
|
|
25140
25139
|
},
|
|
25141
|
-
disabled: props
|
|
25142
|
-
}, props
|
|
25140
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25141
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
25143
25142
|
__self: undefined,
|
|
25144
25143
|
__source: {
|
|
25145
25144
|
fileName: _jsxFileName$b,
|
|
@@ -25269,7 +25268,7 @@
|
|
|
25269
25268
|
}, props.description)), /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
25270
25269
|
css: {
|
|
25271
25270
|
width: '100%',
|
|
25272
|
-
display: props
|
|
25271
|
+
display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
|
|
25273
25272
|
},
|
|
25274
25273
|
__self: this,
|
|
25275
25274
|
__source: {
|
|
@@ -25314,8 +25313,8 @@
|
|
|
25314
25313
|
css: {
|
|
25315
25314
|
flex: props.isMobile && 1
|
|
25316
25315
|
},
|
|
25317
|
-
disabled: props
|
|
25318
|
-
}, props
|
|
25316
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25317
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
25319
25318
|
__self: this,
|
|
25320
25319
|
__source: {
|
|
25321
25320
|
fileName: _jsxFileName$b,
|
|
@@ -25334,19 +25333,19 @@
|
|
|
25334
25333
|
size: props.btnSize,
|
|
25335
25334
|
onClick: props.onCancel,
|
|
25336
25335
|
css: {
|
|
25337
|
-
color: props.dialogType === 'negative' && !(props
|
|
25336
|
+
color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
|
|
25338
25337
|
flex: props.isMobile && 1
|
|
25339
25338
|
},
|
|
25340
|
-
buttonType: props.dialogType === 'negative' && !(props
|
|
25341
|
-
disabled: props
|
|
25342
|
-
}, props
|
|
25339
|
+
buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
|
|
25340
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25341
|
+
}, props == null ? void 0 : props.cancelButtonProps, {
|
|
25343
25342
|
__self: this,
|
|
25344
25343
|
__source: {
|
|
25345
25344
|
fileName: _jsxFileName$b,
|
|
25346
25345
|
lineNumber: 293,
|
|
25347
25346
|
columnNumber: 19
|
|
25348
25347
|
}
|
|
25349
|
-
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props
|
|
25348
|
+
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default["default"].createElement(ADialog__namespace.Action, {
|
|
25350
25349
|
asChild: true,
|
|
25351
25350
|
__self: this,
|
|
25352
25351
|
__source: {
|
|
@@ -25361,8 +25360,8 @@
|
|
|
25361
25360
|
css: {
|
|
25362
25361
|
flex: props.isMobile && 1
|
|
25363
25362
|
},
|
|
25364
|
-
disabled: props
|
|
25365
|
-
}, props
|
|
25363
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25364
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
25366
25365
|
__self: this,
|
|
25367
25366
|
__source: {
|
|
25368
25367
|
fileName: _jsxFileName$b,
|
|
@@ -27920,7 +27919,7 @@
|
|
|
27920
27919
|
upload({
|
|
27921
27920
|
url: action,
|
|
27922
27921
|
file: newFile,
|
|
27923
|
-
customBody: customBodyRequest
|
|
27922
|
+
customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
|
|
27924
27923
|
token,
|
|
27925
27924
|
tokenKey,
|
|
27926
27925
|
reqKey,
|
|
@@ -27940,12 +27939,12 @@
|
|
|
27940
27939
|
arrProgress[i] = fileProgress;
|
|
27941
27940
|
}
|
|
27942
27941
|
}
|
|
27943
|
-
onChange
|
|
27942
|
+
onChange == null || (_onChange = onChange({
|
|
27944
27943
|
fileList: arrProgress,
|
|
27945
27944
|
file: fileProgress,
|
|
27946
27945
|
indexReplace: indexReplace.current,
|
|
27947
27946
|
isReplace: indexReplace.current !== null
|
|
27948
|
-
}))
|
|
27947
|
+
})) == null || (_onChange = _onChange.then(() => setError(null))) == null || _onChange.catch(error => setError(error.message));
|
|
27949
27948
|
}
|
|
27950
27949
|
}).then(result => {
|
|
27951
27950
|
var _onChange2;
|
|
@@ -27958,12 +27957,12 @@
|
|
|
27958
27957
|
arrFile[i] = fileSuccess;
|
|
27959
27958
|
}
|
|
27960
27959
|
}
|
|
27961
|
-
onChange
|
|
27960
|
+
onChange == null || (_onChange2 = onChange({
|
|
27962
27961
|
fileList: arrFile,
|
|
27963
27962
|
file: fileSuccess,
|
|
27964
27963
|
indexReplace: indexReplace.current,
|
|
27965
27964
|
isReplace: indexReplace.current !== null
|
|
27966
|
-
}))
|
|
27965
|
+
})) == null || (_onChange2 = _onChange2.then(() => setError(null))) == null || _onChange2.catch(error => setError(error.message));
|
|
27967
27966
|
}).catch(error => {
|
|
27968
27967
|
var _onChange3;
|
|
27969
27968
|
let fileError = Object.assign({}, newFile);
|
|
@@ -27975,21 +27974,21 @@
|
|
|
27975
27974
|
arrFile[i] = fileError;
|
|
27976
27975
|
}
|
|
27977
27976
|
}
|
|
27978
|
-
onChange
|
|
27977
|
+
onChange == null || (_onChange3 = onChange({
|
|
27979
27978
|
fileList: arrFile,
|
|
27980
27979
|
file: fileError,
|
|
27981
27980
|
indexReplace: indexReplace.current,
|
|
27982
27981
|
isReplace: indexReplace.current !== null
|
|
27983
|
-
}))
|
|
27982
|
+
})) == null || (_onChange3 = _onChange3.then(() => setError(null))) == null || _onChange3.catch(error => setError(error.message));
|
|
27984
27983
|
});
|
|
27985
27984
|
} else {
|
|
27986
27985
|
var _onChange4;
|
|
27987
|
-
onChange
|
|
27986
|
+
onChange == null || (_onChange4 = onChange({
|
|
27988
27987
|
fileList: arrFile,
|
|
27989
27988
|
file: newFile,
|
|
27990
27989
|
indexReplace: indexReplace.current,
|
|
27991
27990
|
isReplace: indexReplace.current !== null
|
|
27992
|
-
}))
|
|
27991
|
+
})) == null || (_onChange4 = _onChange4.then(() => setError(null))) == null || _onChange4.catch(error => setError(error.message));
|
|
27993
27992
|
}
|
|
27994
27993
|
if (indexReplace.current !== null) {
|
|
27995
27994
|
arrFile[indexReplace.current] = newFile;
|
|
@@ -28009,15 +28008,15 @@
|
|
|
28009
28008
|
// program to get the dimensions of an image
|
|
28010
28009
|
const img = document.createElement('img');
|
|
28011
28010
|
img.src = URL.createObjectURL(files[0]);
|
|
28012
|
-
img.size = files
|
|
28013
|
-
img.type = files
|
|
28011
|
+
img.size = files == null || (_files$ = files[0]) == null ? void 0 : _files$.size;
|
|
28012
|
+
img.type = files == null || (_files$2 = files[0]) == null ? void 0 : _files$2.type;
|
|
28014
28013
|
img.onload = () => {
|
|
28015
28014
|
const imgRatio = img.width / img.height;
|
|
28016
28015
|
setAspect(ratio || imgRatio);
|
|
28017
28016
|
setCropperImgRatio(imgRatio);
|
|
28018
28017
|
if (onBeforeCrop) {
|
|
28019
28018
|
var _onBeforeCrop;
|
|
28020
|
-
onBeforeCrop
|
|
28019
|
+
onBeforeCrop == null || (_onBeforeCrop = onBeforeCrop(img)) == null || (_onBeforeCrop = _onBeforeCrop.then(() => {
|
|
28021
28020
|
setError(null);
|
|
28022
28021
|
toggleModal();
|
|
28023
28022
|
setTimeout(() => {
|
|
@@ -28031,7 +28030,7 @@
|
|
|
28031
28030
|
}, 300);
|
|
28032
28031
|
setFileState(files[0]);
|
|
28033
28032
|
setPreviewImage(URL.createObjectURL(files[0]));
|
|
28034
|
-
}))
|
|
28033
|
+
})) == null || _onBeforeCrop.catch(error => setError(error == null ? void 0 : error.message));
|
|
28035
28034
|
} else {
|
|
28036
28035
|
toggleModal();
|
|
28037
28036
|
setTimeout(() => {
|
|
@@ -28049,18 +28048,18 @@
|
|
|
28049
28048
|
};
|
|
28050
28049
|
img.onerror = error => {
|
|
28051
28050
|
var _onBeforeCrop2;
|
|
28052
|
-
onBeforeCrop
|
|
28051
|
+
onBeforeCrop == null || (_onBeforeCrop2 = onBeforeCrop(img, error)) == null || (_onBeforeCrop2 = _onBeforeCrop2.then(() => setError(null))) == null || _onBeforeCrop2.catch(error => setError(error == null ? void 0 : error.message));
|
|
28053
28052
|
};
|
|
28054
28053
|
}
|
|
28055
28054
|
}
|
|
28056
28055
|
}
|
|
28057
28056
|
function handleCrop() {
|
|
28058
|
-
if (completedCrop
|
|
28059
|
-
imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState
|
|
28060
|
-
const sizeMB = (blob
|
|
28057
|
+
if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
|
|
28058
|
+
imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState == null ? void 0 : fileState.type).then(blob => {
|
|
28059
|
+
const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
|
|
28061
28060
|
if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
|
|
28062
|
-
const file = new File([blob], fileState
|
|
28063
|
-
type: blob
|
|
28061
|
+
const file = new File([blob], fileState == null ? void 0 : fileState.name, {
|
|
28062
|
+
type: blob == null ? void 0 : blob.type
|
|
28064
28063
|
});
|
|
28065
28064
|
handleUpload([file]);
|
|
28066
28065
|
setCrop(null);
|
|
@@ -28074,16 +28073,16 @@
|
|
|
28074
28073
|
alwaysKeepResolution: true
|
|
28075
28074
|
}).then(compressedFile => {
|
|
28076
28075
|
var _fileState$name;
|
|
28077
|
-
const file = new File([compressedFile], (fileState
|
|
28078
|
-
type: compressedFile
|
|
28076
|
+
const file = new File([compressedFile], (fileState == null || (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
|
|
28077
|
+
type: compressedFile == null ? void 0 : compressedFile.type
|
|
28079
28078
|
});
|
|
28080
28079
|
handleUpload([file]);
|
|
28081
28080
|
setCrop(null);
|
|
28082
28081
|
setCompletedCrop(null);
|
|
28083
|
-
}).catch(error => console.error(error
|
|
28082
|
+
}).catch(error => console.error(error == null ? void 0 : error.message));
|
|
28084
28083
|
}
|
|
28085
28084
|
toggleModal();
|
|
28086
|
-
}).catch(error => console.error(error
|
|
28085
|
+
}).catch(error => console.error(error == null ? void 0 : error.message));
|
|
28087
28086
|
} else {
|
|
28088
28087
|
handleUpload([fileState]);
|
|
28089
28088
|
toggleModal();
|
|
@@ -28112,7 +28111,7 @@
|
|
|
28112
28111
|
const index = fileList.indexOf(file);
|
|
28113
28112
|
const newFileList = fileList.slice();
|
|
28114
28113
|
newFileList.splice(index, 1);
|
|
28115
|
-
onChange
|
|
28114
|
+
onChange == null || onChange({
|
|
28116
28115
|
fileList: newFileList,
|
|
28117
28116
|
file
|
|
28118
28117
|
});
|
|
@@ -28135,14 +28134,14 @@
|
|
|
28135
28134
|
}
|
|
28136
28135
|
function handleOpenFile(file) {
|
|
28137
28136
|
var _String, _file$name;
|
|
28138
|
-
let extension = (_String = String(file
|
|
28137
|
+
let extension = (_String = String(file == null || (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
|
|
28139
28138
|
if (extension === 'pdf') {
|
|
28140
|
-
window.open(file
|
|
28139
|
+
window.open(file == null ? void 0 : file.url);
|
|
28141
28140
|
} else {
|
|
28142
|
-
if (file
|
|
28141
|
+
if (file != null && file.url) {
|
|
28143
28142
|
const link = document.createElement('a');
|
|
28144
28143
|
link.href = file.url;
|
|
28145
|
-
link.setAttribute('download', file
|
|
28144
|
+
link.setAttribute('download', file == null ? void 0 : file.name);
|
|
28146
28145
|
document.body.appendChild(link);
|
|
28147
28146
|
link.click();
|
|
28148
28147
|
document.body.removeChild(link);
|
|
@@ -28204,12 +28203,12 @@
|
|
|
28204
28203
|
}, replaceLabel && replaceLabel.length > 0 ? replaceLabel : t('replaceLabel', 'Ubah Berkas')));
|
|
28205
28204
|
}
|
|
28206
28205
|
const renderPicture = () => {
|
|
28207
|
-
return fileList
|
|
28208
|
-
if ((item
|
|
28206
|
+
return fileList == null ? void 0 : fileList.map((item, index) => {
|
|
28207
|
+
if ((item == null ? void 0 : item.status) === 'uploading') {
|
|
28209
28208
|
return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
|
|
28210
28209
|
key: index,
|
|
28211
|
-
progress: item
|
|
28212
|
-
loading: item
|
|
28210
|
+
progress: item == null ? void 0 : item.percent,
|
|
28211
|
+
loading: item == null ? void 0 : item.loading,
|
|
28213
28212
|
__self: undefined,
|
|
28214
28213
|
__source: {
|
|
28215
28214
|
fileName: _jsxFileName$9,
|
|
@@ -28282,13 +28281,13 @@
|
|
|
28282
28281
|
});
|
|
28283
28282
|
};
|
|
28284
28283
|
const renderFile = () => {
|
|
28285
|
-
return fileList
|
|
28284
|
+
return fileList == null ? void 0 : fileList.map((item, index) => {
|
|
28286
28285
|
var _item$name;
|
|
28287
|
-
if ((item
|
|
28286
|
+
if ((item == null ? void 0 : item.status) === 'uploading') {
|
|
28288
28287
|
return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
|
|
28289
28288
|
key: index,
|
|
28290
|
-
progress: item
|
|
28291
|
-
loading: item
|
|
28289
|
+
progress: item == null ? void 0 : item.percent,
|
|
28290
|
+
loading: item == null ? void 0 : item.loading,
|
|
28292
28291
|
__self: undefined,
|
|
28293
28292
|
__source: {
|
|
28294
28293
|
fileName: _jsxFileName$9,
|
|
@@ -28354,7 +28353,7 @@
|
|
|
28354
28353
|
lineNumber: 666,
|
|
28355
28354
|
columnNumber: 17
|
|
28356
28355
|
}
|
|
28357
|
-
}, ".", item
|
|
28356
|
+
}, ".", item == null || (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
|
|
28358
28357
|
label: item.name,
|
|
28359
28358
|
__self: undefined,
|
|
28360
28359
|
__source: {
|
|
@@ -28724,7 +28723,7 @@
|
|
|
28724
28723
|
}
|
|
28725
28724
|
return /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
28726
28725
|
direction: "row",
|
|
28727
|
-
gap: (fileList
|
|
28726
|
+
gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
|
|
28728
28727
|
wrap: "wrap",
|
|
28729
28728
|
css: {
|
|
28730
28729
|
userSelect: 'none'
|
|
@@ -29554,9 +29553,9 @@
|
|
|
29554
29553
|
function InputColorPicker(props) {
|
|
29555
29554
|
const [isPopover, setIsPopover] = React.useState(false);
|
|
29556
29555
|
function getColor() {
|
|
29557
|
-
const color = props
|
|
29556
|
+
const color = props == null ? void 0 : props.color;
|
|
29558
29557
|
if (typeof color === 'string') {
|
|
29559
|
-
return color
|
|
29558
|
+
return color == null ? void 0 : color.toUpperCase();
|
|
29560
29559
|
}
|
|
29561
29560
|
return `rgba(${color.r},${color.g},${color.b},${color.a})`;
|
|
29562
29561
|
}
|
|
@@ -32575,7 +32574,7 @@
|
|
|
32575
32574
|
var _data;
|
|
32576
32575
|
const isActive = props.currentStep === i;
|
|
32577
32576
|
const isComplete = props.isComplete[i - 1];
|
|
32578
|
-
const isAdditional = (_data = data[i - 1])
|
|
32577
|
+
const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional;
|
|
32579
32578
|
const lastItem = navMobileItems.indexOf(data[i - 1]) + 1 === navMobileItems.length;
|
|
32580
32579
|
// eslint-disable-next-line no-lone-blocks
|
|
32581
32580
|
{
|
|
@@ -32590,7 +32589,7 @@
|
|
|
32590
32589
|
key: `step-${i}`,
|
|
32591
32590
|
onClick: () => {
|
|
32592
32591
|
var _data2;
|
|
32593
|
-
if (props.onNavClicked && !((_data2 = data[i - 1])
|
|
32592
|
+
if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
|
|
32594
32593
|
if (!forbidClickNav && isComplete && !isHide || isAdditional) {
|
|
32595
32594
|
props.goToStep(i);
|
|
32596
32595
|
}
|
|
@@ -32623,9 +32622,9 @@
|
|
|
32623
32622
|
lineNumber: 176,
|
|
32624
32623
|
columnNumber: 17
|
|
32625
32624
|
}
|
|
32626
|
-
}), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title)
|
|
32625
|
+
}), 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, {
|
|
32627
32626
|
align: "center",
|
|
32628
|
-
label: (_data5 = data[i - 1])
|
|
32627
|
+
label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
|
|
32629
32628
|
__self: undefined,
|
|
32630
32629
|
__source: {
|
|
32631
32630
|
fileName: _jsxFileName$4,
|
|
@@ -32644,9 +32643,9 @@
|
|
|
32644
32643
|
lineNumber: 181,
|
|
32645
32644
|
columnNumber: 19
|
|
32646
32645
|
}
|
|
32647
|
-
})), ((_data6 = data[i - 1])
|
|
32646
|
+
})), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
32648
32647
|
css: {
|
|
32649
|
-
marginLeft: (_data7 = data[i - 1])
|
|
32648
|
+
marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
|
|
32650
32649
|
},
|
|
32651
32650
|
align: "center",
|
|
32652
32651
|
__self: undefined,
|
|
@@ -32697,10 +32696,10 @@
|
|
|
32697
32696
|
lineNumber: 198,
|
|
32698
32697
|
columnNumber: 21
|
|
32699
32698
|
}
|
|
32700
|
-
}, typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data8 = data[i - 1]).title)
|
|
32699
|
+
}, typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data8 = data[i - 1]).title) == null ? void 0 : _data$title2.call(_data8)), ((_data9 = data[i - 1]) == null ? void 0 : _data9.withTolltip) && /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
|
|
32701
32700
|
align: "center",
|
|
32702
32701
|
withClick: true,
|
|
32703
|
-
label: (_data10 = data[i - 1])
|
|
32702
|
+
label: (_data10 = data[i - 1]) == null ? void 0 : _data10.tooltipsContents,
|
|
32704
32703
|
__self: undefined,
|
|
32705
32704
|
__source: {
|
|
32706
32705
|
fileName: _jsxFileName$4,
|
|
@@ -32716,11 +32715,11 @@
|
|
|
32716
32715
|
lineNumber: 209,
|
|
32717
32716
|
columnNumber: 25
|
|
32718
32717
|
}
|
|
32719
|
-
})), ((_data11 = data[i - 1])
|
|
32718
|
+
})), ((_data11 = data[i - 1]) == null ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
32720
32719
|
align: "center",
|
|
32721
32720
|
justify: "center",
|
|
32722
32721
|
css: {
|
|
32723
|
-
marginTop: (_data12 = data[i - 1])
|
|
32722
|
+
marginTop: (_data12 = data[i - 1]) != null && _data12.withTolltip ? 0 : '$spacing-03'
|
|
32724
32723
|
},
|
|
32725
32724
|
__self: undefined,
|
|
32726
32725
|
__source: {
|
|
@@ -32744,7 +32743,7 @@
|
|
|
32744
32743
|
userSelect: 'none',
|
|
32745
32744
|
fontSize: '12px',
|
|
32746
32745
|
textAlign: '-webkit-center',
|
|
32747
|
-
display: ((_data13 = data[i - 1])
|
|
32746
|
+
display: ((_data13 = data[i - 1]) == null ? void 0 : _data13.disabled) && 'none',
|
|
32748
32747
|
marginTop: '$spacing-07',
|
|
32749
32748
|
flex: 1,
|
|
32750
32749
|
maxWidth: lastItem && 26
|
|
@@ -32824,7 +32823,7 @@
|
|
|
32824
32823
|
height: 24,
|
|
32825
32824
|
borderRadius: '$round',
|
|
32826
32825
|
border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
|
|
32827
|
-
backgroundColor: (_data14 = data[i - 1])
|
|
32826
|
+
backgroundColor: (_data14 = data[i - 1]) != null && _data14.disabled ? '$gray200' : '$white'
|
|
32828
32827
|
},
|
|
32829
32828
|
__self: undefined,
|
|
32830
32829
|
__source: {
|
|
@@ -32853,53 +32852,50 @@
|
|
|
32853
32852
|
}
|
|
32854
32853
|
return /*#__PURE__*/React__default["default"].createElement(ConditionalWrapper, {
|
|
32855
32854
|
condition: !isMobile,
|
|
32856
|
-
wrapper: child => {
|
|
32857
|
-
|
|
32858
|
-
|
|
32859
|
-
|
|
32860
|
-
|
|
32861
|
-
|
|
32862
|
-
|
|
32863
|
-
|
|
32864
|
-
|
|
32865
|
-
|
|
32866
|
-
|
|
32867
|
-
|
|
32868
|
-
|
|
32869
|
-
|
|
32870
|
-
|
|
32871
|
-
|
|
32872
|
-
|
|
32873
|
-
|
|
32874
|
-
|
|
32875
|
-
|
|
32876
|
-
|
|
32877
|
-
|
|
32878
|
-
|
|
32879
|
-
|
|
32880
|
-
|
|
32881
|
-
|
|
32882
|
-
|
|
32883
|
-
|
|
32884
|
-
|
|
32885
|
-
|
|
32886
|
-
|
|
32887
|
-
|
|
32888
|
-
|
|
32889
|
-
|
|
32890
|
-
|
|
32891
|
-
|
|
32892
|
-
|
|
32893
|
-
|
|
32894
|
-
|
|
32895
|
-
|
|
32896
|
-
|
|
32897
|
-
|
|
32898
|
-
|
|
32899
|
-
|
|
32900
|
-
}
|
|
32901
|
-
}, typeof (props === null || props === void 0 ? void 0 : props.appendContent) === 'function' ? props === null || props === void 0 || (_props$appendContent = props.appendContent) === null || _props$appendContent === void 0 ? void 0 : _props$appendContent.call(props) : props === null || props === void 0 ? void 0 : props.appendContent)));
|
|
32902
|
-
},
|
|
32855
|
+
wrapper: child => /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
32856
|
+
css: {
|
|
32857
|
+
opacity: isHide ? 0 : undefined,
|
|
32858
|
+
maxWidth: 311
|
|
32859
|
+
},
|
|
32860
|
+
__self: undefined,
|
|
32861
|
+
__source: {
|
|
32862
|
+
fileName: _jsxFileName$4,
|
|
32863
|
+
lineNumber: 281,
|
|
32864
|
+
columnNumber: 9
|
|
32865
|
+
}
|
|
32866
|
+
}, /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
32867
|
+
css: {
|
|
32868
|
+
position: !isMobile && 'sticky',
|
|
32869
|
+
top: !isMobile ? 44 : 40
|
|
32870
|
+
},
|
|
32871
|
+
direction: "column",
|
|
32872
|
+
gap: 7,
|
|
32873
|
+
__self: undefined,
|
|
32874
|
+
__source: {
|
|
32875
|
+
fileName: _jsxFileName$4,
|
|
32876
|
+
lineNumber: 282,
|
|
32877
|
+
columnNumber: 11
|
|
32878
|
+
}
|
|
32879
|
+
}, /*#__PURE__*/React__default["default"].createElement(Card, {
|
|
32880
|
+
css: {
|
|
32881
|
+
height: 'fit-content',
|
|
32882
|
+
padding: 0
|
|
32883
|
+
},
|
|
32884
|
+
showBottomLine: false,
|
|
32885
|
+
__self: undefined,
|
|
32886
|
+
__source: {
|
|
32887
|
+
fileName: _jsxFileName$4,
|
|
32888
|
+
lineNumber: 283,
|
|
32889
|
+
columnNumber: 13
|
|
32890
|
+
}
|
|
32891
|
+
}, child), /*#__PURE__*/React__default["default"].createElement(Box, {
|
|
32892
|
+
__self: undefined,
|
|
32893
|
+
__source: {
|
|
32894
|
+
fileName: _jsxFileName$4,
|
|
32895
|
+
lineNumber: 292,
|
|
32896
|
+
columnNumber: 13
|
|
32897
|
+
}
|
|
32898
|
+
}, typeof (props == null ? void 0 : props.appendContent) === 'function' ? props == null || props.appendContent == null ? void 0 : props.appendContent() : props == null ? void 0 : props.appendContent))),
|
|
32903
32899
|
__self: undefined,
|
|
32904
32900
|
__source: {
|
|
32905
32901
|
fileName: _jsxFileName$4,
|
|
@@ -32964,8 +32960,7 @@
|
|
|
32964
32960
|
}));
|
|
32965
32961
|
}, [props.hide]);
|
|
32966
32962
|
React.useEffect(() => {
|
|
32967
|
-
|
|
32968
|
-
props === null || props === void 0 || (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 || _props$onChangeVisibi.call(props, state.hide);
|
|
32963
|
+
props == null || props.onChangeVisibility == null || props.onChangeVisibility(state.hide);
|
|
32969
32964
|
}, [state.hide]);
|
|
32970
32965
|
const toogleVisibility = value => {
|
|
32971
32966
|
updateState(prev => Object.assign({}, prev, {
|
|
@@ -32974,11 +32969,11 @@
|
|
|
32974
32969
|
};
|
|
32975
32970
|
const getIsComplete = currentStep => {
|
|
32976
32971
|
var _state$isComplete;
|
|
32977
|
-
return state
|
|
32972
|
+
return state == null || (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
|
|
32978
32973
|
};
|
|
32979
32974
|
const getTitleStep = currentStep => {
|
|
32980
32975
|
var _props$navContents;
|
|
32981
|
-
return props
|
|
32976
|
+
return props == null || (_props$navContents = props.navContents) == null || (_props$navContents = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents.title;
|
|
32982
32977
|
};
|
|
32983
32978
|
const setState = value => {
|
|
32984
32979
|
updateState(Object.assign({}, state, value));
|
|
@@ -33012,13 +33007,13 @@
|
|
|
33012
33007
|
block: 'start'
|
|
33013
33008
|
});
|
|
33014
33009
|
props.onStepChange && props.onStepChange(e);
|
|
33015
|
-
if (props
|
|
33016
|
-
if ((e
|
|
33010
|
+
if (props != null && (_props$navContents2 = props.navContents) != null && (_props$navContents2 = _props$navContents2[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents2.disabled) {
|
|
33011
|
+
if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
|
|
33017
33012
|
var _state$SW;
|
|
33018
|
-
state
|
|
33013
|
+
state == null || (_state$SW = state.SW) == null || _state$SW.nextStep();
|
|
33019
33014
|
} else {
|
|
33020
33015
|
var _state$SW2;
|
|
33021
|
-
state
|
|
33016
|
+
state == null || (_state$SW2 = state.SW) == null || _state$SW2.previousStep();
|
|
33022
33017
|
}
|
|
33023
33018
|
}
|
|
33024
33019
|
};
|
|
@@ -33033,11 +33028,11 @@
|
|
|
33033
33028
|
}, /*#__PURE__*/React__default["default"].createElement(StepWizardContext.Provider, {
|
|
33034
33029
|
value: {
|
|
33035
33030
|
toogleVisibility,
|
|
33036
|
-
isHide: state
|
|
33031
|
+
isHide: state == null ? void 0 : state.hide,
|
|
33037
33032
|
setComplete,
|
|
33038
33033
|
setState,
|
|
33039
33034
|
state,
|
|
33040
|
-
SW: state
|
|
33035
|
+
SW: state == null ? void 0 : state.SW,
|
|
33041
33036
|
forbidClickNav: props.forbidClickNav,
|
|
33042
33037
|
titles: props.titles,
|
|
33043
33038
|
isMobile: props.isMobile,
|
|
@@ -33060,7 +33055,7 @@
|
|
|
33060
33055
|
nav: /*#__PURE__*/React__default["default"].createElement(Navigation, {
|
|
33061
33056
|
onNavClicked: props.onNavClicked,
|
|
33062
33057
|
isComplete: state.isComplete,
|
|
33063
|
-
appendContent: props
|
|
33058
|
+
appendContent: props == null ? void 0 : props.appendContent,
|
|
33064
33059
|
__self: undefined,
|
|
33065
33060
|
__source: {
|
|
33066
33061
|
fileName: _jsxFileName$4,
|
|
@@ -33070,7 +33065,7 @@
|
|
|
33070
33065
|
}),
|
|
33071
33066
|
initialStep: props.initialStep,
|
|
33072
33067
|
onStepChange: handleStepChange,
|
|
33073
|
-
isLazyMount: props
|
|
33068
|
+
isLazyMount: props == null ? void 0 : props.isLazyMount,
|
|
33074
33069
|
__self: undefined,
|
|
33075
33070
|
__source: {
|
|
33076
33071
|
fileName: _jsxFileName$4,
|
|
@@ -33217,9 +33212,9 @@
|
|
|
33217
33212
|
var _getDatasets;
|
|
33218
33213
|
function getDatasets(content, activeId, isCollapse) {
|
|
33219
33214
|
const datasets = [];
|
|
33220
|
-
for (let i = 0; i < (content
|
|
33215
|
+
for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
|
|
33221
33216
|
var _content$i;
|
|
33222
|
-
if (((_content$i = content[i])
|
|
33217
|
+
if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
|
|
33223
33218
|
datasets.unshift(content[i]);
|
|
33224
33219
|
} else {
|
|
33225
33220
|
datasets.push(content[i]);
|
|
@@ -33257,7 +33252,7 @@
|
|
|
33257
33252
|
lineNumber: 107,
|
|
33258
33253
|
columnNumber: 7
|
|
33259
33254
|
}
|
|
33260
|
-
}, (_getDatasets = getDatasets(content, activeId, isCollapse))
|
|
33255
|
+
}, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
|
|
33261
33256
|
return /*#__PURE__*/React__default["default"].createElement(List, {
|
|
33262
33257
|
key: index,
|
|
33263
33258
|
__self: this,
|
|
@@ -33274,11 +33269,11 @@
|
|
|
33274
33269
|
marginLeft: '-4px !important',
|
|
33275
33270
|
borderLeftWidth: '4px !important',
|
|
33276
33271
|
borderLeftStyle: 'solid !important',
|
|
33277
|
-
borderLeftColor: `${(item
|
|
33272
|
+
borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
|
|
33278
33273
|
paddingLeft: '16px !important',
|
|
33279
33274
|
minHeight: 25
|
|
33280
33275
|
},
|
|
33281
|
-
"data-to-scrollspy-id": item
|
|
33276
|
+
"data-to-scrollspy-id": item == null ? void 0 : item.id,
|
|
33282
33277
|
__self: this,
|
|
33283
33278
|
__source: {
|
|
33284
33279
|
fileName: _jsxFileName$2,
|
|
@@ -33287,13 +33282,13 @@
|
|
|
33287
33282
|
}
|
|
33288
33283
|
}, /*#__PURE__*/React__default["default"].createElement(Title$1, {
|
|
33289
33284
|
className: "link-title",
|
|
33290
|
-
active: (item
|
|
33291
|
-
href: `#${item
|
|
33285
|
+
active: (item == null ? void 0 : item.id) === activeId,
|
|
33286
|
+
href: `#${item == null ? void 0 : item.id}`,
|
|
33292
33287
|
onClick: e => {
|
|
33293
33288
|
var _e$currentTarget, _e$currentTarget2;
|
|
33294
33289
|
e.preventDefault();
|
|
33295
|
-
onNavClick
|
|
33296
|
-
const target = window.document.getElementById(e
|
|
33290
|
+
onNavClick == null || onNavClick(e == null || (_e$currentTarget = e.currentTarget) == null || (_e$currentTarget = _e$currentTarget.href) == null || (_e$currentTarget = _e$currentTarget.split('#')) == null ? void 0 : _e$currentTarget[1]);
|
|
33291
|
+
const target = window.document.getElementById(e == null || (_e$currentTarget2 = e.currentTarget) == null || (_e$currentTarget2 = _e$currentTarget2.href) == null || (_e$currentTarget2 = _e$currentTarget2.split('#')) == null ? void 0 : _e$currentTarget2[1]);
|
|
33297
33292
|
if (target) {
|
|
33298
33293
|
var headerOffset = 20;
|
|
33299
33294
|
var elementPosition = target.getBoundingClientRect().top;
|
|
@@ -33317,7 +33312,7 @@
|
|
|
33317
33312
|
lineNumber: 125,
|
|
33318
33313
|
columnNumber: 17
|
|
33319
33314
|
}
|
|
33320
|
-
}, item
|
|
33315
|
+
}, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
|
|
33321
33316
|
})));
|
|
33322
33317
|
}
|
|
33323
33318
|
function TableOfContent({
|