vee-validate 4.5.10 → 4.6.0
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 +546 -291
- package/dist/vee-validate.esm.js +230 -95
- package/dist/vee-validate.js +226 -93
- 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,10 +604,16 @@ 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
|
};
|
|
@@ -486,26 +635,45 @@ declare const Form: {
|
|
|
486
635
|
initialErrors: Record<string, any>;
|
|
487
636
|
initialTouched: Record<string, any>;
|
|
488
637
|
onInvalidSubmit: InvalidSubmissionHandler<GenericFormValues>;
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
638
|
+
keepValues: boolean;
|
|
639
|
+
}> & Omit<Readonly<vue.ExtractPropTypes<{
|
|
640
|
+
as: {
|
|
641
|
+
type: StringConstructor;
|
|
642
|
+
default: string;
|
|
643
|
+
};
|
|
644
|
+
validationSchema: {
|
|
645
|
+
type: ObjectConstructor;
|
|
646
|
+
default: any;
|
|
647
|
+
};
|
|
648
|
+
initialValues: {
|
|
649
|
+
type: ObjectConstructor;
|
|
650
|
+
default: any;
|
|
651
|
+
};
|
|
652
|
+
initialErrors: {
|
|
653
|
+
type: ObjectConstructor;
|
|
654
|
+
default: any;
|
|
655
|
+
};
|
|
656
|
+
initialTouched: {
|
|
657
|
+
type: ObjectConstructor;
|
|
658
|
+
default: any;
|
|
659
|
+
};
|
|
660
|
+
validateOnMount: {
|
|
661
|
+
type: BooleanConstructor;
|
|
662
|
+
default: boolean;
|
|
663
|
+
};
|
|
664
|
+
onSubmit: {
|
|
665
|
+
type: PropType<SubmissionHandler<GenericFormValues, unknown>>;
|
|
666
|
+
default: any;
|
|
667
|
+
};
|
|
668
|
+
onInvalidSubmit: {
|
|
669
|
+
type: PropType<InvalidSubmissionHandler<GenericFormValues>>;
|
|
670
|
+
default: any;
|
|
671
|
+
};
|
|
672
|
+
keepValues: {
|
|
673
|
+
type: BooleanConstructor;
|
|
674
|
+
default: boolean;
|
|
675
|
+
};
|
|
676
|
+
}>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "onSubmit" | "as" | "initialValues" | "validateOnMount" | "validationSchema" | "initialErrors" | "initialTouched" | "onInvalidSubmit" | "keepValues">;
|
|
509
677
|
$attrs: {
|
|
510
678
|
[x: string]: unknown;
|
|
511
679
|
};
|
|
@@ -519,26 +687,44 @@ declare const Form: {
|
|
|
519
687
|
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
|
520
688
|
$emit: (event: string, ...args: any[]) => void;
|
|
521
689
|
$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
|
-
|
|
690
|
+
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
691
|
+
as: {
|
|
692
|
+
type: StringConstructor;
|
|
693
|
+
default: string;
|
|
694
|
+
};
|
|
695
|
+
validationSchema: {
|
|
696
|
+
type: ObjectConstructor;
|
|
697
|
+
default: any;
|
|
698
|
+
};
|
|
699
|
+
initialValues: {
|
|
700
|
+
type: ObjectConstructor;
|
|
701
|
+
default: any;
|
|
702
|
+
};
|
|
703
|
+
initialErrors: {
|
|
704
|
+
type: ObjectConstructor;
|
|
705
|
+
default: any;
|
|
706
|
+
};
|
|
707
|
+
initialTouched: {
|
|
708
|
+
type: ObjectConstructor;
|
|
709
|
+
default: any;
|
|
710
|
+
};
|
|
711
|
+
validateOnMount: {
|
|
712
|
+
type: BooleanConstructor;
|
|
713
|
+
default: boolean;
|
|
714
|
+
};
|
|
715
|
+
onSubmit: {
|
|
716
|
+
type: PropType<SubmissionHandler<GenericFormValues, unknown>>;
|
|
717
|
+
default: any;
|
|
718
|
+
};
|
|
719
|
+
onInvalidSubmit: {
|
|
720
|
+
type: PropType<InvalidSubmissionHandler<GenericFormValues>>;
|
|
721
|
+
default: any;
|
|
722
|
+
};
|
|
723
|
+
keepValues: {
|
|
724
|
+
type: BooleanConstructor;
|
|
725
|
+
default: boolean;
|
|
726
|
+
};
|
|
727
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
542
728
|
[key: string]: any;
|
|
543
729
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
544
730
|
[key: string]: any;
|
|
@@ -555,6 +741,7 @@ declare const Form: {
|
|
|
555
741
|
initialErrors: Record<string, any>;
|
|
556
742
|
initialTouched: Record<string, any>;
|
|
557
743
|
onInvalidSubmit: InvalidSubmissionHandler<GenericFormValues>;
|
|
744
|
+
keepValues: boolean;
|
|
558
745
|
}> & {
|
|
559
746
|
beforeCreate?: (() => void) | (() => void)[];
|
|
560
747
|
created?: (() => void) | (() => void)[];
|
|
@@ -575,26 +762,44 @@ declare const Form: {
|
|
|
575
762
|
$forceUpdate: () => void;
|
|
576
763
|
$nextTick: typeof vue.nextTick;
|
|
577
764
|
$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
|
-
|
|
765
|
+
} & Readonly<vue.ExtractPropTypes<{
|
|
766
|
+
as: {
|
|
767
|
+
type: StringConstructor;
|
|
768
|
+
default: string;
|
|
769
|
+
};
|
|
770
|
+
validationSchema: {
|
|
771
|
+
type: ObjectConstructor;
|
|
772
|
+
default: any;
|
|
773
|
+
};
|
|
774
|
+
initialValues: {
|
|
775
|
+
type: ObjectConstructor;
|
|
776
|
+
default: any;
|
|
777
|
+
};
|
|
778
|
+
initialErrors: {
|
|
779
|
+
type: ObjectConstructor;
|
|
780
|
+
default: any;
|
|
781
|
+
};
|
|
782
|
+
initialTouched: {
|
|
783
|
+
type: ObjectConstructor;
|
|
784
|
+
default: any;
|
|
785
|
+
};
|
|
786
|
+
validateOnMount: {
|
|
787
|
+
type: BooleanConstructor;
|
|
788
|
+
default: boolean;
|
|
789
|
+
};
|
|
790
|
+
onSubmit: {
|
|
791
|
+
type: PropType<SubmissionHandler<GenericFormValues, unknown>>;
|
|
792
|
+
default: any;
|
|
793
|
+
};
|
|
794
|
+
onInvalidSubmit: {
|
|
795
|
+
type: PropType<InvalidSubmissionHandler<GenericFormValues>>;
|
|
796
|
+
default: any;
|
|
797
|
+
};
|
|
798
|
+
keepValues: {
|
|
799
|
+
type: BooleanConstructor;
|
|
800
|
+
default: boolean;
|
|
801
|
+
};
|
|
802
|
+
}>> & vue.ShallowUnwrapRef<() => VNode<vue.RendererNode, vue.RendererElement, {
|
|
598
803
|
[key: string]: any;
|
|
599
804
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
600
805
|
[key: string]: any;
|
|
@@ -602,30 +807,48 @@ declare const Form: {
|
|
|
602
807
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
603
808
|
[key: string]: any;
|
|
604
809
|
}>[];
|
|
605
|
-
}> & {} &
|
|
810
|
+
}> & {} & vue.ComponentCustomProperties;
|
|
606
811
|
__isFragment?: never;
|
|
607
812
|
__isTeleport?: never;
|
|
608
813
|
__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
|
-
|
|
814
|
+
} & vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
815
|
+
as: {
|
|
816
|
+
type: StringConstructor;
|
|
817
|
+
default: string;
|
|
818
|
+
};
|
|
819
|
+
validationSchema: {
|
|
820
|
+
type: ObjectConstructor;
|
|
821
|
+
default: any;
|
|
822
|
+
};
|
|
823
|
+
initialValues: {
|
|
824
|
+
type: ObjectConstructor;
|
|
825
|
+
default: any;
|
|
826
|
+
};
|
|
827
|
+
initialErrors: {
|
|
828
|
+
type: ObjectConstructor;
|
|
829
|
+
default: any;
|
|
830
|
+
};
|
|
831
|
+
initialTouched: {
|
|
832
|
+
type: ObjectConstructor;
|
|
833
|
+
default: any;
|
|
834
|
+
};
|
|
835
|
+
validateOnMount: {
|
|
836
|
+
type: BooleanConstructor;
|
|
837
|
+
default: boolean;
|
|
838
|
+
};
|
|
839
|
+
onSubmit: {
|
|
840
|
+
type: PropType<SubmissionHandler<GenericFormValues, unknown>>;
|
|
841
|
+
default: any;
|
|
842
|
+
};
|
|
843
|
+
onInvalidSubmit: {
|
|
844
|
+
type: PropType<InvalidSubmissionHandler<GenericFormValues>>;
|
|
845
|
+
default: any;
|
|
846
|
+
};
|
|
847
|
+
keepValues: {
|
|
848
|
+
type: BooleanConstructor;
|
|
849
|
+
default: boolean;
|
|
850
|
+
};
|
|
851
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
629
852
|
[key: string]: any;
|
|
630
853
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
631
854
|
[key: string]: any;
|
|
@@ -642,7 +865,17 @@ declare const Form: {
|
|
|
642
865
|
initialErrors: Record<string, any>;
|
|
643
866
|
initialTouched: Record<string, any>;
|
|
644
867
|
onInvalidSubmit: InvalidSubmissionHandler<GenericFormValues>;
|
|
868
|
+
keepValues: boolean;
|
|
645
869
|
}> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
870
|
+
setFieldError: FormContext['setFieldError'];
|
|
871
|
+
setErrors: FormContext['setErrors'];
|
|
872
|
+
setFieldValue: FormContext['setFieldValue'];
|
|
873
|
+
setValues: FormContext['setValues'];
|
|
874
|
+
setFieldTouched: FormContext['setFieldTouched'];
|
|
875
|
+
setTouched: FormContext['setTouched'];
|
|
876
|
+
resetForm: FormContext['resetForm'];
|
|
877
|
+
validate: FormContext['validate'];
|
|
878
|
+
validateField: FormContext['validateField'];
|
|
646
879
|
$slots: {
|
|
647
880
|
default: (arg: FormSlotProps) => VNode[];
|
|
648
881
|
};
|
|
@@ -652,11 +885,12 @@ declare const FieldArray: {
|
|
|
652
885
|
new (...args: any[]): {
|
|
653
886
|
$: vue.ComponentInternalInstance;
|
|
654
887
|
$data: {};
|
|
655
|
-
$props: Partial<{}> & Omit<Readonly<{
|
|
656
|
-
name
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
888
|
+
$props: Partial<{}> & Omit<Readonly<vue.ExtractPropTypes<{
|
|
889
|
+
name: {
|
|
890
|
+
type: StringConstructor;
|
|
891
|
+
required: true;
|
|
892
|
+
};
|
|
893
|
+
}>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, never>;
|
|
660
894
|
$attrs: {
|
|
661
895
|
[x: string]: unknown;
|
|
662
896
|
};
|
|
@@ -670,11 +904,12 @@ declare const FieldArray: {
|
|
|
670
904
|
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
|
671
905
|
$emit: (event: string, ...args: any[]) => void;
|
|
672
906
|
$el: any;
|
|
673
|
-
$options: vue.ComponentOptionsBase<Readonly<{
|
|
674
|
-
name
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
907
|
+
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
908
|
+
name: {
|
|
909
|
+
type: StringConstructor;
|
|
910
|
+
required: true;
|
|
911
|
+
};
|
|
912
|
+
}>>, () => vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
678
913
|
[key: string]: any;
|
|
679
914
|
}>[] | {
|
|
680
915
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
@@ -700,31 +935,41 @@ declare const FieldArray: {
|
|
|
700
935
|
$forceUpdate: () => void;
|
|
701
936
|
$nextTick: typeof vue.nextTick;
|
|
702
937
|
$watch(source: string | Function, cb: Function, options?: vue.WatchOptions<boolean>): vue.WatchStopHandle;
|
|
703
|
-
} & Readonly<{
|
|
704
|
-
name
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
938
|
+
} & Readonly<vue.ExtractPropTypes<{
|
|
939
|
+
name: {
|
|
940
|
+
type: StringConstructor;
|
|
941
|
+
required: true;
|
|
942
|
+
};
|
|
943
|
+
}>> & vue.ShallowUnwrapRef<() => vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
708
944
|
[key: string]: any;
|
|
709
945
|
}>[] | {
|
|
710
946
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
711
947
|
[key: string]: any;
|
|
712
948
|
}>[];
|
|
713
|
-
}> & {} &
|
|
949
|
+
}> & {} & vue.ComponentCustomProperties;
|
|
714
950
|
__isFragment?: never;
|
|
715
951
|
__isTeleport?: never;
|
|
716
952
|
__isSuspense?: never;
|
|
717
|
-
} & vue.ComponentOptionsBase<Readonly<{
|
|
718
|
-
name
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}
|
|
953
|
+
} & vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
954
|
+
name: {
|
|
955
|
+
type: StringConstructor;
|
|
956
|
+
required: true;
|
|
957
|
+
};
|
|
958
|
+
}>>, () => vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
722
959
|
[key: string]: any;
|
|
723
960
|
}>[] | {
|
|
724
961
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
725
962
|
[key: string]: any;
|
|
726
963
|
}>[];
|
|
727
964
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {}> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
965
|
+
push: FieldArrayContext['push'];
|
|
966
|
+
remove: FieldArrayContext['remove'];
|
|
967
|
+
swap: FieldArrayContext['swap'];
|
|
968
|
+
insert: FieldArrayContext['insert'];
|
|
969
|
+
update: FieldArrayContext['update'];
|
|
970
|
+
replace: FieldArrayContext['replace'];
|
|
971
|
+
prepend: FieldArrayContext['prepend'];
|
|
972
|
+
move: FieldArrayContext['move'];
|
|
728
973
|
$slots: {
|
|
729
974
|
default: (arg: UnwrapRef<FieldArrayContext>) => VNode[];
|
|
730
975
|
};
|
|
@@ -739,14 +984,16 @@ declare const ErrorMessage: {
|
|
|
739
984
|
$data: {};
|
|
740
985
|
$props: Partial<{
|
|
741
986
|
as: string;
|
|
742
|
-
}> & Omit<Readonly<{
|
|
743
|
-
as
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
987
|
+
}> & Omit<Readonly<vue.ExtractPropTypes<{
|
|
988
|
+
as: {
|
|
989
|
+
type: StringConstructor;
|
|
990
|
+
default: any;
|
|
991
|
+
};
|
|
992
|
+
name: {
|
|
993
|
+
type: StringConstructor;
|
|
994
|
+
required: true;
|
|
995
|
+
};
|
|
996
|
+
}>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "as">;
|
|
750
997
|
$attrs: {
|
|
751
998
|
[x: string]: unknown;
|
|
752
999
|
};
|
|
@@ -760,14 +1007,16 @@ declare const ErrorMessage: {
|
|
|
760
1007
|
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>;
|
|
761
1008
|
$emit: (event: string, ...args: any[]) => void;
|
|
762
1009
|
$el: any;
|
|
763
|
-
$options: vue.ComponentOptionsBase<Readonly<{
|
|
764
|
-
as
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
1010
|
+
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
1011
|
+
as: {
|
|
1012
|
+
type: StringConstructor;
|
|
1013
|
+
default: any;
|
|
1014
|
+
};
|
|
1015
|
+
name: {
|
|
1016
|
+
type: StringConstructor;
|
|
1017
|
+
required: true;
|
|
1018
|
+
};
|
|
1019
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
771
1020
|
[key: string]: any;
|
|
772
1021
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
773
1022
|
[key: string]: any;
|
|
@@ -797,14 +1046,16 @@ declare const ErrorMessage: {
|
|
|
797
1046
|
$forceUpdate: () => void;
|
|
798
1047
|
$nextTick: typeof vue.nextTick;
|
|
799
1048
|
$watch(source: string | Function, cb: Function, options?: vue.WatchOptions<boolean>): vue.WatchStopHandle;
|
|
800
|
-
} & Readonly<{
|
|
801
|
-
as
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
1049
|
+
} & Readonly<vue.ExtractPropTypes<{
|
|
1050
|
+
as: {
|
|
1051
|
+
type: StringConstructor;
|
|
1052
|
+
default: any;
|
|
1053
|
+
};
|
|
1054
|
+
name: {
|
|
1055
|
+
type: StringConstructor;
|
|
1056
|
+
required: true;
|
|
1057
|
+
};
|
|
1058
|
+
}>> & vue.ShallowUnwrapRef<() => VNode<vue.RendererNode, vue.RendererElement, {
|
|
808
1059
|
[key: string]: any;
|
|
809
1060
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
810
1061
|
[key: string]: any;
|
|
@@ -812,18 +1063,20 @@ declare const ErrorMessage: {
|
|
|
812
1063
|
default: () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
813
1064
|
[key: string]: any;
|
|
814
1065
|
}>[];
|
|
815
|
-
}> & {} &
|
|
1066
|
+
}> & {} & vue.ComponentCustomProperties;
|
|
816
1067
|
__isFragment?: never;
|
|
817
1068
|
__isTeleport?: never;
|
|
818
1069
|
__isSuspense?: never;
|
|
819
|
-
} & vue.ComponentOptionsBase<Readonly<{
|
|
820
|
-
as
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
1070
|
+
} & vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<{
|
|
1071
|
+
as: {
|
|
1072
|
+
type: StringConstructor;
|
|
1073
|
+
default: any;
|
|
1074
|
+
};
|
|
1075
|
+
name: {
|
|
1076
|
+
type: StringConstructor;
|
|
1077
|
+
required: true;
|
|
1078
|
+
};
|
|
1079
|
+
}>>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
827
1080
|
[key: string]: any;
|
|
828
1081
|
}> | vue.Slot | VNode<vue.RendererNode, vue.RendererElement, {
|
|
829
1082
|
[key: string]: any;
|
|
@@ -840,11 +1093,12 @@ declare const ErrorMessage: {
|
|
|
840
1093
|
});
|
|
841
1094
|
|
|
842
1095
|
interface FormOptions<TValues extends Record<string, any>> {
|
|
843
|
-
validationSchema?: MaybeRef<Record<keyof TValues, GenericValidateFunction | string | Record<string, any>> |
|
|
1096
|
+
validationSchema?: MaybeRef<Record<keyof TValues, GenericValidateFunction | string | Record<string, any>> | any | undefined>;
|
|
844
1097
|
initialValues?: MaybeRef<TValues>;
|
|
845
1098
|
initialErrors?: Record<keyof TValues, string | undefined>;
|
|
846
1099
|
initialTouched?: Record<keyof TValues, boolean>;
|
|
847
1100
|
validateOnMount?: boolean;
|
|
1101
|
+
keepValuesOnUnmount?: MaybeRef<boolean>;
|
|
848
1102
|
}
|
|
849
1103
|
declare function useForm<TValues extends Record<string, any> = Record<string, any>>(opts?: FormOptions<TValues>): FormContext<TValues>;
|
|
850
1104
|
|
|
@@ -926,5 +1180,6 @@ declare function useSubmitForm<TValues extends Record<string, unknown> = Record<
|
|
|
926
1180
|
|
|
927
1181
|
declare const FormContextKey: InjectionKey<PrivateFormContext>;
|
|
928
1182
|
declare const FieldContextKey: InjectionKey<PrivateFieldContext<unknown>>;
|
|
1183
|
+
declare const IS_ABSENT: unique symbol;
|
|
929
1184
|
|
|
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 };
|
|
1185
|
+
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 };
|