material-react-table 2.7.0 → 2.8.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 +239 -93
- package/dist/index.esm.js +3489 -3470
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3486 -3470
- package/dist/index.js.map +1 -1
- package/package.json +20 -20
- package/src/{MaterialReactTable.tsx → components/MaterialReactTable.tsx} +3 -3
- package/src/{body → components/body}/MRT_TableBody.tsx +4 -4
- package/src/{body → components/body}/MRT_TableBodyCell.tsx +6 -23
- package/src/{body → components/body}/MRT_TableBodyCellValue.tsx +2 -2
- package/src/{body → components/body}/MRT_TableBodyRow.tsx +3 -3
- package/src/{body → components/body}/MRT_TableBodyRowGrabHandle.tsx +3 -3
- package/src/{body → components/body}/MRT_TableBodyRowPinButton.tsx +3 -3
- package/src/{body → components/body}/MRT_TableDetailPanel.tsx +3 -3
- package/src/{buttons → components/buttons}/MRT_ColumnPinningButtons.tsx +2 -2
- package/src/{buttons → components/buttons}/MRT_CopyButton.tsx +3 -3
- package/src/{buttons → components/buttons}/MRT_EditActionButtons.tsx +2 -2
- package/src/{buttons → components/buttons}/MRT_ExpandAllButton.tsx +3 -3
- package/src/{buttons → components/buttons}/MRT_ExpandButton.tsx +6 -3
- package/src/{buttons → components/buttons}/MRT_GrabHandleButton.tsx +3 -3
- package/src/{buttons → components/buttons}/MRT_RowPinButton.tsx +3 -3
- package/src/{buttons → components/buttons}/MRT_ShowHideColumnsButton.tsx +1 -1
- package/src/{buttons → components/buttons}/MRT_ToggleDensePaddingButton.tsx +1 -1
- package/src/{buttons → components/buttons}/MRT_ToggleFiltersButton.tsx +1 -1
- package/src/{buttons → components/buttons}/MRT_ToggleFullScreenButton.tsx +1 -1
- package/src/{buttons → components/buttons}/MRT_ToggleGlobalFilterButton.tsx +1 -1
- package/src/{buttons → components/buttons}/MRT_ToggleRowActionMenuButton.tsx +4 -4
- package/src/{footer → components/footer}/MRT_TableFooter.tsx +2 -2
- package/src/{footer → components/footer}/MRT_TableFooterCell.tsx +3 -3
- package/src/{footer → components/footer}/MRT_TableFooterRow.tsx +3 -3
- package/src/{head → components/head}/MRT_TableHead.tsx +3 -3
- package/src/{head → components/head}/MRT_TableHeadCell.tsx +3 -3
- package/src/{head → components/head}/MRT_TableHeadCellColumnActionsButton.tsx +4 -4
- package/src/{head → components/head}/MRT_TableHeadCellFilterContainer.tsx +5 -5
- package/src/{head → components/head}/MRT_TableHeadCellFilterLabel.tsx +2 -2
- package/src/{head → components/head}/MRT_TableHeadCellGrabHandle.tsx +4 -3
- package/src/{head → components/head}/MRT_TableHeadCellResizeHandle.tsx +2 -2
- package/src/{head → components/head}/MRT_TableHeadCellSortLabel.tsx +2 -2
- package/src/{head → components/head}/MRT_TableHeadRow.tsx +3 -3
- package/src/{inputs → components/inputs}/MRT_EditCellTextField.tsx +12 -4
- package/src/{inputs → components/inputs}/MRT_FilterCheckbox.tsx +3 -3
- package/src/{inputs → components/inputs}/MRT_FilterRangeFields.tsx +2 -2
- package/src/{inputs → components/inputs}/MRT_FilterRangeSlider.tsx +2 -2
- package/src/{inputs → components/inputs}/MRT_FilterTextField.tsx +3 -3
- package/src/{inputs → components/inputs}/MRT_GlobalFilterTextField.tsx +2 -2
- package/src/{inputs → components/inputs}/MRT_SelectCheckbox.tsx +3 -3
- package/src/{menus → components/menus}/MRT_ColumnActionMenu.tsx +8 -8
- package/src/{menus → components/menus}/MRT_FilterOptionMenu.tsx +2 -2
- package/src/{menus → components/menus}/MRT_RowActionMenu.tsx +9 -9
- package/src/{menus → components/menus}/MRT_ShowHideColumnsMenu.tsx +5 -7
- package/src/{menus → components/menus}/MRT_ShowHideColumnsMenuItems.tsx +6 -5
- package/src/{modals → components/modals}/MRT_EditRowModal.tsx +4 -4
- package/src/{table → components/table}/MRT_Table.tsx +4 -4
- package/src/{table → components/table}/MRT_TableContainer.tsx +2 -2
- package/src/{table → components/table}/MRT_TableLoadingOverlay.tsx +3 -3
- package/src/{table → components/table}/MRT_TablePaper.tsx +3 -3
- package/src/{toolbar → components/toolbar}/MRT_BottomToolbar.tsx +3 -3
- package/src/{toolbar → components/toolbar}/MRT_LinearProgressBar.tsx +2 -2
- package/src/{toolbar → components/toolbar}/MRT_TablePagination.tsx +3 -3
- package/src/{toolbar → components/toolbar}/MRT_ToolbarAlertBanner.tsx +2 -2
- package/src/{toolbar → components/toolbar}/MRT_ToolbarDropZone.tsx +2 -2
- package/src/{toolbar → components/toolbar}/MRT_ToolbarInternalButtons.tsx +2 -2
- package/src/{toolbar → components/toolbar}/MRT_TopToolbar.tsx +3 -3
- package/src/{filterFns.ts → fns/filterFns.ts} +1 -1
- package/src/{sortingFns.ts → fns/sortingFns.ts} +1 -1
- package/src/hooks/display-columns/getMRT_DisplayColumns.tsx +26 -0
- package/src/hooks/display-columns/getMRT_RowActionsColumnDef.tsx +34 -0
- package/src/hooks/display-columns/getMRT_RowDragColumnDef.tsx +35 -0
- package/src/hooks/display-columns/getMRT_RowExpandColumnDef.tsx +96 -0
- package/src/hooks/display-columns/getMRT_RowNumbersColumnDef.tsx +36 -0
- package/src/hooks/display-columns/getMRT_RowPinningColumnDef.tsx +30 -0
- package/src/hooks/display-columns/getMRT_RowSelectColumnDef.tsx +40 -0
- package/src/hooks/display-columns/getMRT_RowSpacerColumnDef.tsx +40 -0
- package/src/hooks/useMRT_ColumnVirtualizer.ts +2 -4
- package/src/hooks/useMRT_Effects.ts +1 -1
- package/src/hooks/useMRT_RowVirtualizer.ts +2 -4
- package/src/hooks/useMRT_Rows.ts +2 -2
- package/src/hooks/useMRT_TableInstance.ts +54 -39
- package/src/hooks/useMRT_TableOptions.ts +3 -3
- package/src/{useMaterialReactTable.ts → hooks/useMaterialReactTable.ts} +3 -3
- package/src/index.ts +79 -82
- package/src/types.ts +54 -26
- package/src/utils/column.utils.ts +173 -0
- package/src/utils/displayColumn.utils.ts +134 -0
- package/src/utils/row.utils.ts +26 -0
- package/src/{style.utils.ts → utils/style.utils.ts} +21 -15
- package/src/utils/tanstack.helpers.ts +64 -0
- package/src/utils/utils.ts +23 -0
- package/src/utils/virtualization.utils.ts +19 -0
- package/src/utils.ts +0 -0
- package/src/column.utils.ts +0 -361
- package/src/hooks/useMRT_DisplayColumns.tsx +0 -290
- /package/src/{aggregationFns.ts → fns/aggregationFns.ts} +0 -0
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "2.
|
2
|
+
"version": "2.8.0",
|
3
3
|
"license": "MIT",
|
4
4
|
"name": "material-react-table",
|
5
5
|
"description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
|
@@ -66,25 +66,25 @@
|
|
66
66
|
"@emotion/react": "^11.11.3",
|
67
67
|
"@emotion/styled": "^11.11.0",
|
68
68
|
"@faker-js/faker": "^8.3.1",
|
69
|
-
"@mui/icons-material": "^5.15.
|
70
|
-
"@mui/material": "^5.15.
|
69
|
+
"@mui/icons-material": "^5.15.5",
|
70
|
+
"@mui/material": "^5.15.5",
|
71
71
|
"@mui/x-date-pickers": "^6.19.0",
|
72
72
|
"@rollup/plugin-typescript": "^11.1.6",
|
73
|
-
"@size-limit/preset-small-lib": "^11.0.
|
74
|
-
"@storybook/addon-a11y": "^7.6.
|
75
|
-
"@storybook/addon-essentials": "^7.6.
|
76
|
-
"@storybook/addon-interactions": "^7.6.
|
77
|
-
"@storybook/addon-links": "^7.6.
|
78
|
-
"@storybook/addon-storysource": "^7.6.
|
79
|
-
"@storybook/blocks": "^7.6.
|
80
|
-
"@storybook/react": "^7.6.
|
81
|
-
"@storybook/react-vite": "^7.6.
|
73
|
+
"@size-limit/preset-small-lib": "^11.0.2",
|
74
|
+
"@storybook/addon-a11y": "^7.6.10",
|
75
|
+
"@storybook/addon-essentials": "^7.6.10",
|
76
|
+
"@storybook/addon-interactions": "^7.6.10",
|
77
|
+
"@storybook/addon-links": "^7.6.10",
|
78
|
+
"@storybook/addon-storysource": "^7.6.10",
|
79
|
+
"@storybook/blocks": "^7.6.10",
|
80
|
+
"@storybook/react": "^7.6.10",
|
81
|
+
"@storybook/react-vite": "^7.6.10",
|
82
82
|
"@storybook/testing-library": "^0.2.2",
|
83
|
-
"@types/node": "^20.11.
|
84
|
-
"@types/react": "^18.2.
|
83
|
+
"@types/node": "^20.11.5",
|
84
|
+
"@types/react": "^18.2.48",
|
85
85
|
"@types/react-dom": "^18.2.18",
|
86
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
87
|
-
"@typescript-eslint/parser": "^6.
|
86
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
87
|
+
"@typescript-eslint/parser": "^6.19.0",
|
88
88
|
"@vitejs/plugin-react": "^4.2.1",
|
89
89
|
"eslint": "^8.56.0",
|
90
90
|
"eslint-plugin-mui-path-imports": "^0.0.15",
|
@@ -96,12 +96,12 @@
|
|
96
96
|
"rollup": "^2.79.1",
|
97
97
|
"rollup-plugin-dts": "^6.1.0",
|
98
98
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
99
|
-
"size-limit": "^11.0.
|
100
|
-
"storybook": "^7.6.
|
99
|
+
"size-limit": "^11.0.2",
|
100
|
+
"storybook": "^7.6.10",
|
101
101
|
"storybook-dark-mode": "^3.0.3",
|
102
102
|
"tslib": "^2.6.2",
|
103
103
|
"typescript": "^5.3.3",
|
104
|
-
"vite": "^5.0.
|
104
|
+
"vite": "^5.0.12"
|
105
105
|
},
|
106
106
|
"peerDependencies": {
|
107
107
|
"@emotion/react": ">=11.11",
|
@@ -115,7 +115,7 @@
|
|
115
115
|
"dependencies": {
|
116
116
|
"@tanstack/match-sorter-utils": "8.11.3",
|
117
117
|
"@tanstack/react-table": "8.11.6",
|
118
|
-
"@tanstack/react-virtual": "3.0.
|
118
|
+
"@tanstack/react-virtual": "3.0.2",
|
119
119
|
"highlight-words": "1.2.2"
|
120
120
|
}
|
121
121
|
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { useMaterialReactTable } from '../hooks/useMaterialReactTable';
|
2
2
|
import {
|
3
3
|
type MRT_RowData,
|
4
4
|
type MRT_TableInstance,
|
5
5
|
type MRT_TableOptions,
|
6
6
|
type Xor,
|
7
|
-
} from '
|
8
|
-
import {
|
7
|
+
} from '../types';
|
8
|
+
import { MRT_TablePaper } from './table/MRT_TablePaper';
|
9
9
|
|
10
10
|
type TableInstanceProp<TData extends MRT_RowData> = {
|
11
11
|
table: MRT_TableInstance<TData>;
|
@@ -3,15 +3,15 @@ import { type VirtualItem } from '@tanstack/react-virtual';
|
|
3
3
|
import TableBody, { type TableBodyProps } from '@mui/material/TableBody';
|
4
4
|
import Typography from '@mui/material/Typography';
|
5
5
|
import { MRT_TableBodyRow, Memo_MRT_TableBodyRow } from './MRT_TableBodyRow';
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import { useMRT_Rows } from '../hooks/useMRT_Rows';
|
6
|
+
import { useMRT_RowVirtualizer } from '../../hooks/useMRT_RowVirtualizer';
|
7
|
+
import { useMRT_Rows } from '../../hooks/useMRT_Rows';
|
9
8
|
import {
|
10
9
|
type MRT_ColumnVirtualizer,
|
11
10
|
type MRT_Row,
|
12
11
|
type MRT_RowData,
|
13
12
|
type MRT_TableInstance,
|
14
|
-
} from '
|
13
|
+
} from '../../types';
|
14
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
15
15
|
|
16
16
|
interface Props<TData extends MRT_RowData> extends TableBodyProps {
|
17
17
|
columnVirtualizer?: MRT_ColumnVirtualizer;
|
@@ -11,19 +11,16 @@ import Skeleton from '@mui/material/Skeleton';
|
|
11
11
|
import TableCell, { type TableCellProps } from '@mui/material/TableCell';
|
12
12
|
import { useTheme } from '@mui/material/styles';
|
13
13
|
import { MRT_TableBodyCellValue } from './MRT_TableBodyCellValue';
|
14
|
-
import { MRT_CopyButton } from '../buttons/MRT_CopyButton';
|
15
|
-
import {
|
16
|
-
getIsFirstColumn,
|
17
|
-
getIsLastColumn,
|
18
|
-
parseFromValuesOrFunc,
|
19
|
-
} from '../column.utils';
|
20
|
-
import { MRT_EditCellTextField } from '../inputs/MRT_EditCellTextField';
|
21
|
-
import { getCommonMRTCellStyles, getMRTTheme } from '../style.utils';
|
22
14
|
import {
|
23
15
|
type MRT_Cell,
|
24
16
|
type MRT_RowData,
|
25
17
|
type MRT_TableInstance,
|
26
|
-
} from '
|
18
|
+
} from '../../types';
|
19
|
+
import { getIsFirstColumn, getIsLastColumn } from '../../utils/column.utils';
|
20
|
+
import { getCommonMRTCellStyles, getMRTTheme } from '../../utils/style.utils';
|
21
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
22
|
+
import { MRT_CopyButton } from '../buttons/MRT_CopyButton';
|
23
|
+
import { MRT_EditCellTextField } from '../inputs/MRT_EditCellTextField';
|
27
24
|
|
28
25
|
interface Props<TData extends MRT_RowData> extends TableCellProps {
|
29
26
|
cell: MRT_Cell<TData>;
|
@@ -60,7 +57,6 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
|
|
60
57
|
layoutMode,
|
61
58
|
muiSkeletonProps,
|
62
59
|
muiTableBodyCellProps,
|
63
|
-
positionExpandColumn,
|
64
60
|
},
|
65
61
|
refs: { editInputRefs },
|
66
62
|
setEditingCell,
|
@@ -255,19 +251,6 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
|
|
255
251
|
? '1rem 1.25rem'
|
256
252
|
: '1.5rem',
|
257
253
|
textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined,
|
258
|
-
[theme.direction === 'rtl' || positionExpandColumn === 'last'
|
259
|
-
? 'pr'
|
260
|
-
: 'pl']:
|
261
|
-
column.id === 'mrt-row-expand'
|
262
|
-
? `${
|
263
|
-
row.depth +
|
264
|
-
(density === 'compact'
|
265
|
-
? 0.5
|
266
|
-
: density === 'comfortable'
|
267
|
-
? 0.75
|
268
|
-
: 1.25)
|
269
|
-
}rem`
|
270
|
-
: undefined,
|
271
254
|
whiteSpace:
|
272
255
|
row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal',
|
273
256
|
zIndex:
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { type ReactNode, type RefObject } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
|
-
import { getMRTTheme } from '../style.utils';
|
4
3
|
import {
|
5
4
|
type MRT_Cell,
|
6
5
|
type MRT_RowData,
|
7
6
|
type MRT_TableInstance,
|
8
|
-
} from '
|
7
|
+
} from '../../types';
|
8
|
+
import { getMRTTheme } from '../../utils/style.utils';
|
9
9
|
import highlightWords from 'highlight-words';
|
10
10
|
|
11
11
|
const allowedTypes = ['string', 'number'];
|
@@ -10,8 +10,6 @@ import {
|
|
10
10
|
} from '@mui/material/styles';
|
11
11
|
import { MRT_TableBodyCell, Memo_MRT_TableBodyCell } from './MRT_TableBodyCell';
|
12
12
|
import { MRT_TableDetailPanel } from './MRT_TableDetailPanel';
|
13
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
14
|
-
import { getMRTTheme } from '../style.utils';
|
15
13
|
import {
|
16
14
|
type MRT_Cell,
|
17
15
|
type MRT_ColumnVirtualizer,
|
@@ -19,7 +17,9 @@ import {
|
|
19
17
|
type MRT_RowData,
|
20
18
|
type MRT_RowVirtualizer,
|
21
19
|
type MRT_TableInstance,
|
22
|
-
} from '
|
20
|
+
} from '../../types';
|
21
|
+
import { getMRTTheme } from '../../utils/style.utils';
|
22
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
23
23
|
|
24
24
|
interface Props<TData extends MRT_RowData> {
|
25
25
|
columnVirtualizer?: MRT_ColumnVirtualizer;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { type DragEvent, type RefObject } from 'react';
|
2
2
|
import { type IconButtonProps } from '@mui/material/IconButton';
|
3
|
-
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
4
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
5
3
|
import {
|
6
4
|
type MRT_Row,
|
7
5
|
type MRT_RowData,
|
8
6
|
type MRT_TableInstance,
|
9
|
-
} from '
|
7
|
+
} from '../../types';
|
8
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
9
|
+
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
10
10
|
|
11
11
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
12
12
|
row: MRT_Row<TData>;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import Box from '@mui/material/Box';
|
2
2
|
import { type IconButtonProps } from '@mui/material/IconButton';
|
3
|
-
import { MRT_RowPinButton } from '../buttons/MRT_RowPinButton';
|
4
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
5
3
|
import {
|
6
4
|
type MRT_Row,
|
7
5
|
type MRT_RowData,
|
8
6
|
type MRT_TableInstance,
|
9
|
-
} from '
|
7
|
+
} from '../../types';
|
8
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
9
|
+
import { MRT_RowPinButton } from '../buttons/MRT_RowPinButton';
|
10
10
|
|
11
11
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
12
12
|
row: MRT_Row<TData>;
|
@@ -2,15 +2,15 @@ import { type RefObject } from 'react';
|
|
2
2
|
import Collapse from '@mui/material/Collapse';
|
3
3
|
import TableCell, { type TableCellProps } from '@mui/material/TableCell';
|
4
4
|
import TableRow from '@mui/material/TableRow';
|
5
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
6
|
-
import { getMRTTheme } from '../style.utils';
|
7
5
|
import {
|
8
6
|
type MRT_Row,
|
9
7
|
type MRT_RowData,
|
10
8
|
type MRT_RowVirtualizer,
|
11
9
|
type MRT_TableInstance,
|
12
10
|
type MRT_VirtualItem,
|
13
|
-
} from '
|
11
|
+
} from '../../types';
|
12
|
+
import { getMRTTheme } from '../../utils/style.utils';
|
13
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
14
14
|
|
15
15
|
interface Props<TData extends MRT_RowData> extends TableCellProps {
|
16
16
|
parentRowRef: RefObject<HTMLTableRowElement>;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import Box, { type BoxProps } from '@mui/material/Box';
|
2
2
|
import IconButton from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
5
4
|
import {
|
6
5
|
type MRT_Column,
|
7
6
|
type MRT_RowData,
|
8
7
|
type MRT_TableInstance,
|
9
|
-
} from '
|
8
|
+
} from '../../types';
|
9
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
10
10
|
|
11
11
|
interface Props<TData extends MRT_RowData> extends BoxProps {
|
12
12
|
column: MRT_Column<TData>;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { type MouseEvent, useState } from 'react';
|
2
2
|
import Button, { type ButtonProps } from '@mui/material/Button';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
5
|
-
import { getCommonTooltipProps } from '../style.utils';
|
6
4
|
import {
|
7
5
|
type MRT_Cell,
|
8
6
|
type MRT_RowData,
|
9
7
|
type MRT_TableInstance,
|
10
|
-
} from '
|
8
|
+
} from '../../types';
|
9
|
+
import { getCommonTooltipProps } from '../../utils/style.utils';
|
10
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
11
11
|
|
12
12
|
interface Props<TData extends MRT_RowData> extends ButtonProps {
|
13
13
|
cell: MRT_Cell<TData>;
|
@@ -3,12 +3,12 @@ import Button from '@mui/material/Button';
|
|
3
3
|
import CircularProgress from '@mui/material/CircularProgress';
|
4
4
|
import IconButton from '@mui/material/IconButton';
|
5
5
|
import Tooltip from '@mui/material/Tooltip';
|
6
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
7
6
|
import {
|
8
7
|
type MRT_Row,
|
9
8
|
type MRT_RowData,
|
10
9
|
type MRT_TableInstance,
|
11
|
-
} from '
|
10
|
+
} from '../../types';
|
11
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
12
12
|
|
13
13
|
interface Props<TData extends MRT_RowData> extends BoxProps {
|
14
14
|
row: MRT_Row<TData>;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
2
2
|
import Tooltip from '@mui/material/Tooltip';
|
3
|
-
import {
|
4
|
-
import { getCommonTooltipProps } from '
|
5
|
-
import {
|
3
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
|
4
|
+
import { getCommonTooltipProps } from '../../utils/style.utils';
|
5
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
6
6
|
|
7
7
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
8
8
|
table: MRT_TableInstance<TData>;
|
@@ -2,13 +2,13 @@ import { type MouseEvent } from 'react';
|
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { useTheme } from '@mui/material/styles';
|
5
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
6
|
-
import { getCommonTooltipProps } from '../style.utils';
|
7
5
|
import {
|
8
6
|
type MRT_Row,
|
9
7
|
type MRT_RowData,
|
10
8
|
type MRT_TableInstance,
|
11
|
-
} from '
|
9
|
+
} from '../../types';
|
10
|
+
import { getCommonTooltipProps } from '../../utils/style.utils';
|
11
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
12
12
|
|
13
13
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
14
14
|
row: MRT_Row<TData>;
|
@@ -69,6 +69,9 @@ export const MRT_ExpandButton = <TData extends MRT_RowData>({
|
|
69
69
|
sx={(theme) => ({
|
70
70
|
height: density === 'compact' ? '1.75rem' : '2.25rem',
|
71
71
|
opacity: !canExpand && !detailPanel ? 0.3 : 1,
|
72
|
+
[theme.direction === 'rtl' || positionExpandColumn === 'last'
|
73
|
+
? 'mr'
|
74
|
+
: 'ml']: `${row.depth * 16}px`,
|
72
75
|
width: density === 'compact' ? '1.75rem' : '2.25rem',
|
73
76
|
...(parseFromValuesOrFunc(iconButtonProps?.sx, theme) as any),
|
74
77
|
})}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { type DragEventHandler } from 'react';
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
|
-
import {
|
5
|
-
import { getCommonTooltipProps } from '
|
6
|
-
import {
|
4
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
|
5
|
+
import { getCommonTooltipProps } from '../../utils/style.utils';
|
6
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
7
7
|
|
8
8
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
9
9
|
iconButtonProps?: IconButtonProps;
|
@@ -2,13 +2,13 @@ import { type MouseEvent, useState } from 'react';
|
|
2
2
|
import { type RowPinningPosition } from '@tanstack/react-table';
|
3
3
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
4
4
|
import Tooltip from '@mui/material/Tooltip';
|
5
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
6
|
-
import { getCommonTooltipProps } from '../style.utils';
|
7
5
|
import {
|
8
6
|
type MRT_Row,
|
9
7
|
type MRT_RowData,
|
10
8
|
type MRT_TableInstance,
|
11
|
-
} from '
|
9
|
+
} from '../../types';
|
10
|
+
import { getCommonTooltipProps } from '../../utils/style.utils';
|
11
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
12
12
|
|
13
13
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
14
14
|
pinningPosition: RowPinningPosition;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { type MouseEvent, useState } from 'react';
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
|
4
5
|
import { MRT_ShowHideColumnsMenu } from '../menus/MRT_ShowHideColumnsMenu';
|
5
|
-
import { type MRT_RowData, type MRT_TableInstance } from '../types';
|
6
6
|
|
7
7
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
8
8
|
table: MRT_TableInstance<TData>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
2
2
|
import Tooltip from '@mui/material/Tooltip';
|
3
|
-
import { type MRT_RowData, type MRT_TableInstance } from '
|
3
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
|
4
4
|
|
5
5
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
6
6
|
table: MRT_TableInstance<TData>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
2
2
|
import Tooltip from '@mui/material/Tooltip';
|
3
|
-
import { type MRT_RowData, type MRT_TableInstance } from '
|
3
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
|
4
4
|
|
5
5
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
6
6
|
table: MRT_TableInstance<TData>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { useState } from 'react';
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
|
-
import { type MRT_RowData, type MRT_TableInstance } from '
|
4
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
|
5
5
|
|
6
6
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
7
7
|
table: MRT_TableInstance<TData>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
2
2
|
import Tooltip from '@mui/material/Tooltip';
|
3
|
-
import { type MRT_RowData, type MRT_TableInstance } from '
|
3
|
+
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
|
4
4
|
|
5
5
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
6
6
|
table: MRT_TableInstance<TData>;
|
@@ -2,15 +2,15 @@ import { type MouseEvent, useState } from 'react';
|
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { MRT_EditActionButtons } from './MRT_EditActionButtons';
|
5
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
6
|
-
import { MRT_RowActionMenu } from '../menus/MRT_RowActionMenu';
|
7
|
-
import { getCommonTooltipProps } from '../style.utils';
|
8
5
|
import {
|
9
6
|
type MRT_Cell,
|
10
7
|
type MRT_Row,
|
11
8
|
type MRT_RowData,
|
12
9
|
type MRT_TableInstance,
|
13
|
-
} from '
|
10
|
+
} from '../../types';
|
11
|
+
import { getCommonTooltipProps } from '../../utils/style.utils';
|
12
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
13
|
+
import { MRT_RowActionMenu } from '../menus/MRT_RowActionMenu';
|
14
14
|
|
15
15
|
const commonIconButtonStyles = {
|
16
16
|
'&:hover': {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import TableFooter, { type TableFooterProps } from '@mui/material/TableFooter';
|
2
2
|
import { MRT_TableFooterRow } from './MRT_TableFooterRow';
|
3
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
4
3
|
import {
|
5
4
|
type MRT_ColumnVirtualizer,
|
6
5
|
type MRT_RowData,
|
7
6
|
type MRT_TableInstance,
|
8
|
-
} from '
|
7
|
+
} from '../../types';
|
8
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
9
9
|
|
10
10
|
interface Props<TData extends MRT_RowData> extends TableFooterProps {
|
11
11
|
columnVirtualizer?: MRT_ColumnVirtualizer;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import TableCell, { type TableCellProps } from '@mui/material/TableCell';
|
2
2
|
import { useTheme } from '@mui/material/styles';
|
3
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
4
|
-
import { getCommonMRTCellStyles } from '../style.utils';
|
5
3
|
import {
|
6
4
|
type MRT_Header,
|
7
5
|
type MRT_RowData,
|
8
6
|
type MRT_TableInstance,
|
9
|
-
} from '
|
7
|
+
} from '../../types';
|
8
|
+
import { getCommonMRTCellStyles } from '../../utils/style.utils';
|
9
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
10
10
|
|
11
11
|
interface Props<TData extends MRT_RowData> extends TableCellProps {
|
12
12
|
footer: MRT_Header<TData>;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import TableRow, { type TableRowProps } from '@mui/material/TableRow';
|
2
2
|
import { MRT_TableFooterCell } from './MRT_TableFooterCell';
|
3
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
4
|
-
import { getMRTTheme } from '../style.utils';
|
5
3
|
import {
|
6
4
|
type MRT_ColumnVirtualizer,
|
7
5
|
type MRT_Header,
|
8
6
|
type MRT_HeaderGroup,
|
9
7
|
type MRT_RowData,
|
10
8
|
type MRT_TableInstance,
|
11
|
-
} from '
|
9
|
+
} from '../../types';
|
10
|
+
import { getMRTTheme } from '../../utils/style.utils';
|
11
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
12
12
|
|
13
13
|
interface Props<TData extends MRT_RowData> extends TableRowProps {
|
14
14
|
columnVirtualizer?: MRT_ColumnVirtualizer;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import TableHead, { type TableHeadProps } from '@mui/material/TableHead';
|
2
2
|
import { MRT_TableHeadRow } from './MRT_TableHeadRow';
|
3
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
4
|
-
import { MRT_ToolbarAlertBanner } from '../toolbar/MRT_ToolbarAlertBanner';
|
5
3
|
import {
|
6
4
|
type MRT_ColumnVirtualizer,
|
7
5
|
type MRT_RowData,
|
8
6
|
type MRT_TableInstance,
|
9
|
-
} from '
|
7
|
+
} from '../../types';
|
8
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
9
|
+
import { MRT_ToolbarAlertBanner } from '../toolbar/MRT_ToolbarAlertBanner';
|
10
10
|
|
11
11
|
interface Props<TData extends MRT_RowData> extends TableHeadProps {
|
12
12
|
columnVirtualizer?: MRT_ColumnVirtualizer;
|
@@ -9,13 +9,13 @@ import { MRT_TableHeadCellFilterLabel } from './MRT_TableHeadCellFilterLabel';
|
|
9
9
|
import { MRT_TableHeadCellGrabHandle } from './MRT_TableHeadCellGrabHandle';
|
10
10
|
import { MRT_TableHeadCellResizeHandle } from './MRT_TableHeadCellResizeHandle';
|
11
11
|
import { MRT_TableHeadCellSortLabel } from './MRT_TableHeadCellSortLabel';
|
12
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
13
|
-
import { getCommonMRTCellStyles, getMRTTheme } from '../style.utils';
|
14
12
|
import {
|
15
13
|
type MRT_Header,
|
16
14
|
type MRT_RowData,
|
17
15
|
type MRT_TableInstance,
|
18
|
-
} from '
|
16
|
+
} from '../../types';
|
17
|
+
import { getCommonMRTCellStyles, getMRTTheme } from '../../utils/style.utils';
|
18
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
19
19
|
|
20
20
|
interface Props<TData extends MRT_RowData> extends TableCellProps {
|
21
21
|
header: MRT_Header<TData>;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { type MouseEvent, useState } from 'react';
|
2
2
|
import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
5
|
-
import { MRT_ColumnActionMenu } from '../menus/MRT_ColumnActionMenu';
|
6
|
-
import { getCommonTooltipProps } from '../style.utils';
|
7
4
|
import {
|
8
5
|
type MRT_Header,
|
9
6
|
type MRT_RowData,
|
10
7
|
type MRT_TableInstance,
|
11
|
-
} from '
|
8
|
+
} from '../../types';
|
9
|
+
import { getCommonTooltipProps } from '../../utils/style.utils';
|
10
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
11
|
+
import { MRT_ColumnActionMenu } from '../menus/MRT_ColumnActionMenu';
|
12
12
|
|
13
13
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
14
14
|
header: MRT_Header<TData>;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import Collapse, { type CollapseProps } from '@mui/material/Collapse';
|
2
|
-
import { MRT_FilterCheckbox } from '../inputs/MRT_FilterCheckbox';
|
3
|
-
import { MRT_FilterRangeFields } from '../inputs/MRT_FilterRangeFields';
|
4
|
-
import { MRT_FilterRangeSlider } from '../inputs/MRT_FilterRangeSlider';
|
5
|
-
import { MRT_FilterTextField } from '../inputs/MRT_FilterTextField';
|
6
2
|
import {
|
7
3
|
type MRT_Header,
|
8
4
|
type MRT_RowData,
|
9
5
|
type MRT_TableInstance,
|
10
|
-
} from '
|
6
|
+
} from '../../types';
|
7
|
+
import { MRT_FilterCheckbox } from '../inputs/MRT_FilterCheckbox';
|
8
|
+
import { MRT_FilterRangeFields } from '../inputs/MRT_FilterRangeFields';
|
9
|
+
import { MRT_FilterRangeSlider } from '../inputs/MRT_FilterRangeSlider';
|
10
|
+
import { MRT_FilterTextField } from '../inputs/MRT_FilterTextField';
|
11
11
|
|
12
12
|
interface Props<TData extends MRT_RowData> extends CollapseProps {
|
13
13
|
header: MRT_Header<TData>;
|
@@ -5,12 +5,12 @@ import IconButton, { type IconButtonProps } from '@mui/material/IconButton';
|
|
5
5
|
import Popover from '@mui/material/Popover';
|
6
6
|
import Tooltip from '@mui/material/Tooltip';
|
7
7
|
import { MRT_TableHeadCellFilterContainer } from './MRT_TableHeadCellFilterContainer';
|
8
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
9
8
|
import {
|
10
9
|
type MRT_Header,
|
11
10
|
type MRT_RowData,
|
12
11
|
type MRT_TableInstance,
|
13
|
-
} from '
|
12
|
+
} from '../../types';
|
13
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
14
14
|
|
15
15
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
16
16
|
header: MRT_Header<TData>;
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { type DragEvent, type RefObject } from 'react';
|
2
2
|
import { type IconButtonProps } from '@mui/material/IconButton';
|
3
|
-
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
4
|
-
import { parseFromValuesOrFunc, reorderColumn } from '../column.utils';
|
5
3
|
import {
|
6
4
|
type MRT_Column,
|
7
5
|
type MRT_RowData,
|
8
6
|
type MRT_TableInstance,
|
9
|
-
} from '
|
7
|
+
} from '../../types';
|
8
|
+
import { reorderColumn } from '../../utils/column.utils';
|
9
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
10
|
+
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
10
11
|
|
11
12
|
interface Props<TData extends MRT_RowData> extends IconButtonProps {
|
12
13
|
column: MRT_Column<TData>;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import Box from '@mui/material/Box';
|
2
2
|
import Divider, { type DividerProps } from '@mui/material/Divider';
|
3
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
4
3
|
import {
|
5
4
|
type MRT_Header,
|
6
5
|
type MRT_RowData,
|
7
6
|
type MRT_TableInstance,
|
8
|
-
} from '
|
7
|
+
} from '../../types';
|
8
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
9
9
|
|
10
10
|
interface Props<TData extends MRT_RowData> extends DividerProps {
|
11
11
|
header: MRT_Header<TData>;
|
@@ -3,12 +3,12 @@ import TableSortLabel, {
|
|
3
3
|
type TableSortLabelProps,
|
4
4
|
} from '@mui/material/TableSortLabel';
|
5
5
|
import Tooltip from '@mui/material/Tooltip';
|
6
|
-
import { parseFromValuesOrFunc } from '../column.utils';
|
7
6
|
import {
|
8
7
|
type MRT_Header,
|
9
8
|
type MRT_RowData,
|
10
9
|
type MRT_TableInstance,
|
11
|
-
} from '
|
10
|
+
} from '../../types';
|
11
|
+
import { parseFromValuesOrFunc } from '../../utils/utils';
|
12
12
|
|
13
13
|
interface Props<TData extends MRT_RowData> extends TableSortLabelProps {
|
14
14
|
header: MRT_Header<TData>;
|