@angular/forms 21.0.0-next.6 → 21.0.0-next.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/forms",
3
- "version": "21.0.0-next.6",
3
+ "version": "21.0.0-next.8",
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": "21.0.0-next.6",
15
- "@angular/common": "21.0.0-next.6",
16
- "@angular/platform-browser": "21.0.0-next.6",
14
+ "@angular/core": "21.0.0-next.8",
15
+ "@angular/common": "21.0.0-next.8",
16
+ "@angular/platform-browser": "21.0.0-next.8",
17
17
  "@standard-schema/spec": "^1.0.0",
18
18
  "rxjs": "^6.5.3 || ^7.4.0"
19
19
  },
package/types/forms.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Angular v21.0.0-next.6
3
- * (c) 2010-2025 Google LLC. https://angular.io/
2
+ * @license Angular v21.0.0-next.8
3
+ * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
6
6
 
@@ -1100,6 +1100,8 @@ declare class FormArray<TControl extends AbstractControl<any> = any> extends Abs
1100
1100
  * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
1101
1101
  * `valueChanges` observables emit events with the latest status and value when the control is
1102
1102
  * inserted. When false, no events are emitted.
1103
+ *
1104
+ * NOTE: Pushing to the FormArray will not mark it dirty. If you want to mark if dirty, call `markAsDirty()`.
1103
1105
  */
