@bsol-oss/react-datatable5 1.0.63 → 2.0.0
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.
- package/dist/index.d.ts +145 -101
- package/dist/index.js +257 -271
- package/dist/index.mjs +192 -206
- package/dist/types/components/Controls/SelectAllRowsToggle.d.ts +4 -4
- package/dist/types/components/DataTable/DataTable.d.ts +18 -13
- package/dist/types/components/DataTable/DataTableContext.d.ts +4 -3
- package/dist/types/components/DataTable/DataTableServer.d.ts +18 -14
- package/dist/types/components/DataTable/useDataTable.d.ts +33 -7
- package/dist/types/components/DataTable/useDataTableContext.d.ts +8 -0
- package/dist/types/index.d.ts +41 -7
- package/package.json +1 -1
- package/dist/types/components/DataTable.d.ts +0 -33
- package/dist/types/components/DataTableContext.d.ts +0 -10
- package/dist/types/components/DataTableServer.d.ts +0 -38
- package/dist/types/components/DefaultTable.d.ts +0 -5
- package/dist/types/components/DensityFeature.d.ts +0 -23
- package/dist/types/components/DensityToggle.d.ts +0 -1
- package/dist/types/components/DensityToggleButton.d.ts +0 -6
- package/dist/types/components/EditFilterButton.d.ts +0 -9
- package/dist/types/components/EditOrderButton.d.ts +0 -7
- package/dist/types/components/EditSortingButton.d.ts +0 -7
- package/dist/types/components/EditViewButton.d.ts +0 -7
- package/dist/types/components/FilterOptions.d.ts +0 -4
- package/dist/types/components/GlobalFilter.d.ts +0 -3
- package/dist/types/components/PageSizeControl.d.ts +0 -4
- package/dist/types/components/ResetFilteringButton.d.ts +0 -4
- package/dist/types/components/ResetSelectionButton.d.ts +0 -4
- package/dist/types/components/ResetSortingButton.d.ts +0 -4
- package/dist/types/components/RowCountText.d.ts +0 -1
- package/dist/types/components/SelectAllRowsToggle.d.ts +0 -8
- package/dist/types/components/Table.d.ts +0 -8
- package/dist/types/components/TableBody.d.ts +0 -17
- package/dist/types/components/TableCardContainer.d.ts +0 -6
- package/dist/types/components/TableCards.d.ts +0 -4
- package/dist/types/components/TableComponent.d.ts +0 -6
- package/dist/types/components/TableComponentRenderer.d.ts +0 -6
- package/dist/types/components/TableControls.d.ts +0 -13
- package/dist/types/components/TableFilter.d.ts +0 -8
- package/dist/types/components/TableFilterTags.d.ts +0 -1
- package/dist/types/components/TableFooter.d.ts +0 -7
- package/dist/types/components/TableHeader.d.ts +0 -8
- package/dist/types/components/TableLoadingComponent.d.ts +0 -5
- package/dist/types/components/TableOrderer.d.ts +0 -1
- package/dist/types/components/TablePagination.d.ts +0 -3
- package/dist/types/components/TableReloadButton.d.ts +0 -4
- package/dist/types/components/TableSelector.d.ts +0 -1
- package/dist/types/components/TableSorter.d.ts +0 -1
- package/dist/types/components/TableViewer.d.ts +0 -1
- package/dist/types/components/TextCell.d.ts +0 -10
- package/dist/types/components/useDataFromUrl.d.ts +0 -14
- package/dist/types/components/useDataTable.d.ts +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnDef, ColumnFiltersState, FilterFn, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
2
|
+
import { ColumnDef, ColumnFiltersState, ColumnOrderState, FilterFn, GlobalFilterTableState, OnChangeFn, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
3
3
|
import { RankingInfo } from "@tanstack/match-sorter-utils";
|
|
4
4
|
import { DensityState } from "../Controls/DensityFeature";
|
|
5
5
|
declare module "@tanstack/react-table" {
|
|
@@ -18,16 +18,21 @@ export interface DataTableProps<TData> {
|
|
|
18
18
|
enableMultiRowSelection?: boolean;
|
|
19
19
|
enableSubRowSelection?: boolean;
|
|
20
20
|
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
21
|
-
columnOrder
|
|
22
|
-
columnFilters
|
|
23
|
-
globalFilter
|
|
24
|
-
density
|
|
25
|
-
pagination
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
columnOrder: ColumnOrderState;
|
|
22
|
+
columnFilters: ColumnFiltersState;
|
|
23
|
+
globalFilter: GlobalFilterTableState;
|
|
24
|
+
density: DensityState;
|
|
25
|
+
pagination: PaginationState;
|
|
26
|
+
sorting: SortingState;
|
|
27
|
+
rowSelection: RowSelectionState;
|
|
28
|
+
columnVisibility: VisibilityState;
|
|
29
|
+
setPagination: OnChangeFn<PaginationState>;
|
|
30
|
+
setSorting: OnChangeFn<SortingState>;
|
|
31
|
+
setColumnFilters: OnChangeFn<ColumnFiltersState>;
|
|
32
|
+
setRowSelection: OnChangeFn<RowSelectionState>;
|
|
33
|
+
setGlobalFilter: OnChangeFn<GlobalFilterTableState>;
|
|
34
|
+
setColumnOrder: OnChangeFn<ColumnOrderState>;
|
|
35
|
+
setDensity: OnChangeFn<DensityState>;
|
|
36
|
+
setColumnVisibility: OnChangeFn<VisibilityState>;
|
|
32
37
|
}
|
|
33
|
-
export declare const DataTable: <TData>({ columns, data, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, onRowSelect, columnOrder
|
|
38
|
+
export declare const DataTable: <TData>({ columns, data, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, onRowSelect, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, children, }: DataTableProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Table } from "@tanstack/react-table";
|
|
2
|
+
import { GlobalFilterTableState, OnChangeFn, Table } from "@tanstack/react-table";
|
|
3
3
|
export interface DataTableContext<TData> {
|
|
4
4
|
table: Table<TData>;
|
|
5
5
|
refreshData: () => void;
|
|
6
|
-
globalFilter:
|
|
7
|
-
setGlobalFilter:
|
|
6
|
+
globalFilter: GlobalFilterTableState;
|
|
7
|
+
setGlobalFilter: OnChangeFn<GlobalFilterTableState>;
|
|
8
8
|
loading: boolean;
|
|
9
|
+
hasError: boolean;
|
|
9
10
|
}
|
|
10
11
|
export declare const TableContext: import("react").Context<DataTableContext<any>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ColumnDef, ColumnFiltersState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
2
|
+
import { ColumnDef, ColumnFiltersState, ColumnOrderState, GlobalFilterTableState, OnChangeFn, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
3
3
|
import { DensityState } from "../Controls/DensityFeature";
|
|
4
4
|
export interface DataTableServerProps<TData> {
|
|
5
5
|
children: JSX.Element | JSX.Element[];
|
|
@@ -9,18 +9,22 @@ export interface DataTableServerProps<TData> {
|
|
|
9
9
|
enableMultiRowSelection?: boolean;
|
|
10
10
|
enableSubRowSelection?: boolean;
|
|
11
11
|
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
12
|
-
columnOrder
|
|
13
|
-
columnFilters
|
|
14
|
-
globalFilter
|
|
15
|
-
density
|
|
16
|
-
pagination
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
columnOrder: ColumnOrderState;
|
|
13
|
+
columnFilters: ColumnFiltersState;
|
|
14
|
+
globalFilter: GlobalFilterTableState;
|
|
15
|
+
density: DensityState;
|
|
16
|
+
pagination: PaginationState;
|
|
17
|
+
sorting: SortingState;
|
|
18
|
+
rowSelection: RowSelectionState;
|
|
19
|
+
columnVisibility: VisibilityState;
|
|
20
|
+
setPagination: OnChangeFn<PaginationState>;
|
|
21
|
+
setSorting: OnChangeFn<SortingState>;
|
|
22
|
+
setColumnFilters: OnChangeFn<ColumnFiltersState>;
|
|
23
|
+
setRowSelection: OnChangeFn<RowSelectionState>;
|
|
24
|
+
setGlobalFilter: OnChangeFn<GlobalFilterTableState>;
|
|
25
|
+
setColumnOrder: OnChangeFn<ColumnOrderState>;
|
|
26
|
+
setDensity: OnChangeFn<DensityState>;
|
|
27
|
+
setColumnVisibility: OnChangeFn<VisibilityState>;
|
|
24
28
|
}
|
|
25
29
|
export interface Result<T> {
|
|
26
30
|
results: T[];
|
|
@@ -30,4 +34,4 @@ export interface DataResponse<T> extends Result<T> {
|
|
|
30
34
|
count: number;
|
|
31
35
|
filterCount: number;
|
|
32
36
|
}
|
|
33
|
-
export declare const DataTableServer: <TData>({ columns, url, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, onRowSelect, columnOrder
|
|
37
|
+
export declare const DataTableServer: <TData>({ columns, url, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, onRowSelect, columnOrder, columnFilters, columnVisibility, density, globalFilter, pagination, sorting, rowSelection, setPagination, setSorting, setColumnFilters, setRowSelection, setGlobalFilter, setColumnOrder, setDensity, setColumnVisibility, children, }: DataTableServerProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ColumnFiltersState, ColumnOrderState, GlobalFilterTableState, OnChangeFn, PaginationState, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
2
|
+
import { DensityState } from "../Controls/DensityFeature";
|
|
3
|
+
export interface UseDataTableProps {
|
|
4
|
+
default: {
|
|
5
|
+
sorting?: SortingState;
|
|
6
|
+
columnFilters?: ColumnFiltersState;
|
|
7
|
+
pagination?: PaginationState;
|
|
8
|
+
rowSelection?: RowSelectionState;
|
|
9
|
+
columnOrder?: ColumnOrderState;
|
|
10
|
+
globalFilter?: GlobalFilterTableState;
|
|
11
|
+
columnVisibility?: VisibilityState;
|
|
12
|
+
density?: DensityState;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface UseDataTableReturn {
|
|
16
|
+
sorting: SortingState;
|
|
17
|
+
columnFilters: ColumnFiltersState;
|
|
18
|
+
pagination: PaginationState;
|
|
19
|
+
rowSelection: RowSelectionState;
|
|
20
|
+
columnOrder: ColumnOrderState;
|
|
21
|
+
globalFilter: GlobalFilterTableState;
|
|
22
|
+
columnVisibility: VisibilityState;
|
|
23
|
+
density: DensityState;
|
|
24
|
+
setPagination: OnChangeFn<PaginationState>;
|
|
25
|
+
setSorting: OnChangeFn<SortingState>;
|
|
26
|
+
setColumnFilters: OnChangeFn<ColumnFiltersState>;
|
|
27
|
+
setRowSelection: OnChangeFn<RowSelectionState>;
|
|
28
|
+
setGlobalFilter: OnChangeFn<GlobalFilterTableState>;
|
|
29
|
+
setColumnOrder: OnChangeFn<ColumnOrderState>;
|
|
30
|
+
setDensity: OnChangeFn<DensityState>;
|
|
31
|
+
setColumnVisibility: OnChangeFn<VisibilityState>;
|
|
32
|
+
}
|
|
33
|
+
export declare const useDataTable: ({ default: { sorting: defaultSorting, pagination: defaultPagination, rowSelection: defaultRowSelection, columnFilters: defaultColumnFilters, columnOrder: defaultColumnOrder, columnVisibility: defaultColumnVisibility, globalFilter: defaultGlobalFilter, density: defaultDensity, }, }?: UseDataTableProps) => UseDataTableReturn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const useDataTableContext: () => {
|
|
2
|
+
table: import("@tanstack/table-core").Table<any>;
|
|
3
|
+
refreshData: () => void;
|
|
4
|
+
globalFilter: import("@tanstack/table-core").GlobalFilterTableState;
|
|
5
|
+
setGlobalFilter: import("@tanstack/table-core").OnChangeFn<import("@tanstack/table-core").GlobalFilterTableState>;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
hasError: boolean;
|
|
8
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,36 +2,68 @@
|
|
|
2
2
|
import { Column, RowData } from "@tanstack/react-table";
|
|
3
3
|
declare module "@tanstack/react-table" {
|
|
4
4
|
interface ColumnMeta<TData extends RowData, TValue> {
|
|
5
|
+
/**
|
|
6
|
+
* The display name of the column, used for rendering headers.
|
|
7
|
+
*/
|
|
5
8
|
displayName?: string;
|
|
6
9
|
/**
|
|
7
|
-
*
|
|
10
|
+
* Specifies the type of filter to be used for the column.
|
|
11
|
+
*
|
|
12
|
+
* @remarks You should provide a proper `filterfn` to handle filtering when choosing `boolean`, `dateRange`, and `custom`.
|
|
13
|
+
*
|
|
14
|
+
* @remarks You should decide `renderFilter` to display filter ui when choosing `custom`.
|
|
15
|
+
*
|
|
16
|
+
* Possible values:
|
|
17
|
+
* - "text": A text input filter.
|
|
18
|
+
* - "range": A numerical range filter.
|
|
19
|
+
* - "select": A dropdown select filter.
|
|
20
|
+
* - "tag": A tag-based filter.
|
|
21
|
+
* - "boolean": A true/false filter.
|
|
22
|
+
* - "dateRange": A date range filter.
|
|
23
|
+
* - "custom": A custom filter function.
|
|
8
24
|
*/
|
|
9
25
|
filterVariant?: "text" | "range" | "select" | "tag" | "boolean" | "dateRange" | "custom";
|
|
26
|
+
/**
|
|
27
|
+
* Options for the select filter variant, if applicable.
|
|
28
|
+
*/
|
|
10
29
|
filterOptions?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* Configuration for the range filter variant, if applicable.
|
|
32
|
+
*
|
|
33
|
+
* Properties:
|
|
34
|
+
* - `min`: Minimum value for the range.
|
|
35
|
+
* - `max`: Maximum value for the range.
|
|
36
|
+
* - `step`: Step increment for the range.
|
|
37
|
+
* - `defaultValue`: Default range values for the filter.
|
|
38
|
+
*/
|
|
11
39
|
filterRangeConfig?: {
|
|
12
40
|
min: number;
|
|
13
41
|
max: number;
|
|
14
42
|
step: number;
|
|
15
43
|
defaultValue: [number, number];
|
|
16
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* A function that renders the filter component for the column.
|
|
47
|
+
*
|
|
48
|
+
* @param column - The column for which the filter is being rendered.
|
|
49
|
+
* @returns A JSX element representing the filter UI.
|
|
50
|
+
*/
|
|
17
51
|
renderFilter?: (column: Column<TData>) => JSX.Element;
|
|
18
52
|
}
|
|
19
53
|
}
|
|
20
|
-
export * from "./components/DataTable/DataTable";
|
|
21
|
-
export * from "./components/DataTable/DataTableServer";
|
|
22
|
-
export * from "./components/DataTable/DefaultTable";
|
|
23
54
|
export * from "./components/Controls/DensityToggleButton";
|
|
24
55
|
export * from "./components/Controls/EditFilterButton";
|
|
25
56
|
export * from "./components/Controls/EditOrderButton";
|
|
26
57
|
export * from "./components/Controls/EditSortingButton";
|
|
27
58
|
export * from "./components/Controls/EditViewButton";
|
|
28
|
-
export * from "./components/Filter/FilterOptions";
|
|
29
|
-
export * from "./components/Filter/GlobalFilter";
|
|
30
59
|
export * from "./components/Controls/PageSizeControl";
|
|
31
60
|
export * from "./components/Controls/ResetFilteringButton";
|
|
32
61
|
export * from "./components/Controls/ResetSelectionButton";
|
|
33
62
|
export * from "./components/Controls/ResetSortingButton";
|
|
34
63
|
export * from "./components/Controls/RowCountText";
|
|
64
|
+
export * from "./components/DataTable/DataTable";
|
|
65
|
+
export * from "./components/DataTable/DataTableServer";
|
|
66
|
+
export * from "./components/DataTable/DefaultTable";
|
|
35
67
|
export * from "./components/DataTable/Table";
|
|
36
68
|
export * from "./components/DataTable/TableBody";
|
|
37
69
|
export * from "./components/DataTable/TableCardContainer";
|
|
@@ -51,4 +83,6 @@ export * from "./components/DataTable/TableSorter";
|
|
|
51
83
|
export * from "./components/DataTable/TableViewer";
|
|
52
84
|
export * from "./components/DataTable/TextCell";
|
|
53
85
|
export * from "./components/DataTable/useDataFromUrl";
|
|
54
|
-
export * from "./components/DataTable/
|
|
86
|
+
export * from "./components/DataTable/useDataTableContext";
|
|
87
|
+
export * from "./components/Filter/FilterOptions";
|
|
88
|
+
export * from "./components/Filter/GlobalFilter";
|
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ColumnDef, ColumnFiltersState, FilterFn, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
3
|
-
import { RankingInfo } from "@tanstack/match-sorter-utils";
|
|
4
|
-
import { DensityState } from "./DensityFeature";
|
|
5
|
-
declare module "@tanstack/react-table" {
|
|
6
|
-
interface FilterFns {
|
|
7
|
-
fuzzy: FilterFn<unknown>;
|
|
8
|
-
}
|
|
9
|
-
interface FilterMeta {
|
|
10
|
-
itemRank: RankingInfo;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export interface DataTableProps<TData> {
|
|
14
|
-
children?: JSX.Element | JSX.Element[];
|
|
15
|
-
data: TData[];
|
|
16
|
-
columns: ColumnDef<TData, any>[];
|
|
17
|
-
enableRowSelection?: boolean;
|
|
18
|
-
enableMultiRowSelection?: boolean;
|
|
19
|
-
enableSubRowSelection?: boolean;
|
|
20
|
-
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
21
|
-
columnOrder?: string[];
|
|
22
|
-
columnFilters?: ColumnFiltersState;
|
|
23
|
-
globalFilter?: string;
|
|
24
|
-
density?: DensityState;
|
|
25
|
-
pagination?: {
|
|
26
|
-
pageIndex: number;
|
|
27
|
-
pageSize: number;
|
|
28
|
-
};
|
|
29
|
-
sorting?: SortingState;
|
|
30
|
-
rowSelection?: RowSelectionState;
|
|
31
|
-
columnVisibility?: VisibilityState;
|
|
32
|
-
}
|
|
33
|
-
export declare const DataTable: <TData>({ columns, data, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, onRowSelect, columnOrder: defaultColumnOrder, columnFilters: defaultColumnFilter, density, globalFilter: defaultGlobalFilter, pagination: defaultPagination, sorting: defaultSorting, rowSelection: defaultRowSelection, columnVisibility: defaultColumnVisibility, children, }: DataTableProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Table } from "@tanstack/react-table";
|
|
3
|
-
export interface DataTableContext<TData> {
|
|
4
|
-
table: Table<TData>;
|
|
5
|
-
refreshData: () => void;
|
|
6
|
-
globalFilter: string;
|
|
7
|
-
setGlobalFilter: (filter: string) => void;
|
|
8
|
-
loading: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const TableContext: import("react").Context<DataTableContext<any>>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ColumnDef, ColumnFiltersState, RowData, RowSelectionState, SortingState, VisibilityState } from "@tanstack/react-table";
|
|
3
|
-
import { DensityState } from "./DensityFeature";
|
|
4
|
-
export interface DataTableServerProps<TData> {
|
|
5
|
-
children: JSX.Element | JSX.Element[];
|
|
6
|
-
url: string;
|
|
7
|
-
columns: ColumnDef<TData, any>[];
|
|
8
|
-
enableRowSelection?: boolean;
|
|
9
|
-
enableMultiRowSelection?: boolean;
|
|
10
|
-
enableSubRowSelection?: boolean;
|
|
11
|
-
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
12
|
-
columnOrder?: string[];
|
|
13
|
-
columnFilters?: ColumnFiltersState;
|
|
14
|
-
globalFilter?: string;
|
|
15
|
-
density?: DensityState;
|
|
16
|
-
pagination?: {
|
|
17
|
-
pageIndex: number;
|
|
18
|
-
pageSize: number;
|
|
19
|
-
};
|
|
20
|
-
sorting?: SortingState;
|
|
21
|
-
rowSelection?: RowSelectionState;
|
|
22
|
-
loadingComponent?: JSX.Element;
|
|
23
|
-
columnVisibility?: VisibilityState;
|
|
24
|
-
}
|
|
25
|
-
export interface Result<T> {
|
|
26
|
-
results: T[];
|
|
27
|
-
}
|
|
28
|
-
export interface DataResponse<T> extends Result<T> {
|
|
29
|
-
success: boolean;
|
|
30
|
-
count: number;
|
|
31
|
-
filterCount: number;
|
|
32
|
-
}
|
|
33
|
-
declare module "@tanstack/react-table" {
|
|
34
|
-
interface ColumnMeta<TData extends RowData, TValue> {
|
|
35
|
-
displayName?: string;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export declare const DataTableServer: <TData>({ columns, url, enableRowSelection, enableMultiRowSelection, enableSubRowSelection, onRowSelect, columnOrder: defaultColumnOrder, columnFilters: defaultColumnFilter, density, globalFilter: defaultGlobalFilter, pagination: defaultPagination, sorting: defaultSorting, rowSelection: defaultRowSelection, columnVisibility: defaultColumnVisibility, children, }: DataTableServerProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TableControlsProps } from "./TableControls";
|
|
2
|
-
export interface DefaultTableProps extends TableControlsProps {
|
|
3
|
-
showFooter?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const DefaultTable: ({ totalText, showFilter, showFooter, fitTableWidth, fitTableHeight, isMobile, filterOptions, showFilterTags, showFilterName, }: DefaultTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OnChangeFn, Updater, RowData, TableFeature } from "@tanstack/react-table";
|
|
2
|
-
export type DensityState = "sm" | "md" | "lg";
|
|
3
|
-
export interface DensityTableState {
|
|
4
|
-
density: DensityState;
|
|
5
|
-
}
|
|
6
|
-
export interface DensityOptions {
|
|
7
|
-
enableDensity?: boolean;
|
|
8
|
-
onDensityChange?: OnChangeFn<DensityState>;
|
|
9
|
-
}
|
|
10
|
-
export interface DensityInstance {
|
|
11
|
-
setDensity: (updater: Updater<DensityState>) => void;
|
|
12
|
-
toggleDensity: (value?: DensityState) => void;
|
|
13
|
-
getDensityValue: (value?: DensityState) => number;
|
|
14
|
-
}
|
|
15
|
-
declare module "@tanstack/react-table" {
|
|
16
|
-
interface TableState extends DensityTableState {
|
|
17
|
-
}
|
|
18
|
-
interface TableOptionsResolved<TData extends RowData> extends DensityOptions {
|
|
19
|
-
}
|
|
20
|
-
interface Table<TData extends RowData> extends DensityInstance {
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export declare const DensityFeature: TableFeature<any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SelectAllRowsToggle: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface EditFilterButtonProps {
|
|
3
|
-
text?: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
closeText?: string;
|
|
6
|
-
resetText?: string;
|
|
7
|
-
icon?: React.ReactElement;
|
|
8
|
-
}
|
|
9
|
-
export declare const EditFilterButton: ({ text, title, closeText, resetText, icon, ...props }: EditFilterButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface EditSortingButtonProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
icon?: React.ReactElement;
|
|
5
|
-
text?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const EditSortingButton: ({ text, icon, title, }: EditSortingButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const RowCountText: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface SelectAllRowsToggleProps {
|
|
3
|
-
selectAllIcon: React.ReactElement;
|
|
4
|
-
clearAllIcon: React.ReactElement;
|
|
5
|
-
selectAllText: string;
|
|
6
|
-
clearAllText: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const SelectAllRowsToggle: ({ selectAllIcon, clearAllIcon, selectAllText, clearAllText, }: SelectAllRowsToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TableProps as ChakraTableProps } from "@chakra-ui/react";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
export interface TableProps extends ChakraTableProps {
|
|
4
|
-
showLoading?: boolean;
|
|
5
|
-
loadingComponent?: JSX.Element;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const Table: ({ children, showLoading, loadingComponent, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Row } from "@tanstack/react-table";
|
|
2
|
-
export interface TableBodyProps {
|
|
3
|
-
pinnedBgColor?: {
|
|
4
|
-
light: string;
|
|
5
|
-
dark: string;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export interface TableRowSelectorProps<TData> {
|
|
9
|
-
index: number;
|
|
10
|
-
row: Row<TData>;
|
|
11
|
-
hoveredRow: number;
|
|
12
|
-
pinnedBgColor?: {
|
|
13
|
-
light: string;
|
|
14
|
-
dark: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export declare const TableBody: ({ pinnedBgColor, }: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GridProps } from "@chakra-ui/react";
|
|
3
|
-
export interface TableCardContainerProps extends GridProps {
|
|
4
|
-
children: JSX.Element;
|
|
5
|
-
}
|
|
6
|
-
export declare const TableCardContainer: ({ children, ...props }: TableCardContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Table } from "@tanstack/react-table";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface TableRendererProps<TData> {
|
|
4
|
-
render: (render: Table<TData>) => React.ReactElement;
|
|
5
|
-
}
|
|
6
|
-
export declare const TableComponent: <TData>({ render, }: TableRendererProps<TData>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Table } from "@tanstack/react-table";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface TableRendererProps<TData> {
|
|
4
|
-
render: (render: Table<TData>) => React.ReactElement;
|
|
5
|
-
}
|
|
6
|
-
export declare const TableComponentRenderer: <TData>({ render, }: TableRendererProps<TData>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface TableControlsProps {
|
|
3
|
-
totalText?: string;
|
|
4
|
-
showFilter?: boolean;
|
|
5
|
-
fitTableWidth?: boolean;
|
|
6
|
-
fitTableHeight?: boolean;
|
|
7
|
-
isMobile?: boolean;
|
|
8
|
-
children?: JSX.Element;
|
|
9
|
-
showFilterName?: boolean;
|
|
10
|
-
showFilterTags?: boolean;
|
|
11
|
-
filterOptions?: string[];
|
|
12
|
-
}
|
|
13
|
-
export declare const TableControls: ({ totalText, showFilter, fitTableWidth, fitTableHeight, isMobile, children, showFilterName, showFilterTags, filterOptions, }: TableControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RowData } from "@tanstack/react-table";
|
|
2
|
-
declare module "@tanstack/react-table" {
|
|
3
|
-
interface ColumnMeta<TData extends RowData, TValue> {
|
|
4
|
-
filterVariant?: "text" | "range" | "select";
|
|
5
|
-
filterOptions?: string[];
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export declare const TableFilter: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableFilterTags: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableOrderer: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableSelector: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableSorter: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TableViewer: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextProps, TooltipProps } from "@chakra-ui/react";
|
|
3
|
-
export interface TextCellProps extends TextProps {
|
|
4
|
-
label?: string;
|
|
5
|
-
noOfLines?: number[];
|
|
6
|
-
padding?: string;
|
|
7
|
-
children: string | number | JSX.Element | JSX.Element[];
|
|
8
|
-
tooltipProps?: TooltipProps;
|
|
9
|
-
}
|
|
10
|
-
export declare const TextCell: ({ label, noOfLines, padding, children, tooltipProps, ...props }: TextCellProps) => import("react/jsx-runtime").JSX.Element;
|