@volverjs/form-vue 1.0.0-beta.35 → 1.0.0-beta.37

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Component, InjectionKey, PropType, SlotsType, UnwrapRef } from 'vue';
2
- import { z } from 'zod';
3
- import { FormComponentOptions, FormSchema, FormTemplate, InjectedFormData, InjectedFormWrapperData } from './types';
2
+ import { RefinementCtx, z } from 'zod';
3
+ import { FormComponentOptions, FormSchema, FormTemplate, InjectedFormData, InjectedFormWrapperData, Path } from './types';
4
4
  import { FormStatus } from './enums';
5
5
  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>>): {
6
6
  clear: () => void;
@@ -13,8 +13,14 @@ export declare function defineForm<Schema extends FormSchema, Type, FormTemplate
13
13
  status: import('vue').Ref<FormStatus | undefined, FormStatus | undefined>;
14
14
  wrappers: Map<string, InjectedFormWrapperData<Schema>>;
15
15
  stopUpdatesWatch: import('vue').WatchStopHandle;
16
- submit: () => Promise<boolean>;
17
- validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
16
+ submit: (options?: {
17
+ fields?: Set<Path<z.infer<Schema>>>;
18
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
19
+ }) => Promise<boolean>;
20
+ validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, options?: {
21
+ fields?: Set<Path<z.infer<Schema>>>;
22
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
23
+ }) => Promise<boolean>;
18
24
  VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
19
25
  continuousValidation: {
20
26
  type: BooleanConstructor;
@@ -36,6 +42,14 @@ export declare function defineForm<Schema extends FormSchema, Type, FormTemplate
36
42
  type: PropType<FormTemplate<Schema, Type>>;
37
43
  default: undefined;
38
44
  };
45
+ superRefine: {
46
+ type: PropType<(arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>>;
47
+ default: undefined;
48
+ };
49
+ validateFields: {
50
+ type: PropType<Path<z.infer<Schema>>[]>;
51
+ default: undefined;
52
+ };
39
53
  }>, {
40
54
  clear: () => void;
41
55
  errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<z.inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>;
@@ -47,7 +61,10 @@ export declare function defineForm<Schema extends FormSchema, Type, FormTemplate
47
61
  status: Readonly<import('vue').Ref<FormStatus | undefined, FormStatus | undefined>>;
48
62
  stopUpdatesWatch: import('vue').WatchStopHandle;
49
63
  submit: () => Promise<boolean>;
50
- validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
64
+ validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, options?: {
65
+ fields?: Set<Path<z.infer<Schema>>>;
66
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
67
+ }) => Promise<boolean>;
51
68
  wrappers: Map<string, InjectedFormWrapperData<Schema>>;
52
69
  }, {}, {}, {}, 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<{
53
70
  continuousValidation: {
@@ -70,6 +87,14 @@ export declare function defineForm<Schema extends FormSchema, Type, FormTemplate
70
87
  type: PropType<FormTemplate<Schema, Type>>;
71
88
  default: undefined;
72
89
  };
90
+ superRefine: {
91
+ type: PropType<(arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>>;
92
+ default: undefined;
93
+ };
94
+ validateFields: {
95
+ type: PropType<Path<z.infer<Schema>>[]>;
96
+ default: undefined;
97
+ };
73
98
  }>> & Readonly<{
74
99
  onInvalid?: ((...args: any[]) => any) | undefined;
75
100
  onValid?: ((...args: any[]) => any) | undefined;
@@ -78,11 +103,13 @@ export declare function defineForm<Schema extends FormSchema, Type, FormTemplate
78
103
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
79
104
  "onUpdate:readonly"?: ((...args: any[]) => any) | undefined;
80
105
  }>, {
106
+ superRefine: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
81
107
  readonly: boolean;
82
108
  tag: string;
83
109
  template: FormTemplate<Schema, Type>;
84
110
  continuousValidation: boolean;
85
111
  modelValue: Record<string, any>;
112
+ validateFields: Path<z.TypeOf<Schema>>[];
86
113
  }, SlotsType<{
87
114
  default: {
88
115
  errors: UnwrapRef<Readonly<import('vue').Ref<import('vue').DeepReadonly<z.inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>>>;
@@ -95,8 +122,14 @@ export declare function defineForm<Schema extends FormSchema, Type, FormTemplate
95
122
  ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
96
123
  reset: () => void;
97
124
  stopUpdatesWatch: import('vue').WatchStopHandle;
98
- submit: () => Promise<boolean>;
99
- validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
125
+ submit: (options?: {
126
+ fields?: Set<Path<z.infer<Schema>>>;
127
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
128
+ }) => Promise<boolean>;
129
+ validate: (value?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, options?: {
130
+ fields?: Set<Path<z.infer<Schema>>>;
131
+ superRefine?: (arg: z.infer<Schema>, ctx: RefinementCtx) => void | Promise<void>;
132
+ }) => Promise<boolean>;
100
133
  };
101
134
  }>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
102
135
  };
