@volverjs/form-vue 1.0.0-beta.6 → 1.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +312 -271
- package/dist/index.umd.js +1 -1
- package/dist/src/VvForm.d.ts +99 -110
- package/dist/src/VvFormField.d.ts +11 -1
- package/dist/src/VvFormTemplate.d.ts +22 -54
- package/dist/src/VvFormWrapper.d.ts +45 -80
- package/dist/src/index.d.ts +569 -773
- package/dist/src/types.d.ts +2 -0
- package/package.json +22 -22
- package/src/VvForm.ts +56 -7
- package/src/VvFormField.ts +14 -0
- package/src/index.ts +2 -0
- package/src/types.ts +12 -10
|
@@ -2,85 +2,48 @@ import { type InjectionKey, type Ref, type DeepReadonly } from 'vue';
|
|
|
2
2
|
import type { TypeOf, z } from 'zod';
|
|
3
3
|
import type { FormSchema, InjectedFormData, InjectedFormWrapperData } from './types';
|
|
4
4
|
export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideKey: InjectionKey<InjectedFormData<Schema>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>) => {
|
|
5
|
-
new (...args: any[]): {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
tag: string;
|
|
10
|
-
}> & Omit<{
|
|
11
|
-
readonly name: string;
|
|
12
|
-
readonly tag?: string | undefined;
|
|
13
|
-
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
14
|
-
onValid?: ((...args: any[]) => any) | undefined;
|
|
15
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
-
name: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
required: true;
|
|
19
|
-
};
|
|
20
|
-
tag: {
|
|
21
|
-
type: StringConstructor;
|
|
22
|
-
default: undefined;
|
|
23
|
-
};
|
|
24
|
-
}>> & {
|
|
25
|
-
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
26
|
-
onValid?: ((...args: any[]) => any) | undefined;
|
|
27
|
-
}, "tag">;
|
|
28
|
-
$attrs: {
|
|
29
|
-
[x: string]: unknown;
|
|
5
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
name: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
required: true;
|
|
30
9
|
};
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
tag: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: undefined;
|
|
33
13
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}, {
|
|
54
|
-
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
55
|
-
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
56
|
-
submit: (() => Promise<boolean>) | undefined;
|
|
57
|
-
validate: (() => Promise<boolean>) | undefined;
|
|
58
|
-
invalid: import("vue").ComputedRef<boolean>;
|
|
59
|
-
fields: Ref<Set<string>>;
|
|
60
|
-
fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
|
|
61
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], string, {
|
|
62
|
-
tag: string;
|
|
63
|
-
}, {}, string, {}> & {
|
|
64
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
65
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
66
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
67
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
68
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
69
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
70
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
71
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
72
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
73
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
74
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
75
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
76
|
-
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
77
|
-
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
78
|
-
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;
|
|
14
|
+
}>> & {
|
|
15
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
19
|
+
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
20
|
+
submit: (() => Promise<boolean>) | undefined;
|
|
21
|
+
validate: (() => Promise<boolean>) | undefined;
|
|
22
|
+
invalid: import("vue").ComputedRef<boolean>;
|
|
23
|
+
fields: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>>;
|
|
24
|
+
fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
|
|
25
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
26
|
+
name: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
tag: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: undefined;
|
|
79
33
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
34
|
+
}>> & {
|
|
35
|
+
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
onValid?: ((...args: any[]) => any) | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
tag: string;
|
|
39
|
+
}, true, {}, {}, {
|
|
40
|
+
P: {};
|
|
41
|
+
B: {};
|
|
42
|
+
D: {};
|
|
43
|
+
C: {};
|
|
44
|
+
M: {};
|
|
45
|
+
Defaults: {};
|
|
46
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
84
47
|
name: {
|
|
85
48
|
type: StringConstructor;
|
|
86
49
|
required: true;
|
|
@@ -92,15 +55,17 @@ export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideK
|
|
|
92
55
|
}>> & {
|
|
93
56
|
onInvalid?: ((...args: any[]) => any) | undefined;
|
|
94
57
|
onValid?: ((...args: any[]) => any) | undefined;
|
|
95
|
-
}
|
|
58
|
+
}, {
|
|
96
59
|
formData: Ref<Partial<TypeOf<Schema>> | undefined> | undefined;
|
|
97
60
|
errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
|
|
98
61
|
submit: (() => Promise<boolean>) | undefined;
|
|
99
62
|
validate: (() => Promise<boolean>) | undefined;
|
|
100
63
|
invalid: import("vue").ComputedRef<boolean>;
|
|
101
|
-
fields: Ref<Set<string
|
|
64
|
+
fields: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>>;
|
|
102
65
|
fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
|
|
103
|
-
}
|
|
66
|
+
}, {}, {}, {}, {
|
|
67
|
+
tag: string;
|
|
68
|
+
}>;
|
|
104
69
|
__isFragment?: undefined;
|
|
105
70
|
__isTeleport?: undefined;
|
|
106
71
|
__isSuspense?: undefined;
|
|
@@ -122,7 +87,7 @@ export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideK
|
|
|
122
87
|
submit: (() => Promise<boolean>) | undefined;
|
|
123
88
|
validate: (() => Promise<boolean>) | undefined;
|
|
124
89
|
invalid: import("vue").ComputedRef<boolean>;
|
|
125
|
-
fields: Ref<Set<string
|
|
90
|
+
fields: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>>;
|
|
126
91
|
fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>>;
|
|
127
92
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", {
|
|
128
93
|
tag: string;
|