UNPKG

1.68 kBTypeScriptView Raw
1import { ModuleWithProviders } from '@angular/core';
2import { ApplicationRef, OnDestroy } from '@angular/core';
3import { GlobalConfig, IndividualConfig, ToastPackage } from './toastr-config';
4import { ToastrService } from './toastr.service';
5export declare class ToastNoAnimation implements OnDestroy {
6 protected toastrService: ToastrService;
7 toastPackage: ToastPackage;
8 protected appRef: ApplicationRef;
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 /** hides component when waiting to be displayed */
19 get displayStyle(): string;
20 /** controls animation */
21 state: string;
22 private timeout;
23 private intervalId;
24 private hideTime;
25 private sub;
26 private sub1;
27 private sub2;
28 private sub3;
29 constructor(toastrService: ToastrService, toastPackage: ToastPackage, appRef: ApplicationRef);
30 ngOnDestroy(): void;
31 /**
32 * activates toast and sets timeout
33 */
34 activateToast(): void;
35 /**
36 * updates progress bar width
37 */
38 updateProgress(): void;
39 resetTimeout(): void;
40 /**
41 * tells toastrService to remove this toast after animation time
42 */
43 remove(): void;
44 tapToast(): void;
45 stickAround(): void;
46 delayedHideToast(): void;
47}
48export declare const DefaultNoAnimationsGlobalConfig: GlobalConfig;
49export declare class ToastNoAnimationModule {
50 static forRoot(config?: Partial<GlobalConfig>): ModuleWithProviders<ToastNoAnimationModule>;
51}