@@ -1,6 +1,6 @@
1
1
  import { DeepReadonly, InjectionKey, Ref, SlotsType } from 'vue';
2
2
  import { z } from 'zod';
3
- import { FormSchema, InjectedFormData, InjectedFormWrapperData } from './types';
3
+ import { FormSchema, InjectedFormData, InjectedFormWrapperData, Path } from './types';
4
4
  export declare function defineFormWrapper<Schema extends FormSchema, Type = undefined>(formProvideKey: InjectionKey<InjectedFormData<Schema, Type>>, wrapperProvideKey: InjectionKey<InjectedFormWrapperData<Schema>>): import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
5
  name: {
6
6
  type: StringConstructor;
@@ -16,7 +16,7 @@ export declare function defineFormWrapper<Schema extends FormSchema, Type = unde
16
16
  };
17
17
  }>, {
18
18
  errors: Readonly<Ref<DeepReadonly<z.inferFormattedError<Schema, string>> | undefined, DeepReadonly<z.inferFormattedError<Schema, string>> | undefined>> | undefined;
19
- fields: Ref<Map<string, string>, Map<string, string>>;
19
+ fields: Ref<Map<string, Path<z.TypeOf<Schema>>>, Map<string, Path<z.TypeOf<Schema>>>>;
20
20
  fieldsErrors: Ref<Map<string, z.inferFormattedError<Schema, string>>, Map<string, z.inferFormattedError<Schema, string>>>;
21
21
  formData: Ref<(undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined> | undefined;
22
22
  invalid: import('vue').ComputedRef<boolean>;
@@ -24,7 +24,10 @@ export declare function defineFormWrapper<Schema extends FormSchema, Type = unde
24
24
  clear: (() => void) | undefined;
25
25
  reset: (() => void) | undefined;
26
26
  submit: (() => Promise<boolean>) | undefined;
27
- validate: ((formData?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
27
+ validate: ((formData?: (undefined extends Type ? Partial<z.TypeOf<Schema>> : Type) | undefined, options?: {
28
+ fields?: Set<Path<z.TypeOf<Schema>>> | undefined;
29
+ superRefine?: ((arg: z.TypeOf<Schema>, ctx: z.RefinementCtx) => void | Promise<void>) | undefined;
30
+ } | undefined) => Promise<boolean>) | undefined;
28
31
  validateWrapper: () => Promise<boolean>;
29
32
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
30
33
  name: {
package/dist/index.d.ts CHANGED
@@ -17,8 +17,14 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
17
17
  reset: () => void;
18
18
  status: import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>;
19
19
  stopUpdatesWatch: import('vue').WatchStopHandle;
20
- submit: () => Promise<boolean>;
21
- validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
20
+ submit: (options?: {
21
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
22
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
23
+ } | undefined) => Promise<boolean>;
24
+ validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
25
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
26
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
27
+ } | undefined) => Promise<boolean>;
22
28
  wrappers: Map<string, InjectedFormWrapperData<Schema>>;
23
29
  VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
24
30
  continuousValidation: {
@@ -41,6 +47,14 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
41
47
  type: import('vue').PropType<FormTemplate<Schema, Type>>;
42
48
  default: undefined;
43
49
  };
50
+ superRefine: {
51
+ type: import('vue').PropType<(arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>>;
52
+ default: undefined;
53
+ };
54
+ validateFields: {
55
+ type: import('vue').PropType<Path<import('zod').TypeOf<Schema>>[]>;
56
+ default: undefined;
57
+ };
44
58
  }>, {
45
59
  clear: () => void;
46
60
  errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>>;
@@ -52,7 +66,10 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
52
66
  status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
53
67
  stopUpdatesWatch: import('vue').WatchStopHandle;
54
68
  submit: () => Promise<boolean>;
55
- validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
69
+ validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
70
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
71
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
72
+ } | undefined) => Promise<boolean>;
56
73
  wrappers: Map<string, InjectedFormWrapperData<Schema>>;
57
74
  }, {}, {}, {}, 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<{
58
75
  continuousValidation: {
@@ -75,6 +92,14 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
75
92
  type: import('vue').PropType<FormTemplate<Schema, Type>>;
76
93
  default: undefined;
77
94
  };
95
+ superRefine: {
96
+ type: import('vue').PropType<(arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>>;
97
+ default: undefined;
98
+ };
99
+ validateFields: {
100
+ type: import('vue').PropType<Path<import('zod').TypeOf<Schema>>[]>;
101
+ default: undefined;
102
+ };
78
103
  }>> & Readonly<{
79
104
  onInvalid?: ((...args: any[]) => any) | undefined;
80
105
  onValid?: ((...args: any[]) => any) | undefined;
@@ -83,11 +108,13 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
83
108
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
84
109
  "onUpdate:readonly"?: ((...args: any[]) => any) | undefined;
85
110
  }>, {
111
+ superRefine: (arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>;
86
112
  readonly: boolean;
87
113
  tag: string;
88
114
  template: FormTemplate<Schema, Type>;
89
115
  continuousValidation: boolean;
90
116
  modelValue: Record<string, any>;
117
+ validateFields: Path<import('zod').TypeOf<Schema>>[];
91
118
  }, import('vue').SlotsType<{
92
119
  default: {
93
120
  errors: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
@@ -100,8 +127,14 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
100
127
  ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
101
128
  reset: () => void;
102
129
  stopUpdatesWatch: import('vue').WatchStopHandle;
103
- submit: () => Promise<boolean>;
104
- validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
130
+ submit: (options?: {
131
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
132
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
133
+ } | undefined) => Promise<boolean>;
134
+ validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
135
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
136
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
137
+ } | undefined) => Promise<boolean>;
105
138
  };
106
139
  }>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
107
140
  VvFormField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -227,7 +260,10 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
227
260
  readonly: boolean;
228
261
  onUpdate: (value: unknown) => void;
229
262
  submit?: InjectedFormData<Schema_1, Type_1>["submit"];
230
- validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
263
+ validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
264
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
265
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
266
+ } | undefined) => Promise<boolean>) | undefined;
231
267
  };
