import { UseColumnOrderInstanceProps, UseColumnOrderState, UseExpandedHooks, UseExpandedInstanceProps, UseExpandedOptions, UseExpandedRowProps, UseExpandedState, UseFiltersColumnOptions, UseFiltersColumnProps, UseGroupByCellProps, UseGroupByColumnOptions, UseGroupByColumnProps, UseGroupByHooks, UseGroupByInstanceProps, UseGroupByOptions, UseGroupByRowProps, UseGroupByState, UsePaginationInstanceProps, UsePaginationOptions, UsePaginationState, UseRowSelectHooks, UseRowSelectInstanceProps, UseRowSelectOptions, UseRowSelectRowProps, UseRowSelectState, UseSortByColumnOptions, UseSortByColumnProps, UseSortByHooks, UseSortByInstanceProps, UseSortByOptions, UseSortByState, } from "react-table"; import {} from "../components/tables/plugins"; import { PageControlAction } from "../components/tables/types"; declare module "react-table" { // take this file as-is, or comment out the sections that don't apply to your plugin configuration // Customize of React Table type TableUpdater = (row: Row, ...others: any[]) => void; interface useAsyncPaginationProps> { asyncLoader?: (start: number, length: number) => void; asyncState?: AsyncState>; asyncId?: (item: D) => number; } interface useAsyncPaginationState> { pageToLoad?: PageControlAction; needLoadingScreen?: boolean; } interface useSelectionProps> { isSelecting?: boolean; onSelect?: (items: D[]) => void; } interface useSelectionState> {} interface CustomTableProps> extends useSelectionProps, useAsyncPaginationProps { externalUpdate?: TableUpdater; loose?: any[]; } interface CustomTableState> extends useSelectionState, useAsyncPaginationState {} export interface TableOptions< D extends Record > extends UseExpandedOptions, // UseFiltersOptions, // UseGlobalFiltersOptions, UseGroupByOptions, UsePaginationOptions, // UseResizeColumnsOptions, UseRowSelectOptions, // UseRowStateOptions, UseSortByOptions, CustomTableProps { data: readonly D[]; } export interface Hooks< D extends Record = Record > extends UseExpandedHooks, UseGroupByHooks, UseRowSelectHooks, UseSortByHooks {} export interface TableInstance< D extends Record = Record > extends UseColumnOrderInstanceProps, UseExpandedInstanceProps, // UseFiltersInstanceProps, // UseGlobalFiltersInstanceProps, UseGroupByInstanceProps, UsePaginationInstanceProps, UseRowSelectInstanceProps, // UseRowStateInstanceProps, UseSortByInstanceProps, CustomTableProps {} export interface TableState< D extends Record = Record > extends UseColumnOrderState, UseExpandedState, // UseFiltersState, // UseGlobalFiltersState, UseGroupByState, UsePaginationState, // UseResizeColumnsState, UseRowSelectState, // UseRowStateState, UseSortByState, CustomTableState {} export interface ColumnInterface< D extends Record = Record > extends UseFiltersColumnOptions, // UseGlobalFiltersColumnOptions, UseGroupByColumnOptions, // UseResizeColumnsColumnOptions, UseSortByColumnOptions { selectHide?: boolean; className?: string; } export interface ColumnInstance< D extends Record = Record > extends UseFiltersColumnProps, UseGroupByColumnProps, // UseResizeColumnsColumnProps, UseSortByColumnProps {} export interface Cell< D extends Record = Record, V = any > extends UseGroupByCellProps {} export interface Row< D extends Record = Record > extends UseExpandedRowProps, UseGroupByRowProps, UseRowSelectRowProps {} }