UNPKG

@serene-dev/toast-notifications

Version:

This is an Angular Toast Notification library.

37 lines (36 loc) 1.67 kB
import { Observable } from 'rxjs'; import { IToastComponentConfig } from './toast-notifications.model'; import { ToastNotificationsInternalService } from './toast-notifications.internal.service'; import * as i0 from "@angular/core"; /**Service to manage all instances of the notification component. */ export declare class ToastNotificationsService { /**Set this to configure a custom label formatter. */ labelPipe: (value: string) => Observable<string>; protected internalService: ToastNotificationsInternalService; /**Global configuration */ readonly config: import("@angular/core").Signal<IToastComponentConfig>; /** * Update the global configuration. * @param val */ updateConfig(val: Partial<IToastComponentConfig>): void; /**Shortcut functions for managing the notifications */ toastShortcut: () => { add: (item: import("./toast-notifications.model").IAddToastNotification) => { id: string; update: (update: Partial<import("./toast-notifications.model").IAddToastNotification>) => void; close: () => void; loader: { play: () => void; stop: () => void; }; closed: import("rxjs").Subject<{ manuallyClosed: boolean; }>; }; close: (id: string, manualDismissal: boolean) => void; update: (id: string, item: Partial<import("./toast-notifications.model").IAddToastNotification>) => void; }; static ɵfac: i0.ɵɵFactoryDeclaration<ToastNotificationsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ToastNotificationsService>; }