import { ColumnType, TablePaginationConfig } from 'antd/es/table'; import { PaginationStyle } from './TableControls/CustomPagination'; import { ActionEvent } from '../../types/events'; import { FetchService } from './InfiniteScrollTable/types'; import * as React from "react"; export type Change = (actionEvent: ActionEvent) => void; export type SelectionType = "checkbox" | "radio"; export interface InfiniteScrollConfig { instanceId: string; fetchService: FetchService; title?: string; scrollHeight?: number; scrollWidth?: number; useWindowScroll?: boolean; filterFn: (data: T[]) => T[]; } export interface TableProps> { dataSource: T[]; columns: ColumnType[]; rowKey?: keyof T | ((record: T) => React.Key); size?: "small" | "middle" | "large"; rowSelection?: { type?: SelectionType; selectedRowKeys?: React.Key[]; onChange?: (selectedRowKeys: React.Key[], selectedRows: T[]) => void; getCheckboxProps?: (record: T) => { disabled?: boolean; name?: string; }; }; onRowClick?: (record: T, index: number, event: React.MouseEvent) => void; onChange?: (pagination: TablePaginationConfig, filters: Record, sorter: SorterResult | SorterResult[], extra: any) => void; onRowSelectionChange?: (setSelectedRowKeys: (keys: React.Key[]) => void) => void; onDataChange?: (data: T[]) => void; loading?: boolean; pagination?: (TablePaginationConfig & { paginationStyle?: PaginationStyle; }) | false; scroll?: { x?: number | string; y?: number | string; }; bordered?: boolean; locale?: { emptyText?: React.ReactNode; }; [key: string]: any; isMainContentCell?: boolean; isInfiniteScroll?: boolean; infiniteScrollConfig?: InfiniteScrollConfig; enableRowKeyValidation?: boolean; onRowKeyError?: (error: { record: T; rowKey: keyof T | ((record: T) => React.Key); index: number; error: Error; }) => void; hasBulkSelection?: boolean; } export type TablePaginationType = { pageSize?: number; current?: number; total?: number; onChange?: (page: number, pageSize: number) => void; }; export type SorterResult = { column?: ColumnType; order?: "ascend" | "descend" | null; field?: keyof T | string | React.Key | readonly React.Key[]; columnKey?: React.Key; }; declare function Table>({ columns, dataSource, rowKey, size, onChange, rowSelection, onRowClick, onRowSelectionChange, onDataChange, pagination, isMainContentCell, isInfiniteScroll, infiniteScrollConfig, enableRowKeyValidation, onRowKeyError, hasBulkSelection, ...rest }: TableProps): import("react/jsx-runtime").JSX.Element; export default Table;