1 | import { AnimationEvent as AnimationEvent_2 } from '@angular/animations';
|
2 | import { AnimationTriggerMetadata } from '@angular/animations';
|
3 | import { BreakpointObserver } from '@angular/cdk/layout';
|
4 | import { CdkDialogContainer } from '@angular/cdk/dialog';
|
5 | import { ChangeDetectorRef } from '@angular/core';
|
6 | import { ComponentType } from '@angular/cdk/portal';
|
7 | import { DialogConfig } from '@angular/cdk/dialog';
|
8 | import { DialogRef } from '@angular/cdk/dialog';
|
9 | import { Direction } from '@angular/cdk/bidi';
|
10 | import { ElementRef } from '@angular/core';
|
11 | import { EventEmitter } from '@angular/core';
|
12 | import { FocusMonitor } from '@angular/cdk/a11y';
|
13 | import { FocusTrapFactory } from '@angular/cdk/a11y';
|
14 | import * as i0 from '@angular/core';
|
15 | import * as i2 from '@angular/cdk/dialog';
|
16 | import * as i3 from '@angular/material/core';
|
17 | import * as i4 from '@angular/cdk/portal';
|
18 | import { InjectionToken } from '@angular/core';
|
19 | import { Injector } from '@angular/core';
|
20 | import { InteractivityChecker } from '@angular/cdk/a11y';
|
21 | import { NgZone } from '@angular/core';
|
22 | import { Observable } from 'rxjs';
|
23 | import { OnDestroy } from '@angular/core';
|
24 | import { Overlay } from '@angular/cdk/overlay';
|
25 | import { OverlayRef } from '@angular/cdk/overlay';
|
26 | import { ScrollStrategy } from '@angular/cdk/overlay';
|
27 | import { TemplateRef } from '@angular/core';
|
28 | import { ViewContainerRef } from '@angular/core';
|
29 |
|
30 |
|
31 | export declare type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
|
32 |
|
33 | declare namespace i1 {
|
34 | export {
|
35 | MatBottomSheetContainer
|
36 | }
|
37 | }
|
38 |
|
39 |
|
40 | export declare const MAT_BOTTOM_SHEET_DATA: InjectionToken<any>;
|
41 |
|
42 |
|
43 | export declare const MAT_BOTTOM_SHEET_DEFAULT_OPTIONS: InjectionToken<MatBottomSheetConfig<any>>;
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | export declare class MatBottomSheet implements OnDestroy {
|
49 | private _overlay;
|
50 | private _parentBottomSheet;
|
51 | private _defaultOptions?;
|
52 | private _bottomSheetRefAtThisLevel;
|
53 | private _dialog;
|
54 |
|
55 | get _openedBottomSheetRef(): MatBottomSheetRef<any> | null;
|
56 | set _openedBottomSheetRef(value: MatBottomSheetRef<any> | null);
|
57 | constructor(_overlay: Overlay, injector: Injector, _parentBottomSheet: MatBottomSheet, _defaultOptions?: MatBottomSheetConfig<any> | undefined);
|
58 | /**
|
59 | * Opens a bottom sheet containing the given component.
|
60 | * @param component Type of the component to load into the bottom sheet.
|
61 | * @param config Extra configuration options.
|
62 | * @returns Reference to the newly-opened bottom sheet.
|
63 | */
|
64 | open<T, D = any, R = any>(component: ComponentType<T>, config?: MatBottomSheetConfig<D>): MatBottomSheetRef<T, R>;
|
65 | /**
|
66 | * Opens a bottom sheet containing the given template.
|
67 | * @param template TemplateRef to instantiate as the bottom sheet content.
|
68 | * @param config Extra configuration options.
|
69 | * @returns Reference to the newly-opened bottom sheet.
|
70 | */
|
71 | open<T, D = any, R = any>(template: TemplateRef<T>, config?: MatBottomSheetConfig<D>): MatBottomSheetRef<T, R>;
|
72 | /**
|
73 | * Dismisses the currently-visible bottom sheet.
|
74 | * @param result Data to pass to the bottom sheet instance.
|
75 | */
|
76 | dismiss<R = any>(result?: R): void;
|
77 | ngOnDestroy(): void;
|
78 | static ɵfac: i0.ɵɵFactoryDeclaration<MatBottomSheet, [null, null, { optional: true; skipSelf: true; }, { optional: true; }]>;
|
79 | static ɵprov: i0.ɵɵInjectableDeclaration<MatBottomSheet>;
|
80 | }
|
81 |
|
82 |
|
83 | export declare const matBottomSheetAnimations: {
|
84 | readonly bottomSheetState: AnimationTriggerMetadata;
|
85 | };
|
86 |
|
87 |
|
88 |
|
89 |
|
90 | export declare class MatBottomSheetConfig<D = any> {
|
91 |
|
92 | viewContainerRef?: ViewContainerRef;
|
93 |
|
94 | panelClass?: string | string[];
|
95 |
|
96 | direction?: Direction;
|
97 |
|
98 | data?: D | null;
|
99 |
|
100 | hasBackdrop?: boolean;
|
101 |
|
102 | backdropClass?: string;
|
103 |
|
104 | disableClose?: boolean;
|
105 |
|
106 | ariaLabel?: string | null;
|
107 | |
108 |
|
109 |
|
110 |
|
111 |
|
112 | closeOnNavigation?: boolean;
|
113 | |
114 |
|
115 |
|
116 |
|
117 |
|
118 | autoFocus?: AutoFocusTarget | string | boolean;
|
119 | |
120 |
|
121 |
|
122 |
|
123 | restoreFocus?: boolean;
|
124 |
|
125 | scrollStrategy?: ScrollStrategy;
|
126 | }
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 | export declare class MatBottomSheetContainer extends CdkDialogContainer implements OnDestroy {
|
133 | private _changeDetectorRef;
|
134 | private _breakpointSubscription;
|
135 |
|
136 | _animationState: 'void' | 'visible' | 'hidden';
|
137 |
|
138 | _animationStateChanged: EventEmitter<AnimationEvent_2>;
|
139 |
|
140 | private _destroyed;
|
141 | constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, document: any, config: DialogConfig, checker: InteractivityChecker, ngZone: NgZone, overlayRef: OverlayRef, breakpointObserver: BreakpointObserver, _changeDetectorRef: ChangeDetectorRef, focusMonitor?: FocusMonitor);
|
142 | /** Begin animation of bottom sheet entrance into view. */
|
143 | enter(): void;
|
144 | /** Begin animation of the bottom sheet exiting from view. */
|
145 | exit(): void;
|
146 | ngOnDestroy(): void;
|
147 | _onAnimationDone(event: AnimationEvent_2): void;
|
148 | _onAnimationStart(event: AnimationEvent_2): void;
|
149 | protected _captureInitialFocus(): void;
|
150 | private _toggleClass;
|
151 | static ɵfac: i0.ɵɵFactoryDeclaration<MatBottomSheetContainer, [null, null, { optional: true; }, null, null, null, null, null, null, null]>;
|
152 | static ɵcmp: i0.ɵɵComponentDeclaration<MatBottomSheetContainer, "mat-bottom-sheet-container", never, {}, {}, never, never, false>;
|
153 | }
|
154 |
|
155 | export declare class MatBottomSheetModule {
|
156 | static ɵfac: i0.ɵɵFactoryDeclaration<MatBottomSheetModule, never>;
|
157 | static ɵmod: i0.ɵɵNgModuleDeclaration<MatBottomSheetModule, [typeof i1.MatBottomSheetContainer], [typeof i2.DialogModule, typeof i3.MatCommonModule, typeof i4.PortalModule], [typeof i1.MatBottomSheetContainer, typeof i3.MatCommonModule]>;
|
158 | static ɵinj: i0.ɵɵInjectorDeclaration<MatBottomSheetModule>;
|
159 | }
|
160 |
|
161 |
|
162 |
|
163 |
|
164 | export declare class MatBottomSheetRef<T = any, R = any> {
|
165 | private _ref;
|
166 |
|
167 | get instance(): T;
|
168 | |
169 |
|
170 |
|
171 |
|
172 | containerInstance: MatBottomSheetContainer;
|
173 |
|
174 | disableClose: boolean | undefined;
|
175 |
|
176 | private readonly _afterOpened;
|
177 |
|
178 | private _result;
|
179 |
|
180 | private _closeFallbackTimeout;
|
181 | constructor(_ref: DialogRef<R, T>, config: MatBottomSheetConfig, containerInstance: MatBottomSheetContainer);
|
182 | /**
|
183 | * Dismisses the bottom sheet.
|
184 | * @param result Data to be passed back to the bottom sheet opener.
|
185 | */
|
186 | dismiss(result?: R): void;
|
187 | /** Gets an observable that is notified when the bottom sheet is finished closing. */
|
188 | afterDismissed(): Observable<R | undefined>;
|
189 | /** Gets an observable that is notified when the bottom sheet has opened and appeared. */
|
190 | afterOpened(): Observable<void>;
|
191 | /**
|
192 | * Gets an observable that emits when the overlay's backdrop has been clicked.
|
193 | */
|
194 | backdropClick(): Observable<MouseEvent>;
|
195 | /**
|
196 | * Gets an observable that emits when keydown events are targeted on the overlay.
|
197 | */
|
198 | keydownEvents(): Observable<KeyboardEvent>;
|
199 | }
|
200 |
|
201 | export { }
|