import { WidgetFileName } from '..'; import { InternalCallMethod, NamespaceBase } from './base'; import { WidgetLocation, WidgetLocationContextDataMap } from '../interfaces'; /** * # Widget Namespace * * The API Widget namespace. */ export declare class WidgetNamespace extends NamespaceBase { /** @hidden */ constructor(_call: InternalCallMethod); getWidgetsAtLocation: (location: WidgetLocation, remId?: string) => Promise<{ pluginId: string; fileName: string; }[]>; /** * Get the DOMRect representing the position of an active widget instance. * * You can get the widgetInstanceId for a widget by using the plugin.widget.getWidgetContext method() and accessing the widgetInstanceId field. */ getDimensions: (widgetInstanceId: number) => Promise; /** * Open a widget in a popup modal. */ openPopup: (widgetFileName: WidgetFileName, contextData?: any, clickOutsideToClose?: boolean) => Promise; /** * Close the open popup modal. */ closePopup: (restoreFocus?: boolean) => Promise; /** * Get a piece of data, which may include configuration, state or cached functionality. * Pass the WidgetLocation as a generic parameter to infer the return type for this method. */ getWidgetContext: () => Promise; }