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

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