@fastkit/vui-wysiwyg 8.3.2 → 8.3.3
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/vui-wysiwyg.d.mts +54 -1732
- package/package.json +13 -12
package/dist/vui-wysiwyg.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropType, VNodeChild } from "vue";
|
|
2
2
|
import { AnyExtension, Editor, EditorOptions, Extension, Extensions, Mark, Node } from "@tiptap/vue-3";
|
|
3
3
|
import { EditorView } from "@tiptap/pm/view";
|
|
4
4
|
import { BulletListOptions } from "@tiptap/extension-bullet-list";
|
|
@@ -11,6 +11,7 @@ import { IconName, TextableControl, VuiService } from "@fastkit/vui";
|
|
|
11
11
|
import { OrderedListOptions } from "@tiptap/extension-ordered-list";
|
|
12
12
|
import { TextAlignOptions } from "@tiptap/extension-text-align";
|
|
13
13
|
import { Node as Node$1 } from "@tiptap/pm/model";
|
|
14
|
+
|
|
14
15
|
//#region src/schemes.d.ts
|
|
15
16
|
declare const EDITOR_EVENTS: readonly ["beforeCreate", "create", "update", "selectionUpdate", "transaction", "focus", "blur", "destroy"];
|
|
16
17
|
type PrefixedEventName<S extends string> = `on${Capitalize<S>}`;
|
|
@@ -271,1685 +272,6 @@ interface WysiwygCustomTagToolSettings extends Pick<WysiwygEditorTool, 'icon' |
|
|
|
271
272
|
*/
|
|
272
273
|
declare function createWysiwygCustomTagTool(markName: string, settings: WysiwygCustomTagToolSettings): WysiwygEditorToolFactory;
|
|
273
274
|
//#endregion
|
|
274
|
-
//#region ../ts-type-utils/types/types.d.ts
|
|
275
|
-
/**
|
|
276
|
-
* Recursive Arrays
|
|
277
|
-
*/
|
|
278
|
-
type RecursiveArray<T> = T | RecursiveArray<T>[];
|
|
279
|
-
//#endregion
|
|
280
|
-
//#region ../helpers/dist/helpers.d.mts
|
|
281
|
-
type Mixin<T extends object, U extends object> = Omit<T, keyof U> & U;
|
|
282
|
-
/**
|
|
283
|
-
* Returns a Proxy instance that mixes in the specified trait object for the given base object
|
|
284
|
-
*
|
|
285
|
-
* @param base - Base object
|
|
286
|
-
* @param trait - trait object
|
|
287
|
-
* @returns Mixed-in Proxy
|
|
288
|
-
*/
|
|
289
|
-
//#endregion
|
|
290
|
-
//#region ../rules/dist/rules.d.mts
|
|
291
|
-
//#endregion
|
|
292
|
-
//#region src/schemes.d.ts
|
|
293
|
-
/**
|
|
294
|
-
* Symbol indicating a validation error.
|
|
295
|
-
*/
|
|
296
|
-
declare const VALIDATION_ERROR_SYMBOL = "ValidationError";
|
|
297
|
-
/**
|
|
298
|
-
* Validation error.
|
|
299
|
-
*/
|
|
300
|
-
interface ValidationError {
|
|
301
|
-
/**
|
|
302
|
-
* Symbol indicating a validation error.
|
|
303
|
-
*
|
|
304
|
-
* @see {@link VALIDATION_ERROR_SYMBOL}
|
|
305
|
-
*/
|
|
306
|
-
$$symbol: typeof VALIDATION_ERROR_SYMBOL;
|
|
307
|
-
/** Failed validation rule name. */
|
|
308
|
-
name: string;
|
|
309
|
-
/** Prefix for the path during object enumeration. */
|
|
310
|
-
eachPrefix?: string;
|
|
311
|
-
/** Property name during object enumeration. */
|
|
312
|
-
path?: string | number;
|
|
313
|
-
/** Full path to the property during object enumeration. */
|
|
314
|
-
fullPath?: string;
|
|
315
|
-
/** Error message. */
|
|
316
|
-
message: string;
|
|
317
|
-
/** Failed validation value. */
|
|
318
|
-
value?: any;
|
|
319
|
-
/** List of errors for descendant properties if it's an error for an object. */
|
|
320
|
-
children?: ValidationError[];
|
|
321
|
-
/** Constraints set in the rule. */
|
|
322
|
-
constraints?: any;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Check if the specified value is a validation error.
|
|
326
|
-
*
|
|
327
|
-
* @param source - Value to be checked.
|
|
328
|
-
* @returns `true` if it is a validation error.
|
|
329
|
-
*/
|
|
330
|
-
/**
|
|
331
|
-
* Symbol indicating validation cancellation.
|
|
332
|
-
*/
|
|
333
|
-
declare const VALIDATE_CANCEL_SYMBOL = "__VALIDATE_CANCEL_SYMBOL__";
|
|
334
|
-
/**
|
|
335
|
-
* Check if the specified value is a symbol for validation cancellation.
|
|
336
|
-
*
|
|
337
|
-
* @param source - Value to be checked.
|
|
338
|
-
* @returns `true` if it is a symbol for cancellation.
|
|
339
|
-
*/
|
|
340
|
-
//#endregion
|
|
341
|
-
//#region src/factories/rule.d.ts
|
|
342
|
-
/**
|
|
343
|
-
* Execution result of the rule.
|
|
344
|
-
*/
|
|
345
|
-
type RuleResult = Promise<void | typeof VALIDATE_CANCEL_SYMBOL | ValidationError>;
|
|
346
|
-
/**
|
|
347
|
-
* Validation options for the rule.
|
|
348
|
-
*/
|
|
349
|
-
interface RuleValidationOptions {
|
|
350
|
-
/**
|
|
351
|
-
* Property name during object enumeration.
|
|
352
|
-
*
|
|
353
|
-
* This is typically not specified from the application and is intended for internal use.
|
|
354
|
-
*
|
|
355
|
-
* @internal
|
|
356
|
-
*/
|
|
357
|
-
path?: string | number;
|
|
358
|
-
/**
|
|
359
|
-
* Prefix for the path during object enumeration.
|
|
360
|
-
*
|
|
361
|
-
* This is typically not specified from the application and is intended for internal use.
|
|
362
|
-
*
|
|
363
|
-
* @internal
|
|
364
|
-
*/
|
|
365
|
-
eachPrefix?: string;
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Result of rule validation.
|
|
369
|
-
*/
|
|
370
|
-
type RuleValidationResultValue = /** When it passes verification */true /** When verification fails */ | false /** When the verification is considered successful and the subsequent verifications are skipped */ | typeof VALIDATE_CANCEL_SYMBOL /** When verification fails */ | string /** When there is a nested validation result object */ | ValidationError[];
|
|
371
|
-
/**
|
|
372
|
-
* Result of rule validation or its Promise instance.
|
|
373
|
-
*/
|
|
374
|
-
type RuleValidationResult = RuleValidationResultValue | Promise<RuleValidationResultValue>;
|
|
375
|
-
/**
|
|
376
|
-
* Message specification for the rule.
|
|
377
|
-
*/
|
|
378
|
-
type RuleMessageSpec<C = any> = string | ((value: any, ctx: RuleValidateContext<C>) => string);
|
|
379
|
-
/** Basic settings for the rule. */
|
|
380
|
-
interface RuleBasicSettings<C = any> {
|
|
381
|
-
/** Rule name. */
|
|
382
|
-
name: string;
|
|
383
|
-
/**
|
|
384
|
-
* Message specification for the rule.
|
|
385
|
-
*
|
|
386
|
-
* @see {@link RuleMessageSpec}
|
|
387
|
-
*/
|
|
388
|
-
message?: RuleMessageSpec<C>;
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Rule settings.
|
|
392
|
-
*/
|
|
393
|
-
type RuleSettings<C = any> = (RuleBasicSettings<C> & {
|
|
394
|
-
/**
|
|
395
|
-
* Validation function.
|
|
396
|
-
*
|
|
397
|
-
* @param value - Value to be validated.
|
|
398
|
-
* @param constraints - Constraints.
|
|
399
|
-
* @returns Result of rule validation or its Promise instance.
|
|
400
|
-
*/
|
|
401
|
-
validate: (value: any, constraints: C) => RuleValidationResult;
|
|
402
|
-
/**
|
|
403
|
-
* Constraints.
|
|
404
|
-
*
|
|
405
|
-
* Passed as the second argument to the validation function, this value can be customized through rule forking.
|
|
406
|
-
*/
|
|
407
|
-
constraints: C;
|
|
408
|
-
}) | (RuleBasicSettings<C> & {
|
|
409
|
-
/**
|
|
410
|
-
* Validation function.
|
|
411
|
-
*
|
|
412
|
-
* @param value - Value to be validated.
|
|
413
|
-
* @returns Result of rule validation or its Promise instance.
|
|
414
|
-
*/
|
|
415
|
-
validate: (value: any) => RuleValidationResult;
|
|
416
|
-
constraints?: any;
|
|
417
|
-
});
|
|
418
|
-
/**
|
|
419
|
-
* Context object for rule validation.
|
|
420
|
-
*/
|
|
421
|
-
interface RuleValidateContext<C = any> {
|
|
422
|
-
/** Rule name. */
|
|
423
|
-
name: string;
|
|
424
|
-
/** Value to be validated. */
|
|
425
|
-
value: any;
|
|
426
|
-
/** Constraints. */
|
|
427
|
-
constraints: C;
|
|
428
|
-
/** Prefix for the path during object enumeration. */
|
|
429
|
-
eachPrefix?: string;
|
|
430
|
-
/** Property name during object enumeration. */
|
|
431
|
-
path?: string | number;
|
|
432
|
-
/** Full path to the property during object enumeration. */
|
|
433
|
-
fullPath?: string;
|
|
434
|
-
/**
|
|
435
|
-
* Message specification for the rule.
|
|
436
|
-
*
|
|
437
|
-
* @see {@link RuleMessageSpec}
|
|
438
|
-
*/
|
|
439
|
-
message?: RuleMessageSpec<C>;
|
|
440
|
-
/** Exception that occurred during rule validation. */
|
|
441
|
-
exception?: any;
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* Fork settings for the rule.
|
|
445
|
-
*/
|
|
446
|
-
interface RuleForkSettings<C = any> {
|
|
447
|
-
/** New rule name. */
|
|
448
|
-
name?: string;
|
|
449
|
-
/** New constraints. */
|
|
450
|
-
constraints?: C;
|
|
451
|
-
/**
|
|
452
|
-
* New message specification.
|
|
453
|
-
*
|
|
454
|
-
* @see {@link RuleMessageSpec}
|
|
455
|
-
*/
|
|
456
|
-
message?: RuleMessageSpec<C>;
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Rule interface.
|
|
460
|
-
*/
|
|
461
|
-
interface Rule<C = any> {
|
|
462
|
-
<EC extends C = C>(constraints: Partial<EC>, overRides?: string | Partial<RuleSettings<EC>>): Rule<EC>;
|
|
463
|
-
/** Rule name. */
|
|
464
|
-
$name: string;
|
|
465
|
-
/**
|
|
466
|
-
* Validate the specified value.
|
|
467
|
-
*
|
|
468
|
-
* @param value - Value to be validated.
|
|
469
|
-
* @param options Validation options for the rule.
|
|
470
|
-
* @returns Execution result of the rule.
|
|
471
|
-
*/
|
|
472
|
-
validate: (value: any, options?: RuleValidationOptions) => RuleResult;
|
|
473
|
-
/**
|
|
474
|
-
* Message specification for the rule.
|
|
475
|
-
*
|
|
476
|
-
* @see {@link RuleMessageSpec}
|
|
477
|
-
*/
|
|
478
|
-
message: RuleMessageSpec<C>;
|
|
479
|
-
/**
|
|
480
|
-
* Constraints.
|
|
481
|
-
*
|
|
482
|
-
* Passed as the second argument to the validation function, this value can be customized through rule forking.
|
|
483
|
-
*/
|
|
484
|
-
constraints: C;
|
|
485
|
-
/**
|
|
486
|
-
* Fork this rule to create a new rule.
|
|
487
|
-
*
|
|
488
|
-
* Used when creating a new rule with customized name, constraints, and message specifications.
|
|
489
|
-
*
|
|
490
|
-
* @param settings - RuleForkSettings
|
|
491
|
-
*/
|
|
492
|
-
fork(settings: RuleForkSettings): Rule<C>;
|
|
493
|
-
/**
|
|
494
|
-
* Validation function.
|
|
495
|
-
*
|
|
496
|
-
* @internal
|
|
497
|
-
*/
|
|
498
|
-
_validate: ((value: any, constraints: C) => RuleValidationResult) | ((value: any) => RuleValidationResult);
|
|
499
|
-
/**
|
|
500
|
-
* Options used in the most recent validation.
|
|
501
|
-
*
|
|
502
|
-
* @see {@link RuleValidationOptions}
|
|
503
|
-
*/
|
|
504
|
-
_lastValidationOptions: RuleValidationOptions;
|
|
505
|
-
/**
|
|
506
|
-
* Retrieve the rule as JSON.
|
|
507
|
-
*/
|
|
508
|
-
toJSON(): {
|
|
509
|
-
/** Rule name. */name: string; /** Constraints. */
|
|
510
|
-
constraints: C;
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* Create a rule.
|
|
515
|
-
*
|
|
516
|
-
* @param settings - Rule settings.
|
|
517
|
-
* @returns Rule interface.
|
|
518
|
-
*
|
|
519
|
-
* @see {@link RuleSettings}
|
|
520
|
-
*/
|
|
521
|
-
/**
|
|
522
|
-
* Interface available for validation rule.
|
|
523
|
-
*/
|
|
524
|
-
interface VerifiableRule extends Pick<Rule, 'validate' | 'message' | '$name'> {}
|
|
525
|
-
/**
|
|
526
|
-
* Verifiable function type.
|
|
527
|
-
*
|
|
528
|
-
* - Treats it as an error if it returns `string` or `false`.
|
|
529
|
-
* - If it returns `string`, it is considered as an error message.
|
|
530
|
-
*/
|
|
531
|
-
type VerifiableFn = (value: any) => string | boolean | undefined | void | Promise<string | boolean | undefined | void>;
|
|
532
|
-
/**
|
|
533
|
-
* Rule or function available for validation.
|
|
534
|
-
*/
|
|
535
|
-
type VerifiableRuleOrFn = VerifiableRule | VerifiableFn;
|
|
536
|
-
/**
|
|
537
|
-
* Create a validation interface from a function.
|
|
538
|
-
*
|
|
539
|
-
* @param fn - Verifiable function type.
|
|
540
|
-
* @returns Interface available for validation rule.
|
|
541
|
-
*
|
|
542
|
-
* @see {@link VerifiableFn}
|
|
543
|
-
* @see {@link VerifiableRule}
|
|
544
|
-
*/
|
|
545
|
-
//#endregion
|
|
546
|
-
//#region ../vue-utils/dist/vue-utils.d.mts
|
|
547
|
-
type TypedSlot<Prop = any> = (prop: Prop) => VNodeChild;
|
|
548
|
-
type VNodeChildOrSlot<Prop = any> = VNodeChild | TypedSlot<Prop>;
|
|
549
|
-
//#endregion
|
|
550
|
-
//#region src/utils/slots.d.ts
|
|
551
|
-
type RawSlot = (...args: any[]) => any;
|
|
552
|
-
type RawSlots = Record<string, RawSlot>;
|
|
553
|
-
/**
|
|
554
|
-
* Modify all ReturnTypes of the map type of the Slot
|
|
555
|
-
*
|
|
556
|
-
*/
|
|
557
|
-
type NormalizedSlotsReturnTypes<S extends RawSlots, T> = { [K in keyof S]: (...params: Parameters<S[K]>) => T };
|
|
558
|
-
/**
|
|
559
|
-
* Map of slots that can be bound as `v-slots` directives.
|
|
560
|
-
*/
|
|
561
|
-
type SlotsDirectiveBindings<S extends RawSlots> = NormalizedSlotsReturnTypes<S, VNodeChild>;
|
|
562
|
-
/**
|
|
563
|
-
* Interface of the slots object that can be referenced in the setup context
|
|
564
|
-
*/
|
|
565
|
-
/**
|
|
566
|
-
* Map type of slots that can be set as `slots` option in Vue components
|
|
567
|
-
*/
|
|
568
|
-
type ResolvedSlots<S extends RawSlots> = SlotsType<NormalizedSlotsReturnTypes<S, VNode[]>>;
|
|
569
|
-
/**
|
|
570
|
-
* A factory that generates map types for slots that can be set as `slots` options in Vue components and props options for tsx support
|
|
571
|
-
*
|
|
572
|
-
*/
|
|
573
|
-
type DefinedSlots<S extends RawSlots> = ResolvedSlots<S> & {
|
|
574
|
-
(): {
|
|
575
|
-
'v-slots': PropType<SlotsDirectiveBindings<S>>;
|
|
576
|
-
};
|
|
577
|
-
};
|
|
578
|
-
/**
|
|
579
|
-
* Define Vue slot options and props factory for tsx support
|
|
580
|
-
*
|
|
581
|
-
* @example
|
|
582
|
-
* ```tsx
|
|
583
|
-
* import { defineComponent } from 'vue';
|
|
584
|
-
* import { defineSlots } from '@fastkit/vue-utils';
|
|
585
|
-
*
|
|
586
|
-
* const slots = defineSlots({
|
|
587
|
-
* default?: (params: string) => any;
|
|
588
|
-
* requiredSlots: (optionalParams?: number) => any;
|
|
589
|
-
* });
|
|
590
|
-
*
|
|
591
|
-
* const Component = defineComponent({
|
|
592
|
-
* props: {
|
|
593
|
-
* ...slots(), // For tsx
|
|
594
|
-
* },
|
|
595
|
-
* slots,
|
|
596
|
-
* setup() {
|
|
597
|
-
* // .....
|
|
598
|
-
* },
|
|
599
|
-
* });
|
|
600
|
-
*
|
|
601
|
-
* <Component
|
|
602
|
-
* v-slots={{
|
|
603
|
-
* requiredSlots: (optionalParams) => `${optionalParams || 'fallback message'}`,
|
|
604
|
-
* default: () => <div>Hello slots.</div>
|
|
605
|
-
* }}
|
|
606
|
-
* />
|
|
607
|
-
* ```
|
|
608
|
-
*
|
|
609
|
-
* @returns slot options and props factory
|
|
610
|
-
*/
|
|
611
|
-
//#endregion
|
|
612
|
-
//#region ../vue-form-control/dist/vue-form-control.d.mts
|
|
613
|
-
//#region src/schemes/autocapitalize.d.ts
|
|
614
|
-
type FormAutoCapitalize = 'off' | 'on' | 'words' | 'characters'; //#endregion
|
|
615
|
-
//#region src/schemes/autocomplete.d.ts
|
|
616
|
-
declare const FORM_AUTO_COMPLETES: readonly ["off", "on", "name", "honorific-prefix", "given-name", "additional-name", "family-name", "honorific-suffix", "nickname", "email", "username", "new-password", "current-password", "one-time-code", "organization-title", "organization", "street-address", "address-line1", "address-line2", "address-line3", "address-level4", "address-level3", "address-level2", "address-level1", "country", "country-name", "postal-code", "cc-name", "cc-given-name", "cc-additional-name", "cc-family-name", "cc-number", "cc-exp", "cc-exp-month", "cc-exp-year", "cc-csc", "cc-type", "transaction-currency", "transaction-amount", "language", "bday", "bday-day", "bday-month", "bday-year", "sex", "tel", "tel-country-code", "tel-national", "tel-area-code", "tel-local", "tel-extension", "impp", "url", "photo"];
|
|
617
|
-
type FormAutoComplete = (typeof FORM_AUTO_COMPLETES)[number]; //#endregion
|
|
618
|
-
//#region src/schemes/textinput.d.ts
|
|
619
|
-
type TextFinalizer = (value?: string | null) => string | Promise<string>;
|
|
620
|
-
declare const BUILTIN_TEXT_FINALIZERS: Record<"trim" | "removeSpace" | "upper" | "lower" | "halfWidth" | "singleSpace", TextFinalizer>;
|
|
621
|
-
type BuiltinTextFinalizerName = keyof typeof BUILTIN_TEXT_FINALIZERS; //#endregion
|
|
622
|
-
//#region src/schemes/imask.d.ts
|
|
623
|
-
//#endregion
|
|
624
|
-
//#region src/composables/group.d.ts
|
|
625
|
-
declare function createFormGroupProps(): {
|
|
626
|
-
/**
|
|
627
|
-
* Collect the error messages of all nodes belonging to this node
|
|
628
|
-
*
|
|
629
|
-
* By default, a node attempts to render error messages on its own, but enabling this setting allows the parent group to manage the rendering of error messages.
|
|
630
|
-
* If you want to exclude a specific node from this configuration, enable the `showOwnErrors` setting for that node.
|
|
631
|
-
*/
|
|
632
|
-
collectErrorMessages: BooleanConstructor;
|
|
633
|
-
/**
|
|
634
|
-
* Auto scroll to the location of the form when invalid input is detected in the validation on submission
|
|
635
|
-
*/
|
|
636
|
-
disableAutoScroll: BooleanConstructor;
|
|
637
|
-
name: StringConstructor;
|
|
638
|
-
tag: StringConstructor;
|
|
639
|
-
modelValue: import("vue").Prop<unknown, unknown>;
|
|
640
|
-
tabindex: {
|
|
641
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
642
|
-
default: number;
|
|
643
|
-
};
|
|
644
|
-
autofocus: BooleanConstructor;
|
|
645
|
-
disabled: BooleanConstructor;
|
|
646
|
-
readonly: BooleanConstructor;
|
|
647
|
-
viewonly: BooleanConstructor;
|
|
648
|
-
spellcheck: BooleanConstructor;
|
|
649
|
-
required: BooleanConstructor | import("vue").PropType<boolean>;
|
|
650
|
-
clearable: BooleanConstructor;
|
|
651
|
-
validateTiming: {
|
|
652
|
-
type: import("vue").PropType<ValidateTiming>;
|
|
653
|
-
default: ValidateTiming;
|
|
654
|
-
};
|
|
655
|
-
rules: {
|
|
656
|
-
type: import("vue").PropType<RecursiveVerifiableRuleOrFn>;
|
|
657
|
-
default: () => never[];
|
|
658
|
-
};
|
|
659
|
-
validationDeps: import("vue").PropType<(nodeControl: FormNodeControl) => any>;
|
|
660
|
-
error: BooleanConstructor;
|
|
661
|
-
errorMessages: import("vue").PropType<string | string[]>;
|
|
662
|
-
showOwnErrors: {
|
|
663
|
-
type: BooleanConstructor;
|
|
664
|
-
default: undefined;
|
|
665
|
-
};
|
|
666
|
-
detach: BooleanConstructor;
|
|
667
|
-
};
|
|
668
|
-
type FormGroupProps = ExtractPropTypes<ReturnType<typeof createFormGroupProps>>;
|
|
669
|
-
declare function createFormGroupEmits(): {
|
|
670
|
-
'update:modelValue': (value: unknown) => boolean;
|
|
671
|
-
'update:errors': (errors: FormNodeError[]) => boolean;
|
|
672
|
-
change: (value: unknown) => boolean;
|
|
673
|
-
focus: (ev: FocusEvent) => boolean;
|
|
674
|
-
blur: (ev: FocusEvent) => boolean;
|
|
675
|
-
};
|
|
676
|
-
interface FormGroupEmitOptions extends ReturnType<typeof createFormGroupEmits> {}
|
|
677
|
-
type FormGroupContext = SetupContext<FormGroupEmitOptions>;
|
|
678
|
-
interface FormGroupOptions extends FormNodeControlBaseOptions {}
|
|
679
|
-
declare class FormGroupControl extends FormNodeControl {
|
|
680
|
-
readonly _props: FormGroupProps;
|
|
681
|
-
protected _allNodes: Ref<FormNodeControl[]>;
|
|
682
|
-
protected _allInvalidNodes: ComputedRef<FormNodeControl[]>;
|
|
683
|
-
/**
|
|
684
|
-
* All nodes in an error state belonging recursively to this group
|
|
685
|
-
*/
|
|
686
|
-
get allInvalidNodes(): FormNodeControl<any, any, BooleanConstructor>[];
|
|
687
|
-
/**
|
|
688
|
-
* Collect the error messages of all nodes belonging to this node
|
|
689
|
-
*/
|
|
690
|
-
get collectErrorMessages(): boolean;
|
|
691
|
-
/**
|
|
692
|
-
* Auto scroll to the location of the form when invalid input is detected in the validation on submission
|
|
693
|
-
*/
|
|
694
|
-
get disableAutoScroll(): boolean;
|
|
695
|
-
/**
|
|
696
|
-
* List of all nodes belonging to this group
|
|
697
|
-
*
|
|
698
|
-
* This list is a reactive list, and depending on usage, it may contain a large number of nodes.
|
|
699
|
-
* Please be aware that complex operations using this list can lead to performance issues.
|
|
700
|
-
*/
|
|
701
|
-
get allNodes(): FormNodeControl<any, any, BooleanConstructor>[];
|
|
702
|
-
constructor(props: FormGroupProps, ctx: FormGroupContext, options?: FormGroupOptions);
|
|
703
|
-
/** @internal */
|
|
704
|
-
__joinFromNode(node: FormNodeControl): void;
|
|
705
|
-
/** @internal */
|
|
706
|
-
__leaveFromNode(node: FormNodeControl): void;
|
|
707
|
-
/**
|
|
708
|
-
* Recursively retrieve the leading node in an error state within this group
|
|
709
|
-
*/
|
|
710
|
-
findFirstInvalidNode(): FormNodeControl<any, any, BooleanConstructor> | undefined;
|
|
711
|
-
/**
|
|
712
|
-
* Scroll to the position of the leading node in an error state within this group
|
|
713
|
-
*/
|
|
714
|
-
scrollToFirstInvalidNode(): void;
|
|
715
|
-
protected dispatchAutoScroll(): void;
|
|
716
|
-
protected _forceFinalize(): boolean;
|
|
717
|
-
/**
|
|
718
|
-
* Validate the values of this group and all descendant nodes. If there is one or more errors, scroll to the top error node
|
|
719
|
-
*
|
|
720
|
-
* If `disableAutoScroll` is set, scrolling will not be performed.
|
|
721
|
-
*/
|
|
722
|
-
validateAndScroll(): Promise<boolean>;
|
|
723
|
-
}
|
|
724
|
-
//#endregion
|
|
725
|
-
//#region src/composables/form.d.ts
|
|
726
|
-
/**
|
|
727
|
-
* Form action context
|
|
728
|
-
*/
|
|
729
|
-
interface FormActionContext {
|
|
730
|
-
/** Control for form element */
|
|
731
|
-
form: VueForm;
|
|
732
|
-
/** Action has been canceled */
|
|
733
|
-
get canceled(): boolean;
|
|
734
|
-
/** Submit event object */
|
|
735
|
-
get event(): Event;
|
|
736
|
-
/**
|
|
737
|
-
* Cancel the action
|
|
738
|
-
*
|
|
739
|
-
* Currently, this method simply sets the `canceled` property of the context to `false`.
|
|
740
|
-
* This specification is subject to change in the future.
|
|
741
|
-
*/
|
|
742
|
-
cancel: () => void;
|
|
743
|
-
}
|
|
744
|
-
type FormActionHandler = (ctx: FormActionContext) => any;
|
|
745
|
-
/**
|
|
746
|
-
* @deprecated
|
|
747
|
-
* This type has been changed to {@link FormActionHandler}. It will be deprecated in future releases.
|
|
748
|
-
*/
|
|
749
|
-
type FormAction = string | FormActionHandler;
|
|
750
|
-
interface FormInvalidSubmissionAcceptorContext {
|
|
751
|
-
/** Form control */
|
|
752
|
-
readonly form: VueForm;
|
|
753
|
-
/**
|
|
754
|
-
* Accepted
|
|
755
|
-
*/
|
|
756
|
-
get accepted(): boolean;
|
|
757
|
-
/**
|
|
758
|
-
* Accept submission
|
|
759
|
-
*/
|
|
760
|
-
accept(): void;
|
|
761
|
-
}
|
|
762
|
-
type FormInvalidSubmissionAcceptor = (payload: FormInvalidSubmissionAcceptorContext) => void;
|
|
763
|
-
type FormAcceptInvalidSubmissionSpec = boolean | FormInvalidSubmissionAcceptor;
|
|
764
|
-
interface FormOptions extends FormGroupOptions {}
|
|
765
|
-
declare function createFormProps(options?: FormOptions): {
|
|
766
|
-
/**
|
|
767
|
-
* Do not perform default HTML validation when submitting the form
|
|
768
|
-
*
|
|
769
|
-
* @default true
|
|
770
|
-
*/
|
|
771
|
-
novalidate: {
|
|
772
|
-
type: BooleanConstructor;
|
|
773
|
-
default: boolean;
|
|
774
|
-
};
|
|
775
|
-
/**
|
|
776
|
-
* Action settings for form submission
|
|
777
|
-
*
|
|
778
|
-
* Set the destination URL or callback handler
|
|
779
|
-
*/
|
|
780
|
-
action: PropType<FormAction>;
|
|
781
|
-
/**
|
|
782
|
-
* Automatic validation on transmission
|
|
783
|
-
*
|
|
784
|
-
* If this setting is enabled, all validation will be done before transmission and the transmission process will be canceled if there are invalid entries
|
|
785
|
-
*
|
|
786
|
-
* @default true
|
|
787
|
-
*/
|
|
788
|
-
autoValidate: {
|
|
789
|
-
type: BooleanConstructor;
|
|
790
|
-
default: boolean;
|
|
791
|
-
};
|
|
792
|
-
/**
|
|
793
|
-
* Form is sending
|
|
794
|
-
*/
|
|
795
|
-
sending: BooleanConstructor;
|
|
796
|
-
/**
|
|
797
|
-
* Accept invalid values during form submission
|
|
798
|
-
*
|
|
799
|
-
* @default false
|
|
800
|
-
*/
|
|
801
|
-
acceptInvalidSubmission: {
|
|
802
|
-
type: PropType<FormAcceptInvalidSubmissionSpec>;
|
|
803
|
-
default: boolean;
|
|
804
|
-
};
|
|
805
|
-
collectErrorMessages: BooleanConstructor;
|
|
806
|
-
disableAutoScroll: BooleanConstructor;
|
|
807
|
-
name: StringConstructor;
|
|
808
|
-
tag: StringConstructor;
|
|
809
|
-
modelValue: import("vue").Prop<unknown, unknown>;
|
|
810
|
-
tabindex: {
|
|
811
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
812
|
-
default: number;
|
|
813
|
-
};
|
|
814
|
-
autofocus: BooleanConstructor;
|
|
815
|
-
disabled: BooleanConstructor;
|
|
816
|
-
readonly: BooleanConstructor;
|
|
817
|
-
viewonly: BooleanConstructor;
|
|
818
|
-
spellcheck: BooleanConstructor;
|
|
819
|
-
required: BooleanConstructor | PropType<boolean>;
|
|
820
|
-
clearable: BooleanConstructor;
|
|
821
|
-
validateTiming: {
|
|
822
|
-
type: PropType<ValidateTiming>;
|
|
823
|
-
default: ValidateTiming;
|
|
824
|
-
};
|
|
825
|
-
rules: {
|
|
826
|
-
type: PropType<RecursiveVerifiableRuleOrFn>;
|
|
827
|
-
default: () => never[];
|
|
828
|
-
};
|
|
829
|
-
validationDeps: PropType<(nodeControl: FormNodeControl) => any>;
|
|
830
|
-
error: BooleanConstructor;
|
|
831
|
-
errorMessages: PropType<string | string[]>;
|
|
832
|
-
showOwnErrors: {
|
|
833
|
-
type: BooleanConstructor;
|
|
834
|
-
default: undefined;
|
|
835
|
-
};
|
|
836
|
-
detach: BooleanConstructor;
|
|
837
|
-
};
|
|
838
|
-
type FormProps = ExtractPropTypes<ReturnType<typeof createFormProps>>;
|
|
839
|
-
declare function createFormEmits(): {
|
|
840
|
-
/**
|
|
841
|
-
* Form Submission
|
|
842
|
-
*
|
|
843
|
-
* This event is notified when the validation is complete and before the action is called
|
|
844
|
-
*
|
|
845
|
-
* @param form - VueForm instance
|
|
846
|
-
* @param ev - Event
|
|
847
|
-
*/
|
|
848
|
-
submit: (form: VueForm, ev: Event) => boolean;
|
|
849
|
-
/**
|
|
850
|
-
* Updating sending status
|
|
851
|
-
*
|
|
852
|
-
* @param sending - sending status
|
|
853
|
-
* @param form - VueForm instance
|
|
854
|
-
*/
|
|
855
|
-
'update:sending': (sending: boolean, form: VueForm) => boolean;
|
|
856
|
-
/**
|
|
857
|
-
* The form action has been finished
|
|
858
|
-
*
|
|
859
|
-
* @param actionContext - Form action context
|
|
860
|
-
*/
|
|
861
|
-
finishAction: (actionContext: FormActionContext) => boolean;
|
|
862
|
-
/**
|
|
863
|
-
* Failed automatic validation
|
|
864
|
-
*
|
|
865
|
-
* @param form - VueForm instance
|
|
866
|
-
*/
|
|
867
|
-
autoValidationFailed: (form: VueForm) => boolean;
|
|
868
|
-
'update:modelValue': (value: unknown) => boolean;
|
|
869
|
-
'update:errors': (errors: FormNodeError[]) => boolean;
|
|
870
|
-
change: (value: unknown) => boolean;
|
|
871
|
-
focus: (ev: FocusEvent) => boolean;
|
|
872
|
-
blur: (ev: FocusEvent) => boolean;
|
|
873
|
-
};
|
|
874
|
-
interface FormEmitOptions extends ReturnType<typeof createFormEmits> {}
|
|
875
|
-
type FormContext = SetupContext<FormEmitOptions>;
|
|
876
|
-
/**
|
|
877
|
-
* Option to check the submittability of the form
|
|
878
|
-
*/
|
|
879
|
-
interface PrepareFormSubmissionOptions {
|
|
880
|
-
/** Skip operability check */
|
|
881
|
-
skipOperationCheck?: boolean;
|
|
882
|
-
/** Skip in-progress check during submission */
|
|
883
|
-
skipSendingCheck?: boolean;
|
|
884
|
-
/** Skip validation */
|
|
885
|
-
skipValidation?: boolean;
|
|
886
|
-
}
|
|
887
|
-
/**
|
|
888
|
-
* Dispatch option for form action
|
|
889
|
-
*/
|
|
890
|
-
interface DispatchFormActionOptions extends PrepareFormSubmissionOptions {
|
|
891
|
-
/** Submit event object */
|
|
892
|
-
event?: Event;
|
|
893
|
-
}
|
|
894
|
-
interface ComputedFormAttributes {
|
|
895
|
-
ref: Ref<HTMLFormElement | null>;
|
|
896
|
-
action: string | undefined;
|
|
897
|
-
spellcheck: boolean;
|
|
898
|
-
onSubmit: (ev: Event) => void;
|
|
899
|
-
novalidate: boolean;
|
|
900
|
-
'aria-disabled': boolean;
|
|
901
|
-
}
|
|
902
|
-
/**
|
|
903
|
-
* Control for form element
|
|
904
|
-
*/
|
|
905
|
-
declare class VueForm extends FormGroupControl {
|
|
906
|
-
readonly _props: FormProps;
|
|
907
|
-
protected _formContext: FormContext;
|
|
908
|
-
protected _nativeAction: ComputedRef<string | undefined>;
|
|
909
|
-
protected _fnAction: ComputedRef<FormActionHandler | undefined>;
|
|
910
|
-
protected _formRef: Ref<HTMLFormElement | null, HTMLFormElement | null>;
|
|
911
|
-
protected _actionPromise: Ref<{
|
|
912
|
-
then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
913
|
-
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
|
|
914
|
-
finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
|
|
915
|
-
readonly [Symbol.toStringTag]: string;
|
|
916
|
-
} | null, Promise<any> | {
|
|
917
|
-
then: <TResult1 = any, TResult2 = never>(onfulfilled?: ((value: any) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
918
|
-
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<any>;
|
|
919
|
-
finally: (onfinally?: (() => void) | null | undefined) => Promise<any>;
|
|
920
|
-
readonly [Symbol.toStringTag]: string;
|
|
921
|
-
} | null>;
|
|
922
|
-
protected _sending: ComputedRef<boolean>;
|
|
923
|
-
protected _formAttrs: ComputedRef<ComputedFormAttributes>;
|
|
924
|
-
/**
|
|
925
|
-
* Do not perform default HTML validation when submitting the form
|
|
926
|
-
*/
|
|
927
|
-
get novalidate(): boolean;
|
|
928
|
-
get nativeAction(): string | undefined;
|
|
929
|
-
/**
|
|
930
|
-
* Executing asynchronous submission action
|
|
931
|
-
*/
|
|
932
|
-
get sending(): boolean;
|
|
933
|
-
/**
|
|
934
|
-
* Automatic validation on transmission
|
|
935
|
-
*
|
|
936
|
-
* If this setting is enabled, all validation will be done before transmission and the transmission process will be canceled if there are invalid entries
|
|
937
|
-
*
|
|
938
|
-
* @default true
|
|
939
|
-
*/
|
|
940
|
-
get autoValidate(): boolean;
|
|
941
|
-
/**
|
|
942
|
-
* Attributes to apply to the form element
|
|
943
|
-
*/
|
|
944
|
-
get formAttrs(): ComputedFormAttributes;
|
|
945
|
-
constructor(props: FormProps, ctx: FormContext, options?: FormOptions);
|
|
946
|
-
/**
|
|
947
|
-
* Generates SubmitEvent and dispatches it to the form element
|
|
948
|
-
*
|
|
949
|
-
* - If `preventDefault()` is called by the event handler, the sending process is canceled
|
|
950
|
-
*/
|
|
951
|
-
submit(): void;
|
|
952
|
-
/**
|
|
953
|
-
* Returns `true` if the form is in a submittable state after performing state checks and validation
|
|
954
|
-
*
|
|
955
|
-
* @param options - PrepareFormSubmissionOptions
|
|
956
|
-
* @returns `true` if submission is possible
|
|
957
|
-
*/
|
|
958
|
-
prepareFormSubmission(options?: PrepareFormSubmissionOptions): Promise<boolean>;
|
|
959
|
-
protected _dispatchAction(options?: DispatchFormActionOptions): Promise<void>;
|
|
960
|
-
/**
|
|
961
|
-
* Dispatch the specified action function
|
|
962
|
-
*
|
|
963
|
-
* @param options - Dispatch option for form action
|
|
964
|
-
*/
|
|
965
|
-
dispatchAction(options?: DispatchFormActionOptions): Promise<void>;
|
|
966
|
-
/**
|
|
967
|
-
* Handler for form element submission
|
|
968
|
-
*
|
|
969
|
-
* @param ev - Submit event object
|
|
970
|
-
*/
|
|
971
|
-
handleSubmit(ev: Event): void;
|
|
972
|
-
}
|
|
973
|
-
//#endregion
|
|
974
|
-
//#region src/service.d.ts
|
|
975
|
-
type FormErrorMessageResolver = (error: FormNodeError, node?: FormNodeControl) => string | void;
|
|
976
|
-
/**
|
|
977
|
-
* Scroll option for the form element
|
|
978
|
-
*/
|
|
979
|
-
interface VueFormScrollOptions {
|
|
980
|
-
/**
|
|
981
|
-
* Default scroll option
|
|
982
|
-
*
|
|
983
|
-
* @see {@link ScrollIntoViewOptions}
|
|
984
|
-
*/
|
|
985
|
-
options?: ScrollIntoViewOptions;
|
|
986
|
-
/**
|
|
987
|
-
* Scroll handler function
|
|
988
|
-
*
|
|
989
|
-
* @param element - Scroll target element
|
|
990
|
-
* @param options - Scroll option
|
|
991
|
-
* @returns When canceling the default scroll and implementing custom scrolling within the application, return a truthy value.
|
|
992
|
-
*/
|
|
993
|
-
fn?: (element: HTMLElement, options?: ScrollIntoViewOptions) => void;
|
|
994
|
-
}
|
|
995
|
-
interface VueFormServiceOptions {
|
|
996
|
-
errorMessageResolvers?: FormErrorMessageResolver[];
|
|
997
|
-
/**
|
|
998
|
-
* Scroll option for the form element
|
|
999
|
-
*
|
|
1000
|
-
* @see {@link VueFormScrollOptions}
|
|
1001
|
-
*/
|
|
1002
|
-
scroll?: VueFormScrollOptions;
|
|
1003
|
-
/**
|
|
1004
|
-
* Default value for text input autocomplete.
|
|
1005
|
-
*
|
|
1006
|
-
* @see {@link FormAutoComplete}
|
|
1007
|
-
*/
|
|
1008
|
-
defaultAutocomplete?: FormAutoComplete | boolean | undefined;
|
|
1009
|
-
}
|
|
1010
|
-
/**
|
|
1011
|
-
* Root service of `vue-form-control`
|
|
1012
|
-
*/
|
|
1013
|
-
declare class VueFormService {
|
|
1014
|
-
readonly errorMessageResolvers: FormErrorMessageResolver[];
|
|
1015
|
-
/**
|
|
1016
|
-
* Scroll option for the form element
|
|
1017
|
-
*
|
|
1018
|
-
* @see {@link VueFormScrollOptions}
|
|
1019
|
-
*/
|
|
1020
|
-
readonly scroll?: VueFormScrollOptions;
|
|
1021
|
-
constructor(options?: VueFormServiceOptions);
|
|
1022
|
-
addMessageResolver(resolvers: FormErrorMessageResolver | FormErrorMessageResolver[]): void;
|
|
1023
|
-
resolveErrorMessage(error: FormNodeError, node?: FormNodeControl): string | void;
|
|
1024
|
-
scrollToElement(element: HTMLElement, options?: ScrollIntoViewOptions): void;
|
|
1025
|
-
} //#endregion
|
|
1026
|
-
//#region src/composables/wrapper.d.ts
|
|
1027
|
-
type RequiredChipSource = (() => VNodeChild) | string | boolean;
|
|
1028
|
-
type FormNodeWrapperHinttip = boolean | string | (() => VNodeChild);
|
|
1029
|
-
type FormNodeWrapperHinttipDelay = 'click' | number;
|
|
1030
|
-
declare function createFormNodeWrapperProps$1(): {
|
|
1031
|
-
/**
|
|
1032
|
-
* Instance of FormNodeControl
|
|
1033
|
-
*
|
|
1034
|
-
* When this setting is applied, the state and error messages will always refer to the state of this node. If not set, it will attempt to compute them from descendant nodes.
|
|
1035
|
-
*/
|
|
1036
|
-
nodeControl: PropType<FormNodeControl>; /** label */
|
|
1037
|
-
label: PropType<VNodeChildOrSlot>; /** hint message */
|
|
1038
|
-
hint: PropType<VNodeChildOrSlot>; /** Settings for displaying hint as tips */
|
|
1039
|
-
hinttip: PropType<FormNodeWrapperHinttip>; /** hint tip Display Delay */
|
|
1040
|
-
hinttipDelay: PropType<FormNodeWrapperHinttipDelay>; /** Elements to be added to the information message */
|
|
1041
|
-
infoAppends: PropType<VNodeChildOrSlot>; /** Hide information */
|
|
1042
|
-
hiddenInfo: BooleanConstructor; /** Chip(required) display settings */
|
|
1043
|
-
requiredChip: PropType<RequiredChipSource>;
|
|
1044
|
-
/**
|
|
1045
|
-
* Collect the error messages of all nodes belonging to this node
|
|
1046
|
-
*
|
|
1047
|
-
* By default, a node attempts to render error messages on its own, but enabling this setting allows the parent wrapper to manage the rendering of error messages.
|
|
1048
|
-
* If you want to exclude a specific node from this configuration, enable the `showOwnErrors` setting for that node.
|
|
1049
|
-
*
|
|
1050
|
-
* @default true
|
|
1051
|
-
*/
|
|
1052
|
-
collectErrorMessages: {
|
|
1053
|
-
type: BooleanConstructor;
|
|
1054
|
-
default: boolean;
|
|
1055
|
-
};
|
|
1056
|
-
};
|
|
1057
|
-
type FormNodeWrapperProps = ExtractPropTypes<ReturnType<typeof createFormNodeWrapperProps$1>>;
|
|
1058
|
-
declare function createFormNodeWrapperEmits(): {
|
|
1059
|
-
clickLabel: (ev: PointerEvent, wrapper: FormNodeWrapper) => boolean;
|
|
1060
|
-
};
|
|
1061
|
-
type FormNodeWrapperEmitOptions = ReturnType<typeof createFormNodeWrapperEmits>;
|
|
1062
|
-
type FormNodeWrapperContext = SetupContext<FormNodeWrapperEmitOptions>;
|
|
1063
|
-
interface FormNodeWrapperOptions {
|
|
1064
|
-
hinttipPrepend?: () => VNodeChild;
|
|
1065
|
-
}
|
|
1066
|
-
/**
|
|
1067
|
-
* Form node wrapper
|
|
1068
|
-
*/
|
|
1069
|
-
declare class FormNodeWrapper {
|
|
1070
|
-
readonly _props: FormNodeWrapperProps;
|
|
1071
|
-
readonly _service: VueFormService;
|
|
1072
|
-
protected _ctx: FormNodeWrapperContext | undefined;
|
|
1073
|
-
protected _allNodes: Ref<FormNodeControl[]>;
|
|
1074
|
-
protected _labelSlot: ComputedRef<TypedSlot<FormNodeWrapper> | undefined>;
|
|
1075
|
-
protected _hintSlot: ComputedRef<TypedSlot<FormNodeWrapper> | undefined>;
|
|
1076
|
-
protected _hinttip: ComputedRef<VNodeChild>;
|
|
1077
|
-
protected _hinttipDelay: ComputedRef<FormNodeWrapperHinttipDelay | undefined>;
|
|
1078
|
-
protected _hinttipPrepend?: () => VNodeChild;
|
|
1079
|
-
protected _infoAppendsSlot: ComputedRef<TypedSlot<FormNodeWrapper> | undefined>;
|
|
1080
|
-
protected _validating: ComputedRef<boolean>;
|
|
1081
|
-
protected _pending: ComputedRef<boolean>;
|
|
1082
|
-
protected _focused: ComputedRef<boolean>;
|
|
1083
|
-
protected _dirty: ComputedRef<boolean>;
|
|
1084
|
-
protected _disabled: ComputedRef<boolean>;
|
|
1085
|
-
protected _readonly: ComputedRef<boolean>;
|
|
1086
|
-
protected _viewonly: ComputedRef<boolean>;
|
|
1087
|
-
protected _touched: ComputedRef<boolean>;
|
|
1088
|
-
protected _required: ComputedRef<boolean>;
|
|
1089
|
-
protected _invalid: ComputedRef<boolean>;
|
|
1090
|
-
protected _resolvedErrorMessages: ComputedRef<FormNodeErrorMessageSource[]>;
|
|
1091
|
-
/**
|
|
1092
|
-
* Root service of `vue-form-control`
|
|
1093
|
-
*
|
|
1094
|
-
* @see {@link VueFormService}
|
|
1095
|
-
*/
|
|
1096
|
-
get service(): VueFormService;
|
|
1097
|
-
/**
|
|
1098
|
-
* Instance of FormNodeControl
|
|
1099
|
-
*
|
|
1100
|
-
* When this setting is applied, the state and error messages will always refer to the state of this node. If not set, it will attempt to compute them from descendant nodes.
|
|
1101
|
-
*/
|
|
1102
|
-
get nodeControl(): FormNodeControl | undefined;
|
|
1103
|
-
/**
|
|
1104
|
-
* List of all nodes belonging to this wrapper
|
|
1105
|
-
*
|
|
1106
|
-
* This list is a reactive list, and depending on usage, it may contain a large number of nodes.
|
|
1107
|
-
* Please be aware that complex operations using this list can lead to performance issues.
|
|
1108
|
-
*/
|
|
1109
|
-
get allNodes(): FormNodeControl<any, any, BooleanConstructor>[];
|
|
1110
|
-
/**
|
|
1111
|
-
* At least one of the associated nodes is validating the value
|
|
1112
|
-
*/
|
|
1113
|
-
get validating(): boolean;
|
|
1114
|
-
/**
|
|
1115
|
-
* Pending processing
|
|
1116
|
-
*
|
|
1117
|
-
* This is marked as `true` during the validation and finalization process of the value
|
|
1118
|
-
*/
|
|
1119
|
-
get pending(): boolean;
|
|
1120
|
-
/**
|
|
1121
|
-
* One of the associated nodes is currently focused
|
|
1122
|
-
*/
|
|
1123
|
-
get focused(): boolean;
|
|
1124
|
-
/**
|
|
1125
|
-
* The changes to the input value have not been committed yet
|
|
1126
|
-
*
|
|
1127
|
-
* @see {@link FormNodeControl.initialValue initialValue}
|
|
1128
|
-
*/
|
|
1129
|
-
get dirty(): boolean;
|
|
1130
|
-
/**
|
|
1131
|
-
* The input value has not been changed from its initial value
|
|
1132
|
-
*/
|
|
1133
|
-
get pristine(): boolean;
|
|
1134
|
-
/**
|
|
1135
|
-
* All associated nodes are disabled
|
|
1136
|
-
*/
|
|
1137
|
-
get isDisabled(): boolean;
|
|
1138
|
-
/**
|
|
1139
|
-
* All associated nodes are read-only
|
|
1140
|
-
*/
|
|
1141
|
-
get isReadonly(): boolean;
|
|
1142
|
-
/**
|
|
1143
|
-
* All associated nodes are view-only
|
|
1144
|
-
*/
|
|
1145
|
-
get isViewonly(): boolean;
|
|
1146
|
-
/**
|
|
1147
|
-
* All associated nodes are operable
|
|
1148
|
-
*/
|
|
1149
|
-
get canOperation(): boolean;
|
|
1150
|
-
/**
|
|
1151
|
-
* One of the associated nodes has already been touched
|
|
1152
|
-
*/
|
|
1153
|
-
get touched(): boolean;
|
|
1154
|
-
/**
|
|
1155
|
-
* None of the associated nodes has been touched yet
|
|
1156
|
-
*/
|
|
1157
|
-
get untouched(): boolean;
|
|
1158
|
-
/**
|
|
1159
|
-
* One of the associated nodes requires input
|
|
1160
|
-
*/
|
|
1161
|
-
get isRequired(): boolean;
|
|
1162
|
-
/**
|
|
1163
|
-
* There is an error in the input value of one of the associated nodes
|
|
1164
|
-
*/
|
|
1165
|
-
get invalid(): boolean;
|
|
1166
|
-
/**
|
|
1167
|
-
* No errors in the input values of all associated nodes
|
|
1168
|
-
*/
|
|
1169
|
-
get valid(): boolean;
|
|
1170
|
-
/**
|
|
1171
|
-
* Collect the error messages of all nodes belonging to this node
|
|
1172
|
-
*/
|
|
1173
|
-
get collectErrorMessages(): boolean;
|
|
1174
|
-
/**
|
|
1175
|
-
* Source code for all collected error messages
|
|
1176
|
-
*
|
|
1177
|
-
* This list is generated based on the setting of {@link FormNodeControl.showOwnErrors showOwnErrors}.
|
|
1178
|
-
*
|
|
1179
|
-
* @see {@link FormNodeErrorMessageSource}
|
|
1180
|
-
*/
|
|
1181
|
-
get errorMessages(): FormNodeErrorMessageSource[];
|
|
1182
|
-
/**
|
|
1183
|
-
* Source code for the first error message among all collected messages
|
|
1184
|
-
*
|
|
1185
|
-
* This list is generated based on the setting of {@link FormNodeControl.showOwnErrors showOwnErrors}.
|
|
1186
|
-
*
|
|
1187
|
-
* @see {@link FormNodeErrorMessageSource}
|
|
1188
|
-
*/
|
|
1189
|
-
get firstErrorMessage(): FormNodeErrorMessageSource | undefined;
|
|
1190
|
-
get labelSlot(): TypedSlot<FormNodeWrapper> | undefined;
|
|
1191
|
-
get hintSlot(): TypedSlot<FormNodeWrapper> | undefined;
|
|
1192
|
-
get infoAppendsSlot(): TypedSlot<FormNodeWrapper> | undefined;
|
|
1193
|
-
get hinttipDelay(): FormNodeWrapperHinttipDelay | undefined;
|
|
1194
|
-
constructor(props: FormNodeWrapperProps, ctx: FormNodeWrapperContext, options?: FormNodeWrapperOptions);
|
|
1195
|
-
renderLabel(): import("vue").VNodeArrayChildren | undefined;
|
|
1196
|
-
renderHint(allowNotFocused?: boolean): import("vue").VNodeArrayChildren | undefined;
|
|
1197
|
-
renderInfoAppends(): import("vue").VNodeArrayChildren | undefined;
|
|
1198
|
-
protected _getContextOrDie(): {
|
|
1199
|
-
attrs: import("vue").Attrs;
|
|
1200
|
-
slots: Readonly<{
|
|
1201
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
1202
|
-
}>;
|
|
1203
|
-
emit: (event: "clickLabel", ev: PointerEvent, wrapper: FormNodeWrapper) => void;
|
|
1204
|
-
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
|
|
1205
|
-
};
|
|
1206
|
-
renderFirstError(slotsOverrides?: FormNodeErrorSlotsSource): import("vue").VNodeArrayChildren | undefined;
|
|
1207
|
-
renderMessage(allowNotFocused?: boolean): import("vue").VNodeArrayChildren | " ";
|
|
1208
|
-
renderHinttip(): {
|
|
1209
|
-
tip: VNodeChild;
|
|
1210
|
-
hint: VNodeChild;
|
|
1211
|
-
} | undefined;
|
|
1212
|
-
/** @internal */
|
|
1213
|
-
__joinFromNode(node: FormNodeControl): void;
|
|
1214
|
-
/** @internal */
|
|
1215
|
-
__leaveFromNode(node: FormNodeControl): void;
|
|
1216
|
-
/**
|
|
1217
|
-
* Generate a Proxy instance that extends the interface for this wrapper.
|
|
1218
|
-
*
|
|
1219
|
-
* @param trait - trait object
|
|
1220
|
-
* @returns Mixed-in Proxy
|
|
1221
|
-
*/
|
|
1222
|
-
extend<U extends object>(trait: U): Mixin<this, U>;
|
|
1223
|
-
}
|
|
1224
|
-
//#endregion
|
|
1225
|
-
//#region src/composables/node.d.ts
|
|
1226
|
-
type RecursiveVerifiableRuleOrFn = RecursiveArray<VerifiableRuleOrFn>;
|
|
1227
|
-
type FormNodeType = string | number | symbol;
|
|
1228
|
-
interface FormNodeError extends Omit<ValidationError, '$$symbol'> {}
|
|
1229
|
-
/**
|
|
1230
|
-
* Validation Timing
|
|
1231
|
-
*
|
|
1232
|
-
* - `always` Always validate
|
|
1233
|
-
* - `touch` Once touched, always validated thereafter.
|
|
1234
|
-
* - `blur` Once the focus is removed from the element at least once, subsequent validations will always be performed.
|
|
1235
|
-
* - `change` Once the value is changed at least once, subsequent validations will always be performed.
|
|
1236
|
-
* - `manual` Validation is not performed automatically. Only manual validation through programming is possible.
|
|
1237
|
-
*
|
|
1238
|
-
*/
|
|
1239
|
-
type ValidateTiming = 'always' | 'touch' | 'blur' | 'change' | 'manual';
|
|
1240
|
-
type ValidationResult = ValidationError[] | null;
|
|
1241
|
-
type ValidateResolver = (result: ValidationResult) => void;
|
|
1242
|
-
type FormNodeStateExtension = (nodeControl: FormNodeControl, computedValue: boolean) => boolean;
|
|
1243
|
-
interface FormNodeStateExtensions {
|
|
1244
|
-
disabled?: FormNodeStateExtension;
|
|
1245
|
-
readonly?: FormNodeStateExtension;
|
|
1246
|
-
viewonly?: FormNodeStateExtension;
|
|
1247
|
-
canOperation?: FormNodeStateExtension;
|
|
1248
|
-
}
|
|
1249
|
-
interface FormNodeControlBaseOptions {
|
|
1250
|
-
nodeType?: FormNodeType;
|
|
1251
|
-
requiredFactory?: () => Rule<any> | undefined;
|
|
1252
|
-
defaultValidateTiming?: ValidateTiming;
|
|
1253
|
-
validationValue?: () => any;
|
|
1254
|
-
stateExtensions?: FormNodeStateExtensions;
|
|
1255
|
-
/** Add a custom error message */
|
|
1256
|
-
errorMessages?: () => string | string[] | undefined;
|
|
1257
|
-
}
|
|
1258
|
-
interface FormNodeControlOptions<T = any, D = T, Required extends Prop<any> = BooleanConstructor> extends FormNodeControlBaseOptions {
|
|
1259
|
-
modelValue?: Prop<T, D>;
|
|
1260
|
-
required?: Required;
|
|
1261
|
-
shallow?: boolean;
|
|
1262
|
-
}
|
|
1263
|
-
type FormNodeErrorSlotsSource = {
|
|
1264
|
-
/** Error message */error?: (error: FormNodeError) => any;
|
|
1265
|
-
} & { [K in `error:${string}`]: (error: FormNodeError) => any };
|
|
1266
|
-
declare function createFormNodeProps<T, D = T, Required extends Prop<any> = PropType<boolean>>(options?: FormNodeControlOptions<T, D, Required>): {
|
|
1267
|
-
/**
|
|
1268
|
-
* form node name
|
|
1269
|
-
*
|
|
1270
|
-
* This is set as is for input elements.
|
|
1271
|
-
*/
|
|
1272
|
-
name: StringConstructor;
|
|
1273
|
-
/**
|
|
1274
|
-
* Tag string for node searching
|
|
1275
|
-
*/
|
|
1276
|
-
tag: StringConstructor; /** model value */
|
|
1277
|
-
modelValue: Prop<T, D>;
|
|
1278
|
-
/**
|
|
1279
|
-
* Tab index
|
|
1280
|
-
*
|
|
1281
|
-
* @default 0
|
|
1282
|
-
*
|
|
1283
|
-
* @see https://developer.mozilla.org/docs/Web/HTML/Global_attributes/tabindex
|
|
1284
|
-
*/
|
|
1285
|
-
tabindex: {
|
|
1286
|
-
type: (StringConstructor | NumberConstructor)[];
|
|
1287
|
-
default: number;
|
|
1288
|
-
}; /** Automatic focus */
|
|
1289
|
-
autofocus: BooleanConstructor; /** disabled state */
|
|
1290
|
-
disabled: BooleanConstructor; /** read-only state */
|
|
1291
|
-
readonly: BooleanConstructor; /** view-only state */
|
|
1292
|
-
viewonly: BooleanConstructor;
|
|
1293
|
-
/**
|
|
1294
|
-
* Spell Check Settings
|
|
1295
|
-
*
|
|
1296
|
-
* @see https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck
|
|
1297
|
-
*/
|
|
1298
|
-
spellcheck: BooleanConstructor; /** required */
|
|
1299
|
-
required: BooleanConstructor | Required; /** clearable */
|
|
1300
|
-
clearable: BooleanConstructor;
|
|
1301
|
-
/**
|
|
1302
|
-
* Validation Timing
|
|
1303
|
-
*
|
|
1304
|
-
* - `always` Always validate
|
|
1305
|
-
* - `touch` Once touched, always validated thereafter.
|
|
1306
|
-
* - `blur` Once the focus is removed from the element at least once, subsequent validations will always be performed.
|
|
1307
|
-
* - `change` Once the value is changed at least once, subsequent validations will always be performed.
|
|
1308
|
-
* - `manual` Validation is not performed automatically. Only manual validation through programming is possible.
|
|
1309
|
-
*
|
|
1310
|
-
* @see {@link ValidateTiming}
|
|
1311
|
-
*/
|
|
1312
|
-
validateTiming: {
|
|
1313
|
-
type: PropType<ValidateTiming>;
|
|
1314
|
-
default: ValidateTiming;
|
|
1315
|
-
};
|
|
1316
|
-
/**
|
|
1317
|
-
* List of validation rules
|
|
1318
|
-
*/
|
|
1319
|
-
rules: {
|
|
1320
|
-
type: PropType<RecursiveVerifiableRuleOrFn>;
|
|
1321
|
-
default: () => never[];
|
|
1322
|
-
};
|
|
1323
|
-
/**
|
|
1324
|
-
* Validation dependencies
|
|
1325
|
-
*
|
|
1326
|
-
* In vue-form-control, validation is performed again whenever the input value or related values change. However, if the validation condition references values from other nodes or external reactive values that are not included in the node, those changes cannot be detected.
|
|
1327
|
-
* By registering a function that returns such external reactive values, validation can be automatically triggered.
|
|
1328
|
-
*/
|
|
1329
|
-
validationDeps: PropType<(nodeControl: FormNodeControl) => any>; /** Force an error state. */
|
|
1330
|
-
error: BooleanConstructor; /** List of error messages. */
|
|
1331
|
-
errorMessages: PropType<string | string[]>;
|
|
1332
|
-
/**
|
|
1333
|
-
* Display error messages on this node itself
|
|
1334
|
-
*
|
|
1335
|
-
* If `true`, attempts to render errors for this node itself; if `false`, delegates error message display to the associated form group or wrapper.
|
|
1336
|
-
*
|
|
1337
|
-
* @default `false` if a parent group or wrapper exists and the `collectErrorMessages` setting is enabled; otherwise, `true`.
|
|
1338
|
-
*/
|
|
1339
|
-
showOwnErrors: {
|
|
1340
|
-
type: BooleanConstructor;
|
|
1341
|
-
default: undefined;
|
|
1342
|
-
};
|
|
1343
|
-
/**
|
|
1344
|
-
* Detach and become independent from the parent node
|
|
1345
|
-
*
|
|
1346
|
-
* By default, the form node inherits the state of the form node existing in the parent tree and notifies the parent node of its own validation status, among other things. This option disables that behavior, allowing this node and its descendants to be detached from the parent node.
|
|
1347
|
-
*/
|
|
1348
|
-
detach: BooleanConstructor;
|
|
1349
|
-
};
|
|
1350
|
-
type FormNodeProps = ExtractPropTypes<ReturnType<typeof createFormNodeProps>>;
|
|
1351
|
-
declare class Wrapper<T, D = T> {
|
|
1352
|
-
wrapped(options: FormNodeControlOptions<T, D>): {
|
|
1353
|
-
/**
|
|
1354
|
-
* Update Model Values
|
|
1355
|
-
*/
|
|
1356
|
-
'update:modelValue': (value: T | D) => boolean;
|
|
1357
|
-
/**
|
|
1358
|
-
* Updating error content.
|
|
1359
|
-
* @param errors - List of error contents.
|
|
1360
|
-
*/
|
|
1361
|
-
'update:errors': (errors: FormNodeError[]) => boolean;
|
|
1362
|
-
/**
|
|
1363
|
-
* Update Model Values
|
|
1364
|
-
*/
|
|
1365
|
-
change: (value: T | D) => boolean;
|
|
1366
|
-
/**
|
|
1367
|
-
* Focus on an element.
|
|
1368
|
-
* @param ev - FocusEvent
|
|
1369
|
-
*/
|
|
1370
|
-
focus: (ev: FocusEvent) => boolean;
|
|
1371
|
-
/**
|
|
1372
|
-
* The focus is removed from an element.
|
|
1373
|
-
* @param ev - FocusEvent
|
|
1374
|
-
*/
|
|
1375
|
-
blur: (ev: FocusEvent) => boolean;
|
|
1376
|
-
};
|
|
1377
|
-
}
|
|
1378
|
-
interface FormNodeEmitOptions<T, D = T> extends ReturnType<Wrapper<T, D>['wrapped']> {}
|
|
1379
|
-
type FormNodeContext<T, D = T> = SetupContext<FormNodeEmitOptions<T, D>>;
|
|
1380
|
-
/**
|
|
1381
|
-
* Source code for rendering error messages of form nodes
|
|
1382
|
-
*/
|
|
1383
|
-
interface FormNodeErrorMessageSource {
|
|
1384
|
-
/** Render error message */
|
|
1385
|
-
render: (slotsOverrides?: FormNodeErrorSlotsSource) => VNodeArrayChildren;
|
|
1386
|
-
/**
|
|
1387
|
-
* Error object
|
|
1388
|
-
*
|
|
1389
|
-
* @see {@link FormNodeError}
|
|
1390
|
-
*/
|
|
1391
|
-
error: FormNodeError;
|
|
1392
|
-
/**
|
|
1393
|
-
* Node holding the error
|
|
1394
|
-
*
|
|
1395
|
-
* @see {@link FormNodeControl}
|
|
1396
|
-
*/
|
|
1397
|
-
node: FormNodeControl;
|
|
1398
|
-
/**
|
|
1399
|
-
* Automatically generated key
|
|
1400
|
-
*
|
|
1401
|
-
* Can be safely used as the key for the vnode when rendering in lists, etc.
|
|
1402
|
-
*/
|
|
1403
|
-
key: string;
|
|
1404
|
-
}
|
|
1405
|
-
/**
|
|
1406
|
-
* Base class for all form nodes
|
|
1407
|
-
*/
|
|
1408
|
-
declare class FormNodeControl<T = any, D = T, Required extends Prop<any> = BooleanConstructor> {
|
|
1409
|
-
readonly _props: FormNodeProps;
|
|
1410
|
-
readonly _service: VueFormService;
|
|
1411
|
-
readonly nodeType?: FormNodeType;
|
|
1412
|
-
readonly __multiple: boolean;
|
|
1413
|
-
protected _isMounted: Ref<boolean, boolean>;
|
|
1414
|
-
protected _mountedId: Ref<number | undefined, number | undefined>;
|
|
1415
|
-
protected _ctx: FormNodeContext<T, D>;
|
|
1416
|
-
protected _parentNode: FormNodeControl | null;
|
|
1417
|
-
protected _parentForm: VueForm | null;
|
|
1418
|
-
protected _parentFormGroup: FormGroupControl | null;
|
|
1419
|
-
protected _parentFormNodeWrapper: FormNodeWrapper | null;
|
|
1420
|
-
protected _booted: Ref<boolean, boolean>;
|
|
1421
|
-
protected _name: ComputedRef<string | undefined>;
|
|
1422
|
-
protected _value: Ref<T | D>;
|
|
1423
|
-
protected _initialValue: Ref<T | D>;
|
|
1424
|
-
protected _focused: Ref<boolean, boolean>;
|
|
1425
|
-
protected _children: Ref<FormNodeControl[]>;
|
|
1426
|
-
protected _invalidChildren: ComputedRef<FormNodeControl[]>;
|
|
1427
|
-
protected _finalizePromise: Ref<(() => Promise<void>) | null>;
|
|
1428
|
-
protected _validationErrors: Ref<ValidationError[]>;
|
|
1429
|
-
protected _validateResolvers: ValidateResolver[];
|
|
1430
|
-
protected _lastValidateValueChanged: boolean;
|
|
1431
|
-
protected _validating: Ref<boolean, boolean>;
|
|
1432
|
-
protected _validateRequestId: number;
|
|
1433
|
-
protected _isDestroyed: boolean;
|
|
1434
|
-
protected _dirty: ComputedRef<boolean>;
|
|
1435
|
-
protected _touched: Ref<boolean, boolean>;
|
|
1436
|
-
protected _shouldValidate: Ref<boolean, boolean>;
|
|
1437
|
-
protected _currentValue: WritableComputedRef<T | D>;
|
|
1438
|
-
protected _errorMessages: ComputedRef<string[]>;
|
|
1439
|
-
protected _errors: ComputedRef<FormNodeError[]>;
|
|
1440
|
-
protected _resolvedErrorMessages: ComputedRef<FormNodeErrorMessageSource[]>;
|
|
1441
|
-
protected _errorCount: ComputedRef<number>;
|
|
1442
|
-
protected _isDisabled: ComputedRef<boolean>;
|
|
1443
|
-
protected _isReadonly: ComputedRef<boolean>;
|
|
1444
|
-
protected _isViewonly: ComputedRef<boolean>;
|
|
1445
|
-
protected _canOperation: ComputedRef<boolean>;
|
|
1446
|
-
protected _rules: ComputedRef<VerifiableRule[]>;
|
|
1447
|
-
protected _hasRequired: ComputedRef<boolean>;
|
|
1448
|
-
protected _tabindex: ComputedRef<number>;
|
|
1449
|
-
protected _cii: ComponentInternalInstance | null;
|
|
1450
|
-
protected _validationValueGetter?: () => any;
|
|
1451
|
-
protected _shouldSkipValidation: boolean;
|
|
1452
|
-
protected _stateExtensions: FormNodeStateExtensions;
|
|
1453
|
-
protected _requiredFactory: () => Rule<any> | undefined;
|
|
1454
|
-
/**
|
|
1455
|
-
* Root service of `vue-form-control`
|
|
1456
|
-
*
|
|
1457
|
-
* @see {@link VueFormService}
|
|
1458
|
-
*/
|
|
1459
|
-
get service(): VueFormService;
|
|
1460
|
-
/**
|
|
1461
|
-
* form node name
|
|
1462
|
-
*
|
|
1463
|
-
* This is set as is for input elements.
|
|
1464
|
-
*/
|
|
1465
|
-
get name(): string | undefined;
|
|
1466
|
-
/**
|
|
1467
|
-
* Tag string for node searching
|
|
1468
|
-
*/
|
|
1469
|
-
get tag(): string | undefined;
|
|
1470
|
-
/** Parent node */
|
|
1471
|
-
get parentNode(): FormNodeControl | null;
|
|
1472
|
-
/** Parent form group */
|
|
1473
|
-
get parentFormGroup(): FormGroupControl | null;
|
|
1474
|
-
/** Parent form node wrapper */
|
|
1475
|
-
get parentFormNodeWrapper(): FormNodeWrapper | null;
|
|
1476
|
-
/** Parent form */
|
|
1477
|
-
get parentForm(): VueForm | null;
|
|
1478
|
-
/** Automatic focus */
|
|
1479
|
-
get autofocus(): boolean;
|
|
1480
|
-
/**
|
|
1481
|
-
* Detached and independent from the parent node
|
|
1482
|
-
*/
|
|
1483
|
-
get detached(): boolean;
|
|
1484
|
-
/**
|
|
1485
|
-
* Component created
|
|
1486
|
-
*
|
|
1487
|
-
* @remarks
|
|
1488
|
-
* Please be aware that it may not have been mounted yet.
|
|
1489
|
-
*/
|
|
1490
|
-
get booted(): boolean;
|
|
1491
|
-
/** Component mounted */
|
|
1492
|
-
get isMounted(): boolean;
|
|
1493
|
-
/** If already mounted, its unique ID. */
|
|
1494
|
-
get mountedId(): number | undefined;
|
|
1495
|
-
/** If already mounted, its unique ID. */
|
|
1496
|
-
get mountedNodeId(): string | undefined;
|
|
1497
|
-
/** Finalizing the value adjustment process */
|
|
1498
|
-
get isFinalizing(): boolean;
|
|
1499
|
-
/** Validating the value */
|
|
1500
|
-
get validating(): boolean;
|
|
1501
|
-
/**
|
|
1502
|
-
* Pending processing
|
|
1503
|
-
*
|
|
1504
|
-
* This is marked as `true` during the validation and finalization process of the value
|
|
1505
|
-
*/
|
|
1506
|
-
get pending(): boolean;
|
|
1507
|
-
/** Current input value */
|
|
1508
|
-
get value(): T | D;
|
|
1509
|
-
set value(value: T | D);
|
|
1510
|
-
/** Value used for validation */
|
|
1511
|
-
get validationValue(): any;
|
|
1512
|
-
/** In focus */
|
|
1513
|
-
get focused(): boolean;
|
|
1514
|
-
/**
|
|
1515
|
-
* Initial value before commit
|
|
1516
|
-
*
|
|
1517
|
-
* This value, once initialized with the value passed when the FormNode is instantiated, will not be modified from within the vue-form-control package internals.
|
|
1518
|
-
* Calling the commit series of methods from the application side updates the value to its state at that moment.
|
|
1519
|
-
*
|
|
1520
|
-
* @see {@link FormNodeControl.commitSelfValue commitSelfValue}
|
|
1521
|
-
* @see {@link FormNodeControl.commitValue commitValue}
|
|
1522
|
-
* @see {@link FormNodeControl.commitSelf commitSelf}
|
|
1523
|
-
* @see {@link FormNodeControl.commit commit}
|
|
1524
|
-
*/
|
|
1525
|
-
get initialValue(): T | D;
|
|
1526
|
-
/**
|
|
1527
|
-
* The changes to the input value have not been committed yet
|
|
1528
|
-
*
|
|
1529
|
-
* @see {@link FormNodeControl.initialValue initialValue}
|
|
1530
|
-
*/
|
|
1531
|
-
get dirty(): boolean;
|
|
1532
|
-
/**
|
|
1533
|
-
* The input value has not been changed from its initial value
|
|
1534
|
-
*/
|
|
1535
|
-
get pristine(): boolean;
|
|
1536
|
-
/**
|
|
1537
|
-
* Touched the elements of this node at least once
|
|
1538
|
-
*/
|
|
1539
|
-
get touched(): boolean;
|
|
1540
|
-
set touched(touched: boolean);
|
|
1541
|
-
/**
|
|
1542
|
-
* Not touched the elements of this node yet.
|
|
1543
|
-
*/
|
|
1544
|
-
get untouched(): boolean;
|
|
1545
|
-
/**
|
|
1546
|
-
* The list of FormNode instances directly belonging to this node as children
|
|
1547
|
-
*/
|
|
1548
|
-
get children(): FormNodeControl[];
|
|
1549
|
-
/**
|
|
1550
|
-
* The list of FormNode instances directly belonging to itself, and possessing one or more errors
|
|
1551
|
-
*/
|
|
1552
|
-
get invalidChildren(): FormNodeControl[];
|
|
1553
|
-
/**
|
|
1554
|
-
* The list of validation errors for the value within itself
|
|
1555
|
-
*/
|
|
1556
|
-
get validationErrors(): ValidationError[];
|
|
1557
|
-
/**
|
|
1558
|
-
* The list of all errors within itself
|
|
1559
|
-
*
|
|
1560
|
-
* This is a merged list of error messages injected through properties and its own `validationErrors`.
|
|
1561
|
-
*
|
|
1562
|
-
* @remarks
|
|
1563
|
-
* This list does not include error information specified with the `error` attribute.
|
|
1564
|
-
*/
|
|
1565
|
-
get errors(): FormNodeError[];
|
|
1566
|
-
/**
|
|
1567
|
-
* Source code for all collected error messages
|
|
1568
|
-
*
|
|
1569
|
-
* This list is generated based on the setting of {@link FormNodeControl.showOwnErrors showOwnErrors}.
|
|
1570
|
-
*
|
|
1571
|
-
* @see {@link FormNodeErrorMessageSource}
|
|
1572
|
-
*/
|
|
1573
|
-
get errorMessages(): FormNodeErrorMessageSource[];
|
|
1574
|
-
/**
|
|
1575
|
-
* Source code for the first error message among all collected messages
|
|
1576
|
-
*
|
|
1577
|
-
* This list is generated based on the setting of {@link FormNodeControl.showOwnErrors showOwnErrors}.
|
|
1578
|
-
*
|
|
1579
|
-
* @see {@link FormNodeErrorMessageSource}
|
|
1580
|
-
*/
|
|
1581
|
-
get firstErrorMessage(): FormNodeErrorMessageSource | undefined;
|
|
1582
|
-
/**
|
|
1583
|
-
* Whether itself has one or more errors
|
|
1584
|
-
*
|
|
1585
|
-
* @remarks
|
|
1586
|
-
* This also takes into consideration the configuration of the `error` property.
|
|
1587
|
-
*/
|
|
1588
|
-
get hasMyError(): boolean;
|
|
1589
|
-
/**
|
|
1590
|
-
* The number of errors it possesses
|
|
1591
|
-
*/
|
|
1592
|
-
get errorCount(): number;
|
|
1593
|
-
/**
|
|
1594
|
-
* Either itself or the parent node has one or more errors.
|
|
1595
|
-
*/
|
|
1596
|
-
get hasError(): boolean;
|
|
1597
|
-
/**
|
|
1598
|
-
* Either itself or the parent node is in a disabled state.
|
|
1599
|
-
*/
|
|
1600
|
-
get isDisabled(): boolean;
|
|
1601
|
-
/**
|
|
1602
|
-
* Either itself or the parent node is in a read-only state.
|
|
1603
|
-
*/
|
|
1604
|
-
get isReadonly(): boolean;
|
|
1605
|
-
/**
|
|
1606
|
-
* Either itself or the parent node is in a view-only state.
|
|
1607
|
-
*/
|
|
1608
|
-
get isViewonly(): boolean;
|
|
1609
|
-
/**
|
|
1610
|
-
* Operable
|
|
1611
|
-
*/
|
|
1612
|
-
get canOperation(): boolean;
|
|
1613
|
-
/**
|
|
1614
|
-
* Validation Timing
|
|
1615
|
-
*
|
|
1616
|
-
*@see {@link ValidateTiming}
|
|
1617
|
-
*/
|
|
1618
|
-
get validateTiming(): ValidateTiming;
|
|
1619
|
-
/**
|
|
1620
|
-
* Always perform value validation.
|
|
1621
|
-
*/
|
|
1622
|
-
get validateTimingIsAlways(): boolean;
|
|
1623
|
-
/**
|
|
1624
|
-
* Perform value validation only when the elements of this node have been touched at least once.
|
|
1625
|
-
*/
|
|
1626
|
-
get validateTimingIsTouch(): boolean;
|
|
1627
|
-
/**
|
|
1628
|
-
* Perform value validation when focus is removed from the elements of this node.
|
|
1629
|
-
*/
|
|
1630
|
-
get validateTimingIsBlur(): boolean;
|
|
1631
|
-
/**
|
|
1632
|
-
* Perform value validation when the input value changes.
|
|
1633
|
-
*/
|
|
1634
|
-
get validateTimingIsChange(): boolean;
|
|
1635
|
-
/**
|
|
1636
|
-
* Value validation is manually performed on the application side.
|
|
1637
|
-
*/
|
|
1638
|
-
get validateTimingIsManual(): boolean;
|
|
1639
|
-
/**
|
|
1640
|
-
* The list of all rules, including those specified in the properties under 'rules' and others calculated from values related to rule logic.
|
|
1641
|
-
*/
|
|
1642
|
-
get rules(): VerifiableRule[];
|
|
1643
|
-
/**
|
|
1644
|
-
* Input is required
|
|
1645
|
-
*
|
|
1646
|
-
* @remarks
|
|
1647
|
-
* This checks whether there is at least one 'required' rule in the 'required' setting or within the specified 'rules'.
|
|
1648
|
-
*/
|
|
1649
|
-
get isRequired(): boolean;
|
|
1650
|
-
/**
|
|
1651
|
-
* The component has been destroyed
|
|
1652
|
-
*/
|
|
1653
|
-
get isDestroyed(): boolean;
|
|
1654
|
-
/**
|
|
1655
|
-
* There is at least one node in an error state among the nodes directly under this node
|
|
1656
|
-
*/
|
|
1657
|
-
get hasInvalidChild(): boolean;
|
|
1658
|
-
/**
|
|
1659
|
-
* Either this node or one of its descendants has an error
|
|
1660
|
-
*/
|
|
1661
|
-
get invalid(): boolean;
|
|
1662
|
-
/**
|
|
1663
|
-
* This node and none of its descendants have an error
|
|
1664
|
-
*/
|
|
1665
|
-
get valid(): boolean;
|
|
1666
|
-
/**
|
|
1667
|
-
* Tab index
|
|
1668
|
-
*
|
|
1669
|
-
* When the node is disabled, it is forcibly set to `-1`.
|
|
1670
|
-
*/
|
|
1671
|
-
get tabindex(): number;
|
|
1672
|
-
/**
|
|
1673
|
-
* Spell Check Settings
|
|
1674
|
-
*
|
|
1675
|
-
* @see https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck
|
|
1676
|
-
*/
|
|
1677
|
-
get spellcheck(): boolean;
|
|
1678
|
-
/**
|
|
1679
|
-
* The input value should be validated
|
|
1680
|
-
*
|
|
1681
|
-
* This varies based on the specified `validateTiming` and the user's interaction status.
|
|
1682
|
-
*/
|
|
1683
|
-
get shouldValidate(): boolean;
|
|
1684
|
-
/**
|
|
1685
|
-
* The form to which this node belongs is currently executing an asynchronous submission action
|
|
1686
|
-
*
|
|
1687
|
-
* @remarks
|
|
1688
|
-
* If the `detach` option is set, this will always be `false`.
|
|
1689
|
-
*/
|
|
1690
|
-
get sending(): boolean;
|
|
1691
|
-
/**
|
|
1692
|
-
* The current Vue instance initializing this node
|
|
1693
|
-
*/
|
|
1694
|
-
get currentInstance(): ComponentInternalInstance | null;
|
|
1695
|
-
/**
|
|
1696
|
-
* The host element of the current Vue instance initializing this node
|
|
1697
|
-
*/
|
|
1698
|
-
get currentEl(): HTMLElement | null;
|
|
1699
|
-
/**
|
|
1700
|
-
* Multiple input mode
|
|
1701
|
-
*/
|
|
1702
|
-
get multiple(): boolean;
|
|
1703
|
-
/**
|
|
1704
|
-
* Display error messages on this node itself
|
|
1705
|
-
*/
|
|
1706
|
-
get showOwnErrors(): boolean;
|
|
1707
|
-
/**
|
|
1708
|
-
* Whether to temporarily skip validation.
|
|
1709
|
-
* Useful for internal operations where validation is not needed.
|
|
1710
|
-
*/
|
|
1711
|
-
get shouldSkipValidation(): boolean;
|
|
1712
|
-
readonly shallow: boolean;
|
|
1713
|
-
constructor(props: FormNodeProps, ctx: FormNodeContext<T, D>, options: FormNodeControlOptions<T, D, Required>);
|
|
1714
|
-
/** @internal */
|
|
1715
|
-
_createFormNodeErrorMessageSource(error: FormNodeError, index: number, slotsOverrides?: FormNodeErrorSlotsSource): FormNodeErrorMessageSource;
|
|
1716
|
-
protected hasRequiredRule(): VerifiableRule | undefined;
|
|
1717
|
-
/**
|
|
1718
|
-
* Recursively searches and retrieves the FormNode belonging to this node.
|
|
1719
|
-
*
|
|
1720
|
-
* @param predicate - Predicate executed recursively on descendant elements
|
|
1721
|
-
*/
|
|
1722
|
-
findNodeRecursive(predicate: (node: FormNodeControl) => unknown): FormNodeControl | undefined;
|
|
1723
|
-
/**
|
|
1724
|
-
* Recursively retrieves all FormNodes belonging to this node.
|
|
1725
|
-
*
|
|
1726
|
-
* @param predicate - Predicate executed recursively on descendant elements
|
|
1727
|
-
*/
|
|
1728
|
-
filterNodesRecursive(predicate: (node: FormNodeControl) => unknown): FormNodeControl[];
|
|
1729
|
-
/**
|
|
1730
|
-
* Search for a node within this node that matches the specified name
|
|
1731
|
-
*
|
|
1732
|
-
* @param name Node name
|
|
1733
|
-
*/
|
|
1734
|
-
findNodeByName(name: string): FormNodeControl | undefined;
|
|
1735
|
-
/**
|
|
1736
|
-
* Search for a node within this node that matches the specified tag
|
|
1737
|
-
*
|
|
1738
|
-
* @param tag Tag string
|
|
1739
|
-
*/
|
|
1740
|
-
findNodeByTag(tag: string): FormNodeControl | undefined;
|
|
1741
|
-
protected _getContextOrDie(): {
|
|
1742
|
-
attrs: import("vue").Attrs;
|
|
1743
|
-
slots: Readonly<{
|
|
1744
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
1745
|
-
}>;
|
|
1746
|
-
emit: ((event: "blur", ev: FocusEvent) => void) & ((event: "change", value: T | D) => void) & ((event: "update:modelValue", value: T | D) => void) & ((event: "update:errors", errors: FormNodeError[]) => void) & ((event: "focus", ev: FocusEvent) => void);
|
|
1747
|
-
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
|
|
1748
|
-
};
|
|
1749
|
-
/**
|
|
1750
|
-
* Render the specified error source as a `VNodeArrayChildren`
|
|
1751
|
-
*
|
|
1752
|
-
* @param errorSource - string or FormNodeError
|
|
1753
|
-
*/
|
|
1754
|
-
renderErrorSource(errorSource: string | FormNodeError, slotsOverrides?: FormNodeErrorSlotsSource): VNodeArrayChildren;
|
|
1755
|
-
protected _finalize(): Promise<void>;
|
|
1756
|
-
/**
|
|
1757
|
-
* Finalize the input value
|
|
1758
|
-
*/
|
|
1759
|
-
finalize(): Promise<void>;
|
|
1760
|
-
/**
|
|
1761
|
-
* Ensure that the input value is finalized
|
|
1762
|
-
*/
|
|
1763
|
-
ensureFinalized(): Promise<void>;
|
|
1764
|
-
/**
|
|
1765
|
-
* Ensure that the value of the self-node and all its child nodes is finalized
|
|
1766
|
-
*/
|
|
1767
|
-
finalizeAll(): Promise<void>;
|
|
1768
|
-
/**
|
|
1769
|
-
* Set the value
|
|
1770
|
-
*
|
|
1771
|
-
* @param value - value
|
|
1772
|
-
*/
|
|
1773
|
-
setValue(value: T | D): boolean;
|
|
1774
|
-
protected _syncValueFromProps(value: any): void;
|
|
1775
|
-
protected _resolveRules(): VerifiableRule[];
|
|
1776
|
-
/**
|
|
1777
|
-
* Set the validation execution necessity
|
|
1778
|
-
*
|
|
1779
|
-
* @param shouldValidate - The input value should be validated
|
|
1780
|
-
*/
|
|
1781
|
-
setShouldValidate(shouldValidate: boolean): void;
|
|
1782
|
-
/**
|
|
1783
|
-
* Retrieve the default value when there is no input value
|
|
1784
|
-
*/
|
|
1785
|
-
emptyValue(): T | D;
|
|
1786
|
-
/**
|
|
1787
|
-
* If the specified value is nullable, return `emptyValue`; otherwise, return the specified value as is
|
|
1788
|
-
*
|
|
1789
|
-
* @param value - Any value
|
|
1790
|
-
*/
|
|
1791
|
-
safeModelValue(value: any): T | D;
|
|
1792
|
-
/**
|
|
1793
|
-
* Find and retrieve a rule corresponding to the specified name or a name matching the regular expression
|
|
1794
|
-
*
|
|
1795
|
-
* @param ruleName - Name or regular expression
|
|
1796
|
-
*/
|
|
1797
|
-
findRule(ruleName: string | RegExp): VerifiableRule | undefined;
|
|
1798
|
-
/**
|
|
1799
|
-
* Reset the input value of this node to the initial value or the value at the last commit, whichever is applicable
|
|
1800
|
-
*
|
|
1801
|
-
* @see {@link FormNodeControl.initialValue initialValue}
|
|
1802
|
-
*
|
|
1803
|
-
* @remarks
|
|
1804
|
-
* This method does not reset the validation state. Typically, consider using {@link FormNodeControl.resetSelf resetSelf}.
|
|
1805
|
-
*/
|
|
1806
|
-
resetSelfValue(): void;
|
|
1807
|
-
/**
|
|
1808
|
-
* Reset the input value of this node and all its descendant nodes to the initial value or the value at the last commit, whichever is applicable
|
|
1809
|
-
*
|
|
1810
|
-
* @see {@link FormNodeControl.resetSelfValue resetSelfValue}
|
|
1811
|
-
*
|
|
1812
|
-
* @remarks
|
|
1813
|
-
* This method does not reset the validation state. Typically, consider using {@link FormNodeControl.resetSelf reset}.
|
|
1814
|
-
*/
|
|
1815
|
-
resetValue(): void;
|
|
1816
|
-
/**
|
|
1817
|
-
* Set the current input value as the initial value for this node.
|
|
1818
|
-
*
|
|
1819
|
-
* @remarks
|
|
1820
|
-
* This method does not reset the validation state. Typically, consider using {@link FormNodeControl.commitSelf commitSelf}.
|
|
1821
|
-
*/
|
|
1822
|
-
commitSelfValue(): void;
|
|
1823
|
-
/**
|
|
1824
|
-
* Set the current input value as the initial value for this node and all its descendant nodes
|
|
1825
|
-
*
|
|
1826
|
-
* @remarks
|
|
1827
|
-
* This method does not reset the validation state. Typically, consider using {@link FormNodeControl.commit commit}.
|
|
1828
|
-
*/
|
|
1829
|
-
commitValue(): void;
|
|
1830
|
-
private _resetGuard;
|
|
1831
|
-
/**
|
|
1832
|
-
* Reset the validation state of this node
|
|
1833
|
-
*
|
|
1834
|
-
* @remarks
|
|
1835
|
-
* This method does not perform a reset on descendant nodes. Typically, consider using {@link FormNodeControl.resetValidates resetValidates}.
|
|
1836
|
-
*/
|
|
1837
|
-
resetSelfValidates(): void;
|
|
1838
|
-
/**
|
|
1839
|
-
* Reset the validation state of this node and all its descendant nodes
|
|
1840
|
-
*/
|
|
1841
|
-
resetValidates(): void;
|
|
1842
|
-
/**
|
|
1843
|
-
* Reset the input value of this node to the initial value and reset the validation state
|
|
1844
|
-
*
|
|
1845
|
-
* @remarks
|
|
1846
|
-
* This method does not reset the state of descendant nodes. Typically, consider using {@link FormNodeControl.reset reset}.
|
|
1847
|
-
*/
|
|
1848
|
-
resetSelf(): void;
|
|
1849
|
-
/**
|
|
1850
|
-
* Execute any process while skipping ongoing asynchronous validation, if any
|
|
1851
|
-
*
|
|
1852
|
-
* @param fn - The function to be executed
|
|
1853
|
-
*/
|
|
1854
|
-
skipValidation(fn: (...args: any) => any): Promise<void>;
|
|
1855
|
-
/**
|
|
1856
|
-
* Reset the input value of this node and all its descendant nodes to the initial value and reset the validation state
|
|
1857
|
-
*/
|
|
1858
|
-
reset(): Promise<void>;
|
|
1859
|
-
/**
|
|
1860
|
-
* Clear the input value of this node
|
|
1861
|
-
*/
|
|
1862
|
-
clearSelf(): void;
|
|
1863
|
-
/**
|
|
1864
|
-
* Clear the input value of this node and all its descendant nodes
|
|
1865
|
-
*/
|
|
1866
|
-
clear(): void;
|
|
1867
|
-
/**
|
|
1868
|
-
* Set the current input value of this node as the initial value and reset the validation state
|
|
1869
|
-
*
|
|
1870
|
-
* @remarks
|
|
1871
|
-
* This method does not reset the state of descendant nodes. Typically, consider using {@link FormNodeControl.commit commit}.
|
|
1872
|
-
*/
|
|
1873
|
-
commitSelf(): void;
|
|
1874
|
-
/**
|
|
1875
|
-
* Set the current input value as the initial value for this node and all its descendant nodes, and reset the validation state
|
|
1876
|
-
*/
|
|
1877
|
-
commit(): void;
|
|
1878
|
-
focus(opts?: FocusOptions): void;
|
|
1879
|
-
blur(): void;
|
|
1880
|
-
protected _forceFinalize(): boolean | undefined;
|
|
1881
|
-
/**
|
|
1882
|
-
* Execute validation for this node and all its descendant nodes, and retrieve the validation results
|
|
1883
|
-
*
|
|
1884
|
-
* @param force - Force execution
|
|
1885
|
-
* @param forceFinalize - Always finalize the value before validation
|
|
1886
|
-
*
|
|
1887
|
-
* @returns If validation is successful, return `true`.
|
|
1888
|
-
*/
|
|
1889
|
-
validate(force?: boolean, forceFinalize?: boolean | undefined): Promise<boolean>;
|
|
1890
|
-
/**
|
|
1891
|
-
* Validate all nodes belonging to this node
|
|
1892
|
-
*
|
|
1893
|
-
* @remarks
|
|
1894
|
-
* Typically, consider using {@link FormNodeControl.validate validate}.
|
|
1895
|
-
*
|
|
1896
|
-
* @param force - Force execution
|
|
1897
|
-
* @param forceFinalize - Always finalize the value before validation
|
|
1898
|
-
*/
|
|
1899
|
-
validateChildren(force?: boolean, forceFinalize?: boolean | undefined): Promise<boolean[]>;
|
|
1900
|
-
protected _allowFinalize(): boolean;
|
|
1901
|
-
/**
|
|
1902
|
-
* Validate the input value of this node
|
|
1903
|
-
*
|
|
1904
|
-
* This method usually cancels execution and returns the previous result in the following conditions:
|
|
1905
|
-
*
|
|
1906
|
-
* - The value for validation has not changed since the last validation.
|
|
1907
|
-
* - Currently, asynchronous validation is in progress.
|
|
1908
|
-
*
|
|
1909
|
-
* If you want to ignore this and force validation, specify `true` for the `force` argument
|
|
1910
|
-
*
|
|
1911
|
-
* @param force - Force execution
|
|
1912
|
-
* @param forceFinalize - Always finalize the value before validation
|
|
1913
|
-
*
|
|
1914
|
-
* @returns Validation result (either the list of validation errors or null).
|
|
1915
|
-
*
|
|
1916
|
-
* @remarks
|
|
1917
|
-
* This method does not perform a reset on descendant nodes. Typically, consider using {@link FormNodeControl.validate validate}.
|
|
1918
|
-
*/
|
|
1919
|
-
validateSelf(force?: boolean, forceFinalize?: boolean | undefined): Promise<ValidationResult>;
|
|
1920
|
-
private resolveValidateResolvers;
|
|
1921
|
-
private clearValidateResolvers;
|
|
1922
|
-
/** @internal */
|
|
1923
|
-
_joinFromNode(node: FormNodeControl): void;
|
|
1924
|
-
/** @internal */
|
|
1925
|
-
_leaveFromNode(node: FormNodeControl): void;
|
|
1926
|
-
focusHandler(ev: FocusEvent): void;
|
|
1927
|
-
blurHandler(ev: FocusEvent): void;
|
|
1928
|
-
/**
|
|
1929
|
-
* Scroll to the visible position of the host element of this node
|
|
1930
|
-
*
|
|
1931
|
-
* @param options - options
|
|
1932
|
-
*/
|
|
1933
|
-
scrollIntoView(options?: ScrollIntoViewOptions): void;
|
|
1934
|
-
/**
|
|
1935
|
-
* Generate a Proxy instance that extends the interface for this node.
|
|
1936
|
-
*
|
|
1937
|
-
* @param trait - trait object
|
|
1938
|
-
* @returns Mixed-in Proxy
|
|
1939
|
-
*/
|
|
1940
|
-
extend<U extends object>(trait: U): Mixin<this, U>;
|
|
1941
|
-
}
|
|
1942
|
-
//#endregion
|
|
1943
|
-
//#region src/composables/textable.d.ts
|
|
1944
|
-
type TextableFinalizerSpec = TextFinalizer | BuiltinTextFinalizerName | (TextFinalizer | BuiltinTextFinalizerName)[];
|
|
1945
|
-
//#endregion
|
|
1946
|
-
//#region src/plugin.d.ts
|
|
1947
|
-
declare module 'vue' {
|
|
1948
|
-
interface ComponentCustomProperties {
|
|
1949
|
-
$form: VueFormService;
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
//#endregion
|
|
1953
275
|
//#region src/components/VWysiwygEditor/VWysiwygEditor.d.ts
|
|
1954
276
|
interface VWysiwygEditorAPI {
|
|
1955
277
|
readonly editor: Editor | undefined;
|
|
@@ -1972,11 +294,11 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
1972
294
|
default: boolean;
|
|
1973
295
|
};
|
|
1974
296
|
'v-slots': PropType<{
|
|
1975
|
-
[x: `error:${string}`]: (error: FormNodeError) => VNodeChild;
|
|
1976
|
-
label?: ((wrapper: FormNodeWrapper) => VNodeChild) | undefined;
|
|
1977
|
-
hint?: ((wrapper: FormNodeWrapper) => VNodeChild) | undefined;
|
|
1978
|
-
infoAppends?: ((wrapper: FormNodeWrapper) => VNodeChild) | undefined;
|
|
1979
|
-
error?: ((error: FormNodeError) => VNodeChild) | undefined;
|
|
297
|
+
[x: `error:${string}`]: (error: import("@fastkit/vue-form-control").FormNodeError) => VNodeChild;
|
|
298
|
+
label?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => VNodeChild) | undefined;
|
|
299
|
+
hint?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => VNodeChild) | undefined;
|
|
300
|
+
infoAppends?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => VNodeChild) | undefined;
|
|
301
|
+
error?: ((error: import("@fastkit/vue-form-control").FormNodeError) => VNodeChild) | undefined;
|
|
1980
302
|
default?: (() => VNodeChild) | undefined;
|
|
1981
303
|
startAdornment?: (() => VNodeChild) | undefined;
|
|
1982
304
|
endAdornment?: (() => VNodeChild) | undefined;
|
|
@@ -1990,20 +312,20 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
1990
312
|
type: PropType<import("@fastkit/vui").ControlFieldVariant>;
|
|
1991
313
|
validator: (value: any) => boolean;
|
|
1992
314
|
};
|
|
1993
|
-
startAdornment: PropType<VNodeChildOrSlot>;
|
|
1994
|
-
endAdornment: PropType<VNodeChildOrSlot>;
|
|
315
|
+
startAdornment: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
316
|
+
endAdornment: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
1995
317
|
tabindex: {
|
|
1996
318
|
type: (StringConstructor | NumberConstructor)[];
|
|
1997
319
|
default: number;
|
|
1998
320
|
};
|
|
1999
|
-
nodeControl: PropType<FormNodeControl>;
|
|
2000
|
-
label: PropType<VNodeChildOrSlot>;
|
|
2001
|
-
hint: PropType<VNodeChildOrSlot>;
|
|
2002
|
-
hinttip: PropType<FormNodeWrapperHinttip>;
|
|
2003
|
-
hinttipDelay: PropType<FormNodeWrapperHinttipDelay>;
|
|
2004
|
-
infoAppends: PropType<VNodeChildOrSlot>;
|
|
321
|
+
nodeControl: PropType<import("@fastkit/vue-form-control").FormNodeControl>;
|
|
322
|
+
label: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
323
|
+
hint: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
324
|
+
hinttip: PropType<import("@fastkit/vue-form-control").FormNodeWrapperHinttip>;
|
|
325
|
+
hinttipDelay: PropType<import("@fastkit/vue-form-control").FormNodeWrapperHinttipDelay>;
|
|
326
|
+
infoAppends: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
2005
327
|
hiddenInfo: BooleanConstructor;
|
|
2006
|
-
requiredChip: PropType<RequiredChipSource>;
|
|
328
|
+
requiredChip: PropType<import("@fastkit/vue-form-control").RequiredChipSource>;
|
|
2007
329
|
collectErrorMessages: {
|
|
2008
330
|
type: BooleanConstructor;
|
|
2009
331
|
default: boolean;
|
|
@@ -2012,13 +334,13 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2012
334
|
maxlength: (StringConstructor | NumberConstructor)[];
|
|
2013
335
|
pattern: (StringConstructor | RegExpConstructor)[];
|
|
2014
336
|
placeholder: StringConstructor;
|
|
2015
|
-
autocapitalize: PropType<FormAutoCapitalize>;
|
|
2016
|
-
finalizers: PropType<TextableFinalizerSpec>;
|
|
337
|
+
autocapitalize: PropType<import("@fastkit/vue-form-control").FormAutoCapitalize>;
|
|
338
|
+
finalizers: PropType<import("@fastkit/vue-form-control").TextableFinalizerSpec>;
|
|
2017
339
|
counter: PropType<boolean | string | number>;
|
|
2018
340
|
counterValue: PropType<(value: string) => number>;
|
|
2019
341
|
limit: BooleanConstructor;
|
|
2020
342
|
autocomplete: {
|
|
2021
|
-
type: PropType<FormAutoComplete | boolean>;
|
|
343
|
+
type: PropType<import("@fastkit/vue-form-control").FormAutoComplete | boolean>;
|
|
2022
344
|
default: () => boolean | "name" | "off" | "on" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo" | undefined;
|
|
2023
345
|
};
|
|
2024
346
|
name: StringConstructor;
|
|
@@ -2032,14 +354,14 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2032
354
|
required: BooleanConstructor | PropType<boolean>;
|
|
2033
355
|
clearable: BooleanConstructor;
|
|
2034
356
|
validateTiming: {
|
|
2035
|
-
type: PropType<ValidateTiming>;
|
|
2036
|
-
default: ValidateTiming;
|
|
357
|
+
type: PropType<import("@fastkit/vue-form-control").ValidateTiming>;
|
|
358
|
+
default: import("@fastkit/vue-form-control").ValidateTiming;
|
|
2037
359
|
};
|
|
2038
360
|
rules: {
|
|
2039
|
-
type: PropType<RecursiveVerifiableRuleOrFn>;
|
|
361
|
+
type: PropType<import("@fastkit/vue-form-control").RecursiveVerifiableRuleOrFn>;
|
|
2040
362
|
default: () => never[];
|
|
2041
363
|
};
|
|
2042
|
-
validationDeps: PropType<(nodeControl: FormNodeControl) => any>;
|
|
364
|
+
validationDeps: PropType<(nodeControl: import("@fastkit/vue-form-control").FormNodeControl) => any>;
|
|
2043
365
|
error: BooleanConstructor;
|
|
2044
366
|
errorMessages: PropType<string | string[]>;
|
|
2045
367
|
showOwnErrors: {
|
|
@@ -2049,7 +371,7 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2049
371
|
detach: BooleanConstructor;
|
|
2050
372
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2051
373
|
'update:modelValue': (value: string) => boolean;
|
|
2052
|
-
'update:errors': (errors: FormNodeError[]) => boolean;
|
|
374
|
+
'update:errors': (errors: import("@fastkit/vue-form-control").FormNodeError[]) => boolean;
|
|
2053
375
|
change: (value: string) => boolean;
|
|
2054
376
|
focus: (ev: FocusEvent) => boolean;
|
|
2055
377
|
blur: (ev: FocusEvent) => boolean;
|
|
@@ -2070,11 +392,11 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2070
392
|
default: boolean;
|
|
2071
393
|
};
|
|
2072
394
|
'v-slots': PropType<{
|
|
2073
|
-
[x: `error:${string}`]: (error: FormNodeError) => VNodeChild;
|
|
2074
|
-
label?: ((wrapper: FormNodeWrapper) => VNodeChild) | undefined;
|
|
2075
|
-
hint?: ((wrapper: FormNodeWrapper) => VNodeChild) | undefined;
|
|
2076
|
-
infoAppends?: ((wrapper: FormNodeWrapper) => VNodeChild) | undefined;
|
|
2077
|
-
error?: ((error: FormNodeError) => VNodeChild) | undefined;
|
|
395
|
+
[x: `error:${string}`]: (error: import("@fastkit/vue-form-control").FormNodeError) => VNodeChild;
|
|
396
|
+
label?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => VNodeChild) | undefined;
|
|
397
|
+
hint?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => VNodeChild) | undefined;
|
|
398
|
+
infoAppends?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => VNodeChild) | undefined;
|
|
399
|
+
error?: ((error: import("@fastkit/vue-form-control").FormNodeError) => VNodeChild) | undefined;
|
|
2078
400
|
default?: (() => VNodeChild) | undefined;
|
|
2079
401
|
startAdornment?: (() => VNodeChild) | undefined;
|
|
2080
402
|
endAdornment?: (() => VNodeChild) | undefined;
|
|
@@ -2088,20 +410,20 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2088
410
|
type: PropType<import("@fastkit/vui").ControlFieldVariant>;
|
|
2089
411
|
validator: (value: any) => boolean;
|
|
2090
412
|
};
|
|
2091
|
-
startAdornment: PropType<VNodeChildOrSlot>;
|
|
2092
|
-
endAdornment: PropType<VNodeChildOrSlot>;
|
|
413
|
+
startAdornment: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
414
|
+
endAdornment: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
2093
415
|
tabindex: {
|
|
2094
416
|
type: (StringConstructor | NumberConstructor)[];
|
|
2095
417
|
default: number;
|
|
2096
418
|
};
|
|
2097
|
-
nodeControl: PropType<FormNodeControl>;
|
|
2098
|
-
label: PropType<VNodeChildOrSlot>;
|
|
2099
|
-
hint: PropType<VNodeChildOrSlot>;
|
|
2100
|
-
hinttip: PropType<FormNodeWrapperHinttip>;
|
|
2101
|
-
hinttipDelay: PropType<FormNodeWrapperHinttipDelay>;
|
|
2102
|
-
infoAppends: PropType<VNodeChildOrSlot>;
|
|
419
|
+
nodeControl: PropType<import("@fastkit/vue-form-control").FormNodeControl>;
|
|
420
|
+
label: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
421
|
+
hint: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
422
|
+
hinttip: PropType<import("@fastkit/vue-form-control").FormNodeWrapperHinttip>;
|
|
423
|
+
hinttipDelay: PropType<import("@fastkit/vue-form-control").FormNodeWrapperHinttipDelay>;
|
|
424
|
+
infoAppends: PropType<import("@fastkit/vue-utils").VNodeChildOrSlot>;
|
|
2103
425
|
hiddenInfo: BooleanConstructor;
|
|
2104
|
-
requiredChip: PropType<RequiredChipSource>;
|
|
426
|
+
requiredChip: PropType<import("@fastkit/vue-form-control").RequiredChipSource>;
|
|
2105
427
|
collectErrorMessages: {
|
|
2106
428
|
type: BooleanConstructor;
|
|
2107
429
|
default: boolean;
|
|
@@ -2110,13 +432,13 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2110
432
|
maxlength: (StringConstructor | NumberConstructor)[];
|
|
2111
433
|
pattern: (StringConstructor | RegExpConstructor)[];
|
|
2112
434
|
placeholder: StringConstructor;
|
|
2113
|
-
autocapitalize: PropType<FormAutoCapitalize>;
|
|
2114
|
-
finalizers: PropType<TextableFinalizerSpec>;
|
|
435
|
+
autocapitalize: PropType<import("@fastkit/vue-form-control").FormAutoCapitalize>;
|
|
436
|
+
finalizers: PropType<import("@fastkit/vue-form-control").TextableFinalizerSpec>;
|
|
2115
437
|
counter: PropType<boolean | string | number>;
|
|
2116
438
|
counterValue: PropType<(value: string) => number>;
|
|
2117
439
|
limit: BooleanConstructor;
|
|
2118
440
|
autocomplete: {
|
|
2119
|
-
type: PropType<FormAutoComplete | boolean>;
|
|
441
|
+
type: PropType<import("@fastkit/vue-form-control").FormAutoComplete | boolean>;
|
|
2120
442
|
default: () => boolean | "name" | "off" | "on" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo" | undefined;
|
|
2121
443
|
};
|
|
2122
444
|
name: StringConstructor;
|
|
@@ -2130,14 +452,14 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2130
452
|
required: BooleanConstructor | PropType<boolean>;
|
|
2131
453
|
clearable: BooleanConstructor;
|
|
2132
454
|
validateTiming: {
|
|
2133
|
-
type: PropType<ValidateTiming>;
|
|
2134
|
-
default: ValidateTiming;
|
|
455
|
+
type: PropType<import("@fastkit/vue-form-control").ValidateTiming>;
|
|
456
|
+
default: import("@fastkit/vue-form-control").ValidateTiming;
|
|
2135
457
|
};
|
|
2136
458
|
rules: {
|
|
2137
|
-
type: PropType<RecursiveVerifiableRuleOrFn>;
|
|
459
|
+
type: PropType<import("@fastkit/vue-form-control").RecursiveVerifiableRuleOrFn>;
|
|
2138
460
|
default: () => never[];
|
|
2139
461
|
};
|
|
2140
|
-
validationDeps: PropType<(nodeControl: FormNodeControl) => any>;
|
|
462
|
+
validationDeps: PropType<(nodeControl: import("@fastkit/vue-form-control").FormNodeControl) => any>;
|
|
2141
463
|
error: BooleanConstructor;
|
|
2142
464
|
errorMessages: PropType<string | string[]>;
|
|
2143
465
|
showOwnErrors: {
|
|
@@ -2150,7 +472,7 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2150
472
|
onBlur?: ((ev: FocusEvent) => any) | undefined;
|
|
2151
473
|
onChange?: ((value: string) => any) | undefined;
|
|
2152
474
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
2153
|
-
"onUpdate:errors"?: ((errors: FormNodeError[]) => any) | undefined;
|
|
475
|
+
"onUpdate:errors"?: ((errors: import("@fastkit/vue-form-control").FormNodeError[]) => any) | undefined;
|
|
2154
476
|
}>, {
|
|
2155
477
|
clearable: boolean;
|
|
2156
478
|
error: boolean;
|
|
@@ -2171,24 +493,24 @@ declare const VWysiwygEditor: import("vue").DefineComponent<import("vue").Extrac
|
|
|
2171
493
|
readonly: boolean;
|
|
2172
494
|
viewonly: boolean;
|
|
2173
495
|
spellcheck: boolean;
|
|
2174
|
-
validateTiming: ValidateTiming;
|
|
2175
|
-
rules: RecursiveVerifiableRuleOrFn;
|
|
496
|
+
validateTiming: import("@fastkit/vue-form-control").ValidateTiming;
|
|
497
|
+
rules: import("@fastkit/vue-form-control").RecursiveVerifiableRuleOrFn;
|
|
2176
498
|
showOwnErrors: boolean;
|
|
2177
499
|
detach: boolean;
|
|
2178
|
-
}, DefinedSlots<{
|
|
2179
|
-
[x: `error:${string}`]: (error: FormNodeError) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
500
|
+
}, import("@fastkit/vue-utils").DefinedSlots<{
|
|
501
|
+
[x: `error:${string}`]: (error: import("@fastkit/vue-form-control").FormNodeError) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2180
502
|
[key: string]: any;
|
|
2181
503
|
}>[];
|
|
2182
|
-
label?: ((wrapper: FormNodeWrapper) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
504
|
+
label?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2183
505
|
[key: string]: any;
|
|
2184
506
|
}>[]) | undefined;
|
|
2185
|
-
hint?: ((wrapper: FormNodeWrapper) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
507
|
+
hint?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2186
508
|
[key: string]: any;
|
|
2187
509
|
}>[]) | undefined;
|
|
2188
|
-
infoAppends?: ((wrapper: FormNodeWrapper) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
510
|
+
infoAppends?: ((wrapper: import("@fastkit/vue-form-control").FormNodeWrapper) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2189
511
|
[key: string]: any;
|
|
2190
512
|
}>[]) | undefined;
|
|
2191
|
-
error?: ((error: FormNodeError) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
513
|
+
error?: ((error: import("@fastkit/vue-form-control").FormNodeError) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2192
514
|
[key: string]: any;
|
|
2193
515
|
}>[]) | undefined;
|
|
2194
516
|
} & {
|