@hyahfoufi/ng-snotify
Version:
Angular 2+ alternative notifications center
74 lines (73 loc) • 2.18 kB
TypeScript
import { AfterContentInit, EventEmitter, OnDestroy, OnInit } from '@angular/core';
import { SnotifyService } from '../../services/snotify.service';
import { SnotifyToast } from '../../models/snotify-toast.model';
import { Subscription } from 'rxjs';
import { SnotifyEventType } from '../../types/snotify-event.type';
import { SnotifyStyle } from '../../enums/snotify-style.enum';
import * as i0 from "@angular/core";
export declare class ToastComponent implements OnInit, OnDestroy, AfterContentInit {
private service;
/**
* Get toast from notifications array
*/
toast: any | SnotifyToast;
stateChanged: EventEmitter<SnotifyEventType>;
toastDeletedSubscription: Subscription;
toastChangedSubscription: Subscription;
/**
* requestAnimationFrame id
*/
animationFrame: number;
/**
* Toast state
*/
state: {
paused: boolean;
progress: number;
animation: string;
isDestroying: boolean;
promptType: SnotifyStyle;
};
constructor(service: SnotifyService);
/**
* Init base options. Subscribe to toast changed, toast deleted
*/
ngOnInit(): void;
ngAfterContentInit(): void;
/**
* Unsubscribe subscriptions
*/
ngOnDestroy(): void;
/**
* Trigger OnClick lifecycle
*/
onClick(): void;
/**
* Trigger beforeDestroy lifecycle. Removes toast
*/
onRemove(): void;
/**
* Trigger onHoverEnter lifecycle
*/
onMouseEnter(): void;
/**
* Trigger onHoverLeave lifecycle
*/
onMouseLeave(): void;
/**
* Remove toast completely after animation
*/
onExitTransitionEnd(): void;
/**
* Initialize base toast config
*
*/
initToast(): void;
/**
* Start progress bar
* @param startTime number
*/
startTimeout(startTime?: number): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "ng-snotify-toast", never, { "toast": { "alias": "toast"; "required": false; }; }, { "stateChanged": "stateChanged"; }, never, never, false, never>;
}