freemium-ui 1.0.255 → 1.0.258
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,52 +1,50 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Column, Row, ColumnInstance, Cell, TableCommonProps } from 'react-table';
|
|
2
|
+
import { Column, TableState, Row, ColumnInstance, Cell, IdType, TableCommonProps } from 'react-table';
|
|
3
3
|
import FreemiumUIThemes from '../../theme';
|
|
4
|
-
|
|
5
|
-
declare type ControlledTableProps = {
|
|
6
|
-
data: any[];
|
|
7
|
-
columns: Array<Column<any>>;
|
|
8
|
-
count: number;
|
|
9
|
-
pageSize: number;
|
|
10
|
-
pageIndex?: number;
|
|
11
|
-
columnOrder?: string[];
|
|
12
|
-
hiddenColumns?: string[];
|
|
13
|
-
selectedRowIds?: Record<string, boolean>;
|
|
14
|
-
disablePageIndex?: number[];
|
|
15
|
-
setPageIndex?: (pageIndex: number) => void | React.Dispatch<React.SetStateAction<number>>;
|
|
16
|
-
setSelectedRowIds?: (selectedRowIds: Record<string, boolean>) => void | React.Dispatch<React.SetStateAction<Record<string, boolean>>>;
|
|
17
|
-
onRowClick?: (row: Row, column: ColumnInstance) => void;
|
|
18
|
-
onNextPageClick?: () => void;
|
|
19
|
-
onPreviousPageClick?: () => void;
|
|
20
|
-
rowPropGetter?: (row: Row) => TableCommonProps;
|
|
4
|
+
declare type TableProps = {
|
|
21
5
|
cellPropGetter?: (cell: Cell) => TableCommonProps;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
onSelectAllPageRows?: (checked: boolean) => void;
|
|
6
|
+
rowPropGetter?: (row: Row) => TableCommonProps;
|
|
7
|
+
onSelectAll?: (checked: boolean) => void;
|
|
25
8
|
onMenuOptionSelect?: (optionId: string, row: any) => void;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
onPageClick?: (pageNumber: number) => void;
|
|
10
|
+
onFirstClick?: (pageNumber?: number) => void;
|
|
11
|
+
onLastClick?: (pageNumber?: number) => void;
|
|
12
|
+
onPrevious?: (pageNumber?: number) => void;
|
|
13
|
+
onNext?: (pageNumber?: number) => void;
|
|
14
|
+
onRowSelect?: (selectedRowIds: Record<IdType<{}>, boolean>, selectedFlatRows?: Array<Row<{}>>) => void;
|
|
15
|
+
onRowClick?: (row: Row<{}>, column: ColumnInstance<{}>) => void;
|
|
16
|
+
columns?: Array<Column<{}>>;
|
|
17
|
+
hideTableHeaderOnEmpty?: boolean;
|
|
18
|
+
emptyComponent?: React.ReactNode;
|
|
19
|
+
headerComponent?: React.ReactNode;
|
|
20
|
+
loadingComponent?: React.ReactNode;
|
|
21
|
+
filterComponent?: React.ReactNode;
|
|
22
|
+
data?: any[];
|
|
23
|
+
next?: string | boolean;
|
|
24
|
+
previous?: string | boolean;
|
|
25
|
+
count?: number;
|
|
37
26
|
indeterminateCount?: boolean;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
perPage?: number;
|
|
28
|
+
pageNumber?: number;
|
|
29
|
+
sortable?: boolean;
|
|
30
|
+
showSelectAllInTable?: boolean;
|
|
31
|
+
showSelections?: boolean;
|
|
32
|
+
showFilters?: boolean;
|
|
33
|
+
showActions?: boolean;
|
|
34
|
+
showOptions?: boolean;
|
|
35
|
+
showTopPagination?: boolean;
|
|
36
|
+
showBottomPagination?: boolean;
|
|
37
|
+
name?: string;
|
|
38
|
+
id?: string;
|
|
39
|
+
rowMenuOptions?: (rowData?: any) => any[];
|
|
40
|
+
paginationOptions?: Array<number>;
|
|
49
41
|
theme?: FreemiumUIThemes;
|
|
42
|
+
initialState?: {
|
|
43
|
+
selectedRowIds?: Record<string, boolean>;
|
|
44
|
+
hiddenColumns?: string[];
|
|
45
|
+
columnOrder?: string[];
|
|
46
|
+
};
|
|
47
|
+
state?: Partial<TableState>;
|
|
50
48
|
};
|
|
51
|
-
export declare const
|
|
49
|
+
export declare const Table: (props: TableProps) => JSX.Element;
|
|
52
50
|
export {};
|
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Column,
|
|
2
|
+
import { Column, Row, ColumnInstance, Cell, TableCommonProps } from 'react-table';
|
|
3
3
|
import FreemiumUIThemes from '../../theme';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { MenuItemProps } from '../Menu';
|
|
5
|
+
declare type ControlledTableProps = {
|
|
6
|
+
data: any[];
|
|
7
|
+
columns: Array<Column<any>>;
|
|
8
|
+
count: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
pageIndex?: number;
|
|
11
|
+
columnOrder?: string[];
|
|
12
|
+
hiddenColumns?: string[];
|
|
13
|
+
selectedRowIds?: Record<string, boolean>;
|
|
14
|
+
setPageIndex?: (pageIndex: number) => void | React.Dispatch<React.SetStateAction<number>>;
|
|
15
|
+
setSelectedRowIds?: (selectedRowIds: Record<string, boolean>) => void | React.Dispatch<React.SetStateAction<Record<string, boolean>>>;
|
|
16
|
+
onRowClick?: (row: Row, column: ColumnInstance) => void;
|
|
17
|
+
onNextPageClick?: () => void;
|
|
18
|
+
onPreviousPageClick?: () => void;
|
|
6
19
|
rowPropGetter?: (row: Row) => TableCommonProps;
|
|
7
|
-
|
|
20
|
+
cellPropGetter?: (cell: Cell) => TableCommonProps;
|
|
21
|
+
rowMenuOptions?: (rowData?: any) => MenuItemProps[];
|
|
22
|
+
onSelectAllRows?: (checked: boolean) => void;
|
|
23
|
+
onSelectAllPageRows?: (checked: boolean) => void;
|
|
8
24
|
onMenuOptionSelect?: (optionId: string, row: any) => void;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
loadingComponent?: React.ReactNode;
|
|
21
|
-
filterComponent?: React.ReactNode;
|
|
22
|
-
data?: any[];
|
|
23
|
-
next?: string | boolean;
|
|
24
|
-
previous?: string | boolean;
|
|
25
|
-
count?: number;
|
|
25
|
+
enableNextPage?: boolean;
|
|
26
|
+
enablePreviousPage?: boolean;
|
|
27
|
+
autoReset?: boolean;
|
|
28
|
+
isLoading?: boolean;
|
|
29
|
+
isFetching?: boolean;
|
|
30
|
+
hideActions?: boolean;
|
|
31
|
+
hideFilters?: boolean;
|
|
32
|
+
hideTableOnEmpty?: boolean;
|
|
33
|
+
disableRowSelect?: boolean;
|
|
34
|
+
hideTopPagination?: boolean;
|
|
35
|
+
showTableOnLoading?: boolean;
|
|
26
36
|
indeterminateCount?: boolean;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
id?: string;
|
|
39
|
-
rowMenuOptions?: (rowData?: any) => any[];
|
|
40
|
-
paginationOptions?: Array<number>;
|
|
37
|
+
hideSelectAllInTable?: boolean;
|
|
38
|
+
hideBottomPagination?: boolean;
|
|
39
|
+
hideLoaderOnTopPagination?: boolean;
|
|
40
|
+
dataKey?: string;
|
|
41
|
+
loaderStyles?: React.CSSProperties;
|
|
42
|
+
selectAllPageText?: string;
|
|
43
|
+
tableSelectAllBehaviour?: 'ALL_ROWS' | 'CURRENT_PAGE_ROWS';
|
|
44
|
+
filterComponent?: React.ReactElement;
|
|
45
|
+
headerComponent?: React.ReactElement;
|
|
46
|
+
emptyComponent?: React.ReactElement;
|
|
47
|
+
loadingComponent?: React.ReactElement;
|
|
41
48
|
theme?: FreemiumUIThemes;
|
|
42
|
-
initialState?: {
|
|
43
|
-
selectedRowIds?: Record<string, boolean>;
|
|
44
|
-
hiddenColumns?: string[];
|
|
45
|
-
columnOrder?: string[];
|
|
46
|
-
};
|
|
47
|
-
state?: Partial<TableState>;
|
|
48
49
|
};
|
|
49
|
-
export declare const
|
|
50
|
+
export declare const ControlledTable: (props: ControlledTableProps) => JSX.Element;
|
|
50
51
|
export {};
|