@gnwebsoft/ui 2.18.30 → 2.18.32
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/dist/{chunk-LWAM2GIC.mjs → chunk-34X2YRTY.mjs} +34 -32
- package/dist/{chunk-AZOXVTXB.js → chunk-4E6AXVK7.js} +32 -20
- package/dist/{chunk-LNMCA2OM.js → chunk-HTRRCH33.js} +114 -32
- package/dist/{chunk-TXO5AC4B.mjs → chunk-MRZZQRKX.mjs} +40 -28
- package/dist/{chunk-VNMKBB4P.mjs → chunk-OS5KT6UM.mjs} +121 -39
- package/dist/{chunk-CKJEER4L.js → chunk-STC2BZ2L.js} +28 -26
- package/dist/components/index.d.mts +22 -7
- package/dist/components/index.d.ts +22 -7
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +5 -5
- package/dist/wrappers/index.js +2 -2
- package/dist/wrappers/index.mjs +1 -1
- package/dist/wrappers2/index.js +2 -2
- package/dist/wrappers2/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -40,7 +40,6 @@ var Component = function DatePickerElement(props) {
|
|
|
40
40
|
} = useController({
|
|
41
41
|
name,
|
|
42
42
|
control,
|
|
43
|
-
disabled,
|
|
44
43
|
defaultValue: null
|
|
45
44
|
});
|
|
46
45
|
const { value, onChange } = useTransform({
|
|
@@ -60,6 +59,7 @@ var Component = function DatePickerElement(props) {
|
|
|
60
59
|
...field,
|
|
61
60
|
value,
|
|
62
61
|
label,
|
|
62
|
+
disabled,
|
|
63
63
|
...datePickerProps,
|
|
64
64
|
inputRef: handleInputRef,
|
|
65
65
|
onClose: (...args) => {
|
|
@@ -394,8 +394,7 @@ var Component4 = function TextFieldElement(props) {
|
|
|
394
394
|
fieldState: { error }
|
|
395
395
|
} = useController4({
|
|
396
396
|
name,
|
|
397
|
-
control
|
|
398
|
-
disabled
|
|
397
|
+
control
|
|
399
398
|
});
|
|
400
399
|
const { value, onChange } = useTransform({
|
|
401
400
|
value: field.value,
|
|
@@ -594,8 +593,7 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
594
593
|
fieldState: { error }
|
|
595
594
|
} = useController6({
|
|
596
595
|
name,
|
|
597
|
-
control
|
|
598
|
-
disabled
|
|
596
|
+
control
|
|
599
597
|
});
|
|
600
598
|
const [loading, setLoading] = useState2(false);
|
|
601
599
|
const [selectedOption, setSelectedOption] = useState2(null);
|
|
@@ -795,8 +793,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
795
793
|
fieldState: { error }
|
|
796
794
|
} = useController7({
|
|
797
795
|
name,
|
|
798
|
-
control
|
|
799
|
-
disabled
|
|
796
|
+
control
|
|
800
797
|
});
|
|
801
798
|
const multiSelectRef = useRef2(null);
|
|
802
799
|
const [selectedOptions, setSelectedOptions] = useState3([]);
|
|
@@ -967,6 +964,7 @@ import {
|
|
|
967
964
|
import {
|
|
968
965
|
useController as useController8
|
|
969
966
|
} from "react-hook-form";
|
|
967
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
970
968
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
971
969
|
var Component8 = function SelectElement(props) {
|
|
972
970
|
const {
|
|
@@ -987,19 +985,22 @@ var Component8 = function SelectElement(props) {
|
|
|
987
985
|
fieldState: { error }
|
|
988
986
|
} = useController8({
|
|
989
987
|
name,
|
|
990
|
-
control
|
|
991
|
-
disabled
|
|
988
|
+
control
|
|
992
989
|
});
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
990
|
+
const [hasAutoSelected, setHasAutoSelected] = useState4(false);
|
|
991
|
+
useEffect4(() => {
|
|
992
|
+
if (options.length === 1 && field.value == null && !hasAutoSelected) {
|
|
993
|
+
field.onChange(options[0].value);
|
|
994
|
+
setHasAutoSelected(true);
|
|
995
|
+
}
|
|
996
|
+
}, [options, field.value, field.onChange, hasAutoSelected]);
|
|
996
997
|
return /* @__PURE__ */ jsx8(
|
|
997
998
|
Autocomplete3,
|
|
998
999
|
{
|
|
999
1000
|
...rest,
|
|
1000
1001
|
value: field.value !== null ? options.find((option) => {
|
|
1001
1002
|
return field.value === option.value;
|
|
1002
|
-
}) ?? null :
|
|
1003
|
+
}) ?? null : null,
|
|
1003
1004
|
size: "small",
|
|
1004
1005
|
loading,
|
|
1005
1006
|
options,
|
|
@@ -1008,10 +1009,14 @@ var Component8 = function SelectElement(props) {
|
|
|
1008
1009
|
ref: field.ref,
|
|
1009
1010
|
disabled: field.disabled,
|
|
1010
1011
|
onChange: (event, newValue, reason) => {
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1012
|
+
if (reason === "clear") {
|
|
1013
|
+
field.onChange(null);
|
|
1014
|
+
setHasAutoSelected(true);
|
|
1015
|
+
} else {
|
|
1016
|
+
field.onChange(newValue?.value ?? null);
|
|
1017
|
+
setHasAutoSelected(true);
|
|
1014
1018
|
}
|
|
1019
|
+
onChange?.(event, newValue, reason);
|
|
1015
1020
|
},
|
|
1016
1021
|
onBlur: (event) => {
|
|
1017
1022
|
field.onBlur();
|
|
@@ -1062,7 +1067,7 @@ import {
|
|
|
1062
1067
|
import {
|
|
1063
1068
|
useController as useController9
|
|
1064
1069
|
} from "react-hook-form";
|
|
1065
|
-
import { Fragment as Fragment3, useState as
|
|
1070
|
+
import { Fragment as Fragment3, useState as useState5 } from "react";
|
|
1066
1071
|
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1067
1072
|
var Component9 = function SelectMultiElement(props) {
|
|
1068
1073
|
const {
|
|
@@ -1081,10 +1086,9 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1081
1086
|
fieldState: { error }
|
|
1082
1087
|
} = useController9({
|
|
1083
1088
|
name,
|
|
1084
|
-
control
|
|
1085
|
-
disabled
|
|
1089
|
+
control
|
|
1086
1090
|
});
|
|
1087
|
-
const [selectedOptions, setSelectedOptions] =
|
|
1091
|
+
const [selectedOptions, setSelectedOptions] = useState5([]);
|
|
1088
1092
|
const handleChange = (_2, selectedOptions2, reason) => {
|
|
1089
1093
|
if (reason === "clear") {
|
|
1090
1094
|
setSelectedOptions([]);
|
|
@@ -1104,7 +1108,7 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1104
1108
|
getOptionLabel: (c) => c.Label,
|
|
1105
1109
|
filterSelectedOptions: true,
|
|
1106
1110
|
ref: field.ref,
|
|
1107
|
-
disabled
|
|
1111
|
+
disabled,
|
|
1108
1112
|
onChange: handleChange,
|
|
1109
1113
|
onBlur: (event) => {
|
|
1110
1114
|
field.onBlur();
|
|
@@ -1154,7 +1158,7 @@ import {
|
|
|
1154
1158
|
Grid2 as Grid210,
|
|
1155
1159
|
TextField as TextField7
|
|
1156
1160
|
} from "@mui/material";
|
|
1157
|
-
import { useEffect as
|
|
1161
|
+
import { useEffect as useEffect5, useRef as useRef3 } from "react";
|
|
1158
1162
|
import {
|
|
1159
1163
|
useController as useController10
|
|
1160
1164
|
} from "react-hook-form";
|
|
@@ -1180,21 +1184,19 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1180
1184
|
fieldState: { error }
|
|
1181
1185
|
} = useController10({
|
|
1182
1186
|
name,
|
|
1183
|
-
control
|
|
1184
|
-
disabled
|
|
1187
|
+
control
|
|
1185
1188
|
});
|
|
1186
1189
|
const { field: dependentField } = useController10({
|
|
1187
1190
|
name: dependsOn,
|
|
1188
|
-
control
|
|
1189
|
-
disabled
|
|
1191
|
+
control
|
|
1190
1192
|
});
|
|
1191
1193
|
const parentValueRef = useRef3(dependentField.value ?? null);
|
|
1192
|
-
|
|
1194
|
+
useEffect5(() => {
|
|
1193
1195
|
if (!!dependentField.value && parentValueRef?.current?.value !== dependentField.value || dependentField.value === null) {
|
|
1194
1196
|
field.onChange(null);
|
|
1195
1197
|
}
|
|
1196
1198
|
}, [dependentField.value]);
|
|
1197
|
-
|
|
1199
|
+
useEffect5(() => {
|
|
1198
1200
|
if (initialValue) {
|
|
1199
1201
|
field.onChange(initialValue);
|
|
1200
1202
|
}
|
|
@@ -1212,7 +1214,7 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1212
1214
|
getOptionLabel: (c) => c.label,
|
|
1213
1215
|
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
1214
1216
|
ref: field.ref,
|
|
1215
|
-
disabled
|
|
1217
|
+
disabled,
|
|
1216
1218
|
onChange: (event, newValue, reason) => {
|
|
1217
1219
|
field.onChange(newValue ? newValue.value : null);
|
|
1218
1220
|
if (onChange && typeof onChange === "function") {
|
|
@@ -1334,7 +1336,7 @@ import {
|
|
|
1334
1336
|
FormHelperText as FormHelperText3,
|
|
1335
1337
|
Grid2 as Grid212
|
|
1336
1338
|
} from "@mui/material";
|
|
1337
|
-
import { useEffect as
|
|
1339
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
1338
1340
|
import {
|
|
1339
1341
|
useController as useController12
|
|
1340
1342
|
} from "react-hook-form";
|
|
@@ -1349,10 +1351,10 @@ var Component12 = function CheckboxGroup(props) {
|
|
|
1349
1351
|
control,
|
|
1350
1352
|
disabled: rest.disabled
|
|
1351
1353
|
});
|
|
1352
|
-
const [selectedValues, setSelectedValues] =
|
|
1354
|
+
const [selectedValues, setSelectedValues] = useState6(
|
|
1353
1355
|
options.filter((c) => field.value?.includes(c.value)).map((c) => c.value) || []
|
|
1354
1356
|
);
|
|
1355
|
-
|
|
1357
|
+
useEffect6(() => {
|
|
1356
1358
|
field.onChange(selectedValues ? [...selectedValues] : []);
|
|
1357
1359
|
}, [selectedValues]);
|
|
1358
1360
|
const handleChange = (event) => {
|
|
@@ -45,7 +45,6 @@ var Component = function DatePickerElement(props) {
|
|
|
45
45
|
} = _reacthookform.useController.call(void 0, {
|
|
46
46
|
name,
|
|
47
47
|
control,
|
|
48
|
-
disabled,
|
|
49
48
|
defaultValue: null
|
|
50
49
|
});
|
|
51
50
|
const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
|
|
@@ -65,6 +64,7 @@ var Component = function DatePickerElement(props) {
|
|
|
65
64
|
...field,
|
|
66
65
|
value,
|
|
67
66
|
label,
|
|
67
|
+
disabled,
|
|
68
68
|
...datePickerProps,
|
|
69
69
|
inputRef: handleInputRef,
|
|
70
70
|
onClose: (...args) => {
|
|
@@ -367,6 +367,7 @@ var RadioButtonGroup_default = RadioButtonGroup2;
|
|
|
367
367
|
|
|
368
368
|
|
|
369
369
|
|
|
370
|
+
|
|
370
371
|
var Component4 = function TextFieldElement(props) {
|
|
371
372
|
const {
|
|
372
373
|
rules = {},
|
|
@@ -397,9 +398,9 @@ var Component4 = function TextFieldElement(props) {
|
|
|
397
398
|
fieldState: { error }
|
|
398
399
|
} = _reacthookform.useController.call(void 0, {
|
|
399
400
|
name,
|
|
400
|
-
control
|
|
401
|
-
disabled
|
|
401
|
+
control
|
|
402
402
|
});
|
|
403
|
+
const theme = _material.useTheme.call(void 0, );
|
|
403
404
|
const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
|
|
404
405
|
value: field.value,
|
|
405
406
|
onChange: field.onChange,
|
|
@@ -458,7 +459,8 @@ var Component4 = function TextFieldElement(props) {
|
|
|
458
459
|
"& .MuiInputLabel-asterisk": { color: "red" },
|
|
459
460
|
"& .MuiInputBase-input": {
|
|
460
461
|
cursor: disabled ? "not-allowed" : "default"
|
|
461
|
-
}
|
|
462
|
+
},
|
|
463
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
|
|
462
464
|
}
|
|
463
465
|
}
|
|
464
466
|
);
|
|
@@ -602,8 +604,7 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
602
604
|
fieldState: { error }
|
|
603
605
|
} = _reacthookform.useController.call(void 0, {
|
|
604
606
|
name,
|
|
605
|
-
control
|
|
606
|
-
disabled
|
|
607
|
+
control
|
|
607
608
|
});
|
|
608
609
|
const [loading, setLoading] = _react.useState.call(void 0, false);
|
|
609
610
|
const [selectedOption, setSelectedOption] = _react.useState.call(void 0, null);
|
|
@@ -819,8 +820,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
819
820
|
fieldState: { error }
|
|
820
821
|
} = _reacthookform.useController.call(void 0, {
|
|
821
822
|
name,
|
|
822
|
-
control
|
|
823
|
-
disabled
|
|
823
|
+
control
|
|
824
824
|
});
|
|
825
825
|
const multiSelectRef = _react.useRef.call(void 0, null);
|
|
826
826
|
const [selectedOptions, setSelectedOptions] = _react.useState.call(void 0, []);
|
|
@@ -921,6 +921,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
921
921
|
isOptionEqualToValue: (option, val) => option.Value === val.Value,
|
|
922
922
|
options,
|
|
923
923
|
value: selectedOptions,
|
|
924
|
+
disabled,
|
|
924
925
|
filterSelectedOptions: true,
|
|
925
926
|
onChange: handleChange,
|
|
926
927
|
onInputChange: (_2, newInputValue) => {
|
|
@@ -993,6 +994,8 @@ var AsyncMultiSelect_default = AsyncSelectMultiElement2;
|
|
|
993
994
|
|
|
994
995
|
|
|
995
996
|
|
|
997
|
+
|
|
998
|
+
|
|
996
999
|
var Component8 = function SelectElement(props) {
|
|
997
1000
|
const {
|
|
998
1001
|
name,
|
|
@@ -1016,16 +1019,21 @@ var Component8 = function SelectElement(props) {
|
|
|
1016
1019
|
name,
|
|
1017
1020
|
control
|
|
1018
1021
|
});
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
+
const theme = _material.useTheme.call(void 0, );
|
|
1023
|
+
const [hasAutoSelected, setHasAutoSelected] = _react.useState.call(void 0, false);
|
|
1024
|
+
_react.useEffect.call(void 0, () => {
|
|
1025
|
+
if (options.length === 1 && field.value == null && !hasAutoSelected) {
|
|
1026
|
+
field.onChange(options[0].Value);
|
|
1027
|
+
setHasAutoSelected(true);
|
|
1028
|
+
}
|
|
1029
|
+
}, [options, field.value, field.onChange, hasAutoSelected]);
|
|
1022
1030
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1023
1031
|
_material.Autocomplete,
|
|
1024
1032
|
{
|
|
1025
1033
|
...rest,
|
|
1026
1034
|
value: field.value !== null ? _nullishCoalesce(options.find((option) => {
|
|
1027
1035
|
return field.value === option.Value;
|
|
1028
|
-
}), () => ( null)) :
|
|
1036
|
+
}), () => ( null)) : null,
|
|
1029
1037
|
loading,
|
|
1030
1038
|
options,
|
|
1031
1039
|
getOptionLabel: (c) => c.Label,
|
|
@@ -1033,10 +1041,14 @@ var Component8 = function SelectElement(props) {
|
|
|
1033
1041
|
ref: field.ref,
|
|
1034
1042
|
disabled,
|
|
1035
1043
|
onChange: (event, newValue, reason) => {
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1044
|
+
if (reason === "clear") {
|
|
1045
|
+
field.onChange(null);
|
|
1046
|
+
setHasAutoSelected(true);
|
|
1047
|
+
} else {
|
|
1048
|
+
field.onChange(_nullishCoalesce(_optionalChain([newValue, 'optionalAccess', _21 => _21.Value]), () => ( null)));
|
|
1049
|
+
setHasAutoSelected(true);
|
|
1039
1050
|
}
|
|
1051
|
+
_optionalChain([onChange, 'optionalCall', _22 => _22(event, newValue, reason)]);
|
|
1040
1052
|
},
|
|
1041
1053
|
onBlur: (event) => {
|
|
1042
1054
|
field.onBlur();
|
|
@@ -1059,7 +1071,8 @@ var Component8 = function SelectElement(props) {
|
|
|
1059
1071
|
...sx,
|
|
1060
1072
|
"& .MuiInputBase-input": {
|
|
1061
1073
|
cursor: disabled ? "not-allowed" : "default"
|
|
1062
|
-
}
|
|
1074
|
+
},
|
|
1075
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
|
|
1063
1076
|
}
|
|
1064
1077
|
}
|
|
1065
1078
|
)
|
|
@@ -1109,8 +1122,7 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1109
1122
|
fieldState: { error }
|
|
1110
1123
|
} = _reacthookform.useController.call(void 0, {
|
|
1111
1124
|
name,
|
|
1112
|
-
control
|
|
1113
|
-
disabled
|
|
1125
|
+
control
|
|
1114
1126
|
});
|
|
1115
1127
|
const [selectedOptions, setSelectedOptions] = _react.useState.call(void 0, []);
|
|
1116
1128
|
const handleChange = (_2, selectedOptions2, reason) => {
|
|
@@ -1222,7 +1234,7 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1222
1234
|
});
|
|
1223
1235
|
const parentValueRef = _react.useRef.call(void 0, _nullishCoalesce(dependentField.value, () => ( null)));
|
|
1224
1236
|
_react.useEffect.call(void 0, () => {
|
|
1225
|
-
if (!!dependentField.value && _optionalChain([parentValueRef, 'optionalAccess',
|
|
1237
|
+
if (!!dependentField.value && _optionalChain([parentValueRef, 'optionalAccess', _23 => _23.current, 'optionalAccess', _24 => _24.Value]) !== dependentField.value || dependentField.value === null) {
|
|
1226
1238
|
field.onChange(null);
|
|
1227
1239
|
}
|
|
1228
1240
|
}, [dependentField.value]);
|
|
@@ -1383,7 +1395,7 @@ var Component12 = function CheckboxGroup(props) {
|
|
|
1383
1395
|
disabled: rest.disabled
|
|
1384
1396
|
});
|
|
1385
1397
|
const [selectedValues, setSelectedValues] = _react.useState.call(void 0,
|
|
1386
|
-
options.filter((c) => _optionalChain([field, 'access',
|
|
1398
|
+
options.filter((c) => _optionalChain([field, 'access', _25 => _25.value, 'optionalAccess', _26 => _26.includes, 'call', _27 => _27(c.Value)])).map((c) => c.Value) || []
|
|
1387
1399
|
);
|
|
1388
1400
|
_react.useEffect.call(void 0, () => {
|
|
1389
1401
|
field.onChange(selectedValues ? [...selectedValues] : []);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/components/ClearButton/ClearButton.tsx
|
|
2
2
|
var _material = require('@mui/material');
|
|
3
3
|
var _jsxruntime = require('react/jsx-runtime');
|
|
4
|
-
var ClearButton = ({ isSubmitting, handleClear }) => {
|
|
5
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4
|
+
var ClearButton = ({ isSubmitting, handleClear, sx }) => {
|
|
5
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6
|
+
_material.Button,
|
|
7
|
+
{
|
|
8
|
+
variant: "outlined",
|
|
9
|
+
onClick: handleClear,
|
|
10
|
+
disabled: isSubmitting,
|
|
11
|
+
sx,
|
|
12
|
+
children: "Clear"
|
|
13
|
+
}
|
|
14
|
+
);
|
|
6
15
|
};
|
|
7
16
|
var ClearButton_default = ClearButton;
|
|
8
17
|
|
|
@@ -15,7 +24,9 @@ var FilterButton = ({
|
|
|
15
24
|
isSubmitting,
|
|
16
25
|
show,
|
|
17
26
|
title,
|
|
18
|
-
icon
|
|
27
|
+
icon,
|
|
28
|
+
sx,
|
|
29
|
+
iconSx
|
|
19
30
|
}) => {
|
|
20
31
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
21
32
|
_lab.LoadingButton,
|
|
@@ -26,11 +37,11 @@ var FilterButton = ({
|
|
|
26
37
|
disabled: !show,
|
|
27
38
|
disableRipple: true,
|
|
28
39
|
sx: {
|
|
29
|
-
bgcolor: "#3caed7 !important",
|
|
30
40
|
display: "flex",
|
|
31
|
-
alignItems: "center"
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
...sx
|
|
32
43
|
},
|
|
33
|
-
startIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Badge, { color: "error", variant: "standard", children: icon ? icon : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FilterAlt2.default, { width: "20", height: "20" }) }),
|
|
44
|
+
startIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Badge, { color: "error", variant: "standard", children: icon ? icon : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FilterAlt2.default, { width: "20", height: "20", sx: iconSx }) }),
|
|
34
45
|
children: _optionalChain([title, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) === "" || !title ? "Filter" : title
|
|
35
46
|
}
|
|
36
47
|
);
|
|
@@ -47,16 +58,27 @@ var FilterButton_default = FilterButton;
|
|
|
47
58
|
|
|
48
59
|
|
|
49
60
|
|
|
61
|
+
|
|
50
62
|
var _ManageSearch = require('@mui/icons-material/ManageSearch'); var _ManageSearch2 = _interopRequireDefault(_ManageSearch);
|
|
51
63
|
|
|
52
|
-
var FilterWrapper = ({
|
|
64
|
+
var FilterWrapper = ({
|
|
65
|
+
children,
|
|
66
|
+
title,
|
|
67
|
+
filterCount,
|
|
68
|
+
cardSx,
|
|
69
|
+
textSx,
|
|
70
|
+
icon,
|
|
71
|
+
iconSx
|
|
72
|
+
}) => {
|
|
73
|
+
const theme = _material.useTheme.call(void 0, );
|
|
53
74
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
54
75
|
_material.Card,
|
|
55
76
|
{
|
|
56
77
|
sx: {
|
|
57
78
|
position: "relative",
|
|
58
79
|
borderRadius: "0px",
|
|
59
|
-
mb: 2
|
|
80
|
+
mb: 2,
|
|
81
|
+
...cardSx
|
|
60
82
|
},
|
|
61
83
|
children: [
|
|
62
84
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -73,13 +95,31 @@ var FilterWrapper = ({ children, title }) => {
|
|
|
73
95
|
alignItems: "center"
|
|
74
96
|
},
|
|
75
97
|
title: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
76
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
77
|
-
|
|
98
|
+
icon ? icon : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
99
|
+
_ManageSearch2.default,
|
|
100
|
+
{
|
|
101
|
+
sx: {
|
|
102
|
+
height: "2.5rem",
|
|
103
|
+
color: theme.palette.primary.main,
|
|
104
|
+
...iconSx
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
78
109
|
_material.Typography,
|
|
79
110
|
{
|
|
80
111
|
variant: "h5",
|
|
81
|
-
sx: {
|
|
82
|
-
|
|
112
|
+
sx: {
|
|
113
|
+
fontWeight: "bold",
|
|
114
|
+
color: theme.palette.primary.main,
|
|
115
|
+
...textSx
|
|
116
|
+
},
|
|
117
|
+
children: [
|
|
118
|
+
title,
|
|
119
|
+
" (",
|
|
120
|
+
filterCount,
|
|
121
|
+
")"
|
|
122
|
+
]
|
|
83
123
|
}
|
|
84
124
|
)
|
|
85
125
|
] })
|
|
@@ -103,20 +143,23 @@ var FilterWrapper_default = FilterWrapper;
|
|
|
103
143
|
|
|
104
144
|
|
|
105
145
|
|
|
146
|
+
|
|
106
147
|
var FormWrapper = ({
|
|
107
148
|
children,
|
|
108
149
|
title,
|
|
109
150
|
editMode,
|
|
110
151
|
cardSx,
|
|
111
|
-
textSx
|
|
152
|
+
textSx,
|
|
153
|
+
icon,
|
|
154
|
+
actionButton
|
|
112
155
|
}) => {
|
|
113
156
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
114
157
|
_material.Card,
|
|
115
158
|
{
|
|
116
159
|
sx: {
|
|
117
|
-
...cardSx,
|
|
118
160
|
position: "relative",
|
|
119
|
-
borderRadius: "0px"
|
|
161
|
+
borderRadius: "0px",
|
|
162
|
+
...cardSx
|
|
120
163
|
},
|
|
121
164
|
children: [
|
|
122
165
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -131,7 +174,23 @@ var FormWrapper = ({
|
|
|
131
174
|
alignSelf: "center"
|
|
132
175
|
}
|
|
133
176
|
},
|
|
134
|
-
title:
|
|
177
|
+
title: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
178
|
+
_material.Box,
|
|
179
|
+
{
|
|
180
|
+
sx: {
|
|
181
|
+
display: "flex",
|
|
182
|
+
alignItems: "center",
|
|
183
|
+
justifyContent: "space-between"
|
|
184
|
+
},
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
187
|
+
_nullishCoalesce(icon, () => ( icon)),
|
|
188
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { color: "primary", sx: textSx, children: editMode ? `Edit ${title}` : `Create ${title}` })
|
|
189
|
+
] }),
|
|
190
|
+
actionButton
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
)
|
|
135
194
|
}
|
|
136
195
|
),
|
|
137
196
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { mt: 0 } }),
|
|
@@ -149,7 +208,9 @@ var LabelText = ({
|
|
|
149
208
|
label,
|
|
150
209
|
value,
|
|
151
210
|
gridSize,
|
|
152
|
-
containerSize
|
|
211
|
+
containerSize,
|
|
212
|
+
labelSx,
|
|
213
|
+
valueSx
|
|
153
214
|
}) => {
|
|
154
215
|
const defaultGridSize = {
|
|
155
216
|
labelSize: { xs: 6, sm: 6, md: 6 },
|
|
@@ -173,6 +234,7 @@ var LabelText = ({
|
|
|
173
234
|
{
|
|
174
235
|
size: size.labelSize,
|
|
175
236
|
sx: {
|
|
237
|
+
...labelSx,
|
|
176
238
|
padding: "5px",
|
|
177
239
|
fontSize: "14px",
|
|
178
240
|
textAlign: { xs: "left", sm: "right", md: "right" }
|
|
@@ -191,9 +253,9 @@ var LabelText = ({
|
|
|
191
253
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tooltip, { title: value, arrow: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
192
254
|
_material.Typography,
|
|
193
255
|
{
|
|
194
|
-
color: "#3598dc",
|
|
195
|
-
fontSize: "14px",
|
|
196
256
|
sx: {
|
|
257
|
+
...valueSx,
|
|
258
|
+
fontSize: "14px",
|
|
197
259
|
wordBreak: "break-word",
|
|
198
260
|
overflow: "hidden",
|
|
199
261
|
display: "-webkit-box",
|
|
@@ -224,20 +286,28 @@ var LabelText_default = LabelText;
|
|
|
224
286
|
|
|
225
287
|
|
|
226
288
|
|
|
289
|
+
|
|
227
290
|
var ListWrapper = ({
|
|
228
291
|
children,
|
|
229
292
|
title,
|
|
230
293
|
count,
|
|
231
294
|
show = true,
|
|
232
|
-
actionButton
|
|
295
|
+
actionButton,
|
|
296
|
+
cardSx,
|
|
297
|
+
textSx,
|
|
298
|
+
icon,
|
|
299
|
+
iconSx,
|
|
300
|
+
showCount = true
|
|
233
301
|
}) => {
|
|
302
|
+
const theme = _material.useTheme.call(void 0, );
|
|
234
303
|
if (!show) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {});
|
|
235
304
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
236
305
|
_material.Card,
|
|
237
306
|
{
|
|
238
307
|
sx: {
|
|
239
308
|
position: "relative",
|
|
240
|
-
borderRadius: "0px"
|
|
309
|
+
borderRadius: "0px",
|
|
310
|
+
...cardSx
|
|
241
311
|
},
|
|
242
312
|
children: [
|
|
243
313
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -263,13 +333,30 @@ var ListWrapper = ({
|
|
|
263
333
|
},
|
|
264
334
|
children: [
|
|
265
335
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
266
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
267
|
-
|
|
336
|
+
icon ? icon : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
337
|
+
_ManageSearch2.default,
|
|
338
|
+
{
|
|
339
|
+
sx: {
|
|
340
|
+
height: "2.5rem",
|
|
341
|
+
color: theme.palette.primary.main,
|
|
342
|
+
...iconSx
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
),
|
|
346
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
268
347
|
_material.Typography,
|
|
269
348
|
{
|
|
270
349
|
variant: "h5",
|
|
271
|
-
sx: {
|
|
272
|
-
|
|
350
|
+
sx: {
|
|
351
|
+
fontWeight: "bold",
|
|
352
|
+
color: theme.palette.primary.main,
|
|
353
|
+
...textSx
|
|
354
|
+
},
|
|
355
|
+
children: [
|
|
356
|
+
title,
|
|
357
|
+
" ",
|
|
358
|
+
showCount ? `(${count ? count : 0})` : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {})
|
|
359
|
+
]
|
|
273
360
|
}
|
|
274
361
|
)
|
|
275
362
|
] }),
|
|
@@ -304,18 +391,13 @@ var SimpleToolbar = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _xdatagr
|
|
|
304
391
|
sx: {
|
|
305
392
|
"& .MuiInputBase-root": {
|
|
306
393
|
borderRadius: "8px",
|
|
307
|
-
padding: "6px 10px"
|
|
308
|
-
backgroundColor: "#f6f7f8"
|
|
394
|
+
padding: "6px 10px"
|
|
309
395
|
},
|
|
310
396
|
"& input": {
|
|
311
397
|
fontSize: "14px",
|
|
312
398
|
color: "#333"
|
|
313
399
|
},
|
|
314
|
-
borderRadius: "8px"
|
|
315
|
-
".css-hzgntl-MuiOutlinedInput-notchedOutline": {
|
|
316
|
-
borderRadius: "8px",
|
|
317
|
-
border: "1px solid #efefef !important"
|
|
318
|
-
}
|
|
400
|
+
borderRadius: "8px"
|
|
319
401
|
}
|
|
320
402
|
}
|
|
321
403
|
),
|