@volverjs/form-vue 1.0.0-beta.26 → 1.0.0-beta.28
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/README.md +25 -5
- package/dist/VvForm.d.ts +13 -13
- package/dist/VvFormField.d.ts +1 -1
- package/dist/VvFormWrapper.d.ts +4 -4
- package/dist/index.d.ts +123 -643
- package/dist/index.es.js +414 -414
- package/dist/index.umd.js +1 -1
- package/dist/types.d.ts +4 -3
- package/package.json +1 -1
- package/src/VvForm.ts +17 -15
- package/src/VvFormField.ts +2 -2
- package/src/VvFormWrapper.ts +27 -28
- package/src/index.ts +5 -5
- package/src/types.ts +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -22,54 +22,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
22
22
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
23
23
|
submit: () => Promise<boolean>;
|
|
24
24
|
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
25
|
-
wrappers: Map<string,
|
|
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
|
+
wrappers: Map<string, InjectedFormWrapperData<Schema>>;
|
|
73
26
|
VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
74
27
|
continuousValidation: {
|
|
75
28
|
type: BooleanConstructor;
|
|
@@ -88,7 +41,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
88
41
|
default: string;
|
|
89
42
|
};
|
|
90
43
|
template: {
|
|
91
|
-
type: import('vue').PropType<FormTemplate<
|
|
44
|
+
type: import('vue').PropType<FormTemplate<Schema_1, Type_1>>;
|
|
92
45
|
default: undefined;
|
|
93
46
|
};
|
|
94
47
|
}>, {
|
|
@@ -103,54 +56,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
103
56
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
104
57
|
submit: () => Promise<boolean>;
|
|
105
58
|
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
106
|
-
wrappers: Map<string,
|
|
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>>;
|
|
59
|
+
wrappers: Map<string, InjectedFormWrapperData<Schema>>;
|
|
154
60
|
}, {}, {}, {}, 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<{
|
|
155
61
|
continuousValidation: {
|
|
156
62
|
type: BooleanConstructor;
|
|
@@ -169,7 +75,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
169
75
|
default: string;
|
|
170
76
|
};
|
|
171
77
|
template: {
|
|
172
|
-
type: import('vue').PropType<FormTemplate<
|
|
78
|
+
type: import('vue').PropType<FormTemplate<Schema_1, Type_1>>;
|
|
173
79
|
default: undefined;
|
|
174
80
|
};
|
|
175
81
|
}>> & Readonly<{
|
|
@@ -187,65 +93,18 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
187
93
|
modelValue: Record<string, any>;
|
|
188
94
|
}, import('vue').SlotsType<{
|
|
189
95
|
default: {
|
|
190
|
-
errors:
|
|
191
|
-
formData:
|
|
96
|
+
errors: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
97
|
+
formData: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
98
|
+
invalid: import('vue').UnwrapRef<import('vue').ComputedRef<boolean>>;
|
|
99
|
+
readonly: import('vue').UnwrapRef<import('vue').Ref<boolean, boolean>>;
|
|
100
|
+
status: import('vue').UnwrapRef<Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>>;
|
|
101
|
+
wrappers: Map<string, InjectedFormWrapperData<Schema>>;
|
|
102
|
+
clear: () => void;
|
|
192
103
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
193
|
-
|
|
194
|
-
readonly: import('vue').Ref<boolean, boolean>;
|
|
195
|
-
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
104
|
+
reset: () => void;
|
|
196
105
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
197
106
|
submit: () => Promise<boolean>;
|
|
198
107
|
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
199
|
-
clear: () => void;
|
|
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>>;
|
|
249
108
|
};
|
|
250
109
|
}>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
251
110
|
VvFormField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -259,11 +118,11 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
259
118
|
default: undefined;
|
|
260
119
|
};
|
|
261
120
|
name: {
|
|
262
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
121
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
263
122
|
required: true;
|
|
264
123
|
};
|
|
265
124
|
props: {
|
|
266
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
125
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
267
126
|
default: () => {};
|
|
268
127
|
};
|
|
269
128
|
showValid: {
|
|
@@ -291,10 +150,10 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
291
150
|
} | import('vue').ConcreteComponent>;
|
|
292
151
|
hasProps: import('vue').ComputedRef<{
|
|
293
152
|
name: {} | ([{
|
|
294
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
153
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
295
154
|
required: true;
|
|
296
155
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
297
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
156
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
298
157
|
required: true;
|
|
299
158
|
});
|
|
300
159
|
invalid: boolean;
|
|
@@ -317,11 +176,11 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
317
176
|
default: undefined;
|
|
318
177
|
};
|
|
319
178
|
name: {
|
|
320
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
179
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
321
180
|
required: true;
|
|
322
181
|
};
|
|
323
182
|
props: {
|
|
324
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
183
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
325
184
|
default: () => {};
|
|
326
185
|
};
|
|
327
186
|
showValid: {
|
|
@@ -349,10 +208,10 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
349
208
|
type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
|
|
350
209
|
readonly: boolean;
|
|
351
210
|
props: [{
|
|
352
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
211
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
353
212
|
default: () => {};
|
|
354
213
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
355
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
214
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
356
215
|
default: () => {};
|
|
357
216
|
};
|
|
358
217
|
is: string | import('vue').Component;
|
|
@@ -368,9 +227,9 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
368
227
|
invalid: boolean;
|
|
369
228
|
invalidLabel?: string[];
|
|
370
229
|
modelValue: any;
|
|
371
|
-
onUpdate: (value: unknown) => void;
|
|
372
230
|
readonly: boolean;
|
|
373
|
-
|
|
231
|
+
onUpdate: (value: unknown) => void;
|
|
232
|
+
submit?: InjectedFormData<Schema_2, Type_2>["submit"];
|
|
374
233
|
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
375
234
|
};
|
|
376
235
|
}>, {}, {}, "invalid" | "type" | "errors" | "component" | "hasProps" | "invalidLabel" | "is", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -380,11 +239,11 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
380
239
|
default: undefined;
|
|
381
240
|
};
|
|
382
241
|
names: {
|
|
383
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
242
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>[] | Record<string, Path<import('zod').TypeOf<Schema_3>>>>;
|
|
384
243
|
required: true;
|
|
385
244
|
};
|
|
386
245
|
props: {
|
|
387
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
246
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
388
247
|
default: () => {};
|
|
389
248
|
};
|
|
390
249
|
showValid: {
|
|
@@ -392,7 +251,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
392
251
|
default: boolean;
|
|
393
252
|
};
|
|
394
253
|
defaultValues: {
|
|
395
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
254
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
396
255
|
default: undefined;
|
|
397
256
|
};
|
|
398
257
|
readonly: {
|
|
@@ -421,11 +280,11 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
421
280
|
default: undefined;
|
|
422
281
|
};
|
|
423
282
|
names: {
|
|
424
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
283
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>[] | Record<string, Path<import('zod').TypeOf<Schema_3>>>>;
|
|
425
284
|
required: true;
|
|
426
285
|
};
|
|
427
286
|
props: {
|
|
428
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
287
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
429
288
|
default: () => {};
|
|
430
289
|
};
|
|
431
290
|
showValid: {
|
|
@@ -433,7 +292,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
433
292
|
default: boolean;
|
|
434
293
|
};
|
|
435
294
|
defaultValues: {
|
|
436
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
295
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
437
296
|
default: undefined;
|
|
438
297
|
};
|
|
439
298
|
readonly: {
|
|
@@ -448,19 +307,19 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
448
307
|
}>, {
|
|
449
308
|
readonly: boolean;
|
|
450
309
|
props: [{
|
|
451
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
310
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
452
311
|
default: () => {};
|
|
453
312
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
454
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
313
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
455
314
|
default: () => {};
|
|
456
315
|
};
|
|
457
316
|
is: string | import('vue').Component;
|
|
458
317
|
showValid: boolean;
|
|
459
318
|
defaultValues: [{
|
|
460
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
319
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
461
320
|
default: undefined;
|
|
462
321
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
463
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
322
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
464
323
|
default: undefined;
|
|
465
324
|
};
|
|
466
325
|
}, import('vue').SlotsType<{
|
|
@@ -476,13 +335,13 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
476
335
|
onUpdate: (value: Record<string, any>) => void;
|
|
477
336
|
onUpdateField: (name: string, value: any) => void;
|
|
478
337
|
readonly: boolean;
|
|
479
|
-
submit?: InjectedFormData<
|
|
338
|
+
submit?: InjectedFormData<Schema_3, Type_3>["submit"];
|
|
480
339
|
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
481
340
|
};
|
|
482
341
|
}>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
483
342
|
VvFormTemplate: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
484
343
|
schema: {
|
|
485
|
-
type: import('vue').PropType<FormTemplate<
|
|
344
|
+
type: import('vue').PropType<FormTemplate<Schema_4, Type_4>>;
|
|
486
345
|
required: true;
|
|
487
346
|
};
|
|
488
347
|
scope: {
|
|
@@ -495,7 +354,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
495
354
|
[key: string]: any;
|
|
496
355
|
}>[] | undefined)[]) | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
497
356
|
schema: {
|
|
498
|
-
type: import('vue').PropType<FormTemplate<
|
|
357
|
+
type: import('vue').PropType<FormTemplate<Schema_4, Type_4>>;
|
|
499
358
|
required: true;
|
|
500
359
|
};
|
|
501
360
|
scope: {
|
|
@@ -510,10 +369,10 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
510
369
|
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
511
370
|
invalid: boolean;
|
|
512
371
|
status?: import('./enums').FormStatus;
|
|
513
|
-
submit?: InjectedFormData<
|
|
372
|
+
submit?: InjectedFormData<Schema_4, Type_4>["submit"];
|
|
514
373
|
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
515
|
-
clear?: InjectedFormData<
|
|
516
|
-
reset?: InjectedFormData<
|
|
374
|
+
clear?: InjectedFormData<Schema_4, Type_4>["clear"];
|
|
375
|
+
reset?: InjectedFormData<Schema_4, Type_4>["reset"];
|
|
517
376
|
};
|
|
518
377
|
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
519
378
|
VvFormWrapper: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -526,12 +385,12 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
526
385
|
default: undefined;
|
|
527
386
|
};
|
|
528
387
|
}>, {
|
|
529
|
-
clear: (() => void) | undefined;
|
|
530
388
|
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
531
389
|
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>>)>;
|
|
532
390
|
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
533
391
|
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;
|
|
534
392
|
invalid: import('vue').ComputedRef<boolean>;
|
|
393
|
+
clear: (() => void) | undefined;
|
|
535
394
|
reset: (() => void) | undefined;
|
|
536
395
|
submit: (() => Promise<boolean>) | undefined;
|
|
537
396
|
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
@@ -553,15 +412,15 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
553
412
|
}, import('vue').SlotsType<{
|
|
554
413
|
default: {
|
|
555
414
|
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
415
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
556
416
|
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
557
417
|
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
558
418
|
invalid: boolean;
|
|
559
|
-
|
|
419
|
+
clear?: InjectedFormData<Schema_5, Type_5>["clear"];
|
|
420
|
+
reset?: InjectedFormData<Schema_5, Type_5>["reset"];
|
|
421
|
+
submit?: InjectedFormData<Schema_5, Type_5>["submit"];
|
|
560
422
|
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
561
423
|
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
562
|
-
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
563
|
-
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
564
|
-
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
565
424
|
};
|
|
566
425
|
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
567
426
|
} | {
|
|
@@ -585,84 +444,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
585
444
|
validate: (value?: (undefined extends Type ? Partial<{
|
|
586
445
|
[x: string]: any;
|
|
587
446
|
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
588
|
-
wrappers: Map<string,
|
|
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>>;
|
|
447
|
+
wrappers: Map<string, InjectedFormWrapperData<AnyZodObject>>;
|
|
666
448
|
VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
667
449
|
continuousValidation: {
|
|
668
450
|
type: BooleanConstructor;
|
|
@@ -681,7 +463,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
681
463
|
default: string;
|
|
682
464
|
};
|
|
683
465
|
template: {
|
|
684
|
-
type: import('vue').PropType<FormTemplate<
|
|
466
|
+
type: import('vue').PropType<FormTemplate<Schema_1, Type_1>>;
|
|
685
467
|
default: undefined;
|
|
686
468
|
};
|
|
687
469
|
}>, {
|
|
@@ -712,84 +494,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
712
494
|
validate: (value?: (undefined extends Type ? Partial<{
|
|
713
495
|
[x: string]: any;
|
|
714
496
|
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
715
|
-
wrappers: Map<string,
|
|
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>>;
|
|
497
|
+
wrappers: Map<string, InjectedFormWrapperData<AnyZodObject>>;
|
|
793
498
|
}, {}, {}, {}, 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<{
|
|
794
499
|
continuousValidation: {
|
|
795
500
|
type: BooleanConstructor;
|
|
@@ -808,7 +513,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
808
513
|
default: string;
|
|
809
514
|
};
|
|
810
515
|
template: {
|
|
811
|
-
type: import('vue').PropType<FormTemplate<
|
|
516
|
+
type: import('vue').PropType<FormTemplate<Schema_1, Type_1>>;
|
|
812
517
|
default: undefined;
|
|
813
518
|
};
|
|
814
519
|
}>> & Readonly<{
|
|
@@ -826,111 +531,27 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
826
531
|
modelValue: Record<string, any>;
|
|
827
532
|
}, import('vue').SlotsType<{
|
|
828
533
|
default: {
|
|
829
|
-
errors:
|
|
830
|
-
readonly [x: string]: {
|
|
831
|
-
readonly _errors: readonly string[];
|
|
832
|
-
} | undefined;
|
|
833
|
-
readonly _errors: readonly string[];
|
|
834
|
-
} | undefined, {
|
|
534
|
+
errors: {
|
|
835
535
|
readonly [x: string]: {
|
|
836
536
|
readonly _errors: readonly string[];
|
|
837
537
|
} | undefined;
|
|
838
538
|
readonly _errors: readonly string[];
|
|
839
|
-
} | undefined
|
|
840
|
-
formData:
|
|
841
|
-
[x: string]: any;
|
|
842
|
-
}> : Type) | undefined, (undefined extends Type ? Partial<{
|
|
539
|
+
} | undefined;
|
|
540
|
+
formData: (undefined extends Type ? Partial<{
|
|
843
541
|
[x: string]: any;
|
|
844
|
-
}> : Type) | undefined
|
|
542
|
+
}> : Type) | undefined;
|
|
543
|
+
invalid: import('vue').UnwrapRef<import('vue').ComputedRef<boolean>>;
|
|
544
|
+
readonly: import('vue').UnwrapRef<import('vue').Ref<boolean, boolean>>;
|
|
545
|
+
status: import('vue').UnwrapRef<Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>>;
|
|
546
|
+
wrappers: Map<string, InjectedFormWrapperData<AnyZodObject>>;
|
|
547
|
+
clear: () => void;
|
|
845
548
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
846
|
-
|
|
847
|
-
readonly: import('vue').Ref<boolean, boolean>;
|
|
848
|
-
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
549
|
+
reset: () => void;
|
|
849
550
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
850
551
|
submit: () => Promise<boolean>;
|
|
851
552
|
validate: (value?: (undefined extends Type ? Partial<{
|
|
852
553
|
[x: string]: any;
|
|
853
554
|
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
854
|
-
clear: () => void;
|
|
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>>;
|
|
934
555
|
};
|
|
935
556
|
}>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
936
557
|
VvFormField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -944,11 +565,11 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
944
565
|
default: undefined;
|
|
945
566
|
};
|
|
946
567
|
name: {
|
|
947
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
568
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
948
569
|
required: true;
|
|
949
570
|
};
|
|
950
571
|
props: {
|
|
951
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
572
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
952
573
|
default: () => {};
|
|
953
574
|
};
|
|
954
575
|
showValid: {
|
|
@@ -996,11 +617,11 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
996
617
|
default: undefined;
|
|
997
618
|
};
|
|
998
619
|
name: {
|
|
999
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
620
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
1000
621
|
required: true;
|
|
1001
622
|
};
|
|
1002
623
|
props: {
|
|
1003
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
624
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
1004
625
|
default: () => {};
|
|
1005
626
|
};
|
|
1006
627
|
showValid: {
|
|
@@ -1052,9 +673,9 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1052
673
|
invalid: boolean;
|
|
1053
674
|
invalidLabel?: string[];
|
|
1054
675
|
modelValue: any;
|
|
1055
|
-
onUpdate: (value: unknown) => void;
|
|
1056
676
|
readonly: boolean;
|
|
1057
|
-
|
|
677
|
+
onUpdate: (value: unknown) => void;
|
|
678
|
+
submit?: InjectedFormData<Schema_2, Type_2>["submit"];
|
|
1058
679
|
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
1059
680
|
[x: string]: any;
|
|
1060
681
|
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
@@ -1066,11 +687,11 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1066
687
|
default: undefined;
|
|
1067
688
|
};
|
|
1068
689
|
names: {
|
|
1069
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
690
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>[] | Record<string, Path<import('zod').TypeOf<Schema_3>>>>;
|
|
1070
691
|
required: true;
|
|
1071
692
|
};
|
|
1072
693
|
props: {
|
|
1073
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
694
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1074
695
|
default: () => {};
|
|
1075
696
|
};
|
|
1076
697
|
showValid: {
|
|
@@ -1078,7 +699,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1078
699
|
default: boolean;
|
|
1079
700
|
};
|
|
1080
701
|
defaultValues: {
|
|
1081
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
702
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
1082
703
|
default: undefined;
|
|
1083
704
|
};
|
|
1084
705
|
readonly: {
|
|
@@ -1107,11 +728,11 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1107
728
|
default: undefined;
|
|
1108
729
|
};
|
|
1109
730
|
names: {
|
|
1110
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
731
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>[] | Record<string, Path<import('zod').TypeOf<Schema_3>>>>;
|
|
1111
732
|
required: true;
|
|
1112
733
|
};
|
|
1113
734
|
props: {
|
|
1114
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
735
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1115
736
|
default: () => {};
|
|
1116
737
|
};
|
|
1117
738
|
showValid: {
|
|
@@ -1119,7 +740,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1119
740
|
default: boolean;
|
|
1120
741
|
};
|
|
1121
742
|
defaultValues: {
|
|
1122
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
743
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
1123
744
|
default: undefined;
|
|
1124
745
|
};
|
|
1125
746
|
readonly: {
|
|
@@ -1161,7 +782,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1161
782
|
onUpdate: (value: Record<string, any>) => void;
|
|
1162
783
|
onUpdateField: (name: string, value: any) => void;
|
|
1163
784
|
readonly: boolean;
|
|
1164
|
-
submit?: InjectedFormData<
|
|
785
|
+
submit?: InjectedFormData<Schema_3, Type_3>["submit"];
|
|
1165
786
|
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
1166
787
|
[x: string]: any;
|
|
1167
788
|
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
@@ -1169,7 +790,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1169
790
|
}>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1170
791
|
VvFormTemplate: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
1171
792
|
schema: {
|
|
1172
|
-
type: import('vue').PropType<FormTemplate<
|
|
793
|
+
type: import('vue').PropType<FormTemplate<Schema_4, Type_4>>;
|
|
1173
794
|
required: true;
|
|
1174
795
|
};
|
|
1175
796
|
scope: {
|
|
@@ -1182,7 +803,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1182
803
|
[key: string]: any;
|
|
1183
804
|
}>[] | undefined)[]) | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
1184
805
|
schema: {
|
|
1185
|
-
type: import('vue').PropType<FormTemplate<
|
|
806
|
+
type: import('vue').PropType<FormTemplate<Schema_4, Type_4>>;
|
|
1186
807
|
required: true;
|
|
1187
808
|
};
|
|
1188
809
|
scope: {
|
|
@@ -1204,12 +825,12 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1204
825
|
}> : Type) | undefined;
|
|
1205
826
|
invalid: boolean;
|
|
1206
827
|
status?: import('./enums').FormStatus;
|
|
1207
|
-
submit?: InjectedFormData<
|
|
828
|
+
submit?: InjectedFormData<Schema_4, Type_4>["submit"];
|
|
1208
829
|
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
1209
830
|
[x: string]: any;
|
|
1210
831
|
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1211
|
-
clear?: InjectedFormData<
|
|
1212
|
-
reset?: InjectedFormData<
|
|
832
|
+
clear?: InjectedFormData<Schema_4, Type_4>["clear"];
|
|
833
|
+
reset?: InjectedFormData<Schema_4, Type_4>["reset"];
|
|
1213
834
|
};
|
|
1214
835
|
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1215
836
|
VvFormWrapper: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -1222,7 +843,6 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1222
843
|
default: undefined;
|
|
1223
844
|
};
|
|
1224
845
|
}>, {
|
|
1225
|
-
clear: (() => void) | undefined;
|
|
1226
846
|
errors: Readonly<import('vue').Ref<{
|
|
1227
847
|
readonly [x: string]: {
|
|
1228
848
|
readonly _errors: readonly string[];
|
|
@@ -1242,6 +862,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1242
862
|
[x: string]: any;
|
|
1243
863
|
}> : Type) | undefined> | undefined;
|
|
1244
864
|
invalid: import('vue').ComputedRef<boolean>;
|
|
865
|
+
clear: (() => void) | undefined;
|
|
1245
866
|
reset: (() => void) | undefined;
|
|
1246
867
|
submit: (() => Promise<boolean>) | undefined;
|
|
1247
868
|
validate: ((formData?: (undefined extends Type ? Partial<{
|
|
@@ -1270,6 +891,7 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1270
891
|
} | undefined;
|
|
1271
892
|
readonly _errors: readonly string[];
|
|
1272
893
|
} | undefined;
|
|
894
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<AnyZodObject, string>>;
|
|
1273
895
|
formData?: (undefined extends Type ? Partial<{
|
|
1274
896
|
[x: string]: any;
|
|
1275
897
|
}> : Type) | undefined;
|
|
@@ -1280,14 +902,13 @@ export declare function useForm<Schema extends FormSchema, Type>(schema: Schema,
|
|
|
1280
902
|
readonly _errors: readonly string[];
|
|
1281
903
|
} | undefined;
|
|
1282
904
|
invalid: boolean;
|
|
1283
|
-
|
|
905
|
+
clear?: InjectedFormData<Schema_5, Type_5>["clear"];
|
|
906
|
+
reset?: InjectedFormData<Schema_5, Type_5>["reset"];
|
|
907
|
+
submit?: InjectedFormData<Schema_5, Type_5>["submit"];
|
|
1284
908
|
validate?: ((formData?: (undefined extends Type ? Partial<{
|
|
1285
909
|
[x: string]: any;
|
|
1286
910
|
}> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1287
911
|
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
1288
|
-
fieldsErrors: Map<string, import('zod').inferFormattedError<AnyZodObject, string>>;
|
|
1289
|
-
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
1290
|
-
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
1291
912
|
};
|
|
1292
913
|
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1293
914
|
};
|
|
@@ -1317,54 +938,7 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1317
938
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
1318
939
|
submit: () => Promise<boolean>;
|
|
1319
940
|
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
1320
|
-
wrappers: Map<string,
|
|
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>>;
|
|
941
|
+
wrappers: Map<string, InjectedFormWrapperData<Schema>>;
|
|
1368
942
|
VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
1369
943
|
continuousValidation: {
|
|
1370
944
|
type: BooleanConstructor;
|
|
@@ -1383,7 +957,7 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1383
957
|
default: string;
|
|
1384
958
|
};
|
|
1385
959
|
template: {
|
|
1386
|
-
type: import('vue').PropType<FormTemplate<
|
|
960
|
+
type: import('vue').PropType<FormTemplate<Schema_1, Type_1>>;
|
|
1387
961
|
default: undefined;
|
|
1388
962
|
};
|
|
1389
963
|
}>, {
|
|
@@ -1398,54 +972,7 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1398
972
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
1399
973
|
submit: () => Promise<boolean>;
|
|
1400
974
|
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
1401
|
-
wrappers: Map<string,
|
|
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>>;
|
|
975
|
+
wrappers: Map<string, InjectedFormWrapperData<Schema>>;
|
|
1449
976
|
}, {}, {}, {}, 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<{
|
|
1450
977
|
continuousValidation: {
|
|
1451
978
|
type: BooleanConstructor;
|
|
@@ -1464,7 +991,7 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1464
991
|
default: string;
|
|
1465
992
|
};
|
|
1466
993
|
template: {
|
|
1467
|
-
type: import('vue').PropType<FormTemplate<
|
|
994
|
+
type: import('vue').PropType<FormTemplate<Schema_1, Type_1>>;
|
|
1468
995
|
default: undefined;
|
|
1469
996
|
};
|
|
1470
997
|
}>> & Readonly<{
|
|
@@ -1482,65 +1009,18 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1482
1009
|
modelValue: Record<string, any>;
|
|
1483
1010
|
}, import('vue').SlotsType<{
|
|
1484
1011
|
default: {
|
|
1485
|
-
errors:
|
|
1486
|
-
formData:
|
|
1012
|
+
errors: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1013
|
+
formData: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1014
|
+
invalid: import('vue').UnwrapRef<import('vue').ComputedRef<boolean>>;
|
|
1015
|
+
readonly: import('vue').UnwrapRef<import('vue').Ref<boolean, boolean>>;
|
|
1016
|
+
status: import('vue').UnwrapRef<Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>>;
|
|
1017
|
+
wrappers: Map<string, InjectedFormWrapperData<Schema>>;
|
|
1018
|
+
clear: () => void;
|
|
1487
1019
|
ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
|
|
1488
|
-
|
|
1489
|
-
readonly: import('vue').Ref<boolean, boolean>;
|
|
1490
|
-
status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
|
|
1020
|
+
reset: () => void;
|
|
1491
1021
|
stopUpdatesWatch: import('vue').WatchStopHandle;
|
|
1492
1022
|
submit: () => Promise<boolean>;
|
|
1493
1023
|
validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
|
|
1494
|
-
clear: () => void;
|
|
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>>;
|
|
1544
1024
|
};
|
|
1545
1025
|
}>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1546
1026
|
VvFormField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -1554,11 +1034,11 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1554
1034
|
default: undefined;
|
|
1555
1035
|
};
|
|
1556
1036
|
name: {
|
|
1557
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1037
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
1558
1038
|
required: true;
|
|
1559
1039
|
};
|
|
1560
1040
|
props: {
|
|
1561
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1041
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
1562
1042
|
default: () => {};
|
|
1563
1043
|
};
|
|
1564
1044
|
showValid: {
|
|
@@ -1586,10 +1066,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1586
1066
|
} | import('vue').ConcreteComponent>;
|
|
1587
1067
|
hasProps: import('vue').ComputedRef<{
|
|
1588
1068
|
name: {} | ([{
|
|
1589
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1069
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
1590
1070
|
required: true;
|
|
1591
1071
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
1592
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1072
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
1593
1073
|
required: true;
|
|
1594
1074
|
});
|
|
1595
1075
|
invalid: boolean;
|
|
@@ -1612,11 +1092,11 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1612
1092
|
default: undefined;
|
|
1613
1093
|
};
|
|
1614
1094
|
name: {
|
|
1615
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1095
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_2>>>;
|
|
1616
1096
|
required: true;
|
|
1617
1097
|
};
|
|
1618
1098
|
props: {
|
|
1619
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1099
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
1620
1100
|
default: () => {};
|
|
1621
1101
|
};
|
|
1622
1102
|
showValid: {
|
|
@@ -1644,10 +1124,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1644
1124
|
type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
|
|
1645
1125
|
readonly: boolean;
|
|
1646
1126
|
props: [{
|
|
1647
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1127
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
1648
1128
|
default: () => {};
|
|
1649
1129
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
1650
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1130
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_2> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_2>> | undefined)>>;
|
|
1651
1131
|
default: () => {};
|
|
1652
1132
|
};
|
|
1653
1133
|
is: string | import('vue').Component;
|
|
@@ -1663,9 +1143,9 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1663
1143
|
invalid: boolean;
|
|
1664
1144
|
invalidLabel?: string[];
|
|
1665
1145
|
modelValue: any;
|
|
1666
|
-
onUpdate: (value: unknown) => void;
|
|
1667
1146
|
readonly: boolean;
|
|
1668
|
-
|
|
1147
|
+
onUpdate: (value: unknown) => void;
|
|
1148
|
+
submit?: InjectedFormData<Schema_2, Type_2>["submit"];
|
|
1669
1149
|
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1670
1150
|
};
|
|
1671
1151
|
}>, {}, {}, "invalid" | "type" | "errors" | "component" | "hasProps" | "invalidLabel" | "is", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1675,11 +1155,11 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1675
1155
|
default: undefined;
|
|
1676
1156
|
};
|
|
1677
1157
|
names: {
|
|
1678
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1158
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>[] | Record<string, Path<import('zod').TypeOf<Schema_3>>>>;
|
|
1679
1159
|
required: true;
|
|
1680
1160
|
};
|
|
1681
1161
|
props: {
|
|
1682
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1162
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1683
1163
|
default: () => {};
|
|
1684
1164
|
};
|
|
1685
1165
|
showValid: {
|
|
@@ -1687,7 +1167,7 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1687
1167
|
default: boolean;
|
|
1688
1168
|
};
|
|
1689
1169
|
defaultValues: {
|
|
1690
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
1170
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
1691
1171
|
default: undefined;
|
|
1692
1172
|
};
|
|
1693
1173
|
readonly: {
|
|
@@ -1716,11 +1196,11 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1716
1196
|
default: undefined;
|
|
1717
1197
|
};
|
|
1718
1198
|
names: {
|
|
1719
|
-
type: import('vue').PropType<Path<import('zod').TypeOf<
|
|
1199
|
+
type: import('vue').PropType<Path<import('zod').TypeOf<Schema_3>>[] | Record<string, Path<import('zod').TypeOf<Schema_3>>>>;
|
|
1720
1200
|
required: true;
|
|
1721
1201
|
};
|
|
1722
1202
|
props: {
|
|
1723
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1203
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1724
1204
|
default: () => {};
|
|
1725
1205
|
};
|
|
1726
1206
|
showValid: {
|
|
@@ -1728,7 +1208,7 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1728
1208
|
default: boolean;
|
|
1729
1209
|
};
|
|
1730
1210
|
defaultValues: {
|
|
1731
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
1211
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
1732
1212
|
default: undefined;
|
|
1733
1213
|
};
|
|
1734
1214
|
readonly: {
|
|
@@ -1743,19 +1223,19 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1743
1223
|
}>, {
|
|
1744
1224
|
readonly: boolean;
|
|
1745
1225
|
props: [{
|
|
1746
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1226
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1747
1227
|
default: () => {};
|
|
1748
1228
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
1749
|
-
type: import('vue').PropType<Partial<import('zod').TypeOf<
|
|
1229
|
+
type: import('vue').PropType<Partial<import('zod').TypeOf<Schema_3> | undefined | ((formData?: import('vue').Ref<ObjectConstructor>) => Partial<import('zod').TypeOf<Schema_3>> | undefined)>>;
|
|
1750
1230
|
default: () => {};
|
|
1751
1231
|
};
|
|
1752
1232
|
is: string | import('vue').Component;
|
|
1753
1233
|
showValid: boolean;
|
|
1754
1234
|
defaultValues: [{
|
|
1755
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
1235
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
1756
1236
|
default: undefined;
|
|
1757
1237
|
}] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
|
|
1758
|
-
type: import('vue').PropType<Record<Path<import('zod').TypeOf<
|
|
1238
|
+
type: import('vue').PropType<Record<Path<import('zod').TypeOf<Schema_3>>, any>>;
|
|
1759
1239
|
default: undefined;
|
|
1760
1240
|
};
|
|
1761
1241
|
}, import('vue').SlotsType<{
|
|
@@ -1771,13 +1251,13 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1771
1251
|
onUpdate: (value: Record<string, any>) => void;
|
|
1772
1252
|
onUpdateField: (name: string, value: any) => void;
|
|
1773
1253
|
readonly: boolean;
|
|
1774
|
-
submit?: InjectedFormData<
|
|
1254
|
+
submit?: InjectedFormData<Schema_3, Type_3>["submit"];
|
|
1775
1255
|
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1776
1256
|
};
|
|
1777
1257
|
}>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1778
1258
|
VvFormTemplate: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
1779
1259
|
schema: {
|
|
1780
|
-
type: import('vue').PropType<FormTemplate<
|
|
1260
|
+
type: import('vue').PropType<FormTemplate<Schema_4, Type_4>>;
|
|
1781
1261
|
required: true;
|
|
1782
1262
|
};
|
|
1783
1263
|
scope: {
|
|
@@ -1790,7 +1270,7 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1790
1270
|
[key: string]: any;
|
|
1791
1271
|
}>[] | undefined)[]) | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
1792
1272
|
schema: {
|
|
1793
|
-
type: import('vue').PropType<FormTemplate<
|
|
1273
|
+
type: import('vue').PropType<FormTemplate<Schema_4, Type_4>>;
|
|
1794
1274
|
required: true;
|
|
1795
1275
|
};
|
|
1796
1276
|
scope: {
|
|
@@ -1805,10 +1285,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1805
1285
|
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1806
1286
|
invalid: boolean;
|
|
1807
1287
|
status?: import('./enums').FormStatus;
|
|
1808
|
-
submit?: InjectedFormData<
|
|
1288
|
+
submit?: InjectedFormData<Schema_4, Type_4>["submit"];
|
|
1809
1289
|
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1810
|
-
clear?: InjectedFormData<
|
|
1811
|
-
reset?: InjectedFormData<
|
|
1290
|
+
clear?: InjectedFormData<Schema_4, Type_4>["clear"];
|
|
1291
|
+
reset?: InjectedFormData<Schema_4, Type_4>["reset"];
|
|
1812
1292
|
};
|
|
1813
1293
|
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1814
1294
|
VvFormWrapper: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -1821,12 +1301,12 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1821
1301
|
default: undefined;
|
|
1822
1302
|
};
|
|
1823
1303
|
}>, {
|
|
1824
|
-
clear: (() => void) | undefined;
|
|
1825
1304
|
errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
1826
1305
|
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>>)>;
|
|
1827
1306
|
fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
|
|
1828
1307
|
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;
|
|
1829
1308
|
invalid: import('vue').ComputedRef<boolean>;
|
|
1309
|
+
clear: (() => void) | undefined;
|
|
1830
1310
|
reset: (() => void) | undefined;
|
|
1831
1311
|
submit: (() => Promise<boolean>) | undefined;
|
|
1832
1312
|
validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
@@ -1848,15 +1328,15 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
|
|
|
1848
1328
|
}, import('vue').SlotsType<{
|
|
1849
1329
|
default: {
|
|
1850
1330
|
errors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1331
|
+
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
1851
1332
|
formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined;
|
|
1852
1333
|
formErrors?: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
|
|
1853
1334
|
invalid: boolean;
|
|
1854
|
-
|
|
1335
|
+
clear?: InjectedFormData<Schema_5, Type_5>["clear"];
|
|
1336
|
+
reset?: InjectedFormData<Schema_5, Type_5>["reset"];
|
|
1337
|
+
submit?: InjectedFormData<Schema_5, Type_5>["submit"];
|
|
1855
1338
|
validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
|
|
1856
1339
|
validateWrapper?: (() => Promise<boolean>) | undefined;
|
|
1857
|
-
fieldsErrors: Map<string, import('zod').inferFormattedError<Schema, string>>;
|
|
1858
|
-
clear?: InjectedFormData<Schema_1, Type_1>["clear"];
|
|
1859
|
-
reset?: InjectedFormData<Schema_1, Type_1>["reset"];
|
|
1860
1340
|
};
|
|
1861
1341
|
}>, {}, {}, "invalid" | "reset" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;
|
|
1862
1342
|
};
|