1 | import { NgZone } from '@angular/core';
|
2 | import { DomSanitizer } from '@angular/platform-browser';
|
3 | import { TranslateService } from '@ngx-translate/core';
|
4 | import { JhiConfigService } from '../config.service';
|
5 | export declare type JhiAlertType = 'success' | 'danger' | 'warning' | 'info';
|
6 | export interface JhiAlert {
|
7 | id?: number;
|
8 | type: JhiAlertType;
|
9 | msg: string;
|
10 | params?: any;
|
11 | timeout?: number;
|
12 | toast?: boolean;
|
13 | position?: string;
|
14 | scoped?: boolean;
|
15 | close?: (alerts: JhiAlert[]) => void;
|
16 | }
|
17 | export declare class JhiAlertService {
|
18 | private sanitizer;
|
19 | private configService;
|
20 | private ngZone;
|
21 | private translateService;
|
22 | private alertId;
|
23 | private alerts;
|
24 | private timeout;
|
25 | private toast;
|
26 | private i18nEnabled;
|
27 | constructor(sanitizer: DomSanitizer, configService: JhiConfigService, ngZone: NgZone, translateService: TranslateService);
|
28 | clear(): void;
|
29 | get(): JhiAlert[];
|
30 | success(msg: string, params?: any, position?: string): JhiAlert;
|
31 | error(msg: string, params?: any, position?: string): JhiAlert;
|
32 | warning(msg: string, params?: any, position?: string): JhiAlert;
|
33 | info(msg: string, params?: any, position?: string): JhiAlert;
|
34 | addAlert(alertOptions: JhiAlert, extAlerts: JhiAlert[]): JhiAlert;
|
35 | closeAlert(id: number, extAlerts?: JhiAlert[]): JhiAlert[];
|
36 | closeAlertByIndex(index: number, thisAlerts: JhiAlert[]): JhiAlert[];
|
37 | isToast(): boolean;
|
38 | private factory;
|
39 | }
|