UNPKG

@ux-aspects/ux-aspects

Version:

Open source user interface framework for building modern, responsive, mobile big data applications

40 lines (39 loc) 2.14 kB
import { AfterViewInit, ElementRef, OnChanges, OnDestroy, QueryList } from '@angular/core'; import { Observable } from 'rxjs'; import { NotificationListDirection, NotificationRef } from './notification.service'; import * as i0 from "@angular/core"; export declare class NotificationListComponent implements AfterViewInit, OnChanges, OnDestroy { private readonly _notificationService; private readonly _changeDetectorRef; private readonly _renderer; /** * Sets the order in which notifications are displayed: `above` - newer notifications will appear above older ones. `below` - newer notifications will appear below older ones. */ set direction(direction: NotificationListDirection); /** Sets the position of the list of notifications within the browser window. */ position: NotificationListPostion; /** The list of notifications that have not been dismissed */ notifications$: Observable<NotificationRef[]>; /** Store the bottom position of the notification list */ _bottom: number; /** Store a list of all element refs */ _elements: QueryList<ElementRef>; /** Filter out any hidden notifications */ private get _notifications(); /** Unsubscribe from all subscriptions on component destroy */ private readonly _onDestroy; ngAfterViewInit(): void; ngOnChanges(): void; ngOnDestroy(): void; private applyElementPositions; private updateListPosition; /** Get the height of the notification, including spacing if configured. */ private getNotificationHeightInPixels; /** Get the total height of the element including margins. */ private getElementOuterHeightInPixels; static ɵfac: i0.ɵɵFactoryDeclaration<NotificationListComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<NotificationListComponent, "ux-notification-list", never, { "direction": { "alias": "direction"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, {}, never, never, false, never>; } export type NotificationListPostion = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';