1104
1106
  push(control: TControl | Array<TControl>, options?: {
1105
1107
  emitEvent?: boolean;
@@ -1116,6 +1118,8 @@ declare class FormArray<TControl extends AbstractControl<any> = any> extends Abs
1116
1118
  * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
1117
1119
  * `valueChanges` observables emit events with the latest status and value when the control is
1118
1120
  * inserted. When false, no events are emitted.
1121
+ *
1122
+ * NOTE: Inserting to the FormArray will not mark it dirty. If you want to mark if dirty, call `markAsDirty()`.
1119
1123
  */
1120
1124
  insert(index: number, control: TControl, options?: {
1121
1125
  emitEvent?: boolean;
@@ -1131,6 +1135,8 @@ declare class FormArray<TControl extends AbstractControl<any> = any> extends Abs
1131
1135
  * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
1132
1136
  * `valueChanges` observables emit events with the latest status and value when the control is
1133
1137
  * removed. When false, no events are emitted.
1138
+ *
1139
+ * NOTE: Removing the FormArray will not mark it dirty. If you want to mark if dirty, call `markAsDirty()`.
1134
1140
  */
1135
1141
  removeAt(index: number, options?: {
1136
1142
  emitEvent?: boolean;
@@ -1345,6 +1351,8 @@ declare const UntypedFormArray: UntypedFormArrayCtor;
1345
1351
  * @description
1346
1352
  * Asserts that the given control is an instance of `FormArray`
1347
1353
  *
1354
+ * @see [Utility functions for narrowing form control types](guide/forms/reactive-forms#utility-functions-for-narrowing-form-control-types)
1355
+ *
1348
1356
  * @publicApi
1349
1357
  */
1350
1358
  declare const isFormArray: (control: unknown) => control is FormArray;
@@ -1695,6 +1703,8 @@ declare const UntypedFormControl: UntypedFormControlCtor;
1695
1703
  * @description
1696
1704
  * Asserts that the given control is an instance of `FormControl`
1697
1705
  *
1706
+ * @see [Utility functions for narrowing form control types](guide/forms/reactive-forms#utility-functions-for-narrowing-form-control-types)
1707
+ *
1698
1708
  * @publicApi
1699
1709
  */
1700
1710
  declare const isFormControl: (control: unknown) => control is FormControl;
@@ -2120,6 +2130,8 @@ declare const UntypedFormGroup: UntypedFormGroupCtor;
2120
2130
  * @description
2121
2131
  * Asserts that the given control is an instance of `FormGroup`
2122
2132
  *
2133
+ * @see [Utility functions for narrowing form control types](guide/forms/reactive-forms#utility-functions-for-narrowing-form-control-types)
2134
+ *
2123
2135
  * @publicApi
2124
2136
  */
2125
2137
  declare const isFormGroup: (control: unknown) => control is FormGroup;
@@ -2233,6 +2245,8 @@ interface FormRecord<TControl> {
2233
2245
  * @description
2234
2246
  * Asserts that the given control is an instance of `FormRecord`
2235
2247
  *
2248
+ * @see [Utility functions for narrowing form control types](guide/forms/reactive-forms#utility-functions-for-narrowing-form-control-types)
2249
+ *
2236
2250
  * @publicApi
2237
2251
  */
2238
2252
  declare const isFormRecord: (control: unknown) => control is FormRecord;
@@ -2269,6 +2283,8 @@ declare abstract class ControlEvent<T = any> {
2269
2283
  /**
2270
2284
  * Event fired when the value of a control changes.
2271
2285
  *
2286
+ * @see {@link AbstractControl.events}
2287
+ *
2272
2288
  * @publicApi
2273
2289
  */
2274
2290
  declare class ValueChangeEvent<T> extends ControlEvent<T> {
@@ -2279,6 +2295,8 @@ declare class ValueChangeEvent<T> extends ControlEvent<T> {
2279
2295
  /**
2280
2296
  * Event fired when the control's pristine state changes (pristine <=> dirty).
2281
2297
  *
2298
+ * @see {@link AbstractControl.events}
2299
+ *
2282
2300
  * @publicApi */
2283
2301
  declare class PristineChangeEvent extends ControlEvent {
2284
2302
  readonly pristine: boolean;
@@ -2288,6 +2306,8 @@ declare class PristineChangeEvent extends ControlEvent {
2288
2306
  /**
2289
2307
  * Event fired when the control's touched status changes (touched <=> untouched).
2290
2308
  *
2309
+ * @see {@link AbstractControl.events}
2310
+ *
2291
2311
  * @publicApi
2292
2312
  */
2293
2313
  declare class TouchedChangeEvent extends ControlEvent {
@@ -2298,6 +2318,8 @@ declare class TouchedChangeEvent extends ControlEvent {
2298
2318
  /**
2299
2319
  * Event fired when the control's status changes.
2300
2320
  *
2321
+ * @see {@link AbstractControl.events}
2322
+ *
2301
2323
  * @publicApi
2302
2324
  */
2303
2325
  declare class StatusChangeEvent extends ControlEvent {
@@ -2308,6 +2330,8 @@ declare class StatusChangeEvent extends ControlEvent {
2308
2330
  /**
2309
2331
  * Event fired when a form is submitted
2310
2332
  *
2333
+ * @see {@link AbstractControl.events}
2334
+ *
2311
2335
  * @publicApi
2312
2336
  */
2313
2337
  declare class FormSubmittedEvent extends ControlEvent {
@@ -2317,6 +2341,8 @@ declare class FormSubmittedEvent extends ControlEvent {
2317
2341
  /**
2318
2342
  * Event fired when a form is reset.
2319
2343
  *
2344
+ * @see {@link AbstractControl.events}
2345
+ *
2320
2346
  * @publicApi
2321
2347
  */
2322
2348
  declare class FormResetEvent extends ControlEvent {
@@ -2635,6 +2661,7 @@ declare abstract class AbstractControl<TValue = any, TRawValue extends TValue =
2635
2661
  * `events` of the parent control instead.
2636
2662
  * For other event types, the events are emitted after the parent control has been updated.
2637
2663
  *
2664
+ * @see [Unified control state change events](guide/forms/reactive-forms#unified-control-state-change-events)
2638
2665
  */
2639
2666
  readonly events: Observable<ControlEvent<TValue>>;
2640
2667
  /**
@@ -4063,7 +4090,7 @@ type SetDisabledStateOption = 'whenDisabledForLegacyCode' | 'always';
4063
4090
  *
4064
4091
  * To inspect the properties of the associated `FormControl` (like the validity state),
4065
4092
  * export the directive into a local template variable using `ngModel` as the key (ex:
4066
- * `#myVar="ngModel"`). You can then access the control using the directive's `control` property.
4093
+ * `#myVar="ngModel"`). You can then access the control using the directive's `field` property.
4067
4094
  * However, the most commonly used properties (like `valid` and `dirty`) also exist on the control
4068
4095
  * for direct access. See a full list of properties directly available in
4069
4096
  * `AbstractControlDirective`.