@volverjs/form-vue 0.0.14 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +392 -351
- package/dist/index.umd.js +1 -1
- package/dist/src/VvForm.d.ts +48 -35
- package/dist/src/VvFormTemplate.d.ts +2 -2
- package/dist/src/VvFormWrapper.d.ts +8 -8
- package/dist/src/enums.d.ts +4 -1
- package/dist/src/index.d.ts +170 -132
- package/dist/src/types.d.ts +8 -6
- package/package.json +16 -16
- package/src/VvForm.ts +102 -63
- package/src/VvFormField.ts +1 -1
- package/src/VvFormTemplate.ts +3 -2
- package/src/VvFormWrapper.ts +3 -3
- package/src/enums.ts +3 -0
- package/src/index.ts +14 -6
- package/src/types.ts +9 -8
package/dist/src/index.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
15
15
|
$props: {
|
|
16
16
|
template?: FormTemplate<Schema> | undefined;
|
|
17
17
|
modelValue?: Record<string, any> | undefined;
|
|
18
|
-
updateThrottle?: number | undefined;
|
|
19
18
|
continuosValidation?: boolean | undefined;
|
|
19
|
+
tag?: string | undefined;
|
|
20
20
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
21
21
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
22
22
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -80,17 +80,17 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
80
80
|
$emit: (event: "invalid" | "valid" | "update:modelValue" | "submit", ...args: any[]) => void;
|
|
81
81
|
$el: any;
|
|
82
82
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
83
|
+
continuosValidation: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
83
87
|
modelValue: {
|
|
84
88
|
type: ObjectConstructor;
|
|
85
89
|
default: () => {};
|
|
86
90
|
};
|
|
87
|
-
|
|
88
|
-
type:
|
|
89
|
-
default:
|
|
90
|
-
};
|
|
91
|
-
continuosValidation: {
|
|
92
|
-
type: BooleanConstructor;
|
|
93
|
-
default: boolean;
|
|
91
|
+
tag: {
|
|
92
|
+
type: StringConstructor;
|
|
93
|
+
default: string;
|
|
94
94
|
};
|
|
95
95
|
template: {
|
|
96
96
|
type: import("vue").PropType<FormTemplate<Schema>>;
|
|
@@ -103,16 +103,18 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
103
103
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
104
104
|
}, {
|
|
105
105
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
106
|
-
submit: () => boolean
|
|
107
|
-
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean
|
|
106
|
+
submit: () => Promise<boolean>;
|
|
107
|
+
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => Promise<boolean>;
|
|
108
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
109
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
108
110
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
109
111
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
110
112
|
invalid: import("vue").ComputedRef<boolean>;
|
|
111
113
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], string, {
|
|
112
114
|
template: FormTemplate<Schema>;
|
|
113
115
|
modelValue: Record<string, any>;
|
|
114
|
-
updateThrottle: number;
|
|
115
116
|
continuosValidation: boolean;
|
|
117
|
+
tag: string;
|
|
116
118
|
}, {}, string, {}> & {
|
|
117
119
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
118
120
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -134,17 +136,17 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
134
136
|
$nextTick: typeof import("vue").nextTick;
|
|
135
137
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
136
138
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
139
|
+
continuosValidation: {
|
|
140
|
+
type: BooleanConstructor;
|
|
141
|
+
default: boolean;
|
|
142
|
+
};
|
|
137
143
|
modelValue: {
|
|
138
144
|
type: ObjectConstructor;
|
|
139
145
|
default: () => {};
|
|
140
146
|
};
|
|
141
|
-
|
|
142
|
-
type:
|
|
143
|
-
default:
|
|
144
|
-
};
|
|
145
|
-
continuosValidation: {
|
|
146
|
-
type: BooleanConstructor;
|
|
147
|
-
default: boolean;
|
|
147
|
+
tag: {
|
|
148
|
+
type: StringConstructor;
|
|
149
|
+
default: string;
|
|
148
150
|
};
|
|
149
151
|
template: {
|
|
150
152
|
type: import("vue").PropType<FormTemplate<Schema>>;
|
|
@@ -157,8 +159,10 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
157
159
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
158
160
|
} & import("vue").ShallowUnwrapRef<{
|
|
159
161
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
160
|
-
submit: () => boolean
|
|
161
|
-
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean
|
|
162
|
+
submit: () => Promise<boolean>;
|
|
163
|
+
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => Promise<boolean>;
|
|
164
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
165
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
162
166
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
163
167
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
164
168
|
invalid: import("vue").ComputedRef<boolean>;
|
|
@@ -167,17 +171,17 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
167
171
|
__isTeleport?: undefined;
|
|
168
172
|
__isSuspense?: undefined;
|
|
169
173
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
174
|
+
continuosValidation: {
|
|
175
|
+
type: BooleanConstructor;
|
|
176
|
+
default: boolean;
|
|
177
|
+
};
|
|
170
178
|
modelValue: {
|
|
171
179
|
type: ObjectConstructor;
|
|
172
180
|
default: () => {};
|
|
173
181
|
};
|
|
174
|
-
|
|
175
|
-
type:
|
|
176
|
-
default:
|
|
177
|
-
};
|
|
178
|
-
continuosValidation: {
|
|
179
|
-
type: BooleanConstructor;
|
|
180
|
-
default: boolean;
|
|
182
|
+
tag: {
|
|
183
|
+
type: StringConstructor;
|
|
184
|
+
default: string;
|
|
181
185
|
};
|
|
182
186
|
template: {
|
|
183
187
|
type: import("vue").PropType<FormTemplate<Schema>>;
|
|
@@ -190,24 +194,28 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
190
194
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
191
195
|
}, {
|
|
192
196
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
193
|
-
submit: () => boolean
|
|
194
|
-
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean
|
|
197
|
+
submit: () => Promise<boolean>;
|
|
198
|
+
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => Promise<boolean>;
|
|
199
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
200
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
195
201
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
196
202
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
197
203
|
invalid: import("vue").ComputedRef<boolean>;
|
|
198
204
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], "invalid" | "valid" | "update:modelValue" | "submit", {
|
|
199
205
|
template: FormTemplate<Schema>;
|
|
200
206
|
modelValue: Record<string, any>;
|
|
201
|
-
updateThrottle: number;
|
|
202
207
|
continuosValidation: boolean;
|
|
208
|
+
tag: string;
|
|
203
209
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
204
210
|
$slots: {
|
|
205
211
|
default: (_: {
|
|
206
212
|
formData: unknown extends Partial<import("zod").TypeOf<Schema>> | undefined ? undefined : Partial<import("zod").TypeOf<Schema>> | undefined;
|
|
207
|
-
submit: () => boolean
|
|
208
|
-
validate: () => boolean
|
|
213
|
+
submit: () => Promise<boolean>;
|
|
214
|
+
validate: () => Promise<boolean>;
|
|
215
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
216
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
209
217
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>>>>;
|
|
210
|
-
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | undefined>>;
|
|
218
|
+
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | "submitting" | "updated" | "unknown" | undefined>>;
|
|
211
219
|
invalid: import("vue").Ref<import("vue").DeepReadonly<boolean>>;
|
|
212
220
|
}) => any;
|
|
213
221
|
};
|
|
@@ -294,8 +302,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
294
302
|
}, {
|
|
295
303
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
296
304
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
297
|
-
submit: (() => boolean) | undefined;
|
|
298
|
-
validate: (() => boolean) | undefined;
|
|
305
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
306
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
299
307
|
invalid: import("vue").ComputedRef<boolean>;
|
|
300
308
|
fields: import("vue").Ref<Set<string>>;
|
|
301
309
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
@@ -336,8 +344,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
336
344
|
} & import("vue").ShallowUnwrapRef<{
|
|
337
345
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
338
346
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
339
|
-
submit: (() => boolean) | undefined;
|
|
340
|
-
validate: (() => boolean) | undefined;
|
|
347
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
348
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
341
349
|
invalid: import("vue").ComputedRef<boolean>;
|
|
342
350
|
fields: import("vue").Ref<Set<string>>;
|
|
343
351
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
@@ -360,8 +368,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
360
368
|
}, {
|
|
361
369
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
362
370
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
363
|
-
submit: (() => boolean) | undefined;
|
|
364
|
-
validate: (() => boolean) | undefined;
|
|
371
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
372
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
365
373
|
invalid: import("vue").ComputedRef<boolean>;
|
|
366
374
|
fields: import("vue").Ref<Set<string>>;
|
|
367
375
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
@@ -372,8 +380,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
372
380
|
default: (_: {
|
|
373
381
|
invalid: boolean;
|
|
374
382
|
formData: unknown extends Partial<import("zod").TypeOf<Schema>> | undefined ? undefined : Partial<import("zod").TypeOf<Schema>> | undefined;
|
|
375
|
-
submit: () => boolean
|
|
376
|
-
validate: () => boolean
|
|
383
|
+
submit: () => Promise<boolean>;
|
|
384
|
+
validate: () => Promise<boolean>;
|
|
377
385
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>>>>;
|
|
378
386
|
fieldsErrors: Map<string, Record<string, {
|
|
379
387
|
_errors: string[];
|
|
@@ -602,10 +610,10 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
602
610
|
$slots: {
|
|
603
611
|
default: (_: {
|
|
604
612
|
formData: unknown extends Partial<import("zod").TypeOf<Schema>> | undefined ? undefined : Partial<import("zod").TypeOf<Schema>> | undefined;
|
|
605
|
-
submit: () => boolean
|
|
606
|
-
validate: () => boolean
|
|
613
|
+
submit: () => Promise<boolean>;
|
|
614
|
+
validate: () => Promise<boolean>;
|
|
607
615
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>>>>;
|
|
608
|
-
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | undefined>>;
|
|
616
|
+
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | "submitting" | "updated" | "unknown" | undefined>>;
|
|
609
617
|
invalid: import("vue").Ref<import("vue").DeepReadonly<boolean>>;
|
|
610
618
|
}) => any;
|
|
611
619
|
};
|
|
@@ -616,6 +624,10 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
616
624
|
errors: import("vue").Ref<import("zod").inferFormattedError<Schema, string> | undefined>;
|
|
617
625
|
status: import("vue").Ref<import("./enums").FormStatus | undefined>;
|
|
618
626
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
627
|
+
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => Promise<boolean>;
|
|
628
|
+
submit: () => Promise<boolean>;
|
|
629
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
630
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
619
631
|
} | {
|
|
620
632
|
VvForm: {
|
|
621
633
|
new (...args: any[]): {
|
|
@@ -624,8 +636,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
624
636
|
$props: {
|
|
625
637
|
template?: FormTemplate<AnyZodObject> | undefined;
|
|
626
638
|
modelValue?: Record<string, any> | undefined;
|
|
627
|
-
updateThrottle?: number | undefined;
|
|
628
639
|
continuosValidation?: boolean | undefined;
|
|
640
|
+
tag?: string | undefined;
|
|
629
641
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
630
642
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
631
643
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -689,17 +701,17 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
689
701
|
$emit: (event: "invalid" | "valid" | "update:modelValue" | "submit", ...args: any[]) => void;
|
|
690
702
|
$el: any;
|
|
691
703
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
704
|
+
continuosValidation: {
|
|
705
|
+
type: BooleanConstructor;
|
|
706
|
+
default: boolean;
|
|
707
|
+
};
|
|
692
708
|
modelValue: {
|
|
693
709
|
type: ObjectConstructor;
|
|
694
710
|
default: () => {};
|
|
695
711
|
};
|
|
696
|
-
|
|
697
|
-
type:
|
|
698
|
-
default:
|
|
699
|
-
};
|
|
700
|
-
continuosValidation: {
|
|
701
|
-
type: BooleanConstructor;
|
|
702
|
-
default: boolean;
|
|
712
|
+
tag: {
|
|
713
|
+
type: StringConstructor;
|
|
714
|
+
default: string;
|
|
703
715
|
};
|
|
704
716
|
template: {
|
|
705
717
|
type: import("vue").PropType<FormTemplate<AnyZodObject>>;
|
|
@@ -714,10 +726,12 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
714
726
|
formData: import("vue").Ref<Partial<{
|
|
715
727
|
[x: string]: any;
|
|
716
728
|
} | undefined>>;
|
|
717
|
-
submit: () => boolean
|
|
729
|
+
submit: () => Promise<boolean>;
|
|
718
730
|
validate: (value?: Partial<{
|
|
719
731
|
[x: string]: any;
|
|
720
|
-
} | undefined>) => boolean
|
|
732
|
+
} | undefined>) => Promise<boolean>;
|
|
733
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
734
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
721
735
|
errors: Readonly<import("vue").Ref<{
|
|
722
736
|
readonly [x: string]: {
|
|
723
737
|
readonly _errors: readonly string[];
|
|
@@ -729,8 +743,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
729
743
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], string, {
|
|
730
744
|
template: FormTemplate<AnyZodObject>;
|
|
731
745
|
modelValue: Record<string, any>;
|
|
732
|
-
updateThrottle: number;
|
|
733
746
|
continuosValidation: boolean;
|
|
747
|
+
tag: string;
|
|
734
748
|
}, {}, string, {}> & {
|
|
735
749
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
736
750
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -752,17 +766,17 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
752
766
|
$nextTick: typeof import("vue").nextTick;
|
|
753
767
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
754
768
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
769
|
+
continuosValidation: {
|
|
770
|
+
type: BooleanConstructor;
|
|
771
|
+
default: boolean;
|
|
772
|
+
};
|
|
755
773
|
modelValue: {
|
|
756
774
|
type: ObjectConstructor;
|
|
757
775
|
default: () => {};
|
|
758
776
|
};
|
|
759
|
-
|
|
760
|
-
type:
|
|
761
|
-
default:
|
|
762
|
-
};
|
|
763
|
-
continuosValidation: {
|
|
764
|
-
type: BooleanConstructor;
|
|
765
|
-
default: boolean;
|
|
777
|
+
tag: {
|
|
778
|
+
type: StringConstructor;
|
|
779
|
+
default: string;
|
|
766
780
|
};
|
|
767
781
|
template: {
|
|
768
782
|
type: import("vue").PropType<FormTemplate<AnyZodObject>>;
|
|
@@ -777,10 +791,12 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
777
791
|
formData: import("vue").Ref<Partial<{
|
|
778
792
|
[x: string]: any;
|
|
779
793
|
} | undefined>>;
|
|
780
|
-
submit: () => boolean
|
|
794
|
+
submit: () => Promise<boolean>;
|
|
781
795
|
validate: (value?: Partial<{
|
|
782
796
|
[x: string]: any;
|
|
783
|
-
} | undefined>) => boolean
|
|
797
|
+
} | undefined>) => Promise<boolean>;
|
|
798
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
799
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
784
800
|
errors: Readonly<import("vue").Ref<{
|
|
785
801
|
readonly [x: string]: {
|
|
786
802
|
readonly _errors: readonly string[];
|
|
@@ -794,17 +810,17 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
794
810
|
__isTeleport?: undefined;
|
|
795
811
|
__isSuspense?: undefined;
|
|
796
812
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
813
|
+
continuosValidation: {
|
|
814
|
+
type: BooleanConstructor;
|
|
815
|
+
default: boolean;
|
|
816
|
+
};
|
|
797
817
|
modelValue: {
|
|
798
818
|
type: ObjectConstructor;
|
|
799
819
|
default: () => {};
|
|
800
820
|
};
|
|
801
|
-
|
|
802
|
-
type:
|
|
803
|
-
default:
|
|
804
|
-
};
|
|
805
|
-
continuosValidation: {
|
|
806
|
-
type: BooleanConstructor;
|
|
807
|
-
default: boolean;
|
|
821
|
+
tag: {
|
|
822
|
+
type: StringConstructor;
|
|
823
|
+
default: string;
|
|
808
824
|
};
|
|
809
825
|
template: {
|
|
810
826
|
type: import("vue").PropType<FormTemplate<AnyZodObject>>;
|
|
@@ -819,10 +835,12 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
819
835
|
formData: import("vue").Ref<Partial<{
|
|
820
836
|
[x: string]: any;
|
|
821
837
|
} | undefined>>;
|
|
822
|
-
submit: () => boolean
|
|
838
|
+
submit: () => Promise<boolean>;
|
|
823
839
|
validate: (value?: Partial<{
|
|
824
840
|
[x: string]: any;
|
|
825
|
-
} | undefined>) => boolean
|
|
841
|
+
} | undefined>) => Promise<boolean>;
|
|
842
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
843
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
826
844
|
errors: Readonly<import("vue").Ref<{
|
|
827
845
|
readonly [x: string]: {
|
|
828
846
|
readonly _errors: readonly string[];
|
|
@@ -834,23 +852,25 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
834
852
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], "invalid" | "valid" | "update:modelValue" | "submit", {
|
|
835
853
|
template: FormTemplate<AnyZodObject>;
|
|
836
854
|
modelValue: Record<string, any>;
|
|
837
|
-
updateThrottle: number;
|
|
838
855
|
continuosValidation: boolean;
|
|
856
|
+
tag: string;
|
|
839
857
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
840
858
|
$slots: {
|
|
841
859
|
default: (_: {
|
|
842
860
|
formData: Partial<{
|
|
843
861
|
[x: string]: any;
|
|
844
862
|
}> | undefined;
|
|
845
|
-
submit: () => boolean
|
|
846
|
-
validate: () => boolean
|
|
863
|
+
submit: () => Promise<boolean>;
|
|
864
|
+
validate: () => Promise<boolean>;
|
|
865
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
866
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
847
867
|
errors: Readonly<import("vue").Ref<{
|
|
848
868
|
readonly [x: string]: {
|
|
849
869
|
readonly _errors: readonly string[];
|
|
850
870
|
} | undefined;
|
|
851
871
|
readonly _errors: readonly string[];
|
|
852
872
|
}>>;
|
|
853
|
-
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | undefined>>;
|
|
873
|
+
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | "submitting" | "updated" | "unknown" | undefined>>;
|
|
854
874
|
invalid: import("vue").Ref<import("vue").DeepReadonly<boolean>>;
|
|
855
875
|
}) => any;
|
|
856
876
|
};
|
|
@@ -944,8 +964,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
944
964
|
} | undefined;
|
|
945
965
|
readonly _errors: readonly string[];
|
|
946
966
|
} | undefined>> | undefined;
|
|
947
|
-
submit: (() => boolean) | undefined;
|
|
948
|
-
validate: (() => boolean) | undefined;
|
|
967
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
968
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
949
969
|
invalid: import("vue").ComputedRef<boolean>;
|
|
950
970
|
fields: import("vue").Ref<Set<string>>;
|
|
951
971
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<AnyZodObject, string>>>;
|
|
@@ -993,8 +1013,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
993
1013
|
} | undefined;
|
|
994
1014
|
readonly _errors: readonly string[];
|
|
995
1015
|
} | undefined>> | undefined;
|
|
996
|
-
submit: (() => boolean) | undefined;
|
|
997
|
-
validate: (() => boolean) | undefined;
|
|
1016
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
1017
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
998
1018
|
invalid: import("vue").ComputedRef<boolean>;
|
|
999
1019
|
fields: import("vue").Ref<Set<string>>;
|
|
1000
1020
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<AnyZodObject, string>>>;
|
|
@@ -1024,8 +1044,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
1024
1044
|
} | undefined;
|
|
1025
1045
|
readonly _errors: readonly string[];
|
|
1026
1046
|
} | undefined>> | undefined;
|
|
1027
|
-
submit: (() => boolean) | undefined;
|
|
1028
|
-
validate: (() => boolean) | undefined;
|
|
1047
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
1048
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
1029
1049
|
invalid: import("vue").ComputedRef<boolean>;
|
|
1030
1050
|
fields: import("vue").Ref<Set<string>>;
|
|
1031
1051
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<AnyZodObject, string>>>;
|
|
@@ -1038,8 +1058,8 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
1038
1058
|
formData: Partial<{
|
|
1039
1059
|
[x: string]: any;
|
|
1040
1060
|
}> | undefined;
|
|
1041
|
-
submit: () => boolean
|
|
1042
|
-
validate: () => boolean
|
|
1061
|
+
submit: () => Promise<boolean>;
|
|
1062
|
+
validate: () => Promise<boolean>;
|
|
1043
1063
|
errors: Readonly<import("vue").Ref<{
|
|
1044
1064
|
readonly [x: string]: {
|
|
1045
1065
|
readonly _errors: readonly string[];
|
|
@@ -1275,15 +1295,15 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
1275
1295
|
formData: Partial<{
|
|
1276
1296
|
[x: string]: any;
|
|
1277
1297
|
}> | undefined;
|
|
1278
|
-
submit: () => boolean
|
|
1279
|
-
validate: () => boolean
|
|
1298
|
+
submit: () => Promise<boolean>;
|
|
1299
|
+
validate: () => Promise<boolean>;
|
|
1280
1300
|
errors: Readonly<import("vue").Ref<{
|
|
1281
1301
|
readonly [x: string]: {
|
|
1282
1302
|
readonly _errors: readonly string[];
|
|
1283
1303
|
} | undefined;
|
|
1284
1304
|
readonly _errors: readonly string[];
|
|
1285
1305
|
}>>;
|
|
1286
|
-
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | undefined>>;
|
|
1306
|
+
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | "submitting" | "updated" | "unknown" | undefined>>;
|
|
1287
1307
|
invalid: import("vue").Ref<import("vue").DeepReadonly<boolean>>;
|
|
1288
1308
|
}) => any;
|
|
1289
1309
|
};
|
|
@@ -1296,6 +1316,12 @@ export declare const useForm: <Schema extends FormSchema>(schema: Schema, option
|
|
|
1296
1316
|
formData: import("vue").Ref<Partial<{
|
|
1297
1317
|
[x: string]: any;
|
|
1298
1318
|
} | undefined>>;
|
|
1319
|
+
validate: (value?: Partial<{
|
|
1320
|
+
[x: string]: any;
|
|
1321
|
+
} | undefined>) => Promise<boolean>;
|
|
1322
|
+
submit: () => Promise<boolean>;
|
|
1323
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
1324
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
1299
1325
|
};
|
|
1300
1326
|
export { FormFieldType } from './enums';
|
|
1301
1327
|
export { defaultObjectBySchema } from './utils';
|
|
@@ -1315,8 +1341,8 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1315
1341
|
$props: {
|
|
1316
1342
|
template?: FormTemplate<Schema> | undefined;
|
|
1317
1343
|
modelValue?: Record<string, any> | undefined;
|
|
1318
|
-
updateThrottle?: number | undefined;
|
|
1319
1344
|
continuosValidation?: boolean | undefined;
|
|
1345
|
+
tag?: string | undefined;
|
|
1320
1346
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
1321
1347
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
1322
1348
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1380,17 +1406,17 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1380
1406
|
$emit: (event: "invalid" | "valid" | "update:modelValue" | "submit", ...args: any[]) => void;
|
|
1381
1407
|
$el: any;
|
|
1382
1408
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
1409
|
+
continuosValidation: {
|
|
1410
|
+
type: BooleanConstructor;
|
|
1411
|
+
default: boolean;
|
|
1412
|
+
};
|
|
1383
1413
|
modelValue: {
|
|
1384
1414
|
type: ObjectConstructor;
|
|
1385
1415
|
default: () => {};
|
|
1386
1416
|
};
|
|
1387
|
-
|
|
1388
|
-
type:
|
|
1389
|
-
default:
|
|
1390
|
-
};
|
|
1391
|
-
continuosValidation: {
|
|
1392
|
-
type: BooleanConstructor;
|
|
1393
|
-
default: boolean;
|
|
1417
|
+
tag: {
|
|
1418
|
+
type: StringConstructor;
|
|
1419
|
+
default: string;
|
|
1394
1420
|
};
|
|
1395
1421
|
template: {
|
|
1396
1422
|
type: import("vue").PropType<FormTemplate<Schema>>;
|
|
@@ -1403,16 +1429,18 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1403
1429
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
1404
1430
|
}, {
|
|
1405
1431
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
1406
|
-
submit: () => boolean
|
|
1407
|
-
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean
|
|
1432
|
+
submit: () => Promise<boolean>;
|
|
1433
|
+
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => Promise<boolean>;
|
|
1434
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
1435
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
1408
1436
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
1409
1437
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
1410
1438
|
invalid: import("vue").ComputedRef<boolean>;
|
|
1411
1439
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], string, {
|
|
1412
1440
|
template: FormTemplate<Schema>;
|
|
1413
1441
|
modelValue: Record<string, any>;
|
|
1414
|
-
updateThrottle: number;
|
|
1415
1442
|
continuosValidation: boolean;
|
|
1443
|
+
tag: string;
|
|
1416
1444
|
}, {}, string, {}> & {
|
|
1417
1445
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
1418
1446
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -1434,17 +1462,17 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1434
1462
|
$nextTick: typeof import("vue").nextTick;
|
|
1435
1463
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
1436
1464
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
1465
|
+
continuosValidation: {
|
|
1466
|
+
type: BooleanConstructor;
|
|
1467
|
+
default: boolean;
|
|
1468
|
+
};
|
|
1437
1469
|
modelValue: {
|
|
1438
1470
|
type: ObjectConstructor;
|
|
1439
1471
|
default: () => {};
|
|
1440
1472
|
};
|
|
1441
|
-
|
|
1442
|
-
type:
|
|
1443
|
-
default:
|
|
1444
|
-
};
|
|
1445
|
-
continuosValidation: {
|
|
1446
|
-
type: BooleanConstructor;
|
|
1447
|
-
default: boolean;
|
|
1473
|
+
tag: {
|
|
1474
|
+
type: StringConstructor;
|
|
1475
|
+
default: string;
|
|
1448
1476
|
};
|
|
1449
1477
|
template: {
|
|
1450
1478
|
type: import("vue").PropType<FormTemplate<Schema>>;
|
|
@@ -1457,8 +1485,10 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1457
1485
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
1458
1486
|
} & import("vue").ShallowUnwrapRef<{
|
|
1459
1487
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
1460
|
-
submit: () => boolean
|
|
1461
|
-
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean
|
|
1488
|
+
submit: () => Promise<boolean>;
|
|
1489
|
+
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => Promise<boolean>;
|
|
1490
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
1491
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
1462
1492
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
1463
1493
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
1464
1494
|
invalid: import("vue").ComputedRef<boolean>;
|
|
@@ -1467,17 +1497,17 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1467
1497
|
__isTeleport?: undefined;
|
|
1468
1498
|
__isSuspense?: undefined;
|
|
1469
1499
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
1500
|
+
continuosValidation: {
|
|
1501
|
+
type: BooleanConstructor;
|
|
1502
|
+
default: boolean;
|
|
1503
|
+
};
|
|
1470
1504
|
modelValue: {
|
|
1471
1505
|
type: ObjectConstructor;
|
|
1472
1506
|
default: () => {};
|
|
1473
1507
|
};
|
|
1474
|
-
|
|
1475
|
-
type:
|
|
1476
|
-
default:
|
|
1477
|
-
};
|
|
1478
|
-
continuosValidation: {
|
|
1479
|
-
type: BooleanConstructor;
|
|
1480
|
-
default: boolean;
|
|
1508
|
+
tag: {
|
|
1509
|
+
type: StringConstructor;
|
|
1510
|
+
default: string;
|
|
1481
1511
|
};
|
|
1482
1512
|
template: {
|
|
1483
1513
|
type: import("vue").PropType<FormTemplate<Schema>>;
|
|
@@ -1490,24 +1520,28 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1490
1520
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
1491
1521
|
}, {
|
|
1492
1522
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
1493
|
-
submit: () => boolean
|
|
1494
|
-
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => boolean
|
|
1523
|
+
submit: () => Promise<boolean>;
|
|
1524
|
+
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => Promise<boolean>;
|
|
1525
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
1526
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
1495
1527
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>>;
|
|
1496
1528
|
status: Readonly<import("vue").Ref<import("./enums").FormStatus | undefined>>;
|
|
1497
1529
|
invalid: import("vue").ComputedRef<boolean>;
|
|
1498
1530
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit")[], "invalid" | "valid" | "update:modelValue" | "submit", {
|
|
1499
1531
|
template: FormTemplate<Schema>;
|
|
1500
1532
|
modelValue: Record<string, any>;
|
|
1501
|
-
updateThrottle: number;
|
|
1502
1533
|
continuosValidation: boolean;
|
|
1534
|
+
tag: string;
|
|
1503
1535
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
1504
1536
|
$slots: {
|
|
1505
1537
|
default: (_: {
|
|
1506
1538
|
formData: unknown extends Partial<import("zod").TypeOf<Schema>> | undefined ? undefined : Partial<import("zod").TypeOf<Schema>> | undefined;
|
|
1507
|
-
submit: () => boolean
|
|
1508
|
-
validate: () => boolean
|
|
1539
|
+
submit: () => Promise<boolean>;
|
|
1540
|
+
validate: () => Promise<boolean>;
|
|
1541
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
1542
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
1509
1543
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>>>>;
|
|
1510
|
-
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | undefined>>;
|
|
1544
|
+
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | "submitting" | "updated" | "unknown" | undefined>>;
|
|
1511
1545
|
invalid: import("vue").Ref<import("vue").DeepReadonly<boolean>>;
|
|
1512
1546
|
}) => any;
|
|
1513
1547
|
};
|
|
@@ -1594,8 +1628,8 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1594
1628
|
}, {
|
|
1595
1629
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
1596
1630
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
1597
|
-
submit: (() => boolean) | undefined;
|
|
1598
|
-
validate: (() => boolean) | undefined;
|
|
1631
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
1632
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
1599
1633
|
invalid: import("vue").ComputedRef<boolean>;
|
|
1600
1634
|
fields: import("vue").Ref<Set<string>>;
|
|
1601
1635
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
@@ -1636,8 +1670,8 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1636
1670
|
} & import("vue").ShallowUnwrapRef<{
|
|
1637
1671
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
1638
1672
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
1639
|
-
submit: (() => boolean) | undefined;
|
|
1640
|
-
validate: (() => boolean) | undefined;
|
|
1673
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
1674
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
1641
1675
|
invalid: import("vue").ComputedRef<boolean>;
|
|
1642
1676
|
fields: import("vue").Ref<Set<string>>;
|
|
1643
1677
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
@@ -1660,8 +1694,8 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1660
1694
|
}, {
|
|
1661
1695
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema>> | undefined> | undefined;
|
|
1662
1696
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
1663
|
-
submit: (() => boolean) | undefined;
|
|
1664
|
-
validate: (() => boolean) | undefined;
|
|
1697
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
1698
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
1665
1699
|
invalid: import("vue").ComputedRef<boolean>;
|
|
1666
1700
|
fields: import("vue").Ref<Set<string>>;
|
|
1667
1701
|
fieldsErrors: import("vue").Ref<Map<string, import("zod").inferFormattedError<Schema, string>>>;
|
|
@@ -1672,8 +1706,8 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1672
1706
|
default: (_: {
|
|
1673
1707
|
invalid: boolean;
|
|
1674
1708
|
formData: unknown extends Partial<import("zod").TypeOf<Schema>> | undefined ? undefined : Partial<import("zod").TypeOf<Schema>> | undefined;
|
|
1675
|
-
submit: () => boolean
|
|
1676
|
-
validate: () => boolean
|
|
1709
|
+
submit: () => Promise<boolean>;
|
|
1710
|
+
validate: () => Promise<boolean>;
|
|
1677
1711
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>>>>;
|
|
1678
1712
|
fieldsErrors: Map<string, Record<string, {
|
|
1679
1713
|
_errors: string[];
|
|
@@ -1902,10 +1936,10 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1902
1936
|
$slots: {
|
|
1903
1937
|
default: (_: {
|
|
1904
1938
|
formData: unknown extends Partial<import("zod").TypeOf<Schema>> | undefined ? undefined : Partial<import("zod").TypeOf<Schema>> | undefined;
|
|
1905
|
-
submit: () => boolean
|
|
1906
|
-
validate: () => boolean
|
|
1939
|
+
submit: () => Promise<boolean>;
|
|
1940
|
+
validate: () => Promise<boolean>;
|
|
1907
1941
|
errors: Readonly<import("vue").Ref<import("vue").DeepReadonly<import("zod").inferFormattedError<Schema, string>>>>;
|
|
1908
|
-
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | undefined>>;
|
|
1942
|
+
status: import("vue").Ref<import("vue").DeepReadonly<"invalid" | "valid" | "submitting" | "updated" | "unknown" | undefined>>;
|
|
1909
1943
|
invalid: import("vue").Ref<import("vue").DeepReadonly<boolean>>;
|
|
1910
1944
|
}) => any;
|
|
1911
1945
|
};
|
|
@@ -1916,4 +1950,8 @@ export declare const formFactory: <Schema extends FormSchema>(schema: Schema, op
|
|
|
1916
1950
|
errors: import("vue").Ref<import("zod").inferFormattedError<Schema, string> | undefined>;
|
|
1917
1951
|
status: import("vue").Ref<import("./enums").FormStatus | undefined>;
|
|
1918
1952
|
formData: import("vue").Ref<Partial<import("zod").TypeOf<Schema> | undefined>>;
|
|
1953
|
+
validate: (value?: Partial<import("zod").TypeOf<Schema> | undefined>) => Promise<boolean>;
|
|
1954
|
+
submit: () => Promise<boolean>;
|
|
1955
|
+
ignoreUpdates: import("@vueuse/shared").IgnoredUpdater;
|
|
1956
|
+
stopUpdatesWatch: import("vue").WatchStopHandle;
|
|
1919
1957
|
};
|