@carbon/ibm-products
Version:
Carbon for IBM Products
107 lines (106 loc) • 3.05 kB
TypeScript
/**
* 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 } from 'react';
import { ActiveCellCoordinates, ItemType, Size, SpreadsheetColumn } from './types';
import { Column } from 'react-table';
interface DataSpreadsheetHeaderProps {
/**
* Object containing the active cell coordinates
*/
activeCellCoordinates?: ActiveCellCoordinates | null;
/**
* Specifies the cell height
*/
cellSize?: Size;
/**
* Disable column swapping, default false
*/
disableColumnSwapping?: boolean;
/**
* All of the spreadsheet columns
*/
columns?: readonly Column[];
/**
* uuid that corresponds to the current selection area
*/
currentMatcher?: string;
/**
* Default spreadsheet sizing values
*/
defaultColumn?: SpreadsheetColumn;
/**
* Whether or not a click/hold is active on a header cell
*/
headerCellHoldActive?: boolean;
/**
* Headers provided from useTable hook
*/
headerGroups?: any[];
/**
* Read-only table
*/
readOnlyTable?: boolean;
/**
* All of the spreadsheet row data
*/
rows?: object[];
/**
* The scrollbar width
*/
scrollBarSize?: number;
/**
* The aria label applied to the Select all button
*/
selectAllAriaLabel: string;
/**
* All of the cell selection area items
*/
selectionAreas?: ItemType[];
/**
* Setter fn for activeCellCoordinates value
*/
setActiveCellCoordinates?: Dispatch<SetStateAction<ActiveCellCoordinates | null>>;
/**
* Header reordering is active
*/
selectedHeaderReorderActive?: boolean;
/**
* Set header reordering active or not
*/
setSelectedHeaderReorderActive?: Dispatch<SetStateAction<boolean>>;
/**
* Setter fn for currentMatcher value
*/
setCurrentMatcher?: Dispatch<SetStateAction<string>>;
/**
* Setter fn for header cell hold active value
*/
setHeaderCellHoldActive?: (arg: boolean) => void;
/**
* Setter fn for selectionAreaData state value
*/
setSelectionAreaData?: Dispatch<SetStateAction<object[]>>;
/**
* Setter fn for selectionAreas value
*/
setSelectionAreas?: Dispatch<SetStateAction<object[]>>;
/**
* The total number of columns to be initially visible, additional columns will be rendered and
* visible via horizontal scrollbar
*/
totalVisibleColumns?: number;
/**
* Function used to update the active cell coordinates
*/
updateActiveCellCoordinates?: (arg: any) => void;
/**
* Array of visible columns provided by react-table useTable hook
*/
visibleColumns?: Column<object>[];
}
export declare const DataSpreadsheetHeader: React.ForwardRefExoticComponent<DataSpreadsheetHeaderProps & React.RefAttributes<HTMLDivElement>>;
export {};