@gnwebsoft/ui 2.18.32 → 2.18.34
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-OS5KT6UM.mjs → chunk-KM5TYX5L.mjs} +17 -17
- package/dist/{chunk-MRZZQRKX.mjs → chunk-KTFNE7FP.mjs} +47 -21
- package/dist/{chunk-4E6AXVK7.js → chunk-TYB6OIU3.js} +39 -13
- package/dist/{chunk-HTRRCH33.js → chunk-WEPRO2OO.js} +8 -8
- package/dist/components/index.d.mts +7 -6
- package/dist/components/index.d.ts +7 -6
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/wrappers/index.d.mts +2 -0
- package/dist/wrappers/index.d.ts +2 -0
- package/dist/wrappers/index.js +2 -2
- package/dist/wrappers/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -36,6 +36,7 @@ var FilterButton = ({
|
|
|
36
36
|
loading: isSubmitting,
|
|
37
37
|
disabled: !show,
|
|
38
38
|
disableRipple: true,
|
|
39
|
+
color: "primary",
|
|
39
40
|
sx: {
|
|
40
41
|
display: "flex",
|
|
41
42
|
alignItems: "center",
|
|
@@ -60,7 +61,7 @@ import {
|
|
|
60
61
|
useTheme as useTheme2
|
|
61
62
|
} from "@mui/material";
|
|
62
63
|
import ManageSearchIcon from "@mui/icons-material/ManageSearch";
|
|
63
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
64
|
+
import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
64
65
|
var FilterWrapper = ({
|
|
65
66
|
children,
|
|
66
67
|
title,
|
|
@@ -68,7 +69,8 @@ var FilterWrapper = ({
|
|
|
68
69
|
cardSx,
|
|
69
70
|
textSx,
|
|
70
71
|
icon,
|
|
71
|
-
iconSx
|
|
72
|
+
iconSx,
|
|
73
|
+
showCount
|
|
72
74
|
}) => {
|
|
73
75
|
const theme = useTheme2();
|
|
74
76
|
return /* @__PURE__ */ jsxs(
|
|
@@ -115,10 +117,9 @@ var FilterWrapper = ({
|
|
|
115
117
|
...textSx
|
|
116
118
|
},
|
|
117
119
|
children: [
|
|
118
|
-
title,
|
|
119
|
-
"
|
|
120
|
-
filterCount,
|
|
121
|
-
")"
|
|
120
|
+
title ? title : "Filter",
|
|
121
|
+
" ",
|
|
122
|
+
showCount ? `(${filterCount ? filterCount : 0})` : /* @__PURE__ */ jsx3(Fragment, {})
|
|
122
123
|
]
|
|
123
124
|
}
|
|
124
125
|
)
|
|
@@ -185,7 +186,7 @@ var FormWrapper = ({
|
|
|
185
186
|
children: [
|
|
186
187
|
/* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
187
188
|
icon ?? icon,
|
|
188
|
-
/* @__PURE__ */ jsx4(Typography2, { color: "primary", sx: textSx, children:
|
|
189
|
+
/* @__PURE__ */ jsx4(Typography2, { color: "primary", sx: textSx, children: title })
|
|
189
190
|
] }),
|
|
190
191
|
actionButton
|
|
191
192
|
]
|
|
@@ -286,7 +287,7 @@ import {
|
|
|
286
287
|
useTheme as useTheme3
|
|
287
288
|
} from "@mui/material";
|
|
288
289
|
import ManageSearchIcon2 from "@mui/icons-material/ManageSearch";
|
|
289
|
-
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
290
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
290
291
|
var ListWrapper = ({
|
|
291
292
|
children,
|
|
292
293
|
title,
|
|
@@ -300,7 +301,7 @@ var ListWrapper = ({
|
|
|
300
301
|
showCount = true
|
|
301
302
|
}) => {
|
|
302
303
|
const theme = useTheme3();
|
|
303
|
-
if (!show) return /* @__PURE__ */ jsx6(
|
|
304
|
+
if (!show) return /* @__PURE__ */ jsx6(Fragment2, {});
|
|
304
305
|
return /* @__PURE__ */ jsxs4(
|
|
305
306
|
Card3,
|
|
306
307
|
{
|
|
@@ -353,9 +354,8 @@ var ListWrapper = ({
|
|
|
353
354
|
...textSx
|
|
354
355
|
},
|
|
355
356
|
children: [
|
|
356
|
-
title,
|
|
357
|
-
|
|
358
|
-
showCount ? `(${count ? count : 0})` : /* @__PURE__ */ jsx6(Fragment, {})
|
|
357
|
+
title ? title : "List",
|
|
358
|
+
showCount ? `(${count ? count : 0})` : /* @__PURE__ */ jsx6(Fragment2, {})
|
|
359
359
|
]
|
|
360
360
|
}
|
|
361
361
|
)
|
|
@@ -410,19 +410,19 @@ var SimpleToolbar_default = SimpleToolbar;
|
|
|
410
410
|
|
|
411
411
|
// src/components/SimpleButton/SimpleButton.tsx
|
|
412
412
|
import { Button as Button2 } from "@mui/material";
|
|
413
|
-
import { Fragment as
|
|
413
|
+
import { Fragment as Fragment3, jsx as jsx8 } from "react/jsx-runtime";
|
|
414
414
|
var SimpleButton = function SelectMultiElement(props) {
|
|
415
415
|
const { show, ...rest } = props;
|
|
416
|
-
if (!!show) return /* @__PURE__ */ jsx8(
|
|
416
|
+
if (!!show) return /* @__PURE__ */ jsx8(Fragment3, {});
|
|
417
417
|
return /* @__PURE__ */ jsx8(Button2, { ...rest });
|
|
418
418
|
};
|
|
419
419
|
var SimpleButton_default = SimpleButton;
|
|
420
420
|
|
|
421
421
|
// src/components/AuthorizedView/AuthorizedView.tsx
|
|
422
|
-
import { Fragment as
|
|
422
|
+
import { Fragment as Fragment4, jsx as jsx9 } from "react/jsx-runtime";
|
|
423
423
|
var AuthorizedView = ({ children, show }) => {
|
|
424
|
-
if (!show) return /* @__PURE__ */ jsx9(
|
|
425
|
-
return /* @__PURE__ */ jsx9(
|
|
424
|
+
if (!show) return /* @__PURE__ */ jsx9(Fragment4, {});
|
|
425
|
+
return /* @__PURE__ */ jsx9(Fragment4, { children });
|
|
426
426
|
};
|
|
427
427
|
var AuthorizedView_default = AuthorizedView;
|
|
428
428
|
|
|
@@ -455,12 +455,12 @@ var Component4 = function TextFieldElement(props) {
|
|
|
455
455
|
variant: variant ? variant : "outlined",
|
|
456
456
|
size: "small",
|
|
457
457
|
sx: {
|
|
458
|
-
...sx,
|
|
459
458
|
"& .MuiInputLabel-asterisk": { color: "red" },
|
|
460
459
|
"& .MuiInputBase-input": {
|
|
461
460
|
cursor: disabled ? "not-allowed" : "default"
|
|
462
461
|
},
|
|
463
|
-
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
|
|
462
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
463
|
+
...sx
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
);
|
|
@@ -582,7 +582,7 @@ import {
|
|
|
582
582
|
useState as useState2
|
|
583
583
|
} from "react";
|
|
584
584
|
import { useController as useController6 } from "react-hook-form";
|
|
585
|
-
import { CircularProgress, Grid2 as Grid26 } from "@mui/material";
|
|
585
|
+
import { CircularProgress, Grid2 as Grid26, useTheme as useTheme3 } from "@mui/material";
|
|
586
586
|
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
587
587
|
var Component6 = function AsyncSelectElement(props) {
|
|
588
588
|
const {
|
|
@@ -606,6 +606,7 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
606
606
|
name,
|
|
607
607
|
control
|
|
608
608
|
});
|
|
609
|
+
const theme = useTheme3();
|
|
609
610
|
const [loading, setLoading] = useState2(false);
|
|
610
611
|
const [selectedOption, setSelectedOption] = useState2(null);
|
|
611
612
|
const [inputValue, setInputValue] = useState2("");
|
|
@@ -753,10 +754,11 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
753
754
|
},
|
|
754
755
|
variant: variant ? variant : "outlined",
|
|
755
756
|
sx: {
|
|
756
|
-
...sx,
|
|
757
757
|
"& .MuiInputBase-input": {
|
|
758
758
|
cursor: disabled ? "not-allowed" : "default"
|
|
759
|
-
}
|
|
759
|
+
},
|
|
760
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
761
|
+
...sx
|
|
760
762
|
}
|
|
761
763
|
}
|
|
762
764
|
),
|
|
@@ -794,7 +796,8 @@ import {
|
|
|
794
796
|
Autocomplete as Autocomplete2,
|
|
795
797
|
CircularProgress as CircularProgress2,
|
|
796
798
|
Grid2 as Grid27,
|
|
797
|
-
TextField as TextField4
|
|
799
|
+
TextField as TextField4,
|
|
800
|
+
useTheme as useTheme4
|
|
798
801
|
} from "@mui/material";
|
|
799
802
|
import { useController as useController7 } from "react-hook-form";
|
|
800
803
|
import match from "autosuggest-highlight/match";
|
|
@@ -822,6 +825,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
822
825
|
name,
|
|
823
826
|
control
|
|
824
827
|
});
|
|
828
|
+
const theme = useTheme4();
|
|
825
829
|
const multiSelectRef = useRef2(null);
|
|
826
830
|
const [selectedOptions, setSelectedOptions] = useState3([]);
|
|
827
831
|
const [inputValue, setInputValue] = useState3("");
|
|
@@ -946,10 +950,11 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
946
950
|
},
|
|
947
951
|
variant: variant ? variant : "outlined",
|
|
948
952
|
sx: {
|
|
949
|
-
...sx,
|
|
950
953
|
"& .MuiInputBase-input": {
|
|
951
954
|
cursor: disabled ? "not-allowed" : "default"
|
|
952
|
-
}
|
|
955
|
+
},
|
|
956
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
957
|
+
...sx
|
|
953
958
|
}
|
|
954
959
|
}
|
|
955
960
|
),
|
|
@@ -989,7 +994,7 @@ import {
|
|
|
989
994
|
Autocomplete as Autocomplete3,
|
|
990
995
|
Grid2 as Grid28,
|
|
991
996
|
TextField as TextField5,
|
|
992
|
-
useTheme as
|
|
997
|
+
useTheme as useTheme5
|
|
993
998
|
} from "@mui/material";
|
|
994
999
|
import {
|
|
995
1000
|
useController as useController8
|
|
@@ -1010,6 +1015,7 @@ var Component8 = function SelectElement(props) {
|
|
|
1010
1015
|
label,
|
|
1011
1016
|
variant,
|
|
1012
1017
|
sx,
|
|
1018
|
+
isEdit = false,
|
|
1013
1019
|
...rest
|
|
1014
1020
|
} = props;
|
|
1015
1021
|
const {
|
|
@@ -1019,12 +1025,16 @@ var Component8 = function SelectElement(props) {
|
|
|
1019
1025
|
name,
|
|
1020
1026
|
control
|
|
1021
1027
|
});
|
|
1022
|
-
const theme =
|
|
1028
|
+
const theme = useTheme5();
|
|
1023
1029
|
const [hasAutoSelected, setHasAutoSelected] = useState4(false);
|
|
1024
1030
|
useEffect4(() => {
|
|
1025
|
-
if (
|
|
1026
|
-
|
|
1027
|
-
|
|
1031
|
+
if (isEdit) {
|
|
1032
|
+
return;
|
|
1033
|
+
} else {
|
|
1034
|
+
if (options.length === 1 && field.value == null && !hasAutoSelected) {
|
|
1035
|
+
field.onChange(options[0].Value);
|
|
1036
|
+
setHasAutoSelected(true);
|
|
1037
|
+
}
|
|
1028
1038
|
}
|
|
1029
1039
|
}, [options, field.value, field.onChange, hasAutoSelected]);
|
|
1030
1040
|
return /* @__PURE__ */ jsx8(
|
|
@@ -1068,11 +1078,11 @@ var Component8 = function SelectElement(props) {
|
|
|
1068
1078
|
label,
|
|
1069
1079
|
variant: variant ? variant : "outlined",
|
|
1070
1080
|
sx: {
|
|
1071
|
-
...sx,
|
|
1072
1081
|
"& .MuiInputBase-input": {
|
|
1073
1082
|
cursor: disabled ? "not-allowed" : "default"
|
|
1074
1083
|
},
|
|
1075
|
-
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
|
|
1084
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
1085
|
+
...sx
|
|
1076
1086
|
}
|
|
1077
1087
|
}
|
|
1078
1088
|
)
|
|
@@ -1196,9 +1206,10 @@ var SelectMultiElement_default = SelectMultiElement2;
|
|
|
1196
1206
|
import {
|
|
1197
1207
|
Autocomplete as Autocomplete5,
|
|
1198
1208
|
Grid2 as Grid210,
|
|
1199
|
-
TextField as TextField7
|
|
1209
|
+
TextField as TextField7,
|
|
1210
|
+
useTheme as useTheme6
|
|
1200
1211
|
} from "@mui/material";
|
|
1201
|
-
import { useEffect as useEffect5, useRef as useRef3 } from "react";
|
|
1212
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState6 } from "react";
|
|
1202
1213
|
import {
|
|
1203
1214
|
useController as useController10
|
|
1204
1215
|
} from "react-hook-form";
|
|
@@ -1219,6 +1230,7 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1219
1230
|
initialValue,
|
|
1220
1231
|
variant,
|
|
1221
1232
|
sx,
|
|
1233
|
+
isEdit = false,
|
|
1222
1234
|
...rest
|
|
1223
1235
|
} = props;
|
|
1224
1236
|
const {
|
|
@@ -1228,6 +1240,7 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1228
1240
|
name,
|
|
1229
1241
|
control
|
|
1230
1242
|
});
|
|
1243
|
+
const theme = useTheme6();
|
|
1231
1244
|
const { field: dependentField } = useController10({
|
|
1232
1245
|
name: dependsOn,
|
|
1233
1246
|
control
|
|
@@ -1243,6 +1256,18 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1243
1256
|
field.onChange(initialValue);
|
|
1244
1257
|
}
|
|
1245
1258
|
}, [initialValue]);
|
|
1259
|
+
const [hasAutoSelected, setHasAutoSelected] = useState6(false);
|
|
1260
|
+
useEffect5(() => {
|
|
1261
|
+
if (isEdit && !disabled && options.length === 1 && field.value == null && !hasAutoSelected) {
|
|
1262
|
+
field.onChange(options[0].Value);
|
|
1263
|
+
setHasAutoSelected(true);
|
|
1264
|
+
} else {
|
|
1265
|
+
if (options.length === 1 && field.value == null && !hasAutoSelected) {
|
|
1266
|
+
field.onChange(options[0].Value);
|
|
1267
|
+
setHasAutoSelected(true);
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}, [options, field.value, field.onChange, hasAutoSelected, isEdit]);
|
|
1246
1271
|
return /* @__PURE__ */ jsx10(
|
|
1247
1272
|
Autocomplete5,
|
|
1248
1273
|
{
|
|
@@ -1281,10 +1306,11 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1281
1306
|
label,
|
|
1282
1307
|
variant: variant ? variant : "outlined",
|
|
1283
1308
|
sx: {
|
|
1284
|
-
...sx,
|
|
1285
1309
|
"& .MuiInputBase-input": {
|
|
1286
1310
|
cursor: disabled ? "not-allowed" : "default"
|
|
1287
|
-
}
|
|
1311
|
+
},
|
|
1312
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
1313
|
+
...sx
|
|
1288
1314
|
}
|
|
1289
1315
|
}
|
|
1290
1316
|
)
|
|
@@ -1379,7 +1405,7 @@ import {
|
|
|
1379
1405
|
FormHelperText as FormHelperText3,
|
|
1380
1406
|
Grid2 as Grid212
|
|
1381
1407
|
} from "@mui/material";
|
|
1382
|
-
import { useEffect as useEffect6, useState as
|
|
1408
|
+
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
1383
1409
|
import {
|
|
1384
1410
|
useController as useController12
|
|
1385
1411
|
} from "react-hook-form";
|
|
@@ -1394,7 +1420,7 @@ var Component12 = function CheckboxGroup(props) {
|
|
|
1394
1420
|
control,
|
|
1395
1421
|
disabled: rest.disabled
|
|
1396
1422
|
});
|
|
1397
|
-
const [selectedValues, setSelectedValues] =
|
|
1423
|
+
const [selectedValues, setSelectedValues] = useState7(
|
|
1398
1424
|
options.filter((c) => field.value?.includes(c.Value)).map((c) => c.Value) || []
|
|
1399
1425
|
);
|
|
1400
1426
|
useEffect6(() => {
|
|
@@ -455,12 +455,12 @@ var Component4 = function TextFieldElement(props) {
|
|
|
455
455
|
variant: variant ? variant : "outlined",
|
|
456
456
|
size: "small",
|
|
457
457
|
sx: {
|
|
458
|
-
...sx,
|
|
459
458
|
"& .MuiInputLabel-asterisk": { color: "red" },
|
|
460
459
|
"& .MuiInputBase-input": {
|
|
461
460
|
cursor: disabled ? "not-allowed" : "default"
|
|
462
461
|
},
|
|
463
|
-
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
|
|
462
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
463
|
+
...sx
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
);
|
|
@@ -606,6 +606,7 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
606
606
|
name,
|
|
607
607
|
control
|
|
608
608
|
});
|
|
609
|
+
const theme = _material.useTheme.call(void 0, );
|
|
609
610
|
const [loading, setLoading] = _react.useState.call(void 0, false);
|
|
610
611
|
const [selectedOption, setSelectedOption] = _react.useState.call(void 0, null);
|
|
611
612
|
const [inputValue, setInputValue] = _react.useState.call(void 0, "");
|
|
@@ -753,10 +754,11 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
753
754
|
},
|
|
754
755
|
variant: variant ? variant : "outlined",
|
|
755
756
|
sx: {
|
|
756
|
-
...sx,
|
|
757
757
|
"& .MuiInputBase-input": {
|
|
758
758
|
cursor: disabled ? "not-allowed" : "default"
|
|
759
|
-
}
|
|
759
|
+
},
|
|
760
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
761
|
+
...sx
|
|
760
762
|
}
|
|
761
763
|
}
|
|
762
764
|
),
|
|
@@ -797,6 +799,7 @@ var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);
|
|
|
797
799
|
|
|
798
800
|
|
|
799
801
|
|
|
802
|
+
|
|
800
803
|
var _match = require('autosuggest-highlight/match'); var _match2 = _interopRequireDefault(_match);
|
|
801
804
|
var _parse = require('autosuggest-highlight/parse'); var _parse2 = _interopRequireDefault(_parse);
|
|
802
805
|
|
|
@@ -822,6 +825,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
822
825
|
name,
|
|
823
826
|
control
|
|
824
827
|
});
|
|
828
|
+
const theme = _material.useTheme.call(void 0, );
|
|
825
829
|
const multiSelectRef = _react.useRef.call(void 0, null);
|
|
826
830
|
const [selectedOptions, setSelectedOptions] = _react.useState.call(void 0, []);
|
|
827
831
|
const [inputValue, setInputValue] = _react.useState.call(void 0, "");
|
|
@@ -946,10 +950,11 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
946
950
|
},
|
|
947
951
|
variant: variant ? variant : "outlined",
|
|
948
952
|
sx: {
|
|
949
|
-
...sx,
|
|
950
953
|
"& .MuiInputBase-input": {
|
|
951
954
|
cursor: disabled ? "not-allowed" : "default"
|
|
952
|
-
}
|
|
955
|
+
},
|
|
956
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
957
|
+
...sx
|
|
953
958
|
}
|
|
954
959
|
}
|
|
955
960
|
),
|
|
@@ -1010,6 +1015,7 @@ var Component8 = function SelectElement(props) {
|
|
|
1010
1015
|
label,
|
|
1011
1016
|
variant,
|
|
1012
1017
|
sx,
|
|
1018
|
+
isEdit = false,
|
|
1013
1019
|
...rest
|
|
1014
1020
|
} = props;
|
|
1015
1021
|
const {
|
|
@@ -1022,9 +1028,13 @@ var Component8 = function SelectElement(props) {
|
|
|
1022
1028
|
const theme = _material.useTheme.call(void 0, );
|
|
1023
1029
|
const [hasAutoSelected, setHasAutoSelected] = _react.useState.call(void 0, false);
|
|
1024
1030
|
_react.useEffect.call(void 0, () => {
|
|
1025
|
-
if (
|
|
1026
|
-
|
|
1027
|
-
|
|
1031
|
+
if (isEdit) {
|
|
1032
|
+
return;
|
|
1033
|
+
} else {
|
|
1034
|
+
if (options.length === 1 && field.value == null && !hasAutoSelected) {
|
|
1035
|
+
field.onChange(options[0].Value);
|
|
1036
|
+
setHasAutoSelected(true);
|
|
1037
|
+
}
|
|
1028
1038
|
}
|
|
1029
1039
|
}, [options, field.value, field.onChange, hasAutoSelected]);
|
|
1030
1040
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1068,11 +1078,11 @@ var Component8 = function SelectElement(props) {
|
|
|
1068
1078
|
label,
|
|
1069
1079
|
variant: variant ? variant : "outlined",
|
|
1070
1080
|
sx: {
|
|
1071
|
-
...sx,
|
|
1072
1081
|
"& .MuiInputBase-input": {
|
|
1073
1082
|
cursor: disabled ? "not-allowed" : "default"
|
|
1074
1083
|
},
|
|
1075
|
-
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
|
|
1084
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
1085
|
+
...sx
|
|
1076
1086
|
}
|
|
1077
1087
|
}
|
|
1078
1088
|
)
|
|
@@ -1203,6 +1213,7 @@ var SelectMultiElement_default = SelectMultiElement2;
|
|
|
1203
1213
|
|
|
1204
1214
|
|
|
1205
1215
|
|
|
1216
|
+
|
|
1206
1217
|
var Component10 = function SelectCascadeElement(props) {
|
|
1207
1218
|
const {
|
|
1208
1219
|
name,
|
|
@@ -1219,6 +1230,7 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1219
1230
|
initialValue,
|
|
1220
1231
|
variant,
|
|
1221
1232
|
sx,
|
|
1233
|
+
isEdit = false,
|
|
1222
1234
|
...rest
|
|
1223
1235
|
} = props;
|
|
1224
1236
|
const {
|
|
@@ -1228,6 +1240,7 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1228
1240
|
name,
|
|
1229
1241
|
control
|
|
1230
1242
|
});
|
|
1243
|
+
const theme = _material.useTheme.call(void 0, );
|
|
1231
1244
|
const { field: dependentField } = _reacthookform.useController.call(void 0, {
|
|
1232
1245
|
name: dependsOn,
|
|
1233
1246
|
control
|
|
@@ -1243,6 +1256,18 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1243
1256
|
field.onChange(initialValue);
|
|
1244
1257
|
}
|
|
1245
1258
|
}, [initialValue]);
|
|
1259
|
+
const [hasAutoSelected, setHasAutoSelected] = _react.useState.call(void 0, false);
|
|
1260
|
+
_react.useEffect.call(void 0, () => {
|
|
1261
|
+
if (isEdit && !disabled && options.length === 1 && field.value == null && !hasAutoSelected) {
|
|
1262
|
+
field.onChange(options[0].Value);
|
|
1263
|
+
setHasAutoSelected(true);
|
|
1264
|
+
} else {
|
|
1265
|
+
if (options.length === 1 && field.value == null && !hasAutoSelected) {
|
|
1266
|
+
field.onChange(options[0].Value);
|
|
1267
|
+
setHasAutoSelected(true);
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}, [options, field.value, field.onChange, hasAutoSelected, isEdit]);
|
|
1246
1271
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1247
1272
|
_material.Autocomplete,
|
|
1248
1273
|
{
|
|
@@ -1281,10 +1306,11 @@ var Component10 = function SelectCascadeElement(props) {
|
|
|
1281
1306
|
label,
|
|
1282
1307
|
variant: variant ? variant : "outlined",
|
|
1283
1308
|
sx: {
|
|
1284
|
-
...sx,
|
|
1285
1309
|
"& .MuiInputBase-input": {
|
|
1286
1310
|
cursor: disabled ? "not-allowed" : "default"
|
|
1287
|
-
}
|
|
1311
|
+
},
|
|
1312
|
+
bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
|
|
1313
|
+
...sx
|
|
1288
1314
|
}
|
|
1289
1315
|
}
|
|
1290
1316
|
)
|
|
@@ -36,6 +36,7 @@ var FilterButton = ({
|
|
|
36
36
|
loading: isSubmitting,
|
|
37
37
|
disabled: !show,
|
|
38
38
|
disableRipple: true,
|
|
39
|
+
color: "primary",
|
|
39
40
|
sx: {
|
|
40
41
|
display: "flex",
|
|
41
42
|
alignItems: "center",
|
|
@@ -68,7 +69,8 @@ var FilterWrapper = ({
|
|
|
68
69
|
cardSx,
|
|
69
70
|
textSx,
|
|
70
71
|
icon,
|
|
71
|
-
iconSx
|
|
72
|
+
iconSx,
|
|
73
|
+
showCount
|
|
72
74
|
}) => {
|
|
73
75
|
const theme = _material.useTheme.call(void 0, );
|
|
74
76
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -115,10 +117,9 @@ var FilterWrapper = ({
|
|
|
115
117
|
...textSx
|
|
116
118
|
},
|
|
117
119
|
children: [
|
|
118
|
-
title,
|
|
119
|
-
"
|
|
120
|
-
filterCount,
|
|
121
|
-
")"
|
|
120
|
+
title ? title : "Filter",
|
|
121
|
+
" ",
|
|
122
|
+
showCount ? `(${filterCount ? filterCount : 0})` : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {})
|
|
122
123
|
]
|
|
123
124
|
}
|
|
124
125
|
)
|
|
@@ -185,7 +186,7 @@ var FormWrapper = ({
|
|
|
185
186
|
children: [
|
|
186
187
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
187
188
|
_nullishCoalesce(icon, () => ( icon)),
|
|
188
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { color: "primary", sx: textSx, children:
|
|
189
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { color: "primary", sx: textSx, children: title })
|
|
189
190
|
] }),
|
|
190
191
|
actionButton
|
|
191
192
|
]
|
|
@@ -353,8 +354,7 @@ var ListWrapper = ({
|
|
|
353
354
|
...textSx
|
|
354
355
|
},
|
|
355
356
|
children: [
|
|
356
|
-
title,
|
|
357
|
-
" ",
|
|
357
|
+
title ? title : "List",
|
|
358
358
|
showCount ? `(${count ? count : 0})` : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {})
|
|
359
359
|
]
|
|
360
360
|
}
|
|
@@ -21,18 +21,19 @@ type FilterButtonProps = {
|
|
|
21
21
|
declare const FilterButton: ({ isSubmitting, show, title, icon, sx, iconSx, }: FilterButtonProps) => react_jsx_runtime.JSX.Element;
|
|
22
22
|
|
|
23
23
|
type FilterWrapperProps = PropsWithChildren<{
|
|
24
|
-
title
|
|
25
|
-
filterCount
|
|
24
|
+
title?: string;
|
|
25
|
+
filterCount?: number;
|
|
26
26
|
cardSx?: SxProps;
|
|
27
27
|
textSx?: SxProps;
|
|
28
28
|
icon?: ReactNode;
|
|
29
29
|
iconSx?: SxProps;
|
|
30
|
+
showCount?: boolean;
|
|
30
31
|
}>;
|
|
31
|
-
declare const FilterWrapper: ({ children, title, filterCount, cardSx, textSx, icon, iconSx, }: FilterWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare const FilterWrapper: ({ children, title, filterCount, cardSx, textSx, icon, iconSx, showCount, }: FilterWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
32
33
|
|
|
33
34
|
type FormWrapper = PropsWithChildren<{
|
|
34
35
|
title: string;
|
|
35
|
-
editMode
|
|
36
|
+
editMode?: boolean;
|
|
36
37
|
icon?: ReactNode;
|
|
37
38
|
cardSx?: SxProps;
|
|
38
39
|
textSx?: SxProps;
|
|
@@ -66,8 +67,8 @@ type LabelTextProps = {
|
|
|
66
67
|
declare const LabelText: ({ label, value, gridSize, containerSize, labelSx, valueSx, }: LabelTextProps) => react_jsx_runtime.JSX.Element;
|
|
67
68
|
|
|
68
69
|
type ListWrapperProps = PropsWithChildren<{
|
|
69
|
-
title
|
|
70
|
-
count
|
|
70
|
+
title?: string;
|
|
71
|
+
count?: number;
|
|
71
72
|
show?: boolean;
|
|
72
73
|
actionButton?: ReactNode;
|
|
73
74
|
cardSx?: SxProps;
|
|
@@ -21,18 +21,19 @@ type FilterButtonProps = {
|
|
|
21
21
|
declare const FilterButton: ({ isSubmitting, show, title, icon, sx, iconSx, }: FilterButtonProps) => react_jsx_runtime.JSX.Element;
|
|
22
22
|
|
|
23
23
|
type FilterWrapperProps = PropsWithChildren<{
|
|
24
|
-
title
|
|
25
|
-
filterCount
|
|
24
|
+
title?: string;
|
|
25
|
+
filterCount?: number;
|
|
26
26
|
cardSx?: SxProps;
|
|
27
27
|
textSx?: SxProps;
|
|
28
28
|
icon?: ReactNode;
|
|
29
29
|
iconSx?: SxProps;
|
|
30
|
+
showCount?: boolean;
|
|
30
31
|
}>;
|
|
31
|
-
declare const FilterWrapper: ({ children, title, filterCount, cardSx, textSx, icon, iconSx, }: FilterWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare const FilterWrapper: ({ children, title, filterCount, cardSx, textSx, icon, iconSx, showCount, }: FilterWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
32
33
|
|
|
33
34
|
type FormWrapper = PropsWithChildren<{
|
|
34
35
|
title: string;
|
|
35
|
-
editMode
|
|
36
|
+
editMode?: boolean;
|
|
36
37
|
icon?: ReactNode;
|
|
37
38
|
cardSx?: SxProps;
|
|
38
39
|
textSx?: SxProps;
|
|
@@ -66,8 +67,8 @@ type LabelTextProps = {
|
|
|
66
67
|
declare const LabelText: ({ label, value, gridSize, containerSize, labelSx, valueSx, }: LabelTextProps) => react_jsx_runtime.JSX.Element;
|
|
67
68
|
|
|
68
69
|
type ListWrapperProps = PropsWithChildren<{
|
|
69
|
-
title
|
|
70
|
-
count
|
|
70
|
+
title?: string;
|
|
71
|
+
count?: number;
|
|
71
72
|
show?: boolean;
|
|
72
73
|
actionButton?: ReactNode;
|
|
73
74
|
cardSx?: SxProps;
|
package/dist/components/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkWEPRO2OOjs = require('../chunk-WEPRO2OO.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,4 +19,4 @@ var _chunkHTRRCH33js = require('../chunk-HTRRCH33.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.AuthorizedView =
|
|
22
|
+
exports.AuthorizedView = _chunkWEPRO2OOjs.AuthorizedView_default; exports.ClearButton = _chunkWEPRO2OOjs.ClearButton_default; exports.FilterButton = _chunkWEPRO2OOjs.FilterButton_default; exports.FilterWrapper = _chunkWEPRO2OOjs.FilterWrapper_default; exports.FormWrapper = _chunkWEPRO2OOjs.FormWrapper_default; exports.LabelText = _chunkWEPRO2OOjs.LabelText_default; exports.ListWrapper = _chunkWEPRO2OOjs.ListWrapper_default; exports.SimpleButton = _chunkWEPRO2OOjs.SimpleButton_default; exports.SimpleToolbar = _chunkWEPRO2OOjs.SimpleToolbar_default;
|
package/dist/index.js
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkWEPRO2OOjs = require('./chunk-WEPRO2OO.js');
|
|
12
12
|
require('./chunk-7M2VOCYN.js');
|
|
13
13
|
require('./chunk-6BGQA4BQ.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkTYB6OIU3js = require('./chunk-TYB6OIU3.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkSTC2BZ2Ljs = require('./chunk-STC2BZ2L.js');
|
|
@@ -53,4 +53,4 @@ var _chunkDKBPCLECjs = require('./chunk-DKBPCLEC.js');
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
exports.AuthorizedView =
|
|
56
|
+
exports.AuthorizedView = _chunkWEPRO2OOjs.AuthorizedView_default; exports.ClearButton = _chunkWEPRO2OOjs.ClearButton_default; exports.Field = _chunkTYB6OIU3js.Field_default; exports.Field2 = _chunkSTC2BZ2Ljs.Field_default; exports.FilterButton = _chunkWEPRO2OOjs.FilterButton_default; exports.FilterWrapper = _chunkWEPRO2OOjs.FilterWrapper_default; exports.FormWrapper = _chunkWEPRO2OOjs.FormWrapper_default; exports.LabelText = _chunkWEPRO2OOjs.LabelText_default; exports.ListWrapper = _chunkWEPRO2OOjs.ListWrapper_default; exports.SimpleButton = _chunkWEPRO2OOjs.SimpleButton_default; exports.SimpleToolbar = _chunkWEPRO2OOjs.SimpleToolbar_default; exports.api = _chunkDKBPCLECjs.api; exports.api2 = _chunkDKBPCLECjs.api2; exports.flattenObjectKeys = _chunkDKBPCLECjs.flattenObjectKeys; exports.getTimezone = _chunkDKBPCLECjs.getTimezone; exports.handleServerErrors = _chunkDKBPCLECjs.handleServerErrors; exports.propertyExists = _chunkDKBPCLECjs.propertyExists; exports.readValueAsDate = _chunkDKBPCLECjs.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunkDKBPCLECjs.removeLeadingTrailingSlashes; exports.schemaTools = _chunkDKBPCLECjs.schemaTools; exports.useTransform = _chunk6JZ35VQJjs.useTransform;
|
package/dist/index.mjs
CHANGED
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
ListWrapper_default,
|
|
9
9
|
SimpleButton_default,
|
|
10
10
|
SimpleToolbar_default
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KM5TYX5L.mjs";
|
|
12
12
|
import "./chunk-2JFL7TS5.mjs";
|
|
13
13
|
import "./chunk-EVPUCTZA.mjs";
|
|
14
14
|
import {
|
|
15
15
|
Field_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KTFNE7FP.mjs";
|
|
17
17
|
import {
|
|
18
18
|
Field_default as Field_default2
|
|
19
19
|
} from "./chunk-34X2YRTY.mjs";
|
|
@@ -73,6 +73,7 @@ type SelectCascadeElementProps<TFieldValues extends FieldValues = FieldValues, T
|
|
|
73
73
|
initialValue?: number | null;
|
|
74
74
|
variant?: TextFieldVariants$1;
|
|
75
75
|
sx?: SxProps$1;
|
|
76
|
+
isEdit?: boolean;
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
type SelectMultiElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
@@ -107,6 +108,7 @@ type SelectElementProps<TFieldValues extends FieldValues = FieldValues, TName ex
|
|
|
107
108
|
label?: string;
|
|
108
109
|
variant?: TextFieldVariants$1;
|
|
109
110
|
sx?: SxProps$1;
|
|
111
|
+
isEdit?: boolean;
|
|
110
112
|
};
|
|
111
113
|
|
|
112
114
|
type TimePickerElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends PickerValidDate = PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> = Omit<TimePickerProps<TValue>, "value" | "renderInput"> & {
|
package/dist/wrappers/index.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ type SelectCascadeElementProps<TFieldValues extends FieldValues = FieldValues, T
|
|
|
73
73
|
initialValue?: number | null;
|
|
74
74
|
variant?: TextFieldVariants$1;
|
|
75
75
|
sx?: SxProps$1;
|
|
76
|
+
isEdit?: boolean;
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
type SelectMultiElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
@@ -107,6 +108,7 @@ type SelectElementProps<TFieldValues extends FieldValues = FieldValues, TName ex
|
|
|
107
108
|
label?: string;
|
|
108
109
|
variant?: TextFieldVariants$1;
|
|
109
110
|
sx?: SxProps$1;
|
|
111
|
+
isEdit?: boolean;
|
|
110
112
|
};
|
|
111
113
|
|
|
112
114
|
type TimePickerElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends PickerValidDate = PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> = Omit<TimePickerProps<TValue>, "value" | "renderInput"> & {
|
package/dist/wrappers/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTYB6OIU3js = require('../chunk-TYB6OIU3.js');
|
|
4
4
|
require('../chunk-6JZ35VQJ.js');
|
|
5
5
|
require('../chunk-DKBPCLEC.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.Field =
|
|
8
|
+
exports.Field = _chunkTYB6OIU3js.Field_default;
|
package/dist/wrappers/index.mjs
CHANGED