@angular/forms 15.0.0-next.5 → 15.0.0-next.6

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 (35) 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 +13 -7
  7. package/esm2020/src/directives/ng_model.mjs +13 -7
  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 +13 -7
  14. package/esm2020/src/directives/reactive_directives/form_control_name.mjs +3 -3
  15. package/esm2020/src/directives/reactive_directives/form_group_directive.mjs +14 -8
  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/shared.mjs +19 -5
  20. package/esm2020/src/directives/validators.mjs +27 -27
  21. package/esm2020/src/directives.mjs +6 -5
  22. package/esm2020/src/form_builder.mjs +9 -9
  23. package/esm2020/src/form_providers.mjs +37 -10
  24. package/esm2020/src/forms.mjs +4 -4
  25. package/esm2020/src/model/abstract_model.mjs +6 -1
  26. package/esm2020/src/model/form_array.mjs +7 -1
  27. package/esm2020/src/model/form_control.mjs +7 -1
  28. package/esm2020/src/model/form_group.mjs +13 -1
  29. package/esm2020/src/version.mjs +1 -1
  30. package/fesm2015/forms.mjs +235 -140
  31. package/fesm2015/forms.mjs.map +1 -1
  32. package/fesm2020/forms.mjs +233 -140
  33. package/fesm2020/forms.mjs.map +1 -1
  34. package/index.d.ts +88 -14
  35. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.0-next.5
2
+ * @license Angular v15.0.0-next.6
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -70,9 +70,9 @@ class BaseControlValueAccessor {
70
70
  this.setProperty('disabled', isDisabled);
71
71
  }
72
72
  }
73
- BaseControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: BaseControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
74
- BaseControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: BaseControlValueAccessor, ngImport: i0 });
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: BaseControlValueAccessor, decorators: [{
73
+ BaseControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: BaseControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
74
+ BaseControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: BaseControlValueAccessor, ngImport: i0 });
75
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: BaseControlValueAccessor, decorators: [{
76
76
  type: Directive
77
77
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
78
78
  /**
@@ -86,9 +86,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
86
86
  */
87
87
  class BuiltInControlValueAccessor extends BaseControlValueAccessor {
88
88
  }
89
- BuiltInControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
90
- BuiltInControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: BuiltInControlValueAccessor, usesInheritance: true, ngImport: i0 });
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: BuiltInControlValueAccessor, decorators: [{
89
+ BuiltInControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
90
+ BuiltInControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: BuiltInControlValueAccessor, usesInheritance: true, ngImport: i0 });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: BuiltInControlValueAccessor, decorators: [{
92
92
  type: Directive
93
93
  }] });
94
94
  /**
@@ -144,9 +144,9 @@ class CheckboxControlValueAccessor extends BuiltInControlValueAccessor {
144
144
  this.setProperty('checked', value);
145
145
  }
146
146
  }
147
- CheckboxControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
148
- CheckboxControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]", host: { listeners: { "change": "onChange($event.target.checked)", "blur": "onTouched()" } }, providers: [CHECKBOX_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CheckboxControlValueAccessor, decorators: [{
147
+ CheckboxControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
148
+ CheckboxControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]", host: { listeners: { "change": "onChange($event.target.checked)", "blur": "onTouched()" } }, providers: [CHECKBOX_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: CheckboxControlValueAccessor, decorators: [{
150
150
  type: Directive,
151
151
  args: [{
152
152
  selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',
@@ -251,9 +251,9 @@ class DefaultValueAccessor extends BaseControlValueAccessor {
251
251
  this._compositionMode && this.onChange(value);
252
252
  }
253
253
  }
254
- DefaultValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DefaultValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: COMPOSITION_BUFFER_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
255
- DefaultValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]", host: { listeners: { "input": "$any(this)._handleInput($event.target.value)", "blur": "onTouched()", "compositionstart": "$any(this)._compositionStart()", "compositionend": "$any(this)._compositionEnd($event.target.value)" } }, providers: [DEFAULT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: DefaultValueAccessor, decorators: [{
254
+ DefaultValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: DefaultValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: COMPOSITION_BUFFER_MODE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
255
+ DefaultValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]", host: { listeners: { "input": "$any(this)._handleInput($event.target.value)", "blur": "onTouched()", "compositionstart": "$any(this)._compositionStart()", "compositionend": "$any(this)._compositionEnd($event.target.value)" } }, providers: [DEFAULT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: DefaultValueAccessor, decorators: [{
257
257
  type: Directive,
258
258
  args: [{
259
259
  selector: 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',
@@ -1382,9 +1382,9 @@ class NgControlStatus extends AbstractControlStatus {
1382
1382
  super(cd);
1383
1383
  }
1384
1384
  }
1385
- NgControlStatus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive });
1386
- NgControlStatus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgControlStatus, selector: "[formControlName],[ngModel],[formControl]", host: { properties: { "class.ng-untouched": "isUntouched", "class.ng-touched": "isTouched", "class.ng-pristine": "isPristine", "class.ng-dirty": "isDirty", "class.ng-valid": "isValid", "class.ng-invalid": "isInvalid", "class.ng-pending": "isPending" } }, usesInheritance: true, ngImport: i0 });
1387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgControlStatus, decorators: [{
1385
+ NgControlStatus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive });
1386
+ NgControlStatus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: NgControlStatus, selector: "[formControlName],[ngModel],[formControl]", host: { properties: { "class.ng-untouched": "isUntouched", "class.ng-touched": "isTouched", "class.ng-pristine": "isPristine", "class.ng-dirty": "isDirty", "class.ng-valid": "isValid", "class.ng-invalid": "isInvalid", "class.ng-pending": "isPending" } }, usesInheritance: true, ngImport: i0 });
1387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgControlStatus, decorators: [{
1388
1388
  type: Directive,
1389
1389
  args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost }]
1390
1390
  }], ctorParameters: function () { return [{ type: NgControl, decorators: [{
@@ -1407,9 +1407,9 @@ class NgControlStatusGroup extends AbstractControlStatus {
1407
1407
  super(cd);
1408
1408
  }
1409
1409
  }
1410
- NgControlStatusGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgControlStatusGroup, deps: [{ token: ControlContainer, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
1411
- NgControlStatusGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]", host: { properties: { "class.ng-untouched": "isUntouched", "class.ng-touched": "isTouched", "class.ng-pristine": "isPristine", "class.ng-dirty": "isDirty", "class.ng-valid": "isValid", "class.ng-invalid": "isInvalid", "class.ng-pending": "isPending", "class.ng-submitted": "isSubmitted" } }, usesInheritance: true, ngImport: i0 });
1412
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgControlStatusGroup, decorators: [{
1410
+ NgControlStatusGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgControlStatusGroup, deps: [{ token: ControlContainer, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
1411
+ NgControlStatusGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]", host: { properties: { "class.ng-untouched": "isUntouched", "class.ng-touched": "isTouched", "class.ng-pristine": "isPristine", "class.ng-dirty": "isDirty", "class.ng-valid": "isValid", "class.ng-invalid": "isInvalid", "class.ng-pending": "isPending", "class.ng-submitted": "isSubmitted" } }, usesInheritance: true, ngImport: i0 });
1412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgControlStatusGroup, decorators: [{
1413
1413
  type: Directive,
1414
1414
  args: [{
1415
1415
  selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',
@@ -2290,6 +2290,11 @@ class AbstractControl {
2290
2290
  *
2291
2291
  * Calling `setErrors` also updates the validity of the parent control.
2292
2292
  *
2293
+ * @param opts Configuration options that determine how the control propagates
2294
+ * changes and emits events after the control errors are set.
2295
+ * * `emitEvent`: When true or not supplied (the default), the `statusChanges`
2296
+ * observable emits an event after the errors are set.
2297
+ *
2293
2298
  * @usageNotes
2294
2299
  *
2295
2300
  * ### Manually set the errors for a control
@@ -2938,6 +2943,12 @@ class FormGroup extends AbstractControl {
2938
2943
  }
2939
2944
  }
2940
2945
  const UntypedFormGroup = FormGroup;
2946
+ /**
2947
+ * @description
2948
+ * Asserts that the given control is an instance of `FormGroup`
2949
+ *
2950
+ * @publicApi
2951
+ */
2941
2952
  const isFormGroup = (control) => control instanceof FormGroup;
