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
package/dist/cjs/index.js
CHANGED
@@ -2002,7 +2002,7 @@ const MRT_TableHeadCellSortLabel = ({ header, table, tableCellProps, }) => {
|
|
2002
2002
|
};
|
2003
2003
|
|
2004
2004
|
const MRT_TableHeadCell = ({ header, table }) => {
|
2005
|
-
var _a, _b, _c, _d;
|
2005
|
+
var _a, _b, _c, _d, _f, _g;
|
2006
2006
|
const theme = styles.useTheme();
|
2007
2007
|
const { getState, options: { enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
|
2008
2008
|
const { density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
|
@@ -2118,10 +2118,10 @@ const MRT_TableHeadCell = ({ header, table }) => {
|
|
2118
2118
|
: undefined,
|
2119
2119
|
} },
|
2120
2120
|
React__default["default"].createElement(Box__default["default"], { className: "Mui-TableHeadCell-Content-Wrapper", sx: {
|
2121
|
-
minWidth: `${Math.min(columnDef.header.length, 5)}ch`,
|
2121
|
+
minWidth: `${Math.min((_d = (_c = columnDef.header) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0, 5)}ch`,
|
2122
2122
|
overflow: columnDefType === 'data' ? 'hidden' : undefined,
|
2123
2123
|
textOverflow: 'ellipsis',
|
2124
|
-
whiteSpace: ((
|
2124
|
+
whiteSpace: ((_g = (_f = columnDef.header) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) < 20 ? 'nowrap' : 'normal',
|
2125
2125
|
'&:hover': {
|
2126
2126
|
textOverflow: 'clip',
|
2127
2127
|
},
|
@@ -2565,9 +2565,7 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2565
2565
|
rowRef.current = node;
|
2566
2566
|
measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
|
2567
2567
|
}
|
2568
|
-
} }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: styles.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,
|
2569
|
-
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
2570
|
-
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', '&:hover td': {
|
2568
|
+
} }, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: styles.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': {
|
2571
2569
|
backgroundColor: (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
|
2572
2570
|
? row.getIsSelected()
|
2573
2571
|
? `${styles.alpha(theme.palette.primary.main, 0.2)}`
|
@@ -2577,7 +2575,9 @@ const MRT_TableBodyRow = ({ columnVirtualizer, measureElement, numRows, row, row
|
|
2577
2575
|
: undefined,
|
2578
2576
|
} }, ((tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx) instanceof Function
|
2579
2577
|
? tableRowProps.sx(theme)
|
2580
|
-
: tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx)))
|
2578
|
+
: tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx))), style: Object.assign({ transform: virtualRow
|
2579
|
+
? `translateY(${virtualRow === null || virtualRow === void 0 ? void 0 : virtualRow.start}px)`
|
2580
|
+
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style) }),
|
2581
2581
|
virtualPaddingLeft ? (React__default["default"].createElement("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null,
|
2582
2582
|
(virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : row.getVisibleCells()).map((cellOrVirtualCell) => {
|
2583
2583
|
const cell = columnVirtualizer
|
@@ -2655,7 +2655,7 @@ const MRT_TableBody = ({ columnVirtualizer, table, virtualColumns, virtualPaddin
|
|
2655
2655
|
pagination.pageSize,
|
2656
2656
|
]);
|
2657
2657
|
const rowVirtualizer = enableRowVirtualization
|
2658
|
-
? reactVirtual.useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current,
|
2658
|
+
? reactVirtual.useVirtualizer(Object.assign(Object.assign({ count: rows.length, estimateSize: () => density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73, getScrollElement: () => tableContainerRef.current, overscan: 4 }, vProps_old), vProps))
|
2659
2659
|
: undefined;
|
2660
2660
|
if (rowVirtualizerInstanceRef && rowVirtualizer) {
|
2661
2661
|
rowVirtualizerInstanceRef.current = rowVirtualizer;
|