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