@angular/forms 18.0.0-next.4 → 18.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.
- package/esm2022/src/directives/abstract_control_directive.mjs +2 -2
- package/esm2022/src/directives/abstract_form_group_directive.mjs +4 -4
- package/esm2022/src/directives/checkbox_value_accessor.mjs +6 -6
- package/esm2022/src/directives/control_container.mjs +1 -1
- package/esm2022/src/directives/control_value_accessor.mjs +7 -7
- package/esm2022/src/directives/default_value_accessor.mjs +9 -9
- package/esm2022/src/directives/form_interface.mjs +1 -1
- package/esm2022/src/directives/ng_control.mjs +1 -1
- package/esm2022/src/directives/ng_control_status.mjs +8 -8
- package/esm2022/src/directives/ng_form.mjs +11 -13
- package/esm2022/src/directives/ng_model.mjs +9 -9
- package/esm2022/src/directives/ng_model_group.mjs +8 -7
- package/esm2022/src/directives/ng_no_validate_directive.mjs +4 -4
- package/esm2022/src/directives/number_value_accessor.mjs +7 -7
- package/esm2022/src/directives/radio_control_value_accessor.mjs +17 -15
- package/esm2022/src/directives/range_value_accessor.mjs +8 -8
- package/esm2022/src/directives/reactive_directives/form_control_directive.mjs +7 -7
- package/esm2022/src/directives/reactive_directives/form_control_name.mjs +8 -8
- package/esm2022/src/directives/reactive_directives/form_group_directive.mjs +9 -9
- package/esm2022/src/directives/reactive_directives/form_group_name.mjs +13 -12
- package/esm2022/src/directives/reactive_errors.mjs +13 -4
- package/esm2022/src/directives/select_control_value_accessor.mjs +11 -11
- package/esm2022/src/directives/select_multiple_control_value_accessor.mjs +11 -11
- package/esm2022/src/directives/shared.mjs +5 -2
- package/esm2022/src/directives/template_driven_errors.mjs +2 -2
- package/esm2022/src/directives/validators.mjs +46 -46
- package/esm2022/src/directives.mjs +18 -12
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/form_builder.mjs +21 -18
- package/esm2022/src/form_providers.mjs +22 -20
- package/esm2022/src/forms.mjs +9 -9
- package/esm2022/src/model/abstract_model.mjs +13 -12
- package/esm2022/src/model/form_array.mjs +6 -6
- package/esm2022/src/model/form_control.mjs +13 -9
- package/esm2022/src/model/form_group.mjs +20 -14
- package/esm2022/src/validators.mjs +25 -23
- package/esm2022/src/version.mjs +1 -1
- package/fesm2022/forms.mjs +290 -252
- package/fesm2022/forms.mjs.map +1 -1
- package/index.d.ts +12 -18
- package/package.json +4 -4
package/fesm2022/forms.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-next.
|
|
2
|
+
* @license Angular v18.0.0-next.6
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -62,10 +62,10 @@ class BaseControlValueAccessor {
|
|
|
62
62
|
setDisabledState(isDisabled) {
|
|
63
63
|
this.setProperty('disabled', isDisabled);
|
|
64
64
|
}
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
66
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
65
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: BaseControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
66
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: BaseControlValueAccessor, ngImport: i0 }); }
|
|
67
67
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: BaseControlValueAccessor, decorators: [{
|
|
69
69
|
type: Directive
|
|
70
70
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }] });
|
|
71
71
|
/**
|
|
@@ -78,10 +78,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
78
78
|
* applications code.
|
|
79
79
|
*/
|
|
80
80
|
class BuiltInControlValueAccessor extends BaseControlValueAccessor {
|
|
81
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
82
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
81
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: BuiltInControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
82
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: BuiltInControlValueAccessor, usesInheritance: true, ngImport: i0 }); }
|
|
83
83
|
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: BuiltInControlValueAccessor, decorators: [{
|
|
85
85
|
type: Directive
|
|
86
86
|
}] });
|
|
87
87
|
/**
|
|
@@ -129,22 +129,22 @@ class CheckboxControlValueAccessor extends BuiltInControlValueAccessor {
|
|
|
129
129
|
writeValue(value) {
|
|
130
130
|
this.setProperty('checked', value);
|
|
131
131
|
}
|
|
132
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
133
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
132
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: CheckboxControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
133
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
134
134
|
}
|
|
135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: CheckboxControlValueAccessor, decorators: [{
|
|
136
136
|
type: Directive,
|
|
137
137
|
args: [{
|
|
138
138
|
selector: 'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',
|
|
139
139
|
host: { '(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()' },
|
|
140
|
-
providers: [CHECKBOX_VALUE_ACCESSOR]
|
|
140
|
+
providers: [CHECKBOX_VALUE_ACCESSOR],
|
|
141
141
|
}]
|
|
142
142
|
}] });
|
|
143
143
|
|
|
144
144
|
const DEFAULT_VALUE_ACCESSOR = {
|
|
145
145
|
provide: NG_VALUE_ACCESSOR,
|
|
146
146
|
useExisting: forwardRef(() => DefaultValueAccessor),
|
|
147
|
-
multi: true
|
|
147
|
+
multi: true,
|
|
148
148
|
};
|
|
149
149
|
/**
|
|
150
150
|
* We must check whether the agent is Android because composition events
|
|
@@ -229,10 +229,10 @@ class DefaultValueAccessor extends BaseControlValueAccessor {
|
|
|
229
229
|
this._composing = false;
|
|
230
230
|
this._compositionMode && this.onChange(value);
|
|
231
231
|
}
|
|
232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
233
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
232
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
233
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
234
234
|
}
|
|
235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: DefaultValueAccessor, decorators: [{
|
|
236
236
|
type: Directive,
|
|
237
237
|
args: [{
|
|
238
238
|
selector: 'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',
|
|
@@ -243,9 +243,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
243
243
|
'(input)': '$any(this)._handleInput($event.target.value)',
|
|
244
244
|
'(blur)': 'onTouched()',
|
|
245
245
|
'(compositionstart)': '$any(this)._compositionStart()',
|
|
246
|
-
'(compositionend)': '$any(this)._compositionEnd($event.target.value)'
|
|
246
|
+
'(compositionend)': '$any(this)._compositionEnd($event.target.value)',
|
|
247
247
|
},
|
|
248
|
-
providers: [DEFAULT_VALUE_ACCESSOR]
|
|
248
|
+
providers: [DEFAULT_VALUE_ACCESSOR],
|
|
249
249
|
}]
|
|
250
250
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
251
251
|
type: Optional
|
|
@@ -260,8 +260,7 @@ function isEmptyInputValue(value) {
|
|
|
260
260
|
* This avoids falsely rejecting objects that contain a custom length attribute.
|
|
261
261
|
* For example, the object {id: 1, length: 0, width: 0} should not be returned as empty.
|
|
262
262
|
*/
|
|
263
|
-
return value == null ||
|
|
264
|
-
((typeof value === 'string' || Array.isArray(value)) && value.length === 0);
|
|
263
|
+
return (value == null || ((typeof value === 'string' || Array.isArray(value)) && value.length === 0));
|
|
265
264
|
}
|
|
266
265
|
function hasValidLength(value) {
|
|
267
266
|
// non-strict comparison is intentional, to check for both `null` and `undefined` values
|
|
@@ -710,9 +709,9 @@ function minLengthValidator(minLength) {
|
|
|
710
709
|
// don't validate values without `length` property
|
|
711
710
|
return null;
|
|
712
711
|
}
|
|
713
|
-
return control.value.length < minLength
|
|
714
|
-
{ 'minlength': { 'requiredLength': minLength, 'actualLength': control.value.length } }
|
|
715
|
-
null;
|
|
712
|
+
return control.value.length < minLength
|
|
713
|
+
? { 'minlength': { 'requiredLength': minLength, 'actualLength': control.value.length } }
|
|
714
|
+
: null;
|
|
716
715
|
};
|
|
717
716
|
}
|
|
718
717
|
/**
|
|
@@ -721,9 +720,9 @@ function minLengthValidator(minLength) {
|
|
|
721
720
|
*/
|
|
722
721
|
function maxLengthValidator(maxLength) {
|
|
723
722
|
return (control) => {
|
|
724
|
-
return hasValidLength(control.value) && control.value.length > maxLength
|
|
725
|
-
{ 'maxlength': { 'requiredLength': maxLength, 'actualLength': control.value.length } }
|
|
726
|
-
null;
|
|
723
|
+
return hasValidLength(control.value) && control.value.length > maxLength
|
|
724
|
+
? { 'maxlength': { 'requiredLength': maxLength, 'actualLength': control.value.length } }
|
|
725
|
+
: null;
|
|
727
726
|
};
|
|
728
727
|
}
|
|
729
728
|
/**
|
|
@@ -753,8 +752,9 @@ function patternValidator(pattern) {
|
|
|
753
752
|
return null; // don't validate empty values to allow optional controls
|
|
754
753
|
}
|
|
755
754
|
const value = control.value;
|
|
756
|
-
return regex.test(value)
|
|
757
|
-
|
|
755
|
+
return regex.test(value)
|
|
756
|
+
? null
|
|
757
|
+
: { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
760
|
/**
|
|
@@ -768,7 +768,7 @@ function isPresent(o) {
|
|
|
768
768
|
}
|
|
769
769
|
function toObservable(value) {
|
|
770
770
|
const obs = ɵisPromise(value) ? from(value) : value;
|
|
771
|
-
if ((typeof ngDevMode === 'undefined' || ngDevMode) &&
|
|
771
|
+
if ((typeof ngDevMode === 'undefined' || ngDevMode) && !ɵisSubscribable(obs)) {
|
|
772
772
|
let errorMessage = `Expected async validator to return Promise or Observable.`;
|
|
773
773
|
// A synchronous validator will return object or null.
|
|
774
774
|
if (typeof value === 'object') {
|
|
@@ -787,7 +787,7 @@ function mergeErrors(arrayOfErrors) {
|
|
|
787
787
|
return Object.keys(res).length === 0 ? null : res;
|
|
788
788
|
}
|
|
789
789
|
function executeValidators(control, validators) {
|
|
790
|
-
return validators.map(validator => validator(control));
|
|
790
|
+
return validators.map((validator) => validator(control));
|
|
791
791
|
}
|
|
792
792
|
function isValidatorFn(validator) {
|
|
793
793
|
return !validator.validate;
|
|
@@ -801,10 +801,10 @@ function isValidatorFn(validator) {
|
|
|
801
801
|
* as well as represented as a validator class.
|
|
802
802
|
*/
|
|
803
803
|
function normalizeValidators(validators) {
|
|
804
|
-
return validators.map(validator => {
|
|
805
|
-
return isValidatorFn(validator)
|
|
806
|
-
validator
|
|
807
|
-
((c) => validator.validate(c));
|
|
804
|
+
return validators.map((validator) => {
|
|
805
|
+
return isValidatorFn(validator)
|
|
806
|
+
? validator
|
|
807
|
+
: ((c) => validator.validate(c));
|
|
808
808
|
});
|
|
809
809
|
}
|
|
810
810
|
/**
|
|
@@ -850,8 +850,9 @@ function composeAsync(validators) {
|
|
|
850
850
|
* them into a single validator function.
|
|
851
851
|
*/
|
|
852
852
|
function composeAsyncValidators(validators) {
|
|
853
|
-
return validators != null
|
|
854
|
-
|
|
853
|
+
return validators != null
|
|
854
|
+
? composeAsync(normalizeValidators(validators))
|
|
855
|
+
: null;
|
|
855
856
|
}
|
|
856
857
|
/**
|
|
857
858
|
* Merges raw control validators with a given directive validator and returns the combined list of
|
|
@@ -860,8 +861,9 @@ function composeAsyncValidators(validators) {
|
|
|
860
861
|
function mergeValidators(controlValidators, dirValidator) {
|
|
861
862
|
if (controlValidators === null)
|
|
862
863
|
return [dirValidator];
|
|
863
|
-
return Array.isArray(controlValidators)
|
|
864
|
-
[controlValidators, dirValidator]
|
|
864
|
+
return Array.isArray(controlValidators)
|
|
865
|
+
? [...controlValidators, dirValidator]
|
|
866
|
+
: [controlValidators, dirValidator];
|
|
865
867
|
}
|
|
866
868
|
/**
|
|
867
869
|
* Retrieves the list of raw synchronous validators attached to a given control.
|
|
@@ -919,7 +921,7 @@ function addValidators(validators, currentValidators) {
|
|
|
919
921
|
return current;
|
|
920
922
|
}
|
|
921
923
|
function removeValidators(validators, currentValidators) {
|
|
922
|
-
return makeValidatorsArray(currentValidators).filter(v => !hasValidator(validators, v));
|
|
924
|
+
return makeValidatorsArray(currentValidators).filter((v) => !hasValidator(validators, v));
|
|
923
925
|
}
|
|
924
926
|
|
|
925
927
|
/**
|
|
@@ -1117,7 +1119,7 @@ class AbstractControlDirective {
|
|
|
1117
1119
|
* @internal
|
|
1118
1120
|
*/
|
|
1119
1121
|
_invokeOnDestroyCallbacks() {
|
|
1120
|
-
this._onDestroyCallbacks.forEach(fn => fn());
|
|
1122
|
+
this._onDestroyCallbacks.forEach((fn) => fn());
|
|
1121
1123
|
this._onDestroyCallbacks = [];
|
|
1122
1124
|
}
|
|
1123
1125
|
/**
|
|
@@ -1322,10 +1324,10 @@ class NgControlStatus extends AbstractControlStatus {
|
|
|
1322
1324
|
constructor(cd) {
|
|
1323
1325
|
super(cd);
|
|
1324
1326
|
}
|
|
1325
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1326
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
1327
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NgControlStatus, deps: [{ token: NgControl, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1328
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
1327
1329
|
}
|
|
1328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NgControlStatus, decorators: [{
|
|
1329
1331
|
type: Directive,
|
|
1330
1332
|
args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost }]
|
|
1331
1333
|
}], ctorParameters: () => [{ type: NgControl, decorators: [{
|
|
@@ -1347,14 +1349,14 @@ class NgControlStatusGroup extends AbstractControlStatus {
|
|
|
1347
1349
|
constructor(cd) {
|
|
1348
1350
|
super(cd);
|
|
1349
1351
|
}
|
|
1350
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1351
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
1352
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NgControlStatusGroup, deps: [{ token: ControlContainer, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1353
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
1352
1354
|
}
|
|
1353
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
1355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NgControlStatusGroup, decorators: [{
|
|
1354
1356
|
type: Directive,
|
|
1355
1357
|
args: [{
|
|
1356
1358
|
selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',
|
|
1357
|
-
host: ngGroupStatusHost
|
|
1359
|
+
host: ngGroupStatusHost,
|
|
1358
1360
|
}]
|
|
1359
1361
|
}], ctorParameters: () => [{ type: ControlContainer, decorators: [{
|
|
1360
1362
|
type: Optional
|
|
@@ -1412,14 +1414,23 @@ const ngModelWithFormGroupExample = `
|
|
|
1412
1414
|
</div>
|
|
1413
1415
|
`;
|
|
1414
1416
|
|
|
1415
|
-
function controlParentException() {
|
|
1416
|
-
return new ɵRuntimeError(1050 /* RuntimeErrorCode.FORM_CONTROL_NAME_MISSING_PARENT */, `formControlName must be used with a parent formGroup directive.
|
|
1417
|
+
function controlParentException(nameOrIndex) {
|
|
1418
|
+
return new ɵRuntimeError(1050 /* RuntimeErrorCode.FORM_CONTROL_NAME_MISSING_PARENT */, `formControlName must be used with a parent formGroup directive. You'll want to add a formGroup
|
|
1417
1419
|
directive and pass it an existing FormGroup instance (you can create one in your class).
|
|
1418
1420
|
|
|
1421
|
+
${describeFormControl(nameOrIndex)}
|
|
1422
|
+
|
|
1419
1423
|
Example:
|
|
1420
1424
|
|
|
1421
1425
|
${formControlNameExample}`);
|
|
1422
1426
|
}
|
|
1427
|
+
function describeFormControl(nameOrIndex) {
|
|
1428
|
+
if (nameOrIndex == null || nameOrIndex === '') {
|
|
1429
|
+
return '';
|
|
1430
|
+
}
|
|
1431
|
+
const valueType = typeof nameOrIndex === 'string' ? 'name' : 'index';
|
|
1432
|
+
return `Affected Form Control ${valueType}: "${nameOrIndex}"`;
|
|
1433
|
+
}
|
|
1423
1434
|
function ngModelGroupException() {
|
|
1424
1435
|
return new ɵRuntimeError(1051 /* RuntimeErrorCode.FORM_CONTROL_NAME_INSIDE_MODEL_GROUP */, `formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents
|
|
1425
1436
|
that also have a "form" prefix: formGroupName, formArrayName, or formGroup.
|
|
@@ -1623,28 +1634,29 @@ function pickAsyncValidators(asyncValidator, validatorOrOpts) {
|
|
|
1623
1634
|
* Creates async validator function by combining provided async validators.
|
|
1624
1635
|
*/
|
|
1625
1636
|
function coerceToAsyncValidator(asyncValidator) {
|
|
1626
|
-
return Array.isArray(asyncValidator)
|
|
1627
|
-
asyncValidator
|
|
1637
|
+
return Array.isArray(asyncValidator)
|
|
1638
|
+
? composeAsyncValidators(asyncValidator)
|
|
1639
|
+
: asyncValidator || null;
|
|
1628
1640
|
}
|
|
1629
1641
|
function isOptionsObj(validatorOrOpts) {
|
|
1630
|
-
return validatorOrOpts != null &&
|
|
1631
|
-
|
|
1642
|
+
return (validatorOrOpts != null &&
|
|
1643
|
+
!Array.isArray(validatorOrOpts) &&
|
|
1644
|
+
typeof validatorOrOpts === 'object');
|
|
1632
1645
|
}
|
|
1633
1646
|
function assertControlPresent(parent, isGroup, key) {
|
|
1634
1647
|
const controls = parent.controls;
|
|
1635
1648
|
const collection = isGroup ? Object.keys(controls) : controls;
|
|
1636
1649
|
if (!collection.length) {
|
|
1637
|
-
throw new ɵRuntimeError(1000 /* RuntimeErrorCode.NO_CONTROLS */,
|
|
1650
|
+
throw new ɵRuntimeError(1000 /* RuntimeErrorCode.NO_CONTROLS */, typeof ngDevMode === 'undefined' || ngDevMode ? noControlsError(isGroup) : '');
|
|
1638
1651
|
}
|
|
1639
1652
|
if (!controls[key]) {
|
|
1640
|
-
throw new ɵRuntimeError(1001 /* RuntimeErrorCode.MISSING_CONTROL */,
|
|
1653
|
+
throw new ɵRuntimeError(1001 /* RuntimeErrorCode.MISSING_CONTROL */, typeof ngDevMode === 'undefined' || ngDevMode ? missingControlError(isGroup, key) : '');
|
|
1641
1654
|
}
|
|
1642
1655
|
}
|
|
1643
1656
|
function assertAllValuesPresent(control, isGroup, value) {
|
|
1644
1657
|
control._forEachChild((_, key) => {
|
|
1645
1658
|
if (value[key] === undefined) {
|
|
1646
|
-
throw new ɵRuntimeError(1002 /* RuntimeErrorCode.MISSING_CONTROL_VALUE */,
|
|
1647
|
-
'');
|
|
1659
|
+
throw new ɵRuntimeError(1002 /* RuntimeErrorCode.MISSING_CONTROL_VALUE */, typeof ngDevMode === 'undefined' || ngDevMode ? missingControlValueError(isGroup, key) : '');
|
|
1648
1660
|
}
|
|
1649
1661
|
});
|
|
1650
1662
|
}
|
|
@@ -1841,7 +1853,7 @@ class AbstractControl {
|
|
|
1841
1853
|
* Default value: `'change'`
|
|
1842
1854
|
*/
|
|
1843
1855
|
get updateOn() {
|
|
1844
|
-
return this._updateOn ? this._updateOn :
|
|
1856
|
+
return this._updateOn ? this._updateOn : this.parent ? this.parent.updateOn : 'change';
|
|
1845
1857
|
}
|
|
1846
1858
|
/**
|
|
1847
1859
|
* Sets the synchronous validators that are active on this control. Calling
|
|
@@ -2594,7 +2606,7 @@ class FormGroup extends AbstractControl {
|
|
|
2594
2606
|
// If `asyncValidator` is present, it will trigger control status change from `PENDING` to
|
|
2595
2607
|
// `VALID` or `INVALID`. The status should be broadcasted via the `statusChanges` observable,
|
|
2596
2608
|
// so we set `emitEvent` to `true` to allow that during the control creation process.
|
|
2597
|
-
emitEvent: !!this.asyncValidator
|
|
2609
|
+
emitEvent: !!this.asyncValidator,
|
|
2598
2610
|
});
|
|
2599
2611
|
}
|
|
2600
2612
|
registerControl(name, control) {
|
|
@@ -2626,14 +2638,14 @@ class FormGroup extends AbstractControl {
|
|
|
2626
2638
|
removeControl(name, options = {}) {
|
|
2627
2639
|
if (this.controls[name])
|
|
2628
2640
|
this.controls[name]._registerOnCollectionChange(() => { });
|
|
2629
|
-
delete
|
|
2641
|
+
delete this.controls[name];
|
|
2630
2642
|
this.updateValueAndValidity({ emitEvent: options.emitEvent });
|
|
2631
2643
|
this._onCollectionChange();
|
|
2632
2644
|
}
|
|
2633
2645
|
setControl(name, control, options = {}) {
|
|
2634
2646
|
if (this.controls[name])
|
|
2635
2647
|
this.controls[name]._registerOnCollectionChange(() => { });
|
|
2636
|
-
delete
|
|
2648
|
+
delete this.controls[name];
|
|
2637
2649
|
if (control)
|
|
2638
2650
|
this.registerControl(name, control);
|
|
2639
2651
|
this.updateValueAndValidity({ emitEvent: options.emitEvent });
|
|
@@ -2679,9 +2691,12 @@ class FormGroup extends AbstractControl {
|
|
|
2679
2691
|
*/
|
|
2680
2692
|
setValue(value, options = {}) {
|
|
2681
2693
|
assertAllValuesPresent(this, true, value);
|
|
2682
|
-
Object.keys(value).forEach(name => {
|
|
2694
|
+
Object.keys(value).forEach((name) => {
|
|
2683
2695
|
assertControlPresent(this, true, name);
|
|
2684
|
-
this.controls[name].setValue(value[name], {
|
|
2696
|
+
this.controls[name].setValue(value[name], {
|
|
2697
|
+
onlySelf: true,
|
|
2698
|
+
emitEvent: options.emitEvent,
|
|
2699
|
+
});
|
|
2685
2700
|
});
|
|
2686
2701
|
this.updateValueAndValidity(options);
|
|
2687
2702
|
}
|
|
@@ -2723,7 +2738,7 @@ class FormGroup extends AbstractControl {
|
|
|
2723
2738
|
// `undefined` as a value.
|
|
2724
2739
|
if (value == null /* both `null` and `undefined` */)
|
|
2725
2740
|
return;
|
|
2726
|
-
Object.keys(value).forEach(name => {
|
|
2741
|
+
Object.keys(value).forEach((name) => {
|
|
2727
2742
|
// The compiler cannot see through the uninstantiated conditional type of `this.controls`, so
|
|
2728
2743
|
// `as any` is required.
|
|
2729
2744
|
const control = this.controls[name];
|
|
@@ -2793,7 +2808,10 @@ class FormGroup extends AbstractControl {
|
|
|
2793
2808
|
*/
|
|
2794
2809
|
reset(value = {}, options = {}) {
|
|
2795
2810
|
this._forEachChild((control, name) => {
|
|
2796
|
-
control.reset(value ? value[name] : null, {
|
|
2811
|
+
control.reset(value ? value[name] : null, {
|
|
2812
|
+
onlySelf: true,
|
|
2813
|
+
emitEvent: options.emitEvent,
|
|
2814
|
+
});
|
|
2797
2815
|
});
|
|
2798
2816
|
this._updatePristine(options, this);
|
|
2799
2817
|
this._updateTouched(options, this);
|
|
@@ -2821,7 +2839,7 @@ class FormGroup extends AbstractControl {
|
|
|
2821
2839
|
}
|
|
2822
2840
|
/** @internal */
|
|
2823
2841
|
_forEachChild(cb) {
|
|
2824
|
-
Object.keys(this.controls).forEach(key => {
|
|
2842
|
+
Object.keys(this.controls).forEach((key) => {
|
|
2825
2843
|
// The list of controls can change (for ex. controls might be removed) while the loop
|
|
2826
2844
|
// is running (as a result of invoking Forms API in `valueChanges` subscription), so we
|
|
2827
2845
|
// have to null check before invoking the callback.
|
|
@@ -2878,9 +2896,9 @@ class FormGroup extends AbstractControl {
|
|
|
2878
2896
|
}
|
|
2879
2897
|
/** @internal */
|
|
2880
2898
|
_find(name) {
|
|
2881
|
-
return this.controls.hasOwnProperty(name)
|
|
2882
|
-
this.controls[name]
|
|
2883
|
-
null;
|
|
2899
|
+
return this.controls.hasOwnProperty(name)
|
|
2900
|
+
? this.controls[name]
|
|
2901
|
+
: null;
|
|
2884
2902
|
}
|
|
2885
2903
|
}
|
|
2886
2904
|
/**
|
|
@@ -2888,7 +2906,7 @@ class FormGroup extends AbstractControl {
|
|
|
2888
2906
|
* Throws other wise
|
|
2889
2907
|
*/
|
|
2890
2908
|
function validateFormGroupControls(controls) {
|
|
2891
|
-
const invalidKeys = Object.keys(controls).filter(key => key.includes('.'));
|
|
2909
|
+
const invalidKeys = Object.keys(controls).filter((key) => key.includes('.'));
|
|
2892
2910
|
if (invalidKeys.length > 0) {
|
|
2893
2911
|
// TODO: make this an error once there are no more uses in G3
|
|
2894
2912
|
console.warn(`FormGroup keys cannot include \`.\`, please replace the keys for: ${invalidKeys.join(',')}.`);
|
|
@@ -2937,7 +2955,10 @@ const isFormRecord = (control) => control instanceof FormRecord;
|
|
|
2937
2955
|
*
|
|
2938
2956
|
* @see {@link FormsModule#withconfig}
|
|
2939
2957
|
*/
|
|
2940
|
-
const CALL_SET_DISABLED_STATE = new InjectionToken('CallSetDisabledState', {
|
|
2958
|
+
const CALL_SET_DISABLED_STATE = new InjectionToken('CallSetDisabledState', {
|
|
2959
|
+
providedIn: 'root',
|
|
2960
|
+
factory: () => setDisabledStateDefault,
|
|
2961
|
+
});
|
|
2941
2962
|
/**
|
|
2942
2963
|
* Whether to use the fixed setDisabledState behavior by default.
|
|
2943
2964
|
*/
|
|
@@ -3268,7 +3289,7 @@ function _ngModelWarning(name, type, instance, warningConfig) {
|
|
|
3268
3289
|
|
|
3269
3290
|
const formDirectiveProvider$1 = {
|
|
3270
3291
|
provide: ControlContainer,
|
|
3271
|
-
useExisting: forwardRef(() => NgForm)
|
|
3292
|
+
useExisting: forwardRef(() => NgForm),
|
|
3272
3293
|
};
|
|
3273
3294
|
const resolvedPromise$1 = (() => Promise.resolve())();
|
|
3274
3295
|
/**
|
|
@@ -3350,8 +3371,7 @@ class NgForm extends ControlContainer {
|
|
|
3350
3371
|
* Event emitter for the "ngSubmit" event
|
|
3351
3372
|
*/
|
|
3352
3373
|
this.ngSubmit = new EventEmitter();
|
|
3353
|
-
this.form =
|
|
3354
|
-
new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));
|
|
3374
|
+
this.form = new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));
|
|
3355
3375
|
}
|
|
3356
3376
|
/** @nodoc */
|
|
3357
3377
|
ngAfterViewInit() {
|
|
@@ -3396,8 +3416,7 @@ class NgForm extends ControlContainer {
|
|
|
3396
3416
|
addControl(dir) {
|
|
3397
3417
|
resolvedPromise$1.then(() => {
|
|
3398
3418
|
const container = this._findContainer(dir.path);
|
|
3399
|
-
dir.control =
|
|
3400
|
-
container.registerControl(dir.name, dir.control);
|
|
3419
|
+
dir.control = (container.registerControl(dir.name, dir.control));
|
|
3401
3420
|
setUpControl(dir.control, dir, this.callSetDisabledState);
|
|
3402
3421
|
dir.control.updateValueAndValidity({ emitEvent: false });
|
|
3403
3422
|
this._directives.add(dir);
|
|
@@ -3527,17 +3546,17 @@ class NgForm extends ControlContainer {
|
|
|
3527
3546
|
path.pop();
|
|
3528
3547
|
return path.length ? this.form.get(path) : this.form;
|
|
3529
3548
|
}
|
|
3530
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3531
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
3549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
3550
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
3532
3551
|
}
|
|
3533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NgForm, decorators: [{
|
|
3534
3553
|
type: Directive,
|
|
3535
3554
|
args: [{
|
|
3536
3555
|
selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',
|
|
3537
3556
|
providers: [formDirectiveProvider$1],
|
|
3538
3557
|
host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },
|
|
3539
3558
|
outputs: ['ngSubmit'],
|
|
3540
|
-
exportAs: 'ngForm'
|
|
3559
|
+
exportAs: 'ngForm',
|
|
3541
3560
|
}]
|
|
3542
3561
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3543
3562
|
type: Optional
|
|
@@ -3570,10 +3589,13 @@ function removeListItem(list, el) {
|
|
|
3570
3589
|
}
|
|
3571
3590
|
|
|
3572
3591
|
function isFormControlState(formState) {
|
|
3573
|
-
return typeof formState === 'object' &&
|
|
3574
|
-
|
|
3592
|
+
return (typeof formState === 'object' &&
|
|
3593
|
+
formState !== null &&
|
|
3594
|
+
Object.keys(formState).length === 2 &&
|
|
3595
|
+
'value' in formState &&
|
|
3596
|
+
'disabled' in formState);
|
|
3575
3597
|
}
|
|
3576
|
-
const FormControl =
|
|
3598
|
+
const FormControl = class FormControl extends AbstractControl {
|
|
3577
3599
|
constructor(
|
|
3578
3600
|
// formState and defaultValue will only be null if T is nullable
|
|
3579
3601
|
formState = null, validatorOrOpts, asyncValidator) {
|
|
@@ -3593,7 +3615,7 @@ const FormControl = (class FormControl extends AbstractControl {
|
|
|
3593
3615
|
// `VALID` or `INVALID`.
|
|
3594
3616
|
// The status should be broadcasted via the `statusChanges` observable, so we set
|
|
3595
3617
|
// `emitEvent` to `true` to allow that during the control creation process.
|
|
3596
|
-
emitEvent: !!this.asyncValidator
|
|
3618
|
+
emitEvent: !!this.asyncValidator,
|
|
3597
3619
|
});
|
|
3598
3620
|
if (isOptionsObj(validatorOrOpts) &&
|
|
3599
3621
|
(validatorOrOpts.nonNullable || validatorOrOpts.initialValueIsDefault)) {
|
|
@@ -3665,14 +3687,15 @@ const FormControl = (class FormControl extends AbstractControl {
|
|
|
3665
3687
|
_applyFormState(formState) {
|
|
3666
3688
|
if (isFormControlState(formState)) {
|
|
3667
3689
|
this.value = this._pendingValue = formState.value;
|
|
3668
|
-
formState.disabled
|
|
3669
|
-
this.
|
|
3690
|
+
formState.disabled
|
|
3691
|
+
? this.disable({ onlySelf: true, emitEvent: false })
|
|
3692
|
+
: this.enable({ onlySelf: true, emitEvent: false });
|
|
3670
3693
|
}
|
|
3671
3694
|
else {
|
|
3672
3695
|
this.value = this._pendingValue = formState;
|
|
3673
3696
|
}
|
|
3674
3697
|
}
|
|
3675
|
-
}
|
|
3698
|
+
};
|
|
3676
3699
|
const UntypedFormControl = FormControl;
|
|
3677
3700
|
/**
|
|
3678
3701
|
* @description
|
|
@@ -3725,10 +3748,10 @@ class AbstractFormGroupDirective extends ControlContainer {
|
|
|
3725
3748
|
}
|
|
3726
3749
|
/** @internal */
|
|
3727
3750
|
_checkParentType() { }
|
|
3728
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3729
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
3751
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: AbstractFormGroupDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3752
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: AbstractFormGroupDirective, usesInheritance: true, ngImport: i0 }); }
|
|
3730
3753
|
}
|
|
3731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: AbstractFormGroupDirective, decorators: [{
|
|
3732
3755
|
type: Directive
|
|
3733
3756
|
}] });
|
|
3734
3757
|
|
|
@@ -3779,7 +3802,7 @@ function modelGroupParentException() {
|
|
|
3779
3802
|
|
|
3780
3803
|
const modelGroupProvider = {
|
|
3781
3804
|
provide: ControlContainer,
|
|
3782
|
-
useExisting: forwardRef(() => NgModelGroup)
|
|
3805
|
+
useExisting: forwardRef(() => NgModelGroup),
|
|
3783
3806
|
};
|
|
3784
3807
|
/**
|
|
3785
3808
|
* @description
|
|
@@ -3822,15 +3845,16 @@ class NgModelGroup extends AbstractFormGroupDirective {
|
|
|
3822
3845
|
}
|
|
3823
3846
|
/** @internal */
|
|
3824
3847
|
_checkParentType() {
|
|
3825
|
-
if (!(this._parent instanceof NgModelGroup) &&
|
|
3848
|
+
if (!(this._parent instanceof NgModelGroup) &&
|
|
3849
|
+
!(this._parent instanceof NgForm) &&
|
|
3826
3850
|
(typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
3827
3851
|
throw modelGroupParentException();
|
|
3828
3852
|
}
|
|
3829
3853
|
}
|
|
3830
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3831
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
3854
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
3855
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: NgModelGroup, selector: "[ngModelGroup]", inputs: { name: ["ngModelGroup", "name"] }, providers: [modelGroupProvider], exportAs: ["ngModelGroup"], usesInheritance: true, ngImport: i0 }); }
|
|
3832
3856
|
}
|
|
3833
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
3857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NgModelGroup, decorators: [{
|
|
3834
3858
|
type: Directive,
|
|
3835
3859
|
args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' }]
|
|
3836
3860
|
}], ctorParameters: () => [{ type: ControlContainer, decorators: [{
|
|
@@ -3858,7 +3882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
3858
3882
|
|
|
3859
3883
|
const formControlBinding$1 = {
|
|
3860
3884
|
provide: NgControl,
|
|
3861
|
-
useExisting: forwardRef(() => NgModel)
|
|
3885
|
+
useExisting: forwardRef(() => NgModel),
|
|
3862
3886
|
};
|
|
3863
3887
|
/**
|
|
3864
3888
|
* `ngModel` forces an additional change detection run when its inputs change:
|
|
@@ -4106,15 +4130,15 @@ class NgModel extends NgControl {
|
|
|
4106
4130
|
_getPath(controlName) {
|
|
4107
4131
|
return this._parent ? controlPath(controlName, this._parent) : [controlName];
|
|
4108
4132
|
}
|
|
4109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4110
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
4133
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
4134
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
4111
4135
|
}
|
|
4112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NgModel, decorators: [{
|
|
4113
4137
|
type: Directive,
|
|
4114
4138
|
args: [{
|
|
4115
4139
|
selector: '[ngModel]:not([formControlName]):not([formControl])',
|
|
4116
4140
|
providers: [formControlBinding$1],
|
|
4117
|
-
exportAs: 'ngModel'
|
|
4141
|
+
exportAs: 'ngModel',
|
|
4118
4142
|
}]
|
|
4119
4143
|
}], ctorParameters: () => [{ type: ControlContainer, decorators: [{
|
|
4120
4144
|
type: Optional
|
|
@@ -4185,10 +4209,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
4185
4209
|
* @ngModule FormsModule
|
|
4186
4210
|
*/
|
|
4187
4211
|
class ɵNgNoValidate {
|
|
4188
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4189
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
4212
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵNgNoValidate, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4213
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])", host: { attributes: { "novalidate": "" } }, ngImport: i0 }); }
|
|
4190
4214
|
}
|
|
4191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵNgNoValidate, decorators: [{
|
|
4192
4216
|
type: Directive,
|
|
4193
4217
|
args: [{
|
|
4194
4218
|
selector: 'form:not([ngNoForm]):not([ngNativeValidate])',
|
|
@@ -4199,7 +4223,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
4199
4223
|
const NUMBER_VALUE_ACCESSOR = {
|
|
4200
4224
|
provide: NG_VALUE_ACCESSOR,
|
|
4201
4225
|
useExisting: forwardRef(() => NumberValueAccessor),
|
|
4202
|
-
multi: true
|
|
4226
|
+
multi: true,
|
|
4203
4227
|
};
|
|
4204
4228
|
/**
|
|
4205
4229
|
* @description
|
|
@@ -4244,22 +4268,22 @@ class NumberValueAccessor extends BuiltInControlValueAccessor {
|
|
|
4244
4268
|
fn(value == '' ? null : parseFloat(value));
|
|
4245
4269
|
};
|
|
4246
4270
|
}
|
|
4247
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4248
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
4271
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NumberValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4272
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
4249
4273
|
}
|
|
4250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NumberValueAccessor, decorators: [{
|
|
4251
4275
|
type: Directive,
|
|
4252
4276
|
args: [{
|
|
4253
4277
|
selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',
|
|
4254
4278
|
host: { '(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },
|
|
4255
|
-
providers: [NUMBER_VALUE_ACCESSOR]
|
|
4279
|
+
providers: [NUMBER_VALUE_ACCESSOR],
|
|
4256
4280
|
}]
|
|
4257
4281
|
}] });
|
|
4258
4282
|
|
|
4259
4283
|
const RADIO_VALUE_ACCESSOR = {
|
|
4260
4284
|
provide: NG_VALUE_ACCESSOR,
|
|
4261
4285
|
useExisting: forwardRef(() => RadioControlValueAccessor),
|
|
4262
|
-
multi: true
|
|
4286
|
+
multi: true,
|
|
4263
4287
|
};
|
|
4264
4288
|
function throwNameError() {
|
|
4265
4289
|
throw new ɵRuntimeError(1202 /* RuntimeErrorCode.NAME_AND_FORM_CONTROL_NAME_MUST_MATCH */, `
|
|
@@ -4308,13 +4332,12 @@ class RadioControlRegistry {
|
|
|
4308
4332
|
_isSameGroup(controlPair, accessor) {
|
|
4309
4333
|
if (!controlPair[0].control)
|
|
4310
4334
|
return false;
|
|
4311
|
-
return controlPair[0]._parent === accessor._control._parent &&
|
|
4312
|
-
controlPair[1].name === accessor.name;
|
|
4335
|
+
return (controlPair[0]._parent === accessor._control._parent && controlPair[1].name === accessor.name);
|
|
4313
4336
|
}
|
|
4314
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4315
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4337
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RadioControlRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4338
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RadioControlRegistry, providedIn: 'root' }); }
|
|
4316
4339
|
}
|
|
4317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RadioControlRegistry, decorators: [{
|
|
4318
4341
|
type: Injectable,
|
|
4319
4342
|
args: [{ providedIn: 'root' }]
|
|
4320
4343
|
}] });
|
|
@@ -4403,7 +4426,8 @@ class RadioControlValueAccessor extends BuiltInControlValueAccessor {
|
|
|
4403
4426
|
* continues to work. Specifically, we drop the first call to `setDisabledState` if `disabled`
|
|
4404
4427
|
* is `false`, and we are not in legacy mode.
|
|
4405
4428
|
*/
|
|
4406
|
-
if (this.setDisabledStateFired ||
|
|
4429
|
+
if (this.setDisabledStateFired ||
|
|
4430
|
+
isDisabled ||
|
|
4407
4431
|
this.callSetDisabledState === 'whenDisabledForLegacyCode') {
|
|
4408
4432
|
this.setProperty('disabled', isDisabled);
|
|
4409
4433
|
}
|
|
@@ -4418,22 +4442,24 @@ class RadioControlValueAccessor extends BuiltInControlValueAccessor {
|
|
|
4418
4442
|
this.writeValue(value);
|
|
4419
4443
|
}
|
|
4420
4444
|
_checkName() {
|
|
4421
|
-
if (this.name &&
|
|
4445
|
+
if (this.name &&
|
|
4446
|
+
this.formControlName &&
|
|
4447
|
+
this.name !== this.formControlName &&
|
|
4422
4448
|
(typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
4423
4449
|
throwNameError();
|
|
4424
4450
|
}
|
|
4425
4451
|
if (!this.name && this.formControlName)
|
|
4426
4452
|
this.name = this.formControlName;
|
|
4427
4453
|
}
|
|
4428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4429
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
4454
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RadioControlValueAccessor, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: RadioControlRegistry }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4455
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
4430
4456
|
}
|
|
4431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RadioControlValueAccessor, decorators: [{
|
|
4432
4458
|
type: Directive,
|
|
4433
4459
|
args: [{
|
|
4434
4460
|
selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',
|
|
4435
4461
|
host: { '(change)': 'onChange()', '(blur)': 'onTouched()' },
|
|
4436
|
-
providers: [RADIO_VALUE_ACCESSOR]
|
|
4462
|
+
providers: [RADIO_VALUE_ACCESSOR],
|
|
4437
4463
|
}]
|
|
4438
4464
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: RadioControlRegistry }, { type: i0.Injector }], propDecorators: { name: [{
|
|
4439
4465
|
type: Input
|
|
@@ -4446,7 +4472,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
4446
4472
|
const RANGE_VALUE_ACCESSOR = {
|
|
4447
4473
|
provide: NG_VALUE_ACCESSOR,
|
|
4448
4474
|
useExisting: forwardRef(() => RangeValueAccessor),
|
|
4449
|
-
multi: true
|
|
4475
|
+
multi: true,
|
|
4450
4476
|
};
|
|
4451
4477
|
/**
|
|
4452
4478
|
* @description
|
|
@@ -4489,19 +4515,19 @@ class RangeValueAccessor extends BuiltInControlValueAccessor {
|
|
|
4489
4515
|
fn(value == '' ? null : parseFloat(value));
|
|
4490
4516
|
};
|
|
4491
4517
|
}
|
|
4492
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4493
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
4518
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RangeValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4519
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
4494
4520
|
}
|
|
4495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RangeValueAccessor, decorators: [{
|
|
4496
4522
|
type: Directive,
|
|
4497
4523
|
args: [{
|
|
4498
4524
|
selector: 'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',
|
|
4499
4525
|
host: {
|
|
4500
4526
|
'(change)': 'onChange($event.target.value)',
|
|
4501
4527
|
'(input)': 'onChange($event.target.value)',
|
|
4502
|
-
'(blur)': 'onTouched()'
|
|
4528
|
+
'(blur)': 'onTouched()',
|
|
4503
4529
|
},
|
|
4504
|
-
providers: [RANGE_VALUE_ACCESSOR]
|
|
4530
|
+
providers: [RANGE_VALUE_ACCESSOR],
|
|
4505
4531
|
}]
|
|
4506
4532
|
}] });
|
|
4507
4533
|
|
|
@@ -4511,7 +4537,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
4511
4537
|
const NG_MODEL_WITH_FORM_CONTROL_WARNING = new InjectionToken(ngDevMode ? 'NgModelWithFormControlWarning' : '');
|
|
4512
4538
|
const formControlBinding = {
|
|
4513
4539
|
provide: NgControl,
|
|
4514
|
-
useExisting: forwardRef(() => FormControlDirective)
|
|
4540
|
+
useExisting: forwardRef(() => FormControlDirective),
|
|
4515
4541
|
};
|
|
4516
4542
|
/**
|
|
4517
4543
|
* @description
|
|
@@ -4622,10 +4648,10 @@ class FormControlDirective extends NgControl {
|
|
|
4622
4648
|
_isControlChanged(changes) {
|
|
4623
4649
|
return changes.hasOwnProperty('form');
|
|
4624
4650
|
}
|
|
4625
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4626
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
4651
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
4652
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
4627
4653
|
}
|
|
4628
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormControlDirective, decorators: [{
|
|
4629
4655
|
type: Directive,
|
|
4630
4656
|
args: [{ selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm' }]
|
|
4631
4657
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -4675,7 +4701,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
4675
4701
|
|
|
4676
4702
|
const formDirectiveProvider = {
|
|
4677
4703
|
provide: ControlContainer,
|
|
4678
|
-
useExisting: forwardRef(() => FormGroupDirective)
|
|
4704
|
+
useExisting: forwardRef(() => FormGroupDirective),
|
|
4679
4705
|
};
|
|
4680
4706
|
/**
|
|
4681
4707
|
* @description
|
|
@@ -4910,7 +4936,7 @@ class FormGroupDirective extends ControlContainer {
|
|
|
4910
4936
|
}
|
|
4911
4937
|
/** @internal */
|
|
4912
4938
|
_updateDomValue() {
|
|
4913
|
-
this.directives.forEach(dir => {
|
|
4939
|
+
this.directives.forEach((dir) => {
|
|
4914
4940
|
const oldCtrl = dir.control;
|
|
4915
4941
|
const newCtrl = this.form.get(dir.path);
|
|
4916
4942
|
if (oldCtrl !== newCtrl) {
|
|
@@ -4968,16 +4994,16 @@ class FormGroupDirective extends ControlContainer {
|
|
|
4968
4994
|
throw missingFormException();
|
|
4969
4995
|
}
|
|
4970
4996
|
}
|
|
4971
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
4972
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
4997
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
4998
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
4973
4999
|
}
|
|
4974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormGroupDirective, decorators: [{
|
|
4975
5001
|
type: Directive,
|
|
4976
5002
|
args: [{
|
|
4977
5003
|
selector: '[formGroup]',
|
|
4978
5004
|
providers: [formDirectiveProvider],
|
|
4979
5005
|
host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },
|
|
4980
|
-
exportAs: 'ngForm'
|
|
5006
|
+
exportAs: 'ngForm',
|
|
4981
5007
|
}]
|
|
4982
5008
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4983
5009
|
type: Optional
|
|
@@ -5007,7 +5033,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
5007
5033
|
|
|
5008
5034
|
const formGroupNameProvider = {
|
|
5009
5035
|
provide: ControlContainer,
|
|
5010
|
-
useExisting: forwardRef(() => FormGroupName)
|
|
5036
|
+
useExisting: forwardRef(() => FormGroupName),
|
|
5011
5037
|
};
|
|
5012
5038
|
/**
|
|
5013
5039
|
* @description
|
|
@@ -5079,10 +5105,10 @@ class FormGroupName extends AbstractFormGroupDirective {
|
|
|
5079
5105
|
throw groupParentException();
|
|
5080
5106
|
}
|
|
5081
5107
|
}
|
|
5082
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5083
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
5108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
5109
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: FormGroupName, selector: "[formGroupName]", inputs: { name: ["formGroupName", "name"] }, providers: [formGroupNameProvider], usesInheritance: true, ngImport: i0 }); }
|
|
5084
5110
|
}
|
|
5085
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormGroupName, decorators: [{
|
|
5086
5112
|
type: Directive,
|
|
5087
5113
|
args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] }]
|
|
5088
5114
|
}], ctorParameters: () => [{ type: ControlContainer, decorators: [{
|
|
@@ -5111,7 +5137,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
5111
5137
|
}] } });
|
|
5112
5138
|
const formArrayNameProvider = {
|
|
5113
5139
|
provide: ControlContainer,
|
|
5114
|
-
useExisting: forwardRef(() => FormArrayName)
|
|
5140
|
+
useExisting: forwardRef(() => FormArrayName),
|
|
5115
5141
|
};
|
|
5116
5142
|
/**
|
|
5117
5143
|
* @description
|
|
@@ -5199,10 +5225,10 @@ class FormArrayName extends ControlContainer {
|
|
|
5199
5225
|
throw arrayParentException();
|
|
5200
5226
|
}
|
|
5201
5227
|
}
|
|
5202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5203
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
5228
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
5229
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: FormArrayName, selector: "[formArrayName]", inputs: { name: ["formArrayName", "name"] }, providers: [formArrayNameProvider], usesInheritance: true, ngImport: i0 }); }
|
|
5204
5230
|
}
|
|
5205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormArrayName, decorators: [{
|
|
5206
5232
|
type: Directive,
|
|
5207
5233
|
args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] }]
|
|
5208
5234
|
}], ctorParameters: () => [{ type: ControlContainer, decorators: [{
|
|
@@ -5230,13 +5256,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
5230
5256
|
args: ['formArrayName']
|
|
5231
5257
|
}] } });
|
|
5232
5258
|
function _hasInvalidParent(parent) {
|
|
5233
|
-
return !(parent instanceof FormGroupName) &&
|
|
5234
|
-
!(parent instanceof
|
|
5259
|
+
return (!(parent instanceof FormGroupName) &&
|
|
5260
|
+
!(parent instanceof FormGroupDirective) &&
|
|
5261
|
+
!(parent instanceof FormArrayName));
|
|
5235
5262
|
}
|
|
5236
5263
|
|
|
5237
5264
|
const controlNameBinding = {
|
|
5238
5265
|
provide: NgControl,
|
|
5239
|
-
useExisting: forwardRef(() => FormControlName)
|
|
5266
|
+
useExisting: forwardRef(() => FormControlName),
|
|
5240
5267
|
};
|
|
5241
5268
|
/**
|
|
5242
5269
|
* @description
|
|
@@ -5369,7 +5396,7 @@ class FormControlName extends NgControl {
|
|
|
5369
5396
|
else if (!(this._parent instanceof FormGroupName) &&
|
|
5370
5397
|
!(this._parent instanceof FormGroupDirective) &&
|
|
5371
5398
|
!(this._parent instanceof FormArrayName)) {
|
|
5372
|
-
throw controlParentException();
|
|
5399
|
+
throw controlParentException(this.name);
|
|
5373
5400
|
}
|
|
5374
5401
|
}
|
|
5375
5402
|
}
|
|
@@ -5378,10 +5405,10 @@ class FormControlName extends NgControl {
|
|
|
5378
5405
|
this.control = this.formDirective.addControl(this);
|
|
5379
5406
|
this._added = true;
|
|
5380
5407
|
}
|
|
5381
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5382
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
5408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
5409
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
5383
5410
|
}
|
|
5384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormControlName, decorators: [{
|
|
5385
5412
|
type: Directive,
|
|
5386
5413
|
args: [{ selector: '[formControlName]', providers: [controlNameBinding] }]
|
|
5387
5414
|
}], ctorParameters: () => [{ type: ControlContainer, decorators: [{
|
|
@@ -5433,7 +5460,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
5433
5460
|
const SELECT_VALUE_ACCESSOR = {
|
|
5434
5461
|
provide: NG_VALUE_ACCESSOR,
|
|
5435
5462
|
useExisting: forwardRef(() => SelectControlValueAccessor),
|
|
5436
|
-
multi: true
|
|
5463
|
+
multi: true,
|
|
5437
5464
|
};
|
|
5438
5465
|
function _buildValueString$1(id, value) {
|
|
5439
5466
|
if (id == null)
|
|
@@ -5558,15 +5585,15 @@ class SelectControlValueAccessor extends BuiltInControlValueAccessor {
|
|
|
5558
5585
|
const id = _extractId$1(valueString);
|
|
5559
5586
|
return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;
|
|
5560
5587
|
}
|
|
5561
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5562
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
5588
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: SelectControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5589
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
5563
5590
|
}
|
|
5564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: SelectControlValueAccessor, decorators: [{
|
|
5565
5592
|
type: Directive,
|
|
5566
5593
|
args: [{
|
|
5567
5594
|
selector: 'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',
|
|
5568
5595
|
host: { '(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()' },
|
|
5569
|
-
providers: [SELECT_VALUE_ACCESSOR]
|
|
5596
|
+
providers: [SELECT_VALUE_ACCESSOR],
|
|
5570
5597
|
}]
|
|
5571
5598
|
}], propDecorators: { compareWith: [{
|
|
5572
5599
|
type: Input
|
|
@@ -5622,10 +5649,10 @@ class NgSelectOption {
|
|
|
5622
5649
|
this._select.writeValue(this._select.value);
|
|
5623
5650
|
}
|
|
5624
5651
|
}
|
|
5625
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5626
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
5652
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
5653
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: NgSelectOption, selector: "option", inputs: { ngValue: "ngValue", value: "value" }, ngImport: i0 }); }
|
|
5627
5654
|
}
|
|
5628
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NgSelectOption, decorators: [{
|
|
5629
5656
|
type: Directive,
|
|
5630
5657
|
args: [{ selector: 'option' }]
|
|
5631
5658
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectControlValueAccessor, decorators: [{
|
|
@@ -5643,7 +5670,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
5643
5670
|
const SELECT_MULTIPLE_VALUE_ACCESSOR = {
|
|
5644
5671
|
provide: NG_VALUE_ACCESSOR,
|
|
5645
5672
|
useExisting: forwardRef(() => SelectMultipleControlValueAccessor),
|
|
5646
|
-
multi: true
|
|
5673
|
+
multi: true,
|
|
5647
5674
|
};
|
|
5648
5675
|
function _buildValueString(id, value) {
|
|
5649
5676
|
if (id == null)
|
|
@@ -5789,15 +5816,15 @@ class SelectMultipleControlValueAccessor extends BuiltInControlValueAccessor {
|
|
|
5789
5816
|
const id = _extractId(valueString);
|
|
5790
5817
|
return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;
|
|
5791
5818
|
}
|
|
5792
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5793
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
5819
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: SelectMultipleControlValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5820
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
5794
5821
|
}
|
|
5795
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5822
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: SelectMultipleControlValueAccessor, decorators: [{
|
|
5796
5823
|
type: Directive,
|
|
5797
5824
|
args: [{
|
|
5798
5825
|
selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',
|
|
5799
5826
|
host: { '(change)': 'onChange($event.target)', '(blur)': 'onTouched()' },
|
|
5800
|
-
providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]
|
|
5827
|
+
providers: [SELECT_MULTIPLE_VALUE_ACCESSOR],
|
|
5801
5828
|
}]
|
|
5802
5829
|
}], propDecorators: { compareWith: [{
|
|
5803
5830
|
type: Input
|
|
@@ -5863,10 +5890,10 @@ class ɵNgSelectMultipleOption {
|
|
|
5863
5890
|
this._select.writeValue(this._select.value);
|
|
5864
5891
|
}
|
|
5865
5892
|
}
|
|
5866
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5867
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
5893
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.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 }); }
|
|
5894
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: ɵNgSelectMultipleOption, selector: "option", inputs: { ngValue: "ngValue", value: "value" }, ngImport: i0 }); }
|
|
5868
5895
|
}
|
|
5869
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵNgSelectMultipleOption, decorators: [{
|
|
5870
5897
|
type: Directive,
|
|
5871
5898
|
args: [{ selector: 'option' }]
|
|
5872
5899
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SelectMultipleControlValueAccessor, decorators: [{
|
|
@@ -5938,10 +5965,10 @@ class AbstractValidatorDirective {
|
|
|
5938
5965
|
enabled(input) {
|
|
5939
5966
|
return input != null /* both `null` and `undefined` */;
|
|
5940
5967
|
}
|
|
5941
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5942
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
5968
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: AbstractValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5969
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: AbstractValidatorDirective, usesOnChanges: true, ngImport: i0 }); }
|
|
5943
5970
|
}
|
|
5944
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: AbstractValidatorDirective, decorators: [{
|
|
5945
5972
|
type: Directive
|
|
5946
5973
|
}] });
|
|
5947
5974
|
/**
|
|
@@ -5951,7 +5978,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
5951
5978
|
const MAX_VALIDATOR = {
|
|
5952
5979
|
provide: NG_VALIDATORS,
|
|
5953
5980
|
useExisting: forwardRef(() => MaxValidator),
|
|
5954
|
-
multi: true
|
|
5981
|
+
multi: true,
|
|
5955
5982
|
};
|
|
5956
5983
|
/**
|
|
5957
5984
|
* A directive which installs the {@link MaxValidator} for any `formControlName`,
|
|
@@ -5984,15 +6011,15 @@ class MaxValidator extends AbstractValidatorDirective {
|
|
|
5984
6011
|
/** @internal */
|
|
5985
6012
|
this.createValidator = (max) => maxValidator(max);
|
|
5986
6013
|
}
|
|
5987
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
5988
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6014
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MaxValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6015
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
5989
6016
|
}
|
|
5990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MaxValidator, decorators: [{
|
|
5991
6018
|
type: Directive,
|
|
5992
6019
|
args: [{
|
|
5993
6020
|
selector: 'input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]',
|
|
5994
6021
|
providers: [MAX_VALIDATOR],
|
|
5995
|
-
host: { '[attr.max]': '_enabled ? max : null' }
|
|
6022
|
+
host: { '[attr.max]': '_enabled ? max : null' },
|
|
5996
6023
|
}]
|
|
5997
6024
|
}], propDecorators: { max: [{
|
|
5998
6025
|
type: Input
|
|
@@ -6004,7 +6031,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
6004
6031
|
const MIN_VALIDATOR = {
|
|
6005
6032
|
provide: NG_VALIDATORS,
|
|
6006
6033
|
useExisting: forwardRef(() => MinValidator),
|
|
6007
|
-
multi: true
|
|
6034
|
+
multi: true,
|
|
6008
6035
|
};
|
|
6009
6036
|
/**
|
|
6010
6037
|
* A directive which installs the {@link MinValidator} for any `formControlName`,
|
|
@@ -6037,15 +6064,15 @@ class MinValidator extends AbstractValidatorDirective {
|
|
|
6037
6064
|
/** @internal */
|
|
6038
6065
|
this.createValidator = (min) => minValidator(min);
|
|
6039
6066
|
}
|
|
6040
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6041
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6067
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MinValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6068
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
6042
6069
|
}
|
|
6043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MinValidator, decorators: [{
|
|
6044
6071
|
type: Directive,
|
|
6045
6072
|
args: [{
|
|
6046
6073
|
selector: 'input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]',
|
|
6047
6074
|
providers: [MIN_VALIDATOR],
|
|
6048
|
-
host: { '[attr.min]': '_enabled ? min : null' }
|
|
6075
|
+
host: { '[attr.min]': '_enabled ? min : null' },
|
|
6049
6076
|
}]
|
|
6050
6077
|
}], propDecorators: { min: [{
|
|
6051
6078
|
type: Input
|
|
@@ -6057,7 +6084,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
6057
6084
|
const REQUIRED_VALIDATOR = {
|
|
6058
6085
|
provide: NG_VALIDATORS,
|
|
6059
6086
|
useExisting: forwardRef(() => RequiredValidator),
|
|
6060
|
-
multi: true
|
|
6087
|
+
multi: true,
|
|
6061
6088
|
};
|
|
6062
6089
|
/**
|
|
6063
6090
|
* @description
|
|
@@ -6066,7 +6093,7 @@ const REQUIRED_VALIDATOR = {
|
|
|
6066
6093
|
const CHECKBOX_REQUIRED_VALIDATOR = {
|
|
6067
6094
|
provide: NG_VALIDATORS,
|
|
6068
6095
|
useExisting: forwardRef(() => CheckboxRequiredValidator),
|
|
6069
|
-
multi: true
|
|
6096
|
+
multi: true,
|
|
6070
6097
|
};
|
|
6071
6098
|
/**
|
|
6072
6099
|
* @description
|
|
@@ -6101,15 +6128,15 @@ class RequiredValidator extends AbstractValidatorDirective {
|
|
|
6101
6128
|
enabled(input) {
|
|
6102
6129
|
return input;
|
|
6103
6130
|
}
|
|
6104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6105
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6132
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
6106
6133
|
}
|
|
6107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: RequiredValidator, decorators: [{
|
|
6108
6135
|
type: Directive,
|
|
6109
6136
|
args: [{
|
|
6110
6137
|
selector: ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',
|
|
6111
6138
|
providers: [REQUIRED_VALIDATOR],
|
|
6112
|
-
host: { '[attr.required]': '_enabled ? "" : null' }
|
|
6139
|
+
host: { '[attr.required]': '_enabled ? "" : null' },
|
|
6113
6140
|
}]
|
|
6114
6141
|
}], propDecorators: { required: [{
|
|
6115
6142
|
type: Input
|
|
@@ -6141,15 +6168,15 @@ class CheckboxRequiredValidator extends RequiredValidator {
|
|
|
6141
6168
|
/** @internal */
|
|
6142
6169
|
this.createValidator = (input) => requiredTrueValidator;
|
|
6143
6170
|
}
|
|
6144
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6145
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6171
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: CheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6172
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
6146
6173
|
}
|
|
6147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: CheckboxRequiredValidator, decorators: [{
|
|
6148
6175
|
type: Directive,
|
|
6149
6176
|
args: [{
|
|
6150
6177
|
selector: 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',
|
|
6151
6178
|
providers: [CHECKBOX_REQUIRED_VALIDATOR],
|
|
6152
|
-
host: { '[attr.required]': '_enabled ? "" : null' }
|
|
6179
|
+
host: { '[attr.required]': '_enabled ? "" : null' },
|
|
6153
6180
|
}]
|
|
6154
6181
|
}] });
|
|
6155
6182
|
/**
|
|
@@ -6159,7 +6186,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
6159
6186
|
const EMAIL_VALIDATOR = {
|
|
6160
6187
|
provide: NG_VALIDATORS,
|
|
6161
6188
|
useExisting: forwardRef(() => EmailValidator),
|
|
6162
|
-
multi: true
|
|
6189
|
+
multi: true,
|
|
6163
6190
|
};
|
|
6164
6191
|
/**
|
|
6165
6192
|
* A directive that adds the `email` validator to controls marked with the
|
|
@@ -6202,14 +6229,14 @@ class EmailValidator extends AbstractValidatorDirective {
|
|
|
6202
6229
|
enabled(input) {
|
|
6203
6230
|
return input;
|
|
6204
6231
|
}
|
|
6205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6206
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6232
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: EmailValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6233
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.6", type: EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: { email: "email" }, providers: [EMAIL_VALIDATOR], usesInheritance: true, ngImport: i0 }); }
|
|
6207
6234
|
}
|
|
6208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6235
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: EmailValidator, decorators: [{
|
|
6209
6236
|
type: Directive,
|
|
6210
6237
|
args: [{
|
|
6211
6238
|
selector: '[email][formControlName],[email][formControl],[email][ngModel]',
|
|
6212
|
-
providers: [EMAIL_VALIDATOR]
|
|
6239
|
+
providers: [EMAIL_VALIDATOR],
|
|
6213
6240
|
}]
|
|
6214
6241
|
}], propDecorators: { email: [{
|
|
6215
6242
|
type: Input
|
|
@@ -6221,7 +6248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
6221
6248
|
const MIN_LENGTH_VALIDATOR = {
|
|
6222
6249
|
provide: NG_VALIDATORS,
|
|
6223
6250
|
useExisting: forwardRef(() => MinLengthValidator),
|
|
6224
|
-
multi: true
|
|
6251
|
+
multi: true,
|
|
6225
6252
|
};
|
|
6226
6253
|
/**
|
|
6227
6254
|
* A directive that adds minimum length validation to controls marked with the
|
|
@@ -6254,15 +6281,15 @@ class MinLengthValidator extends AbstractValidatorDirective {
|
|
|
6254
6281
|
/** @internal */
|
|
6255
6282
|
this.createValidator = (minlength) => minLengthValidator(minlength);
|
|
6256
6283
|
}
|
|
6257
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6258
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6284
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MinLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6285
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
6259
6286
|
}
|
|
6260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MinLengthValidator, decorators: [{
|
|
6261
6288
|
type: Directive,
|
|
6262
6289
|
args: [{
|
|
6263
6290
|
selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',
|
|
6264
6291
|
providers: [MIN_LENGTH_VALIDATOR],
|
|
6265
|
-
host: { '[attr.minlength]': '_enabled ? minlength : null' }
|
|
6292
|
+
host: { '[attr.minlength]': '_enabled ? minlength : null' },
|
|
6266
6293
|
}]
|
|
6267
6294
|
}], propDecorators: { minlength: [{
|
|
6268
6295
|
type: Input
|
|
@@ -6274,7 +6301,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
6274
6301
|
const MAX_LENGTH_VALIDATOR = {
|
|
6275
6302
|
provide: NG_VALIDATORS,
|
|
6276
6303
|
useExisting: forwardRef(() => MaxLengthValidator),
|
|
6277
|
-
multi: true
|
|
6304
|
+
multi: true,
|
|
6278
6305
|
};
|
|
6279
6306
|
/**
|
|
6280
6307
|
* A directive that adds maximum length validation to controls marked with the
|
|
@@ -6307,15 +6334,15 @@ class MaxLengthValidator extends AbstractValidatorDirective {
|
|
|
6307
6334
|
/** @internal */
|
|
6308
6335
|
this.createValidator = (maxlength) => maxLengthValidator(maxlength);
|
|
6309
6336
|
}
|
|
6310
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6311
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6337
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MaxLengthValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6338
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
6312
6339
|
}
|
|
6313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: MaxLengthValidator, decorators: [{
|
|
6314
6341
|
type: Directive,
|
|
6315
6342
|
args: [{
|
|
6316
6343
|
selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',
|
|
6317
6344
|
providers: [MAX_LENGTH_VALIDATOR],
|
|
6318
|
-
host: { '[attr.maxlength]': '_enabled ? maxlength : null' }
|
|
6345
|
+
host: { '[attr.maxlength]': '_enabled ? maxlength : null' },
|
|
6319
6346
|
}]
|
|
6320
6347
|
}], propDecorators: { maxlength: [{
|
|
6321
6348
|
type: Input
|
|
@@ -6327,7 +6354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
6327
6354
|
const PATTERN_VALIDATOR = {
|
|
6328
6355
|
provide: NG_VALIDATORS,
|
|
6329
6356
|
useExisting: forwardRef(() => PatternValidator),
|
|
6330
|
-
multi: true
|
|
6357
|
+
multi: true,
|
|
6331
6358
|
};
|
|
6332
6359
|
/**
|
|
6333
6360
|
* @description
|
|
@@ -6362,15 +6389,15 @@ class PatternValidator extends AbstractValidatorDirective {
|
|
|
6362
6389
|
/** @internal */
|
|
6363
6390
|
this.createValidator = (input) => patternValidator(input);
|
|
6364
6391
|
}
|
|
6365
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6366
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6392
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: PatternValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6393
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.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 }); }
|
|
6367
6394
|
}
|
|
6368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: PatternValidator, decorators: [{
|
|
6369
6396
|
type: Directive,
|
|
6370
6397
|
args: [{
|
|
6371
6398
|
selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',
|
|
6372
6399
|
providers: [PATTERN_VALIDATOR],
|
|
6373
|
-
host: { '[attr.pattern]': '_enabled ? pattern : null' }
|
|
6400
|
+
host: { '[attr.pattern]': '_enabled ? pattern : null' },
|
|
6374
6401
|
}]
|
|
6375
6402
|
}], propDecorators: { pattern: [{
|
|
6376
6403
|
type: Input
|
|
@@ -6399,13 +6426,19 @@ const SHARED_FORM_DIRECTIVES = [
|
|
|
6399
6426
|
MaxValidator,
|
|
6400
6427
|
];
|
|
6401
6428
|
const TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];
|
|
6402
|
-
const REACTIVE_DRIVEN_DIRECTIVES = [
|
|
6429
|
+
const REACTIVE_DRIVEN_DIRECTIVES = [
|
|
6430
|
+
FormControlDirective,
|
|
6431
|
+
FormGroupDirective,
|
|
6432
|
+
FormControlName,
|
|
6433
|
+
FormGroupName,
|
|
6434
|
+
FormArrayName,
|
|
6435
|
+
];
|
|
6403
6436
|
/**
|
|
6404
6437
|
* Internal module used for sharing directives between FormsModule and ReactiveFormsModule
|
|
6405
6438
|
*/
|
|
6406
6439
|
class ɵInternalFormsSharedModule {
|
|
6407
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6408
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
6440
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵInternalFormsSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6441
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵInternalFormsSharedModule, declarations: [ɵNgNoValidate,
|
|
6409
6442
|
NgSelectOption,
|
|
6410
6443
|
ɵNgSelectMultipleOption,
|
|
6411
6444
|
DefaultValueAccessor,
|
|
@@ -6444,9 +6477,9 @@ class ɵInternalFormsSharedModule {
|
|
|
6444
6477
|
EmailValidator,
|
|
6445
6478
|
MinValidator,
|
|
6446
6479
|
MaxValidator] }); }
|
|
6447
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6480
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵInternalFormsSharedModule }); }
|
|
6448
6481
|
}
|
|
6449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
6482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ɵInternalFormsSharedModule, decorators: [{
|
|
6450
6483
|
type: NgModule,
|
|
6451
6484
|
args: [{
|
|
6452
6485
|
declarations: SHARED_FORM_DIRECTIVES,
|
|
@@ -6547,7 +6580,7 @@ class FormArray extends AbstractControl {
|
|
|
6547
6580
|
// `VALID` or `INVALID`.
|
|
6548
6581
|
// The status should be broadcasted via the `statusChanges` observable, so we set `emitEvent`
|
|
6549
6582
|
// to `true` to allow that during the control creation process.
|
|
6550
|
-
emitEvent: !!this.asyncValidator
|
|
6583
|
+
emitEvent: !!this.asyncValidator,
|
|
6551
6584
|
});
|
|
6552
6585
|
}
|
|
6553
6586
|
/**
|
|
@@ -6869,9 +6902,9 @@ class FormArray extends AbstractControl {
|
|
|
6869
6902
|
}
|
|
6870
6903
|
/** @internal */
|
|
6871
6904
|
_updateValue() {
|
|
6872
|
-
this.value =
|
|
6873
|
-
|
|
6874
|
-
|
|
6905
|
+
this.value = this.controls
|
|
6906
|
+
.filter((control) => control.enabled || this.disabled)
|
|
6907
|
+
.map((control) => control.value);
|
|
6875
6908
|
}
|
|
6876
6909
|
/** @internal */
|
|
6877
6910
|
_anyControls(condition) {
|
|
@@ -6908,10 +6941,10 @@ const UntypedFormArray = FormArray;
|
|
|
6908
6941
|
const isFormArray = (control) => control instanceof FormArray;
|
|
6909
6942
|
|
|
6910
6943
|
function isAbstractControlOptions(options) {
|
|
6911
|
-
return !!options &&
|
|
6944
|
+
return (!!options &&
|
|
6912
6945
|
(options.asyncValidators !== undefined ||
|
|
6913
6946
|
options.validators !== undefined ||
|
|
6914
|
-
options.updateOn !== undefined);
|
|
6947
|
+
options.updateOn !== undefined));
|
|
6915
6948
|
}
|
|
6916
6949
|
// clang-format on
|
|
6917
6950
|
/**
|
|
@@ -7068,14 +7101,14 @@ class FormBuilder {
|
|
|
7068
7101
|
* @param asyncValidator A single async validator or array of async validator functions.
|
|
7069
7102
|
*/
|
|
7070
7103
|
array(controls, validatorOrOpts, asyncValidator) {
|
|
7071
|
-
const createdControls = controls.map(c => this._createControl(c));
|
|
7104
|
+
const createdControls = controls.map((c) => this._createControl(c));
|
|
7072
7105
|
// Cast to `any` because the inferred types are not as specific as Element.
|
|
7073
7106
|
return new FormArray(createdControls, validatorOrOpts, asyncValidator);
|
|
7074
7107
|
}
|
|
7075
7108
|
/** @internal */
|
|
7076
7109
|
_reduceControls(controls) {
|
|
7077
7110
|
const createdControls = {};
|
|
7078
|
-
Object.keys(controls).forEach(controlName => {
|
|
7111
|
+
Object.keys(controls).forEach((controlName) => {
|
|
7079
7112
|
createdControls[controlName] = this._createControl(controls[controlName]);
|
|
7080
7113
|
});
|
|
7081
7114
|
return createdControls;
|
|
@@ -7085,23 +7118,26 @@ class FormBuilder {
|
|
|
7085
7118
|
if (controls instanceof FormControl) {
|
|
7086
7119
|
return controls;
|
|
7087
7120
|
}
|
|
7088
|
-
else if (controls instanceof AbstractControl) {
|
|
7121
|
+
else if (controls instanceof AbstractControl) {
|
|
7122
|
+
// A control; just return it
|
|
7089
7123
|
return controls;
|
|
7090
7124
|
}
|
|
7091
|
-
else if (Array.isArray(controls)) {
|
|
7125
|
+
else if (Array.isArray(controls)) {
|
|
7126
|
+
// ControlConfig Tuple
|
|
7092
7127
|
const value = controls[0];
|
|
7093
7128
|
const validator = controls.length > 1 ? controls[1] : null;
|
|
7094
7129
|
const asyncValidator = controls.length > 2 ? controls[2] : null;
|
|
7095
7130
|
return this.control(value, validator, asyncValidator);
|
|
7096
7131
|
}
|
|
7097
|
-
else {
|
|
7132
|
+
else {
|
|
7133
|
+
// T or FormControlState<T>
|
|
7098
7134
|
return this.control(controls);
|
|
7099
7135
|
}
|
|
7100
7136
|
}
|
|
7101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7102
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7137
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7138
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormBuilder, providedIn: 'root' }); }
|
|
7103
7139
|
}
|
|
7104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormBuilder, decorators: [{
|
|
7105
7141
|
type: Injectable,
|
|
7106
7142
|
args: [{ providedIn: 'root' }]
|
|
7107
7143
|
}] });
|
|
@@ -7113,10 +7149,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
7113
7149
|
* @publicApi
|
|
7114
7150
|
*/
|
|
7115
7151
|
class NonNullableFormBuilder {
|
|
7116
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7117
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NonNullableFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7153
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NonNullableFormBuilder, providedIn: 'root', useFactory: () => inject(FormBuilder).nonNullable }); }
|
|
7118
7154
|
}
|
|
7119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: NonNullableFormBuilder, decorators: [{
|
|
7120
7156
|
type: Injectable,
|
|
7121
7157
|
args: [{
|
|
7122
7158
|
providedIn: 'root',
|
|
@@ -7142,10 +7178,10 @@ class UntypedFormBuilder extends FormBuilder {
|
|
|
7142
7178
|
array(controlsConfig, validatorOrOpts, asyncValidator) {
|
|
7143
7179
|
return super.array(controlsConfig, validatorOrOpts, asyncValidator);
|
|
7144
7180
|
}
|
|
7145
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7146
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7181
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UntypedFormBuilder, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7182
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UntypedFormBuilder, providedIn: 'root' }); }
|
|
7147
7183
|
}
|
|
7148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: UntypedFormBuilder, decorators: [{
|
|
7149
7185
|
type: Injectable,
|
|
7150
7186
|
args: [{ providedIn: 'root' }]
|
|
7151
7187
|
}] });
|
|
@@ -7158,7 +7194,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.4",
|
|
|
7158
7194
|
/**
|
|
7159
7195
|
* @publicApi
|
|
7160
7196
|
*/
|
|
7161
|
-
const VERSION = new Version('18.0.0-next.
|
|
7197
|
+
const VERSION = new Version('18.0.0-next.6');
|
|
7162
7198
|
|
|
7163
7199
|
/**
|
|
7164
7200
|
* Exports the required providers and directives for template-driven forms,
|
|
@@ -7181,21 +7217,23 @@ class FormsModule {
|
|
|
7181
7217
|
static withConfig(opts) {
|
|
7182
7218
|
return {
|
|
7183
7219
|
ngModule: FormsModule,
|
|
7184
|
-
providers: [
|
|
7220
|
+
providers: [
|
|
7221
|
+
{
|
|
7185
7222
|
provide: CALL_SET_DISABLED_STATE,
|
|
7186
|
-
useValue: opts.callSetDisabledState ?? setDisabledStateDefault
|
|
7187
|
-
}
|
|
7223
|
+
useValue: opts.callSetDisabledState ?? setDisabledStateDefault,
|
|
7224
|
+
},
|
|
7225
|
+
],
|
|
7188
7226
|
};
|
|
7189
7227
|
}
|
|
7190
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7191
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
7192
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7228
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7229
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormsModule, declarations: [NgModel, NgModelGroup, NgForm], exports: [ɵInternalFormsSharedModule, NgModel, NgModelGroup, NgForm] }); }
|
|
7230
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormsModule, imports: [ɵInternalFormsSharedModule] }); }
|
|
7193
7231
|
}
|
|
7194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: FormsModule, decorators: [{
|
|
7195
7233
|
type: NgModule,
|
|
7196
7234
|
args: [{
|
|
7197
7235
|
declarations: TEMPLATE_DRIVEN_DIRECTIVES,
|
|
7198
|
-
exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
|
|
7236
|
+
exports: [ɵInternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES],
|
|
7199
7237
|
}]
|
|
7200
7238
|
}] });
|
|
7201
7239
|
/**
|
|
@@ -7224,24 +7262,24 @@ class ReactiveFormsModule {
|
|
|
7224
7262
|
providers: [
|
|
7225
7263
|
{
|
|
7226
7264
|
provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,
|
|
7227
|
-
useValue: opts.warnOnNgModelWithFormControl ?? 'always'
|
|
7265
|
+
useValue: opts.warnOnNgModelWithFormControl ?? 'always',
|
|
7228
7266
|
},
|
|
7229
7267
|
{
|
|
7230
7268
|
provide: CALL_SET_DISABLED_STATE,
|
|
7231
|
-
useValue: opts.callSetDisabledState ?? setDisabledStateDefault
|
|
7232
|
-
}
|
|
7233
|
-
]
|
|
7269
|
+
useValue: opts.callSetDisabledState ?? setDisabledStateDefault,
|
|
7270
|
+
},
|
|
7271
|
+
],
|
|
7234
7272
|
};
|
|
7235
7273
|
}
|
|
7236
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7237
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.
|
|
7238
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7274
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ReactiveFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7275
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0-next.6", ngImport: i0, type: ReactiveFormsModule, declarations: [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName], exports: [ɵInternalFormsSharedModule, FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName] }); }
|
|
7276
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ReactiveFormsModule, imports: [ɵInternalFormsSharedModule] }); }
|
|
7239
7277
|
}
|
|
7240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.
|
|
7278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0-next.6", ngImport: i0, type: ReactiveFormsModule, decorators: [{
|
|
7241
7279
|
type: NgModule,
|
|
7242
7280
|
args: [{
|
|
7243
7281
|
declarations: [REACTIVE_DRIVEN_DIRECTIVES],
|
|
7244
|
-
exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
|
|
7282
|
+
exports: [ɵInternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES],
|
|
7245
7283
|
}]
|
|
7246
7284
|
}] });
|
|
7247
7285
|
|