232
268
  }>, {}, {}, "invalid" | "type" | "errors" | "component" | "hasProps" | "invalidLabel" | "is", import('vue').ComponentProvideOptions, true, {}, any>;
233
269
  VvFormFieldsGroup: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -333,7 +369,10 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
333
369
  onUpdateField: (name: string, value: any) => void;
334
370
  readonly: boolean;
335
371
  submit?: InjectedFormData<Schema_2, Type_2>["submit"];
336
- validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
372
+ validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
373
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
374
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
375
+ } | undefined) => Promise<boolean>) | undefined;
337
376
  };
338
377
  }>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
339
378
  VvFormTemplate: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -367,7 +406,10 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
367
406
  invalid: boolean;
368
407
  status?: import('./enums').FormStatus;
369
408
  submit?: InjectedFormData<Schema_3, Type_3>["submit"];
370
- validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
409
+ validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
410
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
411
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
412
+ } | undefined) => Promise<boolean>) | undefined;
371
413
  clear?: InjectedFormData<Schema_3, Type_3>["clear"];
372
414
  reset?: InjectedFormData<Schema_3, Type_3>["reset"];
373
415
  };
@@ -387,7 +429,7 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
387
429
  };
388
430
  }>, {
389
431
  errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
390
- fields: import('vue').Ref<Map<string, string>, Map<string, string>>;
432
+ fields: import('vue').Ref<Map<string, Path<import('zod').TypeOf<Schema>>>, Map<string, Path<import('zod').TypeOf<Schema>>>>;
391
433
  fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
392
434
  formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
393
435
  invalid: import('vue').ComputedRef<boolean>;
@@ -395,7 +437,10 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
395
437
  clear: (() => void) | undefined;
396
438
  reset: (() => void) | undefined;
397
439
  submit: (() => Promise<boolean>) | undefined;
398
- validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
440
+ validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
441
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
442
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
443
+ } | undefined) => Promise<boolean>) | undefined;
399
444
  validateWrapper: () => Promise<boolean>;
