UNPKG

1.65 kBTypeScriptView Raw
1import { NgZone, OnDestroy } from '@angular/core';
2import { IndividualConfig, ToastPackage } from './toastr-config';
3import { ToastrService } from './toastr.service';
4export declare class Toast implements OnDestroy {
5 protected toastrService: ToastrService;
6 toastPackage: ToastPackage;
7 protected ngZone?: NgZone;
8 message?: string | null;
9 title?: string;
10 options: IndividualConfig;
11 duplicatesCount: number;
12 originalTimeout: number;
13 /** width of progress bar */
14 width: number;
15 /** a combination of toast type and options.toastClass */
16 toastClasses: string;
17 /** controls animation */
18 state: {
19 value: string;
20 params: {
21 easeTime: string | number;
22 easing: string;
23 };
24 };
25 /** hides component when waiting to be displayed */
26 get displayStyle(): string | undefined;
27 private timeout;
28 private intervalId;
29 private hideTime;
30 private sub;
31 private sub1;
32 private sub2;
33 private sub3;
34 constructor(toastrService: ToastrService, toastPackage: ToastPackage, ngZone?: NgZone);
35 ngOnDestroy(): void;
36 /**
37 * activates toast and sets timeout
38 */
39 activateToast(): void;
40 /**
41 * updates progress bar width
42 */
43 updateProgress(): void;
44 resetTimeout(): void;
45 /**
46 * tells toastrService to remove this toast after animation time
47 */
48 remove(): void;
49 tapToast(): void;
50 stickAround(): void;
51 delayedHideToast(): void;
52 outsideTimeout(func: () => any, timeout: number): void;
53 outsideInterval(func: () => any, timeout: number): void;
54 private runInsideAngular;
55}