/** @packageDocumentation * @module Popup */ import * as React from "react"; import { XAndY } from "@bentley/geometry-core"; import { AbstractToolbarProps, DialogLayoutDataProvider, OnCancelFunc, OnItemExecutedFunc, OnValueCommitFunc, Primitives, PropertyDescription, PropertyRecord, RelativePosition } from "@bentley/ui-abstract"; import { Point, SizeProps, UiEvent } from "@bentley/ui-core"; import { KeyinEntry } from "../uiadmin/FrameworkUiAdmin"; /** Information maintained by PopupManager about a Popup * @alpha */ export interface PopupInfo { id: string; pt: XAndY; component: React.ReactNode; parentDocument: Document; } /** @alpha */ export interface PopupsChangedEventArgs { popups: ReadonlyArray; } /** Popups Changed Event class. * @alpha */ export declare class PopupsChangedEvent extends UiEvent { } /** Props for each popup managed by the PopupManager * @alpha */ export interface PopupPropsBase { id: string; el: HTMLElement; pt: XAndY; offset: XAndY; } /** Describes React based content * @alpha */ export interface ReactContent { reactNode: React.ReactNode; } /** Type for Popup Content * @alpha */ export declare type PopupContentType = HTMLElement | ReactContent; /** ReactContent type guard. * @internal */ export declare const isReactContent: (content: PopupContentType) => content is ReactContent; /** Popup Manager class * @alpha */ export declare class PopupManager { private static _popups; private static _editorId; private static _toolbarId; private static _htmlElementId; private static _cardId; private static _toolSettingsId; private static _keyPalettePopupId; private static _defaultOffset; static readonly onPopupsChangedEvent: PopupsChangedEvent; static get popupCount(): number; static get popups(): ReadonlyArray; static set popups(popups: ReadonlyArray); /** @internal */ static clearPopups(): void; private static addPopup; private static updatePopup; static addOrUpdatePopup(popupInfo: PopupInfo): void; static removePopup(id: string): boolean; static get defaultOffset(): XAndY; static set defaultOffset(offset: XAndY); static showInputEditor(el: HTMLElement, pt: XAndY, value: Primitives.Value, propertyDescription: PropertyDescription, onCommit: OnValueCommitFunc, onCancel: OnCancelFunc): boolean; static hideInputEditor(): boolean; static showKeyinPalette(keyins: KeyinEntry[], el: HTMLElement, onItemExecuted?: OnItemExecutedFunc, onCancel?: OnCancelFunc): boolean; static hideKeyinPalette(): boolean; static showToolbar(toolbarProps: AbstractToolbarProps, el: HTMLElement, pt: XAndY, offset: XAndY, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition: RelativePosition): boolean; static hideToolbar(): boolean; static showHTMLElement(displayElement: HTMLElement, el: HTMLElement, pt: XAndY, offset: XAndY, onCancel: OnCancelFunc, relativePosition: RelativePosition): boolean; static hideHTMLElement(): boolean; static showCard(content: PopupContentType, title: string | PropertyRecord | undefined, toolbarProps: AbstractToolbarProps | undefined, el: HTMLElement, pt: XAndY, offset: XAndY, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition: RelativePosition): boolean; static hideCard(): boolean; static openToolSettings(dataProvider: DialogLayoutDataProvider, el: HTMLElement, pt: XAndY, offset: XAndY, onCancel: OnCancelFunc, relativePosition: RelativePosition): boolean; static closeToolSettings(): boolean; static getPopupPosition(el: HTMLElement, pt: XAndY, offset: XAndY, size: SizeProps): Point; } /** @internal */ interface PopupRendererState { parentDocument: Document | null; popups: ReadonlyArray; } /** Popup Renderer * @alpha */ export declare class PopupRenderer extends React.Component<{}, PopupRendererState> { /** @internal */ readonly state: PopupRendererState; componentDidMount(): void; componentWillUnmount(): void; private _handleRefSet; render(): React.ReactNode; private _handlePopupsChangedEvent; } export {}; //# sourceMappingURL=PopupManager.d.ts.map