material-react-table 0.5.9 → 0.6.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/localization.d.ts +43 -46
- package/dist/material-react-table.cjs.development.js +254 -194
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js +255 -195
- package/dist/material-react-table.esm.js.map +1 -1
- package/dist/menus/MRT_ShowHideColumnsMenu.d.ts +3 -2
- package/dist/menus/MRT_ShowHideColumnsMenuItems.d.ts +8 -0
- package/package.json +1 -1
- package/src/buttons/MRT_EditActionButtons.tsx +4 -7
- package/src/buttons/MRT_ExpandAllButton.tsx +2 -2
- package/src/buttons/MRT_ExpandButton.tsx +2 -2
- package/src/buttons/MRT_FullScreenToggleButton.tsx +2 -2
- package/src/buttons/MRT_ShowHideColumnsButton.tsx +4 -52
- package/src/buttons/MRT_ToggleColumnActionMenuButton.tsx +2 -2
- package/src/buttons/MRT_ToggleDensePaddingButton.tsx +2 -2
- package/src/buttons/MRT_ToggleFiltersButton.tsx +2 -2
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +3 -7
- package/src/buttons/MRT_ToggleSearchButton.tsx +1 -1
- package/src/head/MRT_TableHeadCell.tsx +19 -6
- package/src/head/MRT_TableHeadCellActions.tsx +1 -1
- package/src/inputs/MRT_FilterTextField.tsx +33 -9
- package/src/inputs/MRT_SearchTextField.tsx +3 -3
- package/src/inputs/MRT_SelectCheckbox.tsx +4 -4
- package/src/localization.ts +87 -92
- package/src/menus/MRT_ColumnActionMenu.tsx +59 -14
- package/src/menus/MRT_FilterTypeMenu.tsx +10 -10
- package/src/menus/MRT_RowActionMenu.tsx +1 -1
- package/src/menus/MRT_ShowHideColumnsMenu.tsx +52 -35
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +57 -0
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +3 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import type { MRT_ColumnInstance } from '..';
|
|
3
2
|
interface Props {
|
|
4
|
-
|
|
3
|
+
anchorEl: HTMLElement | null;
|
|
4
|
+
isSubMenu?: boolean;
|
|
5
|
+
setAnchorEl: (anchorEl: HTMLElement | null) => void;
|
|
5
6
|
}
|
|
6
7
|
export declare const MRT_ShowHideColumnsMenu: FC<Props>;
|
|
7
8
|
export {};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.6.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "material-react-table",
|
|
5
5
|
"description": "A fully featured Material-UI implementation of react-table, inspired by material-table and the mui DataGrid, written from the ground up in TypeScript.",
|
|
@@ -30,17 +30,14 @@ export const MRT_EditActionButtons: FC<Props> = ({ row }) => {
|
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<Box sx={{ display: 'flex', gap: '0.75rem' }}>
|
|
33
|
-
<Tooltip arrow title={localization.
|
|
34
|
-
<IconButton
|
|
35
|
-
aria-label={localization.rowActionButtonCancel}
|
|
36
|
-
onClick={handleCancel}
|
|
37
|
-
>
|
|
33
|
+
<Tooltip arrow title={localization.cancel}>
|
|
34
|
+
<IconButton aria-label={localization.cancel} onClick={handleCancel}>
|
|
38
35
|
<CancelIcon />
|
|
39
36
|
</IconButton>
|
|
40
37
|
</Tooltip>
|
|
41
|
-
<Tooltip arrow title={localization.
|
|
38
|
+
<Tooltip arrow title={localization.save}>
|
|
42
39
|
<IconButton
|
|
43
|
-
aria-label={localization.
|
|
40
|
+
aria-label={localization.save}
|
|
44
41
|
color="info"
|
|
45
42
|
onClick={handleSave}
|
|
46
43
|
>
|
|
@@ -20,8 +20,8 @@ export const MRT_ExpandAllButton: FC<Props> = () => {
|
|
|
20
20
|
sx={commonTableBodyButtonCellStyles(tableInstance.state.densePadding)}
|
|
21
21
|
>
|
|
22
22
|
<IconButton
|
|
23
|
-
aria-label={localization.
|
|
24
|
-
title={localization.
|
|
23
|
+
aria-label={localization.expandAll}
|
|
24
|
+
title={localization.expandAll}
|
|
25
25
|
>
|
|
26
26
|
<DoubleArrowDownIcon
|
|
27
27
|
style={{
|
|
@@ -28,9 +28,9 @@ export const MRT_ExpandButton: FC<Props> = ({ row }) => {
|
|
|
28
28
|
}}
|
|
29
29
|
>
|
|
30
30
|
<IconButton
|
|
31
|
-
aria-label={localization.
|
|
31
|
+
aria-label={localization.expand}
|
|
32
32
|
disabled={!row.canExpand && !renderDetailPanel}
|
|
33
|
-
title={localization.
|
|
33
|
+
title={localization.expand}
|
|
34
34
|
{...row.getToggleRowExpandedProps()}
|
|
35
35
|
>
|
|
36
36
|
<ExpandMoreIcon
|
|
@@ -15,9 +15,9 @@ export const MRT_FullScreenToggleButton: FC<Props> = ({ ...rest }) => {
|
|
|
15
15
|
} = useMRT();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<Tooltip arrow title={localization.
|
|
18
|
+
<Tooltip arrow title={localization.toggleFullScreen}>
|
|
19
19
|
<IconButton
|
|
20
|
-
aria-label={localization.
|
|
20
|
+
aria-label={localization.showHideFilters}
|
|
21
21
|
onClick={() => setFullScreen(!fullScreen)}
|
|
22
22
|
size="small"
|
|
23
23
|
{...rest}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import React, { FC, MouseEvent, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
IconButton,
|
|
5
|
-
Menu,
|
|
6
|
-
Tooltip,
|
|
7
|
-
Divider,
|
|
8
|
-
IconButtonProps,
|
|
9
|
-
Box,
|
|
10
|
-
} from '@mui/material';
|
|
2
|
+
import { IconButton, Tooltip, IconButtonProps } from '@mui/material';
|
|
11
3
|
import { useMRT } from '../useMRT';
|
|
12
4
|
import { MRT_ShowHideColumnsMenu } from '../menus/MRT_ShowHideColumnsMenu';
|
|
13
|
-
import type { MRT_ColumnInstance } from '..';
|
|
14
5
|
|
|
15
6
|
interface Props extends IconButtonProps {}
|
|
16
7
|
|
|
@@ -18,7 +9,6 @@ export const MRT_ShowHideColumnsButton: FC<Props> = ({ ...rest }) => {
|
|
|
18
9
|
const {
|
|
19
10
|
icons: { ViewColumnIcon },
|
|
20
11
|
localization,
|
|
21
|
-
tableInstance,
|
|
22
12
|
} = useMRT();
|
|
23
13
|
|
|
24
14
|
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
|
@@ -29,9 +19,9 @@ export const MRT_ShowHideColumnsButton: FC<Props> = ({ ...rest }) => {
|
|
|
29
19
|
|
|
30
20
|
return (
|
|
31
21
|
<>
|
|
32
|
-
<Tooltip arrow title={localization.
|
|
22
|
+
<Tooltip arrow title={localization.showHideColumns}>
|
|
33
23
|
<IconButton
|
|
34
|
-
aria-label={localization.
|
|
24
|
+
aria-label={localization.showHideColumns}
|
|
35
25
|
onClick={handleClick}
|
|
36
26
|
size="small"
|
|
37
27
|
{...rest}
|
|
@@ -39,45 +29,7 @@ export const MRT_ShowHideColumnsButton: FC<Props> = ({ ...rest }) => {
|
|
|
39
29
|
<ViewColumnIcon />
|
|
40
30
|
</IconButton>
|
|
41
31
|
</Tooltip>
|
|
42
|
-
<
|
|
43
|
-
anchorEl={anchorEl}
|
|
44
|
-
open={!!anchorEl}
|
|
45
|
-
onClose={() => setAnchorEl(null)}
|
|
46
|
-
MenuListProps={{
|
|
47
|
-
dense: tableInstance.state.densePadding,
|
|
48
|
-
}}
|
|
49
|
-
>
|
|
50
|
-
<Box
|
|
51
|
-
sx={{
|
|
52
|
-
display: 'flex',
|
|
53
|
-
justifyContent: 'space-between',
|
|
54
|
-
p: '0.5rem',
|
|
55
|
-
}}
|
|
56
|
-
>
|
|
57
|
-
<Button
|
|
58
|
-
disabled={
|
|
59
|
-
!tableInstance.getToggleHideAllColumnsProps().checked &&
|
|
60
|
-
!tableInstance.getToggleHideAllColumnsProps().indeterminate
|
|
61
|
-
}
|
|
62
|
-
onClick={() => tableInstance.toggleHideAllColumns(true)}
|
|
63
|
-
>
|
|
64
|
-
{localization.columnShowHideMenuHideAll}
|
|
65
|
-
</Button>
|
|
66
|
-
<Button
|
|
67
|
-
disabled={tableInstance.getToggleHideAllColumnsProps().checked}
|
|
68
|
-
onClick={() => tableInstance.toggleHideAllColumns(false)}
|
|
69
|
-
>
|
|
70
|
-
{localization.columnShowHideMenuShowAll}
|
|
71
|
-
</Button>
|
|
72
|
-
</Box>
|
|
73
|
-
<Divider />
|
|
74
|
-
{tableInstance.columns.map((column: MRT_ColumnInstance, index) => (
|
|
75
|
-
<MRT_ShowHideColumnsMenu
|
|
76
|
-
key={`${index}-${column.id}`}
|
|
77
|
-
column={column}
|
|
78
|
-
/>
|
|
79
|
-
))}
|
|
80
|
-
</Menu>
|
|
32
|
+
<MRT_ShowHideColumnsMenu anchorEl={anchorEl} setAnchorEl={setAnchorEl} />
|
|
81
33
|
</>
|
|
82
34
|
);
|
|
83
35
|
};
|
|
@@ -29,10 +29,10 @@ export const MRT_ToggleColumnActionMenuButton: FC<Props> = ({ column }) => {
|
|
|
29
29
|
enterDelay={1000}
|
|
30
30
|
enterNextDelay={1000}
|
|
31
31
|
placement="top"
|
|
32
|
-
title={localization.
|
|
32
|
+
title={localization.columnActions}
|
|
33
33
|
>
|
|
34
34
|
<IconButton
|
|
35
|
-
aria-label={localization.
|
|
35
|
+
aria-label={localization.columnActions}
|
|
36
36
|
onClick={handleClick}
|
|
37
37
|
size="small"
|
|
38
38
|
sx={{
|
|
@@ -15,9 +15,9 @@ export const MRT_ToggleDensePaddingButton: FC<Props> = ({ ...rest }) => {
|
|
|
15
15
|
} = useMRT();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<Tooltip arrow title={localization.
|
|
18
|
+
<Tooltip arrow title={localization.toggleDensePadding}>
|
|
19
19
|
<IconButton
|
|
20
|
-
aria-label={localization.
|
|
20
|
+
aria-label={localization.toggleDensePadding}
|
|
21
21
|
onClick={() => setDensePadding(!densePadding)}
|
|
22
22
|
size="small"
|
|
23
23
|
{...rest}
|
|
@@ -15,9 +15,9 @@ export const MRT_ToggleFiltersButton: FC<Props> = ({ ...rest }) => {
|
|
|
15
15
|
} = useMRT();
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<Tooltip arrow title={localization.
|
|
18
|
+
<Tooltip arrow title={localization.showHideFilters}>
|
|
19
19
|
<IconButton
|
|
20
|
-
aria-label={localization.
|
|
20
|
+
aria-label={localization.showHideFilters}
|
|
21
21
|
onClick={() => setShowFilters(!showFilters)}
|
|
22
22
|
size="small"
|
|
23
23
|
{...rest}
|
|
@@ -54,11 +54,7 @@ export const MRT_ToggleRowActionMenuButton: FC<Props> = ({ row }) => {
|
|
|
54
54
|
) : row.id === tableInstance.state.currentEditingRow?.id ? (
|
|
55
55
|
<MRT_EditActionButtons row={row} />
|
|
56
56
|
) : !renderRowActionMenuItems && enableRowEditing ? (
|
|
57
|
-
<Tooltip
|
|
58
|
-
placement="right"
|
|
59
|
-
arrow
|
|
60
|
-
title={localization.rowActionMenuItemEdit}
|
|
61
|
-
>
|
|
57
|
+
<Tooltip placement="right" arrow title={localization.edit}>
|
|
62
58
|
<IconButton sx={commonIconButtonStyles} onClick={handleEdit}>
|
|
63
59
|
<EditIcon />
|
|
64
60
|
</IconButton>
|
|
@@ -69,10 +65,10 @@ export const MRT_ToggleRowActionMenuButton: FC<Props> = ({ row }) => {
|
|
|
69
65
|
arrow
|
|
70
66
|
enterDelay={1000}
|
|
71
67
|
enterNextDelay={1000}
|
|
72
|
-
title={localization.
|
|
68
|
+
title={localization.rowActions}
|
|
73
69
|
>
|
|
74
70
|
<IconButton
|
|
75
|
-
aria-label={localization.
|
|
71
|
+
aria-label={localization.rowActions}
|
|
76
72
|
onClick={handleOpenRowActionMenu}
|
|
77
73
|
size="small"
|
|
78
74
|
sx={commonIconButtonStyles}
|
|
@@ -30,7 +30,7 @@ export const MRT_ToggleSearchButton: FC<Props> = ({ ...rest }) => {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
|
-
<Tooltip arrow title={localization.
|
|
33
|
+
<Tooltip arrow title={localization.showHideSearch}>
|
|
34
34
|
<IconButton size="small" onClick={handleToggleSearch} {...rest}>
|
|
35
35
|
{showSearch ? <SearchOffIcon /> : <SearchIcon />}
|
|
36
36
|
</IconButton>
|
|
@@ -66,21 +66,34 @@ export const MRT_TableHeadCell: FC<Props> = ({ column }) => {
|
|
|
66
66
|
|
|
67
67
|
const sortTooltip = column.isSorted
|
|
68
68
|
? column.isSortedDesc
|
|
69
|
-
? localization.
|
|
70
|
-
: localization.
|
|
69
|
+
? localization.clearSort
|
|
70
|
+
: localization.sortByColumnDesc?.replace(
|
|
71
71
|
'{column}',
|
|
72
72
|
column.Header as string,
|
|
73
73
|
)
|
|
74
|
-
: localization.
|
|
74
|
+
: localization.sortByColumnAsc?.replace(
|
|
75
75
|
'{column}',
|
|
76
76
|
column.Header as string,
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
+
const filterType = tableInstance.state.currentFilterTypes[column.id];
|
|
80
|
+
|
|
79
81
|
const filterTooltip = !!column.filterValue
|
|
80
|
-
? localization.
|
|
82
|
+
? localization.filteringByColumn
|
|
81
83
|
.replace('{column}', String(column.Header))
|
|
82
|
-
.replace(
|
|
83
|
-
|
|
84
|
+
.replace(
|
|
85
|
+
'{filterType}',
|
|
86
|
+
filterType instanceof Function
|
|
87
|
+
? ''
|
|
88
|
+
: // @ts-ignore
|
|
89
|
+
localization[
|
|
90
|
+
`filter${
|
|
91
|
+
filterType.charAt(0).toUpperCase() + filterType.slice(1)
|
|
92
|
+
}`
|
|
93
|
+
],
|
|
94
|
+
)
|
|
95
|
+
.replace('{filterValue}', column.filterValue)
|
|
96
|
+
: localization.showHideFilters;
|
|
84
97
|
|
|
85
98
|
const columnHeader = column.render('Header') as string;
|
|
86
99
|
|
|
@@ -18,7 +18,7 @@ export const MRT_TableHeadCellActions: FC<Props> = () => {
|
|
|
18
18
|
style={{ textAlign: 'center' }}
|
|
19
19
|
sx={{ ...commonTableHeadCellStyles(densePadding), textAlign: 'center' }}
|
|
20
20
|
>
|
|
21
|
-
{localization.
|
|
21
|
+
{localization.actions}
|
|
22
22
|
</TableCell>
|
|
23
23
|
);
|
|
24
24
|
};
|
|
@@ -78,14 +78,18 @@ export const MRT_FilterTextField: FC<Props> = ({ column }) => {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
const filterType = tableInstance.state.currentFilterTypes[column.id];
|
|
81
|
-
const isCustomFilterType = filterType instanceof Function;
|
|
82
81
|
const isSelectFilter = !!column.filterSelectOptions;
|
|
83
82
|
const filterChipLabel =
|
|
84
|
-
!
|
|
83
|
+
!(filterType instanceof Function) &&
|
|
85
84
|
[MRT_FILTER_TYPE.EMPTY, MRT_FILTER_TYPE.NOT_EMPTY].includes(
|
|
86
85
|
filterType as MRT_FILTER_TYPE,
|
|
87
|
-
)
|
|
88
|
-
|
|
86
|
+
)
|
|
87
|
+
? //@ts-ignore
|
|
88
|
+
localization[
|
|
89
|
+
`filter${filterType.charAt(0).toUpperCase() + filterType.slice(1)}`
|
|
90
|
+
]
|
|
91
|
+
: '';
|
|
92
|
+
const filterPlaceholder = localization.filterByColumn?.replace(
|
|
89
93
|
'{column}',
|
|
90
94
|
String(column.Header),
|
|
91
95
|
);
|
|
@@ -103,6 +107,22 @@ export const MRT_FilterTextField: FC<Props> = ({ column }) => {
|
|
|
103
107
|
},
|
|
104
108
|
title: filterPlaceholder,
|
|
105
109
|
}}
|
|
110
|
+
helperText={
|
|
111
|
+
filterType instanceof Function
|
|
112
|
+
? ''
|
|
113
|
+
: localization.filterMode.replace(
|
|
114
|
+
'{filterType}',
|
|
115
|
+
// @ts-ignore
|
|
116
|
+
localization[
|
|
117
|
+
`filter${
|
|
118
|
+
filterType.charAt(0).toUpperCase() + filterType.slice(1)
|
|
119
|
+
}`
|
|
120
|
+
],
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
FormHelperTextProps={{
|
|
124
|
+
sx: { fontSize: '0.6rem', lineHeight: '0.8rem' },
|
|
125
|
+
}}
|
|
106
126
|
label={isSelectFilter && !filterValue ? filterPlaceholder : undefined}
|
|
107
127
|
InputLabelProps={{
|
|
108
128
|
shrink: false,
|
|
@@ -138,7 +158,10 @@ export const MRT_FilterTextField: FC<Props> = ({ column }) => {
|
|
|
138
158
|
</span>
|
|
139
159
|
</Tooltip>
|
|
140
160
|
{filterChipLabel && (
|
|
141
|
-
<Chip
|
|
161
|
+
<Chip
|
|
162
|
+
onDelete={handleClearFilterChip}
|
|
163
|
+
label={filterChipLabel}
|
|
164
|
+
/>
|
|
142
165
|
)}
|
|
143
166
|
</InputAdornment>
|
|
144
167
|
),
|
|
@@ -148,11 +171,11 @@ export const MRT_FilterTextField: FC<Props> = ({ column }) => {
|
|
|
148
171
|
arrow
|
|
149
172
|
disableHoverListener={isSelectFilter}
|
|
150
173
|
placement="right"
|
|
151
|
-
title={localization.
|
|
174
|
+
title={localization.clearFilter ?? ''}
|
|
152
175
|
>
|
|
153
176
|
<span>
|
|
154
177
|
<IconButton
|
|
155
|
-
aria-label={localization.
|
|
178
|
+
aria-label={localization.clearFilter}
|
|
156
179
|
disabled={!filterValue?.length}
|
|
157
180
|
onClick={handleClear}
|
|
158
181
|
size="small"
|
|
@@ -170,7 +193,8 @@ export const MRT_FilterTextField: FC<Props> = ({ column }) => {
|
|
|
170
193
|
}}
|
|
171
194
|
{...textFieldProps}
|
|
172
195
|
sx={{
|
|
173
|
-
m: '
|
|
196
|
+
m: '-0.25rem',
|
|
197
|
+
p: 0,
|
|
174
198
|
minWidth: !filterChipLabel ? '5rem' : 'auto',
|
|
175
199
|
width: 'calc(100% + 0.5rem)',
|
|
176
200
|
mt: isSelectFilter && !filterValue ? '-1rem' : undefined,
|
|
@@ -182,7 +206,7 @@ export const MRT_FilterTextField: FC<Props> = ({ column }) => {
|
|
|
182
206
|
>
|
|
183
207
|
{isSelectFilter && (
|
|
184
208
|
<MenuItem divider disabled={!filterValue} value="">
|
|
185
|
-
{localization.
|
|
209
|
+
{localization.clearFilter}
|
|
186
210
|
</MenuItem>
|
|
187
211
|
)}
|
|
188
212
|
{column?.filterSelectOptions?.map((option) => {
|
|
@@ -34,7 +34,7 @@ export const MRT_SearchTextField: FC<Props> = () => {
|
|
|
34
34
|
<Collapse in={tableInstance.state.showSearch} orientation="horizontal">
|
|
35
35
|
<TextField
|
|
36
36
|
id={`mrt-${idPrefix}-search-text-field`}
|
|
37
|
-
placeholder={localization.
|
|
37
|
+
placeholder={localization.search}
|
|
38
38
|
onChange={(event: ChangeEvent<HTMLInputElement>) => {
|
|
39
39
|
setSearchValue(event.target.value);
|
|
40
40
|
handleChange(event);
|
|
@@ -50,11 +50,11 @@ export const MRT_SearchTextField: FC<Props> = () => {
|
|
|
50
50
|
endAdornment: (
|
|
51
51
|
<InputAdornment position="end">
|
|
52
52
|
<IconButton
|
|
53
|
-
aria-label={localization.
|
|
53
|
+
aria-label={localization.clearSearch}
|
|
54
54
|
disabled={searchValue?.length === 0}
|
|
55
55
|
onClick={handleClear}
|
|
56
56
|
size="small"
|
|
57
|
-
title={localization.
|
|
57
|
+
title={localization.clearSearch}
|
|
58
58
|
>
|
|
59
59
|
<CloseIcon fontSize="small" />
|
|
60
60
|
</IconButton>
|
|
@@ -37,15 +37,15 @@ export const MRT_SelectCheckbox: FC<Props> = ({ row, selectAll }) => {
|
|
|
37
37
|
enterNextDelay={1000}
|
|
38
38
|
title={
|
|
39
39
|
selectAll
|
|
40
|
-
? localization.
|
|
41
|
-
: localization.
|
|
40
|
+
? localization.toggleSelectAll
|
|
41
|
+
: localization.toggleSelectRow
|
|
42
42
|
}
|
|
43
43
|
>
|
|
44
44
|
<Checkbox
|
|
45
45
|
inputProps={{
|
|
46
46
|
'aria-label': selectAll
|
|
47
|
-
? localization.
|
|
48
|
-
: localization.
|
|
47
|
+
? localization.toggleSelectAll
|
|
48
|
+
: localization.toggleSelectRow,
|
|
49
49
|
}}
|
|
50
50
|
onChange={onSelectChange}
|
|
51
51
|
{...checkboxProps}
|
package/src/localization.ts
CHANGED
|
@@ -1,99 +1,94 @@
|
|
|
1
1
|
export interface MRT_Localization {
|
|
2
|
-
|
|
2
|
+
actions: string;
|
|
3
|
+
cancel: string;
|
|
3
4
|
changeFilterMode: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
45
|
-
toggleSearchButtonTitle: string;
|
|
46
|
-
toolbarAlertGroupedByMessage: string;
|
|
47
|
-
toolbarAlertGroupedThenByMessage: string;
|
|
48
|
-
toolbarAlertSelectionMessage: string;
|
|
5
|
+
clearFilter: string;
|
|
6
|
+
clearSearch: string;
|
|
7
|
+
clearSort: string;
|
|
8
|
+
columnActions: string;
|
|
9
|
+
edit: string;
|
|
10
|
+
expand: string;
|
|
11
|
+
expandAll: string;
|
|
12
|
+
filterByColumn: string;
|
|
13
|
+
filterContains: string;
|
|
14
|
+
filterEmpty: string;
|
|
15
|
+
filterEndsWith: string;
|
|
16
|
+
filterEquals: string;
|
|
17
|
+
filterFuzzy: string;
|
|
18
|
+
filterGreaterThan: string;
|
|
19
|
+
filterLessThan: string;
|
|
20
|
+
filterMode: string;
|
|
21
|
+
filterNotEmpty: string;
|
|
22
|
+
filterNotEquals: string;
|
|
23
|
+
filterStartsWith: string;
|
|
24
|
+
filteringByColumn: string;
|
|
25
|
+
groupByColumn: string;
|
|
26
|
+
groupedBy: string;
|
|
27
|
+
hideAll: string;
|
|
28
|
+
hideColumn: string;
|
|
29
|
+
rowActions: string;
|
|
30
|
+
save: string;
|
|
31
|
+
search: string;
|
|
32
|
+
selectedCountOfRowCountRowsSelected: string;
|
|
33
|
+
showAll: string;
|
|
34
|
+
showHideColumns: string;
|
|
35
|
+
showAllColumns: string;
|
|
36
|
+
showHideFilters: string;
|
|
37
|
+
showHideSearch: string;
|
|
38
|
+
sortByColumnAsc: string;
|
|
39
|
+
sortByColumnDesc: string;
|
|
40
|
+
thenBy: string;
|
|
41
|
+
toggleDensePadding: string;
|
|
42
|
+
toggleFullScreen: string;
|
|
43
|
+
toggleSelectAll: string;
|
|
44
|
+
toggleSelectRow: string;
|
|
45
|
+
ungroupByColumn: string;
|
|
49
46
|
}
|
|
50
47
|
|
|
51
48
|
export const MRT_DefaultLocalization_EN: MRT_Localization = {
|
|
52
|
-
|
|
49
|
+
actions: 'Actions',
|
|
50
|
+
cancel: 'Cancel',
|
|
53
51
|
changeFilterMode: 'Change filter mode',
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
toolbarAlertGroupedByMessage: 'Grouped by ',
|
|
97
|
-
toolbarAlertGroupedThenByMessage: ', then by ',
|
|
98
|
-
toolbarAlertSelectionMessage: '{selectedCount} of {rowCount} row(s) selected',
|
|
52
|
+
clearFilter: 'Clear filter',
|
|
53
|
+
clearSearch: 'Clear search',
|
|
54
|
+
clearSort: 'Clear sort',
|
|
55
|
+
columnActions: 'Column Actions',
|
|
56
|
+
edit: 'Edit',
|
|
57
|
+
expand: 'Expand',
|
|
58
|
+
expandAll: 'Expand all',
|
|
59
|
+
filterByColumn: 'Filter by {column}',
|
|
60
|
+
filterContains: 'Contains Exact',
|
|
61
|
+
filterEmpty: 'Empty',
|
|
62
|
+
filterEndsWith: 'Ends With',
|
|
63
|
+
filterEquals: 'Equals',
|
|
64
|
+
filterFuzzy: 'Fuzzy Match',
|
|
65
|
+
filterGreaterThan: 'Greater Than',
|
|
66
|
+
filterLessThan: 'Less Than',
|
|
67
|
+
filterMode: 'Filter Mode: {filterType}',
|
|
68
|
+
filterNotEmpty: 'Not Empty',
|
|
69
|
+
filterNotEquals: 'Not Equals',
|
|
70
|
+
filterStartsWith: 'Starts With',
|
|
71
|
+
filteringByColumn: 'Filtering by {column} - {filterType} "{filterValue}"',
|
|
72
|
+
groupByColumn: 'Group by {column}',
|
|
73
|
+
groupedBy: 'Grouped by ',
|
|
74
|
+
hideAll: 'Hide all',
|
|
75
|
+
hideColumn: 'Hide {column} column',
|
|
76
|
+
rowActions: 'Row Actions',
|
|
77
|
+
save: 'Save',
|
|
78
|
+
search: 'Search',
|
|
79
|
+
selectedCountOfRowCountRowsSelected:
|
|
80
|
+
'{selectedCount} of {rowCount} row(s) selected',
|
|
81
|
+
showAll: 'Show all',
|
|
82
|
+
showAllColumns: 'Show all columns',
|
|
83
|
+
showHideColumns: 'Show/Hide columns',
|
|
84
|
+
showHideFilters: 'Show/Hide filters',
|
|
85
|
+
showHideSearch: 'Show/Hide search',
|
|
86
|
+
sortByColumnAsc: 'Sort by {column} ascending',
|
|
87
|
+
sortByColumnDesc: 'Sort by {column} descending',
|
|
88
|
+
thenBy: ', then by ',
|
|
89
|
+
toggleDensePadding: 'Toggle dense padding',
|
|
90
|
+
toggleFullScreen: 'Toggle full screen',
|
|
91
|
+
toggleSelectAll: 'Toggle select all',
|
|
92
|
+
toggleSelectRow: 'Toggle select row',
|
|
93
|
+
ungroupByColumn: 'Ungroup by {column}',
|
|
99
94
|
};
|