/** * Mounts a popup editor above the grid, positioned against its cell. * * Inline editors live inside `.pg-cell__inner` and are clipped by the grid's * scroll container — which is correct for a text input and fatal for a calendar * or a searchable list. A popup editor is therefore portalled out of the grid * entirely and positioned in viewport coordinates. * * The portal host and the placement maths are the ones the rest of the grid * already uses ({@link portalHostFor}, {@link placeOverlay}), so a popup editor * inherits the active theme scope and the same flip/clamp behaviour as every * other overlay, rather than growing a third copy that drifts. * * @packageDocumentation */ /** Options for {@link PopupService.open}. */ export interface PopupOpenOptions { /** The editor's root element, as returned by `ICellEditor.getGui()`. */ readonly gui: HTMLElement; /** The `.pg-cell` the editor belongs to; the popup is anchored to its rect. */ readonly cellEl: HTMLElement; /** * Accessible name for the dialog — the column header, so a screen reader * announces "Price, dialog" rather than an anonymous group. */ readonly ariaLabel: string; /** * Called when the user dismisses the popup — by clicking outside it, or by * scrolling the grid underneath it. The grid treats that as a commit, matching * what clicking away from an inline editor does; the manager decides, not this * service. */ readonly onDismiss: () => void; } /** A live popup, returned by {@link PopupService.open}. */ export interface PopupHandle { /** The wrapper element actually inserted into the portal. */ readonly element: HTMLElement; /** Re-runs placement — call after the editor's content changes size. */ reposition(): void; /** Removes the popup and every listener it installed. Idempotent. */ close(): void; } /** * Opens and tears down popup editors. * * Stateless between calls — each {@link open} returns its own handle — so one * instance is safely shared by a whole grid, and nothing leaks if a session is * abandoned without a matching `close()` (the handle owns all its listeners). */ export declare class PopupService { /** * Portals `gui` into an anchored, dismissible popup. * * The popup is positioned before it is made visible, so it never appears at * the origin for a frame and slides into place. * * @returns A handle owning the popup's lifetime. */ open(options: PopupOpenOptions): PopupHandle; } //# sourceMappingURL=popup-service.d.ts.map