ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
46 lines (45 loc) • 1.87 kB
TypeScript
import type { BeanCollection } from '../../context/context';
import type { AgColumn } from '../../entities/agColumn';
import type { RowNode } from '../../entities/rowNode';
import type { CellPosition } from '../../interfaces/iCellPosition';
export declare class CellSpan {
readonly col: AgColumn;
readonly firstNode: RowNode;
readonly cellSpan = true;
readonly spannedNodes: Set<RowNode>;
private lastNode;
constructor(col: AgColumn, firstNode: RowNode);
/**
* Reset the span leaving only the head.
* Head is used as a comparison as this is the row used to render this cell
* Even if the row data changes, the cell will properly reflect the correct value.
*/
reset(): void;
addSpannedNode(node: RowNode): void;
getLastNode(): RowNode;
getCellHeight(): number;
doesSpanContain(cellPosition: CellPosition): boolean;
/**
* The height `row` needs for the cell measured on the first row: only the last row carries it, less the rows
* above (0 or less once they cover it). Null for the other rows, undefined until measured.
*/
getRowAutoHeight(row: RowNode): number | null | undefined;
}
/**
* Belongs to a column, when cells are to be rendered they call back to this service with the values.
* This service determines if the cell should instead be replaced with a spanning cell, in which case the cell is
* stretched over multiple rows.
*
* Only create if spanning is enabled for this column.
*/
export declare class RowSpanCache {
private readonly beans;
readonly column: AgColumn;
private centerValueNodeMap;
private topValueNodeMap;
private bottomValueNodeMap;
constructor(beans: BeanCollection, column: AgColumn);
buildCache(pinned: 'top' | 'center' | 'bottom'): void;
getCellSpan(node: RowNode): CellSpan | undefined;
private getNodeMap;
}