@majoo-ui/react 1.59.9-rc.2 → 1.59.9-rc.3
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 +241 -233
- package/index.umd.js +241 -233
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -5002,7 +5002,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
|
|
|
5002
5002
|
onClick: e => {
|
|
5003
5003
|
e.preventDefault();
|
|
5004
5004
|
e.stopPropagation();
|
|
5005
|
-
value
|
|
5005
|
+
value === null || value === void 0 || value.onRemove();
|
|
5006
5006
|
},
|
|
5007
5007
|
__self: undefined,
|
|
5008
5008
|
__source: {
|
|
@@ -5021,6 +5021,7 @@ const BannerClose = () => /*#__PURE__*/React.createElement(Context$2.Consumer, {
|
|
|
5021
5021
|
}
|
|
5022
5022
|
})));
|
|
5023
5023
|
const SingleTagBanner = props => {
|
|
5024
|
+
var _props$icon;
|
|
5024
5025
|
return /*#__PURE__*/React.createElement(Flex$1, {
|
|
5025
5026
|
gap: 2,
|
|
5026
5027
|
direction: "column",
|
|
@@ -5046,7 +5047,7 @@ const SingleTagBanner = props => {
|
|
|
5046
5047
|
lineNumber: 212,
|
|
5047
5048
|
columnNumber: 9
|
|
5048
5049
|
}
|
|
5049
|
-
}, (props
|
|
5050
|
+
}, (props === null || props === void 0 ? void 0 : props.icon) && /*#__PURE__*/React.createElement(Flex$1, {
|
|
5050
5051
|
css: {
|
|
5051
5052
|
marginTop: '-2px'
|
|
5052
5053
|
},
|
|
@@ -5056,7 +5057,7 @@ const SingleTagBanner = props => {
|
|
|
5056
5057
|
lineNumber: 213,
|
|
5057
5058
|
columnNumber: 27
|
|
5058
5059
|
}
|
|
5059
|
-
}, props
|
|
5060
|
+
}, props === null || props === void 0 || (_props$icon = props.icon) === null || _props$icon === void 0 ? void 0 : _props$icon.call(props)), /*#__PURE__*/React.createElement(Flex$1, {
|
|
5060
5061
|
gap: 2,
|
|
5061
5062
|
direction: "column",
|
|
5062
5063
|
css: {
|
|
@@ -5087,7 +5088,7 @@ const SingleTagBanner = props => {
|
|
|
5087
5088
|
onClick: e => {
|
|
5088
5089
|
e.preventDefault();
|
|
5089
5090
|
e.stopPropagation();
|
|
5090
|
-
props
|
|
5091
|
+
props === null || props === void 0 || props.onRemove();
|
|
5091
5092
|
},
|
|
5092
5093
|
closeCenter: !props.title && !props.link,
|
|
5093
5094
|
__self: undefined,
|
|
@@ -7904,7 +7905,7 @@ const InputTextArea = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
7904
7905
|
useEffect(() => {
|
|
7905
7906
|
if (textareaRef.current) {
|
|
7906
7907
|
textareaRef.current.style.height = '50px';
|
|
7907
|
-
const scrollHeight = textareaRef
|
|
7908
|
+
const scrollHeight = textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current.scrollHeight;
|
|
7908
7909
|
textareaRef.current.style.height = scrollHeight + 5 + 'px';
|
|
7909
7910
|
}
|
|
7910
7911
|
}, []);
|
|
@@ -7959,7 +7960,7 @@ const InputRadioContext = /*#__PURE__*/React__default.createContext();
|
|
|
7959
7960
|
var _jsxFileName$I = "/Users/ryanakbar20/Documents/project/majoo/majoo-ui/packages/react/src/components/form/components/InputRadio/InputRadioGroup.js";
|
|
7960
7961
|
const RadioGroup = styled(RadioGroupPrimitive.Root, Flex$1);
|
|
7961
7962
|
function InputRadioGroup(props) {
|
|
7962
|
-
return (props
|
|
7963
|
+
return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default.createElement(InputRadioContext.Provider, {
|
|
7963
7964
|
value: props,
|
|
7964
7965
|
__self: this,
|
|
7965
7966
|
__source: {
|
|
@@ -7974,7 +7975,7 @@ function InputRadioGroup(props) {
|
|
|
7974
7975
|
lineNumber: 14,
|
|
7975
7976
|
columnNumber: 9
|
|
7976
7977
|
}
|
|
7977
|
-
}), React__default.Children.map(props
|
|
7978
|
+
}), React__default.Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default.cloneElement(child, {
|
|
7978
7979
|
style: Object.assign({}, child.props.style, {
|
|
7979
7980
|
opacity: 1
|
|
7980
7981
|
})
|
|
@@ -8162,8 +8163,9 @@ const InputRadio = _ref => {
|
|
|
8162
8163
|
return /*#__PURE__*/React__default.createElement(InputNumber, _extends({}, inputProps, {
|
|
8163
8164
|
readOnly: readOnly,
|
|
8164
8165
|
onFocus: () => {
|
|
8166
|
+
var _inputProps$onFocus;
|
|
8165
8167
|
onValueChange(props.value);
|
|
8166
|
-
inputProps
|
|
8168
|
+
inputProps === null || inputProps === void 0 || (_inputProps$onFocus = inputProps.onFocus) === null || _inputProps$onFocus === void 0 || _inputProps$onFocus.call(inputProps);
|
|
8167
8169
|
},
|
|
8168
8170
|
asChild: true,
|
|
8169
8171
|
__self: this,
|
|
@@ -8178,8 +8180,9 @@ const InputRadio = _ref => {
|
|
|
8178
8180
|
disabled: disabled,
|
|
8179
8181
|
readOnly: readOnly,
|
|
8180
8182
|
onFocus: () => {
|
|
8183
|
+
var _inputProps$onFocus2;
|
|
8181
8184
|
onValueChange(props.value);
|
|
8182
|
-
inputProps
|
|
8185
|
+
inputProps === null || inputProps === void 0 || (_inputProps$onFocus2 = inputProps.onFocus) === null || _inputProps$onFocus2 === void 0 || _inputProps$onFocus2.call(inputProps);
|
|
8183
8186
|
},
|
|
8184
8187
|
asChild: true,
|
|
8185
8188
|
__self: this,
|
|
@@ -10673,24 +10676,24 @@ var NumberFormat = /*@__PURE__*/function (superclass) {
|
|
|
10673
10676
|
allowLeadingZeros,
|
|
10674
10677
|
format
|
|
10675
10678
|
} = Object.assign({}, ref);
|
|
10676
|
-
const formattedValueStartsWithZero = (_formattedValue = formattedValue)
|
|
10677
|
-
const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue)
|
|
10679
|
+
const formattedValueStartsWithZero = (_formattedValue = formattedValue) === null || _formattedValue === void 0 ? void 0 : _formattedValue.startsWith(`${prefix}0`);
|
|
10680
|
+
const formattedWithZeroAndSuffix = (_formattedValue2 = formattedValue) === null || _formattedValue2 === void 0 ? void 0 : _formattedValue2.endsWith(`0${suffix}`);
|
|
10678
10681
|
const emptyFormattedValue = prefix || suffix || prefix + suffix || '';
|
|
10679
10682
|
if ((formattedValueStartsWithZero || formattedWithZeroAndSuffix) && !allowLeadingZeros && !format) {
|
|
10680
10683
|
var _formattedValue3, _input$value;
|
|
10681
10684
|
const isSpecialChar = /^[+-]/.test(formattedValue);
|
|
10682
|
-
if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue)
|
|
10685
|
+
if (formattedValue !== `${prefix}0${suffix}` && !((_formattedValue3 = formattedValue) !== null && _formattedValue3 !== void 0 && _formattedValue3.includes('0,'))) {
|
|
10683
10686
|
var _formattedValue4, _numAsString;
|
|
10684
|
-
formattedValue = (_formattedValue4 = formattedValue)
|
|
10685
|
-
numAsString = (_numAsString = numAsString)
|
|
10687
|
+
formattedValue = (_formattedValue4 = formattedValue) === null || _formattedValue4 === void 0 ? void 0 : _formattedValue4.replace(new RegExp(`^${isSpecialChar ? '\\' : ''}${prefix}0+${suffix}`), emptyFormattedValue);
|
|
10688
|
+
numAsString = (_numAsString = numAsString) === null || _numAsString === void 0 ? void 0 : _numAsString.replace(/^0+/, '');
|
|
10686
10689
|
}
|
|
10687
|
-
if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input
|
|
10690
|
+
if (formattedValue === emptyFormattedValue && !numAsString && [`${prefix}00${suffix}`, `${prefix}0${suffix}`].includes(input === null || input === void 0 ? void 0 : input.value)) {
|
|
10688
10691
|
formattedValue = `${prefix}0${suffix}`;
|
|
10689
10692
|
numAsString = '0';
|
|
10690
|
-
} else if (input
|
|
10693
|
+
} else if (input !== null && input !== void 0 && (_input$value = input.value) !== null && _input$value !== void 0 && _input$value.includes('0,')) {
|
|
10691
10694
|
allowLeadingZeros = true;
|
|
10692
|
-
formattedValue = input
|
|
10693
|
-
numAsString = this.removeFormatting(input
|
|
10695
|
+
formattedValue = input === null || input === void 0 ? void 0 : input.value;
|
|
10696
|
+
numAsString = this.removeFormatting(input === null || input === void 0 ? void 0 : input.value);
|
|
10694
10697
|
}
|
|
10695
10698
|
}
|
|
10696
10699
|
//end adjustment
|
|
@@ -11148,7 +11151,7 @@ function countThousandSeparatorsByLength(numberLength) {
|
|
|
11148
11151
|
}
|
|
11149
11152
|
function getMaxValueLength(maxValue, prefix = '', suffix = '', thousandSeparator) {
|
|
11150
11153
|
const tsLength = thousandSeparator ? countThousandSeparatorsByLength(maxValue) : 0;
|
|
11151
|
-
return maxValue + (prefix
|
|
11154
|
+
return maxValue + (prefix === null || prefix === void 0 ? void 0 : prefix.length) + (suffix === null || suffix === void 0 ? void 0 : suffix.length) + tsLength;
|
|
11152
11155
|
}
|
|
11153
11156
|
const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
11154
11157
|
let {
|
|
@@ -11200,9 +11203,9 @@ const InputNumber = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
11200
11203
|
size: size,
|
|
11201
11204
|
isInvalid: isInvalid,
|
|
11202
11205
|
readOnly: readOnly,
|
|
11203
|
-
isReadOnly: readOnly && !(props
|
|
11206
|
+
isReadOnly: readOnly && !(props !== null && props !== void 0 && props.inputGroup) && !(props !== null && props !== void 0 && props.asChild),
|
|
11204
11207
|
disabled: disabled,
|
|
11205
|
-
maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props
|
|
11208
|
+
maxLength: maxValueLength ? getMaxValueLength(maxValueLength, props === null || props === void 0 ? void 0 : props.prefix, props === null || props === void 0 ? void 0 : props.suffix, thousandSeparator) : maxLength,
|
|
11206
11209
|
thousandSeparator: thousandSeparator
|
|
11207
11210
|
}, props, {
|
|
11208
11211
|
__self: undefined,
|
|
@@ -11506,16 +11509,16 @@ function TagsInput(_ref) {
|
|
|
11506
11509
|
const addTags = event => {
|
|
11507
11510
|
if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
|
|
11508
11511
|
if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
|
|
11509
|
-
onEnter
|
|
11512
|
+
onEnter === null || onEnter === void 0 || onEnter({
|
|
11510
11513
|
key: 'duplicate',
|
|
11511
11514
|
value: event.target.value
|
|
11512
11515
|
});
|
|
11513
11516
|
return;
|
|
11514
11517
|
}
|
|
11515
|
-
if (pattern && pattern
|
|
11518
|
+
if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
|
|
11516
11519
|
const regex = new RegExp(pattern.regex);
|
|
11517
11520
|
if (!regex.test(event.target.value)) {
|
|
11518
|
-
onEnter
|
|
11521
|
+
onEnter === null || onEnter === void 0 || onEnter({
|
|
11519
11522
|
key: 'error',
|
|
11520
11523
|
value: event.target.value
|
|
11521
11524
|
});
|
|
@@ -11524,7 +11527,7 @@ function TagsInput(_ref) {
|
|
|
11524
11527
|
}
|
|
11525
11528
|
}
|
|
11526
11529
|
setRegexError(false);
|
|
11527
|
-
onEnter
|
|
11530
|
+
onEnter === null || onEnter === void 0 || onEnter({
|
|
11528
11531
|
key: 'success',
|
|
11529
11532
|
value: event.target.value
|
|
11530
11533
|
});
|
|
@@ -11536,7 +11539,7 @@ function TagsInput(_ref) {
|
|
|
11536
11539
|
if (disabled || readOnly) {
|
|
11537
11540
|
return tags;
|
|
11538
11541
|
} else if (key === 'removeTag' || key === 'Backspace') {
|
|
11539
|
-
onRemoveItem
|
|
11542
|
+
onRemoveItem === null || onRemoveItem === void 0 || onRemoveItem(tags[index]);
|
|
11540
11543
|
setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
|
|
11541
11544
|
}
|
|
11542
11545
|
};
|
|
@@ -11587,7 +11590,7 @@ function TagsInput(_ref) {
|
|
|
11587
11590
|
lineNumber: 180,
|
|
11588
11591
|
columnNumber: 9
|
|
11589
11592
|
}
|
|
11590
|
-
})), regexError && pattern && (pattern
|
|
11593
|
+
})), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
|
|
11591
11594
|
color: "red",
|
|
11592
11595
|
__self: this,
|
|
11593
11596
|
__source: {
|
|
@@ -11895,14 +11898,14 @@ const InputSearchbox = _ref => {
|
|
|
11895
11898
|
t
|
|
11896
11899
|
} = useTranslation(['MajooUI/inputSearchbox', 'translation']);
|
|
11897
11900
|
const [value, setValue] = useState(defaultValue);
|
|
11898
|
-
const inputValue = (_props$value = props
|
|
11899
|
-
const debounceChange = useCallback(debounce(e => onChange
|
|
11901
|
+
const inputValue = (_props$value = props === null || props === void 0 ? void 0 : props.value) != null ? _props$value : value;
|
|
11902
|
+
const debounceChange = useCallback(debounce(e => onChange === null || onChange === void 0 ? void 0 : onChange(e), 1000), [onChange]);
|
|
11900
11903
|
const handleChange = useCallback(e => {
|
|
11901
11904
|
setValue(e.target.value);
|
|
11902
11905
|
if (withDebounce) {
|
|
11903
11906
|
debounceChange(e.target.value);
|
|
11904
11907
|
} else {
|
|
11905
|
-
onChange
|
|
11908
|
+
onChange === null || onChange === void 0 || onChange(e.target.value);
|
|
11906
11909
|
}
|
|
11907
11910
|
}, [onChange, debounceChange, withDebounce]);
|
|
11908
11911
|
const handleClearButtonClick = e => {
|
|
@@ -11955,7 +11958,7 @@ const InputSearchbox = _ref => {
|
|
|
11955
11958
|
columnNumber: 7
|
|
11956
11959
|
}
|
|
11957
11960
|
})), /*#__PURE__*/React__default.createElement(InputRightElement, {
|
|
11958
|
-
children: (inputValue
|
|
11961
|
+
children: (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) > 0 ? /*#__PURE__*/React__default.createElement(SvgCloseFilled, {
|
|
11959
11962
|
color: colors$7.iconSecondary,
|
|
11960
11963
|
__self: undefined,
|
|
11961
11964
|
__source: {
|
|
@@ -12200,7 +12203,7 @@ const Popover = ({
|
|
|
12200
12203
|
middleware: [offset(_sideOffset), shift$2(), _flip && flip()],
|
|
12201
12204
|
onOpenChange: isOpen => {
|
|
12202
12205
|
setOpenState(isOpen);
|
|
12203
|
-
!isOpen && (onClose
|
|
12206
|
+
!isOpen && (onClose === null || onClose === void 0 ? void 0 : onClose());
|
|
12204
12207
|
},
|
|
12205
12208
|
placement
|
|
12206
12209
|
});
|
|
@@ -13060,7 +13063,7 @@ const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
13060
13063
|
return;
|
|
13061
13064
|
}
|
|
13062
13065
|
(_b = scrollerRef.current) === null || _b === void 0 ? void 0 : _b.scrollTo({
|
|
13063
|
-
top: selectedIndex *
|
|
13066
|
+
top: selectedIndex * 60
|
|
13064
13067
|
});
|
|
13065
13068
|
}, [query, search, openOptions, open, selectedIndex]);
|
|
13066
13069
|
const handleInputValue = (value, isReset = false) => {
|
|
@@ -13989,13 +13992,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
13989
13992
|
const isShowSelectAll = showSelectAll && !maxSelectedItem;
|
|
13990
13993
|
useEffect(() => {
|
|
13991
13994
|
var _scrollerRef$current;
|
|
13992
|
-
(_scrollerRef$current = scrollerRef.current)
|
|
13995
|
+
(_scrollerRef$current = scrollerRef.current) === null || _scrollerRef$current === void 0 || _scrollerRef$current.scrollTo({
|
|
13993
13996
|
top: 0
|
|
13994
13997
|
});
|
|
13995
13998
|
}, [query]);
|
|
13996
13999
|
useEffect(() => {
|
|
13997
|
-
if (defaultValue
|
|
13998
|
-
if (value
|
|
14000
|
+
if (defaultValue !== null && defaultValue !== void 0 && defaultValue.length) {
|
|
14001
|
+
if (value !== null && value !== void 0 && value.length) {
|
|
13999
14002
|
setInputSelectValue(value);
|
|
14000
14003
|
}
|
|
14001
14004
|
} else {
|
|
@@ -14060,7 +14063,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14060
14063
|
removeSelectedItem,
|
|
14061
14064
|
selectedItems
|
|
14062
14065
|
} = useMultipleSelection({
|
|
14063
|
-
selectedItems: selectedValue.length > 0 ? initItem
|
|
14066
|
+
selectedItems: selectedValue.length > 0 ? initItem === null || initItem === void 0 || (_initItem$reduce = initItem.reduce((acc, item) => [...acc, item, ...(item.children ? item.children : [])], [])) === null || _initItem$reduce === void 0 ? void 0 : _initItem$reduce.filter(item => selectedValue.includes(item.id)) : []
|
|
14064
14067
|
});
|
|
14065
14068
|
const generateOptions = data => {
|
|
14066
14069
|
return data.map(option => {
|
|
@@ -14082,7 +14085,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14082
14085
|
};
|
|
14083
14086
|
const debouncedSearch = React__default.useRef(debounce(async query => {
|
|
14084
14087
|
setQuery(query);
|
|
14085
|
-
onSearch
|
|
14088
|
+
onSearch === null || onSearch === void 0 || onSearch(query);
|
|
14086
14089
|
}, 1000)).current;
|
|
14087
14090
|
React__default.useEffect(() => {
|
|
14088
14091
|
return () => {
|
|
@@ -14090,7 +14093,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14090
14093
|
};
|
|
14091
14094
|
}, [debouncedSearch]);
|
|
14092
14095
|
const handleInputValue = input => {
|
|
14093
|
-
onSearch
|
|
14096
|
+
onSearch === null || onSearch === void 0 || onSearch(input);
|
|
14094
14097
|
if (input === '') {
|
|
14095
14098
|
if (disabledOptions.length > 0) {
|
|
14096
14099
|
setItems(generateOptions(sortDisabled));
|
|
@@ -14098,9 +14101,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14098
14101
|
return setItems(sortValue);
|
|
14099
14102
|
}
|
|
14100
14103
|
} else {
|
|
14101
|
-
let filterItems = option
|
|
14102
|
-
var _item$name;
|
|
14103
|
-
return item
|
|
14104
|
+
let filterItems = option === null || option === void 0 ? void 0 : option.filter(item => {
|
|
14105
|
+
var _item$name, _item$name$includes, _input$toLocaleLowerC;
|
|
14106
|
+
return item === null || item === void 0 || (_item$name = item.name) === null || _item$name === void 0 || (_item$name = _item$name.toLowerCase()) === null || _item$name === void 0 || (_item$name$includes = _item$name.includes) === null || _item$name$includes === void 0 ? void 0 : _item$name$includes.call(_item$name, input === null || input === void 0 || (_input$toLocaleLowerC = input.toLocaleLowerCase) === null || _input$toLocaleLowerC === void 0 ? void 0 : _input$toLocaleLowerC.call(input));
|
|
14104
14107
|
});
|
|
14105
14108
|
setItems(filterItems);
|
|
14106
14109
|
}
|
|
@@ -14109,10 +14112,10 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14109
14112
|
if (disabled || readOnly) {
|
|
14110
14113
|
return selectedValue;
|
|
14111
14114
|
} else {
|
|
14112
|
-
if ((selected
|
|
14115
|
+
if ((selected === null || selected === void 0 ? void 0 : selected.id) === 'counter') {
|
|
14113
14116
|
setSelectedValue([]);
|
|
14114
14117
|
setInputSelectValue([]);
|
|
14115
|
-
onChange
|
|
14118
|
+
onChange === null || onChange === void 0 || onChange([]);
|
|
14116
14119
|
for (let i = 0; i < selectedValue.length; i++) {
|
|
14117
14120
|
removeSelectedItem(selectedValue[i]);
|
|
14118
14121
|
}
|
|
@@ -14122,7 +14125,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14122
14125
|
setSelectedValue(filterItems);
|
|
14123
14126
|
setInputSelectValue(filterItems);
|
|
14124
14127
|
if (selected.id !== '!all') {
|
|
14125
|
-
onChange
|
|
14128
|
+
onChange === null || onChange === void 0 || onChange(filterItems);
|
|
14126
14129
|
}
|
|
14127
14130
|
}
|
|
14128
14131
|
}
|
|
@@ -14160,9 +14163,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14160
14163
|
if (selectedItem.id === '!all') {
|
|
14161
14164
|
items.forEach(item => {
|
|
14162
14165
|
var _item$children;
|
|
14163
|
-
if (item
|
|
14166
|
+
if (item !== null && item !== void 0 && (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
|
|
14164
14167
|
var _item$children2;
|
|
14165
|
-
item
|
|
14168
|
+
item === null || item === void 0 || (_item$children2 = item.children) === null || _item$children2 === void 0 || _item$children2.forEach(item => {
|
|
14166
14169
|
removeSelectedItem(item);
|
|
14167
14170
|
});
|
|
14168
14171
|
} else {
|
|
@@ -14171,7 +14174,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14171
14174
|
});
|
|
14172
14175
|
setSelectedValue([]);
|
|
14173
14176
|
setInputSelectValue([]);
|
|
14174
|
-
onChange
|
|
14177
|
+
onChange === null || onChange === void 0 || onChange([]);
|
|
14175
14178
|
} else {
|
|
14176
14179
|
removeItem(selectedItem);
|
|
14177
14180
|
}
|
|
@@ -14182,9 +14185,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14182
14185
|
const itemIds = [];
|
|
14183
14186
|
items.forEach(item => {
|
|
14184
14187
|
var _item$children3;
|
|
14185
|
-
if (item
|
|
14188
|
+
if (item !== null && item !== void 0 && (_item$children3 = item.children) !== null && _item$children3 !== void 0 && _item$children3.length) {
|
|
14186
14189
|
var _item$children4;
|
|
14187
|
-
item
|
|
14190
|
+
item === null || item === void 0 || (_item$children4 = item.children) === null || _item$children4 === void 0 || _item$children4.forEach(item => {
|
|
14188
14191
|
addSelectedItem(item);
|
|
14189
14192
|
itemIds.push(item.id);
|
|
14190
14193
|
});
|
|
@@ -14196,16 +14199,16 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14196
14199
|
setSelectedValue(itemIds);
|
|
14197
14200
|
setInputSelectValue(itemIds);
|
|
14198
14201
|
// onChange?.(itemIds.slice(1).filter(id => !items.find(item => item.id === id)?.children?.length));
|
|
14199
|
-
onChange
|
|
14202
|
+
onChange === null || onChange === void 0 || onChange(itemIds.slice(1));
|
|
14200
14203
|
} else {
|
|
14201
14204
|
var _selectedItem$childre;
|
|
14202
14205
|
//start check if item have children (option group)
|
|
14203
|
-
if (selectedItem
|
|
14206
|
+
if (selectedItem !== null && selectedItem !== void 0 && (_selectedItem$childre = selectedItem.children) !== null && _selectedItem$childre !== void 0 && _selectedItem$childre.length) {
|
|
14204
14207
|
var _selectedItem$childre2;
|
|
14205
14208
|
const itemIdsSelect = [];
|
|
14206
14209
|
const itemIdsUnSelect = [];
|
|
14207
|
-
selectedItem
|
|
14208
|
-
if (selectedValue
|
|
14210
|
+
selectedItem === null || selectedItem === void 0 || (_selectedItem$childre2 = selectedItem.children) === null || _selectedItem$childre2 === void 0 || _selectedItem$childre2.forEach(item => {
|
|
14211
|
+
if (selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id)) {
|
|
14209
14212
|
removeSelectedItem(item);
|
|
14210
14213
|
itemIdsUnSelect.push(item.id);
|
|
14211
14214
|
} else {
|
|
@@ -14219,19 +14222,19 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14219
14222
|
setSelectedValue([...selectedValue, ...itemIdsSelect]);
|
|
14220
14223
|
setInputSelectValue([...selectedValue, ...itemIdsSelect]);
|
|
14221
14224
|
const _filteredSelectedValues = selectedValue.filter(val => val !== '!all');
|
|
14222
|
-
onChange
|
|
14225
|
+
onChange === null || onChange === void 0 || onChange([..._filteredSelectedValues, ...itemIdsSelect]);
|
|
14223
14226
|
}
|
|
14224
14227
|
|
|
14225
14228
|
//unselect all child in one of the option groups
|
|
14226
14229
|
if (itemIdsUnSelect.length) {
|
|
14227
14230
|
const newSelectedValue = selectedValue.filter(selId => {
|
|
14228
14231
|
var _itemIdsUnSelect$filt;
|
|
14229
|
-
return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId))
|
|
14232
|
+
return ((_itemIdsUnSelect$filt = itemIdsUnSelect.filter(unselId => unselId === selId && unselId)) === null || _itemIdsUnSelect$filt === void 0 ? void 0 : _itemIdsUnSelect$filt[0]) !== selId && selId;
|
|
14230
14233
|
});
|
|
14231
14234
|
setSelectedValue(newSelectedValue);
|
|
14232
14235
|
setInputSelectValue(newSelectedValue);
|
|
14233
14236
|
const _filteredSelectedValues2 = newSelectedValue.filter(val => val !== '!all');
|
|
14234
|
-
onChange
|
|
14237
|
+
onChange === null || onChange === void 0 || onChange(_filteredSelectedValues2);
|
|
14235
14238
|
}
|
|
14236
14239
|
return;
|
|
14237
14240
|
}
|
|
@@ -14248,7 +14251,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14248
14251
|
setSelectedValue([...selectedValue, selectedItem.id]);
|
|
14249
14252
|
setInputSelectValue([...selectedValue, selectedItem.id]);
|
|
14250
14253
|
const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
|
|
14251
|
-
onChange
|
|
14254
|
+
onChange === null || onChange === void 0 || onChange([...filteredSelectedValues, selectedItem.id]);
|
|
14252
14255
|
}
|
|
14253
14256
|
selectItem(null);
|
|
14254
14257
|
}
|
|
@@ -14280,9 +14283,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14280
14283
|
}
|
|
14281
14284
|
}
|
|
14282
14285
|
});
|
|
14283
|
-
const getOption = useCallback(() => maxSelectedItem ? option
|
|
14284
|
-
const isMaxSelectedItem = maxSelectedItem && (selectedValue
|
|
14285
|
-
if (isMaxSelectedItem && !(selectedValue
|
|
14286
|
+
const getOption = useCallback(() => maxSelectedItem ? option === null || option === void 0 ? void 0 : option.map(item => {
|
|
14287
|
+
const isMaxSelectedItem = maxSelectedItem && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) >= maxSelectedItem;
|
|
14288
|
+
if (isMaxSelectedItem && !(selectedValue !== null && selectedValue !== void 0 && selectedValue.includes(item.id))) {
|
|
14286
14289
|
item.hideCheck = true;
|
|
14287
14290
|
item.isDisabled = true;
|
|
14288
14291
|
} else {
|
|
@@ -14291,7 +14294,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14291
14294
|
}
|
|
14292
14295
|
return item;
|
|
14293
14296
|
}) : option, [maxSelectedItem, option, selectedValue]);
|
|
14294
|
-
const itemsLength = items
|
|
14297
|
+
const itemsLength = items === null || items === void 0 ? void 0 : items.reduce((acc, item) => {
|
|
14295
14298
|
return [...acc, ...(item.children ? item.children : [item])];
|
|
14296
14299
|
}, []).length;
|
|
14297
14300
|
useEffect(() => {
|
|
@@ -14338,15 +14341,16 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14338
14341
|
}, [label, isOpen]);
|
|
14339
14342
|
const toggleCollapsible = () => setShowAllTags(!showAllTags);
|
|
14340
14343
|
const handleRemoveAllItem = () => {
|
|
14341
|
-
onChange
|
|
14344
|
+
onChange === null || onChange === void 0 || onChange([]);
|
|
14342
14345
|
setSelectedValue([]);
|
|
14343
14346
|
setInputSelectValue([]);
|
|
14344
14347
|
for (let i = 0; i < selectedValue.length; i++) {
|
|
14345
14348
|
removeSelectedItem(selectedValue[i]);
|
|
14346
14349
|
}
|
|
14347
14350
|
};
|
|
14348
|
-
const isShowTagSelectAll = showTagSelectAll && (selectedItems
|
|
14351
|
+
const isShowTagSelectAll = showTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > (option === null || option === void 0 ? void 0 : option.length);
|
|
14349
14352
|
const renderOptionItem = (item, index, asChild) => {
|
|
14353
|
+
var _item$render;
|
|
14350
14354
|
return /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
|
|
14351
14355
|
key: item.id
|
|
14352
14356
|
}, getItemProps({
|
|
@@ -14379,7 +14383,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14379
14383
|
lineNumber: 745,
|
|
14380
14384
|
columnNumber: 11
|
|
14381
14385
|
}
|
|
14382
|
-
}, !(item
|
|
14386
|
+
}, !(item !== null && item !== void 0 && item.hideCheck) && (item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
14383
14387
|
color: colors$8.iconDisable,
|
|
14384
14388
|
__self: undefined,
|
|
14385
14389
|
__source: {
|
|
@@ -14395,7 +14399,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14395
14399
|
lineNumber: 760,
|
|
14396
14400
|
columnNumber: 19
|
|
14397
14401
|
}
|
|
14398
|
-
})), isShowSelectAll && (item
|
|
14402
|
+
})), isShowSelectAll && (item === null || item === void 0 ? void 0 : item.id) === '!all' && selectedValue !== null && selectedValue !== void 0 && selectedValue.length && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.length) < itemsLength ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
|
|
14399
14403
|
__self: undefined,
|
|
14400
14404
|
__source: {
|
|
14401
14405
|
fileName: _jsxFileName$y,
|
|
@@ -14420,15 +14424,15 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14420
14424
|
lineNumber: 769,
|
|
14421
14425
|
columnNumber: 11
|
|
14422
14426
|
}
|
|
14423
|
-
}, item.render ? item.render
|
|
14427
|
+
}, item.render ? (_item$render = item.render) === null || _item$render === void 0 ? void 0 : _item$render.call(item, item.name) : item.name));
|
|
14424
14428
|
};
|
|
14425
14429
|
let lastGroupIndex = showSelectAll ? 1 : 0;
|
|
14426
14430
|
const renderOptionGroupItem = (item, index) => {
|
|
14427
|
-
var _item$children5, _item$children6, _item$children7, _item$children8;
|
|
14431
|
+
var _item$children5, _item$children6, _item$children7, _item$render2, _item$children8;
|
|
14428
14432
|
// const groupIndex = (index > (showSelectAll ? 1 : 0)) ? lastGroupIndex : 0;
|
|
14429
14433
|
const groupIndex = lastGroupIndex;
|
|
14430
|
-
lastGroupIndex += ((item
|
|
14431
|
-
const filterSelectedChild = item
|
|
14434
|
+
lastGroupIndex += ((item === null || item === void 0 || (_item$children5 = item.children) === null || _item$children5 === void 0 ? void 0 : _item$children5.length) || 0) + 1;
|
|
14435
|
+
const filterSelectedChild = item === null || item === void 0 || (_item$children6 = item.children) === null || _item$children6 === void 0 ? void 0 : _item$children6.filter(e => selectedValue.includes(e.id) && !e.isDisabled);
|
|
14432
14436
|
return /*#__PURE__*/React__default.createElement(OptionGroupItem, {
|
|
14433
14437
|
item: /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
|
|
14434
14438
|
key: item.id
|
|
@@ -14461,7 +14465,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14461
14465
|
lineNumber: 799,
|
|
14462
14466
|
columnNumber: 15
|
|
14463
14467
|
}
|
|
14464
|
-
}, !(item
|
|
14468
|
+
}, !(item !== null && item !== void 0 && item.hideCheck) && item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
14465
14469
|
color: colors$8.iconDisable,
|
|
14466
14470
|
__self: undefined,
|
|
14467
14471
|
__source: {
|
|
@@ -14469,7 +14473,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14469
14473
|
lineNumber: 809,
|
|
14470
14474
|
columnNumber: 19
|
|
14471
14475
|
}
|
|
14472
|
-
}) : (filterSelectedChild
|
|
14476
|
+
}) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) === (item === null || item === void 0 || (_item$children7 = item.children) === null || _item$children7 === void 0 || (_item$children7 = _item$children7.filter(e => !e.isDisabled)) === null || _item$children7 === void 0 ? void 0 : _item$children7.length) ? /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
14473
14477
|
color: colors$8.iconGreen,
|
|
14474
14478
|
__self: undefined,
|
|
14475
14479
|
__source: {
|
|
@@ -14477,7 +14481,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14477
14481
|
lineNumber: 811,
|
|
14478
14482
|
columnNumber: 19
|
|
14479
14483
|
}
|
|
14480
|
-
}) : (filterSelectedChild
|
|
14484
|
+
}) : (filterSelectedChild === null || filterSelectedChild === void 0 ? void 0 : filterSelectedChild.length) > 0 ? /*#__PURE__*/React__default.createElement(IndeterminateFilled$1, {
|
|
14481
14485
|
__self: undefined,
|
|
14482
14486
|
__source: {
|
|
14483
14487
|
fileName: _jsxFileName$y,
|
|
@@ -14495,14 +14499,14 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14495
14499
|
lineNumber: 816,
|
|
14496
14500
|
columnNumber: 15
|
|
14497
14501
|
}
|
|
14498
|
-
}, item.render ? item.render
|
|
14502
|
+
}, item.render ? (_item$render2 = item.render) === null || _item$render2 === void 0 ? void 0 : _item$render2.call(item, item.name) : item.name)),
|
|
14499
14503
|
__self: undefined,
|
|
14500
14504
|
__source: {
|
|
14501
14505
|
fileName: _jsxFileName$y,
|
|
14502
14506
|
lineNumber: 784,
|
|
14503
14507
|
columnNumber: 9
|
|
14504
14508
|
}
|
|
14505
|
-
}, item
|
|
14509
|
+
}, item === null || item === void 0 || (_item$children8 = item.children) === null || _item$children8 === void 0 ? void 0 : _item$children8.map((optItem, optIndex) => renderOptionItem(optItem, groupIndex + optIndex + 1, true)));
|
|
14506
14510
|
};
|
|
14507
14511
|
return /*#__PURE__*/React__default.createElement(Wrapper$1, _extends({
|
|
14508
14512
|
css: css
|
|
@@ -14633,13 +14637,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14633
14637
|
lineNumber: 875,
|
|
14634
14638
|
columnNumber: 17
|
|
14635
14639
|
}
|
|
14636
|
-
}), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems
|
|
14640
|
+
}), selectAllLabel != null ? selectAllLabel : t('selectAllLabelText', 'Pilih Semua')) : selectedItems === null || selectedItems === void 0 || (_selectedItems$filter = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter === void 0 || (_selectedItems$filter = _selectedItems$filter.filter((_, idx) => {
|
|
14637
14641
|
if (showAllTags || !collapsible) {
|
|
14638
14642
|
return true;
|
|
14639
14643
|
} else {
|
|
14640
14644
|
return idx < 5;
|
|
14641
14645
|
}
|
|
14642
|
-
}))
|
|
14646
|
+
})) === null || _selectedItems$filter === void 0 ? void 0 : _selectedItems$filter.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
|
|
14643
14647
|
disabled: disabled,
|
|
14644
14648
|
isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
|
|
14645
14649
|
size: "lg",
|
|
@@ -14664,7 +14668,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14664
14668
|
lineNumber: 904,
|
|
14665
14669
|
columnNumber: 21
|
|
14666
14670
|
}
|
|
14667
|
-
}), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems
|
|
14671
|
+
}), selectedItem.name))), collapsible && !isShowTagSelectAll && (selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) > collapsibleLimit && /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
14668
14672
|
direction: "column",
|
|
14669
14673
|
gap: 4,
|
|
14670
14674
|
__self: undefined,
|
|
@@ -14750,7 +14754,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14750
14754
|
lineNumber: 947,
|
|
14751
14755
|
columnNumber: 19
|
|
14752
14756
|
}
|
|
14753
|
-
}, `${selectedItems
|
|
14757
|
+
}, `${selectedItems === null || selectedItems === void 0 || (_selectedItems$filter2 = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter2 === void 0 ? void 0 : _selectedItems$filter2.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`))), showCounter && !isShowTagSelectAll && Boolean(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) && /*#__PURE__*/React__default.createElement(Paragraph, {
|
|
14754
14758
|
css: {
|
|
14755
14759
|
fontSize: '$label',
|
|
14756
14760
|
marginTop: '$spacing-01'
|
|
@@ -14762,7 +14766,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14762
14766
|
lineNumber: 957,
|
|
14763
14767
|
columnNumber: 11
|
|
14764
14768
|
}
|
|
14765
|
-
}, `${selectedItems
|
|
14769
|
+
}, `${selectedItems === null || selectedItems === void 0 || (_selectedItems$filter3 = selectedItems.filter(item => (item === null || item === void 0 ? void 0 : item.id) !== '!all')) === null || _selectedItems$filter3 === void 0 ? void 0 : _selectedItems$filter3.length} ${labelCounter || t('labelCounterText', 'Item terpilih')}`), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
|
|
14766
14770
|
placement: placement,
|
|
14767
14771
|
css: {
|
|
14768
14772
|
display: isOpen && disabled === false ? 'block' : 'none',
|
|
@@ -14820,7 +14824,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14820
14824
|
}), /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
|
|
14821
14825
|
condition: !!fetchData && items.length > 0,
|
|
14822
14826
|
wrapper: child => /*#__PURE__*/React__default.createElement(InfiniteScroll, {
|
|
14823
|
-
loadMore: () => !isLoading && (fetchData
|
|
14827
|
+
loadMore: () => !isLoading && (fetchData === null || fetchData === void 0 ? void 0 : fetchData({
|
|
14824
14828
|
query
|
|
14825
14829
|
})),
|
|
14826
14830
|
hasMore: true,
|
|
@@ -14839,7 +14843,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
14839
14843
|
lineNumber: 997,
|
|
14840
14844
|
columnNumber: 15
|
|
14841
14845
|
}
|
|
14842
|
-
}, isOpen && items.map((item, index) => item
|
|
14846
|
+
}, isOpen && items.map((item, index) => item !== null && item !== void 0 && item.children ? renderOptionGroupItem(item) : renderOptionItem(item, index)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
|
|
14843
14847
|
css: {
|
|
14844
14848
|
height: 'auto'
|
|
14845
14849
|
}
|
|
@@ -18387,9 +18391,9 @@ const NativeTimePicker = ({
|
|
|
18387
18391
|
}
|
|
18388
18392
|
function handleInputChange(type, e) {
|
|
18389
18393
|
var _e$target;
|
|
18390
|
-
const value = e
|
|
18394
|
+
const value = e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
|
|
18391
18395
|
const format = 'DD:MM:YYYY:HH:mm';
|
|
18392
|
-
const minLength = (value
|
|
18396
|
+
const minLength = (value === null || value === void 0 ? void 0 : value.length) > 1;
|
|
18393
18397
|
const hourValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:mm')}:${params}`, 'DD:MM:YYYY:mm:HH').toDate());
|
|
18394
18398
|
const minuteValue = params => moment(moment(`${moment(date).format('DD:MM:YYYY:HH')}:${params}`, 'DD:MM:YYYY:HH:mm').toDate());
|
|
18395
18399
|
if (!disabled) {
|
|
@@ -20950,7 +20954,7 @@ const NotificationBadge = _ref => {
|
|
|
20950
20954
|
};
|
|
20951
20955
|
};
|
|
20952
20956
|
const getValue = () => {
|
|
20953
|
-
let value = props
|
|
20957
|
+
let value = props === null || props === void 0 ? void 0 : props.value;
|
|
20954
20958
|
const isTrailing = variantIcon === 'trailing';
|
|
20955
20959
|
if (typeof value === 'number' || parseInt(value)) {
|
|
20956
20960
|
if (Math.sign(value) === 1 || Math.sign(value) === 0) {
|
|
@@ -21583,7 +21587,7 @@ const PaginationButton = ({
|
|
|
21583
21587
|
justify: "center",
|
|
21584
21588
|
onClick: () => {
|
|
21585
21589
|
var _dialogPageRef$curren;
|
|
21586
|
-
return (_dialogPageRef$curren = dialogPageRef.current)
|
|
21590
|
+
return (_dialogPageRef$curren = dialogPageRef.current) === null || _dialogPageRef$curren === void 0 ? void 0 : _dialogPageRef$curren.click();
|
|
21587
21591
|
},
|
|
21588
21592
|
__self: undefined,
|
|
21589
21593
|
__source: {
|
|
@@ -21661,7 +21665,7 @@ const PaginationButton = ({
|
|
|
21661
21665
|
onSubmit: () => {
|
|
21662
21666
|
var _dialogPageRef$curren2;
|
|
21663
21667
|
debouncedGoToPage(Number(goToPage));
|
|
21664
|
-
(_dialogPageRef$curren2 = dialogPageRef.current)
|
|
21668
|
+
(_dialogPageRef$curren2 = dialogPageRef.current) === null || _dialogPageRef$curren2 === void 0 || _dialogPageRef$curren2.click();
|
|
21665
21669
|
},
|
|
21666
21670
|
__self: undefined,
|
|
21667
21671
|
__source: {
|
|
@@ -21678,7 +21682,7 @@ const PaginationButton = ({
|
|
|
21678
21682
|
allowNegative: false,
|
|
21679
21683
|
onChange: e => {
|
|
21680
21684
|
var _e$target;
|
|
21681
|
-
return setGoToPage((_e$target = e.target)
|
|
21685
|
+
return setGoToPage((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
21682
21686
|
},
|
|
21683
21687
|
__self: undefined,
|
|
21684
21688
|
__source: {
|
|
@@ -21711,7 +21715,7 @@ const PaginationButton = ({
|
|
|
21711
21715
|
onClick: () => {
|
|
21712
21716
|
var _dialogPageRef$curren3;
|
|
21713
21717
|
setGoToPage(null);
|
|
21714
|
-
(_dialogPageRef$curren3 = dialogPageRef.current)
|
|
21718
|
+
(_dialogPageRef$curren3 = dialogPageRef.current) === null || _dialogPageRef$curren3 === void 0 || _dialogPageRef$curren3.click();
|
|
21715
21719
|
},
|
|
21716
21720
|
__self: undefined,
|
|
21717
21721
|
__source: {
|
|
@@ -21726,7 +21730,7 @@ const PaginationButton = ({
|
|
|
21726
21730
|
onClick: () => {
|
|
21727
21731
|
var _dialogPageRef$curren4;
|
|
21728
21732
|
debouncedGoToPage(Number(goToPage));
|
|
21729
|
-
(_dialogPageRef$curren4 = dialogPageRef.current)
|
|
21733
|
+
(_dialogPageRef$curren4 = dialogPageRef.current) === null || _dialogPageRef$curren4 === void 0 || _dialogPageRef$curren4.click();
|
|
21730
21734
|
},
|
|
21731
21735
|
__self: undefined,
|
|
21732
21736
|
__source: {
|
|
@@ -21815,7 +21819,7 @@ function PaginationInfo(_ref) {
|
|
|
21815
21819
|
onClick: () => {
|
|
21816
21820
|
if (isMobilePagination) {
|
|
21817
21821
|
var _dialogLimitRef$curre;
|
|
21818
|
-
(_dialogLimitRef$curre = dialogLimitRef.current)
|
|
21822
|
+
(_dialogLimitRef$curre = dialogLimitRef.current) === null || _dialogLimitRef$curre === void 0 || _dialogLimitRef$curre.click();
|
|
21819
21823
|
}
|
|
21820
21824
|
},
|
|
21821
21825
|
__self: this,
|
|
@@ -21861,7 +21865,7 @@ function PaginationInfo(_ref) {
|
|
|
21861
21865
|
lineNumber: 60,
|
|
21862
21866
|
columnNumber: 13
|
|
21863
21867
|
}
|
|
21864
|
-
}, limits
|
|
21868
|
+
}, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(PopoverClose, {
|
|
21865
21869
|
key: limit,
|
|
21866
21870
|
css: limitItemContainerStyle(selectedLimit === limit),
|
|
21867
21871
|
onClick: () => onChange(limit),
|
|
@@ -21944,7 +21948,7 @@ function PaginationInfo(_ref) {
|
|
|
21944
21948
|
lineNumber: 100,
|
|
21945
21949
|
columnNumber: 11
|
|
21946
21950
|
}
|
|
21947
|
-
}, limits
|
|
21951
|
+
}, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
21948
21952
|
css: {
|
|
21949
21953
|
height: 44,
|
|
21950
21954
|
width: '100%',
|
|
@@ -21959,7 +21963,7 @@ function PaginationInfo(_ref) {
|
|
|
21959
21963
|
onClick: () => {
|
|
21960
21964
|
var _dialogLimitRef$curre2;
|
|
21961
21965
|
onChange(limit);
|
|
21962
|
-
(_dialogLimitRef$curre2 = dialogLimitRef.current)
|
|
21966
|
+
(_dialogLimitRef$curre2 = dialogLimitRef.current) === null || _dialogLimitRef$curre2 === void 0 || _dialogLimitRef$curre2.click();
|
|
21963
21967
|
},
|
|
21964
21968
|
__self: this,
|
|
21965
21969
|
__source: {
|
|
@@ -24081,7 +24085,7 @@ const rowMenuColumn = (options, icon, config) => ({
|
|
|
24081
24085
|
onClick: () => {
|
|
24082
24086
|
var _document$getElements;
|
|
24083
24087
|
setOpenDrop(true);
|
|
24084
|
-
const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu'))
|
|
24088
|
+
const contextMenu = (_document$getElements = document.getElementsByClassName('react-contextmenu')) === null || _document$getElements === void 0 ? void 0 : _document$getElements[0];
|
|
24085
24089
|
contextMenu.style.opacity = 0;
|
|
24086
24090
|
},
|
|
24087
24091
|
__self: undefined,
|
|
@@ -24730,7 +24734,7 @@ const TemplateAlertFunction = props => {
|
|
|
24730
24734
|
if (!props.onOpenAutoFocus) {
|
|
24731
24735
|
e.preventDefault();
|
|
24732
24736
|
} else {
|
|
24733
|
-
props
|
|
24737
|
+
props === null || props === void 0 || props.onOpenAutoFocus();
|
|
24734
24738
|
}
|
|
24735
24739
|
},
|
|
24736
24740
|
__self: undefined,
|
|
@@ -24810,7 +24814,7 @@ const TemplateAlertFunction = props => {
|
|
|
24810
24814
|
}, props.description)), /*#__PURE__*/React__default.createElement(Box, {
|
|
24811
24815
|
css: {
|
|
24812
24816
|
width: '100%',
|
|
24813
|
-
display: props
|
|
24817
|
+
display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
|
|
24814
24818
|
},
|
|
24815
24819
|
__self: undefined,
|
|
24816
24820
|
__source: {
|
|
@@ -24852,8 +24856,8 @@ const TemplateAlertFunction = props => {
|
|
|
24852
24856
|
size: props.btnSize,
|
|
24853
24857
|
onClick: buttonConfirm,
|
|
24854
24858
|
buttonType: props.dialogType,
|
|
24855
|
-
disabled: props
|
|
24856
|
-
}, props
|
|
24859
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
24860
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
24857
24861
|
__self: undefined,
|
|
24858
24862
|
__source: {
|
|
24859
24863
|
fileName: _jsxFileName$b,
|
|
@@ -24872,19 +24876,19 @@ const TemplateAlertFunction = props => {
|
|
|
24872
24876
|
size: props.btnSize,
|
|
24873
24877
|
onClick: buttonCancel,
|
|
24874
24878
|
css: {
|
|
24875
|
-
color: props.dialogType === 'negative' && !(props
|
|
24879
|
+
color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
|
|
24876
24880
|
flex: props.isMobile && 1
|
|
24877
24881
|
},
|
|
24878
|
-
buttonType: props.dialogType === 'negative' && !(props
|
|
24879
|
-
disabled: props
|
|
24880
|
-
}, props
|
|
24882
|
+
buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
|
|
24883
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
24884
|
+
}, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
|
|
24881
24885
|
__self: undefined,
|
|
24882
24886
|
__source: {
|
|
24883
24887
|
fileName: _jsxFileName$b,
|
|
24884
24888
|
lineNumber: 187,
|
|
24885
24889
|
columnNumber: 19
|
|
24886
24890
|
}
|
|
24887
|
-
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props
|
|
24891
|
+
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
|
|
24888
24892
|
asChild: true,
|
|
24889
24893
|
__self: undefined,
|
|
24890
24894
|
__source: {
|
|
@@ -24899,8 +24903,8 @@ const TemplateAlertFunction = props => {
|
|
|
24899
24903
|
css: {
|
|
24900
24904
|
flex: props.isMobile && 1
|
|
24901
24905
|
},
|
|
24902
|
-
disabled: props
|
|
24903
|
-
}, props
|
|
24906
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
24907
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
24904
24908
|
__self: undefined,
|
|
24905
24909
|
__source: {
|
|
24906
24910
|
fileName: _jsxFileName$b,
|
|
@@ -25030,7 +25034,7 @@ function AlertDialog(props) {
|
|
|
25030
25034
|
}, props.description)), /*#__PURE__*/React__default.createElement(Box, {
|
|
25031
25035
|
css: {
|
|
25032
25036
|
width: '100%',
|
|
25033
|
-
display: props
|
|
25037
|
+
display: props !== null && props !== void 0 && props.singleButton && props !== null && props !== void 0 && props.hideActionButton ? 'none' : 'inherit'
|
|
25034
25038
|
},
|
|
25035
25039
|
__self: this,
|
|
25036
25040
|
__source: {
|
|
@@ -25075,8 +25079,8 @@ function AlertDialog(props) {
|
|
|
25075
25079
|
css: {
|
|
25076
25080
|
flex: props.isMobile && 1
|
|
25077
25081
|
},
|
|
25078
|
-
disabled: props
|
|
25079
|
-
}, props
|
|
25082
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
25083
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
25080
25084
|
__self: this,
|
|
25081
25085
|
__source: {
|
|
25082
25086
|
fileName: _jsxFileName$b,
|
|
@@ -25095,19 +25099,19 @@ function AlertDialog(props) {
|
|
|
25095
25099
|
size: props.btnSize,
|
|
25096
25100
|
onClick: props.onCancel,
|
|
25097
25101
|
css: {
|
|
25098
|
-
color: props.dialogType === 'negative' && !(props
|
|
25102
|
+
color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$textSecondary !important',
|
|
25099
25103
|
flex: props.isMobile && 1
|
|
25100
25104
|
},
|
|
25101
|
-
buttonType: props.dialogType === 'negative' && !(props
|
|
25102
|
-
disabled: props
|
|
25103
|
-
}, props
|
|
25105
|
+
buttonType: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) ? 'ghost-secondary' : 'ghost',
|
|
25106
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
25107
|
+
}, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
|
|
25104
25108
|
__self: this,
|
|
25105
25109
|
__source: {
|
|
25106
25110
|
fileName: _jsxFileName$b,
|
|
25107
25111
|
lineNumber: 293,
|
|
25108
25112
|
columnNumber: 19
|
|
25109
25113
|
}
|
|
25110
|
-
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props
|
|
25114
|
+
}), props.labelCancel ? props.labelCancel : t('label.cancel', 'Batal'))), !(props !== null && props !== void 0 && props.hideActionButton) && /*#__PURE__*/React__default.createElement(ADialog.Action, {
|
|
25111
25115
|
asChild: true,
|
|
25112
25116
|
__self: this,
|
|
25113
25117
|
__source: {
|
|
@@ -25122,8 +25126,8 @@ function AlertDialog(props) {
|
|
|
25122
25126
|
css: {
|
|
25123
25127
|
flex: props.isMobile && 1
|
|
25124
25128
|
},
|
|
25125
|
-
disabled: props
|
|
25126
|
-
}, props
|
|
25129
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
25130
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
25127
25131
|
__self: this,
|
|
25128
25132
|
__source: {
|
|
25129
25133
|
fileName: _jsxFileName$b,
|
|
@@ -27613,7 +27617,7 @@ const Upload = ({
|
|
|
27613
27617
|
upload({
|
|
27614
27618
|
url: action,
|
|
27615
27619
|
file: newFile,
|
|
27616
|
-
customBody: customBodyRequest
|
|
27620
|
+
customBody: customBodyRequest === null || customBodyRequest === void 0 ? void 0 : customBodyRequest(newFile),
|
|
27617
27621
|
token,
|
|
27618
27622
|
tokenKey,
|
|
27619
27623
|
reqKey,
|
|
@@ -27633,12 +27637,12 @@ const Upload = ({
|
|
|
27633
27637
|
arrProgress[i] = fileProgress;
|
|
27634
27638
|
}
|
|
27635
27639
|
}
|
|
27636
|
-
onChange
|
|
27640
|
+
onChange === null || onChange === void 0 || (_onChange = onChange({
|
|
27637
27641
|
fileList: arrProgress,
|
|
27638
27642
|
file: fileProgress,
|
|
27639
27643
|
indexReplace: indexReplace.current,
|
|
27640
27644
|
isReplace: indexReplace.current !== null
|
|
27641
|
-
}))
|
|
27645
|
+
})) === null || _onChange === void 0 || (_onChange = _onChange.then(() => setError(null))) === null || _onChange === void 0 || _onChange.catch(error => setError(error.message));
|
|
27642
27646
|
}
|
|
27643
27647
|
}).then(result => {
|
|
27644
27648
|
var _onChange2;
|
|
@@ -27651,12 +27655,12 @@ const Upload = ({
|
|
|
27651
27655
|
arrFile[i] = fileSuccess;
|
|
27652
27656
|
}
|
|
27653
27657
|
}
|
|
27654
|
-
onChange
|
|
27658
|
+
onChange === null || onChange === void 0 || (_onChange2 = onChange({
|
|
27655
27659
|
fileList: arrFile,
|
|
27656
27660
|
file: fileSuccess,
|
|
27657
27661
|
indexReplace: indexReplace.current,
|
|
27658
27662
|
isReplace: indexReplace.current !== null
|
|
27659
|
-
}))
|
|
27663
|
+
})) === null || _onChange2 === void 0 || (_onChange2 = _onChange2.then(() => setError(null))) === null || _onChange2 === void 0 || _onChange2.catch(error => setError(error.message));
|
|
27660
27664
|
}).catch(error => {
|
|
27661
27665
|
var _onChange3;
|
|
27662
27666
|
let fileError = Object.assign({}, newFile);
|
|
@@ -27668,21 +27672,21 @@ const Upload = ({
|
|
|
27668
27672
|
arrFile[i] = fileError;
|
|
27669
27673
|
}
|
|
27670
27674
|
}
|
|
27671
|
-
onChange
|
|
27675
|
+
onChange === null || onChange === void 0 || (_onChange3 = onChange({
|
|
27672
27676
|
fileList: arrFile,
|
|
27673
27677
|
file: fileError,
|
|
27674
27678
|
indexReplace: indexReplace.current,
|
|
27675
27679
|
isReplace: indexReplace.current !== null
|
|
27676
|
-
}))
|
|
27680
|
+
})) === null || _onChange3 === void 0 || (_onChange3 = _onChange3.then(() => setError(null))) === null || _onChange3 === void 0 || _onChange3.catch(error => setError(error.message));
|
|
27677
27681
|
});
|
|
27678
27682
|
} else {
|
|
27679
27683
|
var _onChange4;
|
|
27680
|
-
onChange
|
|
27684
|
+
onChange === null || onChange === void 0 || (_onChange4 = onChange({
|
|
27681
27685
|
fileList: arrFile,
|
|
27682
27686
|
file: newFile,
|
|
27683
27687
|
indexReplace: indexReplace.current,
|
|
27684
27688
|
isReplace: indexReplace.current !== null
|
|
27685
|
-
}))
|
|
27689
|
+
})) === null || _onChange4 === void 0 || (_onChange4 = _onChange4.then(() => setError(null))) === null || _onChange4 === void 0 || _onChange4.catch(error => setError(error.message));
|
|
27686
27690
|
}
|
|
27687
27691
|
if (indexReplace.current !== null) {
|
|
27688
27692
|
arrFile[indexReplace.current] = newFile;
|
|
@@ -27702,15 +27706,15 @@ const Upload = ({
|
|
|
27702
27706
|
// program to get the dimensions of an image
|
|
27703
27707
|
const img = document.createElement('img');
|
|
27704
27708
|
img.src = URL.createObjectURL(files[0]);
|
|
27705
|
-
img.size = files
|
|
27706
|
-
img.type = files
|
|
27709
|
+
img.size = files === null || files === void 0 || (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.size;
|
|
27710
|
+
img.type = files === null || files === void 0 || (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.type;
|
|
27707
27711
|
img.onload = () => {
|
|
27708
27712
|
const imgRatio = img.width / img.height;
|
|
27709
27713
|
setAspect(ratio || imgRatio);
|
|
27710
27714
|
setCropperImgRatio(imgRatio);
|
|
27711
27715
|
if (onBeforeCrop) {
|
|
27712
27716
|
var _onBeforeCrop;
|
|
27713
|
-
onBeforeCrop
|
|
27717
|
+
onBeforeCrop === null || onBeforeCrop === void 0 || (_onBeforeCrop = onBeforeCrop(img)) === null || _onBeforeCrop === void 0 || (_onBeforeCrop = _onBeforeCrop.then(() => {
|
|
27714
27718
|
setError(null);
|
|
27715
27719
|
toggleModal();
|
|
27716
27720
|
setTimeout(() => {
|
|
@@ -27724,7 +27728,7 @@ const Upload = ({
|
|
|
27724
27728
|
}, 300);
|
|
27725
27729
|
setFileState(files[0]);
|
|
27726
27730
|
setPreviewImage(URL.createObjectURL(files[0]));
|
|
27727
|
-
}))
|
|
27731
|
+
})) === null || _onBeforeCrop === void 0 || _onBeforeCrop.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
|
|
27728
27732
|
} else {
|
|
27729
27733
|
toggleModal();
|
|
27730
27734
|
setTimeout(() => {
|
|
@@ -27742,18 +27746,18 @@ const Upload = ({
|
|
|
27742
27746
|
};
|
|
27743
27747
|
img.onerror = error => {
|
|
27744
27748
|
var _onBeforeCrop2;
|
|
27745
|
-
onBeforeCrop
|
|
27749
|
+
onBeforeCrop === null || onBeforeCrop === void 0 || (_onBeforeCrop2 = onBeforeCrop(img, error)) === null || _onBeforeCrop2 === void 0 || (_onBeforeCrop2 = _onBeforeCrop2.then(() => setError(null))) === null || _onBeforeCrop2 === void 0 || _onBeforeCrop2.catch(error => setError(error === null || error === void 0 ? void 0 : error.message));
|
|
27746
27750
|
};
|
|
27747
27751
|
}
|
|
27748
27752
|
}
|
|
27749
27753
|
}
|
|
27750
27754
|
function handleCrop() {
|
|
27751
|
-
if (completedCrop
|
|
27752
|
-
imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState
|
|
27753
|
-
const sizeMB = (blob
|
|
27755
|
+
if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
|
|
27756
|
+
imgPreview(imgRef.current, completedCrop, 1, 0, ratio, fileState === null || fileState === void 0 ? void 0 : fileState.type).then(blob => {
|
|
27757
|
+
const sizeMB = (blob === null || blob === void 0 ? void 0 : blob.size) / 1024 / 1024;
|
|
27754
27758
|
if (sizeMB < maxSizeMB || sizeMB < 1 || !imageCompression) {
|
|
27755
|
-
const file = new File([blob], fileState
|
|
27756
|
-
type: blob
|
|
27759
|
+
const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
|
|
27760
|
+
type: blob === null || blob === void 0 ? void 0 : blob.type
|
|
27757
27761
|
});
|
|
27758
27762
|
handleUpload([file]);
|
|
27759
27763
|
setCrop(null);
|
|
@@ -27767,16 +27771,16 @@ const Upload = ({
|
|
|
27767
27771
|
alwaysKeepResolution: true
|
|
27768
27772
|
}).then(compressedFile => {
|
|
27769
27773
|
var _fileState$name;
|
|
27770
|
-
const file = new File([compressedFile], (fileState
|
|
27771
|
-
type: compressedFile
|
|
27774
|
+
const file = new File([compressedFile], (fileState === null || fileState === void 0 || (_fileState$name = fileState.name) === null || _fileState$name === void 0 ? void 0 : _fileState$name.replace(/\.[^/.]+$/, '')) + '.png', {
|
|
27775
|
+
type: compressedFile === null || compressedFile === void 0 ? void 0 : compressedFile.type
|
|
27772
27776
|
});
|
|
27773
27777
|
handleUpload([file]);
|
|
27774
27778
|
setCrop(null);
|
|
27775
27779
|
setCompletedCrop(null);
|
|
27776
|
-
}).catch(error => console.error(error
|
|
27780
|
+
}).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
|
|
27777
27781
|
}
|
|
27778
27782
|
toggleModal();
|
|
27779
|
-
}).catch(error => console.error(error
|
|
27783
|
+
}).catch(error => console.error(error === null || error === void 0 ? void 0 : error.message));
|
|
27780
27784
|
} else {
|
|
27781
27785
|
handleUpload([fileState]);
|
|
27782
27786
|
toggleModal();
|
|
@@ -27805,7 +27809,7 @@ const Upload = ({
|
|
|
27805
27809
|
const index = fileList.indexOf(file);
|
|
27806
27810
|
const newFileList = fileList.slice();
|
|
27807
27811
|
newFileList.splice(index, 1);
|
|
27808
|
-
onChange
|
|
27812
|
+
onChange === null || onChange === void 0 || onChange({
|
|
27809
27813
|
fileList: newFileList,
|
|
27810
27814
|
file
|
|
27811
27815
|
});
|
|
@@ -27828,14 +27832,14 @@ const Upload = ({
|
|
|
27828
27832
|
}
|
|
27829
27833
|
function handleOpenFile(file) {
|
|
27830
27834
|
var _String, _file$name;
|
|
27831
|
-
let extension = (_String = String(file
|
|
27835
|
+
let extension = (_String = String(file === null || file === void 0 || (_file$name = file.name) === null || _file$name === void 0 ? void 0 : _file$name.split('.').pop())) === null || _String === void 0 ? void 0 : _String.toLowerCase();
|
|
27832
27836
|
if (extension === 'pdf') {
|
|
27833
|
-
window.open(file
|
|
27837
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
27834
27838
|
} else {
|
|
27835
|
-
if (file
|
|
27839
|
+
if (file !== null && file !== void 0 && file.url) {
|
|
27836
27840
|
const link = document.createElement('a');
|
|
27837
27841
|
link.href = file.url;
|
|
27838
|
-
link.setAttribute('download', file
|
|
27842
|
+
link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
|
|
27839
27843
|
document.body.appendChild(link);
|
|
27840
27844
|
link.click();
|
|
27841
27845
|
document.body.removeChild(link);
|
|
@@ -27897,12 +27901,12 @@ const Upload = ({
|
|
|
27897
27901
|
}, replaceLabel && replaceLabel.length > 0 ? replaceLabel : t('replaceLabel', 'Ubah Berkas')));
|
|
27898
27902
|
}
|
|
27899
27903
|
const renderPicture = () => {
|
|
27900
|
-
return fileList
|
|
27901
|
-
if ((item
|
|
27904
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
|
|
27905
|
+
if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
|
|
27902
27906
|
return /*#__PURE__*/React__default.createElement(UploadProgress, {
|
|
27903
27907
|
key: index,
|
|
27904
|
-
progress: item
|
|
27905
|
-
loading: item
|
|
27908
|
+
progress: item === null || item === void 0 ? void 0 : item.percent,
|
|
27909
|
+
loading: item === null || item === void 0 ? void 0 : item.loading,
|
|
27906
27910
|
__self: undefined,
|
|
27907
27911
|
__source: {
|
|
27908
27912
|
fileName: _jsxFileName$9,
|
|
@@ -27975,13 +27979,13 @@ const Upload = ({
|
|
|
27975
27979
|
});
|
|
27976
27980
|
};
|
|
27977
27981
|
const renderFile = () => {
|
|
27978
|
-
return fileList
|
|
27982
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
|
|
27979
27983
|
var _item$name;
|
|
27980
|
-
if ((item
|
|
27984
|
+
if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
|
|
27981
27985
|
return /*#__PURE__*/React__default.createElement(UploadProgress, {
|
|
27982
27986
|
key: index,
|
|
27983
|
-
progress: item
|
|
27984
|
-
loading: item
|
|
27987
|
+
progress: item === null || item === void 0 ? void 0 : item.percent,
|
|
27988
|
+
loading: item === null || item === void 0 ? void 0 : item.loading,
|
|
27985
27989
|
__self: undefined,
|
|
27986
27990
|
__source: {
|
|
27987
27991
|
fileName: _jsxFileName$9,
|
|
@@ -28047,7 +28051,7 @@ const Upload = ({
|
|
|
28047
28051
|
lineNumber: 666,
|
|
28048
28052
|
columnNumber: 17
|
|
28049
28053
|
}
|
|
28050
|
-
}, ".", item
|
|
28054
|
+
}, ".", item === null || item === void 0 || (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
28051
28055
|
label: item.name,
|
|
28052
28056
|
__self: undefined,
|
|
28053
28057
|
__source: {
|
|
@@ -28417,7 +28421,7 @@ const Upload = ({
|
|
|
28417
28421
|
}
|
|
28418
28422
|
return /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
28419
28423
|
direction: "row",
|
|
28420
|
-
gap: (fileList
|
|
28424
|
+
gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
|
|
28421
28425
|
wrap: "wrap",
|
|
28422
28426
|
css: {
|
|
28423
28427
|
userSelect: 'none'
|
|
@@ -29238,9 +29242,9 @@ const Separator$1 = styled('div', {
|
|
|
29238
29242
|
function InputColorPicker(props) {
|
|
29239
29243
|
const [isPopover, setIsPopover] = useState(false);
|
|
29240
29244
|
function getColor() {
|
|
29241
|
-
const color = props
|
|
29245
|
+
const color = props === null || props === void 0 ? void 0 : props.color;
|
|
29242
29246
|
if (typeof color === 'string') {
|
|
29243
|
-
return color
|
|
29247
|
+
return color === null || color === void 0 ? void 0 : color.toUpperCase();
|
|
29244
29248
|
}
|
|
29245
29249
|
return `rgba(${color.r},${color.g},${color.b},${color.a})`;
|
|
29246
29250
|
}
|
|
@@ -32259,7 +32263,7 @@ const Navigation = props => {
|
|
|
32259
32263
|
var _data;
|
|
32260
32264
|
const isActive = props.currentStep === i;
|
|
32261
32265
|
const isComplete = props.isComplete[i - 1];
|
|
32262
|
-
const isAdditional = (_data = data[i - 1])
|
|
32266
|
+
const isAdditional = (_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.additional;
|
|
32263
32267
|
const lastItem = navMobileItems.indexOf(data[i - 1]) + 1 === navMobileItems.length;
|
|
32264
32268
|
// eslint-disable-next-line no-lone-blocks
|
|
32265
32269
|
{
|
|
@@ -32274,7 +32278,7 @@ const Navigation = props => {
|
|
|
32274
32278
|
key: `step-${i}`,
|
|
32275
32279
|
onClick: () => {
|
|
32276
32280
|
var _data2;
|
|
32277
|
-
if (props.onNavClicked && !((_data2 = data[i - 1])
|
|
32281
|
+
if (props.onNavClicked && !((_data2 = data[i - 1]) !== null && _data2 !== void 0 && _data2.disabled) || isAdditional) props.onNavClicked(i);
|
|
32278
32282
|
if (!forbidClickNav && isComplete && !isHide || isAdditional) {
|
|
32279
32283
|
props.goToStep(i);
|
|
32280
32284
|
}
|
|
@@ -32307,9 +32311,9 @@ const Navigation = props => {
|
|
|
32307
32311
|
lineNumber: 176,
|
|
32308
32312
|
columnNumber: 17
|
|
32309
32313
|
}
|
|
32310
|
-
}), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title)
|
|
32314
|
+
}), typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title = (_data3 = data[i - 1]).title) === null || _data$title === void 0 ? void 0 : _data$title.call(_data3), ((_data4 = data[i - 1]) === null || _data4 === void 0 ? void 0 : _data4.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
32311
32315
|
align: "center",
|
|
32312
|
-
label: (_data5 = data[i - 1])
|
|
32316
|
+
label: (_data5 = data[i - 1]) === null || _data5 === void 0 ? void 0 : _data5.tooltipsContents,
|
|
32313
32317
|
__self: undefined,
|
|
32314
32318
|
__source: {
|
|
32315
32319
|
fileName: _jsxFileName$4,
|
|
@@ -32328,9 +32332,9 @@ const Navigation = props => {
|
|
|
32328
32332
|
lineNumber: 181,
|
|
32329
32333
|
columnNumber: 19
|
|
32330
32334
|
}
|
|
32331
|
-
})), ((_data6 = data[i - 1])
|
|
32335
|
+
})), ((_data6 = data[i - 1]) === null || _data6 === void 0 ? void 0 : _data6.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
32332
32336
|
css: {
|
|
32333
|
-
marginLeft: (_data7 = data[i - 1])
|
|
32337
|
+
marginLeft: (_data7 = data[i - 1]) !== null && _data7 !== void 0 && _data7.withTolltip ? 0 : '$spacing-03'
|
|
32334
32338
|
},
|
|
32335
32339
|
align: "center",
|
|
32336
32340
|
__self: undefined,
|
|
@@ -32381,10 +32385,10 @@ const Navigation = props => {
|
|
|
32381
32385
|
lineNumber: 198,
|
|
32382
32386
|
columnNumber: 21
|
|
32383
32387
|
}
|
|
32384
|
-
}, typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data8 = data[i - 1]).title)
|
|
32388
|
+
}, typeof data[i - 1].title === 'string' ? data[i - 1].title : (_data$title2 = (_data8 = data[i - 1]).title) === null || _data$title2 === void 0 ? void 0 : _data$title2.call(_data8)), ((_data9 = data[i - 1]) === null || _data9 === void 0 ? void 0 : _data9.withTolltip) && /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
32385
32389
|
align: "center",
|
|
32386
32390
|
withClick: true,
|
|
32387
|
-
label: (_data10 = data[i - 1])
|
|
32391
|
+
label: (_data10 = data[i - 1]) === null || _data10 === void 0 ? void 0 : _data10.tooltipsContents,
|
|
32388
32392
|
__self: undefined,
|
|
32389
32393
|
__source: {
|
|
32390
32394
|
fileName: _jsxFileName$4,
|
|
@@ -32400,11 +32404,11 @@ const Navigation = props => {
|
|
|
32400
32404
|
lineNumber: 209,
|
|
32401
32405
|
columnNumber: 25
|
|
32402
32406
|
}
|
|
32403
|
-
})), ((_data11 = data[i - 1])
|
|
32407
|
+
})), ((_data11 = data[i - 1]) === null || _data11 === void 0 ? void 0 : _data11.comingSoon) && /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
32404
32408
|
align: "center",
|
|
32405
32409
|
justify: "center",
|
|
32406
32410
|
css: {
|
|
32407
|
-
marginTop: (_data12 = data[i - 1])
|
|
32411
|
+
marginTop: (_data12 = data[i - 1]) !== null && _data12 !== void 0 && _data12.withTolltip ? 0 : '$spacing-03'
|
|
32408
32412
|
},
|
|
32409
32413
|
__self: undefined,
|
|
32410
32414
|
__source: {
|
|
@@ -32428,7 +32432,7 @@ const Navigation = props => {
|
|
|
32428
32432
|
userSelect: 'none',
|
|
32429
32433
|
fontSize: '12px',
|
|
32430
32434
|
textAlign: '-webkit-center',
|
|
32431
|
-
display: ((_data13 = data[i - 1])
|
|
32435
|
+
display: ((_data13 = data[i - 1]) === null || _data13 === void 0 ? void 0 : _data13.disabled) && 'none',
|
|
32432
32436
|
marginTop: '$spacing-07',
|
|
32433
32437
|
flex: 1,
|
|
32434
32438
|
maxWidth: lastItem && 26
|
|
@@ -32508,7 +32512,7 @@ const Navigation = props => {
|
|
|
32508
32512
|
height: 24,
|
|
32509
32513
|
borderRadius: '$round',
|
|
32510
32514
|
border: `4px solid ${isActive ? '$bgGreen' : '$bgInactive'}`,
|
|
32511
|
-
backgroundColor: (_data14 = data[i - 1])
|
|
32515
|
+
backgroundColor: (_data14 = data[i - 1]) !== null && _data14 !== void 0 && _data14.disabled ? '$gray200' : '$white'
|
|
32512
32516
|
},
|
|
32513
32517
|
__self: undefined,
|
|
32514
32518
|
__source: {
|
|
@@ -32537,50 +32541,53 @@ const Navigation = props => {
|
|
|
32537
32541
|
}
|
|
32538
32542
|
return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
|
|
32539
32543
|
condition: !isMobile,
|
|
32540
|
-
wrapper: child =>
|
|
32541
|
-
|
|
32542
|
-
|
|
32543
|
-
|
|
32544
|
-
|
|
32545
|
-
|
|
32546
|
-
|
|
32547
|
-
|
|
32548
|
-
|
|
32549
|
-
|
|
32550
|
-
|
|
32551
|
-
|
|
32552
|
-
|
|
32553
|
-
|
|
32554
|
-
|
|
32555
|
-
|
|
32556
|
-
|
|
32557
|
-
|
|
32558
|
-
|
|
32559
|
-
|
|
32560
|
-
|
|
32561
|
-
|
|
32562
|
-
|
|
32563
|
-
|
|
32564
|
-
|
|
32565
|
-
|
|
32566
|
-
|
|
32567
|
-
|
|
32568
|
-
|
|
32569
|
-
|
|
32570
|
-
|
|
32571
|
-
|
|
32572
|
-
|
|
32573
|
-
|
|
32574
|
-
|
|
32575
|
-
|
|
32576
|
-
|
|
32577
|
-
|
|
32578
|
-
|
|
32579
|
-
|
|
32580
|
-
|
|
32581
|
-
|
|
32582
|
-
|
|
32583
|
-
|
|
32544
|
+
wrapper: child => {
|
|
32545
|
+
var _props$appendContent;
|
|
32546
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
32547
|
+
css: {
|
|
32548
|
+
opacity: isHide ? 0 : undefined,
|
|
32549
|
+
maxWidth: 311
|
|
32550
|
+
},
|
|
32551
|
+
__self: undefined,
|
|
32552
|
+
__source: {
|
|
32553
|
+
fileName: _jsxFileName$4,
|
|
32554
|
+
lineNumber: 281,
|
|
32555
|
+
columnNumber: 9
|
|
32556
|
+
}
|
|
32557
|
+
}, /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
32558
|
+
css: {
|
|
32559
|
+
position: !isMobile && 'sticky',
|
|
32560
|
+
top: !isMobile ? 44 : 40
|
|
32561
|
+
},
|
|
32562
|
+
direction: "column",
|
|
32563
|
+
gap: 7,
|
|
32564
|
+
__self: undefined,
|
|
32565
|
+
__source: {
|
|
32566
|
+
fileName: _jsxFileName$4,
|
|
32567
|
+
lineNumber: 282,
|
|
32568
|
+
columnNumber: 11
|
|
32569
|
+
}
|
|
32570
|
+
}, /*#__PURE__*/React__default.createElement(Card, {
|
|
32571
|
+
css: {
|
|
32572
|
+
height: 'fit-content',
|
|
32573
|
+
padding: 0
|
|
32574
|
+
},
|
|
32575
|
+
showBottomLine: false,
|
|
32576
|
+
__self: undefined,
|
|
32577
|
+
__source: {
|
|
32578
|
+
fileName: _jsxFileName$4,
|
|
32579
|
+
lineNumber: 283,
|
|
32580
|
+
columnNumber: 13
|
|
32581
|
+
}
|
|
32582
|
+
}, child), /*#__PURE__*/React__default.createElement(Box, {
|
|
32583
|
+
__self: undefined,
|
|
32584
|
+
__source: {
|
|
32585
|
+
fileName: _jsxFileName$4,
|
|
32586
|
+
lineNumber: 292,
|
|
32587
|
+
columnNumber: 13
|
|
32588
|
+
}
|
|
32589
|
+
}, 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)));
|
|
32590
|
+
},
|
|
32584
32591
|
__self: undefined,
|
|
32585
32592
|
__source: {
|
|
32586
32593
|
fileName: _jsxFileName$4,
|
|
@@ -32645,7 +32652,8 @@ const Default = props => {
|
|
|
32645
32652
|
}));
|
|
32646
32653
|
}, [props.hide]);
|
|
32647
32654
|
useEffect(() => {
|
|
32648
|
-
|
|
32655
|
+
var _props$onChangeVisibi;
|
|
32656
|
+
props === null || props === void 0 || (_props$onChangeVisibi = props.onChangeVisibility) === null || _props$onChangeVisibi === void 0 || _props$onChangeVisibi.call(props, state.hide);
|
|
32649
32657
|
}, [state.hide]);
|
|
32650
32658
|
const toogleVisibility = value => {
|
|
32651
32659
|
updateState(prev => Object.assign({}, prev, {
|
|
@@ -32654,11 +32662,11 @@ const Default = props => {
|
|
|
32654
32662
|
};
|
|
32655
32663
|
const getIsComplete = currentStep => {
|
|
32656
32664
|
var _state$isComplete;
|
|
32657
|
-
return state
|
|
32665
|
+
return state === null || state === void 0 || (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
|
|
32658
32666
|
};
|
|
32659
32667
|
const getTitleStep = currentStep => {
|
|
32660
32668
|
var _props$navContents;
|
|
32661
|
-
return props
|
|
32669
|
+
return props === null || props === void 0 || (_props$navContents = props.navContents) === null || _props$navContents === void 0 || (_props$navContents = _props$navContents[currentStep - 1]) === null || _props$navContents === void 0 ? void 0 : _props$navContents.title;
|
|
32662
32670
|
};
|
|
32663
32671
|
const setState = value => {
|
|
32664
32672
|
updateState(Object.assign({}, state, value));
|
|
@@ -32692,13 +32700,13 @@ const Default = props => {
|
|
|
32692
32700
|
block: 'start'
|
|
32693
32701
|
});
|
|
32694
32702
|
props.onStepChange && props.onStepChange(e);
|
|
32695
|
-
if (props
|
|
32696
|
-
if ((e
|
|
32703
|
+
if (props !== null && props !== void 0 && (_props$navContents2 = props.navContents) !== null && _props$navContents2 !== void 0 && (_props$navContents2 = _props$navContents2[(e === null || e === void 0 ? void 0 : e.activeStep) - 1]) !== null && _props$navContents2 !== void 0 && _props$navContents2.disabled) {
|
|
32704
|
+
if ((e === null || e === void 0 ? void 0 : e.activeStep) > (e === null || e === void 0 ? void 0 : e.previousStep)) {
|
|
32697
32705
|
var _state$SW;
|
|
32698
|
-
state
|
|
32706
|
+
state === null || state === void 0 || (_state$SW = state.SW) === null || _state$SW === void 0 || _state$SW.nextStep();
|
|
32699
32707
|
} else {
|
|
32700
32708
|
var _state$SW2;
|
|
32701
|
-
state
|
|
32709
|
+
state === null || state === void 0 || (_state$SW2 = state.SW) === null || _state$SW2 === void 0 || _state$SW2.previousStep();
|
|
32702
32710
|
}
|
|
32703
32711
|
}
|
|
32704
32712
|
};
|
|
@@ -32713,11 +32721,11 @@ const Default = props => {
|
|
|
32713
32721
|
}, /*#__PURE__*/React__default.createElement(StepWizardContext.Provider, {
|
|
32714
32722
|
value: {
|
|
32715
32723
|
toogleVisibility,
|
|
32716
|
-
isHide: state
|
|
32724
|
+
isHide: state === null || state === void 0 ? void 0 : state.hide,
|
|
32717
32725
|
setComplete,
|
|
32718
32726
|
setState,
|
|
32719
32727
|
state,
|
|
32720
|
-
SW: state
|
|
32728
|
+
SW: state === null || state === void 0 ? void 0 : state.SW,
|
|
32721
32729
|
forbidClickNav: props.forbidClickNav,
|
|
32722
32730
|
titles: props.titles,
|
|
32723
32731
|
isMobile: props.isMobile,
|
|
@@ -32740,7 +32748,7 @@ const Default = props => {
|
|
|
32740
32748
|
nav: /*#__PURE__*/React__default.createElement(Navigation, {
|
|
32741
32749
|
onNavClicked: props.onNavClicked,
|
|
32742
32750
|
isComplete: state.isComplete,
|
|
32743
|
-
appendContent: props
|
|
32751
|
+
appendContent: props === null || props === void 0 ? void 0 : props.appendContent,
|
|
32744
32752
|
__self: undefined,
|
|
32745
32753
|
__source: {
|
|
32746
32754
|
fileName: _jsxFileName$4,
|
|
@@ -32750,7 +32758,7 @@ const Default = props => {
|
|
|
32750
32758
|
}),
|
|
32751
32759
|
initialStep: props.initialStep,
|
|
32752
32760
|
onStepChange: handleStepChange,
|
|
32753
|
-
isLazyMount: props
|
|
32761
|
+
isLazyMount: props === null || props === void 0 ? void 0 : props.isLazyMount,
|
|
32754
32762
|
__self: undefined,
|
|
32755
32763
|
__source: {
|
|
32756
32764
|
fileName: _jsxFileName$4,
|
|
@@ -32897,9 +32905,9 @@ function Content({
|
|
|
32897
32905
|
var _getDatasets;
|
|
32898
32906
|
function getDatasets(content, activeId, isCollapse) {
|
|
32899
32907
|
const datasets = [];
|
|
32900
|
-
for (let i = 0; i < (content
|
|
32908
|
+
for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
|
|
32901
32909
|
var _content$i;
|
|
32902
|
-
if (((_content$i = content[i])
|
|
32910
|
+
if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
|
|
32903
32911
|
datasets.unshift(content[i]);
|
|
32904
32912
|
} else {
|
|
32905
32913
|
datasets.push(content[i]);
|
|
@@ -32937,7 +32945,7 @@ function Content({
|
|
|
32937
32945
|
lineNumber: 107,
|
|
32938
32946
|
columnNumber: 7
|
|
32939
32947
|
}
|
|
32940
|
-
}, (_getDatasets = getDatasets(content, activeId, isCollapse))
|
|
32948
|
+
}, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
|
|
32941
32949
|
return /*#__PURE__*/React__default.createElement(List, {
|
|
32942
32950
|
key: index,
|
|
32943
32951
|
__self: this,
|
|
@@ -32954,11 +32962,11 @@ function Content({
|
|
|
32954
32962
|
marginLeft: '-4px !important',
|
|
32955
32963
|
borderLeftWidth: '4px !important',
|
|
32956
32964
|
borderLeftStyle: 'solid !important',
|
|
32957
|
-
borderLeftColor: `${(item
|
|
32965
|
+
borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$8.primary500 : 'transparent'} !important`,
|
|
32958
32966
|
paddingLeft: '16px !important',
|
|
32959
32967
|
minHeight: 25
|
|
32960
32968
|
},
|
|
32961
|
-
"data-to-scrollspy-id": item
|
|
32969
|
+
"data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
|
|
32962
32970
|
__self: this,
|
|
32963
32971
|
__source: {
|
|
32964
32972
|
fileName: _jsxFileName$2,
|
|
@@ -32967,13 +32975,13 @@ function Content({
|
|
|
32967
32975
|
}
|
|
32968
32976
|
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
32969
32977
|
className: "link-title",
|
|
32970
|
-
active: (item
|
|
32971
|
-
href: `#${item
|
|
32978
|
+
active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
|
|
32979
|
+
href: `#${item === null || item === void 0 ? void 0 : item.id}`,
|
|
32972
32980
|
onClick: e => {
|
|
32973
32981
|
var _e$currentTarget, _e$currentTarget2;
|
|
32974
32982
|
e.preventDefault();
|
|
32975
|
-
onNavClick
|
|
32976
|
-
const target = window.document.getElementById(e
|
|
32983
|
+
onNavClick === null || onNavClick === void 0 || onNavClick(e === null || e === void 0 || (_e$currentTarget = e.currentTarget) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.href) === null || _e$currentTarget === void 0 || (_e$currentTarget = _e$currentTarget.split('#')) === null || _e$currentTarget === void 0 ? void 0 : _e$currentTarget[1]);
|
|
32984
|
+
const target = window.document.getElementById(e === null || e === void 0 || (_e$currentTarget2 = e.currentTarget) === null || _e$currentTarget2 === void 0 || (_e$currentTarget2 = _e$currentTarget2.href) === null || _e$currentTarget2 === void 0 || (_e$currentTarget2 = _e$currentTarget2.split('#')) === null || _e$currentTarget2 === void 0 ? void 0 : _e$currentTarget2[1]);
|
|
32977
32985
|
if (target) {
|
|
32978
32986
|
var headerOffset = 20;
|
|
32979
32987
|
var elementPosition = target.getBoundingClientRect().top;
|
|
@@ -32997,7 +33005,7 @@ function Content({
|
|
|
32997
33005
|
lineNumber: 125,
|
|
32998
33006
|
columnNumber: 17
|
|
32999
33007
|
}
|
|
33000
|
-
}, item
|
|
33008
|
+
}, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
|
|
33001
33009
|
})));
|
|
33002
33010
|
}
|
|
33003
33011
|
function TableOfContent({
|