UNPKG

@webilix/ngx-helper-m3

Version:

Helper library for Angular and Material 3

42 lines (41 loc) 2.44 kB
import { ApplicationRef, Injector } from '@angular/core'; import { INgxHelperConfig } from '../ngx-helper.config'; import { INgxHelperToastConfig } from './ngx-helper-toast.interface'; import * as i0 from "@angular/core"; interface IToast { readonly icon: string; readonly textColor: string; readonly backgroundColor: string; } export declare class NgxHelperToastService { private readonly applicationRef; private readonly injector; private readonly config?; private components; constructor(applicationRef: ApplicationRef, injector: Injector, config?: Partial<INgxHelperConfig> | undefined); private getId; private updatePositions; toast(toast: IToast, message: string | string[]): void; toast(toast: IToast, message: string | string[], config: Partial<INgxHelperToastConfig>): void; toast(toast: IToast, message: string | string[], onClose: () => void): void; toast(toast: IToast, message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void; info(message: string | string[]): void; info(message: string | string[], config: Partial<INgxHelperToastConfig>): void; info(message: string | string[], onClose: () => void): void; info(message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void; success(message: string | string[]): void; success(message: string | string[], config: Partial<INgxHelperToastConfig>): void; success(message: string | string[], onClose: () => void): void; success(message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void; warning(message: string | string[]): void; warning(message: string | string[], config: Partial<INgxHelperToastConfig>): void; warning(message: string | string[], onClose: () => void): void; warning(message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void; error(message: string | string[]): void; error(message: string | string[], config: Partial<INgxHelperToastConfig>): void; error(message: string | string[], onClose: () => void): void; error(message: string | string[], config: Partial<INgxHelperToastConfig>, onClose: () => void): void; static ɵfac: i0.ɵɵFactoryDeclaration<NgxHelperToastService, [null, null, { optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<NgxHelperToastService>; } export {};