@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
|
@@ -45,7 +45,6 @@ var Component = function DatePickerElement(props) {
|
|
|
45
45
|
} = useController({
|
|
46
46
|
name,
|
|
47
47
|
control,
|
|
48
|
-
disabled,
|
|
49
48
|
defaultValue: null
|
|
50
49
|
});
|
|
51
50
|
const { value, onChange } = useTransform({
|
|
@@ -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) => {
|
|
@@ -361,7 +361,8 @@ var RadioButtonGroup_default = RadioButtonGroup2;
|
|
|
361
361
|
import {
|
|
362
362
|
Grid2 as Grid24,
|
|
363
363
|
TextField as TextField2,
|
|
364
|
-
useForkRef as useForkRef3
|
|
364
|
+
useForkRef as useForkRef3,
|
|
365
|
+
useTheme as useTheme2
|
|
365
366
|
} from "@mui/material";
|
|
366
367
|
import {
|
|
367
368
|
useController as useController4
|
|
@@ -397,9 +398,9 @@ var Component4 = function TextFieldElement(props) {
|
|
|
397
398
|
fieldState: { error }
|
|
398
399
|
} = useController4({
|
|
399
400
|
name,
|
|
400
|
-
control
|
|
401
|
-
disabled
|
|
401
|
+
control
|
|
402
402
|
});
|
|
403
|
+
const theme = useTheme2();
|
|
403
404
|
const { value, onChange } = useTransform({
|
|
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
|
} = useController6({
|
|
604
606
|
name,
|
|
605
|
-
control
|
|
606
|
-
disabled
|
|
607
|
+
control
|
|
607
608
|
});
|
|
608
609
|
const [loading, setLoading] = useState2(false);
|
|
609
610
|
const [selectedOption, setSelectedOption] = useState2(null);
|
|
@@ -819,8 +820,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
819
820
|
fieldState: { error }
|
|
820
821
|
} = useController7({
|
|
821
822
|
name,
|
|
822
|
-
control
|
|
823
|
-
disabled
|
|
823
|
+
control
|
|
824
824
|
});
|
|
825
825
|
const multiSelectRef = useRef2(null);
|
|
826
826
|
const [selectedOptions, setSelectedOptions] = useState3([]);
|
|
@@ -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) => {
|
|
@@ -987,11 +988,13 @@ var AsyncMultiSelect_default = AsyncSelectMultiElement2;
|
|
|
987
988
|
import {
|
|
988
989
|
Autocomplete as Autocomplete3,
|
|
989
990
|
Grid2 as Grid28,
|
|
990
|
-
TextField as TextField5
|
|
991
|
+
TextField as TextField5,
|
|
992
|
+
useTheme as useTheme3
|
|
991
993
|
} from "@mui/material";
|
|
992
994
|
import {
|
|
993
995
|
useController as useController8
|
|
994
996
|
} from "react-hook-form";
|
|
997
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
995
998
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
996
999
|
var Component8 = function SelectElement(props) {
|
|
997
1000
|
const {
|
|
@@ -1016,16 +1019,21 @@ var Component8 = function SelectElement(props) {
|
|
|
1016
1019
|
name,
|
|
1017
1020
|
control
|
|
1018
1021
|
});
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
+
const theme = useTheme3();
|
|
1023
|
+
const [hasAutoSelected, setHasAutoSelected] = useState4(false);
|
|
1024
|
+
useEffect4(() => {
|
|
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__ */ jsx8(
|
|
1023
1031
|
Autocomplete3,
|
|
1024
1032
|
{
|
|
1025
1033
|
...rest,
|
|
1026
1034
|
value: field.value !== null ? 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(newValue?.Value ?? null);
|
|
1049
|
+
setHasAutoSelected(true);
|
|
1039
1050
|
}
|
|
1051
|
+
onChange?.(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
|
)
|
|
@@ -1088,7 +1101,7 @@ import {
|
|
|
1088
1101
|
import {
|
|
1089
1102
|
useController as useController9
|
|
1090
1103
|
} from "react-hook-form";
|
|
1091
|
-
import { Fragment as Fragment3, useState as
|
|
1104
|
+
import { Fragment as Fragment3, useState as useState5 } from "react";
|
|
1092
1105
|
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1093
1106
|
var Component9 = function SelectMultiElement(props) {
|
|
1094
1107
|
const {
|
|
@@ -1109,10 +1122,9 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1109
1122
|
fieldState: { error }
|
|
1110
1123
|
} = useController9({
|
|
1111
1124
|
name,
|
|
1112
|
-
control
|
|
1113
|
-
disabled
|
|
1125
|
+
control
|
|
1114
1126
|
});
|
|
1115
|
-
const [selectedOptions, setSelectedOptions] =
|
|
1127
|
+
const [selectedOptions, setSelectedOptions] = useState5([]);
|
|
1116
1128
|
const handleChange = (_2, selectedOptions2, reason) => {
|
|
1117
1129
|
if (reason === "clear") {
|
|
1118
1130
|
setSelectedOptions([]);
|
|
@@ -1186,7 +1198,7 @@ import {
|
|
|
1186
1198
|
Grid2 as Grid210,
|
|
1187
1199
|
TextField as TextField7
|
|
1188
1200
|
} from "@mui/material";
|
|
1189
|
-
import { useEffect as
|
|
1201
|
+
import { useEffect as useEffect5, useRef as useRef3 } from "react";
|
|
1190
1202
|
import {
|
|
1191
1203
|
useController as useController10
|
|
1192
1204
|
} from "react-hook-form";
|
|
@@ -1221,12 +1233,12 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1221
1233
|
control
|
|
1222
1234
|
});
|
|
1223
1235
|
const parentValueRef = useRef3(dependentField.value ?? null);
|
|
1224
|
-
|
|
1236
|
+
useEffect5(() => {
|
|
1225
1237
|
if (!!dependentField.value && parentValueRef?.current?.Value !== dependentField.value || dependentField.value === null) {
|
|
1226
1238
|
field.onChange(null);
|
|
1227
1239
|
}
|
|
1228
1240
|
}, [dependentField.value]);
|
|
1229
|
-
|
|
1241
|
+
useEffect5(() => {
|
|
1230
1242
|
if (initialValue) {
|
|
1231
1243
|
field.onChange(initialValue);
|
|
1232
1244
|
}
|
|
@@ -1367,7 +1379,7 @@ import {
|
|
|
1367
1379
|
FormHelperText as FormHelperText3,
|
|
1368
1380
|
Grid2 as Grid212
|
|
1369
1381
|
} from "@mui/material";
|
|
1370
|
-
import { useEffect as
|
|
1382
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
1371
1383
|
import {
|
|
1372
1384
|
useController as useController12
|
|
1373
1385
|
} from "react-hook-form";
|
|
@@ -1382,10 +1394,10 @@ var Component12 = function CheckboxGroup(props) {
|
|
|
1382
1394
|
control,
|
|
1383
1395
|
disabled: rest.disabled
|
|
1384
1396
|
});
|
|
1385
|
-
const [selectedValues, setSelectedValues] =
|
|
1397
|
+
const [selectedValues, setSelectedValues] = useState6(
|
|
1386
1398
|
options.filter((c) => field.value?.includes(c.Value)).map((c) => c.Value) || []
|
|
1387
1399
|
);
|
|
1388
|
-
|
|
1400
|
+
useEffect6(() => {
|
|
1389
1401
|
field.onChange(selectedValues ? [...selectedValues] : []);
|
|
1390
1402
|
}, [selectedValues]);
|
|
1391
1403
|
const handleChange = (event) => {
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
// src/components/ClearButton/ClearButton.tsx
|
|
2
2
|
import { Button } from "@mui/material";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
var ClearButton = ({ isSubmitting, handleClear }) => {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
4
|
+
var ClearButton = ({ isSubmitting, handleClear, sx }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
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__ */ jsx2(
|
|
21
32
|
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__ */ jsx2(Badge, { color: "error", variant: "standard", children: icon ? icon : /* @__PURE__ */ jsx2(FilterAltIcon, { width: "20", height: "20" }) }),
|
|
44
|
+
startIcon: /* @__PURE__ */ jsx2(Badge, { color: "error", variant: "standard", children: icon ? icon : /* @__PURE__ */ jsx2(FilterAltIcon, { width: "20", height: "20", sx: iconSx }) }),
|
|
34
45
|
children: title?.trim() === "" || !title ? "Filter" : title
|
|
35
46
|
}
|
|
36
47
|
);
|
|
@@ -45,18 +56,29 @@ import {
|
|
|
45
56
|
CardHeader,
|
|
46
57
|
Divider,
|
|
47
58
|
Grid2,
|
|
48
|
-
Typography
|
|
59
|
+
Typography,
|
|
60
|
+
useTheme as useTheme2
|
|
49
61
|
} from "@mui/material";
|
|
50
62
|
import ManageSearchIcon from "@mui/icons-material/ManageSearch";
|
|
51
63
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
52
|
-
var FilterWrapper = ({
|
|
64
|
+
var FilterWrapper = ({
|
|
65
|
+
children,
|
|
66
|
+
title,
|
|
67
|
+
filterCount,
|
|
68
|
+
cardSx,
|
|
69
|
+
textSx,
|
|
70
|
+
icon,
|
|
71
|
+
iconSx
|
|
72
|
+
}) => {
|
|
73
|
+
const theme = useTheme2();
|
|
53
74
|
return /* @__PURE__ */ jsxs(
|
|
54
75
|
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__ */ jsx3(
|
|
@@ -73,13 +95,31 @@ var FilterWrapper = ({ children, title }) => {
|
|
|
73
95
|
alignItems: "center"
|
|
74
96
|
},
|
|
75
97
|
title: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
76
|
-
/* @__PURE__ */ jsx3(
|
|
77
|
-
|
|
98
|
+
icon ? icon : /* @__PURE__ */ jsx3(
|
|
99
|
+
ManageSearchIcon,
|
|
100
|
+
{
|
|
101
|
+
sx: {
|
|
102
|
+
height: "2.5rem",
|
|
103
|
+
color: theme.palette.primary.main,
|
|
104
|
+
...iconSx
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ jsxs(
|
|
78
109
|
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
|
] })
|
|
@@ -95,6 +135,7 @@ var FilterWrapper_default = FilterWrapper;
|
|
|
95
135
|
|
|
96
136
|
// src/components/FormWrapper/FormWrapper.tsx
|
|
97
137
|
import {
|
|
138
|
+
Box as Box2,
|
|
98
139
|
Card as Card2,
|
|
99
140
|
CardContent as CardContent2,
|
|
100
141
|
CardHeader as CardHeader2,
|
|
@@ -108,15 +149,17 @@ var FormWrapper = ({
|
|
|
108
149
|
title,
|
|
109
150
|
editMode,
|
|
110
151
|
cardSx,
|
|
111
|
-
textSx
|
|
152
|
+
textSx,
|
|
153
|
+
icon,
|
|
154
|
+
actionButton
|
|
112
155
|
}) => {
|
|
113
156
|
return /* @__PURE__ */ jsxs2(
|
|
114
157
|
Card2,
|
|
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__ */ jsx4(
|
|
@@ -131,7 +174,23 @@ var FormWrapper = ({
|
|
|
131
174
|
alignSelf: "center"
|
|
132
175
|
}
|
|
133
176
|
},
|
|
134
|
-
title:
|
|
177
|
+
title: /* @__PURE__ */ jsxs2(
|
|
178
|
+
Box2,
|
|
179
|
+
{
|
|
180
|
+
sx: {
|
|
181
|
+
display: "flex",
|
|
182
|
+
alignItems: "center",
|
|
183
|
+
justifyContent: "space-between"
|
|
184
|
+
},
|
|
185
|
+
children: [
|
|
186
|
+
/* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
187
|
+
icon ?? icon,
|
|
188
|
+
/* @__PURE__ */ jsx4(Typography2, { color: "primary", sx: textSx, children: editMode ? `Edit ${title}` : `Create ${title}` })
|
|
189
|
+
] }),
|
|
190
|
+
actionButton
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
)
|
|
135
194
|
}
|
|
136
195
|
),
|
|
137
196
|
/* @__PURE__ */ jsx4(Divider2, { 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__ */ jsx5(Tooltip, { title: value, arrow: true, children: /* @__PURE__ */ jsx5(
|
|
192
254
|
Typography3,
|
|
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",
|
|
@@ -214,13 +276,14 @@ var LabelText_default = LabelText;
|
|
|
214
276
|
|
|
215
277
|
// src/components/ListWrapper/ListWrapper.tsx
|
|
216
278
|
import {
|
|
217
|
-
Box as
|
|
279
|
+
Box as Box3,
|
|
218
280
|
Card as Card3,
|
|
219
281
|
CardContent as CardContent3,
|
|
220
282
|
CardHeader as CardHeader3,
|
|
221
283
|
Divider as Divider3,
|
|
222
284
|
Grid2 as Grid24,
|
|
223
|
-
Typography as Typography4
|
|
285
|
+
Typography as Typography4,
|
|
286
|
+
useTheme as useTheme3
|
|
224
287
|
} from "@mui/material";
|
|
225
288
|
import ManageSearchIcon2 from "@mui/icons-material/ManageSearch";
|
|
226
289
|
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -229,15 +292,22 @@ var ListWrapper = ({
|
|
|
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 = useTheme3();
|
|
234
303
|
if (!show) return /* @__PURE__ */ jsx6(Fragment, {});
|
|
235
304
|
return /* @__PURE__ */ jsxs4(
|
|
236
305
|
Card3,
|
|
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__ */ jsx6(
|
|
@@ -254,7 +324,7 @@ var ListWrapper = ({
|
|
|
254
324
|
alignItems: "center"
|
|
255
325
|
},
|
|
256
326
|
title: /* @__PURE__ */ jsxs4(
|
|
257
|
-
|
|
327
|
+
Box3,
|
|
258
328
|
{
|
|
259
329
|
sx: {
|
|
260
330
|
display: "flex",
|
|
@@ -262,14 +332,31 @@ var ListWrapper = ({
|
|
|
262
332
|
justifyContent: "space-between"
|
|
263
333
|
},
|
|
264
334
|
children: [
|
|
265
|
-
/* @__PURE__ */ jsxs4(
|
|
266
|
-
/* @__PURE__ */ jsx6(
|
|
267
|
-
|
|
335
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
336
|
+
icon ? icon : /* @__PURE__ */ jsx6(
|
|
337
|
+
ManageSearchIcon2,
|
|
338
|
+
{
|
|
339
|
+
sx: {
|
|
340
|
+
height: "2.5rem",
|
|
341
|
+
color: theme.palette.primary.main,
|
|
342
|
+
...iconSx
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
),
|
|
346
|
+
/* @__PURE__ */ jsxs4(
|
|
268
347
|
Typography4,
|
|
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__ */ jsx6(Fragment, {})
|
|
359
|
+
]
|
|
273
360
|
}
|
|
274
361
|
)
|
|
275
362
|
] }),
|
|
@@ -295,7 +382,7 @@ import {
|
|
|
295
382
|
GridToolbarFilterButton,
|
|
296
383
|
GridToolbarQuickFilter
|
|
297
384
|
} from "@mui/x-data-grid";
|
|
298
|
-
import { Box as
|
|
385
|
+
import { Box as Box4 } from "@mui/material";
|
|
299
386
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
300
387
|
var SimpleToolbar = () => /* @__PURE__ */ jsxs5(GridToolbarContainer, { children: [
|
|
301
388
|
/* @__PURE__ */ jsx7(
|
|
@@ -304,22 +391,17 @@ var SimpleToolbar = () => /* @__PURE__ */ jsxs5(GridToolbarContainer, { children
|
|
|
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
|
),
|
|
322
|
-
/* @__PURE__ */ jsx7(
|
|
404
|
+
/* @__PURE__ */ jsx7(Box4, { sx: { flexGrow: 1 } }),
|
|
323
405
|
/* @__PURE__ */ jsx7(GridToolbarColumnsButton, {}),
|
|
324
406
|
/* @__PURE__ */ jsx7(GridToolbarFilterButton, {}),
|
|
325
407
|
/* @__PURE__ */ jsx7(GridToolbarExport, {})
|
|
@@ -40,7 +40,6 @@ var Component = function DatePickerElement(props) {
|
|
|
40
40
|
} = _reacthookform.useController.call(void 0, {
|
|
41
41
|
name,
|
|
42
42
|
control,
|
|
43
|
-
disabled,
|
|
44
43
|
defaultValue: null
|
|
45
44
|
});
|
|
46
45
|
const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
|
|
@@ -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
|
} = _reacthookform.useController.call(void 0, {
|
|
396
396
|
name,
|
|
397
|
-
control
|
|
398
|
-
disabled
|
|
397
|
+
control
|
|
399
398
|
});
|
|
400
399
|
const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
|
|
401
400
|
value: field.value,
|
|
@@ -594,8 +593,7 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
594
593
|
fieldState: { error }
|
|
595
594
|
} = _reacthookform.useController.call(void 0, {
|
|
596
595
|
name,
|
|
597
|
-
control
|
|
598
|
-
disabled
|
|
596
|
+
control
|
|
599
597
|
});
|
|
600
598
|
const [loading, setLoading] = _react.useState.call(void 0, false);
|
|
601
599
|
const [selectedOption, setSelectedOption] = _react.useState.call(void 0, null);
|
|
@@ -795,8 +793,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
795
793
|
fieldState: { error }
|
|
796
794
|
} = _reacthookform.useController.call(void 0, {
|
|
797
795
|
name,
|
|
798
|
-
control
|
|
799
|
-
disabled
|
|
796
|
+
control
|
|
800
797
|
});
|
|
801
798
|
const multiSelectRef = _react.useRef.call(void 0, null);
|
|
802
799
|
const [selectedOptions, setSelectedOptions] = _react.useState.call(void 0, []);
|
|
@@ -968,6 +965,7 @@ var AsyncMultiSelect_default = AsyncSelectMultiElement2;
|
|
|
968
965
|
|
|
969
966
|
|
|
970
967
|
|
|
968
|
+
|
|
971
969
|
var Component8 = function SelectElement(props) {
|
|
972
970
|
const {
|
|
973
971
|
name,
|
|
@@ -987,19 +985,22 @@ var Component8 = function SelectElement(props) {
|
|
|
987
985
|
fieldState: { error }
|
|
988
986
|
} = _reacthookform.useController.call(void 0, {
|
|
989
987
|
name,
|
|
990
|
-
control
|
|
991
|
-
disabled
|
|
988
|
+
control
|
|
992
989
|
});
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
990
|
+
const [hasAutoSelected, setHasAutoSelected] = _react.useState.call(void 0, false);
|
|
991
|
+
_react.useEffect.call(void 0, () => {
|
|
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__ */ _jsxruntime.jsx.call(void 0,
|
|
997
998
|
_material.Autocomplete,
|
|
998
999
|
{
|
|
999
1000
|
...rest,
|
|
1000
1001
|
value: field.value !== null ? _nullishCoalesce(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(_nullishCoalesce(_optionalChain([newValue, 'optionalAccess', _21 => _21.value]), () => ( null)));
|
|
1017
|
+
setHasAutoSelected(true);
|
|
1014
1018
|
}
|
|
1019
|
+
_optionalChain([onChange, 'optionalCall', _22 => _22(event, newValue, reason)]);
|
|
1015
1020
|
},
|
|
1016
1021
|
onBlur: (event) => {
|
|
1017
1022
|
field.onBlur();
|
|
@@ -1081,8 +1086,7 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1081
1086
|
fieldState: { error }
|
|
1082
1087
|
} = _reacthookform.useController.call(void 0, {
|
|
1083
1088
|
name,
|
|
1084
|
-
control
|
|
1085
|
-
disabled
|
|
1089
|
+
control
|
|
1086
1090
|
});
|
|
1087
1091
|
const [selectedOptions, setSelectedOptions] = _react.useState.call(void 0, []);
|
|
1088
1092
|
const handleChange = (_2, selectedOptions2, reason) => {
|
|
@@ -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();
|
|
@@ -1180,17 +1184,15 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1180
1184
|
fieldState: { error }
|
|
1181
1185
|
} = _reacthookform.useController.call(void 0, {
|
|
1182
1186
|
name,
|
|
1183
|
-
control
|
|
1184
|
-
disabled
|
|
1187
|
+
control
|
|
1185
1188
|
});
|
|
1186
1189
|
const { field: dependentField } = _reacthookform.useController.call(void 0, {
|
|
1187
1190
|
name: dependsOn,
|
|
1188
|
-
control
|
|
1189
|
-
disabled
|
|
1191
|
+
control
|
|
1190
1192
|
});
|
|
1191
1193
|
const parentValueRef = _react.useRef.call(void 0, _nullishCoalesce(dependentField.value, () => ( null)));
|
|
1192
1194
|
_react.useEffect.call(void 0, () => {
|
|
1193
|
-
if (!!dependentField.value && _optionalChain([parentValueRef, 'optionalAccess',
|
|
1195
|
+
if (!!dependentField.value && _optionalChain([parentValueRef, 'optionalAccess', _23 => _23.current, 'optionalAccess', _24 => _24.value]) !== dependentField.value || dependentField.value === null) {
|
|
1194
1196
|
field.onChange(null);
|
|
1195
1197
|
}
|
|
1196
1198
|
}, [dependentField.value]);
|
|
@@ -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") {
|
|
@@ -1350,7 +1352,7 @@ var Component12 = function CheckboxGroup(props) {
|
|
|
1350
1352
|
disabled: rest.disabled
|
|
1351
1353
|
});
|
|
1352
1354
|
const [selectedValues, setSelectedValues] = _react.useState.call(void 0,
|
|
1353
|
-
options.filter((c) => _optionalChain([field, 'access',
|
|
1355
|
+
options.filter((c) => _optionalChain([field, 'access', _25 => _25.value, 'optionalAccess', _26 => _26.includes, 'call', _27 => _27(c.value)])).map((c) => c.value) || []
|
|
1354
1356
|
);
|
|
1355
1357
|
_react.useEffect.call(void 0, () => {
|
|
1356
1358
|
field.onChange(selectedValues ? [...selectedValues] : []);
|