@volverjs/form-vue 0.0.10-beta.5 → 0.0.10-beta.6
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/VvForm.d.ts +132 -37
- package/dist/VvFormField.d.ts +7 -19
- package/dist/VvFormTemplate.d.ts +20 -0
- package/dist/VvFormWrapper.d.ts +10 -22
- package/dist/enums.d.ts +4 -0
- package/dist/index.d.ts +304 -81
- package/dist/index.es.js +400 -307
- package/dist/index.umd.js +1 -1
- package/dist/types.d.ts +98 -20
- package/dist/utils.d.ts +2 -13
- package/package.json +2 -1
- package/src/VvForm.ts +146 -120
- package/src/VvFormField.ts +16 -18
- package/src/VvFormTemplate.ts +161 -0
- package/src/VvFormWrapper.ts +21 -23
- package/src/enums.ts +5 -0
- package/src/index.ts +22 -19
- package/src/types.d.ts +98 -20
- package/src/utils.ts +2 -6
package/dist/VvForm.d.ts
CHANGED
|
@@ -1,41 +1,120 @@
|
|
|
1
|
-
import { type InjectionKey } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import type { InjectedFormData } from './types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
valid = "valid"
|
|
7
|
-
}
|
|
8
|
-
export declare const defineForm: <Schema extends z.AnyZodObject | z.ZodEffects<z.AnyZodObject, {
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
}, {
|
|
11
|
-
[x: string]: any;
|
|
12
|
-
}> | z.ZodEffects<z.ZodEffects<z.AnyZodObject, {
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
}, {
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
}>, {
|
|
17
|
-
[x: string]: any;
|
|
18
|
-
}, {
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
}>>(schema: Schema, provideKey: InjectionKey<InjectedFormData<Schema>>, options?: {
|
|
1
|
+
import { type InjectionKey, type DeepReadonly, type Ref } from 'vue';
|
|
2
|
+
import type { z, TypeOf } from 'zod';
|
|
3
|
+
import type { FormSchema, InjectedFormData } from './types';
|
|
4
|
+
import { FormStatus } from './enums';
|
|
5
|
+
export declare const defineForm: <Schema extends FormSchema>(schema: Schema, provideKey: InjectionKey<InjectedFormData<Schema>>, options?: {
|
|
21
6
|
updateThrottle?: number;
|
|
22
7
|
continuosValidation?: boolean;
|
|
23
8
|
}) => {
|
|
24
|
-
errors:
|
|
25
|
-
status:
|
|
26
|
-
formData:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
errors: Ref<z.ZodFormattedError<z.TypeOf<Schema>> | undefined>;
|
|
10
|
+
status: Ref<FormStatus | undefined>;
|
|
11
|
+
formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
|
|
12
|
+
/**
|
|
13
|
+
* An hack to add types to the default slot
|
|
14
|
+
*/
|
|
15
|
+
VvForm: {
|
|
16
|
+
new (...args: any[]): {
|
|
17
|
+
$: import("vue").ComponentInternalInstance;
|
|
18
|
+
$data: {};
|
|
19
|
+
$props: Partial<{
|
|
20
|
+
modelValue: Record<string, any>;
|
|
21
|
+
continuosValidation: boolean;
|
|
22
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
modelValue: {
|
|
24
|
+
type: ObjectConstructor;
|
|
25
|
+
default: () => {};
|
|
26
|
+
};
|
|
27
|
+
continuosValidation: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
}>> & {
|
|
32
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
35
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "modelValue" | "continuosValidation">;
|
|
37
|
+
$attrs: {
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
$refs: {
|
|
41
|
+
[x: string]: unknown;
|
|
42
|
+
};
|
|
43
|
+
$slots: Readonly<{
|
|
44
|
+
[name: string]: import("vue").Slot | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
47
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
48
|
+
$emit: (event: "invalid" | "valid" | "submit" | "update:modelValue", ...args: any[]) => void;
|
|
49
|
+
$el: any;
|
|
50
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
51
|
+
modelValue: {
|
|
52
|
+
type: ObjectConstructor;
|
|
53
|
+
default: () => {};
|
|
54
|
+
};
|
|
55
|
+
continuosValidation: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
}>> & {
|
|
60
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
61
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
62
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
63
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
|
|
66
|
+
submit: () => boolean;
|
|
67
|
+
errors: Readonly<Ref<DeepReadonly<z.ZodFormattedError<z.TypeOf<Schema>>> | undefined>>;
|
|
68
|
+
status: Readonly<Ref<FormStatus | undefined>>;
|
|
69
|
+
invalid: import("vue").ComputedRef<boolean>;
|
|
70
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "submit" | "update:modelValue")[], string, {
|
|
71
|
+
modelValue: Record<string, any>;
|
|
72
|
+
continuosValidation: boolean;
|
|
73
|
+
}, {}, string> & {
|
|
74
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
75
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
76
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
77
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
78
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
79
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
80
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
81
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
82
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
83
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
84
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
85
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
86
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
87
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
88
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
89
|
+
};
|
|
90
|
+
$forceUpdate: () => void;
|
|
91
|
+
$nextTick: typeof import("vue").nextTick;
|
|
92
|
+
$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;
|
|
93
|
+
} & Readonly<import("vue").ExtractPropTypes<{
|
|
94
|
+
modelValue: {
|
|
95
|
+
type: ObjectConstructor;
|
|
96
|
+
default: () => {};
|
|
97
|
+
};
|
|
98
|
+
continuosValidation: {
|
|
99
|
+
type: BooleanConstructor;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
102
|
+
}>> & {
|
|
103
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
104
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
105
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
106
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
107
|
+
} & import("vue").ShallowUnwrapRef<{
|
|
108
|
+
formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
|
|
109
|
+
submit: () => boolean;
|
|
110
|
+
errors: Readonly<Ref<DeepReadonly<z.ZodFormattedError<z.TypeOf<Schema>>> | undefined>>;
|
|
111
|
+
status: Readonly<Ref<FormStatus | undefined>>;
|
|
112
|
+
invalid: import("vue").ComputedRef<boolean>;
|
|
113
|
+
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
114
|
+
__isFragment?: undefined;
|
|
115
|
+
__isTeleport?: undefined;
|
|
116
|
+
__isSuspense?: undefined;
|
|
117
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
39
118
|
modelValue: {
|
|
40
119
|
type: ObjectConstructor;
|
|
41
120
|
default: () => {};
|
|
@@ -45,12 +124,28 @@ export declare const defineForm: <Schema extends z.AnyZodObject | z.ZodEffects<z
|
|
|
45
124
|
default: boolean;
|
|
46
125
|
};
|
|
47
126
|
}>> & {
|
|
48
|
-
onValid?: ((...args: any[]) => any) | undefined;
|
|
49
127
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
128
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
50
129
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
51
130
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
52
131
|
}, {
|
|
132
|
+
formData: Ref<Partial<z.TypeOf<Schema> | undefined>>;
|
|
133
|
+
submit: () => boolean;
|
|
134
|
+
errors: Readonly<Ref<DeepReadonly<z.ZodFormattedError<z.TypeOf<Schema>>> | undefined>>;
|
|
135
|
+
status: Readonly<Ref<FormStatus | undefined>>;
|
|
136
|
+
invalid: import("vue").ComputedRef<boolean>;
|
|
137
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "submit" | "update:modelValue")[], "invalid" | "valid" | "submit" | "update:modelValue", {
|
|
53
138
|
modelValue: Record<string, any>;
|
|
54
139
|
continuosValidation: boolean;
|
|
55
|
-
}
|
|
140
|
+
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
141
|
+
$slots: {
|
|
142
|
+
default: (_: {
|
|
143
|
+
formData: unknown extends Partial<z.TypeOf<Schema>> | undefined ? undefined : Partial<z.TypeOf<Schema>> | undefined;
|
|
144
|
+
submit: () => boolean;
|
|
145
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>>>>;
|
|
146
|
+
status: Ref<DeepReadonly<`${FormStatus}` | undefined>>;
|
|
147
|
+
invalid: Ref<DeepReadonly<boolean>>;
|
|
148
|
+
}) => any;
|
|
149
|
+
};
|
|
150
|
+
});
|
|
56
151
|
};
|
package/dist/VvFormField.d.ts
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import { type Component, type InjectionKey, type PropType, type Ref, type ConcreteComponent } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { z } from 'zod';
|
|
3
3
|
import { FormFieldType } from './enums';
|
|
4
|
-
import type { InjectedFormData, InjectedFormWrapperData, InjectedFormFieldData, FormComposableOptions } from './types';
|
|
5
|
-
export declare const defineFormField: <Schema extends
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
}, {
|
|
8
|
-
[x: string]: any;
|
|
9
|
-
}> | ZodEffects<ZodEffects<AnyZodObject, {
|
|
10
|
-
[x: string]: any;
|
|
11
|
-
}, {
|
|
12
|
-
[x: string]: any;
|
|
13
|
-
}>, {
|
|
14
|
-
[x: string]: any;
|
|
15
|
-
}, {
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
}>>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>, formFieldInjectionKey: InjectionKey<InjectedFormFieldData<Schema>>, options?: FormComposableOptions) => import("vue").DefineComponent<{
|
|
4
|
+
import type { InjectedFormData, InjectedFormWrapperData, InjectedFormFieldData, FormComposableOptions, 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?: FormComposableOptions) => import("vue").DefineComponent<{
|
|
18
6
|
type: {
|
|
19
7
|
type: PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetimeLocal" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;
|
|
20
8
|
validator: (value: FormFieldType) => boolean;
|
|
@@ -25,7 +13,7 @@ export declare const defineFormField: <Schema extends AnyZodObject | ZodEffects<
|
|
|
25
13
|
default: undefined;
|
|
26
14
|
};
|
|
27
15
|
name: {
|
|
28
|
-
type:
|
|
16
|
+
type: PropType<Path<z.TypeOf<Schema>>>;
|
|
29
17
|
required: true;
|
|
30
18
|
};
|
|
31
19
|
props: {
|
|
@@ -49,7 +37,7 @@ export declare const defineFormField: <Schema extends AnyZodObject | ZodEffects<
|
|
|
49
37
|
} | ConcreteComponent>;
|
|
50
38
|
hasProps: import("vue").ComputedRef<any>;
|
|
51
39
|
invalid: import("vue").ComputedRef<boolean>;
|
|
52
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
40
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid" | "update:modelValue" | "update:formData")[], "invalid" | "valid" | "update:modelValue" | "update:formData", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
41
|
type: {
|
|
54
42
|
type: PropType<"number" | "text" | "email" | "password" | "tel" | "url" | "search" | "date" | "time" | "datetimeLocal" | "month" | "week" | "color" | "select" | "checkbox" | "radio" | "textarea" | "radioGroup" | "checkboxGroup" | "combobox" | "custom">;
|
|
55
43
|
validator: (value: FormFieldType) => boolean;
|
|
@@ -60,7 +48,7 @@ export declare const defineFormField: <Schema extends AnyZodObject | ZodEffects<
|
|
|
60
48
|
default: undefined;
|
|
61
49
|
};
|
|
62
50
|
name: {
|
|
63
|
-
type:
|
|
51
|
+
type: PropType<Path<z.TypeOf<Schema>>>;
|
|
64
52
|
required: true;
|
|
65
53
|
};
|
|
66
54
|
props: {
|
|
@@ -76,8 +64,8 @@ export declare const defineFormField: <Schema extends AnyZodObject | ZodEffects<
|
|
|
76
64
|
default: undefined;
|
|
77
65
|
};
|
|
78
66
|
}>> & {
|
|
79
|
-
onValid?: ((...args: any[]) => any) | undefined;
|
|
80
67
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
81
69
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
82
70
|
"onUpdate:formData"?: ((...args: any[]) => any) | undefined;
|
|
83
71
|
}, {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Component, type InjectionKey, type DeepReadonly, type Ref } from 'vue';
|
|
2
|
+
import type { TypeOf, z } from 'zod';
|
|
3
|
+
import type { FormSchema, InjectedFormData } from './types';
|
|
4
|
+
import type { FormStatus } from './enums';
|
|
5
|
+
export declare const defineFormTemplate: <Schema extends FormSchema>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, VvFormField: Component) => (import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any> | {
|
|
6
|
+
new (...args: any[]): any;
|
|
7
|
+
__isFragment?: undefined;
|
|
8
|
+
__isTeleport?: undefined;
|
|
9
|
+
__isSuspense?: undefined;
|
|
10
|
+
}) & (new () => {
|
|
11
|
+
$slots: {
|
|
12
|
+
default: (_: {
|
|
13
|
+
formData: unknown extends Partial<TypeOf<Schema>> | undefined ? undefined : Partial<TypeOf<Schema>> | undefined;
|
|
14
|
+
submit: () => boolean;
|
|
15
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>>>>;
|
|
16
|
+
status: Ref<DeepReadonly<`${FormStatus}` | undefined>>;
|
|
17
|
+
invalid: Ref<DeepReadonly<boolean>>;
|
|
18
|
+
}) => any;
|
|
19
|
+
};
|
|
20
|
+
});
|
package/dist/VvFormWrapper.d.ts
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import { type InjectionKey, type Ref, type DeepReadonly } from 'vue';
|
|
2
|
-
import type {
|
|
3
|
-
import type { InjectedFormData, InjectedFormWrapperData } from './types';
|
|
4
|
-
export declare const defineFormWrapper: <Schema extends
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
}, {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
}> | ZodEffects<ZodEffects<AnyZodObject, {
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
}, {
|
|
11
|
-
[x: string]: any;
|
|
12
|
-
}>, {
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
}, {
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
}>>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>) => {
|
|
2
|
+
import type { TypeOf, z } from 'zod';
|
|
3
|
+
import type { FormSchema, InjectedFormData, InjectedFormWrapperData } from './types';
|
|
4
|
+
export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>) => {
|
|
17
5
|
new (...args: any[]): {
|
|
18
6
|
$: import("vue").ComponentInternalInstance;
|
|
19
7
|
$data: {};
|
|
@@ -29,8 +17,8 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
|
|
|
29
17
|
default: undefined;
|
|
30
18
|
};
|
|
31
19
|
}>> & {
|
|
32
|
-
onValid?: ((...args: any[]) => any) | undefined;
|
|
33
20
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
34
22
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "tag">;
|
|
35
23
|
$attrs: {
|
|
36
24
|
[x: string]: unknown;
|
|
@@ -43,7 +31,7 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
|
|
|
43
31
|
}>;
|
|
44
32
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
45
33
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
46
|
-
$emit: (event: "
|
|
34
|
+
$emit: (event: "invalid" | "valid", ...args: any[]) => void;
|
|
47
35
|
$el: any;
|
|
48
36
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
49
37
|
name: {
|
|
@@ -55,8 +43,8 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
|
|
|
55
43
|
default: undefined;
|
|
56
44
|
};
|
|
57
45
|
}>> & {
|
|
58
|
-
onValid?: ((...args: any[]) => any) | undefined;
|
|
59
46
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
47
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
60
48
|
}, {
|
|
61
49
|
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
62
50
|
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema_1, string>>>> | undefined;
|
|
@@ -65,7 +53,7 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
|
|
|
65
53
|
fieldsErrors: Ref<Map<string, Record<string, {
|
|
66
54
|
_errors: string[];
|
|
67
55
|
}>>>;
|
|
68
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
56
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], string, {
|
|
69
57
|
tag: string;
|
|
70
58
|
}, {}, string> & {
|
|
71
59
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -97,8 +85,8 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
|
|
|
97
85
|
default: undefined;
|
|
98
86
|
};
|
|
99
87
|
}>> & {
|
|
100
|
-
onValid?: ((...args: any[]) => any) | undefined;
|
|
101
88
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
89
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
102
90
|
} & import("vue").ShallowUnwrapRef<{
|
|
103
91
|
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
104
92
|
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema_1, string>>>> | undefined;
|
|
@@ -121,8 +109,8 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
|
|
|
121
109
|
default: undefined;
|
|
122
110
|
};
|
|
123
111
|
}>> & {
|
|
124
|
-
onValid?: ((...args: any[]) => any) | undefined;
|
|
125
112
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
126
114
|
}, {
|
|
127
115
|
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
128
116
|
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema_1, string>>>> | undefined;
|
|
@@ -131,7 +119,7 @@ export declare const defineFormWrapper: <Schema extends AnyZodObject | ZodEffect
|
|
|
131
119
|
fieldsErrors: Ref<Map<string, Record<string, {
|
|
132
120
|
_errors: string[];
|
|
133
121
|
}>>>;
|
|
134
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
122
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", {
|
|
135
123
|
tag: string;
|
|
136
124
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
137
125
|
$slots: {
|