angular2-advanced-notifications
Version:
UI and native notifications library for Angular
35 lines (34 loc) • 1.36 kB
TypeScript
import { Subject } from 'rxjs/Subject';
import { Alert } from './alert/alert.type';
import { GlobalAlertConfig } from './alert/globalAlertConfig.type';
import { AnAlertTypes } from './alert/alertTypes.enum';
import { Notification } from './native/notification.type';
export declare class AnBusService {
private globalAlertConfig;
private showAlertSource;
private hideAlertSource;
private hideAlertsSource;
private hideAllAlertsSource;
private showNotificationSource;
private notificationApiPermissions;
private documentVisibilityStates;
$$onClose: Subject<string>;
showAlert$: Subject<Alert>;
hideAlert$: Subject<string>;
hideAlerts$: Subject<{}>;
hideAllAlerts$: Subject<{}>;
onClose$: Subject<string>;
alertTypes: typeof AnAlertTypes;
setGlobalConfigForAlerts(config: GlobalAlertConfig): void;
getGlobalConfigForAlerts(): GlobalAlertConfig;
showAlert(config: Alert): {
id: string;
hide: () => void;
};
hideAlerts(alertsIds?: Array<string>): void;
hideAllAlerts(): void;
requestNotificationPermission(): Promise<boolean>;
showNotification(options: Notification, showIfDocumentVisible?: boolean): Promise<Notification>;
private _createNativeNotification(options, showIfDocumentVisible?);
private _hideAlert(id);
}