@majoo-ui/react 1.50.2-rc.3 → 1.51.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/checkboxTable/CheckboxTable.d.ts +29 -0
- package/components/checkboxTable/index.d.ts +1 -0
- package/components/checkboxTable/transition.d.ts +11 -0
- package/components/editableTable/EditableTable.d.ts +207 -1
- package/components/form/components/InputCounter/InputCounter.d.ts +8 -0
- package/components/index.d.ts +1 -0
- package/components/pageDialog/PageDialog.d.ts +4 -0
- package/index.esm.js +609 -204
- package/index.umd.js +624 -207
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -4783,6 +4783,9 @@ Image.defaultProps = {
|
|
|
4783
4783
|
|
|
4784
4784
|
const _excluded$q = ["children", "label", "color", "css", "withClick", "side", "align"];
|
|
4785
4785
|
var _jsxFileName$P = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\tooltip\\Tooltip.js";
|
|
4786
|
+
const {
|
|
4787
|
+
zIndices: zIndices$1
|
|
4788
|
+
} = foundations;
|
|
4786
4789
|
const slideUpAndFade$1 = keyframes({
|
|
4787
4790
|
'0%': {
|
|
4788
4791
|
opacity: 0,
|
|
@@ -4824,6 +4827,7 @@ const slideLeftAndFade$1 = keyframes({
|
|
|
4824
4827
|
}
|
|
4825
4828
|
});
|
|
4826
4829
|
const StyledContent$6 = styled(TooltipPrimitive.Content, {
|
|
4830
|
+
zIndex: zIndices$1.tooltip,
|
|
4827
4831
|
borderRadius: 8,
|
|
4828
4832
|
padding: '8px',
|
|
4829
4833
|
fontSize: '$helper',
|
|
@@ -4899,7 +4903,7 @@ const Tooltip$1 = _ref => {
|
|
|
4899
4903
|
__self: undefined,
|
|
4900
4904
|
__source: {
|
|
4901
4905
|
fileName: _jsxFileName$P,
|
|
4902
|
-
lineNumber:
|
|
4906
|
+
lineNumber: 91,
|
|
4903
4907
|
columnNumber: 5
|
|
4904
4908
|
}
|
|
4905
4909
|
}, /*#__PURE__*/React__default.createElement(TooltipBase, _extends({}, rest, {
|
|
@@ -4907,7 +4911,7 @@ const Tooltip$1 = _ref => {
|
|
|
4907
4911
|
__self: undefined,
|
|
4908
4912
|
__source: {
|
|
4909
4913
|
fileName: _jsxFileName$P,
|
|
4910
|
-
lineNumber:
|
|
4914
|
+
lineNumber: 92,
|
|
4911
4915
|
columnNumber: 7
|
|
4912
4916
|
}
|
|
4913
4917
|
}), /*#__PURE__*/React__default.createElement(TooltipTrigger, {
|
|
@@ -4915,7 +4919,7 @@ const Tooltip$1 = _ref => {
|
|
|
4915
4919
|
__self: undefined,
|
|
4916
4920
|
__source: {
|
|
4917
4921
|
fileName: _jsxFileName$P,
|
|
4918
|
-
lineNumber:
|
|
4922
|
+
lineNumber: 93,
|
|
4919
4923
|
columnNumber: 9
|
|
4920
4924
|
}
|
|
4921
4925
|
}, /*#__PURE__*/React__default.createElement(TriggerSpan, {
|
|
@@ -4923,14 +4927,14 @@ const Tooltip$1 = _ref => {
|
|
|
4923
4927
|
__self: undefined,
|
|
4924
4928
|
__source: {
|
|
4925
4929
|
fileName: _jsxFileName$P,
|
|
4926
|
-
lineNumber:
|
|
4930
|
+
lineNumber: 94,
|
|
4927
4931
|
columnNumber: 11
|
|
4928
4932
|
}
|
|
4929
4933
|
}, children)), /*#__PURE__*/React__default.createElement(TooltipPrimitive.Portal, {
|
|
4930
4934
|
__self: undefined,
|
|
4931
4935
|
__source: {
|
|
4932
4936
|
fileName: _jsxFileName$P,
|
|
4933
|
-
lineNumber:
|
|
4937
|
+
lineNumber: 96,
|
|
4934
4938
|
columnNumber: 9
|
|
4935
4939
|
}
|
|
4936
4940
|
}, /*#__PURE__*/React__default.createElement(StyledContent$6, {
|
|
@@ -4941,7 +4945,7 @@ const Tooltip$1 = _ref => {
|
|
|
4941
4945
|
__self: undefined,
|
|
4942
4946
|
__source: {
|
|
4943
4947
|
fileName: _jsxFileName$P,
|
|
4944
|
-
lineNumber:
|
|
4948
|
+
lineNumber: 97,
|
|
4945
4949
|
columnNumber: 11
|
|
4946
4950
|
}
|
|
4947
4951
|
}, label, /*#__PURE__*/React__default.createElement(StyledArrow$1, {
|
|
@@ -4950,7 +4954,7 @@ const Tooltip$1 = _ref => {
|
|
|
4950
4954
|
__self: undefined,
|
|
4951
4955
|
__source: {
|
|
4952
4956
|
fileName: _jsxFileName$P,
|
|
4953
|
-
lineNumber:
|
|
4957
|
+
lineNumber: 104,
|
|
4954
4958
|
columnNumber: 13
|
|
4955
4959
|
}
|
|
4956
4960
|
})))));
|
|
@@ -4972,7 +4976,7 @@ Tooltip$1.defaultProps = {
|
|
|
4972
4976
|
__self: undefined,
|
|
4973
4977
|
__source: {
|
|
4974
4978
|
fileName: _jsxFileName$P,
|
|
4975
|
-
lineNumber:
|
|
4979
|
+
lineNumber: 125,
|
|
4976
4980
|
columnNumber: 13
|
|
4977
4981
|
}
|
|
4978
4982
|
})
|
|
@@ -7347,7 +7351,7 @@ Tag.defaultProps = {
|
|
|
7347
7351
|
readOnly: false
|
|
7348
7352
|
};
|
|
7349
7353
|
|
|
7350
|
-
const _excluded$f = ["size", "isInvalid", "placeholder", "onChange", "onEnter", "onInputChange", "value", "disabled", "readOnly", "max", "maxChar", "pattern", "helperText"];
|
|
7354
|
+
const _excluded$f = ["size", "isInvalid", "placeholder", "onChange", "onEnter", "onInputChange", "value", "disabled", "readOnly", "max", "maxChar", "pattern", "helperText", "unremovableTags", "onRemoveItem"];
|
|
7351
7355
|
var _jsxFileName$A = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputTags\\InputTags.js";
|
|
7352
7356
|
const Wrapper$2 = styled('div', {
|
|
7353
7357
|
margin: 0,
|
|
@@ -7466,7 +7470,9 @@ function TagsInput(_ref) {
|
|
|
7466
7470
|
max,
|
|
7467
7471
|
maxChar,
|
|
7468
7472
|
pattern,
|
|
7469
|
-
helperText
|
|
7473
|
+
helperText,
|
|
7474
|
+
unremovableTags,
|
|
7475
|
+
onRemoveItem
|
|
7470
7476
|
} = _ref,
|
|
7471
7477
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
7472
7478
|
|
|
@@ -7516,6 +7522,7 @@ function TagsInput(_ref) {
|
|
|
7516
7522
|
if (disabled || readOnly) {
|
|
7517
7523
|
return tags;
|
|
7518
7524
|
} else if (key === 'removeTag' || key === 'Backspace') {
|
|
7525
|
+
onRemoveItem === null || onRemoveItem === void 0 ? void 0 : onRemoveItem(tags[index]);
|
|
7519
7526
|
setTags([...tags.filter(tag => tags.indexOf(tag) !== index)]);
|
|
7520
7527
|
}
|
|
7521
7528
|
}; // const handleErrorMessage = () => {
|
|
@@ -7532,7 +7539,7 @@ function TagsInput(_ref) {
|
|
|
7532
7539
|
__self: this,
|
|
7533
7540
|
__source: {
|
|
7534
7541
|
fileName: _jsxFileName$A,
|
|
7535
|
-
lineNumber:
|
|
7542
|
+
lineNumber: 171,
|
|
7536
7543
|
columnNumber: 5
|
|
7537
7544
|
}
|
|
7538
7545
|
}, /*#__PURE__*/React__default.createElement(InputTagsComponent, _extends({
|
|
@@ -7545,7 +7552,7 @@ function TagsInput(_ref) {
|
|
|
7545
7552
|
__self: this,
|
|
7546
7553
|
__source: {
|
|
7547
7554
|
fileName: _jsxFileName$A,
|
|
7548
|
-
lineNumber:
|
|
7555
|
+
lineNumber: 172,
|
|
7549
7556
|
columnNumber: 7
|
|
7550
7557
|
}
|
|
7551
7558
|
}), /*#__PURE__*/React__default.createElement(Input$8, {
|
|
@@ -7560,7 +7567,7 @@ function TagsInput(_ref) {
|
|
|
7560
7567
|
__self: this,
|
|
7561
7568
|
__source: {
|
|
7562
7569
|
fileName: _jsxFileName$A,
|
|
7563
|
-
lineNumber:
|
|
7570
|
+
lineNumber: 180,
|
|
7564
7571
|
columnNumber: 9
|
|
7565
7572
|
}
|
|
7566
7573
|
})), regexError && pattern && (pattern !== null && pattern !== void 0 && pattern.errorMessage ? /*#__PURE__*/React__default.createElement(FormHelper, {
|
|
@@ -7568,7 +7575,7 @@ function TagsInput(_ref) {
|
|
|
7568
7575
|
__self: this,
|
|
7569
7576
|
__source: {
|
|
7570
7577
|
fileName: _jsxFileName$A,
|
|
7571
|
-
lineNumber:
|
|
7578
|
+
lineNumber: 194,
|
|
7572
7579
|
columnNumber: 11
|
|
7573
7580
|
}
|
|
7574
7581
|
}, pattern.errorMessage) : /*#__PURE__*/React__default.createElement(FormHelper, {
|
|
@@ -7576,7 +7583,7 @@ function TagsInput(_ref) {
|
|
|
7576
7583
|
__self: this,
|
|
7577
7584
|
__source: {
|
|
7578
7585
|
fileName: _jsxFileName$A,
|
|
7579
|
-
lineNumber:
|
|
7586
|
+
lineNumber: 196,
|
|
7580
7587
|
columnNumber: 11
|
|
7581
7588
|
}
|
|
7582
7589
|
}, "Invalid Input")), helperText && /*#__PURE__*/React__default.createElement(Paragraph, {
|
|
@@ -7590,14 +7597,14 @@ function TagsInput(_ref) {
|
|
|
7590
7597
|
__self: this,
|
|
7591
7598
|
__source: {
|
|
7592
7599
|
fileName: _jsxFileName$A,
|
|
7593
|
-
lineNumber:
|
|
7600
|
+
lineNumber: 200,
|
|
7594
7601
|
columnNumber: 9
|
|
7595
7602
|
}
|
|
7596
7603
|
}, helperText), /*#__PURE__*/React__default.createElement(TagWrapper$2, {
|
|
7597
7604
|
__self: this,
|
|
7598
7605
|
__source: {
|
|
7599
7606
|
fileName: _jsxFileName$A,
|
|
7600
|
-
lineNumber:
|
|
7607
|
+
lineNumber: 204,
|
|
7601
7608
|
columnNumber: 7
|
|
7602
7609
|
}
|
|
7603
7610
|
}, tags.map((tag, index) => /*#__PURE__*/React__default.createElement(Tag, {
|
|
@@ -7605,12 +7612,12 @@ function TagsInput(_ref) {
|
|
|
7605
7612
|
disabled: disabled,
|
|
7606
7613
|
readOnly: readOnly,
|
|
7607
7614
|
size: size === 'lg' ? 'sm' : 'lg',
|
|
7608
|
-
isRemovable: disabled || readOnly ? false : true,
|
|
7615
|
+
isRemovable: disabled || readOnly || unremovableTags.includes(tag) ? false : true,
|
|
7609
7616
|
onRemove: () => removeTags(index, 'removeTag'),
|
|
7610
7617
|
__self: this,
|
|
7611
7618
|
__source: {
|
|
7612
7619
|
fileName: _jsxFileName$A,
|
|
7613
|
-
lineNumber:
|
|
7620
|
+
lineNumber: 206,
|
|
7614
7621
|
columnNumber: 11
|
|
7615
7622
|
}
|
|
7616
7623
|
}, tag))));
|
|
@@ -7620,12 +7627,14 @@ TagsInput.propTypes = {
|
|
|
7620
7627
|
size: PropTypes.string,
|
|
7621
7628
|
value: PropTypes.arrayOf(PropTypes.string),
|
|
7622
7629
|
onChange: PropTypes.arrayOf(PropTypes.string),
|
|
7630
|
+
onRemoveItem: PropTypes.func,
|
|
7623
7631
|
onEnter: PropTypes.func,
|
|
7624
7632
|
onInputChange: PropTypes.func,
|
|
7625
7633
|
max: PropTypes.number,
|
|
7626
7634
|
maxChar: PropTypes.number,
|
|
7627
7635
|
isInvalid: PropTypes.bool,
|
|
7628
7636
|
disabled: PropTypes.bool,
|
|
7637
|
+
unremovableTags: PropTypes.arrayOf(PropTypes.string),
|
|
7629
7638
|
readOnly: PropTypes.bool,
|
|
7630
7639
|
helperText: PropTypes.string,
|
|
7631
7640
|
pattern: PropTypes.shape({
|
|
@@ -7638,6 +7647,7 @@ TagsInput.defaultProps = {
|
|
|
7638
7647
|
size: 'lg',
|
|
7639
7648
|
isInvalid: false,
|
|
7640
7649
|
disabled: false,
|
|
7650
|
+
unremovableTags: [],
|
|
7641
7651
|
readOnly: false
|
|
7642
7652
|
};
|
|
7643
7653
|
|
|
@@ -8565,7 +8575,7 @@ function InputSelect(_a) {
|
|
|
8565
8575
|
type: "button"
|
|
8566
8576
|
}, {
|
|
8567
8577
|
children: selectedItem ? selectedItem.render ? selectedItem.render(selectedItem) : jsx(Text$1, Object.assign({
|
|
8568
|
-
color:
|
|
8578
|
+
color: disabled ? 'disable' : 'primary',
|
|
8569
8579
|
css: StyledText$1
|
|
8570
8580
|
}, {
|
|
8571
8581
|
children: selectedItem.name
|
|
@@ -9036,7 +9046,7 @@ const CheckOutline = props => /*#__PURE__*/React.createElement("svg", _extends({
|
|
|
9036
9046
|
}
|
|
9037
9047
|
}));
|
|
9038
9048
|
|
|
9039
|
-
const _excluded$c = ["placeholder", "option", "value", "size", "disabled", "onChange", "search", "readOnly", "placement", "disabledOptions", "textEmptyItem", "onRemoveItem", "isInvalid", "sortBy", "showSelectedTag", "helperText", "css"];
|
|
9049
|
+
const _excluded$c = ["placeholder", "option", "value", "size", "disabled", "onChange", "search", "readOnly", "placement", "disabledOptions", "textEmptyItem", "onRemoveItem", "isInvalid", "sortBy", "showSelectAll", "selectAllLabel", "showSelectedTag", "unremovableTags", "helperText", "css"];
|
|
9040
9050
|
var _jsxFileName$u = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectCheck\\InputSelectCheck.js";
|
|
9041
9051
|
const Wrapper$1 = styled('div', {
|
|
9042
9052
|
margin: 0,
|
|
@@ -9269,27 +9279,30 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9269
9279
|
onRemoveItem,
|
|
9270
9280
|
isInvalid,
|
|
9271
9281
|
sortBy,
|
|
9282
|
+
showSelectAll,
|
|
9283
|
+
selectAllLabel,
|
|
9272
9284
|
showSelectedTag,
|
|
9285
|
+
unremovableTags,
|
|
9273
9286
|
helperText,
|
|
9274
9287
|
css
|
|
9275
9288
|
} = _ref,
|
|
9276
9289
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
9277
9290
|
|
|
9278
|
-
const [initItem,
|
|
9291
|
+
const [initItem, setInitItems] = React__default.useState(option); //init filter selectedItems on useMultipleSelection
|
|
9279
9292
|
|
|
9280
|
-
const [
|
|
9293
|
+
const [items, setItems] = React__default.useState([]);
|
|
9281
9294
|
const [selectedValue, setSelectedValue] = React__default.useState([]);
|
|
9282
9295
|
const [inputValue, setInputValue] = React__default.useState('');
|
|
9283
|
-
|
|
9284
|
-
setItem(option);
|
|
9285
|
-
}, [option]);
|
|
9286
|
-
const sortItem = React__default.useCallback(() => {
|
|
9296
|
+
const sortItems = React__default.useCallback(() => {
|
|
9287
9297
|
if (sortBy === 'id') {
|
|
9288
9298
|
option.sort(function (a, b) {
|
|
9289
9299
|
const idA = a.id.toUpperCase(); // ignore upper and lowercase
|
|
9290
9300
|
|
|
9291
9301
|
const idB = b.id.toUpperCase(); // ignore upper and lowercase
|
|
9292
9302
|
|
|
9303
|
+
if (a.id === '!all') return -1;
|
|
9304
|
+
if (b.id === '!all') return 1;
|
|
9305
|
+
|
|
9293
9306
|
if (idA < idB) {
|
|
9294
9307
|
return -1;
|
|
9295
9308
|
}
|
|
@@ -9306,6 +9319,9 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9306
9319
|
|
|
9307
9320
|
const nameB = b.name.toUpperCase(); // ignore upper and lowercase
|
|
9308
9321
|
|
|
9322
|
+
if (a.id === '!all') return -1;
|
|
9323
|
+
if (b.id === '!all') return 1;
|
|
9324
|
+
|
|
9309
9325
|
if (nameA < nameB) {
|
|
9310
9326
|
return -1;
|
|
9311
9327
|
}
|
|
@@ -9317,7 +9333,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9317
9333
|
return 0;
|
|
9318
9334
|
});
|
|
9319
9335
|
}
|
|
9320
|
-
}, [sortBy]);
|
|
9336
|
+
}, [sortBy, option]);
|
|
9321
9337
|
const sortValue = selectedValue.length > 0 && disabledOptions.length === 0 ? value.reduce((res, id, i, {
|
|
9322
9338
|
[i + 1]: next
|
|
9323
9339
|
}) => {
|
|
@@ -9340,24 +9356,6 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9340
9356
|
return [...res, ...filterOption]; // add the missing elements
|
|
9341
9357
|
}
|
|
9342
9358
|
}, []) : option;
|
|
9343
|
-
React__default.useEffect(() => {
|
|
9344
|
-
if (selectedValue.length > 0 && disabledOptions.length === 0) {
|
|
9345
|
-
setInitItem(sortValue);
|
|
9346
|
-
setItem(sortValue);
|
|
9347
|
-
}
|
|
9348
|
-
}, []);
|
|
9349
|
-
React__default.useEffect(() => {
|
|
9350
|
-
sortItem();
|
|
9351
|
-
}, [sortBy]);
|
|
9352
|
-
React__default.useEffect(() => {
|
|
9353
|
-
if (disabledOptions.length > 0) {
|
|
9354
|
-
setInitItem(generateOptions(sortDisabled));
|
|
9355
|
-
setItem(generateOptions(sortDisabled)); // setItem(generateOptions(option));
|
|
9356
|
-
}
|
|
9357
|
-
}, [disabledOptions]);
|
|
9358
|
-
React__default.useEffect(() => {
|
|
9359
|
-
setSelectedValue(value);
|
|
9360
|
-
}, [value]);
|
|
9361
9359
|
const {
|
|
9362
9360
|
getSelectedItemProps,
|
|
9363
9361
|
getDropdownProps,
|
|
@@ -9391,13 +9389,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9391
9389
|
const handleInputValue = input => {
|
|
9392
9390
|
if (input === '') {
|
|
9393
9391
|
if (disabledOptions.length > 0) {
|
|
9394
|
-
|
|
9392
|
+
setItems(generateOptions(sortDisabled));
|
|
9395
9393
|
} else {
|
|
9396
|
-
return
|
|
9394
|
+
return setItems(sortValue);
|
|
9397
9395
|
}
|
|
9398
9396
|
} else {
|
|
9399
9397
|
let filterItems = option.filter(item => item.name.toLowerCase().startsWith(input.toLocaleLowerCase()));
|
|
9400
|
-
|
|
9398
|
+
setItems(filterItems);
|
|
9401
9399
|
}
|
|
9402
9400
|
};
|
|
9403
9401
|
|
|
@@ -9405,10 +9403,13 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9405
9403
|
if (disabled || readOnly) {
|
|
9406
9404
|
return selectedValue;
|
|
9407
9405
|
} else {
|
|
9408
|
-
|
|
9406
|
+
const filterItems = selectedValue.filter(val => val !== selected.id && val !== '!all');
|
|
9409
9407
|
removeSelectedItem(selected);
|
|
9410
9408
|
setSelectedValue(filterItems);
|
|
9411
|
-
|
|
9409
|
+
|
|
9410
|
+
if (selected.id !== '!all') {
|
|
9411
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(filterItems);
|
|
9412
|
+
}
|
|
9412
9413
|
}
|
|
9413
9414
|
};
|
|
9414
9415
|
|
|
@@ -9424,7 +9425,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9424
9425
|
isOpen
|
|
9425
9426
|
} = useCombobox({
|
|
9426
9427
|
inputValue,
|
|
9427
|
-
items:
|
|
9428
|
+
items: items,
|
|
9428
9429
|
selectedItem: selectedValue,
|
|
9429
9430
|
itemToString: item => item ? item.name : '',
|
|
9430
9431
|
onStateChange: ({
|
|
@@ -9442,17 +9443,38 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9442
9443
|
case useCombobox.stateChangeTypes.ItemClick:
|
|
9443
9444
|
case useCombobox.stateChangeTypes.InputBlur:
|
|
9444
9445
|
if (selectedItem) {
|
|
9446
|
+
openMenu();
|
|
9447
|
+
|
|
9445
9448
|
if (selectedItems.length !== 0 && selectedValue.includes(selectedItem.id)) {
|
|
9446
9449
|
if (disabled === false && readOnly === false) {
|
|
9447
|
-
|
|
9448
|
-
|
|
9450
|
+
if (selectedItem.id === '!all') {
|
|
9451
|
+
items.forEach(item => {
|
|
9452
|
+
removeSelectedItem(item);
|
|
9453
|
+
});
|
|
9454
|
+
setSelectedValue([]);
|
|
9455
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([]);
|
|
9456
|
+
} else {
|
|
9457
|
+
removeItem(selectedItem);
|
|
9458
|
+
}
|
|
9459
|
+
|
|
9449
9460
|
selectItem(null);
|
|
9450
9461
|
}
|
|
9451
9462
|
} else {
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9463
|
+
if (selectedItem.id === '!all') {
|
|
9464
|
+
const itemIds = [];
|
|
9465
|
+
items.forEach(item => {
|
|
9466
|
+
addSelectedItem(item);
|
|
9467
|
+
itemIds.push(item.id);
|
|
9468
|
+
});
|
|
9469
|
+
setSelectedValue(itemIds);
|
|
9470
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(itemIds.slice(1));
|
|
9471
|
+
} else {
|
|
9472
|
+
addSelectedItem(selectedItem);
|
|
9473
|
+
setSelectedValue([...selectedValue, selectedItem.id]);
|
|
9474
|
+
const filteredSelectedValues = selectedValue.filter(val => val !== '!all');
|
|
9475
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([...filteredSelectedValues, selectedItem.id]);
|
|
9476
|
+
}
|
|
9477
|
+
|
|
9456
9478
|
selectItem(null);
|
|
9457
9479
|
}
|
|
9458
9480
|
}
|
|
@@ -9463,13 +9485,49 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9463
9485
|
}
|
|
9464
9486
|
}
|
|
9465
9487
|
});
|
|
9488
|
+
useEffect(() => {
|
|
9489
|
+
sortItems();
|
|
9490
|
+
setItems(showSelectAll ? [{
|
|
9491
|
+
id: '!all',
|
|
9492
|
+
name: selectAllLabel
|
|
9493
|
+
}, ...option] : option);
|
|
9494
|
+
setInitItems(showSelectAll ? [{
|
|
9495
|
+
id: '!all',
|
|
9496
|
+
name: selectAllLabel
|
|
9497
|
+
}, ...option] : option);
|
|
9498
|
+
}, [option, showSelectAll]);
|
|
9499
|
+
useEffect(() => {
|
|
9500
|
+
if (selectedValue.length > 0 && disabledOptions.length === 0) {
|
|
9501
|
+
setInitItems(sortValue);
|
|
9502
|
+
setItems(sortValue);
|
|
9503
|
+
}
|
|
9504
|
+
}, []);
|
|
9505
|
+
useEffect(() => {
|
|
9506
|
+
sortItems();
|
|
9507
|
+
}, [sortBy]);
|
|
9508
|
+
useEffect(() => {
|
|
9509
|
+
if (disabledOptions.length > 0) {
|
|
9510
|
+
const options = generateOptions(sortDisabled);
|
|
9511
|
+
setItems(showSelectAll ? [{
|
|
9512
|
+
id: '!all',
|
|
9513
|
+
name: selectAllLabel
|
|
9514
|
+
}, ...options] : options);
|
|
9515
|
+
setInitItems(showSelectAll ? [{
|
|
9516
|
+
id: '!all',
|
|
9517
|
+
name: selectAllLabel
|
|
9518
|
+
}, ...options] : options);
|
|
9519
|
+
}
|
|
9520
|
+
}, [disabledOptions, showSelectAll]);
|
|
9521
|
+
useEffect(() => {
|
|
9522
|
+
setSelectedValue(items.length > 0 && value.length === items.length - 1 ? ['!all', ...value] : value);
|
|
9523
|
+
}, [value]);
|
|
9466
9524
|
return /*#__PURE__*/React__default.createElement(Wrapper$1, _extends({
|
|
9467
9525
|
css: css
|
|
9468
9526
|
}, props, {
|
|
9469
9527
|
__self: undefined,
|
|
9470
9528
|
__source: {
|
|
9471
9529
|
fileName: _jsxFileName$u,
|
|
9472
|
-
lineNumber:
|
|
9530
|
+
lineNumber: 490,
|
|
9473
9531
|
columnNumber: 7
|
|
9474
9532
|
}
|
|
9475
9533
|
}), /*#__PURE__*/React__default.createElement(Select, {
|
|
@@ -9479,7 +9537,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9479
9537
|
__self: undefined,
|
|
9480
9538
|
__source: {
|
|
9481
9539
|
fileName: _jsxFileName$u,
|
|
9482
|
-
lineNumber:
|
|
9540
|
+
lineNumber: 491,
|
|
9483
9541
|
columnNumber: 9
|
|
9484
9542
|
}
|
|
9485
9543
|
}, /*#__PURE__*/React__default.createElement(InputWrapper$1, _extends({}, getComboboxProps(getDropdownProps({
|
|
@@ -9494,7 +9552,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9494
9552
|
__self: undefined,
|
|
9495
9553
|
__source: {
|
|
9496
9554
|
fileName: _jsxFileName$u,
|
|
9497
|
-
lineNumber:
|
|
9555
|
+
lineNumber: 492,
|
|
9498
9556
|
columnNumber: 11
|
|
9499
9557
|
}
|
|
9500
9558
|
}), /*#__PURE__*/React__default.createElement(Input$6, _extends({}, getInputProps({
|
|
@@ -9510,7 +9568,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9510
9568
|
__self: undefined,
|
|
9511
9569
|
__source: {
|
|
9512
9570
|
fileName: _jsxFileName$u,
|
|
9513
|
-
lineNumber:
|
|
9571
|
+
lineNumber: 502,
|
|
9514
9572
|
columnNumber: 13
|
|
9515
9573
|
}
|
|
9516
9574
|
})), /*#__PURE__*/React__default.createElement(Button$1, _extends({}, getToggleButtonProps({
|
|
@@ -9523,7 +9581,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9523
9581
|
__self: undefined,
|
|
9524
9582
|
__source: {
|
|
9525
9583
|
fileName: _jsxFileName$u,
|
|
9526
|
-
lineNumber:
|
|
9584
|
+
lineNumber: 508,
|
|
9527
9585
|
columnNumber: 13
|
|
9528
9586
|
}
|
|
9529
9587
|
}), placeholder)), /*#__PURE__*/React__default.createElement(IconWrapper, _extends({}, getToggleButtonProps({
|
|
@@ -9534,7 +9592,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9534
9592
|
__self: undefined,
|
|
9535
9593
|
__source: {
|
|
9536
9594
|
fileName: _jsxFileName$u,
|
|
9537
|
-
lineNumber:
|
|
9595
|
+
lineNumber: 518,
|
|
9538
9596
|
columnNumber: 11
|
|
9539
9597
|
}
|
|
9540
9598
|
}), /*#__PURE__*/React__default.createElement(IconCaretDown, {
|
|
@@ -9542,7 +9600,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9542
9600
|
__self: undefined,
|
|
9543
9601
|
__source: {
|
|
9544
9602
|
fileName: _jsxFileName$u,
|
|
9545
|
-
lineNumber:
|
|
9603
|
+
lineNumber: 523,
|
|
9546
9604
|
columnNumber: 13
|
|
9547
9605
|
}
|
|
9548
9606
|
}))), helperText && /*#__PURE__*/React__default.createElement(Paragraph, {
|
|
@@ -9555,7 +9613,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9555
9613
|
__self: undefined,
|
|
9556
9614
|
__source: {
|
|
9557
9615
|
fileName: _jsxFileName$u,
|
|
9558
|
-
lineNumber:
|
|
9616
|
+
lineNumber: 527,
|
|
9559
9617
|
columnNumber: 11
|
|
9560
9618
|
}
|
|
9561
9619
|
}, helperText), showSelectedTag && selectedItems.length !== 0 && /*#__PURE__*/React__default.createElement(TagWrapper$1, {
|
|
@@ -9563,11 +9621,11 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9563
9621
|
__self: undefined,
|
|
9564
9622
|
__source: {
|
|
9565
9623
|
fileName: _jsxFileName$u,
|
|
9566
|
-
lineNumber:
|
|
9624
|
+
lineNumber: 532,
|
|
9567
9625
|
columnNumber: 11
|
|
9568
9626
|
}
|
|
9569
9627
|
}, selectedItems.map((selectedItem, index) => /*#__PURE__*/React__default.createElement(Tag, _extends({
|
|
9570
|
-
isRemovable: readOnly || disabled ? false : true,
|
|
9628
|
+
isRemovable: readOnly || disabled || unremovableTags.includes(selectedItem.id) ? false : true,
|
|
9571
9629
|
disabled: disabled,
|
|
9572
9630
|
size: "lg",
|
|
9573
9631
|
readOnly: readOnly,
|
|
@@ -9587,7 +9645,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9587
9645
|
__self: undefined,
|
|
9588
9646
|
__source: {
|
|
9589
9647
|
fileName: _jsxFileName$u,
|
|
9590
|
-
lineNumber:
|
|
9648
|
+
lineNumber: 534,
|
|
9591
9649
|
columnNumber: 15
|
|
9592
9650
|
}
|
|
9593
9651
|
}), selectedItem.name))), /*#__PURE__*/React__default.createElement(OptionWrapper$1, {
|
|
@@ -9599,19 +9657,19 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9599
9657
|
__self: undefined,
|
|
9600
9658
|
__source: {
|
|
9601
9659
|
fileName: _jsxFileName$u,
|
|
9602
|
-
lineNumber:
|
|
9660
|
+
lineNumber: 555,
|
|
9603
9661
|
columnNumber: 9
|
|
9604
9662
|
}
|
|
9605
|
-
},
|
|
9663
|
+
}, items.length !== 0 ? /*#__PURE__*/React__default.createElement(Option, _extends({}, getMenuProps({}, {
|
|
9606
9664
|
suppressRefError: true
|
|
9607
9665
|
}), {
|
|
9608
9666
|
__self: undefined,
|
|
9609
9667
|
__source: {
|
|
9610
9668
|
fileName: _jsxFileName$u,
|
|
9611
|
-
lineNumber:
|
|
9669
|
+
lineNumber: 560,
|
|
9612
9670
|
columnNumber: 13
|
|
9613
9671
|
}
|
|
9614
|
-
}), isOpen &&
|
|
9672
|
+
}), isOpen && items.map((item, index) => /*#__PURE__*/React__default.createElement(ItemWrapper$1, _extends({
|
|
9615
9673
|
key: item.id
|
|
9616
9674
|
}, getItemProps({
|
|
9617
9675
|
item,
|
|
@@ -9626,7 +9684,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9626
9684
|
__self: undefined,
|
|
9627
9685
|
__source: {
|
|
9628
9686
|
fileName: _jsxFileName$u,
|
|
9629
|
-
lineNumber:
|
|
9687
|
+
lineNumber: 563,
|
|
9630
9688
|
columnNumber: 19
|
|
9631
9689
|
}
|
|
9632
9690
|
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
@@ -9639,7 +9697,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9639
9697
|
__self: undefined,
|
|
9640
9698
|
__source: {
|
|
9641
9699
|
fileName: _jsxFileName$u,
|
|
9642
|
-
lineNumber:
|
|
9700
|
+
lineNumber: 576,
|
|
9643
9701
|
columnNumber: 21
|
|
9644
9702
|
}
|
|
9645
9703
|
}, item.isDisabled ? /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
@@ -9647,7 +9705,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9647
9705
|
__self: undefined,
|
|
9648
9706
|
__source: {
|
|
9649
9707
|
fileName: _jsxFileName$u,
|
|
9650
|
-
lineNumber:
|
|
9708
|
+
lineNumber: 585,
|
|
9651
9709
|
columnNumber: 25
|
|
9652
9710
|
}
|
|
9653
9711
|
}) : selectedValue.includes(item.id) && (item.isDisabled === false || item.isDisabled === undefined) && /*#__PURE__*/React__default.createElement(CheckOutline, {
|
|
@@ -9655,7 +9713,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9655
9713
|
__self: undefined,
|
|
9656
9714
|
__source: {
|
|
9657
9715
|
fileName: _jsxFileName$u,
|
|
9658
|
-
lineNumber:
|
|
9716
|
+
lineNumber: 589,
|
|
9659
9717
|
columnNumber: 27
|
|
9660
9718
|
}
|
|
9661
9719
|
})), /*#__PURE__*/React__default.createElement(Item$2, {
|
|
@@ -9665,7 +9723,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9665
9723
|
__self: undefined,
|
|
9666
9724
|
__source: {
|
|
9667
9725
|
fileName: _jsxFileName$u,
|
|
9668
|
-
lineNumber:
|
|
9726
|
+
lineNumber: 593,
|
|
9669
9727
|
columnNumber: 21
|
|
9670
9728
|
}
|
|
9671
9729
|
}, item.name)))) : /*#__PURE__*/React__default.createElement(Option, _extends({
|
|
@@ -9678,14 +9736,14 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9678
9736
|
__self: undefined,
|
|
9679
9737
|
__source: {
|
|
9680
9738
|
fileName: _jsxFileName$u,
|
|
9681
|
-
lineNumber:
|
|
9739
|
+
lineNumber: 598,
|
|
9682
9740
|
columnNumber: 13
|
|
9683
9741
|
}
|
|
9684
9742
|
}), /*#__PURE__*/React__default.createElement(StyledDiv$1, {
|
|
9685
9743
|
__self: undefined,
|
|
9686
9744
|
__source: {
|
|
9687
9745
|
fileName: _jsxFileName$u,
|
|
9688
|
-
lineNumber:
|
|
9746
|
+
lineNumber: 599,
|
|
9689
9747
|
columnNumber: 15
|
|
9690
9748
|
}
|
|
9691
9749
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -9695,7 +9753,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9695
9753
|
__self: undefined,
|
|
9696
9754
|
__source: {
|
|
9697
9755
|
fileName: _jsxFileName$u,
|
|
9698
|
-
lineNumber:
|
|
9756
|
+
lineNumber: 600,
|
|
9699
9757
|
columnNumber: 17
|
|
9700
9758
|
}
|
|
9701
9759
|
}, /*#__PURE__*/React__default.createElement(CircleInfoOutline, {
|
|
@@ -9707,7 +9765,7 @@ const InputSelectCheck = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
9707
9765
|
__self: undefined,
|
|
9708
9766
|
__source: {
|
|
9709
9767
|
fileName: _jsxFileName$u,
|
|
9710
|
-
lineNumber:
|
|
9768
|
+
lineNumber: 601,
|
|
9711
9769
|
columnNumber: 19
|
|
9712
9770
|
}
|
|
9713
9771
|
})), textEmptyItem))));
|
|
@@ -9726,7 +9784,11 @@ InputSelectCheck.propTypes = {
|
|
|
9726
9784
|
search: PropTypes.bool,
|
|
9727
9785
|
placement: PropTypes.oneOf(['top', 'bottom']),
|
|
9728
9786
|
disabledOptions: PropTypes.arrayOf(PropTypes.string),
|
|
9787
|
+
unremovableTags: PropTypes.arrayOf(PropTypes.string),
|
|
9729
9788
|
textEmptyItem: PropTypes.string,
|
|
9789
|
+
showSelectAll: PropTypes.bool,
|
|
9790
|
+
selectAllLabel: PropTypes.string,
|
|
9791
|
+
showSelectedTag: PropTypes.bool,
|
|
9730
9792
|
css: PropTypes.object,
|
|
9731
9793
|
helperText: PropTypes.string
|
|
9732
9794
|
};
|
|
@@ -9740,8 +9802,11 @@ InputSelectCheck.defaultProps = {
|
|
|
9740
9802
|
placement: 'bottom',
|
|
9741
9803
|
value: [],
|
|
9742
9804
|
disabledOptions: [],
|
|
9805
|
+
unremovableTags: [],
|
|
9743
9806
|
textEmptyItem: 'Item tidak ditemukan',
|
|
9744
|
-
sortBy: 'name'
|
|
9807
|
+
sortBy: 'name',
|
|
9808
|
+
showSelectAll: false,
|
|
9809
|
+
selectAllLabel: 'Pilih Semua'
|
|
9745
9810
|
};
|
|
9746
9811
|
|
|
9747
9812
|
var _jsxFileName$t = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\components\\form\\components\\InputSelectTag\\InputSelectTag.js";
|
|
@@ -9771,6 +9836,7 @@ InputSelectTag.propTypes = {
|
|
|
9771
9836
|
onRemoveItem: PropTypes.func,
|
|
9772
9837
|
search: PropTypes.bool,
|
|
9773
9838
|
placement: PropTypes.oneOf(['top', 'bottom']),
|
|
9839
|
+
unremovableTags: PropTypes.arrayOf(PropTypes.string),
|
|
9774
9840
|
disabledOptions: PropTypes.arrayOf(PropTypes.string),
|
|
9775
9841
|
textEmptyItem: PropTypes.string,
|
|
9776
9842
|
helperText: PropTypes.string
|
|
@@ -9785,6 +9851,7 @@ InputSelectTag.defaultProps = {
|
|
|
9785
9851
|
placement: 'bottom',
|
|
9786
9852
|
value: [],
|
|
9787
9853
|
disabledOptions: [],
|
|
9854
|
+
unremovableTags: [],
|
|
9788
9855
|
textEmptyItem: 'Item tidak ditemukan',
|
|
9789
9856
|
sortBy: 'name'
|
|
9790
9857
|
};
|
|
@@ -10489,7 +10556,9 @@ const InputCounter = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10489
10556
|
allowNegative,
|
|
10490
10557
|
min,
|
|
10491
10558
|
max,
|
|
10492
|
-
disabled
|
|
10559
|
+
disabled,
|
|
10560
|
+
prefix,
|
|
10561
|
+
suffix
|
|
10493
10562
|
} = props;
|
|
10494
10563
|
const [inputValue, setInputValue] = useState((_a = min !== null && min !== void 0 ? min : value) !== null && _a !== void 0 ? _a : 0);
|
|
10495
10564
|
useEffect(() => {
|
|
@@ -10545,7 +10614,9 @@ const InputCounter = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10545
10614
|
disabled: disabled,
|
|
10546
10615
|
value: inputValue,
|
|
10547
10616
|
allowNegative: allowNegative,
|
|
10548
|
-
onChange: handleChange
|
|
10617
|
+
onChange: handleChange,
|
|
10618
|
+
prefix: prefix,
|
|
10619
|
+
suffix: suffix
|
|
10549
10620
|
}, void 0), jsx(Button, Object.assign({
|
|
10550
10621
|
disabled: disabled,
|
|
10551
10622
|
buttonType: "secondary",
|
|
@@ -14985,11 +15056,11 @@ const NativeTimePicker = ({
|
|
|
14985
15056
|
|
|
14986
15057
|
return /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
14987
15058
|
direction: "column",
|
|
14988
|
-
gap: size === 'sm' ? 4 : 5,
|
|
14989
15059
|
align: "center",
|
|
14990
15060
|
justify: "center",
|
|
14991
15061
|
css: {
|
|
14992
|
-
width: 'fit-content'
|
|
15062
|
+
width: 'fit-content',
|
|
15063
|
+
gap: size === 'sm' ? 14 : 18
|
|
14993
15064
|
},
|
|
14994
15065
|
__self: undefined,
|
|
14995
15066
|
__source: {
|
|
@@ -15003,7 +15074,7 @@ const NativeTimePicker = ({
|
|
|
15003
15074
|
__self: undefined,
|
|
15004
15075
|
__source: {
|
|
15005
15076
|
fileName: _jsxFileName$k,
|
|
15006
|
-
lineNumber:
|
|
15077
|
+
lineNumber: 165,
|
|
15007
15078
|
columnNumber: 7
|
|
15008
15079
|
}
|
|
15009
15080
|
}, /*#__PURE__*/React__default.createElement(IconStateFull$1, {
|
|
@@ -15013,7 +15084,7 @@ const NativeTimePicker = ({
|
|
|
15013
15084
|
__self: undefined,
|
|
15014
15085
|
__source: {
|
|
15015
15086
|
fileName: _jsxFileName$k,
|
|
15016
|
-
lineNumber:
|
|
15087
|
+
lineNumber: 166,
|
|
15017
15088
|
columnNumber: 9
|
|
15018
15089
|
}
|
|
15019
15090
|
}), /*#__PURE__*/React__default.createElement(IconStateFull$1, {
|
|
@@ -15023,7 +15094,7 @@ const NativeTimePicker = ({
|
|
|
15023
15094
|
__self: undefined,
|
|
15024
15095
|
__source: {
|
|
15025
15096
|
fileName: _jsxFileName$k,
|
|
15026
|
-
lineNumber:
|
|
15097
|
+
lineNumber: 167,
|
|
15027
15098
|
columnNumber: 9
|
|
15028
15099
|
}
|
|
15029
15100
|
})), /*#__PURE__*/React__default.createElement(Input$3, {
|
|
@@ -15034,7 +15105,7 @@ const NativeTimePicker = ({
|
|
|
15034
15105
|
__self: undefined,
|
|
15035
15106
|
__source: {
|
|
15036
15107
|
fileName: _jsxFileName$k,
|
|
15037
|
-
lineNumber:
|
|
15108
|
+
lineNumber: 169,
|
|
15038
15109
|
columnNumber: 7
|
|
15039
15110
|
}
|
|
15040
15111
|
}), /*#__PURE__*/React__default.createElement(Time, {
|
|
@@ -15042,7 +15113,7 @@ const NativeTimePicker = ({
|
|
|
15042
15113
|
__self: undefined,
|
|
15043
15114
|
__source: {
|
|
15044
15115
|
fileName: _jsxFileName$k,
|
|
15045
|
-
lineNumber:
|
|
15116
|
+
lineNumber: 170,
|
|
15046
15117
|
columnNumber: 7
|
|
15047
15118
|
}
|
|
15048
15119
|
}, moment(date).format(format)), /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
@@ -15051,7 +15122,7 @@ const NativeTimePicker = ({
|
|
|
15051
15122
|
__self: undefined,
|
|
15052
15123
|
__source: {
|
|
15053
15124
|
fileName: _jsxFileName$k,
|
|
15054
|
-
lineNumber:
|
|
15125
|
+
lineNumber: 171,
|
|
15055
15126
|
columnNumber: 7
|
|
15056
15127
|
}
|
|
15057
15128
|
}, /*#__PURE__*/React__default.createElement(IconStateFull$1, {
|
|
@@ -15061,7 +15132,7 @@ const NativeTimePicker = ({
|
|
|
15061
15132
|
__self: undefined,
|
|
15062
15133
|
__source: {
|
|
15063
15134
|
fileName: _jsxFileName$k,
|
|
15064
|
-
lineNumber:
|
|
15135
|
+
lineNumber: 172,
|
|
15065
15136
|
columnNumber: 9
|
|
15066
15137
|
}
|
|
15067
15138
|
}), /*#__PURE__*/React__default.createElement(IconStateFull$1, {
|
|
@@ -15071,7 +15142,7 @@ const NativeTimePicker = ({
|
|
|
15071
15142
|
__self: undefined,
|
|
15072
15143
|
__source: {
|
|
15073
15144
|
fileName: _jsxFileName$k,
|
|
15074
|
-
lineNumber:
|
|
15145
|
+
lineNumber: 173,
|
|
15075
15146
|
columnNumber: 9
|
|
15076
15147
|
}
|
|
15077
15148
|
})));
|
|
@@ -15127,7 +15198,7 @@ const TimePicker = ({
|
|
|
15127
15198
|
__self: undefined,
|
|
15128
15199
|
__source: {
|
|
15129
15200
|
fileName: _jsxFileName$k,
|
|
15130
|
-
lineNumber:
|
|
15201
|
+
lineNumber: 208,
|
|
15131
15202
|
columnNumber: 5
|
|
15132
15203
|
}
|
|
15133
15204
|
}, /*#__PURE__*/React__default.createElement(NativeTimePicker, {
|
|
@@ -15141,7 +15212,7 @@ const TimePicker = ({
|
|
|
15141
15212
|
__self: undefined,
|
|
15142
15213
|
__source: {
|
|
15143
15214
|
fileName: _jsxFileName$k,
|
|
15144
|
-
lineNumber:
|
|
15215
|
+
lineNumber: 209,
|
|
15145
15216
|
columnNumber: 7
|
|
15146
15217
|
}
|
|
15147
15218
|
}));
|
|
@@ -15214,7 +15285,7 @@ function InputTimePicker({
|
|
|
15214
15285
|
const isMobile = useMediaQuery(`(max-width: 480px)`);
|
|
15215
15286
|
|
|
15216
15287
|
function handleChange() {
|
|
15217
|
-
if (!disabled) {
|
|
15288
|
+
if (!disabled && !readOnly) {
|
|
15218
15289
|
setOpenPicker(!openPicker);
|
|
15219
15290
|
}
|
|
15220
15291
|
}
|
|
@@ -15249,8 +15320,9 @@ function InputTimePicker({
|
|
|
15249
15320
|
placeholder: placeholder,
|
|
15250
15321
|
value: getInputPickerValue$1(value),
|
|
15251
15322
|
defaultValue: defaultValue,
|
|
15252
|
-
|
|
15253
|
-
|
|
15323
|
+
onChange: () => {},
|
|
15324
|
+
isPicker: true // tabIndex="-1"
|
|
15325
|
+
,
|
|
15254
15326
|
__self: this,
|
|
15255
15327
|
__source: {
|
|
15256
15328
|
fileName: _jsxFileName$j,
|
|
@@ -15270,7 +15342,7 @@ function InputTimePicker({
|
|
|
15270
15342
|
__self: this,
|
|
15271
15343
|
__source: {
|
|
15272
15344
|
fileName: _jsxFileName$j,
|
|
15273
|
-
lineNumber:
|
|
15345
|
+
lineNumber: 55,
|
|
15274
15346
|
columnNumber: 5
|
|
15275
15347
|
}
|
|
15276
15348
|
});
|
|
@@ -15282,22 +15354,22 @@ function InputTimePicker({
|
|
|
15282
15354
|
__self: this,
|
|
15283
15355
|
__source: {
|
|
15284
15356
|
fileName: _jsxFileName$j,
|
|
15285
|
-
lineNumber:
|
|
15357
|
+
lineNumber: 67,
|
|
15286
15358
|
columnNumber: 5
|
|
15287
15359
|
}
|
|
15288
|
-
}, disabled ? /*#__PURE__*/React__default.createElement(Box, {
|
|
15360
|
+
}, disabled || readOnly ? /*#__PURE__*/React__default.createElement(Box, {
|
|
15289
15361
|
css: css,
|
|
15290
15362
|
__self: this,
|
|
15291
15363
|
__source: {
|
|
15292
15364
|
fileName: _jsxFileName$j,
|
|
15293
|
-
lineNumber:
|
|
15365
|
+
lineNumber: 69,
|
|
15294
15366
|
columnNumber: 9
|
|
15295
15367
|
}
|
|
15296
15368
|
}, renderInputGroup()) : /*#__PURE__*/React__default.createElement(PopoverTrigger, {
|
|
15297
15369
|
__self: this,
|
|
15298
15370
|
__source: {
|
|
15299
15371
|
fileName: _jsxFileName$j,
|
|
15300
|
-
lineNumber:
|
|
15372
|
+
lineNumber: 71,
|
|
15301
15373
|
columnNumber: 9
|
|
15302
15374
|
}
|
|
15303
15375
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -15305,14 +15377,14 @@ function InputTimePicker({
|
|
|
15305
15377
|
__self: this,
|
|
15306
15378
|
__source: {
|
|
15307
15379
|
fileName: _jsxFileName$j,
|
|
15308
|
-
lineNumber:
|
|
15380
|
+
lineNumber: 72,
|
|
15309
15381
|
columnNumber: 11
|
|
15310
15382
|
}
|
|
15311
15383
|
}, renderInputGroup())), /*#__PURE__*/React__default.createElement(PopoverContent, {
|
|
15312
15384
|
__self: this,
|
|
15313
15385
|
__source: {
|
|
15314
15386
|
fileName: _jsxFileName$j,
|
|
15315
|
-
lineNumber:
|
|
15387
|
+
lineNumber: 75,
|
|
15316
15388
|
columnNumber: 7
|
|
15317
15389
|
}
|
|
15318
15390
|
}, renderTimePicker())) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -15320,7 +15392,7 @@ function InputTimePicker({
|
|
|
15320
15392
|
__self: this,
|
|
15321
15393
|
__source: {
|
|
15322
15394
|
fileName: _jsxFileName$j,
|
|
15323
|
-
lineNumber:
|
|
15395
|
+
lineNumber: 79,
|
|
15324
15396
|
columnNumber: 7
|
|
15325
15397
|
}
|
|
15326
15398
|
}, renderInputGroup()), /*#__PURE__*/React__default.createElement(Drawer, {
|
|
@@ -15330,7 +15402,7 @@ function InputTimePicker({
|
|
|
15330
15402
|
__self: this,
|
|
15331
15403
|
__source: {
|
|
15332
15404
|
fileName: _jsxFileName$j,
|
|
15333
|
-
lineNumber:
|
|
15405
|
+
lineNumber: 80,
|
|
15334
15406
|
columnNumber: 7
|
|
15335
15407
|
}
|
|
15336
15408
|
}, /*#__PURE__*/React__default.createElement(DrawerContent, {
|
|
@@ -15341,7 +15413,7 @@ function InputTimePicker({
|
|
|
15341
15413
|
__self: this,
|
|
15342
15414
|
__source: {
|
|
15343
15415
|
fileName: _jsxFileName$j,
|
|
15344
|
-
lineNumber:
|
|
15416
|
+
lineNumber: 81,
|
|
15345
15417
|
columnNumber: 9
|
|
15346
15418
|
}
|
|
15347
15419
|
}, /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
@@ -15353,7 +15425,7 @@ function InputTimePicker({
|
|
|
15353
15425
|
__self: this,
|
|
15354
15426
|
__source: {
|
|
15355
15427
|
fileName: _jsxFileName$j,
|
|
15356
|
-
lineNumber:
|
|
15428
|
+
lineNumber: 87,
|
|
15357
15429
|
columnNumber: 11
|
|
15358
15430
|
}
|
|
15359
15431
|
}, renderTimePicker()))));
|
|
@@ -15845,7 +15917,7 @@ function InputDatePicker({
|
|
|
15845
15917
|
const isMobile = useMediaQuery(`(max-width: ${type === SINGLE_PICKER ? '480px' : '767px'})`);
|
|
15846
15918
|
|
|
15847
15919
|
function handleChange() {
|
|
15848
|
-
if (!disabled) {
|
|
15920
|
+
if (!disabled && !readOnly) {
|
|
15849
15921
|
setOpenPicker(!openPicker);
|
|
15850
15922
|
}
|
|
15851
15923
|
}
|
|
@@ -15905,7 +15977,7 @@ function InputDatePicker({
|
|
|
15905
15977
|
onOpenChange: setOpenPicker,
|
|
15906
15978
|
placement: placement
|
|
15907
15979
|
}, {
|
|
15908
|
-
children: [disabled ? jsx(Box, Object.assign({
|
|
15980
|
+
children: [disabled || readOnly ? jsx(Box, Object.assign({
|
|
15909
15981
|
css: css
|
|
15910
15982
|
}, {
|
|
15911
15983
|
children: renderInputGroup()
|
|
@@ -16433,7 +16505,7 @@ Pagination.propTypes = {
|
|
|
16433
16505
|
};
|
|
16434
16506
|
Pagination.displayName = 'Pagination';
|
|
16435
16507
|
|
|
16436
|
-
const TableContainer$
|
|
16508
|
+
const TableContainer$4 = styled(Flex$1, {
|
|
16437
16509
|
position: 'relative',
|
|
16438
16510
|
flexDirection: 'column',
|
|
16439
16511
|
width: '100%',
|
|
@@ -16442,7 +16514,7 @@ const TableContainer$3 = styled(Flex$1, {
|
|
|
16442
16514
|
overflowX: 'hidden',
|
|
16443
16515
|
padding: '0 $spacing-05'
|
|
16444
16516
|
});
|
|
16445
|
-
const TableHeadRow$
|
|
16517
|
+
const TableHeadRow$4 = styled('tr', {
|
|
16446
16518
|
borderBottom: '1pt solid $bgBorder',
|
|
16447
16519
|
'& th': {
|
|
16448
16520
|
paddingLeft: '$spacing-05'
|
|
@@ -16451,10 +16523,10 @@ const TableHeadRow$3 = styled('tr', {
|
|
|
16451
16523
|
padding: 0
|
|
16452
16524
|
}
|
|
16453
16525
|
});
|
|
16454
|
-
const TableHeadCell$
|
|
16526
|
+
const TableHeadCell$4 = styled('th', {
|
|
16455
16527
|
height: '40px'
|
|
16456
16528
|
});
|
|
16457
|
-
const TableRow$
|
|
16529
|
+
const TableRow$4 = styled('tr', {
|
|
16458
16530
|
borderBottom: '1pt solid $bgBorder',
|
|
16459
16531
|
'& td': {
|
|
16460
16532
|
paddingLeft: '$spacing-05'
|
|
@@ -16463,7 +16535,7 @@ const TableRow$3 = styled('tr', {
|
|
|
16463
16535
|
padding: 0
|
|
16464
16536
|
}
|
|
16465
16537
|
});
|
|
16466
|
-
const TableCell$
|
|
16538
|
+
const TableCell$4 = styled('td', {
|
|
16467
16539
|
height: '40px',
|
|
16468
16540
|
fontSize: '$short-content-regular',
|
|
16469
16541
|
lineHeight: '$short-content-regular',
|
|
@@ -16497,16 +16569,16 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
16497
16569
|
sortBy
|
|
16498
16570
|
}
|
|
16499
16571
|
} = instance;
|
|
16500
|
-
return jsx(TableContainer$
|
|
16572
|
+
return jsx(TableContainer$4, Object.assign({
|
|
16501
16573
|
css: css,
|
|
16502
16574
|
ref: ref
|
|
16503
16575
|
}, {
|
|
16504
|
-
children: infiniteScrollWrapper(jsxs(TableContent$
|
|
16505
|
-
children: [jsx(TableHead$
|
|
16506
|
-
children: headerGroups.map(headerGroup => jsx(TableHeadRow$
|
|
16576
|
+
children: infiniteScrollWrapper(jsxs(TableContent$3, Object.assign({}, getTableProps(), {
|
|
16577
|
+
children: [jsx(TableHead$3, {
|
|
16578
|
+
children: headerGroups.map(headerGroup => jsx(TableHeadRow$4, Object.assign({}, headerGroup.getHeaderGroupProps(), {
|
|
16507
16579
|
children: headerGroup.headers.filter(column => column.isMobileHeader || column.id === 'selection').map(column => {
|
|
16508
16580
|
const headerRender = column.render('Header');
|
|
16509
|
-
return jsx(TableHeadCell$
|
|
16581
|
+
return jsx(TableHeadCell$4, Object.assign({}, column.getHeaderProps(!column.unsortable ? column.getSortByToggleProps({
|
|
16510
16582
|
title: 'Urutkan'
|
|
16511
16583
|
}) : {}), {
|
|
16512
16584
|
children: typeof headerRender === 'string' ? jsx(TableHeaderCellContainer, Object.assign({
|
|
@@ -16525,7 +16597,7 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
16525
16597
|
}), void 0);
|
|
16526
16598
|
})
|
|
16527
16599
|
}), void 0))
|
|
16528
|
-
}, void 0), jsx(TableBody$
|
|
16600
|
+
}, void 0), jsx(TableBody$3, Object.assign({}, getTableBodyProps(), {
|
|
16529
16601
|
children: page.map(row => {
|
|
16530
16602
|
prepareRow(row);
|
|
16531
16603
|
const actionCells = row.allCells.filter(cell => cell.column.id === 'menu' || cell.column.isAction);
|
|
@@ -16546,11 +16618,11 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
16546
16618
|
variant: "contentButton"
|
|
16547
16619
|
}, {
|
|
16548
16620
|
children: row.cells[0].render('Cell')
|
|
16549
|
-
}), void 0)), jsx(TableRow$
|
|
16621
|
+
}), void 0)), jsx(TableRow$4, Object.assign({
|
|
16550
16622
|
css: customStyle
|
|
16551
16623
|
}, row.getRowProps(), {
|
|
16552
16624
|
children: row.cells.filter(cell => cell.column.isMobileHeader || cell.column.id === 'selection').map(cell => {
|
|
16553
|
-
return jsx(TableCell$
|
|
16625
|
+
return jsx(TableCell$4, Object.assign({}, cell.getCellProps(addOnCellStyle(cell.column.id)), {
|
|
16554
16626
|
children: cell.column.accessor ? jsxs(Flex$1, Object.assign({
|
|
16555
16627
|
justify: "between",
|
|
16556
16628
|
align: "center",
|
|
@@ -16569,8 +16641,8 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
16569
16641
|
}), void 0) : cell.render('Cell')
|
|
16570
16642
|
}), void 0);
|
|
16571
16643
|
})
|
|
16572
|
-
}), void 0), ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row)), row.isExpanded ? jsx(TableRow$
|
|
16573
|
-
children: jsxs(TableCell$
|
|
16644
|
+
}), void 0), ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row)), row.isExpanded ? jsx(TableRow$4, {
|
|
16645
|
+
children: jsxs(TableCell$4, Object.assign({
|
|
16574
16646
|
colSpan: visibleColumns.length
|
|
16575
16647
|
}, {
|
|
16576
16648
|
children: [jsx(Flex$1, Object.assign({
|
|
@@ -16637,7 +16709,7 @@ const MobileTable = /*#__PURE__*/React__default.forwardRef(({
|
|
|
16637
16709
|
}), void 0);
|
|
16638
16710
|
});
|
|
16639
16711
|
|
|
16640
|
-
const TableContainer$
|
|
16712
|
+
const TableContainer$3 = styled('div', {
|
|
16641
16713
|
display: 'block',
|
|
16642
16714
|
flexDirection: 'column',
|
|
16643
16715
|
maxWidth: '100%',
|
|
@@ -16645,7 +16717,7 @@ const TableContainer$2 = styled('div', {
|
|
|
16645
16717
|
height: '100%',
|
|
16646
16718
|
overflow: 'auto'
|
|
16647
16719
|
});
|
|
16648
|
-
const TableContent$
|
|
16720
|
+
const TableContent$3 = styled('table', {
|
|
16649
16721
|
width: '100%',
|
|
16650
16722
|
borderSpacing: 0,
|
|
16651
16723
|
borderCollapse: 'collapse',
|
|
@@ -16653,7 +16725,7 @@ const TableContent$2 = styled('table', {
|
|
|
16653
16725
|
backgroundColor: '$bgWhite'
|
|
16654
16726
|
}
|
|
16655
16727
|
});
|
|
16656
|
-
const TableHead$
|
|
16728
|
+
const TableHead$3 = styled('thead', {
|
|
16657
16729
|
position: 'sticky',
|
|
16658
16730
|
top: 0,
|
|
16659
16731
|
backgroundColor: '$bgWhite',
|
|
@@ -16661,8 +16733,8 @@ const TableHead$2 = styled('thead', {
|
|
|
16661
16733
|
borderBottom: '1pt solid $bgBorder',
|
|
16662
16734
|
color: '$textPrimary'
|
|
16663
16735
|
});
|
|
16664
|
-
const TableHeadRow$
|
|
16665
|
-
const TableHeadCell$
|
|
16736
|
+
const TableHeadRow$3 = styled('tr');
|
|
16737
|
+
const TableHeadCell$3 = styled('th', {
|
|
16666
16738
|
height: '64px'
|
|
16667
16739
|
});
|
|
16668
16740
|
const TableHeaderCellContainer = styled(Flex$1, {
|
|
@@ -16763,8 +16835,8 @@ const TableHeadCellContent = styled(Heading, {
|
|
|
16763
16835
|
}
|
|
16764
16836
|
}
|
|
16765
16837
|
});
|
|
16766
|
-
const TableBody$
|
|
16767
|
-
const TableRow$
|
|
16838
|
+
const TableBody$3 = styled('tbody', {});
|
|
16839
|
+
const TableRow$3 = styled('tr', {
|
|
16768
16840
|
borderBottom: '1pt solid $bgBorder',
|
|
16769
16841
|
'&:hover': {
|
|
16770
16842
|
backgroundColor: '$bgGray',
|
|
@@ -16784,7 +16856,7 @@ const TableRow$2 = styled('tr', {
|
|
|
16784
16856
|
}
|
|
16785
16857
|
}
|
|
16786
16858
|
});
|
|
16787
|
-
const TableCell$
|
|
16859
|
+
const TableCell$3 = styled('td', {
|
|
16788
16860
|
height: '68px',
|
|
16789
16861
|
fontSize: '$short-content-regular',
|
|
16790
16862
|
lineHeight: '$short-content-regular',
|
|
@@ -17063,20 +17135,20 @@ function Table({
|
|
|
17063
17135
|
children: "Loading .... "
|
|
17064
17136
|
}), void 0)
|
|
17065
17137
|
}), void 0), !isMobile ? jsxs(Fragment, {
|
|
17066
|
-
children: [jsx(TableContainer$
|
|
17138
|
+
children: [jsx(TableContainer$3, Object.assign({
|
|
17067
17139
|
css: css,
|
|
17068
17140
|
ref: scrollerRef
|
|
17069
17141
|
}, {
|
|
17070
|
-
children: renderInfiniteScrollWrapper(jsxs(TableContent$
|
|
17071
|
-
children: [jsx(TableHead$
|
|
17142
|
+
children: renderInfiniteScrollWrapper(jsxs(TableContent$3, Object.assign({}, getTableProps(), {
|
|
17143
|
+
children: [jsx(TableHead$3, Object.assign({
|
|
17072
17144
|
css: headerCss
|
|
17073
17145
|
}, {
|
|
17074
17146
|
children: headerGroups.map(headerGroup => {
|
|
17075
17147
|
const visibleHeaders = headerGroup.headers.filter(column => !column.isSubRow);
|
|
17076
|
-
return jsx(TableHeadRow$
|
|
17148
|
+
return jsx(TableHeadRow$3, Object.assign({}, headerGroup.getHeaderGroupProps(), {
|
|
17077
17149
|
children: visibleHeaders.map((column, index) => {
|
|
17078
17150
|
const headerRender = column.render('Header');
|
|
17079
|
-
return jsx(TableHeadCell$
|
|
17151
|
+
return jsx(TableHeadCell$3, Object.assign({}, column.getHeaderProps(props => [props, // column.getSortByToggleProps && !column.unsortable
|
|
17080
17152
|
!column.unsortable ? column.getSortByToggleProps({
|
|
17081
17153
|
title: 'Urutkan'
|
|
17082
17154
|
}) : {}, {
|
|
@@ -17118,7 +17190,7 @@ function Table({
|
|
|
17118
17190
|
})
|
|
17119
17191
|
}), void 0);
|
|
17120
17192
|
})
|
|
17121
|
-
}), void 0), jsx(TableBody$
|
|
17193
|
+
}), void 0), jsx(TableBody$3, Object.assign({}, getTableBodyProps(), {
|
|
17122
17194
|
children: page.map((row, i) => {
|
|
17123
17195
|
var _a;
|
|
17124
17196
|
|
|
@@ -17141,11 +17213,11 @@ function Table({
|
|
|
17141
17213
|
variant: "contentButton"
|
|
17142
17214
|
}, {
|
|
17143
17215
|
children: row.cells[0].render('Cell')
|
|
17144
|
-
}), void 0)), jsx(TableRow$
|
|
17216
|
+
}), void 0)), jsx(TableRow$3, Object.assign({
|
|
17145
17217
|
css: customStyle
|
|
17146
17218
|
}, row.getRowProps(), {
|
|
17147
17219
|
children: row.cells.filter(cell => !cell.column.isSubRow).map(cell => {
|
|
17148
|
-
return jsx(TableCell$
|
|
17220
|
+
return jsx(TableCell$3, Object.assign({}, cell.getCellProps(addOnCellStyle(cell.column.id)), {
|
|
17149
17221
|
css: Object.assign({
|
|
17150
17222
|
padding: cell.column.accessor ? '20px 8px' : '20px 20px',
|
|
17151
17223
|
verticalAlign: cell.column.accessor ? cellAlign : 'center'
|
|
@@ -17154,11 +17226,11 @@ function Table({
|
|
|
17154
17226
|
children: cell.render('Cell')
|
|
17155
17227
|
}), void 0);
|
|
17156
17228
|
})
|
|
17157
|
-
}), void 0), ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row)), row.isExpanded ? subRowCells.map((cell, index) => jsxs(TableRow$
|
|
17229
|
+
}), void 0), ((rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.showGroupingWhenSorted) || sortBy.length <= 0) && row.original['isBottomChild'] && !!(rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender) && (rowGroup === null || rowGroup === void 0 ? void 0 : rowGroup.footerRender(row)), row.isExpanded ? subRowCells.map((cell, index) => jsxs(TableRow$3, Object.assign({
|
|
17158
17230
|
subRow: true
|
|
17159
17231
|
}, {
|
|
17160
17232
|
children: [leftAddOnCells.map((_, index) => jsx("td", {}, index)), jsxs(React.Fragment, {
|
|
17161
|
-
children: [jsx(TableCell$
|
|
17233
|
+
children: [jsx(TableCell$3, Object.assign({
|
|
17162
17234
|
subCell: true,
|
|
17163
17235
|
colSpan: notNullHeaderColumns.length > 5 ? 2 : 1,
|
|
17164
17236
|
headerSubCell: true,
|
|
@@ -17172,7 +17244,7 @@ function Table({
|
|
|
17172
17244
|
}, {
|
|
17173
17245
|
children: cell.column.Header
|
|
17174
17246
|
}), void 0)
|
|
17175
|
-
}), void 0), jsx(TableCell$
|
|
17247
|
+
}), void 0), jsx(TableCell$3, Object.assign({
|
|
17176
17248
|
subCell: true,
|
|
17177
17249
|
colSpan: visibleColumns.length - subRowCells.length,
|
|
17178
17250
|
css: {
|
|
@@ -18312,9 +18384,12 @@ const PageDialog = props => {
|
|
|
18312
18384
|
css,
|
|
18313
18385
|
layer,
|
|
18314
18386
|
isMobile: _isMobile,
|
|
18315
|
-
onOpenAutoFocus
|
|
18387
|
+
onOpenAutoFocus,
|
|
18388
|
+
onCloseAutoFocus,
|
|
18389
|
+
onPointerDownOutside,
|
|
18390
|
+
onInteractOutside
|
|
18316
18391
|
} = props,
|
|
18317
|
-
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "onOpenAutoFocus"]);
|
|
18392
|
+
rest = __rest(props, ["children", "size", "css", "layer", "isMobile", "onOpenAutoFocus", "onCloseAutoFocus", "onPointerDownOutside", "onInteractOutside"]);
|
|
18318
18393
|
|
|
18319
18394
|
const childArray = React__default.Children.toArray(children);
|
|
18320
18395
|
const footerChildren = findNodeChild(childArray, 'PageDialogFooter');
|
|
@@ -18347,9 +18422,27 @@ const PageDialog = props => {
|
|
|
18347
18422
|
onOpenAutoFocus(e);
|
|
18348
18423
|
}
|
|
18349
18424
|
},
|
|
18350
|
-
onCloseAutoFocus: e =>
|
|
18351
|
-
|
|
18352
|
-
|
|
18425
|
+
onCloseAutoFocus: e => {
|
|
18426
|
+
if (!onCloseAutoFocus) {
|
|
18427
|
+
e.preventDefault();
|
|
18428
|
+
} else {
|
|
18429
|
+
onCloseAutoFocus(e);
|
|
18430
|
+
}
|
|
18431
|
+
},
|
|
18432
|
+
onPointerDownOutside: e => {
|
|
18433
|
+
if (!onPointerDownOutside) {
|
|
18434
|
+
e.preventDefault();
|
|
18435
|
+
} else {
|
|
18436
|
+
onPointerDownOutside(e);
|
|
18437
|
+
}
|
|
18438
|
+
},
|
|
18439
|
+
onInteractOutside: e => {
|
|
18440
|
+
if (!onInteractOutside) {
|
|
18441
|
+
e.preventDefault();
|
|
18442
|
+
} else {
|
|
18443
|
+
onInteractOutside(e);
|
|
18444
|
+
}
|
|
18445
|
+
}
|
|
18353
18446
|
}, {
|
|
18354
18447
|
children: jsxs(Box, Object.assign({
|
|
18355
18448
|
css: {
|
|
@@ -26339,29 +26432,29 @@ Collapalse.defaultProps = {
|
|
|
26339
26432
|
isOpen: false
|
|
26340
26433
|
};
|
|
26341
26434
|
|
|
26342
|
-
const TableContainer$
|
|
26435
|
+
const TableContainer$2 = styled('div', {
|
|
26343
26436
|
display: 'block',
|
|
26344
26437
|
flexDirection: 'column',
|
|
26345
26438
|
maxWidth: '100%',
|
|
26346
26439
|
position: 'relative',
|
|
26347
26440
|
height: '100%'
|
|
26348
26441
|
});
|
|
26349
|
-
const TableContent$
|
|
26442
|
+
const TableContent$2 = styled('table', {
|
|
26350
26443
|
width: '100%',
|
|
26351
26444
|
borderSpacing: 0,
|
|
26352
26445
|
borderCollapse: 'collapse'
|
|
26353
26446
|
});
|
|
26354
|
-
const TableHead$
|
|
26447
|
+
const TableHead$2 = styled('thead', {
|
|
26355
26448
|
position: 'sticky',
|
|
26356
26449
|
top: 0,
|
|
26357
26450
|
backgroundColor: '$gray50',
|
|
26358
26451
|
boxShadow: '0 4px 4px rgba(0, 0, 0, 0.025)',
|
|
26359
26452
|
zIndex: 10
|
|
26360
26453
|
});
|
|
26361
|
-
const TableHeadRow$
|
|
26454
|
+
const TableHeadRow$2 = styled('tr', {
|
|
26362
26455
|
borderBottom: '1pt solid $bgBorder'
|
|
26363
26456
|
});
|
|
26364
|
-
const TableHeadCell$
|
|
26457
|
+
const TableHeadCell$2 = styled('th', {
|
|
26365
26458
|
height: '41px',
|
|
26366
26459
|
fontSize: '$header-table',
|
|
26367
26460
|
fontWeight: 600,
|
|
@@ -26369,8 +26462,8 @@ const TableHeadCell$1 = styled('th', {
|
|
|
26369
26462
|
textAlign: 'left',
|
|
26370
26463
|
paddingLeft: 8
|
|
26371
26464
|
});
|
|
26372
|
-
const TableBody$
|
|
26373
|
-
const TableRow$
|
|
26465
|
+
const TableBody$2 = styled('tbody', {});
|
|
26466
|
+
const TableRow$2 = styled('tr', {
|
|
26374
26467
|
'&:hover': {
|
|
26375
26468
|
backgroundColor: '$bgGray'
|
|
26376
26469
|
}
|
|
@@ -26381,7 +26474,7 @@ const TableRowCollapse = styled('tr', {
|
|
|
26381
26474
|
backgroundColor: '$bgGray'
|
|
26382
26475
|
}
|
|
26383
26476
|
});
|
|
26384
|
-
const TableCell$
|
|
26477
|
+
const TableCell$2 = styled('td', {
|
|
26385
26478
|
fontSize: '$short-content-regular',
|
|
26386
26479
|
lineHeight: '$short-content-regular',
|
|
26387
26480
|
letterSpacing: '$short-content-regular',
|
|
@@ -26411,7 +26504,7 @@ const TableCellCollapse = styled('td', {
|
|
|
26411
26504
|
paddingRight: 16
|
|
26412
26505
|
}
|
|
26413
26506
|
});
|
|
26414
|
-
const Required$
|
|
26507
|
+
const Required$2 = styled('span', {
|
|
26415
26508
|
marginLeft: 4,
|
|
26416
26509
|
color: '$textRed !important'
|
|
26417
26510
|
});
|
|
@@ -26429,14 +26522,14 @@ function EditableTableMobile(props) {
|
|
|
26429
26522
|
state,
|
|
26430
26523
|
toggleAllRowsExpanded
|
|
26431
26524
|
} = instance;
|
|
26432
|
-
return jsx(TableContainer$
|
|
26525
|
+
return jsx(TableContainer$2, Object.assign({
|
|
26433
26526
|
css: props === null || props === void 0 ? void 0 : props.css
|
|
26434
26527
|
}, {
|
|
26435
|
-
children: jsxs(TableContent$
|
|
26436
|
-
children: [jsx(TableHead$
|
|
26437
|
-
children: headerGroups.map((headerGroup, index) => /*#__PURE__*/createElement$2(TableHeadRow$
|
|
26528
|
+
children: jsxs(TableContent$2, Object.assign({}, getTableProps(), {
|
|
26529
|
+
children: [jsx(TableHead$2, {
|
|
26530
|
+
children: headerGroups.map((headerGroup, index) => /*#__PURE__*/createElement$2(TableHeadRow$2, Object.assign({}, headerGroup.getHeaderGroupProps(), {
|
|
26438
26531
|
key: index
|
|
26439
|
-
}), headerGroup.headers.map((column, index) => (column === null || column === void 0 ? void 0 : column.isMobileHeader) && /*#__PURE__*/createElement$2(TableHeadCell$
|
|
26532
|
+
}), headerGroup.headers.map((column, index) => (column === null || column === void 0 ? void 0 : column.isMobileHeader) && /*#__PURE__*/createElement$2(TableHeadCell$2, Object.assign({}, column.getHeaderProps({
|
|
26440
26533
|
style: {
|
|
26441
26534
|
minWidth: column.minWidth,
|
|
26442
26535
|
width: column.width,
|
|
@@ -26444,17 +26537,17 @@ function EditableTableMobile(props) {
|
|
|
26444
26537
|
}
|
|
26445
26538
|
}), {
|
|
26446
26539
|
key: index
|
|
26447
|
-
}), column.render('Header'), (column === null || column === void 0 ? void 0 : column.isRequired) ? jsx(Required$
|
|
26540
|
+
}), column.render('Header'), (column === null || column === void 0 ? void 0 : column.isRequired) ? jsx(Required$2, {
|
|
26448
26541
|
children: "*"
|
|
26449
26542
|
}, void 0) : ''))))
|
|
26450
|
-
}, void 0), jsx(TableBody$
|
|
26543
|
+
}, void 0), jsx(TableBody$2, Object.assign({}, getTableBodyProps(), {
|
|
26451
26544
|
children: rows.map((row, index) => {
|
|
26452
26545
|
prepareRow(row);
|
|
26453
26546
|
return jsxs(React__default.Fragment, {
|
|
26454
|
-
children: [/*#__PURE__*/createElement$2(TableRow$
|
|
26547
|
+
children: [/*#__PURE__*/createElement$2(TableRow$2, Object.assign({}, row.getRowProps(), {
|
|
26455
26548
|
key: `row_mobile_${index}`
|
|
26456
26549
|
}), row.cells.map((cell, index) => {
|
|
26457
|
-
return cell.column.isMobileHeader && /*#__PURE__*/createElement$2(TableCell$
|
|
26550
|
+
return cell.column.isMobileHeader && /*#__PURE__*/createElement$2(TableCell$2, Object.assign({}, cell.getCellProps({
|
|
26458
26551
|
style: {
|
|
26459
26552
|
minWidth: cell.column.minWidth,
|
|
26460
26553
|
width: cell.column.width,
|
|
@@ -26468,20 +26561,20 @@ function EditableTableMobile(props) {
|
|
|
26468
26561
|
css: {
|
|
26469
26562
|
cursor: 'pointer',
|
|
26470
26563
|
minHeight: 40
|
|
26471
|
-
},
|
|
26472
|
-
onClick: () => {
|
|
26473
|
-
if (!Object.keys(state.expanded).includes(row.id)) {
|
|
26474
|
-
toggleAllRowsExpanded(false);
|
|
26475
|
-
}
|
|
26476
|
-
|
|
26477
|
-
row.toggleRowExpanded(!row.isExpanded);
|
|
26478
26564
|
}
|
|
26479
26565
|
}, {
|
|
26480
26566
|
children: [jsx(Box, {
|
|
26481
26567
|
children: cell.render('Cell')
|
|
26482
26568
|
}, void 0), jsx(Flex$1, Object.assign({
|
|
26483
26569
|
justify: "center",
|
|
26484
|
-
align: "center"
|
|
26570
|
+
align: "center",
|
|
26571
|
+
onClick: () => {
|
|
26572
|
+
if (!Object.keys(state.expanded).includes(row.id)) {
|
|
26573
|
+
toggleAllRowsExpanded(false);
|
|
26574
|
+
}
|
|
26575
|
+
|
|
26576
|
+
row.toggleRowExpanded(!row.isExpanded);
|
|
26577
|
+
}
|
|
26485
26578
|
}, {
|
|
26486
26579
|
children: row.isExpanded ? jsx(ChevronUpOutline, {}, void 0) : jsx(ChevronDownOutline, {}, void 0)
|
|
26487
26580
|
}), void 0)]
|
|
@@ -26531,7 +26624,7 @@ function EditableTableMobile(props) {
|
|
|
26531
26624
|
color: "secondary"
|
|
26532
26625
|
}, {
|
|
26533
26626
|
children: typeof headerRender === 'string' ? jsxs(Fragment, {
|
|
26534
|
-
children: [headerRender === null || headerRender === void 0 ? void 0 : headerRender.toUpperCase(), ((_b = cell === null || cell === void 0 ? void 0 : cell.column) === null || _b === void 0 ? void 0 : _b.isRequired) ? jsx(Required$
|
|
26627
|
+
children: [headerRender === null || headerRender === void 0 ? void 0 : headerRender.toUpperCase(), ((_b = cell === null || cell === void 0 ? void 0 : cell.column) === null || _b === void 0 ? void 0 : _b.isRequired) ? jsx(Required$2, {
|
|
26535
26628
|
children: "*"
|
|
26536
26629
|
}, void 0) : '']
|
|
26537
26630
|
}, void 0) : headerRender
|
|
@@ -26579,7 +26672,7 @@ function EditableTableMobile(props) {
|
|
|
26579
26672
|
}), void 0);
|
|
26580
26673
|
}
|
|
26581
26674
|
|
|
26582
|
-
const TableContainer = styled('div', {
|
|
26675
|
+
const TableContainer$1 = styled('div', {
|
|
26583
26676
|
display: 'block',
|
|
26584
26677
|
flexDirection: 'column',
|
|
26585
26678
|
maxWidth: '100%',
|
|
@@ -26587,22 +26680,22 @@ const TableContainer = styled('div', {
|
|
|
26587
26680
|
height: '100%',
|
|
26588
26681
|
overflow: 'auto'
|
|
26589
26682
|
});
|
|
26590
|
-
const TableContent = styled('table', {
|
|
26683
|
+
const TableContent$1 = styled('table', {
|
|
26591
26684
|
width: '100%',
|
|
26592
26685
|
borderSpacing: 0,
|
|
26593
26686
|
borderCollapse: 'collapse'
|
|
26594
26687
|
});
|
|
26595
|
-
const TableHead = styled('thead', {
|
|
26688
|
+
const TableHead$1 = styled('thead', {
|
|
26596
26689
|
position: 'sticky',
|
|
26597
26690
|
top: 0,
|
|
26598
26691
|
backgroundColor: '$gray50',
|
|
26599
26692
|
boxShadow: '0 4px 4px rgba(0, 0, 0, 0.025)',
|
|
26600
26693
|
zIndex: 10
|
|
26601
26694
|
});
|
|
26602
|
-
const TableHeadRow = styled('tr', {
|
|
26695
|
+
const TableHeadRow$1 = styled('tr', {
|
|
26603
26696
|
borderBottom: '1pt solid $bgBorder'
|
|
26604
26697
|
});
|
|
26605
|
-
const TableHeadCell = styled('th', {
|
|
26698
|
+
const TableHeadCell$1 = styled('th', {
|
|
26606
26699
|
height: '48px',
|
|
26607
26700
|
fontSize: '$header-table',
|
|
26608
26701
|
fontWeight: 600,
|
|
@@ -26610,8 +26703,8 @@ const TableHeadCell = styled('th', {
|
|
|
26610
26703
|
textAlign: 'left',
|
|
26611
26704
|
paddingLeft: 8
|
|
26612
26705
|
});
|
|
26613
|
-
const TableBody = styled('tbody', {});
|
|
26614
|
-
const TableRow = styled('tr', {
|
|
26706
|
+
const TableBody$1 = styled('tbody', {});
|
|
26707
|
+
const TableRow$1 = styled('tr', {
|
|
26615
26708
|
borderTop: '1pt solid $bgBorder',
|
|
26616
26709
|
'&:last-child': {
|
|
26617
26710
|
borderBottom: '1pt solid $bgBorder'
|
|
@@ -26628,7 +26721,7 @@ const TableRow = styled('tr', {
|
|
|
26628
26721
|
}
|
|
26629
26722
|
}
|
|
26630
26723
|
});
|
|
26631
|
-
const TableCell = styled('td', {
|
|
26724
|
+
const TableCell$1 = styled('td', {
|
|
26632
26725
|
fontSize: '$short-content-regular',
|
|
26633
26726
|
lineHeight: '$short-content-regular',
|
|
26634
26727
|
letterSpacing: '$short-content-regular',
|
|
@@ -26657,7 +26750,7 @@ const TableCell = styled('td', {
|
|
|
26657
26750
|
}
|
|
26658
26751
|
}
|
|
26659
26752
|
});
|
|
26660
|
-
const TableCellContent = styled('div', {
|
|
26753
|
+
const TableCellContent$1 = styled('div', {
|
|
26661
26754
|
height: '100%',
|
|
26662
26755
|
paddingTop: 10,
|
|
26663
26756
|
paddingBottom: 10,
|
|
@@ -26748,7 +26841,7 @@ const RemoveIcon = styled(RemoveOutline, {
|
|
|
26748
26841
|
const Input$1 = styled(InputText, {
|
|
26749
26842
|
height: '32px !important'
|
|
26750
26843
|
});
|
|
26751
|
-
const Required = styled('span', {
|
|
26844
|
+
const Required$1 = styled('span', {
|
|
26752
26845
|
marginLeft: 4,
|
|
26753
26846
|
color: '$textRed !important'
|
|
26754
26847
|
});
|
|
@@ -26870,7 +26963,8 @@ function EditableTable(props) {
|
|
|
26870
26963
|
data,
|
|
26871
26964
|
emptyDataMessage,
|
|
26872
26965
|
rowHeight,
|
|
26873
|
-
align
|
|
26966
|
+
align,
|
|
26967
|
+
customRows
|
|
26874
26968
|
} = props;
|
|
26875
26969
|
const instance = useTable({
|
|
26876
26970
|
columns,
|
|
@@ -26886,38 +26980,61 @@ function EditableTable(props) {
|
|
|
26886
26980
|
visibleColumns
|
|
26887
26981
|
} = instance;
|
|
26888
26982
|
const isDesktop = useMediaQuery('(min-width: 767px)');
|
|
26889
|
-
return isDesktop ? jsx(TableContainer, Object.assign({
|
|
26983
|
+
return isDesktop ? jsx(TableContainer$1, Object.assign({
|
|
26890
26984
|
css: props === null || props === void 0 ? void 0 : props.css
|
|
26891
26985
|
}, {
|
|
26892
|
-
children: jsxs(TableContent, Object.assign({}, getTableProps(), {
|
|
26893
|
-
children: [jsx(TableHead, {
|
|
26986
|
+
children: jsxs(TableContent$1, Object.assign({}, getTableProps(), {
|
|
26987
|
+
children: [jsx(TableHead$1, {
|
|
26894
26988
|
children: headerGroups.map(headerGroup => {
|
|
26895
26989
|
const visibleHeaders = headerGroup.headers.filter(column => !column.isSubRow);
|
|
26896
|
-
return jsx(TableHeadRow, Object.assign({}, headerGroup.getHeaderGroupProps(), {
|
|
26897
|
-
children: visibleHeaders.map(column => !(column === null || column === void 0 ? void 0 : column.isMobileOnly) && jsxs(TableHeadCell, Object.assign({}, column.getHeaderProps({
|
|
26990
|
+
return jsx(TableHeadRow$1, Object.assign({}, headerGroup.getHeaderGroupProps(), {
|
|
26991
|
+
children: visibleHeaders.map(column => !(column === null || column === void 0 ? void 0 : column.isMobileOnly) && jsxs(TableHeadCell$1, Object.assign({}, column.getHeaderProps({
|
|
26898
26992
|
style: {
|
|
26899
26993
|
minWidth: column.minWidth,
|
|
26900
26994
|
width: column.width,
|
|
26901
26995
|
maxWidth: column.maxWidth
|
|
26902
26996
|
}
|
|
26903
26997
|
}), {
|
|
26904
|
-
children: [column.render('Header'), (column === null || column === void 0 ? void 0 : column.isRequired) ? jsx(Required, {
|
|
26998
|
+
children: [column.render('Header'), (column === null || column === void 0 ? void 0 : column.isRequired) ? jsx(Required$1, {
|
|
26905
26999
|
children: "*"
|
|
26906
27000
|
}, void 0) : '']
|
|
26907
27001
|
}), void 0))
|
|
26908
27002
|
}), void 0);
|
|
26909
27003
|
})
|
|
26910
|
-
}, void 0), jsx(TableBody, Object.assign({}, getTableBodyProps(), {
|
|
27004
|
+
}, void 0), jsx(TableBody$1, Object.assign({}, getTableBodyProps(), {
|
|
26911
27005
|
children: rows.map((row, index) => {
|
|
27006
|
+
var _a;
|
|
27007
|
+
|
|
26912
27008
|
prepareRow(row);
|
|
26913
27009
|
const subRowCells = row.cells.filter(cell => cell.column.isSubRow);
|
|
26914
27010
|
const notNullHeaderColumns = visibleColumns.filter(column => typeof column.Header !== 'function' && column.Header !== null && !column.isSubRow);
|
|
27011
|
+
let customStyle = {};
|
|
27012
|
+
let CustomRow;
|
|
27013
|
+
|
|
27014
|
+
if (customRows && customRows(row).length) {
|
|
27015
|
+
for (let i = 0; i < customRows(row).length; i++) {
|
|
27016
|
+
if (customRows(row)[i].predicate) {
|
|
27017
|
+
customStyle = (_a = customRows(row)[i]) === null || _a === void 0 ? void 0 : _a.css;
|
|
27018
|
+
|
|
27019
|
+
CustomRow = () => {
|
|
27020
|
+
var _a;
|
|
27021
|
+
|
|
27022
|
+
return (_a = customRows(row)[i]) === null || _a === void 0 ? void 0 : _a.Row(row.values);
|
|
27023
|
+
};
|
|
27024
|
+
}
|
|
27025
|
+
}
|
|
27026
|
+
}
|
|
27027
|
+
|
|
26915
27028
|
return jsxs(React__default.Fragment, {
|
|
26916
|
-
children: [
|
|
27029
|
+
children: [CustomRow ? jsx(CustomRow, {
|
|
27030
|
+
style: customStyle
|
|
27031
|
+
}, void 0) : jsx(TableRow$1, Object.assign({
|
|
27032
|
+
css: customStyle
|
|
27033
|
+
}, row.getRowProps(), {
|
|
26917
27034
|
children: row.cells.filter(cell => !cell.column.isSubRow).map(cell => {
|
|
26918
27035
|
var _a;
|
|
26919
27036
|
|
|
26920
|
-
return !((_a = cell.column) === null || _a === void 0 ? void 0 : _a.isMobileOnly) && jsx(TableCell, Object.assign({}, cell.getCellProps({
|
|
27037
|
+
return !((_a = cell.column) === null || _a === void 0 ? void 0 : _a.isMobileOnly) && jsx(TableCell$1, Object.assign({}, cell.getCellProps({
|
|
26921
27038
|
style: {
|
|
26922
27039
|
minWidth: cell.column.minWidth,
|
|
26923
27040
|
width: cell.column.width,
|
|
@@ -26930,7 +27047,7 @@ function EditableTable(props) {
|
|
|
26930
27047
|
}
|
|
26931
27048
|
}
|
|
26932
27049
|
}, {
|
|
26933
|
-
children: jsx(TableCellContent, Object.assign({
|
|
27050
|
+
children: jsx(TableCellContent$1, Object.assign({
|
|
26934
27051
|
align: align
|
|
26935
27052
|
}, {
|
|
26936
27053
|
children: cell.render('Cell')
|
|
@@ -26940,11 +27057,11 @@ function EditableTable(props) {
|
|
|
26940
27057
|
}), void 0), subRowCells.map(cell => {
|
|
26941
27058
|
var _a;
|
|
26942
27059
|
|
|
26943
|
-
return jsx(TableRow, Object.assign({
|
|
27060
|
+
return jsx(TableRow$1, Object.assign({
|
|
26944
27061
|
subRow: true
|
|
26945
27062
|
}, {
|
|
26946
27063
|
children: jsxs(React__default.Fragment, {
|
|
26947
|
-
children: [jsx(TableCell, Object.assign({
|
|
27064
|
+
children: [jsx(TableCell$1, Object.assign({
|
|
26948
27065
|
subCell: true,
|
|
26949
27066
|
colSpan: notNullHeaderColumns.length > 5 ? 2 : 1,
|
|
26950
27067
|
headerSubCell: true,
|
|
@@ -26962,7 +27079,7 @@ function EditableTable(props) {
|
|
|
26962
27079
|
}, {
|
|
26963
27080
|
children: cell.column.Header
|
|
26964
27081
|
}), void 0)
|
|
26965
|
-
}), void 0), jsx(TableCell, Object.assign({
|
|
27082
|
+
}), void 0), jsx(TableCell$1, Object.assign({
|
|
26966
27083
|
subCell: true,
|
|
26967
27084
|
colSpan: visibleColumns.length - subRowCells.length,
|
|
26968
27085
|
css: {
|
|
@@ -27015,6 +27132,8 @@ EditableTable.Product = Product;
|
|
|
27015
27132
|
EditableTable.Input = Input$1;
|
|
27016
27133
|
EditableTable.Switch = Switch;
|
|
27017
27134
|
EditableTable.Remove = Remove;
|
|
27135
|
+
EditableTable.TableRow = TableRow$1;
|
|
27136
|
+
EditableTable.TableCell = TableCell$1;
|
|
27018
27137
|
|
|
27019
27138
|
const Container$3 = styled$1('div', {});
|
|
27020
27139
|
const ProgressText = styled$1('p', {
|
|
@@ -28844,6 +28963,292 @@ LineChart.defaultProps = {
|
|
|
28844
28963
|
period: undefined
|
|
28845
28964
|
};
|
|
28846
28965
|
|
|
28966
|
+
const TableContainer = styled('div', {
|
|
28967
|
+
display: 'block',
|
|
28968
|
+
flexDirection: 'column',
|
|
28969
|
+
maxWidth: '100%',
|
|
28970
|
+
position: 'relative',
|
|
28971
|
+
height: '100%',
|
|
28972
|
+
overflow: 'auto'
|
|
28973
|
+
});
|
|
28974
|
+
const TableContent = styled('table', {
|
|
28975
|
+
width: '100%',
|
|
28976
|
+
borderSpacing: 0,
|
|
28977
|
+
borderCollapse: 'collapse'
|
|
28978
|
+
});
|
|
28979
|
+
const TableHead = styled('thead', {
|
|
28980
|
+
position: 'sticky',
|
|
28981
|
+
top: 0,
|
|
28982
|
+
backgroundColor: '$white',
|
|
28983
|
+
zIndex: 10
|
|
28984
|
+
});
|
|
28985
|
+
const TableHeadRow = styled('tr', {
|
|
28986
|
+
borderBottom: '1px solid $bgBorder'
|
|
28987
|
+
});
|
|
28988
|
+
const TableHeadCell = styled('th', {
|
|
28989
|
+
height: 44,
|
|
28990
|
+
fontSize: '$header-table',
|
|
28991
|
+
fontWeight: 600,
|
|
28992
|
+
color: '$textPrimary',
|
|
28993
|
+
textAlign: 'left',
|
|
28994
|
+
paddingLeft: 8
|
|
28995
|
+
});
|
|
28996
|
+
const TableBody = styled('tbody', {});
|
|
28997
|
+
const TableRow = styled('tr', {
|
|
28998
|
+
borderTop: '1pt solid $bgBorder',
|
|
28999
|
+
'&:last-child': {
|
|
29000
|
+
borderBottom: '1pt solid $bgBorder'
|
|
29001
|
+
},
|
|
29002
|
+
'&:hover': {
|
|
29003
|
+
backgroundColor: '$bgGray'
|
|
29004
|
+
},
|
|
29005
|
+
variants: {
|
|
29006
|
+
subRow: {
|
|
29007
|
+
true: {
|
|
29008
|
+
borderTop: 'none',
|
|
29009
|
+
borderBottom: '1pt solid $bgBorder'
|
|
29010
|
+
}
|
|
29011
|
+
}
|
|
29012
|
+
}
|
|
29013
|
+
});
|
|
29014
|
+
const TableCell = styled('td', {
|
|
29015
|
+
fontSize: '$short-content-regular',
|
|
29016
|
+
lineHeight: '$short-content-regular',
|
|
29017
|
+
letterSpacing: '$short-content-regular',
|
|
29018
|
+
fontWeight: 400,
|
|
29019
|
+
color: '$textPrimary',
|
|
29020
|
+
position: 'relative',
|
|
29021
|
+
paddingLeft: 8,
|
|
29022
|
+
height: 44,
|
|
29023
|
+
'&:last-child': {
|
|
29024
|
+
paddingRight: 8
|
|
29025
|
+
},
|
|
29026
|
+
variants: {
|
|
29027
|
+
verticalAlign: {
|
|
29028
|
+
top: {
|
|
29029
|
+
verticalAlign: 'top'
|
|
29030
|
+
},
|
|
29031
|
+
middle: {
|
|
29032
|
+
verticalAlign: 'middle'
|
|
29033
|
+
},
|
|
29034
|
+
bottom: {
|
|
29035
|
+
verticalAlign: 'bottom'
|
|
29036
|
+
}
|
|
29037
|
+
}
|
|
29038
|
+
}
|
|
29039
|
+
});
|
|
29040
|
+
const TableCellContent = styled('div', {
|
|
29041
|
+
height: '100%',
|
|
29042
|
+
paddingTop: 10,
|
|
29043
|
+
paddingBottom: 10,
|
|
29044
|
+
display: 'flex',
|
|
29045
|
+
userSelect: 'none',
|
|
29046
|
+
variants: {
|
|
29047
|
+
align: {
|
|
29048
|
+
top: {
|
|
29049
|
+
alignItems: 'start'
|
|
29050
|
+
},
|
|
29051
|
+
center: {
|
|
29052
|
+
alignItems: 'center'
|
|
29053
|
+
},
|
|
29054
|
+
bottom: {
|
|
29055
|
+
alignItems: 'end'
|
|
29056
|
+
}
|
|
29057
|
+
}
|
|
29058
|
+
}
|
|
29059
|
+
});
|
|
29060
|
+
const Required = styled('span', {
|
|
29061
|
+
marginLeft: 4,
|
|
29062
|
+
color: '$textRed !important'
|
|
29063
|
+
});
|
|
29064
|
+
function CheckboxTable(props) {
|
|
29065
|
+
const {
|
|
29066
|
+
columns,
|
|
29067
|
+
data,
|
|
29068
|
+
emptyDataMessage,
|
|
29069
|
+
rowHeight,
|
|
29070
|
+
align,
|
|
29071
|
+
onChange
|
|
29072
|
+
} = props;
|
|
29073
|
+
const [datasets, setDatasets] = useState([...data]);
|
|
29074
|
+
const instance = useTable({
|
|
29075
|
+
columns,
|
|
29076
|
+
data: datasets,
|
|
29077
|
+
autoResetExpanded: false
|
|
29078
|
+
}, useExpanded);
|
|
29079
|
+
const {
|
|
29080
|
+
getTableProps,
|
|
29081
|
+
getTableBodyProps,
|
|
29082
|
+
rows,
|
|
29083
|
+
headerGroups,
|
|
29084
|
+
prepareRow,
|
|
29085
|
+
toggleAllRowsExpanded,
|
|
29086
|
+
state
|
|
29087
|
+
} = instance;
|
|
29088
|
+
return jsxs(TableContainer, Object.assign({
|
|
29089
|
+
css: props === null || props === void 0 ? void 0 : props.css
|
|
29090
|
+
}, {
|
|
29091
|
+
children: [jsxs(TableContent, Object.assign({}, getTableProps(), {
|
|
29092
|
+
children: [jsx(TableHead, {
|
|
29093
|
+
children: headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => {
|
|
29094
|
+
const visibleHeaders = headerGroup.headers.filter(column => !column.isSubRow);
|
|
29095
|
+
return jsx(TableHeadRow, Object.assign({}, headerGroup.getHeaderGroupProps(), {
|
|
29096
|
+
children: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.map(column => jsxs(TableHeadCell, Object.assign({}, column.getHeaderProps({
|
|
29097
|
+
style: {
|
|
29098
|
+
minWidth: column.minWidth,
|
|
29099
|
+
width: column.width,
|
|
29100
|
+
maxWidth: column.maxWidth
|
|
29101
|
+
}
|
|
29102
|
+
}), {
|
|
29103
|
+
children: [column.render('Header'), (column === null || column === void 0 ? void 0 : column.isRequired) ? jsx(Required, {
|
|
29104
|
+
children: "*"
|
|
29105
|
+
}, void 0) : '']
|
|
29106
|
+
}), void 0))
|
|
29107
|
+
}), void 0);
|
|
29108
|
+
})
|
|
29109
|
+
}, void 0), jsx(TableBody, Object.assign({}, getTableBodyProps(), {
|
|
29110
|
+
children: rows === null || rows === void 0 ? void 0 : rows.map((row, index) => {
|
|
29111
|
+
var _a, _b, _c;
|
|
29112
|
+
|
|
29113
|
+
prepareRow(row);
|
|
29114
|
+
const originalRow = row.original;
|
|
29115
|
+
return jsxs(React__default.Fragment, {
|
|
29116
|
+
children: [/*#__PURE__*/createElement$2(TableRow, Object.assign({}, row.getRowProps(), {
|
|
29117
|
+
key: index
|
|
29118
|
+
}), (_b = (_a = row === null || row === void 0 ? void 0 : row.cells) === null || _a === void 0 ? void 0 : _a.filter(cell => !cell.column.isSubRow)) === null || _b === void 0 ? void 0 : _b.map((cell, indexCell) => {
|
|
29119
|
+
var _a;
|
|
29120
|
+
|
|
29121
|
+
const column = cell.column;
|
|
29122
|
+
const originalCell = cell.row.original;
|
|
29123
|
+
return /*#__PURE__*/createElement$2(TableCell, Object.assign({}, cell.getCellProps({
|
|
29124
|
+
style: {
|
|
29125
|
+
minWidth: column.minWidth,
|
|
29126
|
+
width: column.width,
|
|
29127
|
+
maxWidth: column.maxWidth
|
|
29128
|
+
}
|
|
29129
|
+
}), {
|
|
29130
|
+
key: index + indexCell + 'tb-cell',
|
|
29131
|
+
css: {
|
|
29132
|
+
'@md': {
|
|
29133
|
+
height: rowHeight
|
|
29134
|
+
}
|
|
29135
|
+
}
|
|
29136
|
+
}), jsxs(TableCellContent, Object.assign({
|
|
29137
|
+
align: align
|
|
29138
|
+
}, {
|
|
29139
|
+
children: [indexCell === 0 && jsx(Flex$1, Object.assign({
|
|
29140
|
+
justify: "center",
|
|
29141
|
+
align: "center",
|
|
29142
|
+
css: {
|
|
29143
|
+
marginRight: 12,
|
|
29144
|
+
cursor: 'pointer',
|
|
29145
|
+
display: ((_a = originalCell === null || originalCell === void 0 ? void 0 : originalCell.detail) === null || _a === void 0 ? void 0 : _a.length) ? 'flex' : 'none'
|
|
29146
|
+
},
|
|
29147
|
+
onClick: () => {
|
|
29148
|
+
if (!Object.keys(state.expanded).includes(row.id)) {
|
|
29149
|
+
toggleAllRowsExpanded(false);
|
|
29150
|
+
}
|
|
29151
|
+
|
|
29152
|
+
row.toggleRowExpanded(!row.isExpanded);
|
|
29153
|
+
}
|
|
29154
|
+
}, {
|
|
29155
|
+
children: row.isExpanded ? jsx(ChevronUpOutline, {}, void 0) : jsx(ChevronDownOutline, {}, void 0)
|
|
29156
|
+
}), void 0), cell.render('Cell')]
|
|
29157
|
+
}), void 0));
|
|
29158
|
+
})), (_c = originalRow === null || originalRow === void 0 ? void 0 : originalRow.detail) === null || _c === void 0 ? void 0 : _c.map((cell, index) => {
|
|
29159
|
+
const id_row = originalRow === null || originalRow === void 0 ? void 0 : originalRow.id;
|
|
29160
|
+
const {
|
|
29161
|
+
id: id_subrow,
|
|
29162
|
+
name,
|
|
29163
|
+
detail_method
|
|
29164
|
+
} = cell;
|
|
29165
|
+
const headerRender = name;
|
|
29166
|
+
return /*#__PURE__*/createElement$2(TableRow, Object.assign({}, row.getRowProps(), {
|
|
29167
|
+
key: `row_collapse_${index}`,
|
|
29168
|
+
css: {
|
|
29169
|
+
display: row.isExpanded ? 'table-row' : 'none'
|
|
29170
|
+
}
|
|
29171
|
+
}), jsx(TableCell, Object.assign({
|
|
29172
|
+
css: {
|
|
29173
|
+
'@md': {
|
|
29174
|
+
height: rowHeight
|
|
29175
|
+
}
|
|
29176
|
+
}
|
|
29177
|
+
}, {
|
|
29178
|
+
children: jsx(Box, Object.assign({
|
|
29179
|
+
css: {
|
|
29180
|
+
paddingLeft: 36
|
|
29181
|
+
}
|
|
29182
|
+
}, {
|
|
29183
|
+
children: headerRender
|
|
29184
|
+
}), void 0)
|
|
29185
|
+
}), index + 'tb-cell-collapse'), detail_method === null || detail_method === void 0 ? void 0 : detail_method.map((subRow, indexSubRow) => {
|
|
29186
|
+
const {
|
|
29187
|
+
id: id_col,
|
|
29188
|
+
is_grant,
|
|
29189
|
+
is_show
|
|
29190
|
+
} = subRow;
|
|
29191
|
+
return jsx(TableCell, Object.assign({
|
|
29192
|
+
css: {
|
|
29193
|
+
'@md': {
|
|
29194
|
+
height: rowHeight
|
|
29195
|
+
}
|
|
29196
|
+
}
|
|
29197
|
+
}, {
|
|
29198
|
+
children: jsx(Box, {
|
|
29199
|
+
children: Number(is_show) === 1 ? jsx(InputCheckbox, {
|
|
29200
|
+
checked: Number(is_grant) === 1,
|
|
29201
|
+
indeterminate: false,
|
|
29202
|
+
onCheckedChange: e => {
|
|
29203
|
+
const newDatasets = [...datasets];
|
|
29204
|
+
|
|
29205
|
+
for (const [indexDataRow, dataRow] of newDatasets.entries()) {
|
|
29206
|
+
const rowData = dataRow;
|
|
29207
|
+
|
|
29208
|
+
if ((rowData === null || rowData === void 0 ? void 0 : rowData.id) === id_row) {
|
|
29209
|
+
for (const [indexDataSubRow, dataSubRow] of rowData.detail.entries()) {
|
|
29210
|
+
if ((dataSubRow === null || dataSubRow === void 0 ? void 0 : dataSubRow.id) === id_subrow) {
|
|
29211
|
+
for (const [indexDataCol, dataCol] of dataSubRow.detail_method.entries()) {
|
|
29212
|
+
if ((dataCol === null || dataCol === void 0 ? void 0 : dataCol.id) === id_col) {
|
|
29213
|
+
newDatasets[indexDataRow].detail[indexDataSubRow].detail_method[indexDataCol].is_grant = e ? 1 : 0;
|
|
29214
|
+
}
|
|
29215
|
+
}
|
|
29216
|
+
}
|
|
29217
|
+
}
|
|
29218
|
+
}
|
|
29219
|
+
}
|
|
29220
|
+
|
|
29221
|
+
setDatasets(newDatasets);
|
|
29222
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newDatasets);
|
|
29223
|
+
}
|
|
29224
|
+
}, void 0) : jsx(MinusOutline, {
|
|
29225
|
+
size: 16,
|
|
29226
|
+
color: colors$4.iconDisable
|
|
29227
|
+
}, void 0)
|
|
29228
|
+
}, void 0)
|
|
29229
|
+
}), index + indexSubRow + 'tb-cell-collapse');
|
|
29230
|
+
}));
|
|
29231
|
+
})]
|
|
29232
|
+
}, void 0);
|
|
29233
|
+
})
|
|
29234
|
+
}), void 0)]
|
|
29235
|
+
}), void 0), rows.length < 1 && jsx(Flex$1, Object.assign({
|
|
29236
|
+
css: {
|
|
29237
|
+
padding: '$spacing-07'
|
|
29238
|
+
},
|
|
29239
|
+
align: "center",
|
|
29240
|
+
justify: "center"
|
|
29241
|
+
}, {
|
|
29242
|
+
children: jsx(Paragraph, Object.assign({
|
|
29243
|
+
paragraph: "shortContentRegular",
|
|
29244
|
+
color: "secondary"
|
|
29245
|
+
}, {
|
|
29246
|
+
children: emptyDataMessage || 'Tidak ada data'
|
|
29247
|
+
}), void 0)
|
|
29248
|
+
}), void 0)]
|
|
29249
|
+
}), void 0);
|
|
29250
|
+
}
|
|
29251
|
+
|
|
28847
29252
|
var _jsxFileName = "C:\\Users\\Lenovo\\Documents\\code\\majoo\\majoo-ui\\packages\\react\\src\\colors\\Colors.js";
|
|
28848
29253
|
const StyledPaper = styled(Paper, {
|
|
28849
29254
|
borderRadius: '10px 10px 0 0',
|
|
@@ -30345,4 +30750,4 @@ const useToggle = initialValue => {
|
|
|
30345
30750
|
return useReducer(toggleReducer, initialValue);
|
|
30346
30751
|
};
|
|
30347
30752
|
|
|
30348
|
-
export { ADVANCE_PICKER, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvancedOption, AlertDialog, AlertDialogCancel, AlertDialogConfirm, AlertDialogContent, AlertDialogDescription, AlertDialogFunction, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, Avatar, BOTTOM_LEFT_POSITION, BOTTOM_RIGHT_POSITION, Badge, Banner, BannerClose, BannerDescription, BannerLink, BannerTitle, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button$3 as Button, ButtonDropdown, ButtonGroup$1 as ButtonGroup, ButtonGroupItem, ButtonPrimitive, Card, CardComponent, CardLineColor, CheckboxGroup, ColorPicker$1 as ColorPicker, Colors, DateColumn, DatePicker, DecimalColumn, Device as DevicePreview, Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EditableTable, Flex$1 as Flex, FormGroup, FormHelper, FormLabel, Grid, GridItem, Heading, IconButton, IconContainer, Image, ImageDevicePreview, InputCheckbox, InputColorPicker, InputCombobox, InputCounter, InputCreatable, InputDatePicker, InputGroup, InputLeftAddon, InputLeftElement, InputMapPicker, InputNumber, InputOTP, InputPrefix, InputRadio, InputRadioGroup, InputResourceList, InputRightAddon, InputRightElement, InputSearchbox, InputSelect, InputSelectCheck, InputSelectTag, InputSuffix, InputSwitch, TagsInput as InputTags, InputText, InputTextArea, InputTimePicker, LAST_7_DAYS, LAST_MONTH, LAST_TWO_MONTHS, LAST_WEEK, LineChart, Link, LoadingBar, MajooProvider, MapPicker, MobileTable, ModalDialog, ModalDialogContent, ModalDialogFooter, ModalDialogTitle, ModalDialogTrigger, NativeTimePicker, NotificationBadge, OptionWrapper$2 as OptionWrapper, PageContainer, PageDialog, PageDialogContent, PageDialogFooter, PageDialogTitle, PageDialogTrigger, Pagination, Paper, PaperComponent, Paragraph, Popover, PopoverClose, PopoverContent, PopoverTrigger, PriceColumn, Progress$1 as Progress, ProgressIndicator, RANGE_PICKER, ResendOTP, RightSlot, rowExpanderColumn as RowExpanderColumn, rowMenuColumn as RowMenuColumn, rowSelectionColumn as RowSelectionColumn, SINGLE_PICKER, SelectBox, SelectContainer, SelectInputSearch, SelectItem, SelectOption, Separator$2 as Separator, Slider, StepWizard, StepWizardContext, StyledBox, StyledDropdown, StyledInput$1 as StyledInput, StyledSpan, StyledTitle$2 as StyledTitle, THIS_MONTH, THIS_WEEK, TODAY, TOP_LEFT_POSITION, TOP_RIGHT_POSITION, Table, TableBody$
|
|
30753
|
+
export { ADVANCE_PICKER, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AdvancedOption, AlertDialog, AlertDialogCancel, AlertDialogConfirm, AlertDialogContent, AlertDialogDescription, AlertDialogFunction, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, Avatar, BOTTOM_LEFT_POSITION, BOTTOM_RIGHT_POSITION, Badge, Banner, BannerClose, BannerDescription, BannerLink, BannerTitle, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button$3 as Button, ButtonDropdown, ButtonGroup$1 as ButtonGroup, ButtonGroupItem, ButtonPrimitive, Card, CardComponent, CardLineColor, CheckboxGroup, CheckboxTable, ColorPicker$1 as ColorPicker, Colors, DateColumn, DatePicker, DecimalColumn, Device as DevicePreview, Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerCloseButton, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EditableTable, Flex$1 as Flex, FormGroup, FormHelper, FormLabel, Grid, GridItem, Heading, IconButton, IconContainer, Image, ImageDevicePreview, InputCheckbox, InputColorPicker, InputCombobox, InputCounter, InputCreatable, InputDatePicker, InputGroup, InputLeftAddon, InputLeftElement, InputMapPicker, InputNumber, InputOTP, InputPrefix, InputRadio, InputRadioGroup, InputResourceList, InputRightAddon, InputRightElement, InputSearchbox, InputSelect, InputSelectCheck, InputSelectTag, InputSuffix, InputSwitch, TagsInput as InputTags, InputText, InputTextArea, InputTimePicker, LAST_7_DAYS, LAST_MONTH, LAST_TWO_MONTHS, LAST_WEEK, LineChart, Link, LoadingBar, MajooProvider, MapPicker, MobileTable, ModalDialog, ModalDialogContent, ModalDialogFooter, ModalDialogTitle, ModalDialogTrigger, NativeTimePicker, NotificationBadge, OptionWrapper$2 as OptionWrapper, PageContainer, PageDialog, PageDialogContent, PageDialogFooter, PageDialogTitle, PageDialogTrigger, Pagination, Paper, PaperComponent, Paragraph, Popover, PopoverClose, PopoverContent, PopoverTrigger, PriceColumn, Progress$1 as Progress, ProgressIndicator, RANGE_PICKER, ResendOTP, RightSlot, rowExpanderColumn as RowExpanderColumn, rowMenuColumn as RowMenuColumn, rowSelectionColumn as RowSelectionColumn, SINGLE_PICKER, SelectBox, SelectContainer, SelectInputSearch, SelectItem, SelectOption, Separator$2 as Separator, Slider, StepWizard, StepWizardContext, StyledBox, StyledDropdown, StyledInput$1 as StyledInput, StyledSpan, StyledTitle$2 as StyledTitle, THIS_MONTH, THIS_WEEK, TODAY, TOP_LEFT_POSITION, TOP_RIGHT_POSITION, Table, TableBody$3 as TableBody, TableCell$3 as TableCell, TableColumn, TableContent$3 as TableContent, TableFoot$2 as TableFoot, TableFootCell$2 as TableFootCell, TableFootRow$2 as TableFootRow, TableHead$3 as TableHead, TableHeadCellContent, TableHeaderCellContainer, TableOfContent, TableOfContentPage, TableRow$3 as TableRow, Tabs$1 as Tabs, TabsContent$1 as TabsContent, TabsList$1 as TabsList, TabsTrigger$1 as TabsTrigger, Tag, TagStatus, Text$1 as Text, TextVariantsEnum, TimePicker, ToastContext, Tooltip$1 as Tooltip, UPDATE_PICKER, Upload, YESTERDAY, addOnCellStyle, advancePickerDate, advancePickerOptions, defaultFetchDataParams, pickerReducer, useListOption, useToggle };
|