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.esm.js
CHANGED
@@ -212,7 +212,7 @@ const createRow = (table, originalRow, rowIndex = -1, depth = 0, subRows, parent
|
|
212
212
|
[getColumnId(col)]: '',
|
213
213
|
}))), rowIndex, depth, subRows, parentId);
|
214
214
|
|
215
|
-
function defaultDisplayColumnProps({ header, id, size
|
215
|
+
function defaultDisplayColumnProps({ header, id, size, tableOptions, }) {
|
216
216
|
const { defaultDisplayColumn, displayColumnDefOptions, localization } = tableOptions;
|
217
217
|
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 });
|
218
218
|
}
|
@@ -270,6 +270,31 @@ const getDefaultColumnOrderIds = (tableOptions) => {
|
|
270
270
|
return [...leadingDisplayCols, ...allLeafColumnDefs, ...trailingDisplayCols];
|
271
271
|
};
|
272
272
|
|
273
|
+
const parseFromValuesOrFunc = (fn, arg) => (fn instanceof Function ? fn(arg) : fn);
|
274
|
+
const getValueAndLabel = (option) => {
|
275
|
+
var _a, _b, _c;
|
276
|
+
let label = '';
|
277
|
+
let value = '';
|
278
|
+
if (option) {
|
279
|
+
if (typeof option !== 'object') {
|
280
|
+
label = option;
|
281
|
+
value = option;
|
282
|
+
}
|
283
|
+
else {
|
284
|
+
label = (_b = (_a = option.label) !== null && _a !== void 0 ? _a : option.text) !== null && _b !== void 0 ? _b : option.value;
|
285
|
+
value = (_c = option.value) !== null && _c !== void 0 ? _c : label;
|
286
|
+
}
|
287
|
+
}
|
288
|
+
return { label, value };
|
289
|
+
};
|
290
|
+
|
291
|
+
const getIsRowSelected = ({ row, table, }) => {
|
292
|
+
const { options: enableRowSelection } = table;
|
293
|
+
return (row.getIsSelected() ||
|
294
|
+
(parseFromValuesOrFunc(enableRowSelection, row) &&
|
295
|
+
row.getCanSelectSubRows() &&
|
296
|
+
row.getIsAllSubRowsSelected()));
|
297
|
+
};
|
273
298
|
const getCanRankRows = (table) => {
|
274
299
|
const { getState, options } = table;
|
275
300
|
const { enableGlobalFilterRankedResults, manualExpanding, manualFiltering, manualGrouping, manualSorting, } = options;
|
@@ -416,24 +441,6 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
416
441
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
417
442
|
};
|
418
443
|
|
419
|
-
const parseFromValuesOrFunc = (fn, arg) => (fn instanceof Function ? fn(arg) : fn);
|
420
|
-
const getValueAndLabel = (option) => {
|
421
|
-
var _a, _b, _c;
|
422
|
-
let label = '';
|
423
|
-
let value = '';
|
424
|
-
if (option) {
|
425
|
-
if (typeof option !== 'object') {
|
426
|
-
label = option;
|
427
|
-
value = option;
|
428
|
-
}
|
429
|
-
else {
|
430
|
-
label = (_b = (_a = option.label) !== null && _a !== void 0 ? _a : option.text) !== null && _b !== void 0 ? _b : option.value;
|
431
|
-
value = (_c = option.value) !== null && _c !== void 0 ? _c : label;
|
432
|
-
}
|
433
|
-
}
|
434
|
-
return { label, value };
|
435
|
-
};
|
436
|
-
|
437
444
|
const MRT_EditActionButtons = (_a) => {
|
438
445
|
var { row, table, variant = 'icon' } = _a, rest = __rest(_a, ["row", "table", "variant"]);
|
439
446
|
const { getState, options: { icons: { CancelIcon, SaveIcon }, localization, onCreatingRowCancel, onCreatingRowSave, onEditingRowCancel, onEditingRowSave, }, refs: { editInputRefs }, setCreatingRow, setEditingRow, } = table;
|
@@ -493,40 +500,58 @@ const getMRTTheme = (table, theme) => {
|
|
493
500
|
? darken(theme.palette.warning.dark, 0.25)
|
494
501
|
: lighten(theme.palette.warning.light, 0.5), menuBackgroundColor: lighten(baseBackgroundColor, 0.07), pinnedRowBackgroundColor: alpha(theme.palette.primary.main, 0.1), selectedRowBackgroundColor: alpha(theme.palette.primary.main, 0.2) }, themeOverrides);
|
495
502
|
};
|
503
|
+
const pinnedBeforeAfterStyles = {
|
504
|
+
content: '""',
|
505
|
+
height: '100%',
|
506
|
+
left: 0,
|
507
|
+
position: 'absolute',
|
508
|
+
top: 0,
|
509
|
+
width: '100%',
|
510
|
+
zIndex: -1,
|
511
|
+
};
|
512
|
+
const getCommonPinnedCellStyles = ({ column, table, theme, }) => {
|
513
|
+
const { baseBackgroundColor } = getMRTTheme(table, theme);
|
514
|
+
return {
|
515
|
+
'&[data-pinned="true"]': {
|
516
|
+
'&:before': Object.assign({ backgroundColor: alpha(darken(baseBackgroundColor, theme.palette.mode === 'dark' ? 0.05 : 0.01), 0.97), boxShadow: column
|
517
|
+
? getIsLastLeftPinnedColumn(table, column)
|
518
|
+
? `-4px 0 4px -4px ${alpha(theme.palette.grey[700], 0.5)} inset`
|
519
|
+
: getIsFirstRightPinnedColumn(column)
|
520
|
+
? `4px 0 4px -4px ${alpha(theme.palette.grey[700], 0.5)} inset`
|
521
|
+
: undefined
|
522
|
+
: undefined }, pinnedBeforeAfterStyles),
|
523
|
+
},
|
524
|
+
};
|
525
|
+
};
|
496
526
|
const getCommonMRTCellStyles = ({ column, header, table, tableCellProps, theme, }) => {
|
497
|
-
var _a, _b, _c, _d, _e, _f
|
498
|
-
const { options: { layoutMode }, } = table;
|
527
|
+
var _a, _b, _c, _d, _e, _f;
|
528
|
+
const { options: { enableColumnVirtualization, layoutMode }, } = table;
|
499
529
|
const { columnDef } = column;
|
530
|
+
const isColumnPinned = columnDef.columnDefType !== 'group' && column.getIsPinned();
|
500
531
|
const widthStyles = {
|
501
532
|
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)`,
|
502
|
-
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
|
533
|
+
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)`,
|
503
534
|
};
|
504
535
|
if (layoutMode === 'grid') {
|
505
536
|
widthStyles.flex = `${[0, false].includes(columnDef.grow)
|
506
537
|
? 0
|
507
|
-
: `var(--${header ? 'header' : 'col'}-${parseCSSVarId((
|
538
|
+
: `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`;
|
508
539
|
}
|
509
540
|
else if (layoutMode === 'grid-no-grow') {
|
510
541
|
widthStyles.flex = `${+(columnDef.grow || 0)} 0 auto`;
|
511
542
|
}
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
?
|
520
|
-
: undefined, opacity: ((_g = table.getState().draggingColumn) === null || _g === void 0 ? void 0 : _g.id) === column.id ||
|
521
|
-
((_h = table.getState().hoveredColumn) === null || _h === void 0 ? void 0 : _h.id) === column.id
|
543
|
+
const pinnedStyles = isColumnPinned
|
544
|
+
? Object.assign(Object.assign({}, getCommonPinnedCellStyles({ column, table, theme })), { left: isColumnPinned === 'left'
|
545
|
+
? `${column.getStart('left')}px`
|
546
|
+
: undefined, opacity: 0.97, position: 'sticky', right: isColumnPinned === 'right'
|
547
|
+
? `${getTotalRight(table, column)}px`
|
548
|
+
: undefined, zIndex: 1 }) : {};
|
549
|
+
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 ||
|
550
|
+
((_f = table.getState().hoveredColumn) === null || _f === void 0 ? void 0 : _f.id) === column.id
|
522
551
|
? 0.5
|
523
|
-
: 1, position:
|
524
|
-
? 'sticky'
|
525
|
-
: undefined, right: column.getIsPinned() === 'right'
|
526
|
-
? `${getTotalRight(table, column)}px`
|
527
|
-
: undefined, transition: table.options.enableColumnVirtualization
|
552
|
+
: 1, position: 'relative', transition: enableColumnVirtualization
|
528
553
|
? 'none'
|
529
|
-
: `padding 150ms ease-in-out
|
554
|
+
: `padding 150ms ease-in-out`, zIndex: 0 }, pinnedStyles), widthStyles), parseFromValuesOrFunc(tableCellProps === null || tableCellProps === void 0 ? void 0 : tableCellProps.sx, theme));
|
530
555
|
};
|
531
556
|
const getCommonToolbarStyles = ({ table, theme, }) => ({
|
532
557
|
alignItems: 'flex-start',
|
@@ -961,6 +986,7 @@ const getMRT_RowActionsColumnDef = (tableOptions) => {
|
|
961
986
|
return Object.assign({ Cell: ({ cell, row, staticRowIndex, table }) => (jsx(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, staticRowIndex: staticRowIndex, table: table })) }, defaultDisplayColumnProps({
|
962
987
|
header: 'actions',
|
963
988
|
id: 'mrt-row-actions',
|
989
|
+
size: 70,
|
964
990
|
tableOptions,
|
965
991
|
}));
|
966
992
|
};
|
@@ -1016,6 +1042,7 @@ const getMRT_RowDragColumnDef = (tableOptions) => {
|
|
1016
1042
|
return Object.assign({ Cell: ({ row, rowRef, table }) => (jsx(MRT_TableBodyRowGrabHandle, { row: row, rowRef: rowRef, table: table })), grow: false }, defaultDisplayColumnProps({
|
1017
1043
|
header: 'move',
|
1018
1044
|
id: 'mrt-row-drag',
|
1045
|
+
size: 60,
|
1019
1046
|
tableOptions,
|
1020
1047
|
}));
|
1021
1048
|
};
|
@@ -1070,6 +1097,7 @@ const MRT_ExpandButton = ({ row, staticRowIndex, table, }) => {
|
|
1070
1097
|
};
|
1071
1098
|
|
1072
1099
|
const getMRT_RowExpandColumnDef = (tableOptions) => {
|
1100
|
+
var _a;
|
1073
1101
|
if (!showRowExpandColumn(tableOptions)) {
|
1074
1102
|
return null;
|
1075
1103
|
}
|
@@ -1099,9 +1127,11 @@ const getMRT_RowExpandColumnDef = (tableOptions) => {
|
|
1099
1127
|
header: 'expand',
|
1100
1128
|
id: 'mrt-row-expand',
|
1101
1129
|
size: groupedColumnMode === 'remove'
|
1102
|
-
? defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.size
|
1130
|
+
? (_a = defaultColumn === null || defaultColumn === void 0 ? void 0 : defaultColumn.size) !== null && _a !== void 0 ? _a : 180
|
1103
1131
|
: renderDetailPanel
|
1104
|
-
?
|
1132
|
+
? enableExpandAll
|
1133
|
+
? 60
|
1134
|
+
: 70
|
1105
1135
|
: 100,
|
1106
1136
|
tableOptions,
|
1107
1137
|
}));
|
@@ -1121,6 +1151,7 @@ const getMRT_RowNumbersColumnDef = (tableOptions) => {
|
|
1121
1151
|
}, Header: () => localization.rowNumber, grow: false }, defaultDisplayColumnProps({
|
1122
1152
|
header: 'rowNumbers',
|
1123
1153
|
id: 'mrt-row-numbers',
|
1154
|
+
size: 50,
|
1124
1155
|
tableOptions,
|
1125
1156
|
}));
|
1126
1157
|
};
|
@@ -1169,15 +1200,17 @@ const getMRT_RowPinningColumnDef = (tableOptions) => {
|
|
1169
1200
|
return Object.assign({ Cell: ({ row, table }) => (jsx(MRT_TableBodyRowPinButton, { row: row, table: table })), grow: false }, defaultDisplayColumnProps({
|
1170
1201
|
header: 'pin',
|
1171
1202
|
id: 'mrt-row-pin',
|
1203
|
+
size: 60,
|
1172
1204
|
tableOptions,
|
1173
1205
|
}));
|
1174
1206
|
};
|
1175
1207
|
|
1176
1208
|
const MRT_SelectCheckbox = (_a) => {
|
1177
1209
|
var _b;
|
1178
|
-
var { row,
|
1210
|
+
var { row, staticRowIndex, table } = _a, rest = __rest(_a, ["row", "staticRowIndex", "table"]);
|
1179
1211
|
const { getState, options: { enableMultiRowSelection, enableRowPinning, localization, muiSelectAllCheckboxProps, muiSelectCheckboxProps, rowPinningDisplayMode, selectAllMode, }, } = table;
|
1180
1212
|
const { density, isLoading } = getState();
|
1213
|
+
const selectAll = !row;
|
1181
1214
|
const checkboxProps = Object.assign(Object.assign({}, (!row
|
1182
1215
|
? parseFromValuesOrFunc(muiSelectAllCheckboxProps, { table })
|
1183
1216
|
: parseFromValuesOrFunc(muiSelectCheckboxProps, {
|
@@ -1215,10 +1248,7 @@ const MRT_SelectCheckbox = (_a) => {
|
|
1215
1248
|
};
|
1216
1249
|
const commonProps = Object.assign(Object.assign({ 'aria-label': selectAll
|
1217
1250
|
? localization.toggleSelectAll
|
1218
|
-
: localization.toggleSelectRow, checked: selectAll
|
1219
|
-
? allRowsSelected
|
1220
|
-
: (row === null || row === void 0 ? void 0 : row.getIsSelected()) ||
|
1221
|
-
((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: {
|
1251
|
+
: 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: {
|
1222
1252
|
'aria-label': selectAll
|
1223
1253
|
? localization.toggleSelectAll
|
1224
1254
|
: localization.toggleSelectRow,
|
@@ -1243,10 +1273,11 @@ const getMRT_RowSelectColumnDef = (tableOptions) => {
|
|
1243
1273
|
}
|
1244
1274
|
const { enableMultiRowSelection, enableSelectAll } = tableOptions;
|
1245
1275
|
return Object.assign({ Cell: ({ row, staticRowIndex, table }) => (jsx(MRT_SelectCheckbox, { row: row, staticRowIndex: staticRowIndex, table: table })), Header: enableSelectAll && enableMultiRowSelection
|
1246
|
-
? ({ table }) => jsx(MRT_SelectCheckbox, {
|
1276
|
+
? ({ table }) => jsx(MRT_SelectCheckbox, { table: table })
|
1247
1277
|
: undefined, grow: false }, defaultDisplayColumnProps({
|
1248
1278
|
header: 'select',
|
1249
1279
|
id: 'mrt-row-select',
|
1280
|
+
size: enableSelectAll ? 60 : 70,
|
1250
1281
|
tableOptions,
|
1251
1282
|
}));
|
1252
1283
|
};
|
@@ -1401,25 +1432,27 @@ const MRT_DefaultDisplayColumn = {
|
|
1401
1432
|
};
|
1402
1433
|
const useMRT_TableOptions = (_a) => {
|
1403
1434
|
var _b;
|
1404
|
-
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"]);
|
1435
|
+
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"]);
|
1405
1436
|
const theme = useTheme();
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1437
|
+
icons = useMemo(() => (Object.assign(Object.assign({}, MRT_Default_Icons), icons)), [icons]);
|
1438
|
+
localization = useMemo(() => (Object.assign(Object.assign({}, MRT_Localization_EN), localization)), [localization]);
|
1439
|
+
aggregationFns = useMemo(() => (Object.assign(Object.assign({}, MRT_AggregationFns), aggregationFns)), []);
|
1440
|
+
filterFns = useMemo(() => (Object.assign(Object.assign({}, MRT_FilterFns), filterFns)), []);
|
1441
|
+
sortingFns = useMemo(() => (Object.assign(Object.assign({}, MRT_SortingFns), sortingFns)), []);
|
1442
|
+
defaultColumn = useMemo(() => (Object.assign(Object.assign({}, MRT_DefaultColumn), defaultColumn)), [defaultColumn]);
|
1443
|
+
defaultDisplayColumn = useMemo(() => (Object.assign(Object.assign({}, MRT_DefaultDisplayColumn), defaultDisplayColumn)), [defaultDisplayColumn]);
|
1444
|
+
//cannot be changed after initialization
|
1445
|
+
[enableColumnVirtualization, enableRowVirtualization] = useMemo(() => [enableColumnVirtualization, enableRowVirtualization], []);
|
1413
1446
|
if (!columnResizeDirection) {
|
1414
1447
|
columnResizeDirection = theme.direction || 'ltr';
|
1415
1448
|
}
|
1416
1449
|
layoutMode =
|
1417
1450
|
layoutMode || (enableColumnResizing ? 'grid-no-grow' : 'semantic');
|
1418
1451
|
if (layoutMode === 'semantic' &&
|
1419
|
-
(
|
1452
|
+
(enableRowVirtualization || enableColumnVirtualization)) {
|
1420
1453
|
layoutMode = 'grid';
|
1421
1454
|
}
|
1422
|
-
if (
|
1455
|
+
if (enableRowVirtualization) {
|
1423
1456
|
enableStickyHeader = true;
|
1424
1457
|
}
|
1425
1458
|
if (enablePagination === false && manualPagination === undefined) {
|
@@ -1431,17 +1464,22 @@ const useMRT_TableOptions = (_a) => {
|
|
1431
1464
|
manualPagination = true;
|
1432
1465
|
manualSorting = true;
|
1433
1466
|
}
|
1434
|
-
return Object.assign({ aggregationFns
|
1467
|
+
return Object.assign({ aggregationFns,
|
1468
|
+
autoResetExpanded,
|
1435
1469
|
columnFilterDisplayMode,
|
1436
1470
|
columnResizeDirection,
|
1437
1471
|
columnResizeMode,
|
1438
|
-
createDisplayMode,
|
1472
|
+
createDisplayMode,
|
1473
|
+
defaultColumn,
|
1474
|
+
defaultDisplayColumn,
|
1475
|
+
editDisplayMode,
|
1439
1476
|
enableBottomToolbar,
|
1440
1477
|
enableColumnActions,
|
1441
1478
|
enableColumnFilters,
|
1442
1479
|
enableColumnOrdering,
|
1443
1480
|
enableColumnPinning,
|
1444
1481
|
enableColumnResizing,
|
1482
|
+
enableColumnVirtualization,
|
1445
1483
|
enableDensityToggle,
|
1446
1484
|
enableExpandAll,
|
1447
1485
|
enableExpanding,
|
@@ -1457,13 +1495,19 @@ const useMRT_TableOptions = (_a) => {
|
|
1457
1495
|
enablePagination,
|
1458
1496
|
enableRowPinning,
|
1459
1497
|
enableRowSelection,
|
1498
|
+
enableRowVirtualization,
|
1460
1499
|
enableSelectAll,
|
1461
1500
|
enableSorting,
|
1462
1501
|
enableStickyHeader,
|
1463
1502
|
enableTableFooter,
|
1464
1503
|
enableTableHead,
|
1465
1504
|
enableToolbarInternalActions,
|
1466
|
-
enableTopToolbar,
|
1505
|
+
enableTopToolbar,
|
1506
|
+
filterFns,
|
1507
|
+
icons,
|
1508
|
+
layoutMode,
|
1509
|
+
localization,
|
1510
|
+
manualFiltering,
|
1467
1511
|
manualGrouping,
|
1468
1512
|
manualPagination,
|
1469
1513
|
manualSorting,
|
@@ -1477,7 +1521,8 @@ const useMRT_TableOptions = (_a) => {
|
|
1477
1521
|
positionToolbarDropZone,
|
1478
1522
|
rowNumberDisplayMode,
|
1479
1523
|
rowPinningDisplayMode,
|
1480
|
-
selectAllMode,
|
1524
|
+
selectAllMode,
|
1525
|
+
sortingFns }, rest);
|
1481
1526
|
};
|
1482
1527
|
|
1483
1528
|
const blankColProps = {
|
@@ -1767,68 +1812,60 @@ const extraIndexRangeExtractor = (range, draggingIndex) => {
|
|
1767
1812
|
};
|
1768
1813
|
|
1769
1814
|
const useMRT_ColumnVirtualizer = (table) => {
|
1770
|
-
var _a, _b, _c, _d
|
1771
|
-
const { getState, options: { columnVirtualizerInstanceRef, columnVirtualizerOptions, enableColumnPinning, enableColumnVirtualization, }, refs: { tableContainerRef }, } = table;
|
1772
|
-
const { columnPinning,
|
1815
|
+
var _a, _b, _c, _d;
|
1816
|
+
const { getLeftLeafColumns, getRightLeafColumns, getState, getVisibleLeafColumns, options: { columnVirtualizerInstanceRef, columnVirtualizerOptions, enableColumnPinning, enableColumnVirtualization, }, refs: { tableContainerRef }, } = table;
|
1817
|
+
const { columnPinning, draggingColumn } = getState();
|
1818
|
+
if (!enableColumnVirtualization)
|
1819
|
+
return undefined;
|
1773
1820
|
const columnVirtualizerProps = parseFromValuesOrFunc(columnVirtualizerOptions, {
|
1774
1821
|
table,
|
1775
1822
|
});
|
1776
|
-
const
|
1823
|
+
const visibleColumns = getVisibleLeafColumns();
|
1824
|
+
const [leftPinnedIndexes, rightPinnedIndexes] = useMemo(() => enableColumnPinning
|
1777
1825
|
? [
|
1778
|
-
|
1779
|
-
|
1780
|
-
.
|
1781
|
-
.map((c) => table.getVisibleLeafColumns().length - c.getPinnedIndex() - 1)
|
1826
|
+
getLeftLeafColumns().map((c) => c.getPinnedIndex()),
|
1827
|
+
getRightLeafColumns()
|
1828
|
+
.map((column) => visibleColumns.length - column.getPinnedIndex() - 1)
|
1782
1829
|
.sort((a, b) => a - b),
|
1783
1830
|
]
|
1784
|
-
: [[], []], [columnPinning,
|
1785
|
-
|
1786
|
-
const
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
((_f = (_e = virtualColumns[virtualColumns.length - rightPinnedIndexes.length - 1]) === null || _e === void 0 ? void 0 : _e.end) !== null && _f !== void 0 ? _f : 0) -
|
1823
|
-
(rightPinnedIndexes.length
|
1824
|
-
? columnVirtualizer.getTotalSize() -
|
1825
|
-
((_h = (_g = virtualColumns[virtualColumns.length - rightPinnedIndexes.length]) === null || _g === void 0 ? void 0 : _g.start) !== null && _h !== void 0 ? _h : 0)
|
1826
|
-
: 0);
|
1827
|
-
}
|
1828
|
-
if (columnVirtualizerInstanceRef) {
|
1829
|
-
//@ts-ignore
|
1830
|
-
columnVirtualizerInstanceRef.current = columnVirtualizer;
|
1831
|
-
}
|
1831
|
+
: [[], []], [columnPinning, enableColumnPinning]);
|
1832
|
+
const numPinnedLeft = leftPinnedIndexes.length;
|
1833
|
+
const numPinnedRight = rightPinnedIndexes.length;
|
1834
|
+
const draggingColumnIndex = useMemo(() => (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id)
|
1835
|
+
? visibleColumns.findIndex((c) => c.id === (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id))
|
1836
|
+
: undefined, [draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id]);
|
1837
|
+
const columnVirtualizer = useVirtualizer(Object.assign({ count: visibleColumns.length, estimateSize: (index) => visibleColumns[index].getSize(), getScrollElement: () => tableContainerRef.current, horizontal: true, overscan: 3, rangeExtractor: useCallback((range) => {
|
1838
|
+
const newIndexes = extraIndexRangeExtractor(range, draggingColumnIndex);
|
1839
|
+
if (!numPinnedLeft && !numPinnedRight) {
|
1840
|
+
return newIndexes;
|
1841
|
+
}
|
1842
|
+
return [
|
1843
|
+
...new Set([
|
1844
|
+
...leftPinnedIndexes,
|
1845
|
+
...newIndexes,
|
1846
|
+
...rightPinnedIndexes,
|
1847
|
+
]),
|
1848
|
+
];
|
1849
|
+
}, [leftPinnedIndexes, rightPinnedIndexes, draggingColumnIndex]) }, columnVirtualizerProps));
|
1850
|
+
const virtualColumns = columnVirtualizer.getVirtualItems();
|
1851
|
+
columnVirtualizer.virtualColumns = virtualColumns;
|
1852
|
+
const numColumns = virtualColumns.length;
|
1853
|
+
if (numColumns) {
|
1854
|
+
const totalSize = columnVirtualizer.getTotalSize();
|
1855
|
+
const leftNonPinnedStart = ((_a = virtualColumns[numPinnedLeft]) === null || _a === void 0 ? void 0 : _a.start) || 0;
|
1856
|
+
const leftNonPinnedEnd = ((_b = virtualColumns[leftPinnedIndexes.length - 1]) === null || _b === void 0 ? void 0 : _b.end) || 0;
|
1857
|
+
const rightNonPinnedStart = ((_c = virtualColumns[numColumns - numPinnedRight]) === null || _c === void 0 ? void 0 : _c.start) || 0;
|
1858
|
+
const rightNonPinnedEnd = ((_d = virtualColumns[numColumns - numPinnedRight - 1]) === null || _d === void 0 ? void 0 : _d.end) || 0;
|
1859
|
+
columnVirtualizer.virtualPaddingLeft =
|
1860
|
+
leftNonPinnedStart - leftNonPinnedEnd;
|
1861
|
+
columnVirtualizer.virtualPaddingRight =
|
1862
|
+
totalSize -
|
1863
|
+
rightNonPinnedEnd -
|
1864
|
+
(numPinnedRight ? totalSize - rightNonPinnedStart : 0);
|
1865
|
+
}
|
1866
|
+
if (columnVirtualizerInstanceRef) {
|
1867
|
+
//@ts-ignore
|
1868
|
+
columnVirtualizerInstanceRef.current = columnVirtualizer;
|
1832
1869
|
}
|
1833
1870
|
return columnVirtualizer;
|
1834
1871
|
};
|
@@ -1837,31 +1874,28 @@ const useMRT_RowVirtualizer = (table, rows) => {
|
|
1837
1874
|
var _a;
|
1838
1875
|
const { getRowModel, getState, options: { enableRowVirtualization, renderDetailPanel, rowVirtualizerInstanceRef, rowVirtualizerOptions, }, refs: { tableContainerRef }, } = table;
|
1839
1876
|
const { density, draggingRow, expanded } = getState();
|
1877
|
+
if (!enableRowVirtualization)
|
1878
|
+
return undefined;
|
1840
1879
|
const rowVirtualizerProps = parseFromValuesOrFunc(rowVirtualizerOptions, {
|
1841
1880
|
table,
|
1842
1881
|
});
|
1843
1882
|
const rowCount = (_a = rows === null || rows === void 0 ? void 0 : rows.length) !== null && _a !== void 0 ? _a : getRowModel().rows.length;
|
1844
1883
|
const normalRowHeight = density === 'compact' ? 37 : density === 'comfortable' ? 58 : 73;
|
1845
|
-
const rowVirtualizer =
|
1846
|
-
|
1847
|
-
?
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
rowVirtualizer.virtualRows = virtualRows;
|
1861
|
-
if (rowVirtualizerInstanceRef) {
|
1862
|
-
//@ts-ignore
|
1863
|
-
rowVirtualizerInstanceRef.current = rowVirtualizer;
|
1864
|
-
}
|
1884
|
+
const rowVirtualizer = useVirtualizer(Object.assign({ count: renderDetailPanel ? rowCount * 2 : rowCount, estimateSize: (index) => renderDetailPanel && index % 2 === 1
|
1885
|
+
? expanded === true
|
1886
|
+
? 100
|
1887
|
+
: 0
|
1888
|
+
: normalRowHeight, getScrollElement: () => tableContainerRef.current, measureElement: typeof window !== 'undefined' &&
|
1889
|
+
navigator.userAgent.indexOf('Firefox') === -1
|
1890
|
+
? (element) => element === null || element === void 0 ? void 0 : element.getBoundingClientRect().height
|
1891
|
+
: undefined, overscan: 4, rangeExtractor: useCallback((range) => {
|
1892
|
+
var _a;
|
1893
|
+
return extraIndexRangeExtractor(range, (_a = draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.index) !== null && _a !== void 0 ? _a : 0);
|
1894
|
+
}, [draggingRow]) }, rowVirtualizerProps));
|
1895
|
+
rowVirtualizer.virtualRows = rowVirtualizer.getVirtualItems();
|
1896
|
+
if (rowVirtualizerInstanceRef) {
|
1897
|
+
//@ts-ignore
|
1898
|
+
rowVirtualizerInstanceRef.current = rowVirtualizer;
|
1865
1899
|
}
|
1866
1900
|
return rowVirtualizer;
|
1867
1901
|
};
|
@@ -2035,10 +2069,9 @@ const MRT_EditCellTextField = (_a) => {
|
|
2035
2069
|
const { column, row } = cell;
|
2036
2070
|
const { columnDef } = column;
|
2037
2071
|
const { creatingRow, editingRow } = getState();
|
2038
|
-
const { editSelectOptions } = columnDef;
|
2072
|
+
const { editSelectOptions, editVariant } = columnDef;
|
2039
2073
|
const isCreating = (creatingRow === null || creatingRow === void 0 ? void 0 : creatingRow.id) === row.id;
|
2040
2074
|
const isEditing = (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) === row.id;
|
2041
|
-
const isSelectEdit = columnDef.editVariant === 'select';
|
2042
2075
|
const [value, setValue] = useState(() => cell.getValue());
|
2043
2076
|
const textFieldProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiEditTextFieldProps, {
|
2044
2077
|
cell,
|
@@ -2057,6 +2090,7 @@ const MRT_EditCellTextField = (_a) => {
|
|
2057
2090
|
row,
|
2058
2091
|
table,
|
2059
2092
|
});
|
2093
|
+
const isSelectEdit = editVariant === 'select' || (textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.select);
|
2060
2094
|
const saveInputValueToRowCache = (newValue) => {
|
2061
2095
|
//@ts-ignore
|
2062
2096
|
row._valuesCache[column.id] = newValue;
|
@@ -2071,7 +2105,7 @@ const MRT_EditCellTextField = (_a) => {
|
|
2071
2105
|
var _a;
|
2072
2106
|
(_a = textFieldProps.onChange) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, event);
|
2073
2107
|
setValue(event.target.value);
|
2074
|
-
if (
|
2108
|
+
if (isSelectEdit) {
|
2075
2109
|
saveInputValueToRowCache(event.target.value);
|
2076
2110
|
}
|
2077
2111
|
};
|
@@ -2124,9 +2158,9 @@ const MRT_EditCellTextField = (_a) => {
|
|
2124
2158
|
|
2125
2159
|
const MRT_TableBodyCell = (_a) => {
|
2126
2160
|
var _b, _c, _d, _e, _f;
|
2127
|
-
var { cell, measureElement, numRows, rowRef, staticRowIndex, table
|
2161
|
+
var { cell, measureElement, numRows, rowRef, staticColumnIndex, staticRowIndex, table } = _a, rest = __rest(_a, ["cell", "measureElement", "numRows", "rowRef", "staticColumnIndex", "staticRowIndex", "table"]);
|
2128
2162
|
const theme = useTheme();
|
2129
|
-
const { getState, options: { columnResizeDirection, columnResizeMode, createDisplayMode, editDisplayMode, enableClickToCopy, enableColumnOrdering, enableEditing, enableGrouping, layoutMode, muiSkeletonProps, muiTableBodyCellProps, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
|
2163
|
+
const { getState, options: { columnResizeDirection, columnResizeMode, createDisplayMode, editDisplayMode, enableClickToCopy, enableColumnOrdering, enableColumnPinning, enableEditing, enableGrouping, layoutMode, muiSkeletonProps, muiTableBodyCellProps, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
|
2130
2164
|
const { columnSizingInfo, creatingRow, density, draggingColumn, draggingRow, editingCell, editingRow, hoveredColumn, hoveredRow, isLoading, showSkeletons, } = getState();
|
2131
2165
|
const { column, row } = cell;
|
2132
2166
|
const { columnDef } = column;
|
@@ -2197,6 +2231,9 @@ const MRT_TableBodyCell = (_a) => {
|
|
2197
2231
|
hoveredRow,
|
2198
2232
|
staticRowIndex,
|
2199
2233
|
]);
|
2234
|
+
const isColumnPinned = enableColumnPinning &&
|
2235
|
+
columnDef.columnDefType !== 'group' &&
|
2236
|
+
column.getIsPinned();
|
2200
2237
|
const isEditable = !cell.getIsPlaceholder() &&
|
2201
2238
|
parseFromValuesOrFunc(enableEditing, row) &&
|
2202
2239
|
parseFromValuesOrFunc(columnDef.enableEditing, row) !== false;
|
@@ -2236,7 +2273,7 @@ const MRT_TableBodyCell = (_a) => {
|
|
2236
2273
|
cell,
|
2237
2274
|
table,
|
2238
2275
|
};
|
2239
|
-
return (jsx(TableCell, Object.assign({ align: theme.direction === 'rtl' ? 'right' : 'left', "data-index":
|
2276
|
+
return (jsx(TableCell, Object.assign({ align: theme.direction === 'rtl' ? 'right' : 'left', "data-index": staticColumnIndex, "data-pinned": !!isColumnPinned || undefined, ref: (node) => {
|
2240
2277
|
if (node) {
|
2241
2278
|
measureElement === null || measureElement === void 0 ? void 0 : measureElement(node);
|
2242
2279
|
}
|
@@ -2318,8 +2355,10 @@ const MRT_TableBodyRow = ({ columnVirtualizer, numRows, pinnedRowIds, row, rowVi
|
|
2318
2355
|
const theme = useTheme();
|
2319
2356
|
const { getState, options: { enableRowOrdering, enableRowPinning, enableStickyFooter, enableStickyHeader, layoutMode, memoMode, muiTableBodyRowProps, renderDetailPanel, rowPinningDisplayMode, }, refs: { tableFooterRef, tableHeadRef }, setHoveredRow, } = table;
|
2320
2357
|
const { density, draggingColumn, draggingRow, editingCell, editingRow, hoveredRow, isFullScreen, rowPinning, } = getState();
|
2358
|
+
const visibleCells = row.getVisibleCells();
|
2321
2359
|
const { virtualColumns, virtualPaddingLeft, virtualPaddingRight } = columnVirtualizer !== null && columnVirtualizer !== void 0 ? columnVirtualizer : {};
|
2322
|
-
const
|
2360
|
+
const isRowSelected = getIsRowSelected({ row, table });
|
2361
|
+
const isRowPinned = enableRowPinning && row.getIsPinned();
|
2323
2362
|
const isDraggingRow = (draggingRow === null || draggingRow === void 0 ? void 0 : draggingRow.id) === row.id;
|
2324
2363
|
const isHoveredRow = (hoveredRow === null || hoveredRow === void 0 ? void 0 : hoveredRow.id) === row.id;
|
2325
2364
|
const tableRowProps = parseFromValuesOrFunc(muiTableBodyRowProps, {
|
@@ -2355,47 +2394,49 @@ const MRT_TableBodyRow = ({ columnVirtualizer, numRows, pinnedRowIds, row, rowVi
|
|
2355
2394
|
};
|
2356
2395
|
const rowRef = useRef(null);
|
2357
2396
|
const { baseBackgroundColor, pinnedRowBackgroundColor, selectedRowBackgroundColor, } = getMRTTheme(table, theme);
|
2358
|
-
|
2359
|
-
|
2360
|
-
|
2397
|
+
const cellHighlightColor = isRowSelected
|
2398
|
+
? selectedRowBackgroundColor
|
2399
|
+
: isRowPinned
|
2400
|
+
? pinnedRowBackgroundColor
|
2401
|
+
: undefined;
|
2402
|
+
const cellHighlightColorHover = (tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.hover) !== false
|
2403
|
+
? isRowSelected
|
2404
|
+
? cellHighlightColor
|
2405
|
+
: theme.palette.mode === 'dark'
|
2406
|
+
? `${lighten(baseBackgroundColor, 0.3)}`
|
2407
|
+
: `${darken(baseBackgroundColor, 0.3)}`
|
2408
|
+
: undefined;
|
2409
|
+
return (jsxs(Fragment, { children: [jsxs(TableRow, Object.assign({ "data-index": renderDetailPanel ? staticRowIndex * 2 : staticRowIndex, "data-pinned": !!isRowPinned || undefined, "data-selected": isRowSelected || undefined, onDragEnter: handleDragEnter, ref: (node) => {
|
2361
2410
|
if (node) {
|
2362
2411
|
rowRef.current = node;
|
2363
2412
|
rowVirtualizer === null || rowVirtualizer === void 0 ? void 0 : rowVirtualizer.measureElement(node);
|
2364
2413
|
}
|
2365
|
-
}, selected:
|
2414
|
+
}, selected: isRowSelected }, tableRowProps, { style: Object.assign({ transform: virtualRow
|
2366
2415
|
? `translateY(${virtualRow.start}px)`
|
2367
2416
|
: undefined }, tableRowProps === null || tableRowProps === void 0 ? void 0 : tableRowProps.style), sx: (theme) => (Object.assign({ '&:hover td': {
|
2368
|
-
|
2369
|
-
|
2370
|
-
|
2371
|
-
|
2372
|
-
? `${lighten(baseBackgroundColor, 0.05)}`
|
2373
|
-
: `${darken(baseBackgroundColor, 0.05)}`
|
2374
|
-
: undefined,
|
2375
|
-
}, backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isPinned
|
2417
|
+
'&:after': Object.assign({ backgroundColor: cellHighlightColorHover
|
2418
|
+
? alpha(cellHighlightColorHover, 0.3)
|
2419
|
+
: undefined }, pinnedBeforeAfterStyles),
|
2420
|
+
}, backgroundColor: `${baseBackgroundColor} !important`, bottom: !virtualRow && bottomPinnedIndex !== undefined && isRowPinned
|
2376
2421
|
? `${bottomPinnedIndex * rowHeight +
|
2377
2422
|
(enableStickyFooter ? tableFooterHeight - 1 : 0)}px`
|
2378
|
-
: undefined, boxSizing: 'border-box', display: (layoutMode === null || layoutMode === void 0 ? void 0 : layoutMode.startsWith('grid')) ? 'flex' : undefined, opacity:
|
2423
|
+
: 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
|
2379
2424
|
? 'absolute'
|
2380
|
-
: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
|
2425
|
+
: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned
|
2381
2426
|
? 'sticky'
|
2382
|
-
: undefined, td: {
|
2383
|
-
backgroundColor: row.getIsSelected()
|
2384
|
-
? selectedRowBackgroundColor
|
2385
|
-
: isPinned
|
2386
|
-
? pinnedRowBackgroundColor
|
2387
|
-
: undefined,
|
2388
|
-
}, top: virtualRow
|
2427
|
+
: undefined, td: Object.assign({ '&:after': Object.assign({ backgroundColor: cellHighlightColor }, pinnedBeforeAfterStyles) }, getCommonPinnedCellStyles({ table, theme })), top: virtualRow
|
2389
2428
|
? 0
|
2390
|
-
: topPinnedIndex !== undefined &&
|
2429
|
+
: topPinnedIndex !== undefined && isRowPinned
|
2391
2430
|
? `${topPinnedIndex * rowHeight +
|
2392
2431
|
(enableStickyHeader || isFullScreen ? tableHeadHeight - 1 : 0)}px`
|
2393
|
-
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', zIndex: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) &&
|
2432
|
+
: undefined, transition: virtualRow ? 'none' : 'all 150ms ease-in-out', width: '100%', zIndex: (rowPinningDisplayMode === null || rowPinningDisplayMode === void 0 ? void 0 : rowPinningDisplayMode.includes('sticky')) && isRowPinned
|
2394
2433
|
? 2
|
2395
|
-
: undefined }, sx)), children: [virtualPaddingLeft ? (jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns :
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2434
|
+
: undefined }, sx)), children: [virtualPaddingLeft ? (jsx("td", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : visibleCells).map((cellOrVirtualCell, staticColumnIndex) => {
|
2435
|
+
let cell = cellOrVirtualCell;
|
2436
|
+
if (columnVirtualizer) {
|
2437
|
+
staticColumnIndex = cellOrVirtualCell.index;
|
2438
|
+
cell = visibleCells[staticColumnIndex];
|
2439
|
+
}
|
2399
2440
|
const props = {
|
2400
2441
|
cell,
|
2401
2442
|
measureElement: !isDraggingRow && !isHoveredRow
|
@@ -2403,11 +2444,9 @@ const MRT_TableBodyRow = ({ columnVirtualizer, numRows, pinnedRowIds, row, rowVi
|
|
2403
2444
|
: undefined,
|
2404
2445
|
numRows,
|
2405
2446
|
rowRef,
|
2447
|
+
staticColumnIndex,
|
2406
2448
|
staticRowIndex,
|
2407
2449
|
table,
|
2408
|
-
virtualColumnIndex: columnVirtualizer
|
2409
|
-
? cellOrVirtualCell.index
|
2410
|
-
: undefined,
|
2411
2450
|
};
|
2412
2451
|
return cell ? (memoMode === 'cells' &&
|
2413
2452
|
cell.column.columnDef.columnDefType === 'data' &&
|
@@ -2466,6 +2505,7 @@ const MRT_TableBody = (_a) => {
|
|
2466
2505
|
}, children: globalFilter || columnFilters.length
|
2467
2506
|
? localization.noResultsFound
|
2468
2507
|
: localization.noRecordsToDisplay })) }) })) : (jsx(Fragment, { children: (virtualRows !== null && virtualRows !== void 0 ? virtualRows : rows).map((rowOrVirtualRow, staticRowIndex) => {
|
2508
|
+
let row = rowOrVirtualRow;
|
2469
2509
|
if (rowVirtualizer) {
|
2470
2510
|
if (renderDetailPanel) {
|
2471
2511
|
if (rowOrVirtualRow.index % 2 === 1) {
|
@@ -2478,10 +2518,8 @@ const MRT_TableBody = (_a) => {
|
|
2478
2518
|
else {
|
2479
2519
|
staticRowIndex = rowOrVirtualRow.index;
|
2480
2520
|
}
|
2521
|
+
row = rows[staticRowIndex];
|
2481
2522
|
}
|
2482
|
-
const row = rowVirtualizer
|
2483
|
-
? rows[staticRowIndex]
|
2484
|
-
: rowOrVirtualRow;
|
2485
2523
|
const props = Object.assign(Object.assign({}, commonRowProps), { pinnedRowIds,
|
2486
2524
|
row,
|
2487
2525
|
rowVirtualizer,
|
@@ -2501,20 +2539,23 @@ const Memo_MRT_TableBody = memo(MRT_TableBody, (prev, next) => prev.table.option
|
|
2501
2539
|
|
2502
2540
|
const MRT_TableFooterCell = (_a) => {
|
2503
2541
|
var _b, _c, _d;
|
2504
|
-
var { footer, table } = _a, rest = __rest(_a, ["footer", "table"]);
|
2542
|
+
var { footer, staticColumnIndex, table } = _a, rest = __rest(_a, ["footer", "staticColumnIndex", "table"]);
|
2505
2543
|
const theme = useTheme();
|
2506
|
-
const { getState, options: { layoutMode, muiTableFooterCellProps }, } = table;
|
2544
|
+
const { getState, options: { enableColumnPinning, layoutMode, muiTableFooterCellProps }, } = table;
|
2507
2545
|
const { density } = getState();
|
2508
2546
|
const { column } = footer;
|
2509
2547
|
const { columnDef } = column;
|
2510
2548
|
const { columnDefType } = columnDef;
|
2549
|
+
const isColumnPinned = enableColumnPinning &&
|
2550
|
+
columnDef.columnDefType !== 'group' &&
|
2551
|
+
column.getIsPinned();
|
2511
2552
|
const args = { column, table };
|
2512
2553
|
const tableCellProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableFooterCellProps, args)), parseFromValuesOrFunc(columnDef.muiTableFooterCellProps, args)), rest);
|
2513
2554
|
return (jsx(TableCell, Object.assign({ align: columnDefType === 'group'
|
2514
2555
|
? 'center'
|
2515
2556
|
: theme.direction === 'rtl'
|
2516
2557
|
? 'right'
|
2517
|
-
: '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'
|
2558
|
+
: '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'
|
2518
2559
|
? '0.5rem'
|
2519
2560
|
: density === 'comfortable'
|
2520
2561
|
? '1rem'
|
@@ -2546,11 +2587,14 @@ const MRT_TableFooterRow = (_a) => {
|
|
2546
2587
|
footerGroup,
|
2547
2588
|
table,
|
2548
2589
|
})), rest);
|
2549
|
-
return (jsxs(TableRow, 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 ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter) => {
|
2550
|
-
|
2551
|
-
|
2552
|
-
|
2553
|
-
|
2590
|
+
return (jsxs(TableRow, 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 ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : footerGroup.headers).map((footerOrVirtualFooter, staticColumnIndex) => {
|
2591
|
+
let footer = footerOrVirtualFooter;
|
2592
|
+
if (columnVirtualizer) {
|
2593
|
+
staticColumnIndex = footerOrVirtualFooter
|
2594
|
+
.index;
|
2595
|
+
footer = footerGroup.headers[staticColumnIndex];
|
2596
|
+
}
|
2597
|
+
return footer ? (jsx(MRT_TableFooterCell, { footer: footer, staticColumnIndex: staticColumnIndex, table: table }, footer.id)) : null;
|
2554
2598
|
}), virtualPaddingRight ? (jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
|
2555
2599
|
};
|
2556
2600
|
|
@@ -3049,6 +3093,7 @@ const MRT_TableHeadCellResizeHandle = (_a) => {
|
|
3049
3093
|
const { getState, options: { columnResizeDirection, columnResizeMode }, setColumnSizingInfo, } = table;
|
3050
3094
|
const { density } = getState();
|
3051
3095
|
const { column } = header;
|
3096
|
+
const handler = header.getResizeHandler();
|
3052
3097
|
const mx = density === 'compact'
|
3053
3098
|
? '-8px'
|
3054
3099
|
: density === 'comfortable'
|
@@ -3058,7 +3103,7 @@ const MRT_TableHeadCellResizeHandle = (_a) => {
|
|
3058
3103
|
return (jsx(Box, { className: "Mui-TableHeadCell-ResizeHandle-Wrapper", onDoubleClick: () => {
|
3059
3104
|
setColumnSizingInfo((old) => (Object.assign(Object.assign({}, old), { isResizingColumn: false })));
|
3060
3105
|
column.resetSize();
|
3061
|
-
}, onMouseDown:
|
3106
|
+
}, onMouseDown: handler, onTouchStart: handler, style: {
|
3062
3107
|
transform: column.getIsResizing() && columnResizeMode === 'onEnd'
|
3063
3108
|
? `translateX(${(columnResizeDirection === 'rtl' ? -1 : 1) *
|
3064
3109
|
((_b = getState().columnSizingInfo.deltaOffset) !== null && _b !== void 0 ? _b : 0)}px)`
|
@@ -3116,9 +3161,9 @@ const MRT_TableHeadCellSortLabel = (_a) => {
|
|
3116
3161
|
|
3117
3162
|
const MRT_TableHeadCell = (_a) => {
|
3118
3163
|
var _b, _c, _d, _f, _g, _h;
|
3119
|
-
var { header, table } = _a, rest = __rest(_a, ["header", "table"]);
|
3164
|
+
var { header, staticColumnIndex, table } = _a, rest = __rest(_a, ["header", "staticColumnIndex", "table"]);
|
3120
3165
|
const theme = useTheme();
|
3121
|
-
const { getState, options: { columnFilterDisplayMode, columnResizeDirection, columnResizeMode, enableColumnActions, enableColumnDragging, enableColumnOrdering, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
|
3166
|
+
const { getState, options: { columnFilterDisplayMode, columnResizeDirection, columnResizeMode, enableColumnActions, enableColumnDragging, enableColumnOrdering, enableColumnPinning, enableGrouping, enableMultiSort, layoutMode, muiTableHeadCellProps, }, refs: { tableHeadCellRefs }, setHoveredColumn, } = table;
|
3122
3167
|
const { columnSizingInfo, density, draggingColumn, grouping, hoveredColumn, showColumnFilters, } = getState();
|
3123
3168
|
const { column } = header;
|
3124
3169
|
const { columnDef } = column;
|
@@ -3128,6 +3173,9 @@ const MRT_TableHeadCell = (_a) => {
|
|
3128
3173
|
table,
|
3129
3174
|
})), rest);
|
3130
3175
|
const { draggingBorderColor } = getMRTTheme(table, theme);
|
3176
|
+
const isColumnPinned = enableColumnPinning &&
|
3177
|
+
columnDef.columnDefType !== 'group' &&
|
3178
|
+
column.getIsPinned();
|
3131
3179
|
const showColumnActions = (enableColumnActions || columnDef.enableColumnActions) &&
|
3132
3180
|
columnDef.enableColumnActions !== false;
|
3133
3181
|
const showDragHandle = enableColumnDragging !== false &&
|
@@ -3189,7 +3237,7 @@ const MRT_TableHeadCell = (_a) => {
|
|
3189
3237
|
? 'center'
|
3190
3238
|
: theme.direction === 'rtl'
|
3191
3239
|
? 'right'
|
3192
|
-
: 'left', colSpan: header.colSpan, onDragEnter: handleDragEnter, ref: (node) => {
|
3240
|
+
: 'left', colSpan: header.colSpan, "data-index": staticColumnIndex, "data-pinned": !!isColumnPinned || undefined, onDragEnter: handleDragEnter, ref: (node) => {
|
3193
3241
|
if (node) {
|
3194
3242
|
tableHeadCellRefs.current[column.id] = node;
|
3195
3243
|
}
|
@@ -3273,11 +3321,14 @@ const MRT_TableHeadRow = (_a) => {
|
|
3273
3321
|
headerGroup,
|
3274
3322
|
table,
|
3275
3323
|
})), rest);
|
3276
|
-
return (jsxs(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, boxShadow: `4px 0 8px ${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 ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader) => {
|
3277
|
-
|
3278
|
-
|
3279
|
-
|
3280
|
-
|
3324
|
+
return (jsxs(TableRow, Object.assign({}, tableRowProps, { sx: (theme) => (Object.assign({ backgroundColor: getMRTTheme(table, theme).baseBackgroundColor, boxShadow: `4px 0 8px ${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 ? (jsx("th", { style: { display: 'flex', width: virtualPaddingLeft } })) : null, (virtualColumns !== null && virtualColumns !== void 0 ? virtualColumns : headerGroup.headers).map((headerOrVirtualHeader, staticColumnIndex) => {
|
3325
|
+
let header = headerOrVirtualHeader;
|
3326
|
+
if (columnVirtualizer) {
|
3327
|
+
staticColumnIndex = headerOrVirtualHeader
|
3328
|
+
.index;
|
3329
|
+
header = headerGroup.headers[staticColumnIndex];
|
3330
|
+
}
|
3331
|
+
return header ? (jsx(MRT_TableHeadCell, { header: header, staticColumnIndex: staticColumnIndex, table: table }, header.id)) : null;
|
3281
3332
|
}), virtualPaddingRight ? (jsx("th", { style: { display: 'flex', width: virtualPaddingRight } })) : null] })));
|
3282
3333
|
};
|
3283
3334
|
|
@@ -3321,7 +3372,7 @@ const MRT_ToolbarAlertBanner = (_a) => {
|
|
3321
3372
|
: '0.25rem 0.5rem',
|
3322
3373
|
}, children: [alertProps === null || alertProps === void 0 ? void 0 : alertProps.children, (alertProps === null || alertProps === void 0 ? void 0 : alertProps.children) && (selectedAlert || groupedAlert) && (jsx("br", {})), jsxs(Box, { sx: { display: 'flex' }, children: [enableRowSelection &&
|
3323
3374
|
enableSelectAll &&
|
3324
|
-
positionToolbarAlertBanner === 'head-overlay' && (jsx(MRT_SelectCheckbox, {
|
3375
|
+
positionToolbarAlertBanner === 'head-overlay' && (jsx(MRT_SelectCheckbox, { table: table })), ' ', selectedAlert] }), selectedAlert && groupedAlert && jsx("br", {}), groupedAlert] })] })) })) }));
|
3325
3376
|
};
|
3326
3377
|
|
3327
3378
|
const MRT_TableHead = (_a) => {
|
@@ -3347,9 +3398,10 @@ const MRT_TableHead = (_a) => {
|
|
3347
3398
|
|
3348
3399
|
const MRT_Table = (_a) => {
|
3349
3400
|
var { table } = _a, rest = __rest(_a, ["table"]);
|
3350
|
-
const { getFlatHeaders, getState, options: { columns, enableStickyHeader, enableTableFooter, enableTableHead, layoutMode, memoMode, muiTableProps, }, } = table;
|
3401
|
+
const { getFlatHeaders, getState, options: { columns, enableStickyHeader, enableTableFooter, enableTableHead, layoutMode, memoMode, muiTableProps, renderCaption, }, } = table;
|
3351
3402
|
const { columnSizing, columnSizingInfo, columnVisibility, isFullScreen } = getState();
|
3352
3403
|
const tableProps = Object.assign(Object.assign({}, parseFromValuesOrFunc(muiTableProps, { table })), rest);
|
3404
|
+
const Caption = parseFromValuesOrFunc(renderCaption, { table });
|
3353
3405
|
const columnSizeVars = useMemo(() => {
|
3354
3406
|
const headers = getFlatHeaders();
|
3355
3407
|
const colSizes = {};
|
@@ -3366,7 +3418,7 @@ const MRT_Table = (_a) => {
|
|
3366
3418
|
columnVirtualizer,
|
3367
3419
|
table,
|
3368
3420
|
};
|
3369
|
-
return (jsxs(Table, 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 && jsx(MRT_TableHead, Object.assign({}, commonTableGroupProps)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsx(Memo_MRT_TableBody, Object.assign({}, commonTableGroupProps))) : (jsx(MRT_TableBody, Object.assign({}, commonTableGroupProps))), enableTableFooter && jsx(MRT_TableFooter, Object.assign({}, commonTableGroupProps))] })));
|
3421
|
+
return (jsxs(Table, 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 && jsx("caption", { children: Caption }), enableTableHead && jsx(MRT_TableHead, Object.assign({}, commonTableGroupProps)), memoMode === 'table-body' || columnSizingInfo.isResizingColumn ? (jsx(Memo_MRT_TableBody, Object.assign({}, commonTableGroupProps))) : (jsx(MRT_TableBody, Object.assign({}, commonTableGroupProps))), enableTableFooter && jsx(MRT_TableFooter, Object.assign({}, commonTableGroupProps))] })));
|
3370
3422
|
};
|
3371
3423
|
|
3372
3424
|
const MRT_TableLoadingOverlay = (_a) => {
|
@@ -3922,5 +3974,5 @@ const MaterialReactTable = (props) => {
|
|
3922
3974
|
return jsx(MRT_TablePaper, { table: table });
|
3923
3975
|
};
|
3924
3976
|
|
3925
|
-
export { MRT_AggregationFns, MRT_BottomToolbar, MRT_ColumnActionMenu, MRT_ColumnPinningButtons, MRT_CopyButton, MRT_DefaultColumn, MRT_DefaultDisplayColumn, MRT_EditActionButtons, MRT_EditCellTextField, MRT_EditRowModal, MRT_ExpandAllButton, MRT_ExpandButton, MRT_FilterCheckbox, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FilterRangeFields, MRT_FilterRangeSlider, MRT_FilterTextField, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_LinearProgressBar, MRT_RowActionMenu, MRT_RowPinButton, MRT_SelectCheckbox, MRT_ShowHideColumnsButton, MRT_ShowHideColumnsMenu, MRT_ShowHideColumnsMenuItems, MRT_SortingFns, MRT_Table, MRT_TableBody, MRT_TableBodyCell, MRT_TableBodyCellValue, MRT_TableBodyRow, MRT_TableBodyRowGrabHandle, MRT_TableBodyRowPinButton, MRT_TableContainer, MRT_TableDetailPanel, MRT_TableFooter, MRT_TableFooterCell, MRT_TableFooterRow, MRT_TableHead, MRT_TableHeadCell, MRT_TableHeadCellColumnActionsButton, MRT_TableHeadCellFilterContainer, MRT_TableHeadCellFilterLabel, MRT_TableHeadCellGrabHandle, MRT_TableHeadCellResizeHandle, MRT_TableHeadCellSortLabel, MRT_TableHeadRow, MRT_TableLoadingOverlay, MRT_TablePagination, MRT_TablePaper, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleFullScreenButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable, Memo_MRT_TableBody, Memo_MRT_TableBodyCell, Memo_MRT_TableBodyRow, commonListItemStyles, commonMenuItemStyles, createMRTColumnHelper, createRow, defaultDisplayColumnProps, flexRender, getAllLeafColumnDefs, getCanRankRows, getColumnId, getDefaultColumnFilterFn, getDefaultColumnOrderIds, getIsFirstColumn, getIsFirstRightPinnedColumn, getIsLastColumn, getIsLastLeftPinnedColumn, getLeadingDisplayColumnIds, getTotalRight, getTrailingDisplayColumnIds, mrtFilterOptions, prepareColumns, rankGlobalFuzzy, reorderColumn, showRowActionsColumn, showRowDragColumn, showRowExpandColumn, showRowNumbersColumn, showRowPinningColumn, showRowSelectionColumn, showRowSpacerColumn, useMRT_ColumnVirtualizer, useMRT_Effects, useMRT_RowVirtualizer, useMRT_Rows, useMRT_TableInstance, useMRT_TableOptions, useMaterialReactTable };
|
3977
|
+
export { MRT_AggregationFns, MRT_BottomToolbar, MRT_ColumnActionMenu, MRT_ColumnPinningButtons, MRT_CopyButton, MRT_DefaultColumn, MRT_DefaultDisplayColumn, MRT_EditActionButtons, MRT_EditCellTextField, MRT_EditRowModal, MRT_ExpandAllButton, MRT_ExpandButton, MRT_FilterCheckbox, MRT_FilterFns, MRT_FilterOptionMenu, MRT_FilterRangeFields, MRT_FilterRangeSlider, MRT_FilterTextField, MRT_GlobalFilterTextField, MRT_GrabHandleButton, MRT_LinearProgressBar, MRT_RowActionMenu, MRT_RowPinButton, MRT_SelectCheckbox, MRT_ShowHideColumnsButton, MRT_ShowHideColumnsMenu, MRT_ShowHideColumnsMenuItems, MRT_SortingFns, MRT_Table, MRT_TableBody, MRT_TableBodyCell, MRT_TableBodyCellValue, MRT_TableBodyRow, MRT_TableBodyRowGrabHandle, MRT_TableBodyRowPinButton, MRT_TableContainer, MRT_TableDetailPanel, MRT_TableFooter, MRT_TableFooterCell, MRT_TableFooterRow, MRT_TableHead, MRT_TableHeadCell, MRT_TableHeadCellColumnActionsButton, MRT_TableHeadCellFilterContainer, MRT_TableHeadCellFilterLabel, MRT_TableHeadCellGrabHandle, MRT_TableHeadCellResizeHandle, MRT_TableHeadCellSortLabel, MRT_TableHeadRow, MRT_TableLoadingOverlay, MRT_TablePagination, MRT_TablePaper, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleFullScreenButton, MRT_ToggleGlobalFilterButton, MRT_ToggleRowActionMenuButton, MRT_ToolbarAlertBanner, MRT_ToolbarDropZone, MRT_ToolbarInternalButtons, MRT_TopToolbar, MaterialReactTable, Memo_MRT_TableBody, Memo_MRT_TableBodyCell, Memo_MRT_TableBodyRow, commonListItemStyles, commonMenuItemStyles, createMRTColumnHelper, createRow, defaultDisplayColumnProps, flexRender, getAllLeafColumnDefs, getCanRankRows, getColumnId, getDefaultColumnFilterFn, getDefaultColumnOrderIds, getIsFirstColumn, getIsFirstRightPinnedColumn, getIsLastColumn, getIsLastLeftPinnedColumn, getIsRowSelected, getLeadingDisplayColumnIds, getTotalRight, getTrailingDisplayColumnIds, mrtFilterOptions, prepareColumns, rankGlobalFuzzy, reorderColumn, showRowActionsColumn, showRowDragColumn, showRowExpandColumn, showRowNumbersColumn, showRowPinningColumn, showRowSelectionColumn, showRowSpacerColumn, useMRT_ColumnVirtualizer, useMRT_Effects, useMRT_RowVirtualizer, useMRT_Rows, useMRT_TableInstance, useMRT_TableOptions, useMaterialReactTable };
|
3926
3978
|
//# sourceMappingURL=index.esm.js.map
|