2942
2953
  /**
2943
2954
  * Tracks the value and validity state of a collection of `FormControl` instances, each of which has
@@ -2960,6 +2971,12 @@ const isFormGroup = (control) => control instanceof FormGroup;
2960
2971
  */
2961
2972
  class FormRecord extends FormGroup {
2962
2973
  }
2974
+ /**
2975
+ * @description
2976
+ * Asserts that the given control is an instance of `FormRecord`
2977
+ *
2978
+ * @publicApi
2979
+ */
2963
2980
  const isFormRecord = (control) => control instanceof FormRecord;
2964
2981
 
2965
2982
  /**
@@ -2969,6 +2986,17 @@ const isFormRecord = (control) => control instanceof FormRecord;
2969
2986
  * Use of this source code is governed by an MIT-style license that can be
2970
2987
  * found in the LICENSE file at https://angular.io/license
2971
2988
  */
2989
+ /**
2990
+ * Token to provide to allow SetDisabledState to always be called when a CVA is added, regardless of
2991
+ * whether the control is disabled or enabled.
2992
+ *
2993
+ * @see `FormsModule.withConfig`
2994
+ */
2995
+ const CALL_SET_DISABLED_STATE = new InjectionToken('CallSetDisabledState', { providedIn: 'root', factory: () => setDisabledStateDefault });
2996
+ /**
2997
+ * Whether to use the fixed setDisabledState behavior by default.
2998
+ */
2999
+ const setDisabledStateDefault = 'always';
2972
3000
  function controlPath(name, parent) {
2973
3001
  return [...parent.path, name];
2974
3002
  }
