toast.component.d.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import { NgZone, OnDestroy } from '@angular/core';
  2. import { SafeHtml } from '@angular/platform-browser';
  3. import { IndividualConfig, ToastPackage } from './toastr-config';
  4. import { ToastrService } from './toastr.service';
  5. export declare class Toast implements OnDestroy {
  6. protected toastrService: ToastrService;
  7. toastPackage: ToastPackage;
  8. protected ngZone?: NgZone;
  9. message?: string | SafeHtml | 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. readonly displayStyle: string;
  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: Function, timeout: number): void;
  54. outsideInterval(func: Function, timeout: number): void;
  55. private runInsideAngular;
  56. }