UNPKG

@web-atoms/core

Version:
63 lines 2.33 kB
import { App } from "../../App"; import { AtomUri } from "../../core/AtomUri"; import FormattedString from "../../core/FormattedString"; import { IScreen } from "../../core/IScreen"; import { IClassOf, IDisposable } from "../../core/types"; import { JsonService } from "../../services/JsonService"; import { IPageOptions, NavigationService, NotifyType } from "../../services/NavigationService"; import AtomAlertWindow from "../controls/AtomAlertWindow"; import { AtomControl } from "../controls/AtomControl"; export type HostForElementFunc = ((e: HTMLElement) => HTMLElement); export declare class WindowService extends NavigationService { private jsonService; /** * This is just to preload Alert window. */ static alertWindow: typeof AtomAlertWindow; readonly screen: IScreen; private popups; private hostForElementFunc; private lastPopupID; /** * Get current window title * * @type {string} * @memberof BrowserService */ get title(): string; /** * Set current window title * @memberof BrowserService */ set title(v: string); /** * Gets current location of browser, this does not return * actual location but it returns values of browser location. * This is done to provide mocking behavior for unit testing. * * @readonly * @type {AtomLocation} * @memberof BrowserService */ get location(): AtomUri; set location(v: AtomUri); constructor(app: App, jsonService: JsonService); registerHostForWindow(f: HostForElementFunc): IDisposable; /** * Navigate current browser to given url. * @param {string} url * @memberof BrowserService */ navigate(url: string): void; back(): void; register(id: string, type: IClassOf<AtomControl>): void; confirm(message: string | FormattedString, title: string): Promise<any>; alert(message: string | FormattedString | any, title?: string): Promise<any>; refresh(): void; getHostForElement(): HTMLElement; refreshScreen(): void; notify(message: string | FormattedString, title?: string, type?: NotifyType, delay?: number): Promise<void>; protected openWindow<T>(url: AtomUri, options?: IPageOptions): Promise<T>; private centerElement; } //# sourceMappingURL=WindowService.d.ts.map