@gnwebsoft/ui 2.18.6 → 2.18.8
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/OptionItem-CzX7oHfv.d.mts +23 -0
- package/dist/OptionItem-CzX7oHfv.d.ts +23 -0
- package/dist/{chunk-GS2RM6YK.js → chunk-BITOV242.js} +23 -27
- package/dist/{chunk-2U3XPDVH.mjs → chunk-LZG7ZAMH.mjs} +24 -28
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/types/index.d.mts +4 -17
- package/dist/types/index.d.ts +4 -17
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/wrappers/index.d.mts +46 -30
- package/dist/wrappers/index.d.ts +46 -30
- package/dist/wrappers/index.js +2 -2
- package/dist/wrappers/index.mjs +1 -1
- package/package.json +2 -1
- package/dist/AsyncSelectPayload-DHN-R3gc.d.mts +0 -6
- package/dist/AsyncSelectPayload-DHN-R3gc.d.ts +0 -6
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type AsyncSelectPayload = {
|
|
2
|
+
query: string | null;
|
|
3
|
+
initialValue?: number | null;
|
|
4
|
+
};
|
|
5
|
+
type AsyncSelectMultiPayload = {
|
|
6
|
+
query: string | null;
|
|
7
|
+
initialValues?: number[] | null;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type OptionItem = {
|
|
11
|
+
Label: string;
|
|
12
|
+
Value: string;
|
|
13
|
+
};
|
|
14
|
+
type AsyncMultiSelectPayload = {
|
|
15
|
+
query: string | null;
|
|
16
|
+
initialValues?: number[] | null;
|
|
17
|
+
};
|
|
18
|
+
type OptionItem2 = {
|
|
19
|
+
Label: string;
|
|
20
|
+
Value: number;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type { AsyncSelectPayload as A, OptionItem as O, AsyncSelectMultiPayload as a, AsyncMultiSelectPayload as b, OptionItem2 as c };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type AsyncSelectPayload = {
|
|
2
|
+
query: string | null;
|
|
3
|
+
initialValue?: number | null;
|
|
4
|
+
};
|
|
5
|
+
type AsyncSelectMultiPayload = {
|
|
6
|
+
query: string | null;
|
|
7
|
+
initialValues?: number[] | null;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
type OptionItem = {
|
|
11
|
+
Label: string;
|
|
12
|
+
Value: string;
|
|
13
|
+
};
|
|
14
|
+
type AsyncMultiSelectPayload = {
|
|
15
|
+
query: string | null;
|
|
16
|
+
initialValues?: number[] | null;
|
|
17
|
+
};
|
|
18
|
+
type OptionItem2 = {
|
|
19
|
+
Label: string;
|
|
20
|
+
Value: number;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type { AsyncSelectPayload as A, OptionItem as O, AsyncSelectMultiPayload as a, AsyncMultiSelectPayload as b, OptionItem2 as c };
|
|
@@ -589,7 +589,6 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
589
589
|
!initialValue ? true : !(initialValue != null && initialValue > 0)
|
|
590
590
|
);
|
|
591
591
|
const fieldValue = _react.useRef.call(void 0, field.value);
|
|
592
|
-
console.log(initialValue, field.value);
|
|
593
592
|
const fetchData = _react.useMemo.call(void 0,
|
|
594
593
|
() => _utils.debounce.call(void 0,
|
|
595
594
|
(payload, callback) => {
|
|
@@ -621,10 +620,10 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
621
620
|
fetchData(payload, (results) => {
|
|
622
621
|
if (active) {
|
|
623
622
|
if (!!results && results.length > 0) {
|
|
624
|
-
fillOptions(_optionalChain([results, 'optionalAccess', _19 => _19.filter, 'call', _20 => _20((c) => c.
|
|
623
|
+
fillOptions(_optionalChain([results, 'optionalAccess', _19 => _19.filter, 'call', _20 => _20((c) => c.Value == initialValue)]));
|
|
625
624
|
setSelectedOption(results[0]);
|
|
626
|
-
field.onChange(results[0].
|
|
627
|
-
fieldValue.current = results[0].
|
|
625
|
+
field.onChange(results[0].Value);
|
|
626
|
+
fieldValue.current = results[0].Value;
|
|
628
627
|
}
|
|
629
628
|
initialValueLoaded.current = true;
|
|
630
629
|
setLoading(false);
|
|
@@ -667,8 +666,8 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
667
666
|
} else if (reason === "selectOption" || reason === "removeOption") {
|
|
668
667
|
if (selectedOption2) {
|
|
669
668
|
setSelectedOption(selectedOption2);
|
|
670
|
-
field.onChange(selectedOption2.
|
|
671
|
-
fieldValue.current = selectedOption2.
|
|
669
|
+
field.onChange(selectedOption2.Value);
|
|
670
|
+
fieldValue.current = selectedOption2.Value;
|
|
672
671
|
}
|
|
673
672
|
}
|
|
674
673
|
setOptions([]);
|
|
@@ -680,9 +679,9 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
680
679
|
ref: selectRef,
|
|
681
680
|
fullWidth: true,
|
|
682
681
|
loading,
|
|
683
|
-
getOptionLabel: (option) => option.
|
|
684
|
-
getOptionKey: (option) => option.
|
|
685
|
-
isOptionEqualToValue: (option, val) => option.
|
|
682
|
+
getOptionLabel: (option) => option.Label,
|
|
683
|
+
getOptionKey: (option) => option.Value,
|
|
684
|
+
isOptionEqualToValue: (option, val) => option.Value === val.Value,
|
|
686
685
|
autoComplete: true,
|
|
687
686
|
includeInputInList: true,
|
|
688
687
|
options,
|
|
@@ -713,7 +712,7 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
713
712
|
),
|
|
714
713
|
renderOption: (props2, option) => {
|
|
715
714
|
const { key, ...optionProps } = props2;
|
|
716
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...optionProps, children: option.
|
|
715
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...optionProps, children: option.Label }, key);
|
|
717
716
|
}
|
|
718
717
|
}
|
|
719
718
|
);
|
|
@@ -748,8 +747,6 @@ var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);
|
|
|
748
747
|
|
|
749
748
|
|
|
750
749
|
|
|
751
|
-
|
|
752
|
-
|
|
753
750
|
var _match = require('autosuggest-highlight/match'); var _match2 = _interopRequireDefault(_match);
|
|
754
751
|
var _parse = require('autosuggest-highlight/parse'); var _parse2 = _interopRequireDefault(_parse);
|
|
755
752
|
|
|
@@ -805,7 +802,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
805
802
|
const newlyAdded = _lodash2.default.differenceBy(
|
|
806
803
|
results,
|
|
807
804
|
selectedOptions,
|
|
808
|
-
(c) => c.
|
|
805
|
+
(c) => c.Value
|
|
809
806
|
);
|
|
810
807
|
newOptions = [...newOptions, ...newlyAdded];
|
|
811
808
|
}
|
|
@@ -823,7 +820,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
823
820
|
fetchData(payload, (results) => {
|
|
824
821
|
if (active) {
|
|
825
822
|
setSelectedOptions([...results]);
|
|
826
|
-
field.onChange([...results.map((c) => c.
|
|
823
|
+
field.onChange([...results.map((c) => c.Value)]);
|
|
827
824
|
initialValuesLoaded.current = true;
|
|
828
825
|
setLoading(false);
|
|
829
826
|
}
|
|
@@ -858,7 +855,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
858
855
|
field.onChange([]);
|
|
859
856
|
} else if (reason === "selectOption" || reason === "removeOption") {
|
|
860
857
|
setSelectedOptions(selectedOptions2);
|
|
861
|
-
field.onChange(selectedOptions2.map((c) => c.
|
|
858
|
+
field.onChange(selectedOptions2.map((c) => c.Value));
|
|
862
859
|
}
|
|
863
860
|
setOptions([]);
|
|
864
861
|
};
|
|
@@ -868,9 +865,9 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
868
865
|
ref: multiSelectRef,
|
|
869
866
|
multiple: true,
|
|
870
867
|
loading,
|
|
871
|
-
getOptionLabel: (option) => option.
|
|
872
|
-
getOptionKey: (option) => option.
|
|
873
|
-
isOptionEqualToValue: (option, val) => option.
|
|
868
|
+
getOptionLabel: (option) => option.Label,
|
|
869
|
+
getOptionKey: (option) => option.Value,
|
|
870
|
+
isOptionEqualToValue: (option, val) => option.Value === val.Value,
|
|
874
871
|
options,
|
|
875
872
|
value: selectedOptions,
|
|
876
873
|
filterSelectedOptions: true,
|
|
@@ -899,8 +896,8 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
899
896
|
),
|
|
900
897
|
renderOption: (props2, option, { inputValue: inputValue3 }) => {
|
|
901
898
|
const { key, ...optionProps } = props2;
|
|
902
|
-
const matches = _match2.default.call(void 0, option.
|
|
903
|
-
const parts = _parse2.default.call(void 0, option.
|
|
899
|
+
const matches = _match2.default.call(void 0, option.Label, inputValue3, { insideWords: true });
|
|
900
|
+
const parts = _parse2.default.call(void 0, option.Label, matches);
|
|
904
901
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...optionProps, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: parts.map((part, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
905
902
|
"span",
|
|
906
903
|
{
|
|
@@ -965,16 +962,16 @@ var Component8 = function SelectElement(props) {
|
|
|
965
962
|
{
|
|
966
963
|
...rest,
|
|
967
964
|
value: field.value ? _nullishCoalesce(options.find((option) => {
|
|
968
|
-
return field.value === option.
|
|
965
|
+
return field.value === option.Value;
|
|
969
966
|
}), () => ( null)) : null,
|
|
970
967
|
loading,
|
|
971
968
|
options,
|
|
972
|
-
getOptionLabel: (c) => c.
|
|
973
|
-
isOptionEqualToValue: (option,
|
|
969
|
+
getOptionLabel: (c) => c.Label,
|
|
970
|
+
isOptionEqualToValue: (option, Value) => option.Value === Value.Value,
|
|
974
971
|
ref: field.ref,
|
|
975
972
|
disabled: field.disabled,
|
|
976
973
|
onChange: (event, newValue, reason) => {
|
|
977
|
-
field.onChange(newValue ? newValue.
|
|
974
|
+
field.onChange(newValue ? newValue.Value : null);
|
|
978
975
|
if (onChange && typeof onChange === "function") {
|
|
979
976
|
onChange(event, newValue, reason);
|
|
980
977
|
}
|
|
@@ -1052,7 +1049,7 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1052
1049
|
field.onChange([]);
|
|
1053
1050
|
} else if (reason === "selectOption" || reason === "removeOption") {
|
|
1054
1051
|
setSelectedOptions(selectedOptions2);
|
|
1055
|
-
field.onChange(selectedOptions2.map((c) => c.
|
|
1052
|
+
field.onChange(selectedOptions2.map((c) => c.Value));
|
|
1056
1053
|
}
|
|
1057
1054
|
};
|
|
1058
1055
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1062,8 +1059,7 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1062
1059
|
value: selectedOptions,
|
|
1063
1060
|
loading,
|
|
1064
1061
|
options,
|
|
1065
|
-
getOptionLabel: (c) => c.
|
|
1066
|
-
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
1062
|
+
getOptionLabel: (c) => c.Label,
|
|
1067
1063
|
filterSelectedOptions: true,
|
|
1068
1064
|
ref: field.ref,
|
|
1069
1065
|
disabled: field.disabled,
|
|
@@ -589,7 +589,6 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
589
589
|
!initialValue ? true : !(initialValue != null && initialValue > 0)
|
|
590
590
|
);
|
|
591
591
|
const fieldValue = useRef(field.value);
|
|
592
|
-
console.log(initialValue, field.value);
|
|
593
592
|
const fetchData = useMemo(
|
|
594
593
|
() => debounce(
|
|
595
594
|
(payload, callback) => {
|
|
@@ -621,10 +620,10 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
621
620
|
fetchData(payload, (results) => {
|
|
622
621
|
if (active) {
|
|
623
622
|
if (!!results && results.length > 0) {
|
|
624
|
-
fillOptions(results?.filter((c) => c.
|
|
623
|
+
fillOptions(results?.filter((c) => c.Value == initialValue));
|
|
625
624
|
setSelectedOption(results[0]);
|
|
626
|
-
field.onChange(results[0].
|
|
627
|
-
fieldValue.current = results[0].
|
|
625
|
+
field.onChange(results[0].Value);
|
|
626
|
+
fieldValue.current = results[0].Value;
|
|
628
627
|
}
|
|
629
628
|
initialValueLoaded.current = true;
|
|
630
629
|
setLoading(false);
|
|
@@ -667,8 +666,8 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
667
666
|
} else if (reason === "selectOption" || reason === "removeOption") {
|
|
668
667
|
if (selectedOption2) {
|
|
669
668
|
setSelectedOption(selectedOption2);
|
|
670
|
-
field.onChange(selectedOption2.
|
|
671
|
-
fieldValue.current = selectedOption2.
|
|
669
|
+
field.onChange(selectedOption2.Value);
|
|
670
|
+
fieldValue.current = selectedOption2.Value;
|
|
672
671
|
}
|
|
673
672
|
}
|
|
674
673
|
setOptions([]);
|
|
@@ -680,9 +679,9 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
680
679
|
ref: selectRef,
|
|
681
680
|
fullWidth: true,
|
|
682
681
|
loading,
|
|
683
|
-
getOptionLabel: (option) => option.
|
|
684
|
-
getOptionKey: (option) => option.
|
|
685
|
-
isOptionEqualToValue: (option, val) => option.
|
|
682
|
+
getOptionLabel: (option) => option.Label,
|
|
683
|
+
getOptionKey: (option) => option.Value,
|
|
684
|
+
isOptionEqualToValue: (option, val) => option.Value === val.Value,
|
|
686
685
|
autoComplete: true,
|
|
687
686
|
includeInputInList: true,
|
|
688
687
|
options,
|
|
@@ -713,7 +712,7 @@ var Component6 = function AsyncSelectElement(props) {
|
|
|
713
712
|
),
|
|
714
713
|
renderOption: (props2, option) => {
|
|
715
714
|
const { key, ...optionProps } = props2;
|
|
716
|
-
return /* @__PURE__ */ jsx6("li", { ...optionProps, children: option.
|
|
715
|
+
return /* @__PURE__ */ jsx6("li", { ...optionProps, children: option.Label }, key);
|
|
717
716
|
}
|
|
718
717
|
}
|
|
719
718
|
);
|
|
@@ -747,9 +746,7 @@ import {
|
|
|
747
746
|
Grid2 as Grid27,
|
|
748
747
|
TextField as TextField4
|
|
749
748
|
} from "@mui/material";
|
|
750
|
-
import {
|
|
751
|
-
useController as useController7
|
|
752
|
-
} from "react-hook-form";
|
|
749
|
+
import { useController as useController7 } from "react-hook-form";
|
|
753
750
|
import match from "autosuggest-highlight/match";
|
|
754
751
|
import parse from "autosuggest-highlight/parse";
|
|
755
752
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -805,7 +802,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
805
802
|
const newlyAdded = _.differenceBy(
|
|
806
803
|
results,
|
|
807
804
|
selectedOptions,
|
|
808
|
-
(c) => c.
|
|
805
|
+
(c) => c.Value
|
|
809
806
|
);
|
|
810
807
|
newOptions = [...newOptions, ...newlyAdded];
|
|
811
808
|
}
|
|
@@ -823,7 +820,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
823
820
|
fetchData(payload, (results) => {
|
|
824
821
|
if (active) {
|
|
825
822
|
setSelectedOptions([...results]);
|
|
826
|
-
field.onChange([...results.map((c) => c.
|
|
823
|
+
field.onChange([...results.map((c) => c.Value)]);
|
|
827
824
|
initialValuesLoaded.current = true;
|
|
828
825
|
setLoading(false);
|
|
829
826
|
}
|
|
@@ -858,7 +855,7 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
858
855
|
field.onChange([]);
|
|
859
856
|
} else if (reason === "selectOption" || reason === "removeOption") {
|
|
860
857
|
setSelectedOptions(selectedOptions2);
|
|
861
|
-
field.onChange(selectedOptions2.map((c) => c.
|
|
858
|
+
field.onChange(selectedOptions2.map((c) => c.Value));
|
|
862
859
|
}
|
|
863
860
|
setOptions([]);
|
|
864
861
|
};
|
|
@@ -868,9 +865,9 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
868
865
|
ref: multiSelectRef,
|
|
869
866
|
multiple: true,
|
|
870
867
|
loading,
|
|
871
|
-
getOptionLabel: (option) => option.
|
|
872
|
-
getOptionKey: (option) => option.
|
|
873
|
-
isOptionEqualToValue: (option, val) => option.
|
|
868
|
+
getOptionLabel: (option) => option.Label,
|
|
869
|
+
getOptionKey: (option) => option.Value,
|
|
870
|
+
isOptionEqualToValue: (option, val) => option.Value === val.Value,
|
|
874
871
|
options,
|
|
875
872
|
value: selectedOptions,
|
|
876
873
|
filterSelectedOptions: true,
|
|
@@ -899,8 +896,8 @@ var Component7 = function AsyncSelectMultiElement(props) {
|
|
|
899
896
|
),
|
|
900
897
|
renderOption: (props2, option, { inputValue: inputValue3 }) => {
|
|
901
898
|
const { key, ...optionProps } = props2;
|
|
902
|
-
const matches = match(option.
|
|
903
|
-
const parts = parse(option.
|
|
899
|
+
const matches = match(option.Label, inputValue3, { insideWords: true });
|
|
900
|
+
const parts = parse(option.Label, matches);
|
|
904
901
|
return /* @__PURE__ */ jsx7("li", { ...optionProps, children: /* @__PURE__ */ jsx7("div", { children: parts.map((part, index) => /* @__PURE__ */ jsx7(
|
|
905
902
|
"span",
|
|
906
903
|
{
|
|
@@ -965,16 +962,16 @@ var Component8 = function SelectElement(props) {
|
|
|
965
962
|
{
|
|
966
963
|
...rest,
|
|
967
964
|
value: field.value ? options.find((option) => {
|
|
968
|
-
return field.value === option.
|
|
965
|
+
return field.value === option.Value;
|
|
969
966
|
}) ?? null : null,
|
|
970
967
|
loading,
|
|
971
968
|
options,
|
|
972
|
-
getOptionLabel: (c) => c.
|
|
973
|
-
isOptionEqualToValue: (option,
|
|
969
|
+
getOptionLabel: (c) => c.Label,
|
|
970
|
+
isOptionEqualToValue: (option, Value) => option.Value === Value.Value,
|
|
974
971
|
ref: field.ref,
|
|
975
972
|
disabled: field.disabled,
|
|
976
973
|
onChange: (event, newValue, reason) => {
|
|
977
|
-
field.onChange(newValue ? newValue.
|
|
974
|
+
field.onChange(newValue ? newValue.Value : null);
|
|
978
975
|
if (onChange && typeof onChange === "function") {
|
|
979
976
|
onChange(event, newValue, reason);
|
|
980
977
|
}
|
|
@@ -1052,7 +1049,7 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1052
1049
|
field.onChange([]);
|
|
1053
1050
|
} else if (reason === "selectOption" || reason === "removeOption") {
|
|
1054
1051
|
setSelectedOptions(selectedOptions2);
|
|
1055
|
-
field.onChange(selectedOptions2.map((c) => c.
|
|
1052
|
+
field.onChange(selectedOptions2.map((c) => c.Value));
|
|
1056
1053
|
}
|
|
1057
1054
|
};
|
|
1058
1055
|
return /* @__PURE__ */ jsx9(
|
|
@@ -1062,8 +1059,7 @@ var Component9 = function SelectMultiElement(props) {
|
|
|
1062
1059
|
value: selectedOptions,
|
|
1063
1060
|
loading,
|
|
1064
1061
|
options,
|
|
1065
|
-
getOptionLabel: (c) => c.
|
|
1066
|
-
isOptionEqualToValue: (option, value) => option.value === value.value,
|
|
1062
|
+
getOptionLabel: (c) => c.Label,
|
|
1067
1063
|
filterSelectedOptions: true,
|
|
1068
1064
|
ref: field.ref,
|
|
1069
1065
|
disabled: field.disabled,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { ClearButton, FilterButton, FilterWrapper, FormWrapper, LabelText, ListWrapper, SimpleToolbar } from './components/index.mjs';
|
|
2
2
|
export { UseTransformOptions, UseTransformReturn, useTransform } from './hooks/index.mjs';
|
|
3
|
-
export { ApiResponse,
|
|
3
|
+
export { ApiResponse, ListResponse, OperationResponse, PostModel, ValidationErrors, ValueLabel } from './types/index.mjs';
|
|
4
4
|
export { api, flattenObjectKeys, getTimezone, handleServerErrors, propertyExists, readValueAsDate, removeLeadingTrailingSlashes, schemaTools } from './utils/index.mjs';
|
|
5
5
|
export { Field } from './wrappers/index.mjs';
|
|
6
|
-
export { A as AsyncSelectPayload } from './
|
|
6
|
+
export { b as AsyncMultiSelectPayload, a as AsyncSelectMultiPayload, A as AsyncSelectPayload, O as OptionItem, c as OptionItem2 } from './OptionItem-CzX7oHfv.mjs';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'react-hook-form';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { ClearButton, FilterButton, FilterWrapper, FormWrapper, LabelText, ListWrapper, SimpleToolbar } from './components/index.js';
|
|
2
2
|
export { UseTransformOptions, UseTransformReturn, useTransform } from './hooks/index.js';
|
|
3
|
-
export { ApiResponse,
|
|
3
|
+
export { ApiResponse, ListResponse, OperationResponse, PostModel, ValidationErrors, ValueLabel } from './types/index.js';
|
|
4
4
|
export { api, flattenObjectKeys, getTimezone, handleServerErrors, propertyExists, readValueAsDate, removeLeadingTrailingSlashes, schemaTools } from './utils/index.js';
|
|
5
5
|
export { Field } from './wrappers/index.js';
|
|
6
|
-
export { A as AsyncSelectPayload } from './
|
|
6
|
+
export { b as AsyncMultiSelectPayload, a as AsyncSelectMultiPayload, A as AsyncSelectPayload, O as OptionItem, c as OptionItem2 } from './OptionItem-CzX7oHfv.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'react-hook-form';
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ require('./chunk-7M2VOCYN.js');
|
|
|
11
11
|
require('./chunk-6BGQA4BQ.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkBITOV242js = require('./chunk-BITOV242.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunk6JZ35VQJjs = require('./chunk-6JZ35VQJ.js');
|
|
@@ -43,4 +43,4 @@ var _chunkKTAQRRS7js = require('./chunk-KTAQRRS7.js');
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
exports.ClearButton = _chunkFP2QMQOOjs.ClearButton_default; exports.Field =
|
|
46
|
+
exports.ClearButton = _chunkFP2QMQOOjs.ClearButton_default; exports.Field = _chunkBITOV242js.Field_default; exports.FilterButton = _chunkFP2QMQOOjs.FilterButton_default; exports.FilterWrapper = _chunkFP2QMQOOjs.FilterWrapper_default; exports.FormWrapper = _chunkFP2QMQOOjs.FormWrapper_default; exports.LabelText = _chunkFP2QMQOOjs.LabelText_default; exports.ListWrapper = _chunkFP2QMQOOjs.ListWrapper_default; exports.SimpleToolbar = _chunkFP2QMQOOjs.SimpleToolbar_default; exports.api = _chunkKTAQRRS7js.api; exports.flattenObjectKeys = _chunkKTAQRRS7js.flattenObjectKeys; exports.getTimezone = _chunkKTAQRRS7js.getTimezone; exports.handleServerErrors = _chunkKTAQRRS7js.handleServerErrors; exports.propertyExists = _chunkKTAQRRS7js.propertyExists; exports.readValueAsDate = _chunkKTAQRRS7js.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunkKTAQRRS7js.removeLeadingTrailingSlashes; exports.schemaTools = _chunkKTAQRRS7js.schemaTools; exports.useTransform = _chunk6JZ35VQJjs.useTransform;
|
package/dist/index.mjs
CHANGED
package/dist/types/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridSortModel } from '@mui/x-data-grid';
|
|
2
|
-
export { A as AsyncSelectPayload } from '../
|
|
2
|
+
export { b as AsyncMultiSelectPayload, a as AsyncSelectMultiPayload, A as AsyncSelectPayload, O as OptionItem, c as OptionItem2 } from '../OptionItem-CzX7oHfv.mjs';
|
|
3
3
|
|
|
4
4
|
type ValidationErrors = {
|
|
5
5
|
[field: string]: string | string[] | boolean | {
|
|
@@ -18,19 +18,6 @@ type ApiResponse<TModel> = {
|
|
|
18
18
|
apiData?: TModel;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
type OptionItem = {
|
|
22
|
-
label: string;
|
|
23
|
-
value: string;
|
|
24
|
-
};
|
|
25
|
-
type AsyncMultiSelectPayload = {
|
|
26
|
-
query: string | null;
|
|
27
|
-
initialValues?: number[] | null;
|
|
28
|
-
};
|
|
29
|
-
type OptionItem2 = {
|
|
30
|
-
label: string;
|
|
31
|
-
value: number;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
21
|
type OperationResponse = {
|
|
35
22
|
id?: number;
|
|
36
23
|
rowsAffected: number;
|
|
@@ -49,8 +36,8 @@ type ListResponse<TGridModel> = {
|
|
|
49
36
|
Total: number;
|
|
50
37
|
};
|
|
51
38
|
type ValueLabel = {
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
Value: number;
|
|
40
|
+
Label: number;
|
|
54
41
|
};
|
|
55
42
|
|
|
56
|
-
export type { ApiResponse,
|
|
43
|
+
export type { ApiResponse, ListResponse, OperationResponse, PostModel, ValidationErrors, ValueLabel };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridSortModel } from '@mui/x-data-grid';
|
|
2
|
-
export { A as AsyncSelectPayload } from '../
|
|
2
|
+
export { b as AsyncMultiSelectPayload, a as AsyncSelectMultiPayload, A as AsyncSelectPayload, O as OptionItem, c as OptionItem2 } from '../OptionItem-CzX7oHfv.js';
|
|
3
3
|
|
|
4
4
|
type ValidationErrors = {
|
|
5
5
|
[field: string]: string | string[] | boolean | {
|
|
@@ -18,19 +18,6 @@ type ApiResponse<TModel> = {
|
|
|
18
18
|
apiData?: TModel;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
type OptionItem = {
|
|
22
|
-
label: string;
|
|
23
|
-
value: string;
|
|
24
|
-
};
|
|
25
|
-
type AsyncMultiSelectPayload = {
|
|
26
|
-
query: string | null;
|
|
27
|
-
initialValues?: number[] | null;
|
|
28
|
-
};
|
|
29
|
-
type OptionItem2 = {
|
|
30
|
-
label: string;
|
|
31
|
-
value: number;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
21
|
type OperationResponse = {
|
|
35
22
|
id?: number;
|
|
36
23
|
rowsAffected: number;
|
|
@@ -49,8 +36,8 @@ type ListResponse<TGridModel> = {
|
|
|
49
36
|
Total: number;
|
|
50
37
|
};
|
|
51
38
|
type ValueLabel = {
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
Value: number;
|
|
40
|
+
Label: number;
|
|
54
41
|
};
|
|
55
42
|
|
|
56
|
-
export type { ApiResponse,
|
|
43
|
+
export type { ApiResponse, ListResponse, OperationResponse, PostModel, ValidationErrors, ValueLabel };
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { useLocalizationContext } from '@mui/x-date-pickers/internals';
|
|
|
4
4
|
import { FieldValues, UseFormSetError } from 'react-hook-form';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import '@mui/x-data-grid';
|
|
7
|
-
import '../
|
|
7
|
+
import '../OptionItem-CzX7oHfv.mjs';
|
|
8
8
|
|
|
9
9
|
declare class api {
|
|
10
10
|
static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<T>>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { useLocalizationContext } from '@mui/x-date-pickers/internals';
|
|
|
4
4
|
import { FieldValues, UseFormSetError } from 'react-hook-form';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import '@mui/x-data-grid';
|
|
7
|
-
import '../
|
|
7
|
+
import '../OptionItem-CzX7oHfv.js';
|
|
8
8
|
|
|
9
9
|
declare class api {
|
|
10
10
|
static filter<T, TFilter>(url: string, postModel: PostModel<TFilter>): Promise<ApiResponse<T>>;
|
|
@@ -1,19 +1,35 @@
|
|
|
1
|
-
import { A as AsyncSelectPayload } from '../AsyncSelectPayload-DHN-R3gc.mjs';
|
|
2
1
|
import { ChipTypeMap, AutocompleteProps, Grid2Props, TextFieldProps, IconButtonProps, FormControlLabelProps, FormLabelProps, RadioProps, CheckboxProps, TextField } from '@mui/material';
|
|
3
2
|
import * as react_hook_form from 'react-hook-form';
|
|
4
3
|
import { FieldValues, FieldPath, Control, UseControllerProps, FieldError, PathValue } from 'react-hook-form';
|
|
4
|
+
import { b as AsyncMultiSelectPayload, O as OptionItem, A as AsyncSelectPayload } from '../OptionItem-CzX7oHfv.mjs';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { ReactNode, ChangeEvent } from 'react';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import { TimePickerProps, TimePickerSlotProps, PickerChangeHandlerContext, TimeValidationError, DateValidationError, DatePickerSlotProps, DatePickerProps } from '@mui/x-date-pickers';
|
|
9
9
|
import { PickerValidDate } from '@mui/x-date-pickers/models';
|
|
10
10
|
|
|
11
|
+
type AsyncMultiSelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
12
|
+
Value: number;
|
|
13
|
+
Label: string;
|
|
14
|
+
} = {
|
|
15
|
+
Value: number;
|
|
16
|
+
Label: string;
|
|
17
|
+
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> = Omit<AutocompleteProps<TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>, "name" | "control" | "ref" | "multiple" | "loading" | "getOptionLabel" | "getOptionKey" | "isOptionEqualToValue" | "options" | "value" | "filterSelectedOptions" | "filterOptions" | "onChange" | "onInputChange" | "renderInput"> & {
|
|
18
|
+
name: TName;
|
|
19
|
+
control?: Control<TFieldValues>;
|
|
20
|
+
gridProps?: Grid2Props;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
initialValues: number[] | null;
|
|
24
|
+
queryFn: (data: AsyncMultiSelectPayload) => Promise<OptionItem[] | undefined>;
|
|
25
|
+
};
|
|
26
|
+
|
|
11
27
|
type AsyncSelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
12
|
-
|
|
13
|
-
|
|
28
|
+
Value: number;
|
|
29
|
+
Label: string;
|
|
14
30
|
} = {
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
Value: number;
|
|
32
|
+
Label: string;
|
|
17
33
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> = Omit<AutocompleteProps<TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>, "name" | "control" | "ref" | "multiple" | "loading" | "getOptionLabel" | "getOptionKey" | "isOptionEqualToValue" | "options" | "value" | "filterSelectedOptions" | "filterOptions" | "onChange" | "onInputChange" | "renderInput"> & {
|
|
18
34
|
name: TName;
|
|
19
35
|
control?: Control<TFieldValues>;
|
|
@@ -41,11 +57,11 @@ type SelectCascadeElementProps<TFieldValues extends FieldValues = FieldValues, T
|
|
|
41
57
|
};
|
|
42
58
|
|
|
43
59
|
type SelectMultiElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
44
|
-
|
|
45
|
-
|
|
60
|
+
Value: number;
|
|
61
|
+
Label: string;
|
|
46
62
|
} = {
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
Value: number;
|
|
64
|
+
Label: string;
|
|
49
65
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> = Omit<AutocompleteProps<TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>, "name" | "renderInput" | "isOptionEqualToValue" | "getOptionLabel" | "multiple" | "onChange" | "value"> & {
|
|
50
66
|
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
51
67
|
name: TName;
|
|
@@ -56,11 +72,11 @@ type SelectMultiElementProps<TFieldValues extends FieldValues = FieldValues, TNa
|
|
|
56
72
|
};
|
|
57
73
|
|
|
58
74
|
type SelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
59
|
-
|
|
60
|
-
|
|
75
|
+
Value: number;
|
|
76
|
+
Label: string;
|
|
61
77
|
} = {
|
|
62
|
-
|
|
63
|
-
|
|
78
|
+
Value: number;
|
|
79
|
+
Label: string;
|
|
64
80
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> = Omit<AutocompleteProps<TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>, "name" | "renderInput" | "isOptionEqualToValue" | "getOptionLabel"> & {
|
|
65
81
|
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
66
82
|
name: TName;
|
|
@@ -177,18 +193,18 @@ declare const Field: {
|
|
|
177
193
|
Password: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>>(props: PasswordElementProps<TFieldValues, TName>) => JSX.Element;
|
|
178
194
|
Time: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends unknown = any>(props: TimePickerElementProps<TFieldValues, TName, TValue>) => JSX.Element;
|
|
179
195
|
Select: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
180
|
-
|
|
181
|
-
|
|
196
|
+
Value: number;
|
|
197
|
+
Label: string;
|
|
182
198
|
} = {
|
|
183
|
-
|
|
184
|
-
|
|
199
|
+
Value: number;
|
|
200
|
+
Label: string;
|
|
185
201
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: SelectElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => react_jsx_runtime.JSX.Element;
|
|
186
202
|
SelectMulti: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
187
|
-
|
|
188
|
-
|
|
203
|
+
Value: number;
|
|
204
|
+
Label: string;
|
|
189
205
|
} = {
|
|
190
|
-
|
|
191
|
-
|
|
206
|
+
Value: number;
|
|
207
|
+
Label: string;
|
|
192
208
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: SelectMultiElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => react.JSX.Element;
|
|
193
209
|
SelectCascade: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
194
210
|
Value: number | boolean;
|
|
@@ -198,19 +214,19 @@ declare const Field: {
|
|
|
198
214
|
Label: string;
|
|
199
215
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: SelectCascadeElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => react.JSX.Element;
|
|
200
216
|
AsyncSelect: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
201
|
-
|
|
202
|
-
|
|
217
|
+
Value: number;
|
|
218
|
+
Label: string;
|
|
203
219
|
} = {
|
|
204
|
-
|
|
205
|
-
|
|
220
|
+
Value: number;
|
|
221
|
+
Label: string;
|
|
206
222
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: AsyncSelectElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => react.JSX.Element;
|
|
207
223
|
AsyncMultiSelect: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
208
|
-
|
|
209
|
-
|
|
224
|
+
Value: number;
|
|
225
|
+
Label: string;
|
|
210
226
|
} = {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props:
|
|
227
|
+
Value: number;
|
|
228
|
+
Label: string;
|
|
229
|
+
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: AsyncMultiSelectElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => JSX.Element;
|
|
214
230
|
};
|
|
215
231
|
|
|
216
232
|
export { Field };
|
package/dist/wrappers/index.d.ts
CHANGED
|
@@ -1,19 +1,35 @@
|
|
|
1
|
-
import { A as AsyncSelectPayload } from '../AsyncSelectPayload-DHN-R3gc.js';
|
|
2
1
|
import { ChipTypeMap, AutocompleteProps, Grid2Props, TextFieldProps, IconButtonProps, FormControlLabelProps, FormLabelProps, RadioProps, CheckboxProps, TextField } from '@mui/material';
|
|
3
2
|
import * as react_hook_form from 'react-hook-form';
|
|
4
3
|
import { FieldValues, FieldPath, Control, UseControllerProps, FieldError, PathValue } from 'react-hook-form';
|
|
4
|
+
import { b as AsyncMultiSelectPayload, O as OptionItem, A as AsyncSelectPayload } from '../OptionItem-CzX7oHfv.js';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { ReactNode, ChangeEvent } from 'react';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import { TimePickerProps, TimePickerSlotProps, PickerChangeHandlerContext, TimeValidationError, DateValidationError, DatePickerSlotProps, DatePickerProps } from '@mui/x-date-pickers';
|
|
9
9
|
import { PickerValidDate } from '@mui/x-date-pickers/models';
|
|
10
10
|
|
|
11
|
+
type AsyncMultiSelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
12
|
+
Value: number;
|
|
13
|
+
Label: string;
|
|
14
|
+
} = {
|
|
15
|
+
Value: number;
|
|
16
|
+
Label: string;
|
|
17
|
+
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> = Omit<AutocompleteProps<TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>, "name" | "control" | "ref" | "multiple" | "loading" | "getOptionLabel" | "getOptionKey" | "isOptionEqualToValue" | "options" | "value" | "filterSelectedOptions" | "filterOptions" | "onChange" | "onInputChange" | "renderInput"> & {
|
|
18
|
+
name: TName;
|
|
19
|
+
control?: Control<TFieldValues>;
|
|
20
|
+
gridProps?: Grid2Props;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
initialValues: number[] | null;
|
|
24
|
+
queryFn: (data: AsyncMultiSelectPayload) => Promise<OptionItem[] | undefined>;
|
|
25
|
+
};
|
|
26
|
+
|
|
11
27
|
type AsyncSelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
12
|
-
|
|
13
|
-
|
|
28
|
+
Value: number;
|
|
29
|
+
Label: string;
|
|
14
30
|
} = {
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
Value: number;
|
|
32
|
+
Label: string;
|
|
17
33
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> = Omit<AutocompleteProps<TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>, "name" | "control" | "ref" | "multiple" | "loading" | "getOptionLabel" | "getOptionKey" | "isOptionEqualToValue" | "options" | "value" | "filterSelectedOptions" | "filterOptions" | "onChange" | "onInputChange" | "renderInput"> & {
|
|
18
34
|
name: TName;
|
|
19
35
|
control?: Control<TFieldValues>;
|
|
@@ -41,11 +57,11 @@ type SelectCascadeElementProps<TFieldValues extends FieldValues = FieldValues, T
|
|
|
41
57
|
};
|
|
42
58
|
|
|
43
59
|
type SelectMultiElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
44
|
-
|
|
45
|
-
|
|
60
|
+
Value: number;
|
|
61
|
+
Label: string;
|
|
46
62
|
} = {
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
Value: number;
|
|
64
|
+
Label: string;
|
|
49
65
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> = Omit<AutocompleteProps<TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>, "name" | "renderInput" | "isOptionEqualToValue" | "getOptionLabel" | "multiple" | "onChange" | "value"> & {
|
|
50
66
|
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
51
67
|
name: TName;
|
|
@@ -56,11 +72,11 @@ type SelectMultiElementProps<TFieldValues extends FieldValues = FieldValues, TNa
|
|
|
56
72
|
};
|
|
57
73
|
|
|
58
74
|
type SelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
59
|
-
|
|
60
|
-
|
|
75
|
+
Value: number;
|
|
76
|
+
Label: string;
|
|
61
77
|
} = {
|
|
62
|
-
|
|
63
|
-
|
|
78
|
+
Value: number;
|
|
79
|
+
Label: string;
|
|
64
80
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"]> = Omit<AutocompleteProps<TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>, "name" | "renderInput" | "isOptionEqualToValue" | "getOptionLabel"> & {
|
|
65
81
|
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
66
82
|
name: TName;
|
|
@@ -177,18 +193,18 @@ declare const Field: {
|
|
|
177
193
|
Password: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>>(props: PasswordElementProps<TFieldValues, TName>) => JSX.Element;
|
|
178
194
|
Time: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends unknown = any>(props: TimePickerElementProps<TFieldValues, TName, TValue>) => JSX.Element;
|
|
179
195
|
Select: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
180
|
-
|
|
181
|
-
|
|
196
|
+
Value: number;
|
|
197
|
+
Label: string;
|
|
182
198
|
} = {
|
|
183
|
-
|
|
184
|
-
|
|
199
|
+
Value: number;
|
|
200
|
+
Label: string;
|
|
185
201
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: SelectElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => react_jsx_runtime.JSX.Element;
|
|
186
202
|
SelectMulti: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
187
|
-
|
|
188
|
-
|
|
203
|
+
Value: number;
|
|
204
|
+
Label: string;
|
|
189
205
|
} = {
|
|
190
|
-
|
|
191
|
-
|
|
206
|
+
Value: number;
|
|
207
|
+
Label: string;
|
|
192
208
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: SelectMultiElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => react.JSX.Element;
|
|
193
209
|
SelectCascade: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
194
210
|
Value: number | boolean;
|
|
@@ -198,19 +214,19 @@ declare const Field: {
|
|
|
198
214
|
Label: string;
|
|
199
215
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: SelectCascadeElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => react.JSX.Element;
|
|
200
216
|
AsyncSelect: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
201
|
-
|
|
202
|
-
|
|
217
|
+
Value: number;
|
|
218
|
+
Label: string;
|
|
203
219
|
} = {
|
|
204
|
-
|
|
205
|
-
|
|
220
|
+
Value: number;
|
|
221
|
+
Label: string;
|
|
206
222
|
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: AsyncSelectElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => react.JSX.Element;
|
|
207
223
|
AsyncMultiSelect: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends {
|
|
208
|
-
|
|
209
|
-
|
|
224
|
+
Value: number;
|
|
225
|
+
Label: string;
|
|
210
226
|
} = {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props:
|
|
227
|
+
Value: number;
|
|
228
|
+
Label: string;
|
|
229
|
+
}, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = "div">(props: AsyncMultiSelectElementProps<TFieldValues, TName, TValue, Multiple, DisableClearable, FreeSolo, ChipComponent>) => JSX.Element;
|
|
214
230
|
};
|
|
215
231
|
|
|
216
232
|
export { Field };
|
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 _chunkBITOV242js = require('../chunk-BITOV242.js');
|
|
4
4
|
require('../chunk-6JZ35VQJ.js');
|
|
5
5
|
require('../chunk-KTAQRRS7.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.Field =
|
|
8
|
+
exports.Field = _chunkBITOV242js.Field_default;
|
package/dist/wrappers/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gnwebsoft/ui",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.8",
|
|
4
4
|
"description": "A set of reusable wrappers for MUI v6",
|
|
5
5
|
"author": "GNWebsoft Private Limited",
|
|
6
6
|
"license": "",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"files": [
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
|
+
"packageManager": "pnpm@10.9.0",
|
|
25
26
|
"engines": {
|
|
26
27
|
"node": ">=22.0.0"
|
|
27
28
|
},
|