/** * Copyright IBM Corp. 2022, 2022 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React, { Dispatch, SetStateAction, MutableRefObject } from 'react'; import { ActiveCellCoordinates, SpreadsheetColumn } from './types'; import { Column, IdType, TableBodyPropGetter, TableBodyProps } from 'react-table'; interface DataSpreadsheetBodyProps { /** * Object containing the active cell coordinates */ activeCellCoordinates?: ActiveCellCoordinates | null; /** *This is the ref of the button input, which is the active cell element */ activeCellRef?: MutableRefObject; /** * Is the user clicking and holding in the data spreadsheet body */ clickAndHoldActive?: boolean; /** * All of the spreadsheet columns */ columns?: readonly Column[]; /** * This represents the id of the current cell selection area */ currentMatcher?: string; /** * Default spreadsheet sizing values */ defaultColumn?: SpreadsheetColumn; /** * Sets the number of empty rows to be created when there is no data provided */ defaultEmptyRowCount?: number; /** * Function to set table body prop values */ getTableBodyProps: (propGetter?: TableBodyPropGetter) => TableBodyProps; /** * Headers provided from useTable hook */ headerGroups?: any[]; /** * The spreadsheet id */ id?: number | string; /** * Set current columns after drag drop */ setCurrentColumns?: Dispatch>; /** * The event handler that is called when the active cell changes */ onActiveCellChange?: () => void; /** * Check if user is using custom component */ hasCustomRowHeader?: boolean; /** * Component next to numbering rows */ renderRowHeader?: (index: number) => any[]; /** * Component next to numbering rows */ renderRowHeaderDirection?: string; /** * The event handler that is called to set the rows for the empty spreadsheet */ onDataUpdate?: ({ ...args }: { [x: string]: any; }) => void; /** * The event handler that is called when the selection areas change */ onSelectionAreaChange?: ({ ...args }: { [x: string]: any; }) => void; /** * Prepare row function from react-table */ prepareRow?: (...args: any[]) => void; /** * All of the spreadsheet row data */ rows?: any[]; /** * The scrollbar width */ scrollBarSize?: number; /** * Array of selection area data */ selectionAreaData?: any[]; /** * Header reordering is active */ selectedHeaderReorderActive?: boolean; /** * Set header reordering active or not */ setSelectedHeaderReorderActive?: Dispatch>; /** * Array of selection areas */ selectionAreas?: any[]; /** * Setter fn for activeCellCoordinates state value */ setActiveCellCoordinates?: Dispatch>; /** * Setter fn for active cell inside of selection area */ setActiveCellInsideSelectionArea?: Dispatch>; /** * Setter fn for clickAndHold state value */ setClickAndHoldActive?: Dispatch>; /** * Setter fn for column ordering, provided from react-table */ setColumnOrder?: (updater: ((columnOrder: Array>) => Array>) | Array>) => void; /** * Setter fn for containerHasFocus state value */ setContainerHasFocus?: Dispatch>; /** * Setter fn for currentMatcher state value */ setCurrentMatcher?: Dispatch>; /** * Setter fn for header cell hold active value */ setHeaderCellHoldActive?: Dispatch>; /** * Setter fn for selectionAreaData state value */ setSelectionAreaData?: Dispatch>; /** * Setter fn for selectionAreas state value */ setSelectionAreas?: Dispatch>; /** * The total columns width */ totalColumnsWidth?: number; /** * The total number of columns to be initially visible, additional columns will be rendered and * visible via horizontal scrollbar */ totalVisibleColumns?: number; /** * Prop from react-table used to reorder columns */ visibleColumns?: Column[]; } export declare const DataSpreadsheetBody: React.ForwardRefExoticComponent>; export {}; //# sourceMappingURL=DataSpreadsheetBody.d.ts.map