@volverjs/form-vue 0.0.13 → 0.0.14-beta.2
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/VvForm.d.ts +12 -12
- package/dist/VvFormField.d.ts +4 -4
- package/dist/VvFormWrapper.d.ts +7 -13
- package/dist/index.d.ts +46 -58
- package/dist/index.es.js +170 -159
- package/dist/index.umd.js +1 -1
- package/dist/types.d.ts +52 -125
- package/package.json +17 -16
- package/src/VvForm.ts +1 -1
- package/src/VvFormField.ts +1 -1
- package/src/VvFormWrapper.ts +1 -1
- package/src/{types.d.ts → types.ts} +10 -7
- package/src/utils.ts +27 -4
package/dist/VvForm.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { z, TypeOf } from 'zod';
|
|
|
3
3
|
import type { FormComponentOptions, FormSchema, InjectedFormData } from './types';
|
|
4
4
|
import { FormStatus } from './enums';
|
|
5
5
|
export declare const defineForm: <Schema extends FormSchema>(schema: Schema, provideKey: InjectionKey<InjectedFormData<Schema>>, options?: FormComponentOptions) => {
|
|
6
|
-
errors: Ref<z.
|
|
6
|
+
errors: Ref<z.inferFormattedError<Schema, string> | undefined>;
|
|
7
7
|
status: Ref<FormStatus | undefined>;
|
|
8
8
|
formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
|
|
9
9
|
/**
|
|
@@ -17,11 +17,11 @@ export declare const defineForm: <Schema extends FormSchema>(schema: Schema, pro
|
|
|
17
17
|
modelValue?: Record<string, any> | undefined;
|
|
18
18
|
updateThrottle?: number | undefined;
|
|
19
19
|
continuosValidation?: boolean | undefined;
|
|
20
|
-
key?: string | number | symbol | undefined;
|
|
21
20
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
22
21
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
23
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
24
22
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
key?: string | number | symbol | undefined;
|
|
24
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
25
25
|
ref?: import("vue").VNodeRef | undefined;
|
|
26
26
|
ref_for?: boolean | undefined;
|
|
27
27
|
ref_key?: string | undefined;
|
|
@@ -77,7 +77,7 @@ export declare const defineForm: <Schema extends FormSchema>(schema: Schema, pro
|
|
|
77
77
|
}>;
|
|
78
78
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
79
79
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
80
|
-
$emit: (event: "invalid" | "valid" | "
|
|
80
|
+
$emit: (event: "invalid" | "valid" | "update:modelValue" | "submit", ...args: any[]) => void;
|
|
81
81
|
$el: any;
|
|
82
82
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
83
83
|
modelValue: {
|
|
@@ -95,16 +95,16 @@ export declare const defineForm: <Schema extends FormSchema>(schema: Schema, pro
|
|
|
95
95
|
}>> & {
|
|
96
96
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
97
97
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
98
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
99
98
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
99
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
100
100
|
}, {
|
|
101
101
|
formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
|
|
102
102
|
submit: () => boolean;
|
|
103
103
|
validate: (value?: Partial<z.TypeOf<Schema> | undefined>) => boolean;
|
|
104
|
-
errors: Readonly<Ref<DeepReadonly<z.
|
|
104
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>;
|
|
105
105
|
status: Readonly<Ref<FormStatus | undefined>>;
|
|
106
106
|
invalid: import("vue").ComputedRef<boolean>;
|
|
107
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "
|
|
107
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], string, {
|
|
108
108
|
modelValue: Record<string, any>;
|
|
109
109
|
updateThrottle: number;
|
|
110
110
|
continuosValidation: boolean;
|
|
@@ -144,13 +144,13 @@ export declare const defineForm: <Schema extends FormSchema>(schema: Schema, pro
|
|
|
144
144
|
}>> & {
|
|
145
145
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
146
146
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
147
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
148
147
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
148
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
149
149
|
} & import("vue").ShallowUnwrapRef<{
|
|
150
150
|
formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
|
|
151
151
|
submit: () => boolean;
|
|
152
152
|
validate: (value?: Partial<z.TypeOf<Schema> | undefined>) => boolean;
|
|
153
|
-
errors: Readonly<Ref<DeepReadonly<z.
|
|
153
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>;
|
|
154
154
|
status: Readonly<Ref<FormStatus | undefined>>;
|
|
155
155
|
invalid: import("vue").ComputedRef<boolean>;
|
|
156
156
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
@@ -173,16 +173,16 @@ export declare const defineForm: <Schema extends FormSchema>(schema: Schema, pro
|
|
|
173
173
|
}>> & {
|
|
174
174
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
175
175
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
176
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
177
176
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
177
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
178
178
|
}, {
|
|
179
179
|
formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
|
|
180
180
|
submit: () => boolean;
|
|
181
181
|
validate: (value?: Partial<z.TypeOf<Schema> | undefined>) => boolean;
|
|
182
|
-
errors: Readonly<Ref<DeepReadonly<z.
|
|
182
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>;
|
|
183
183
|
status: Readonly<Ref<FormStatus | undefined>>;
|
|
184
184
|
invalid: import("vue").ComputedRef<boolean>;
|
|
185
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "
|
|
185
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], "invalid" | "valid" | "update:modelValue" | "submit", {
|
|
186
186
|
modelValue: Record<string, any>;
|
|
187
187
|
updateThrottle: number;
|
|
188
188
|
continuosValidation: boolean;
|
package/dist/VvFormField.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
|
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
27
27
|
defaultValue: {
|
|
28
|
-
type: (ObjectConstructor | NumberConstructor | BooleanConstructor |
|
|
28
|
+
type: (StringConstructor | ObjectConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor)[];
|
|
29
29
|
default: undefined;
|
|
30
30
|
};
|
|
31
31
|
lazyLoad: {
|
|
@@ -55,7 +55,7 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
|
|
|
55
55
|
'onUpdate:modelValue': (value: unknown) => void;
|
|
56
56
|
}>;
|
|
57
57
|
invalid: import("vue").ComputedRef<boolean>;
|
|
58
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:
|
|
58
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:formData" | "update:modelValue")[], "invalid" | "valid" | "update:formData" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
59
|
type: {
|
|
60
60
|
type: PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;
|
|
61
61
|
validator: (value: FormFieldType) => boolean;
|
|
@@ -78,7 +78,7 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
|
|
|
78
78
|
default: boolean;
|
|
79
79
|
};
|
|
80
80
|
defaultValue: {
|
|
81
|
-
type: (ObjectConstructor | NumberConstructor | BooleanConstructor |
|
|
81
|
+
type: (StringConstructor | ObjectConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor)[];
|
|
82
82
|
default: undefined;
|
|
83
83
|
};
|
|
84
84
|
lazyLoad: {
|
|
@@ -88,8 +88,8 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
|
|
|
88
88
|
}>> & {
|
|
89
89
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
90
90
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
91
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
92
91
|
"onUpdate:formData"?: ((...args: any[]) => any) | undefined;
|
|
92
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
93
93
|
}, {
|
|
94
94
|
type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
|
|
95
95
|
props: [{
|
package/dist/VvFormWrapper.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideK
|
|
|
7
7
|
$data: {};
|
|
8
8
|
$props: {
|
|
9
9
|
tag?: string | undefined;
|
|
10
|
-
key?: string | number | symbol | undefined;
|
|
11
10
|
readonly name: string;
|
|
12
11
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
13
12
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
key?: string | number | symbol | undefined;
|
|
14
14
|
ref?: import("vue").VNodeRef | undefined;
|
|
15
15
|
ref_for?: boolean | undefined;
|
|
16
16
|
ref_key?: string | undefined;
|
|
@@ -82,14 +82,12 @@ export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideK
|
|
|
82
82
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
83
83
|
}, {
|
|
84
84
|
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
85
|
-
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<
|
|
85
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
86
86
|
submit: (() => boolean) | undefined;
|
|
87
87
|
validate: (() => boolean) | undefined;
|
|
88
88
|
invalid: import("vue").ComputedRef<boolean>;
|
|
89
89
|
fields: Ref<Set<string>>;
|
|
90
|
-
fieldsErrors: Ref<Map<string,
|
|
91
|
-
_errors: string[];
|
|
92
|
-
}>>>;
|
|
90
|
+
fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
|
|
93
91
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], string, {
|
|
94
92
|
tag: string;
|
|
95
93
|
}, {}, string, {}> & {
|
|
@@ -126,14 +124,12 @@ export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideK
|
|
|
126
124
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
127
125
|
} & import("vue").ShallowUnwrapRef<{
|
|
128
126
|
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
129
|
-
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<
|
|
127
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
130
128
|
submit: (() => boolean) | undefined;
|
|
131
129
|
validate: (() => boolean) | undefined;
|
|
132
130
|
invalid: import("vue").ComputedRef<boolean>;
|
|
133
131
|
fields: Ref<Set<string>>;
|
|
134
|
-
fieldsErrors: Ref<Map<string,
|
|
135
|
-
_errors: string[];
|
|
136
|
-
}>>>;
|
|
132
|
+
fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
|
|
137
133
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
138
134
|
__isFragment?: undefined;
|
|
139
135
|
__isTeleport?: undefined;
|
|
@@ -152,14 +148,12 @@ export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideK
|
|
|
152
148
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
153
149
|
}, {
|
|
154
150
|
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
155
|
-
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<
|
|
151
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
156
152
|
submit: (() => boolean) | undefined;
|
|
157
153
|
validate: (() => boolean) | undefined;
|
|
158
154
|
invalid: import("vue").ComputedRef<boolean>;
|
|
159
155
|
fields: Ref<Set<string>>;
|
|
160
|
-
fieldsErrors: Ref<Map<string,
|
|
161
|
-
_errors: string[];
|
|
162
|
-
}>>>;
|
|
156
|
+
fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
|
|
163
157
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", {
|
|
164
158
|
tag: string;
|
|
165
159
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
package/dist/index.d.ts
CHANGED
|
@@ -15,11 +15,11 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
15
15
|
modelValue?: Record<string, any> | undefined;
|
|
16
16
|
updateThrottle?: number | undefined;
|
|
17
17
|
continuosValidation?: boolean | undefined;
|
|
18
|
-
key?: string | number | symbol | undefined;
|
|
19
18
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
20
19
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
21
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
22
20
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
key?: string | number | symbol | undefined;
|
|
22
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
23
23
|
ref?: import("vue").VNodeRef | undefined;
|
|
24
24
|
ref_for?: boolean | undefined;
|
|
25
25
|
ref_key?: string | undefined;
|
|
@@ -75,7 +75,7 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
75
75
|
}>;
|
|
76
76
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
77
77
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
78
|
-
$emit: (event: "invalid" | "valid" | "
|
|
78
|
+
$emit: (event: "invalid" | "valid" | "update:modelValue" | "submit", ...args: any[]) => void;
|
|
79
79
|
$el: any;
|
|
80
80
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
81
81
|
modelValue: {
|
|
@@ -93,16 +93,16 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
93
93
|
}>> & {
|
|
94
94
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
95
95
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
96
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
97
96
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
97
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
98
98
|
}, {
|
|
99
99
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
100
100
|
submit: () => boolean;
|
|
101
101
|
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean;
|
|
102
|
-
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").
|
|
102
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
103
103
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
104
104
|
invalid: import("vue").ComputedRef<boolean>;
|
|
105
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "
|
|
105
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], string, {
|
|
106
106
|
modelValue: Record<string, any>;
|
|
107
107
|
updateThrottle: number;
|
|
108
108
|
continuosValidation: boolean;
|
|
@@ -142,13 +142,13 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
142
142
|
}>> & {
|
|
143
143
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
144
144
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
145
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
146
145
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
146
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
147
147
|
} & import("vue").ShallowUnwrapRef<{
|
|
148
148
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
149
149
|
submit: () => boolean;
|
|
150
150
|
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean;
|
|
151
|
-
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").
|
|
151
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
152
152
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
153
153
|
invalid: import("vue").ComputedRef<boolean>;
|
|
154
154
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
@@ -171,16 +171,16 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
171
171
|
}>> & {
|
|
172
172
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
173
173
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
174
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
175
174
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
175
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
176
176
|
}, {
|
|
177
177
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
178
178
|
submit: () => boolean;
|
|
179
179
|
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean;
|
|
180
|
-
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").
|
|
180
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
181
181
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
182
182
|
invalid: import("vue").ComputedRef<boolean>;
|
|
183
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "
|
|
183
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], "invalid" | "valid" | "update:modelValue" | "submit", {
|
|
184
184
|
modelValue: Record<string, any>;
|
|
185
185
|
updateThrottle: number;
|
|
186
186
|
continuosValidation: boolean;
|
|
@@ -202,10 +202,10 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
202
202
|
$data: {};
|
|
203
203
|
$props: {
|
|
204
204
|
tag?: string | undefined;
|
|
205
|
-
key?: string | number | symbol | undefined;
|
|
206
205
|
readonly name: string;
|
|
207
206
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
208
207
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
208
|
+
key?: string | number | symbol | undefined;
|
|
209
209
|
ref?: import("vue").VNodeRef | undefined;
|
|
210
210
|
ref_for?: boolean | undefined;
|
|
211
211
|
ref_key?: string | undefined;
|
|
@@ -277,14 +277,12 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
277
277
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
278
278
|
}, {
|
|
279
279
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
280
|
-
errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<
|
|
280
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
281
281
|
submit: (() => boolean) | undefined;
|
|
282
282
|
validate: (() => boolean) | undefined;
|
|
283
283
|
invalid: import("vue").ComputedRef<boolean>;
|
|
284
284
|
fields: import("vue").Ref<Set<string>>;
|
|
285
|
-
fieldsErrors: import("vue").Ref<Map<string,
|
|
286
|
-
_errors: string[];
|
|
287
|
-
}>>>;
|
|
285
|
+
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
288
286
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], string, {
|
|
289
287
|
tag: string;
|
|
290
288
|
}, {}, string, {}> & {
|
|
@@ -321,14 +319,12 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
321
319
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
322
320
|
} & import("vue").ShallowUnwrapRef<{
|
|
323
321
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
324
|
-
errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<
|
|
322
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
325
323
|
submit: (() => boolean) | undefined;
|
|
326
324
|
validate: (() => boolean) | undefined;
|
|
327
325
|
invalid: import("vue").ComputedRef<boolean>;
|
|
328
326
|
fields: import("vue").Ref<Set<string>>;
|
|
329
|
-
fieldsErrors: import("vue").Ref<Map<string,
|
|
330
|
-
_errors: string[];
|
|
331
|
-
}>>>;
|
|
327
|
+
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
332
328
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
333
329
|
__isFragment?: undefined;
|
|
334
330
|
__isTeleport?: undefined;
|
|
@@ -347,14 +343,12 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
347
343
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
348
344
|
}, {
|
|
349
345
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
350
|
-
errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<
|
|
346
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
351
347
|
submit: (() => boolean) | undefined;
|
|
352
348
|
validate: (() => boolean) | undefined;
|
|
353
349
|
invalid: import("vue").ComputedRef<boolean>;
|
|
354
350
|
fields: import("vue").Ref<Set<string>>;
|
|
355
|
-
fieldsErrors: import("vue").Ref<Map<string,
|
|
356
|
-
_errors: string[];
|
|
357
|
-
}>>>;
|
|
351
|
+
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
358
352
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", {
|
|
359
353
|
tag: string;
|
|
360
354
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
@@ -394,7 +388,7 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
394
388
|
default: boolean;
|
|
395
389
|
};
|
|
396
390
|
defaultValue: {
|
|
397
|
-
type: (ObjectConstructor | NumberConstructor | BooleanConstructor |
|
|
391
|
+
type: (StringConstructor | ObjectConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor)[];
|
|
398
392
|
default: undefined;
|
|
399
393
|
};
|
|
400
394
|
lazyLoad: {
|
|
@@ -424,7 +418,7 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
424
418
|
'onUpdate:modelValue': (value: unknown) => void;
|
|
425
419
|
}>;
|
|
426
420
|
invalid: import("vue").ComputedRef<boolean>;
|
|
427
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:
|
|
421
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:formData" | "update:modelValue")[], "invalid" | "valid" | "update:formData" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
428
422
|
type: {
|
|
429
423
|
type: import("vue").PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;
|
|
430
424
|
validator: (value: import("./enums").FormFieldType) => boolean;
|
|
@@ -447,7 +441,7 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
447
441
|
default: boolean;
|
|
448
442
|
};
|
|
449
443
|
defaultValue: {
|
|
450
|
-
type: (ObjectConstructor | NumberConstructor | BooleanConstructor |
|
|
444
|
+
type: (StringConstructor | ObjectConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor)[];
|
|
451
445
|
default: undefined;
|
|
452
446
|
};
|
|
453
447
|
lazyLoad: {
|
|
@@ -457,8 +451,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
457
451
|
}>> & {
|
|
458
452
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
459
453
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
460
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
461
454
|
"onUpdate:formData"?: ((...args: any[]) => any) | undefined;
|
|
455
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
462
456
|
}, {
|
|
463
457
|
type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
|
|
464
458
|
props: [{
|
|
@@ -493,7 +487,7 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
493
487
|
formInjectionKey: InjectionKey<InjectedFormData<Schema>>;
|
|
494
488
|
formWrapperInjectionKey: InjectionKey<InjectedFormWrapperData<Schema>>;
|
|
495
489
|
formFieldInjectionKey: InjectionKey<InjectedFormFieldData<Schema>>;
|
|
496
|
-
errors: import("vue").Ref<import("zod").
|
|
490
|
+
errors: import("vue").Ref<import("zod").inferFormattedError<Schema, string> | undefined>;
|
|
497
491
|
status: import("vue").Ref<import("./enums").FormStatus | undefined>;
|
|
498
492
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
499
493
|
};
|
|
@@ -516,11 +510,11 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
516
510
|
modelValue?: Record<string, any> | undefined;
|
|
517
511
|
updateThrottle?: number | undefined;
|
|
518
512
|
continuosValidation?: boolean | undefined;
|
|
519
|
-
key?: string | number | symbol | undefined;
|
|
520
513
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
521
514
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
522
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
523
515
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
516
|
+
key?: string | number | symbol | undefined;
|
|
517
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
524
518
|
ref?: import("vue").VNodeRef | undefined;
|
|
525
519
|
ref_for?: boolean | undefined;
|
|
526
520
|
ref_key?: string | undefined;
|
|
@@ -576,7 +570,7 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
576
570
|
}>;
|
|
577
571
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
578
572
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
579
|
-
$emit: (event: "invalid" | "valid" | "
|
|
573
|
+
$emit: (event: "invalid" | "valid" | "update:modelValue" | "submit", ...args: any[]) => void;
|
|
580
574
|
$el: any;
|
|
581
575
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
582
576
|
modelValue: {
|
|
@@ -594,16 +588,16 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
594
588
|
}>> & {
|
|
595
589
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
596
590
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
597
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
598
591
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
592
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
599
593
|
}, {
|
|
600
594
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
601
595
|
submit: () => boolean;
|
|
602
596
|
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean;
|
|
603
|
-
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").
|
|
597
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
604
598
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
605
599
|
invalid: import("vue").ComputedRef<boolean>;
|
|
606
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "
|
|
600
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], string, {
|
|
607
601
|
modelValue: Record<string, any>;
|
|
608
602
|
updateThrottle: number;
|
|
609
603
|
continuosValidation: boolean;
|
|
@@ -643,13 +637,13 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
643
637
|
}>> & {
|
|
644
638
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
645
639
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
646
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
647
640
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
641
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
648
642
|
} & import("vue").ShallowUnwrapRef<{
|
|
649
643
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
650
644
|
submit: () => boolean;
|
|
651
645
|
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean;
|
|
652
|
-
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").
|
|
646
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
653
647
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
654
648
|
invalid: import("vue").ComputedRef<boolean>;
|
|
655
649
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
@@ -672,16 +666,16 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
672
666
|
}>> & {
|
|
673
667
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
674
668
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
675
|
-
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
676
669
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
670
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
677
671
|
}, {
|
|
678
672
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
679
673
|
submit: () => boolean;
|
|
680
674
|
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean;
|
|
681
|
-
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").
|
|
675
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
682
676
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
683
677
|
invalid: import("vue").ComputedRef<boolean>;
|
|
684
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "
|
|
678
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], "invalid" | "valid" | "update:modelValue" | "submit", {
|
|
685
679
|
modelValue: Record<string, any>;
|
|
686
680
|
updateThrottle: number;
|
|
687
681
|
continuosValidation: boolean;
|
|
@@ -703,10 +697,10 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
703
697
|
$data: {};
|
|
704
698
|
$props: {
|
|
705
699
|
tag?: string | undefined;
|
|
706
|
-
key?: string | number | symbol | undefined;
|
|
707
700
|
readonly name: string;
|
|
708
701
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
709
702
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
703
|
+
key?: string | number | symbol | undefined;
|
|
710
704
|
ref?: import("vue").VNodeRef | undefined;
|
|
711
705
|
ref_for?: boolean | undefined;
|
|
712
706
|
ref_key?: string | undefined;
|
|
@@ -778,14 +772,12 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
778
772
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
779
773
|
}, {
|
|
780
774
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
781
|
-
errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<
|
|
775
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
782
776
|
submit: (() => boolean) | undefined;
|
|
783
777
|
validate: (() => boolean) | undefined;
|
|
784
778
|
invalid: import("vue").ComputedRef<boolean>;
|
|
785
779
|
fields: import("vue").Ref<Set<string>>;
|
|
786
|
-
fieldsErrors: import("vue").Ref<Map<string,
|
|
787
|
-
_errors: string[];
|
|
788
|
-
}>>>;
|
|
780
|
+
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
789
781
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], string, {
|
|
790
782
|
tag: string;
|
|
791
783
|
}, {}, string, {}> & {
|
|
@@ -822,14 +814,12 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
822
814
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
823
815
|
} & import("vue").ShallowUnwrapRef<{
|
|
824
816
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
825
|
-
errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<
|
|
817
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
826
818
|
submit: (() => boolean) | undefined;
|
|
827
819
|
validate: (() => boolean) | undefined;
|
|
828
820
|
invalid: import("vue").ComputedRef<boolean>;
|
|
829
821
|
fields: import("vue").Ref<Set<string>>;
|
|
830
|
-
fieldsErrors: import("vue").Ref<Map<string,
|
|
831
|
-
_errors: string[];
|
|
832
|
-
}>>>;
|
|
822
|
+
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
833
823
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
834
824
|
__isFragment?: undefined;
|
|
835
825
|
__isTeleport?: undefined;
|
|
@@ -848,14 +838,12 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
848
838
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
849
839
|
}, {
|
|
850
840
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
851
|
-
errors: Readonly<import("vue").Ref<DeepReadonly<import("zod").inferFormattedError<
|
|
841
|
+
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
852
842
|
submit: (() => boolean) | undefined;
|
|
853
843
|
validate: (() => boolean) | undefined;
|
|
854
844
|
invalid: import("vue").ComputedRef<boolean>;
|
|
855
845
|
fields: import("vue").Ref<Set<string>>;
|
|
856
|
-
fieldsErrors: import("vue").Ref<Map<string,
|
|
857
|
-
_errors: string[];
|
|
858
|
-
}>>>;
|
|
846
|
+
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
859
847
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", {
|
|
860
848
|
tag: string;
|
|
861
849
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
@@ -895,7 +883,7 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
895
883
|
default: boolean;
|
|
896
884
|
};
|
|
897
885
|
defaultValue: {
|
|
898
|
-
type: (ObjectConstructor | NumberConstructor | BooleanConstructor |
|
|
886
|
+
type: (StringConstructor | ObjectConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor)[];
|
|
899
887
|
default: undefined;
|
|
900
888
|
};
|
|
901
889
|
lazyLoad: {
|
|
@@ -925,7 +913,7 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
925
913
|
'onUpdate:modelValue': (value: unknown) => void;
|
|
926
914
|
}>;
|
|
927
915
|
invalid: import("vue").ComputedRef<boolean>;
|
|
928
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:
|
|
916
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:formData" | "update:modelValue")[], "invalid" | "valid" | "update:formData" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
929
917
|
type: {
|
|
930
918
|
type: import("vue").PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;
|
|
931
919
|
validator: (value: import("./enums").FormFieldType) => boolean;
|
|
@@ -948,7 +936,7 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
948
936
|
default: boolean;
|
|
949
937
|
};
|
|
950
938
|
defaultValue: {
|
|
951
|
-
type: (ObjectConstructor | NumberConstructor | BooleanConstructor |
|
|
939
|
+
type: (StringConstructor | ObjectConstructor | NumberConstructor | BooleanConstructor | ArrayConstructor)[];
|
|
952
940
|
default: undefined;
|
|
953
941
|
};
|
|
954
942
|
lazyLoad: {
|
|
@@ -958,8 +946,8 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
958
946
|
}>> & {
|
|
959
947
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
960
948
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
961
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
962
949
|
"onUpdate:formData"?: ((...args: any[]) => any) | undefined;
|
|
950
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
963
951
|
}, {
|
|
964
952
|
type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
|
|
965
953
|
props: [{
|
|
@@ -994,7 +982,7 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
994
982
|
formInjectionKey: InjectionKey<InjectedFormData<Schema>>;
|
|
995
983
|
formWrapperInjectionKey: InjectionKey<InjectedFormWrapperData<Schema>>;
|
|
996
984
|
formFieldInjectionKey: InjectionKey<InjectedFormFieldData<Schema>>;
|
|
997
|
-
errors: import("vue").Ref<import("zod").
|
|
985
|
+
errors: import("vue").Ref<import("zod").inferFormattedError<Schema, string> | undefined>;
|
|
998
986
|
status: import("vue").Ref<import("./enums").FormStatus | undefined>;
|
|
999
987
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
1000
988
|
};
|