import type { CellType as DataTableCellType } from '../../../Data/DataTable'; import type CSSObject from '../../../Core/Renderer/CSSObject'; import Column from './Column'; import Row from './Row'; declare abstract class Cell { /** * The HTML element of the cell. */ htmlElement: HTMLTableCellElement; /** * The column of the cell. */ column?: Column; /** * The row of the cell. */ row: Row; /** * The raw value of the cell. */ value: DataTableCellType; /** * An additional, custom class name that can be changed dynamically. */ private customClassName?; /** * Custom inline styles currently applied from user options. */ private customStyleProperties?; /** * Array of cell events to be removed when the cell is destroyed. */ protected cellEvents: Array<[ keyof HTMLElementEventMap, (e: Event) => void ]>; /** * Constructs a cell in the data grid. * * @param row * The row of the cell. * * @param column * The column of the cell. */ constructor(row: Row, column?: Column); /** * Initialize event listeners. Events added to the `cellEvents` array will * be registered now and unregistered when the cell is destroyed. */ protected initEvents(): void; /** * Handles the focus event on the cell. */ protected onFocus(): void; /** * Handles the blur event on the cell. */ protected onBlur(): void; /** * Renders the cell by appending the HTML element to the row. */ render(): Promise; /** * Reflows the cell dimensions. */ reflow(): void; /** * Returns the formatted string where the templating context is the cell. * * @param template * The template string. * * @return * The formatted string. */ format(template: string): string; /** * Sets the custom class name of the cell based on the template. * * @param template * The template string. */ protected setCustomClassName(template?: string): void; /** * Sets custom inline styles from options and removes the previously applied * custom styles to keep updates deterministic. * * @param styles * A style object to apply. */ protected setCustomStyles(styles?: CSSObject): void; /** * Destroys the cell. */ destroy(): void; } export default Cell;