import type { HTMLAttributes, ReactNode } from "react"; import { type PaginationMenuProps } from "../PaginationMenu/PaginationMenu.types"; import { type DataGridFieldConfig } from "./DataGrid.types"; type SelectableTableRow = { index: number; value: Item; }; export interface DataGridProps extends HTMLAttributes { items?: Item[]; fieldConfigurations: DataGridFieldConfig[]; emptyRowsText: string; emptyFieldContentText?: string; isLoading?: boolean; showHeader?: boolean; paginationMenuProps?: PaginationMenuProps; onRowClick?: (item: Item) => void; className?: string; dataTestId?: string; /** * When `true`, will render checkboxes as the first column of each row, * including the header. Allowing for multiple rows to be selected. * * Two callbacks can control this behavior: * - The one for each row selected `onSelectedRow`, * triggered by the checkbox in the table row. * - The one for all rows selected `onSelectedAllRows`, * triggered by the checkbox in the table header. * * Turning this configuration on also requires `selectedItems` to be passed as a prop, * the shape of this prop is: * * `Array<{ index: number; value: Item }>` -> Where `Item` is the generic shape * passed to the table, in the `props.items` list. * * Also gives access to the `onSelectedRowsChange` callback, if you need to use it. * */ isSelectable?: boolean; /** * Used to render components on the header for when one or all * rows are selected. * * Ideally this will be one or more buttons for specific actions. * * */ rowSelectionHeaderAccessories?: ReactNode; selectedItems?: Array>; onSelectedRowsChange?: (params: Array>) => void; } /** * Config-driven data grid: `items` plus `fieldConfigurations` render the rows, with pagination, * selection, loading and empty states built in. For a table with custom structure (colspan, * grouped rows, sticky columns), use `Table`. */ export declare function DataGrid({ items, fieldConfigurations, emptyRowsText, emptyFieldContentText, isLoading, showHeader, paginationMenuProps, onRowClick, className, dataTestId, isSelectable, selectedItems, onSelectedRowsChange, rowSelectionHeaderAccessories, ...otherAttributes }: DataGridProps): import("react").JSX.Element; export {};