import * as react_jsx_runtime from 'react/jsx-runtime'; import { RowData, ColumnDef, Row, CellContext } from '@tanstack/react-table'; export { ColumnDef } from '@tanstack/react-table'; import { ReactNode } from 'react'; /** * Way to define the ColumnMeta type in @tanstack/react-table * @see https://tanstack.com/table/v8/docs/api/core/column-def#meta */ declare module "@tanstack/react-table" { interface ColumnMeta { className?: { header?: string; cell?: string; }; sortable?: boolean; expandable?: boolean; tooltip?: ReactNode; } } interface DataTableProps> { className?: string; columns: ColumnDef[]; data: TData[]; loading?: boolean; selection?: { id_by: keyof TData; mode: "checkbox" | "radio"; onSelectionChange?: (value: string[]) => void; enableRowSelection?: boolean | ((row: Row) => boolean); enableSubRowSelection?: boolean | ((row: Row) => boolean); }; pin?: { left?: string[]; right?: string[]; }; nest?: { id_by: keyof TData; }; emptyState?: ReactNode; } /** * Reserved cells for DataTable */ declare const Cell: { Expand: >({ row, getValue }: CellContext, cell?: ReactNode) => react_jsx_runtime.JSX.Element; }; declare const DataTable: { >(props: DataTableProps): react_jsx_runtime.JSX.Element; displayName: string; }; export { Cell, DataTable };