import type { RowNode } from '../../types/row.types'; import type { SelectionConfig } from '../../types/grid.types'; import type { GridStore } from '../../core/grid-store'; import type { EventBus } from '../../event-bus/event-bus'; export declare class RowSelectionEngine { private store; private eventBus; private config; /** Row index the current drag/range anchors from; null when idle. */ private dragAnchorIndex; /** * Selection that existed when a Ctrl/Cmd drag began. The live range is unioned * onto this each `extendRowDrag`, so a modifier-drag adds to the prior * selection while a plain drag (empty base) replaces it. */ private dragBaseIds; private _isRowDragging; constructor(store: GridStore, eventBus: EventBus); configure(config: Partial): void; /** Whether the serial column is configured to drive row selection. */ get serialColumnSelection(): boolean; /** Whether a serial-column drag selection is in progress. */ get isRowDragging(): boolean; selectRow(nodeId: string, rows: RowNode[]): void; deselectRow(nodeId: string, rows: RowNode[]): void; toggleRowSelection(nodeId: string, rows: RowNode[]): void; selectRows(nodeIds: string[], rows: RowNode[]): void; /** * Deselects several rows in one operation, emitting a single * `ROW_DESELECTED` event rather than one per id. Mirrors {@link selectRows}. * Honors `suppressRowDeselection`. * * @param nodeIds - Node ids to remove from the selection. * @param rows - The current row set used to recompute selection flags/state. */ deselectRows(nodeIds: string[], rows: RowNode[]): void; selectAll(rows: RowNode[]): void; deselectAll(rows: RowNode[]): void; selectRange(fromIndex: number, toIndex: number, rows: RowNode[]): void; /** * Begin a serial-column drag/range selection at `rowIndex`. * * - **Shift** (with an existing anchor): replace the selection with the range * anchor→rowIndex; the anchor is preserved for further shift-clicks. * - **Ctrl/Cmd**: toggle this row while preserving the rest — that becomes the * drag "base" onto which the live range is unioned. * - **Plain**: replace the selection with just this row. * * The pointer wiring in `GridRenderer` then feeds {@link extendRowDrag} on * move and {@link endRowDrag} on release. */ beginRowDrag(rowIndex: number, nodeId: string, rows: RowNode[], mods: { ctrl: boolean; shift: boolean; }): void; /** Extend an in-progress drag to `rowIndex` (drag base ∪ live range). */ extendRowDrag(rowIndex: number, rows: RowNode[]): void; /** End the current serial-column drag (selection is left intact). */ endRowDrag(): void; /** Node ids of `data` rows whose `rowIndex` falls within `[a, b]` inclusive. */ private rangeIds; /** * Replace the selection with exactly `selectedIds`, apply per-row flags, * refresh all/indeterminate state and emit `ROW_SELECTED`. Shared by the * drag path; {@link selectRows} keeps its additive (union) semantics. */ private setSelection; isRowSelected(nodeId: string): boolean; getSelectedRows(rows: RowNode[]): RowNode[]; getSelectedCount(): number; clearSelection(rows: RowNode[]): void; private isAllSelected; private updateSelectionState; private applySelectionToRows; } //# sourceMappingURL=row-selection-engine.d.ts.map