@volverjs/form-vue 1.0.0-beta.1 → 1.0.0-beta.11

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 24/Consulting
3
+ Copyright (c) 2023-present 8 Wave S.r.l. and contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -10,11 +10,11 @@
10
10
 
11
11
  <br>
12
12
 
13
- #### proudly powered by
13
+ maintained with ❤️ by
14
14
 
15
15
  <br>
16
16
 
17
- [![24/Consulting](docs/static/24consulting.svg)](https://24consulting.it)
17
+ [![8 Wave](docs/static/8wave.svg)](https://8wave.it)
18
18
 
19
19
  <br>
20
20
 
@@ -56,7 +56,7 @@ const form = createForm({
56
56
  schema
57
57
  // lazyLoad: boolean - default false
58
58
  // updateThrottle: number - default 500
59
- // continuosValidation: boolean - default false
59
+ // continuousValidation: boolean - default false
60
60
  // sideEffects?: (data: any) => void
61
61
  })
62
62
 
@@ -118,7 +118,7 @@ Use the `v-model` directive (or only `:model-value` to set the initial value of
118
118
  The form data two way binding is **throttled** by default (500ms) to avoid performance issues. The throttle can be changed with the `updateThrottle` option or prop.
119
119
 
120
120
  By default form validation **stops** when a **valid state** is reached.
121
- To activate **continuos validation** use the `continuosValidation` option or prop.
121
+ To activate **continuous validation** use the `continuousValidation` option or prop.
122
122
 
123
123
  ```vue
124
124
  <script lang="ts" setup>
@@ -131,7 +131,7 @@ To activate **continuos validation** use the `continuosValidation` option or pro
131
131
  </script>
132
132
 
133
133
  <template>
134
- <VvForm v-model="formData" :update-throttle="1000" continuos-validation>
134
+ <VvForm v-model="formData" :update-throttle="1000" continuous-validation>
135
135
  <!-- ... -->
136
136
  </VvForm>
137
137
  </template>
@@ -155,7 +155,7 @@ The **default settings** are **inherited** from the plugin (if it's installed).
155
155
  const { VvForm, VvFormWrapper, VvFormField } = useForm(schema, {
156
156
  // lazyLoad: boolean - default false
157
157
  // updateThrottle: number - default 500
158
- // continuosValidation: boolean - default false
158
+ // continuousValidation: boolean - default false
159
159
  // sideEffects?: (formData: any) => void
160
160
  })
161
161
  </script>
@@ -0,0 +1,203 @@
1
+ import { FormStatus } from './enums';
2
+ import { FormComponentOptions, FormSchema, FormTemplate, InjectedFormData } from './types';
3
+ import { z } from 'zod';
4
+ import { IgnoredUpdater } from '@vueuse/core';
5
+ import { Component, InjectionKey, DeepReadonly, Ref, PropType, WatchStopHandle } from 'vue';
6
+
7
+ export declare const defineForm: <Schema extends FormSchema>(schema: Schema, provideKey: InjectionKey<InjectedFormData<Schema>>, options?: FormComponentOptions<Schema>, VvFormTemplate?: Component) => {
8
+ errors: Ref<z.inferFormattedError<Schema, string> | undefined>;
9
+ status: Ref<FormStatus | undefined>;
10
+ invalid: import('vue').ComputedRef<boolean>;
11
+ readonly: Ref<boolean>;
12
+ formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
13
+ validate: (value?: Partial<z.TypeOf<Schema> | undefined>) => Promise<boolean>;
14
+ submit: () => Promise<boolean>;
15
+ ignoreUpdates: IgnoredUpdater;
16
+ stopUpdatesWatch: WatchStopHandle;
17
+ /**
18
+ * An hack to add types to the default slot
19
+ */
20
+ VvForm: {
21
+ new (...args: any[]): import('vue').CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
22
+ continuousValidation: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ modelValue: {
27
+ type: ObjectConstructor;
28
+ default: () => {};
29
+ };
30
+ readonly: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ tag: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ template: {
39
+ type: PropType<FormTemplate<Schema>>;
40
+ default: undefined;
41
+ };
42
+ }>> & {
43
+ onInvalid?: ((...args: any[]) => any) | undefined;
44
+ onValid?: ((...args: any[]) => any) | undefined;
45
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
46
+ onSubmit?: ((...args: any[]) => any) | undefined;
47
+ "onUpdate:readonly"?: ((...args: any[]) => any) | undefined;
48
+ }, {
49
+ formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
50
+ submit: () => Promise<boolean>;
51
+ validate: (value?: Partial<z.TypeOf<Schema> | undefined>) => Promise<boolean>;
52
+ ignoreUpdates: IgnoredUpdater;
53
+ stopUpdatesWatch: WatchStopHandle;
54
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>;
55
+ status: Readonly<Ref<FormStatus | undefined>>;
56
+ invalid: import("vue").ComputedRef<boolean>;
57
+ isReadonly: Ref<boolean>;
58
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit" | "update:readonly")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
59
+ continuousValidation: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
63
+ modelValue: {
64
+ type: ObjectConstructor;
65
+ default: () => {};
66
+ };
67
+ readonly: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ tag: {
72
+ type: StringConstructor;
73
+ default: string;
74
+ };
75
+ template: {
76
+ type: PropType<FormTemplate<Schema>>;
77
+ default: undefined;
78
+ };
79
+ }>> & {
80
+ onInvalid?: ((...args: any[]) => any) | undefined;
81
+ onValid?: ((...args: any[]) => any) | undefined;
82
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
83
+ onSubmit?: ((...args: any[]) => any) | undefined;
84
+ "onUpdate:readonly"?: ((...args: any[]) => any) | undefined;
85
+ }, {
86
+ readonly: boolean;
87
+ template: FormTemplate<Schema>;
88
+ modelValue: Record<string, any>;
89
+ continuousValidation: boolean;
90
+ tag: string;
91
+ }, true, {}, {}, {
92
+ P: {};
93
+ B: {};
94
+ D: {};
95
+ C: {};
96
+ M: {};
97
+ Defaults: {};
98
+ }, Readonly<import("vue").ExtractPropTypes<{
99
+ continuousValidation: {
100
+ type: BooleanConstructor;
101
+ default: boolean;
102
+ };
103
+ modelValue: {
104
+ type: ObjectConstructor;
105
+ default: () => {};
106
+ };
107
+ readonly: {
108
+ type: BooleanConstructor;
109
+ default: boolean;
110
+ };
111
+ tag: {
112
+ type: StringConstructor;
113
+ default: string;
114
+ };
115
+ template: {
116
+ type: PropType<FormTemplate<Schema>>;
117
+ default: undefined;
118
+ };
119
+ }>> & {
120
+ onInvalid?: ((...args: any[]) => any) | undefined;
121
+ onValid?: ((...args: any[]) => any) | undefined;
122
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
123
+ onSubmit?: ((...args: any[]) => any) | undefined;
124
+ "onUpdate:readonly"?: ((...args: any[]) => any) | undefined;
125
+ }, {
126
+ formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
127
+ submit: () => Promise<boolean>;
128
+ validate: (value?: Partial<z.TypeOf<Schema> | undefined>) => Promise<boolean>;
129
+ ignoreUpdates: IgnoredUpdater;
130
+ stopUpdatesWatch: WatchStopHandle;
131
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>;
132
+ status: Readonly<Ref<FormStatus | undefined>>;
133
+ invalid: import("vue").ComputedRef<boolean>;
134
+ isReadonly: Ref<boolean>;
135
+ }, {}, {}, {}, {
136
+ readonly: boolean;
137
+ template: FormTemplate<Schema>;
138
+ modelValue: Record<string, any>;
139
+ continuousValidation: boolean;
140
+ tag: string;
141
+ }>;
142
+ __isFragment?: undefined;
143
+ __isTeleport?: undefined;
144
+ __isSuspense?: undefined;
145
+ } & import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
146
+ continuousValidation: {
147
+ type: BooleanConstructor;
148
+ default: boolean;
149
+ };
150
+ modelValue: {
151
+ type: ObjectConstructor;
152
+ default: () => {};
153
+ };
154
+ readonly: {
155
+ type: BooleanConstructor;
156
+ default: boolean;
157
+ };
158
+ tag: {
159
+ type: StringConstructor;
160
+ default: string;
161
+ };
162
+ template: {
163
+ type: PropType<FormTemplate<Schema>>;
164
+ default: undefined;
165
+ };
166
+ }>> & {
167
+ onInvalid?: ((...args: any[]) => any) | undefined;
168
+ onValid?: ((...args: any[]) => any) | undefined;
169
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
170
+ onSubmit?: ((...args: any[]) => any) | undefined;
171
+ "onUpdate:readonly"?: ((...args: any[]) => any) | undefined;
172
+ }, {
173
+ formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
174
+ submit: () => Promise<boolean>;
175
+ validate: (value?: Partial<z.TypeOf<Schema> | undefined>) => Promise<boolean>;
176
+ ignoreUpdates: IgnoredUpdater;
177
+ stopUpdatesWatch: WatchStopHandle;
178
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>;
179
+ status: Readonly<Ref<FormStatus | undefined>>;
180
+ invalid: import("vue").ComputedRef<boolean>;
181
+ isReadonly: Ref<boolean>;
182
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "submit" | "update:readonly")[], "invalid" | "valid" | "update:modelValue" | "submit" | "update:readonly", {
183
+ readonly: boolean;
184
+ template: FormTemplate<Schema>;
185
+ modelValue: Record<string, any>;
186
+ continuousValidation: boolean;
187
+ tag: string;
188
+ }, {}, string, {}> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
189
+ $slots: {
190
+ default: (_: {
191
+ formData: unknown extends Partial<z.TypeOf<Schema>> | undefined ? undefined : Partial<z.TypeOf<Schema>> | undefined;
192
+ submit: () => Promise<boolean>;
193
+ validate: () => Promise<boolean>;
194
+ ignoreUpdates: IgnoredUpdater;
195
+ stopUpdatesWatch: WatchStopHandle;
196
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema>>>>;
197
+ status: Ref<DeepReadonly<`${FormStatus}` | undefined>>;
198
+ invalid: Ref<DeepReadonly<boolean>>;
199
+ readonly: Ref<boolean>;
200
+ }) => any;
201
+ };
202
+ });
203
+ };
@@ -1,8 +1,9 @@
1
- import { type Component, type InjectionKey, type PropType, type Ref, type ConcreteComponent } from 'vue';
2
- import type { z } from 'zod';
1
+ import { InjectedFormData, InjectedFormWrapperData, InjectedFormFieldData, FormFieldComponentOptions, Path, FormSchema } from './types';
3
2
  import { FormFieldType } from './enums';
4
- import type { InjectedFormData, InjectedFormWrapperData, InjectedFormFieldData, FormFieldComponentOptions, Path, FormSchema } from './types';
5
- export declare const defineFormField: <Schema extends FormSchema>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>, formFieldInjectionKey: InjectionKey<InjectedFormFieldData<Schema>>, options?: FormFieldComponentOptions) => import("vue").DefineComponent<{
3
+ import { z } from 'zod';
4
+ import { Component, InjectionKey, PropType, Ref, ConcreteComponent } from 'vue';
5
+
6
+ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>, formFieldInjectionKey: InjectionKey<InjectedFormFieldData<Schema>>, options?: FormFieldComponentOptions) => import('vue').DefineComponent<{
6
7
  type: {
7
8
  type: PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;
8
9
  validator: (value: FormFieldType) => boolean;
@@ -17,7 +18,7 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
17
18
  required: true;
18
19
  };
19
20
  props: {
20
- type: PropType<Partial<z.TypeOf<Schema> | ((formData?: Ref<ObjectConstructor>) => Partial<z.TypeOf<Schema>> | undefined) | undefined>>;
21
+ type: PropType<Partial<z.TypeOf<Schema> | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined) | undefined>>;
21
22
  default: () => {};
22
23
  };
23
24
  showValid: {
@@ -32,6 +33,10 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
32
33
  type: BooleanConstructor;
33
34
  default: boolean;
34
35
  };
36
+ readonly: {
37
+ type: BooleanConstructor;
38
+ default: undefined;
39
+ };
35
40
  }, {
36
41
  component: import("vue").ComputedRef<{
37
42
  new (...args: any[]): any;
@@ -52,10 +57,11 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
52
57
  type: FormFieldType | undefined;
53
58
  invalidLabel: any;
54
59
  modelValue: any;
60
+ readonly: {} | undefined;
55
61
  'onUpdate:modelValue': (value: unknown) => void;
56
62
  }>;
57
63
  invalid: import("vue").ComputedRef<boolean>;
58
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:formData" | "update:modelValue")[], "invalid" | "valid" | "update:formData" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
64
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:formData" | "update:modelValue")[], "invalid" | "valid" | "update:formData" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
59
65
  type: {
60
66
  type: PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;
61
67
  validator: (value: FormFieldType) => boolean;
@@ -70,7 +76,7 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
70
76
  required: true;
71
77
  };
72
78
  props: {
73
- type: PropType<Partial<z.TypeOf<Schema> | ((formData?: Ref<ObjectConstructor>) => Partial<z.TypeOf<Schema>> | undefined) | undefined>>;
79
+ type: PropType<Partial<z.TypeOf<Schema> | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined) | undefined>>;
74
80
  default: () => {};
75
81
  };
76
82
  showValid: {
@@ -85,6 +91,10 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
85
91
  type: BooleanConstructor;
86
92
  default: boolean;
87
93
  };
94
+ readonly: {
95
+ type: BooleanConstructor;
96
+ default: undefined;
97
+ };
88
98
  }>> & {
89
99
  onInvalid?: ((...args: any[]) => any) | undefined;
90
100
  onValid?: ((...args: any[]) => any) | undefined;
@@ -93,14 +103,15 @@ export declare const defineFormField: <Schema extends FormSchema>(formProvideKey
93
103
  }, {
94
104
  type: "number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetime-local" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom";
95
105
  props: [{
96
- type: PropType<Partial<z.TypeOf<Schema> | ((formData?: Ref<ObjectConstructor>) => Partial<z.TypeOf<Schema>> | undefined) | undefined>>;
106
+ type: PropType<Partial<z.TypeOf<Schema> | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined) | undefined>>;
97
107
  default: () => {};
98
108
  }] extends [import("vue").Prop<infer V, infer D>] ? unknown extends V ? import("@vue/shared").IfAny<V, V, D> : V : {
99
- type: PropType<Partial<z.TypeOf<Schema> | ((formData?: Ref<ObjectConstructor>) => Partial<z.TypeOf<Schema>> | undefined) | undefined>>;
109
+ type: PropType<Partial<z.TypeOf<Schema> | ((formData?: Ref<ObjectConstructor>) => Partial<z.infer<Schema>> | undefined) | undefined>>;
100
110
  default: () => {};
101
111
  };
102
112
  is: Component;
103
113
  showValid: boolean;
104
114
  defaultValue: string | number | boolean | unknown[] | Record<string, any>;
105
115
  lazyLoad: boolean;
116
+ readonly: boolean;
106
117
  }, {}>;
@@ -0,0 +1,83 @@
1
+ import { FormStatus } from './enums';
2
+ import { FormSchema, InjectedFormData, FormTemplate } from './types';
3
+ import { TypeOf, z } from 'zod';
4
+ import { Component, PropType, InjectionKey, DeepReadonly, Ref, VNode } from 'vue';
5
+
6
+ export declare const defineFormTemplate: <Schema extends FormSchema>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, VvFormField: Component) => {
7
+ new (...args: any[]): import('vue').CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
8
+ schema: {
9
+ type: PropType<FormTemplate<Schema>>;
10
+ required: true;
11
+ };
12
+ scope: {
13
+ type: PropType<Record<string, unknown>>;
14
+ default: () => {};
15
+ };
16
+ }>>, (() => (VNode<import("vue").RendererNode, import("vue").RendererElement, {
17
+ [key: string]: any;
18
+ }> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
19
+ [key: string]: any;
20
+ }>[] | undefined)[]) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
21
+ schema: {
22
+ type: PropType<FormTemplate<Schema>>;
23
+ required: true;
24
+ };
25
+ scope: {
26
+ type: PropType<Record<string, unknown>>;
27
+ default: () => {};
28
+ };
29
+ }>>, {
30
+ scope: Record<string, unknown>;
31
+ }, true, {}, {}, {
32
+ P: {};
33
+ B: {};
34
+ D: {};
35
+ C: {};
36
+ M: {};
37
+ Defaults: {};
38
+ }, Readonly<import("vue").ExtractPropTypes<{
39
+ schema: {
40
+ type: PropType<FormTemplate<Schema>>;
41
+ required: true;
42
+ };
43
+ scope: {
44
+ type: PropType<Record<string, unknown>>;
45
+ default: () => {};
46
+ };
47
+ }>>, {} | (() => (VNode<import("vue").RendererNode, import("vue").RendererElement, {
48
+ [key: string]: any;
49
+ }> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
50
+ [key: string]: any;
51
+ }>[] | undefined)[]), {}, {}, {}, {
52
+ scope: Record<string, unknown>;
53
+ }>;
54
+ __isFragment?: undefined;
55
+ __isTeleport?: undefined;
56
+ __isSuspense?: undefined;
57
+ } & import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
58
+ schema: {
59
+ type: PropType<FormTemplate<Schema>>;
60
+ required: true;
61
+ };
62
+ scope: {
63
+ type: PropType<Record<string, unknown>>;
64
+ default: () => {};
65
+ };
66
+ }>>, (() => (VNode<import("vue").RendererNode, import("vue").RendererElement, {
67
+ [key: string]: any;
68
+ }> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
69
+ [key: string]: any;
70
+ }>[] | undefined)[]) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
71
+ scope: Record<string, unknown>;
72
+ }, {}, string, {}> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
73
+ $slots: {
74
+ default: (_: {
75
+ formData: unknown extends Partial<TypeOf<Schema>> | undefined ? undefined : Partial<TypeOf<Schema>> | undefined;
76
+ submit: () => Promise<boolean>;
77
+ validate: () => Promise<boolean>;
78
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema>>>>;
79
+ status: Ref<DeepReadonly<`${FormStatus}` | undefined>>;
80
+ invalid: Ref<DeepReadonly<boolean>>;
81
+ }) => any;
82
+ };
83
+ });
@@ -0,0 +1,108 @@
1
+ import { FormSchema, InjectedFormData, InjectedFormWrapperData } from './types';
2
+ import { TypeOf, z } from 'zod';
3
+ import { InjectionKey, Ref, DeepReadonly } from 'vue';
4
+
5
+ export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>) => {
6
+ new (...args: any[]): import('vue').CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
7
+ name: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ };
11
+ tag: {
12
+ type: StringConstructor;
13
+ default: undefined;
14
+ };
15
+ }>> & {
16
+ onInvalid?: ((...args: any[]) => any) | undefined;
17
+ onValid?: ((...args: any[]) => any) | undefined;
18
+ }, {
19
+ formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
20
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
21
+ submit: (() => Promise<boolean>) | undefined;
22
+ validate: (() => Promise<boolean>) | undefined;
23
+ invalid: import("vue").ComputedRef<boolean>;
24
+ fields: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>>;
25
+ fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
26
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
27
+ name: {
28
+ type: StringConstructor;
29
+ required: true;
30
+ };
31
+ tag: {
32
+ type: StringConstructor;
33
+ default: undefined;
34
+ };
35
+ }>> & {
36
+ onInvalid?: ((...args: any[]) => any) | undefined;
37
+ onValid?: ((...args: any[]) => any) | undefined;
38
+ }, {
39
+ tag: string;
40
+ }, true, {}, {}, {
41
+ P: {};
42
+ B: {};
43
+ D: {};
44
+ C: {};
45
+ M: {};
46
+ Defaults: {};
47
+ }, Readonly<import("vue").ExtractPropTypes<{
48
+ name: {
49
+ type: StringConstructor;
50
+ required: true;
51
+ };
52
+ tag: {
53
+ type: StringConstructor;
54
+ default: undefined;
55
+ };
56
+ }>> & {
57
+ onInvalid?: ((...args: any[]) => any) | undefined;
58
+ onValid?: ((...args: any[]) => any) | undefined;
59
+ }, {
60
+ formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
61
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
62
+ submit: (() => Promise<boolean>) | undefined;
63
+ validate: (() => Promise<boolean>) | undefined;
64
+ invalid: import("vue").ComputedRef<boolean>;
65
+ fields: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>>;
66
+ fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
67
+ }, {}, {}, {}, {
68
+ tag: string;
69
+ }>;
70
+ __isFragment?: undefined;
71
+ __isTeleport?: undefined;
72
+ __isSuspense?: undefined;
73
+ } & import('vue').ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
74
+ name: {
75
+ type: StringConstructor;
76
+ required: true;
77
+ };
78
+ tag: {
79
+ type: StringConstructor;
80
+ default: undefined;
81
+ };
82
+ }>> & {
83
+ onInvalid?: ((...args: any[]) => any) | undefined;
84
+ onValid?: ((...args: any[]) => any) | undefined;
85
+ }, {
86
+ formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
87
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
88
+ submit: (() => Promise<boolean>) | undefined;
89
+ validate: (() => Promise<boolean>) | undefined;
90
+ invalid: import("vue").ComputedRef<boolean>;
91
+ fields: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>>;
92
+ fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
93
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", {
94
+ tag: string;
95
+ }, {}, string, {}> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
96
+ $slots: {
97
+ default: (_: {
98
+ invalid: boolean;
99
+ formData: unknown extends Partial<TypeOf<Schema>> | undefined ? undefined : Partial<TypeOf<Schema>> | undefined;
100
+ submit: () => Promise<boolean>;
101
+ validate: () => Promise<boolean>;
102
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema>>>>;
103
+ fieldsErrors: Map<string, Record<string, {
104
+ _errors: string[];
105
+ }>>;
106
+ }) => any;
107
+ };
108
+ });
@@ -23,5 +23,8 @@ export declare enum FormFieldType {
23
23
  }
24
24
  export declare enum FormStatus {
25
25
  invalid = "invalid",
26
- valid = "valid"
26
+ valid = "valid",
27
+ submitting = "submitting",
28
+ updated = "updated",
29
+ unknown = "unknown"
27
30
  }