import { KeyboardEvent } from 'react'; import { IGridAddress, TGridReadOnlyEventSource } from './types'; import { Controller, IControllerProps } from './base-controller'; export interface IKeyboardControllerRemoveEvent { rows: number[]; columns: number[]; } export interface IKeyboardControllerPasteEvent { clipboard: DataTransfer; getAllSelectedCells: () => IGridAddress[]; getLastSelectedCells: () => IGridAddress[]; isReadOnly: (cell: IGridAddress) => boolean; } export interface IKeyboardControllerProps extends IControllerProps { onNullify: (cells: IGridAddress[]) => void; onRemove: (props: IKeyboardControllerRemoveEvent) => void; onSpace: (cells: IGridAddress[]) => void; onCopy: (cells: IGridAddress[], withHeaders: boolean) => void; onPaste: (event: IKeyboardControllerPasteEvent) => void; onReadOnly: (cell: IGridAddress, source: TGridReadOnlyEventSource) => boolean; } export declare class KeyboardController extends Controller { protected _props: IKeyboardControllerProps; constructor(_props: IKeyboardControllerProps); private _isInput(e); private _moveSelection(shiftKey, cmdKey, direction, distance); private _onTab(e, callback?); private _onEnter(e, callback?); private _onSpace(e); private _onPageUpDown(e); private _onHomeEnd(e); private _onArrows(e); private _onCopy(withHeaders); private _onNullify(); private _onRemove(); private _onSelectAll(e); private _onData(e); protected _paste: (e: ClipboardEvent) => void; keydown(e: KeyboardEvent): void; dispose(): void; } export default KeyboardController;