UNPKG

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