ag-charts-community
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
79 lines (78 loc) • 3.57 kB
TypeScript
import type { AgChartThemeParams } from 'ag-charts-types';
import { BBox } from '../scene/bbox';
import { BaseManager } from '../util/baseManager';
import { type Size } from '../util/sizeMonitor';
declare const DOM_ELEMENT_CLASSES: readonly ["styles", "canvas", "canvas-center", "canvas-container", "canvas-overlay", "canvas-proxy", "series-area", "tooltip-container"];
type DOMElementClass = (typeof DOM_ELEMENT_CLASSES)[number];
type DOMInsertOption = {
where: InsertPosition;
query: string;
};
type Events = {
readonly type: 'hidden';
} | {
readonly type: 'resize';
} | {
readonly type: 'container-changed';
};
export declare class DOMManager extends BaseManager<Events['type'], Events> {
private readonly styleContainer?;
readonly mode: 'normal' | 'minimal';
private static readonly batchedUpdateContainer;
private static readonly headStyles;
readonly anchorName: string;
private readonly rootElements;
private readonly styles;
private readonly element;
private pendingContainer?;
private container?;
private documentRoot?;
private initiallyConnected?;
containerSize?: Size;
private readonly tabGuards?;
private readonly observer?;
private readonly sizeMonitor;
private readonly cursorState;
private minWidth;
private minHeight;
constructor(initialContainer?: HTMLElement, styleContainer?: HTMLElement | undefined, mode?: 'normal' | 'minimal');
private initDOM;
private initRootElements;
destroy(): void;
postRenderUpdate(): void;
private applyBatchedUpdateContainer;
setSizeOptions(minWidth?: number, minHeight?: number, optionsWidth?: number, optionsHeight?: number): void;
private updateContainerSize;
setTabGuardIndex(tabIndex: number): void;
setContainer(newContainer?: HTMLElement): void;
updateContainer(): void;
setThemeClass(themeClassName: string): void;
setThemeParameters(params: AgChartThemeParams): void;
updateCanvasLabel(ariaLabel: string): void;
private getEventElement;
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
/** Get the main chart area client bound rect. */
getBoundingClientRect(): DOMRect;
/**
* Get the client bounding rect for overlay elements that might float outside the bounds of the
* main chart area.
*/
getOverlayClientRect(): DOMRect;
private getRawOverlayClientRect;
private getShadowDocumentRoot;
getParent(domElementClass: DOMElementClass): HTMLElement;
getChildBoundingClientRect(type: DOMElementClass): BBox;
isManagedChildDOMElement(el: HTMLElement, domElementClass: DOMElementClass, id: string): boolean;
contains(element: HTMLElement, domElementClass?: DOMElementClass): boolean;
addStyles(id: string, styles: string): void;
removeStyles(id: string): void;
updateCursor(callerId: string, style?: string): void;
getCursor(): string;
addChild(domElementClass: DOMElementClass, id: string, child?: HTMLElement, insert?: DOMInsertOption): HTMLElement;
removeChild(domElementClass: DOMElementClass, id: string): void;
incrementDataCounter(name: string): void;
setDataBoolean(name: string, value: boolean): void;
private updateContainerClassName;
}
export {};