import React from 'react'; export declare type ColumnWidth = string | number; export declare type Cell = { col: number; row: number; }; export declare type Selection = { min: Cell; max: Cell; }; export declare type CellProps = { rowData: T; rowIndex: number; columnIndex: number; active: boolean; focus: boolean; disabled: boolean; columnData: C; setRowData: (rowData: T) => void; stopEditing: (opts?: { nextRow: boolean; }) => void; insertRowBelow: () => void; duplicateRow: () => void; deleteRow: () => void; getContextMenuItems: () => ContextMenuItem[]; }; export declare type CellComponent = (props: CellProps) => JSX.Element; export declare type Column = { id?: string; headerClassName?: string; title?: React.ReactNode; width: ColumnWidth; minWidth: number; maxWidth?: number; renderWhenScrolling: boolean; component: CellComponent; columnData?: C; disableKeys: boolean; disabled: boolean | ((opt: { rowData: T; rowIndex: number; }) => boolean); cellClassName?: string | ((opt: { rowData: T; rowIndex: number; }) => string | undefined); keepFocus: boolean; deleteValue: (opt: { rowData: T; rowIndex: number; }) => T; copyValue: (opt: { rowData: T; rowIndex: number; }) => number | string | null; pasteValue: (opt: { rowData: T; value: PasteValue; rowIndex: number; }) => T; prePasteValues: (values: string[]) => PasteValue[] | Promise; isCellEmpty: (opt: { rowData: T; rowIndex: number; }) => boolean; }; export declare type ListItemData = { data: T[]; contentWidth?: number; columns: Column[]; hasStickyRightColumn: boolean; activeCell: Cell | null; selectionMinRow?: number; selectionMaxRow?: number; editing: boolean; setRowData: (rowIndex: number, item: T) => void; deleteRows: (rowMin: number, rowMax?: number) => void; duplicateRows: (rowMin: number, rowMax?: number) => void; insertRowAfter: (row: number, count?: number) => void; stopEditing: (opts?: { nextRow?: boolean; }) => void; getContextMenuItems: () => ContextMenuItem[]; rowClassName?: string | ((opt: { rowData: T; rowIndex: number; }) => string | undefined); }; export declare type HeaderContextType = { columns: Column[]; contentWidth?: number; hasStickyRightColumn: boolean; height: number; activeColMin?: number; activeColMax?: number; }; export declare type SelectionContextType = { columnRights?: number[]; columnWidths?: number[]; activeCell: Cell | null; selection: Selection | null; dataLength: number; rowHeight: number; hasStickyRightColumn: boolean; editing: boolean; isCellDisabled: (cell: Cell) => boolean; headerRowHeight: number; viewWidth?: number; viewHeight?: number; contentWidth?: number; edges: { top: boolean; right: boolean; bottom: boolean; left: boolean; }; expandSelection: number | null; }; export declare type RowProps = { index: number; data: T; style: React.CSSProperties; isScrolling?: boolean; columns: Column[]; hasStickyRightColumn: boolean; active: boolean; activeColIndex: number | null; editing: boolean; setRowData: (rowIndex: number, item: T) => void; deleteRows: (rowMin: number, rowMax?: number) => void; duplicateRows: (rowMin: number, rowMax?: number) => void; insertRowAfter: (row: number, count?: number) => void; stopEditing?: (opts?: { nextRow?: boolean; }) => void; getContextMenuItems: () => ContextMenuItem[]; rowClassName?: string | ((opt: { rowData: T; rowIndex: number; }) => string | undefined); }; export declare type SimpleColumn = Partial, 'title' | 'maxWidth' | 'minWidth' | 'width' | 'component' | 'columnData'>>; export declare type AddRowsComponentProps = { addRows: (count?: number) => void; }; export declare type ContextMenuItem = { type: 'INSERT_ROW_BELLOW' | 'DELETE_ROW' | 'DUPLICATE_ROW'; action: () => void; } | { type: 'DELETE_ROWS' | 'DUPLICATE_ROWS'; action: () => void; fromRow: number; toRow: number; }; export declare type ContextMenuComponentProps = { clientX: number; clientY: number; items: ContextMenuItem[]; cursorIndex: Cell; close: () => void; }; export declare type Operation = { type: 'UPDATE' | 'DELETE' | 'CREATE'; fromRowIndex: number; toRowIndex: number; }; export declare type DataSheetGridProps = { value?: T[]; style?: React.CSSProperties; className?: string; rowClassName?: string | ((opt: { rowData: T; rowIndex: number; }) => string | undefined); onChange?: (value: T[], operations: Operation[]) => void; columns?: Partial>[]; gutterColumn?: SimpleColumn | false; stickyRightColumn?: SimpleColumn; rowKey?: string | ((opts: { rowData: T; rowIndex: number; }) => string); height?: number; rowHeight?: number; headerRowHeight?: number; addRowsComponent?: (props: AddRowsComponentProps) => JSX.Element; createRow?: () => T; duplicateRow?: (opts: { rowData: T; rowIndex: number; }) => T; autoAddRow?: boolean; lockRows?: boolean; disableContextMenu?: boolean; disableExpandSelection?: boolean; contextMenuComponent?: (props: ContextMenuComponentProps) => JSX.Element; onFocus?: (opts: { cell: CellWithId; }) => void; onBlur?: (opts: { cell: CellWithId; }) => void; onActiveCellChange?: (opts: { cell: CellWithId | null; }) => void; onSelectionChange?: (opts: { selection: SelectionWithId | null; }) => void; }; declare type CellWithIdInput = { col: number | string; row: number; }; declare type SelectionWithIdInput = { min: CellWithIdInput; max: CellWithIdInput; }; export declare type CellWithId = { colId?: string; col: number; row: number; }; export declare type SelectionWithId = { min: CellWithId; max: CellWithId; }; export declare type DataSheetGridRef = { activeCell: CellWithId | null; selection: SelectionWithId | null; setActiveCell: (activeCell: CellWithIdInput | null) => void; setSelection: (selection: SelectionWithIdInput | null) => void; }; export {}; //# sourceMappingURL=types.d.ts.map