import { Column } from '../models/Column'; import { DataView } from '../data/DataView'; import { LayoutEngine } from '../virtualization/LayoutEngine'; import { CellAddress } from '../models/Cell'; import { UndoStack } from '../commands/UndoStack'; export interface EditorDeps { /** The scrolling cells panel. The editor lives here so it tracks the cell while scrolling. */ cells: HTMLElement; layout: LayoutEngine; /** Current vertical scroll offset; rows in the pinned body are placed relative to it. */ scrollTop: () => number; data: DataView; columns: Column[]; undo: UndoStack; onApplied: () => void; /** Return false to prevent the cell from entering edit mode. */ onBeginning?: (cell: CellAddress) => boolean; onStart: (cell: CellAddress) => void; /** Return false to reject the new value before it is committed. */ onEnding?: (cell: CellAddress, value: unknown) => boolean; /** Called after a new value was committed to the row. */ onEnded?: (cell: CellAddress, value: unknown) => void; onEnd: (cell: CellAddress) => void; } /** Begins, commits, and cancels cell edits; commits run through the undo stack. */ export declare class EditorManager { private deps; private text; private dropdown; private radio; private active; private editing; constructor(deps: EditorDeps); get isEditing(): boolean; /** Flip a Boolean cell's value through the undo stack. Returns true if handled. */ toggleBoolean(cell: CellAddress): boolean; begin(cell: CellAddress): void; private commit; private cancel; private editorFor; private cellRect; }