@angular/forms 15.0.0 → 15.0.1

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.
Files changed (30) hide show
  1. package/esm2020/src/directives/abstract_form_group_directive.mjs +3 -3
  2. package/esm2020/src/directives/checkbox_value_accessor.mjs +3 -3
  3. package/esm2020/src/directives/control_value_accessor.mjs +6 -6
  4. package/esm2020/src/directives/default_value_accessor.mjs +3 -3
  5. package/esm2020/src/directives/ng_control_status.mjs +6 -6
  6. package/esm2020/src/directives/ng_form.mjs +3 -3
  7. package/esm2020/src/directives/ng_model.mjs +3 -3
  8. package/esm2020/src/directives/ng_model_group.mjs +3 -3
  9. package/esm2020/src/directives/ng_no_validate_directive.mjs +3 -3
  10. package/esm2020/src/directives/number_value_accessor.mjs +3 -3
  11. package/esm2020/src/directives/radio_control_value_accessor.mjs +10 -10
  12. package/esm2020/src/directives/range_value_accessor.mjs +3 -3
  13. package/esm2020/src/directives/reactive_directives/form_control_directive.mjs +3 -3
  14. package/esm2020/src/directives/reactive_directives/form_control_name.mjs +3 -3
  15. package/esm2020/src/directives/reactive_directives/form_group_directive.mjs +3 -3
  16. package/esm2020/src/directives/reactive_directives/form_group_name.mjs +6 -6
  17. package/esm2020/src/directives/select_control_value_accessor.mjs +6 -6
  18. package/esm2020/src/directives/select_multiple_control_value_accessor.mjs +6 -6
  19. package/esm2020/src/directives/validators.mjs +27 -27
  20. package/esm2020/src/directives.mjs +4 -4
  21. package/esm2020/src/form_builder.mjs +10 -10
  22. package/esm2020/src/form_providers.mjs +8 -8
  23. package/esm2020/src/model/abstract_model.mjs +25 -11
  24. package/esm2020/src/version.mjs +1 -1
  25. package/fesm2015/forms.mjs +150 -136
  26. package/fesm2015/forms.mjs.map +1 -1
  27. package/fesm2020/forms.mjs +150 -136
  28. package/fesm2020/forms.mjs.map +1 -1
  29. package/index.d.ts +24 -4
  30. package/package.json +4 -4
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.0
2
+ * @license Angular v15.0.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -263,7 +263,7 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
263
263
  * const minValidator = Validators.min(3);
264
264
  * const ctrl = new FormControl<string | null>('', minValidator);
265
265
  * expect(ctrl.hasValidator(minValidator)).toEqual(true)
266
- * expect(ctrl.hasValidator(Validators.min(3)).toEqual(false)
266
+ * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)
267
267
  *
268
268
  * ctrl.removeValidators(minValidator);
269
269
  * ```
@@ -303,7 +303,7 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
303
303
  * const minValidator = Validators.min(3);
304
304
  * const ctrl = new FormControl<number | null>(0, minValidator);
305
305
  * expect(ctrl.hasValidator(minValidator)).toEqual(true)
306
- * expect(ctrl.hasValidator(Validators.min(3)).toEqual(false)
306
+ * expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)
307
307
  * ```
308
308
  *
309
309
  * @param validator The validator to check for presence. Compared by function reference.
@@ -626,6 +626,18 @@ export declare abstract class AbstractControl<TValue = any, TRawValue extends TV
626
626
  */
627
627
  get root(): AbstractControl;
628
628
  private _calculateStatus;
629
+ /**
630
+ * Internal implementation of the `setValidators` method. Needs to be separated out into a
631
+ * different method, because it is called in the constructor and it can break cases where
632
+ * a control is extended.
633
+ */
634
+ private _assignValidators;
635
+ /**
636
+ * Internal implementation of the `setAsyncValidators` method. Needs to be separated out into a
637
+ * different method, because it is called in the constructor and it can break cases where
638
+ * a control is extended.
639
+ */
640
+ private _assignAsyncValidators;
629
641
  }
630
642
 
631
643
  /**
@@ -4290,6 +4302,14 @@ export declare class PatternValidator extends AbstractValidatorDirective {
4290
4302
  static ɵdir: i0.ɵɵDirectiveDeclaration<PatternValidator, "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", never, { "pattern": "pattern"; }, {}, never, never, false, never>;
4291
4303
  }
4292
4304
 
4305
+ /**
4306
+ * Helper type to allow the compiler to accept [XXXX, { updateOn: string }] as a valid shorthand
4307
+ * argument for .group()
4308
+ */
4309
+ declare interface PermissiveAbstractControlOptions extends Omit<AbstractControlOptions, 'updateOn'> {
4310
+ updateOn?: string;
4311
+ }
4312
+
4293
4313
  /**
4294
4314
  * The compiler may not always be able to prove that the elements of the control config are a tuple
4295
4315
  * (i.e. occur in a fixed order). This slightly looser type is used for inference, to catch cases
@@ -5165,7 +5185,7 @@ T
5165
5185
  T
5166
5186
  ] extends [FormControlState<infer U>] ? FormControl<U | N> : [
5167
5187
  T
5168
- ] extends [PermissiveControlConfig<infer U>] ? FormControl<Exclude<U, ValidatorConfig> | N> : FormControl<T | N>;
5188
+ ] extends [PermissiveControlConfig<infer U>] ? FormControl<Exclude<U, ValidatorConfig | PermissiveAbstractControlOptions> | N> : FormControl<T | N>;
5169
5189
 
5170
5190
  /**
5171
5191
  * FormArrayRawValue extracts the type of `.getRawValue()` from a FormArray's element type, and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/forms",
3
- "version": "15.0.0",
3
+ "version": "15.0.1",
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": "15.0.0",
15
- "@angular/common": "15.0.0",
16
- "@angular/platform-browser": "15.0.0",
14
+ "@angular/core": "15.0.1",
15
+ "@angular/common": "15.0.1",
16
+ "@angular/platform-browser": "15.0.1",
17
17
  "rxjs": "^6.5.3 || ^7.4.0"
18
18
  },
19
19
  "repository": {