material-react-table 2.8.0 → 2.9.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/index.d.ts +17 -9
- package/dist/index.esm.js +250 -198
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +250 -197
- package/dist/index.js.map +1 -1
- package/locales/ja/index.esm.js +4 -4
- package/locales/ja/index.js +4 -4
- package/package.json +6 -4
- package/src/components/body/MRT_TableBody.tsx +2 -3
- package/src/components/body/MRT_TableBodyCell.tsx +10 -3
- package/src/components/body/MRT_TableBodyRow.tsx +77 -57
- package/src/components/footer/MRT_TableFooterCell.tsx +10 -1
- package/src/components/footer/MRT_TableFooterRow.tsx +19 -8
- package/src/components/head/MRT_TableHeadCell.tsx +10 -0
- package/src/components/head/MRT_TableHeadCellResizeHandle.tsx +4 -2
- package/src/components/head/MRT_TableHeadRow.tsx +19 -8
- package/src/components/inputs/MRT_EditCellTextField.tsx +4 -3
- package/src/components/inputs/MRT_SelectCheckbox.tsx +4 -6
- package/src/components/table/MRT_Table.tsx +4 -0
- package/src/components/toolbar/MRT_ToolbarAlertBanner.tsx +1 -1
- package/src/hooks/display-columns/getMRT_RowActionsColumnDef.tsx +1 -0
- package/src/hooks/display-columns/getMRT_RowDragColumnDef.tsx +1 -0
- package/src/hooks/display-columns/getMRT_RowExpandColumnDef.tsx +4 -2
- package/src/hooks/display-columns/getMRT_RowNumbersColumnDef.tsx +1 -0
- package/src/hooks/display-columns/getMRT_RowPinningColumnDef.tsx +1 -0
- package/src/hooks/display-columns/getMRT_RowSelectColumnDef.tsx +2 -1
- package/src/hooks/useMRT_ColumnVirtualizer.ts +77 -76
- package/src/hooks/useMRT_RowVirtualizer.ts +30 -32
- package/src/hooks/useMRT_TableOptions.ts +27 -17
- package/src/locales/ja.ts +4 -4
- package/src/types.ts +3 -0
- package/src/utils/displayColumn.utils.ts +2 -2
- package/src/utils/row.utils.ts +22 -1
- package/src/utils/style.utils.ts +70 -30
package/dist/index.js
CHANGED
@@ -301,7 +301,7 @@ const createRow = (table, originalRow, rowIndex = -1, depth = 0, subRows, parent
|
|
301
301
|
[getColumnId(col)]: '',
|
302
302
|
}))), rowIndex, depth, subRows, parentId);
|
303
303
|
|
304
|
-
function defaultDisplayColumnProps({ header, id, size
|
304
|
+
function defaultDisplayColumnProps({ header, id, size, tableOptions, }) {
|
305
305
|
const { defaultDisplayColumn, displayColumnDefOptions, localization } = tableOptions;
|
306
306
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, defaultDisplayColumn), { header: header ? localization[header] : '', size }), displayColumnDefOptions === null || displayColumnDefOptions === void 0 ? void 0 : displayColumnDefOptions[id]), { id });
|
307
307
|
}
|
@@ -359,6 +359,31 @@ const getDefaultColumnOrderIds = (tableOptions) => {
|
|
359
359
|
return [...leadingDisplayCols, ...allLeafColumnDefs, ...trailingDisplayCols];
|
360
360
|
};
|
361
361
|
|
362
|
+
const parseFromValuesOrFunc = (fn, arg) => (fn instanceof Function ? fn(arg) : fn);
|
363
|
+
const getValueAndLabel = (option) => {
|
364
|
+
var _a, _b, _c;
|
365
|
+
let label = '';
|
366
|
+
let value = '';
|
367
|
+
if (option) {
|
368
|
+
if (typeof option !== 'object') {
|
369
|
+
label = option;
|
370
|
+
value = option;
|
371
|
+
}
|
372
|
+
else {
|
373
|
+
label = (_b = (_a = option.label) !== null && _a !== void 0 ? _a : option.text) !== null && _b !== void 0 ? _b : option.value;
|
374
|
+
value = (_c = option.value) !== null && _c !== void 0 ? _c : label;
|
375
|
+
}
|
376
|
+
}
|
377
|
+
return { label, value };
|
378
|
+
};
|
379
|
+
|
380
|
+
const getIsRowSelected = ({ row, table, }) => {
|
381
|
+
const { options: enableRowSelection } = table;
|
382
|
+
return (row.getIsSelected() ||
|
383
|
+
(parseFromValuesOrFunc(enableRowSelection, row) &&
|
384
|
+
row.getCanSelectSubRows() &&
|
385
|
+
row.getIsAllSubRowsSelected()));
|
386
|
+
};
|
362
387
|
const getCanRankRows = (table) => {
|
363
388
|
const { getState, options } = table;
|
364
389
|
const { enableGlobalFilterRankedResults, manualExpanding, manualFiltering, manualGrouping, manualSorting, } = options;
|
@@ -505,24 +530,6 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
505
530
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
506
531
|
};
|
507
532
|
|
508
|
-
const parseFromValuesOrFunc = (fn, arg) => (fn instanceof Function ? fn(arg) : fn);
|
509
|
-
const getValueAndLabel = (option) => {
|
510
|
-
var _a, _b, _c;
|
511
|
-
let label = '';
|
512
|
-
let value = '';
|
513
|
-
if (option) {
|
514
|
-
if (typeof option !== 'object') {
|
515
|
-
label = option;
|
516
|
-
value = option;
|
517
|
-
}
|
518
|
-
else {
|
519
|
-
label = (_b = (_a = option.label) !== null && _a !== void 0 ? _a : option.text) !== null && _b !== void 0 ? _b : option.value;
|
520
|
-
value = (_c = option.value) !== null && _c !== void 0 ? _c : label;
|
521
|
-
}
|
522
|
-
}
|
523
|
-
return { label, value };
|
524
|
-
};
|
525
|
-
|
526
533
|
const MRT_EditActionButtons = (_a) => {
|
527
534
|
var { row, table, variant = 'icon' } = _a, rest = __rest(_a, ["row", "table", "variant"]);
|
528
535
|
const { getState, options: { icons: { CancelIcon, SaveIcon }, localization, onCreatingRowCancel, onCreatingRowSave, onEditingRowCancel, onEditingRowSave, }, refs: { editInputRefs }, setCreatingRow, setEditingRow, } = table;
|
@@ -582,40 +589,58 @@ const getMRTTheme = (table, theme) => {
|
|
582
589
|
? styles.darken(theme.palette.warning.dark, 0.25)
|
583
590
|
: styles.lighten(theme.palette.warning.light, 0.5), menuBackgroundColor: styles.lighten(baseBackgroundColor, 0.07), pinnedRowBackgroundColor: styles.alpha(theme.palette.primary.main, 0.1), selectedRowBackgroundColor: styles.alpha(theme.palette.primary.main, 0.2) }, themeOverrides);
|
584
591
|
};
|
592
|
+
const pinnedBeforeAfterStyles = {
|
593
|
+
content: '""',
|
594
|
+
height: '100%',
|
595
|
+
left: 0,
|
596
|
+
position: 'absolute',
|
597
|
+
top: 0,
|
598
|
+
width: '100%',
|
599
|
+
zIndex: -1,
|
600
|
+
};
|
601
|
+
const getCommonPinnedCellStyles = ({ column, table, theme, }) => {
|
602
|
+
const { baseBackgroundColor } = getMRTTheme(table, theme);
|
603
|
+
return {
|
604
|
+
'&[data-pinned="true"]': {
|
605
|
+
'&:before': Object.assign({ backgroundColor: styles.alpha(styles.darken(baseBackgroundColor, theme.palette.mode === 'dark' ? 0.05 : 0.01), 0.97), boxShadow: column
|
606
|
+
? getIsLastLeftPinnedColumn(table, column)
|
607
|
+
? `-4px 0 4px -4px ${styles.alpha(theme.palette.grey[700], 0.5)} inset`
|
608
|
+
: getIsFirstRightPinnedColumn(column)
|
609
|
+
? `4px 0 4px -4px ${styles.alpha(theme.palette.grey[700], 0.5)} inset`
|
610
|
+
: undefined
|
611
|
+
: undefined }, pinnedBeforeAfterStyles),
|
612
|
+
},
|
613
|
+
};
|
614
|
+
};
|
585
615
|
const getCommonMRTCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
|
586
|
-
var _a, _b, _c, _d, _e, _f
|
587
|
-
const { options: { layoutMode }, } = table;
|
616
|
+
var _a, _b, _c, _d, _e, _f;
|
617
|
+
const { options: { enableColumnVirtualization, layoutMode }, } = table;
|
588
618
|
const { columnDef } = column;
|
619
|
+
const isColumnPinned = columnDef.columnDefType !== 'group' && column.getIsPinned();
|
589
620
|
const widthStyles = {
|
590
621
|
minWidth: `max(calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId((_a = header === null || header === void 0 ? void 0 : header.id) !== null && _a !== void 0 ? _a : column.id)}-size) * 1px), ${(_b = columnDef.minSize) !== null && _b !== void 0 ? _b : 30}px)`,
|
591
|
-
width: `calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId((_c = header === null || header === void 0 ? void 0 : header.id) !== null && _c !== void 0 ? _c : column.id)}-size) * 1px
|
622
|
+
width: `calc(var(--${header ? 'header' : 'col'}-${parseCSSVarId((_c = header === null || header === void 0 ? void 0 : header.id) !== null && _c !== void 0 ? _c : column.id)}-size) * 1px)`,
|
592
623
|
};
|
593
624
|
if (layoutMode === 'grid') {
|
594
625
|
widthStyles.flex = `${[0, false].includes(columnDef.grow)
|
595
626
|
? 0
|
596
|
-
: `var(--${header ? 'header' : 'col'}-${parseCSSVarId((
|
627
|
+
: `var(--${header ? 'header' : 'col'}-${parseCSSVarId((_d = header === null || header === void 0 ? void 0 : header.id) !== null && _d !== void 0 ? _d : column.id)}-size)`} 0 auto`;
|
597
628
|
}
|
598
629
|
else if (layoutMode === 'grid-no-grow') {
|
599
630
|
widthStyles.flex = `${+(columnDef.grow || 0)} 0 auto`;
|
600
631
|
}
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
?
|
609
|
-
: undefined, opacity: ((_g = table.getState().draggingColumn) === null || _g === void 0 ? void 0 : _g.id) === column.id ||
|
610
|
-
((_h = table.getState().hoveredColumn) === null || _h === void 0 ? void 0 : _h.id) === column.id
|
632
|
+
const pinnedStyles = isColumnPinned
|
633
|
+
? Object.assign(Object.assign({}, getCommonPinnedCellStyles({ column, table, theme })), { left: isColumnPinned === 'left'
|
634
|
+
? `${column.getStart('left')}px`
|
635
|
+
: undefined, opacity: 0.97, position: 'sticky', right: isColumnPinned === 'right'
|
636
|
+
? `${getTotalRight(table, column)}px`
|
637
|
+
: undefined, zIndex: 1 }) : {};
|
638
|
+
return Object.assign(Object.assign(Object.assign({ backgroundColor: 'inherit', backgroundImage: 'inherit', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, opacity: ((_e = table.getState().draggingColumn) === null || _e === void 0 ? void 0 : _e.id) === column.id ||
|
639
|
+
((_f = table.getState().hoveredColumn) === null || _f === void 0 ? void 0 : _f.id) === column.id
|
611
640
|
? 0.5
|
612
|
-
: 1, position:
|
613
|
-
? 'sticky'
|
614
|
-
: undefined, right: column.getIsPinned() === 'right'
|
615
|
-
? `${getTotalRight(table, column)}px`
|
616
|
-
: undefined, transition: table.options.enableColumnVirtualization
|
641
|
+
: 1, position: 'relative', transition: enableColumnVirtualization
|
617
642
|
? 'none'
|
618
|
-
: `padding 150ms ease-in-out
|
643
|
+
: `padding 150ms ease-in-out`, zIndex: 0 }, pinnedStyles), widthStyles), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme));
|
619
644
|
};
|
620
645
|
const getCommonToolbarStyles = ({ table, theme, }) => ({
|
621
646
|
alignItems: 'flex-start',
|
@@ -1050,6 +1075,7 @@ const getMRT_RowActionsColumnDef = (tableOptions) => {
|
|
1050
1075
|
return Object.assign({ Cell: ({ cell, row, staticRowIndex, table }) => (jsxRuntime.jsx(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, staticRowIndex: staticRowIndex, table: table })) }, defaultDisplayColumnProps({
|
1051
1076
|
header: 'actions',
|
1052
1077
|
id: 'mrt-row-actions',
|
1078
|
+
size: 70,
|
1053
1079
|
tableOptions,
|
1054
1080
|
}));
|
1055
1081
|
};
|
@@ -1105,6 +1131,7 @@ const getMRT_RowDragColumnDef = (tableOptions) => {
|
|
1105
1131
|
return Object.assign({ Cell: ({ row, rowRef, table }) => (jsxRuntime.jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })), grow: false }, defaultDisplayColumnProps({
|
1106
1132
|
header: 'move',
|
1107
1133
|
id: 'mrt-row-drag',
|
1134
|
+
size: 60,
|
1108
1135
|
tableOptions,
|
1109
1136
|
}));
|
1110
1137
|
};
|
@@ -1159,6 +1186,7 @@ const MRT_ExpandButton = ({ row, staticRowIndex, table, }) => {
|
|
1159
1186
|
};
|
1160
1187
|
|
1161
1188
|
const getMRT_RowExpandColumnDef = (tableOptions) => {
|
1189
|
+
var _a;
|
1162
1190
|
if (!showRowExpandColumn(tableOptions)) {
|
1163
1191
|
return null;
|
1164
1192
|
}
|
@@ -1188,9 +1216,11 @@ const getMRT_RowExpandColumnDef = (tableOptions) => {
|
|
1188
1216
|
header: 'expand',
|
1189
1217
|
id: 'mrt-row-expand',
|
1190
1218
|
size: groupedColumnMode === 'remove'
|
1191
|
-
? defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.size
|
1219
|
+
? (_a = defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.size) !== null && _a !== void 0 ? _a : 180
|
1192
1220
|
: renderDetailPanel
|
1193
|
-
?
|
1221
|
+
? enableExpandAll
|
1222
|
+
? 60
|
1223
|
+
: 70
|
1194
1224
|
: 100,
|
1195
1225
|
tableOptions,
|
1196
1226
|
}));
|
@@ -1210,6 +1240,7 @@ const getMRT_RowNumbersColumnDef = (tableOptions) => {
|
|
1210
1240
|
}, Header: () => localization.rowNumber, grow: false }, defaultDisplayColumnProps({
|
1211
1241
|
header: 'rowNumbers',
|
1212
1242
|
id: 'mrt-row-numbers',
|
1243
|
+
size: 50,
|
1213
1244
|
tableOptions,
|
1214
1245
|
}));
|
1215
1246
|
};
|
@@ -1258,15 +1289,17 @@ const getMRT_RowPinningColumnDef = (tableOptions) => {
|
|
1258
1289
|
return Object.assign({ Cell: ({ row, table }) => (jsxRuntime.jsx(MRT_TableBodyRowPinButton, { row: row, table: table })), grow: false }, defaultDisplayColumnProps({
|
1259
1290
|
header: 'pin',
|
1260
1291
|
id: 'mrt-row-pin',
|
1292
|
+
size: 60,
|
1261
1293
|
tableOptions,
|
1262
1294
|
}));
|
1263
1295
|
};
|
1264
1296
|
|
1265
1297
|
const MRT_SelectCheckbox = (_a) => {
|
1266
1298
|
var _b;
|
1267
|
-
var { row,
|
1299
|
+
var { row, staticRowIndex, table } = _a, rest = __rest(_a, ["row", "staticRowIndex", "table"]);
|
1268
1300
|
const { getState, options: { enableMultiRowSelection, enableRowPinning, localization, muiSelectAllCheckboxProps, muiSelectCheckboxProps, rowPinningDisplayMode, selectAllMode, }, } = table;
|
1269
1301
|
const { density, isLoading } = getState();
|
1302
|
+
const selectAll = !row;
|
1270
1303
|
const checkboxProps = Object.assign(Object.assign({}, (!row
|
1271
1304
|
? parseFromValuesOrFunc(muiSelectAllCheckboxProps, { table })
|
1272
1305
|
: parseFromValuesOrFunc(muiSelectCheckboxProps, {
|
@@ -1304,10 +1337,7 @@ const MRT_SelectCheckbox = (_a) => {
|
|
1304
1337
|
};
|
1305
1338
|
const commonProps = Object.assign(Object.assign({ 'aria-label': selectAll
|
1306
1339
|
? localization.toggleSelectAll
|
1307
|
-
: localization.toggleSelectRow, checked: selectAll
|
1308
|
-
? allRowsSelected
|
1309
|
-
: (row === null || row === void 0 ? void 0 : row.getIsSelected()) ||
|
1310
|
-
((row === null || row === void 0 ? void 0 : row.getIsAllSubRowsSelected()) && row.getCanSelectSubRows()), disabled: isLoading || (row && !row.getCanSelect()) || (row === null || row === void 0 ? void 0 : row.id) === 'mrt-row-create', inputProps: {
|
1340
|
+
: localization.toggleSelectRow, checked: selectAll ? allRowsSelected : getIsRowSelected({ row, table }), disabled: isLoading || (row && !row.getCanSelect()) || (row === null || row === void 0 ? void 0 : row.id) === 'mrt-row-create', inputProps: {
|
1311
1341
|
'aria-label': selectAll
|
1312
1342
|
? localization.toggleSelectAll
|
1313
1343
|
: localization.toggleSelectRow,
|
@@ -1332,10 +1362,11 @@ const getMRT_RowSelectColumnDef = (tableOptions) => {
|
|
1332
1362
|
}
|
1333
1363
|
const { enableMultiRowSelection, enableSelectAll } = tableOptions;
|
1334
1364
|
return Object.assign({ Cell: ({ row, staticRowIndex, table }) => (jsxRuntime.jsx(MRT_SelectCheckbox, { row: row, staticRowIndex: staticRowIndex, table: table })), Header: enableSelectAll && enableMultiRowSelection
|
1335
|
-
? ({ table }) => jsxRuntime.jsx(MRT_SelectCheckbox, {
|
1365
|
+
? ({ table }) => jsxRuntime.jsx(MRT_SelectCheckbox, { table: table })
|
1336
1366
|
: undefined, grow: false }, defaultDisplayColumnProps({
|
1337
1367
|
header: 'select',
|
1338
1368
|
id: 'mrt-row-select',
|
1369
|
+
size: enableSelectAll ? 60 : 70,
|
1339
1370
|
tableOptions,
|
1340
1371
|
}));
|
1341
1372
|
};
|
@@ -1490,25 +1521,27 @@ const MRT_DefaultDisplayColumn = {
|
|
1490
1521
|
};
|
1491
1522
|
const useMRT_TableOptions = (_a) => {
|
1492
1523
|
var _b;
|
1493
|
-
var { aggregationFns, autoResetExpanded = false, columnFilterDisplayMode = 'subheader', columnResizeDirection, columnResizeMode = 'onChange', createDisplayMode = 'modal', defaultColumn, defaultDisplayColumn, editDisplayMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnPinning = false, enableColumnResizing = false, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enableRowPinning = false, enableRowSelection = false, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, layoutMode, localization, manualFiltering, manualGrouping, manualPagination, manualSorting, paginationDisplayMode = 'default', positionActionsColumn = 'first', positionCreatingRow = 'top', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberDisplayMode = 'static', rowPinningDisplayMode = 'sticky', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnFilterDisplayMode", "columnResizeDirection", "columnResizeMode", "createDisplayMode", "defaultColumn", "defaultDisplayColumn", "editDisplayMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnPinning", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enableRowPinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "paginationDisplayMode", "positionActionsColumn", "positionCreatingRow", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberDisplayMode", "rowPinningDisplayMode", "selectAllMode", "sortingFns"]);
|
1524
|
+
var { aggregationFns, autoResetExpanded = false, columnFilterDisplayMode = 'subheader', columnResizeDirection, columnResizeMode = 'onChange', createDisplayMode = 'modal', defaultColumn, defaultDisplayColumn, editDisplayMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnPinning = false, enableColumnResizing = false, enableColumnVirtualization, enableDensityToggle = true, enableExpandAll = true, enableExpanding, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enableRowPinning = false, enableRowSelection = false, enableRowVirtualization, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, layoutMode, localization, manualFiltering, manualGrouping, manualPagination, manualSorting, paginationDisplayMode = 'default', positionActionsColumn = 'first', positionCreatingRow = 'top', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberDisplayMode = 'static', rowPinningDisplayMode = 'sticky', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnFilterDisplayMode", "columnResizeDirection", "columnResizeMode", "createDisplayMode", "defaultColumn", "defaultDisplayColumn", "editDisplayMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnPinning", "enableColumnResizing", "enableColumnVirtualization", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enableRowPinning", "enableRowSelection", "enableRowVirtualization", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "paginationDisplayMode", "positionActionsColumn", "positionCreatingRow", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberDisplayMode", "rowPinningDisplayMode", "selectAllMode", "sortingFns"]);
|
1494
1525
|
const theme = styles.useTheme();
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1526
|
+
icons = react.useMemo(() => (Object.assign(Object.assign({}, MRT_Default_Icons), icons)), [icons]);
|
1527
|
+
localization = react.useMemo(() => (Object.assign(Object.assign({}, MRT_Localization_EN), localization)), [localization]);
|
1528
|
+
aggregationFns = react.useMemo(() => (Object.assign(Object.assign({}, MRT_AggregationFns), aggregationFns)), []);
|
1529
|
+
filterFns = react.useMemo(() => (Object.assign(Object.assign({}, MRT_FilterFns), filterFns)), []);
|
1530
|
+
sortingFns = react.useMemo(() => (Object.assign(Object.assign({}, MRT_SortingFns), sortingFns)), []);
|
1531
|
+
defaultColumn = react.useMemo(() => (Object.assign(Object.assign({}, MRT_DefaultColumn), defaultColumn)), [defaultColumn]);
|
1532
|
+
defaultDisplayColumn = react.useMemo(() => (Object.assign(Object.assign({}, MRT_DefaultDisplayColumn), defaultDisplayColumn)), [defaultDisplayColumn]);
|
1533
|
+
//cannot be changed after initialization
|
1534
|
+
[enableColumnVirtualization, enableRowVirtualization] = react.useMemo(() => [enableColumnVirtualization, enableRowVirtualization], []);
|
1502
1535
|
if (!columnResizeDirection) {
|
1503
1536
|
columnResizeDirection = theme.direction || 'ltr';
|
1504
1537
|
}
|
1505
1538
|
layoutMode =
|
1506
1539
|
layoutMode || (enableColumnResizing ? 'grid-no-grow' : 'semantic');
|
1507
1540
|
if (layoutMode === 'semantic' &&
|
1508
|
-
(
|
1541
|
+
(enableRowVirtualization || enableColumnVirtualization)) {
|
1509
1542
|
layoutMode = 'grid';
|
1510
1543
|
}
|
1511
|
-
if (
|
1544
|
+
if (enableRowVirtualization) {
|
1512
1545
|
enableStickyHeader = true;
|
1513
1546
|
}
|
1514
1547
|
if (enablePagination === false && manualPagination === undefined) {
|
@@ -1520,17 +1553,22 @@ const useMRT_TableOptions = (_a) => {
|
|
1520
1553
|
manualPagination = true;
|
1521
1554
|
manualSorting = true;
|
1522
1555
|
}
|
1523
|
-
return Object.assign({ aggregationFns
|
1556
|
+
return Object.assign({ aggregationFns,
|
1557
|
+
autoResetExpanded,
|
1524
1558
|
columnFilterDisplayMode,
|
1525
1559
|
columnResizeDirection,
|
1526
1560
|
columnResizeMode,
|
1527
|
-
createDisplayMode,
|
1561
|
+
createDisplayMode,
|
1562
|
+
defaultColumn,
|
1563
|
+
defaultDisplayColumn,
|
1564
|
+
editDisplayMode,
|
1528
1565
|
enableBottomToolbar,
|
1529
1566
|
enableColumnActions,
|
1530
1567
|
enableColumnFilters,
|
1531
1568
|
enableColumnOrdering,
|
1532
1569
|
enableColumnPinning,
|
1533
1570
|
enableColumnResizing,
|
1571
|
+
enableColumnVirtualization,
|
1534
1572
|
enableDensityToggle,
|
1535
1573
|
enableExpandAll,
|
1536
1574
|
enableExpanding,
|
@@ -1546,13 +1584,19 @@ const useMRT_TableOptions = (_a) => {
|
|
1546
1584
|
enablePagination,
|
1547
1585
|
enableRowPinning,
|
1548
1586
|
enableRowSelection,
|
1587
|
+
enableRowVirtualization,
|
1549
1588
|
enableSelectAll,
|
1550
1589
|
enableSorting,
|
1551
1590
|
enableStickyHeader,
|
1552
1591
|
enableTableFooter,
|
1553
1592
|
enableTableHead,
|
1554
1593
|
enableToolbarInternalActions,
|
1555
|
-
enableTopToolbar,
|
1594
|
+
enableTopToolbar,
|
1595
|
+
filterFns,
|
1596
|
+
icons,
|
1597
|
+
layoutMode,
|
1598
|
+
localization,
|
1599
|
+
manualFiltering,
|
1556
1600
|
manualGrouping,
|
1557
1601
|
manualPagination,
|
1558
1602
|
manualSorting,
|
@@ -1566,7 +1610,8 @@ const useMRT_TableOptions = (_a) => {
|
|
1566
1610
|
positionToolbarDropZone,
|
1567
1611
|
rowNumberDisplayMode,
|
1568
1612
|
rowPinningDisplayMode,
|
1569
|
-
selectAllMode,
|
1613
|
+
selectAllMode,
|
1614
|
+
sortingFns }, rest);
|
1570
1615
|
};
|
1571
1616
|
|
1572
1617
|
const blankColProps = {
|
@@ -1856,68 +1901,60 @@ const extraIndexRangeExtractor = (range, draggingIndex) => {
|
|
1856
1901
|
};
|
1857
1902
|
|
1858
1903
|
const useMRT_ColumnVirtualizer = (table) => {
|
1859
|
-
var _a, _b, _c, _d
|
1860
|
-
const { getState, options: { columnVirtualizerInstanceRef, columnVirtualizerOptions, enableColumnPinning, enableColumnVirtualization, }, refs: { tableContainerRef }, } = table;
|
1861
|
-
const { columnPinning,
|
1904
|
+
var _a, _b, _c, _d;
|
1905
|
+
const { getLeftLeafColumns, getRightLeafColumns, getState, getVisibleLeafColumns, options: { columnVirtualizerInstanceRef, columnVirtualizerOptions, enableColumnPinning, enableColumnVirtualization, }, refs: { tableContainerRef }, } = table;
|
1906
|
+
const { columnPinning, draggingColumn } = getState();
|
1907
|
+
if (!enableColumnVirtualization)
|
1908
|
+
return undefined;
|
1862
1909
|
const columnVirtualizerProps = parseFromValuesOrFunc(columnVirtualizerOptions, {
|
1863
1910
|
table,
|
1864
1911
|
});
|
1865
|
-
const
|
1912
|
+
const visibleColumns = getVisibleLeafColumns();
|
1913
|
+
const [leftPinnedIndexes, rightPinnedIndexes] = react.useMemo(() => enableColumnPinning
|
1866
1914
|
? [
|
1867
|
-
|
1868
|
-
|
1869
|
-
.
|
1870
|
-
.map((c) => table.getVisibleLeafColumns().length - c.getPinnedIndex() - 1)
|
1915
|
+
getLeftLeafColumns().map((c) => c.getPinnedIndex()),
|
1916
|
+
getRightLeafColumns()
|
1917
|
+
.map((column) => visibleColumns.length - column.getPinnedIndex() - 1)
|
1871
1918
|
.sort((a, b) => a - b),
|
1872
1919
|
]
|
1873
|
-
: [[], []], [columnPinning,
|
1874
|
-
|
1875
|
-
const
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
((_f = (_e = virtualColumns[virtualColumns.length - rightPinnedIndexes.length - 1]) === null || _e === void 0 ? void 0 : _e.end) !== null && _f !== void 0 ? _f : 0) -
|
1912
|
-
(rightPinnedIndexes.length
|
1913
|
-
? columnVirtualizer.getTotalSize() -
|
1914
|
-
((_h = (_g = virtualColumns[virtualColumns.length - rightPinnedIndexes.length]) === null || _g === void 0 ? void 0 : _g.start) !== null && _h !== void 0 ? _h : 0)
|
1915
|
-
: 0);
|
1916
|
-
}
|
1917
|
-
if (columnVirtualizerInstanceRef) {
|
1918
|
-
//@ts-ignore
|
1919
|
-
columnVirtualizerInstanceRef.current = columnVirtualizer;
|
1920
|
-
}
|
1920
|
+
: [[], []], [columnPinning, enableColumnPinning]);
|
1921
|
+
const numPinnedLeft = leftPinnedIndexes.length;
|
1922
|
+
const numPinnedRight = rightPinnedIndexes.length;
|
1923
|
+
const draggingColumnIndex = react.useMemo(() => (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id)
|
1924
|
+
? visibleColumns.findIndex((c) => c.id === (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id))
|
1925
|
+
: undefined, [draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id]);
|
1926
|
+
const columnVirtualizer = reactVirtual.useVirtualizer(Object.assign({ count: visibleColumns.length, estimateSize: (index) => visibleColumns[index].getSize(), getScrollElement: () => tableContainerRef.current, horizontal: true, overscan: 3, rangeExtractor: react.useCallback((range) => {
|
1927
|
+
const newIndexes = extraIndexRangeExtractor(range, draggingColumnIndex);
|
1928
|
+
if (!numPinnedLeft && !numPinnedRight) {
|
1929
|
+
return newIndexes;
|
1930
|
+
}
|
1931
|
+
return [
|
1932
|
+
...new Set([
|
1933
|
+
...leftPinnedIndexes,
|
1934
|
+
...newIndexes,
|
1935
|
+
...rightPinnedIndexes,
|
1936
|
+
]),
|
1937
|
+
];
|
1938
|
+
}, [leftPinnedIndexes, rightPinnedIndexes, draggingColumnIndex]) }, columnVirtualizerProps));
|
1939
|
+
const virtualColumns = columnVirtualizer.getVirtualItems();
|
1940
|
+
columnVirtualizer.virtualColumns = virtualColumns;
|
1941
|
+
const numColumns = virtualColumns.length;
|
1942
|
+
if (numColumns) {
|
1943
|
+
const totalSize = columnVirtualizer.getTotalSize();
|
1944
|
+
const leftNonPinnedStart = ((_a = virtualColumns[numPinnedLeft]) === null || _a === void 0 ? void 0 : _a.start) || 0;
|
1945
|
+
const leftNonPinnedEnd = ((_b = virtualColumns[leftPinnedIndexes.length - 1]) === null || _b === void 0 ? void 0 : _b.end) || 0;
|
1946
|
+
const rightNonPinnedStart = ((_c = virtualColumns[numColumns - numPinnedRight]) === null || _c === void 0 ? void 0 : _c.start) || 0;
|
1947
|
+
const rightNonPinnedEnd = ((_d = virtualColumns[numColumns - numPinnedRight - 1]) === null || _d === void 0 ? void 0 : _d.end) || 0;
|
1948
|
+
columnVirtualizer.virtualPaddingLeft =
|
1949
|
+
leftNonPinnedStart - leftNonPinnedEnd;
|
1950
|
+
columnVirtualizer.virtualPaddingRight =
|
1951
|
+
totalSize -
|
1952
|
+
rightNonPinnedEnd -
|
1953
|
+
(numPinnedRight ? totalSize - rightNonPinnedStart : 0);
|
1954
|
+
}
|
1955
|
+
if (columnVirtualizerInstanceRef) {
|
1956
|
+
//@ts-ignore
|
1957
|
+
columnVirtualizerInstanceRef.current = columnVirtualizer;
|
1921
1958
|
}
|
1922
1959
|
return columnVirtualizer;
|
1923
1960
|
};
|
@@ -1926,31 +1963,28 @@ const useMRT_RowVirtualizer = (table, rows) => {
|
|
1926
1963
|
var _a;
|
1927
1964
|
const { getRowModel, getState, options: { enableRowVirtualization, renderDetailPanel, rowVirtualizerInstanceRef, rowVirtualizerOptions, }, refs: { tableContainerRef }, } = table;
|
1928
1965
|
const { density, draggingRow, expanded } = getState();
|
1966
|
+
if (!enableRowVirtualization)
|
1967
|
+
return undefined;
|
1929
1968
|
const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {
|
1930
1969
|
table,
|
1931
1970
|
});
|
1932
1971
|
const rowCount = (_a = rows === null || rows === void 0 ? void 0 : rows.length) !== null && _a !== void 0 ? _a : getRowModel().rows.length;
|
1933
1972
|
const normalRowHeight = density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73;
|
1934
|
-
const rowVirtualizer =
|
1935
|
-
|
1936
|
-
?
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
rowVirtualizer.virtualRows = virtualRows;
|
1950
|
-
if (rowVirtualizerInstanceRef) {
|
1951
|
-
//@ts-ignore
|
1952
|
-
rowVirtualizerInstanceRef.current = rowVirtualizer;
|
1953
|
-
}
|
1973
|
+
const rowVirtualizer = reactVirtual.useVirtualizer(Object.assign({ count: renderDetailPanel ? rowCount * 2 : rowCount, estimateSize: (index) => renderDetailPanel && index % 2 === 1
|
1974
|
+
? expanded === true
|
1975
|
+
? 100
|
1976
|
+
: 0
|
1977
|
+
: normalRowHeight, getScrollElement: () => tableContainerRef.current, measureElement: typeof window !== 'undefined' &&
|
1978
|
+
navigator.userAgent.indexOf('Firefox') === -1
|
1979
|
+
? (element) => element === null || element === void 0 ? void 0 : element.getBoundingClientRect().height
|
1980
|
+
: undefined, overscan: 4, rangeExtractor: react.useCallback((range) => {
|
1981
|
+
var _a;
|
1982
|
+
return extraIndexRangeExtractor(range, (_a = draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.index) !== null && _a !== void 0 ? _a : 0);
|
1983
|
+
}, [draggingRow]) }, rowVirtualizerProps));
|
1984
|
+
rowVirtualizer.virtualRows = rowVirtualizer.getVirtualItems();
|
1985
|
+
if (rowVirtualizerInstanceRef) {
|
1986
|
+
//@ts-ignore
|
1987
|
+
rowVirtualizerInstanceRef.current = rowVirtualizer;
|
1954
1988
|
}
|
1955
1989
|
return rowVirtualizer;
|
1956
1990
|
};
|
@@ -2124,10 +2158,9 @@ const MRT_EditCellTextField = (_a) => {
|
|
2124
2158
|
const { column, row } = cell;
|
2125
2159
|
const { columnDef } = column;
|
2126
2160
|
const { creatingRow, editingRow } = getState();
|
2127
|
-
const { editSelectOptions } = columnDef;
|
2161
|
+
const { editSelectOptions, editVariant } = columnDef;
|
2128
2162
|
const isCreating = (creatingRow === null || creatingRow === void 0 ? void 0 : creatingRow.id) === row.id;
|
2129
2163
|
const isEditing = (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) === row.id;
|
2130
|
-
const isSelectEdit = columnDef.editVariant === 'select';
|
2131
2164
|
const [value, setValue] = react.useState(() => cell.getValue());
|
2132
2165
|
const textFieldProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiEditTextFieldProps, {
|
2133
2166
|
cell,
|
@@ -2146,6 +2179,7 @@ const MRT_EditCellTextField = (_a) => {
|
|
2146
2179
|
row,
|
2147
2180
|
table,
|
2148
2181
|
});
|
2182
|
+
const isSelectEdit = editVariant === 'select' || (textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.select);
|
2149
2183
|
const saveInputValueToRowCache = (newValue) => {
|
2150
2184
|
//@ts-ignore
|
2151
2185
|
row._valuesCache[column.id] = newValue;
|
@@ -2160,7 +2194,7 @@ const MRT_EditCellTextField = (_a) => {
|
|
2160
2194
|
var _a;
|
2161
2195
|
(_a = textFieldProps.onChange) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, event);
|
2162
2196
|
setValue(event.target.value);
|
2163
|
-
if (
|
2197
|
+
if (isSelectEdit) {
|
2164
2198
|
saveInputValueToRowCache(event.target.value);
|
2165
2199
|
}
|
2166
2200
|
};
|
@@ -2213,9 +2247,9 @@ const MRT_EditCellTextField = (_a) => {
|
|
2213
2247
|
|
2214
2248
|
const MRT_TableBodyCell = (_a) => {
|
2215
2249
|
var _b, _c, _d, _e, _f;
|
2216
|
-
var { cell, measureElement, numRows, rowRef, staticRowIndex, table
|
2250
|
+
var { cell, measureElement, numRows, rowRef, staticColumnIndex, staticRowIndex, table } = _a, rest = __rest(_a, ["cell", "measureElement", "numRows", "rowRef", "staticColumnIndex", "staticRowIndex", "table"]);
|
2217
2251
|
const theme = styles.useTheme();
|
2218
|
-
const { getState, options: { columnResizeDirection, columnResizeMode, createDisplayMode, editDisplayMode, enableClickToCopy, enableColumnOrdering, enableEditing, enableGrouping, layoutMode, muiSkeletonProps, muiTableBodyCellProps, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
|
2252
|
+
const { getState, options: { columnResizeDirection, columnResizeMode, createDisplayMode, editDisplayMode, enableClickToCopy, enableColumnOrdering, enableColumnPinning, enableEditing, enableGrouping, layoutMode, muiSkeletonProps, muiTableBodyCellProps, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
|
2219
2253
|
const { columnSizingInfo, creatingRow, density, draggingColumn, draggingRow, editingCell, editingRow, hoveredColumn, hoveredRow, isLoading, showSkeletons, } = getState();
|
2220
2254
|
const { column, row } = cell;
|
2221
2255
|
const { columnDef } = column;
|
@@ -2286,6 +2320,9 @@ const MRT_TableBodyCell = (_a) => {
|
|
2286
2320
|
hoveredRow,
|
2287
2321
|
staticRowIndex,
|
2288
2322
|
]);
|
2323
|
+
const isColumnPinned = enableColumnPinning &&
|
2324
|
+
columnDef.columnDefType !== 'group' &&
|
2325
|
+
column.getIsPinned();
|
2289
2326
|
const isEditable = !cell.getIsPlaceholder() &&
|
2290
2327
|
parseFromValuesOrFunc(enableEditing, row) &&
|
2291
2328
|
parseFromValuesOrFunc(columnDef.enableEditing, row) !== false;
|
@@ -2325,7 +2362,7 @@ const MRT_TableBodyCell = (_a) => {
|
|
2325
2362
|
cell,
|
2326
2363
|
table,
|
2327
2364
|
};
|
2328
|
-
return (jsxRuntime.jsx(TableCell__default["default"], Object.assign({ align: theme.direction === 'rtl' ? 'right' : 'left', "data-index":
|
2365
|
+
return (jsxRuntime.jsx(TableCell__default["default"], Object.assign({ align: theme.direction === 'rtl' ? 'right' : 'left', "data-index": staticColumnIndex, "data-pinned": !!isColumnPinned || undefined, ref: (node) => {
|
2329
2366
|
if (node) {
|
2330
2367
|
measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
|
2331
2368
|
}
|
@@ -2407,8 +2444,10 @@ const MRT_TableBodyRow = ({ columnVirtualizer, numRows, pinnedRowIds, row, rowVi
|
|
2407
2444
|
const theme = styles.useTheme();
|
2408
2445
|
const { getState, options: { enableRowOrdering, enableRowPinning, enableStickyFooter, enableStickyHeader, layoutMode, memoMode, muiTableBodyRowProps, renderDetailPanel, rowPinningDisplayMode, }, refs: { tableFooterRef, tableHeadRef }, setHoveredRow, } = table;
|
2409
2446
|
const { density, draggingColumn, draggingRow, editingCell, editingRow, hoveredRow, isFullScreen, rowPinning, } = getState();
|
2447
|
+
const visibleCells = row.getVisibleCells();
|
2410
2448
|
const { virtualColumns, virtualPaddingLeft, virtualPaddingRight } = columnVirtualizer !== null && columnVirtualizer !== void 0 ? columnVirtualizer : {};
|
2411
|
-
const
|
2449
|
+
const isRowSelected = getIsRowSelected({ row, table });
|
2450
|
+
const isRowPinned = enableRowPinning && row.getIsPinned();
|
2412
2451
|
const isDraggingRow = (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id;
|
2413
2452
|
const isHoveredRow = (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id;
|
2414
2453
|
const tableRowProps = parseFromValuesOrFunc(muiTableBodyRowProps, {
|
@@ -2444,47 +2483,49 @@ const MRT_TableBodyRow = ({ columnVirtualizer, numRows, pinnedRowIds, row, rowVi
|
|
2444
2483
|
};
|
2445
2484
|
const rowRef = react.useRef(null);
|
2446
2485
|
const { baseBackgroundColor, pinnedRowBackgroundColor, selectedRowBackgroundColor, } = getMRTTheme(table, theme);
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2486
|
+
const cellHighlightColor = isRowSelected
|
2487
|
+
? selectedRowBackgroundColor
|
2488
|
+
: isRowPinned
|
2489
|
+
? pinnedRowBackgroundColor
|
2490
|
+
: undefined;
|
2491
|
+
const cellHighlightColorHover = (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
|
2492
|
+
? isRowSelected
|
2493
|
+
? cellHighlightColor
|
2494
|
+
: theme.palette.mode === 'dark'
|
2495
|
+
? `${styles.lighten(baseBackgroundColor, 0.3)}`
|
2496
|
+
: `${styles.darken(baseBackgroundColor, 0.3)}`
|
2497
|
+
: undefined;
|
2498
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(TableRow__default["default"], Object.assign({ "data-index": renderDetailPanel ? staticRowIndex * 2 : staticRowIndex, "data-pinned": !!isRowPinned || undefined, "data-selected": isRowSelected || undefined, onDragEnter: handleDragEnter, ref: (node) => {
|
2450
2499
|
if (node) {
|
2451
2500
|
rowRef.current = node;
|
2452
2501
|
rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement(node);
|
2453
2502
|
}
|
2454
|
-
}, selected:
|
2503
|
+
}, selected: isRowSelected }, tableRowProps, { style: Object.assign({ transform: virtualRow
|
2455
2504
|
? `translateY(${virtualRow.start}px)`
|
2456
2505
|
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style), sx: (theme) => (Object.assign({ '&:hover td': {
|
2457
|
-
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
? `${styles.lighten(baseBackgroundColor, 0.05)}`
|
2462
|
-
: `${styles.darken(baseBackgroundColor, 0.05)}`
|
2463
|
-
: undefined,
|
2464
|
-
}, backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isPinned
|
2506
|
+
'&:after': Object.assign({ backgroundColor: cellHighlightColorHover
|
2507
|
+
? styles.alpha(cellHighlightColorHover, 0.3)
|
2508
|
+
: undefined }, pinnedBeforeAfterStyles),
|
2509
|
+
}, backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isRowPinned
|
2465
2510
|
? `${bottomPinnedIndex * rowHeight +
|
2466
2511
|
(enableStickyFooter ? tableFooterHeight - 1 : 0)}px`
|
2467
|
-
: undefined, boxSizing: 'border-box', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, opacity:
|
2512
|
+
: undefined, boxSizing: 'border-box', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, opacity: isRowPinned ? 0.97 : isDraggingRow || isHoveredRow ? 0.5 : 1, position: virtualRow
|
2468
2513
|
? 'absolute'
|
2469
|
-
: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
|
2514
|
+
: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned
|
2470
2515
|
? 'sticky'
|
2471
|
-
: undefined, td: {
|
2472
|
-
backgroundColor: row.getIsSelected()
|
2473
|
-
? selectedRowBackgroundColor
|
2474
|
-
: isPinned
|
2475
|
-
? pinnedRowBackgroundColor
|
2476
|
-
: undefined,
|
2477
|
-
}, top: virtualRow
|
2516
|
+
: undefined, td: Object.assign({ '&:after': Object.assign({ backgroundColor: cellHighlightColor }, pinnedBeforeAfterStyles) }, getCommonPinnedCellStyles({ table, theme })), top: virtualRow
|
2478
2517
|
? 0
|
2479
|
-
: topPinnedIndex !== undefined &&
|
2518
|
+
: topPinnedIndex !== undefined && isRowPinned
|
2480
2519
|
? `${topPinnedIndex * rowHeight +
|
2481
2520
|
(enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)}px`
|
2482
|
-
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', zIndex: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
|
2521
|
+
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', zIndex: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned
|
2483
2522
|
? 2
|
2484
|
-
: undefined }, sx)), children: [virtualPaddingLeft ? (jsxRuntime.jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns :
|
2485
|
-
|
2486
|
-
|
2487
|
-
|
2523
|
+
: undefined }, sx)), children: [virtualPaddingLeft ? (jsxRuntime.jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : visibleCells).map((cellOrVirtualCell, staticColumnIndex) => {
|
2524
|
+
let cell = cellOrVirtualCell;
|
2525
|
+
if (columnVirtualizer) {
|
2526
|
+
staticColumnIndex = cellOrVirtualCell.index;
|
2527
|
+
cell = visibleCells[staticColumnIndex];
|
2528
|
+
}
|
2488
2529
|
const props = {
|
2489
2530
|
cell,
|
2490
2531
|
measureElement: !isDraggingRow && !isHoveredRow
|
@@ -2492,11 +2533,9 @@ const MRT_TableBodyRow = ({ columnVirtualizer, numRows, pinnedRowIds, row, rowVi
|
|
2492
2533
|
: undefined,
|
2493
2534
|
numRows,
|
2494
2535
|
rowRef,
|
2536
|
+
staticColumnIndex,
|
2495
2537
|
staticRowIndex,
|
2496
2538
|
table,
|
2497
|
-
virtualColumnIndex: columnVirtualizer
|
2498
|
-
? cellOrVirtualCell.index
|
2499
|
-
: undefined,
|
2500
2539
|
};
|
2501
2540
|
return cell ? (memoMode === 'cells' &&
|
2502
2541
|
cell.column.columnDef.columnDefType === 'data' &&
|
@@ -2555,6 +2594,7 @@ const MRT_TableBody = (_a) => {
|
|
2555
2594
|
}, children: globalFilter || columnFilters.length
|
2556
2595
|
? localization.noResultsFound
|
2557
2596
|
: localization.noRecordsToDisplay })) }) })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, staticRowIndex) => {
|
2597
|
+
let row = rowOrVirtualRow;
|
2558
2598
|
if (rowVirtualizer) {
|
2559
2599
|
if (renderDetailPanel) {
|
2560
2600
|
if (rowOrVirtualRow.index % 2 === 1) {
|
@@ -2567,10 +2607,8 @@ const MRT_TableBody = (_a) => {
|
|
2567
2607
|
else {
|
2568
2608
|
staticRowIndex = rowOrVirtualRow.index;
|
2569
2609
|
}
|
2610
|
+
row = rows[staticRowIndex];
|
2570
2611
|
}
|
2571
|
-
const row = rowVirtualizer
|
2572
|
-
? rows[staticRowIndex]
|
2573
|
-
: rowOrVirtualRow;
|
2574
2612
|
const props = Object.assign(Object.assign({}, commonRowProps), { pinnedRowIds,
|
2575
2613
|
row,
|
2576
2614
|
rowVirtualizer,
|
@@ -2590,20 +2628,23 @@ const Memo_MRT_TableBody = react.memo(MRT_TableBody, (prev, next) => prev.table.
|
|
2590
2628
|
|
2591
2629
|
const MRT_TableFooterCell = (_a) => {
|
2592
2630
|
var _b, _c, _d;
|
2593
|
-
var { footer, table } = _a, rest = __rest(_a, ["footer", "table"]);
|
2631
|
+
var { footer, staticColumnIndex, table } = _a, rest = __rest(_a, ["footer", "staticColumnIndex", "table"]);
|
2594
2632
|
const theme = styles.useTheme();
|
2595
|
-
const { getState, options: { layoutMode, muiTableFooterCellProps }, } = table;
|
2633
|
+
const { getState, options: { enableColumnPinning, layoutMode, muiTableFooterCellProps }, } = table;
|
2596
2634
|
const { density } = getState();
|
2597
2635
|
const { column } = footer;
|
2598
2636
|
const { columnDef } = column;
|
2599
2637
|
const { columnDefType } = columnDef;
|
2638
|
+
const isColumnPinned = enableColumnPinning &&
|
2639
|
+
columnDef.columnDefType !== 'group' &&
|
2640
|
+
column.getIsPinned();
|
2600
2641
|
const args = { column, table };
|
2601
2642
|
const tableCellProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableFooterCellProps, args)), parseFromValuesOrFunc(columnDef.muiTableFooterCellProps, args)), rest);
|
2602
2643
|
return (jsxRuntime.jsx(TableCell__default["default"], Object.assign({ align: columnDefType === 'group'
|
2603
2644
|
? 'center'
|
2604
2645
|
: theme.direction === 'rtl'
|
2605
2646
|
? 'right'
|
2606
|
-
: 'left', colSpan: footer.colSpan, variant: "footer" }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, fontWeight: 'bold', justifyContent: columnDefType === 'group' ? 'center' : undefined, p: density === 'compact'
|
2647
|
+
: 'left', colSpan: footer.colSpan, "data-index": staticColumnIndex, "data-pinned": !!isColumnPinned || undefined, variant: "footer" }, tableCellProps, { sx: (theme) => (Object.assign(Object.assign({ display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined, fontWeight: 'bold', justifyContent: columnDefType === 'group' ? 'center' : undefined, p: density === 'compact'
|
2607
2648
|
? '0.5rem'
|
2608
2649
|
: density === 'comfortable'
|
2609
2650
|
? '1rem'
|
@@ -2635,11 +2676,14 @@ const MRT_TableFooterRow = (_a) => {
|
|
2635
2676
|
footerGroup,
|
2636
2677
|
table,
|
2637
2678
|
})), rest);
|
2638
|
-
return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, width: '100%' }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
|
2639
|
-
|
2640
|
-
|
2641
|
-
|
2642
|
-
|
2679
|
+
return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, width: '100%' }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter, staticColumnIndex) => {
|
2680
|
+
let footer = footerOrVirtualFooter;
|
2681
|
+
if (columnVirtualizer) {
|
2682
|
+
staticColumnIndex = footerOrVirtualFooter
|
2683
|
+
.index;
|
2684
|
+
footer = footerGroup.headers[staticColumnIndex];
|
2685
|
+
}
|
2686
|
+
return footer ? (jsxRuntime.jsx(MRT_TableFooterCell, { footer: footer, staticColumnIndex: staticColumnIndex, table: table }, footer.id)) : null;
|
2643
2687
|
}), virtualPaddingRight ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
|
2644
2688
|
};
|
2645
2689
|
|
@@ -3138,6 +3182,7 @@ const MRT_TableHeadCellResizeHandle = (_a) => {
|
|
3138
3182
|
const { getState, options: { columnResizeDirection, columnResizeMode }, setColumnSizingInfo, } = table;
|
3139
3183
|
const { density } = getState();
|
3140
3184
|
const { column } = header;
|
3185
|
+
const handler = header.getResizeHandler();
|
3141
3186
|
const mx = density === 'compact'
|
3142
3187
|
? '-8px'
|
3143
3188
|
: density === 'comfortable'
|
@@ -3147,7 +3192,7 @@ const MRT_TableHeadCellResizeHandle = (_a) => {
|
|
3147
3192
|
return (jsxRuntime.jsx(Box__default["default"], { className: "Mui-TableHeadCell-ResizeHandle-Wrapper", onDoubleClick: () => {
|
3148
3193
|
setColumnSizingInfo((old) => (Object.assign(Object.assign({}, old), { isResizingColumn: false })));
|
3149
3194
|
column.resetSize();
|
3150
|
-
}, onMouseDown:
|
3195
|
+
}, onMouseDown: handler, onTouchStart: handler, style: {
|
3151
3196
|
transform: column.getIsResizing() && columnResizeMode === 'onEnd'
|
3152
3197
|
? `translateX(${(columnResizeDirection === 'rtl' ? -1 : 1) *
|
3153
3198
|
((_b = getState().columnSizingInfo.deltaOffset) !== null && _b !== void 0 ? _b : 0)}px)`
|
@@ -3205,9 +3250,9 @@ const MRT_TableHeadCellSortLabel = (_a) => {
|
|
3205
3250
|
|
3206
3251
|
const MRT_TableHeadCell = (_a) => {
|
3207
3252
|
var _b, _c, _d, _f, _g, _h;
|
3208
|
-
var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
|
3253
|
+
var { header, staticColumnIndex, table } = _a, rest = __rest(_a, ["header", "staticColumnIndex", "table"]);
|
3209
3254
|
const theme = styles.useTheme();
|
3210
|
-
const { getState, options: { columnFilterDisplayMode, columnResizeDirection, columnResizeMode, enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
|
3255
|
+
const { getState, options: { columnFilterDisplayMode, columnResizeDirection, columnResizeMode, enableColumnActions, enableColumnDragging, enableColumnOrdering, enableColumnPinning, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
|
3211
3256
|
const { columnSizingInfo, density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
|
3212
3257
|
const { column } = header;
|
3213
3258
|
const { columnDef } = column;
|
@@ -3217,6 +3262,9 @@ const MRT_TableHeadCell = (_a) => {
|
|
3217
3262
|
table,
|
3218
3263
|
})), rest);
|
3219
3264
|
const { draggingBorderColor } = getMRTTheme(table, theme);
|
3265
|
+
const isColumnPinned = enableColumnPinning &&
|
3266
|
+
columnDef.columnDefType !== 'group' &&
|
3267
|
+
column.getIsPinned();
|
3220
3268
|
const showColumnActions = (enableColumnActions || columnDef.enableColumnActions) &&
|
3221
3269
|
columnDef.enableColumnActions !== false;
|
3222
3270
|
const showDragHandle = enableColumnDragging !== false &&
|
@@ -3278,7 +3326,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
3278
3326
|
? 'center'
|
3279
3327
|
: theme.direction === 'rtl'
|
3280
3328
|
? 'right'
|
3281
|
-
: 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: (node) => {
|
3329
|
+
: 'left', colSpan: header.colSpan, "data-index": staticColumnIndex, "data-pinned": !!isColumnPinned || undefined, onDragEnter: handleDragEnter, ref: (node) => {
|
3282
3330
|
if (node) {
|
3283
3331
|
tableHeadCellRefs.current[column.id] = node;
|
3284
3332
|
}
|
@@ -3362,11 +3410,14 @@ const MRT_TableHeadRow = (_a) => {
|
|
3362
3410
|
headerGroup,
|
3363
3411
|
table,
|
3364
3412
|
})), rest);
|
3365
|
-
return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, boxShadow: `4px 0 8px ${styles.alpha(theme.palette.common.black, 0.1)}`, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, top: 0 }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
|
3366
|
-
|
3367
|
-
|
3368
|
-
|
3369
|
-
|
3413
|
+
return (jsxRuntime.jsxs(TableRow__default["default"], Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, boxShadow: `4px 0 8px ${styles.alpha(theme.palette.common.black, 0.1)}`, display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, top: 0 }, parseFromValuesOrFunc(tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.sx, theme))), children: [virtualPaddingLeft ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader, staticColumnIndex) => {
|
3414
|
+
let header = headerOrVirtualHeader;
|
3415
|
+
if (columnVirtualizer) {
|
3416
|
+
staticColumnIndex = headerOrVirtualHeader
|
3417
|
+
.index;
|
3418
|
+
header = headerGroup.headers[staticColumnIndex];
|
3419
|
+
}
|
3420
|
+
return header ? (jsxRuntime.jsx(MRT_TableHeadCell, { header: header, staticColumnIndex: staticColumnIndex, table: table }, header.id)) : null;
|
3370
3421
|
}), virtualPaddingRight ? (jsxRuntime.jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
|
3371
3422
|
};
|
3372
3423
|
|
@@ -3410,7 +3461,7 @@ const MRT_ToolbarAlertBanner = (_a) => {
|
|
3410
3461
|
: '0.25rem 0.5rem',
|
3411
3462
|
}, children: [alertProps === null || alertProps === void 0 ? void 0 : alertProps.children, (alertProps === null || alertProps === void 0 ? void 0 : alertProps.children) && (selectedAlert || groupedAlert) && (jsxRuntime.jsx("br", {})), jsxRuntime.jsxs(Box__default["default"], { sx: { display: 'flex' }, children: [enableRowSelection &&
|
3412
3463
|
enableSelectAll &&
|
3413
|
-
positionToolbarAlertBanner === 'head-overlay' && (jsxRuntime.jsx(MRT_SelectCheckbox, {
|
3464
|
+
positionToolbarAlertBanner === 'head-overlay' && (jsxRuntime.jsx(MRT_SelectCheckbox, { table: table })), ' ', selectedAlert] }), selectedAlert && groupedAlert && jsxRuntime.jsx("br", {}), groupedAlert] })] })) })) }));
|
3414
3465
|
};
|
3415
3466
|
|
3416
3467
|
const MRT_TableHead = (_a) => {
|
@@ -3436,9 +3487,10 @@ const MRT_TableHead = (_a) => {
|
|
3436
3487
|
|
3437
3488
|
const MRT_Table = (_a) => {
|
3438
3489
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
3439
|
-
const { getFlatHeaders, getState, options: { columns, enableStickyHeader, enableTableFooter, enableTableHead, layoutMode, memoMode, muiTableProps, }, } = table;
|
3490
|
+
const { getFlatHeaders, getState, options: { columns, enableStickyHeader, enableTableFooter, enableTableHead, layoutMode, memoMode, muiTableProps, renderCaption, }, } = table;
|
3440
3491
|
const { columnSizing, columnSizingInfo, columnVisibility, isFullScreen } = getState();
|
3441
3492
|
const tableProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableProps, { table })), rest);
|
3493
|
+
const Caption = parseFromValuesOrFunc(renderCaption, { table });
|
3442
3494
|
const columnSizeVars = react.useMemo(() => {
|
3443
3495
|
const headers = getFlatHeaders();
|
3444
3496
|
const colSizes = {};
|
@@ -3455,7 +3507,7 @@ const MRT_Table = (_a) => {
|
|
3455
3507
|
columnVirtualizer,
|
3456
3508
|
table,
|
3457
3509
|
};
|
3458
|
-
return (jsxRuntime.jsxs(Table__default["default"], Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style), sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined }, parseFromValuesOrFunc(tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx, theme))), children: [enableTableHead && jsxRuntime.jsx(MRT_TableHead, Object.assign({}, commonTableGroupProps)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsxRuntime.jsx(Memo_MRT_TableBody, Object.assign({}, commonTableGroupProps))) : (jsxRuntime.jsx(MRT_TableBody, Object.assign({}, commonTableGroupProps))), enableTableFooter && jsxRuntime.jsx(MRT_TableFooter, Object.assign({}, commonTableGroupProps))] })));
|
3510
|
+
return (jsxRuntime.jsxs(Table__default["default"], Object.assign({ stickyHeader: enableStickyHeader || isFullScreen }, tableProps, { style: Object.assign(Object.assign({}, columnSizeVars), tableProps === null || tableProps === void 0 ? void 0 : tableProps.style), sx: (theme) => (Object.assign({ borderCollapse: 'separate', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'grid' : undefined }, parseFromValuesOrFunc(tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx, theme))), children: [!!Caption && jsxRuntime.jsx("caption", { children: Caption }), enableTableHead && jsxRuntime.jsx(MRT_TableHead, Object.assign({}, commonTableGroupProps)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsxRuntime.jsx(Memo_MRT_TableBody, Object.assign({}, commonTableGroupProps))) : (jsxRuntime.jsx(MRT_TableBody, Object.assign({}, commonTableGroupProps))), enableTableFooter && jsxRuntime.jsx(MRT_TableFooter, Object.assign({}, commonTableGroupProps))] })));
|
3459
3511
|
};
|
3460
3512
|
|
3461
3513
|
const MRT_TableLoadingOverlay = (_a) => {
|
@@ -4091,6 +4143,7 @@ exports.getIsFirstColumn = getIsFirstColumn;
|
|
4091
4143
|
exports.getIsFirstRightPinnedColumn = getIsFirstRightPinnedColumn;
|
4092
4144
|
exports.getIsLastColumn = getIsLastColumn;
|
4093
4145
|
exports.getIsLastLeftPinnedColumn = getIsLastLeftPinnedColumn;
|
4146
|
+
exports.getIsRowSelected = getIsRowSelected;
|
4094
4147
|
exports.getLeadingDisplayColumnIds = getLeadingDisplayColumnIds;
|
4095
4148
|
exports.getTotalRight = getTotalRight;
|
4096
4149
|
exports.getTrailingDisplayColumnIds = getTrailingDisplayColumnIds;
|