import type { BaseContext } from '../AdaptableState/Common/BaseContext'; /** * CSS Selector used to target elements by CSS selectors (e.g. class, attribute, etc.) rather than elementID */ export interface AdaptableCSSSelector { /** * CSS Selector that locates DOM element */ selector: string; } /** * A resolved (non-function) container reference * * - `string` — an element ID (resolved via `document.getElementById`) * - `AdaptableCSSSelector` — a CSS selector (resolved via `document.querySelector`) * - `HTMLElement` — a direct reference to a DOM element */ export type AdaptableContainerValue = string | AdaptableCSSSelector | HTMLElement; /** * Context available to `adaptableContainer` and `agGridContainer` function callbacks (resolve **before** AdapTable initialises, so `adaptableApi` not available) */ export interface InitContainerContext { /** * Id of current AdapTable instance */ adaptableId: string; /** * Current Adaptable State Key */ adaptableStateKey: string; /** * Custom application Context provided in `AdaptableOptions.adaptableContext` */ adaptableContext: any; } /** * Context available to `modalContainer`, `systemStatusContainer`, `alertContainer` and `transposedViewContainer` function callbacks */ export type ContainerContext = BaseContext; /** * Options for managing the different div elements required by AdapTable */ export interface ContainerOptions { /** * Div containing AdapTable; element Id, CSS Selector, HTMLElement, or function returning one of these * @defaultValue "adaptable" * @gridInfoItem */ adaptableContainer?: AdaptableContainerValue | ((context: InitContainerContext) => AdaptableContainerValue); /** * Div containing AG Grid instance; element Id, CSS Selector, HTMLElement, or function returning one of these. * @defaultValue "grid" * @gridInfoItem */ agGridContainer?: AdaptableContainerValue | ((context: InitContainerContext) => AdaptableContainerValue); /** * Name of div where popups appear;element Id, CSS Selector, HTMLElement, or function returning one of these * @defaultValue undefined (centre of screen) * @gridInfoItem */ modalContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue); /** * Div to show System Status Messages; elementId, CSS Selector, HTMLElement, or function returning one of these * @defaultValue undefined * @gridInfoItem */ systemStatusContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue); /** * Div to display Alerts; elementId, CSS Selector, HTMLElement, or function returning one of these * @defaultValue undefined * @gridInfoItem */ alertContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue); /** * Div to render a Transposed View; elementId, CSS Selector, HTMLElement, or function returning one of these * @defaultValue undefined (rendered in a draggable popup window) * @gridInfoItem */ transposedViewContainer?: AdaptableContainerValue | ((context: ContainerContext) => AdaptableContainerValue); }