UNPKG

ag-grid-enterprise

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

50 lines (49 loc) 1.85 kB
import type { Note, _Alignment } from 'ag-grid-community'; import { BeanStub } from 'ag-grid-community'; type NotesPopupPlacementMode = 'cell' | 'fullWidthRow'; type BoundsRect = Pick<DOMRectReadOnly, 'top' | 'left' | 'right' | 'bottom'>; type PopupSize = Pick<DOMRectReadOnly, 'width' | 'height'>; interface NotesPopupPositionParams { anchorRect: BoundsRect; parentRect: BoundsRect; popupSize: PopupSize; placementMode: NotesPopupPlacementMode; enableRtl: boolean; } /** @knipIgnore Used in tests */ export declare function buildEditedNote(note: Note | undefined, nextText: string | null | undefined): Note | undefined; export declare class AgNotesPopup extends BeanStub { private readonly params; private dialog?; private contentComp?; private saveOnClose; private closed; constructor(params: { note?: Note; readOnly?: boolean; anchorToElement: HTMLElement; placementMode: NotesPopupPlacementMode; focusEditor?: boolean; onClosed: (noteChanged: boolean, note: Note | undefined, closeEvent?: MouseEvent | TouchEvent | KeyboardEvent) => void; onPopupEnter: () => void; onPopupLeave: () => void; }); postConstruct(): void; hide(save?: boolean): void; focusEditor(): void; hasFocus(): boolean; private onPotentialLeave; private computeInitialPosition; /** Called by Dialog's closedCallback (Escape key, click outside, etc.) */ private onDialogClosed; destroy(): void; private notifyClosed; } /** @knipIgnore Used in tests */ export declare function findNotesPopupPosition(params: NotesPopupPositionParams): { x: number; y: number; }; /** @knipIgnore Used in tests */ export declare function getNotesPopupPlacements(mode: NotesPopupPlacementMode, enableRtl?: boolean): _Alignment[]; export {};