1 | import * as React from 'react';
|
2 |
|
3 | export class Unstable_StatefulDataTable extends React.Component<any, any> {}
|
4 |
|
5 | export function AnchorColumn(options: any): any;
|
6 | export function BooleanColumn(options: any): any;
|
7 | export function CategoricalColumn(options: any): any;
|
8 | export function DatetimeColumn(options: any): any;
|
9 | export function CustomColumn<ValueT, FilterParamsT>(options: any): any;
|
10 | export function NumericalColumn(options: any): any;
|
11 | export function StringColumn(options: any): any;
|
12 |
|
13 | export interface COLUMNS {
|
14 | ANCHOR: 'ANCHOR';
|
15 | CATEGORICAL: 'CATEGORICAL';
|
16 | DATETIME: 'DATETIME';
|
17 | NUMERICAL: 'NUMERICAL';
|
18 | BOOLEAN: 'BOOLEAN';
|
19 | STRING: 'STRING';
|
20 | CUSTOM: 'CUSTOM';
|
21 | }
|
22 | export const COLUMNS: COLUMNS;
|
23 |
|
24 | export interface NUMERICAL_FORMATS {
|
25 | DEFAULT: 'DEFAULT';
|
26 | ACCOUNTING: 'ACCOUNTING';
|
27 | PERCENTAGE: 'PERCENTAGE';
|
28 | }
|
29 | export const NUMERICAL_FORMATS: NUMERICAL_FORMATS;
|
30 |
|
31 | export interface SORT_DIRECTIONS {
|
32 | ASC: 'ASC';
|
33 | DESC: 'DESC';
|
34 | }
|
35 | export const SORT_DIRECTIONS: SORT_DIRECTIONS;
|
36 |
|
37 | export type SortDirectionsT =
|
38 | | SORT_DIRECTIONS['ASC']
|
39 | | SORT_DIRECTIONS['DESC']
|
40 | | null;
|
41 | export type ColumnT = any;
|
42 | export type RowT = {
|
43 | id: number | string;
|
44 | data: any;
|
45 | };
|
46 |
|
47 | export type BatchActionT = {
|
48 | label: string;
|
49 | onClick: (params: {
|
50 | clearSelection: () => any;
|
51 | event: React.MouseEvent<HTMLButtonElement>;
|
52 | selection: RowT[];
|
53 | }) => any;
|
54 | renderIcon?: any;
|
55 | };
|
56 |
|
57 | export type RowActionT = {
|
58 | label: string;
|
59 | onClick: (params: {
|
60 | event: React.MouseEvent<HTMLButtonElement>;
|
61 | row: RowT;
|
62 | }) => any;
|
63 | renderIcon: any;
|
64 | };
|
65 |
|
66 | export type Props = {
|
67 | batchActions?: BatchActionT[];
|
68 | rowActions?: RowActionT[];
|
69 | columns: ColumnT[];
|
70 | onSelectionChange?: (rows: RowT[]) => any;
|
71 | rows: RowT[];
|
72 | };
|