@volverjs/form-vue 1.0.0-beta.25 → 1.0.0-beta.26
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 +13 -10
- package/dist/VvFormField.d.ts +5 -5
- package/dist/VvFormFieldsGroup.d.ts +5 -5
- package/dist/VvFormTemplate.d.ts +9 -9
- package/dist/VvFormWrapper.d.ts +10 -10
- package/dist/index.d.ts +683 -177
- package/dist/index.es.js +627 -587
- package/dist/index.umd.js +1 -1
- package/dist/types.d.ts +25 -20
- package/package.json +10 -10
- package/src/VvForm.ts +26 -15
- package/src/VvFormField.ts +14 -7
- package/src/VvFormFieldsGroup.ts +17 -6
- package/src/VvFormTemplate.ts +17 -19
- package/src/VvFormWrapper.ts +45 -14
- package/src/index.ts +24 -10
- package/src/types.ts +39 -34
package/dist/index.d.ts
CHANGED
|
@@ -7,12 +7,12 @@ import { defineFormWrapper } from './VvFormWrapper';
|
|
|
7
7
|
import { InjectedFormData, InjectedFormWrapperData, InjectedFormFieldData, FormComposableOptions, FormPluginOptions, FormTemplateItem, Path, PathValue, FormSchema, FormTemplate } from './types';
|
|
8
8
|
export declare const pluginInjectionKey: InjectionKey<FormPluginOptions>;
|
|
9
9
|
export declare function createForm(options: FormPluginOptions): Plugin & Partial<ReturnType<typeof useForm>>;
|
|
10
|
-
export declare function useForm<Schema extends FormSchema>(schema: Schema, options?: FormComposableOptions<Schema>): {
|
|
10
|
+
export declare function useForm<Schema extends FormSchema, Type>(schema: Schema, options?: FormComposableOptions<Schema, Type>): {
|
|
11
11
|
clear: () => void;
|
|
12
12
|
errors: import('vue').Ref<import('zod').inferFormattedError<Schema, string> | undefined, import('zod').inferFormattedError<Schema, string> | undefined>;
|
|
13
|
-
formData: import('vue').Ref<Partial<import('zod').TypeOf<Schema
|
|
13
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined>;
|
|
14
14
|
formFieldInjectionKey: InjectionKey<InjectedFormFieldData<Schema>>;
|
|
15
|
-
formInjectionKey: InjectionKey<InjectedFormData<Schema>>;
|
|
15
|
+
formInjectionKey: InjectionKey<InjectedFormData<Schema, Type>>;
|
|
16
16
|
formWrapperInjectionKey: InjectionKey<InjectedFormWrapperData<Schema>>;
|
|
17
17
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
18
18
|
invalid: import('vue').ComputedRef<boolean>;
|
|
@@ -21,7 +21,55 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
21
21
|
status: import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>;
|
|
22
22
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
23
23
|
submit: () => Promise<boolean>;
|
|
24
|
-
validate: (value?: Partial<import('zod').TypeOf<Schema
|
|
24
|
+
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
25
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
26
|
+
name: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
tag: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
34
|
+
}>, {
|
|
35
|
+
clear: (() => void) | undefined;
|
|
36
|
+
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
37
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
38
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
39
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
|
|
40
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
41
|
+
reset: (() => void) | undefined;
|
|
42
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
43
|
+
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
44
|
+
validateWrapper: () => Promise<boolean>;
|
|
45
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
46
|
+
name: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
required: true;
|
|
49
|
+
};
|
|
50
|
+
tag: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: undefined;
|
|
53
|
+
};
|
|
54
|
+
}>> & Readonly<{
|
|
55
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
}>, {
|
|
58
|
+
tag: string;
|
|
59
|
+
}, import('vue').SlotsType<{
|
|
60
|
+
default: {
|
|
61
|
+
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
62
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
63
|
+
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
64
|
+
invalid: boolean;
|
|
65
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
66
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
67
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
68
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
69
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
70
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
71
|
+
};
|
|
72
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
25
73
|
VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
26
74
|
continuousValidation: {
|
|
27
75
|
type: BooleanConstructor;
|
|
@@ -40,13 +88,13 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
40
88
|
default: string;
|
|
41
89
|
};
|
|
42
90
|
template: {
|
|
43
|
-
type: import('vue').PropType<FormTemplate<
|
|
91
|
+
type: import('vue').PropType<FormTemplate<Schema_2, Type_2>>;
|
|
44
92
|
default: undefined;
|
|
45
93
|
};
|
|
46
94
|
}>, {
|
|
47
95
|
clear: () => void;
|
|
48
96
|
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>>;
|
|
49
|
-
formData: import('vue').Ref<Partial<import('zod').TypeOf<Schema
|
|
97
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined>;
|
|
50
98
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
51
99
|
invalid: import('vue').ComputedRef<boolean>;
|
|
52
100
|
isReadonly: import('vue').Ref<boolean, boolean>;
|
|
@@ -54,7 +102,55 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
54
102
|
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
55
103
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
56
104
|
submit: () => Promise<boolean>;
|
|
57
|
-
validate: (value?: Partial<import('zod').TypeOf<Schema
|
|
105
|
+
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
106
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
107
|
+
name: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
required: true;
|
|
110
|
+
};
|
|
111
|
+
tag: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
default: undefined;
|
|
114
|
+
};
|
|
115
|
+
}>, {
|
|
116
|
+
clear: (() => void) | undefined;
|
|
117
|
+
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
118
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
119
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
120
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
|
|
121
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
122
|
+
reset: (() => void) | undefined;
|
|
123
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
124
|
+
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
125
|
+
validateWrapper: () => Promise<boolean>;
|
|
126
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
127
|
+
name: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
required: true;
|
|
130
|
+
};
|
|
131
|
+
tag: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
default: undefined;
|
|
134
|
+
};
|
|
135
|
+
}>> & Readonly<{
|
|
136
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
137
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
138
|
+
}>, {
|
|
139
|
+
tag: string;
|
|
140
|
+
}, import('vue').SlotsType<{
|
|
141
|
+
default: {
|
|
142
|
+
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
143
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
144
|
+
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
145
|
+
invalid: boolean;
|
|
146
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
147
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
148
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
149
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
150
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
151
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
152
|
+
};
|
|
153
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
58
154
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid" | "reset" | "submit" | "update:modelValue" | "update:readonly")[], "invalid" | "valid" | "reset" | "submit" | "update:modelValue" | "update:readonly", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
59
155
|
continuousValidation: {
|
|
60
156
|
type: BooleanConstructor;
|
|
@@ -73,7 +169,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
73
169
|
default: string;
|
|
74
170
|
};
|
|
75
171
|
template: {
|
|
76
|
-
type: import('vue').PropType<FormTemplate<
|
|
172
|
+
type: import('vue').PropType<FormTemplate<Schema_2, Type_2>>;
|
|
77
173
|
default: undefined;
|
|
78
174
|
};
|
|
79
175
|
}>> & Readonly<{
|
|
@@ -86,22 +182,70 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
86
182
|
}>, {
|
|
87
183
|
readonly: boolean;
|
|
88
184
|
tag: string;
|
|
89
|
-
template: FormTemplate<Schema>;
|
|
185
|
+
template: FormTemplate<Schema, Type>;
|
|
90
186
|
continuousValidation: boolean;
|
|
91
187
|
modelValue: Record<string, any>;
|
|
92
188
|
}, import('vue').SlotsType<{
|
|
93
189
|
default: {
|
|
94
190
|
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>>;
|
|
95
|
-
formData: import('vue').Ref<Partial<import('zod').TypeOf<Schema
|
|
191
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined>;
|
|
96
192
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
97
193
|
invalid: import('vue').ComputedRef<boolean>;
|
|
98
194
|
readonly: import('vue').Ref<boolean, boolean>;
|
|
99
195
|
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
100
196
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
101
197
|
submit: () => Promise<boolean>;
|
|
102
|
-
validate: (value?: Partial<import('zod').TypeOf<Schema
|
|
198
|
+
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
103
199
|
clear: () => void;
|
|
104
200
|
reset: () => void;
|
|
201
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
202
|
+
name: {
|
|
203
|
+
type: StringConstructor;
|
|
204
|
+
required: true;
|
|
205
|
+
};
|
|
206
|
+
tag: {
|
|
207
|
+
type: StringConstructor;
|
|
208
|
+
default: undefined;
|
|
209
|
+
};
|
|
210
|
+
}>, {
|
|
211
|
+
clear: (() => void) | undefined;
|
|
212
|
+
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
213
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
214
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
215
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
|
|
216
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
217
|
+
reset: (() => void) | undefined;
|
|
218
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
219
|
+
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
220
|
+
validateWrapper: () => Promise<boolean>;
|
|
221
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
222
|
+
name: {
|
|
223
|
+
type: StringConstructor;
|
|
224
|
+
required: true;
|
|
225
|
+
};
|
|
226
|
+
tag: {
|
|
227
|
+
type: StringConstructor;
|
|
228
|
+
default: undefined;
|
|
229
|
+
};
|
|
230
|
+
}>> & Readonly<{
|
|
231
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
232
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
233
|
+
}>, {
|
|
234
|
+
tag: string;
|
|
235
|
+
}, import('vue').SlotsType<{
|
|
236
|
+
default: {
|
|
237
|
+
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
238
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
239
|
+
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
240
|
+
invalid: boolean;
|
|
241
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
242
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
243
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
244
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
245
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
246
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
247
|
+
};
|
|
248
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
105
249
|
};
|
|
106
250
|
}>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
107
251
|
VvFormField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -115,11 +259,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
115
259
|
default: undefined;
|
|
116
260
|
};
|
|
117
261
|
name: {
|
|
118
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
262
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
119
263
|
required: true;
|
|
120
264
|
};
|
|
121
265
|
props: {
|
|
122
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
266
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
123
267
|
default: () => {};
|
|
124
268
|
};
|
|
125
269
|
showValid: {
|
|
@@ -147,10 +291,10 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
147
291
|
} | import('vue').ConcreteComponent>;
|
|
148
292
|
hasProps: import('vue').ComputedRef<{
|
|
149
293
|
name: {} | ([{
|
|
150
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
294
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
151
295
|
required: true;
|
|
152
296
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
153
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
297
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
154
298
|
required: true;
|
|
155
299
|
});
|
|
156
300
|
invalid: boolean;
|
|
@@ -173,11 +317,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
173
317
|
default: undefined;
|
|
174
318
|
};
|
|
175
319
|
name: {
|
|
176
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
320
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
177
321
|
required: true;
|
|
178
322
|
};
|
|
179
323
|
props: {
|
|
180
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
324
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
181
325
|
default: () => {};
|
|
182
326
|
};
|
|
183
327
|
showValid: {
|
|
@@ -205,10 +349,10 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
205
349
|
type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
|
|
206
350
|
readonly: boolean;
|
|
207
351
|
props: [{
|
|
208
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
352
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
209
353
|
default: () => {};
|
|
210
354
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
211
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
355
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
212
356
|
default: () => {};
|
|
213
357
|
};
|
|
214
358
|
is: string | import('vue').Component;
|
|
@@ -219,15 +363,15 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
219
363
|
[key: string]: any;
|
|
220
364
|
default: {
|
|
221
365
|
errors: import('zod').inferFormattedError<Schema, string>;
|
|
222
|
-
formData?: Partial<import('zod').TypeOf<Schema>> | undefined;
|
|
366
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
223
367
|
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
224
368
|
invalid: boolean;
|
|
225
369
|
invalidLabel?: string[];
|
|
226
370
|
modelValue: any;
|
|
227
371
|
onUpdate: (value: unknown) => void;
|
|
228
372
|
readonly: boolean;
|
|
229
|
-
submit?: InjectedFormData<
|
|
230
|
-
validate?: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
373
|
+
submit?: InjectedFormData<Schema_3, Type_3>["submit"];
|
|
374
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
231
375
|
};
|
|
232
376
|
}>, {}, {}, "invalid" | "type" | "errors" | "component" | "hasProps" | "invalidLabel" | "is", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
233
377
|
VvFormFieldsGroup: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -236,11 +380,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
236
380
|
default: undefined;
|
|
237
381
|
};
|
|
238
382
|
names: {
|
|
239
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
383
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_4>>[] | Record<string, Path<import('zod').TypeOf<Schema_4>>>>;
|
|
240
384
|
required: true;
|
|
241
385
|
};
|
|
242
386
|
props: {
|
|
243
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
387
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
244
388
|
default: () => {};
|
|
245
389
|
};
|
|
246
390
|
showValid: {
|
|
@@ -248,7 +392,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
248
392
|
default: boolean;
|
|
249
393
|
};
|
|
250
394
|
defaultValues: {
|
|
251
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
395
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
252
396
|
default: undefined;
|
|
253
397
|
};
|
|
254
398
|
readonly: {
|
|
@@ -277,11 +421,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
277
421
|
default: undefined;
|
|
278
422
|
};
|
|
279
423
|
names: {
|
|
280
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
424
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_4>>[] | Record<string, Path<import('zod').TypeOf<Schema_4>>>>;
|
|
281
425
|
required: true;
|
|
282
426
|
};
|
|
283
427
|
props: {
|
|
284
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
428
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
285
429
|
default: () => {};
|
|
286
430
|
};
|
|
287
431
|
showValid: {
|
|
@@ -289,7 +433,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
289
433
|
default: boolean;
|
|
290
434
|
};
|
|
291
435
|
defaultValues: {
|
|
292
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
436
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
293
437
|
default: undefined;
|
|
294
438
|
};
|
|
295
439
|
readonly: {
|
|
@@ -304,26 +448,26 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
304
448
|
}>, {
|
|
305
449
|
readonly: boolean;
|
|
306
450
|
props: [{
|
|
307
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
451
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
308
452
|
default: () => {};
|
|
309
453
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
310
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
454
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
311
455
|
default: () => {};
|
|
312
456
|
};
|
|
313
457
|
is: string | import('vue').Component;
|
|
314
458
|
showValid: boolean;
|
|
315
459
|
defaultValues: [{
|
|
316
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
460
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
317
461
|
default: undefined;
|
|
318
462
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
319
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
463
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
320
464
|
default: undefined;
|
|
321
465
|
};
|
|
322
466
|
}, import('vue').SlotsType<{
|
|
323
467
|
[key: string]: any;
|
|
324
468
|
default: {
|
|
325
469
|
errors?: Record<Path<import('zod').TypeOf<Schema>>, import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
326
|
-
formData?: Partial<import('zod').TypeOf<Schema>> | undefined;
|
|
470
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
327
471
|
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
328
472
|
invalid: boolean;
|
|
329
473
|
invalids: Record<string, boolean>;
|
|
@@ -332,13 +476,13 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
332
476
|
onUpdate: (value: Record<string, any>) => void;
|
|
333
477
|
onUpdateField: (name: string, value: any) => void;
|
|
334
478
|
readonly: boolean;
|
|
335
|
-
submit?: InjectedFormData<
|
|
336
|
-
validate?: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
479
|
+
submit?: InjectedFormData<Schema_4, Type_4>["submit"];
|
|
480
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
337
481
|
};
|
|
338
482
|
}>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
339
483
|
VvFormTemplate: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
340
484
|
schema: {
|
|
341
|
-
type: import('vue').PropType<FormTemplate<
|
|
485
|
+
type: import('vue').PropType<FormTemplate<Schema_5, Type_5>>;
|
|
342
486
|
required: true;
|
|
343
487
|
};
|
|
344
488
|
scope: {
|
|
@@ -351,7 +495,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
351
495
|
[key: string]: any;
|
|
352
496
|
}>[] | undefined)[]) | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
353
497
|
schema: {
|
|
354
|
-
type: import('vue').PropType<FormTemplate<
|
|
498
|
+
type: import('vue').PropType<FormTemplate<Schema_5, Type_5>>;
|
|
355
499
|
required: true;
|
|
356
500
|
};
|
|
357
501
|
scope: {
|
|
@@ -363,13 +507,13 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
363
507
|
}, import('vue').SlotsType<{
|
|
364
508
|
default: {
|
|
365
509
|
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
366
|
-
formData?: Partial<import('zod').TypeOf<Schema>> | undefined;
|
|
510
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
367
511
|
invalid: boolean;
|
|
368
512
|
status?: import('./enums').FormStatus;
|
|
369
|
-
submit?: InjectedFormData<
|
|
370
|
-
validate?: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
371
|
-
clear?: InjectedFormData<
|
|
372
|
-
reset?: InjectedFormData<
|
|
513
|
+
submit?: InjectedFormData<Schema_5, Type_5>["submit"];
|
|
514
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
515
|
+
clear?: InjectedFormData<Schema_5, Type_5>["clear"];
|
|
516
|
+
reset?: InjectedFormData<Schema_5, Type_5>["reset"];
|
|
373
517
|
};
|
|
374
518
|
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
375
519
|
VvFormWrapper: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -384,13 +528,13 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
384
528
|
}>, {
|
|
385
529
|
clear: (() => void) | undefined;
|
|
386
530
|
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
387
|
-
fields: import('vue').Ref<
|
|
531
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
388
532
|
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
389
|
-
formData: import('vue').Ref<Partial<import('zod').TypeOf<Schema>> | undefined, Partial<import('zod').TypeOf<Schema>> | undefined> | undefined;
|
|
533
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
|
|
390
534
|
invalid: import('vue').ComputedRef<boolean>;
|
|
391
535
|
reset: (() => void) | undefined;
|
|
392
536
|
submit: (() => Promise<boolean>) | undefined;
|
|
393
|
-
validate: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
537
|
+
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
394
538
|
validateWrapper: () => Promise<boolean>;
|
|
395
539
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
396
540
|
name: {
|
|
@@ -409,27 +553,27 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
409
553
|
}, import('vue').SlotsType<{
|
|
410
554
|
default: {
|
|
411
555
|
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
412
|
-
formData?: Partial<import('zod').TypeOf<Schema>> | undefined;
|
|
556
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
413
557
|
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
414
558
|
invalid: boolean;
|
|
415
|
-
submit?: InjectedFormData<
|
|
416
|
-
validate?: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
559
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
560
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
417
561
|
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
418
562
|
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
419
|
-
clear?: InjectedFormData<
|
|
420
|
-
reset?: InjectedFormData<
|
|
563
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
564
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
421
565
|
};
|
|
422
566
|
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
423
567
|
} | {
|
|
424
568
|
clear: () => void;
|
|
425
569
|
errors: import('vue').Ref<import('zod').inferFormattedError<AnyZodObject, string> | undefined, import('zod').inferFormattedError<AnyZodObject, string> | undefined>;
|
|
426
|
-
formData: import('vue').Ref<Partial<{
|
|
570
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<{
|
|
427
571
|
[x: string]: any;
|
|
428
|
-
} | undefined
|
|
572
|
+
}> : Type) | undefined, (undefined extends Type ? Partial<{
|
|
429
573
|
[x: string]: any;
|
|
430
|
-
} | undefined
|
|
574
|
+
}> : Type) | undefined>;
|
|
431
575
|
formFieldInjectionKey: InjectionKey<InjectedFormFieldData<AnyZodObject>>;
|
|
432
|
-
formInjectionKey: InjectionKey<InjectedFormData<AnyZodObject>>;
|
|
576
|
+
formInjectionKey: InjectionKey<InjectedFormData<AnyZodObject, Type>>;
|
|
433
577
|
formWrapperInjectionKey: InjectionKey<InjectedFormWrapperData<AnyZodObject>>;
|
|
434
578
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
435
579
|
invalid: import('vue').ComputedRef<boolean>;
|
|
@@ -438,9 +582,87 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
438
582
|
status: import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>;
|
|
439
583
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
440
584
|
submit: () => Promise<boolean>;
|
|
441
|
-
validate: (value?: Partial<{
|
|
585
|
+
validate: (value?: (undefined extends Type ? Partial<{
|
|
442
586
|
[x: string]: any;
|
|
443
|
-
} | undefined
|
|
587
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
588
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
589
|
+
name: {
|
|
590
|
+
type: StringConstructor;
|
|
591
|
+
required: true;
|
|
592
|
+
};
|
|
593
|
+
tag: {
|
|
594
|
+
type: StringConstructor;
|
|
595
|
+
default: undefined;
|
|
596
|
+
};
|
|
597
|
+
}>, {
|
|
598
|
+
clear: (() => void) | undefined;
|
|
599
|
+
errors: Readonly<import('vue').Ref<{
|
|
600
|
+
readonly [x: string]: {
|
|
601
|
+
readonly _errors: readonly string[];
|
|
602
|
+
} | undefined;
|
|
603
|
+
readonly _errors: readonly string[];
|
|
604
|
+
} | undefined, {
|
|
605
|
+
readonly [x: string]: {
|
|
606
|
+
readonly _errors: readonly string[];
|
|
607
|
+
} | undefined;
|
|
608
|
+
readonly _errors: readonly string[];
|
|
609
|
+
} | undefined>> | undefined;
|
|
610
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
611
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<AnyZodObject, string>>, Map<string, import('zod').inferFormattedError<AnyZodObject, string>>>;
|
|
612
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<{
|
|
613
|
+
[x: string]: any;
|
|
614
|
+
}> : Type) | undefined, (undefined extends Type ? Partial<{
|
|
615
|
+
[x: string]: any;
|
|
616
|
+
}> : Type) | undefined> | undefined;
|
|
617
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
618
|
+
reset: (() => void) | undefined;
|
|
619
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
620
|
+
validate: ((formData?: (undefined extends Type ? Partial<{
|
|
621
|
+
[x: string]: any;
|
|
622
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
623
|
+
validateWrapper: () => Promise<boolean>;
|
|
624
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
625
|
+
name: {
|
|
626
|
+
type: StringConstructor;
|
|
627
|
+
required: true;
|
|
628
|
+
};
|
|
629
|
+
tag: {
|
|
630
|
+
type: StringConstructor;
|
|
631
|
+
default: undefined;
|
|
632
|
+
};
|
|
633
|
+
}>> & Readonly<{
|
|
634
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
635
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
636
|
+
}>, {
|
|
637
|
+
tag: string;
|
|
638
|
+
}, import('vue').SlotsType<{
|
|
639
|
+
default: {
|
|
640
|
+
errors?: {
|
|
641
|
+
readonly [x: string]: {
|
|
642
|
+
readonly _errors: readonly string[];
|
|
643
|
+
} | undefined;
|
|
644
|
+
readonly _errors: readonly string[];
|
|
645
|
+
} | undefined;
|
|
646
|
+
formData?: (undefined extends Type ? Partial<{
|
|
647
|
+
[x: string]: any;
|
|
648
|
+
}> : Type) | undefined;
|
|
649
|
+
formErrors?: {
|
|
650
|
+
readonly [x: string]: {
|
|
651
|
+
readonly _errors: readonly string[];
|
|
652
|
+
} | undefined;
|
|
653
|
+
readonly _errors: readonly string[];
|
|
654
|
+
} | undefined;
|
|
655
|
+
invalid: boolean;
|
|
656
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
657
|
+
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
658
|
+
[x: string]: any;
|
|
659
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
660
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
661
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<AnyZodObject, string>>;
|
|
662
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
663
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
664
|
+
};
|
|
665
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
444
666
|
VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
445
667
|
continuousValidation: {
|
|
446
668
|
type: BooleanConstructor;
|
|
@@ -459,7 +681,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
459
681
|
default: string;
|
|
460
682
|
};
|
|
461
683
|
template: {
|
|
462
|
-
type: import('vue').PropType<FormTemplate<
|
|
684
|
+
type: import('vue').PropType<FormTemplate<Schema_2, Type_2>>;
|
|
463
685
|
default: undefined;
|
|
464
686
|
};
|
|
465
687
|
}>, {
|
|
@@ -475,11 +697,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
475
697
|
} | undefined;
|
|
476
698
|
readonly _errors: readonly string[];
|
|
477
699
|
} | undefined>>;
|
|
478
|
-
formData: import('vue').Ref<Partial<{
|
|
700
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<{
|
|
479
701
|
[x: string]: any;
|
|
480
|
-
} | undefined
|
|
702
|
+
}> : Type) | undefined, (undefined extends Type ? Partial<{
|
|
481
703
|
[x: string]: any;
|
|
482
|
-
} | undefined
|
|
704
|
+
}> : Type) | undefined>;
|
|
483
705
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
484
706
|
invalid: import('vue').ComputedRef<boolean>;
|
|
485
707
|
isReadonly: import('vue').Ref<boolean, boolean>;
|
|
@@ -487,9 +709,87 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
487
709
|
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
488
710
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
489
711
|
submit: () => Promise<boolean>;
|
|
490
|
-
validate: (value?: Partial<{
|
|
712
|
+
validate: (value?: (undefined extends Type ? Partial<{
|
|
491
713
|
[x: string]: any;
|
|
492
|
-
} | undefined
|
|
714
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
715
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
716
|
+
name: {
|
|
717
|
+
type: StringConstructor;
|
|
718
|
+
required: true;
|
|
719
|
+
};
|
|
720
|
+
tag: {
|
|
721
|
+
type: StringConstructor;
|
|
722
|
+
default: undefined;
|
|
723
|
+
};
|
|
724
|
+
}>, {
|
|
725
|
+
clear: (() => void) | undefined;
|
|
726
|
+
errors: Readonly<import('vue').Ref<{
|
|
727
|
+
readonly [x: string]: {
|
|
728
|
+
readonly _errors: readonly string[];
|
|
729
|
+
} | undefined;
|
|
730
|
+
readonly _errors: readonly string[];
|
|
731
|
+
} | undefined, {
|
|
732
|
+
readonly [x: string]: {
|
|
733
|
+
readonly _errors: readonly string[];
|
|
734
|
+
} | undefined;
|
|
735
|
+
readonly _errors: readonly string[];
|
|
736
|
+
} | undefined>> | undefined;
|
|
737
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
738
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<AnyZodObject, string>>, Map<string, import('zod').inferFormattedError<AnyZodObject, string>>>;
|
|
739
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<{
|
|
740
|
+
[x: string]: any;
|
|
741
|
+
}> : Type) | undefined, (undefined extends Type ? Partial<{
|
|
742
|
+
[x: string]: any;
|
|
743
|
+
}> : Type) | undefined> | undefined;
|
|
744
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
745
|
+
reset: (() => void) | undefined;
|
|
746
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
747
|
+
validate: ((formData?: (undefined extends Type ? Partial<{
|
|
748
|
+
[x: string]: any;
|
|
749
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
750
|
+
validateWrapper: () => Promise<boolean>;
|
|
751
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
752
|
+
name: {
|
|
753
|
+
type: StringConstructor;
|
|
754
|
+
required: true;
|
|
755
|
+
};
|
|
756
|
+
tag: {
|
|
757
|
+
type: StringConstructor;
|
|
758
|
+
default: undefined;
|
|
759
|
+
};
|
|
760
|
+
}>> & Readonly<{
|
|
761
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
762
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
763
|
+
}>, {
|
|
764
|
+
tag: string;
|
|
765
|
+
}, import('vue').SlotsType<{
|
|
766
|
+
default: {
|
|
767
|
+
errors?: {
|
|
768
|
+
readonly [x: string]: {
|
|
769
|
+
readonly _errors: readonly string[];
|
|
770
|
+
} | undefined;
|
|
771
|
+
readonly _errors: readonly string[];
|
|
772
|
+
} | undefined;
|
|
773
|
+
formData?: (undefined extends Type ? Partial<{
|
|
774
|
+
[x: string]: any;
|
|
775
|
+
}> : Type) | undefined;
|
|
776
|
+
formErrors?: {
|
|
777
|
+
readonly [x: string]: {
|
|
778
|
+
readonly _errors: readonly string[];
|
|
779
|
+
} | undefined;
|
|
780
|
+
readonly _errors: readonly string[];
|
|
781
|
+
} | undefined;
|
|
782
|
+
invalid: boolean;
|
|
783
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
784
|
+
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
785
|
+
[x: string]: any;
|
|
786
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
787
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
788
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<AnyZodObject, string>>;
|
|
789
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
790
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
791
|
+
};
|
|
792
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
493
793
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid" | "reset" | "submit" | "update:modelValue" | "update:readonly")[], "invalid" | "valid" | "reset" | "submit" | "update:modelValue" | "update:readonly", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
494
794
|
continuousValidation: {
|
|
495
795
|
type: BooleanConstructor;
|
|
@@ -508,7 +808,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
508
808
|
default: string;
|
|
509
809
|
};
|
|
510
810
|
template: {
|
|
511
|
-
type: import('vue').PropType<FormTemplate<
|
|
811
|
+
type: import('vue').PropType<FormTemplate<Schema_2, Type_2>>;
|
|
512
812
|
default: undefined;
|
|
513
813
|
};
|
|
514
814
|
}>> & Readonly<{
|
|
@@ -521,7 +821,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
521
821
|
}>, {
|
|
522
822
|
readonly: boolean;
|
|
523
823
|
tag: string;
|
|
524
|
-
template: FormTemplate<AnyZodObject>;
|
|
824
|
+
template: FormTemplate<AnyZodObject, Type>;
|
|
525
825
|
continuousValidation: boolean;
|
|
526
826
|
modelValue: Record<string, any>;
|
|
527
827
|
}, import('vue').SlotsType<{
|
|
@@ -537,22 +837,100 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
537
837
|
} | undefined;
|
|
538
838
|
readonly _errors: readonly string[];
|
|
539
839
|
} | undefined>>;
|
|
540
|
-
formData: import('vue').Ref<Partial<{
|
|
840
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<{
|
|
541
841
|
[x: string]: any;
|
|
542
|
-
} | undefined
|
|
842
|
+
}> : Type) | undefined, (undefined extends Type ? Partial<{
|
|
543
843
|
[x: string]: any;
|
|
544
|
-
} | undefined
|
|
844
|
+
}> : Type) | undefined>;
|
|
545
845
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
546
846
|
invalid: import('vue').ComputedRef<boolean>;
|
|
547
847
|
readonly: import('vue').Ref<boolean, boolean>;
|
|
548
848
|
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
549
849
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
550
850
|
submit: () => Promise<boolean>;
|
|
551
|
-
validate: (value?: Partial<{
|
|
851
|
+
validate: (value?: (undefined extends Type ? Partial<{
|
|
552
852
|
[x: string]: any;
|
|
553
|
-
} | undefined
|
|
853
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
554
854
|
clear: () => void;
|
|
555
855
|
reset: () => void;
|
|
856
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
857
|
+
name: {
|
|
858
|
+
type: StringConstructor;
|
|
859
|
+
required: true;
|
|
860
|
+
};
|
|
861
|
+
tag: {
|
|
862
|
+
type: StringConstructor;
|
|
863
|
+
default: undefined;
|
|
864
|
+
};
|
|
865
|
+
}>, {
|
|
866
|
+
clear: (() => void) | undefined;
|
|
867
|
+
errors: Readonly<import('vue').Ref<{
|
|
868
|
+
readonly [x: string]: {
|
|
869
|
+
readonly _errors: readonly string[];
|
|
870
|
+
} | undefined;
|
|
871
|
+
readonly _errors: readonly string[];
|
|
872
|
+
} | undefined, {
|
|
873
|
+
readonly [x: string]: {
|
|
874
|
+
readonly _errors: readonly string[];
|
|
875
|
+
} | undefined;
|
|
876
|
+
readonly _errors: readonly string[];
|
|
877
|
+
} | undefined>> | undefined;
|
|
878
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
879
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<AnyZodObject, string>>, Map<string, import('zod').inferFormattedError<AnyZodObject, string>>>;
|
|
880
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<{
|
|
881
|
+
[x: string]: any;
|
|
882
|
+
}> : Type) | undefined, (undefined extends Type ? Partial<{
|
|
883
|
+
[x: string]: any;
|
|
884
|
+
}> : Type) | undefined> | undefined;
|
|
885
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
886
|
+
reset: (() => void) | undefined;
|
|
887
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
888
|
+
validate: ((formData?: (undefined extends Type ? Partial<{
|
|
889
|
+
[x: string]: any;
|
|
890
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
891
|
+
validateWrapper: () => Promise<boolean>;
|
|
892
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
893
|
+
name: {
|
|
894
|
+
type: StringConstructor;
|
|
895
|
+
required: true;
|
|
896
|
+
};
|
|
897
|
+
tag: {
|
|
898
|
+
type: StringConstructor;
|
|
899
|
+
default: undefined;
|
|
900
|
+
};
|
|
901
|
+
}>> & Readonly<{
|
|
902
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
903
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
904
|
+
}>, {
|
|
905
|
+
tag: string;
|
|
906
|
+
}, import('vue').SlotsType<{
|
|
907
|
+
default: {
|
|
908
|
+
errors?: {
|
|
909
|
+
readonly [x: string]: {
|
|
910
|
+
readonly _errors: readonly string[];
|
|
911
|
+
} | undefined;
|
|
912
|
+
readonly _errors: readonly string[];
|
|
913
|
+
} | undefined;
|
|
914
|
+
formData?: (undefined extends Type ? Partial<{
|
|
915
|
+
[x: string]: any;
|
|
916
|
+
}> : Type) | undefined;
|
|
917
|
+
formErrors?: {
|
|
918
|
+
readonly [x: string]: {
|
|
919
|
+
readonly _errors: readonly string[];
|
|
920
|
+
} | undefined;
|
|
921
|
+
readonly _errors: readonly string[];
|
|
922
|
+
} | undefined;
|
|
923
|
+
invalid: boolean;
|
|
924
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
925
|
+
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
926
|
+
[x: string]: any;
|
|
927
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
928
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
929
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<AnyZodObject, string>>;
|
|
930
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
931
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
932
|
+
};
|
|
933
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
556
934
|
};
|
|
557
935
|
}>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
558
936
|
VvFormField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -566,15 +944,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
566
944
|
default: undefined;
|
|
567
945
|
};
|
|
568
946
|
name: {
|
|
569
|
-
type: import('vue').PropType<
|
|
947
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
570
948
|
required: true;
|
|
571
949
|
};
|
|
572
950
|
props: {
|
|
573
|
-
type: import('vue').PropType<Partial<
|
|
574
|
-
[x: string]: any;
|
|
575
|
-
} | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<{
|
|
576
|
-
[x: string]: any;
|
|
577
|
-
}> | undefined) | undefined>>;
|
|
951
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
578
952
|
default: () => {};
|
|
579
953
|
};
|
|
580
954
|
showValid: {
|
|
@@ -622,15 +996,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
622
996
|
default: undefined;
|
|
623
997
|
};
|
|
624
998
|
name: {
|
|
625
|
-
type: import('vue').PropType<
|
|
999
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
626
1000
|
required: true;
|
|
627
1001
|
};
|
|
628
1002
|
props: {
|
|
629
|
-
type: import('vue').PropType<Partial<
|
|
630
|
-
[x: string]: any;
|
|
631
|
-
} | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<{
|
|
632
|
-
[x: string]: any;
|
|
633
|
-
}> | undefined) | undefined>>;
|
|
1003
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
634
1004
|
default: () => {};
|
|
635
1005
|
};
|
|
636
1006
|
showValid: {
|
|
@@ -670,9 +1040,9 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
670
1040
|
[key: string]: any;
|
|
671
1041
|
default: {
|
|
672
1042
|
errors: import('zod').inferFormattedError<AnyZodObject, string>;
|
|
673
|
-
formData?: Partial<{
|
|
1043
|
+
formData?: (undefined extends Type ? Partial<{
|
|
674
1044
|
[x: string]: any;
|
|
675
|
-
}> | undefined;
|
|
1045
|
+
}> : Type) | undefined;
|
|
676
1046
|
formErrors?: {
|
|
677
1047
|
readonly [x: string]: {
|
|
678
1048
|
readonly _errors: readonly string[];
|
|
@@ -684,10 +1054,10 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
684
1054
|
modelValue: any;
|
|
685
1055
|
onUpdate: (value: unknown) => void;
|
|
686
1056
|
readonly: boolean;
|
|
687
|
-
submit?: InjectedFormData<
|
|
688
|
-
validate?: ((formData?: Partial<{
|
|
1057
|
+
submit?: InjectedFormData<Schema_3, Type_3>["submit"];
|
|
1058
|
+
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
689
1059
|
[x: string]: any;
|
|
690
|
-
}> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1060
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
691
1061
|
};
|
|
692
1062
|
}>, {}, {}, "invalid" | "type" | "errors" | "component" | "hasProps" | "invalidLabel" | "is", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
693
1063
|
VvFormFieldsGroup: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -696,15 +1066,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
696
1066
|
default: undefined;
|
|
697
1067
|
};
|
|
698
1068
|
names: {
|
|
699
|
-
type: import('vue').PropType<
|
|
1069
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_4>>[] | Record<string, Path<import('zod').TypeOf<Schema_4>>>>;
|
|
700
1070
|
required: true;
|
|
701
1071
|
};
|
|
702
1072
|
props: {
|
|
703
|
-
type: import('vue').PropType<Partial<
|
|
704
|
-
[x: string]: any;
|
|
705
|
-
} | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<{
|
|
706
|
-
[x: string]: any;
|
|
707
|
-
}> | undefined) | undefined>>;
|
|
1073
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
708
1074
|
default: () => {};
|
|
709
1075
|
};
|
|
710
1076
|
showValid: {
|
|
@@ -712,7 +1078,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
712
1078
|
default: boolean;
|
|
713
1079
|
};
|
|
714
1080
|
defaultValues: {
|
|
715
|
-
type: import('vue').PropType<Record<
|
|
1081
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
716
1082
|
default: undefined;
|
|
717
1083
|
};
|
|
718
1084
|
readonly: {
|
|
@@ -741,15 +1107,11 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
741
1107
|
default: undefined;
|
|
742
1108
|
};
|
|
743
1109
|
names: {
|
|
744
|
-
type: import('vue').PropType<
|
|
1110
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_4>>[] | Record<string, Path<import('zod').TypeOf<Schema_4>>>>;
|
|
745
1111
|
required: true;
|
|
746
1112
|
};
|
|
747
1113
|
props: {
|
|
748
|
-
type: import('vue').PropType<Partial<
|
|
749
|
-
[x: string]: any;
|
|
750
|
-
} | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<{
|
|
751
|
-
[x: string]: any;
|
|
752
|
-
}> | undefined) | undefined>>;
|
|
1114
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
753
1115
|
default: () => {};
|
|
754
1116
|
};
|
|
755
1117
|
showValid: {
|
|
@@ -757,7 +1119,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
757
1119
|
default: boolean;
|
|
758
1120
|
};
|
|
759
1121
|
defaultValues: {
|
|
760
|
-
type: import('vue').PropType<Record<
|
|
1122
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
761
1123
|
default: undefined;
|
|
762
1124
|
};
|
|
763
1125
|
readonly: {
|
|
@@ -783,9 +1145,9 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
783
1145
|
[key: string]: any;
|
|
784
1146
|
default: {
|
|
785
1147
|
errors?: Record<string, import('zod').inferFormattedError<AnyZodObject, string>> | undefined;
|
|
786
|
-
formData?: Partial<{
|
|
1148
|
+
formData?: (undefined extends Type ? Partial<{
|
|
787
1149
|
[x: string]: any;
|
|
788
|
-
}> | undefined;
|
|
1150
|
+
}> : Type) | undefined;
|
|
789
1151
|
formErrors?: {
|
|
790
1152
|
readonly [x: string]: {
|
|
791
1153
|
readonly _errors: readonly string[];
|
|
@@ -799,15 +1161,15 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
799
1161
|
onUpdate: (value: Record<string, any>) => void;
|
|
800
1162
|
onUpdateField: (name: string, value: any) => void;
|
|
801
1163
|
readonly: boolean;
|
|
802
|
-
submit?: InjectedFormData<
|
|
803
|
-
validate?: ((formData?: Partial<{
|
|
1164
|
+
submit?: InjectedFormData<Schema_4, Type_4>["submit"];
|
|
1165
|
+
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
804
1166
|
[x: string]: any;
|
|
805
|
-
}> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1167
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
806
1168
|
};
|
|
807
1169
|
}>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
808
1170
|
VvFormTemplate: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
809
1171
|
schema: {
|
|
810
|
-
type: import('vue').PropType<FormTemplate<
|
|
1172
|
+
type: import('vue').PropType<FormTemplate<Schema_5, Type_5>>;
|
|
811
1173
|
required: true;
|
|
812
1174
|
};
|
|
813
1175
|
scope: {
|
|
@@ -820,7 +1182,7 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
820
1182
|
[key: string]: any;
|
|
821
1183
|
}>[] | undefined)[]) | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
822
1184
|
schema: {
|
|
823
|
-
type: import('vue').PropType<FormTemplate<
|
|
1185
|
+
type: import('vue').PropType<FormTemplate<Schema_5, Type_5>>;
|
|
824
1186
|
required: true;
|
|
825
1187
|
};
|
|
826
1188
|
scope: {
|
|
@@ -837,17 +1199,17 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
837
1199
|
} | undefined;
|
|
838
1200
|
readonly _errors: readonly string[];
|
|
839
1201
|
} | undefined;
|
|
840
|
-
formData?: Partial<{
|
|
1202
|
+
formData?: (undefined extends Type ? Partial<{
|
|
841
1203
|
[x: string]: any;
|
|
842
|
-
}> | undefined;
|
|
1204
|
+
}> : Type) | undefined;
|
|
843
1205
|
invalid: boolean;
|
|
844
1206
|
status?: import('./enums').FormStatus;
|
|
845
|
-
submit?: InjectedFormData<
|
|
846
|
-
validate?: ((formData?: Partial<{
|
|
1207
|
+
submit?: InjectedFormData<Schema_5, Type_5>["submit"];
|
|
1208
|
+
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
847
1209
|
[x: string]: any;
|
|
848
|
-
}> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
849
|
-
clear?: InjectedFormData<
|
|
850
|
-
reset?: InjectedFormData<
|
|
1210
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1211
|
+
clear?: InjectedFormData<Schema_5, Type_5>["clear"];
|
|
1212
|
+
reset?: InjectedFormData<Schema_5, Type_5>["reset"];
|
|
851
1213
|
};
|
|
852
1214
|
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
853
1215
|
VvFormWrapper: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -872,19 +1234,19 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
872
1234
|
} | undefined;
|
|
873
1235
|
readonly _errors: readonly string[];
|
|
874
1236
|
} | undefined>> | undefined;
|
|
875
|
-
fields: import('vue').Ref<
|
|
1237
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
876
1238
|
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<AnyZodObject, string>>, Map<string, import('zod').inferFormattedError<AnyZodObject, string>>>;
|
|
877
|
-
formData: import('vue').Ref<Partial<{
|
|
1239
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<{
|
|
878
1240
|
[x: string]: any;
|
|
879
|
-
}> | undefined, Partial<{
|
|
1241
|
+
}> : Type) | undefined, (undefined extends Type ? Partial<{
|
|
880
1242
|
[x: string]: any;
|
|
881
|
-
}> | undefined> | undefined;
|
|
1243
|
+
}> : Type) | undefined> | undefined;
|
|
882
1244
|
invalid: import('vue').ComputedRef<boolean>;
|
|
883
1245
|
reset: (() => void) | undefined;
|
|
884
1246
|
submit: (() => Promise<boolean>) | undefined;
|
|
885
|
-
validate: ((formData?: Partial<{
|
|
1247
|
+
validate: ((formData?: (undefined extends Type ? Partial<{
|
|
886
1248
|
[x: string]: any;
|
|
887
|
-
}> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1249
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
888
1250
|
validateWrapper: () => Promise<boolean>;
|
|
889
1251
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
890
1252
|
name: {
|
|
@@ -908,9 +1270,9 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
908
1270
|
} | undefined;
|
|
909
1271
|
readonly _errors: readonly string[];
|
|
910
1272
|
} | undefined;
|
|
911
|
-
formData?: Partial<{
|
|
1273
|
+
formData?: (undefined extends Type ? Partial<{
|
|
912
1274
|
[x: string]: any;
|
|
913
|
-
}> | undefined;
|
|
1275
|
+
}> : Type) | undefined;
|
|
914
1276
|
formErrors?: {
|
|
915
1277
|
readonly [x: string]: {
|
|
916
1278
|
readonly _errors: readonly string[];
|
|
@@ -918,14 +1280,14 @@ export declare function useForm<Schema extends FormSchema>(schema: Schema, optio
|
|
|
918
1280
|
readonly _errors: readonly string[];
|
|
919
1281
|
} | undefined;
|
|
920
1282
|
invalid: boolean;
|
|
921
|
-
submit?: InjectedFormData<
|
|
922
|
-
validate?: ((formData?: Partial<{
|
|
1283
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
1284
|
+
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
923
1285
|
[x: string]: any;
|
|
924
|
-
}> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1286
|
+
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
925
1287
|
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
926
1288
|
fieldsErrors: Map<string, import('zod').inferFormattedError<AnyZodObject, string>>;
|
|
927
|
-
clear?: InjectedFormData<
|
|
928
|
-
reset?: InjectedFormData<
|
|
1289
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
1290
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
929
1291
|
};
|
|
930
1292
|
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
931
1293
|
};
|
|
@@ -940,12 +1302,12 @@ export type { FormComponent, FormComposableOptions, FormFieldComponent, FormFiel
|
|
|
940
1302
|
/**
|
|
941
1303
|
* @deprecated Use `useForm()` instead
|
|
942
1304
|
*/
|
|
943
|
-
export declare function
|
|
1305
|
+
export declare function formType<Schema extends FormSchema, Type>(schema: Schema, options?: FormComposableOptions<Schema, Type>): {
|
|
944
1306
|
clear: () => void;
|
|
945
1307
|
errors: import('vue').Ref<import('zod').inferFormattedError<Schema, string> | undefined, import('zod').inferFormattedError<Schema, string> | undefined>;
|
|
946
|
-
formData: import('vue').Ref<Partial<import('zod').TypeOf<Schema
|
|
1308
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined>;
|
|
947
1309
|
formFieldInjectionKey: InjectionKey<InjectedFormFieldData<Schema>>;
|
|
948
|
-
formInjectionKey: InjectionKey<InjectedFormData<Schema>>;
|
|
1310
|
+
formInjectionKey: InjectionKey<InjectedFormData<Schema, Type>>;
|
|
949
1311
|
formWrapperInjectionKey: InjectionKey<InjectedFormWrapperData<Schema>>;
|
|
950
1312
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
951
1313
|
invalid: import('vue').ComputedRef<boolean>;
|
|
@@ -954,7 +1316,55 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
954
1316
|
status: import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>;
|
|
955
1317
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
956
1318
|
submit: () => Promise<boolean>;
|
|
957
|
-
validate: (value?: Partial<import('zod').TypeOf<Schema
|
|
1319
|
+
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
1320
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
1321
|
+
name: {
|
|
1322
|
+
type: StringConstructor;
|
|
1323
|
+
required: true;
|
|
1324
|
+
};
|
|
1325
|
+
tag: {
|
|
1326
|
+
type: StringConstructor;
|
|
1327
|
+
default: undefined;
|
|
1328
|
+
};
|
|
1329
|
+
}>, {
|
|
1330
|
+
clear: (() => void) | undefined;
|
|
1331
|
+
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
1332
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
1333
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
1334
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
|
|
1335
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
1336
|
+
reset: (() => void) | undefined;
|
|
1337
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
1338
|
+
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1339
|
+
validateWrapper: () => Promise<boolean>;
|
|
1340
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
1341
|
+
name: {
|
|
1342
|
+
type: StringConstructor;
|
|
1343
|
+
required: true;
|
|
1344
|
+
};
|
|
1345
|
+
tag: {
|
|
1346
|
+
type: StringConstructor;
|
|
1347
|
+
default: undefined;
|
|
1348
|
+
};
|
|
1349
|
+
}>> & Readonly<{
|
|
1350
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
1351
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
1352
|
+
}>, {
|
|
1353
|
+
tag: string;
|
|
1354
|
+
}, import('vue').SlotsType<{
|
|
1355
|
+
default: {
|
|
1356
|
+
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1357
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1358
|
+
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1359
|
+
invalid: boolean;
|
|
1360
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
1361
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1362
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
1363
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
1364
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
1365
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
1366
|
+
};
|
|
1367
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
958
1368
|
VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
959
1369
|
continuousValidation: {
|
|
960
1370
|
type: BooleanConstructor;
|
|
@@ -973,13 +1383,13 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
973
1383
|
default: string;
|
|
974
1384
|
};
|
|
975
1385
|
template: {
|
|
976
|
-
type: import('vue').PropType<FormTemplate<
|
|
1386
|
+
type: import('vue').PropType<FormTemplate<Schema_2, Type_2>>;
|
|
977
1387
|
default: undefined;
|
|
978
1388
|
};
|
|
979
1389
|
}>, {
|
|
980
1390
|
clear: () => void;
|
|
981
1391
|
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>>;
|
|
982
|
-
formData: import('vue').Ref<Partial<import('zod').TypeOf<Schema
|
|
1392
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined>;
|
|
983
1393
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
984
1394
|
invalid: import('vue').ComputedRef<boolean>;
|
|
985
1395
|
isReadonly: import('vue').Ref<boolean, boolean>;
|
|
@@ -987,7 +1397,55 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
987
1397
|
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
988
1398
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
989
1399
|
submit: () => Promise<boolean>;
|
|
990
|
-
validate: (value?: Partial<import('zod').TypeOf<Schema
|
|
1400
|
+
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
1401
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
1402
|
+
name: {
|
|
1403
|
+
type: StringConstructor;
|
|
1404
|
+
required: true;
|
|
1405
|
+
};
|
|
1406
|
+
tag: {
|
|
1407
|
+
type: StringConstructor;
|
|
1408
|
+
default: undefined;
|
|
1409
|
+
};
|
|
1410
|
+
}>, {
|
|
1411
|
+
clear: (() => void) | undefined;
|
|
1412
|
+
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
1413
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
1414
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
1415
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
|
|
1416
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
1417
|
+
reset: (() => void) | undefined;
|
|
1418
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
1419
|
+
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1420
|
+
validateWrapper: () => Promise<boolean>;
|
|
1421
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
1422
|
+
name: {
|
|
1423
|
+
type: StringConstructor;
|
|
1424
|
+
required: true;
|
|
1425
|
+
};
|
|
1426
|
+
tag: {
|
|
1427
|
+
type: StringConstructor;
|
|
1428
|
+
default: undefined;
|
|
1429
|
+
};
|
|
1430
|
+
}>> & Readonly<{
|
|
1431
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
1432
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
1433
|
+
}>, {
|
|
1434
|
+
tag: string;
|
|
1435
|
+
}, import('vue').SlotsType<{
|
|
1436
|
+
default: {
|
|
1437
|
+
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1438
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1439
|
+
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1440
|
+
invalid: boolean;
|
|
1441
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
1442
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1443
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
1444
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
1445
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
1446
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
1447
|
+
};
|
|
1448
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
991
1449
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid" | "reset" | "submit" | "update:modelValue" | "update:readonly")[], "invalid" | "valid" | "reset" | "submit" | "update:modelValue" | "update:readonly", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
992
1450
|
continuousValidation: {
|
|
993
1451
|
type: BooleanConstructor;
|
|
@@ -1006,7 +1464,7 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1006
1464
|
default: string;
|
|
1007
1465
|
};
|
|
1008
1466
|
template: {
|
|
1009
|
-
type: import('vue').PropType<FormTemplate<
|
|
1467
|
+
type: import('vue').PropType<FormTemplate<Schema_2, Type_2>>;
|
|
1010
1468
|
default: undefined;
|
|
1011
1469
|
};
|
|
1012
1470
|
}>> & Readonly<{
|
|
@@ -1019,22 +1477,70 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1019
1477
|
}>, {
|
|
1020
1478
|
readonly: boolean;
|
|
1021
1479
|
tag: string;
|
|
1022
|
-
template: FormTemplate<Schema>;
|
|
1480
|
+
template: FormTemplate<Schema, Type>;
|
|
1023
1481
|
continuousValidation: boolean;
|
|
1024
1482
|
modelValue: Record<string, any>;
|
|
1025
1483
|
}, import('vue').SlotsType<{
|
|
1026
1484
|
default: {
|
|
1027
1485
|
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>>;
|
|
1028
|
-
formData: import('vue').Ref<Partial<import('zod').TypeOf<Schema
|
|
1486
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined>;
|
|
1029
1487
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
1030
1488
|
invalid: import('vue').ComputedRef<boolean>;
|
|
1031
1489
|
readonly: import('vue').Ref<boolean, boolean>;
|
|
1032
1490
|
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
1033
1491
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
1034
1492
|
submit: () => Promise<boolean>;
|
|
1035
|
-
validate: (value?: Partial<import('zod').TypeOf<Schema
|
|
1493
|
+
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
1036
1494
|
clear: () => void;
|
|
1037
1495
|
reset: () => void;
|
|
1496
|
+
wrappers: Map<string, import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
1497
|
+
name: {
|
|
1498
|
+
type: StringConstructor;
|
|
1499
|
+
required: true;
|
|
1500
|
+
};
|
|
1501
|
+
tag: {
|
|
1502
|
+
type: StringConstructor;
|
|
1503
|
+
default: undefined;
|
|
1504
|
+
};
|
|
1505
|
+
}>, {
|
|
1506
|
+
clear: (() => void) | undefined;
|
|
1507
|
+
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
1508
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
1509
|
+
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
1510
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
|
|
1511
|
+
invalid: import('vue').ComputedRef<boolean>;
|
|
1512
|
+
reset: (() => void) | undefined;
|
|
1513
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
1514
|
+
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1515
|
+
validateWrapper: () => Promise<boolean>;
|
|
1516
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
1517
|
+
name: {
|
|
1518
|
+
type: StringConstructor;
|
|
1519
|
+
required: true;
|
|
1520
|
+
};
|
|
1521
|
+
tag: {
|
|
1522
|
+
type: StringConstructor;
|
|
1523
|
+
default: undefined;
|
|
1524
|
+
};
|
|
1525
|
+
}>> & Readonly<{
|
|
1526
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
1527
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
1528
|
+
}>, {
|
|
1529
|
+
tag: string;
|
|
1530
|
+
}, import('vue').SlotsType<{
|
|
1531
|
+
default: {
|
|
1532
|
+
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1533
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1534
|
+
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1535
|
+
invalid: boolean;
|
|
1536
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
1537
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1538
|
+
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
1539
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
1540
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
1541
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
1542
|
+
};
|
|
1543
|
+
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>>;
|
|
1038
1544
|
};
|
|
1039
1545
|
}>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1040
1546
|
VvFormField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -1048,11 +1554,11 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1048
1554
|
default: undefined;
|
|
1049
1555
|
};
|
|
1050
1556
|
name: {
|
|
1051
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1557
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
1052
1558
|
required: true;
|
|
1053
1559
|
};
|
|
1054
1560
|
props: {
|
|
1055
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1561
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1056
1562
|
default: () => {};
|
|
1057
1563
|
};
|
|
1058
1564
|
showValid: {
|
|
@@ -1080,10 +1586,10 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1080
1586
|
} | import('vue').ConcreteComponent>;
|
|
1081
1587
|
hasProps: import('vue').ComputedRef<{
|
|
1082
1588
|
name: {} | ([{
|
|
1083
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1589
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
1084
1590
|
required: true;
|
|
1085
1591
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
1086
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1592
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
1087
1593
|
required: true;
|
|
1088
1594
|
});
|
|
1089
1595
|
invalid: boolean;
|
|
@@ -1106,11 +1612,11 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1106
1612
|
default: undefined;
|
|
1107
1613
|
};
|
|
1108
1614
|
name: {
|
|
1109
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1615
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>>;
|
|
1110
1616
|
required: true;
|
|
1111
1617
|
};
|
|
1112
1618
|
props: {
|
|
1113
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1619
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1114
1620
|
default: () => {};
|
|
1115
1621
|
};
|
|
1116
1622
|
showValid: {
|
|
@@ -1138,10 +1644,10 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1138
1644
|
type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
|
|
1139
1645
|
readonly: boolean;
|
|
1140
1646
|
props: [{
|
|
1141
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1647
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1142
1648
|
default: () => {};
|
|
1143
1649
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
1144
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1650
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1145
1651
|
default: () => {};
|
|
1146
1652
|
};
|
|
1147
1653
|
is: string | import('vue').Component;
|
|
@@ -1152,15 +1658,15 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1152
1658
|
[key: string]: any;
|
|
1153
1659
|
default: {
|
|
1154
1660
|
errors: import('zod').inferFormattedError<Schema, string>;
|
|
1155
|
-
formData?: Partial<import('zod').TypeOf<Schema>> | undefined;
|
|
1661
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1156
1662
|
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1157
1663
|
invalid: boolean;
|
|
1158
1664
|
invalidLabel?: string[];
|
|
1159
1665
|
modelValue: any;
|
|
1160
1666
|
onUpdate: (value: unknown) => void;
|
|
1161
1667
|
readonly: boolean;
|
|
1162
|
-
submit?: InjectedFormData<
|
|
1163
|
-
validate?: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1668
|
+
submit?: InjectedFormData<Schema_3, Type_3>["submit"];
|
|
1669
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1164
1670
|
};
|
|
1165
1671
|
}>, {}, {}, "invalid" | "type" | "errors" | "component" | "hasProps" | "invalidLabel" | "is", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1166
1672
|
VvFormFieldsGroup: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -1169,11 +1675,11 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1169
1675
|
default: undefined;
|
|
1170
1676
|
};
|
|
1171
1677
|
names: {
|
|
1172
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1678
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_4>>[] | Record<string, Path<import('zod').TypeOf<Schema_4>>>>;
|
|
1173
1679
|
required: true;
|
|
1174
1680
|
};
|
|
1175
1681
|
props: {
|
|
1176
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1682
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
1177
1683
|
default: () => {};
|
|
1178
1684
|
};
|
|
1179
1685
|
showValid: {
|
|
@@ -1181,7 +1687,7 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1181
1687
|
default: boolean;
|
|
1182
1688
|
};
|
|
1183
1689
|
defaultValues: {
|
|
1184
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
1690
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
1185
1691
|
default: undefined;
|
|
1186
1692
|
};
|
|
1187
1693
|
readonly: {
|
|
@@ -1210,11 +1716,11 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1210
1716
|
default: undefined;
|
|
1211
1717
|
};
|
|
1212
1718
|
names: {
|
|
1213
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1719
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_4>>[] | Record<string, Path<import('zod').TypeOf<Schema_4>>>>;
|
|
1214
1720
|
required: true;
|
|
1215
1721
|
};
|
|
1216
1722
|
props: {
|
|
1217
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1723
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
1218
1724
|
default: () => {};
|
|
1219
1725
|
};
|
|
1220
1726
|
showValid: {
|
|
@@ -1222,7 +1728,7 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1222
1728
|
default: boolean;
|
|
1223
1729
|
};
|
|
1224
1730
|
defaultValues: {
|
|
1225
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
1731
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
1226
1732
|
default: undefined;
|
|
1227
1733
|
};
|
|
1228
1734
|
readonly: {
|
|
@@ -1237,26 +1743,26 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1237
1743
|
}>, {
|
|
1238
1744
|
readonly: boolean;
|
|
1239
1745
|
props: [{
|
|
1240
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1746
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
1241
1747
|
default: () => {};
|
|
1242
1748
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
1243
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1749
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_4> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_4>> | undefined)>>;
|
|
1244
1750
|
default: () => {};
|
|
1245
1751
|
};
|
|
1246
1752
|
is: string | import('vue').Component;
|
|
1247
1753
|
showValid: boolean;
|
|
1248
1754
|
defaultValues: [{
|
|
1249
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
1755
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
1250
1756
|
default: undefined;
|
|
1251
1757
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
1252
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
1758
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_4>>, any>>;
|
|
1253
1759
|
default: undefined;
|
|
1254
1760
|
};
|
|
1255
1761
|
}, import('vue').SlotsType<{
|
|
1256
1762
|
[key: string]: any;
|
|
1257
1763
|
default: {
|
|
1258
1764
|
errors?: Record<Path<import('zod').TypeOf<Schema>>, import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1259
|
-
formData?: Partial<import('zod').TypeOf<Schema>> | undefined;
|
|
1765
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1260
1766
|
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1261
1767
|
invalid: boolean;
|
|
1262
1768
|
invalids: Record<string, boolean>;
|
|
@@ -1265,13 +1771,13 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1265
1771
|
onUpdate: (value: Record<string, any>) => void;
|
|
1266
1772
|
onUpdateField: (name: string, value: any) => void;
|
|
1267
1773
|
readonly: boolean;
|
|
1268
|
-
submit?: InjectedFormData<
|
|
1269
|
-
validate?: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1774
|
+
submit?: InjectedFormData<Schema_4, Type_4>["submit"];
|
|
1775
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1270
1776
|
};
|
|
1271
1777
|
}>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1272
1778
|
VvFormTemplate: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
1273
1779
|
schema: {
|
|
1274
|
-
type: import('vue').PropType<FormTemplate<
|
|
1780
|
+
type: import('vue').PropType<FormTemplate<Schema_5, Type_5>>;
|
|
1275
1781
|
required: true;
|
|
1276
1782
|
};
|
|
1277
1783
|
scope: {
|
|
@@ -1284,7 +1790,7 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1284
1790
|
[key: string]: any;
|
|
1285
1791
|
}>[] | undefined)[]) | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
1286
1792
|
schema: {
|
|
1287
|
-
type: import('vue').PropType<FormTemplate<
|
|
1793
|
+
type: import('vue').PropType<FormTemplate<Schema_5, Type_5>>;
|
|
1288
1794
|
required: true;
|
|
1289
1795
|
};
|
|
1290
1796
|
scope: {
|
|
@@ -1296,13 +1802,13 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1296
1802
|
}, import('vue').SlotsType<{
|
|
1297
1803
|
default: {
|
|
1298
1804
|
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1299
|
-
formData?: Partial<import('zod').TypeOf<Schema>> | undefined;
|
|
1805
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1300
1806
|
invalid: boolean;
|
|
1301
1807
|
status?: import('./enums').FormStatus;
|
|
1302
|
-
submit?: InjectedFormData<
|
|
1303
|
-
validate?: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1304
|
-
clear?: InjectedFormData<
|
|
1305
|
-
reset?: InjectedFormData<
|
|
1808
|
+
submit?: InjectedFormData<Schema_5, Type_5>["submit"];
|
|
1809
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1810
|
+
clear?: InjectedFormData<Schema_5, Type_5>["clear"];
|
|
1811
|
+
reset?: InjectedFormData<Schema_5, Type_5>["reset"];
|
|
1306
1812
|
};
|
|
1307
1813
|
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1308
1814
|
VvFormWrapper: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -1317,13 +1823,13 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1317
1823
|
}>, {
|
|
1318
1824
|
clear: (() => void) | undefined;
|
|
1319
1825
|
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
1320
|
-
fields: import('vue').Ref<
|
|
1826
|
+
fields: import('vue').Ref<Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>, Map<string, string> | (Map<string, string> & Omit<Map<string, string>, keyof Map<any, any>>)>;
|
|
1321
1827
|
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
1322
|
-
formData: import('vue').Ref<Partial<import('zod').TypeOf<Schema>> | undefined, Partial<import('zod').TypeOf<Schema>> | undefined> | undefined;
|
|
1828
|
+
formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
|
|
1323
1829
|
invalid: import('vue').ComputedRef<boolean>;
|
|
1324
1830
|
reset: (() => void) | undefined;
|
|
1325
1831
|
submit: (() => Promise<boolean>) | undefined;
|
|
1326
|
-
validate: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1832
|
+
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1327
1833
|
validateWrapper: () => Promise<boolean>;
|
|
1328
1834
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
1329
1835
|
name: {
|
|
@@ -1342,15 +1848,15 @@ export declare function formFactory<Schema extends FormSchema>(schema: Schema, o
|
|
|
1342
1848
|
}, import('vue').SlotsType<{
|
|
1343
1849
|
default: {
|
|
1344
1850
|
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1345
|
-
formData?: Partial<import('zod').TypeOf<Schema>> | undefined;
|
|
1851
|
+
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1346
1852
|
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1347
1853
|
invalid: boolean;
|
|
1348
|
-
submit?: InjectedFormData<
|
|
1349
|
-
validate?: ((formData?: Partial<import('zod').TypeOf<Schema>> | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1854
|
+
submit?: InjectedFormData<Schema_1, Type_1>["submit"];
|
|
1855
|
+
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1350
1856
|
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
1351
1857
|
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
1352
|
-
clear?: InjectedFormData<
|
|
1353
|
-
reset?: InjectedFormData<
|
|
1858
|
+
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
1859
|
+
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
1354
1860
|
};
|
|
1355
1861
|
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1356
1862
|
};
|