material-react-table 1.12.0-beta.0 → 1.12.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/README.md +1 -1
- package/dist/cjs/index.js +17 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/_locales/cs.d.ts +1 -1
- package/dist/cjs/types/_locales/da.d.ts +1 -1
- package/dist/cjs/types/_locales/de.d.ts +1 -1
- package/dist/cjs/types/_locales/en.d.ts +1 -1
- package/dist/cjs/types/_locales/es.d.ts +1 -1
- package/dist/cjs/types/_locales/fa.d.ts +1 -1
- package/dist/cjs/types/_locales/fi.d.ts +1 -1
- package/dist/cjs/types/_locales/fr.d.ts +1 -1
- package/dist/cjs/types/_locales/hu.d.ts +1 -1
- package/dist/cjs/types/_locales/id.d.ts +1 -1
- package/dist/cjs/types/_locales/it.d.ts +1 -1
- package/dist/cjs/types/_locales/ja.d.ts +1 -1
- package/dist/cjs/types/_locales/nl.d.ts +1 -1
- package/dist/cjs/types/_locales/pl.d.ts +1 -1
- package/dist/cjs/types/_locales/pt-BR.d.ts +1 -1
- package/dist/cjs/types/_locales/pt.d.ts +1 -1
- package/dist/cjs/types/_locales/ro.d.ts +1 -1
- package/dist/cjs/types/_locales/ru.d.ts +1 -1
- package/dist/cjs/types/_locales/sk.d.ts +1 -1
- package/dist/cjs/types/_locales/sr-Cyrl-RS.d.ts +1 -1
- package/dist/cjs/types/_locales/sr-Latn-RS.d.ts +1 -1
- package/dist/cjs/types/_locales/sv.d.ts +1 -1
- package/dist/cjs/types/_locales/tr.d.ts +1 -1
- package/dist/cjs/types/_locales/uk.d.ts +1 -1
- package/dist/cjs/types/_locales/vi.d.ts +1 -1
- package/dist/cjs/types/_locales/zh-Hans.d.ts +1 -1
- package/dist/cjs/types/_locales/zh-Hant.d.ts +1 -1
- package/dist/esm/material-react-table.esm.js +20 -14
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/_locales/cs.d.ts +1 -1
- package/dist/esm/types/_locales/da.d.ts +1 -1
- package/dist/esm/types/_locales/de.d.ts +1 -1
- package/dist/esm/types/_locales/en.d.ts +1 -1
- package/dist/esm/types/_locales/es.d.ts +1 -1
- package/dist/esm/types/_locales/fa.d.ts +1 -1
- package/dist/esm/types/_locales/fi.d.ts +1 -1
- package/dist/esm/types/_locales/fr.d.ts +1 -1
- package/dist/esm/types/_locales/hu.d.ts +1 -1
- package/dist/esm/types/_locales/id.d.ts +1 -1
- package/dist/esm/types/_locales/it.d.ts +1 -1
- package/dist/esm/types/_locales/ja.d.ts +1 -1
- package/dist/esm/types/_locales/nl.d.ts +1 -1
- package/dist/esm/types/_locales/pl.d.ts +1 -1
- package/dist/esm/types/_locales/pt-BR.d.ts +1 -1
- package/dist/esm/types/_locales/pt.d.ts +1 -1
- package/dist/esm/types/_locales/ro.d.ts +1 -1
- package/dist/esm/types/_locales/ru.d.ts +1 -1
- package/dist/esm/types/_locales/sk.d.ts +1 -1
- package/dist/esm/types/_locales/sr-Cyrl-RS.d.ts +1 -1
- package/dist/esm/types/_locales/sr-Latn-RS.d.ts +1 -1
- package/dist/esm/types/_locales/sv.d.ts +1 -1
- package/dist/esm/types/_locales/tr.d.ts +1 -1
- package/dist/esm/types/_locales/uk.d.ts +1 -1
- package/dist/esm/types/_locales/vi.d.ts +1 -1
- package/dist/esm/types/_locales/zh-Hans.d.ts +1 -1
- package/dist/esm/types/_locales/zh-Hant.d.ts +1 -1
- package/dist/index.d.ts +3 -4
- package/locales/cs.d.ts +1 -1
- package/locales/cs.esm.d.ts +1 -1
- package/locales/cs.esm.js +91 -89
- package/locales/cs.js +91 -89
- package/locales/da.d.ts +1 -1
- package/locales/da.esm.d.ts +1 -1
- package/locales/da.esm.js +90 -89
- package/locales/da.js +90 -89
- package/locales/de.d.ts +1 -1
- package/locales/de.esm.d.ts +1 -1
- package/locales/de.esm.js +90 -89
- package/locales/de.js +90 -89
- package/locales/en.d.ts +1 -1
- package/locales/en.esm.d.ts +1 -1
- package/locales/en.esm.js +90 -89
- package/locales/en.js +90 -89
- package/locales/es.d.ts +1 -1
- package/locales/es.esm.d.ts +1 -1
- package/locales/es.esm.js +90 -89
- package/locales/es.js +90 -89
- package/locales/fa.d.ts +1 -1
- package/locales/fa.esm.d.ts +1 -1
- package/locales/fa.esm.js +90 -89
- package/locales/fa.js +90 -89
- package/locales/fi.d.ts +1 -1
- package/locales/fi.esm.d.ts +1 -1
- package/locales/fi.esm.js +91 -89
- package/locales/fi.js +91 -89
- package/locales/fr.d.ts +1 -1
- package/locales/fr.esm.d.ts +1 -1
- package/locales/fr.esm.js +90 -89
- package/locales/fr.js +90 -89
- package/locales/hu.d.ts +1 -1
- package/locales/hu.esm.d.ts +1 -1
- package/locales/hu.esm.js +90 -89
- package/locales/hu.js +90 -89
- package/locales/id.d.ts +1 -1
- package/locales/id.esm.d.ts +1 -1
- package/locales/id.esm.js +91 -89
- package/locales/id.js +91 -89
- package/locales/it.d.ts +1 -1
- package/locales/it.esm.d.ts +1 -1
- package/locales/it.esm.js +90 -89
- package/locales/it.js +90 -89
- package/locales/ja.d.ts +1 -1
- package/locales/ja.esm.d.ts +1 -1
- package/locales/ja.esm.js +90 -89
- package/locales/ja.js +90 -89
- package/locales/nl.d.ts +1 -1
- package/locales/nl.esm.d.ts +1 -1
- package/locales/nl.esm.js +90 -89
- package/locales/nl.js +90 -89
- package/locales/pl.d.ts +1 -1
- package/locales/pl.esm.d.ts +1 -1
- package/locales/pl.esm.js +90 -89
- package/locales/pl.js +90 -89
- package/locales/pt-BR.d.ts +1 -1
- package/locales/pt-BR.esm.d.ts +1 -1
- package/locales/pt-BR.esm.js +90 -89
- package/locales/pt-BR.js +90 -89
- package/locales/pt.d.ts +1 -1
- package/locales/pt.esm.d.ts +1 -1
- package/locales/pt.esm.js +90 -89
- package/locales/pt.js +90 -89
- package/locales/ro.d.ts +1 -1
- package/locales/ro.esm.d.ts +1 -1
- package/locales/ro.esm.js +90 -89
- package/locales/ro.js +90 -89
- package/locales/ru.d.ts +1 -1
- package/locales/ru.esm.d.ts +1 -1
- package/locales/ru.esm.js +90 -89
- package/locales/ru.js +90 -89
- package/locales/sk.d.ts +1 -1
- package/locales/sk.esm.d.ts +1 -1
- package/locales/sk.esm.js +91 -89
- package/locales/sk.js +91 -89
- package/locales/sr-Cyrl-RS.d.ts +1 -1
- package/locales/sr-Cyrl-RS.esm.d.ts +1 -1
- package/locales/sr-Cyrl-RS.esm.js +90 -89
- package/locales/sr-Cyrl-RS.js +90 -89
- package/locales/sr-Latn-RS.d.ts +1 -1
- package/locales/sr-Latn-RS.esm.d.ts +1 -1
- package/locales/sr-Latn-RS.esm.js +90 -89
- package/locales/sr-Latn-RS.js +90 -89
- package/locales/sv.d.ts +1 -1
- package/locales/sv.esm.d.ts +1 -1
- package/locales/sv.esm.js +90 -89
- package/locales/sv.js +90 -89
- package/locales/tr.d.ts +1 -1
- package/locales/tr.esm.d.ts +1 -1
- package/locales/tr.esm.js +90 -89
- package/locales/tr.js +90 -89
- package/locales/uk.d.ts +1 -1
- package/locales/uk.esm.d.ts +1 -1
- package/locales/uk.esm.js +90 -89
- package/locales/uk.js +90 -89
- package/locales/vi.d.ts +1 -1
- package/locales/vi.esm.d.ts +1 -1
- package/locales/vi.esm.js +90 -89
- package/locales/vi.js +90 -89
- package/locales/zh-Hans.d.ts +1 -1
- package/locales/zh-Hans.esm.d.ts +1 -1
- package/locales/zh-Hans.esm.js +89 -89
- package/locales/zh-Hans.js +89 -89
- package/locales/zh-Hant.d.ts +1 -1
- package/locales/zh-Hant.esm.d.ts +1 -1
- package/locales/zh-Hant.esm.js +89 -89
- package/locales/zh-Hant.js +89 -89
- package/package.json +2 -2
- package/src/_locales/cs.ts +1 -1
- package/src/_locales/da.ts +1 -1
- package/src/_locales/de.ts +1 -1
- package/src/_locales/en.ts +1 -1
- package/src/_locales/es.ts +1 -1
- package/src/_locales/fa.ts +1 -1
- package/src/_locales/fi.ts +1 -1
- package/src/_locales/fr.ts +1 -1
- package/src/_locales/hu.ts +1 -1
- package/src/_locales/id.ts +1 -1
- package/src/_locales/it.ts +1 -1
- package/src/_locales/ja.ts +1 -1
- package/src/_locales/nl.ts +1 -1
- package/src/_locales/pl.ts +1 -1
- package/src/_locales/pt-BR.ts +1 -1
- package/src/_locales/pt.ts +1 -1
- package/src/_locales/ro.ts +1 -1
- package/src/_locales/ru.ts +1 -1
- package/src/_locales/sk.ts +1 -1
- package/src/_locales/sr-Cyrl-RS.ts +1 -1
- package/src/_locales/sr-Latn-RS.ts +1 -1
- package/src/_locales/sv.ts +1 -1
- package/src/_locales/tr.ts +1 -1
- package/src/_locales/uk.ts +1 -1
- package/src/_locales/vi.ts +1 -1
- package/src/_locales/zh-Hans.ts +1 -1
- package/src/_locales/zh-Hant.ts +1 -1
- package/src/column.utils.ts +1 -1
- package/src/filterFns.ts +5 -1
- package/src/footer/MRT_TableFooterRow.tsx +5 -1
- package/src/head/MRT_TableHeadRow.tsx +5 -1
- package/src/inputs/MRT_EditCellTextField.tsx +6 -1
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +7 -1
package/locales/zh-Hant.js
CHANGED
@@ -3,95 +3,95 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const MRT_Localization_ZH_HANT = {
|
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
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
|
-
|
6
|
+
actions: '動作',
|
7
|
+
and: '與',
|
8
|
+
cancel: '取消',
|
9
|
+
changeFilterMode: '更改過濾模式',
|
10
|
+
changeSearchMode: '更改搜尋模式',
|
11
|
+
clearFilter: '清除過濾',
|
12
|
+
clearSearch: '清除搜尋',
|
13
|
+
clearSort: '清除排序',
|
14
|
+
clickToCopy: '點擊以複製',
|
15
|
+
collapse: '折疊',
|
16
|
+
collapseAll: '全部折疊',
|
17
|
+
columnActions: '欄位動作',
|
18
|
+
copiedToClipboard: '已複製至剪貼簿',
|
19
|
+
dropToGroupBy: '拖放以按 {column} 分組',
|
20
|
+
edit: '編輯',
|
21
|
+
expand: '展開',
|
22
|
+
expandAll: '全部展開',
|
23
|
+
filterArrIncludes: '包括',
|
24
|
+
filterArrIncludesAll: '包括所有',
|
25
|
+
filterArrIncludesSome: '包括',
|
26
|
+
filterBetween: '介於首尾',
|
27
|
+
filterBetweenInclusive: '介於首尾之間',
|
28
|
+
filterByColumn: '以 {column} 過濾',
|
29
|
+
filterContains: '包含',
|
30
|
+
filterEmpty: '是空字串',
|
31
|
+
filterEndsWith: '結尾為',
|
32
|
+
filterEquals: '等於',
|
33
|
+
filterEqualsString: '等於',
|
34
|
+
filterFuzzy: '模糊搜索',
|
35
|
+
filterGreaterThan: '大於',
|
36
|
+
filterGreaterThanOrEqualTo: '大於等於',
|
37
|
+
filterInNumberRange: '介於',
|
38
|
+
filterIncludesString: '包含',
|
39
|
+
filterIncludesStringSensitive: '包含',
|
40
|
+
filterLessThan: '小於',
|
41
|
+
filterLessThanOrEqualTo: '小於等於',
|
42
|
+
filterMode: '過濾模式:{filterType}',
|
43
|
+
filterNotEmpty: '非空字串',
|
44
|
+
filterNotEquals: '不等於',
|
45
|
+
filterStartsWith: '開首為',
|
46
|
+
filterWeakEquals: '等於',
|
47
|
+
filteringByColumn: '正以 {column} 過濾:{filterType} {filterValue}',
|
48
|
+
goToFirstPage: '到第一頁',
|
49
|
+
goToLastPage: '到最後一頁',
|
50
|
+
goToNextPage: '下一頁',
|
51
|
+
goToPreviousPage: '上一頁',
|
52
|
+
grab: '拖曳',
|
53
|
+
groupByColumn: '按 {column} 分組',
|
54
|
+
groupedBy: '分組依據 ',
|
55
|
+
hideAll: '隱藏全部',
|
56
|
+
hideColumn: '隱藏 {column} 欄位',
|
57
|
+
max: '最大',
|
58
|
+
min: '最小',
|
59
|
+
move: '移動',
|
60
|
+
noRecordsToDisplay: '無紀錄可顯示',
|
61
|
+
noResultsFound: '未找到結果',
|
62
|
+
of: '/',
|
63
|
+
or: '或',
|
64
|
+
pinToLeft: '固定至左邊',
|
65
|
+
pinToRight: '固定至右邊',
|
66
|
+
resetColumnSize: '重置欄位大小',
|
67
|
+
resetOrder: '重置排序',
|
68
|
+
rowActions: '橫列動作',
|
69
|
+
rowNumber: '#',
|
70
|
+
rowNumbers: '橫列編號',
|
71
|
+
rowsPerPage: '每頁橫列數量',
|
72
|
+
save: '儲存',
|
73
|
+
search: '搜尋',
|
74
|
+
selectedCountOfRowCountRowsSelected: '已選擇橫列:{selectedCount}/{rowCount}',
|
75
|
+
select: '選擇',
|
76
|
+
showAll: '顯示全部',
|
77
|
+
showAllColumns: '顯示全部欄位',
|
78
|
+
showHideColumns: '顯示/隱藏 欄位',
|
79
|
+
showHideFilters: '顯示/隱藏 過濾條件',
|
80
|
+
showHideSearch: '顯示/隱藏 搜尋條件',
|
81
|
+
sortByColumnAsc: '按 {column} 順序排序',
|
82
|
+
sortByColumnDesc: '按 {column} 倒序排序',
|
83
|
+
sortedByColumnAsc: '已按 {column} 順序排序',
|
84
|
+
sortedByColumnDesc: '已按 {column} 倒序排序',
|
85
|
+
thenBy: ',然後以',
|
86
|
+
toggleDensity: '切換密度',
|
87
|
+
toggleFullScreen: '切換全螢幕',
|
88
|
+
toggleSelectAll: '切換選擇全部',
|
89
|
+
toggleSelectRow: '切換選擇橫列',
|
90
|
+
toggleVisibility: '切換可見度',
|
91
|
+
ungroupByColumn: '取消按 {column} 分組',
|
92
|
+
unpin: '取消固定',
|
93
|
+
unpinAll: '全部取消固定',
|
94
|
+
unsorted: '取消排序',
|
95
95
|
};
|
96
96
|
|
97
97
|
exports.MRT_Localization_ZH_HANT = MRT_Localization_ZH_HANT;
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"version": "1.12.0
|
2
|
+
"version": "1.12.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.",
|
@@ -64,7 +64,7 @@
|
|
64
64
|
"@babel/preset-react": "^7.22.3",
|
65
65
|
"@emotion/react": "^11.11.0",
|
66
66
|
"@emotion/styled": "^11.11.0",
|
67
|
-
"@faker-js/faker": "^8.0.
|
67
|
+
"@faker-js/faker": "^8.0.2",
|
68
68
|
"@mui/icons-material": "^5.11.16",
|
69
69
|
"@mui/material": "^5.13.2",
|
70
70
|
"@rollup/plugin-babel": "^6.0.3",
|
package/src/_locales/cs.ts
CHANGED
package/src/_locales/da.ts
CHANGED
package/src/_locales/de.ts
CHANGED
package/src/_locales/en.ts
CHANGED
package/src/_locales/es.ts
CHANGED
package/src/_locales/fa.ts
CHANGED
package/src/_locales/fi.ts
CHANGED
package/src/_locales/fr.ts
CHANGED
package/src/_locales/hu.ts
CHANGED
package/src/_locales/id.ts
CHANGED
package/src/_locales/it.ts
CHANGED
package/src/_locales/ja.ts
CHANGED
package/src/_locales/nl.ts
CHANGED
package/src/_locales/pl.ts
CHANGED
package/src/_locales/pt-BR.ts
CHANGED
package/src/_locales/pt.ts
CHANGED
package/src/_locales/ro.ts
CHANGED
package/src/_locales/ru.ts
CHANGED
package/src/_locales/sk.ts
CHANGED
package/src/_locales/sv.ts
CHANGED
package/src/_locales/tr.ts
CHANGED
package/src/_locales/uk.ts
CHANGED
package/src/_locales/vi.ts
CHANGED
package/src/_locales/zh-Hans.ts
CHANGED
package/src/_locales/zh-Hant.ts
CHANGED
package/src/column.utils.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
+
import { alpha, lighten } from '@mui/material/styles';
|
1
2
|
import { type MRT_AggregationFns } from './aggregationFns';
|
2
3
|
import { type MRT_FilterFns } from './filterFns';
|
3
4
|
import { type MRT_SortingFns } from './sortingFns';
|
4
|
-
import { alpha, lighten } from '@mui/material/styles';
|
5
5
|
import { type Row } from '@tanstack/react-table';
|
6
6
|
import { type TableCellProps } from '@mui/material/TableCell';
|
7
7
|
import { type Theme } from '@mui/material/styles';
|
package/src/filterFns.ts
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
rankItem,
|
3
|
+
rankings,
|
4
|
+
type RankingInfo,
|
5
|
+
} from '@tanstack/match-sorter-utils';
|
2
6
|
import { filterFns, type Row } from '@tanstack/react-table';
|
3
7
|
|
4
8
|
const fuzzy = <TData extends Record<string, any> = {}>(
|
@@ -2,7 +2,11 @@ import TableRow from '@mui/material/TableRow';
|
|
2
2
|
import { lighten } from '@mui/material/styles';
|
3
3
|
import { MRT_TableFooterCell } from './MRT_TableFooterCell';
|
4
4
|
import { type VirtualItem } from '@tanstack/react-virtual';
|
5
|
-
import {
|
5
|
+
import {
|
6
|
+
type MRT_Header,
|
7
|
+
type MRT_HeaderGroup,
|
8
|
+
type MRT_TableInstance,
|
9
|
+
} from '../types';
|
6
10
|
|
7
11
|
interface Props {
|
8
12
|
footerGroup: MRT_HeaderGroup;
|
@@ -2,7 +2,11 @@ import TableRow from '@mui/material/TableRow';
|
|
2
2
|
import { alpha, lighten } from '@mui/material/styles';
|
3
3
|
import { MRT_TableHeadCell } from './MRT_TableHeadCell';
|
4
4
|
import { type VirtualItem } from '@tanstack/react-virtual';
|
5
|
-
import {
|
5
|
+
import {
|
6
|
+
type MRT_Header,
|
7
|
+
type MRT_HeaderGroup,
|
8
|
+
type MRT_TableInstance,
|
9
|
+
} from '../types';
|
6
10
|
|
7
11
|
interface Props {
|
8
12
|
headerGroup: MRT_HeaderGroup;
|
@@ -1,4 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
type ChangeEvent,
|
3
|
+
type FocusEvent,
|
4
|
+
type KeyboardEvent,
|
5
|
+
useState,
|
6
|
+
} from 'react';
|
2
7
|
import TextField from '@mui/material/TextField';
|
3
8
|
import MenuItem from '@mui/material/MenuItem';
|
4
9
|
import { type TextFieldProps } from '@mui/material/TextField';
|
@@ -1,4 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import {
|
2
|
+
type Dispatch,
|
3
|
+
type DragEvent,
|
4
|
+
type SetStateAction,
|
5
|
+
useRef,
|
6
|
+
useState,
|
7
|
+
} from 'react';
|
2
8
|
import Box from '@mui/material/Box';
|
3
9
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
4
10
|
import MenuItem from '@mui/material/MenuItem';
|