UNPKG

ag-grid-community

Version:

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

64 lines (63 loc) 2.38 kB
import type { AfterGuiAttachedParams } from './iAfterGuiAttachedParams'; /** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */ export type AddPopupParams<TContainerType extends string> = LabelAddPopupParams<TContainerType> | OwnsAddPopupParams<TContainerType>; interface BaseAddPopupParams<TContainerType extends string> { modal?: boolean; eChild: HTMLElement; closeOnEsc?: boolean; closedCallback?: (e?: MouseEvent | TouchEvent | KeyboardEvent) => void; click?: MouseEvent | Touch | null; alwaysOnTop?: boolean; afterGuiAttached?: (params: AfterGuiAttachedParams<TContainerType>) => void; positionCallback?: () => void; anchorToElement?: HTMLElement; } interface LabelAddPopupParams<TContainerType extends string> extends BaseAddPopupParams<TContainerType> { ariaLabel: string; ariaOwns?: never; } interface OwnsAddPopupParams<TContainerType extends string> extends BaseAddPopupParams<TContainerType> { ariaLabel?: never; ariaOwns: HTMLElement; } export interface PopupEventParams { originalMouseEvent?: MouseEvent | Touch | null; mouseEvent?: MouseEvent; touchEvent?: TouchEvent; keyboardEvent?: KeyboardEvent; forceHide?: boolean; } /** @internal AG_GRID_INTERNAL - Not for public use. Can change / be removed at any time. */ export interface AddPopupResult { hideFunc: (params?: PopupEventParams) => void; } interface BasePopupPositionParams<TParams> { ePopup: HTMLElement; additionalParams?: TParams; } export interface AgPopupPositionParams<TParams> extends BasePopupPositionParams<TParams> { nudgeX?: number; nudgeY?: number; position?: 'over' | 'under'; alignSide?: 'left' | 'right'; keepWithinBounds?: boolean; skipObserver?: boolean; updatePosition?: () => { x: number; y: number; }; postProcessCallback?: () => void; } export interface AgComponentPopupPositionParams<TParams> extends AgPopupPositionParams<TParams> { type: string; eventSource: HTMLElement; } export interface AgMousePopupPositionParams<TParams> extends AgPopupPositionParams<TParams> { type: string; mouseEvent: MouseEvent | Touch; } export interface AgMenuPopupPositionParams<TParams> extends BasePopupPositionParams<TParams> { eventSource: HTMLElement; event?: MouseEvent | KeyboardEvent; } export {};