UNPKG

@anglr/notifications

Version:
97 lines 3.18 kB
import { InjectionToken } from '@angular/core'; import { Notification, Notifications, NotificationSeverity } from '@anglr/common'; import { Observable } from 'rxjs'; import { GlobalNotificationsProvider, LocalNotificationsProvider } from './notifications.interface'; import * as i0 from "@angular/core"; /** * Base class for notifications services */ declare abstract class ɵNotificationsService implements Notifications { /** * @inheritdoc */ get notifications(): readonly Notification[]; /** * @inheritdoc */ get notificationsChange(): Observable<void>; /** * @inheritdoc */ get destroy(): Observable<void>; /** * @inheritdoc */ message(_message: string, _severity: NotificationSeverity, _parameter?: Record<string, unknown>): Notifications; /** * @inheritdoc */ default(_message: string, _parameter?: Record<string, unknown>): Notifications; /** * @inheritdoc */ success(_message: string, _parameter?: Record<string, unknown>): Notifications; /** * @inheritdoc */ error(_message: string, _parameter?: Record<string, unknown>): Notifications; /** * @inheritdoc */ info(_message: string, _parameter?: Record<string, unknown>): Notifications; /** * @inheritdoc */ warning(_message: string, _parameter?: Record<string, unknown>): Notifications; /** * @inheritdoc */ clearNotifications(): Notifications; /** * @inheritdoc */ remove(_notification: Notification): Notifications; /** * Gets scoped instance of `Notifications` * @inheritdoc */ getScope(_scopeName: string): Notifications; /** * @inheritdoc */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ɵNotificationsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<ɵNotificationsService>; } /** * Global notification service that is used for global notifications */ export declare abstract class GlobalNotificationsService extends ɵNotificationsService implements Notifications { static ɵfac: i0.ɵɵFactoryDeclaration<GlobalNotificationsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<GlobalNotificationsService>; } /** * Local notification service that is used for local notifications */ export declare abstract class LocalNotificationsService extends ɵNotificationsService implements Notifications { static ɵfac: i0.ɵɵFactoryDeclaration<LocalNotificationsService, never>; static ɵprov: i0.ɵɵInjectableDeclaration<LocalNotificationsService>; } /** * Global notifications provider */ declare const GLOBAL_NOTIFICATIONS: GlobalNotificationsProvider; /** * Local notifications scope name */ export declare const LOCAL_NOTIFICATIONS_SCOPE_NAME = "local"; /** * Injection token for injecting local notifications scope name */ export declare const LOCAL_NOTIFICATIONS_SCOPE: InjectionToken<string>; /** * Local notifications provider */ declare const LOCAL_NOTIFICATIONS: LocalNotificationsProvider; export { GLOBAL_NOTIFICATIONS, LOCAL_NOTIFICATIONS }; //# sourceMappingURL=notifications.service.d.ts.map