vee-validate 4.5.10 → 4.6.1
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/README.md +38 -22
- package/dist/vee-validate.d.ts +548 -292
- package/dist/vee-validate.esm.js +236 -96
- package/dist/vee-validate.js +232 -94
- package/dist/vee-validate.min.js +2 -2
- package/package.json +3 -3
- package/CHANGELOG.md +0 -896
package/dist/vee-validate.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { AnySchema, AnyObjectSchema, SchemaOf, BaseSchema } from 'yup';
|
|
2
|
+
import { Ref, ComputedRef, PropType, VNode, UnwrapRef, InjectionKey } from 'vue';
|
|
4
3
|
|
|
5
4
|
interface FieldValidationMetaInfo {
|
|
6
5
|
field: string;
|
|
@@ -20,7 +19,9 @@ interface ValidationResult {
|
|
|
20
19
|
errors: string[];
|
|
21
20
|
valid: boolean;
|
|
22
21
|
}
|
|
23
|
-
declare type YupValidator =
|
|
22
|
+
declare type YupValidator<TValue = any> = {
|
|
23
|
+
validate(value: TValue, options: Record<string, any>): Promise<TValue>;
|
|
24
|
+
};
|
|
24
25
|
declare type MaybeRef<T> = Ref<T> | T;
|
|
25
26
|
interface FieldMeta<TValue> {
|
|
26
27
|
touched: boolean;
|
|
@@ -59,7 +60,7 @@ interface FieldEntry<TValue = unknown> {
|
|
|
59
60
|
isLast: boolean;
|
|
60
61
|
}
|
|
61
62
|
interface FieldArrayContext<TValue = unknown> {
|
|
62
|
-
fields:
|
|
63
|
+
fields: Ref<FieldEntry<TValue>[]>;
|
|
63
64
|
remove(idx: number): void;
|
|
64
65
|
replace(newArray: TValue[]): void;
|
|
65
66
|
update(idx: number, value: TValue): void;
|
|
@@ -67,9 +68,11 @@ interface FieldArrayContext<TValue = unknown> {
|
|
|
67
68
|
swap(indexA: number, indexB: number): void;
|
|
68
69
|
insert(idx: number, value: TValue): void;
|
|
69
70
|
prepend(value: TValue): void;
|
|
71
|
+
move(oldIdx: number, newIdx: number): void;
|
|
70
72
|
}
|
|
71
|
-
interface PrivateFieldArrayContext {
|
|
73
|
+
interface PrivateFieldArrayContext<TValue = unknown> extends FieldArrayContext<TValue> {
|
|
72
74
|
reset(): void;
|
|
75
|
+
path: MaybeRef<string>;
|
|
73
76
|
}
|
|
74
77
|
interface PrivateFieldContext<TValue = unknown> {
|
|
75
78
|
id: number;
|
|
@@ -81,6 +84,7 @@ interface PrivateFieldContext<TValue = unknown> {
|
|
|
81
84
|
label?: MaybeRef<string | undefined>;
|
|
82
85
|
type?: string;
|
|
83
86
|
bails?: boolean;
|
|
87
|
+
keepValueOnUnmount?: MaybeRef<boolean | undefined>;
|
|
84
88
|
checkedValue?: MaybeRef<TValue>;
|
|
85
89
|
uncheckedValue?: MaybeRef<TValue>;
|
|
86
90
|
checked?: Ref<boolean>;
|
|
@@ -134,29 +138,35 @@ interface InvalidSubmissionContext<TValues extends GenericFormValues = GenericFo
|
|
|
134
138
|
declare type InvalidSubmissionHandler<TValues extends GenericFormValues = GenericFormValues> = (ctx: InvalidSubmissionContext<TValues>) => void;
|
|
135
139
|
declare type RawFormSchema<TValues> = Record<keyof TValues, string | GenericValidateFunction | Record<string, any>>;
|
|
136
140
|
declare type FieldPathLookup<TValues extends Record<string, any> = Record<string, any>> = Partial<Record<keyof TValues, PrivateFieldContext | PrivateFieldContext[]>>;
|
|
141
|
+
declare type MapValues<T, TValues extends Record<string, any>> = {
|
|
142
|
+
[K in keyof T]: T[K] extends MaybeRef<infer TKey> ? TKey extends keyof TValues ? Ref<TValues[TKey]> : Ref<unknown> : Ref<unknown>;
|
|
143
|
+
};
|
|
137
144
|
interface PrivateFormContext<TValues extends Record<string, any> = Record<string, any>> extends FormActions<TValues> {
|
|
138
145
|
formId: number;
|
|
139
146
|
values: TValues;
|
|
140
147
|
fieldsByPath: Ref<FieldPathLookup>;
|
|
141
|
-
|
|
148
|
+
fieldArrays: PrivateFieldArrayContext[];
|
|
142
149
|
submitCount: Ref<number>;
|
|
143
|
-
schema?: MaybeRef<RawFormSchema<TValues> |
|
|
150
|
+
schema?: MaybeRef<RawFormSchema<TValues> | YupValidator<TValues> | undefined>;
|
|
144
151
|
errorBag: Ref<FormErrorBag<TValues>>;
|
|
145
152
|
errors: ComputedRef<FormErrors<TValues>>;
|
|
146
153
|
meta: ComputedRef<FormMeta<TValues>>;
|
|
147
154
|
isSubmitting: Ref<boolean>;
|
|
155
|
+
keepValuesOnUnmount: MaybeRef<boolean>;
|
|
148
156
|
validateSchema?: (mode: SchemaValidationMode) => Promise<FormValidationResult<TValues>>;
|
|
149
157
|
validate(opts?: Partial<ValidationOptions$1>): Promise<FormValidationResult<TValues>>;
|
|
150
158
|
validateField(field: keyof TValues): Promise<ValidationResult>;
|
|
151
159
|
setFieldErrorBag(field: string, messages: string | string[]): void;
|
|
152
|
-
stageInitialValue(path: string, value: unknown): void;
|
|
160
|
+
stageInitialValue(path: string, value: unknown, updateOriginal?: boolean): void;
|
|
153
161
|
unsetInitialValue(path: string): void;
|
|
154
162
|
register(field: PrivateFieldContext): void;
|
|
155
163
|
unregister(field: PrivateFieldContext): void;
|
|
156
164
|
handleSubmit<TReturn = unknown>(cb: SubmissionHandler<TValues, TReturn>, onSubmitValidationErrorCb?: InvalidSubmissionHandler<TValues>): (e?: Event) => Promise<TReturn | undefined>;
|
|
157
165
|
setFieldInitialValue(path: string, value: unknown): void;
|
|
166
|
+
useFieldModel<TPath extends keyof TValues>(path: MaybeRef<TPath>): Ref<TValues[TPath]>;
|
|
167
|
+
useFieldModel<TPath extends keyof TValues>(paths: [...MaybeRef<TPath>[]]): MapValues<typeof paths, TValues>;
|
|
158
168
|
}
|
|
159
|
-
interface FormContext<TValues extends Record<string, any> = Record<string, any>> extends Omit<PrivateFormContext<TValues>, 'formId' | 'register' | 'unregister' | 'fieldsByPath' | 'schema' | 'validateSchema' | 'errorBag' | 'setFieldErrorBag' | 'stageInitialValue' | 'setFieldInitialValue' | 'unsetInitialValue' | '
|
|
169
|
+
interface FormContext<TValues extends Record<string, any> = Record<string, any>> extends Omit<PrivateFormContext<TValues>, 'formId' | 'register' | 'unregister' | 'fieldsByPath' | 'schema' | 'validateSchema' | 'errorBag' | 'setFieldErrorBag' | 'stageInitialValue' | 'setFieldInitialValue' | 'unsetInitialValue' | 'fieldArrays' | 'keepValuesOnUnmount'> {
|
|
160
170
|
handleReset: () => void;
|
|
161
171
|
submitForm: (e?: unknown) => Promise<void>;
|
|
162
172
|
}
|
|
@@ -169,7 +179,7 @@ interface ValidationOptions {
|
|
|
169
179
|
/**
|
|
170
180
|
* Validates a value against the rules.
|
|
171
181
|
*/
|
|
172
|
-
declare function validate(value: unknown, rules: string | Record<string, unknown | unknown[]> | GenericValidateFunction | YupValidator, options?: ValidationOptions): Promise<ValidationResult>;
|
|
182
|
+
declare function validate(value: unknown, rules: string | Record<string, unknown | unknown[]> | GenericValidateFunction | GenericValidateFunction[] | YupValidator, options?: ValidationOptions): Promise<ValidationResult>;
|
|
173
183
|
|
|
174
184
|
/**
|
|
175
185
|
* Adds a custom validator to the list of validation rules.
|
|
@@ -197,8 +207,11 @@ interface FieldOptions<TValue = unknown> {
|
|
|
197
207
|
uncheckedValue?: MaybeRef<TValue>;
|
|
198
208
|
label?: MaybeRef<string | undefined>;
|
|
199
209
|
standalone?: boolean;
|
|
210
|
+
keepValueOnUnmount?: MaybeRef<boolean | undefined>;
|
|
211
|
+
modelPropName?: string;
|
|
212
|
+
syncVModel?: boolean;
|
|
200
213
|
}
|
|
201
|
-
declare type RuleExpression<TValue> = string | Record<string, unknown> | GenericValidateFunction |
|
|
214
|
+
declare type RuleExpression<TValue> = string | Record<string, unknown> | GenericValidateFunction | GenericValidateFunction[] | YupValidator<TValue> | undefined;
|
|
202
215
|
/**
|
|
203
216
|
* Creates a field composite.
|
|
204
217
|
*/
|
|
@@ -237,43 +250,76 @@ declare const Field: {
|
|
|
237
250
|
modelValue: any;
|
|
238
251
|
standalone: boolean;
|
|
239
252
|
validateOnMount: boolean;
|
|
240
|
-
rules: RuleExpression<unknown>;
|
|
241
|
-
modelModifiers: any;
|
|
242
|
-
"onUpdate:modelValue": (e: any) => unknown;
|
|
243
|
-
}> & Omit<Readonly<{
|
|
244
|
-
as?: unknown;
|
|
245
|
-
name?: unknown;
|
|
246
|
-
rules?: unknown;
|
|
247
|
-
validateOnMount?: unknown;
|
|
248
|
-
validateOnBlur?: unknown;
|
|
249
|
-
validateOnChange?: unknown;
|
|
250
|
-
validateOnInput?: unknown;
|
|
251
|
-
validateOnModelUpdate?: unknown;
|
|
252
|
-
bails?: unknown;
|
|
253
|
-
label?: unknown;
|
|
254
|
-
uncheckedValue?: unknown;
|
|
255
|
-
modelValue?: unknown;
|
|
256
|
-
modelModifiers?: unknown;
|
|
257
|
-
'onUpdate:modelValue'?: unknown;
|
|
258
|
-
standalone?: unknown;
|
|
259
|
-
} & {
|
|
260
|
-
name: string;
|
|
261
|
-
bails: boolean;
|
|
262
|
-
modelValue: any;
|
|
263
|
-
standalone: boolean;
|
|
264
|
-
validateOnMount: boolean;
|
|
265
253
|
modelModifiers: any;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
254
|
+
rules: RuleExpression<unknown>;
|
|
255
|
+
'onUpdate:modelValue': (e: any) => unknown;
|
|
256
|
+
keepValue: boolean;
|
|
257
|
+
}> & Omit<Readonly<vue.ExtractPropTypes<{
|
|
258
|
+
as: {
|
|
259
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
260
|
+
default: any;
|
|
261
|
+
};
|
|
262
|
+
name: {
|
|
263
|
+
type: StringConstructor;
|
|
264
|
+
required: true;
|
|
265
|
+
};
|
|
266
|
+
rules: {
|
|
267
|
+
type: PropType<RuleExpression<unknown>>;
|
|
268
|
+
default: any;
|
|
269
|
+
};
|
|
270
|
+
validateOnMount: {
|
|
271
|
+
type: BooleanConstructor;
|
|
272
|
+
default: boolean;
|
|
273
|
+
};
|
|
274
|
+
validateOnBlur: {
|
|
275
|
+
type: BooleanConstructor;
|
|
276
|
+
default: any;
|
|
277
|
+
};
|
|
278
|
+
validateOnChange: {
|
|
279
|
+
type: BooleanConstructor;
|
|
280
|
+
default: any;
|
|
281
|
+
};
|
|
282
|
+
validateOnInput: {
|
|
283
|
+
type: BooleanConstructor;
|
|
284
|
+
default: any;
|
|
285
|
+
};
|
|
286
|
+
validateOnModelUpdate: {
|
|
287
|
+
type: BooleanConstructor;
|
|
288
|
+
default: any;
|
|
289
|
+
};
|
|
290
|
+
bails: {
|
|
291
|
+
type: BooleanConstructor;
|
|
292
|
+
default: () => boolean;
|
|
293
|
+
};
|
|
294
|
+
label: {
|
|
295
|
+
type: StringConstructor;
|
|
296
|
+
default: any;
|
|
297
|
+
};
|
|
298
|
+
uncheckedValue: {
|
|
299
|
+
type: any;
|
|
300
|
+
default: any;
|
|
301
|
+
};
|
|
302
|
+
modelValue: {
|
|
303
|
+
type: any;
|
|
304
|
+
default: symbol;
|
|
305
|
+
};
|
|
306
|
+
modelModifiers: {
|
|
307
|
+
type: any;
|
|
308
|
+
default: () => {};
|
|
309
|
+
};
|
|
310
|
+
'onUpdate:modelValue': {
|
|
311
|
+
type: PropType<(e: any) => unknown>;
|
|
312
|
+
default: any;
|
|
313
|
+
};
|
|
314
|
+
standalone: {
|
|
315
|
+
type: BooleanConstructor;
|
|
316
|
+
default: boolean;
|
|
317
|
+
};
|
|
318
|
+
keepValue: {
|
|
319
|
+
type: BooleanConstructor;
|
|
320
|
+
default: any;
|
|
321
|
+
};
|
|
322
|
+
}>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "label" | "as" | "bails" | "uncheckedValue" | "validateOnInput" | "validateOnChange" | "validateOnBlur" | "validateOnModelUpdate" | "modelValue" | "standalone" | "validateOnMount" | "modelModifiers" | "rules" | "onUpdate:modelValue" | "keepValue">;
|
|
277
323
|
$attrs: {
|
|
278
324
|
[x: string]: unknown;
|
|
279
325
|
};
|
|
@@ -287,40 +333,72 @@ declare const Field: {
|
|
|
287
333
|
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
|
288
334
|
$emit: (event: string, ...args: any[]) => void;
|
|
289
335
|
$el: any;
|
|
290
|
-
$options: vue.ComponentOptionsBase<Readonly<{
|
|
291
|
-
as
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
336
|
+
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
337
|
+
as: {
|
|
338
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
339
|
+
default: any;
|
|
340
|
+
};
|
|
341
|
+
name: {
|
|
342
|
+
type: StringConstructor;
|
|
343
|
+
required: true;
|
|
344
|
+
};
|
|
345
|
+
rules: {
|
|
346
|
+
type: PropType<RuleExpression<unknown>>;
|
|
347
|
+
default: any;
|
|
348
|
+
};
|
|
349
|
+
validateOnMount: {
|
|
350
|
+
type: BooleanConstructor;
|
|
351
|
+
default: boolean;
|
|
352
|
+
};
|
|
353
|
+
validateOnBlur: {
|
|
354
|
+
type: BooleanConstructor;
|
|
355
|
+
default: any;
|
|
356
|
+
};
|
|
357
|
+
validateOnChange: {
|
|
358
|
+
type: BooleanConstructor;
|
|
359
|
+
default: any;
|
|
360
|
+
};
|
|
361
|
+
validateOnInput: {
|
|
362
|
+
type: BooleanConstructor;
|
|
363
|
+
default: any;
|
|
364
|
+
};
|
|
365
|
+
validateOnModelUpdate: {
|
|
366
|
+
type: BooleanConstructor;
|
|
367
|
+
default: any;
|
|
368
|
+
};
|
|
369
|
+
bails: {
|
|
370
|
+
type: BooleanConstructor;
|
|
371
|
+
default: () => boolean;
|
|
372
|
+
};
|
|
373
|
+
label: {
|
|
374
|
+
type: StringConstructor;
|
|
375
|
+
default: any;
|
|
376
|
+
};
|
|
377
|
+
uncheckedValue: {
|
|
378
|
+
type: any;
|
|
379
|
+
default: any;
|
|
380
|
+
};
|
|
381
|
+
modelValue: {
|
|
382
|
+
type: any;
|
|
383
|
+
default: symbol;
|
|
384
|
+
};
|
|
385
|
+
modelModifiers: {
|
|
386
|
+
type: any;
|
|
387
|
+
default: () => {};
|
|
388
|
+
};
|
|
389
|
+
'onUpdate:modelValue': {
|
|
390
|
+
type: PropType<(e: any) => unknown>;
|
|
391
|
+
default: any;
|
|
392
|
+
};
|
|
393
|
+
standalone: {
|
|
394
|
+
type: BooleanConstructor;
|
|
395
|
+
default: boolean;
|
|
396
|
+
};
|
|
397
|
+
keepValue: {
|
|
398
|
+
type: BooleanConstructor;
|
|
399
|
+
default: any;
|
|
400
|
+
};
|
|
401
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
324
402
|
[key: string]: any;
|
|
325
403
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
326
404
|
[key: string]: any;
|
|
@@ -340,9 +418,10 @@ declare const Field: {
|
|
|
340
418
|
modelValue: any;
|
|
341
419
|
standalone: boolean;
|
|
342
420
|
validateOnMount: boolean;
|
|
343
|
-
rules: RuleExpression<unknown>;
|
|
344
421
|
modelModifiers: any;
|
|
345
|
-
|
|
422
|
+
rules: RuleExpression<unknown>;
|
|
423
|
+
'onUpdate:modelValue': (e: any) => unknown;
|
|
424
|
+
keepValue: boolean;
|
|
346
425
|
}> & {
|
|
347
426
|
beforeCreate?: (() => void) | (() => void)[];
|
|
348
427
|
created?: (() => void) | (() => void)[];
|
|
@@ -363,40 +442,72 @@ declare const Field: {
|
|
|
363
442
|
$forceUpdate: () => void;
|
|
364
443
|
$nextTick: typeof vue.nextTick;
|
|
365
444
|
$watch(source: string | Function, cb: Function, options?: vue.WatchOptions<boolean>): vue.WatchStopHandle;
|
|
366
|
-
} & Readonly<{
|
|
367
|
-
as
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
445
|
+
} & Readonly<vue.ExtractPropTypes<{
|
|
446
|
+
as: {
|
|
447
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
448
|
+
default: any;
|
|
449
|
+
};
|
|
450
|
+
name: {
|
|
451
|
+
type: StringConstructor;
|
|
452
|
+
required: true;
|
|
453
|
+
};
|
|
454
|
+
rules: {
|
|
455
|
+
type: PropType<RuleExpression<unknown>>;
|
|
456
|
+
default: any;
|
|
457
|
+
};
|
|
458
|
+
validateOnMount: {
|
|
459
|
+
type: BooleanConstructor;
|
|
460
|
+
default: boolean;
|
|
461
|
+
};
|
|
462
|
+
validateOnBlur: {
|
|
463
|
+
type: BooleanConstructor;
|
|
464
|
+
default: any;
|
|
465
|
+
};
|
|
466
|
+
validateOnChange: {
|
|
467
|
+
type: BooleanConstructor;
|
|
468
|
+
default: any;
|
|
469
|
+
};
|
|
470
|
+
validateOnInput: {
|
|
471
|
+
type: BooleanConstructor;
|
|
472
|
+
default: any;
|
|
473
|
+
};
|
|
474
|
+
validateOnModelUpdate: {
|
|
475
|
+
type: BooleanConstructor;
|
|
476
|
+
default: any;
|
|
477
|
+
};
|
|
478
|
+
bails: {
|
|
479
|
+
type: BooleanConstructor;
|
|
480
|
+
default: () => boolean;
|
|
481
|
+
};
|
|
482
|
+
label: {
|
|
483
|
+
type: StringConstructor;
|
|
484
|
+
default: any;
|
|
485
|
+
};
|
|
486
|
+
uncheckedValue: {
|
|
487
|
+
type: any;
|
|
488
|
+
default: any;
|
|
489
|
+
};
|
|
490
|
+
modelValue: {
|
|
491
|
+
type: any;
|
|
492
|
+
default: symbol;
|
|
493
|
+
};
|
|
494
|
+
modelModifiers: {
|
|
495
|
+
type: any;
|
|
496
|
+
default: () => {};
|
|
497
|
+
};
|
|
498
|
+
'onUpdate:modelValue': {
|
|
499
|
+
type: PropType<(e: any) => unknown>;
|
|
500
|
+
default: any;
|
|
501
|
+
};
|
|
502
|
+
standalone: {
|
|
503
|
+
type: BooleanConstructor;
|
|
504
|
+
default: boolean;
|
|
505
|
+
};
|
|
506
|
+
keepValue: {
|
|
507
|
+
type: BooleanConstructor;
|
|
508
|
+
default: any;
|
|
509
|
+
};
|
|
510
|
+
}>> & vue.ShallowUnwrapRef<() => VNode<vue.RendererNode, vue.RendererElement, {
|
|
400
511
|
[key: string]: any;
|
|
401
512
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
402
513
|
[key: string]: any;
|
|
@@ -404,44 +515,76 @@ declare const Field: {
|
|
|
404
515
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
405
516
|
[key: string]: any;
|
|
406
517
|
}>[];
|
|
407
|
-
}> & {} &
|
|
518
|
+
}> & {} & vue.ComponentCustomProperties;
|
|
408
519
|
__isFragment?: never;
|
|
409
520
|
__isTeleport?: never;
|
|
410
521
|
__isSuspense?: never;
|
|
411
|
-
} & vue.ComponentOptionsBase<Readonly<{
|
|
412
|
-
as
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
522
|
+
} & vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
523
|
+
as: {
|
|
524
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
525
|
+
default: any;
|
|
526
|
+
};
|
|
527
|
+
name: {
|
|
528
|
+
type: StringConstructor;
|
|
529
|
+
required: true;
|
|
530
|
+
};
|
|
531
|
+
rules: {
|
|
532
|
+
type: PropType<RuleExpression<unknown>>;
|
|
533
|
+
default: any;
|
|
534
|
+
};
|
|
535
|
+
validateOnMount: {
|
|
536
|
+
type: BooleanConstructor;
|
|
537
|
+
default: boolean;
|
|
538
|
+
};
|
|
539
|
+
validateOnBlur: {
|
|
540
|
+
type: BooleanConstructor;
|
|
541
|
+
default: any;
|
|
542
|
+
};
|
|
543
|
+
validateOnChange: {
|
|
544
|
+
type: BooleanConstructor;
|
|
545
|
+
default: any;
|
|
546
|
+
};
|
|
547
|
+
validateOnInput: {
|
|
548
|
+
type: BooleanConstructor;
|
|
549
|
+
default: any;
|
|
550
|
+
};
|
|
551
|
+
validateOnModelUpdate: {
|
|
552
|
+
type: BooleanConstructor;
|
|
553
|
+
default: any;
|
|
554
|
+
};
|
|
555
|
+
bails: {
|
|
556
|
+
type: BooleanConstructor;
|
|
557
|
+
default: () => boolean;
|
|
558
|
+
};
|
|
559
|
+
label: {
|
|
560
|
+
type: StringConstructor;
|
|
561
|
+
default: any;
|
|
562
|
+
};
|
|
563
|
+
uncheckedValue: {
|
|
564
|
+
type: any;
|
|
565
|
+
default: any;
|
|
566
|
+
};
|
|
567
|
+
modelValue: {
|
|
568
|
+
type: any;
|
|
569
|
+
default: symbol;
|
|
570
|
+
};
|
|
571
|
+
modelModifiers: {
|
|
572
|
+
type: any;
|
|
573
|
+
default: () => {};
|
|
574
|
+
};
|
|
575
|
+
'onUpdate:modelValue': {
|
|
576
|
+
type: PropType<(e: any) => unknown>;
|
|
577
|
+
default: any;
|
|
578
|
+
};
|
|
579
|
+
standalone: {
|
|
580
|
+
type: BooleanConstructor;
|
|
581
|
+
default: boolean;
|
|
582
|
+
};
|
|
583
|
+
keepValue: {
|
|
584
|
+
type: BooleanConstructor;
|
|
585
|
+
default: any;
|
|
586
|
+
};
|
|
587
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
445
588
|
[key: string]: any;
|
|
446
589
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
447
590
|
[key: string]: any;
|
|
@@ -461,17 +604,24 @@ declare const Field: {
|
|
|
461
604
|
modelValue: any;
|
|
462
605
|
standalone: boolean;
|
|
463
606
|
validateOnMount: boolean;
|
|
464
|
-
rules: RuleExpression<unknown>;
|
|
465
607
|
modelModifiers: any;
|
|
466
|
-
|
|
608
|
+
rules: RuleExpression<unknown>;
|
|
609
|
+
'onUpdate:modelValue': (e: any) => unknown;
|
|
610
|
+
keepValue: boolean;
|
|
467
611
|
}> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
612
|
+
setErrors: FieldContext['setErrors'];
|
|
613
|
+
setTouched: FieldContext['setTouched'];
|
|
614
|
+
reset: FieldContext['resetField'];
|
|
615
|
+
validate: FieldContext['validate'];
|
|
616
|
+
handleChange: FieldContext['handleChange'];
|
|
468
617
|
$slots: {
|
|
469
618
|
default: (arg: FieldSlotProps<unknown>) => VNode[];
|
|
470
619
|
};
|
|
471
620
|
});
|
|
472
621
|
|
|
473
|
-
declare type FormSlotProps = UnwrapRef<Pick<FormContext, 'meta' | 'errors' | 'values' | 'isSubmitting' | 'submitCount' | 'validate' | 'validateField' | 'handleReset' | '
|
|
622
|
+
declare type FormSlotProps = UnwrapRef<Pick<FormContext, 'meta' | 'errors' | 'values' | 'isSubmitting' | 'submitCount' | 'validate' | 'validateField' | 'handleReset' | 'setErrors' | 'setFieldError' | 'setFieldValue' | 'setValues' | 'setFieldTouched' | 'setTouched' | 'resetForm'>> & {
|
|
474
623
|
handleSubmit: (evt: Event | SubmissionHandler, onSubmit?: SubmissionHandler) => Promise<unknown>;
|
|
624
|
+
submitForm(evt?: Event): void;
|
|
475
625
|
};
|
|
476
626
|
declare const Form: {
|
|
477
627
|
new (...args: any[]): {
|
|
@@ -486,26 +636,45 @@ declare const Form: {
|
|
|
486
636
|
initialErrors: Record<string, any>;
|
|
487
637
|
initialTouched: Record<string, any>;
|
|
488
638
|
onInvalidSubmit: InvalidSubmissionHandler<GenericFormValues>;
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
639
|
+
keepValues: boolean;
|
|
640
|
+
}> & Omit<Readonly<vue.ExtractPropTypes<{
|
|
641
|
+
as: {
|
|
642
|
+
type: StringConstructor;
|
|
643
|
+
default: string;
|
|
644
|
+
};
|
|
645
|
+
validationSchema: {
|
|
646
|
+
type: ObjectConstructor;
|
|
647
|
+
default: any;
|
|
648
|
+
};
|
|
649
|
+
initialValues: {
|
|
650
|
+
type: ObjectConstructor;
|
|
651
|
+
default: any;
|
|
652
|
+
};
|
|
653
|
+
initialErrors: {
|
|
654
|
+
type: ObjectConstructor;
|
|
655
|
+
default: any;
|
|
656
|
+
};
|
|
657
|
+
initialTouched: {
|
|
658
|
+
type: ObjectConstructor;
|
|
659
|
+
default: any;
|
|
660
|
+
};
|
|
661
|
+
validateOnMount: {
|
|
662
|
+
type: BooleanConstructor;
|
|
663
|
+
default: boolean;
|
|
664
|
+
};
|
|
665
|
+
onSubmit: {
|
|
666
|
+
type: PropType<SubmissionHandler<GenericFormValues, unknown>>;
|
|
667
|
+
default: any;
|
|
668
|
+
};
|
|
669
|
+
onInvalidSubmit: {
|
|
670
|
+
type: PropType<InvalidSubmissionHandler<GenericFormValues>>;
|
|
671
|
+
default: any;
|
|
672
|
+
};
|
|
673
|
+
keepValues: {
|
|
674
|
+
type: BooleanConstructor;
|
|
675
|
+
default: boolean;
|
|
676
|
+
};
|
|
677
|
+
}>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "onSubmit" | "as" | "initialValues" | "validateOnMount" | "validationSchema" | "initialErrors" | "initialTouched" | "onInvalidSubmit" | "keepValues">;
|
|
509
678
|
$attrs: {
|
|
510
679
|
[x: string]: unknown;
|
|
511
680
|
};
|
|
@@ -519,26 +688,44 @@ declare const Form: {
|
|
|
519
688
|
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
|
520
689
|
$emit: (event: string, ...args: any[]) => void;
|
|
521
690
|
$el: any;
|
|
522
|
-
$options: vue.ComponentOptionsBase<Readonly<{
|
|
523
|
-
as
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
initialTouched
|
|
540
|
-
|
|
541
|
-
|
|
691
|
+
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
692
|
+
as: {
|
|
693
|
+
type: StringConstructor;
|
|
694
|
+
default: string;
|
|
695
|
+
};
|
|
696
|
+
validationSchema: {
|
|
697
|
+
type: ObjectConstructor;
|
|
698
|
+
default: any;
|
|
699
|
+
};
|
|
700
|
+
initialValues: {
|
|
701
|
+
type: ObjectConstructor;
|
|
702
|
+
default: any;
|
|
703
|
+
};
|
|
704
|
+
initialErrors: {
|
|
705
|
+
type: ObjectConstructor;
|
|
706
|
+
default: any;
|
|
707
|
+
};
|
|
708
|
+
initialTouched: {
|
|
709
|
+
type: ObjectConstructor;
|
|
710
|
+
default: any;
|
|
711
|
+
};
|
|
712
|
+
validateOnMount: {
|
|
713
|
+
type: BooleanConstructor;
|
|
714
|
+
default: boolean;
|
|
715
|
+
};
|
|
716
|
+
onSubmit: {
|
|
717
|
+
type: PropType<SubmissionHandler<GenericFormValues, unknown>>;
|
|
718
|
+
default: any;
|
|
719
|
+
};
|
|
720
|
+
onInvalidSubmit: {
|
|
721
|
+
type: PropType<InvalidSubmissionHandler<GenericFormValues>>;
|
|
722
|
+
default: any;
|
|
723
|
+
};
|
|
724
|
+
keepValues: {
|
|
725
|
+
type: BooleanConstructor;
|
|
726
|
+
default: boolean;
|
|
727
|
+
};
|
|
728
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
542
729
|
[key: string]: any;
|
|
543
730
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
544
731
|
[key: string]: any;
|
|
@@ -555,6 +742,7 @@ declare const Form: {
|
|
|
555
742
|
initialErrors: Record<string, any>;
|
|
556
743
|
initialTouched: Record<string, any>;
|
|
557
744
|
onInvalidSubmit: InvalidSubmissionHandler<GenericFormValues>;
|
|
745
|
+
keepValues: boolean;
|
|
558
746
|
}> & {
|
|
559
747
|
beforeCreate?: (() => void) | (() => void)[];
|
|
560
748
|
created?: (() => void) | (() => void)[];
|
|
@@ -575,26 +763,44 @@ declare const Form: {
|
|
|
575
763
|
$forceUpdate: () => void;
|
|
576
764
|
$nextTick: typeof vue.nextTick;
|
|
577
765
|
$watch(source: string | Function, cb: Function, options?: vue.WatchOptions<boolean>): vue.WatchStopHandle;
|
|
578
|
-
} & Readonly<{
|
|
579
|
-
as
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
initialTouched
|
|
596
|
-
|
|
597
|
-
|
|
766
|
+
} & Readonly<vue.ExtractPropTypes<{
|
|
767
|
+
as: {
|
|
768
|
+
type: StringConstructor;
|
|
769
|
+
default: string;
|
|
770
|
+
};
|
|
771
|
+
validationSchema: {
|
|
772
|
+
type: ObjectConstructor;
|
|
773
|
+
default: any;
|
|
774
|
+
};
|
|
775
|
+
initialValues: {
|
|
776
|
+
type: ObjectConstructor;
|
|
777
|
+
default: any;
|
|
778
|
+
};
|
|
779
|
+
initialErrors: {
|
|
780
|
+
type: ObjectConstructor;
|
|
781
|
+
default: any;
|
|
782
|
+
};
|
|
783
|
+
initialTouched: {
|
|
784
|
+
type: ObjectConstructor;
|
|
785
|
+
default: any;
|
|
786
|
+
};
|
|
787
|
+
validateOnMount: {
|
|
788
|
+
type: BooleanConstructor;
|
|
789
|
+
default: boolean;
|
|
790
|
+
};
|
|
791
|
+
onSubmit: {
|
|
792
|
+
type: PropType<SubmissionHandler<GenericFormValues, unknown>>;
|
|
793
|
+
default: any;
|
|
794
|
+
};
|
|
795
|
+
onInvalidSubmit: {
|
|
796
|
+
type: PropType<InvalidSubmissionHandler<GenericFormValues>>;
|
|
797
|
+
default: any;
|
|
798
|
+
};
|
|
799
|
+
keepValues: {
|
|
800
|
+
type: BooleanConstructor;
|
|
801
|
+
default: boolean;
|
|
802
|
+
};
|
|
803
|
+
}>> & vue.ShallowUnwrapRef<() => VNode<vue.RendererNode, vue.RendererElement, {
|
|
598
804
|
[key: string]: any;
|
|
599
805
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
600
806
|
[key: string]: any;
|
|
@@ -602,30 +808,48 @@ declare const Form: {
|
|
|
602
808
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
603
809
|
[key: string]: any;
|
|
604
810
|
}>[];
|
|
605
|
-
}> & {} &
|
|
811
|
+
}> & {} & vue.ComponentCustomProperties;
|
|
606
812
|
__isFragment?: never;
|
|
607
813
|
__isTeleport?: never;
|
|
608
814
|
__isSuspense?: never;
|
|
609
|
-
} & vue.ComponentOptionsBase<Readonly<{
|
|
610
|
-
as
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
initialTouched
|
|
627
|
-
|
|
628
|
-
|
|
815
|
+
} & vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
816
|
+
as: {
|
|
817
|
+
type: StringConstructor;
|
|
818
|
+
default: string;
|
|
819
|
+
};
|
|
820
|
+
validationSchema: {
|
|
821
|
+
type: ObjectConstructor;
|
|
822
|
+
default: any;
|
|
823
|
+
};
|
|
824
|
+
initialValues: {
|
|
825
|
+
type: ObjectConstructor;
|
|
826
|
+
default: any;
|
|
827
|
+
};
|
|
828
|
+
initialErrors: {
|
|
829
|
+
type: ObjectConstructor;
|
|
830
|
+
default: any;
|
|
831
|
+
};
|
|
832
|
+
initialTouched: {
|
|
833
|
+
type: ObjectConstructor;
|
|
834
|
+
default: any;
|
|
835
|
+
};
|
|
836
|
+
validateOnMount: {
|
|
837
|
+
type: BooleanConstructor;
|
|
838
|
+
default: boolean;
|
|
839
|
+
};
|
|
840
|
+
onSubmit: {
|
|
841
|
+
type: PropType<SubmissionHandler<GenericFormValues, unknown>>;
|
|
842
|
+
default: any;
|
|
843
|
+
};
|
|
844
|
+
onInvalidSubmit: {
|
|
845
|
+
type: PropType<InvalidSubmissionHandler<GenericFormValues>>;
|
|
846
|
+
default: any;
|
|
847
|
+
};
|
|
848
|
+
keepValues: {
|
|
849
|
+
type: BooleanConstructor;
|
|
850
|
+
default: boolean;
|
|
851
|
+
};
|
|
852
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
629
853
|
[key: string]: any;
|
|
630
854
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
631
855
|
[key: string]: any;
|
|
@@ -642,7 +866,17 @@ declare const Form: {
|
|
|
642
866
|
initialErrors: Record<string, any>;
|
|
643
867
|
initialTouched: Record<string, any>;
|
|
644
868
|
onInvalidSubmit: InvalidSubmissionHandler<GenericFormValues>;
|
|
869
|
+
keepValues: boolean;
|
|
645
870
|
}> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
871
|
+
setFieldError: FormContext['setFieldError'];
|
|
872
|
+
setErrors: FormContext['setErrors'];
|
|
873
|
+
setFieldValue: FormContext['setFieldValue'];
|
|
874
|
+
setValues: FormContext['setValues'];
|
|
875
|
+
setFieldTouched: FormContext['setFieldTouched'];
|
|
876
|
+
setTouched: FormContext['setTouched'];
|
|
877
|
+
resetForm: FormContext['resetForm'];
|
|
878
|
+
validate: FormContext['validate'];
|
|
879
|
+
validateField: FormContext['validateField'];
|
|
646
880
|
$slots: {
|
|
647
881
|
default: (arg: FormSlotProps) => VNode[];
|
|
648
882
|
};
|
|
@@ -652,11 +886,12 @@ declare const FieldArray: {
|
|
|
652
886
|
new (...args: any[]): {
|
|
653
887
|
$: vue.ComponentInternalInstance;
|
|
654
888
|
$data: {};
|
|
655
|
-
$props: Partial<{}> & Omit<Readonly<{
|
|
656
|
-
name
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
889
|
+
$props: Partial<{}> & Omit<Readonly<vue.ExtractPropTypes<{
|
|
890
|
+
name: {
|
|
891
|
+
type: StringConstructor;
|
|
892
|
+
required: true;
|
|
893
|
+
};
|
|
894
|
+
}>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, never>;
|
|
660
895
|
$attrs: {
|
|
661
896
|
[x: string]: unknown;
|
|
662
897
|
};
|
|
@@ -670,11 +905,12 @@ declare const FieldArray: {
|
|
|
670
905
|
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
|
671
906
|
$emit: (event: string, ...args: any[]) => void;
|
|
672
907
|
$el: any;
|
|
673
|
-
$options: vue.ComponentOptionsBase<Readonly<{
|
|
674
|
-
name
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
908
|
+
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
909
|
+
name: {
|
|
910
|
+
type: StringConstructor;
|
|
911
|
+
required: true;
|
|
912
|
+
};
|
|
913
|
+
}>>, () => vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
678
914
|
[key: string]: any;
|
|
679
915
|
}>[] | {
|
|
680
916
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
@@ -700,31 +936,41 @@ declare const FieldArray: {
|
|
|
700
936
|
$forceUpdate: () => void;
|
|
701
937
|
$nextTick: typeof vue.nextTick;
|
|
702
938
|
$watch(source: string | Function, cb: Function, options?: vue.WatchOptions<boolean>): vue.WatchStopHandle;
|
|
703
|
-
} & Readonly<{
|
|
704
|
-
name
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
939
|
+
} & Readonly<vue.ExtractPropTypes<{
|
|
940
|
+
name: {
|
|
941
|
+
type: StringConstructor;
|
|
942
|
+
required: true;
|
|
943
|
+
};
|
|
944
|
+
}>> & vue.ShallowUnwrapRef<() => vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
708
945
|
[key: string]: any;
|
|
709
946
|
}>[] | {
|
|
710
947
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
711
948
|
[key: string]: any;
|
|
712
949
|
}>[];
|
|
713
|
-
}> & {} &
|
|
950
|
+
}> & {} & vue.ComponentCustomProperties;
|
|
714
951
|
__isFragment?: never;
|
|
715
952
|
__isTeleport?: never;
|
|
716
953
|
__isSuspense?: never;
|
|
717
|
-
} & vue.ComponentOptionsBase<Readonly<{
|
|
718
|
-
name
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}
|
|
954
|
+
} & vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
955
|
+
name: {
|
|
956
|
+
type: StringConstructor;
|
|
957
|
+
required: true;
|
|
958
|
+
};
|
|
959
|
+
}>>, () => vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
722
960
|
[key: string]: any;
|
|
723
961
|
}>[] | {
|
|
724
962
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
725
963
|
[key: string]: any;
|
|
726
964
|
}>[];
|
|
727
965
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {}> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
966
|
+
push: FieldArrayContext['push'];
|
|
967
|
+
remove: FieldArrayContext['remove'];
|
|
968
|
+
swap: FieldArrayContext['swap'];
|
|
969
|
+
insert: FieldArrayContext['insert'];
|
|
970
|
+
update: FieldArrayContext['update'];
|
|
971
|
+
replace: FieldArrayContext['replace'];
|
|
972
|
+
prepend: FieldArrayContext['prepend'];
|
|
973
|
+
move: FieldArrayContext['move'];
|
|
728
974
|
$slots: {
|
|
729
975
|
default: (arg: UnwrapRef<FieldArrayContext>) => VNode[];
|
|
730
976
|
};
|
|
@@ -739,14 +985,16 @@ declare const ErrorMessage: {
|
|
|
739
985
|
$data: {};
|
|
740
986
|
$props: Partial<{
|
|
741
987
|
as: string;
|
|
742
|
-
}> & Omit<Readonly<{
|
|
743
|
-
as
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
988
|
+
}> & Omit<Readonly<vue.ExtractPropTypes<{
|
|
989
|
+
as: {
|
|
990
|
+
type: StringConstructor;
|
|
991
|
+
default: any;
|
|
992
|
+
};
|
|
993
|
+
name: {
|
|
994
|
+
type: StringConstructor;
|
|
995
|
+
required: true;
|
|
996
|
+
};
|
|
997
|
+
}>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "as">;
|
|
750
998
|
$attrs: {
|
|
751
999
|
[x: string]: unknown;
|
|
752
1000
|
};
|
|
@@ -760,14 +1008,16 @@ declare const ErrorMessage: {
|
|
|
760
1008
|
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
|
761
1009
|
$emit: (event: string, ...args: any[]) => void;
|
|
762
1010
|
$el: any;
|
|
763
|
-
$options: vue.ComponentOptionsBase<Readonly<{
|
|
764
|
-
as
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
1011
|
+
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
1012
|
+
as: {
|
|
1013
|
+
type: StringConstructor;
|
|
1014
|
+
default: any;
|
|
1015
|
+
};
|
|
1016
|
+
name: {
|
|
1017
|
+
type: StringConstructor;
|
|
1018
|
+
required: true;
|
|
1019
|
+
};
|
|
1020
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
771
1021
|
[key: string]: any;
|
|
772
1022
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
773
1023
|
[key: string]: any;
|
|
@@ -797,14 +1047,16 @@ declare const ErrorMessage: {
|
|
|
797
1047
|
$forceUpdate: () => void;
|
|
798
1048
|
$nextTick: typeof vue.nextTick;
|
|
799
1049
|
$watch(source: string | Function, cb: Function, options?: vue.WatchOptions<boolean>): vue.WatchStopHandle;
|
|
800
|
-
} & Readonly<{
|
|
801
|
-
as
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
1050
|
+
} & Readonly<vue.ExtractPropTypes<{
|
|
1051
|
+
as: {
|
|
1052
|
+
type: StringConstructor;
|
|
1053
|
+
default: any;
|
|
1054
|
+
};
|
|
1055
|
+
name: {
|
|
1056
|
+
type: StringConstructor;
|
|
1057
|
+
required: true;
|
|
1058
|
+
};
|
|
1059
|
+
}>> & vue.ShallowUnwrapRef<() => VNode<vue.RendererNode, vue.RendererElement, {
|
|
808
1060
|
[key: string]: any;
|
|
809
1061
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
810
1062
|
[key: string]: any;
|
|
@@ -812,18 +1064,20 @@ declare const ErrorMessage: {
|
|
|
812
1064
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
813
1065
|
[key: string]: any;
|
|
814
1066
|
}>[];
|
|
815
|
-
}> & {} &
|
|
1067
|
+
}> & {} & vue.ComponentCustomProperties;
|
|
816
1068
|
__isFragment?: never;
|
|
817
1069
|
__isTeleport?: never;
|
|
818
1070
|
__isSuspense?: never;
|
|
819
|
-
} & vue.ComponentOptionsBase<Readonly<{
|
|
820
|
-
as
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1071
|
+
} & vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
1072
|
+
as: {
|
|
1073
|
+
type: StringConstructor;
|
|
1074
|
+
default: any;
|
|
1075
|
+
};
|
|
1076
|
+
name: {
|
|
1077
|
+
type: StringConstructor;
|
|
1078
|
+
required: true;
|
|
1079
|
+
};
|
|
1080
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
827
1081
|
[key: string]: any;
|
|
828
1082
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
829
1083
|
[key: string]: any;
|
|
@@ -840,11 +1094,12 @@ declare const ErrorMessage: {
|
|
|
840
1094
|
});
|
|
841
1095
|
|
|
842
1096
|
interface FormOptions<TValues extends Record<string, any>> {
|
|
843
|
-
validationSchema?: MaybeRef<Record<keyof TValues, GenericValidateFunction | string | Record<string, any>> |
|
|
1097
|
+
validationSchema?: MaybeRef<Record<keyof TValues, GenericValidateFunction | string | Record<string, any>> | any | undefined>;
|
|
844
1098
|
initialValues?: MaybeRef<TValues>;
|
|
845
1099
|
initialErrors?: Record<keyof TValues, string | undefined>;
|
|
846
1100
|
initialTouched?: Record<keyof TValues, boolean>;
|
|
847
1101
|
validateOnMount?: boolean;
|
|
1102
|
+
keepValuesOnUnmount?: MaybeRef<boolean>;
|
|
848
1103
|
}
|
|
849
1104
|
declare function useForm<TValues extends Record<string, any> = Record<string, any>>(opts?: FormOptions<TValues>): FormContext<TValues>;
|
|
850
1105
|
|
|
@@ -926,5 +1181,6 @@ declare function useSubmitForm<TValues extends Record<string, unknown> = Record<
|
|
|
926
1181
|
|
|
927
1182
|
declare const FormContextKey: InjectionKey<PrivateFormContext>;
|
|
928
1183
|
declare const FieldContextKey: InjectionKey<PrivateFieldContext<unknown>>;
|
|
1184
|
+
declare const IS_ABSENT: unique symbol;
|
|
929
1185
|
|
|
930
|
-
export { ErrorMessage, Field, FieldArray, FieldArrayContext, FieldContext, FieldContextKey, FieldEntry, FieldMeta, Form, FormActions, FormContext, FormContextKey, FormMeta, FormState, FormValidationResult, InvalidSubmissionContext, SubmissionContext, SubmissionHandler, ValidationResult, configure, defineRule, useField, useFieldArray, useFieldError, useFieldValue, useForm, useFormErrors, useFormValues, useIsFieldDirty, useIsFieldTouched, useIsFieldValid, useIsFormDirty, useIsFormTouched, useIsFormValid, useIsSubmitting, useResetForm, useSubmitCount, useSubmitForm, useValidateField, useValidateForm, validate };
|
|
1186
|
+
export { ErrorMessage, Field, FieldArray, FieldArrayContext, FieldContext, FieldContextKey, FieldEntry, FieldMeta, Form, FormActions, FormContext, FormContextKey, FormMeta, FormState, FormValidationResult, IS_ABSENT, InvalidSubmissionContext, SubmissionContext, SubmissionHandler, ValidationOptions$1 as ValidationOptions, ValidationResult, configure, defineRule, useField, useFieldArray, useFieldError, useFieldValue, useForm, useFormErrors, useFormValues, useIsFieldDirty, useIsFieldTouched, useIsFieldValid, useIsFormDirty, useIsFormTouched, useIsFormValid, useIsSubmitting, useResetForm, useSubmitCount, useSubmitForm, useValidateField, useValidateForm, validate };
|