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

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.
@@ -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
- $: import("vue").ComponentInternalInstance;
7
- $data: {};
8
- $props: Partial<{
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
- $refs: {
32
- [x: string]: unknown;
10
+ tag: {
11
+ type: StringConstructor;
12
+ default: undefined;
33
13
  };
34
- $slots: Readonly<{
35
- [name: string]: import("vue").Slot<any> | undefined;
36
- }>;
37
- $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
38
- $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
39
- $emit: (event: "invalid" | "valid", ...args: any[]) => void;
40
- $el: any;
41
- $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
42
- name: {
43
- type: StringConstructor;
44
- required: true;
45
- };
46
- tag: {
47
- type: StringConstructor;
48
- default: undefined;
49
- };
50
- }>> & {
51
- onInvalid?: ((...args: any[]) => any) | undefined;
52
- onValid?: ((...args: any[]) => any) | undefined;
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
- $forceUpdate: () => void;
81
- $nextTick: typeof import("vue").nextTick;
82
- $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;
83
- } & Readonly<import("vue").ExtractPropTypes<{
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
- } & import("vue").ShallowUnwrapRef<{
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
- }> & {} & import("vue").ComponentCustomProperties & {};
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;
@@ -133,7 +98,7 @@ export declare const defineFormWrapper: <Schema extends FormSchema>(formProvideK
133
98
  formData: unknown extends Partial<TypeOf<Schema>> | undefined ? undefined : Partial<TypeOf<Schema>> | undefined;
134
99
  submit: () => Promise<boolean>;
135
100
  validate: () => Promise<boolean>;
136
- errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>>>>;
101
+ errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema>>>>;
137
102
  fieldsErrors: Map<string, Record<string, {
138
103
  _errors: string[];
139
104
  }>>;