UNPKG

@serene-dev/toast-notifications

Version:

This is an Angular Toast Notification library.

62 lines (61 loc) 3.27 kB
import { ChangeDetectorRef } from '@angular/core'; import { IAddToastNotification, IToastNotification } from './toast-notifications.model'; import { ToastNotificationsInternalService } from './toast-notifications.internal.service'; import * as i0 from "@angular/core"; /**Toast notification component. * * Reference this in your app.html file to display the notifications in the root of your UI */ export declare class ToastNotificationsComponent { protected readonly service: ToastNotificationsInternalService; protected readonly cdr: ChangeDetectorRef; /**Specify if to show the expansion button for all notifications. It overrides the global settings. */ readonly _showExpansionButton: import("@angular/core").InputSignal<boolean>; /**Horizontal position of the notification panel. It overrides the global settings. */ readonly _xPosition: import("@angular/core").InputSignal<"left" | "right" | "center">; /**Expansion handler in the event that the expand button is clicked. */ readonly _expandHandler: import("@angular/core").InputSignal<(item: IToastNotification) => any>; /**Output emitter to notify if the expansion button is clicked. */ readonly expanded: import("@angular/core").OutputEmitterRef<IToastNotification>; protected readonly showExpansionButton: import("@angular/core").Signal<boolean>; protected readonly xPosition: import("@angular/core").Signal<"left" | "right" | "center">; protected readonly expandHandler: import("@angular/core").Signal<(item: IToastNotification) => any>; protected readonly style: import("@angular/core").Signal<{ [x: string]: any; }>; protected readonly notifications: import("@angular/core").Signal<IToastNotification[]>; protected readonly notificationsEffect: import("@angular/core").EffectRef; protected expand(item: IToastNotification): void; /** * Adds a new notification item * @param item * @returns */ add(item: IAddToastNotification): { id: string; update: (update: Partial<IAddToastNotification>) => void; close: () => void; loader: { play: () => void; stop: () => void; }; closed: import("rxjs").Subject<{ manuallyClosed: boolean; }>; }; /** * Close a notification item * @param id ID of the notification * @param manualDismissal Indicate if it is a manual dismissal * @returns */ close(id: string, manualDismissal: boolean): void; /** * Update the details of a notification item * @param id ID of the notification * @param item Notification item * @returns */ update(id: string, item: Partial<IAddToastNotification>): void; static ɵfac: i0.ɵɵFactoryDeclaration<ToastNotificationsComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ToastNotificationsComponent, "toast-notifications", never, { "_showExpansionButton": { "alias": "showExpansionButton"; "required": false; "isSignal": true; }; "_xPosition": { "alias": "xPosition"; "required": false; "isSignal": true; }; "_expandHandler": { "alias": "expandHandler"; "required": false; "isSignal": true; }; }, { "expanded": "expanded"; }, never, never, true, never>; }