import { ComponentChild } from 'preact'; import Row from './row'; import { SortConfig } from './view/plugin/sort/sort'; import { JSXInternal } from 'preact/src/jsx'; import { Plugin } from './plugin'; export declare type ProtoExtends = U & Omit; export declare type OneDArray = T[]; export declare type TwoDArray = T[][]; /** * Table cell types */ export declare type TCell = | number | string | boolean | ComponentChild | HTMLElement; export declare type TDataArrayRow = OneDArray; export declare type TDataArray = OneDArray; export declare type TDataObjectRow = { [key: string]: TCell; }; export declare type TDataObject = OneDArray; export declare type TData = TDataArray | TDataObject; export interface TColumn { id?: string; data?: ((row: TDataArrayRow | TDataObjectRow) => TCell) | TCell; name?: string | ComponentChild; plugin?: Plugin; width?: string; sort?: SortConfig; columns?: OneDArray; fixedHeader?: boolean; hidden?: boolean; formatter?: (cell: TCell, row: Row, column: TColumn) => ComponentChild; attributes?: | (( cell: TCell | null, row: Row | null, column: TColumn, ) => JSXInternal.HTMLAttributes) | JSXInternal.HTMLAttributes; } export declare type Comparator = (a: T, b: T) => number; export interface TColumnSort { index: number; direction?: 1 | -1; } export declare enum Status { Init = 0, Loading = 1, Loaded = 2, Rendered = 3, Error = 4, } export declare type CSSDeclaration = { [key: string]: string | number; };