ngx-vest-forms 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/fesm2022/ngx-vest-forms.mjs +2167 -1963
- package/fesm2022/ngx-vest-forms.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-vest-forms.d.ts +129 -61
package/package.json
CHANGED
|
@@ -1,78 +1,99 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, AfterContentInit, OnDestroy, InputSignal, AfterViewInit, InjectionToken } from '@angular/core';
|
|
3
|
-
import { NgModel, NgModelGroup, AsyncValidator, AbstractControl,
|
|
3
|
+
import { ValidationErrors, NgModel, NgModelGroup, AsyncValidator, AbstractControl, NgForm, AsyncValidatorFn, FormsModule, ControlContainer, FormGroup } from '@angular/forms';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import * as ngx_vest_forms from 'ngx-vest-forms';
|
|
6
6
|
import { StaticSuite } from 'vest';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Angular's ValidationErrors is `{ [key: string]: any }`.
|
|
10
|
+
* We extend it with Vest-specific structure for better type safety.
|
|
11
|
+
*/
|
|
12
|
+
type VestValidationErrors = {
|
|
13
|
+
/** Vest error messages array */
|
|
14
|
+
errors?: readonly string[];
|
|
15
|
+
/** Vest warning messages array */
|
|
16
|
+
warnings?: readonly string[];
|
|
17
|
+
} & ValidationErrors;
|
|
18
|
+
/**
|
|
19
|
+
* Form control status values as defined by Angular.
|
|
20
|
+
* @see AbstractControl.status
|
|
21
|
+
*/
|
|
22
|
+
type FormControlStatus = 'VALID' | 'INVALID' | 'PENDING' | 'DISABLED';
|
|
8
23
|
/**
|
|
9
24
|
* Represents the core state of an Angular form control.
|
|
10
|
-
*
|
|
25
|
+
* Uses narrower types than Angular's defaults where possible.
|
|
11
26
|
*/
|
|
12
27
|
type FormControlState = {
|
|
13
|
-
status:
|
|
14
|
-
isValid: boolean
|
|
15
|
-
isInvalid: boolean
|
|
16
|
-
isPending: boolean
|
|
17
|
-
isDisabled: boolean
|
|
18
|
-
isTouched: boolean
|
|
19
|
-
isDirty: boolean
|
|
20
|
-
isPristine: boolean
|
|
21
|
-
|
|
28
|
+
readonly status: FormControlStatus | null;
|
|
29
|
+
readonly isValid: boolean;
|
|
30
|
+
readonly isInvalid: boolean;
|
|
31
|
+
readonly isPending: boolean;
|
|
32
|
+
readonly isDisabled: boolean;
|
|
33
|
+
readonly isTouched: boolean;
|
|
34
|
+
readonly isDirty: boolean;
|
|
35
|
+
readonly isPristine: boolean;
|
|
36
|
+
/** Errors from Angular validators or Vest validation */
|
|
37
|
+
readonly errors: VestValidationErrors | null;
|
|
22
38
|
};
|
|
23
39
|
declare class FormControlStateDirective {
|
|
24
40
|
#private;
|
|
25
|
-
protected readonly contentNgModel: Signal<NgModel | undefined>;
|
|
26
|
-
protected readonly contentNgModelGroup: Signal<NgModelGroup | undefined>;
|
|
41
|
+
protected readonly contentNgModel: _angular_core.Signal<NgModel | undefined>;
|
|
42
|
+
protected readonly contentNgModelGroup: _angular_core.Signal<NgModelGroup | undefined>;
|
|
27
43
|
constructor();
|
|
28
44
|
/**
|
|
29
45
|
* Main control state computed signal (merges robust touched/dirty)
|
|
30
46
|
*/
|
|
31
|
-
readonly controlState: Signal<FormControlState>;
|
|
47
|
+
readonly controlState: _angular_core.Signal<FormControlState>;
|
|
32
48
|
/**
|
|
33
49
|
* Extracts error messages from Angular/Vest errors (recursively flattens)
|
|
34
50
|
*/
|
|
35
|
-
readonly errorMessages: Signal<
|
|
51
|
+
readonly errorMessages: _angular_core.Signal<string[]>;
|
|
36
52
|
/**
|
|
37
53
|
* ADVANCED: updateOn strategy (change/blur/submit) if available
|
|
38
54
|
*/
|
|
39
|
-
readonly updateOn: Signal<"change" | "blur" | "submit">;
|
|
55
|
+
readonly updateOn: _angular_core.Signal<"change" | "blur" | "submit">;
|
|
40
56
|
/**
|
|
41
57
|
* ADVANCED: Composite/derived signals for advanced error display logic
|
|
42
58
|
*/
|
|
43
|
-
readonly isValidTouched: Signal<boolean>;
|
|
44
|
-
readonly isInvalidTouched: Signal<boolean>;
|
|
45
|
-
readonly shouldShowErrors: Signal<boolean>;
|
|
59
|
+
readonly isValidTouched: _angular_core.Signal<boolean>;
|
|
60
|
+
readonly isInvalidTouched: _angular_core.Signal<boolean>;
|
|
61
|
+
readonly shouldShowErrors: _angular_core.Signal<boolean>;
|
|
46
62
|
/**
|
|
47
|
-
* Extracts warning messages from Vest validation results
|
|
63
|
+
* Extracts warning messages from Vest validation results.
|
|
64
|
+
* Checks two sources:
|
|
65
|
+
* 1. control.errors.warnings (when errors exist alongside warnings)
|
|
66
|
+
* 2. FormDirective.fieldWarnings (for warnings-only scenarios)
|
|
67
|
+
* This dual-source approach allows warnings to be displayed without affecting field validity.
|
|
48
68
|
*/
|
|
49
|
-
readonly warningMessages: Signal<
|
|
69
|
+
readonly warningMessages: _angular_core.Signal<string[]>;
|
|
50
70
|
/**
|
|
51
71
|
* Whether async validation is in progress
|
|
52
72
|
*/
|
|
53
|
-
readonly hasPendingValidation: Signal<boolean>;
|
|
73
|
+
readonly hasPendingValidation: _angular_core.Signal<boolean>;
|
|
54
74
|
/**
|
|
55
75
|
* Convenience signals for common state checks
|
|
56
76
|
*/
|
|
57
|
-
readonly isValid: Signal<boolean>;
|
|
58
|
-
readonly isInvalid: Signal<boolean>;
|
|
59
|
-
readonly isPending: Signal<boolean>;
|
|
60
|
-
readonly isTouched: Signal<boolean>;
|
|
61
|
-
readonly isDirty: Signal<boolean>;
|
|
62
|
-
readonly isPristine: Signal<boolean>;
|
|
63
|
-
readonly isDisabled: Signal<boolean>;
|
|
64
|
-
readonly hasErrors: Signal<boolean>;
|
|
77
|
+
readonly isValid: _angular_core.Signal<boolean>;
|
|
78
|
+
readonly isInvalid: _angular_core.Signal<boolean>;
|
|
79
|
+
readonly isPending: _angular_core.Signal<boolean>;
|
|
80
|
+
readonly isTouched: _angular_core.Signal<boolean>;
|
|
81
|
+
readonly isDirty: _angular_core.Signal<boolean>;
|
|
82
|
+
readonly isPristine: _angular_core.Signal<boolean>;
|
|
83
|
+
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
84
|
+
readonly hasErrors: _angular_core.Signal<boolean>;
|
|
65
85
|
/**
|
|
66
86
|
* Whether this control has been validated at least once.
|
|
67
87
|
* True after the first validation completes, even if the user hasn't touched the field.
|
|
68
88
|
* This enables showing errors for validationConfig-triggered validations.
|
|
69
89
|
*/
|
|
70
|
-
readonly hasBeenValidated: Signal<boolean>;
|
|
90
|
+
readonly hasBeenValidated: _angular_core.Signal<boolean>;
|
|
71
91
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormControlStateDirective, never>;
|
|
72
92
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FormControlStateDirective, "[formControlState], [ngxControlState]", ["formControlState", "ngxControlState"], {}, {}, ["contentNgModel", "contentNgModelGroup"], never, true, never>;
|
|
73
93
|
}
|
|
74
94
|
|
|
75
95
|
type ScErrorDisplayMode = 'on-blur' | 'on-submit' | 'on-blur-or-submit';
|
|
96
|
+
type NgxWarningDisplayMode = 'on-touch' | 'on-validated-or-touch';
|
|
76
97
|
declare class FormErrorDisplayDirective {
|
|
77
98
|
#private;
|
|
78
99
|
/**
|
|
@@ -80,31 +101,36 @@ declare class FormErrorDisplayDirective {
|
|
|
80
101
|
* Works seamlessly with hostDirectives in Angular 19+.
|
|
81
102
|
*/
|
|
82
103
|
readonly errorDisplayMode: _angular_core.InputSignal<ScErrorDisplayMode>;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
readonly
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
104
|
+
/**
|
|
105
|
+
* Input signal for warning display mode.
|
|
106
|
+
* Controls whether warnings are shown only after touch or also after validation.
|
|
107
|
+
*/
|
|
108
|
+
readonly warningDisplayMode: _angular_core.InputSignal<NgxWarningDisplayMode>;
|
|
109
|
+
readonly controlState: Signal<FormControlState>;
|
|
110
|
+
readonly errorMessages: Signal<string[]>;
|
|
111
|
+
readonly warningMessages: Signal<string[]>;
|
|
112
|
+
readonly hasPendingValidation: Signal<boolean>;
|
|
113
|
+
readonly isTouched: Signal<boolean>;
|
|
114
|
+
readonly isDirty: Signal<boolean>;
|
|
115
|
+
readonly isValid: Signal<boolean>;
|
|
116
|
+
readonly isInvalid: Signal<boolean>;
|
|
117
|
+
readonly hasBeenValidated: Signal<boolean>;
|
|
92
118
|
/**
|
|
93
119
|
* Expose updateOn and formSubmitted as public signals for advanced consumers.
|
|
94
120
|
* updateOn: The ngModelOptions.updateOn value for the control (change/blur/submit)
|
|
95
121
|
* formSubmitted: true after the form is submitted (if NgForm is present)
|
|
96
122
|
*/
|
|
97
|
-
readonly updateOn:
|
|
123
|
+
readonly updateOn: Signal<"change" | "blur" | "submit">;
|
|
98
124
|
/**
|
|
99
125
|
* Signal that tracks NgForm.submitted state reactively.
|
|
100
126
|
*
|
|
101
|
-
* Uses
|
|
127
|
+
* Uses a trigger signal pattern for cleaner reactive tracking:
|
|
102
128
|
* - ngSubmit: fires when form is submitted (sets NgForm.submitted = true)
|
|
103
129
|
* - statusChanges: fires after resetForm() (which sets NgForm.submitted = false)
|
|
104
130
|
*
|
|
105
131
|
* This ensures proper sync with both submit and reset operations.
|
|
106
132
|
*/
|
|
107
|
-
readonly formSubmitted:
|
|
133
|
+
readonly formSubmitted: Signal<boolean>;
|
|
108
134
|
constructor();
|
|
109
135
|
/**
|
|
110
136
|
* Determines if errors should be shown based on the specified display mode
|
|
@@ -119,22 +145,22 @@ declare class FormErrorDisplayDirective {
|
|
|
119
145
|
* (e.g., confirmPassword validated when password changes). We check hasBeenValidated to show
|
|
120
146
|
* errors in these scenarios, providing better UX and proper ARIA attributes.
|
|
121
147
|
*/
|
|
122
|
-
readonly shouldShowErrors:
|
|
148
|
+
readonly shouldShowErrors: Signal<boolean>;
|
|
123
149
|
/**
|
|
124
150
|
* Errors to display (filtered for pending state)
|
|
125
151
|
*/
|
|
126
|
-
readonly errors:
|
|
152
|
+
readonly errors: Signal<string[]>;
|
|
127
153
|
/**
|
|
128
154
|
* Warnings to display (filtered for pending state)
|
|
129
155
|
*/
|
|
130
|
-
readonly warnings:
|
|
156
|
+
readonly warnings: Signal<string[]>;
|
|
131
157
|
/**
|
|
132
158
|
* Whether the control is currently being validated (pending)
|
|
133
159
|
* Excludes pristine+untouched controls to prevent "Validating..." on initial load
|
|
134
160
|
*/
|
|
135
|
-
readonly isPending:
|
|
161
|
+
readonly isPending: Signal<boolean>;
|
|
136
162
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormErrorDisplayDirective, never>;
|
|
137
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FormErrorDisplayDirective, "[formErrorDisplay], [ngxErrorDisplay]", ["formErrorDisplay", "ngxErrorDisplay"], { "errorDisplayMode": { "alias": "errorDisplayMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof FormControlStateDirective; inputs: {}; outputs: {}; }]>;
|
|
163
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FormErrorDisplayDirective, "[formErrorDisplay], [ngxErrorDisplay]", ["formErrorDisplay", "ngxErrorDisplay"], { "errorDisplayMode": { "alias": "errorDisplayMode"; "required": false; "isSignal": true; }; "warningDisplayMode": { "alias": "warningDisplayMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof FormControlStateDirective; inputs: {}; outputs: {}; }]>;
|
|
138
164
|
}
|
|
139
165
|
|
|
140
166
|
/**
|
|
@@ -169,25 +195,37 @@ declare class FormErrorDisplayDirective {
|
|
|
169
195
|
* - Unique IDs for error/warning/pending regions
|
|
170
196
|
* - `aria-describedby` linking errors to form controls
|
|
171
197
|
* - `aria-invalid="true"` when errors are shown
|
|
172
|
-
* - `role="status"` with `aria-live="polite"` for non-
|
|
198
|
+
* - Uses `role="status"` with `aria-live="polite"` for non-disruptive announcements
|
|
173
199
|
* - Debounced pending state to prevent flashing for quick validations
|
|
174
200
|
*
|
|
201
|
+
* ### WCAG 2.2 AA - Error Severity Levels
|
|
202
|
+
* This component uses `role="status"` for **field-level** validation messages:
|
|
203
|
+
* - **Errors**: Non-disruptive announcement (user can continue filling other fields)
|
|
204
|
+
* - **Warnings**: Informational only, doesn't block submission
|
|
205
|
+
* - **Pending**: Status update while async validation runs
|
|
206
|
+
*
|
|
207
|
+
* For **form-level blocking errors** (e.g., submission failed), implement a separate
|
|
208
|
+
* error summary component with `role="alert"` and `aria-live="assertive"`.
|
|
209
|
+
*
|
|
175
210
|
* @see {@link FormErrorDisplayDirective} for custom wrapper implementation
|
|
176
211
|
*
|
|
177
|
-
* Blocking Errors
|
|
212
|
+
* Form-Level Blocking Errors:
|
|
178
213
|
* - For post-submit validation errors that block submission, implement a separate
|
|
179
214
|
* form-level error summary with role="alert" and aria-live="assertive"
|
|
180
|
-
* -
|
|
215
|
+
* - This component uses role="status" for field-level errors (non-disruptive)
|
|
216
|
+
* - Example for form-level errors:
|
|
181
217
|
* ```html
|
|
182
218
|
* <!-- Keep in DOM; update text content on submit -->
|
|
183
219
|
* <div id="form-errors" role="alert" aria-live="assertive" aria-atomic="true"></div>
|
|
184
220
|
* ```
|
|
185
|
-
* - This provides immediate
|
|
186
|
-
* inline field errors non-disruptive. Follows WCAG
|
|
221
|
+
* - This separation provides immediate announcements for blocking form errors while
|
|
222
|
+
* keeping inline field errors non-disruptive. Follows WCAG ARIA21/ARIA22 guidance.
|
|
187
223
|
*
|
|
188
224
|
* Error & Warning Display Behavior:
|
|
189
|
-
* - The error display mode can be configured globally using the
|
|
225
|
+
* - The error display mode can be configured globally using the NGX_ERROR_DISPLAY_MODE_TOKEN injection token, or per instance using the `errorDisplayMode` input on FormErrorDisplayDirective (which this component uses as a hostDirective).
|
|
190
226
|
* - Possible values: 'on-blur' | 'on-submit' | 'on-blur-or-submit' (default: 'on-blur-or-submit')
|
|
227
|
+
* - The warning display mode can be configured globally using NGX_WARNING_DISPLAY_MODE_TOKEN, or per instance using the `warningDisplayMode` input on FormErrorDisplayDirective.
|
|
228
|
+
* - Possible values: 'on-touch' | 'on-validated-or-touch' (default: 'on-validated-or-touch')
|
|
191
229
|
*
|
|
192
230
|
* Example (per instance):
|
|
193
231
|
* <div ngxControlWrapper>
|
|
@@ -208,10 +246,10 @@ declare class FormErrorDisplayDirective {
|
|
|
208
246
|
*
|
|
209
247
|
* Example (global config):
|
|
210
248
|
* import { provide } from '@angular/core';
|
|
211
|
-
* import {
|
|
249
|
+
* import { NGX_ERROR_DISPLAY_MODE_TOKEN } from 'ngx-vest-forms';
|
|
212
250
|
* @Component({
|
|
213
251
|
* providers: [
|
|
214
|
-
* provide(
|
|
252
|
+
* provide(NGX_ERROR_DISPLAY_MODE_TOKEN, { useValue: 'submit' })
|
|
215
253
|
* ]
|
|
216
254
|
* })
|
|
217
255
|
* export class MyComponent {}
|
|
@@ -256,6 +294,22 @@ declare class ControlWrapperComponent implements AfterContentInit, OnDestroy {
|
|
|
256
294
|
*/
|
|
257
295
|
private readonly pendingState;
|
|
258
296
|
protected readonly showPendingMessage: _angular_core.Signal<boolean>;
|
|
297
|
+
/**
|
|
298
|
+
* Whether to display warnings.
|
|
299
|
+
* Warnings are shown when:
|
|
300
|
+
* 1. The field has been touched (user has interacted with it)
|
|
301
|
+
* 2. The field has warnings to display
|
|
302
|
+
* 3. The field is not currently pending validation
|
|
303
|
+
*
|
|
304
|
+
* NOTE: Unlike errors, warnings can exist on VALID fields (warnings-only scenario).
|
|
305
|
+
* We don't require isInvalid() because Vest warn() tests don't affect field validity.
|
|
306
|
+
*
|
|
307
|
+
* UX Note: We include `hasBeenValidated` here to support cross-field validation.
|
|
308
|
+
* If Field A triggers validation on Field B (via validationConfig), Field B should
|
|
309
|
+
* show warnings if it has them, even if the user hasn't touched Field B yet.
|
|
310
|
+
* Unlike errors (which block submission), warnings are informational and safe to safe to show.
|
|
311
|
+
*/
|
|
312
|
+
protected readonly shouldShowWarnings: _angular_core.Signal<boolean>;
|
|
259
313
|
/**
|
|
260
314
|
* Computed signal that builds aria-describedby string based on visible regions
|
|
261
315
|
*/
|
|
@@ -278,7 +332,7 @@ declare class ControlWrapperComponent implements AfterContentInit, OnDestroy {
|
|
|
278
332
|
*/
|
|
279
333
|
private updateFormControls;
|
|
280
334
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ControlWrapperComponent, never>;
|
|
281
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ControlWrapperComponent, "ngx-control-wrapper, sc-control-wrapper, [scControlWrapper], [ngxControlWrapper], [ngx-control-wrapper], [sc-control-wrapper]", never, { "ariaAssociationMode": { "alias": "ariaAssociationMode"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof FormErrorDisplayDirective; inputs: { "errorDisplayMode": "errorDisplayMode"; }; outputs: {}; }]>;
|
|
335
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ControlWrapperComponent, "ngx-control-wrapper, sc-control-wrapper, [scControlWrapper], [ngxControlWrapper], [ngx-control-wrapper], [sc-control-wrapper]", never, { "ariaAssociationMode": { "alias": "ariaAssociationMode"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof FormErrorDisplayDirective; inputs: { "errorDisplayMode": "errorDisplayMode"; "warningDisplayMode": "warningDisplayMode"; }; outputs: {}; }]>;
|
|
282
336
|
}
|
|
283
337
|
|
|
284
338
|
/**
|
|
@@ -326,7 +380,6 @@ declare class FormGroupWrapperComponent {
|
|
|
326
380
|
declare class FormErrorControlDirective implements AfterContentInit, OnDestroy {
|
|
327
381
|
protected readonly errorDisplay: FormErrorDisplayDirective;
|
|
328
382
|
private readonly elementRef;
|
|
329
|
-
private readonly destroyRef;
|
|
330
383
|
/**
|
|
331
384
|
* Controls how this directive applies ARIA attributes to descendant controls.
|
|
332
385
|
*
|
|
@@ -890,6 +943,13 @@ declare class FormDirective<T extends Record<string, unknown>> {
|
|
|
890
943
|
private readonly destroyRef;
|
|
891
944
|
private readonly cdr;
|
|
892
945
|
private readonly configDebounceTime;
|
|
946
|
+
/**
|
|
947
|
+
* Public signal storing field warnings keyed by field path.
|
|
948
|
+
* This allows warnings to be stored and displayed without affecting field validity.
|
|
949
|
+
* Angular's control.errors !== null marks a field as invalid, so we store warnings
|
|
950
|
+
* separately when they exist without errors.
|
|
951
|
+
*/
|
|
952
|
+
readonly fieldWarnings: _angular_core.WritableSignal<Map<string, readonly string[]>>;
|
|
893
953
|
/**
|
|
894
954
|
* Computed signal for form state with validity and errors.
|
|
895
955
|
* Used by templates and tests as vestForm.formState().valid/errors
|
|
@@ -938,7 +998,7 @@ declare class FormDirective<T extends Record<string, unknown>> {
|
|
|
938
998
|
* that is not PENDING
|
|
939
999
|
* We need this to assure that the form is in 'idle' state
|
|
940
1000
|
*/
|
|
941
|
-
readonly idle$: Observable<"
|
|
1001
|
+
readonly idle$: Observable<"VALID" | "INVALID" | "DISABLED">;
|
|
942
1002
|
/**
|
|
943
1003
|
* Triggered as soon as the form value changes
|
|
944
1004
|
* It also contains the disabled values (raw values)
|
|
@@ -950,6 +1010,9 @@ declare class FormDirective<T extends Record<string, unknown>> {
|
|
|
950
1010
|
* Emits an object with all the errors of the form
|
|
951
1011
|
* every time a form control or form groups changes its status to valid or invalid
|
|
952
1012
|
*
|
|
1013
|
+
* For submit events, waits for async validation (including ROOT_FORM) to complete
|
|
1014
|
+
* before emitting errors. This ensures ROOT_FORM errors are included in the output.
|
|
1015
|
+
*
|
|
953
1016
|
* Cleanup is handled automatically by the directive when it's destroyed.
|
|
954
1017
|
*/
|
|
955
1018
|
readonly errorsChange: _angular_core.OutputRef<Record<string, any>>;
|
|
@@ -2314,6 +2377,11 @@ declare const SC_ERROR_DISPLAY_MODE_TOKEN: InjectionToken<ScErrorDisplayMode>;
|
|
|
2314
2377
|
* Values: 'on-blur' | 'on-submit' | 'on-blur-or-submit' (default)
|
|
2315
2378
|
*/
|
|
2316
2379
|
declare const NGX_ERROR_DISPLAY_MODE_TOKEN: InjectionToken<ScErrorDisplayMode>;
|
|
2380
|
+
/**
|
|
2381
|
+
* Injection token for configuring the default warning display mode.
|
|
2382
|
+
* Values: 'on-touch' | 'on-validated-or-touch' (default)
|
|
2383
|
+
*/
|
|
2384
|
+
declare const NGX_WARNING_DISPLAY_MODE_TOKEN: InjectionToken<NgxWarningDisplayMode>;
|
|
2317
2385
|
|
|
2318
2386
|
/**
|
|
2319
2387
|
* Injection token for configurable validation config debounce timing.
|
|
@@ -2361,5 +2429,5 @@ declare const NGX_ERROR_DISPLAY_MODE_TOKEN: InjectionToken<ScErrorDisplayMode>;
|
|
|
2361
2429
|
*/
|
|
2362
2430
|
declare const NGX_VALIDATION_CONFIG_DEBOUNCE_TOKEN: InjectionToken<number>;
|
|
2363
2431
|
|
|
2364
|
-
export { ControlWrapperComponent, FormControlStateDirective, FormDirective, FormErrorControlDirective, FormErrorDisplayDirective, FormGroupWrapperComponent, FormModelDirective, FormModelGroupDirective, NGX_ERROR_DISPLAY_MODE_TOKEN, NGX_VALIDATION_CONFIG_DEBOUNCE_TOKEN, NgxVestForms, ROOT_FORM, ROOT_FORM as ROOT_FORM_CONSTANT, SC_ERROR_DISPLAY_MODE_TOKEN, ValidateRootFormDirective, ValidationConfigBuilder, arrayToObject, clearFields, clearFieldsWhen, cloneDeep, createDebouncedPendingState, createEmptyFormState, createValidationConfig, deepArrayToObject, fastDeepEqual, getAllFormErrors, getFormControlField, getFormGroupField, keepFieldsWhen, mergeValuesAndRawValues, objectToArray, parseFieldPath, set, setValueAtPath, shallowEqual, stringifyFieldPath, validateShape, vestForms, vestFormsViewProviders };
|
|
2365
|
-
export type { DebouncedPendingStateOptions, DebouncedPendingStateResult, DeepPartial, DeepRequired, FieldPath, FieldPathValue, FormCompatibleDeepRequired, FormFieldName, LeafFieldPath, NgxDeepPartial, NgxDeepRequired, NgxFieldKey, NgxFormCompatibleDeepRequired, NgxFormState, NgxTypedVestSuite, NgxValidationConfig, NgxVestSuite, ScErrorDisplayMode, ValidateFieldPath, ValidationConfigMap, ValidationOptions };
|
|
2432
|
+
export { ControlWrapperComponent, FormControlStateDirective, FormDirective, FormErrorControlDirective, FormErrorDisplayDirective, FormGroupWrapperComponent, FormModelDirective, FormModelGroupDirective, NGX_ERROR_DISPLAY_MODE_TOKEN, NGX_VALIDATION_CONFIG_DEBOUNCE_TOKEN, NGX_WARNING_DISPLAY_MODE_TOKEN, NgxVestForms, ROOT_FORM, ROOT_FORM as ROOT_FORM_CONSTANT, SC_ERROR_DISPLAY_MODE_TOKEN, ValidateRootFormDirective, ValidationConfigBuilder, arrayToObject, clearFields, clearFieldsWhen, cloneDeep, createDebouncedPendingState, createEmptyFormState, createValidationConfig, deepArrayToObject, fastDeepEqual, getAllFormErrors, getFormControlField, getFormGroupField, keepFieldsWhen, mergeValuesAndRawValues, objectToArray, parseFieldPath, set, setValueAtPath, shallowEqual, stringifyFieldPath, validateShape, vestForms, vestFormsViewProviders };
|
|
2433
|
+
export type { DebouncedPendingStateOptions, DebouncedPendingStateResult, DeepPartial, DeepRequired, FieldPath, FieldPathValue, FormCompatibleDeepRequired, FormFieldName, LeafFieldPath, NgxDeepPartial, NgxDeepRequired, NgxFieldKey, NgxFormCompatibleDeepRequired, NgxFormState, NgxTypedVestSuite, NgxValidationConfig, NgxVestSuite, NgxWarningDisplayMode, ScErrorDisplayMode, ValidateFieldPath, ValidationConfigMap, ValidationOptions };
|