@gnwebsoft/ui 2.18.24 → 2.18.25
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-LSE3T3FT.mjs → chunk-N3AI2OIO.mjs} +39 -16
- package/dist/{chunk-ZT3DSWED.js → chunk-QA44AL2X.js} +40 -17
- package/dist/components/index.d.mts +5 -2
- package/dist/components/index.d.ts +5 -2
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/index.d.mts +247 -7
- package/dist/index.d.ts +247 -7
- package/dist/index.js +1425 -3
- package/dist/index.mjs +1423 -1
- package/package.json +5 -1
|
@@ -11,7 +11,12 @@ import { LoadingButton } from "@mui/lab";
|
|
|
11
11
|
import { Badge } from "@mui/material";
|
|
12
12
|
import FilterAltIcon from "@mui/icons-material/FilterAlt";
|
|
13
13
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
14
|
-
var FilterButton = ({
|
|
14
|
+
var FilterButton = ({
|
|
15
|
+
isSubmitting,
|
|
16
|
+
show,
|
|
17
|
+
title,
|
|
18
|
+
icon
|
|
19
|
+
}) => {
|
|
15
20
|
return /* @__PURE__ */ jsx2(
|
|
16
21
|
LoadingButton,
|
|
17
22
|
{
|
|
@@ -20,9 +25,13 @@ var FilterButton = ({ isSubmitting, show }) => {
|
|
|
20
25
|
loading: isSubmitting,
|
|
21
26
|
disabled: !show,
|
|
22
27
|
disableRipple: true,
|
|
23
|
-
sx: {
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
sx: {
|
|
29
|
+
bgcolor: "#3caed7 !important",
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "center"
|
|
32
|
+
},
|
|
33
|
+
startIcon: /* @__PURE__ */ jsx2(Badge, { color: "error", variant: "standard", children: icon ? icon : /* @__PURE__ */ jsx2(FilterAltIcon, { width: "20", height: "20" }) }),
|
|
34
|
+
children: title?.trim() === "" || !title ? "Filter" : title
|
|
26
35
|
}
|
|
27
36
|
);
|
|
28
37
|
};
|
|
@@ -212,7 +221,8 @@ var ListWrapper = ({
|
|
|
212
221
|
children,
|
|
213
222
|
title,
|
|
214
223
|
count,
|
|
215
|
-
show = true
|
|
224
|
+
show = true,
|
|
225
|
+
actionButton
|
|
216
226
|
}) => {
|
|
217
227
|
if (!show) return /* @__PURE__ */ jsx6(Fragment, {});
|
|
218
228
|
return /* @__PURE__ */ jsxs4(
|
|
@@ -236,17 +246,30 @@ var ListWrapper = ({
|
|
|
236
246
|
},
|
|
237
247
|
alignItems: "center"
|
|
238
248
|
},
|
|
239
|
-
title: /* @__PURE__ */ jsxs4(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
title: /* @__PURE__ */ jsxs4(
|
|
250
|
+
Box2,
|
|
251
|
+
{
|
|
252
|
+
sx: {
|
|
253
|
+
display: "flex",
|
|
254
|
+
alignItems: "center",
|
|
255
|
+
justifyContent: "space-between"
|
|
256
|
+
},
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
259
|
+
/* @__PURE__ */ jsx6(ManageSearchIcon2, { sx: { color: "#4db3a2", height: "2.5rem" } }),
|
|
260
|
+
/* @__PURE__ */ jsx6(
|
|
261
|
+
Typography4,
|
|
262
|
+
{
|
|
263
|
+
variant: "h5",
|
|
264
|
+
sx: { color: "#4db3a2", fontWeight: "bold" },
|
|
265
|
+
children: `${title} (${count ? count : 0})`
|
|
266
|
+
}
|
|
267
|
+
)
|
|
268
|
+
] }),
|
|
269
|
+
actionButton
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
)
|
|
250
273
|
}
|
|
251
274
|
),
|
|
252
275
|
/* @__PURE__ */ jsx6(Divider3, {}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/components/ClearButton/ClearButton.tsx
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/components/ClearButton/ClearButton.tsx
|
|
2
2
|
var _material = require('@mui/material');
|
|
3
3
|
var _jsxruntime = require('react/jsx-runtime');
|
|
4
4
|
var ClearButton = ({ isSubmitting, handleClear }) => {
|
|
@@ -11,7 +11,12 @@ var _lab = require('@mui/lab');
|
|
|
11
11
|
|
|
12
12
|
var _FilterAlt = require('@mui/icons-material/FilterAlt'); var _FilterAlt2 = _interopRequireDefault(_FilterAlt);
|
|
13
13
|
|
|
14
|
-
var FilterButton = ({
|
|
14
|
+
var FilterButton = ({
|
|
15
|
+
isSubmitting,
|
|
16
|
+
show,
|
|
17
|
+
title,
|
|
18
|
+
icon
|
|
19
|
+
}) => {
|
|
15
20
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16
21
|
_lab.LoadingButton,
|
|
17
22
|
{
|
|
@@ -20,9 +25,13 @@ var FilterButton = ({ isSubmitting, show }) => {
|
|
|
20
25
|
loading: isSubmitting,
|
|
21
26
|
disabled: !show,
|
|
22
27
|
disableRipple: true,
|
|
23
|
-
sx: {
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
sx: {
|
|
29
|
+
bgcolor: "#3caed7 !important",
|
|
30
|
+
display: "flex",
|
|
31
|
+
alignItems: "center"
|
|
32
|
+
},
|
|
33
|
+
startIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Badge, { color: "error", variant: "standard", children: icon ? icon : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FilterAlt2.default, { width: "20", height: "20" }) }),
|
|
34
|
+
children: _optionalChain([title, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]) === "" || !title ? "Filter" : title
|
|
26
35
|
}
|
|
27
36
|
);
|
|
28
37
|
};
|
|
@@ -212,7 +221,8 @@ var ListWrapper = ({
|
|
|
212
221
|
children,
|
|
213
222
|
title,
|
|
214
223
|
count,
|
|
215
|
-
show = true
|
|
224
|
+
show = true,
|
|
225
|
+
actionButton
|
|
216
226
|
}) => {
|
|
217
227
|
if (!show) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {});
|
|
218
228
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -236,17 +246,30 @@ var ListWrapper = ({
|
|
|
236
246
|
},
|
|
237
247
|
alignItems: "center"
|
|
238
248
|
},
|
|
239
|
-
title: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
title: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
250
|
+
_material.Box,
|
|
251
|
+
{
|
|
252
|
+
sx: {
|
|
253
|
+
display: "flex",
|
|
254
|
+
alignItems: "center",
|
|
255
|
+
justifyContent: "space-between"
|
|
256
|
+
},
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
|
|
259
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ManageSearch2.default, { sx: { color: "#4db3a2", height: "2.5rem" } }),
|
|
260
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
261
|
+
_material.Typography,
|
|
262
|
+
{
|
|
263
|
+
variant: "h5",
|
|
264
|
+
sx: { color: "#4db3a2", fontWeight: "bold" },
|
|
265
|
+
children: `${title} (${count ? count : 0})`
|
|
266
|
+
}
|
|
267
|
+
)
|
|
268
|
+
] }),
|
|
269
|
+
actionButton
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
)
|
|
250
273
|
}
|
|
251
274
|
),
|
|
252
275
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, {}),
|
|
@@ -12,8 +12,10 @@ declare const ClearButton: ({ isSubmitting, handleClear }: ClearButtonProps) =>
|
|
|
12
12
|
type FilterButtonProps = {
|
|
13
13
|
isSubmitting: boolean;
|
|
14
14
|
show?: boolean;
|
|
15
|
+
title?: string;
|
|
16
|
+
icon?: React.ReactNode;
|
|
15
17
|
};
|
|
16
|
-
declare const FilterButton: ({ isSubmitting, show }: FilterButtonProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare const FilterButton: ({ isSubmitting, show, title, icon, }: FilterButtonProps) => react_jsx_runtime.JSX.Element;
|
|
17
19
|
|
|
18
20
|
type FilterWrapperProps = PropsWithChildren<{
|
|
19
21
|
title: string;
|
|
@@ -53,8 +55,9 @@ type ListWrapperProps = PropsWithChildren<{
|
|
|
53
55
|
title: string;
|
|
54
56
|
count: number;
|
|
55
57
|
show?: boolean;
|
|
58
|
+
actionButton?: React.ReactNode;
|
|
56
59
|
}>;
|
|
57
|
-
declare const ListWrapper: ({ children, title, count, show, }: ListWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
60
|
+
declare const ListWrapper: ({ children, title, count, show, actionButton, }: ListWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
58
61
|
|
|
59
62
|
declare const SimpleToolbar: () => react_jsx_runtime.JSX.Element;
|
|
60
63
|
|
|
@@ -12,8 +12,10 @@ declare const ClearButton: ({ isSubmitting, handleClear }: ClearButtonProps) =>
|
|
|
12
12
|
type FilterButtonProps = {
|
|
13
13
|
isSubmitting: boolean;
|
|
14
14
|
show?: boolean;
|
|
15
|
+
title?: string;
|
|
16
|
+
icon?: React.ReactNode;
|
|
15
17
|
};
|
|
16
|
-
declare const FilterButton: ({ isSubmitting, show }: FilterButtonProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
declare const FilterButton: ({ isSubmitting, show, title, icon, }: FilterButtonProps) => react_jsx_runtime.JSX.Element;
|
|
17
19
|
|
|
18
20
|
type FilterWrapperProps = PropsWithChildren<{
|
|
19
21
|
title: string;
|
|
@@ -53,8 +55,9 @@ type ListWrapperProps = PropsWithChildren<{
|
|
|
53
55
|
title: string;
|
|
54
56
|
count: number;
|
|
55
57
|
show?: boolean;
|
|
58
|
+
actionButton?: React.ReactNode;
|
|
56
59
|
}>;
|
|
57
|
-
declare const ListWrapper: ({ children, title, count, show, }: ListWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
60
|
+
declare const ListWrapper: ({ children, title, count, show, actionButton, }: ListWrapperProps) => react_jsx_runtime.JSX.Element;
|
|
58
61
|
|
|
59
62
|
declare const SimpleToolbar: () => react_jsx_runtime.JSX.Element;
|
|
60
63
|
|
package/dist/components/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkQA44AL2Xjs = require('../chunk-QA44AL2X.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,4 +19,4 @@ var _chunkZT3DSWEDjs = require('../chunk-ZT3DSWED.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.AuthorizedView =
|
|
22
|
+
exports.AuthorizedView = _chunkQA44AL2Xjs.AuthorizedView_default; exports.ClearButton = _chunkQA44AL2Xjs.ClearButton_default; exports.FilterButton = _chunkQA44AL2Xjs.FilterButton_default; exports.FilterWrapper = _chunkQA44AL2Xjs.FilterWrapper_default; exports.FormWrapper = _chunkQA44AL2Xjs.FormWrapper_default; exports.LabelText = _chunkQA44AL2Xjs.LabelText_default; exports.ListWrapper = _chunkQA44AL2Xjs.ListWrapper_default; exports.SimpleButton = _chunkQA44AL2Xjs.SimpleButton_default; exports.SimpleToolbar = _chunkQA44AL2Xjs.SimpleToolbar_default;
|
package/dist/index.d.mts
CHANGED
|
@@ -3,14 +3,254 @@ export { UseTransformOptions, UseTransformReturn, useTransform } from './hooks/i
|
|
|
3
3
|
export { ApiResponse, ListResponse, OperationResponse, PostModel, ValidationErrors, ValueLabel } from './types/index.mjs';
|
|
4
4
|
export { api, api2, flattenObjectKeys, getTimezone, handleServerErrors, propertyExists, readValueAsDate, removeLeadingTrailingSlashes, schemaTools } from './utils/index.mjs';
|
|
5
5
|
export { Field } from './wrappers/index.mjs';
|
|
6
|
-
|
|
7
|
-
import 'react
|
|
8
|
-
import 'react';
|
|
9
|
-
import '
|
|
6
|
+
import { CheckboxProps, FormControlLabelProps, Grid2Props, ChipTypeMap, AutocompleteProps, TextFieldProps, IconButtonProps, FormLabelProps, RadioProps, TextField } from '@mui/material';
|
|
7
|
+
import * as react_hook_form from 'react-hook-form';
|
|
8
|
+
import { FieldValues, FieldPath, Control, UseControllerProps, FieldError, PathValue } from 'react-hook-form';
|
|
9
|
+
import { b as AsyncMultiSelectPayload, O as OptionItem, A as AsyncSelectPayload } from './OptionItem-CzX7oHfv.mjs';
|
|
10
|
+
export { a as AsyncSelectMultiPayload, c as OptionItem2 } from './OptionItem-CzX7oHfv.mjs';
|
|
11
|
+
import * as react from 'react';
|
|
12
|
+
import { ReactNode, ChangeEvent } from 'react';
|
|
13
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
14
|
+
import { TimePickerProps, TimePickerSlotProps, PickerChangeHandlerContext, TimeValidationError, DateValidationError, DatePickerSlotProps, DatePickerProps } from '@mui/x-date-pickers';
|
|
15
|
+
import { PickerValidDate } from '@mui/x-date-pickers/models';
|
|
10
16
|
import '@mui/material/OverridableComponent';
|
|
11
|
-
import 'react-hook-form';
|
|
12
17
|
import '@mui/x-data-grid';
|
|
13
|
-
import '@mui/x-date-pickers';
|
|
14
18
|
import '@mui/x-date-pickers/internals';
|
|
15
19
|
import 'zod';
|
|
16
|
-
|
|
20
|
+
|
|
21
|
+
type CheckboxGroupProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends number[] = number[]> = Omit<CheckboxProps, "name"> & {
|
|
22
|
+
name: TName;
|
|
23
|
+
control?: Control<TFieldValues>;
|
|
24
|
+
label?: FormControlLabelProps["label"];
|
|
25
|
+
labelProps?: Omit<FormControlLabelProps, "label" | "control">;
|
|
26
|
+
gridProps?: Grid2Props;
|
|
27
|
+
options: {
|
|
28
|
+
value: number;
|
|
29
|
+
label: string;
|
|
30
|
+
}[];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type AsyncMultiSelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
34
|
+
Value: number;
|
|
35
|
+
Label: string;
|
|
36
|
+
} = {
|
|
37
|
+
Value: number;
|
|
38
|
+
Label: string;
|
|
39
|
+
}, 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"> & {
|
|
40
|
+
name: TName;
|
|
41
|
+
control?: Control<TFieldValues>;
|
|
42
|
+
gridProps?: Grid2Props;
|
|
43
|
+
placeholder?: string;
|
|
44
|
+
label?: string;
|
|
45
|
+
initialValues: number[] | null;
|
|
46
|
+
queryFn: (data: AsyncMultiSelectPayload) => Promise<OptionItem[] | undefined>;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
type AsyncSelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
50
|
+
Value: number;
|
|
51
|
+
Label: string;
|
|
52
|
+
} = {
|
|
53
|
+
Value: number;
|
|
54
|
+
Label: string;
|
|
55
|
+
}, 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"> & {
|
|
56
|
+
name: TName;
|
|
57
|
+
control?: Control<TFieldValues>;
|
|
58
|
+
gridProps?: Grid2Props;
|
|
59
|
+
placeholder?: string;
|
|
60
|
+
label?: string;
|
|
61
|
+
initialValue?: number | null;
|
|
62
|
+
queryFn: (data: AsyncSelectPayload) => Promise<TValue[] | undefined>;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
type SelectCascadeElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
66
|
+
value: number | boolean;
|
|
67
|
+
label: string;
|
|
68
|
+
} = {
|
|
69
|
+
value: number | boolean;
|
|
70
|
+
label: string;
|
|
71
|
+
}, 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"> & {
|
|
72
|
+
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
73
|
+
name: TName;
|
|
74
|
+
dependsOn: TName;
|
|
75
|
+
control?: Control<TFieldValues>;
|
|
76
|
+
gridProps?: Grid2Props;
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
label?: string;
|
|
79
|
+
initialValue?: number | null;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
type SelectMultiElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
83
|
+
value: number;
|
|
84
|
+
label: string;
|
|
85
|
+
} = {
|
|
86
|
+
value: number;
|
|
87
|
+
label: string;
|
|
88
|
+
}, 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"> & {
|
|
89
|
+
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
90
|
+
name: TName;
|
|
91
|
+
control?: Control<TFieldValues>;
|
|
92
|
+
gridProps?: Grid2Props;
|
|
93
|
+
placeholder?: string;
|
|
94
|
+
label?: string;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
type SelectElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends {
|
|
98
|
+
value: number;
|
|
99
|
+
label: string;
|
|
100
|
+
} = {
|
|
101
|
+
value: number;
|
|
102
|
+
label: string;
|
|
103
|
+
}, 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"> & {
|
|
104
|
+
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
105
|
+
name: TName;
|
|
106
|
+
control?: Control<TFieldValues>;
|
|
107
|
+
gridProps?: Grid2Props;
|
|
108
|
+
placeholder?: string;
|
|
109
|
+
label?: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
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"> & {
|
|
113
|
+
name: TName;
|
|
114
|
+
required?: boolean;
|
|
115
|
+
isDate?: boolean;
|
|
116
|
+
parseError?: (error: FieldError) => ReactNode;
|
|
117
|
+
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
118
|
+
control?: Control<TFieldValues>;
|
|
119
|
+
inputProps?: TextFieldProps;
|
|
120
|
+
helperText?: TextFieldProps["helperText"];
|
|
121
|
+
textReadOnly?: boolean;
|
|
122
|
+
slotProps?: Omit<TimePickerSlotProps<TValue, TEnableAccessibleFieldDOMStructure>, "textField">;
|
|
123
|
+
transform?: {
|
|
124
|
+
input?: (value: PathValue<TFieldValues, TName>) => TValue | null;
|
|
125
|
+
output?: (value: TValue | null, context: PickerChangeHandlerContext<TimeValidationError>) => PathValue<TFieldValues, TName>;
|
|
126
|
+
};
|
|
127
|
+
gridProps?: Grid2Props;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
type PasswordElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue = unknown> = Omit<TextFieldProps, "name"> & {
|
|
131
|
+
name: TName;
|
|
132
|
+
control?: Control<TFieldValues>;
|
|
133
|
+
iconColor?: IconButtonProps["color"];
|
|
134
|
+
renderIcon?: (password: boolean) => ReactNode;
|
|
135
|
+
gridProps?: Grid2Props;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
type RadioButtonGroupProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue = unknown> = {
|
|
139
|
+
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
140
|
+
options: TValue[];
|
|
141
|
+
helperText?: ReactNode;
|
|
142
|
+
name: TName;
|
|
143
|
+
required?: boolean;
|
|
144
|
+
parseError?: (error: FieldError) => ReactNode;
|
|
145
|
+
label?: string;
|
|
146
|
+
labelKey?: string;
|
|
147
|
+
valueKey?: string;
|
|
148
|
+
disabledKey?: string;
|
|
149
|
+
type?: "number" | "string";
|
|
150
|
+
emptyOptionLabel?: string;
|
|
151
|
+
onChange?: (value: TValue | string | undefined) => void;
|
|
152
|
+
returnObject?: boolean;
|
|
153
|
+
row?: boolean;
|
|
154
|
+
control?: Control<TFieldValues>;
|
|
155
|
+
labelProps?: Omit<FormControlLabelProps, "label" | "control" | "value">;
|
|
156
|
+
formLabelProps?: Omit<FormLabelProps, "required" | "error">;
|
|
157
|
+
radioProps?: RadioProps;
|
|
158
|
+
disabled?: boolean;
|
|
159
|
+
transform?: {
|
|
160
|
+
input?: (value: PathValue<TFieldValues, TName>) => TValue;
|
|
161
|
+
output?: (value: TValue | string | undefined) => PathValue<TFieldValues, TName>;
|
|
162
|
+
};
|
|
163
|
+
gridProps?: Grid2Props;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
type DatePickerElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue extends PickerValidDate = PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> = {
|
|
167
|
+
name: TName;
|
|
168
|
+
required?: boolean;
|
|
169
|
+
isDate?: boolean;
|
|
170
|
+
parseError?: (error: FieldError | DateValidationError) => ReactNode;
|
|
171
|
+
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
172
|
+
control?: Control<TFieldValues>;
|
|
173
|
+
inputProps?: TextFieldProps;
|
|
174
|
+
helperText?: TextFieldProps["helperText"];
|
|
175
|
+
label?: ReactNode;
|
|
176
|
+
placeholder?: string;
|
|
177
|
+
textReadOnly?: boolean;
|
|
178
|
+
slotProps?: Omit<DatePickerSlotProps<TValue, TEnableAccessibleFieldDOMStructure>, "textField">;
|
|
179
|
+
transform?: {
|
|
180
|
+
input?: (value: PathValue<TFieldValues, TName>) => TValue | null;
|
|
181
|
+
output?: (value: TValue | null, context: PickerChangeHandlerContext<DateValidationError>) => PathValue<TFieldValues, TName>;
|
|
182
|
+
};
|
|
183
|
+
gridProps?: Grid2Props;
|
|
184
|
+
datePickerProps?: Omit<DatePickerProps<TValue, TEnableAccessibleFieldDOMStructure>, "value" | "slotProps">;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
type CheckboxElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue = unknown> = Omit<CheckboxProps, "name"> & {
|
|
188
|
+
name: TName;
|
|
189
|
+
control?: Control<TFieldValues>;
|
|
190
|
+
label?: FormControlLabelProps["label"];
|
|
191
|
+
labelProps?: Omit<FormControlLabelProps, "label" | "control">;
|
|
192
|
+
gridProps?: Grid2Props;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
type TextFieldElementProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>, TValue = unknown> = {
|
|
196
|
+
rules?: UseControllerProps<TFieldValues, TName>["rules"];
|
|
197
|
+
name: TName;
|
|
198
|
+
parseError?: (error: FieldError) => ReactNode;
|
|
199
|
+
control?: Control<TFieldValues>;
|
|
200
|
+
component?: typeof TextField;
|
|
201
|
+
transform?: {
|
|
202
|
+
input?: (value: PathValue<TFieldValues, TName>) => TValue;
|
|
203
|
+
output?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => PathValue<TFieldValues, TName>;
|
|
204
|
+
};
|
|
205
|
+
label?: string;
|
|
206
|
+
placeholder?: string;
|
|
207
|
+
textFieldProps?: Omit<TextFieldProps, "name">;
|
|
208
|
+
gridProps?: Grid2Props;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
declare const Field2: {
|
|
212
|
+
Text: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue = unknown>(props: TextFieldElementProps<TFieldValues, TName, TValue>) => JSX.Element;
|
|
213
|
+
Checkbox: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue = unknown>(props: CheckboxElementProps<TFieldValues, TName, TValue>) => JSX.Element;
|
|
214
|
+
Date: <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: DatePickerElementProps<TFieldValues, TName, TValue>) => JSX.Element;
|
|
215
|
+
RadioGroup: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue = unknown>(props: RadioButtonGroupProps<TFieldValues, TName, TValue>) => JSX.Element;
|
|
216
|
+
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;
|
|
217
|
+
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;
|
|
218
|
+
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 {
|
|
219
|
+
value: number;
|
|
220
|
+
label: string;
|
|
221
|
+
} = {
|
|
222
|
+
value: number;
|
|
223
|
+
label: string;
|
|
224
|
+
}, 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;
|
|
225
|
+
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 {
|
|
226
|
+
value: number;
|
|
227
|
+
label: string;
|
|
228
|
+
} = {
|
|
229
|
+
value: number;
|
|
230
|
+
label: string;
|
|
231
|
+
}, 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;
|
|
232
|
+
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 {
|
|
233
|
+
value: number | boolean;
|
|
234
|
+
label: string;
|
|
235
|
+
} = {
|
|
236
|
+
value: number | boolean;
|
|
237
|
+
label: string;
|
|
238
|
+
}, 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;
|
|
239
|
+
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 {
|
|
240
|
+
value: number;
|
|
241
|
+
label: string;
|
|
242
|
+
} = {
|
|
243
|
+
value: number;
|
|
244
|
+
label: string;
|
|
245
|
+
}, 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;
|
|
246
|
+
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 {
|
|
247
|
+
value: number;
|
|
248
|
+
label: string;
|
|
249
|
+
} = {
|
|
250
|
+
value: number;
|
|
251
|
+
label: string;
|
|
252
|
+
}, 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;
|
|
253
|
+
CheckboxGroup: <TFieldValues extends react_hook_form.FieldValues = react_hook_form.FieldValues, TName extends react_hook_form.FieldPath<TFieldValues> = react_hook_form.FieldPath<TFieldValues>, TValue extends number[] = number[]>(props: CheckboxGroupProps<TFieldValues, TName, TValue>) => JSX.Element;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
export { AsyncMultiSelectPayload, AsyncSelectPayload, Field2, OptionItem };
|