400
445
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
401
446
  name: {
@@ -427,7 +472,10 @@ declare function _formType<Schema extends FormSchema, Type>(schema: Schema, opti
427
472
  clear?: InjectedFormData<Schema_4, Type_4>["clear"];
428
473
  reset?: InjectedFormData<Schema_4, Type_4>["reset"];
429
474
  submit?: InjectedFormData<Schema_4, Type_4>["submit"];
430
- validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
475
+ validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
476
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
477
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
478
+ } | undefined) => Promise<boolean>) | undefined;
431
479
  validateWrapper?: (() => Promise<boolean>) | undefined;
432
480
  };
433
481
  }>, {}, {}, "invalid" | "reset" | "readonly" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;
@@ -459,8 +507,14 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
459
507
  reset: () => void;
460
508
  status: import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>;
461
509
  stopUpdatesWatch: import('vue').WatchStopHandle;
462
- submit: () => Promise<boolean>;
463
- validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
510
+ submit: (options?: {
511
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
512
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
513
+ } | undefined) => Promise<boolean>;
514
+ validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
515
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
516
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
517
+ } | undefined) => Promise<boolean>;
464
518
  wrappers: Map<string, InjectedFormWrapperData<Schema>>;
465
519
  VvForm: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
466
520
  continuousValidation: {
@@ -483,6 +537,14 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
483
537
  type: import('vue').PropType<FormTemplate<Schema, Type>>;
484
538
  default: undefined;
485
539
  };
540
+ superRefine: {
541
+ type: import('vue').PropType<(arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>>;
542
+ default: undefined;
543
+ };
544
+ validateFields: {
545
+ type: import('vue').PropType<Path<import('zod').TypeOf<Schema>>[]>;
546
+ default: undefined;
547
+ };
486
548
  }>, {
487
549
  clear: () => void;
488
550
  errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>>;
@@ -494,7 +556,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
494
556
  status: Readonly<import('vue').Ref<import('./enums').FormStatus | undefined, import('./enums').FormStatus | undefined>>;
495
557
  stopUpdatesWatch: import('vue').WatchStopHandle;
496
558
  submit: () => Promise<boolean>;
497
- validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
559
+ validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
560
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
561
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
562
+ } | undefined) => Promise<boolean>;
498
563
  wrappers: Map<string, InjectedFormWrapperData<Schema>>;
499
564
  }, {}, {}, {}, 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<{
500
565
  continuousValidation: {
@@ -517,6 +582,14 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
517
582
  type: import('vue').PropType<FormTemplate<Schema, Type>>;
518
583
  default: undefined;
519
584
  };
585
+ superRefine: {
586
+ type: import('vue').PropType<(arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>>;
587
+ default: undefined;
588
+ };
589
+ validateFields: {
590
+ type: import('vue').PropType<Path<import('zod').TypeOf<Schema>>[]>;
591
+ default: undefined;
592
+ };
520
593
  }>> & Readonly<{
521
594
  onInvalid?: ((...args: any[]) => any) | undefined;
522
595
  onValid?: ((...args: any[]) => any) | undefined;
@@ -525,11 +598,13 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
525
598
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
526
599
  "onUpdate:readonly"?: ((...args: any[]) => any) | undefined;
527
600
  }>, {
601
+ superRefine: (arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>;
528
602
  readonly: boolean;
529
603
  tag: string;
530
604
  template: FormTemplate<Schema, Type>;
531
605
  continuousValidation: boolean;
532
606
  modelValue: Record<string, any>;
607
+ validateFields: Path<import('zod').TypeOf<Schema>>[];
533
608
  }, import('vue').SlotsType<{
534
609
  default: {
535
610
  errors: import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined;
@@ -542,8 +617,14 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
542
617
  ignoreUpdates: import('@vueuse/core').IgnoredUpdater;
543
618
  reset: () => void;
544
619
  stopUpdatesWatch: import('vue').WatchStopHandle;
545
- submit: () => Promise<boolean>;
546
- validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>;
620
+ submit: (options?: {
621
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
622
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
623
+ } | undefined) => Promise<boolean>;
624
+ validate: (value?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
625
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
626
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
627
+ } | undefined) => Promise<boolean>;
547
628
  };
548
629
  }>, {}, {}, "invalid" | "valid" | "reset" | "status" | "readonly" | "clear" | "submit" | "errors" | "tag" | "template" | "validate", import('vue').ComponentProvideOptions, true, {}, any>;
549
630
  VvFormField: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -669,7 +750,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
669
750
  readonly: boolean;
670
751
  onUpdate: (value: unknown) => void;
671
752
  submit?: InjectedFormData<Schema_1, Type_1>["submit"];
672
- validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
753
+ validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
754
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
755
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
756
+ } | undefined) => Promise<boolean>) | undefined;
673
757
  };
