UNPKG

@engie-group/fluid-design-system-angular

Version:

Fluid Design System Angular

66 lines (65 loc) 2.35 kB
import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { DomSanitizer, SafeStyle } from '@angular/platform-browser'; import * as i0 from "@angular/core"; export declare class ToastComponent implements OnInit, OnDestroy { private sanitize; private el; private cdr; private _dismissTimeoutId?; /** * Toast unique id used to link description to close button */ toastId?: string; /** * Whether toast is inverse or not */ isInverse?: boolean; /** * Whether toast has a close icon or not */ hasCloseIcon: boolean; /** * Icon :<br> * <a href="https://material.io/resources/icons/" target="_blank">Material icons</a> */ iconName?: string; /** * Time in ms to dismiss after */ dismissAfter?: number | undefined; /** * Gauge accessible hidden label. * @example "The toast will be automatically closed in 10s" */ gaugeLabel: string; /** * Whether toast should dismiss after some time elapsed */ shouldDismiss?: boolean; /** * Outputs event when toast is closed */ closed: EventEmitter<Event>; /** * Outputs event when toast is dismissed */ dismissed: EventEmitter<void>; constructor(sanitize: DomSanitizer, el: ElementRef, cdr: ChangeDetectorRef); ngOnInit(): void; ngOnDestroy(): void; /** * @ignore */ getGaugeAnimationStyles(): SafeStyle | null; /** * Close toast */ close(event?: MouseEvent): void; /** * @ignore */ clearDismissTimeout(): void; removeToast(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "nj-toast", never, { "toastId": { "alias": "toastId"; "required": false; }; "isInverse": { "alias": "isInverse"; "required": false; }; "hasCloseIcon": { "alias": "hasCloseIcon"; "required": false; }; "iconName": { "alias": "iconName"; "required": false; }; "dismissAfter": { "alias": "dismissAfter"; "required": false; }; "gaugeLabel": { "alias": "gaugeLabel"; "required": false; }; "shouldDismiss": { "alias": "shouldDismiss"; "required": false; }; }, { "closed": "closed"; "dismissed": "dismissed"; }, never, ["*", "[njToastBody]"], true, never>; }