@volverjs/form-vue 1.0.0-beta.9 → 1.0.0

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.
@@ -0,0 +1,135 @@
1
+ import { Component, InjectionKey, PropType, SlotsType, UnwrapRef } from 'vue';
2
+ import { RefinementCtx, z } from 'zod';
3
+ import { FormComponentOptions, FormSchema, FormTemplate, InjectedFormData, InjectedFormWrapperData, Path } from './types';
4
+ import { FormStatus } from './enums';
5
+ export declare function defineForm<Schema extends FormSchema, Type, FormTemplateComponent extends Component>(schema: Schema, provideKey: InjectionKey<InjectedFormData<Schema, Type>>, options: FormComponentOptions<Schema, Type>, VvFormTemplate: FormTemplateComponent, wrappers: Map<string, InjectedFormWrapperData<Schema>>): {
6
+ clear: () => void;
7
+ errors: import('vue').Ref<z.inferFormattedError<Schema, string> | undefined, z.inferFormattedError<Schema, string> | undefined>;
8
+ formData: import('vue').Ref<(undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined>;
9
+ ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
10
+ invalid: import('vue').ComputedRef<boolean>;
11
+ readonly: import('vue').Ref<boolean, boolean>;
12
+ reset: () => void;
13
+ status: import('vue').Ref<FormStatus | undefined, FormStatus | undefined>;
14
+ wrappers: Map<string, InjectedFormWrapperData<Schema>>;
15
+ stopUpdatesWatch: import('vue').WatchStopHandle;
16
+ submit: (options?: {
17
+ fields?: Set<Path<z.infer<Schema>>>;
18
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
19
+ }) => Promise<boolean>;
20
+ validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, options?: {
21
+ fields?: Set<Path<z.infer<Schema>>>;
22
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
23
+ }) => Promise<boolean>;
24
+ VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
25
+ continuousValidation: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ modelValue: {
30
+ type: ObjectConstructor;
31
+ default: () => {};
32
+ };
33
+ readonly: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ tag: {
38
+ type: StringConstructor;
39
+ default: string;
40
+ };
41
+ template: {
42
+ type: PropType<FormTemplate<Schema, Type>>;
43
+ default: undefined;
44
+ };
45
+ superRefine: {
46
+ type: PropType<(arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>>;
47
+ default: undefined;
48
+ };
49
+ validateFields: {
50
+ type: PropType<Path<z.infer<Schema>>[]>;
51
+ default: undefined;
52
+ };
53
+ }>, {
54
+ clear: () => void;
55
+ errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<z.inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>;
56
+ formData: import('vue').Ref<(undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined>;
57
+ ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
58
+ invalid: import('vue').ComputedRef<boolean>;
59
+ isReadonly: import('vue').Ref<boolean, boolean>;
60
+ reset: () => void;
61
+ status: Readonly<import('vue').Ref<FormStatus | undefined, FormStatus | undefined>>;
62
+ stopUpdatesWatch: import('vue').WatchStopHandle;
63
+ submit: () => Promise<boolean>;
64
+ validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, options?: {
65
+ fields?: Set<Path<z.infer<Schema>>>;
66
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
67
+ }) => Promise<boolean>;
68
+ wrappers: Map<string, InjectedFormWrapperData<Schema>>;
69
+ }, {}, {}, {}, 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<{
70
+ continuousValidation: {
71
+ type: BooleanConstructor;
72
+ default: boolean;
73
+ };
74
+ modelValue: {
75
+ type: ObjectConstructor;
76
+ default: () => {};
77
+ };
78
+ readonly: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
82
+ tag: {
83
+ type: StringConstructor;
84
+ default: string;
85
+ };
86
+ template: {
87
+ type: PropType<FormTemplate<Schema, Type>>;
88
+ default: undefined;
89
+ };
90
+ superRefine: {
91
+ type: PropType<(arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>>;
92
+ default: undefined;
93
+ };
94
+ validateFields: {
95
+ type: PropType<Path<z.infer<Schema>>[]>;
96
+ default: undefined;
97
+ };
98
+ }>> & Readonly<{
99
+ onInvalid?: ((...args: any[]) => any) | undefined;
100
+ onValid?: ((...args: any[]) => any) | undefined;
101
+ onReset?: ((...args: any[]) => any) | undefined;
102
+ onSubmit?: ((...args: any[]) => any) | undefined;
103
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
104
+ "onUpdate:readonly"?: ((...args: any[]) => any) | undefined;
105
+ }>, {
106
+ superRefine: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
107
+ readonly: boolean;
108
+ tag: string;
109
+ template: FormTemplate<Schema, Type>;
110
+ continuousValidation: boolean;
111
+ modelValue: Record<string, any>;
112
+ validateFields: Path<z.TypeOf<Schema>>[];
113
+ }, SlotsType<{
114
+ default: {
115
+ errors: UnwrapRef<Readonly<import('vue').Ref<import('vue').DeepReadonly<z.inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>>;
116
+ formData: UnwrapRef<import('vue').Ref<(undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined>>;
117
+ invalid: UnwrapRef<import('vue').ComputedRef<boolean>>;
118
+ readonly: UnwrapRef<import('vue').Ref<boolean, boolean>>;
119
+ status: UnwrapRef<Readonly<import('vue').Ref<FormStatus | undefined, FormStatus | undefined>>>;
120
+ wrappers: typeof wrappers;
121
+ clear: () => void;
122
+ ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
123
+ reset: () => void;
124
+ stopUpdatesWatch: import('vue').WatchStopHandle;
125
+ submit: (options?: {
126
+ fields?: Set<Path<z.infer<Schema>>>;
127
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
128
+ }) => Promise<boolean>;
129
+ validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, options?: {
130
+ fields?: Set<Path<z.infer<Schema>>>;
131
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
132
+ }) => Promise<boolean>;
133
+ };
134
+ }>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
135
+ };
@@ -0,0 +1,130 @@
1
+ import { Component, ConcreteComponent, DeepReadonly, InjectionKey, PropType, Ref, SlotsType } from 'vue';
2
+ import { z } from 'zod';
3
+ import { FormFieldComponentOptions, FormSchema, InjectedFormData, InjectedFormFieldData, InjectedFormWrapperData, Path } from './types';
4
+ import { FormFieldType } from './enums';
5
+ export declare function defineFormField<Schema extends FormSchema, Type = undefined>(formProvideKey: InjectionKey<InjectedFormData<Schema, Type>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>, formFieldInjectionKey: InjectionKey<InjectedFormFieldData<Schema>>, options?: FormFieldComponentOptions): import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ type: {
7
+ type: PropType<`${FormFieldType}`>;
8
+ validator: (value: FormFieldType) => boolean;
9
+ default: FormFieldType;
10
+ };
11
+ is: {
12
+ type: PropType<Component | string>;
13
+ default: undefined;
14
+ };
15
+ name: {
16
+ type: PropType<Path<z.infer<Schema>>>;
17
+ required: true;
18
+ };
19
+ props: {
20
+ type: PropType<Partial<z.infer<Schema> | undefined | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined)>>;
21
+ default: () => {};
22
+ };
23
+ showValid: {
24
+ type: BooleanConstructor;
25
+ default: boolean;
26
+ };
27
+ defaultValue: {
28
+ type: (ObjectConstructor | ArrayConstructor | BooleanConstructor | StringConstructor | NumberConstructor)[];
29
+ default: undefined;
30
+ };
31
+ lazyLoad: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
35
+ readonly: {
36
+ type: BooleanConstructor;
37
+ default: undefined;
38
+ };
39
+ }>, {
40
+ component: import('vue').ComputedRef<{
41
+ new (...args: any[]): any;
42
+ __isFragment?: never;
43
+ __isTeleport?: never;
44
+ __isSuspense?: never;
45
+ } | ConcreteComponent>;
46
+ hasProps: import('vue').ComputedRef<{
47
+ name: {} | ([{
48
+ type: PropType<Path<z.infer<Schema>>>;
49
+ required: true;
50
+ }] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
51
+ type: PropType<Path<z.infer<Schema>>>;
52
+ required: true;
53
+ });
54
+ invalid: boolean;
55
+ valid: boolean | undefined;
56
+ type: FormFieldType | undefined;
57
+ invalidLabel: any;
58
+ modelValue: any;
59
+ readonly: boolean;
60
+ 'onUpdate:modelValue': (value: unknown) => void;
61
+ }>;
62
+ invalid: import('vue').ComputedRef<boolean>;
63
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "update:formData")[], "invalid" | "valid" | "update:modelValue" | "update:formData", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
64
+ type: {
65
+ type: PropType<`${FormFieldType}`>;
66
+ validator: (value: FormFieldType) => boolean;
67
+ default: FormFieldType;
68
+ };
69
+ is: {
70
+ type: PropType<Component | string>;
71
+ default: undefined;
72
+ };
73
+ name: {
74
+ type: PropType<Path<z.infer<Schema>>>;
75
+ required: true;
76
+ };
77
+ props: {
78
+ type: PropType<Partial<z.infer<Schema> | undefined | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined)>>;
79
+ default: () => {};
80
+ };
81
+ showValid: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ defaultValue: {
86
+ type: (ObjectConstructor | ArrayConstructor | BooleanConstructor | StringConstructor | NumberConstructor)[];
87
+ default: undefined;
88
+ };
89
+ lazyLoad: {
90
+ type: BooleanConstructor;
91
+ default: boolean;
92
+ };
93
+ readonly: {
94
+ type: BooleanConstructor;
95
+ default: undefined;
96
+ };
97
+ }>> & Readonly<{
98
+ onInvalid?: ((...args: any[]) => any) | undefined;
99
+ onValid?: ((...args: any[]) => any) | undefined;
100
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
101
+ "onUpdate:formData"?: ((...args: any[]) => any) | undefined;
102
+ }>, {
103
+ type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
104
+ readonly: boolean;
105
+ props: [{
106
+ type: PropType<Partial<z.infer<Schema> | undefined | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined)>>;
107
+ default: () => {};
108
+ }] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
109
+ type: PropType<Partial<z.infer<Schema> | undefined | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined)>>;
110
+ default: () => {};
111
+ };
112
+ is: string | Component;
113
+ showValid: boolean;
114
+ defaultValue: string | number | boolean | unknown[] | Record<string, any>;
115
+ lazyLoad: boolean;
116
+ }, SlotsType<{
117
+ [key: string]: any;
118
+ default: {
119
+ errors: DeepReadonly<z.inferFormattedError<Schema>>;
120
+ formData?: undefined extends Type ? Partial<z.infer<Schema>> : Type;
121
+ formErrors?: DeepReadonly<z.inferFormattedError<Schema, string>>;
122
+ invalid: boolean;
123
+ invalidLabel?: string[];
124
+ modelValue: any;
125
+ readonly: boolean;
126
+ onUpdate: (value: unknown) => void;
127
+ submit?: InjectedFormData<Schema, Type>["submit"];
128
+ validate?: InjectedFormData<Schema, Type>["validate"];
129
+ };
130
+ }>, {}, {}, "invalid" | "type" | "errors" | "component" | "hasProps" | "invalidLabel" | "is", import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,109 @@
1
+ import { Component, DeepReadonly, InjectionKey, PropType, Ref, SlotsType } from 'vue';
2
+ import { z } from 'zod';
3
+ import { FormSchema, InjectedFormData, InjectedFormFieldsGroupData, InjectedFormWrapperData, Path } from './types';
4
+ export declare function defineFormFieldsGroup<Schema extends FormSchema, Type = undefined>(formProvideKey: InjectionKey<InjectedFormData<Schema, Type>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>, formFieldsGroupInjectionKey: InjectionKey<InjectedFormFieldsGroupData<Schema>>): import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ is: {
6
+ type: PropType<Component | string>;
7
+ default: undefined;
8
+ };
9
+ names: {
10
+ type: PropType<Path<z.infer<Schema>>[] | Record<string, Path<z.infer<Schema>>>>;
11
+ required: true;
12
+ };
13
+ props: {
14
+ type: PropType<Partial<z.infer<Schema> | undefined | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined)>>;
15
+ default: () => {};
16
+ };
17
+ showValid: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ defaultValues: {
22
+ type: PropType<Record<Path<z.infer<Schema>>, any>>;
23
+ default: undefined;
24
+ };
25
+ readonly: {
26
+ type: BooleanConstructor;
27
+ default: undefined;
28
+ };
29
+ }>, {
30
+ component: import('vue').ComputedRef<{
31
+ render(): import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
32
+ [key: string]: any;
33
+ }>[];
34
+ }>;
35
+ hasProps: import('vue').ComputedRef<{
36
+ names: {};
37
+ invalid: boolean;
38
+ invalids: Record<string, boolean>;
39
+ valid: boolean | undefined;
40
+ invalidLabels: Record<string, string[]> | undefined;
41
+ modelValue: Record<string, any>;
42
+ readonly: boolean;
43
+ }>;
44
+ invalid: import('vue').ComputedRef<boolean>;
45
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "update:formData")[], "invalid" | "valid" | "update:modelValue" | "update:formData", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
46
+ is: {
47
+ type: PropType<Component | string>;
48
+ default: undefined;
49
+ };
50
+ names: {
51
+ type: PropType<Path<z.infer<Schema>>[] | Record<string, Path<z.infer<Schema>>>>;
52
+ required: true;
53
+ };
54
+ props: {
55
+ type: PropType<Partial<z.infer<Schema> | undefined | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined)>>;
56
+ default: () => {};
57
+ };
58
+ showValid: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
62
+ defaultValues: {
63
+ type: PropType<Record<Path<z.infer<Schema>>, any>>;
64
+ default: undefined;
65
+ };
66
+ readonly: {
67
+ type: BooleanConstructor;
68
+ default: undefined;
69
+ };
70
+ }>> & Readonly<{
71
+ onInvalid?: ((...args: any[]) => any) | undefined;
72
+ onValid?: ((...args: any[]) => any) | undefined;
73
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
74
+ "onUpdate:formData"?: ((...args: any[]) => any) | undefined;
75
+ }>, {
76
+ readonly: boolean;
77
+ props: [{
78
+ type: PropType<Partial<z.infer<Schema> | undefined | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined)>>;
79
+ default: () => {};
80
+ }] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
81
+ type: PropType<Partial<z.infer<Schema> | undefined | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined)>>;
82
+ default: () => {};
83
+ };
84
+ is: string | Component;
85
+ showValid: boolean;
86
+ defaultValues: [{
87
+ type: PropType<Record<Path<z.infer<Schema>>, any>>;
88
+ default: undefined;
89
+ }] extends [import('vue').Prop<infer V, infer D>] ? unknown extends V ? keyof V extends never ? import('@vue/shared').IfAny<V, V, D> : V : V : {
90
+ type: PropType<Record<Path<z.infer<Schema>>, any>>;
91
+ default: undefined;
92
+ };
93
+ }, SlotsType<{
94
+ [key: string]: any;
95
+ default: {
96
+ errors?: Record<Path<z.infer<Schema>>, z.inferFormattedError<Schema>>;
97
+ formData?: undefined extends Type ? Partial<z.infer<Schema>> : Type;
98
+ formErrors?: DeepReadonly<z.inferFormattedError<Schema>>;
99
+ invalid: boolean;
100
+ invalids: Record<string, boolean>;
101
+ invalidLabels?: Record<string, string[]>;
102
+ modelValue: Record<string, any>;
103
+ onUpdate: (value: Record<string, any>) => void;
104
+ onUpdateField: (name: string, value: any) => void;
105
+ readonly: boolean;
106
+ submit?: InjectedFormData<Schema, Type>["submit"];
107
+ validate?: InjectedFormData<Schema, Type>["validate"];
108
+ };
109
+ }>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,40 @@
1
+ import { Component, DeepReadonly, InjectionKey, PropType, SlotsType, VNode } from 'vue';
2
+ import { FormSchema, InjectedFormData, FormTemplate } from './types';
3
+ import { z } from 'zod';
4
+ import { FormStatus } from './enums';
5
+ export declare function defineFormTemplate<Schema extends FormSchema, Type = undefined>(formProvideKey: InjectionKey<InjectedFormData<Schema, Type>>, VvFormField: Component): import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ schema: {
7
+ type: PropType<FormTemplate<Schema, Type>>;
8
+ required: true;
9
+ };
10
+ scope: {
11
+ type: PropType<Record<string, unknown>>;
12
+ default: () => {};
13
+ };
14
+ }>, (() => (VNode<import('vue').RendererNode, import('vue').RendererElement, {
15
+ [key: string]: any;
16
+ }> | VNode<import('vue').RendererNode, import('vue').RendererElement, {
17
+ [key: string]: any;
18
+ }>[] | undefined)[]) | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
19
+ schema: {
20
+ type: PropType<FormTemplate<Schema, Type>>;
21
+ required: true;
22
+ };
23
+ scope: {
24
+ type: PropType<Record<string, unknown>>;
25
+ default: () => {};
26
+ };
27
+ }>> & Readonly<{}>, {
28
+ scope: Record<string, unknown>;
29
+ }, SlotsType<{
30
+ default: {
31
+ errors?: DeepReadonly<z.inferFormattedError<Schema>>;
32
+ formData?: undefined extends Type ? Partial<z.infer<Schema>> : Type;
33
+ invalid: boolean;
34
+ status?: FormStatus;
35
+ submit?: InjectedFormData<Schema, Type>["submit"];
36
+ validate?: InjectedFormData<Schema, Type>["validate"];
37
+ clear?: InjectedFormData<Schema, Type>["clear"];
38
+ reset?: InjectedFormData<Schema, Type>["reset"];
39
+ };
40
+ }>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,65 @@
1
+ import { DeepReadonly, InjectionKey, Ref, SlotsType } from 'vue';
2
+ import { z } from 'zod';
3
+ import { FormSchema, InjectedFormData, InjectedFormWrapperData, Path } from './types';
4
+ export declare function defineFormWrapper<Schema extends FormSchema, Type = undefined>(formProvideKey: InjectionKey<InjectedFormData<Schema, Type>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>): import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ name: {
6
+ type: StringConstructor;
7
+ required: true;
8
+ };
9
+ tag: {
10
+ type: StringConstructor;
11
+ default: undefined;
12
+ };
13
+ readonly: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ }>, {
18
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined, DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
19
+ fields: Ref<Map<string, Path<z.TypeOf<Schema>>>, Map<string, Path<z.TypeOf<Schema>>>>;
20
+ fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>, Map<string, z.inferFormattedError<Schema, string>>>;
21
+ formData: Ref<(undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined> | undefined;
22
+ invalid: import('vue').ComputedRef<boolean>;
23
+ readonly: import('vue').ComputedRef<boolean>;
24
+ clear: (() => void) | undefined;
25
+ reset: (() => void) | undefined;
26
+ submit: (() => Promise<boolean>) | undefined;
27
+ validate: ((formData?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, options?: {
28
+ fields?: Set<Path<z.TypeOf<Schema>>> | undefined;
29
+ superRefine?: ((arg: z.TypeOf<Schema>, ctx: z.RefinementCtx) => void | Promise<void>) | undefined;
30
+ } | undefined) => Promise<boolean>) | undefined;
31
+ validateWrapper: () => Promise<boolean>;
32
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
33
+ name: {
34
+ type: StringConstructor;
35
+ required: true;
36
+ };
37
+ tag: {
38
+ type: StringConstructor;
39
+ default: undefined;
40
+ };
41
+ readonly: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ }>> & Readonly<{
46
+ onInvalid?: ((...args: any[]) => any) | undefined;
47
+ onValid?: ((...args: any[]) => any) | undefined;
48
+ }>, {
49
+ readonly: boolean;
50
+ tag: string;
51
+ }, SlotsType<{
52
+ default: {
53
+ errors?: DeepReadonly<z.inferFormattedError<Schema>>;
54
+ fieldsErrors: Map<string, z.inferFormattedError<Schema>>;
55
+ formData?: undefined extends Type ? Partial<z.infer<Schema>> : Type;
56
+ formErrors?: DeepReadonly<z.inferFormattedError<Schema>>;
57
+ invalid: boolean;
58
+ readonly: boolean;
59
+ clear?: InjectedFormData<Schema, Type>["clear"];
60
+ reset?: InjectedFormData<Schema, Type>["reset"];
61
+ submit?: InjectedFormData<Schema, Type>["submit"];
62
+ validate?: InjectedFormData<Schema, Type>["validate"];
63
+ validateWrapper?: () => Promise<boolean>;
64
+ };
65
+ }>, {}, {}, "invalid" | "reset" | "readonly" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;
@@ -25,6 +25,7 @@ export declare enum FormStatus {
25
25
  invalid = "invalid",
26
26
  valid = "valid",
27
27
  submitting = "submitting",
28
+ reset = "reset",
28
29
  updated = "updated",
29
30
  unknown = "unknown"
30
31
  }