@majoo-ui/react 1.60.23-rc.1 → 1.60.23-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/form/components/InputSelect/InputSelect.backup.d.ts +8 -8
- package/index.esm.js +234 -242
- package/index.umd.js +234 -242
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -2572,7 +2572,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
|
|
|
2572
2572
|
onClick: e => {
|
|
2573
2573
|
e.preventDefault();
|
|
2574
2574
|
e.stopPropagation();
|
|
2575
|
-
value
|
|
2575
|
+
value == null ? void 0 : value.onRemove();
|
|
2576
2576
|
},
|
|
2577
2577
|
__self: undefined,
|
|
2578
2578
|
__source: {
|
|
@@ -2591,7 +2591,6 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
|
|
|
2591
2591
|
}
|
|
2592
2592
|
})));
|
|
2593
2593
|
const SingleTagBanner = props => {
|
|
2594
|
-
var _props$icon;
|
|
2595
2594
|
return /*#__PURE__*/React.createElement(Flex$1, {
|
|
2596
2595
|
gap: 2,
|
|
2597
2596
|
direction: "column",
|
|
@@ -2617,7 +2616,7 @@ const SingleTagBanner = props => {
|
|
|
2617
2616
|
lineNumber: 212,
|
|
2618
2617
|
columnNumber: 9
|
|
2619
2618
|
}
|
|
2620
|
-
}, (props
|
|
2619
|
+
}, (props == null ? void 0 : props.icon) && /*#__PURE__*/React.createElement(Flex$1, {
|
|
2621
2620
|
css: {
|
|
2622
2621
|
marginTop: '-2px'
|
|
2623
2622
|
},
|
|
@@ -2627,7 +2626,7 @@ const SingleTagBanner = props => {
|
|
|
2627
2626
|
lineNumber: 213,
|
|
2628
2627
|
columnNumber: 27
|
|
2629
2628
|
}
|
|
2630
|
-
}, props
|
|
2629
|
+
}, props == null ? void 0 : props.icon == null ? void 0 : props.icon()), /*#__PURE__*/React.createElement(Flex$1, {
|
|
2631
2630
|
gap: 2,
|
|
2632
2631
|
direction: "column",
|
|
2633
2632
|
css: {
|
|
@@ -2658,7 +2657,7 @@ const SingleTagBanner = props => {
|
|
|
2658
2657
|
onClick: e => {
|
|
2659
2658
|
e.preventDefault();
|
|
2660
2659
|
e.stopPropagation();
|
|
2661
|
-
props
|
|
2660
|
+
props == null ? void 0 : props.onRemove();
|
|
2662
2661
|
},
|
|
2663
2662
|
closeCenter: !props.title && !props.link,
|
|
2664
2663
|
__self: undefined,
|
|
@@ -8414,7 +8413,7 @@ const InputTextArea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
8414
8413
|
useEffect(() => {
|
|
8415
8414
|
if (textareaRef.current) {
|
|
8416
8415
|
textareaRef.current.style.height = '50px';
|
|
8417
|
-
const scrollHeight = textareaRef
|
|
8416
|
+
const scrollHeight = textareaRef == null ? void 0 : textareaRef.current.scrollHeight;
|
|
8418
8417
|
textareaRef.current.style.height = scrollHeight + 5 + 'px';
|
|
8419
8418
|
}
|
|
8420
8419
|
}, []);
|
|
@@ -8469,7 +8468,7 @@ const InputRadioContext = /*#__PURE__*/React__default.createContext();
|
|
|
8469
8468
|
var _jsxFileName$G = "/Users/majoo/majoo-ui/packages/react/src/components/form/components/InputRadio/InputRadioGroup.js";
|
|
8470
8469
|
const RadioGroup = styled(RadioGroupPrimitive.Root, Flex$1);
|
|
8471
8470
|
function InputRadioGroup(props) {
|
|
8472
|
-
return (props
|
|
8471
|
+
return (props == null ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
|
|
8473
8472
|
value: props,
|
|
8474
8473
|
__self: this,
|
|
8475
8474
|
__source: {
|
|
@@ -8484,7 +8483,7 @@ function InputRadioGroup(props) {
|
|
|
8484
8483
|
lineNumber: 14,
|
|
8485
8484
|
columnNumber: 9
|
|
8486
8485
|
}
|
|
8487
|
-
}), React__default.Children.map(props
|
|
8486
|
+
}), React__default.Children.map(props == null ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
|
|
8488
8487
|
style: Object.assign({}, child.props.style, {
|
|
8489
8488
|
opacity: 1
|
|
8490
8489
|
})
|
|
@@ -8672,9 +8671,8 @@ const InputRadio = _ref => {
|
|
|
8672
8671
|
return /*#__PURE__*/React__default.createElement(InputNumber, _extends({}, inputProps, {
|
|
8673
8672
|
readOnly: readOnly,
|
|
8674
8673
|
onFocus: () => {
|
|
8675
|
-
var _inputProps$onFocus;
|
|
8676
8674
|
onValueChange(props.value);
|
|
8677
|
-
inputProps
|
|
8675
|
+
inputProps == null ? void 0 : inputProps.onFocus == null ? void 0 : inputProps.onFocus();
|
|
8678
8676
|
},
|
|
8679
8677
|
asChild: true,
|
|
8680
8678
|
__self: this,
|
|
@@ -8689,9 +8687,8 @@ const InputRadio = _ref => {
|
|
|
8689
8687
|
disabled: disabled,
|
|
8690
8688
|
readOnly: readOnly,
|
|
8691
8689
|
onFocus: () => {
|
|
8692
|
-
var _inputProps$onFocus2;
|
|
8693
8690
|
onValueChange(props.value);
|
|
8694
|
-
inputProps
|
|
8691
|
+
inputProps == null ? void 0 : inputProps.onFocus == null ? void 0 : inputProps.onFocus();
|
|
8695
8692
|
},
|
|
8696
8693
|
asChild: true,
|
|
8697
8694
|
__self: this,
|
|
@@ -10655,24 +10652,24 @@ var NumberFormat = /*@__PURE__*/function (superclass) {
|
|
|
10655
10652
|
allowLeadingZeros,
|
|
10656
10653
|
format
|
|
10657
10654
|
} = Object.assign({}, ref);
|
|
10658
|
-
const formattedValueStartsWithZero = (_formattedValue = formattedValue)
|
|
10659
|
-
const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue)
|
|
10655
|
+
const formattedValueStartsWithZero = (_formattedValue = formattedValue) == null ? void 0 : _formattedValue.startsWith(`${prefix}0`);
|
|
10656
|
+
const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) == null ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
|
|
10660
10657
|
const emptyFormattedValue = prefix || suffix || prefix + suffix || '';
|
|
10661
10658
|
if ((formattedValueStartsWithZero || formattedWithZeroAndSuffix) && !allowLeadingZeros && !format) {
|
|
10662
10659
|
var _formattedValue3, _input$value;
|
|
10663
10660
|
const isSpecialChar = /^[+-]/.test(formattedValue);
|
|
10664
|
-
if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue)
|
|
10661
|
+
if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) != null && _formattedValue3.includes('0,'))) {
|
|
10665
10662
|
var _formattedValue4, _numAsString;
|
|
10666
|
-
formattedValue = (_formattedValue4 = formattedValue)
|
|
10667
|
-
numAsString = (_numAsString = numAsString)
|
|
10663
|
+
formattedValue = (_formattedValue4 = formattedValue) == null ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
|
|
10664
|
+
numAsString = (_numAsString = numAsString) == null ? void 0 : _numAsString.replace(/^0+/, '');
|
|
10668
10665
|
}
|
|
10669
|
-
if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input
|
|
10666
|
+
if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input == null ? void 0 : input.value)) {
|
|
10670
10667
|
formattedValue = `${prefix}0${suffix}`;
|
|
10671
10668
|
numAsString = '0';
|
|
10672
|
-
} else if (input
|
|
10669
|
+
} else if (input != null && (_input$value = input.value) != null && _input$value.includes('0,')) {
|
|
10673
10670
|
allowLeadingZeros = true;
|
|
10674
|
-
formattedValue = input
|
|
10675
|
-
numAsString = this.removeFormatting(input
|
|
10671
|
+
formattedValue = input == null ? void 0 : input.value;
|
|
10672
|
+
numAsString = this.removeFormatting(input == null ? void 0 : input.value);
|
|
10676
10673
|
}
|
|
10677
10674
|
}
|
|
10678
10675
|
//end adjustment
|
|
@@ -11130,7 +11127,7 @@ function countThousandSeparatorsByLength(numberLength) {
|
|
|
11130
11127
|
}
|
|
11131
11128
|
function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
|
|
11132
11129
|
const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
|
|
11133
|
-
return maxValue + (prefix
|
|
11130
|
+
return maxValue + (prefix == null ? void 0 : prefix.length) + (suffix == null ? void 0 : suffix.length) + tsLength;
|
|
11134
11131
|
}
|
|
11135
11132
|
const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
11136
11133
|
let {
|
|
@@ -11182,9 +11179,9 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
11182
11179
|
size: size,
|
|
11183
11180
|
isInvalid: isInvalid,
|
|
11184
11181
|
readOnly: readOnly,
|
|
11185
|
-
isReadOnly: readOnly && !(props
|
|
11182
|
+
isReadOnly: readOnly && !(props != null && props.inputGroup) && !(props != null && props.asChild),
|
|
11186
11183
|
disabled: disabled,
|
|
11187
|
-
maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props
|
|
11184
|
+
maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props == null ? void 0 : props.prefix, props == null ? void 0 : props.suffix, thousandSeparator) : maxLength,
|
|
11188
11185
|
thousandSeparator: thousandSeparator
|
|
11189
11186
|
}, props, {
|
|
11190
11187
|
__self: undefined,
|
|
@@ -11488,16 +11485,16 @@ function TagsInput(_ref) {
|
|
|
11488
11485
|
const addTags = event => {
|
|
11489
11486
|
if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
|
|
11490
11487
|
if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
|
|
11491
|
-
onEnter
|
|
11488
|
+
onEnter == null ? void 0 : onEnter({
|
|
11492
11489
|
key: 'duplicate',
|
|
11493
11490
|
value: event.target.value
|
|
11494
11491
|
});
|
|
11495
11492
|
return;
|
|
11496
11493
|
}
|
|
11497
|
-
if (pattern && pattern
|
|
11494
|
+
if (pattern && pattern != null && pattern.regex) {
|
|
11498
11495
|
const regex = new RegExp(pattern.regex);
|
|
11499
11496
|
if (!regex.test(event.target.value)) {
|
|
11500
|
-
onEnter
|
|
11497
|
+
onEnter == null ? void 0 : onEnter({
|
|
11501
11498
|
key: 'error',
|
|
11502
11499
|
value: event.target.value
|
|
11503
11500
|
});
|
|
@@ -11506,7 +11503,7 @@ function TagsInput(_ref) {
|
|
|
11506
11503
|
}
|
|
11507
11504
|
}
|
|
11508
11505
|
setRegexError(false);
|
|
11509
|
-
onEnter
|
|
11506
|
+
onEnter == null ? void 0 : onEnter({
|
|
11510
11507
|
key: 'success',
|
|
11511
11508
|
value: event.target.value
|
|
11512
11509
|
});
|
|
@@ -11518,7 +11515,7 @@ function TagsInput(_ref) {
|
|
|
11518
11515
|
if (disabled || readOnly) {
|
|
11519
11516
|
return tags;
|
|
11520
11517
|
} else if (key === 'removeTag' || key === 'Backspace') {
|
|
11521
|
-
onRemoveItem
|
|
11518
|
+
onRemoveItem == null ? void 0 : onRemoveItem(tags[index]);
|
|
11522
11519
|
setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
|
|
11523
11520
|
}
|
|
11524
11521
|
};
|
|
@@ -11569,7 +11566,7 @@ function TagsInput(_ref) {
|
|
|
11569
11566
|
lineNumber: 180,
|
|
11570
11567
|
columnNumber: 9
|
|
11571
11568
|
}
|
|
11572
|
-
})), regexError && pattern && (pattern
|
|
11569
|
+
})), regexError && pattern && (pattern != null && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
|
|
11573
11570
|
color: "red",
|
|
11574
11571
|
__self: this,
|
|
11575
11572
|
__source: {
|
|
@@ -11877,14 +11874,14 @@ const InputSearchbox = _ref => {
|
|
|
11877
11874
|
t
|
|
11878
11875
|
} = useTranslation(['MajooUI/inputSearchbox', 'translation']);
|
|
11879
11876
|
const [value, setValue] = useState(defaultValue);
|
|
11880
|
-
const inputValue = (_props$value = props
|
|
11881
|
-
const debounceChange = useCallback(debounce(e => onChange
|
|
11877
|
+
const inputValue = (_props$value = props == null ? void 0 : props.value) != null ? _props$value : value;
|
|
11878
|
+
const debounceChange = useCallback(debounce(e => onChange == null ? void 0 : onChange(e), 1000), [onChange]);
|
|
11882
11879
|
const handleChange = useCallback(e => {
|
|
11883
11880
|
setValue(e.target.value);
|
|
11884
11881
|
if (withDebounce) {
|
|
11885
11882
|
debounceChange(e.target.value);
|
|
11886
11883
|
} else {
|
|
11887
|
-
onChange
|
|
11884
|
+
onChange == null ? void 0 : onChange(e.target.value);
|
|
11888
11885
|
}
|
|
11889
11886
|
}, [onChange, debounceChange, withDebounce]);
|
|
11890
11887
|
const handleClearButtonClick = e => {
|
|
@@ -11937,7 +11934,7 @@ const InputSearchbox = _ref => {
|
|
|
11937
11934
|
columnNumber: 7
|
|
11938
11935
|
}
|
|
11939
11936
|
})), /*#__PURE__*/React__default.createElement(InputRightElement, {
|
|
11940
|
-
children: (inputValue
|
|
11937
|
+
children: (inputValue == null ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default.createElement(SvgCloseFilled, {
|
|
11941
11938
|
color: colors$7.iconSecondary,
|
|
11942
11939
|
__self: undefined,
|
|
11943
11940
|
__source: {
|
|
@@ -12182,7 +12179,7 @@ const Popover = ({
|
|
|
12182
12179
|
middleware: [offset(_sideOffset), shift$2(), _flip && flip()],
|
|
12183
12180
|
onOpenChange: isOpen => {
|
|
12184
12181
|
setOpenState(isOpen);
|
|
12185
|
-
!isOpen && (onClose
|
|
12182
|
+
!isOpen && (onClose == null ? void 0 : onClose());
|
|
12186
12183
|
},
|
|
12187
12184
|
placement
|
|
12188
12185
|
});
|
|
@@ -13996,13 +13993,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
13996
13993
|
const isShowSelectAll = showSelectAll && !maxSelectedItem;
|
|
13997
13994
|
useEffect(() => {
|
|
13998
13995
|
var _scrollerRef$current;
|
|
13999
|
-
(_scrollerRef$current = scrollerRef.current)
|
|
13996
|
+
(_scrollerRef$current = scrollerRef.current) == null ? void 0 : _scrollerRef$current.scrollTo({
|
|
14000
13997
|
top: 0
|
|
14001
13998
|
});
|
|
14002
13999
|
}, [query]);
|
|
14003
14000
|
useEffect(() => {
|
|
14004
|
-
if (defaultValue
|
|
14005
|
-
if (value
|
|
14001
|
+
if (defaultValue != null && defaultValue.length) {
|
|
14002
|
+
if (value != null && value.length) {
|
|
14006
14003
|
setInputSelectValue(value);
|
|
14007
14004
|
}
|
|
14008
14005
|
} else {
|
|
@@ -14067,14 +14064,14 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14067
14064
|
removeSelectedItem,
|
|
14068
14065
|
selectedItems
|
|
14069
14066
|
} = useMultipleSelection({
|
|
14070
|
-
selectedItems: selectedValue.length > 0 ? initItem
|
|
14067
|
+
selectedItems: selectedValue.length > 0 ? initItem == null ? void 0 : (_initItem$reduce = initItem.reduce((acc, item) => [...acc, item, ...(item.children ? item.children : [])], [])) == null ? void 0 : _initItem$reduce.filter(item => selectedValue.includes(item.id)) : []
|
|
14071
14068
|
});
|
|
14072
14069
|
const generateOptions = data => {
|
|
14073
14070
|
return data.map(option => {
|
|
14074
14071
|
if (typeof option === 'object') {
|
|
14075
14072
|
const id = Object.values(option)[0];
|
|
14076
14073
|
const name = Object.values(option)[1];
|
|
14077
|
-
let children = option
|
|
14074
|
+
let children = option == null ? void 0 : option.children;
|
|
14078
14075
|
let isDisabled = disabledOptions.length > 0 ? disabledOptions.includes(id) : false;
|
|
14079
14076
|
if (children && Array.isArray(children)) {
|
|
14080
14077
|
children = generateOptions(children);
|
|
@@ -14096,7 +14093,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14096
14093
|
};
|
|
14097
14094
|
const debouncedSearch = React__default.useRef(debounce(async query => {
|
|
14098
14095
|
setQuery(query);
|
|
14099
|
-
onSearch
|
|
14096
|
+
onSearch == null ? void 0 : onSearch(query);
|
|
14100
14097
|
}, 1000)).current;
|
|
14101
14098
|
React__default.useEffect(() => {
|
|
14102
14099
|
return () => {
|
|
@@ -14104,7 +14101,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14104
14101
|
};
|
|
14105
14102
|
}, [debouncedSearch]);
|
|
14106
14103
|
const handleInputValue = input => {
|
|
14107
|
-
onSearch
|
|
14104
|
+
onSearch == null ? void 0 : onSearch(input);
|
|
14108
14105
|
if (input === '') {
|
|
14109
14106
|
if (disabledOptions.length > 0) {
|
|
14110
14107
|
const options = generateOptions(sortDisabled);
|
|
@@ -14119,9 +14116,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14119
14116
|
}, ...option] : option);
|
|
14120
14117
|
}
|
|
14121
14118
|
} else {
|
|
14122
|
-
let filterItems = option
|
|
14123
|
-
var _item$name, _item$name$toLowerCas
|
|
14124
|
-
return item
|
|
14119
|
+
let filterItems = option == null ? void 0 : option.filter(item => {
|
|
14120
|
+
var _item$name, _item$name$toLowerCas;
|
|
14121
|
+
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());
|
|
14125
14122
|
});
|
|
14126
14123
|
setItems(filterItems);
|
|
14127
14124
|
}
|
|
@@ -14130,10 +14127,10 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14130
14127
|
if (disabled || readOnly) {
|
|
14131
14128
|
return selectedValue;
|
|
14132
14129
|
} else {
|
|
14133
|
-
if ((selected
|
|
14130
|
+
if ((selected == null ? void 0 : selected.id) === 'counter') {
|
|
14134
14131
|
setSelectedValue([]);
|
|
14135
14132
|
setInputSelectValue([]);
|
|
14136
|
-
onChange
|
|
14133
|
+
onChange == null ? void 0 : onChange([]);
|
|
14137
14134
|
for (let i = 0; i < selectedValue.length; i++) {
|
|
14138
14135
|
removeSelectedItem(selectedValue[i]);
|
|
14139
14136
|
}
|
|
@@ -14143,7 +14140,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14143
14140
|
setSelectedValue(filterItems);
|
|
14144
14141
|
setInputSelectValue(filterItems);
|
|
14145
14142
|
if (selected.id !== '!all') {
|
|
14146
|
-
onChange
|
|
14143
|
+
onChange == null ? void 0 : onChange(filterItems);
|
|
14147
14144
|
}
|
|
14148
14145
|
}
|
|
14149
14146
|
}
|
|
@@ -14182,9 +14179,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14182
14179
|
if (selectedItem.id === '!all') {
|
|
14183
14180
|
items.forEach(item => {
|
|
14184
14181
|
var _item$children;
|
|
14185
|
-
if (item
|
|
14182
|
+
if (item != null && (_item$children = item.children) != null && _item$children.length) {
|
|
14186
14183
|
var _item$children2;
|
|
14187
|
-
item
|
|
14184
|
+
item == null ? void 0 : (_item$children2 = item.children) == null ? void 0 : _item$children2.forEach(item => {
|
|
14188
14185
|
removeSelectedItem(item);
|
|
14189
14186
|
});
|
|
14190
14187
|
} else {
|
|
@@ -14193,7 +14190,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14193
14190
|
});
|
|
14194
14191
|
setSelectedValue([]);
|
|
14195
14192
|
setInputSelectValue([]);
|
|
14196
|
-
onChange
|
|
14193
|
+
onChange == null ? void 0 : onChange([]);
|
|
14197
14194
|
} else {
|
|
14198
14195
|
removeItem(selectedItem);
|
|
14199
14196
|
}
|
|
@@ -14204,9 +14201,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14204
14201
|
const itemIds = [];
|
|
14205
14202
|
items.filter(item => !item.isDisabled).forEach(item => {
|
|
14206
14203
|
var _item$children3;
|
|
14207
|
-
if (item
|
|
14204
|
+
if (item != null && (_item$children3 = item.children) != null && _item$children3.length) {
|
|
14208
14205
|
var _item$children4;
|
|
14209
|
-
item
|
|
14206
|
+
item == null ? void 0 : (_item$children4 = item.children) == null ? void 0 : _item$children4.filter(item => !item.isDisabled).forEach(item => {
|
|
14210
14207
|
addSelectedItem(item);
|
|
14211
14208
|
itemIds.push(item.id);
|
|
14212
14209
|
});
|
|
@@ -14221,17 +14218,17 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14221
14218
|
if (onSelectAllChecked) {
|
|
14222
14219
|
onSelectAllChecked(itemIds.slice(1));
|
|
14223
14220
|
} else {
|
|
14224
|
-
onChange
|
|
14221
|
+
onChange == null ? void 0 : onChange(itemIds.slice(1));
|
|
14225
14222
|
}
|
|
14226
14223
|
} else {
|
|
14227
14224
|
var _selectedItem$childre;
|
|
14228
14225
|
//start check if item have children (option group)
|
|
14229
|
-
if (selectedItem
|
|
14226
|
+
if (selectedItem != null && (_selectedItem$childre = selectedItem.children) != null && _selectedItem$childre.length) {
|
|
14230
14227
|
var _selectedItem$childre2;
|
|
14231
14228
|
const itemIdsSelect = [];
|
|
14232
14229
|
const itemIdsUnSelect = [];
|
|
14233
|
-
selectedItem
|
|
14234
|
-
if (selectedValue
|
|
14230
|
+
selectedItem == null ? void 0 : (_selectedItem$childre2 = selectedItem.children) == null ? void 0 : _selectedItem$childre2.filter(item => !item.isDisabled).forEach(item => {
|
|
14231
|
+
if (selectedValue != null && selectedValue.includes(item.id)) {
|
|
14235
14232
|
removeSelectedItem(item);
|
|
14236
14233
|
itemIdsUnSelect.push(item.id);
|
|
14237
14234
|
} else {
|
|
@@ -14245,19 +14242,19 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14245
14242
|
setSelectedValue([...selectedValue, ...itemIdsSelect]);
|
|
14246
14243
|
setInputSelectValue([...selectedValue, ...itemIdsSelect]);
|
|
14247
14244
|
const _filteredSelectedValues = selectedValue.filter(val => val !== '!all');
|
|
14248
|
-
onChange
|
|
14245
|
+
onChange == null ? void 0 : onChange([..._filteredSelectedValues, ...itemIdsSelect]);
|
|
14249
14246
|
}
|
|
14250
14247
|
|
|
14251
14248
|
//unselect all child in one of the option groups
|
|
14252
14249
|
if (itemIdsUnSelect.length) {
|
|
14253
14250
|
const newSelectedValue = selectedValue.filter(selId => {
|
|
14254
14251
|
var _itemIdsUnSelect$filt;
|
|
14255
|
-
return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId))
|
|
14252
|
+
return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) == null ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
|
|
14256
14253
|
});
|
|
14257
14254
|
setSelectedValue(newSelectedValue);
|
|
14258
14255
|
setInputSelectValue(newSelectedValue);
|
|
14259
14256
|
const _filteredSelectedValues2 = newSelectedValue.filter(val => val !== '!all');
|
|
14260
|
-
onChange
|
|
14257
|
+
onChange == null ? void 0 : onChange(_filteredSelectedValues2);
|
|
14261
14258
|
}
|
|
14262
14259
|
return;
|
|
14263
14260
|
}
|
|
@@ -14274,7 +14271,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14274
14271
|
setSelectedValue([...selectedValue, selectedItem.id]);
|
|
14275
14272
|
setInputSelectValue([...selectedValue, selectedItem.id]);
|
|
14276
14273
|
const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
|
|
14277
|
-
onChange
|
|
14274
|
+
onChange == null ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
|
|
14278
14275
|
}
|
|
14279
14276
|
selectItem(null);
|
|
14280
14277
|
}
|
|
@@ -14306,9 +14303,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14306
14303
|
}
|
|
14307
14304
|
}
|
|
14308
14305
|
});
|
|
14309
|
-
const getOption = useCallback(() => maxSelectedItem ? option
|
|
14310
|
-
const isMaxSelectedItem = maxSelectedItem && (selectedValue
|
|
14311
|
-
if (isMaxSelectedItem && !(selectedValue
|
|
14306
|
+
const getOption = useCallback(() => maxSelectedItem ? option == null ? void 0 : option.map(item => {
|
|
14307
|
+
const isMaxSelectedItem = maxSelectedItem && (selectedValue == null ? void 0 : selectedValue.length) >= maxSelectedItem;
|
|
14308
|
+
if (isMaxSelectedItem && !(selectedValue != null && selectedValue.includes(item.id))) {
|
|
14312
14309
|
item.hideCheck = true;
|
|
14313
14310
|
item.isDisabled = true;
|
|
14314
14311
|
} else {
|
|
@@ -14317,7 +14314,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14317
14314
|
}
|
|
14318
14315
|
return item;
|
|
14319
14316
|
}) : option, [maxSelectedItem, option, selectedValue]);
|
|
14320
|
-
const itemsLength = items
|
|
14317
|
+
const itemsLength = items == null ? void 0 : items.reduce((acc, item) => {
|
|
14321
14318
|
return [...acc, ...(item.children ? item.children : [item])];
|
|
14322
14319
|
}, []).length;
|
|
14323
14320
|
useEffect(() => {
|
|
@@ -14366,16 +14363,15 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14366
14363
|
}, [label, isOpen]);
|
|
14367
14364
|
const toggleCollapsible = () => setShowAllTags(!showAllTags);
|
|
14368
14365
|
const handleRemoveAllItem = () => {
|
|
14369
|
-
onChange
|
|
14366
|
+
onChange == null ? void 0 : onChange([]);
|
|
14370
14367
|
setSelectedValue([]);
|
|
14371
14368
|
setInputSelectValue([]);
|
|
14372
14369
|
for (let i = 0; i < selectedValue.length; i++) {
|
|
14373
14370
|
removeSelectedItem(selectedValue[i]);
|
|
14374
14371
|
}
|
|
14375
14372
|
};
|
|
14376
|
-
const isShowTagSelectAll = showTagSelectAll && (selectedItems
|
|
14373
|
+
const isShowTagSelectAll = showTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > (option == null ? void 0 : option.length);
|
|
14377
14374
|
const renderOptionItem = (item, index, asChild) => {
|
|
14378
|
-
var _item$render;
|
|
14379
14375
|
return /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
|
|
14380
14376
|
key: item.id
|
|
14381
14377
|
}, getItemProps({
|
|
@@ -14409,7 +14405,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14409
14405
|
lineNumber: 777,
|
|
14410
14406
|
columnNumber: 11
|
|
14411
14407
|
}
|
|
14412
|
-
}, !(item
|
|
14408
|
+
}, !(item != null && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
14413
14409
|
color: colors$8.iconDisable,
|
|
14414
14410
|
__self: undefined,
|
|
14415
14411
|
__source: {
|
|
@@ -14425,7 +14421,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14425
14421
|
lineNumber: 793,
|
|
14426
14422
|
columnNumber: 19
|
|
14427
14423
|
}
|
|
14428
|
-
})), isShowSelectAll && (item
|
|
14424
|
+
})), isShowSelectAll && (item == null ? void 0 : item.id) === '!all' && selectedValue != null && selectedValue.length && (selectedValue == null ? void 0 : selectedValue.length) < itemsLength ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
|
|
14429
14425
|
__self: undefined,
|
|
14430
14426
|
__source: {
|
|
14431
14427
|
fileName: _jsxFileName$w,
|
|
@@ -14450,15 +14446,15 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14450
14446
|
lineNumber: 802,
|
|
14451
14447
|
columnNumber: 11
|
|
14452
14448
|
}
|
|
14453
|
-
}, item.render ?
|
|
14449
|
+
}, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name));
|
|
14454
14450
|
};
|
|
14455
14451
|
let lastGroupIndex = showSelectAll ? 1 : 0;
|
|
14456
14452
|
const renderOptionGroupItem = (item, index) => {
|
|
14457
|
-
var _item$children5, _item$children6, _item$children7, _item$children7$filte, _item$
|
|
14453
|
+
var _item$children5, _item$children6, _item$children7, _item$children7$filte, _item$children8;
|
|
14458
14454
|
// const groupIndex = (index > (showSelectAll ? 1 : 0)) ? lastGroupIndex : 0;
|
|
14459
14455
|
const groupIndex = lastGroupIndex;
|
|
14460
|
-
lastGroupIndex += ((item
|
|
14461
|
-
const filterSelectedChild = item
|
|
14456
|
+
lastGroupIndex += ((item == null ? void 0 : (_item$children5 = item.children) == null ? void 0 : _item$children5.length) || 0) + 1;
|
|
14457
|
+
const filterSelectedChild = item == null ? void 0 : (_item$children6 = item.children) == null ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
|
|
14462
14458
|
return /*#__PURE__*/React__default.createElement(OptionGroupItem, {
|
|
14463
14459
|
item: /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
|
|
14464
14460
|
key: item.id
|
|
@@ -14491,7 +14487,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14491
14487
|
lineNumber: 831,
|
|
14492
14488
|
columnNumber: 15
|
|
14493
14489
|
}
|
|
14494
|
-
}, !(item
|
|
14490
|
+
}, !(item != null && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
14495
14491
|
color: colors$8.iconDisable,
|
|
14496
14492
|
__self: undefined,
|
|
14497
14493
|
__source: {
|
|
@@ -14499,7 +14495,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14499
14495
|
lineNumber: 841,
|
|
14500
14496
|
columnNumber: 19
|
|
14501
14497
|
}
|
|
14502
|
-
}) : (filterSelectedChild
|
|
14498
|
+
}) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) === (item == null ? void 0 : (_item$children7 = item.children) == null ? void 0 : (_item$children7$filte = _item$children7.filter(e => !e.isDisabled)) == null ? void 0 : _item$children7$filte.length) ? /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
14503
14499
|
color: colors$8.iconGreen,
|
|
14504
14500
|
__self: undefined,
|
|
14505
14501
|
__source: {
|
|
@@ -14507,7 +14503,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14507
14503
|
lineNumber: 843,
|
|
14508
14504
|
columnNumber: 19
|
|
14509
14505
|
}
|
|
14510
|
-
}) : (filterSelectedChild
|
|
14506
|
+
}) : (filterSelectedChild == null ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
|
|
14511
14507
|
__self: undefined,
|
|
14512
14508
|
__source: {
|
|
14513
14509
|
fileName: _jsxFileName$w,
|
|
@@ -14525,14 +14521,14 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14525
14521
|
lineNumber: 848,
|
|
14526
14522
|
columnNumber: 15
|
|
14527
14523
|
}
|
|
14528
|
-
}, item.render ?
|
|
14524
|
+
}, item.render ? item.render == null ? void 0 : item.render(item.name) : item.name)),
|
|
14529
14525
|
__self: undefined,
|
|
14530
14526
|
__source: {
|
|
14531
14527
|
fileName: _jsxFileName$w,
|
|
14532
14528
|
lineNumber: 816,
|
|
14533
14529
|
columnNumber: 9
|
|
14534
14530
|
}
|
|
14535
|
-
}, item
|
|
14531
|
+
}, item == null ? void 0 : (_item$children8 = item.children) == null ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
|
|
14536
14532
|
};
|
|
14537
14533
|
return /*#__PURE__*/React__default.createElement(Wrapper$1, _extends({
|
|
14538
14534
|
css: css
|
|
@@ -14663,13 +14659,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14663
14659
|
lineNumber: 907,
|
|
14664
14660
|
columnNumber: 17
|
|
14665
14661
|
}
|
|
14666
|
-
}), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems
|
|
14662
|
+
}), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems == null ? void 0 : (_selectedItems$filter = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : (_selectedItems$filter2 = _selectedItems$filter.filter((_, idx) => {
|
|
14667
14663
|
if (showAllTags || !collapsible) {
|
|
14668
14664
|
return true;
|
|
14669
14665
|
} else {
|
|
14670
14666
|
return idx < 5;
|
|
14671
14667
|
}
|
|
14672
|
-
}))
|
|
14668
|
+
})) == null ? void 0 : _selectedItems$filter2.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
|
|
14673
14669
|
disabled: disabled,
|
|
14674
14670
|
isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
|
|
14675
14671
|
size: "lg",
|
|
@@ -14694,7 +14690,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14694
14690
|
lineNumber: 936,
|
|
14695
14691
|
columnNumber: 21
|
|
14696
14692
|
}
|
|
14697
|
-
}), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems
|
|
14693
|
+
}), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems == null ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
14698
14694
|
direction: "column",
|
|
14699
14695
|
gap: 4,
|
|
14700
14696
|
__self: undefined,
|
|
@@ -14780,7 +14776,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14780
14776
|
lineNumber: 979,
|
|
14781
14777
|
columnNumber: 19
|
|
14782
14778
|
}
|
|
14783
|
-
}, `${totalOptions ? totalOptions : selectedItems
|
|
14779
|
+
}, `${totalOptions ? totalOptions : selectedItems == null ? void 0 : (_selectedItems$filter3 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter3.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`))), showCounter && !isShowTagSelectAll && Boolean(selectedItems == null ? void 0 : selectedItems.length) && /*#__PURE__*/React__default.createElement(Paragraph, {
|
|
14784
14780
|
css: {
|
|
14785
14781
|
fontSize: '$label',
|
|
14786
14782
|
marginTop: '$spacing-01'
|
|
@@ -14792,7 +14788,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14792
14788
|
lineNumber: 989,
|
|
14793
14789
|
columnNumber: 11
|
|
14794
14790
|
}
|
|
14795
|
-
}, `${totalOptions ? totalOptions : selectedItems
|
|
14791
|
+
}, `${totalOptions ? totalOptions : selectedItems == null ? void 0 : (_selectedItems$filter4 = selectedItems.filter(item => (item == null ? void 0 : item.id) !== '!all')) == null ? void 0 : _selectedItems$filter4.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
|
|
14796
14792
|
placement: placement,
|
|
14797
14793
|
css: {
|
|
14798
14794
|
display: isOpen && disabled === false ? 'block' : 'none',
|
|
@@ -14856,7 +14852,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14856
14852
|
if (scrollerRef.current) {
|
|
14857
14853
|
scrollerRef.current.scrollBy(0, -5);
|
|
14858
14854
|
}
|
|
14859
|
-
fetchData
|
|
14855
|
+
fetchData == null ? void 0 : fetchData({
|
|
14860
14856
|
query
|
|
14861
14857
|
});
|
|
14862
14858
|
}
|
|
@@ -14877,7 +14873,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14877
14873
|
lineNumber: 1029,
|
|
14878
14874
|
columnNumber: 15
|
|
14879
14875
|
}
|
|
14880
|
-
}, isOpen && items.map((item, index) => item
|
|
14876
|
+
}, isOpen && items.map((item, index) => item != null && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
|
|
14881
14877
|
css: {
|
|
14882
14878
|
height: 'auto'
|
|
14883
14879
|
}
|
|
@@ -15577,7 +15573,7 @@ function InputResourceList({
|
|
|
15577
15573
|
padding: '$spacing-05',
|
|
15578
15574
|
borderRadius: '$lg',
|
|
15579
15575
|
maxHeight: 285,
|
|
15580
|
-
height: isLoading ? 285 : 'unset',
|
|
15576
|
+
height: isLoading ? wrapperCss ? wrapperCss === null || wrapperCss === void 0 ? void 0 : wrapperCss.maxHeight : 285 : 'unset',
|
|
15581
15577
|
overflow: 'auto',
|
|
15582
15578
|
marginTop: '$spacing-03'
|
|
15583
15579
|
}, wrapperCss && wrapperCss),
|
|
@@ -17267,9 +17263,9 @@ const NativeTimePicker = ({
|
|
|
17267
17263
|
}
|
|
17268
17264
|
function handleInputChange(type, e) {
|
|
17269
17265
|
var _e$target;
|
|
17270
|
-
const value = e
|
|
17266
|
+
const value = e == null ? void 0 : (_e$target = e.target) == null ? void 0 : _e$target.value;
|
|
17271
17267
|
const format = 'DD:MM:YYYY:HH:mm';
|
|
17272
|
-
const minLength = (value
|
|
17268
|
+
const minLength = (value == null ? void 0 : value.length) > 1;
|
|
17273
17269
|
const hourValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:mm')}:${params}`, 'DD:MM:YYYY:mm:HH').toDate());
|
|
17274
17270
|
const minuteValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:HH')}:${params}`, 'DD:MM:YYYY:HH:mm').toDate());
|
|
17275
17271
|
if (!disabled) {
|
|
@@ -21147,7 +21143,7 @@ const NotificationBadge = _ref => {
|
|
|
21147
21143
|
};
|
|
21148
21144
|
};
|
|
21149
21145
|
const getValue = () => {
|
|
21150
|
-
let value = props
|
|
21146
|
+
let value = props == null ? void 0 : props.value;
|
|
21151
21147
|
const isTrailing = variantIcon === 'trailing';
|
|
21152
21148
|
if (typeof value === 'number' || parseInt(value)) {
|
|
21153
21149
|
if (Math.sign(value) === 1 || Math.sign(value) === 0) {
|
|
@@ -21777,7 +21773,7 @@ const PaginationButton = ({
|
|
|
21777
21773
|
justify: "center",
|
|
21778
21774
|
onClick: () => {
|
|
21779
21775
|
var _dialogPageRef$curren;
|
|
21780
|
-
return (_dialogPageRef$curren = dialogPageRef.current)
|
|
21776
|
+
return (_dialogPageRef$curren = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren.click();
|
|
21781
21777
|
},
|
|
21782
21778
|
__self: undefined,
|
|
21783
21779
|
__source: {
|
|
@@ -21855,7 +21851,7 @@ const PaginationButton = ({
|
|
|
21855
21851
|
onSubmit: () => {
|
|
21856
21852
|
var _dialogPageRef$curren2;
|
|
21857
21853
|
debouncedGoToPage(Number(goToPage));
|
|
21858
|
-
(_dialogPageRef$curren2 = dialogPageRef.current)
|
|
21854
|
+
(_dialogPageRef$curren2 = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren2.click();
|
|
21859
21855
|
},
|
|
21860
21856
|
__self: undefined,
|
|
21861
21857
|
__source: {
|
|
@@ -21872,7 +21868,7 @@ const PaginationButton = ({
|
|
|
21872
21868
|
allowNegative: false,
|
|
21873
21869
|
onChange: e => {
|
|
21874
21870
|
var _e$target;
|
|
21875
|
-
return setGoToPage((_e$target = e.target)
|
|
21871
|
+
return setGoToPage((_e$target = e.target) == null ? void 0 : _e$target.value);
|
|
21876
21872
|
},
|
|
21877
21873
|
__self: undefined,
|
|
21878
21874
|
__source: {
|
|
@@ -21905,7 +21901,7 @@ const PaginationButton = ({
|
|
|
21905
21901
|
onClick: () => {
|
|
21906
21902
|
var _dialogPageRef$curren3;
|
|
21907
21903
|
setGoToPage(null);
|
|
21908
|
-
(_dialogPageRef$curren3 = dialogPageRef.current)
|
|
21904
|
+
(_dialogPageRef$curren3 = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren3.click();
|
|
21909
21905
|
},
|
|
21910
21906
|
__self: undefined,
|
|
21911
21907
|
__source: {
|
|
@@ -21920,7 +21916,7 @@ const PaginationButton = ({
|
|
|
21920
21916
|
onClick: () => {
|
|
21921
21917
|
var _dialogPageRef$curren4;
|
|
21922
21918
|
debouncedGoToPage(Number(goToPage));
|
|
21923
|
-
(_dialogPageRef$curren4 = dialogPageRef.current)
|
|
21919
|
+
(_dialogPageRef$curren4 = dialogPageRef.current) == null ? void 0 : _dialogPageRef$curren4.click();
|
|
21924
21920
|
},
|
|
21925
21921
|
__self: undefined,
|
|
21926
21922
|
__source: {
|
|
@@ -22009,7 +22005,7 @@ function PaginationInfo(_ref) {
|
|
|
22009
22005
|
onClick: () => {
|
|
22010
22006
|
if (isMobilePagination) {
|
|
22011
22007
|
var _dialogLimitRef$curre;
|
|
22012
|
-
(_dialogLimitRef$curre = dialogLimitRef.current)
|
|
22008
|
+
(_dialogLimitRef$curre = dialogLimitRef.current) == null ? void 0 : _dialogLimitRef$curre.click();
|
|
22013
22009
|
}
|
|
22014
22010
|
},
|
|
22015
22011
|
__self: this,
|
|
@@ -22055,7 +22051,7 @@ function PaginationInfo(_ref) {
|
|
|
22055
22051
|
lineNumber: 60,
|
|
22056
22052
|
columnNumber: 13
|
|
22057
22053
|
}
|
|
22058
|
-
}, limits
|
|
22054
|
+
}, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
|
|
22059
22055
|
key: limit,
|
|
22060
22056
|
css: limitItemContainerStyle(selectedLimit === limit),
|
|
22061
22057
|
onClick: () => onChange(limit),
|
|
@@ -22138,7 +22134,7 @@ function PaginationInfo(_ref) {
|
|
|
22138
22134
|
lineNumber: 100,
|
|
22139
22135
|
columnNumber: 11
|
|
22140
22136
|
}
|
|
22141
|
-
}, limits
|
|
22137
|
+
}, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
22142
22138
|
css: {
|
|
22143
22139
|
height: 44,
|
|
22144
22140
|
width: '100%',
|
|
@@ -22153,7 +22149,7 @@ function PaginationInfo(_ref) {
|
|
|
22153
22149
|
onClick: () => {
|
|
22154
22150
|
var _dialogLimitRef$curre2;
|
|
22155
22151
|
onChange(limit);
|
|
22156
|
-
(_dialogLimitRef$curre2 = dialogLimitRef.current)
|
|
22152
|
+
(_dialogLimitRef$curre2 = dialogLimitRef.current) == null ? void 0 : _dialogLimitRef$curre2.click();
|
|
22157
22153
|
},
|
|
22158
22154
|
__self: this,
|
|
22159
22155
|
__source: {
|
|
@@ -24559,7 +24555,7 @@ const rowMenuColumn = (options, icon, config) => ({
|
|
|
24559
24555
|
onClick: () => {
|
|
24560
24556
|
var _document$getElements;
|
|
24561
24557
|
setOpenDrop(true);
|
|
24562
|
-
const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu'))
|
|
24558
|
+
const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) == null ? void 0 : _document$getElements[0];
|
|
24563
24559
|
contextMenu.style.opacity = 0;
|
|
24564
24560
|
},
|
|
24565
24561
|
__self: undefined,
|
|
@@ -25208,7 +25204,7 @@ const TemplateAlertFunction = props => {
|
|
|
25208
25204
|
if (!props.onOpenAutoFocus) {
|
|
25209
25205
|
e.preventDefault();
|
|
25210
25206
|
} else {
|
|
25211
|
-
props
|
|
25207
|
+
props == null ? void 0 : props.onOpenAutoFocus();
|
|
25212
25208
|
}
|
|
25213
25209
|
},
|
|
25214
25210
|
__self: undefined,
|
|
@@ -25288,7 +25284,7 @@ const TemplateAlertFunction = props => {
|
|
|
25288
25284
|
}, props.description)), /*#__PURE__*/React__default.createElement(Box, {
|
|
25289
25285
|
css: {
|
|
25290
25286
|
width: '100%',
|
|
25291
|
-
display: props
|
|
25287
|
+
display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
|
|
25292
25288
|
},
|
|
25293
25289
|
__self: undefined,
|
|
25294
25290
|
__source: {
|
|
@@ -25330,8 +25326,8 @@ const TemplateAlertFunction = props => {
|
|
|
25330
25326
|
size: props.btnSize,
|
|
25331
25327
|
onClick: buttonConfirm,
|
|
25332
25328
|
buttonType: props.dialogType,
|
|
25333
|
-
disabled: props
|
|
25334
|
-
}, props
|
|
25329
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25330
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
25335
25331
|
__self: undefined,
|
|
25336
25332
|
__source: {
|
|
25337
25333
|
fileName: _jsxFileName$b,
|
|
@@ -25350,19 +25346,19 @@ const TemplateAlertFunction = props => {
|
|
|
25350
25346
|
size: props.btnSize,
|
|
25351
25347
|
onClick: buttonCancel,
|
|
25352
25348
|
css: {
|
|
25353
|
-
color: props.dialogType === 'negative' && !(props
|
|
25349
|
+
color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
|
|
25354
25350
|
flex: props.isMobile && 1
|
|
25355
25351
|
},
|
|
25356
|
-
buttonType: props.dialogType === 'negative' && !(props
|
|
25357
|
-
disabled: props
|
|
25358
|
-
}, props
|
|
25352
|
+
buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
|
|
25353
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25354
|
+
}, props == null ? void 0 : props.cancelButtonProps, {
|
|
25359
25355
|
__self: undefined,
|
|
25360
25356
|
__source: {
|
|
25361
25357
|
fileName: _jsxFileName$b,
|
|
25362
25358
|
lineNumber: 187,
|
|
25363
25359
|
columnNumber: 19
|
|
25364
25360
|
}
|
|
25365
|
-
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props
|
|
25361
|
+
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
|
|
25366
25362
|
asChild: true,
|
|
25367
25363
|
__self: undefined,
|
|
25368
25364
|
__source: {
|
|
@@ -25377,8 +25373,8 @@ const TemplateAlertFunction = props => {
|
|
|
25377
25373
|
css: {
|
|
25378
25374
|
flex: props.isMobile && 1
|
|
25379
25375
|
},
|
|
25380
|
-
disabled: props
|
|
25381
|
-
}, props
|
|
25376
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25377
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
25382
25378
|
__self: undefined,
|
|
25383
25379
|
__source: {
|
|
25384
25380
|
fileName: _jsxFileName$b,
|
|
@@ -25508,7 +25504,7 @@ function AlertDialog(props) {
|
|
|
25508
25504
|
}, props.description)), /*#__PURE__*/React__default.createElement(Box, {
|
|
25509
25505
|
css: {
|
|
25510
25506
|
width: '100%',
|
|
25511
|
-
display: props
|
|
25507
|
+
display: props != null && props.singleButton && props != null && props.hideActionButton ? 'none' : 'inherit'
|
|
25512
25508
|
},
|
|
25513
25509
|
__self: this,
|
|
25514
25510
|
__source: {
|
|
@@ -25553,8 +25549,8 @@ function AlertDialog(props) {
|
|
|
25553
25549
|
css: {
|
|
25554
25550
|
flex: props.isMobile && 1
|
|
25555
25551
|
},
|
|
25556
|
-
disabled: props
|
|
25557
|
-
}, props
|
|
25552
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25553
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
25558
25554
|
__self: this,
|
|
25559
25555
|
__source: {
|
|
25560
25556
|
fileName: _jsxFileName$b,
|
|
@@ -25573,19 +25569,19 @@ function AlertDialog(props) {
|
|
|
25573
25569
|
size: props.btnSize,
|
|
25574
25570
|
onClick: props.onCancel,
|
|
25575
25571
|
css: {
|
|
25576
|
-
color: props.dialogType === 'negative' && !(props
|
|
25572
|
+
color: props.dialogType === 'negative' && !(props != null && props.disabledButton) && '$textSecondary !important',
|
|
25577
25573
|
flex: props.isMobile && 1
|
|
25578
25574
|
},
|
|
25579
|
-
buttonType: props.dialogType === 'negative' && !(props
|
|
25580
|
-
disabled: props
|
|
25581
|
-
}, props
|
|
25575
|
+
buttonType: props.dialogType === 'negative' && !(props != null && props.disabledButton) ? 'ghost-secondary' : 'ghost',
|
|
25576
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25577
|
+
}, props == null ? void 0 : props.cancelButtonProps, {
|
|
25582
25578
|
__self: this,
|
|
25583
25579
|
__source: {
|
|
25584
25580
|
fileName: _jsxFileName$b,
|
|
25585
25581
|
lineNumber: 293,
|
|
25586
25582
|
columnNumber: 19
|
|
25587
25583
|
}
|
|
25588
|
-
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props
|
|
25584
|
+
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props != null && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
|
|
25589
25585
|
asChild: true,
|
|
25590
25586
|
__self: this,
|
|
25591
25587
|
__source: {
|
|
@@ -25600,8 +25596,8 @@ function AlertDialog(props) {
|
|
|
25600
25596
|
css: {
|
|
25601
25597
|
flex: props.isMobile && 1
|
|
25602
25598
|
},
|
|
25603
|
-
disabled: props
|
|
25604
|
-
}, props
|
|
25599
|
+
disabled: props == null ? void 0 : props.disabledButton
|
|
25600
|
+
}, props == null ? void 0 : props.actionButtonProps, {
|
|
25605
25601
|
__self: this,
|
|
25606
25602
|
__source: {
|
|
25607
25603
|
fileName: _jsxFileName$b,
|
|
@@ -28075,7 +28071,7 @@ const Upload = ({
|
|
|
28075
28071
|
upload({
|
|
28076
28072
|
url: action,
|
|
28077
28073
|
file: newFile,
|
|
28078
|
-
customBody: customBodyRequest
|
|
28074
|
+
customBody: customBodyRequest == null ? void 0 : customBodyRequest(newFile),
|
|
28079
28075
|
token,
|
|
28080
28076
|
tokenKey,
|
|
28081
28077
|
reqKey,
|
|
@@ -28095,12 +28091,12 @@ const Upload = ({
|
|
|
28095
28091
|
arrProgress[i] = fileProgress;
|
|
28096
28092
|
}
|
|
28097
28093
|
}
|
|
28098
|
-
onChange
|
|
28094
|
+
onChange == null ? void 0 : (_onChange = onChange({
|
|
28099
28095
|
fileList: arrProgress,
|
|
28100
28096
|
file: fileProgress,
|
|
28101
28097
|
indexReplace: indexReplace.current,
|
|
28102
28098
|
isReplace: indexReplace.current !== null
|
|
28103
|
-
}))
|
|
28099
|
+
})) == null ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) == null ? void 0 : _onChange$then.catch(error => setError(error.message));
|
|
28104
28100
|
}
|
|
28105
28101
|
}).then(result => {
|
|
28106
28102
|
var _onChange2, _onChange2$then;
|
|
@@ -28113,12 +28109,12 @@ const Upload = ({
|
|
|
28113
28109
|
arrFile[i] = fileSuccess;
|
|
28114
28110
|
}
|
|
28115
28111
|
}
|
|
28116
|
-
onChange
|
|
28112
|
+
onChange == null ? void 0 : (_onChange2 = onChange({
|
|
28117
28113
|
fileList: arrFile,
|
|
28118
28114
|
file: fileSuccess,
|
|
28119
28115
|
indexReplace: indexReplace.current,
|
|
28120
28116
|
isReplace: indexReplace.current !== null
|
|
28121
|
-
}))
|
|
28117
|
+
})) == null ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) == null ? void 0 : _onChange2$then.catch(error => setError(error.message));
|
|
28122
28118
|
}).catch(error => {
|
|
28123
28119
|
var _onChange3, _onChange3$then;
|
|
28124
28120
|
let fileError = Object.assign({}, newFile);
|
|
@@ -28130,21 +28126,21 @@ const Upload = ({
|
|
|
28130
28126
|
arrFile[i] = fileError;
|
|
28131
28127
|
}
|
|
28132
28128
|
}
|
|
28133
|
-
onChange
|
|
28129
|
+
onChange == null ? void 0 : (_onChange3 = onChange({
|
|
28134
28130
|
fileList: arrFile,
|
|
28135
28131
|
file: fileError,
|
|
28136
28132
|
indexReplace: indexReplace.current,
|
|
28137
28133
|
isReplace: indexReplace.current !== null
|
|
28138
|
-
}))
|
|
28134
|
+
})) == null ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) == null ? void 0 : _onChange3$then.catch(error => setError(error.message));
|
|
28139
28135
|
});
|
|
28140
28136
|
} else {
|
|
28141
28137
|
var _onChange4, _onChange4$then;
|
|
28142
|
-
onChange
|
|
28138
|
+
onChange == null ? void 0 : (_onChange4 = onChange({
|
|
28143
28139
|
fileList: arrFile,
|
|
28144
28140
|
file: newFile,
|
|
28145
28141
|
indexReplace: indexReplace.current,
|
|
28146
28142
|
isReplace: indexReplace.current !== null
|
|
28147
|
-
}))
|
|
28143
|
+
})) == null ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) == null ? void 0 : _onChange4$then.catch(error => setError(error.message));
|
|
28148
28144
|
}
|
|
28149
28145
|
if (indexReplace.current !== null) {
|
|
28150
28146
|
arrFile[indexReplace.current] = newFile;
|
|
@@ -28164,15 +28160,15 @@ const Upload = ({
|
|
|
28164
28160
|
// program to get the dimensions of an image
|
|
28165
28161
|
const img = document.createElement('img');
|
|
28166
28162
|
img.src = URL.createObjectURL(files[0]);
|
|
28167
|
-
img.size = files
|
|
28168
|
-
img.type = files
|
|
28163
|
+
img.size = files == null ? void 0 : (_files$ = files[0]) == null ? void 0 : _files$.size;
|
|
28164
|
+
img.type = files == null ? void 0 : (_files$2 = files[0]) == null ? void 0 : _files$2.type;
|
|
28169
28165
|
img.onload = () => {
|
|
28170
28166
|
const imgRatio = img.width / img.height;
|
|
28171
28167
|
// setAspect(imgRatio);
|
|
28172
28168
|
setCropperImgRatio(imgRatio);
|
|
28173
28169
|
if (onBeforeCrop) {
|
|
28174
28170
|
var _onBeforeCrop, _onBeforeCrop$then;
|
|
28175
|
-
onBeforeCrop
|
|
28171
|
+
onBeforeCrop == null ? void 0 : (_onBeforeCrop = onBeforeCrop(img)) == null ? void 0 : (_onBeforeCrop$then = _onBeforeCrop.then(() => {
|
|
28176
28172
|
setError(null);
|
|
28177
28173
|
toggleModal();
|
|
28178
28174
|
setTimeout(() => {
|
|
@@ -28186,7 +28182,7 @@ const Upload = ({
|
|
|
28186
28182
|
}, 300);
|
|
28187
28183
|
setFileState(files[0]);
|
|
28188
28184
|
setPreviewImage(URL.createObjectURL(files[0]));
|
|
28189
|
-
}))
|
|
28185
|
+
})) == null ? void 0 : _onBeforeCrop$then.catch(error => setError(error == null ? void 0 : error.message));
|
|
28190
28186
|
} else {
|
|
28191
28187
|
toggleModal();
|
|
28192
28188
|
setTimeout(() => {
|
|
@@ -28204,18 +28200,18 @@ const Upload = ({
|
|
|
28204
28200
|
};
|
|
28205
28201
|
img.onerror = error => {
|
|
28206
28202
|
var _onBeforeCrop2, _onBeforeCrop2$then;
|
|
28207
|
-
onBeforeCrop
|
|
28203
|
+
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));
|
|
28208
28204
|
};
|
|
28209
28205
|
}
|
|
28210
28206
|
}
|
|
28211
28207
|
}
|
|
28212
28208
|
function handleCrop() {
|
|
28213
|
-
if (completedCrop
|
|
28214
|
-
imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState
|
|
28215
|
-
const sizeMB = (blob
|
|
28209
|
+
if (completedCrop != null && completedCrop.width && completedCrop != null && completedCrop.height && imgRef.current) {
|
|
28210
|
+
imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState == null ? void 0 : fileState.type).then(blob => {
|
|
28211
|
+
const sizeMB = (blob == null ? void 0 : blob.size) / 1024 / 1024;
|
|
28216
28212
|
if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
|
|
28217
|
-
const file = new File([blob], fileState
|
|
28218
|
-
type: blob
|
|
28213
|
+
const file = new File([blob], fileState == null ? void 0 : fileState.name, {
|
|
28214
|
+
type: blob == null ? void 0 : blob.type
|
|
28219
28215
|
});
|
|
28220
28216
|
handleUpload([file]);
|
|
28221
28217
|
setCrop(null);
|
|
@@ -28229,16 +28225,16 @@ const Upload = ({
|
|
|
28229
28225
|
alwaysKeepResolution: true
|
|
28230
28226
|
}).then(compressedFile => {
|
|
28231
28227
|
var _fileState$name;
|
|
28232
|
-
const file = new File([compressedFile], (fileState
|
|
28233
|
-
type: compressedFile
|
|
28228
|
+
const file = new File([compressedFile], (fileState == null ? void 0 : (_fileState$name = fileState.name) == null ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
|
|
28229
|
+
type: compressedFile == null ? void 0 : compressedFile.type
|
|
28234
28230
|
});
|
|
28235
28231
|
handleUpload([file]);
|
|
28236
28232
|
setCrop(null);
|
|
28237
28233
|
setCompletedCrop(null);
|
|
28238
|
-
}).catch(error => console.error(error
|
|
28234
|
+
}).catch(error => console.error(error == null ? void 0 : error.message));
|
|
28239
28235
|
}
|
|
28240
28236
|
toggleModal();
|
|
28241
|
-
}).catch(error => console.error(error
|
|
28237
|
+
}).catch(error => console.error(error == null ? void 0 : error.message));
|
|
28242
28238
|
} else {
|
|
28243
28239
|
handleUpload([fileState]);
|
|
28244
28240
|
toggleModal();
|
|
@@ -28267,7 +28263,7 @@ const Upload = ({
|
|
|
28267
28263
|
const index = fileList.indexOf(file);
|
|
28268
28264
|
const newFileList = fileList.slice();
|
|
28269
28265
|
newFileList.splice(index, 1);
|
|
28270
|
-
onChange
|
|
28266
|
+
onChange == null ? void 0 : onChange({
|
|
28271
28267
|
fileList: newFileList,
|
|
28272
28268
|
file
|
|
28273
28269
|
});
|
|
@@ -28290,14 +28286,14 @@ const Upload = ({
|
|
|
28290
28286
|
}
|
|
28291
28287
|
function handleOpenFile(file) {
|
|
28292
28288
|
var _String, _file$name;
|
|
28293
|
-
let extension = (_String = String(file
|
|
28289
|
+
let extension = (_String = String(file == null ? void 0 : (_file$name = file.name) == null ? void 0 : _file$name.split('.').pop())) == null ? void 0 : _String.toLowerCase();
|
|
28294
28290
|
if (extension === 'pdf') {
|
|
28295
|
-
window.open(file
|
|
28291
|
+
window.open(file == null ? void 0 : file.url);
|
|
28296
28292
|
} else {
|
|
28297
|
-
if (file
|
|
28293
|
+
if (file != null && file.url) {
|
|
28298
28294
|
const link = document.createElement('a');
|
|
28299
28295
|
link.href = file.url;
|
|
28300
|
-
link.setAttribute('download', file
|
|
28296
|
+
link.setAttribute('download', file == null ? void 0 : file.name);
|
|
28301
28297
|
document.body.appendChild(link);
|
|
28302
28298
|
link.click();
|
|
28303
28299
|
document.body.removeChild(link);
|
|
@@ -28359,12 +28355,12 @@ const Upload = ({
|
|
|
28359
28355
|
}, replaceLabel && replaceLabel.length > 0 ? replaceLabel : t('replaceLabel', 'Ubah Berkas')));
|
|
28360
28356
|
}
|
|
28361
28357
|
const renderPicture = () => {
|
|
28362
|
-
return fileList
|
|
28363
|
-
if ((item
|
|
28358
|
+
return fileList == null ? void 0 : fileList.map((item, index) => {
|
|
28359
|
+
if ((item == null ? void 0 : item.status) === 'uploading') {
|
|
28364
28360
|
return /*#__PURE__*/React__default.createElement(UploadProgress, {
|
|
28365
28361
|
key: index,
|
|
28366
|
-
progress: item
|
|
28367
|
-
loading: item
|
|
28362
|
+
progress: item == null ? void 0 : item.percent,
|
|
28363
|
+
loading: item == null ? void 0 : item.loading,
|
|
28368
28364
|
__self: undefined,
|
|
28369
28365
|
__source: {
|
|
28370
28366
|
fileName: _jsxFileName$9,
|
|
@@ -28437,13 +28433,13 @@ const Upload = ({
|
|
|
28437
28433
|
});
|
|
28438
28434
|
};
|
|
28439
28435
|
const renderFile = () => {
|
|
28440
|
-
return fileList
|
|
28436
|
+
return fileList == null ? void 0 : fileList.map((item, index) => {
|
|
28441
28437
|
var _item$name;
|
|
28442
|
-
if ((item
|
|
28438
|
+
if ((item == null ? void 0 : item.status) === 'uploading') {
|
|
28443
28439
|
return /*#__PURE__*/React__default.createElement(UploadProgress, {
|
|
28444
28440
|
key: index,
|
|
28445
|
-
progress: item
|
|
28446
|
-
loading: item
|
|
28441
|
+
progress: item == null ? void 0 : item.percent,
|
|
28442
|
+
loading: item == null ? void 0 : item.loading,
|
|
28447
28443
|
__self: undefined,
|
|
28448
28444
|
__source: {
|
|
28449
28445
|
fileName: _jsxFileName$9,
|
|
@@ -28509,7 +28505,7 @@ const Upload = ({
|
|
|
28509
28505
|
lineNumber: 667,
|
|
28510
28506
|
columnNumber: 17
|
|
28511
28507
|
}
|
|
28512
|
-
}, ".", item
|
|
28508
|
+
}, ".", item == null ? void 0 : (_item$name = item.name) == null ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
28513
28509
|
label: item.name,
|
|
28514
28510
|
__self: undefined,
|
|
28515
28511
|
__source: {
|
|
@@ -28879,7 +28875,7 @@ const Upload = ({
|
|
|
28879
28875
|
}
|
|
28880
28876
|
return /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
28881
28877
|
direction: "row",
|
|
28882
|
-
gap: (fileList
|
|
28878
|
+
gap: (fileList == null ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
|
|
28883
28879
|
wrap: "wrap",
|
|
28884
28880
|
css: {
|
|
28885
28881
|
userSelect: 'none'
|
|
@@ -29706,9 +29702,9 @@ const Separator$1 = styled('div', {
|
|
|
29706
29702
|
function InputColorPicker(props) {
|
|
29707
29703
|
const [isPopover, setIsPopover] = useState(false);
|
|
29708
29704
|
function getColor() {
|
|
29709
|
-
const color = props
|
|
29705
|
+
const color = props == null ? void 0 : props.color;
|
|
29710
29706
|
if (typeof color === 'string') {
|
|
29711
|
-
return color
|
|
29707
|
+
return color == null ? void 0 : color.toUpperCase();
|
|
29712
29708
|
}
|
|
29713
29709
|
return `rgba(${color.r},${color.g},${color.b},${color.a})`;
|
|
29714
29710
|
}
|
|
@@ -32727,7 +32723,7 @@ const Navigation = props => {
|
|
|
32727
32723
|
var _data;
|
|
32728
32724
|
const isActive = props.currentStep === i;
|
|
32729
32725
|
const isComplete = props.isComplete[i - 1];
|
|
32730
|
-
const isAdditional = (_data = data[i - 1])
|
|
32726
|
+
const isAdditional = (_data = data[i - 1]) == null ? void 0 : _data.additional;
|
|
32731
32727
|
const lastItem = navMobileItems.indexOf(data[i - 1]) + 1 === navMobileItems.length;
|
|
32732
32728
|
// eslint-disable-next-line no-lone-blocks
|
|
32733
32729
|
{
|
|
@@ -32742,7 +32738,7 @@ const Navigation = props => {
|
|
|
32742
32738
|
key: `step-${i}`,
|
|
32743
32739
|
onClick: () => {
|
|
32744
32740
|
var _data2;
|
|
32745
|
-
if (props.onNavClicked && !((_data2 = data[i - 1])
|
|
32741
|
+
if (props.onNavClicked && !((_data2 = data[i - 1]) != null && _data2.disabled) || isAdditional) props.onNavClicked(i);
|
|
32746
32742
|
if (!forbidClickNav && isComplete && !isHide || isAdditional) {
|
|
32747
32743
|
props.goToStep(i);
|
|
32748
32744
|
}
|
|
@@ -32775,9 +32771,9 @@ const Navigation = props => {
|
|
|
32775
32771
|
lineNumber: 176,
|
|
32776
32772
|
columnNumber: 17
|
|
32777
32773
|
}
|
|
32778
|
-
}), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title)
|
|
32774
|
+
}), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title) == null ? void 0 : _data$title.call(_data3), ((_data4 = data[i - 1]) == null ? void 0 : _data4.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
32779
32775
|
align: "center",
|
|
32780
|
-
label: (_data5 = data[i - 1])
|
|
32776
|
+
label: (_data5 = data[i - 1]) == null ? void 0 : _data5.tooltipsContents,
|
|
32781
32777
|
__self: undefined,
|
|
32782
32778
|
__source: {
|
|
32783
32779
|
fileName: _jsxFileName$4,
|
|
@@ -32796,9 +32792,9 @@ const Navigation = props => {
|
|
|
32796
32792
|
lineNumber: 181,
|
|
32797
32793
|
columnNumber: 19
|
|
32798
32794
|
}
|
|
32799
|
-
})), ((_data6 = data[i - 1])
|
|
32795
|
+
})), ((_data6 = data[i - 1]) == null ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
32800
32796
|
css: {
|
|
32801
|
-
marginLeft: (_data7 = data[i - 1])
|
|
32797
|
+
marginLeft: (_data7 = data[i - 1]) != null && _data7.withTolltip ? 0 : '$spacing-03'
|
|
32802
32798
|
},
|
|
32803
32799
|
align: "center",
|
|
32804
32800
|
__self: undefined,
|
|
@@ -32849,10 +32845,10 @@ const Navigation = props => {
|
|
|
32849
32845
|
lineNumber: 198,
|
|
32850
32846
|
columnNumber: 21
|
|
32851
32847
|
}
|
|
32852
|
-
}, typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data8 = data[i - 1]).title)
|
|
32848
|
+
}, 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.createElement(Tooltip$1, {
|
|
32853
32849
|
align: "center",
|
|
32854
32850
|
withClick: true,
|
|
32855
|
-
label: (_data10 = data[i - 1])
|
|
32851
|
+
label: (_data10 = data[i - 1]) == null ? void 0 : _data10.tooltipsContents,
|
|
32856
32852
|
__self: undefined,
|
|
32857
32853
|
__source: {
|
|
32858
32854
|
fileName: _jsxFileName$4,
|
|
@@ -32868,11 +32864,11 @@ const Navigation = props => {
|
|
|
32868
32864
|
lineNumber: 209,
|
|
32869
32865
|
columnNumber: 25
|
|
32870
32866
|
}
|
|
32871
|
-
})), ((_data11 = data[i - 1])
|
|
32867
|
+
})), ((_data11 = data[i - 1]) == null ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
32872
32868
|
align: "center",
|
|
32873
32869
|
justify: "center",
|
|
32874
32870
|
css: {
|
|
32875
|
-
marginTop: (_data12 = data[i - 1])
|
|
32871
|
+
marginTop: (_data12 = data[i - 1]) != null && _data12.withTolltip ? 0 : '$spacing-03'
|
|
32876
32872
|
},
|
|
32877
32873
|
__self: undefined,
|
|
32878
32874
|
__source: {
|
|
@@ -32896,7 +32892,7 @@ const Navigation = props => {
|
|
|
32896
32892
|
userSelect: 'none',
|
|
32897
32893
|
fontSize: '12px',
|
|
32898
32894
|
textAlign: '-webkit-center',
|
|
32899
|
-
display: ((_data13 = data[i - 1])
|
|
32895
|
+
display: ((_data13 = data[i - 1]) == null ? void 0 : _data13.disabled) && 'none',
|
|
32900
32896
|
marginTop: '$spacing-07',
|
|
32901
32897
|
flex: 1,
|
|
32902
32898
|
maxWidth: lastItem && 26
|
|
@@ -32976,7 +32972,7 @@ const Navigation = props => {
|
|
|
32976
32972
|
height: 24,
|
|
32977
32973
|
borderRadius: '$round',
|
|
32978
32974
|
border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
|
|
32979
|
-
backgroundColor: (_data14 = data[i - 1])
|
|
32975
|
+
backgroundColor: (_data14 = data[i - 1]) != null && _data14.disabled ? '$gray200' : '$white'
|
|
32980
32976
|
},
|
|
32981
32977
|
__self: undefined,
|
|
32982
32978
|
__source: {
|
|
@@ -33005,53 +33001,50 @@ const Navigation = props => {
|
|
|
33005
33001
|
}
|
|
33006
33002
|
return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
|
|
33007
33003
|
condition: !isMobile,
|
|
33008
|
-
wrapper: child => {
|
|
33009
|
-
|
|
33010
|
-
|
|
33011
|
-
|
|
33012
|
-
|
|
33013
|
-
|
|
33014
|
-
|
|
33015
|
-
|
|
33016
|
-
|
|
33017
|
-
|
|
33018
|
-
|
|
33019
|
-
|
|
33020
|
-
|
|
33021
|
-
|
|
33022
|
-
|
|
33023
|
-
|
|
33024
|
-
|
|
33025
|
-
|
|
33026
|
-
|
|
33027
|
-
|
|
33028
|
-
|
|
33029
|
-
|
|
33030
|
-
|
|
33031
|
-
|
|
33032
|
-
|
|
33033
|
-
|
|
33034
|
-
|
|
33035
|
-
|
|
33036
|
-
|
|
33037
|
-
|
|
33038
|
-
|
|
33039
|
-
|
|
33040
|
-
|
|
33041
|
-
|
|
33042
|
-
|
|
33043
|
-
|
|
33044
|
-
|
|
33045
|
-
|
|
33046
|
-
|
|
33047
|
-
|
|
33048
|
-
|
|
33049
|
-
|
|
33050
|
-
|
|
33051
|
-
|
|
33052
|
-
}
|
|
33053
|
-
}, 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)));
|
|
33054
|
-
},
|
|
33004
|
+
wrapper: child => /*#__PURE__*/React__default.createElement(Box, {
|
|
33005
|
+
css: {
|
|
33006
|
+
opacity: isHide ? 0 : undefined,
|
|
33007
|
+
maxWidth: 311
|
|
33008
|
+
},
|
|
33009
|
+
__self: undefined,
|
|
33010
|
+
__source: {
|
|
33011
|
+
fileName: _jsxFileName$4,
|
|
33012
|
+
lineNumber: 281,
|
|
33013
|
+
columnNumber: 9
|
|
33014
|
+
}
|
|
33015
|
+
}, /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
33016
|
+
css: {
|
|
33017
|
+
position: !isMobile && 'sticky',
|
|
33018
|
+
top: !isMobile ? 44 : 40
|
|
33019
|
+
},
|
|
33020
|
+
direction: "column",
|
|
33021
|
+
gap: 7,
|
|
33022
|
+
__self: undefined,
|
|
33023
|
+
__source: {
|
|
33024
|
+
fileName: _jsxFileName$4,
|
|
33025
|
+
lineNumber: 282,
|
|
33026
|
+
columnNumber: 11
|
|
33027
|
+
}
|
|
33028
|
+
}, /*#__PURE__*/React__default.createElement(Card, {
|
|
33029
|
+
css: {
|
|
33030
|
+
height: 'fit-content',
|
|
33031
|
+
padding: 0
|
|
33032
|
+
},
|
|
33033
|
+
showBottomLine: false,
|
|
33034
|
+
__self: undefined,
|
|
33035
|
+
__source: {
|
|
33036
|
+
fileName: _jsxFileName$4,
|
|
33037
|
+
lineNumber: 283,
|
|
33038
|
+
columnNumber: 13
|
|
33039
|
+
}
|
|
33040
|
+
}, child), /*#__PURE__*/React__default.createElement(Box, {
|
|
33041
|
+
__self: undefined,
|
|
33042
|
+
__source: {
|
|
33043
|
+
fileName: _jsxFileName$4,
|
|
33044
|
+
lineNumber: 292,
|
|
33045
|
+
columnNumber: 13
|
|
33046
|
+
}
|
|
33047
|
+
}, 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))),
|
|
33055
33048
|
__self: undefined,
|
|
33056
33049
|
__source: {
|
|
33057
33050
|
fileName: _jsxFileName$4,
|
|
@@ -33116,8 +33109,7 @@ const Default = props => {
|
|
|
33116
33109
|
}));
|
|
33117
33110
|
}, [props.hide]);
|
|
33118
33111
|
useEffect(() => {
|
|
33119
|
-
|
|
33120
|
-
props === null || props === void 0 ? void 0 : (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 ? void 0 : _props$onChangeVisibi.call(props, state.hide);
|
|
33112
|
+
props == null ? void 0 : props.onChangeVisibility == null ? void 0 : props.onChangeVisibility(state.hide);
|
|
33121
33113
|
}, [state.hide]);
|
|
33122
33114
|
const toogleVisibility = value => {
|
|
33123
33115
|
updateState(prev => Object.assign({}, prev, {
|
|
@@ -33126,11 +33118,11 @@ const Default = props => {
|
|
|
33126
33118
|
};
|
|
33127
33119
|
const getIsComplete = currentStep => {
|
|
33128
33120
|
var _state$isComplete;
|
|
33129
|
-
return state
|
|
33121
|
+
return state == null ? void 0 : (_state$isComplete = state.isComplete) == null ? void 0 : _state$isComplete[currentStep - 1];
|
|
33130
33122
|
};
|
|
33131
33123
|
const getTitleStep = currentStep => {
|
|
33132
33124
|
var _props$navContents, _props$navContents2;
|
|
33133
|
-
return props
|
|
33125
|
+
return props == null ? void 0 : (_props$navContents = props.navContents) == null ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) == null ? void 0 : _props$navContents2.title;
|
|
33134
33126
|
};
|
|
33135
33127
|
const setState = value => {
|
|
33136
33128
|
updateState(Object.assign({}, state, value));
|
|
@@ -33164,13 +33156,13 @@ const Default = props => {
|
|
|
33164
33156
|
block: 'start'
|
|
33165
33157
|
});
|
|
33166
33158
|
props.onStepChange && props.onStepChange(e);
|
|
33167
|
-
if (props
|
|
33168
|
-
if ((e
|
|
33159
|
+
if (props != null && (_props$navContents3 = props.navContents) != null && (_props$navContents4 = _props$navContents3[(e == null ? void 0 : e.activeStep) - 1]) != null && _props$navContents4.disabled) {
|
|
33160
|
+
if ((e == null ? void 0 : e.activeStep) > (e == null ? void 0 : e.previousStep)) {
|
|
33169
33161
|
var _state$SW;
|
|
33170
|
-
state
|
|
33162
|
+
state == null ? void 0 : (_state$SW = state.SW) == null ? void 0 : _state$SW.nextStep();
|
|
33171
33163
|
} else {
|
|
33172
33164
|
var _state$SW2;
|
|
33173
|
-
state
|
|
33165
|
+
state == null ? void 0 : (_state$SW2 = state.SW) == null ? void 0 : _state$SW2.previousStep();
|
|
33174
33166
|
}
|
|
33175
33167
|
}
|
|
33176
33168
|
};
|
|
@@ -33185,11 +33177,11 @@ const Default = props => {
|
|
|
33185
33177
|
}, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
|
|
33186
33178
|
value: {
|
|
33187
33179
|
toogleVisibility,
|
|
33188
|
-
isHide: state
|
|
33180
|
+
isHide: state == null ? void 0 : state.hide,
|
|
33189
33181
|
setComplete,
|
|
33190
33182
|
setState,
|
|
33191
33183
|
state,
|
|
33192
|
-
SW: state
|
|
33184
|
+
SW: state == null ? void 0 : state.SW,
|
|
33193
33185
|
forbidClickNav: props.forbidClickNav,
|
|
33194
33186
|
titles: props.titles,
|
|
33195
33187
|
isMobile: props.isMobile,
|
|
@@ -33212,7 +33204,7 @@ const Default = props => {
|
|
|
33212
33204
|
nav: /*#__PURE__*/React__default.createElement(Navigation, {
|
|
33213
33205
|
onNavClicked: props.onNavClicked,
|
|
33214
33206
|
isComplete: state.isComplete,
|
|
33215
|
-
appendContent: props
|
|
33207
|
+
appendContent: props == null ? void 0 : props.appendContent,
|
|
33216
33208
|
__self: undefined,
|
|
33217
33209
|
__source: {
|
|
33218
33210
|
fileName: _jsxFileName$4,
|
|
@@ -33222,7 +33214,7 @@ const Default = props => {
|
|
|
33222
33214
|
}),
|
|
33223
33215
|
initialStep: props.initialStep,
|
|
33224
33216
|
onStepChange: handleStepChange,
|
|
33225
|
-
isLazyMount: props
|
|
33217
|
+
isLazyMount: props == null ? void 0 : props.isLazyMount,
|
|
33226
33218
|
__self: undefined,
|
|
33227
33219
|
__source: {
|
|
33228
33220
|
fileName: _jsxFileName$4,
|
|
@@ -33369,9 +33361,9 @@ function Content({
|
|
|
33369
33361
|
var _getDatasets;
|
|
33370
33362
|
function getDatasets(content, activeId, isCollapse) {
|
|
33371
33363
|
const datasets = [];
|
|
33372
|
-
for (let i = 0; i < (content
|
|
33364
|
+
for (let i = 0; i < (content == null ? void 0 : content.length); i++) {
|
|
33373
33365
|
var _content$i;
|
|
33374
|
-
if (((_content$i = content[i])
|
|
33366
|
+
if (((_content$i = content[i]) == null ? void 0 : _content$i.id) === activeId) {
|
|
33375
33367
|
datasets.unshift(content[i]);
|
|
33376
33368
|
} else {
|
|
33377
33369
|
datasets.push(content[i]);
|
|
@@ -33409,7 +33401,7 @@ function Content({
|
|
|
33409
33401
|
lineNumber: 107,
|
|
33410
33402
|
columnNumber: 7
|
|
33411
33403
|
}
|
|
33412
|
-
}, (_getDatasets = getDatasets(content, activeId, isCollapse))
|
|
33404
|
+
}, (_getDatasets = getDatasets(content, activeId, isCollapse)) == null ? void 0 : _getDatasets.map((item, index) => {
|
|
33413
33405
|
return /*#__PURE__*/React__default.createElement(List, {
|
|
33414
33406
|
key: index,
|
|
33415
33407
|
__self: this,
|
|
@@ -33426,11 +33418,11 @@ function Content({
|
|
|
33426
33418
|
marginLeft: '-4px !important',
|
|
33427
33419
|
borderLeftWidth: '4px !important',
|
|
33428
33420
|
borderLeftStyle: 'solid !important',
|
|
33429
|
-
borderLeftColor: `${(item
|
|
33421
|
+
borderLeftColor: `${(item == null ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
|
|
33430
33422
|
paddingLeft: '16px !important',
|
|
33431
33423
|
minHeight: 25
|
|
33432
33424
|
},
|
|
33433
|
-
"data-to-scrollspy-id": item
|
|
33425
|
+
"data-to-scrollspy-id": item == null ? void 0 : item.id,
|
|
33434
33426
|
__self: this,
|
|
33435
33427
|
__source: {
|
|
33436
33428
|
fileName: _jsxFileName$2,
|
|
@@ -33439,13 +33431,13 @@ function Content({
|
|
|
33439
33431
|
}
|
|
33440
33432
|
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
33441
33433
|
className: "link-title",
|
|
33442
|
-
active: (item
|
|
33443
|
-
href: `#${item
|
|
33434
|
+
active: (item == null ? void 0 : item.id) === activeId,
|
|
33435
|
+
href: `#${item == null ? void 0 : item.id}`,
|
|
33444
33436
|
onClick: e => {
|
|
33445
33437
|
var _e$currentTarget, _e$currentTarget$href, _e$currentTarget$href2, _e$currentTarget2, _e$currentTarget2$hre, _e$currentTarget2$hre2;
|
|
33446
33438
|
e.preventDefault();
|
|
33447
|
-
onNavClick
|
|
33448
|
-
const target = window.document.getElementById(e
|
|
33439
|
+
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]);
|
|
33440
|
+
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]);
|
|
33449
33441
|
if (target) {
|
|
33450
33442
|
var headerOffset = 20;
|
|
33451
33443
|
var elementPosition = target.getBoundingClientRect().top;
|
|
@@ -33469,7 +33461,7 @@ function Content({
|
|
|
33469
33461
|
lineNumber: 125,
|
|
33470
33462
|
columnNumber: 17
|
|
33471
33463
|
}
|
|
33472
|
-
}, item
|
|
33464
|
+
}, item == null ? void 0 : item.title), item == null ? void 0 : item.icon));
|
|
33473
33465
|
})));
|
|
33474
33466
|
}
|
|
33475
33467
|
function TableOfContent({
|