@majoo-ui/react 1.49.3 → 1.50.0
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/InputCounter/InputCounter.d.ts +34 -0
- package/components/form/components/InputCounter/index.d.ts +2 -0
- package/components/form/components/index.d.ts +1 -0
- package/components/stepWizard/index.d.ts +2 -0
- package/index.esm.js +407 -237
- package/index.umd.js +408 -235
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -3645,7 +3645,7 @@
|
|
|
3645
3645
|
onClick: e => {
|
|
3646
3646
|
e.preventDefault();
|
|
3647
3647
|
e.stopPropagation();
|
|
3648
|
-
value
|
|
3648
|
+
value === null || value === void 0 ? void 0 : value.onRemove();
|
|
3649
3649
|
},
|
|
3650
3650
|
__self: undefined,
|
|
3651
3651
|
__source: {
|
|
@@ -3722,7 +3722,7 @@
|
|
|
3722
3722
|
onClick: e => {
|
|
3723
3723
|
e.preventDefault();
|
|
3724
3724
|
e.stopPropagation();
|
|
3725
|
-
props
|
|
3725
|
+
props === null || props === void 0 ? void 0 : props.onRemove();
|
|
3726
3726
|
},
|
|
3727
3727
|
closeCenter: !props.title && !props.link,
|
|
3728
3728
|
__self: undefined,
|
|
@@ -4079,7 +4079,7 @@
|
|
|
4079
4079
|
}
|
|
4080
4080
|
}
|
|
4081
4081
|
});
|
|
4082
|
-
var Button$
|
|
4082
|
+
var Button$3 = /*#__PURE__*/React__namespace.forwardRef(function (_a, forwardedRef) {
|
|
4083
4083
|
var children = _a.children,
|
|
4084
4084
|
type = _a.type,
|
|
4085
4085
|
_b = _a.buttonType,
|
|
@@ -5716,7 +5716,7 @@
|
|
|
5716
5716
|
const [isChecked, setChecked] = React.useState(false);
|
|
5717
5717
|
React.useEffect(() => {
|
|
5718
5718
|
const checkValue = context && context.checkedItems.includes(value) || checked || indeterminate;
|
|
5719
|
-
setChecked(checkValue
|
|
5719
|
+
setChecked(checkValue !== null && checkValue !== void 0 ? checkValue : false);
|
|
5720
5720
|
}, [checked, indeterminate, context]);
|
|
5721
5721
|
return /*#__PURE__*/React__default["default"].createElement(StyledCheckbox, _extends({
|
|
5722
5722
|
id: id,
|
|
@@ -6314,7 +6314,7 @@
|
|
|
6314
6314
|
var _jsxFileName$E = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputRadio\\InputRadioGroup.js";
|
|
6315
6315
|
const RadioGroup = styled(RadioGroupPrimitive__namespace.Root, Flex$1);
|
|
6316
6316
|
function InputRadioGroup(props) {
|
|
6317
|
-
return (props
|
|
6317
|
+
return (props === null || props === void 0 ? void 0 : props.children) && /*#__PURE__*/React__default["default"].createElement(InputRadioContext.Provider, {
|
|
6318
6318
|
value: props,
|
|
6319
6319
|
__self: this,
|
|
6320
6320
|
__source: {
|
|
@@ -6329,7 +6329,7 @@
|
|
|
6329
6329
|
lineNumber: 14,
|
|
6330
6330
|
columnNumber: 9
|
|
6331
6331
|
}
|
|
6332
|
-
}), React__default["default"].Children.map(props
|
|
6332
|
+
}), React__default["default"].Children.map(props === null || props === void 0 ? void 0 : props.children, child => /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
6333
6333
|
style: Object.assign({}, child.props.style, {
|
|
6334
6334
|
opacity: 1
|
|
6335
6335
|
})
|
|
@@ -6520,7 +6520,7 @@
|
|
|
6520
6520
|
value,
|
|
6521
6521
|
outlined
|
|
6522
6522
|
}) => {
|
|
6523
|
-
const checked = value
|
|
6523
|
+
const checked = value !== null && value !== void 0 ? value : defaultValue;
|
|
6524
6524
|
return /*#__PURE__*/React__default["default"].createElement(Container$7, {
|
|
6525
6525
|
align: "center",
|
|
6526
6526
|
gap: 4,
|
|
@@ -7422,7 +7422,7 @@
|
|
|
7422
7422
|
readOnly: false
|
|
7423
7423
|
};
|
|
7424
7424
|
|
|
7425
|
-
const _excluded$f = ["size", "isInvalid", "placeholder", "onChange", "onInputChange", "value", "disabled", "readOnly", "max", "maxChar", "pattern", "helperText"];
|
|
7425
|
+
const _excluded$f = ["size", "isInvalid", "placeholder", "onChange", "onEnter", "onInputChange", "value", "disabled", "readOnly", "max", "maxChar", "pattern", "helperText"];
|
|
7426
7426
|
var _jsxFileName$A = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputTags\\InputTags.js";
|
|
7427
7427
|
const Wrapper$2 = styled('div', {
|
|
7428
7428
|
margin: 0,
|
|
@@ -7496,7 +7496,7 @@
|
|
|
7496
7496
|
}
|
|
7497
7497
|
}
|
|
7498
7498
|
});
|
|
7499
|
-
const Input$
|
|
7499
|
+
const Input$8 = styled('input', {
|
|
7500
7500
|
display: 'flex',
|
|
7501
7501
|
position: 'relative',
|
|
7502
7502
|
flex: 'auto',
|
|
@@ -7533,6 +7533,7 @@
|
|
|
7533
7533
|
isInvalid,
|
|
7534
7534
|
placeholder,
|
|
7535
7535
|
onChange,
|
|
7536
|
+
onEnter,
|
|
7536
7537
|
onInputChange,
|
|
7537
7538
|
value,
|
|
7538
7539
|
disabled,
|
|
@@ -7556,19 +7557,31 @@
|
|
|
7556
7557
|
const addTags = event => {
|
|
7557
7558
|
if (event.key === 'Enter' && event.target.value !== '' && max !== tags.length) {
|
|
7558
7559
|
if (tags.find(tag => tag.toLowerCase() === event.target.value.toLowerCase())) {
|
|
7560
|
+
onEnter === null || onEnter === void 0 ? void 0 : onEnter({
|
|
7561
|
+
key: 'duplicate',
|
|
7562
|
+
value: event.target.value
|
|
7563
|
+
});
|
|
7559
7564
|
return;
|
|
7560
7565
|
}
|
|
7561
7566
|
|
|
7562
|
-
if (pattern && pattern
|
|
7567
|
+
if (pattern && pattern !== null && pattern !== void 0 && pattern.regex) {
|
|
7563
7568
|
const regex = new RegExp(pattern.regex);
|
|
7564
7569
|
|
|
7565
7570
|
if (!regex.test(event.target.value)) {
|
|
7571
|
+
onEnter === null || onEnter === void 0 ? void 0 : onEnter({
|
|
7572
|
+
key: 'error',
|
|
7573
|
+
value: event.target.value
|
|
7574
|
+
});
|
|
7566
7575
|
setRegexError(true);
|
|
7567
7576
|
return;
|
|
7568
7577
|
}
|
|
7569
7578
|
}
|
|
7570
7579
|
|
|
7571
7580
|
setRegexError(false);
|
|
7581
|
+
onEnter === null || onEnter === void 0 ? void 0 : onEnter({
|
|
7582
|
+
key: 'success',
|
|
7583
|
+
value: event.target.value
|
|
7584
|
+
});
|
|
7572
7585
|
setTags([...tags, event.target.value]);
|
|
7573
7586
|
event.target.value = '';
|
|
7574
7587
|
}
|
|
@@ -7594,7 +7607,7 @@
|
|
|
7594
7607
|
__self: this,
|
|
7595
7608
|
__source: {
|
|
7596
7609
|
fileName: _jsxFileName$A,
|
|
7597
|
-
lineNumber:
|
|
7610
|
+
lineNumber: 168,
|
|
7598
7611
|
columnNumber: 5
|
|
7599
7612
|
}
|
|
7600
7613
|
}, /*#__PURE__*/React__default["default"].createElement(InputTagsComponent, _extends({
|
|
@@ -7607,10 +7620,10 @@
|
|
|
7607
7620
|
__self: this,
|
|
7608
7621
|
__source: {
|
|
7609
7622
|
fileName: _jsxFileName$A,
|
|
7610
|
-
lineNumber:
|
|
7623
|
+
lineNumber: 169,
|
|
7611
7624
|
columnNumber: 7
|
|
7612
7625
|
}
|
|
7613
|
-
}), /*#__PURE__*/React__default["default"].createElement(Input$
|
|
7626
|
+
}), /*#__PURE__*/React__default["default"].createElement(Input$8, {
|
|
7614
7627
|
type: "text",
|
|
7615
7628
|
onKeyUp: event => addTags(event) // onKeyDown={event => removeTags(tags.length - 1, event.key)}
|
|
7616
7629
|
,
|
|
@@ -7622,15 +7635,15 @@
|
|
|
7622
7635
|
__self: this,
|
|
7623
7636
|
__source: {
|
|
7624
7637
|
fileName: _jsxFileName$A,
|
|
7625
|
-
lineNumber:
|
|
7638
|
+
lineNumber: 177,
|
|
7626
7639
|
columnNumber: 9
|
|
7627
7640
|
}
|
|
7628
|
-
})), regexError && pattern && (pattern
|
|
7641
|
+
})), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default["default"].createElement(FormHelper, {
|
|
7629
7642
|
color: "red",
|
|
7630
7643
|
__self: this,
|
|
7631
7644
|
__source: {
|
|
7632
7645
|
fileName: _jsxFileName$A,
|
|
7633
|
-
lineNumber:
|
|
7646
|
+
lineNumber: 191,
|
|
7634
7647
|
columnNumber: 11
|
|
7635
7648
|
}
|
|
7636
7649
|
}, pattern.errorMessage) : /*#__PURE__*/React__default["default"].createElement(FormHelper, {
|
|
@@ -7638,7 +7651,7 @@
|
|
|
7638
7651
|
__self: this,
|
|
7639
7652
|
__source: {
|
|
7640
7653
|
fileName: _jsxFileName$A,
|
|
7641
|
-
lineNumber:
|
|
7654
|
+
lineNumber: 193,
|
|
7642
7655
|
columnNumber: 11
|
|
7643
7656
|
}
|
|
7644
7657
|
}, "Invalid Input")), helperText && /*#__PURE__*/React__default["default"].createElement(Paragraph, {
|
|
@@ -7652,14 +7665,14 @@
|
|
|
7652
7665
|
__self: this,
|
|
7653
7666
|
__source: {
|
|
7654
7667
|
fileName: _jsxFileName$A,
|
|
7655
|
-
lineNumber:
|
|
7668
|
+
lineNumber: 197,
|
|
7656
7669
|
columnNumber: 9
|
|
7657
7670
|
}
|
|
7658
7671
|
}, helperText), /*#__PURE__*/React__default["default"].createElement(TagWrapper$2, {
|
|
7659
7672
|
__self: this,
|
|
7660
7673
|
__source: {
|
|
7661
7674
|
fileName: _jsxFileName$A,
|
|
7662
|
-
lineNumber:
|
|
7675
|
+
lineNumber: 201,
|
|
7663
7676
|
columnNumber: 7
|
|
7664
7677
|
}
|
|
7665
7678
|
}, tags.map((tag, index) => /*#__PURE__*/React__default["default"].createElement(Tag, {
|
|
@@ -7672,7 +7685,7 @@
|
|
|
7672
7685
|
__self: this,
|
|
7673
7686
|
__source: {
|
|
7674
7687
|
fileName: _jsxFileName$A,
|
|
7675
|
-
lineNumber:
|
|
7688
|
+
lineNumber: 203,
|
|
7676
7689
|
columnNumber: 11
|
|
7677
7690
|
}
|
|
7678
7691
|
}, tag))));
|
|
@@ -7682,6 +7695,7 @@
|
|
|
7682
7695
|
size: PropTypes__default["default"].string,
|
|
7683
7696
|
value: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
|
7684
7697
|
onChange: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
|
7698
|
+
onEnter: PropTypes__default["default"].func,
|
|
7685
7699
|
onInputChange: PropTypes__default["default"].func,
|
|
7686
7700
|
max: PropTypes__default["default"].number,
|
|
7687
7701
|
maxChar: PropTypes__default["default"].number,
|
|
@@ -8248,7 +8262,7 @@
|
|
|
8248
8262
|
}
|
|
8249
8263
|
}
|
|
8250
8264
|
});
|
|
8251
|
-
var Button$
|
|
8265
|
+
var Button$2 = styled('button', {
|
|
8252
8266
|
display: 'flex',
|
|
8253
8267
|
width: '100%',
|
|
8254
8268
|
height: '100%',
|
|
@@ -8280,7 +8294,7 @@
|
|
|
8280
8294
|
}
|
|
8281
8295
|
}
|
|
8282
8296
|
});
|
|
8283
|
-
var Input$
|
|
8297
|
+
var Input$7 = styled('input', {
|
|
8284
8298
|
marginLeft: '$spacing-05',
|
|
8285
8299
|
display: 'flex',
|
|
8286
8300
|
width: '100%',
|
|
@@ -8412,7 +8426,7 @@
|
|
|
8412
8426
|
width: '$spacing-05',
|
|
8413
8427
|
padding: 0
|
|
8414
8428
|
} : undefined
|
|
8415
|
-
}, void 0), jsxRuntime.jsx(Input$
|
|
8429
|
+
}, void 0), jsxRuntime.jsx(Input$7, __assign({}, inputProps, props, {
|
|
8416
8430
|
placeholder: placeholder,
|
|
8417
8431
|
readOnly: readOnly,
|
|
8418
8432
|
isReadOnly: readOnly,
|
|
@@ -8669,7 +8683,7 @@
|
|
|
8669
8683
|
disabled: disabled || readOnly
|
|
8670
8684
|
}).onClick : undefined
|
|
8671
8685
|
}, void 0)
|
|
8672
|
-
}), void 0) : jsxRuntime.jsx(Button$
|
|
8686
|
+
}), void 0) : jsxRuntime.jsx(Button$2, __assign({}, getToggleButtonProps({
|
|
8673
8687
|
disabled: disabled || readOnly
|
|
8674
8688
|
}), {
|
|
8675
8689
|
disabled: disabled,
|
|
@@ -9241,7 +9255,7 @@
|
|
|
9241
9255
|
}
|
|
9242
9256
|
}
|
|
9243
9257
|
});
|
|
9244
|
-
const Input$
|
|
9258
|
+
const Input$6 = styled('input', {
|
|
9245
9259
|
width: '100%',
|
|
9246
9260
|
textAlign: 'left',
|
|
9247
9261
|
background: 'unset',
|
|
@@ -9252,7 +9266,7 @@
|
|
|
9252
9266
|
cursor: 'not-allowed'
|
|
9253
9267
|
}
|
|
9254
9268
|
});
|
|
9255
|
-
const Button = styled('button', {
|
|
9269
|
+
const Button$1 = styled('button', {
|
|
9256
9270
|
background: 'none',
|
|
9257
9271
|
outline: 'none',
|
|
9258
9272
|
border: 'none',
|
|
@@ -9376,12 +9390,15 @@
|
|
|
9376
9390
|
} = _ref,
|
|
9377
9391
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
9378
9392
|
|
|
9379
|
-
const [initItem, setInitItem] =
|
|
9393
|
+
const [initItem, setInitItem] = React__default["default"].useState(option); //init filter selectedItems on useMultipleSelection
|
|
9380
9394
|
|
|
9381
|
-
const [item, setItem] =
|
|
9382
|
-
const [selectedValue, setSelectedValue] =
|
|
9383
|
-
const [inputValue, setInputValue] =
|
|
9384
|
-
|
|
9395
|
+
const [item, setItem] = React__default["default"].useState([]);
|
|
9396
|
+
const [selectedValue, setSelectedValue] = React__default["default"].useState([]);
|
|
9397
|
+
const [inputValue, setInputValue] = React__default["default"].useState('');
|
|
9398
|
+
React.useEffect(() => {
|
|
9399
|
+
setItem(option);
|
|
9400
|
+
}, [option]);
|
|
9401
|
+
const sortItem = React__default["default"].useCallback(() => {
|
|
9385
9402
|
if (sortBy === 'id') {
|
|
9386
9403
|
option.sort(function (a, b) {
|
|
9387
9404
|
const idA = a.id.toUpperCase(); // ignore upper and lowercase
|
|
@@ -9438,27 +9455,24 @@
|
|
|
9438
9455
|
return [...res, ...filterOption]; // add the missing elements
|
|
9439
9456
|
}
|
|
9440
9457
|
}, []) : option;
|
|
9441
|
-
|
|
9458
|
+
React__default["default"].useEffect(() => {
|
|
9442
9459
|
if (selectedValue.length > 0 && disabledOptions.length === 0) {
|
|
9443
9460
|
setInitItem(sortValue);
|
|
9444
9461
|
setItem(sortValue);
|
|
9445
9462
|
}
|
|
9446
9463
|
}, []);
|
|
9447
|
-
|
|
9464
|
+
React__default["default"].useEffect(() => {
|
|
9448
9465
|
sortItem();
|
|
9449
9466
|
}, [sortBy]);
|
|
9450
|
-
|
|
9467
|
+
React__default["default"].useEffect(() => {
|
|
9451
9468
|
if (disabledOptions.length > 0) {
|
|
9452
9469
|
setInitItem(generateOptions(sortDisabled));
|
|
9453
9470
|
setItem(generateOptions(sortDisabled)); // setItem(generateOptions(option));
|
|
9454
9471
|
}
|
|
9455
9472
|
}, [disabledOptions]);
|
|
9456
|
-
|
|
9473
|
+
React__default["default"].useEffect(() => {
|
|
9457
9474
|
setSelectedValue(value);
|
|
9458
9475
|
}, [value]);
|
|
9459
|
-
React__namespace.useEffect(() => {
|
|
9460
|
-
onChange && onChange(selectedValue);
|
|
9461
|
-
}, [selectedValue]);
|
|
9462
9476
|
const {
|
|
9463
9477
|
getSelectedItemProps,
|
|
9464
9478
|
getDropdownProps,
|
|
@@ -9509,6 +9523,7 @@
|
|
|
9509
9523
|
let filterItems = selectedValue.filter(item => item !== selected.id);
|
|
9510
9524
|
removeSelectedItem(selected);
|
|
9511
9525
|
setSelectedValue(filterItems);
|
|
9526
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(filterItems);
|
|
9512
9527
|
}
|
|
9513
9528
|
};
|
|
9514
9529
|
|
|
@@ -9553,6 +9568,7 @@
|
|
|
9553
9568
|
openMenu();
|
|
9554
9569
|
addSelectedItem(selectedItem);
|
|
9555
9570
|
setSelectedValue([...selectedValue, selectedItem.id]);
|
|
9571
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([...selectedValue, selectedItem.id]);
|
|
9556
9572
|
selectItem(null);
|
|
9557
9573
|
}
|
|
9558
9574
|
}
|
|
@@ -9563,26 +9579,26 @@
|
|
|
9563
9579
|
}
|
|
9564
9580
|
}
|
|
9565
9581
|
});
|
|
9566
|
-
return /*#__PURE__*/
|
|
9582
|
+
return /*#__PURE__*/React__default["default"].createElement(Wrapper$1, _extends({
|
|
9567
9583
|
css: css
|
|
9568
9584
|
}, props, {
|
|
9569
9585
|
__self: this,
|
|
9570
9586
|
__source: {
|
|
9571
9587
|
fileName: _jsxFileName$u,
|
|
9572
|
-
lineNumber:
|
|
9588
|
+
lineNumber: 404,
|
|
9573
9589
|
columnNumber: 5
|
|
9574
9590
|
}
|
|
9575
|
-
}), /*#__PURE__*/
|
|
9591
|
+
}), /*#__PURE__*/React__default["default"].createElement(Select, {
|
|
9576
9592
|
size: size,
|
|
9577
9593
|
disabled: disabled || readOnly,
|
|
9578
9594
|
isInvalid: isInvalid,
|
|
9579
9595
|
__self: this,
|
|
9580
9596
|
__source: {
|
|
9581
9597
|
fileName: _jsxFileName$u,
|
|
9582
|
-
lineNumber:
|
|
9598
|
+
lineNumber: 405,
|
|
9583
9599
|
columnNumber: 7
|
|
9584
9600
|
}
|
|
9585
|
-
}, /*#__PURE__*/
|
|
9601
|
+
}, /*#__PURE__*/React__default["default"].createElement(InputWrapper$1, _extends({}, getComboboxProps(getDropdownProps({
|
|
9586
9602
|
preventKeyAction: isOpen,
|
|
9587
9603
|
disabled: disabled || readOnly
|
|
9588
9604
|
})), {
|
|
@@ -9590,10 +9606,10 @@
|
|
|
9590
9606
|
__self: this,
|
|
9591
9607
|
__source: {
|
|
9592
9608
|
fileName: _jsxFileName$u,
|
|
9593
|
-
lineNumber:
|
|
9609
|
+
lineNumber: 406,
|
|
9594
9610
|
columnNumber: 9
|
|
9595
9611
|
}
|
|
9596
|
-
}), search ? /*#__PURE__*/
|
|
9612
|
+
}), search ? /*#__PURE__*/React__default["default"].createElement(Input$6, _extends({}, getInputProps({
|
|
9597
9613
|
disabled: disabled || readOnly
|
|
9598
9614
|
}), {
|
|
9599
9615
|
placeholder: placeholder,
|
|
@@ -9601,10 +9617,10 @@
|
|
|
9601
9617
|
__self: this,
|
|
9602
9618
|
__source: {
|
|
9603
9619
|
fileName: _jsxFileName$u,
|
|
9604
|
-
lineNumber:
|
|
9620
|
+
lineNumber: 411,
|
|
9605
9621
|
columnNumber: 13
|
|
9606
9622
|
}
|
|
9607
|
-
})) : /*#__PURE__*/
|
|
9623
|
+
})) : /*#__PURE__*/React__default["default"].createElement(Button$1, _extends({}, getToggleButtonProps({
|
|
9608
9624
|
disabled: disabled || readOnly
|
|
9609
9625
|
}), {
|
|
9610
9626
|
disabled: disabled || readOnly,
|
|
@@ -9613,10 +9629,10 @@
|
|
|
9613
9629
|
__self: this,
|
|
9614
9630
|
__source: {
|
|
9615
9631
|
fileName: _jsxFileName$u,
|
|
9616
|
-
lineNumber:
|
|
9632
|
+
lineNumber: 417,
|
|
9617
9633
|
columnNumber: 13
|
|
9618
9634
|
}
|
|
9619
|
-
}), placeholder)), /*#__PURE__*/
|
|
9635
|
+
}), placeholder)), /*#__PURE__*/React__default["default"].createElement(IconWrapper, _extends({}, getToggleButtonProps({
|
|
9620
9636
|
disabled: disabled || readOnly
|
|
9621
9637
|
}), {
|
|
9622
9638
|
disabled: disabled,
|
|
@@ -9624,18 +9640,18 @@
|
|
|
9624
9640
|
__self: this,
|
|
9625
9641
|
__source: {
|
|
9626
9642
|
fileName: _jsxFileName$u,
|
|
9627
|
-
lineNumber:
|
|
9643
|
+
lineNumber: 427,
|
|
9628
9644
|
columnNumber: 9
|
|
9629
9645
|
}
|
|
9630
|
-
}), /*#__PURE__*/
|
|
9646
|
+
}), /*#__PURE__*/React__default["default"].createElement(IconCaretDown, {
|
|
9631
9647
|
color: disabled || readOnly ? colors$4.iconDisable : colors$4.iconPrimary,
|
|
9632
9648
|
__self: this,
|
|
9633
9649
|
__source: {
|
|
9634
9650
|
fileName: _jsxFileName$u,
|
|
9635
|
-
lineNumber:
|
|
9651
|
+
lineNumber: 432,
|
|
9636
9652
|
columnNumber: 11
|
|
9637
9653
|
}
|
|
9638
|
-
}))), helperText && /*#__PURE__*/
|
|
9654
|
+
}))), helperText && /*#__PURE__*/React__default["default"].createElement(Paragraph, {
|
|
9639
9655
|
shortContentRegular: true,
|
|
9640
9656
|
css: {
|
|
9641
9657
|
paddingTop: 8,
|
|
@@ -9645,18 +9661,18 @@
|
|
|
9645
9661
|
__self: this,
|
|
9646
9662
|
__source: {
|
|
9647
9663
|
fileName: _jsxFileName$u,
|
|
9648
|
-
lineNumber:
|
|
9664
|
+
lineNumber: 436,
|
|
9649
9665
|
columnNumber: 9
|
|
9650
9666
|
}
|
|
9651
|
-
}, helperText), showSelectedTag && selectedItems.length !== 0 && /*#__PURE__*/
|
|
9667
|
+
}, helperText), showSelectedTag && selectedItems.length !== 0 && /*#__PURE__*/React__default["default"].createElement(TagWrapper$1, {
|
|
9652
9668
|
disabled: disabled,
|
|
9653
9669
|
__self: this,
|
|
9654
9670
|
__source: {
|
|
9655
9671
|
fileName: _jsxFileName$u,
|
|
9656
|
-
lineNumber:
|
|
9672
|
+
lineNumber: 441,
|
|
9657
9673
|
columnNumber: 9
|
|
9658
9674
|
}
|
|
9659
|
-
}, selectedItems.map((selectedItem, index) => /*#__PURE__*/
|
|
9675
|
+
}, selectedItems.map((selectedItem, index) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends({
|
|
9660
9676
|
isRemovable: readOnly || disabled ? false : true,
|
|
9661
9677
|
disabled: disabled,
|
|
9662
9678
|
size: "lg",
|
|
@@ -9677,10 +9693,10 @@
|
|
|
9677
9693
|
__self: this,
|
|
9678
9694
|
__source: {
|
|
9679
9695
|
fileName: _jsxFileName$u,
|
|
9680
|
-
lineNumber:
|
|
9696
|
+
lineNumber: 443,
|
|
9681
9697
|
columnNumber: 13
|
|
9682
9698
|
}
|
|
9683
|
-
}), selectedItem.name))), /*#__PURE__*/
|
|
9699
|
+
}), selectedItem.name))), /*#__PURE__*/React__default["default"].createElement(OptionWrapper$1, {
|
|
9684
9700
|
placement: placement,
|
|
9685
9701
|
css: {
|
|
9686
9702
|
display: isOpen && disabled === false ? 'block' : 'none',
|
|
@@ -9689,17 +9705,17 @@
|
|
|
9689
9705
|
__self: this,
|
|
9690
9706
|
__source: {
|
|
9691
9707
|
fileName: _jsxFileName$u,
|
|
9692
|
-
lineNumber:
|
|
9708
|
+
lineNumber: 464,
|
|
9693
9709
|
columnNumber: 7
|
|
9694
9710
|
}
|
|
9695
|
-
}, item.length !== 0 ? /*#__PURE__*/
|
|
9711
|
+
}, item.length !== 0 ? /*#__PURE__*/React__default["default"].createElement(Option, _extends({}, getMenuProps(), {
|
|
9696
9712
|
__self: this,
|
|
9697
9713
|
__source: {
|
|
9698
9714
|
fileName: _jsxFileName$u,
|
|
9699
|
-
lineNumber:
|
|
9715
|
+
lineNumber: 469,
|
|
9700
9716
|
columnNumber: 11
|
|
9701
9717
|
}
|
|
9702
|
-
}), isOpen && item.map((item, index) => /*#__PURE__*/
|
|
9718
|
+
}), isOpen && item.map((item, index) => /*#__PURE__*/React__default["default"].createElement(ItemWrapper$1, _extends({
|
|
9703
9719
|
key: item.id
|
|
9704
9720
|
}, getItemProps({
|
|
9705
9721
|
item,
|
|
@@ -9714,10 +9730,10 @@
|
|
|
9714
9730
|
__self: this,
|
|
9715
9731
|
__source: {
|
|
9716
9732
|
fileName: _jsxFileName$u,
|
|
9717
|
-
lineNumber:
|
|
9733
|
+
lineNumber: 472,
|
|
9718
9734
|
columnNumber: 17
|
|
9719
9735
|
}
|
|
9720
|
-
}), /*#__PURE__*/
|
|
9736
|
+
}), /*#__PURE__*/React__default["default"].createElement(IconWrapper, {
|
|
9721
9737
|
css: {
|
|
9722
9738
|
width: '16px',
|
|
9723
9739
|
height: '16px',
|
|
@@ -9727,36 +9743,36 @@
|
|
|
9727
9743
|
__self: this,
|
|
9728
9744
|
__source: {
|
|
9729
9745
|
fileName: _jsxFileName$u,
|
|
9730
|
-
lineNumber:
|
|
9746
|
+
lineNumber: 485,
|
|
9731
9747
|
columnNumber: 19
|
|
9732
9748
|
}
|
|
9733
|
-
}, item.isDisabled ? /*#__PURE__*/
|
|
9749
|
+
}, item.isDisabled ? /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
9734
9750
|
color: colors$4.iconDisable,
|
|
9735
9751
|
__self: this,
|
|
9736
9752
|
__source: {
|
|
9737
9753
|
fileName: _jsxFileName$u,
|
|
9738
|
-
lineNumber:
|
|
9754
|
+
lineNumber: 494,
|
|
9739
9755
|
columnNumber: 23
|
|
9740
9756
|
}
|
|
9741
|
-
}) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/
|
|
9757
|
+
}) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default["default"].createElement(CheckOutline, {
|
|
9742
9758
|
color: colors$4.iconGreen,
|
|
9743
9759
|
__self: this,
|
|
9744
9760
|
__source: {
|
|
9745
9761
|
fileName: _jsxFileName$u,
|
|
9746
|
-
lineNumber:
|
|
9762
|
+
lineNumber: 498,
|
|
9747
9763
|
columnNumber: 25
|
|
9748
9764
|
}
|
|
9749
|
-
})), /*#__PURE__*/
|
|
9765
|
+
})), /*#__PURE__*/React__default["default"].createElement(Item$2, {
|
|
9750
9766
|
css: {
|
|
9751
9767
|
backgroundColor: 'unset'
|
|
9752
9768
|
},
|
|
9753
9769
|
__self: this,
|
|
9754
9770
|
__source: {
|
|
9755
9771
|
fileName: _jsxFileName$u,
|
|
9756
|
-
lineNumber:
|
|
9772
|
+
lineNumber: 502,
|
|
9757
9773
|
columnNumber: 19
|
|
9758
9774
|
}
|
|
9759
|
-
}, item.name)))) : /*#__PURE__*/
|
|
9775
|
+
}, item.name)))) : /*#__PURE__*/React__default["default"].createElement(Option, _extends({
|
|
9760
9776
|
css: {
|
|
9761
9777
|
height: 'auto'
|
|
9762
9778
|
}
|
|
@@ -9764,27 +9780,27 @@
|
|
|
9764
9780
|
__self: this,
|
|
9765
9781
|
__source: {
|
|
9766
9782
|
fileName: _jsxFileName$u,
|
|
9767
|
-
lineNumber:
|
|
9783
|
+
lineNumber: 507,
|
|
9768
9784
|
columnNumber: 11
|
|
9769
9785
|
}
|
|
9770
|
-
}), /*#__PURE__*/
|
|
9786
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledDiv$1, {
|
|
9771
9787
|
__self: this,
|
|
9772
9788
|
__source: {
|
|
9773
9789
|
fileName: _jsxFileName$u,
|
|
9774
|
-
lineNumber:
|
|
9790
|
+
lineNumber: 508,
|
|
9775
9791
|
columnNumber: 13
|
|
9776
9792
|
}
|
|
9777
|
-
}, /*#__PURE__*/
|
|
9793
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
9778
9794
|
style: {
|
|
9779
9795
|
marginRight: '6px'
|
|
9780
9796
|
},
|
|
9781
9797
|
__self: this,
|
|
9782
9798
|
__source: {
|
|
9783
9799
|
fileName: _jsxFileName$u,
|
|
9784
|
-
lineNumber:
|
|
9800
|
+
lineNumber: 509,
|
|
9785
9801
|
columnNumber: 15
|
|
9786
9802
|
}
|
|
9787
|
-
}, /*#__PURE__*/
|
|
9803
|
+
}, /*#__PURE__*/React__default["default"].createElement(icons.CircleInfoOutline, {
|
|
9788
9804
|
size: "16px",
|
|
9789
9805
|
color: colors$4.iconDisable,
|
|
9790
9806
|
style: {
|
|
@@ -9793,7 +9809,7 @@
|
|
|
9793
9809
|
__self: this,
|
|
9794
9810
|
__source: {
|
|
9795
9811
|
fileName: _jsxFileName$u,
|
|
9796
|
-
lineNumber:
|
|
9812
|
+
lineNumber: 510,
|
|
9797
9813
|
columnNumber: 17
|
|
9798
9814
|
}
|
|
9799
9815
|
})), textEmptyItem))));
|
|
@@ -9948,7 +9964,7 @@
|
|
|
9948
9964
|
}
|
|
9949
9965
|
}
|
|
9950
9966
|
});
|
|
9951
|
-
const Input$
|
|
9967
|
+
const Input$5 = styled('input', {
|
|
9952
9968
|
display: 'flex',
|
|
9953
9969
|
position: 'relative',
|
|
9954
9970
|
flex: 'auto',
|
|
@@ -10060,7 +10076,7 @@
|
|
|
10060
10076
|
lineNumber: 168,
|
|
10061
10077
|
columnNumber: 7
|
|
10062
10078
|
}
|
|
10063
|
-
}, /*#__PURE__*/React__default["default"].createElement(Input$
|
|
10079
|
+
}, /*#__PURE__*/React__default["default"].createElement(Input$5, {
|
|
10064
10080
|
type: "text",
|
|
10065
10081
|
placeholder: placeholder,
|
|
10066
10082
|
disabled: disabled,
|
|
@@ -10467,6 +10483,222 @@
|
|
|
10467
10483
|
timeInterval: 1000
|
|
10468
10484
|
};
|
|
10469
10485
|
|
|
10486
|
+
// a string of all valid unicode whitespaces
|
|
10487
|
+
var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
10488
|
+
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
10489
|
+
|
|
10490
|
+
var uncurryThis$e = functionUncurryThis;
|
|
10491
|
+
var requireObjectCoercible$4 = requireObjectCoercible$a;
|
|
10492
|
+
var toString$9 = toString$h;
|
|
10493
|
+
var whitespaces$3 = whitespaces$4;
|
|
10494
|
+
|
|
10495
|
+
var replace$4 = uncurryThis$e(''.replace);
|
|
10496
|
+
var whitespace = '[' + whitespaces$3 + ']';
|
|
10497
|
+
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
10498
|
+
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
10499
|
+
|
|
10500
|
+
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
10501
|
+
var createMethod$1 = function (TYPE) {
|
|
10502
|
+
return function ($this) {
|
|
10503
|
+
var string = toString$9(requireObjectCoercible$4($this));
|
|
10504
|
+
if (TYPE & 1) string = replace$4(string, ltrim, '');
|
|
10505
|
+
if (TYPE & 2) string = replace$4(string, rtrim, '');
|
|
10506
|
+
return string;
|
|
10507
|
+
};
|
|
10508
|
+
};
|
|
10509
|
+
|
|
10510
|
+
var stringTrim = {
|
|
10511
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
10512
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
10513
|
+
start: createMethod$1(1),
|
|
10514
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
10515
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
10516
|
+
end: createMethod$1(2),
|
|
10517
|
+
// `String.prototype.trim` method
|
|
10518
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
10519
|
+
trim: createMethod$1(3)
|
|
10520
|
+
};
|
|
10521
|
+
|
|
10522
|
+
var global$k = global$U;
|
|
10523
|
+
var fails$8 = fails$t;
|
|
10524
|
+
var uncurryThis$d = functionUncurryThis;
|
|
10525
|
+
var toString$8 = toString$h;
|
|
10526
|
+
var trim$1 = stringTrim.trim;
|
|
10527
|
+
var whitespaces$2 = whitespaces$4;
|
|
10528
|
+
|
|
10529
|
+
var $parseInt$1 = global$k.parseInt;
|
|
10530
|
+
var Symbol$6 = global$k.Symbol;
|
|
10531
|
+
var ITERATOR$6 = Symbol$6 && Symbol$6.iterator;
|
|
10532
|
+
var hex = /^[+-]?0x/i;
|
|
10533
|
+
var exec$4 = uncurryThis$d(hex.exec);
|
|
10534
|
+
var FORCED$2 = $parseInt$1(whitespaces$2 + '08') !== 8 || $parseInt$1(whitespaces$2 + '0x16') !== 22
|
|
10535
|
+
// MS Edge 18- broken with boxed symbols
|
|
10536
|
+
|| (ITERATOR$6 && !fails$8(function () { $parseInt$1(Object(ITERATOR$6)); }));
|
|
10537
|
+
|
|
10538
|
+
// `parseInt` method
|
|
10539
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
10540
|
+
var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
|
|
10541
|
+
var S = trim$1(toString$8(string));
|
|
10542
|
+
return $parseInt$1(S, (radix >>> 0) || (exec$4(hex, S) ? 16 : 10));
|
|
10543
|
+
} : $parseInt$1;
|
|
10544
|
+
|
|
10545
|
+
var $$d = _export;
|
|
10546
|
+
var $parseInt = numberParseInt;
|
|
10547
|
+
|
|
10548
|
+
// `parseInt` method
|
|
10549
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
10550
|
+
$$d({ global: true, forced: parseInt != $parseInt }, {
|
|
10551
|
+
parseInt: $parseInt
|
|
10552
|
+
});
|
|
10553
|
+
|
|
10554
|
+
var Input$4 = styled(InputNumber, {
|
|
10555
|
+
border: "1px solid $gray150",
|
|
10556
|
+
borderLeft: 'none',
|
|
10557
|
+
borderRight: 'none',
|
|
10558
|
+
borderRadius: 0,
|
|
10559
|
+
textAlign: 'center',
|
|
10560
|
+
fontSize: 16,
|
|
10561
|
+
fontWeight: 600,
|
|
10562
|
+
color: '$textPrimary',
|
|
10563
|
+
userSelect: 'none',
|
|
10564
|
+
'&:disabled': {
|
|
10565
|
+
backgroundColor: '$btnDisable',
|
|
10566
|
+
border: "1px solid $gray150",
|
|
10567
|
+
'&:hover': {
|
|
10568
|
+
borderColor: '$gray150'
|
|
10569
|
+
}
|
|
10570
|
+
}
|
|
10571
|
+
});
|
|
10572
|
+
var Button = styled(Button$3, {
|
|
10573
|
+
border: "1px solid $gray150 !important",
|
|
10574
|
+
paddingRight: '16px !important',
|
|
10575
|
+
paddingLeft: '16px !important',
|
|
10576
|
+
'&:hover': {
|
|
10577
|
+
backgroundColor: '$primary50',
|
|
10578
|
+
border: '1px solid $btnPrimary !important'
|
|
10579
|
+
},
|
|
10580
|
+
'&:active': {
|
|
10581
|
+
backgroundColor: '$primary100',
|
|
10582
|
+
border: '1px solid $btnPrimary !important'
|
|
10583
|
+
},
|
|
10584
|
+
'&:focus': {
|
|
10585
|
+
outline: 0,
|
|
10586
|
+
backgroundColor: '$primary50',
|
|
10587
|
+
border: '1px solid $btnPrimary !important'
|
|
10588
|
+
},
|
|
10589
|
+
'&:disabled': {
|
|
10590
|
+
'&:hover': {
|
|
10591
|
+
borderColor: '$gray150 !important'
|
|
10592
|
+
}
|
|
10593
|
+
},
|
|
10594
|
+
variants: {
|
|
10595
|
+
counterType: {
|
|
10596
|
+
minus: {
|
|
10597
|
+
borderRight: 'none !important',
|
|
10598
|
+
borderTopRightRadius: '0px !important',
|
|
10599
|
+
borderBottomRightRadius: '0px !important',
|
|
10600
|
+
'&:disabled': {
|
|
10601
|
+
border: "1px solid $gray150 !important"
|
|
10602
|
+
}
|
|
10603
|
+
},
|
|
10604
|
+
plus: {
|
|
10605
|
+
borderLeft: 'none !important',
|
|
10606
|
+
borderTopLeftRadius: '0px !important',
|
|
10607
|
+
borderBottomLeftRadius: '0px !important',
|
|
10608
|
+
'&:disabled': {
|
|
10609
|
+
border: "1px solid $gray150 !important"
|
|
10610
|
+
}
|
|
10611
|
+
}
|
|
10612
|
+
}
|
|
10613
|
+
}
|
|
10614
|
+
});
|
|
10615
|
+
var InputCounter = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
10616
|
+
var _a;
|
|
10617
|
+
|
|
10618
|
+
var css = props.css,
|
|
10619
|
+
value = props.value,
|
|
10620
|
+
onChange = props.onChange,
|
|
10621
|
+
allowNegative = props.allowNegative,
|
|
10622
|
+
min = props.min,
|
|
10623
|
+
max = props.max,
|
|
10624
|
+
disabled = props.disabled;
|
|
10625
|
+
|
|
10626
|
+
var _b = React.useState((_a = min !== null && min !== void 0 ? min : value) !== null && _a !== void 0 ? _a : 0),
|
|
10627
|
+
inputValue = _b[0],
|
|
10628
|
+
setInputValue = _b[1];
|
|
10629
|
+
|
|
10630
|
+
React.useEffect(function () {
|
|
10631
|
+
if (min && inputValue < min) {
|
|
10632
|
+
setInputValue(min);
|
|
10633
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(min);
|
|
10634
|
+
}
|
|
10635
|
+
|
|
10636
|
+
if (max && inputValue > max) {
|
|
10637
|
+
setInputValue(max);
|
|
10638
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(max);
|
|
10639
|
+
}
|
|
10640
|
+
}, [inputValue, min, max, onChange]);
|
|
10641
|
+
|
|
10642
|
+
function handleUp() {
|
|
10643
|
+
if (!max || inputValue < max) {
|
|
10644
|
+
setInputValue(inputValue + 1);
|
|
10645
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(inputValue + 1);
|
|
10646
|
+
}
|
|
10647
|
+
}
|
|
10648
|
+
|
|
10649
|
+
function handleDown() {
|
|
10650
|
+
if (inputValue !== 0 || allowNegative) {
|
|
10651
|
+
if (!min || inputValue > min) {
|
|
10652
|
+
setInputValue(inputValue - 1);
|
|
10653
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(inputValue - 1);
|
|
10654
|
+
}
|
|
10655
|
+
}
|
|
10656
|
+
}
|
|
10657
|
+
|
|
10658
|
+
function handleChange(e) {
|
|
10659
|
+
setInputValue(parseInt(e.target.value));
|
|
10660
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(parseInt(e.target.value));
|
|
10661
|
+
}
|
|
10662
|
+
|
|
10663
|
+
return jsxRuntime.jsxs(Flex$1, __assign({
|
|
10664
|
+
direction: "row",
|
|
10665
|
+
align: "center",
|
|
10666
|
+
css: css
|
|
10667
|
+
}, {
|
|
10668
|
+
children: [jsxRuntime.jsx(Button, __assign({
|
|
10669
|
+
disabled: disabled,
|
|
10670
|
+
buttonType: "secondary",
|
|
10671
|
+
counterType: "minus",
|
|
10672
|
+
icon: true,
|
|
10673
|
+
onClick: handleDown
|
|
10674
|
+
}, {
|
|
10675
|
+
children: jsxRuntime.jsx(icons.MinusOutline, {
|
|
10676
|
+
color: disabled ? colors$4.iconDisable : colors$4.primary500
|
|
10677
|
+
}, void 0)
|
|
10678
|
+
}), void 0), jsxRuntime.jsx(Input$4, {
|
|
10679
|
+
ref: ref,
|
|
10680
|
+
disabled: disabled,
|
|
10681
|
+
value: inputValue,
|
|
10682
|
+
allowNegative: allowNegative,
|
|
10683
|
+
onChange: handleChange
|
|
10684
|
+
}, void 0), jsxRuntime.jsx(Button, __assign({
|
|
10685
|
+
disabled: disabled,
|
|
10686
|
+
buttonType: "secondary",
|
|
10687
|
+
counterType: "plus",
|
|
10688
|
+
icon: true,
|
|
10689
|
+
onClick: handleUp
|
|
10690
|
+
}, {
|
|
10691
|
+
children: jsxRuntime.jsx(icons.PlusOutline, {
|
|
10692
|
+
color: disabled ? colors$4.iconDisable : colors$4.primary500
|
|
10693
|
+
}, void 0)
|
|
10694
|
+
}), void 0)]
|
|
10695
|
+
}), void 0);
|
|
10696
|
+
});
|
|
10697
|
+
InputCounter.defaultProps = {
|
|
10698
|
+
allowNegative: false,
|
|
10699
|
+
disabled: false
|
|
10700
|
+
};
|
|
10701
|
+
|
|
10470
10702
|
const _excluded$b = ["children"];
|
|
10471
10703
|
var _jsxFileName$r = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\popover\\Popover.js";
|
|
10472
10704
|
const {
|
|
@@ -10558,8 +10790,8 @@
|
|
|
10558
10790
|
ref: floating,
|
|
10559
10791
|
style: Object.assign({
|
|
10560
10792
|
position: strategy,
|
|
10561
|
-
top: isMobile ? 0 : y
|
|
10562
|
-
left: isMobile ? 0 : x
|
|
10793
|
+
top: isMobile ? 0 : y !== null && y !== void 0 ? y : '',
|
|
10794
|
+
left: isMobile ? 0 : x !== null && x !== void 0 ? x : '',
|
|
10563
10795
|
zIndex: zIndices.popover
|
|
10564
10796
|
}, style)
|
|
10565
10797
|
}), {
|
|
@@ -11384,74 +11616,6 @@
|
|
|
11384
11616
|
isToggle: true
|
|
11385
11617
|
};
|
|
11386
11618
|
|
|
11387
|
-
// a string of all valid unicode whitespaces
|
|
11388
|
-
var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
11389
|
-
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
11390
|
-
|
|
11391
|
-
var uncurryThis$e = functionUncurryThis;
|
|
11392
|
-
var requireObjectCoercible$4 = requireObjectCoercible$a;
|
|
11393
|
-
var toString$9 = toString$h;
|
|
11394
|
-
var whitespaces$3 = whitespaces$4;
|
|
11395
|
-
|
|
11396
|
-
var replace$4 = uncurryThis$e(''.replace);
|
|
11397
|
-
var whitespace = '[' + whitespaces$3 + ']';
|
|
11398
|
-
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
11399
|
-
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
11400
|
-
|
|
11401
|
-
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
11402
|
-
var createMethod$1 = function (TYPE) {
|
|
11403
|
-
return function ($this) {
|
|
11404
|
-
var string = toString$9(requireObjectCoercible$4($this));
|
|
11405
|
-
if (TYPE & 1) string = replace$4(string, ltrim, '');
|
|
11406
|
-
if (TYPE & 2) string = replace$4(string, rtrim, '');
|
|
11407
|
-
return string;
|
|
11408
|
-
};
|
|
11409
|
-
};
|
|
11410
|
-
|
|
11411
|
-
var stringTrim = {
|
|
11412
|
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
11413
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
11414
|
-
start: createMethod$1(1),
|
|
11415
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
11416
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
11417
|
-
end: createMethod$1(2),
|
|
11418
|
-
// `String.prototype.trim` method
|
|
11419
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
11420
|
-
trim: createMethod$1(3)
|
|
11421
|
-
};
|
|
11422
|
-
|
|
11423
|
-
var global$k = global$U;
|
|
11424
|
-
var fails$8 = fails$t;
|
|
11425
|
-
var uncurryThis$d = functionUncurryThis;
|
|
11426
|
-
var toString$8 = toString$h;
|
|
11427
|
-
var trim$1 = stringTrim.trim;
|
|
11428
|
-
var whitespaces$2 = whitespaces$4;
|
|
11429
|
-
|
|
11430
|
-
var $parseInt$1 = global$k.parseInt;
|
|
11431
|
-
var Symbol$6 = global$k.Symbol;
|
|
11432
|
-
var ITERATOR$6 = Symbol$6 && Symbol$6.iterator;
|
|
11433
|
-
var hex = /^[+-]?0x/i;
|
|
11434
|
-
var exec$4 = uncurryThis$d(hex.exec);
|
|
11435
|
-
var FORCED$2 = $parseInt$1(whitespaces$2 + '08') !== 8 || $parseInt$1(whitespaces$2 + '0x16') !== 22
|
|
11436
|
-
// MS Edge 18- broken with boxed symbols
|
|
11437
|
-
|| (ITERATOR$6 && !fails$8(function () { $parseInt$1(Object(ITERATOR$6)); }));
|
|
11438
|
-
|
|
11439
|
-
// `parseInt` method
|
|
11440
|
-
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
11441
|
-
var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
|
|
11442
|
-
var S = trim$1(toString$8(string));
|
|
11443
|
-
return $parseInt$1(S, (radix >>> 0) || (exec$4(hex, S) ? 16 : 10));
|
|
11444
|
-
} : $parseInt$1;
|
|
11445
|
-
|
|
11446
|
-
var $$d = _export;
|
|
11447
|
-
var $parseInt = numberParseInt;
|
|
11448
|
-
|
|
11449
|
-
// `parseInt` method
|
|
11450
|
-
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
11451
|
-
$$d({ global: true, forced: parseInt != $parseInt }, {
|
|
11452
|
-
parseInt: $parseInt
|
|
11453
|
-
});
|
|
11454
|
-
|
|
11455
11619
|
const _excluded$7 = ["children"];
|
|
11456
11620
|
var _jsxFileName$n = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\notificationBadge\\NotificationBadge.js";
|
|
11457
11621
|
const NotificationBadgeRootStyle = styled('span', {
|
|
@@ -11553,7 +11717,7 @@
|
|
|
11553
11717
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
11554
11718
|
|
|
11555
11719
|
const getValue = () => {
|
|
11556
|
-
let value = props
|
|
11720
|
+
let value = props === null || props === void 0 ? void 0 : props.value;
|
|
11557
11721
|
|
|
11558
11722
|
if (typeof value === 'number' || parseInt(value)) {
|
|
11559
11723
|
if (Math.sign(value) === 1 || Math.sign(value) === 0) {
|
|
@@ -14179,7 +14343,7 @@
|
|
|
14179
14343
|
}), void 0), jsxRuntime.jsxs(Flex$1, __assign({
|
|
14180
14344
|
gap: 3
|
|
14181
14345
|
}, {
|
|
14182
|
-
children: [jsxRuntime.jsx(Button$
|
|
14346
|
+
children: [jsxRuntime.jsx(Button$3, __assign({
|
|
14183
14347
|
buttonType: "ghost",
|
|
14184
14348
|
css: {
|
|
14185
14349
|
fontWeight: 600
|
|
@@ -14189,7 +14353,7 @@
|
|
|
14189
14353
|
size: "sm"
|
|
14190
14354
|
}, {
|
|
14191
14355
|
children: "Batal"
|
|
14192
|
-
}), void 0), jsxRuntime.jsx(Button$
|
|
14356
|
+
}), void 0), jsxRuntime.jsx(Button$3, __assign({
|
|
14193
14357
|
css: {
|
|
14194
14358
|
fontWeight: 600
|
|
14195
14359
|
},
|
|
@@ -14799,7 +14963,7 @@
|
|
|
14799
14963
|
}), void 0), jsxRuntime.jsxs(Flex$1, __assign({
|
|
14800
14964
|
gap: 3
|
|
14801
14965
|
}, {
|
|
14802
|
-
children: [jsxRuntime.jsx(Button$
|
|
14966
|
+
children: [jsxRuntime.jsx(Button$3, __assign({
|
|
14803
14967
|
buttonType: "ghost",
|
|
14804
14968
|
size: "sm",
|
|
14805
14969
|
css: {
|
|
@@ -14812,7 +14976,7 @@
|
|
|
14812
14976
|
disabled: disabled
|
|
14813
14977
|
}, {
|
|
14814
14978
|
children: "Batal"
|
|
14815
|
-
}), void 0), jsxRuntime.jsx(Button$
|
|
14979
|
+
}), void 0), jsxRuntime.jsx(Button$3, __assign({
|
|
14816
14980
|
size: "sm",
|
|
14817
14981
|
css: {
|
|
14818
14982
|
width: '160px',
|
|
@@ -16035,7 +16199,7 @@
|
|
|
16035
16199
|
} = _ref,
|
|
16036
16200
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
16037
16201
|
|
|
16038
|
-
return /*#__PURE__*/React__default["default"].createElement(Button$
|
|
16202
|
+
return /*#__PURE__*/React__default["default"].createElement(Button$3, _extends({
|
|
16039
16203
|
onClick: onClick,
|
|
16040
16204
|
buttonType: !isActive ? 'ghost' : 'primary',
|
|
16041
16205
|
css: {
|
|
@@ -16383,7 +16547,7 @@
|
|
|
16383
16547
|
lineNumber: 40,
|
|
16384
16548
|
columnNumber: 11
|
|
16385
16549
|
}
|
|
16386
|
-
}, limits
|
|
16550
|
+
}, limits === null || limits === void 0 ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(PopoverClose, {
|
|
16387
16551
|
key: limit,
|
|
16388
16552
|
css: limitItemContainerStyle(selectedLimit === limit),
|
|
16389
16553
|
onClick: () => onChange(limit),
|
|
@@ -18779,7 +18943,7 @@
|
|
|
18779
18943
|
if (!props.onOpenAutoFocus) {
|
|
18780
18944
|
e.preventDefault();
|
|
18781
18945
|
} else {
|
|
18782
|
-
props
|
|
18946
|
+
props === null || props === void 0 ? void 0 : props.onOpenAutoFocus();
|
|
18783
18947
|
}
|
|
18784
18948
|
},
|
|
18785
18949
|
__self: undefined,
|
|
@@ -18896,12 +19060,12 @@
|
|
|
18896
19060
|
lineNumber: 157,
|
|
18897
19061
|
columnNumber: 15
|
|
18898
19062
|
}
|
|
18899
|
-
}, /*#__PURE__*/React__default["default"].createElement(Button$
|
|
19063
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button$3, _extends({
|
|
18900
19064
|
size: "sm",
|
|
18901
19065
|
onClick: buttonConfirm,
|
|
18902
19066
|
buttonType: props.dialogType,
|
|
18903
|
-
disabled: props
|
|
18904
|
-
}, props
|
|
19067
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
19068
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
18905
19069
|
__self: undefined,
|
|
18906
19070
|
__source: {
|
|
18907
19071
|
fileName: _jsxFileName$b,
|
|
@@ -18916,16 +19080,16 @@
|
|
|
18916
19080
|
lineNumber: 170,
|
|
18917
19081
|
columnNumber: 17
|
|
18918
19082
|
}
|
|
18919
|
-
}, /*#__PURE__*/React__default["default"].createElement(Button$
|
|
19083
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button$3, _extends({
|
|
18920
19084
|
size: "sm",
|
|
18921
19085
|
onClick: buttonCancel,
|
|
18922
19086
|
css: {
|
|
18923
|
-
color: props.dialogType === 'negative' && !(props
|
|
19087
|
+
color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$gray900 !important',
|
|
18924
19088
|
flex: props.isMobile && 1
|
|
18925
19089
|
},
|
|
18926
19090
|
buttonType: "ghost",
|
|
18927
|
-
disabled: props
|
|
18928
|
-
}, props
|
|
19091
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
19092
|
+
}, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
|
|
18929
19093
|
__self: undefined,
|
|
18930
19094
|
__source: {
|
|
18931
19095
|
fileName: _jsxFileName$b,
|
|
@@ -18940,15 +19104,15 @@
|
|
|
18940
19104
|
lineNumber: 185,
|
|
18941
19105
|
columnNumber: 17
|
|
18942
19106
|
}
|
|
18943
|
-
}, /*#__PURE__*/React__default["default"].createElement(Button$
|
|
19107
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button$3, _extends({
|
|
18944
19108
|
size: "sm",
|
|
18945
19109
|
onClick: buttonConfirm,
|
|
18946
19110
|
buttonType: props.dialogType,
|
|
18947
19111
|
css: {
|
|
18948
19112
|
flex: props.isMobile && 1
|
|
18949
19113
|
},
|
|
18950
|
-
disabled: props
|
|
18951
|
-
}, props
|
|
19114
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
19115
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
18952
19116
|
__self: undefined,
|
|
18953
19117
|
__source: {
|
|
18954
19118
|
fileName: _jsxFileName$b,
|
|
@@ -19100,15 +19264,15 @@
|
|
|
19100
19264
|
lineNumber: 242,
|
|
19101
19265
|
columnNumber: 15
|
|
19102
19266
|
}
|
|
19103
|
-
}, /*#__PURE__*/React__default["default"].createElement(Button$
|
|
19267
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button$3, _extends({
|
|
19104
19268
|
size: "sm",
|
|
19105
19269
|
onClick: props.onConfirm,
|
|
19106
19270
|
buttonType: props.dialogType,
|
|
19107
19271
|
css: {
|
|
19108
19272
|
flex: props.isMobile && 1
|
|
19109
19273
|
},
|
|
19110
|
-
disabled: props
|
|
19111
|
-
}, props
|
|
19274
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
19275
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
19112
19276
|
__self: this,
|
|
19113
19277
|
__source: {
|
|
19114
19278
|
fileName: _jsxFileName$b,
|
|
@@ -19123,16 +19287,16 @@
|
|
|
19123
19287
|
lineNumber: 256,
|
|
19124
19288
|
columnNumber: 17
|
|
19125
19289
|
}
|
|
19126
|
-
}, /*#__PURE__*/React__default["default"].createElement(Button$
|
|
19290
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button$3, _extends({
|
|
19127
19291
|
size: "sm",
|
|
19128
19292
|
onClick: props.onCancel,
|
|
19129
19293
|
css: {
|
|
19130
|
-
color: props.dialogType === 'negative' && !(props
|
|
19294
|
+
color: props.dialogType === 'negative' && !(props !== null && props !== void 0 && props.disabledButton) && '$gray900 !important',
|
|
19131
19295
|
flex: props.isMobile && 1
|
|
19132
19296
|
},
|
|
19133
19297
|
buttonType: "ghost",
|
|
19134
|
-
disabled: props
|
|
19135
|
-
}, props
|
|
19298
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
19299
|
+
}, props === null || props === void 0 ? void 0 : props.cancelButtonProps, {
|
|
19136
19300
|
__self: this,
|
|
19137
19301
|
__source: {
|
|
19138
19302
|
fileName: _jsxFileName$b,
|
|
@@ -19147,15 +19311,15 @@
|
|
|
19147
19311
|
lineNumber: 271,
|
|
19148
19312
|
columnNumber: 17
|
|
19149
19313
|
}
|
|
19150
|
-
}, /*#__PURE__*/React__default["default"].createElement(Button$
|
|
19314
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button$3, _extends({
|
|
19151
19315
|
size: "sm",
|
|
19152
19316
|
onClick: props.onConfirm,
|
|
19153
19317
|
buttonType: props.dialogType,
|
|
19154
19318
|
css: {
|
|
19155
19319
|
flex: props.isMobile && 1
|
|
19156
19320
|
},
|
|
19157
|
-
disabled: props
|
|
19158
|
-
}, props
|
|
19321
|
+
disabled: props === null || props === void 0 ? void 0 : props.disabledButton
|
|
19322
|
+
}, props === null || props === void 0 ? void 0 : props.actionButtonProps, {
|
|
19159
19323
|
__self: this,
|
|
19160
19324
|
__source: {
|
|
19161
19325
|
fileName: _jsxFileName$b,
|
|
@@ -21670,7 +21834,7 @@
|
|
|
21670
21834
|
file: fileProgress,
|
|
21671
21835
|
indexReplace: indexReplace.current,
|
|
21672
21836
|
isReplace: indexReplace.current !== null
|
|
21673
|
-
}))
|
|
21837
|
+
})) === null || _onChange === void 0 ? void 0 : (_onChange$then = _onChange.then(() => setError(null))) === null || _onChange$then === void 0 ? void 0 : _onChange$then.catch(error => setError(error.message));
|
|
21674
21838
|
}
|
|
21675
21839
|
}).then(result => {
|
|
21676
21840
|
var _onChange2, _onChange2$then;
|
|
@@ -21692,7 +21856,7 @@
|
|
|
21692
21856
|
file: fileSuccess,
|
|
21693
21857
|
indexReplace: indexReplace.current,
|
|
21694
21858
|
isReplace: indexReplace.current !== null
|
|
21695
|
-
}))
|
|
21859
|
+
})) === null || _onChange2 === void 0 ? void 0 : (_onChange2$then = _onChange2.then(() => setError(null))) === null || _onChange2$then === void 0 ? void 0 : _onChange2$then.catch(error => setError(error.message));
|
|
21696
21860
|
}).catch(error => {
|
|
21697
21861
|
var _onChange3, _onChange3$then;
|
|
21698
21862
|
|
|
@@ -21713,7 +21877,7 @@
|
|
|
21713
21877
|
file: fileError,
|
|
21714
21878
|
indexReplace: indexReplace.current,
|
|
21715
21879
|
isReplace: indexReplace.current !== null
|
|
21716
|
-
}))
|
|
21880
|
+
})) === null || _onChange3 === void 0 ? void 0 : (_onChange3$then = _onChange3.then(() => setError(null))) === null || _onChange3$then === void 0 ? void 0 : _onChange3$then.catch(error => setError(error.message));
|
|
21717
21881
|
});
|
|
21718
21882
|
} else {
|
|
21719
21883
|
var _onChange4, _onChange4$then;
|
|
@@ -21723,7 +21887,7 @@
|
|
|
21723
21887
|
file: newFile,
|
|
21724
21888
|
indexReplace: indexReplace.current,
|
|
21725
21889
|
isReplace: indexReplace.current !== null
|
|
21726
|
-
}))
|
|
21890
|
+
})) === null || _onChange4 === void 0 ? void 0 : (_onChange4$then = _onChange4.then(() => setError(null))) === null || _onChange4$then === void 0 ? void 0 : _onChange4$then.catch(error => setError(error.message));
|
|
21727
21891
|
}
|
|
21728
21892
|
|
|
21729
21893
|
if (indexReplace.current !== null) {
|
|
@@ -21750,9 +21914,9 @@
|
|
|
21750
21914
|
}
|
|
21751
21915
|
|
|
21752
21916
|
function handleCrop() {
|
|
21753
|
-
if (completedCrop
|
|
21917
|
+
if (completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height && imgRef.current) {
|
|
21754
21918
|
imgPreview(imgRef.current, completedCrop, 1, 0, ratio).then(blob => {
|
|
21755
|
-
const file = new File([blob], fileState
|
|
21919
|
+
const file = new File([blob], fileState === null || fileState === void 0 ? void 0 : fileState.name, {
|
|
21756
21920
|
type: blob.type
|
|
21757
21921
|
});
|
|
21758
21922
|
handleUpload([file]);
|
|
@@ -21820,22 +21984,22 @@
|
|
|
21820
21984
|
function handleOpenFile(file) {
|
|
21821
21985
|
var _String, _file$name;
|
|
21822
21986
|
|
|
21823
|
-
let extension = (_String = String(file
|
|
21987
|
+
let extension = (_String = String(file === null || file === void 0 ? void 0 : (_file$name = file.name) === null || _file$name === void 0 ? void 0 : _file$name.split('.').pop())) === null || _String === void 0 ? void 0 : _String.toLowerCase();
|
|
21824
21988
|
|
|
21825
21989
|
if (extension === 'pdf') {
|
|
21826
|
-
window.open(file
|
|
21990
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
21827
21991
|
} else {
|
|
21828
|
-
request__default["default"].get(file
|
|
21992
|
+
request__default["default"].get(file === null || file === void 0 ? void 0 : file.url).end((err, res) => {
|
|
21829
21993
|
if (err) {
|
|
21830
21994
|
console.error(err.message);
|
|
21831
21995
|
}
|
|
21832
21996
|
|
|
21833
|
-
if (res && res
|
|
21834
|
-
const response = res
|
|
21997
|
+
if (res && res !== null && res !== void 0 && res.ok) {
|
|
21998
|
+
const response = res === null || res === void 0 ? void 0 : res.text;
|
|
21835
21999
|
const url = window.URL.createObjectURL(new Blob([response]));
|
|
21836
22000
|
const link = document.createElement('a');
|
|
21837
22001
|
link.href = url;
|
|
21838
|
-
link.setAttribute('download', file
|
|
22002
|
+
link.setAttribute('download', file === null || file === void 0 ? void 0 : file.name);
|
|
21839
22003
|
document.body.appendChild(link);
|
|
21840
22004
|
link.click();
|
|
21841
22005
|
document.body.removeChild(link);
|
|
@@ -21905,12 +22069,12 @@
|
|
|
21905
22069
|
}
|
|
21906
22070
|
|
|
21907
22071
|
const renderPicture = () => {
|
|
21908
|
-
return fileList
|
|
21909
|
-
if ((item
|
|
22072
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
|
|
22073
|
+
if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
|
|
21910
22074
|
return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
|
|
21911
22075
|
key: index,
|
|
21912
|
-
progress: item
|
|
21913
|
-
loading: item
|
|
22076
|
+
progress: item === null || item === void 0 ? void 0 : item.percent,
|
|
22077
|
+
loading: item === null || item === void 0 ? void 0 : item.loading,
|
|
21914
22078
|
__self: undefined,
|
|
21915
22079
|
__source: {
|
|
21916
22080
|
fileName: _jsxFileName$9,
|
|
@@ -21985,14 +22149,14 @@
|
|
|
21985
22149
|
};
|
|
21986
22150
|
|
|
21987
22151
|
const renderFile = () => {
|
|
21988
|
-
return fileList
|
|
22152
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map((item, index) => {
|
|
21989
22153
|
var _item$name;
|
|
21990
22154
|
|
|
21991
|
-
if ((item
|
|
22155
|
+
if ((item === null || item === void 0 ? void 0 : item.status) === 'uploading') {
|
|
21992
22156
|
return /*#__PURE__*/React__default["default"].createElement(UploadProgress, {
|
|
21993
22157
|
key: index,
|
|
21994
|
-
progress: item
|
|
21995
|
-
loading: item
|
|
22158
|
+
progress: item === null || item === void 0 ? void 0 : item.percent,
|
|
22159
|
+
loading: item === null || item === void 0 ? void 0 : item.loading,
|
|
21996
22160
|
__self: undefined,
|
|
21997
22161
|
__source: {
|
|
21998
22162
|
fileName: _jsxFileName$9,
|
|
@@ -22059,7 +22223,7 @@
|
|
|
22059
22223
|
lineNumber: 611,
|
|
22060
22224
|
columnNumber: 17
|
|
22061
22225
|
}
|
|
22062
|
-
}, ".", item
|
|
22226
|
+
}, ".", item === null || item === void 0 ? void 0 : (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.split('.').pop()), /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
|
|
22063
22227
|
label: item.name,
|
|
22064
22228
|
__self: undefined,
|
|
22065
22229
|
__source: {
|
|
@@ -22231,7 +22395,7 @@
|
|
|
22231
22395
|
lineNumber: 686,
|
|
22232
22396
|
columnNumber: 11
|
|
22233
22397
|
}
|
|
22234
|
-
}, children
|
|
22398
|
+
}, children !== null && children !== void 0 ? children : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
|
|
22235
22399
|
__self: this,
|
|
22236
22400
|
__source: {
|
|
22237
22401
|
fileName: _jsxFileName$9,
|
|
@@ -22265,7 +22429,7 @@
|
|
|
22265
22429
|
lineNumber: 692,
|
|
22266
22430
|
columnNumber: 17
|
|
22267
22431
|
}
|
|
22268
|
-
}, placeholder
|
|
22432
|
+
}, placeholder !== null && placeholder !== void 0 ? placeholder : `Pilih atau letakkan ${isFile ? 'berkas' : 'gambar'} di sini`)))), error && /*#__PURE__*/React__default["default"].createElement(ErrorMessage, {
|
|
22269
22433
|
__self: this,
|
|
22270
22434
|
__source: {
|
|
22271
22435
|
fileName: _jsxFileName$9,
|
|
@@ -22395,7 +22559,7 @@
|
|
|
22395
22559
|
lineNumber: 727,
|
|
22396
22560
|
columnNumber: 13
|
|
22397
22561
|
}
|
|
22398
|
-
}, /*#__PURE__*/React__default["default"].createElement(Button$
|
|
22562
|
+
}, /*#__PURE__*/React__default["default"].createElement(Button$3, {
|
|
22399
22563
|
buttonType: "secondary",
|
|
22400
22564
|
onClick: toggleModal,
|
|
22401
22565
|
__self: this,
|
|
@@ -22404,7 +22568,7 @@
|
|
|
22404
22568
|
lineNumber: 728,
|
|
22405
22569
|
columnNumber: 15
|
|
22406
22570
|
}
|
|
22407
|
-
}, "Batal"), /*#__PURE__*/React__default["default"].createElement(Button$
|
|
22571
|
+
}, "Batal"), /*#__PURE__*/React__default["default"].createElement(Button$3, {
|
|
22408
22572
|
onClick: handleCrop,
|
|
22409
22573
|
__self: this,
|
|
22410
22574
|
__source: {
|
|
@@ -22412,12 +22576,12 @@
|
|
|
22412
22576
|
lineNumber: 731,
|
|
22413
22577
|
columnNumber: 15
|
|
22414
22578
|
}
|
|
22415
|
-
}, `${completedCrop
|
|
22579
|
+
}, `${completedCrop !== null && completedCrop !== void 0 && completedCrop.width && completedCrop !== null && completedCrop !== void 0 && completedCrop.height ? 'Potong & Simpan' : 'Simpan'}`)))));
|
|
22416
22580
|
}
|
|
22417
22581
|
|
|
22418
22582
|
return /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
22419
22583
|
direction: "row",
|
|
22420
|
-
gap: (fileList
|
|
22584
|
+
gap: (fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 1 && max === 1 ? 0 : 3,
|
|
22421
22585
|
wrap: "wrap",
|
|
22422
22586
|
css: {
|
|
22423
22587
|
userSelect: 'none'
|
|
@@ -22853,10 +23017,10 @@
|
|
|
22853
23017
|
const [isPopover, setIsPopover] = React.useState(false);
|
|
22854
23018
|
|
|
22855
23019
|
function getColor() {
|
|
22856
|
-
const color = props
|
|
23020
|
+
const color = props === null || props === void 0 ? void 0 : props.color;
|
|
22857
23021
|
|
|
22858
23022
|
if (typeof color === 'string') {
|
|
22859
|
-
return color
|
|
23023
|
+
return color === null || color === void 0 ? void 0 : color.toUpperCase();
|
|
22860
23024
|
}
|
|
22861
23025
|
|
|
22862
23026
|
return `rgba(${color.r},${color.g},${color.b},${color.a})`;
|
|
@@ -25826,9 +25990,9 @@
|
|
|
25826
25990
|
lineNumber: 119,
|
|
25827
25991
|
columnNumber: 30
|
|
25828
25992
|
}
|
|
25829
|
-
}), data[i - 1].title, ((_data = data[i - 1])
|
|
25993
|
+
}), data[i - 1].title, ((_data = data[i - 1]) === null || _data === void 0 ? void 0 : _data.withTolltip) && /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
|
|
25830
25994
|
align: "center",
|
|
25831
|
-
label: (_data2 = data[i - 1])
|
|
25995
|
+
label: (_data2 = data[i - 1]) === null || _data2 === void 0 ? void 0 : _data2.tooltipsContents,
|
|
25832
25996
|
__self: undefined,
|
|
25833
25997
|
__source: {
|
|
25834
25998
|
fileName: _jsxFileName$4,
|
|
@@ -25899,10 +26063,10 @@
|
|
|
25899
26063
|
lineNumber: 155,
|
|
25900
26064
|
columnNumber: 15
|
|
25901
26065
|
}
|
|
25902
|
-
}, isActive ? data[i - 1].title : ''), isActive && ((_data3 = data[i - 1])
|
|
26066
|
+
}, isActive ? data[i - 1].title : ''), isActive && ((_data3 = data[i - 1]) === null || _data3 === void 0 ? void 0 : _data3.withTolltip) && /*#__PURE__*/React__default["default"].createElement(Tooltip$1, {
|
|
25903
26067
|
align: "center",
|
|
25904
26068
|
withClick: true,
|
|
25905
|
-
label: (_data4 = data[i - 1])
|
|
26069
|
+
label: (_data4 = data[i - 1]) === null || _data4 === void 0 ? void 0 : _data4.tooltipsContents,
|
|
25906
26070
|
__self: undefined,
|
|
25907
26071
|
__source: {
|
|
25908
26072
|
fileName: _jsxFileName$4,
|
|
@@ -25970,30 +26134,38 @@
|
|
|
25970
26134
|
const Default = props => {
|
|
25971
26135
|
const [state, updateState] = React__default["default"].useState(Object.assign({
|
|
25972
26136
|
isComplete: [],
|
|
25973
|
-
hide: false
|
|
26137
|
+
hide: props.hide || false
|
|
25974
26138
|
}, props.state));
|
|
25975
26139
|
React.useEffect(() => {
|
|
25976
26140
|
updateState(current => Object.assign({}, current, {
|
|
25977
26141
|
isComplete: props.completedSteps || []
|
|
25978
26142
|
}));
|
|
25979
26143
|
}, [props.completedSteps]);
|
|
26144
|
+
React.useEffect(() => {
|
|
26145
|
+
updateState(prev => Object.assign({}, prev, {
|
|
26146
|
+
hide: props.hide
|
|
26147
|
+
}));
|
|
26148
|
+
}, [props.hide]);
|
|
26149
|
+
React.useEffect(() => {
|
|
26150
|
+
props.onChangeVisibility(state.hide);
|
|
26151
|
+
}, [state.hide]);
|
|
25980
26152
|
|
|
25981
26153
|
const toogleVisibility = value => {
|
|
25982
|
-
updateState(Object.assign({},
|
|
25983
|
-
hide: !
|
|
26154
|
+
updateState(prev => Object.assign({}, prev, {
|
|
26155
|
+
hide: !prev.hide
|
|
25984
26156
|
}));
|
|
25985
26157
|
};
|
|
25986
26158
|
|
|
25987
26159
|
const getIsComplete = currentStep => {
|
|
25988
26160
|
var _state$isComplete;
|
|
25989
26161
|
|
|
25990
|
-
return state
|
|
26162
|
+
return state === null || state === void 0 ? void 0 : (_state$isComplete = state.isComplete) === null || _state$isComplete === void 0 ? void 0 : _state$isComplete[currentStep - 1];
|
|
25991
26163
|
};
|
|
25992
26164
|
|
|
25993
26165
|
const getTitleStep = currentStep => {
|
|
25994
26166
|
var _props$navContents, _props$navContents2;
|
|
25995
26167
|
|
|
25996
|
-
return props
|
|
26168
|
+
return props === null || props === void 0 ? void 0 : (_props$navContents = props.navContents) === null || _props$navContents === void 0 ? void 0 : (_props$navContents2 = _props$navContents[currentStep - 1]) === null || _props$navContents2 === void 0 ? void 0 : _props$navContents2.title;
|
|
25997
26169
|
};
|
|
25998
26170
|
|
|
25999
26171
|
const setState = value => {
|
|
@@ -26039,17 +26211,17 @@
|
|
|
26039
26211
|
__self: undefined,
|
|
26040
26212
|
__source: {
|
|
26041
26213
|
fileName: _jsxFileName$4,
|
|
26042
|
-
lineNumber:
|
|
26214
|
+
lineNumber: 273,
|
|
26043
26215
|
columnNumber: 5
|
|
26044
26216
|
}
|
|
26045
26217
|
}, /*#__PURE__*/React__default["default"].createElement(StepWizardContext.Provider, {
|
|
26046
26218
|
value: {
|
|
26047
26219
|
toogleVisibility,
|
|
26048
|
-
isHide: state
|
|
26220
|
+
isHide: state === null || state === void 0 ? void 0 : state.hide,
|
|
26049
26221
|
setComplete,
|
|
26050
26222
|
setState,
|
|
26051
26223
|
state,
|
|
26052
|
-
SW: state
|
|
26224
|
+
SW: state === null || state === void 0 ? void 0 : state.SW,
|
|
26053
26225
|
forbidClickNav: props.forbidClickNav,
|
|
26054
26226
|
titles: props.titles,
|
|
26055
26227
|
isMobile: props.isMobile,
|
|
@@ -26061,7 +26233,7 @@
|
|
|
26061
26233
|
__self: undefined,
|
|
26062
26234
|
__source: {
|
|
26063
26235
|
fileName: _jsxFileName$4,
|
|
26064
|
-
lineNumber:
|
|
26236
|
+
lineNumber: 274,
|
|
26065
26237
|
columnNumber: 7
|
|
26066
26238
|
}
|
|
26067
26239
|
}, /*#__PURE__*/React__default["default"].createElement(Stepper, _extends({}, props, {
|
|
@@ -26073,7 +26245,7 @@
|
|
|
26073
26245
|
__self: undefined,
|
|
26074
26246
|
__source: {
|
|
26075
26247
|
fileName: _jsxFileName$4,
|
|
26076
|
-
lineNumber:
|
|
26248
|
+
lineNumber: 296,
|
|
26077
26249
|
columnNumber: 16
|
|
26078
26250
|
}
|
|
26079
26251
|
}),
|
|
@@ -26083,7 +26255,7 @@
|
|
|
26083
26255
|
__self: undefined,
|
|
26084
26256
|
__source: {
|
|
26085
26257
|
fileName: _jsxFileName$4,
|
|
26086
|
-
lineNumber:
|
|
26258
|
+
lineNumber: 291,
|
|
26087
26259
|
columnNumber: 9
|
|
26088
26260
|
}
|
|
26089
26261
|
}), props.children)));
|
|
@@ -26221,10 +26393,10 @@
|
|
|
26221
26393
|
function getDatasets(content, activeId, isCollapse) {
|
|
26222
26394
|
const datasets = [];
|
|
26223
26395
|
|
|
26224
|
-
for (let i = 0; i < (content
|
|
26396
|
+
for (let i = 0; i < (content === null || content === void 0 ? void 0 : content.length); i++) {
|
|
26225
26397
|
var _content$i;
|
|
26226
26398
|
|
|
26227
|
-
if (((_content$i = content[i])
|
|
26399
|
+
if (((_content$i = content[i]) === null || _content$i === void 0 ? void 0 : _content$i.id) === activeId) {
|
|
26228
26400
|
datasets.unshift(content[i]);
|
|
26229
26401
|
} else {
|
|
26230
26402
|
datasets.push(content[i]);
|
|
@@ -26264,7 +26436,7 @@
|
|
|
26264
26436
|
lineNumber: 99,
|
|
26265
26437
|
columnNumber: 7
|
|
26266
26438
|
}
|
|
26267
|
-
}, (_getDatasets = getDatasets(content, activeId, isCollapse))
|
|
26439
|
+
}, (_getDatasets = getDatasets(content, activeId, isCollapse)) === null || _getDatasets === void 0 ? void 0 : _getDatasets.map((item, index) => {
|
|
26268
26440
|
return /*#__PURE__*/React__default["default"].createElement(List, {
|
|
26269
26441
|
key: index,
|
|
26270
26442
|
__self: this,
|
|
@@ -26281,11 +26453,11 @@
|
|
|
26281
26453
|
marginLeft: '-4px !important',
|
|
26282
26454
|
borderLeftWidth: '4px !important',
|
|
26283
26455
|
borderLeftStyle: 'solid !important',
|
|
26284
|
-
borderLeftColor: `${(item
|
|
26456
|
+
borderLeftColor: `${(item === null || item === void 0 ? void 0 : item.id) === activeId ? colors$4.primary500 : 'transparent'} !important`,
|
|
26285
26457
|
paddingLeft: '16px !important',
|
|
26286
26458
|
minHeight: 25
|
|
26287
26459
|
},
|
|
26288
|
-
"data-to-scrollspy-id": item
|
|
26460
|
+
"data-to-scrollspy-id": item === null || item === void 0 ? void 0 : item.id,
|
|
26289
26461
|
__self: this,
|
|
26290
26462
|
__source: {
|
|
26291
26463
|
fileName: _jsxFileName$2,
|
|
@@ -26294,8 +26466,8 @@
|
|
|
26294
26466
|
}
|
|
26295
26467
|
}, /*#__PURE__*/React__default["default"].createElement(Title$1, {
|
|
26296
26468
|
className: "link-title",
|
|
26297
|
-
active: (item
|
|
26298
|
-
href: `#${item
|
|
26469
|
+
active: (item === null || item === void 0 ? void 0 : item.id) === activeId,
|
|
26470
|
+
href: `#${item === null || item === void 0 ? void 0 : item.id}`,
|
|
26299
26471
|
onClick: e => {
|
|
26300
26472
|
e.preventDefault();
|
|
26301
26473
|
const target = window.document.getElementById(e.currentTarget.href.split('#')[1]);
|
|
@@ -26324,7 +26496,7 @@
|
|
|
26324
26496
|
lineNumber: 117,
|
|
26325
26497
|
columnNumber: 17
|
|
26326
26498
|
}
|
|
26327
|
-
}, item
|
|
26499
|
+
}, item === null || item === void 0 ? void 0 : item.title), item === null || item === void 0 ? void 0 : item.icon));
|
|
26328
26500
|
})));
|
|
26329
26501
|
}
|
|
26330
26502
|
|
|
@@ -27909,7 +28081,7 @@
|
|
|
27909
28081
|
isTruncated: true
|
|
27910
28082
|
}, {
|
|
27911
28083
|
children: inputValue
|
|
27912
|
-
}), void 0), jsxRuntime.jsx(Button$
|
|
28084
|
+
}), void 0), jsxRuntime.jsx(Button$3, __assign({
|
|
27913
28085
|
type: "button",
|
|
27914
28086
|
size: "sm",
|
|
27915
28087
|
buttonType: "secondary",
|
|
@@ -28372,7 +28544,7 @@
|
|
|
28372
28544
|
}
|
|
28373
28545
|
}
|
|
28374
28546
|
}, {
|
|
28375
|
-
children: jsxRuntime.jsx(Button$
|
|
28547
|
+
children: jsxRuntime.jsx(Button$3, __assign({
|
|
28376
28548
|
buttonType: "ghost",
|
|
28377
28549
|
css: {
|
|
28378
28550
|
fontWeight: 600,
|
|
@@ -30655,7 +30827,7 @@
|
|
|
30655
30827
|
exports.Breadcrumb = Breadcrumb;
|
|
30656
30828
|
exports.BreadcrumbItem = BreadcrumbItem;
|
|
30657
30829
|
exports.BreadcrumbLink = BreadcrumbLink;
|
|
30658
|
-
exports.Button = Button$
|
|
30830
|
+
exports.Button = Button$3;
|
|
30659
30831
|
exports.ButtonDropdown = ButtonDropdown;
|
|
30660
30832
|
exports.ButtonGroup = ButtonGroup$1;
|
|
30661
30833
|
exports.ButtonGroupItem = ButtonGroupItem;
|
|
@@ -30714,6 +30886,7 @@
|
|
|
30714
30886
|
exports.InputCheckbox = InputCheckbox;
|
|
30715
30887
|
exports.InputColorPicker = InputColorPicker;
|
|
30716
30888
|
exports.InputCombobox = InputCombobox;
|
|
30889
|
+
exports.InputCounter = InputCounter;
|
|
30717
30890
|
exports.InputCreatable = InputCreatable;
|
|
30718
30891
|
exports.InputDatePicker = InputDatePicker;
|
|
30719
30892
|
exports.InputGroup = InputGroup;
|