1
+ export interface _SnackBarContainer {
2
+ _onEnter : Subject < any > ;
3
+ _onExit : Subject < any > ;
4
+ attachComponentPortal : < T > ( portal : ComponentPortal < T > ) => ComponentRef < T > ;
5
+ attachTemplatePortal : < C > ( portal : TemplatePortal < C > ) => EmbeddedViewRef < C > ;
6
+ enter : ( ) => void ;
7
+ exit : ( ) => Observable < void > ;
8
+ snackBarConfig : MatSnackBarConfig ;
9
+ }
10
+
11
+ export interface _TextOnlySnackBar {
12
+ data : {
13
+ message : string ;
14
+ action : string ;
15
+ } ;
16
+ snackBarRef : MatSnackBarRef < _TextOnlySnackBar > ;
17
+ }
18
+
1
19
export declare const MAT_SNACK_BAR_DATA : InjectionToken < any > ;
2
20
3
21
export declare const MAT_SNACK_BAR_DEFAULT_OPTIONS : InjectionToken < MatSnackBarConfig < any > > ;
@@ -8,12 +26,12 @@ export declare class MatSnackBar implements OnDestroy {
8
26
get _openedSnackBarRef ( ) : MatSnackBarRef < any > | null ;
9
27
set _openedSnackBarRef ( value : MatSnackBarRef < any > | null ) ;
10
28
protected handsetCssClass : string ;
11
- protected simpleSnackBarComponent : Type < TextOnlySnackBar > ;
12
- protected snackBarContainerComponent : Type < MatSnackBarContainerInterface > ;
29
+ protected simpleSnackBarComponent : Type < _TextOnlySnackBar > ;
30
+ protected snackBarContainerComponent : Type < _SnackBarContainer > ;
13
31
constructor ( _overlay : Overlay , _live : LiveAnnouncer , _injector : Injector , _breakpointObserver : BreakpointObserver , _parentSnackBar : MatSnackBar , _defaultConfig : MatSnackBarConfig ) ;
14
32
dismiss ( ) : void ;
15
33
ngOnDestroy ( ) : void ;
16
- open ( message : string , action ?: string , config ?: MatSnackBarConfig ) : MatSnackBarRef < TextOnlySnackBar > ;
34
+ open ( message : string , action ?: string , config ?: MatSnackBarConfig ) : MatSnackBarRef < _TextOnlySnackBar > ;
17
35
openFromComponent < T > ( component : ComponentType < T > , config ?: MatSnackBarConfig ) : MatSnackBarRef < T > ;
18
36
openFromTemplate ( template : TemplateRef < any > , config ?: MatSnackBarConfig ) : MatSnackBarRef < EmbeddedViewRef < any > > ;
19
37
static ɵfac : i0 . ɵɵFactoryDef < MatSnackBar , [ null , null , null , null , { optional : true ; skipSelf : true ; } , null ] > ;
@@ -36,7 +54,7 @@ export declare class MatSnackBarConfig<D = any> {
36
54
viewContainerRef ?: ViewContainerRef ;
37
55
}
38
56
39
- export declare class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy , MatSnackBarContainerInterface {
57
+ export declare class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy , _SnackBarContainer {
40
58
_animationState : string ;
41
59
readonly _onEnter : Subject < any > ;
42
60
readonly _onExit : Subject < any > ;
@@ -56,16 +74,6 @@ export declare class MatSnackBarContainer extends BasePortalOutlet implements On
56
74
static ɵfac : i0 . ɵɵFactoryDef < MatSnackBarContainer , never > ;
57
75
}
58
76
59
- export interface MatSnackBarContainerInterface {
60
- _onEnter : Subject < any > ;
61
- _onExit : Subject < any > ;
62
- attachComponentPortal : < T > ( portal : ComponentPortal < T > ) => ComponentRef < T > ;
63
- attachTemplatePortal : < C > ( portal : TemplatePortal < C > ) => EmbeddedViewRef < C > ;
64
- enter : ( ) => void ;
65
- exit : ( ) => Observable < void > ;
66
- snackBarConfig : MatSnackBarConfig ;
67
- }
68
-
69
77
export interface MatSnackBarDismiss {
70
78
dismissedByAction : boolean ;
71
79
}
@@ -78,9 +86,9 @@ export declare class MatSnackBarModule {
78
86
}
79
87
80
88
export declare class MatSnackBarRef < T > {
81
- containerInstance : MatSnackBarContainerInterface ;
89
+ containerInstance : _SnackBarContainer ;
82
90
instance : T ;
83
- constructor ( containerInstance : MatSnackBarContainerInterface , _overlayRef : OverlayRef ) ;
91
+ constructor ( containerInstance : _SnackBarContainer , _overlayRef : OverlayRef ) ;
84
92
_dismissAfter ( duration : number ) : void ;
85
93
_open ( ) : void ;
86
94
afterDismissed ( ) : Observable < MatSnackBarDismiss > ;
@@ -93,7 +101,7 @@ export declare class MatSnackBarRef<T> {
93
101
94
102
export declare type MatSnackBarVerticalPosition = 'top' | 'bottom' ;
95
103
96
- export declare class SimpleSnackBar implements TextOnlySnackBar {
104
+ export declare class SimpleSnackBar implements _TextOnlySnackBar {
97
105
data : {
98
106
message : string ;
99
107
action : string ;
@@ -105,11 +113,3 @@ export declare class SimpleSnackBar implements TextOnlySnackBar {
105
113
static ɵcmp : i0 . ɵɵComponentDefWithMeta < SimpleSnackBar , "simple-snack-bar" , never , { } , { } , never , never > ;
106
114
static ɵfac : i0 . ɵɵFactoryDef < SimpleSnackBar , never > ;
107
115
}
108
-
109
- export interface TextOnlySnackBar {
110
- data : {
111
- message : string ;
112
- action : string ;
113
- } ;
114
- snackBarRef : MatSnackBarRef < TextOnlySnackBar > ;
115
- }
0 commit comments