import MockGridModel from './MockGridModel'; import type ExpandableGridModel from './ExpandableGridModel'; import { type ModelIndex } from './GridMetrics'; type ChildrenTreeMap = Map; /** * A class to mock a tree model so can test out tree models. * Whenever a row is expanded, it creates a child model for that row, which can then make a child for those rows, etc. */ declare class MockTreeGridModel extends MockGridModel implements ExpandableGridModel { static DEFAULT_ROW_COUNT: number; static DEFAULT_COLUMN_COUNT: number; /** How many rows a child tree should have related to the parent. Eg. if parent has 10000 rows, child will have 100 */ static DEFAULT_CHILD_ROW_COUNT_FACTOR: number; static MIN_CHILD_ROW_COUNT: number; static MAX_DEPTH: number; private children; private childRowCount; private maxDepth; constructor({ rowCount, columnCount, children, childRowCount, maxDepth, }?: { children?: ChildrenTreeMap; columnCount?: number; rowCount?: number; childRowCount?: number; maxDepth?: number; }); textForCell(column: ModelIndex, row: ModelIndex): string; textForRowHeader(row: ModelIndex): string; isRowMovable(row: ModelIndex): boolean; get hasExpandableRows(): boolean; get isExpandAllAvailable(): boolean; get floatingBottomRowCount(): number; isRowExpandable(row: ModelIndex): boolean; isRowExpanded(row: ModelIndex): boolean; setRowExpanded(row: ModelIndex, isExpanded: boolean, expandDescendants?: boolean): void; expandAll(): void; collapseAll(): void; depthForRow(row: ModelIndex): number; /** * Returns the map key and the offsetRow given the provided children and row index. * If the returned key is null, then this offset row is within this model. * Only returning the key instead of the model so that memoize doesn't cache a bunch of the children models after they've been deleted (collapsed). */ getCachedModelRowOffset: ((children: ChildrenTreeMap, row: ModelIndex) => { key: ModelIndex | null; offsetRow: ModelIndex; }) & import("@types/memoizee").Memoized<(children: ChildrenTreeMap, row: ModelIndex) => { key: ModelIndex | null; offsetRow: ModelIndex; }>; getCachedTextForRowHeader: ((children: ChildrenTreeMap, row: ModelIndex) => string) & import("@types/memoizee").Memoized<(children: ChildrenTreeMap, row: ModelIndex) => string>; getCachedTextForCell: ((children: ChildrenTreeMap, column: ModelIndex, row: ModelIndex) => string) & import("@types/memoizee").Memoized<(children: ChildrenTreeMap, column: ModelIndex, row: ModelIndex) => string>; getCachedIsRowExpandable: ((children: ChildrenTreeMap, row: ModelIndex, maxDepth: number) => boolean) & import("@types/memoizee").Memoized<(children: ChildrenTreeMap, row: ModelIndex, maxDepth: number) => boolean>; getCachedIsRowExpanded: ((children: ChildrenTreeMap, row: ModelIndex) => boolean) & import("@types/memoizee").Memoized<(children: ChildrenTreeMap, row: ModelIndex) => boolean>; getCachedDepthForRow: ((children: ChildrenTreeMap, row: ModelIndex) => number) & import("@types/memoizee").Memoized<(children: ChildrenTreeMap, row: ModelIndex) => number>; } export default MockTreeGridModel; //# sourceMappingURL=MockTreeGridModel.d.ts.map