UNPKG

1.2 kBTypeScriptView Raw
1import { ChangeDetectorRef, NgZone, OnDestroy, AnimationTransitionEvent } from '@angular/core';
2import { Toast } from './toast';
3import { ToastOptions } from './toast-options';
4import { DomSanitizer } from '@angular/platform-browser';
5import 'rxjs/add/operator/first';
6import { Observable } from 'rxjs/Observable';
7export declare class ToastContainer implements OnDestroy {
8 private sanitizer;
9 private cdr;
10 private _zone;
11 position: string;
12 messageClass: string;
13 titleClass: string;
14 positionClass: string;
15 maxShown: number;
16 newestOnTop: boolean;
17 animate: string;
18 toasts: Toast[];
19 private _fresh;
20 private onToastClicked;
21 private _onEnter;
22 private _onExit;
23 constructor(sanitizer: DomSanitizer, cdr: ChangeDetectorRef, _zone: NgZone, options: ToastOptions);
24 onEnter(): Observable<void>;
25 onExit(): Observable<void>;
26 addToast(toast: Toast): void;
27 removeToast(toast: Toast): void;
28 removeAllToasts(): void;
29 clicked(toast: Toast): void;
30 anyToast(): boolean;
31 findToast(toastId: number): Toast | void;
32 onAnimationEnd(event: AnimationTransitionEvent): void;
33 private _ngExit();
34 ngOnDestroy(): void;
35}