@saas-ui/forms 2.6.5 → 2.6.7
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +16 -0
- package/dist/ajv/index.d.mts +1 -1
- package/dist/ajv/index.d.ts +1 -1
- package/dist/index.d.mts +33 -34
- package/dist/index.d.ts +33 -34
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/dist/yup/index.d.mts +60 -65
- package/dist/yup/index.d.ts +60 -65
- package/dist/yup/index.js +1 -2
- package/dist/yup/index.js.map +1 -1
- package/dist/yup/index.mjs +1 -2
- package/dist/yup/index.mjs.map +1 -1
- package/dist/zod/index.d.mts +52 -57
- package/dist/zod/index.d.ts +52 -57
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# @saas-ui/forms
|
2
2
|
|
3
|
+
## 2.6.7
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 02cac87: Updated dependencies
|
8
|
+
- Updated dependencies [02cac87]
|
9
|
+
- @saas-ui/core@2.5.5
|
10
|
+
|
11
|
+
## 2.6.6
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- Updated dependencies [12c35ea]
|
16
|
+
- Updated dependencies [b61ff73]
|
17
|
+
- @saas-ui/core@2.5.4
|
18
|
+
|
3
19
|
## 2.6.5
|
4
20
|
|
5
21
|
### Patch Changes
|
package/dist/ajv/index.d.mts
CHANGED
@@ -27,7 +27,7 @@ type AjvFormType<FieldDefs, ExtraProps = object, JsonSchema extends Record<strin
|
|
27
27
|
* @see Docs https://saas-ui.dev/docs/components/forms/form
|
28
28
|
* @see https://ajv.js.org/json-type-definition.html
|
29
29
|
*/
|
30
|
-
declare function createAjvForm<FieldDefs>(options?: CreateAjvFormProps<FieldDefs>): AjvFormType<FieldDefs
|
30
|
+
declare function createAjvForm<FieldDefs>(options?: CreateAjvFormProps<FieldDefs>): AjvFormType<FieldDefs>;
|
31
31
|
|
32
32
|
declare const Form: AjvFormType<unknown, object, Record<string, any>>;
|
33
33
|
|
package/dist/ajv/index.d.ts
CHANGED
@@ -27,7 +27,7 @@ type AjvFormType<FieldDefs, ExtraProps = object, JsonSchema extends Record<strin
|
|
27
27
|
* @see Docs https://saas-ui.dev/docs/components/forms/form
|
28
28
|
* @see https://ajv.js.org/json-type-definition.html
|
29
29
|
*/
|
30
|
-
declare function createAjvForm<FieldDefs>(options?: CreateAjvFormProps<FieldDefs>): AjvFormType<FieldDefs
|
30
|
+
declare function createAjvForm<FieldDefs>(options?: CreateAjvFormProps<FieldDefs>): AjvFormType<FieldDefs>;
|
31
31
|
|
32
32
|
declare const Form: AjvFormType<unknown, object, Record<string, any>>;
|
33
33
|
|
package/dist/index.d.mts
CHANGED
@@ -9,7 +9,6 @@ import { NumberInputProps as NumberInputProps$1, NumberInputFieldProps as Number
|
|
9
9
|
import { UseStepperReturn, UseStepperProps, StepsProps, StepsItemProps } from '@saas-ui/core';
|
10
10
|
import { FocusableElement } from '@chakra-ui/utils';
|
11
11
|
import { MaybeRenderProp } from '@chakra-ui/react-utils';
|
12
|
-
import * as src from 'src';
|
13
12
|
|
14
13
|
interface NumberInputOptions {
|
15
14
|
/**
|
@@ -127,7 +126,7 @@ declare const SelectButton: _chakra_ui_react.ComponentWithAs<"button", SelectBut
|
|
127
126
|
declare const Select: (<Multiple extends boolean = false>(props: SelectProps<Multiple> & {
|
128
127
|
ref?: React$1.ForwardedRef<HTMLFormElement>;
|
129
128
|
}) => React$1.ReactElement) & {
|
130
|
-
displayName?: string
|
129
|
+
displayName?: string;
|
131
130
|
};
|
132
131
|
interface SelectListProps extends MenuListProps {
|
133
132
|
}
|
@@ -162,50 +161,50 @@ interface InputFieldProps extends InputProps {
|
|
162
161
|
leftAddon?: React$1.ReactNode;
|
163
162
|
rightAddon?: React$1.ReactNode;
|
164
163
|
}
|
165
|
-
declare const InputField: React$1.FC<Omit<
|
164
|
+
declare const InputField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
166
165
|
interface NumberInputFieldProps extends NumberInputProps {
|
167
166
|
type: 'number';
|
168
167
|
}
|
169
|
-
declare const NumberInputField: React$1.FC<Omit<
|
170
|
-
declare const PasswordInputField: React$1.FC<Omit<
|
168
|
+
declare const NumberInputField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NumberInputFieldProps> & NumberInputFieldProps>;
|
169
|
+
declare const PasswordInputField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PasswordInputProps> & PasswordInputProps>;
|
171
170
|
interface TextareaFieldProps extends TextareaProps {
|
172
171
|
}
|
173
|
-
declare const TextareaField: React$1.FC<Omit<
|
172
|
+
declare const TextareaField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof TextareaFieldProps> & TextareaFieldProps>;
|
174
173
|
interface SwitchFieldProps extends SwitchProps {
|
175
174
|
}
|
176
|
-
declare const SwitchField: React$1.FC<Omit<
|
175
|
+
declare const SwitchField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps>;
|
177
176
|
interface SelectFieldProps extends SelectProps<boolean> {
|
178
177
|
buttonProps?: SelectButtonProps;
|
179
178
|
listProps?: SelectListProps;
|
180
179
|
}
|
181
|
-
declare const SelectField: React$1.FC<Omit<
|
180
|
+
declare const SelectField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SelectFieldProps> & SelectFieldProps>;
|
182
181
|
type CheckboxFieldProps = CheckboxProps;
|
183
|
-
declare const CheckboxField: React$1.FC<Omit<
|
182
|
+
declare const CheckboxField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof CheckboxProps> & CheckboxProps>;
|
184
183
|
type RadioFieldProps = RadioInputProps;
|
185
|
-
declare const RadioField: React$1.FC<Omit<
|
184
|
+
declare const RadioField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof RadioInputProps> & RadioInputProps>;
|
186
185
|
type NativeSelectFieldProps = NativeSelectProps;
|
187
|
-
declare const NativeSelectField: React$1.FC<Omit<
|
186
|
+
declare const NativeSelectField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NativeSelectProps> & NativeSelectProps>;
|
188
187
|
interface PinFieldProps extends Omit<UsePinInputProps, 'type'> {
|
189
188
|
pinLength?: number;
|
190
189
|
pinType?: 'alphanumeric' | 'number';
|
191
190
|
spacing?: SystemProps['margin'];
|
192
191
|
}
|
193
|
-
declare const PinField: React$1.FC<Omit<
|
192
|
+
declare const PinField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PinFieldProps> & PinFieldProps>;
|
194
193
|
declare const defaultFieldTypes: {
|
195
|
-
text: React$1.FC<Omit<
|
196
|
-
email: React$1.FC<Omit<
|
197
|
-
url: React$1.FC<Omit<
|
198
|
-
phone: React$1.FC<Omit<
|
199
|
-
time: React$1.FC<Omit<
|
200
|
-
number: React$1.FC<Omit<
|
201
|
-
password: React$1.FC<Omit<
|
202
|
-
textarea: React$1.FC<Omit<
|
203
|
-
switch: React$1.FC<Omit<
|
204
|
-
select: React$1.FC<Omit<
|
205
|
-
checkbox: React$1.FC<Omit<
|
206
|
-
radio: React$1.FC<Omit<
|
207
|
-
pin: React$1.FC<Omit<
|
208
|
-
'native-select': React$1.FC<Omit<
|
194
|
+
text: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
195
|
+
email: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
196
|
+
url: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
197
|
+
phone: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
198
|
+
time: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
199
|
+
number: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NumberInputFieldProps> & NumberInputFieldProps>;
|
200
|
+
password: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PasswordInputProps> & PasswordInputProps>;
|
201
|
+
textarea: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof TextareaFieldProps> & TextareaFieldProps>;
|
202
|
+
switch: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps>;
|
203
|
+
select: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SelectFieldProps> & SelectFieldProps>;
|
204
|
+
checkbox: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof CheckboxProps> & CheckboxProps>;
|
205
|
+
radio: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof RadioInputProps> & RadioInputProps>;
|
206
|
+
pin: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PinFieldProps> & PinFieldProps>;
|
207
|
+
'native-select': React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NativeSelectProps> & NativeSelectProps>;
|
209
208
|
};
|
210
209
|
type DefaultFields = typeof defaultFieldTypes;
|
211
210
|
|
@@ -810,7 +809,7 @@ type FieldRules = Pick<RegisterOptions, 'required' | 'min' | 'max' | 'maxLength'
|
|
810
809
|
declare const Field: (<TFieldValues extends FieldValues>(props: FieldProps<TFieldValues> & {
|
811
810
|
ref?: React$1.ForwardedRef<FocusableElement>;
|
812
811
|
}) => React$1.ReactElement) & {
|
813
|
-
displayName?: string
|
812
|
+
displayName?: string;
|
814
813
|
};
|
815
814
|
|
816
815
|
interface FieldsProps<TSchema = any> {
|
@@ -838,11 +837,11 @@ type FormProviderProps<TFieldValues extends FieldValues = FieldValues, TContext
|
|
838
837
|
};
|
839
838
|
};
|
840
839
|
declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, TContext = any, TSchema = any>() => {
|
841
|
-
fieldResolver?: FieldResolver
|
840
|
+
fieldResolver?: FieldResolver;
|
842
841
|
schema?: any;
|
843
842
|
fields?: {
|
844
843
|
[key: string]: unknown;
|
845
|
-
}
|
844
|
+
};
|
846
845
|
watch: react_hook_form.UseFormWatch<TFieldValues>;
|
847
846
|
getValues: react_hook_form.UseFormGetValues<TFieldValues>;
|
848
847
|
getFieldState: react_hook_form.UseFormGetFieldState<TFieldValues>;
|
@@ -853,9 +852,9 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
|
|
853
852
|
formState: react_hook_form.FormState<TFieldValues>;
|
854
853
|
resetField: react_hook_form.UseFormResetField<TFieldValues>;
|
855
854
|
reset: react_hook_form.UseFormReset<TFieldValues>;
|
856
|
-
handleSubmit: react_hook_form.UseFormHandleSubmit<TFieldValues,
|
855
|
+
handleSubmit: react_hook_form.UseFormHandleSubmit<TFieldValues, undefined>;
|
857
856
|
unregister: react_hook_form.UseFormUnregister<TFieldValues>;
|
858
|
-
control: react_hook_form.Control<TFieldValues, TContext
|
857
|
+
control: react_hook_form.Control<TFieldValues, TContext>;
|
859
858
|
register: react_hook_form.UseFormRegister<TFieldValues>;
|
860
859
|
setFocus: react_hook_form.UseFormSetFocus<TFieldValues>;
|
861
860
|
};
|
@@ -879,9 +878,9 @@ declare const useBaseField: (props: BaseFieldProps) => {
|
|
879
878
|
error: any;
|
880
879
|
touched: any;
|
881
880
|
name: string;
|
882
|
-
label?: string
|
883
|
-
hideLabel?: boolean
|
884
|
-
help?: string
|
881
|
+
label?: string;
|
882
|
+
hideLabel?: boolean;
|
883
|
+
help?: string;
|
885
884
|
};
|
886
885
|
/**
|
887
886
|
* The default BaseField component
|
package/dist/index.d.ts
CHANGED
@@ -9,7 +9,6 @@ import { NumberInputProps as NumberInputProps$1, NumberInputFieldProps as Number
|
|
9
9
|
import { UseStepperReturn, UseStepperProps, StepsProps, StepsItemProps } from '@saas-ui/core';
|
10
10
|
import { FocusableElement } from '@chakra-ui/utils';
|
11
11
|
import { MaybeRenderProp } from '@chakra-ui/react-utils';
|
12
|
-
import * as src from 'src';
|
13
12
|
|
14
13
|
interface NumberInputOptions {
|
15
14
|
/**
|
@@ -127,7 +126,7 @@ declare const SelectButton: _chakra_ui_react.ComponentWithAs<"button", SelectBut
|
|
127
126
|
declare const Select: (<Multiple extends boolean = false>(props: SelectProps<Multiple> & {
|
128
127
|
ref?: React$1.ForwardedRef<HTMLFormElement>;
|
129
128
|
}) => React$1.ReactElement) & {
|
130
|
-
displayName?: string
|
129
|
+
displayName?: string;
|
131
130
|
};
|
132
131
|
interface SelectListProps extends MenuListProps {
|
133
132
|
}
|
@@ -162,50 +161,50 @@ interface InputFieldProps extends InputProps {
|
|
162
161
|
leftAddon?: React$1.ReactNode;
|
163
162
|
rightAddon?: React$1.ReactNode;
|
164
163
|
}
|
165
|
-
declare const InputField: React$1.FC<Omit<
|
164
|
+
declare const InputField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
166
165
|
interface NumberInputFieldProps extends NumberInputProps {
|
167
166
|
type: 'number';
|
168
167
|
}
|
169
|
-
declare const NumberInputField: React$1.FC<Omit<
|
170
|
-
declare const PasswordInputField: React$1.FC<Omit<
|
168
|
+
declare const NumberInputField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NumberInputFieldProps> & NumberInputFieldProps>;
|
169
|
+
declare const PasswordInputField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PasswordInputProps> & PasswordInputProps>;
|
171
170
|
interface TextareaFieldProps extends TextareaProps {
|
172
171
|
}
|
173
|
-
declare const TextareaField: React$1.FC<Omit<
|
172
|
+
declare const TextareaField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof TextareaFieldProps> & TextareaFieldProps>;
|
174
173
|
interface SwitchFieldProps extends SwitchProps {
|
175
174
|
}
|
176
|
-
declare const SwitchField: React$1.FC<Omit<
|
175
|
+
declare const SwitchField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps>;
|
177
176
|
interface SelectFieldProps extends SelectProps<boolean> {
|
178
177
|
buttonProps?: SelectButtonProps;
|
179
178
|
listProps?: SelectListProps;
|
180
179
|
}
|
181
|
-
declare const SelectField: React$1.FC<Omit<
|
180
|
+
declare const SelectField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SelectFieldProps> & SelectFieldProps>;
|
182
181
|
type CheckboxFieldProps = CheckboxProps;
|
183
|
-
declare const CheckboxField: React$1.FC<Omit<
|
182
|
+
declare const CheckboxField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof CheckboxProps> & CheckboxProps>;
|
184
183
|
type RadioFieldProps = RadioInputProps;
|
185
|
-
declare const RadioField: React$1.FC<Omit<
|
184
|
+
declare const RadioField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof RadioInputProps> & RadioInputProps>;
|
186
185
|
type NativeSelectFieldProps = NativeSelectProps;
|
187
|
-
declare const NativeSelectField: React$1.FC<Omit<
|
186
|
+
declare const NativeSelectField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NativeSelectProps> & NativeSelectProps>;
|
188
187
|
interface PinFieldProps extends Omit<UsePinInputProps, 'type'> {
|
189
188
|
pinLength?: number;
|
190
189
|
pinType?: 'alphanumeric' | 'number';
|
191
190
|
spacing?: SystemProps['margin'];
|
192
191
|
}
|
193
|
-
declare const PinField: React$1.FC<Omit<
|
192
|
+
declare const PinField: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PinFieldProps> & PinFieldProps>;
|
194
193
|
declare const defaultFieldTypes: {
|
195
|
-
text: React$1.FC<Omit<
|
196
|
-
email: React$1.FC<Omit<
|
197
|
-
url: React$1.FC<Omit<
|
198
|
-
phone: React$1.FC<Omit<
|
199
|
-
time: React$1.FC<Omit<
|
200
|
-
number: React$1.FC<Omit<
|
201
|
-
password: React$1.FC<Omit<
|
202
|
-
textarea: React$1.FC<Omit<
|
203
|
-
switch: React$1.FC<Omit<
|
204
|
-
select: React$1.FC<Omit<
|
205
|
-
checkbox: React$1.FC<Omit<
|
206
|
-
radio: React$1.FC<Omit<
|
207
|
-
pin: React$1.FC<Omit<
|
208
|
-
'native-select': React$1.FC<Omit<
|
194
|
+
text: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
195
|
+
email: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
196
|
+
url: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
197
|
+
phone: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
198
|
+
time: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof InputFieldProps> & InputFieldProps>;
|
199
|
+
number: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NumberInputFieldProps> & NumberInputFieldProps>;
|
200
|
+
password: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PasswordInputProps> & PasswordInputProps>;
|
201
|
+
textarea: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof TextareaFieldProps> & TextareaFieldProps>;
|
202
|
+
switch: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SwitchFieldProps> & SwitchFieldProps>;
|
203
|
+
select: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof SelectFieldProps> & SelectFieldProps>;
|
204
|
+
checkbox: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof CheckboxProps> & CheckboxProps>;
|
205
|
+
radio: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof RadioInputProps> & RadioInputProps>;
|
206
|
+
pin: React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof PinFieldProps> & PinFieldProps>;
|
207
|
+
'native-select': React$1.FC<Omit<BaseFieldProps<react_hook_form.FieldValues, string>, keyof NativeSelectProps> & NativeSelectProps>;
|
209
208
|
};
|
210
209
|
type DefaultFields = typeof defaultFieldTypes;
|
211
210
|
|
@@ -810,7 +809,7 @@ type FieldRules = Pick<RegisterOptions, 'required' | 'min' | 'max' | 'maxLength'
|
|
810
809
|
declare const Field: (<TFieldValues extends FieldValues>(props: FieldProps<TFieldValues> & {
|
811
810
|
ref?: React$1.ForwardedRef<FocusableElement>;
|
812
811
|
}) => React$1.ReactElement) & {
|
813
|
-
displayName?: string
|
812
|
+
displayName?: string;
|
814
813
|
};
|
815
814
|
|
816
815
|
interface FieldsProps<TSchema = any> {
|
@@ -838,11 +837,11 @@ type FormProviderProps<TFieldValues extends FieldValues = FieldValues, TContext
|
|
838
837
|
};
|
839
838
|
};
|
840
839
|
declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, TContext = any, TSchema = any>() => {
|
841
|
-
fieldResolver?: FieldResolver
|
840
|
+
fieldResolver?: FieldResolver;
|
842
841
|
schema?: any;
|
843
842
|
fields?: {
|
844
843
|
[key: string]: unknown;
|
845
|
-
}
|
844
|
+
};
|
846
845
|
watch: react_hook_form.UseFormWatch<TFieldValues>;
|
847
846
|
getValues: react_hook_form.UseFormGetValues<TFieldValues>;
|
848
847
|
getFieldState: react_hook_form.UseFormGetFieldState<TFieldValues>;
|
@@ -853,9 +852,9 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
|
|
853
852
|
formState: react_hook_form.FormState<TFieldValues>;
|
854
853
|
resetField: react_hook_form.UseFormResetField<TFieldValues>;
|
855
854
|
reset: react_hook_form.UseFormReset<TFieldValues>;
|
856
|
-
handleSubmit: react_hook_form.UseFormHandleSubmit<TFieldValues,
|
855
|
+
handleSubmit: react_hook_form.UseFormHandleSubmit<TFieldValues, undefined>;
|
857
856
|
unregister: react_hook_form.UseFormUnregister<TFieldValues>;
|
858
|
-
control: react_hook_form.Control<TFieldValues, TContext
|
857
|
+
control: react_hook_form.Control<TFieldValues, TContext>;
|
859
858
|
register: react_hook_form.UseFormRegister<TFieldValues>;
|
860
859
|
setFocus: react_hook_form.UseFormSetFocus<TFieldValues>;
|
861
860
|
};
|
@@ -879,9 +878,9 @@ declare const useBaseField: (props: BaseFieldProps) => {
|
|
879
878
|
error: any;
|
880
879
|
touched: any;
|
881
880
|
name: string;
|
882
|
-
label?: string
|
883
|
-
hideLabel?: boolean
|
884
|
-
help?: string
|
881
|
+
label?: string;
|
882
|
+
hideLabel?: boolean;
|
883
|
+
help?: string;
|
885
884
|
};
|
886
885
|
/**
|
887
886
|
* The default BaseField component
|
package/dist/index.js
CHANGED
@@ -1184,8 +1184,7 @@ var DisplayIf = ({
|
|
1184
1184
|
initializedRef.current = true;
|
1185
1185
|
return;
|
1186
1186
|
}
|
1187
|
-
if (matchesRef.current === matches)
|
1188
|
-
return;
|
1187
|
+
if (matchesRef.current === matches) return;
|
1189
1188
|
matchesRef.current = matches;
|
1190
1189
|
onToggle == null ? void 0 : onToggle(matches, context);
|
1191
1190
|
}, [value]);
|
@@ -1394,8 +1393,7 @@ var objectFieldResolver = (schema) => {
|
|
1394
1393
|
const getNestedFields = (name) => {
|
1395
1394
|
var _a;
|
1396
1395
|
const field = (0, import_utils10.get)(schema, name);
|
1397
|
-
if (!field)
|
1398
|
-
return [];
|
1396
|
+
if (!field) return [];
|
1399
1397
|
if (((_a = field.items) == null ? void 0 : _a.type) === "object") {
|
1400
1398
|
return mapFields(field.items.properties);
|
1401
1399
|
} else if (field.type === "object") {
|