import { Service } from './metadata'; import { Observable } from 'rxjs'; import { ViewProperties } from '@scion/workbench-application-platform.api'; /** * Allows interaction with workbench views. * * A view is a visual component within the Workbench to present content, * and which can be arranged in a view grid. */ export declare class ViewService implements Service { private _destroy$; private _active$; private _destroyNotifier; constructor(); private onHostMessage; /** * Sets properties of the view which is currently showing this application. */ setProperties(properties: ViewProperties): void; /** * Gets properties of the view which is currently showing this application. */ getProperties(): Promise; /** * Closes the view which is currently showing this application. */ close(): void; /** * Sets a notifier function which is called upon view destruction. * The notifier must return a falsy value to prevent view destruction, * either as a boolean value or as an observable which emits a boolean value. */ setDestroyNotifier(destroyNotifier: DestroyNotifier): void; /** * Indicates whether this view is the active viewpart view. * Emits the current state upon subscription. */ get active$(): Observable; onDestroy(): void; private handleActiveChange; private handleBeforeDestroy; } /** * Notifier function which is called upon view destruction. * The notifier must return a falsy value to prevent view destruction, * either as a boolean value or as an observable which emits a boolean value. */ declare type DestroyNotifier = () => Observable | Promise | boolean; export {};