@angular/forms 18.0.0-next.3 → 18.0.0-next.5
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/esm2022/src/directives/abstract_form_group_directive.mjs +3 -3
- package/esm2022/src/directives/checkbox_value_accessor.mjs +3 -3
- package/esm2022/src/directives/control_value_accessor.mjs +6 -6
- package/esm2022/src/directives/default_value_accessor.mjs +3 -3
- package/esm2022/src/directives/ng_control_status.mjs +6 -6
- package/esm2022/src/directives/ng_form.mjs +3 -3
- package/esm2022/src/directives/ng_model.mjs +3 -3
- package/esm2022/src/directives/ng_model_group.mjs +3 -3
- package/esm2022/src/directives/ng_no_validate_directive.mjs +3 -3
- package/esm2022/src/directives/number_value_accessor.mjs +3 -3
- package/esm2022/src/directives/radio_control_value_accessor.mjs +6 -6
- package/esm2022/src/directives/range_value_accessor.mjs +3 -3
- package/esm2022/src/directives/reactive_directives/form_control_directive.mjs +5 -6
- package/esm2022/src/directives/reactive_directives/form_control_name.mjs +5 -7
- package/esm2022/src/directives/reactive_directives/form_group_directive.mjs +5 -5
- package/esm2022/src/directives/reactive_directives/form_group_name.mjs +9 -9
- package/esm2022/src/directives/select_control_value_accessor.mjs +6 -6
- package/esm2022/src/directives/select_multiple_control_value_accessor.mjs +6 -6
- package/esm2022/src/directives/validators.mjs +36 -36
- package/esm2022/src/directives.mjs +4 -4
- package/esm2022/src/form_builder.mjs +11 -11
- package/esm2022/src/form_providers.mjs +13 -13
- package/esm2022/src/model/abstract_model.mjs +13 -7
- package/esm2022/src/model/form_control.mjs +1 -1
- package/esm2022/src/validators.mjs +2 -2
- package/esm2022/src/version.mjs +1 -1
- package/fesm2022/forms.mjs +154 -151
- package/fesm2022/forms.mjs.map +1 -1
- package/index.d.ts +46 -36
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-next.
|
|
3
|
-
* (c) 2010-
|
|
2
|
+
* @license Angular v18.0.0-next.5
|
|
3
|
+
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -34,9 +34,9 @@ import { Version } from '@angular/core';
|
|
|
34
34
|
* The first type parameter TValue represents the value type of the control (`control.value`).
|
|
35
35
|
* The optional type parameter TRawValue represents the raw value type (`control.getRawValue()`).
|
|
36
36
|
*
|
|
37
|
-
* @see [Forms Guide](
|
|
38
|
-
* @see [Reactive Forms Guide](
|
|
39
|
-
* @see [Dynamic Forms Guide](
|
|
37
|
+
* @see [Forms Guide](guide/forms)
|
|
38
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
39
|
+
* @see [Dynamic Forms Guide](guide/forms/dynamic-forms)
|
|
40
40
|
*
|
|
41
41
|
* @publicApi
|
|
42
42
|
*/
|
|
@@ -369,6 +369,9 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
|
|
|
369
369
|
* and emits events after marking is applied.
|
|
370
370
|
* * `onlySelf`: When true, mark only this control. When false or not supplied,
|
|
371
371
|
* marks all direct ancestors. Default is false.
|
|
372
|
+
* * `emitEvent`: When true or not supplied (the default), the `events`
|
|
373
|
+
* observable emits a `TouchedChangeEvent` with the `touched` property being `true`.
|
|
374
|
+
* When false, no events are emitted.
|
|
372
375
|
*/
|
|
373
376
|
markAsTouched(opts?: {
|
|
374
377
|
onlySelf?: boolean;
|
|
@@ -377,6 +380,12 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
|
|
|
377
380
|
/**
|
|
378
381
|
* Marks the control and all its descendant controls as `touched`.
|
|
379
382
|
* @see {@link markAsTouched()}
|
|
383
|
+
*
|
|
384
|
+
* @param opts Configuration options that determine how the control propagates changes
|
|
385
|
+
* and emits events after marking is applied.
|
|
386
|
+
* * `emitEvent`: When true or not supplied (the default), the `events`
|
|
387
|
+
* observable emits a `TouchedChangeEvent` with the `touched` property being `true`.
|
|
388
|
+
* When false, no events are emitted.
|
|
380
389
|
*/
|
|
381
390
|
markAllAsTouched(opts?: {
|
|
382
391
|
emitEvent?: boolean;
|
|
@@ -395,6 +404,9 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
|
|
|
395
404
|
* and emits events after the marking is applied.
|
|
396
405
|
* * `onlySelf`: When true, mark only this control. When false or not supplied,
|
|
397
406
|
* marks all direct ancestors. Default is false.
|
|
407
|
+
* * `emitEvent`: When true or not supplied (the default), the `events`
|
|
408
|
+
* observable emits a `TouchedChangeEvent` with the `touched` property being `false`.
|
|
409
|
+
* When false, no events are emitted.
|
|
398
410
|
*/
|
|
399
411
|
markAsUntouched(opts?: {
|
|
400
412
|
onlySelf?: boolean;
|
|
@@ -455,8 +467,9 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
|
|
|
455
467
|
* * `onlySelf`: When true, mark only this control. When false or not supplied,
|
|
456
468
|
* marks all direct ancestors. Default is false.
|
|
457
469
|
* * `emitEvent`: When true or not supplied (the default), the `statusChanges`
|
|
458
|
-
* observable emits an event with the latest status the control is marked pending
|
|
459
|
-
*
|
|
470
|
+
* observable emits an event with the latest status the control is marked pending
|
|
471
|
+
* and the `events` observable emits a `StatusChangeEvent` with the `status` property being
|
|
472
|
+
* `PENDING` When false, no events are emitted.
|
|
460
473
|
*
|
|
461
474
|
*/
|
|
462
475
|
markAsPending(opts?: {
|
|
@@ -475,8 +488,8 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
|
|
|
475
488
|
* changes and emits events after the control is disabled.
|
|
476
489
|
* * `onlySelf`: When true, mark only this control. When false or not supplied,
|
|
477
490
|
* marks all direct ancestors. Default is false.
|
|
478
|
-
* * `emitEvent`: When true or not supplied (the default),
|
|
479
|
-
* `valueChanges`
|
|
491
|
+
* * `emitEvent`: When true or not supplied (the default), the `statusChanges`,
|
|
492
|
+
* `valueChanges` and `events`
|
|
480
493
|
* observables emit events with the latest status and value when the control is disabled.
|
|
481
494
|
* When false, no events are emitted.
|
|
482
495
|
*/
|
|
@@ -497,8 +510,8 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
|
|
|
497
510
|
* emits events when marked as untouched
|
|
498
511
|
* * `onlySelf`: When true, mark only this control. When false or not supplied,
|
|
499
512
|
* marks all direct ancestors. Default is false.
|
|
500
|
-
* * `emitEvent`: When true or not supplied (the default),
|
|
501
|
-
* `valueChanges`
|
|
513
|
+
* * `emitEvent`: When true or not supplied (the default), the `statusChanges`,
|
|
514
|
+
* `valueChanges` and `events`
|
|
502
515
|
* observables emit events with the latest status and value when the control is enabled.
|
|
503
516
|
* When false, no events are emitted.
|
|
504
517
|
*/
|
|
@@ -539,8 +552,8 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
|
|
|
539
552
|
* after updates and validity checks are applied.
|
|
540
553
|
* * `onlySelf`: When true, only update this control. When false or not supplied,
|
|
541
554
|
* update all direct ancestors. Default is false.
|
|
542
|
-
* * `emitEvent`: When true or not supplied (the default),
|
|
543
|
-
* `valueChanges`
|
|
555
|
+
* * `emitEvent`: When true or not supplied (the default), the `statusChanges`,
|
|
556
|
+
* `valueChanges` and `events`
|
|
544
557
|
* observables emit events with the latest status and value when the control is updated.
|
|
545
558
|
* When false, no events are emitted.
|
|
546
559
|
*/
|
|
@@ -1129,7 +1142,7 @@ export declare class CheckboxControlValueAccessor extends BuiltInControlValueAcc
|
|
|
1129
1142
|
* A Directive that adds the `required` validator to checkbox controls marked with the
|
|
1130
1143
|
* `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
|
|
1131
1144
|
*
|
|
1132
|
-
* @see [Form Validation](guide/form-validation)
|
|
1145
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
1133
1146
|
*
|
|
1134
1147
|
* @usageNotes
|
|
1135
1148
|
*
|
|
@@ -1389,7 +1402,7 @@ declare const EMAIL_VALIDATOR: any;
|
|
|
1389
1402
|
* incorporate more RFC rules. More information can be found on the [Validators.email
|
|
1390
1403
|
* page](api/forms/Validators#email).
|
|
1391
1404
|
*
|
|
1392
|
-
* @see [Form Validation](guide/form-validation)
|
|
1405
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
1393
1406
|
*
|
|
1394
1407
|
* @usageNotes
|
|
1395
1408
|
*
|
|
@@ -1821,7 +1834,7 @@ export declare class FormArray<TControl extends AbstractControl<any> = any> exte
|
|
|
1821
1834
|
* will look for a `FormArray` registered with that name in the parent
|
|
1822
1835
|
* `FormGroup` instance you passed into `FormGroupDirective`.
|
|
1823
1836
|
*
|
|
1824
|
-
* @see [Reactive Forms Guide](guide/reactive-forms)
|
|
1837
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
1825
1838
|
* @see {@link AbstractControl}
|
|
1826
1839
|
*
|
|
1827
1840
|
* @usageNotes
|
|
@@ -1887,7 +1900,7 @@ declare const formArrayNameProvider: any;
|
|
|
1887
1900
|
* `FormControl`, `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to
|
|
1888
1901
|
* build complex forms.
|
|
1889
1902
|
*
|
|
1890
|
-
* @see [Reactive Forms Guide](guide/reactive-forms)
|
|
1903
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
1891
1904
|
*
|
|
1892
1905
|
* @publicApi
|
|
1893
1906
|
*/
|
|
@@ -2046,7 +2059,7 @@ export declare class FormBuilder {
|
|
|
2046
2059
|
* See [usage examples below](#usage-notes).
|
|
2047
2060
|
*
|
|
2048
2061
|
* @see {@link AbstractControl}
|
|
2049
|
-
* @see [Reactive Forms Guide](guide/reactive-forms)
|
|
2062
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
2050
2063
|
* @see [Usage Notes](#usage-notes)
|
|
2051
2064
|
*
|
|
2052
2065
|
* @publicApi
|
|
@@ -2283,9 +2296,8 @@ export declare const FormControl: ɵFormControlCtor;
|
|
|
2283
2296
|
* Note that support for using the `ngModel` input property and `ngModelChange` event with reactive
|
|
2284
2297
|
* form directives was deprecated in Angular v6 and is scheduled for removal in
|
|
2285
2298
|
* a future version of Angular.
|
|
2286
|
-
* For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).
|
|
2287
2299
|
*
|
|
2288
|
-
* @see [Reactive Forms Guide](guide/reactive-forms)
|
|
2300
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
2289
2301
|
* @see {@link FormControl}
|
|
2290
2302
|
* @see {@link AbstractControl}
|
|
2291
2303
|
*
|
|
@@ -2353,7 +2365,7 @@ export declare class FormControlDirective extends NgControl implements OnChanges
|
|
|
2353
2365
|
* Syncs a `FormControl` in an existing `FormGroup` to a form control
|
|
2354
2366
|
* element by name.
|
|
2355
2367
|
*
|
|
2356
|
-
* @see [Reactive Forms Guide](guide/reactive-forms)
|
|
2368
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
2357
2369
|
* @see {@link FormControl}
|
|
2358
2370
|
* @see {@link AbstractControl}
|
|
2359
2371
|
*
|
|
@@ -2377,8 +2389,6 @@ export declare class FormControlDirective extends NgControl implements OnChanges
|
|
|
2377
2389
|
* form directives has been deprecated in Angular v6 and is scheduled for removal in
|
|
2378
2390
|
* a future version of Angular.
|
|
2379
2391
|
*
|
|
2380
|
-
* For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).
|
|
2381
|
-
*
|
|
2382
2392
|
* @ngModule ReactiveFormsModule
|
|
2383
2393
|
* @publicApi
|
|
2384
2394
|
*/
|
|
@@ -2856,7 +2866,7 @@ export declare class FormGroup<TControl extends {
|
|
|
2856
2866
|
* and `FormArray` instances to child `FormControlName`, `FormGroupName`,
|
|
2857
2867
|
* and `FormArrayName` directives.
|
|
2858
2868
|
*
|
|
2859
|
-
* @see [Reactive Forms Guide](guide/reactive-forms)
|
|
2869
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
2860
2870
|
* @see {@link AbstractControl}
|
|
2861
2871
|
*
|
|
2862
2872
|
* @usageNotes
|
|
@@ -3036,7 +3046,7 @@ export declare class FormGroupDirective extends ControlContainer implements Form
|
|
|
3036
3046
|
* form separately from the rest or to group the values of certain
|
|
3037
3047
|
* controls into their own nested object.
|
|
3038
3048
|
*
|
|
3039
|
-
* @see [Reactive Forms Guide](guide/reactive-forms)
|
|
3049
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
3040
3050
|
*
|
|
3041
3051
|
* @usageNotes
|
|
3042
3052
|
*
|
|
@@ -3198,8 +3208,8 @@ export declare interface FormRecord<TControl> {
|
|
|
3198
3208
|
* Exports the required providers and directives for template-driven forms,
|
|
3199
3209
|
* making them available for import by NgModules that import this module.
|
|
3200
3210
|
*
|
|
3201
|
-
* @see [Forms Overview](
|
|
3202
|
-
* @see [Template-driven Forms Guide](
|
|
3211
|
+
* @see [Forms Overview](guide/forms)
|
|
3212
|
+
* @see [Template-driven Forms Guide](guide/forms)
|
|
3203
3213
|
*
|
|
3204
3214
|
* @publicApi
|
|
3205
3215
|
*/
|
|
@@ -3438,7 +3448,7 @@ declare const MAX_VALIDATOR: Provider;
|
|
|
3438
3448
|
* A directive that adds maximum length validation to controls marked with the
|
|
3439
3449
|
* `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
|
|
3440
3450
|
*
|
|
3441
|
-
* @see [Form Validation](guide/form-validation)
|
|
3451
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
3442
3452
|
*
|
|
3443
3453
|
* @usageNotes
|
|
3444
3454
|
*
|
|
@@ -3469,7 +3479,7 @@ export declare class MaxLengthValidator extends AbstractValidatorDirective {
|
|
|
3469
3479
|
* A directive which installs the {@link MaxValidator} for any `formControlName`,
|
|
3470
3480
|
* `formControl`, or control with `ngModel` that also has a `max` attribute.
|
|
3471
3481
|
*
|
|
3472
|
-
* @see [Form Validation](guide/form-validation)
|
|
3482
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
3473
3483
|
*
|
|
3474
3484
|
* @usageNotes
|
|
3475
3485
|
*
|
|
@@ -3512,7 +3522,7 @@ declare const MIN_VALIDATOR: Provider;
|
|
|
3512
3522
|
* A directive that adds minimum length validation to controls marked with the
|
|
3513
3523
|
* `minlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
|
|
3514
3524
|
*
|
|
3515
|
-
* @see [Form Validation](guide/form-validation)
|
|
3525
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
3516
3526
|
*
|
|
3517
3527
|
* @usageNotes
|
|
3518
3528
|
*
|
|
@@ -3543,7 +3553,7 @@ export declare class MinLengthValidator extends AbstractValidatorDirective {
|
|
|
3543
3553
|
* A directive which installs the {@link MinValidator} for any `formControlName`,
|
|
3544
3554
|
* `formControl`, or control with `ngModel` that also has a `min` attribute.
|
|
3545
3555
|
*
|
|
3546
|
-
* @see [Form Validation](guide/form-validation)
|
|
3556
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
3547
3557
|
*
|
|
3548
3558
|
* @usageNotes
|
|
3549
3559
|
*
|
|
@@ -4289,7 +4299,7 @@ declare const PATTERN_VALIDATOR: any;
|
|
|
4289
4299
|
* `pattern` attribute. The regex must match the entire control value.
|
|
4290
4300
|
* The directive is provided with the `NG_VALIDATORS` multi-provider list.
|
|
4291
4301
|
*
|
|
4292
|
-
* @see [Form Validation](guide/form-validation)
|
|
4302
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
4293
4303
|
*
|
|
4294
4304
|
* @usageNotes
|
|
4295
4305
|
*
|
|
@@ -4493,8 +4503,8 @@ declare const REACTIVE_DRIVEN_DIRECTIVES: Type<any>[];
|
|
|
4493
4503
|
* Exports the required infrastructure and directives for reactive forms,
|
|
4494
4504
|
* making them available for import by NgModules that import this module.
|
|
4495
4505
|
*
|
|
4496
|
-
* @see [Forms Overview](guide/forms
|
|
4497
|
-
* @see [Reactive Forms Guide](guide/reactive-forms)
|
|
4506
|
+
* @see [Forms Overview](guide/forms)
|
|
4507
|
+
* @see [Reactive Forms Guide](guide/forms/reactive-forms)
|
|
4498
4508
|
*
|
|
4499
4509
|
* @publicApi
|
|
4500
4510
|
*/
|
|
@@ -4529,7 +4539,7 @@ declare const REQUIRED_VALIDATOR: Provider;
|
|
|
4529
4539
|
* A directive that adds the `required` validator to any controls marked with the
|
|
4530
4540
|
* `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.
|
|
4531
4541
|
*
|
|
4532
|
-
* @see [Form Validation](guide/form-validation)
|
|
4542
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
4533
4543
|
*
|
|
4534
4544
|
* @usageNotes
|
|
4535
4545
|
*
|
|
@@ -4895,7 +4905,7 @@ export declare interface ValidatorFn {
|
|
|
4895
4905
|
* A validator is a function that processes a `FormControl` or collection of
|
|
4896
4906
|
* controls and returns an error map or null. A null map means that validation has passed.
|
|
4897
4907
|
*
|
|
4898
|
-
* @see [Form Validation](
|
|
4908
|
+
* @see [Form Validation](guide/forms/form-validation)
|
|
4899
4909
|
*
|
|
4900
4910
|
* @publicApi
|
|
4901
4911
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/forms",
|
|
3
|
-
"version": "18.0.0-next.
|
|
3
|
+
"version": "18.0.0-next.5",
|
|
4
4
|
"description": "Angular - directives and services for creating forms",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"tslib": "^2.3.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@angular/core": "18.0.0-next.
|
|
15
|
-
"@angular/common": "18.0.0-next.
|
|
16
|
-
"@angular/platform-browser": "18.0.0-next.
|
|
14
|
+
"@angular/core": "18.0.0-next.5",
|
|
15
|
+
"@angular/common": "18.0.0-next.5",
|
|
16
|
+
"@angular/platform-browser": "18.0.0-next.5",
|
|
17
17
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|