UNPKG

@eclipse-scout/core

Version:
67 lines 2.78 kB
import { DesktopNotificationEventMap, DesktopNotificationModel, EnumObject, InitModelOf, Notification as ScoutNotification, Status, StatusOrModel } from '../../index'; export declare class DesktopNotification extends ScoutNotification implements DesktopNotificationModel { model: DesktopNotificationModel; eventMap: DesktopNotificationEventMap; self: DesktopNotification; duration: number; removeTimeout: number; nativeOnly: boolean; nativeNotificationTitle: string; nativeNotificationStatus: Status; nativeNotificationVisibility: NativeNotificationVisibility; nativeNotification: Notification; nativeNotificationShown: boolean; $loader: JQuery; protected _removing: boolean; constructor(); static NativeNotificationVisibility: { /** * No native notification is shown. */ readonly NONE: "none"; /** * The native notification is only shown if the application is in background. */ readonly BACKGROUND: "background"; /** * The native notification is always shown. */ readonly ALWAYS: "always"; }; /** * When duration is set to INFINITE, the notification is not removed automatically. */ static INFINITE: number; protected _init(model: InitModelOf<this>): void; protected _render(): void; protected _renderLoading(): void; protected _destroy(): void; /** @internal */ _isDocumentHidden(): boolean; protected _showNativeNotification(permission: NotificationPermission): void; protected _initNativeNotification(): void; protected _hideLaterIfNativeOnly(): void; /** * Checks if browser supports the promise-based version of the method requestPermission. Safari only supports the older callback version. */ protected _checkNotificationPromise(): boolean; protected _onCloseIconClick(): void; /** * Displays the notification by adding it to the desktop and rendering it. */ show(): void; /** * Closes the notification by removing it from the desktop and destroying it. Also triggers a close event. */ hide(): void; fadeIn($parent: JQuery): void; fadeOut(): void; invalidateLayoutTree(): void; protected _setNativeNotificationShown(shown: boolean): void; setNativeNotificationTitle(title: string): void; setNativeNotificationStatus(status: StatusOrModel): void; protected _setNativeNotificationStatus(status: StatusOrModel): void; setNativeNotificationVisibility(visibility: NativeNotificationVisibility): void; } export type NativeNotificationVisibility = EnumObject<typeof DesktopNotification.NativeNotificationVisibility>; //# sourceMappingURL=DesktopNotification.d.ts.map