bottom-sheet-ref.d.ts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.io/license
  7. */
  8. import { Location } from '@angular/common';
  9. import { OverlayRef } from '@angular/cdk/overlay';
  10. import { Observable } from 'rxjs';
  11. import { MatBottomSheetContainer } from './bottom-sheet-container';
  12. /**
  13. * Reference to a bottom sheet dispatched from the bottom sheet service.
  14. */
  15. export declare class MatBottomSheetRef<T = any, R = any> {
  16. private _overlayRef;
  17. /** Instance of the component making up the content of the bottom sheet. */
  18. instance: T;
  19. /**
  20. * Instance of the component into which the bottom sheet content is projected.
  21. * @docs-private
  22. */
  23. containerInstance: MatBottomSheetContainer;
  24. /** Whether the user is allowed to close the bottom sheet. */
  25. disableClose: boolean | undefined;
  26. /** Subject for notifying the user that the bottom sheet has been dismissed. */
  27. private readonly _afterDismissed;
  28. /** Subject for notifying the user that the bottom sheet has opened and appeared. */
  29. private readonly _afterOpened;
  30. /** Result to be passed down to the `afterDismissed` stream. */
  31. private _result;
  32. /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
  33. private _closeFallbackTimeout;
  34. constructor(containerInstance: MatBottomSheetContainer, _overlayRef: OverlayRef, _location?: Location);
  35. /**
  36. * Dismisses the bottom sheet.
  37. * @param result Data to be passed back to the bottom sheet opener.
  38. */
  39. dismiss(result?: R): void;
  40. /** Gets an observable that is notified when the bottom sheet is finished closing. */
  41. afterDismissed(): Observable<R | undefined>;
  42. /** Gets an observable that is notified when the bottom sheet has opened and appeared. */
  43. afterOpened(): Observable<void>;
  44. /**
  45. * Gets an observable that emits when the overlay's backdrop has been clicked.
  46. */
  47. backdropClick(): Observable<MouseEvent>;
  48. /**
  49. * Gets an observable that emits when keydown events are targeted on the overlay.
  50. */
  51. keydownEvents(): Observable<KeyboardEvent>;
  52. }