@@ -33,6 +33,7 @@ import {
33
33
numberAttribute ,
34
34
inject ,
35
35
} from '@angular/core' ;
36
+ import { type AbstractControl } from '@angular/forms' ;
36
37
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform' ;
37
38
import { Observable , of as observableOf , Subject } from 'rxjs' ;
38
39
import { startWith , takeUntil } from 'rxjs/operators' ;
@@ -117,7 +118,7 @@ export class CdkStep implements OnChanges {
117
118
@ViewChild ( TemplateRef , { static : true } ) content : TemplateRef < any > ;
118
119
119
120
/** The top level abstract control of the step. */
120
- @Input ( ) stepControl : AbstractControlLike ;
121
+ @Input ( ) stepControl : AbstractControl ;
121
122
122
123
/** Whether user has attempted to move away from the step. */
123
124
interacted = false ;
@@ -556,54 +557,3 @@ export class CdkStepper implements AfterContentInit, AfterViewInit, OnDestroy {
556
557
return index > - 1 && ( ! this . steps || index < this . steps . length ) ;
557
558
}
558
559
}
559
-
560
- /**
561
- * Simplified representation of an "AbstractControl" from @angular/forms.
562
- * Used to avoid having to bring in @angular/forms for a single optional interface.
563
- * @docs -private
564
- */
565
- interface AbstractControlLike {
566
- asyncValidator : ( ( control : any ) => any ) | null ;
567
- dirty : boolean ;
568
- disabled : boolean ;
569
- enabled : boolean ;
570
- errors : { [ key : string ] : any } | null ;
571
- invalid : boolean ;
572
- parent : any ;
573
- pending : boolean ;
574
- pristine : boolean ;
575
- root : AbstractControlLike ;
576
- status : string ;
577
- readonly statusChanges : Observable < any > ;
578
- touched : boolean ;
579
- untouched : boolean ;
580
- updateOn : any ;
581
- valid : boolean ;
582
- validator : ( ( control : any ) => any ) | null ;
583
- value : any ;
584
- readonly valueChanges : Observable < any > ;
585
- clearAsyncValidators ( ) : void ;
586
- clearValidators ( ) : void ;
587
- disable ( opts ?: any ) : void ;
588
- enable ( opts ?: any ) : void ;
589
- get ( path : ( string | number ) [ ] | string ) : AbstractControlLike | null ;
590
- getError ( errorCode : string , path ?: ( string | number ) [ ] | string ) : any ;
591
- hasError ( errorCode : string , path ?: ( string | number ) [ ] | string ) : boolean ;
592
- markAllAsTouched ( ) : void ;
593
- markAsDirty ( opts ?: any ) : void ;
594
- markAsPending ( opts ?: any ) : void ;
595
- markAsPristine ( opts ?: any ) : void ;
596
- markAsTouched ( opts ?: any ) : void ;
597
- markAsUntouched ( opts ?: any ) : void ;
598
- patchValue ( value : any , options ?: Object ) : void ;
599
- reset ( value ?: any , options ?: Object ) : void ;
600
- setAsyncValidators ( newValidator : ( control : any ) => any | ( ( control : any ) => any ) [ ] | null ) : void ;
601
- setErrors ( errors : { [ key : string ] : any } | null , opts ?: any ) : void ;
602
- setParent ( parent : any ) : void ;
603
- setValidators ( newValidator : ( control : any ) => any | ( ( control : any ) => any ) [ ] | null ) : void ;
604
- setValue ( value : any , options ?: Object ) : void ;
605
- updateValueAndValidity ( opts ?: any ) : void ;
606
- patchValue ( value : any , options ?: any ) : void ;
607
- reset ( formState ?: any , options ?: any ) : void ;
608
- setValue ( value : any , options ?: any ) : void ;
609
- }
0 commit comments