@chumsinc/sortable-tables 2.2.0 → 3.0.1
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/CHANGELOG.md +31 -1
- package/README.md +94 -4
- package/dist/DataTable.d.ts +1 -1
- package/dist/DataTableCell.d.ts +6 -2
- package/dist/DataTableCols.d.ts +1 -1
- package/dist/DataTableContext.d.ts +10 -0
- package/dist/DataTableProvider.d.ts +12 -0
- package/dist/DataTableTH.d.ts +1 -1
- package/dist/SortableTable.d.ts +1 -1
- package/dist/SortableTableHead.d.ts +1 -1
- package/dist/SortableTableHeadWrapper.d.ts +9 -0
- package/dist/SortableTableTH.d.ts +1 -1
- package/dist/StandaloneDataTable.d.ts +6 -0
- package/dist/StandaloneDataTableRow.d.ts +9 -0
- package/dist/StandaloneSortHelper.d.ts +5 -0
- package/dist/StandaloneSortableTable.d.ts +6 -0
- package/dist/Table.d.ts +5 -4
- package/dist/index.cjs.js +4 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +12 -8
- package/dist/index.es.js +239 -198
- package/dist/index.es.js.map +1 -1
- package/dist/types.d.ts +4 -3
- package/dist/useField.d.ts +6 -0
- package/dist/useTableContext.d.ts +2 -0
- package/dist/useTableFields.d.ts +9 -0
- package/dist/useTableSort.d.ts +9 -0
- package/package.json +3 -3
- package/src/DataTable.tsx +34 -11
- package/src/DataTableCell.tsx +33 -28
- package/src/DataTableCols.tsx +11 -18
- package/src/DataTableContext.ts +13 -0
- package/src/DataTableHead.tsx +6 -7
- package/src/DataTableProvider.tsx +62 -0
- package/src/DataTableRow.tsx +8 -7
- package/src/DataTableTBody.tsx +1 -3
- package/src/DataTableTH.tsx +4 -3
- package/src/RowsPerPage.tsx +2 -4
- package/src/SortableTable.tsx +36 -12
- package/src/SortableTableHead.tsx +9 -9
- package/src/SortableTableHeadWrapper.tsx +20 -0
- package/src/SortableTableTH.tsx +4 -4
- package/src/StandaloneDataTable.tsx +16 -0
- package/src/StandaloneDataTableRow.tsx +42 -0
- package/src/StandaloneSortHelper.tsx +15 -0
- package/src/StandaloneSortableTable.tsx +21 -0
- package/src/Table.tsx +49 -44
- package/src/TablePagination.tsx +1 -3
- package/src/index.tsx +21 -15
- package/src/types.ts +127 -126
- package/src/useField.ts +19 -0
- package/src/useTableContext.ts +10 -0
- package/src/useTableFields.ts +20 -0
- package/src/useTableSort.ts +20 -0
- package/test/Main.tsx +37 -0
- package/test/TableColumnsHandler.tsx +9 -9
- package/test/TestTable.tsx +51 -46
- package/test/data.ts +232 -232
- package/test/index.tsx +11 -11
- package/test/tableFields.tsx +11 -3
- package/test/utils.ts +19 -0
- package/tsconfig.json +1 -0
- package/dist/DataTableWithContext.d.ts +0 -2
- package/dist/SortableTableWithContext.d.ts +0 -2
- package/dist/TableProvider.d.ts +0 -17
- package/src/DataTableWithContext.tsx +0 -41
- package/src/SortableTableWithContext.tsx +0 -44
- package/src/TableProvider.tsx +0 -77
package/src/DataTableTH.tsx
CHANGED
|
@@ -3,12 +3,15 @@ import type {DataTableTHProps} from "./types";
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
function DataTableTH<T = unknown>({
|
|
6
|
+
export default function DataTableTH<T = unknown>({
|
|
7
7
|
field,
|
|
8
8
|
className,
|
|
9
9
|
children,
|
|
10
10
|
...rest
|
|
11
11
|
}: DataTableTHProps<T>) {
|
|
12
|
+
if (field.visible === false) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
12
15
|
const thClassName = clsx({[`text-${field.align}`]: !!field.align}, className);
|
|
13
16
|
return (
|
|
14
17
|
<th className={thClassName} scope="col" {...rest}>
|
|
@@ -16,6 +19,4 @@ function DataTableTH<T = unknown>({
|
|
|
16
19
|
</th>
|
|
17
20
|
)
|
|
18
21
|
}
|
|
19
|
-
|
|
20
22
|
DataTableTH.displayName = 'DataTableTH';
|
|
21
|
-
export default DataTableTH;
|
package/src/RowsPerPage.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, {ChangeEvent, useId} from 'react';
|
|
1
|
+
import React, {type ChangeEvent, useId} from 'react';
|
|
2
2
|
import type {RowsPerPageProps} from "./types";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
|
|
5
5
|
const defaultRowsPerPageValues: number[] = [10, 25, 50, 100, 250, 500, 1000];
|
|
6
6
|
|
|
7
|
-
function RowsPerPage({
|
|
7
|
+
export default function RowsPerPage({
|
|
8
8
|
value,
|
|
9
9
|
pageValues = defaultRowsPerPageValues,
|
|
10
10
|
size,
|
|
@@ -32,6 +32,4 @@ function RowsPerPage({
|
|
|
32
32
|
</div>
|
|
33
33
|
)
|
|
34
34
|
}
|
|
35
|
-
|
|
36
35
|
RowsPerPage.displayName = 'RowsPerPage';
|
|
37
|
-
export default RowsPerPage;
|
package/src/SortableTable.tsx
CHANGED
|
@@ -1,19 +1,43 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type {SortableTableProps} from "./types";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import Table from "./Table";
|
|
4
|
+
import {DataTableCols, DataTableTBody} from "./index";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import SortableTableHeadWrapper from "./SortableTableHeadWrapper";
|
|
5
7
|
|
|
8
|
+
export default function SortableTable<T = unknown>({
|
|
9
|
+
className,
|
|
10
|
+
size,
|
|
11
|
+
responsive,
|
|
12
|
+
sticky,
|
|
13
|
+
data,
|
|
14
|
+
keyField,
|
|
15
|
+
rowClassName,
|
|
16
|
+
renderRow,
|
|
17
|
+
onSelectRow,
|
|
18
|
+
selected,
|
|
19
|
+
tableHeadProps,
|
|
20
|
+
children,
|
|
21
|
+
tfoot,
|
|
22
|
+
onChangeSort,
|
|
23
|
+
...rest
|
|
24
|
+
}: Omit<SortableTableProps<T>, 'fields' | 'currentSort'>) {
|
|
25
|
+
const tableClassName = clsx('table', className, {
|
|
26
|
+
[`table-${size}`]: !!size,
|
|
27
|
+
})
|
|
6
28
|
|
|
7
|
-
function SortableTable<T = unknown>({
|
|
8
|
-
fields,
|
|
9
|
-
...rest
|
|
10
|
-
}: SortableTableProps<T>) {
|
|
11
29
|
return (
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
30
|
+
<Table className={tableClassName} responsive={responsive} sticky={sticky} {...rest}>
|
|
31
|
+
<DataTableCols/>
|
|
32
|
+
<SortableTableHeadWrapper onChangeSort={onChangeSort} {...tableHeadProps}/>
|
|
33
|
+
{!!data.length && (
|
|
34
|
+
<DataTableTBody data={data} keyField={keyField} rowClassName={rowClassName}
|
|
35
|
+
renderRow={renderRow}
|
|
36
|
+
onSelectRow={onSelectRow} selected={selected}/>
|
|
37
|
+
)}
|
|
38
|
+
{children}
|
|
39
|
+
{tfoot}
|
|
40
|
+
</Table>
|
|
15
41
|
)
|
|
16
42
|
}
|
|
17
|
-
|
|
18
43
|
SortableTable.displayName = 'SortableTable';
|
|
19
|
-
export default SortableTable;
|
|
@@ -2,21 +2,21 @@ import React from "react";
|
|
|
2
2
|
import SortableTableTH from "./SortableTableTH";
|
|
3
3
|
import type {SortableTableHeadProps} from "./types";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import {useTableFields} from "./
|
|
5
|
+
import {useTableFields} from "./useTableFields";
|
|
6
|
+
import {useTableSort} from "./useTableSort";
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
function SortableTableHead<T = unknown>({
|
|
9
|
-
currentSort,
|
|
8
|
+
export default function SortableTableHead<T = unknown>({
|
|
10
9
|
onChangeSort,
|
|
11
10
|
}: SortableTableHeadProps<T>) {
|
|
12
|
-
const fields = useTableFields<T>()
|
|
13
|
-
const
|
|
11
|
+
const [fields] = useTableFields<T>()
|
|
12
|
+
const [sort] = useTableSort<T>();
|
|
14
13
|
return (
|
|
15
14
|
<thead>
|
|
16
15
|
<tr>
|
|
17
|
-
{fields
|
|
16
|
+
{fields
|
|
17
|
+
.map((tableField, index) => (
|
|
18
18
|
<SortableTableTH<T> key={index} field={tableField}
|
|
19
|
-
sorted={field === tableField.field} ascending={ascending}
|
|
19
|
+
sorted={sort?.field === tableField.field} ascending={sort?.ascending}
|
|
20
20
|
className={clsx(
|
|
21
21
|
typeof tableField.className === 'function'
|
|
22
22
|
? {[`text-${tableField.align}`]: !!tableField.align}
|
|
@@ -29,4 +29,4 @@ function SortableTableHead<T = unknown>({
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
SortableTableHead.displayName = 'SortableTableHead';
|
|
32
|
-
|
|
32
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {useTableFields} from "./useTableFields";
|
|
2
|
+
import {useTableSort} from "./useTableSort";
|
|
3
|
+
import SortableTableHead from "./SortableTableHead";
|
|
4
|
+
import type {SortProps} from "./types";
|
|
5
|
+
|
|
6
|
+
export interface SortableTableHeadWrapperProps<T = unknown> {
|
|
7
|
+
onChangeSort: (sort: SortProps<T>) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function SortableTableHeadWrapper<T = unknown>({
|
|
11
|
+
onChangeSort,
|
|
12
|
+
}: SortableTableHeadWrapperProps<T>) {
|
|
13
|
+
const [fields] = useTableFields<T>()
|
|
14
|
+
const [sort] = useTableSort<T>();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<SortableTableHead fields={fields} currentSort={sort} onChangeSort={onChangeSort} />
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
SortableTableHeadWrapper.displayName = 'SortableTableHeadWrapper';
|
package/src/SortableTableTH.tsx
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
2
|
import DataTableTH from "./DataTableTH";
|
|
4
3
|
import type {SortableTableTHProps, UIFlexAlign} from "./types";
|
|
5
4
|
import styled from '@emotion/styled';
|
|
@@ -39,13 +38,16 @@ const FieldTitle = styled.div<FieldTitleProps>`
|
|
|
39
38
|
}
|
|
40
39
|
`
|
|
41
40
|
|
|
42
|
-
function SortableTableTH<T = unknown>({
|
|
41
|
+
export default function SortableTableTH<T = unknown>({
|
|
43
42
|
field,
|
|
44
43
|
sorted,
|
|
45
44
|
ascending,
|
|
46
45
|
className,
|
|
47
46
|
onClick
|
|
48
47
|
}: SortableTableTHProps<T>) {
|
|
48
|
+
if (field.visible === false) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
49
51
|
if (!field.sortable) {
|
|
50
52
|
return (<DataTableTH field={field} className={className}/>)
|
|
51
53
|
}
|
|
@@ -75,6 +77,4 @@ function SortableTableTH<T = unknown>({
|
|
|
75
77
|
</th>
|
|
76
78
|
)
|
|
77
79
|
}
|
|
78
|
-
|
|
79
80
|
SortableTableTH.displayName = 'SortableTableTH';
|
|
80
|
-
export default SortableTableTH;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type {DataTableProps} from "./types";
|
|
2
|
+
import DataTableProvider from "./DataTableProvider";
|
|
3
|
+
import DataTable from "./DataTable";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export default function StandaloneDataTable<T = unknown>({
|
|
7
|
+
fields,
|
|
8
|
+
...rest
|
|
9
|
+
}: DataTableProps<T>) {
|
|
10
|
+
return (
|
|
11
|
+
<DataTableProvider initialFields={fields}>
|
|
12
|
+
<DataTable {...rest}/>
|
|
13
|
+
</DataTableProvider>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
StandaloneDataTable.displayName = 'StandaloneDataTable';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, {type MouseEvent} from 'react';
|
|
2
|
+
import type {DataTableField, DataTableRowProps} from "./types";
|
|
3
|
+
import DataTableCell from "./DataTableCell";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import {useTableFields} from "./useTableFields";
|
|
6
|
+
|
|
7
|
+
export interface StandaloneDataTableRowProps<T = unknown> extends DataTableRowProps<T> {
|
|
8
|
+
fields: DataTableField<T>[]
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function StandaloneDataTableRow<T = unknown>({
|
|
12
|
+
fields,
|
|
13
|
+
className,
|
|
14
|
+
rowClassName,
|
|
15
|
+
selected,
|
|
16
|
+
row,
|
|
17
|
+
trRef,
|
|
18
|
+
onClick,
|
|
19
|
+
...rest
|
|
20
|
+
}: StandaloneDataTableRowProps<T>) {
|
|
21
|
+
const clickHandler = (ev: MouseEvent<HTMLTableRowElement>) => {
|
|
22
|
+
onClick?.(row, ev)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const _className = typeof rowClassName === 'function' ? rowClassName(row) : rowClassName;
|
|
26
|
+
if (!row) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<tr ref={trRef}
|
|
32
|
+
className={clsx({'table-active': selected}, className, _className)}
|
|
33
|
+
onClick={clickHandler}
|
|
34
|
+
{...rest}>
|
|
35
|
+
{fields
|
|
36
|
+
.map((field, index) => (
|
|
37
|
+
<DataTableCell key={String(field?.id ?? index)} field={field} row={row}/>
|
|
38
|
+
))}
|
|
39
|
+
</tr>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
StandaloneDataTableRow.displayName = 'StandaloneDataTableRow';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type {SortProps} from "./types";
|
|
2
|
+
import {useTableSort} from "./useTableSort";
|
|
3
|
+
import {useEffect} from "react";
|
|
4
|
+
|
|
5
|
+
export interface StandaloneSortHelperProps<T = unknown> {
|
|
6
|
+
nextSort: SortProps<T>
|
|
7
|
+
}
|
|
8
|
+
export function StandaloneSortHelper<T = unknown>({nextSort}:StandaloneSortHelperProps<T>) {
|
|
9
|
+
const [, setNextSort] = useTableSort<T>();
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
console.log('setNextSort', nextSort);
|
|
12
|
+
setNextSort(nextSort);
|
|
13
|
+
}, [nextSort, setNextSort]);
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type {SortableTableProps} from "./types";
|
|
3
|
+
import DataTableProvider from "./DataTableProvider";
|
|
4
|
+
import SortableTable from "./SortableTable";
|
|
5
|
+
import {StandaloneSortHelper} from "./StandaloneSortHelper";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export default function StandaloneSortableTable<T = unknown>({
|
|
9
|
+
fields,
|
|
10
|
+
currentSort,
|
|
11
|
+
...rest
|
|
12
|
+
}: SortableTableProps<T>) {
|
|
13
|
+
return (
|
|
14
|
+
<DataTableProvider initialFields={fields} initialSort={currentSort}>
|
|
15
|
+
<StandaloneSortHelper nextSort={currentSort} />
|
|
16
|
+
<SortableTable {...rest}/>
|
|
17
|
+
</DataTableProvider>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
StandaloneSortableTable.displayName = 'StandaloneSortableTable';
|
package/src/Table.tsx
CHANGED
|
@@ -1,44 +1,49 @@
|
|
|
1
|
-
import React, {TableHTMLAttributes} from 'react';
|
|
2
|
-
import styled from "@emotion/styled";
|
|
3
|
-
import type {DataTableProps} from "./types";
|
|
4
|
-
import clsx from "clsx";
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
import React, {type RefObject, type TableHTMLAttributes} from 'react';
|
|
2
|
+
import styled from "@emotion/styled";
|
|
3
|
+
import type {DataTableProps} from "./types";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
|
|
6
|
+
export interface StyledTableProps extends TableHTMLAttributes<HTMLTableElement>, Pick<DataTableProps, 'sticky' | 'responsive'> {
|
|
7
|
+
ref?: RefObject<HTMLTableElement>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const StyledTable = styled.table<StyledTableProps>`
|
|
11
|
+
--table-sticky-top: ${props => props.sticky ? '0' : undefined};
|
|
12
|
+
|
|
13
|
+
thead {
|
|
14
|
+
tr:nth-of-type(1) td,
|
|
15
|
+
tr:nth-of-type(1) th {
|
|
16
|
+
top: var(--table-sticky-top, unset);
|
|
17
|
+
position: ${props => props.sticky ? "sticky" : "unset"};
|
|
18
|
+
z-index: ${props => props.sticky ? 10 : "unset"};
|
|
19
|
+
background: ${props => props.sticky ? "linear-gradient(var(--bs-table-bg) 75%, rgba(var(--bs-secondary-bg-rgb), 0.9))" : "unset"};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export default function Table({
|
|
26
|
+
sticky,
|
|
27
|
+
responsive,
|
|
28
|
+
children,
|
|
29
|
+
className,
|
|
30
|
+
ref,
|
|
31
|
+
...rest
|
|
32
|
+
}: StyledTableProps) {
|
|
33
|
+
if (responsive) {
|
|
34
|
+
const _className = clsx(className, {
|
|
35
|
+
'table-responsive': responsive === true,
|
|
36
|
+
[`table-responsive-${responsive}`]: responsive !== true,
|
|
37
|
+
})
|
|
38
|
+
return (
|
|
39
|
+
<div className={_className}>
|
|
40
|
+
<StyledTable ref={ref} {...rest}>{children}</StyledTable>
|
|
41
|
+
</div>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<StyledTable className={className} sticky={sticky} ref={ref} {...rest}>{children}</StyledTable>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
package/src/TablePagination.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import RowsPerPage from "./RowsPerPage";
|
|
|
3
3
|
import type {TablePaginationProps} from "./types";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
|
|
6
|
-
function TablePagination({
|
|
6
|
+
export default function TablePagination({
|
|
7
7
|
page,
|
|
8
8
|
rowsPerPage,
|
|
9
9
|
onChangePage,
|
|
@@ -67,6 +67,4 @@ function TablePagination({
|
|
|
67
67
|
</div>
|
|
68
68
|
)
|
|
69
69
|
}
|
|
70
|
-
|
|
71
70
|
TablePagination.displayname = 'TablePagination';
|
|
72
|
-
export default TablePagination
|
package/src/index.tsx
CHANGED
|
@@ -1,37 +1,43 @@
|
|
|
1
1
|
/* eslint-disable react-refresh/only-export-components */
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
export {default as DataTable} from './StandaloneDataTable';
|
|
4
5
|
export {default as DataTableRow} from './DataTableRow';
|
|
5
6
|
export {default as DataTableTBody} from './DataTableTBody';
|
|
6
7
|
export {default as DataTableTH} from './DataTableTH';
|
|
7
|
-
export {default as
|
|
8
|
+
export {default as StandaloneSortableTable} from './StandaloneSortableTable';
|
|
8
9
|
export {default as SortableTableHead} from './SortableTableHead';
|
|
9
10
|
export {default as SortableTableTH} from './SortableTableTH';
|
|
10
11
|
export {default as RowsPerPage} from './RowsPerPage';
|
|
11
12
|
export {default as TablePagination} from './TablePagination';
|
|
12
13
|
export {default as DataTableCols} from './DataTableCols'
|
|
13
|
-
export {default as DataTableWithContext} from './
|
|
14
|
-
export {default as
|
|
15
|
-
export {default as DataTableProvider} from './
|
|
16
|
-
export {
|
|
17
|
-
export
|
|
14
|
+
export {default as DataTableWithContext} from './DataTable'
|
|
15
|
+
export {default as SortableTable} from './SortableTable'
|
|
16
|
+
export {default as DataTableProvider} from './DataTableProvider'
|
|
17
|
+
export {useField} from './useField'
|
|
18
|
+
export {useTableFields} from './useTableFields'
|
|
19
|
+
export {useTableSort} from './useTableSort'
|
|
20
|
+
export {useTableContext} from './useTableContext'
|
|
21
|
+
export {DataTableContext, type TableContextData} from './DataTableContext'
|
|
22
|
+
export type {TableProviderProps} from './DataTableProvider'
|
|
18
23
|
export type {
|
|
24
|
+
SortProps,
|
|
19
25
|
DataTableField,
|
|
20
|
-
DataTableTHProps,
|
|
21
|
-
DataTableClassNames,
|
|
22
|
-
DataTableProps,
|
|
23
26
|
SortableTableField,
|
|
27
|
+
DataTableColProps,
|
|
28
|
+
DataTableCellProps,
|
|
24
29
|
DataTableRowProps,
|
|
25
30
|
DataTableTBodyProps,
|
|
31
|
+
DataTableClassNames,
|
|
32
|
+
DataTableProps,
|
|
33
|
+
DataTableTHProps,
|
|
34
|
+
RowsPerPageProps,
|
|
26
35
|
SortableTableTHProps,
|
|
27
36
|
SortableTableHeadProps,
|
|
28
|
-
SortProps,
|
|
29
37
|
SortableTableProps,
|
|
30
|
-
UISize,
|
|
31
|
-
UIFlexAlign,
|
|
32
38
|
TablePaginationProps,
|
|
33
|
-
RowsPerPageProps,
|
|
34
39
|
UITableSize,
|
|
35
|
-
|
|
40
|
+
UISize,
|
|
41
|
+
UIFlexAlign
|
|
36
42
|
} from './types';
|
|
37
43
|
|