674
758
  }>, {}, {}, "invalid" | "type" | "errors" | "component" | "hasProps" | "invalidLabel" | "is", import('vue').ComponentProvideOptions, true, {}, any>;
675
759
  VvFormFieldsGroup: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -775,7 +859,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
775
859
  onUpdateField: (name: string, value: any) => void;
776
860
  readonly: boolean;
777
861
  submit?: InjectedFormData<Schema_2, Type_2>["submit"];
778
- validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
862
+ validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
863
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
864
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
865
+ } | undefined) => Promise<boolean>) | undefined;
779
866
  };
780
867
  }>, {}, {}, "invalid" | "errors" | "component" | "hasProps" | "is" | "invalidLabels", import('vue').ComponentProvideOptions, true, {}, any>;
781
868
  VvFormTemplate: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -809,7 +896,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
809
896
  invalid: boolean;
810
897
  status?: import('./enums').FormStatus;
811
898
  submit?: InjectedFormData<Schema_3, Type_3>["submit"];
812
- validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
899
+ validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
900
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
901
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
902
+ } | undefined) => Promise<boolean>) | undefined;
813
903
  clear?: InjectedFormData<Schema_3, Type_3>["clear"];
814
904
  reset?: InjectedFormData<Schema_3, Type_3>["reset"];
815
905
  };
@@ -829,7 +919,7 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
829
919
  };
830
920
  }>, {
831
921
  errors: Readonly<import('vue').Ref<import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined, import('vue').DeepReadonly<import('zod').inferFormattedError<Schema, string>> | undefined>> | undefined;
832
- fields: import('vue').Ref<Map<string, string>, Map<string, string>>;
922
+ fields: import('vue').Ref<Map<string, Path<import('zod').TypeOf<Schema>>>, Map<string, Path<import('zod').TypeOf<Schema>>>>;
833
923
  fieldsErrors: import('vue').Ref<Map<string, import('zod').inferFormattedError<Schema, string>>, Map<string, import('zod').inferFormattedError<Schema, string>>>;
834
924
  formData: import('vue').Ref<(undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined> | undefined;
835
925
  invalid: import('vue').ComputedRef<boolean>;
@@ -837,7 +927,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
837
927
  clear: (() => void) | undefined;
838
928
  reset: (() => void) | undefined;
839
929
  submit: (() => Promise<boolean>) | undefined;
840
- validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
930
+ validate: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
931
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
932
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
933
+ } | undefined) => Promise<boolean>) | undefined;
841
934
  validateWrapper: () => Promise<boolean>;
842
935
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("invalid" | "valid")[], "invalid" | "valid", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
843
936
  name: {
@@ -869,7 +962,10 @@ export declare function formType<Schema extends FormSchema, Type>(schema: Schema
869
962
  clear?: InjectedFormData<Schema_4, Type_4>["clear"];
870
963
  reset?: InjectedFormData<Schema_4, Type_4>["reset"];
871
964
  submit?: InjectedFormData<Schema_4, Type_4>["submit"];
872
- validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, fields?: Set<string>) => Promise<boolean>) | undefined;
965
+ validate?: ((formData?: (undefined extends Type ? Partial<import('zod').TypeOf<Schema>> : Type) | undefined, options?: {
966
+ fields?: Set<Path<import('zod').TypeOf<Schema>>> | undefined;
967
+ superRefine?: ((arg: import('zod').TypeOf<Schema>, ctx: import('zod').RefinementCtx) => void | Promise<void>) | undefined;
968
+ } | undefined) => Promise<boolean>) | undefined;
873
969
  validateWrapper?: (() => Promise<boolean>) | undefined;
874
970
  };
875
971
  }>, {}, {}, "invalid" | "reset" | "readonly" | "clear" | "submit" | "errors" | "tag" | "validate" | "formData" | "fields" | "fieldsErrors" | "validateWrapper", import('vue').ComponentProvideOptions, true, {}, any>;