import * as React from 'react'; import * as Types from './types'; import * as Matrix from './matrix'; import * as Point from './point'; import { Selection } from './selection'; import './Spreadsheet.scss'; /** The Spreadsheet component props */ export type Props = { /** The spreadsheet's data */ data: Matrix.Matrix; /** Class name to be added to the spreadsheet's root element */ className?: string; editable: boolean; createFormulaParser?: Types.CreateFormulaParser; /** * Labels to use in column indicators. * @defaultValue alphabetical labels. */ columnLabels?: string[]; /** * Labels to use in row indicators. * @defaultValue row index labels. */ rowLabels?: string[]; /** * If set to true, hides the row indicators of the spreadsheet. * @defaultValue `false`. */ hideRowIndicators?: boolean; /** * If set to true, hides the column indicators of the spreadsheet. * @defaultValue `false`. */ hideColumnIndicators?: boolean; /** The selected cells in the worksheet. */ selected?: Selection; /** Component rendered above each column. */ ColumnIndicator?: Types.ColumnIndicatorComponent; /** Component rendered in the corner of row and column indicators. */ CornerIndicator?: Types.CornerIndicatorComponent; /** Component rendered next to each row. */ RowIndicator?: Types.RowIndicatorComponent; /** The Spreadsheet's table component. */ Table?: Types.TableComponent; /** The Spreadsheet's row component. */ Row?: Types.RowComponent; /** The spreadsheet's header row component */ HeaderRow?: Types.HeaderRowComponent; /** The Spreadsheet's cell component. */ Cell?: Types.CellComponent; /** Component rendered for cells in view mode. */ DataViewer?: Types.DataViewerComponent; /** Component rendered for cells in edit mode. */ DataEditor?: Types.DataEditorComponent; /** Callback called on key down inside the spreadsheet. */ onKeyDown?: (event: React.KeyboardEvent) => void; /** Callback called when the Spreadsheet's selection changes. */ onSelect?: (selected: Selection) => void; /** Callback called when Spreadsheet's active cell changes. */ onActivate?: (active: Point.Point) => void; /** Callback called when the Spreadsheet's evaluated data changes. */ onEvaluatedDataChange?: (data: Matrix.Matrix) => void; setContextMenu: React.Dispatch>; /** Set your dynamic sheet Height*/ sheetHeight: string; toolbar?: 'show' | 'disable' | 'hide'; contextOption?: ContextMenuState; columnContextEnable: boolean; rowContextEnable: boolean; attachmentAction?: { addAttachment: (file: File) => Promise; deleteAttachment: (fileId: string) => Promise; viewAttachment: (fileId: string, fileName: string) => Promise; }; workRef: React.MutableRefObject; minimumColumnWidth: number; scroller: boolean; showHider: boolean; maxRowLimit: number; maxColLimit: number; disableDeleteOption: boolean; contextMenu: ContextMenuState; getActiveCell: (cell: { value: string; active: Point.Point; }) => void; onAddColumn?: (column: number, isLeft: boolean) => void; onDeleteColumn?: (column: number) => void; }; /** * The Spreadsheet component */ declare const Spreadsheet: React.ForwardRefExoticComponent> & React.RefAttributes<{ removeSelect: () => void; }>>; export default Spreadsheet;