material-react-table 1.11.1 → 1.11.3
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 +8 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/_locales/sk.d.ts +2 -0
- package/dist/cjs/types/sortingFns.d.ts +8 -0
- package/dist/esm/material-react-table.esm.js +8 -8
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/_locales/sk.d.ts +2 -0
- package/dist/esm/types/sortingFns.d.ts +8 -0
- package/locales/cs.esm.js +1 -1
- package/locales/cs.js +1 -1
- package/locales/sk.d.ts +2 -0
- package/locales/sk.esm.d.ts +2 -0
- package/locales/sk.esm.js +94 -0
- package/locales/sk.esm.js.map +1 -0
- package/locales/sk.js +98 -0
- package/locales/sk.js.map +1 -0
- package/package.json +13 -13
- package/src/_locales/cs.ts +1 -1
- package/src/_locales/sk.ts +95 -0
- package/src/body/MRT_TableBody.tsx +0 -1
- package/src/body/MRT_TableBodyRow.tsx +10 -6
- package/src/head/MRT_TableHeadCell.tsx +1 -1
@@ -33,6 +33,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
|
|
33
33
|
groupingColumnId?: string | undefined;
|
34
34
|
groupingValue?: unknown;
|
35
35
|
getIsGrouped: () => boolean;
|
36
|
+
getGroupingValue: (columnId: string) => unknown;
|
36
37
|
_groupingValuesCache: Record<string, any>;
|
37
38
|
getIsSelected: () => boolean;
|
38
39
|
getIsSomeSelected: () => boolean;
|
@@ -79,6 +80,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
|
|
79
80
|
groupingColumnId?: string | undefined;
|
80
81
|
groupingValue?: unknown;
|
81
82
|
getIsGrouped: () => boolean;
|
83
|
+
getGroupingValue: (columnId: string) => unknown;
|
82
84
|
_groupingValuesCache: Record<string, any>;
|
83
85
|
getIsSelected: () => boolean;
|
84
86
|
getIsSomeSelected: () => boolean;
|
@@ -131,6 +133,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
|
|
131
133
|
groupingColumnId?: string | undefined;
|
132
134
|
groupingValue?: unknown;
|
133
135
|
getIsGrouped: () => boolean;
|
136
|
+
getGroupingValue: (columnId: string) => unknown;
|
134
137
|
_groupingValuesCache: Record<string, any>;
|
135
138
|
getIsSelected: () => boolean;
|
136
139
|
getIsSomeSelected: () => boolean;
|
@@ -174,6 +177,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
|
|
174
177
|
groupingColumnId?: string | undefined;
|
175
178
|
groupingValue?: unknown;
|
176
179
|
getIsGrouped: () => boolean;
|
180
|
+
getGroupingValue: (columnId: string) => unknown;
|
177
181
|
_groupingValuesCache: Record<string, any>;
|
178
182
|
getIsSelected: () => boolean;
|
179
183
|
getIsSomeSelected: () => boolean;
|
@@ -237,6 +241,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
|
|
237
241
|
groupingColumnId?: string | undefined;
|
238
242
|
groupingValue?: unknown;
|
239
243
|
getIsGrouped: () => boolean;
|
244
|
+
getGroupingValue: (columnId: string) => unknown;
|
240
245
|
_groupingValuesCache: Record<string, any>;
|
241
246
|
getIsSelected: () => boolean;
|
242
247
|
getIsSomeSelected: () => boolean;
|
@@ -283,6 +288,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
|
|
283
288
|
groupingColumnId?: string | undefined;
|
284
289
|
groupingValue?: unknown;
|
285
290
|
getIsGrouped: () => boolean;
|
291
|
+
getGroupingValue: (columnId: string) => unknown;
|
286
292
|
_groupingValuesCache: Record<string, any>;
|
287
293
|
getIsSelected: () => boolean;
|
288
294
|
getIsSomeSelected: () => boolean;
|
@@ -335,6 +341,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
|
|
335
341
|
groupingColumnId?: string | undefined;
|
336
342
|
groupingValue?: unknown;
|
337
343
|
getIsGrouped: () => boolean;
|
344
|
+
getGroupingValue: (columnId: string) => unknown;
|
338
345
|
_groupingValuesCache: Record<string, any>;
|
339
346
|
getIsSelected: () => boolean;
|
340
347
|
getIsSomeSelected: () => boolean;
|
@@ -378,6 +385,7 @@ export declare const rankGlobalFuzzy: <TData extends Record<string, any> = {}>(r
|
|
378
385
|
groupingColumnId?: string | undefined;
|
379
386
|
groupingValue?: unknown;
|
380
387
|
getIsGrouped: () => boolean;
|
388
|
+
getGroupingValue: (columnId: string) => unknown;
|
381
389
|
_groupingValuesCache: Record<string, any>;
|
382
390
|
getIsSelected: () => boolean;
|
383
391
|
getIsSomeSelected: () => boolean;
|
@@ -1924,7 +1924,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
|
|
1924
1924
|
};
|
1925
1925
|
|
1926
1926
|
const MRT_TableHeadCell = ({ header, table }) => {
|
1927
|
-
var _a, _b, _c, _d;
|
1927
|
+
var _a, _b, _c, _d, _f, _g;
|
1928
1928
|
const theme = useTheme();
|
1929
1929
|
const { getState, options: { enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
|
1930
1930
|
const { density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
|
@@ -2040,10 +2040,10 @@ const MRT_TableHeadCell = ({ header, table }) => {
|
|
2040
2040
|
: undefined,
|
2041
2041
|
} },
|
2042
2042
|
React.createElement(Box, { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
|
2043
|
-
minWidth: `${Math.min(columnDef.header.length, 5)}ch`,
|
2043
|
+
minWidth: `${Math.min((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0, 5)}ch`,
|
2044
2044
|
overflow: columnDefType === 'data' ? 'hidden' : undefined,
|
2045
2045
|
textOverflow: 'ellipsis',
|
2046
|
-
whiteSpace: ((
|
2046
|
+
whiteSpace: ((_g = (_f = columnDef.header) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) < 20 ? 'nowrap' : 'normal',
|
2047
2047
|
'&:hover': {
|
2048
2048
|
textOverflow: 'clip',
|
2049
2049
|
},
|
@@ -2487,9 +2487,7 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2487
2487
|
rowRef.current = node;
|
2488
2488
|
measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
|
2489
2489
|
}
|
2490
|
-
} }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.06), display: layoutMode === 'grid' ? 'flex' : 'table-row', opacity: (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id || (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id ? 0.5 : 1, position: virtualRow ? 'absolute' : undefined, top: virtualRow ? 0 : undefined,
|
2491
|
-
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
2492
|
-
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', '&:hover td': {
|
2490
|
+
} }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: lighten(theme.palette.background.default, 0.06), boxSizing: 'border-box', display: layoutMode === 'grid' ? 'flex' : 'table-row', opacity: (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id || (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id ? 0.5 : 1, position: virtualRow ? 'absolute' : undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', top: virtualRow ? 0 : undefined, width: '100%', '&:hover td': {
|
2493
2491
|
backgroundColor: (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
|
2494
2492
|
? row.getIsSelected()
|
2495
2493
|
? `${alpha(theme.palette.primary.main, 0.2)}`
|
@@ -2499,7 +2497,9 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2499
2497
|
: undefined,
|
2500
2498
|
} }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
|
2501
2499
|
? tableRowProps.sx(theme)
|
2502
|
-
: tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx)))
|
2500
|
+
: tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), style: Object.assign({ transform: virtualRow
|
2501
|
+
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
2502
|
+
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style) }),
|
2503
2503
|
virtualPaddingLeft ? (React.createElement("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
|
2504
2504
|
(virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : row.getVisibleCells()).map((cellOrVirtualCell) => {
|
2505
2505
|
const cell = columnVirtualizer
|
@@ -2577,7 +2577,7 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
|
|
2577
2577
|
pagination.pageSize,
|
2578
2578
|
]);
|
2579
2579
|
const rowVirtualizer = enableRowVirtualization
|
2580
|
-
? useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current,
|
2580
|
+
? useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current, overscan: 4 }, vProps_old), vProps))
|
2581
2581
|
: undefined;
|
2582
2582
|
if (rowVirtualizerInstanceRef && rowVirtualizer) {
|
2583
2583
|
rowVirtualizerInstanceRef.current = rowVirtualizer;
|