@@ -19,6 +19,7 @@ import { OnInit } from '@angular/core';
1919import { Renderer2 } from ' @angular/core' ;
2020import { SimpleChanges } from ' @angular/core' ;
2121import { Version } from ' @angular/core' ;
22+ import { ɵControlDirectiveHost } from ' @angular/core' ;
2223
2324// @public
2425export abstract class AbstractControl <TValue = any , TRawValue extends TValue = TValue , TValueWithOptionalControlStates = any > {
@@ -407,7 +408,7 @@ export const FormControl: ɵFormControlCtor;
407408
408409// @public
409410export class FormControlDirective extends NgControl implements OnChanges , OnDestroy {
410- constructor (validators : (Validator | ValidatorFn )[], asyncValidators : (AsyncValidator | AsyncValidatorFn )[], valueAccessors : ControlValueAccessor [], _ngModelWarningConfig : string | null , callSetDisabledState ? : SetDisabledStateOption | undefined );
411+ constructor (validators : (Validator | ValidatorFn )[], asyncValidators : (AsyncValidator | AsyncValidatorFn )[], valueAccessors : ControlValueAccessor [], _ngModelWarningConfig : string | null , callSetDisabledState ? : SetDisabledStateOption | undefined , renderer ? : Renderer2 , injector ? : Injector );
411412 get control(): FormControl ;
412413 form: FormControl ;
413414 set isDisabled(isDisabled : boolean );
@@ -423,12 +424,12 @@ export class FormControlDirective extends NgControl implements OnChanges, OnDest
423424 // (undocumented)
424425 static ɵdir: i0 .ɵɵDirectiveDeclaration <FormControlDirective , " [formControl]" , [" ngForm" ], { " form" : { " alias" : " formControl" ; " required" : false ; }; " isDisabled" : { " alias" : " disabled" ; " required" : false ; }; " model" : { " alias" : " ngModel" ; " required" : false ; }; }, { " update" : " ngModelChange" ; }, never , never , false , never >;
425426 // (undocumented)
426- static ɵfac: i0 .ɵɵFactoryDeclaration <FormControlDirective , [{ optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; }, { optional: true ; }]>;
427+ static ɵfac: i0 .ɵɵFactoryDeclaration <FormControlDirective , [{ optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; }, { optional: true ; }, { optional : true ; }, { optional : true ; } ]>;
427428}
428429
429430// @public
430431export class FormControlName extends NgControl implements OnChanges , OnDestroy {
431- constructor (parent : ControlContainer , validators : (Validator | ValidatorFn )[], asyncValidators : (AsyncValidator | AsyncValidatorFn )[], valueAccessors : ControlValueAccessor [], _ngModelWarningConfig : string | null );
432+ constructor (parent : ControlContainer , validators : (Validator | ValidatorFn )[], asyncValidators : (AsyncValidator | AsyncValidatorFn )[], valueAccessors : ControlValueAccessor [], _ngModelWarningConfig : string | null , renderer ? : Renderer2 , injector ? : Injector );
432433 readonly control: FormControl ;
433434 get formDirective(): any ;
434435 set isDisabled(isDisabled : boolean );
@@ -444,7 +445,7 @@ export class FormControlName extends NgControl implements OnChanges, OnDestroy {
444445 // (undocumented)
445446 static ɵdir: i0 .ɵɵDirectiveDeclaration <FormControlName , " [formControlName]" , never , { " name" : { " alias" : " formControlName" ; " required" : false ; }; " isDisabled" : { " alias" : " disabled" ; " required" : false ; }; " model" : { " alias" : " ngModel" ; " required" : false ; }; }, { " update" : " ngModelChange" ; }, never , never , false , never >;
446447 // (undocumented)
447- static ɵfac: i0 .ɵɵFactoryDeclaration <FormControlName , [{ optional: true ; host: true ; skipSelf: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; }]>;
448+ static ɵfac: i0 .ɵɵFactoryDeclaration <FormControlName , [{ optional: true ; host: true ; skipSelf: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; }, { optional : true ; }, { optional : true ; } ]>;
448449}
449450
450451// @public
@@ -677,10 +678,31 @@ export const NG_VALUE_ACCESSOR: InjectionToken<readonly ControlValueAccessor[]>;
677678
678679// @public
679680export abstract class NgControl extends AbstractControlDirective {
680- constructor (rawValueAccessors ? : ControlValueAccessor []);
681+ constructor (injector ? : Injector , renderer ? : Renderer2 , rawValueAccessors ? : ControlValueAccessor []);
682+ protected customControlBindings: {
683+ value? : unknown ;
684+ disabled? : boolean ;
685+ touched? : boolean ;
686+ dirty? : boolean ;
687+ valid? : boolean ;
688+ invalid? : boolean ;
689+ pending? : boolean ;
690+ required? : boolean ;
691+ errors? : ValidationErrors | null ;
692+ } | null ;
693+ // (undocumented)
694+ protected isCustomControlBased: boolean ;
681695 name: string | number | null ;
682696 // (undocumented)
697+ protected ngControlUpdate(host : ɵControlDirectiveHost , bindRequired : boolean ): void ;
698+ protected parseErrorsValidator: ValidatorFn | null ;
699+ // (undocumented)
700+ protected removeParseErrorsValidator(control : AbstractControl | null | undefined ): void ;
701+ // (undocumented)
683702 protected get selectedValueAccessor(): ControlValueAccessor | null ;
703+ // (undocumented)
704+ protected setupCustomControl(): void ;
705+ protected get shouldBindRequired(): boolean ;
684706 valueAccessor: ControlValueAccessor | null ;
685707 abstract viewToModelUpdate(newValue : any ): void ;
686708}
@@ -740,7 +762,7 @@ export class NgForm extends ControlContainer implements Form, AfterViewInit {
740762
741763// @public
742764export class NgModel extends NgControl implements OnChanges , OnDestroy {
743- constructor (parent : ControlContainer , validators : (Validator | ValidatorFn )[], asyncValidators : (AsyncValidator | AsyncValidatorFn )[], valueAccessors : ControlValueAccessor [], _changeDetectorRef ? : (ChangeDetectorRef | null ) | undefined , callSetDisabledState ? : SetDisabledStateOption | undefined );
765+ constructor (parent : ControlContainer , validators : (Validator | ValidatorFn )[], asyncValidators : (AsyncValidator | AsyncValidatorFn )[], valueAccessors : ControlValueAccessor [], _changeDetectorRef ? : (ChangeDetectorRef | null ) | undefined , callSetDisabledState ? : SetDisabledStateOption | undefined , injector ? : Injector , renderer ? : Renderer2 );
744766 // (undocumented)
745767 readonly control: FormControl ;
746768 get formDirective(): any ;
@@ -762,7 +784,7 @@ export class NgModel extends NgControl implements OnChanges, OnDestroy {
762784 // (undocumented)
763785 static ɵdir: i0 .ɵɵDirectiveDeclaration <NgModel , " [ngModel]:not([formControlName]):not([formControl])" , [" ngModel" ], { " name" : { " alias" : " name" ; " required" : false ; }; " isDisabled" : { " alias" : " disabled" ; " required" : false ; }; " model" : { " alias" : " ngModel" ; " required" : false ; }; " options" : { " alias" : " ngModelOptions" ; " required" : false ; }; }, { " update" : " ngModelChange" ; }, never , never , false , never >;
764786 // (undocumented)
765- static ɵfac: i0 .ɵɵFactoryDeclaration <NgModel , [{ optional: true ; host: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; }, { optional: true ; }]>;
787+ static ɵfac: i0 .ɵɵFactoryDeclaration <NgModel , [{ optional: true ; host: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; self: true ; }, { optional: true ; }, { optional: true ; }, { optional : true ; }, { optional : true ; } ]>;
766788}
767789
768790// @public
0 commit comments