material-react-table 1.6.5 → 1.6.6
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/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/_locales/sv.d.ts +2 -0
- package/dist/cjs/types/body/MRT_TableBody.d.ts +3 -3
- package/dist/cjs/types/body/MRT_TableBodyCell.d.ts +3 -3
- package/dist/cjs/types/body/MRT_TableBodyCellValue.d.ts +2 -2
- package/dist/cjs/types/body/MRT_TableBodyRow.d.ts +3 -3
- package/dist/cjs/types/body/MRT_TableBodyRowGrabHandle.d.ts +2 -2
- package/dist/cjs/types/body/MRT_TableDetailPanel.d.ts +2 -2
- package/dist/cjs/types/buttons/MRT_ExpandAllButton.d.ts +2 -2
- package/dist/cjs/types/buttons/MRT_ExpandButton.d.ts +2 -2
- package/dist/cjs/types/footer/MRT_TableFooter.d.ts +2 -2
- package/dist/cjs/types/footer/MRT_TableFooterCell.d.ts +2 -2
- package/dist/cjs/types/footer/MRT_TableFooterRow.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHead.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHeadCell.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHeadCellFilterContainer.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHeadCellFilterLabel.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHeadCellGrabHandle.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHeadCellResizeHandle.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHeadCellSortLabel.d.ts +2 -2
- package/dist/cjs/types/head/MRT_TableHeadRow.d.ts +2 -2
- package/dist/cjs/types/inputs/MRT_FilterCheckbox.d.ts +2 -2
- package/dist/cjs/types/inputs/MRT_FilterRangeFields.d.ts +2 -2
- package/dist/cjs/types/inputs/MRT_FilterTextField.d.ts +2 -2
- package/dist/cjs/types/inputs/MRT_SelectCheckbox.d.ts +2 -2
- package/dist/cjs/types/menus/MRT_ColumnActionMenu.d.ts +2 -2
- package/dist/cjs/types/menus/MRT_RowActionMenu.d.ts +2 -2
- package/dist/cjs/types/table/MRT_Table.d.ts +2 -2
- package/dist/cjs/types/table/MRT_TableContainer.d.ts +2 -2
- package/dist/cjs/types/table/MRT_TablePaper.d.ts +2 -2
- package/dist/esm/material-react-table.esm.js +2 -2
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/_locales/sv.d.ts +2 -0
- package/dist/esm/types/body/MRT_TableBody.d.ts +3 -3
- package/dist/esm/types/body/MRT_TableBodyCell.d.ts +3 -3
- package/dist/esm/types/body/MRT_TableBodyCellValue.d.ts +2 -2
- package/dist/esm/types/body/MRT_TableBodyRow.d.ts +3 -3
- package/dist/esm/types/body/MRT_TableBodyRowGrabHandle.d.ts +2 -2
- package/dist/esm/types/body/MRT_TableDetailPanel.d.ts +2 -2
- package/dist/esm/types/buttons/MRT_ExpandAllButton.d.ts +2 -2
- package/dist/esm/types/buttons/MRT_ExpandButton.d.ts +2 -2
- package/dist/esm/types/footer/MRT_TableFooter.d.ts +2 -2
- package/dist/esm/types/footer/MRT_TableFooterCell.d.ts +2 -2
- package/dist/esm/types/footer/MRT_TableFooterRow.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHead.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHeadCell.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHeadCellColumnActionsButton.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHeadCellFilterContainer.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHeadCellFilterLabel.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHeadCellGrabHandle.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHeadCellResizeHandle.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHeadCellSortLabel.d.ts +2 -2
- package/dist/esm/types/head/MRT_TableHeadRow.d.ts +2 -2
- package/dist/esm/types/inputs/MRT_FilterCheckbox.d.ts +2 -2
- package/dist/esm/types/inputs/MRT_FilterRangeFields.d.ts +2 -2
- package/dist/esm/types/inputs/MRT_FilterTextField.d.ts +2 -2
- package/dist/esm/types/inputs/MRT_SelectCheckbox.d.ts +2 -2
- package/dist/esm/types/menus/MRT_ColumnActionMenu.d.ts +2 -2
- package/dist/esm/types/menus/MRT_RowActionMenu.d.ts +2 -2
- package/dist/esm/types/table/MRT_Table.d.ts +2 -2
- package/dist/esm/types/table/MRT_TableContainer.d.ts +2 -2
- package/dist/esm/types/table/MRT_TablePaper.d.ts +2 -2
- package/locales/sv.d.ts +2 -0
- package/locales/sv.esm.d.ts +2 -0
- package/locales/sv.esm.js +94 -0
- package/locales/sv.esm.js.map +1 -0
- package/locales/sv.js +98 -0
- package/locales/sv.js.map +1 -0
- package/package.json +1 -1
- package/src/_locales/sv.ts +94 -0
- package/src/body/MRT_TableBody.tsx +3 -3
- package/src/body/MRT_TableBodyCell.tsx +2 -3
- package/src/body/MRT_TableBodyCellValue.tsx +2 -2
- package/src/body/MRT_TableBodyRow.tsx +3 -3
- package/src/body/MRT_TableBodyRowGrabHandle.tsx +2 -6
- package/src/body/MRT_TableDetailPanel.tsx +3 -3
- package/src/buttons/MRT_ExpandAllButton.tsx +2 -2
- package/src/buttons/MRT_ExpandButton.tsx +2 -2
- package/src/footer/MRT_TableFooter.tsx +3 -3
- package/src/footer/MRT_TableFooterCell.tsx +2 -2
- package/src/footer/MRT_TableFooterRow.tsx +3 -3
- package/src/head/MRT_TableHead.tsx +3 -3
- package/src/head/MRT_TableHeadCell.tsx +2 -2
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +3 -3
- package/src/head/MRT_TableHeadCellFilterContainer.tsx +2 -5
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +2 -2
- package/src/head/MRT_TableHeadCellGrabHandle.tsx +3 -3
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +2 -2
- package/src/head/MRT_TableHeadCellSortLabel.tsx +3 -3
- package/src/head/MRT_TableHeadRow.tsx +3 -3
- package/src/inputs/MRT_FilterCheckbox.tsx +2 -2
- package/src/inputs/MRT_FilterRangeFields.tsx +2 -2
- package/src/inputs/MRT_FilterTextField.tsx +2 -3
- package/src/inputs/MRT_SelectCheckbox.tsx +2 -2
- package/src/menus/MRT_ColumnActionMenu.tsx +3 -3
- package/src/menus/MRT_RowActionMenu.tsx +3 -3
- package/src/table/MRT_Table.tsx +2 -2
- package/src/table/MRT_TableContainer.tsx +2 -2
- package/src/table/MRT_TablePaper.tsx +2 -2
@@ -0,0 +1,94 @@
|
|
1
|
+
import type { MRT_Localization } from '../MaterialReactTable';
|
2
|
+
|
3
|
+
export const MRT_Localization_SV: MRT_Localization = {
|
4
|
+
actions: 'Åtgärder',
|
5
|
+
and: 'och',
|
6
|
+
cancel: 'Avbryt',
|
7
|
+
changeFilterMode: 'Ändra filterläge',
|
8
|
+
changeSearchMode: 'Ändra sökläge',
|
9
|
+
clearFilter: 'Rensa filter',
|
10
|
+
clearSearch: 'Rensa sök',
|
11
|
+
clearSort: 'Rensa sortering',
|
12
|
+
clickToCopy: 'Klicka för att kopiera',
|
13
|
+
collapse: 'Stäng',
|
14
|
+
collapseAll: 'Stäng alla',
|
15
|
+
columnActions: 'Kolumnåtgärd',
|
16
|
+
copiedToClipboard: 'Kopierade till urklipp',
|
17
|
+
dropToGroupBy: 'Släpp för att grupp efter {column}',
|
18
|
+
edit: 'Redigera',
|
19
|
+
expand: 'Expandera',
|
20
|
+
expandAll: 'Expandera alla',
|
21
|
+
filterArrIncludes: 'Inkluderar',
|
22
|
+
filterArrIncludesAll: 'Inkluderar alla',
|
23
|
+
filterArrIncludesSome: 'Inkluderar',
|
24
|
+
filterBetween: 'Mellan',
|
25
|
+
filterBetweenInclusive: 'Mellan inklusive',
|
26
|
+
filterByColumn: 'Filtrera efter {column}',
|
27
|
+
filterContains: 'Innehåller',
|
28
|
+
filterEmpty: 'Tom',
|
29
|
+
filterEndsWith: 'Slutar med',
|
30
|
+
filterEquals: 'Lika med',
|
31
|
+
filterEqualsString: 'Lika med',
|
32
|
+
filterFuzzy: 'Fuzzy',
|
33
|
+
filterGreaterThan: 'Större än',
|
34
|
+
filterGreaterThanOrEqualTo: 'Större än eller lika med',
|
35
|
+
filterInNumberRange: 'Mellan',
|
36
|
+
filterIncludesString: 'Innehåller',
|
37
|
+
filterIncludesStringSensitive: 'Innehåller',
|
38
|
+
filterLessThan: 'Mindre än',
|
39
|
+
filterLessThanOrEqualTo: 'Mindre än eller lika med',
|
40
|
+
filterMode: 'Filterläge: {filterType}',
|
41
|
+
filterNotEmpty: 'Inte Tom',
|
42
|
+
filterNotEquals: 'Inte lika med',
|
43
|
+
filterStartsWith: 'Börjar med',
|
44
|
+
filterWeakEquals: 'Lika med',
|
45
|
+
filteringByColumn: 'Filtrering efter {kolumn} - {filterType} {filterValue}',
|
46
|
+
goToFirstPage: 'Gå till första sidan',
|
47
|
+
goToLastPage: 'Gå till sista sidan ',
|
48
|
+
goToNextPage: 'Gå till nästa sida',
|
49
|
+
goToPreviousPage: 'Gå till föregående sida',
|
50
|
+
grab: 'Greppa',
|
51
|
+
groupByColumn: 'Guppera efter {column}',
|
52
|
+
groupedBy: 'Gruppera efter ',
|
53
|
+
hideAll: 'Göm alla',
|
54
|
+
hideColumn: 'Göm {column} kolumn',
|
55
|
+
max: 'Max',
|
56
|
+
min: 'Minst',
|
57
|
+
move: 'Flytta',
|
58
|
+
noRecordsToDisplay: 'Inget att visa',
|
59
|
+
noResultsFound: 'Inga resultat funna',
|
60
|
+
of: 'av',
|
61
|
+
or: 'eller',
|
62
|
+
pinToLeft: 'Fäst till vänster',
|
63
|
+
pinToRight: 'Fäst till höger',
|
64
|
+
resetColumnSize: 'Återställ kolumnstorlek',
|
65
|
+
resetOrder: 'Återställ ordning',
|
66
|
+
rowActions: 'Radåtgärder',
|
67
|
+
rowNumber: '#',
|
68
|
+
rowNumbers: 'Radnummer',
|
69
|
+
rowsPerPage: 'Rader per sida',
|
70
|
+
save: 'Spara',
|
71
|
+
search: 'Sök',
|
72
|
+
selectedCountOfRowCountRowsSelected:
|
73
|
+
'{selectedCount} av {rowCount} rad(er) valda',
|
74
|
+
select: 'Välj',
|
75
|
+
showAll: 'Visa alla',
|
76
|
+
showAllColumns: 'Visa alla kolumner',
|
77
|
+
showHideColumns: 'Visa/Göm kolumner',
|
78
|
+
showHideFilters: 'Visa/Göm filter',
|
79
|
+
showHideSearch: 'Visa/Göm sök',
|
80
|
+
sortByColumnAsc: 'Sortera efter {column} stigande',
|
81
|
+
sortByColumnDesc: 'Sort by {column} nedåtgående',
|
82
|
+
sortedByColumnAsc: 'Sorterat efter {column} stigande',
|
83
|
+
sortedByColumnDesc: 'Sorterat efter {column} nedåtgående',
|
84
|
+
thenBy: ', sedan av ',
|
85
|
+
toggleDensity: 'Växla densitet',
|
86
|
+
toggleFullScreen: 'Växla helskärm',
|
87
|
+
toggleSelectAll: 'Växla välja alla',
|
88
|
+
toggleSelectRow: 'Växla välj rad',
|
89
|
+
toggleVisibility: 'Växla synlighet',
|
90
|
+
ungroupByColumn: 'Avgruppera efter {column}',
|
91
|
+
unpin: 'Avfäst',
|
92
|
+
unpinAll: 'Avfäst alla',
|
93
|
+
unsorted: 'Osorterad',
|
94
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { memo, useMemo } from 'react';
|
2
2
|
import {
|
3
3
|
useVirtualizer,
|
4
4
|
Virtualizer,
|
@@ -18,13 +18,13 @@ interface Props {
|
|
18
18
|
virtualPaddingRight?: number;
|
19
19
|
}
|
20
20
|
|
21
|
-
export const MRT_TableBody
|
21
|
+
export const MRT_TableBody = ({
|
22
22
|
columnVirtualizer,
|
23
23
|
table,
|
24
24
|
virtualColumns,
|
25
25
|
virtualPaddingLeft,
|
26
26
|
virtualPaddingRight,
|
27
|
-
}) => {
|
27
|
+
}: Props) => {
|
28
28
|
const {
|
29
29
|
getRowModel,
|
30
30
|
getPrePaginationRowModel,
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React, {
|
2
2
|
DragEvent,
|
3
|
-
FC,
|
4
3
|
memo,
|
5
4
|
MouseEvent,
|
6
5
|
RefObject,
|
@@ -34,7 +33,7 @@ interface Props {
|
|
34
33
|
virtualCell?: VirtualItem;
|
35
34
|
}
|
36
35
|
|
37
|
-
export const MRT_TableBodyCell
|
36
|
+
export const MRT_TableBodyCell = ({
|
38
37
|
cell,
|
39
38
|
enableHover,
|
40
39
|
measureElement,
|
@@ -43,7 +42,7 @@ export const MRT_TableBodyCell: FC<Props> = ({
|
|
43
42
|
rowRef,
|
44
43
|
table,
|
45
44
|
virtualCell,
|
46
|
-
}) => {
|
45
|
+
}: Props) => {
|
47
46
|
const theme = useTheme();
|
48
47
|
const {
|
49
48
|
getState,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { ReactNode } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import { darken, lighten } from '@mui/material/styles';
|
4
4
|
import highlightWords from 'highlight-words';
|
@@ -11,7 +11,7 @@ interface Props {
|
|
11
11
|
table: MRT_TableInstance;
|
12
12
|
}
|
13
13
|
|
14
|
-
export const MRT_TableBodyCellValue
|
14
|
+
export const MRT_TableBodyCellValue = ({ cell, table }: Props) => {
|
15
15
|
const {
|
16
16
|
getState,
|
17
17
|
options: { enableFilterMatchHighlighting },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { DragEvent,
|
1
|
+
import React, { DragEvent, memo, useRef } from 'react';
|
2
2
|
import TableRow from '@mui/material/TableRow';
|
3
3
|
import { darken, lighten } from '@mui/material/styles';
|
4
4
|
import { Memo_MRT_TableBodyCell, MRT_TableBodyCell } from './MRT_TableBodyCell';
|
@@ -19,7 +19,7 @@ interface Props {
|
|
19
19
|
virtualRow?: VirtualItem;
|
20
20
|
}
|
21
21
|
|
22
|
-
export const MRT_TableBodyRow
|
22
|
+
export const MRT_TableBodyRow = ({
|
23
23
|
columnVirtualizer,
|
24
24
|
measureElement,
|
25
25
|
numRows,
|
@@ -30,7 +30,7 @@ export const MRT_TableBodyRow: FC<Props> = ({
|
|
30
30
|
virtualPaddingLeft,
|
31
31
|
virtualPaddingRight,
|
32
32
|
virtualRow,
|
33
|
-
}) => {
|
33
|
+
}: Props) => {
|
34
34
|
const {
|
35
35
|
getIsSomeColumnsPinned,
|
36
36
|
getState,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { DragEvent,
|
1
|
+
import React, { DragEvent, RefObject } from 'react';
|
2
2
|
import { MRT_Cell, MRT_TableInstance } from '..';
|
3
3
|
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
4
4
|
|
@@ -8,11 +8,7 @@ interface Props {
|
|
8
8
|
table: MRT_TableInstance;
|
9
9
|
}
|
10
10
|
|
11
|
-
export const MRT_TableBodyRowGrabHandle:
|
12
|
-
cell,
|
13
|
-
rowRef,
|
14
|
-
table,
|
15
|
-
}) => {
|
11
|
+
export const MRT_TableBodyRowGrabHandle = ({ cell, rowRef, table }: Props) => {
|
16
12
|
const {
|
17
13
|
options: { muiTableBodyRowDragHandleProps },
|
18
14
|
} = table;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import Collapse from '@mui/material/Collapse';
|
3
3
|
import TableCell from '@mui/material/TableCell';
|
4
4
|
import TableRow from '@mui/material/TableRow';
|
@@ -13,12 +13,12 @@ interface Props {
|
|
13
13
|
virtualRow?: VirtualItem;
|
14
14
|
}
|
15
15
|
|
16
|
-
export const MRT_TableDetailPanel
|
16
|
+
export const MRT_TableDetailPanel = ({
|
17
17
|
parentRowRef,
|
18
18
|
row,
|
19
19
|
table,
|
20
20
|
virtualRow,
|
21
|
-
}) => {
|
21
|
+
}: Props) => {
|
22
22
|
const {
|
23
23
|
getVisibleLeafColumns,
|
24
24
|
getState,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import IconButton from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import type { MRT_TableInstance } from '..';
|
@@ -7,7 +7,7 @@ interface Props {
|
|
7
7
|
table: MRT_TableInstance;
|
8
8
|
}
|
9
9
|
|
10
|
-
export const MRT_ExpandAllButton
|
10
|
+
export const MRT_ExpandAllButton = ({ table }: Props) => {
|
11
11
|
const {
|
12
12
|
getIsAllRowsExpanded,
|
13
13
|
getIsSomeRowsExpanded,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { MouseEvent } from 'react';
|
2
2
|
import IconButton from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import type { MRT_Row, MRT_TableInstance } from '..';
|
@@ -8,7 +8,7 @@ interface Props {
|
|
8
8
|
table: MRT_TableInstance;
|
9
9
|
}
|
10
10
|
|
11
|
-
export const MRT_ExpandButton
|
11
|
+
export const MRT_ExpandButton = ({ row, table }: Props) => {
|
12
12
|
const {
|
13
13
|
getState,
|
14
14
|
options: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import TableFooter from '@mui/material/TableFooter';
|
3
3
|
import { MRT_TableFooterRow } from './MRT_TableFooterRow';
|
4
4
|
import type { VirtualItem } from '@tanstack/react-virtual';
|
@@ -11,12 +11,12 @@ interface Props {
|
|
11
11
|
virtualPaddingRight?: number;
|
12
12
|
}
|
13
13
|
|
14
|
-
export const MRT_TableFooter
|
14
|
+
export const MRT_TableFooter = ({
|
15
15
|
table,
|
16
16
|
virtualColumns,
|
17
17
|
virtualPaddingLeft,
|
18
18
|
virtualPaddingRight,
|
19
|
-
}) => {
|
19
|
+
}: Props) => {
|
20
20
|
const {
|
21
21
|
getFooterGroups,
|
22
22
|
getState,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import TableCell from '@mui/material/TableCell';
|
3
3
|
import { getCommonCellStyles } from '../column.utils';
|
4
4
|
import type { MRT_Header, MRT_TableInstance } from '..';
|
@@ -8,7 +8,7 @@ interface Props {
|
|
8
8
|
table: MRT_TableInstance;
|
9
9
|
}
|
10
10
|
|
11
|
-
export const MRT_TableFooterCell
|
11
|
+
export const MRT_TableFooterCell = ({ footer, table }: Props) => {
|
12
12
|
const {
|
13
13
|
getState,
|
14
14
|
options: { layoutMode, muiTableFooterCellProps },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import TableRow from '@mui/material/TableRow';
|
3
3
|
import { lighten } from '@mui/material/styles';
|
4
4
|
import { MRT_TableFooterCell } from './MRT_TableFooterCell';
|
@@ -13,13 +13,13 @@ interface Props {
|
|
13
13
|
virtualPaddingRight?: number;
|
14
14
|
}
|
15
15
|
|
16
|
-
export const MRT_TableFooterRow
|
16
|
+
export const MRT_TableFooterRow = ({
|
17
17
|
footerGroup,
|
18
18
|
table,
|
19
19
|
virtualColumns,
|
20
20
|
virtualPaddingLeft,
|
21
21
|
virtualPaddingRight,
|
22
|
-
}) => {
|
22
|
+
}: Props) => {
|
23
23
|
const {
|
24
24
|
options: { layoutMode, muiTableFooterRowProps },
|
25
25
|
} = table;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import TableHead from '@mui/material/TableHead';
|
3
3
|
import { MRT_TableHeadRow } from './MRT_TableHeadRow';
|
4
4
|
import type { VirtualItem } from '@tanstack/react-virtual';
|
@@ -11,12 +11,12 @@ interface Props {
|
|
11
11
|
virtualPaddingRight?: number;
|
12
12
|
}
|
13
13
|
|
14
|
-
export const MRT_TableHead
|
14
|
+
export const MRT_TableHead = ({
|
15
15
|
table,
|
16
16
|
virtualColumns,
|
17
17
|
virtualPaddingLeft,
|
18
18
|
virtualPaddingRight,
|
19
|
-
}) => {
|
19
|
+
}: Props) => {
|
20
20
|
const {
|
21
21
|
getHeaderGroups,
|
22
22
|
getState,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { DragEvent,
|
1
|
+
import React, { DragEvent, ReactNode, useMemo } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import TableCell from '@mui/material/TableCell';
|
4
4
|
import { useTheme } from '@mui/material/styles';
|
@@ -17,7 +17,7 @@ interface Props {
|
|
17
17
|
table: MRT_TableInstance;
|
18
18
|
}
|
19
19
|
|
20
|
-
export const MRT_TableHeadCell
|
20
|
+
export const MRT_TableHeadCell = ({ header, table }: Props) => {
|
21
21
|
const theme = useTheme();
|
22
22
|
const {
|
23
23
|
getState,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { MouseEvent, useState } from 'react';
|
2
2
|
import IconButton from '@mui/material/IconButton';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { MRT_ColumnActionMenu } from '../menus/MRT_ColumnActionMenu';
|
@@ -9,10 +9,10 @@ interface Props {
|
|
9
9
|
table: MRT_TableInstance;
|
10
10
|
}
|
11
11
|
|
12
|
-
export const MRT_TableHeadCellColumnActionsButton
|
12
|
+
export const MRT_TableHeadCellColumnActionsButton = ({
|
13
13
|
header,
|
14
14
|
table,
|
15
|
-
}) => {
|
15
|
+
}: Props) => {
|
16
16
|
const {
|
17
17
|
options: {
|
18
18
|
icons: { MoreVertIcon },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import Collapse from '@mui/material/Collapse';
|
3
3
|
import { MRT_FilterRangeFields } from '../inputs/MRT_FilterRangeFields';
|
4
4
|
import { MRT_FilterTextField } from '../inputs/MRT_FilterTextField';
|
@@ -10,10 +10,7 @@ interface Props {
|
|
10
10
|
table: MRT_TableInstance;
|
11
11
|
}
|
12
12
|
|
13
|
-
export const MRT_TableHeadCellFilterContainer:
|
14
|
-
header,
|
15
|
-
table,
|
16
|
-
}) => {
|
13
|
+
export const MRT_TableHeadCellFilterContainer = ({ header, table }: Props) => {
|
17
14
|
const { getState } = table;
|
18
15
|
const { showColumnFilters } = getState();
|
19
16
|
const { column } = header;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { MouseEvent } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import Grow from '@mui/material/Grow';
|
4
4
|
import IconButton from '@mui/material/IconButton';
|
@@ -10,7 +10,7 @@ interface Props {
|
|
10
10
|
table: MRT_TableInstance;
|
11
11
|
}
|
12
12
|
|
13
|
-
export const MRT_TableHeadCellFilterLabel
|
13
|
+
export const MRT_TableHeadCellFilterLabel = ({ header, table }: Props) => {
|
14
14
|
const {
|
15
15
|
options: {
|
16
16
|
icons: { FilterAltIcon },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { DragEvent,
|
1
|
+
import React, { DragEvent, RefObject } from 'react';
|
2
2
|
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
3
3
|
import { reorderColumn } from '../column.utils';
|
4
4
|
import type { MRT_Column, MRT_TableInstance } from '..';
|
@@ -9,11 +9,11 @@ interface Props {
|
|
9
9
|
tableHeadCellRef: RefObject<HTMLTableCellElement>;
|
10
10
|
}
|
11
11
|
|
12
|
-
export const MRT_TableHeadCellGrabHandle
|
12
|
+
export const MRT_TableHeadCellGrabHandle = ({
|
13
13
|
column,
|
14
14
|
table,
|
15
15
|
tableHeadCellRef,
|
16
|
-
}) => {
|
16
|
+
}: Props) => {
|
17
17
|
const {
|
18
18
|
getState,
|
19
19
|
options: { enableColumnOrdering, muiTableHeadCellDragHandleProps },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import Divider from '@mui/material/Divider';
|
4
4
|
import { MRT_Header, MRT_TableInstance } from '..';
|
@@ -8,7 +8,7 @@ interface Props {
|
|
8
8
|
table: MRT_TableInstance;
|
9
9
|
}
|
10
10
|
|
11
|
-
export const MRT_TableHeadCellResizeHandle
|
11
|
+
export const MRT_TableHeadCellResizeHandle = ({ header, table }: Props) => {
|
12
12
|
const {
|
13
13
|
getState,
|
14
14
|
options: { columnResizeMode },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import TableSortLabel from '@mui/material/TableSortLabel';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import { MRT_Header, MRT_TableInstance } from '..';
|
@@ -10,11 +10,11 @@ interface Props {
|
|
10
10
|
tableCellProps?: TableCellProps;
|
11
11
|
}
|
12
12
|
|
13
|
-
export const MRT_TableHeadCellSortLabel
|
13
|
+
export const MRT_TableHeadCellSortLabel = ({
|
14
14
|
header,
|
15
15
|
table,
|
16
16
|
tableCellProps,
|
17
|
-
}) => {
|
17
|
+
}: Props) => {
|
18
18
|
const {
|
19
19
|
options: {
|
20
20
|
icons: { ArrowDownwardIcon },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import TableRow from '@mui/material/TableRow';
|
3
3
|
import { alpha, lighten } from '@mui/material/styles';
|
4
4
|
import { MRT_TableHeadCell } from './MRT_TableHeadCell';
|
@@ -13,13 +13,13 @@ interface Props {
|
|
13
13
|
virtualPaddingRight?: number;
|
14
14
|
}
|
15
15
|
|
16
|
-
export const MRT_TableHeadRow
|
16
|
+
export const MRT_TableHeadRow = ({
|
17
17
|
headerGroup,
|
18
18
|
table,
|
19
19
|
virtualColumns,
|
20
20
|
virtualPaddingLeft,
|
21
21
|
virtualPaddingRight,
|
22
|
-
}) => {
|
22
|
+
}: Props) => {
|
23
23
|
const {
|
24
24
|
options: { layoutMode, muiTableHeadRowProps },
|
25
25
|
} = table;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import Checkbox from '@mui/material/Checkbox';
|
3
3
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
4
4
|
import Tooltip from '@mui/material/Tooltip';
|
@@ -10,7 +10,7 @@ interface Props {
|
|
10
10
|
table: MRT_TableInstance;
|
11
11
|
}
|
12
12
|
|
13
|
-
export const MRT_FilterCheckbox
|
13
|
+
export const MRT_FilterCheckbox = ({ column, table }: Props) => {
|
14
14
|
const {
|
15
15
|
getState,
|
16
16
|
options: { localization, muiTableHeadCellFilterCheckboxProps },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import { MRT_FilterTextField } from './MRT_FilterTextField';
|
4
4
|
import { MRT_Header, MRT_TableInstance } from '..';
|
@@ -8,7 +8,7 @@ interface Props {
|
|
8
8
|
table: MRT_TableInstance;
|
9
9
|
}
|
10
10
|
|
11
|
-
export const MRT_FilterRangeFields
|
11
|
+
export const MRT_FilterRangeFields = ({ header, table }: Props) => {
|
12
12
|
return (
|
13
13
|
<Box sx={{ display: 'grid', gridTemplateColumns: '6fr 6fr', gap: '1rem' }}>
|
14
14
|
<MRT_FilterTextField header={header} rangeFilterIndex={0} table={table} />
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React, {
|
2
2
|
ChangeEvent,
|
3
|
-
FC,
|
4
3
|
MouseEvent,
|
5
4
|
useCallback,
|
6
5
|
useEffect,
|
@@ -26,11 +25,11 @@ interface Props {
|
|
26
25
|
table: MRT_TableInstance;
|
27
26
|
}
|
28
27
|
|
29
|
-
export const MRT_FilterTextField
|
28
|
+
export const MRT_FilterTextField = ({
|
30
29
|
header,
|
31
30
|
rangeFilterIndex,
|
32
31
|
table,
|
33
|
-
}) => {
|
32
|
+
}: Props) => {
|
34
33
|
const {
|
35
34
|
options: {
|
36
35
|
enableColumnFilterModes,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { MouseEvent } from 'react';
|
2
2
|
import Checkbox from '@mui/material/Checkbox';
|
3
3
|
import Tooltip from '@mui/material/Tooltip';
|
4
4
|
import Radio from '@mui/material/Radio';
|
@@ -11,7 +11,7 @@ interface Props {
|
|
11
11
|
table: MRT_TableInstance;
|
12
12
|
}
|
13
13
|
|
14
|
-
export const MRT_SelectCheckbox
|
14
|
+
export const MRT_SelectCheckbox = ({ row, selectAll, table }: Props) => {
|
15
15
|
const {
|
16
16
|
getState,
|
17
17
|
options: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useState } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import IconButton from '@mui/material/IconButton';
|
4
4
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
@@ -27,12 +27,12 @@ interface Props {
|
|
27
27
|
table: MRT_TableInstance;
|
28
28
|
}
|
29
29
|
|
30
|
-
export const MRT_ColumnActionMenu
|
30
|
+
export const MRT_ColumnActionMenu = ({
|
31
31
|
anchorEl,
|
32
32
|
header,
|
33
33
|
setAnchorEl,
|
34
34
|
table,
|
35
|
-
}) => {
|
35
|
+
}: Props) => {
|
36
36
|
const {
|
37
37
|
getState,
|
38
38
|
toggleAllColumnsVisible,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { MouseEvent } from 'react';
|
2
2
|
import Box from '@mui/material/Box';
|
3
3
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
4
4
|
import Menu from '@mui/material/Menu';
|
@@ -17,13 +17,13 @@ interface Props {
|
|
17
17
|
table: MRT_TableInstance;
|
18
18
|
}
|
19
19
|
|
20
|
-
export const MRT_RowActionMenu
|
20
|
+
export const MRT_RowActionMenu = ({
|
21
21
|
anchorEl,
|
22
22
|
handleEdit,
|
23
23
|
row,
|
24
24
|
setAnchorEl,
|
25
25
|
table,
|
26
|
-
}) => {
|
26
|
+
}: Props) => {
|
27
27
|
const {
|
28
28
|
getState,
|
29
29
|
options: {
|
package/src/table/MRT_Table.tsx
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
2
2
|
import {
|
3
3
|
defaultRangeExtractor,
|
4
4
|
Range,
|
@@ -15,7 +15,7 @@ interface Props {
|
|
15
15
|
table: MRT_TableInstance;
|
16
16
|
}
|
17
17
|
|
18
|
-
export const MRT_Table
|
18
|
+
export const MRT_Table = ({ table }: Props) => {
|
19
19
|
const {
|
20
20
|
getState,
|
21
21
|
options: {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useEffect, useLayoutEffect, useState } from 'react';
|
2
2
|
import TableContainer from '@mui/material/TableContainer';
|
3
3
|
import { MRT_Table } from './MRT_Table';
|
4
4
|
import type { MRT_TableInstance } from '..';
|
@@ -10,7 +10,7 @@ interface Props {
|
|
10
10
|
table: MRT_TableInstance;
|
11
11
|
}
|
12
12
|
|
13
|
-
export const MRT_TableContainer
|
13
|
+
export const MRT_TableContainer = ({ table }: Props) => {
|
14
14
|
const {
|
15
15
|
getState,
|
16
16
|
options: { enableStickyHeader, muiTableContainerProps },
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react';
|
2
2
|
import Paper from '@mui/material/Paper';
|
3
3
|
import { MRT_TopToolbar } from '../toolbar/MRT_TopToolbar';
|
4
4
|
import { MRT_BottomToolbar } from '../toolbar/MRT_BottomToolbar';
|
@@ -9,7 +9,7 @@ interface Props {
|
|
9
9
|
table: MRT_TableInstance;
|
10
10
|
}
|
11
11
|
|
12
|
-
export const MRT_TablePaper
|
12
|
+
export const MRT_TablePaper = ({ table }: Props) => {
|
13
13
|
const {
|
14
14
|
getState,
|
15
15
|
options: {
|