1 | import { ComponentChild } from 'preact';
|
2 | import Row from './row';
|
3 | import { SortConfig } from './view/plugin/sort/sort';
|
4 | export declare type ProtoExtends<T, U> = U & Omit<T, keyof U>;
|
5 | export declare type OneDArray<T> = T[];
|
6 | export declare type TwoDArray<T> = T[][];
|
7 | export declare type TCell = number | string | boolean | ComponentChild | HTMLElement;
|
8 | export declare type TDataArray = TwoDArray<TCell>;
|
9 | export declare type TDataObject = OneDArray<{
|
10 | [key: string]: TCell;
|
11 | }>;
|
12 | export declare type TData = TDataArray | TDataObject;
|
13 | export interface TColumn {
|
14 | id?: string;
|
15 | name: string | ComponentChild;
|
16 | width?: string;
|
17 | sort?: SortConfig;
|
18 | children?: OneDArray<TColumn>;
|
19 | formatter?: (cell: TCell, row: Row, column: TColumn) => ComponentChild;
|
20 | }
|
21 | export declare type Comparator<T> = (a: T, b: T) => number;
|
22 | export interface TColumnSort {
|
23 | index: number;
|
24 | direction?: 1 | -1;
|
25 | }
|
26 | export declare enum Status {
|
27 | Init = 0,
|
28 | Loading = 1,
|
29 | Loaded = 2,
|
30 | Rendered = 3,
|
31 | Error = 4
|
32 | }
|
33 | export declare type CSSDeclaration = {
|
34 | [key: string]: string;
|
35 | };
|