import { CollectionView } from './CollectionView'; import { GroupDisplayRow } from './GroupRowModel'; /** * Read-only window over the grid's items. Everything reads rows through this * class instead of touching the source array. It is backed by a * {@link CollectionView}, so edits routed through {@link applyEdit} are tracked * when the view has trackChanges enabled. * * When the view is grouped, the grid renders a flattened list of display rows * (group headers interleaved with data rows). This class maps a display-row * index to the underlying leaf item and reports which rows are group headers. */ export declare class DataView> { private view; private groupModel; constructor(source?: T[] | CollectionView); get collectionView(): CollectionView; /** Rebuild the display-row list from the view's current group tree. */ refreshGroups(): void; get grouped(): boolean; /** Number of rows the grid renders (data rows plus visible group headers). */ get length(): number; /** The leaf item at a display-row index, or undefined for group-header rows. */ item(index: number): T; rowType(index: number): 'group' | 'data'; /** The group-header descriptor at a display-row index, or null for data rows. */ groupRow(index: number): GroupDisplayRow | null; /** Map a display-row index to a leaf index in the view, or -1 for group rows. */ dataIndexAt(index: number): number; toggleGroup(pathKey: string): void; collapseAllGroups(): void; expandAllGroups(): void; /** Path keys of the currently collapsed groups. */ collapsedGroups(): string[]; /** Restore the collapsed groups from saved path keys. */ setCollapsedGroups(keys: string[]): void; setItems(items: T[]): void; /** Run a mutation inside an edit transaction so the change view can record it. */ applyEdit(item: T, mutate: () => void): void; }