@@ -2979,7 +3007,7 @@ function controlPath(name, parent) {
2979
3007
  * @param control Form control instance that should be linked.
2980
3008
  * @param dir Directive that should be linked with a given control.
2981
3009
  */
2982
- function setUpControl(control, dir) {
3010
+ function setUpControl(control, dir, callSetDisabledState = setDisabledStateDefault) {
2983
3011
  if (typeof ngDevMode === 'undefined' || ngDevMode) {
2984
3012
  if (!control)
2985
3013
  _throwError(dir, 'Cannot find control with');
@@ -2988,8 +3016,11 @@ function setUpControl(control, dir) {
2988
3016
  }
2989
3017
  setUpValidators(control, dir);
2990
3018
  dir.valueAccessor.writeValue(control.value);
2991
- if (control.disabled) {
2992
- dir.valueAccessor.setDisabledState?.(true);
3019
+ // The legacy behavior only calls the CVA's `setDisabledState` if the control is disabled.
3020
+ // If the `callSetDisabledState` option is set to `always`, then this bug is fixed and
3021
+ // the method is always called.
3022
+ if (control.disabled || callSetDisabledState === 'always') {
3023
+ dir.valueAccessor.setDisabledState?.(control.disabled);
2993
3024
  }
2994
3025
  setUpViewChangePipeline(control, dir);
2995
3026
  setUpModelChangePipeline(control, dir);
@@ -3363,8 +3394,9 @@ const resolvedPromise$1 = (() => Promise.resolve())();
3363
3394
  * @publicApi
3364
3395
  */
3365
3396
  class NgForm extends ControlContainer {
3366
- constructor(validators, asyncValidators) {
3397
+ constructor(validators, asyncValidators, callSetDisabledState) {
3367
3398
  super();
3399
+ this.callSetDisabledState = callSetDisabledState;
3368
3400
  /**
3369
3401
  * @description
3370
3402
  * Returns whether the form submission has been triggered.
@@ -3424,7 +3456,7 @@ class NgForm extends ControlContainer {
3424
3456
  const container = this._findContainer(dir.path);
3425
3457
  dir.control =
3426
3458
  container.registerControl(dir.name, dir.control);
3427
- setUpControl(dir.control, dir);
3459
+ setUpControl(dir.control, dir, this.callSetDisabledState);
3428
3460
  dir.control.updateValueAndValidity({ emitEvent: false });
3429
3461
  this._directives.add(dir);
3430
3462
  });
@@ -3554,9 +3586,9 @@ class NgForm extends ControlContainer {
3554
3586
  return path.length ? this.form.get(path) : this.form;
3555
3587
  }
3556
3588
  }
3557
- NgForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgForm, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
3558
- NgForm.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: { options: ["ngFormOptions", "options"] }, outputs: { ngSubmit: "ngSubmit" }, host: { listeners: { "submit": "onSubmit($event)", "reset": "onReset()" } }, providers: [formDirectiveProvider$1], exportAs: ["ngForm"], usesInheritance: true, ngImport: i0 });
3559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgForm, decorators: [{
3589
+ NgForm.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgForm, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
3590
+ NgForm.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: { options: ["ngFormOptions", "options"] }, outputs: { ngSubmit: "ngSubmit" }, host: { listeners: { "submit": "onSubmit($event)", "reset": "onReset()" } }, providers: [formDirectiveProvider$1], exportAs: ["ngForm"], usesInheritance: true, ngImport: i0 });
3591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgForm, decorators: [{
3560
3592
  type: Directive,
3561
3593
  args: [{
3562
3594
  selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',
@@ -3579,6 +3611,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
3579
3611
  }, {
3580
3612
  type: Inject,
3581
3613
  args: [NG_ASYNC_VALIDATORS]
3614
+ }] }, { type: undefined, decorators: [{
3615
+ type: Optional
3616
+ }, {
3617
+ type: Inject,
3618
+ args: [CALL_SET_DISABLED_STATE]
3582
3619
  }] }]; }, propDecorators: { options: [{
3583
3620
  type: Input,
3584
3621
  args: ['ngFormOptions']
@@ -3709,6 +3746,12 @@ const FormControl = (class FormControl extends AbstractControl {
3709
3746
  }
3710
3747
  });
3711
3748
  const UntypedFormControl = FormControl;
3749
+ /**
3750
+ * @description
3751
+ * Asserts that the given control is an instance of `FormControl`
3752
+ *
3753
+ * @publicApi
3754
+ */
3712
3755
  const isFormControl = (control) => control instanceof FormControl;
3713
3756
 
3714
3757
  /**
@@ -3762,9 +3805,9 @@ class AbstractFormGroupDirective extends ControlContainer {
3762
3805
  /** @internal */
3763
3806
  _checkParentType() { }
3764
3807
  }
3765
- AbstractFormGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3766
- AbstractFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: AbstractFormGroupDirective, usesInheritance: true, ngImport: i0 });
3767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: AbstractFormGroupDirective, decorators: [{
3808
+ AbstractFormGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3809
+ AbstractFormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: AbstractFormGroupDirective, usesInheritance: true, ngImport: i0 });
3810
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: AbstractFormGroupDirective, decorators: [{
3768
3811
  type: Directive
3769
3812
  }] });
3770
3813
 
@@ -3872,9 +3915,9 @@ class NgModelGroup extends AbstractFormGroupDirective {
3872
3915
  }
3873
3916
  }
3874
3917
  }
3875
- NgModelGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgModelGroup, deps: [{ token: ControlContainer, host: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
3876
- NgModelGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgModelGroup, selector: "[ngModelGroup]", inputs: { name: ["ngModelGroup", "name"] }, providers: [modelGroupProvider], exportAs: ["ngModelGroup"], usesInheritance: true, ngImport: i0 });
3877
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgModelGroup, decorators: [{
3918
+ NgModelGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgModelGroup, deps: [{ token: ControlContainer, host: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
3919
+ NgModelGroup.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: NgModelGroup, selector: "[ngModelGroup]", inputs: { name: ["ngModelGroup", "name"] }, providers: [modelGroupProvider], exportAs: ["ngModelGroup"], usesInheritance: true, ngImport: i0 });
3920
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgModelGroup, decorators: [{
3878
3921
  type: Directive,
3879
3922
  args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' }]
3880
3923
  }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{
@@ -4015,9 +4058,10 @@ const resolvedPromise = (() => Promise.resolve())();
4015
4058
  * @publicApi
4016
4059
  */
4017
4060
  class NgModel extends NgControl {
4018
- constructor(parent, validators, asyncValidators, valueAccessors, _changeDetectorRef) {
4061
+ constructor(parent, validators, asyncValidators, valueAccessors, _changeDetectorRef, callSetDisabledState) {
4019
4062
  super();
4020
4063
  this._changeDetectorRef = _changeDetectorRef;
4064
+ this.callSetDisabledState = callSetDisabledState;
4021
4065
  this.control = new FormControl();
4022
4066
  /** @internal */
4023
4067
  this._registered = false;
@@ -4100,7 +4144,7 @@ class NgModel extends NgControl {
4100
4144
  return !this._parent || !!(this.options && this.options.standalone);
4101
4145
  }
4102
4146
  _setUpStandalone() {
4103
- setUpControl(this.control, this);
4147
+ setUpControl(this.control, this, this.callSetDisabledState);
4104
4148
  this.control.updateValueAndValidity({ emitEvent: false });
4105
4149
  }
4106
4150
  _checkForErrors() {
@@ -4151,9 +4195,9 @@ class NgModel extends NgControl {
4151
4195
  return this._parent ? controlPath(controlName, this._parent) : [controlName];
4152
4196
  }
4153
4197
  }
4154
- NgModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgModel, deps: [{ token: ControlContainer, host: true, optional: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: ChangeDetectorRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4155
- NgModel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: { name: "name", isDisabled: ["disabled", "isDisabled"], model: ["ngModel", "model"], options: ["ngModelOptions", "options"] }, outputs: { update: "ngModelChange" }, providers: [formControlBinding$1], exportAs: ["ngModel"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
4156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgModel, decorators: [{
4198
+ NgModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgModel, deps: [{ token: ControlContainer, host: true, optional: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: ChangeDetectorRef, optional: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4199
+ NgModel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: { name: "name", isDisabled: ["disabled", "isDisabled"], model: ["ngModel", "model"], options: ["ngModelOptions", "options"] }, outputs: { update: "ngModelChange" }, providers: [formControlBinding$1], exportAs: ["ngModel"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
4200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgModel, decorators: [{
4157
4201
  type: Directive,
4158
4202
  args: [{
4159
4203
  selector: '[ngModel]:not([formControlName]):not([formControl])',
@@ -4190,6 +4234,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4190
4234
  }, {
4191
4235
  type: Inject,
4192
4236
  args: [ChangeDetectorRef]
4237
+ }] }, { type: undefined, decorators: [{
4238
+ type: Optional
4239
+ }, {
4240
+ type: Inject,
4241
+ args: [CALL_SET_DISABLED_STATE]
4193
4242
  }] }]; }, propDecorators: { name: [{
4194
4243
  type: Input
4195
4244
  }], isDisabled: [{
@@ -4232,9 +4281,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4232
4281
  */
4233
4282
  class ɵNgNoValidate {
4234
4283
  }
4235
- ɵNgNoValidate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4236
- ɵNgNoValidate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])", host: { attributes: { "novalidate": "" } }, ngImport: i0 });
4237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵNgNoValidate, decorators: [{
4284
+ ɵNgNoValidate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4285
+ ɵNgNoValidate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])", host: { attributes: { "novalidate": "" } }, ngImport: i0 });
4286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ɵNgNoValidate, decorators: [{
4238
4287
  type: Directive,
4239
4288
  args: [{
4240
4289
  selector: 'form:not([ngNoForm]):not([ngNativeValidate])',
@@ -4298,9 +4347,9 @@ class NumberValueAccessor extends BuiltInControlValueAccessor {
4298
4347
  };
4299
4348
  }
4300
4349
  }
4301
- NumberValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
4302
- NumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]", host: { listeners: { "input": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [NUMBER_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
4303
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NumberValueAccessor, decorators: [{
4350
+ NumberValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
4351
+ NumberValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]", host: { listeners: { "input": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [NUMBER_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
4352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NumberValueAccessor, decorators: [{
4304
4353
  type: Directive,
4305
4354
  args: [{
4306
4355
  selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',
@@ -4335,10 +4384,10 @@ function throwNameError() {
4335
4384
  */
4336
4385
  class RadioControlRegistryModule {
4337
4386
  }
4338
- RadioControlRegistryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlRegistryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4339
- RadioControlRegistryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlRegistryModule });
4340
- RadioControlRegistryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlRegistryModule });
4341
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlRegistryModule, decorators: [{
4387
+ RadioControlRegistryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlRegistryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4388
+ RadioControlRegistryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlRegistryModule });
4389
+ RadioControlRegistryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlRegistryModule });
4390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlRegistryModule, decorators: [{
4342
4391
  type: NgModule
4343
4392
  }] });
4344
4393
  /**
@@ -4386,9 +4435,9 @@ class RadioControlRegistry {
4386
4435
  controlPair[1].name === accessor.name;
4387
4436
  }
4388
4437
  }
4389
- RadioControlRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4390
- RadioControlRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlRegistry, providedIn: RadioControlRegistryModule });
4391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlRegistry, decorators: [{
4438
+ RadioControlRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4439
+ RadioControlRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlRegistry, providedIn: RadioControlRegistryModule });
4440
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlRegistry, decorators: [{
4392
4441
  type: Injectable,
4393
4442
  args: [{ providedIn: RadioControlRegistryModule }]
4394
4443
  }] });
@@ -4472,9 +4521,9 @@ class RadioControlValueAccessor extends BuiltInControlValueAccessor {
4472
4521
  this.name = this.formControlName;
4473
4522
  }
4474
4523
  }
4475
- RadioControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: RadioControlRegistry }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
4476
- RadioControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: { name: "name", formControlName: "formControlName", value: "value" }, host: { listeners: { "change": "onChange()", "blur": "onTouched()" } }, providers: [RADIO_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
4477
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RadioControlValueAccessor, decorators: [{
4524
+ RadioControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: RadioControlRegistry }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
4525
+ RadioControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: { name: "name", formControlName: "formControlName", value: "value" }, host: { listeners: { "change": "onChange()", "blur": "onTouched()" } }, providers: [RADIO_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
4526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RadioControlValueAccessor, decorators: [{
4478
4527
  type: Directive,
4479
4528
  args: [{
4480
4529
  selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',
@@ -4543,9 +4592,9 @@ class RangeValueAccessor extends BuiltInControlValueAccessor {
4543
4592
  };
4544
4593
  }
4545
4594
  }
4546
- RangeValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
4547
- RangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]", host: { listeners: { "change": "onChange($event.target.value)", "input": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [RANGE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
4548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RangeValueAccessor, decorators: [{
4595
+ RangeValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
4596
+ RangeValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]", host: { listeners: { "change": "onChange($event.target.value)", "input": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [RANGE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
4597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RangeValueAccessor, decorators: [{
4549
4598
  type: Directive,
4550
4599
  args: [{
4551
4600
  selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',
@@ -4596,9 +4645,10 @@ const formControlBinding = {
4596
4645
  * @publicApi
4597
4646
  */
4598
4647
  class FormControlDirective extends NgControl {
4599
- constructor(validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {
4648
+ constructor(validators, asyncValidators, valueAccessors, _ngModelWarningConfig, callSetDisabledState) {
4600
4649
  super();
4601
4650
  this._ngModelWarningConfig = _ngModelWarningConfig;
4651
+ this.callSetDisabledState = callSetDisabledState;
4602
4652
  /** @deprecated as of v6 */
4603
4653
  this.update = new EventEmitter();
4604
4654
  /**
@@ -4629,7 +4679,7 @@ class FormControlDirective extends NgControl {
4629
4679
  if (previousForm) {
4630
4680
  cleanUpControl(previousForm, this, /* validateControlPresenceOnChange */ false);
4631
4681
  }
4632
- setUpControl(this.form, this);
4682
+ setUpControl(this.form, this, this.callSetDisabledState);
4633
4683
  this.form.updateValueAndValidity({ emitEvent: false });
4634
4684
  }
4635
4685
  if (isPropertyUpdated(changes, this.viewModel)) {
@@ -4683,9 +4733,9 @@ class FormControlDirective extends NgControl {
4683
4733
  * @internal
4684
4734
  */
4685
4735
  FormControlDirective._ngModelWarningSentOnce = false;
4686
- FormControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormControlDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4687
- FormControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: FormControlDirective, selector: "[formControl]", inputs: { form: ["formControl", "form"], isDisabled: ["disabled", "isDisabled"], model: ["ngModel", "model"] }, outputs: { update: "ngModelChange" }, providers: [formControlBinding], exportAs: ["ngForm"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
4688
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormControlDirective, decorators: [{
4736
+ FormControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormControlDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4737
+ FormControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: FormControlDirective, selector: "[formControl]", inputs: { form: ["formControl", "form"], isDisabled: ["disabled", "isDisabled"], model: ["ngModel", "model"] }, outputs: { update: "ngModelChange" }, providers: [formControlBinding], exportAs: ["ngForm"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
4738
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormControlDirective, decorators: [{
4689
4739
  type: Directive,
4690
4740
  args: [{ selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm' }]
4691
4741
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -4714,6 +4764,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
4714
4764
  }, {
4715
4765
  type: Inject,
4716
4766
  args: [NG_MODEL_WITH_FORM_CONTROL_WARNING]
4767
+ }] }, { type: undefined, decorators: [{
4768
+ type: Optional
4769
+ }, {
4770
+ type: Inject,
4771
+ args: [CALL_SET_DISABLED_STATE]
4717
4772
  }] }]; }, propDecorators: { form: [{
4718
4773
  type: Input,
4719
4774
  args: ['formControl']
@@ -4764,8 +4819,9 @@ const formDirectiveProvider = {
4764
4819
  * @publicApi
4765
4820
  */
4766
4821
  class FormGroupDirective extends ControlContainer {
4767
- constructor(validators, asyncValidators) {
4822
+ constructor(validators, asyncValidators, callSetDisabledState) {
4768
4823
  super();
4824
+ this.callSetDisabledState = callSetDisabledState;
4769
4825
  /**
4770
4826
  * @description
4771
4827
  * Reports whether the form submission has been triggered.
@@ -4850,7 +4906,7 @@ class FormGroupDirective extends ControlContainer {
4850
4906
  */
4851
4907
  addControl(dir) {
4852
4908
  const ctrl = this.form.get(dir.path);
4853
- setUpControl(ctrl, dir);
4909
+ setUpControl(ctrl, dir, this.callSetDisabledState);
4854
4910
  ctrl.updateValueAndValidity({ emitEvent: false });
4855
4911
  this.directives.push(dir);
4856
4912
  return ctrl;
@@ -4984,7 +5040,7 @@ class FormGroupDirective extends ControlContainer {
4984
5040
  // taken care of in the `removeControl` method invoked when corresponding `formControlName`
4985
5041
  // directive instance is being removed (invoked from `FormControlName.ngOnDestroy`).
4986
5042
  if (isFormControl(newCtrl)) {
4987
- setUpControl(newCtrl, dir);
5043
+ setUpControl(newCtrl, dir, this.callSetDisabledState);
4988
5044
  dir.control = newCtrl;
4989
5045
  }
4990
5046
  }
@@ -5030,9 +5086,9 @@ class FormGroupDirective extends ControlContainer {
5030
5086
  }
5031
5087
  }
5032
5088
  }
5033
- FormGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormGroupDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
5034
- FormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: FormGroupDirective, selector: "[formGroup]", inputs: { form: ["formGroup", "form"] }, outputs: { ngSubmit: "ngSubmit" }, host: { listeners: { "submit": "onSubmit($event)", "reset": "onReset()" } }, providers: [formDirectiveProvider], exportAs: ["ngForm"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
5035
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormGroupDirective, decorators: [{
5089
+ FormGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormGroupDirective, deps: [{ token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: CALL_SET_DISABLED_STATE, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5090
+ FormGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: FormGroupDirective, selector: "[formGroup]", inputs: { form: ["formGroup", "form"] }, outputs: { ngSubmit: "ngSubmit" }, host: { listeners: { "submit": "onSubmit($event)", "reset": "onReset()" } }, providers: [formDirectiveProvider], exportAs: ["ngForm"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
5091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormGroupDirective, decorators: [{
5036
5092
  type: Directive,
5037
5093
  args: [{
5038
5094
  selector: '[formGroup]',
@@ -5054,6 +5110,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
5054
5110
  }, {
5055
5111
  type: Inject,
5056
5112
  args: [NG_ASYNC_VALIDATORS]
5113
+ }] }, { type: undefined, decorators: [{
5114
+ type: Optional
5115
+ }, {
5116
+ type: Inject,
5117
+ args: [CALL_SET_DISABLED_STATE]
5057
5118
  }] }]; }, propDecorators: { form: [{
5058
5119
  type: Input,
5059
5120
  args: ['formGroup']
@@ -5133,9 +5194,9 @@ class FormGroupName extends AbstractFormGroupDirective {
5133
5194
  }
5134
5195
  }
5135
5196
  }
5136
- FormGroupName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormGroupName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
5137
- FormGroupName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: FormGroupName, selector: "[formGroupName]", inputs: { name: ["formGroupName", "name"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 });
5138
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormGroupName, decorators: [{
5197
+ FormGroupName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormGroupName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
5198
+ FormGroupName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: FormGroupName, selector: "[formGroupName]", inputs: { name: ["formGroupName", "name"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 });
5199
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormGroupName, decorators: [{
5139
5200
  type: Directive,
5140
5201
  args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] }]
5141
5202
  }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{
@@ -5243,9 +5304,9 @@ class FormArrayName extends ControlContainer {
5243
5304
  }
5244
5305
  }
5245
5306
  }
5246
- FormArrayName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormArrayName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
5247
- FormArrayName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: FormArrayName, selector: "[formArrayName]", inputs: { name: ["formArrayName", "name"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 });
5248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormArrayName, decorators: [{
5307
+ FormArrayName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormArrayName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
5308
+ FormArrayName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: FormArrayName, selector: "[formArrayName]", inputs: { name: ["formArrayName", "name"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 });
5309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormArrayName, decorators: [{
5249
5310
  type: Directive,
5250
5311
  args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] }]
5251
5312
  }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{
@@ -5421,9 +5482,9 @@ class FormControlName extends NgControl {
5421
5482
  * @internal
5422
5483
  */
5423
5484
  FormControlName._ngModelWarningSentOnce = false;
5424
- FormControlName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormControlName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5425
- FormControlName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: FormControlName, selector: "[formControlName]", inputs: { name: ["formControlName", "name"], isDisabled: ["disabled", "isDisabled"], model: ["ngModel", "model"] }, outputs: { update: "ngModelChange" }, providers: [controlNameBinding], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
5426
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormControlName, decorators: [{
5485
+ FormControlName.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormControlName, deps: [{ token: ControlContainer, host: true, optional: true, skipSelf: true }, { token: NG_VALIDATORS, optional: true, self: true }, { token: NG_ASYNC_VALIDATORS, optional: true, self: true }, { token: NG_VALUE_ACCESSOR, optional: true, self: true }, { token: NG_MODEL_WITH_FORM_CONTROL_WARNING, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5486
+ FormControlName.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: FormControlName, selector: "[formControlName]", inputs: { name: ["formControlName", "name"], isDisabled: ["disabled", "isDisabled"], model: ["ngModel", "model"] }, outputs: { update: "ngModelChange" }, providers: [controlNameBinding], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
5487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormControlName, decorators: [{
5427
5488
  type: Directive,
5428
5489
  args: [{ selector: '[formControlName]', providers: [controlNameBinding] }]
5429
5490
  }], ctorParameters: function () { return [{ type: ControlContainer, decorators: [{
@@ -5608,9 +5669,9 @@ class SelectControlValueAccessor extends BuiltInControlValueAccessor {
5608
5669
  return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;
5609
5670
  }
5610
5671
  }
5611
- SelectControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5612
- SelectControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: { compareWith: "compareWith" }, host: { listeners: { "change": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [SELECT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
5613
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: SelectControlValueAccessor, decorators: [{
5672
+ SelectControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5673
+ SelectControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: { compareWith: "compareWith" }, host: { listeners: { "change": "onChange($event.target.value)", "blur": "onTouched()" } }, providers: [SELECT_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
5674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: SelectControlValueAccessor, decorators: [{
5614
5675
  type: Directive,
5615
5676
  args: [{
5616
5677
  selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',
@@ -5672,9 +5733,9 @@ class NgSelectOption {
5672
5733
  }
5673
5734
  }
5674
5735
  }
5675
- NgSelectOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSelectOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5676
- NgSelectOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: NgSelectOption, selector: "option", inputs: { ngValue: "ngValue", value: "value" }, ngImport: i0 });
5677
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NgSelectOption, decorators: [{
5736
+ NgSelectOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgSelectOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5737
+ NgSelectOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: NgSelectOption, selector: "option", inputs: { ngValue: "ngValue", value: "value" }, ngImport: i0 });
5738
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NgSelectOption, decorators: [{
5678
5739
  type: Directive,
5679
5740
  args: [{ selector: 'option' }]
5680
5741
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectControlValueAccessor, decorators: [{
@@ -5846,9 +5907,9 @@ class SelectMultipleControlValueAccessor extends BuiltInControlValueAccessor {
5846
5907
  return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;
5847
5908
  }
5848
5909
  }
5849
- SelectMultipleControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5850
- SelectMultipleControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: { compareWith: "compareWith" }, host: { listeners: { "change": "onChange($event.target)", "blur": "onTouched()" } }, providers: [SELECT_MULTIPLE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
5851
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: SelectMultipleControlValueAccessor, decorators: [{
5910
+ SelectMultipleControlValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
5911
+ SelectMultipleControlValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: { compareWith: "compareWith" }, host: { listeners: { "change": "onChange($event.target)", "blur": "onTouched()" } }, providers: [SELECT_MULTIPLE_VALUE_ACCESSOR], usesInheritance: true, ngImport: i0 });
5912
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: SelectMultipleControlValueAccessor, decorators: [{
5852
5913
  type: Directive,
5853
5914
  args: [{
5854
5915
  selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',
@@ -5920,9 +5981,9 @@ class ɵNgSelectMultipleOption {
5920
5981
  }
5921
5982
  }
5922
5983
  }
5923
- ɵNgSelectMultipleOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵNgSelectMultipleOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectMultipleControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5924
- ɵNgSelectMultipleOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: ɵNgSelectMultipleOption, selector: "option", inputs: { ngValue: "ngValue", value: "value" }, ngImport: i0 });
5925
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵNgSelectMultipleOption, decorators: [{
5984
+ ɵNgSelectMultipleOption.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ɵNgSelectMultipleOption, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SelectMultipleControlValueAccessor, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5985
+ ɵNgSelectMultipleOption.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: ɵNgSelectMultipleOption, selector: "option", inputs: { ngValue: "ngValue", value: "value" }, ngImport: i0 });
5986
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ɵNgSelectMultipleOption, decorators: [{
5926
5987
  type: Directive,
5927
5988
  args: [{ selector: 'option' }]
5928
5989
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectMultipleControlValueAccessor, decorators: [{
@@ -6002,9 +6063,9 @@ class AbstractValidatorDirective {
6002
6063
  return input != null /* both `null` and `undefined` */;
6003
6064
  }
6004
6065
  }
6005
- AbstractValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6006
- AbstractValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 });
6007
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: AbstractValidatorDirective, decorators: [{
6066
+ AbstractValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6067
+ AbstractValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 });
6068
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: AbstractValidatorDirective, decorators: [{
6008
6069
  type: Directive
6009
6070
  }] });
6010
6071
  /**
@@ -6048,9 +6109,9 @@ class MaxValidator extends AbstractValidatorDirective {
6048
6109
  this.createValidator = (max) => maxValidator(max);
6049
6110
  }
6050
6111
  }
6051
- MaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6052
- MaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: { max: "max" }, host: { properties: { "attr.max": "_enabled ? max : null" } }, providers: [MAX_VALIDATOR], usesInheritance: true, ngImport: i0 });
6053
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: MaxValidator, decorators: [{
6112
+ MaxValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6113
+ MaxValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: { max: "max" }, host: { properties: { "attr.max": "_enabled ? max : null" } }, providers: [MAX_VALIDATOR], usesInheritance: true, ngImport: i0 });
6114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: MaxValidator, decorators: [{
6054
6115
  type: Directive,
6055
6116
  args: [{
6056
6117
  selector: 'input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]',
@@ -6101,9 +6162,9 @@ class MinValidator extends AbstractValidatorDirective {
6101
6162
  this.createValidator = (min) => minValidator(min);
6102
6163
  }
6103
6164
  }
6104
- MinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6105
- MinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: { min: "min" }, host: { properties: { "attr.min": "_enabled ? min : null" } }, providers: [MIN_VALIDATOR], usesInheritance: true, ngImport: i0 });
6106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: MinValidator, decorators: [{
6165
+ MinValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6166
+ MinValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: { min: "min" }, host: { properties: { "attr.min": "_enabled ? min : null" } }, providers: [MIN_VALIDATOR], usesInheritance: true, ngImport: i0 });
6167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: MinValidator, decorators: [{
6107
6168
  type: Directive,
6108
6169
  args: [{
6109
6170
  selector: 'input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]',
@@ -6165,9 +6226,9 @@ class RequiredValidator extends AbstractValidatorDirective {
6165
6226
  return input;
6166
6227
  }
6167
6228
  }
6168
- RequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6169
- RequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: { required: "required" }, host: { properties: { "attr.required": "_enabled ? \"\" : null" } }, providers: [REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
6170
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: RequiredValidator, decorators: [{
6229
+ RequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6230
+ RequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: { required: "required" }, host: { properties: { "attr.required": "_enabled ? \"\" : null" } }, providers: [REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
6231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: RequiredValidator, decorators: [{
6171
6232
  type: Directive,
6172
6233
  args: [{
6173
6234
  selector: ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',
@@ -6205,9 +6266,9 @@ class CheckboxRequiredValidator extends RequiredValidator {
6205
6266
  this.createValidator = (input) => requiredTrueValidator;
6206
6267
  }
6207
6268
  }
6208
- CheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6209
- CheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]", host: { properties: { "attr.required": "_enabled ? \"\" : null" } }, providers: [CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
6210
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: CheckboxRequiredValidator, decorators: [{
6269
+ CheckboxRequiredValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6270
+ CheckboxRequiredValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]", host: { properties: { "attr.required": "_enabled ? \"\" : null" } }, providers: [CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 });
6271
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: CheckboxRequiredValidator, decorators: [{
6211
6272
  type: Directive,
6212
6273
  args: [{
6213
6274
  selector: 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',
@@ -6266,9 +6327,9 @@ class EmailValidator extends AbstractValidatorDirective {
6266
6327
  return input;
6267
6328
  }
6268
6329
  }
6269
- EmailValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6270
- EmailValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: { email: "email" }, providers: [EMAIL_VALIDATOR], usesInheritance: true, ngImport: i0 });
6271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: EmailValidator, decorators: [{
6330
+ EmailValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6331
+ EmailValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: { email: "email" }, providers: [EMAIL_VALIDATOR], usesInheritance: true, ngImport: i0 });
6332
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: EmailValidator, decorators: [{
6272
6333
  type: Directive,
6273
6334
  args: [{
6274
6335
  selector: '[email][formControlName],[email][formControl],[email][ngModel]',
@@ -6318,9 +6379,9 @@ class MinLengthValidator extends AbstractValidatorDirective {
6318
6379
  this.createValidator = (minlength) => minLengthValidator(minlength);
6319
6380
  }
6320
6381
  }
6321
- MinLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6322
- MinLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: { minlength: "minlength" }, host: { properties: { "attr.minlength": "_enabled ? minlength : null" } }, providers: [MIN_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });
6323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: MinLengthValidator, decorators: [{
6382
+ MinLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6383
+ MinLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: { minlength: "minlength" }, host: { properties: { "attr.minlength": "_enabled ? minlength : null" } }, providers: [MIN_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });
6384
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: MinLengthValidator, decorators: [{
6324
6385
  type: Directive,
6325
6386
  args: [{
6326
6387
  selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',
@@ -6371,9 +6432,9 @@ class MaxLengthValidator extends AbstractValidatorDirective {
6371
6432
  this.createValidator = (maxlength) => maxLengthValidator(maxlength);
6372
6433
  }
6373
6434
  }
6374
- MaxLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6375
- MaxLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: { maxlength: "maxlength" }, host: { properties: { "attr.maxlength": "_enabled ? maxlength : null" } }, providers: [MAX_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });
6376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: MaxLengthValidator, decorators: [{
6435
+ MaxLengthValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6436
+ MaxLengthValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: { maxlength: "maxlength" }, host: { properties: { "attr.maxlength": "_enabled ? maxlength : null" } }, providers: [MAX_LENGTH_VALIDATOR], usesInheritance: true, ngImport: i0 });
6437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: MaxLengthValidator, decorators: [{
6377
6438
  type: Directive,
6378
6439
  args: [{
6379
6440
  selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',
@@ -6426,9 +6487,9 @@ class PatternValidator extends AbstractValidatorDirective {
6426
6487
  this.createValidator = (input) => patternValidator(input);
6427
6488
  }
6428
6489
  }
6429
- PatternValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6430
- PatternValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.5", type: PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: { pattern: "pattern" }, host: { properties: { "attr.pattern": "_enabled ? pattern : null" } }, providers: [PATTERN_VALIDATOR], usesInheritance: true, ngImport: i0 });
6431
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: PatternValidator, decorators: [{
6490
+ PatternValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive });
6491
+ PatternValidator.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.0-next.6", type: PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: { pattern: "pattern" }, host: { properties: { "attr.pattern": "_enabled ? pattern : null" } }, providers: [PATTERN_VALIDATOR], usesInheritance: true, ngImport: i0 });
6492
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: PatternValidator, decorators: [{
6432
6493
  type: Directive,
6433
6494
  args: [{
6434
6495
  selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',
@@ -6475,8 +6536,8 @@ const REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, Fo
6475
6536
  */
6476
6537
  class ɵInternalFormsSharedModule {
6477
6538
  }
6478
- ɵInternalFormsSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6479
- ɵInternalFormsSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵInternalFormsSharedModule, declarations: [ɵNgNoValidate,
6539
+ ɵInternalFormsSharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6540
+ ɵInternalFormsSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.6", ngImport: i0, type: ɵInternalFormsSharedModule, declarations: [ɵNgNoValidate,
6480
6541
  NgSelectOption,
6481
6542
  ɵNgSelectMultipleOption,
6482
6543
  DefaultValueAccessor,
@@ -6515,8 +6576,8 @@ class ɵInternalFormsSharedModule {
6515
6576
  EmailValidator,
6516
6577
  MinValidator,
6517
6578
  MaxValidator] });
6518
- ɵInternalFormsSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵInternalFormsSharedModule, imports: [RadioControlRegistryModule] });
6519
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ɵInternalFormsSharedModule, decorators: [{
6579
+ ɵInternalFormsSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ɵInternalFormsSharedModule, imports: [RadioControlRegistryModule] });
6580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ɵInternalFormsSharedModule, decorators: [{
6520
6581
  type: NgModule,
6521
6582
  args: [{
6522
6583
  declarations: SHARED_FORM_DIRECTIVES,
@@ -6545,11 +6606,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
6545
6606
  * @publicApi
6546
6607
  */
6547
6608
  class FormsModule {
6609
+ /**
6610
+ * @description
6611
+ * Provides options for configuring the forms module.
6612
+ *
6613
+ * @param opts An object of configuration options
6614
+ * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more
6615
+ * correct, or to only call it `whenDisabled`, which is the legacy behavior.
6616
+ */
6617
+ static withConfig(opts) {
6618
+ return {
6619
+ ngModule: FormsModule,
6620
+ providers: [{
6621
+ provide: CALL_SET_DISABLED_STATE,
6622
+ useValue: opts.callSetDisabledState ?? setDisabledStateDefault
6623
+ }]
6624
+ };
6625
+ }
6548
6626
  }
6549
- FormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6550
- FormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] });
6551
- FormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] });
6552
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormsModule, decorators: [{
6627
+ FormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6628
+ FormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] });
6629
+ FormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] });
6630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormsModule, decorators: [{
6553
6631
  type: NgModule,
6554
6632
  args: [{
6555
6633
  declarations: TEMPLATE_DRIVEN_DIRECTIVES,
@@ -6577,20 +6655,29 @@ class ReactiveFormsModule {
6577
6655
  * @param opts An object of configuration options
6578
6656
  * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`
6579
6657
  * binding is used with reactive form directives.
6658
+ * * `callSetDisabledState` Configures whether to `always` call `setDisabledState`, which is more
6659
+ * correct, or to only call it `whenDisabled`, which is the legacy behavior.
6580
6660
  */
6581
6661
  static withConfig(opts) {
6582
6662
  return {
6583
6663
  ngModule: ReactiveFormsModule,
6584
6664
  providers: [
6585
- { provide: NG_MODEL_WITH_FORM_CONTROL_WARNING, useValue: opts.warnOnNgModelWithFormControl }
6665
+ {
6666
+ provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,
6667
+ useValue: opts.warnOnNgModelWithFormControl ?? 'always'
6668
+ },
6669
+ {
6670
+ provide: CALL_SET_DISABLED_STATE,
6671
+ useValue: opts.callSetDisabledState ?? setDisabledStateDefault
6672
+ }
6586
6673
  ]
6587
6674
  };
6588
6675
  }
6589
6676
  }
6590
- ReactiveFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6591
- ReactiveFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.5", ngImport: i0, type: ReactiveFormsModule, declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName] });
6592
- ReactiveFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] });
6593
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: ReactiveFormsModule, decorators: [{
6677
+ ReactiveFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6678
+ ReactiveFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.0-next.6", ngImport: i0, type: ReactiveFormsModule, declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName] });
6679
+ ReactiveFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] });
6680
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: ReactiveFormsModule, decorators: [{
6594
6681
  type: NgModule,
6595
6682
  args: [{
6596
6683
  declarations: [REACTIVE_DRIVEN_DIRECTIVES],
@@ -7050,6 +7137,12 @@ class FormArray extends AbstractControl {
7050
7137
  }
7051
7138
  }
7052
7139
  const UntypedFormArray = FormArray;
7140
+ /**
7141
+ * @description
7142
+ * Asserts that the given control is an instance of `FormArray`
7143
+ *
7144
+ * @publicApi
7145
+ */
7053
7146
  const isFormArray = (control) => control instanceof FormArray;
7054
7147
 
7055
7148
  /**
@@ -7251,9 +7344,9 @@ class FormBuilder {
7251
7344
  }
7252
7345
  }
7253
7346
  }
7254
- FormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7255
- FormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormBuilder, providedIn: ReactiveFormsModule });
7256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: FormBuilder, decorators: [{
7347
+ FormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7348
+ FormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormBuilder, providedIn: ReactiveFormsModule });
7349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: FormBuilder, decorators: [{
7257
7350
  type: Injectable,
7258
7351
  args: [{ providedIn: ReactiveFormsModule }]
7259
7352
  }] });
@@ -7266,9 +7359,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
7266
7359
  */
7267
7360
  class NonNullableFormBuilder {
7268
7361
  }
7269
- NonNullableFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7270
- NonNullableFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NonNullableFormBuilder, providedIn: ReactiveFormsModule, useFactory: () => inject(FormBuilder).nonNullable });
7271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: NonNullableFormBuilder, decorators: [{
7362
+ NonNullableFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7363
+ NonNullableFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NonNullableFormBuilder, providedIn: ReactiveFormsModule, useFactory: () => inject(FormBuilder).nonNullable });
7364
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: NonNullableFormBuilder, decorators: [{
7272
7365
  type: Injectable,
7273
7366
  args: [{
7274
7367
  providedIn: ReactiveFormsModule,
@@ -7295,9 +7388,9 @@ class UntypedFormBuilder extends FormBuilder {
7295
7388
  return super.array(controlsConfig, validatorOrOpts, asyncValidator);
7296
7389
  }
7297
7390
  }
7298
- UntypedFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
7299
- UntypedFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UntypedFormBuilder, providedIn: ReactiveFormsModule });
7300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5", ngImport: i0, type: UntypedFormBuilder, decorators: [{
7391
+ UntypedFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
7392
+ UntypedFormBuilder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: UntypedFormBuilder, providedIn: ReactiveFormsModule });
7393
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.6", ngImport: i0, type: UntypedFormBuilder, decorators: [{
7301
7394
  type: Injectable,
7302
7395
  args: [{ providedIn: ReactiveFormsModule }]
7303
7396
  }] });
@@ -7312,7 +7405,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0-next.5",
7312
7405
  /**
7313
7406
  * @publicApi
7314
7407
  */
7315
- const VERSION = new Version('15.0.0-next.5');
7408
+ const VERSION = new Version('15.0.0-next.6');
7316
7409
 
7317
7410
  /**
7318
7411
  * @license
@@ -7343,5 +7436,5 @@ const VERSION = new Version('15.0.0-next.5');
7343
7436
  * Generated bundle index. Do not edit.
7344
7437
  */
7345
7438
 
7346
- export { AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormRecord, FormsModule, MaxLengthValidator, MaxValidator, MinLengthValidator, MinValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NonNullableFormBuilder, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, VERSION, Validators, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption };
7439
+ export { AbstractControl, AbstractControlDirective, AbstractFormGroupDirective, COMPOSITION_BUFFER_MODE, CheckboxControlValueAccessor, CheckboxRequiredValidator, ControlContainer, DefaultValueAccessor, EmailValidator, FormArray, FormArrayName, FormBuilder, FormControl, FormControlDirective, FormControlName, FormGroup, FormGroupDirective, FormGroupName, FormRecord, FormsModule, MaxLengthValidator, MaxValidator, MinLengthValidator, MinValidator, NG_ASYNC_VALIDATORS, NG_VALIDATORS, NG_VALUE_ACCESSOR, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, NgSelectOption, NonNullableFormBuilder, NumberValueAccessor, PatternValidator, RadioControlValueAccessor, RangeValueAccessor, ReactiveFormsModule, RequiredValidator, SelectControlValueAccessor, SelectMultipleControlValueAccessor, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, VERSION, Validators, isFormArray, isFormControl, isFormGroup, isFormRecord, ɵInternalFormsSharedModule, ɵNgNoValidate, ɵNgSelectMultipleOption };
7347
7440
  //# sourceMappingURL=forms.mjs.map