material-react-table 0.37.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/cjs/MaterialReactTable.d.ts +18 -8
- package/dist/cjs/body/MRT_TableBodyCellValue.d.ts +8 -0
- package/dist/cjs/buttons/MRT_CopyButton.d.ts +5 -5
- package/dist/cjs/buttons/MRT_ToggleRowActionMenuButton.d.ts +2 -1
- package/dist/cjs/column.utils.d.ts +2 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +81 -61
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/MaterialReactTable.d.ts +18 -8
- package/dist/esm/body/MRT_TableBodyCellValue.d.ts +8 -0
- package/dist/esm/buttons/MRT_CopyButton.d.ts +5 -5
- package/dist/esm/buttons/MRT_ToggleRowActionMenuButton.d.ts +2 -1
- package/dist/esm/column.utils.d.ts +2 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/material-react-table.esm.js +81 -62
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/index.d.ts +26 -9
- package/package.json +4 -4
- package/src/MaterialReactTable.tsx +23 -6
- package/src/body/MRT_TableBodyCell.tsx +8 -18
- package/src/body/MRT_TableBodyCellValue.tsx +35 -0
- package/src/buttons/MRT_CopyButton.tsx +9 -5
- package/src/buttons/MRT_ToggleRowActionMenuButton.tsx +9 -4
- package/src/column.utils.ts +13 -7
- package/src/head/MRT_TableHeadCell.tsx +3 -5
- package/src/index.tsx +2 -0
- package/src/table/MRT_TableRoot.tsx +30 -16
- package/src/toolbar/MRT_BottomToolbar.tsx +5 -7
- package/src/toolbar/MRT_ToolbarAlertBanner.tsx +14 -5
- package/src/toolbar/MRT_TopToolbar.tsx +4 -4
package/README.md
CHANGED
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
<img alt="" src="https://badgen.net/npm/v/material-react-table?color=blue" />
|
|
5
5
|
</a>
|
|
6
6
|
<a href="https://npmjs.com/package/material-react-table" target="_blank">
|
|
7
|
-
<img alt="" src="https://
|
|
7
|
+
<img alt="" src="https://badgen.net/npm/dt/material-react-table?label=installs&icon=npm&color=blue" />
|
|
8
8
|
</a>
|
|
9
9
|
<a href="https://bundlephobia.com/result?p=material-react-table" target="_blank">
|
|
10
10
|
<img alt="" src="https://badgen.net/bundlephobia/minzip/material-react-table@latest?color=blue" />
|
|
11
11
|
</a>
|
|
12
12
|
<a href="https://github.com/KevinVandy/material-react-table" target="_blank">
|
|
13
|
-
<img alt="" src="https://
|
|
13
|
+
<img alt="" src="https://badgen.net/github/stars/KevinVandy/material-react-table?color=blue" />
|
|
14
|
+
</a>
|
|
15
|
+
<a href="https://github.com/KevinVandy/material-react-table/blob/main/LICENSE" target="_blank">
|
|
16
|
+
<img alt="" src="https://badgen.net/github/license/KevinVandy/material-react-table?color=blue" />
|
|
14
17
|
</a>
|
|
15
18
|
<a href="http://makeapullrequest.com" target="_blank">
|
|
16
19
|
<img alt="" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" />
|
|
@@ -29,7 +32,7 @@
|
|
|
29
32
|
|
|
30
33
|
Join the [Discord](https://discord.gg/5wqyRx6fnm) server to join in on the development discussion or ask questions
|
|
31
34
|
|
|
32
|
-
View the [Docs
|
|
35
|
+
View the [Docs Website](https://www.material-react-table.com/)
|
|
33
36
|
|
|
34
37
|
See all [Props and Options](https://www.material-react-table.com/docs/api)
|
|
35
38
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, DragEvent, MutableRefObject, ReactNode, SetStateAction } from 'react';
|
|
2
|
-
import type { AlertProps, ButtonProps, CheckboxProps, IconButtonProps, LinearProgressProps, PaperProps, SkeletonProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TextFieldProps, ToolbarProps } from '@mui/material';
|
|
2
|
+
import type { AlertProps, ButtonProps, CheckboxProps, ChipProps, IconButtonProps, LinearProgressProps, PaperProps, SkeletonProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TextFieldProps, ToolbarProps } from '@mui/material';
|
|
3
3
|
import type { Cell, Column, ColumnDef, DeepKeys, FilterFn, Header, HeaderGroup, OnChangeFn, Row, SortingFn, Table, TableOptions, TableState } from '@tanstack/react-table';
|
|
4
4
|
import type { Options as VirtualizerOptions } from 'react-virtual';
|
|
5
5
|
import { MRT_Icons } from './icons';
|
|
@@ -113,6 +113,12 @@ export declare type MRT_ColumnDef<TData extends Record<string, any> = {}> = Omit
|
|
|
113
113
|
footer: MRT_Header<TData>;
|
|
114
114
|
table: MRT_TableInstance<TData>;
|
|
115
115
|
}) => ReactNode);
|
|
116
|
+
GroupedCell?: ({ cell, column, row, table, }: {
|
|
117
|
+
cell: MRT_Cell<TData>;
|
|
118
|
+
column: MRT_Column<TData>;
|
|
119
|
+
row: MRT_Row<TData>;
|
|
120
|
+
table: MRT_TableInstance<TData>;
|
|
121
|
+
}) => ReactNode;
|
|
116
122
|
Header?: ReactNode | (({ column, header, table, }: {
|
|
117
123
|
column: MRT_Column<TData>;
|
|
118
124
|
header: MRT_Header<TData>;
|
|
@@ -292,6 +298,9 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
292
298
|
icons?: Partial<MRT_Icons>;
|
|
293
299
|
initialState?: Partial<MRT_TableState<TData>>;
|
|
294
300
|
localization?: Partial<MRT_Localization>;
|
|
301
|
+
muiBottomToolbarProps?: ToolbarProps | (({ table }: {
|
|
302
|
+
table: MRT_TableInstance<TData>;
|
|
303
|
+
}) => ToolbarProps);
|
|
295
304
|
muiExpandAllButtonProps?: IconButtonProps | (({ table }: {
|
|
296
305
|
table: MRT_TableInstance<TData>;
|
|
297
306
|
}) => IconButtonProps);
|
|
@@ -346,9 +355,6 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
346
355
|
table: MRT_TableInstance<TData>;
|
|
347
356
|
row: MRT_Row<TData>;
|
|
348
357
|
}) => TableRowProps);
|
|
349
|
-
muiTableBottomToolbarProps?: ToolbarProps | (({ table }: {
|
|
350
|
-
table: MRT_TableInstance<TData>;
|
|
351
|
-
}) => ToolbarProps);
|
|
352
358
|
muiTableContainerProps?: TableContainerProps | (({ table, }: {
|
|
353
359
|
table: MRT_TableInstance<TData>;
|
|
354
360
|
}) => TableContainerProps);
|
|
@@ -400,10 +406,13 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
400
406
|
muiTableProps?: TableProps | (({ table }: {
|
|
401
407
|
table: MRT_TableInstance<TData>;
|
|
402
408
|
}) => TableProps);
|
|
403
|
-
|
|
409
|
+
muiToolbarAlertBannerChipProps?: ChipProps | (({ table }: {
|
|
410
|
+
table: MRT_TableInstance<TData>;
|
|
411
|
+
}) => ChipProps);
|
|
412
|
+
muiToolbarAlertBannerProps?: AlertProps | (({ table }: {
|
|
404
413
|
table: MRT_TableInstance<TData>;
|
|
405
414
|
}) => AlertProps);
|
|
406
|
-
|
|
415
|
+
muiTopToolbarProps?: ToolbarProps | (({ table }: {
|
|
407
416
|
table: MRT_TableInstance<TData>;
|
|
408
417
|
}) => ToolbarProps);
|
|
409
418
|
onColumnDrop?: ({ event, draggedColumn, targetColumn, }: {
|
|
@@ -416,13 +425,13 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
416
425
|
onDensityChange?: OnChangeFn<boolean>;
|
|
417
426
|
onDraggingColumnChange?: OnChangeFn<MRT_Column<TData> | null>;
|
|
418
427
|
onDraggingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
428
|
+
onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
|
|
419
429
|
onEditingRowSave?: ({ exitEditingMode, row, table, values, }: {
|
|
420
430
|
exitEditingMode: () => void;
|
|
421
431
|
row: MRT_Row<TData>;
|
|
422
432
|
table: MRT_TableInstance<TData>;
|
|
423
433
|
values: Record<LiteralUnion<string & DeepKeys<TData>>, any>;
|
|
424
434
|
}) => Promise<void> | void;
|
|
425
|
-
onEditingCellChange?: OnChangeFn<MRT_Cell<TData> | null>;
|
|
426
435
|
onEditingRowChange?: OnChangeFn<MRT_Row<TData> | null>;
|
|
427
436
|
onFilterFnsChange?: OnChangeFn<{
|
|
428
437
|
[key: string]: MRT_FilterOption;
|
|
@@ -459,7 +468,8 @@ export declare type MaterialReactTableProps<TData extends Record<string, any> =
|
|
|
459
468
|
row: MRT_Row<TData>;
|
|
460
469
|
table: MRT_TableInstance<TData>;
|
|
461
470
|
}) => ReactNode[];
|
|
462
|
-
renderRowActions?: ({ row, table, }: {
|
|
471
|
+
renderRowActions?: ({ cell, row, table, }: {
|
|
472
|
+
cell: MRT_Cell<TData>;
|
|
463
473
|
row: MRT_Row<TData>;
|
|
464
474
|
table: MRT_TableInstance<TData>;
|
|
465
475
|
}) => ReactNode;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { MRT_Cell, MRT_TableInstance } from '..';
|
|
3
|
-
interface Props {
|
|
4
|
-
cell: MRT_Cell
|
|
3
|
+
interface Props<TData extends Record<string, any> = {}> {
|
|
4
|
+
cell: MRT_Cell<TData>;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
table: MRT_TableInstance
|
|
6
|
+
table: MRT_TableInstance<TData>;
|
|
7
7
|
}
|
|
8
|
-
export declare const MRT_CopyButton:
|
|
8
|
+
export declare const MRT_CopyButton: <TData extends Record<string, any> = {}>({ cell, children, table, }: Props<TData>) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnOrderState } from '@tanstack/react-table';
|
|
1
|
+
import { ColumnOrderState, GroupingState } from '@tanstack/react-table';
|
|
2
2
|
import { MaterialReactTableProps, MRT_Column, MRT_ColumnDef, MRT_DefinedColumnDef, MRT_DisplayColumnIds, MRT_FilterOption } from '.';
|
|
3
3
|
import { MRT_FilterFns } from './filterFns';
|
|
4
4
|
import { MRT_SortingFns } from './sortingFns';
|
|
@@ -81,6 +81,7 @@ export declare const prepareColumns: <TData extends Record<string, any> = {}>(co
|
|
|
81
81
|
basic: import("@tanstack/table-core").SortingFn<any>;
|
|
82
82
|
} & Record<string, import("@tanstack/table-core").SortingFn<any>>) => MRT_DefinedColumnDef<TData>[];
|
|
83
83
|
export declare const reorderColumn: <TData extends Record<string, any> = {}>(draggedColumn: MRT_Column<TData>, targetColumn: MRT_Column<TData>, columnOrder: ColumnOrderState) => ColumnOrderState;
|
|
84
|
+
export declare const showExpandColumn: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>, grouping?: GroupingState) => boolean;
|
|
84
85
|
export declare const getLeadingDisplayColumnIds: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => MRT_DisplayColumnIds[];
|
|
85
86
|
export declare const getTrailingDisplayColumnIds: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => (string | false | undefined)[];
|
|
86
87
|
export declare const getDefaultColumnOrderIds: <TData extends Record<string, any> = {}>(props: MaterialReactTableProps<TData>) => string[];
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ export * from './MaterialReactTable';
|
|
|
4
4
|
import type { MRT_Icons } from './icons';
|
|
5
5
|
import type { MRT_Localization } from './localization';
|
|
6
6
|
export type { MRT_Localization, MRT_Icons };
|
|
7
|
+
import { MRT_CopyButton } from './buttons/MRT_CopyButton';
|
|
7
8
|
import { MRT_FullScreenToggleButton } from './buttons/MRT_FullScreenToggleButton';
|
|
8
9
|
import { MRT_GlobalFilterTextField } from './inputs/MRT_GlobalFilterTextField';
|
|
9
10
|
import { MRT_ShowHideColumnsButton } from './buttons/MRT_ShowHideColumnsButton';
|
|
10
11
|
import { MRT_ToggleDensePaddingButton } from './buttons/MRT_ToggleDensePaddingButton';
|
|
11
12
|
import { MRT_ToggleFiltersButton } from './buttons/MRT_ToggleFiltersButton';
|
|
12
13
|
import { MRT_ToggleGlobalFilterButton } from './buttons/MRT_ToggleGlobalFilterButton';
|
|
13
|
-
export { MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_ShowHideColumnsButton, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, };
|
|
14
|
+
export { MRT_FullScreenToggleButton, MRT_GlobalFilterTextField, MRT_ShowHideColumnsButton, MRT_ToggleDensePaddingButton, MRT_ToggleFiltersButton, MRT_ToggleGlobalFilterButton, MRT_CopyButton, };
|
package/dist/cjs/index.js
CHANGED
|
@@ -529,6 +529,9 @@ const reorderColumn = (draggedColumn, targetColumn, columnOrder) => {
|
|
|
529
529
|
columnOrder.splice(columnOrder.indexOf(targetColumn.id), 0, columnOrder.splice(columnOrder.indexOf(draggedColumn.id), 1)[0]);
|
|
530
530
|
return [...columnOrder];
|
|
531
531
|
};
|
|
532
|
+
const showExpandColumn = (props, grouping) => !!(props.enableExpanding ||
|
|
533
|
+
(props.enableGrouping && (grouping === undefined || (grouping === null || grouping === void 0 ? void 0 : grouping.length))) ||
|
|
534
|
+
props.renderDetailPanel);
|
|
532
535
|
const getLeadingDisplayColumnIds = (props) => {
|
|
533
536
|
var _a;
|
|
534
537
|
return [
|
|
@@ -538,9 +541,7 @@ const getLeadingDisplayColumnIds = (props) => {
|
|
|
538
541
|
['row', 'modal'].includes((_a = props.editingMode) !== null && _a !== void 0 ? _a : ''))) &&
|
|
539
542
|
'mrt-row-actions',
|
|
540
543
|
props.positionExpandColumn === 'first' &&
|
|
541
|
-
(props
|
|
542
|
-
props.enableGrouping ||
|
|
543
|
-
props.renderDetailPanel) &&
|
|
544
|
+
showExpandColumn(props) &&
|
|
544
545
|
'mrt-row-expand',
|
|
545
546
|
props.enableRowSelection && 'mrt-row-select',
|
|
546
547
|
props.enableRowNumbers && 'mrt-row-numbers',
|
|
@@ -554,9 +555,7 @@ const getTrailingDisplayColumnIds = (props) => {
|
|
|
554
555
|
['row', 'modal'].includes((_a = props.editingMode) !== null && _a !== void 0 ? _a : ''))) &&
|
|
555
556
|
'mrt-row-actions',
|
|
556
557
|
props.positionExpandColumn === 'last' &&
|
|
557
|
-
(props
|
|
558
|
-
props.enableGrouping ||
|
|
559
|
-
props.renderDetailPanel) &&
|
|
558
|
+
showExpandColumn(props) &&
|
|
560
559
|
'mrt-row-expand',
|
|
561
560
|
];
|
|
562
561
|
};
|
|
@@ -924,7 +923,7 @@ const commonIconButtonStyles = {
|
|
|
924
923
|
opacity: 1,
|
|
925
924
|
},
|
|
926
925
|
};
|
|
927
|
-
const MRT_ToggleRowActionMenuButton = ({ row, table }) => {
|
|
926
|
+
const MRT_ToggleRowActionMenuButton = ({ cell, row, table }) => {
|
|
928
927
|
const { getState, options: { editingMode, enableEditing, icons: { EditIcon, MoreHorizIcon }, localization, renderRowActionMenuItems, renderRowActions, }, setEditingRow, } = table;
|
|
929
928
|
const { editingRow } = getState();
|
|
930
929
|
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
@@ -937,8 +936,8 @@ const MRT_ToggleRowActionMenuButton = ({ row, table }) => {
|
|
|
937
936
|
setEditingRow(Object.assign({}, row));
|
|
938
937
|
setAnchorEl(null);
|
|
939
938
|
};
|
|
940
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null, renderRowActions ? (React__default["default"].createElement(React__default["default"].Fragment, null, renderRowActions({ row, table }))) : row.id === (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) && editingMode === 'row' ? (React__default["default"].createElement(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems && enableEditing ? (React__default["default"].createElement(material.Tooltip, { placement: "right", arrow: true, title: localization.edit },
|
|
941
|
-
React__default["default"].createElement(material.IconButton, { sx: commonIconButtonStyles, onClick: handleStartEditMode },
|
|
939
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, renderRowActions ? (React__default["default"].createElement(React__default["default"].Fragment, null, renderRowActions({ cell, row, table }))) : row.id === (editingRow === null || editingRow === void 0 ? void 0 : editingRow.id) && editingMode === 'row' ? (React__default["default"].createElement(MRT_EditActionButtons, { row: row, table: table })) : !renderRowActionMenuItems && enableEditing ? (React__default["default"].createElement(material.Tooltip, { placement: "right", arrow: true, title: localization.edit },
|
|
940
|
+
React__default["default"].createElement(material.IconButton, { "aria-label": localization.edit, sx: commonIconButtonStyles, onClick: handleStartEditMode },
|
|
942
941
|
React__default["default"].createElement(EditIcon, null)))) : renderRowActionMenuItems ? (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
943
942
|
React__default["default"].createElement(material.Tooltip, { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: localization.rowActions },
|
|
944
943
|
React__default["default"].createElement(material.IconButton, { "aria-label": localization.rowActions, onClick: handleOpenRowActionMenu, size: "small", sx: commonIconButtonStyles },
|
|
@@ -1054,11 +1053,14 @@ const MRT_TablePagination = ({ table, position }) => {
|
|
|
1054
1053
|
|
|
1055
1054
|
const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
|
|
1056
1055
|
var _a, _b;
|
|
1057
|
-
const { getPrePaginationRowModel, getSelectedRowModel, getState, options: { localization,
|
|
1056
|
+
const { getPrePaginationRowModel, getSelectedRowModel, getState, options: { localization, muiToolbarAlertBannerProps, muiToolbarAlertBannerChipProps, }, } = table;
|
|
1058
1057
|
const { grouping, showAlertBanner } = getState();
|
|
1059
|
-
const alertProps =
|
|
1060
|
-
?
|
|
1061
|
-
:
|
|
1058
|
+
const alertProps = muiToolbarAlertBannerProps instanceof Function
|
|
1059
|
+
? muiToolbarAlertBannerProps({ table })
|
|
1060
|
+
: muiToolbarAlertBannerProps;
|
|
1061
|
+
const chipProps = muiToolbarAlertBannerChipProps instanceof Function
|
|
1062
|
+
? muiToolbarAlertBannerChipProps({ table })
|
|
1063
|
+
: muiToolbarAlertBannerChipProps;
|
|
1062
1064
|
const selectMessage = getSelectedRowModel().rows.length > 0
|
|
1063
1065
|
? (_b = (_a = localization.selectedCountOfRowCountRowsSelected) === null || _a === void 0 ? void 0 : _a.replace('{selectedCount}', getSelectedRowModel().rows.length.toString())) === null || _b === void 0 ? void 0 : _b.replace('{rowCount}', getPrePaginationRowModel().rows.length.toString())
|
|
1064
1066
|
: null;
|
|
@@ -1067,7 +1069,7 @@ const MRT_ToolbarAlertBanner = ({ stackAlertBanner, table, }) => {
|
|
|
1067
1069
|
' ',
|
|
1068
1070
|
grouping.map((columnId, index) => (React__default["default"].createElement(React.Fragment, { key: `${index}-${columnId}` },
|
|
1069
1071
|
index > 0 ? localization.thenBy : '',
|
|
1070
|
-
React__default["default"].createElement(material.Chip, {
|
|
1072
|
+
React__default["default"].createElement(material.Chip, Object.assign({ label: table.getColumn(columnId).columnDef.header, onDelete: () => table.getColumn(columnId).toggleGrouping() }, chipProps))))))) : null;
|
|
1071
1073
|
return (React__default["default"].createElement(material.Collapse, { in: showAlertBanner || !!selectMessage || !!groupedByMessage, timeout: stackAlertBanner ? 200 : 0 },
|
|
1072
1074
|
React__default["default"].createElement(material.Alert, Object.assign({ color: "info", icon: false }, alertProps, { sx: (theme) => (Object.assign({ borderRadius: 0, fontSize: '1rem', left: 0, p: 0, position: 'relative', right: 0, top: 0, width: '100%', zIndex: 2 }, ((alertProps === null || alertProps === void 0 ? void 0 : alertProps.sx) instanceof Function
|
|
1073
1075
|
? alertProps.sx(theme)
|
|
@@ -1198,12 +1200,12 @@ const commonToolbarStyles = ({ theme }) => ({
|
|
|
1198
1200
|
});
|
|
1199
1201
|
const MRT_TopToolbar = ({ table }) => {
|
|
1200
1202
|
var _a;
|
|
1201
|
-
const { getState, options: { enableGlobalFilter, enablePagination, enableToolbarInternalActions,
|
|
1203
|
+
const { getState, options: { enableGlobalFilter, enablePagination, enableToolbarInternalActions, muiTopToolbarProps, positionGlobalFilter, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, renderTopToolbarCustomActions, }, refs: { topToolbarRef }, } = table;
|
|
1202
1204
|
const { isFullScreen, showGlobalFilter } = getState();
|
|
1203
1205
|
const isMobile = material.useMediaQuery('(max-width:720px)');
|
|
1204
|
-
const toolbarProps =
|
|
1205
|
-
?
|
|
1206
|
-
:
|
|
1206
|
+
const toolbarProps = muiTopToolbarProps instanceof Function
|
|
1207
|
+
? muiTopToolbarProps({ table })
|
|
1208
|
+
: muiTopToolbarProps;
|
|
1207
1209
|
const stackAlertBanner = isMobile || !!renderTopToolbarCustomActions || showGlobalFilter;
|
|
1208
1210
|
return (React__default["default"].createElement(material.Toolbar, Object.assign({ variant: "dense" }, toolbarProps, { ref: (ref) => {
|
|
1209
1211
|
topToolbarRef.current = ref;
|
|
@@ -1236,12 +1238,12 @@ const MRT_TopToolbar = ({ table }) => {
|
|
|
1236
1238
|
};
|
|
1237
1239
|
|
|
1238
1240
|
const MRT_BottomToolbar = ({ table }) => {
|
|
1239
|
-
const { getState, options: { enablePagination,
|
|
1241
|
+
const { getState, options: { enablePagination, muiBottomToolbarProps, positionPagination, positionToolbarAlertBanner, positionToolbarDropZone, renderBottomToolbarCustomActions, }, refs: { bottomToolbarRef }, } = table;
|
|
1240
1242
|
const { isFullScreen } = getState();
|
|
1241
1243
|
const isMobile = material.useMediaQuery('(max-width:720px)');
|
|
1242
|
-
const toolbarProps =
|
|
1243
|
-
?
|
|
1244
|
-
:
|
|
1244
|
+
const toolbarProps = muiBottomToolbarProps instanceof Function
|
|
1245
|
+
? muiBottomToolbarProps({ table })
|
|
1246
|
+
: muiBottomToolbarProps;
|
|
1245
1247
|
const stackAlertBanner = isMobile || !!renderBottomToolbarCustomActions;
|
|
1246
1248
|
return (React__default["default"].createElement(material.Toolbar, Object.assign({ variant: "dense" }, toolbarProps, { ref: (ref) => {
|
|
1247
1249
|
bottomToolbarRef.current = ref;
|
|
@@ -1260,7 +1262,7 @@ const MRT_BottomToolbar = ({ table }) => {
|
|
|
1260
1262
|
justifyContent: 'space-between',
|
|
1261
1263
|
width: '100%',
|
|
1262
1264
|
} },
|
|
1263
|
-
renderBottomToolbarCustomActions ? (
|
|
1265
|
+
renderBottomToolbarCustomActions ? (renderBottomToolbarCustomActions({ table })) : (React__default["default"].createElement("span", null)),
|
|
1264
1266
|
React__default["default"].createElement(material.Box, { sx: {
|
|
1265
1267
|
display: 'flex',
|
|
1266
1268
|
justifyContent: 'flex-end',
|
|
@@ -1642,7 +1644,7 @@ const MRT_TableHeadCell = ({ header, table }) => {
|
|
|
1642
1644
|
if (enableGrouping && (hoveredColumn === null || hoveredColumn === void 0 ? void 0 : hoveredColumn.id) === 'drop-zone') {
|
|
1643
1645
|
setHoveredColumn(null);
|
|
1644
1646
|
}
|
|
1645
|
-
if (enableColumnOrdering && draggingColumn) {
|
|
1647
|
+
if (enableColumnOrdering && draggingColumn && columnDefType !== 'group') {
|
|
1646
1648
|
setHoveredColumn(columnDef.enableColumnOrdering !== false ? column : null);
|
|
1647
1649
|
}
|
|
1648
1650
|
};
|
|
@@ -1692,13 +1694,11 @@ const MRT_TableHeadCell = ({ header, table }) => {
|
|
|
1692
1694
|
? '0.4rem'
|
|
1693
1695
|
: '0.6rem', position: column.getIsPinned() && columnDefType !== 'group'
|
|
1694
1696
|
? 'sticky'
|
|
1695
|
-
: undefined, pt: columnDefType === 'group'
|
|
1696
|
-
? 0
|
|
1697
|
-
: density === '
|
|
1698
|
-
? '
|
|
1699
|
-
:
|
|
1700
|
-
? '.75rem'
|
|
1701
|
-
: '1.25rem', right: column.getIsPinned() === 'right' ? `${getTotalRight()}px` : undefined, transition: `all ${enableColumnResizing ? 0 : '0.2s'} ease-in-out`, userSelect: enableMultiSort && column.getCanSort() ? 'none' : undefined, verticalAlign: 'top', zIndex: column.getIsResizing() || (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
|
|
1697
|
+
: undefined, pt: columnDefType === 'group' || density === 'compact'
|
|
1698
|
+
? '0.25rem'
|
|
1699
|
+
: density === 'comfortable'
|
|
1700
|
+
? '.75rem'
|
|
1701
|
+
: '1.25rem', right: column.getIsPinned() === 'right' ? `${getTotalRight()}px` : undefined, transition: `all ${enableColumnResizing ? 0 : '0.2s'} ease-in-out`, userSelect: enableMultiSort && column.getCanSort() ? 'none' : undefined, verticalAlign: 'top', zIndex: column.getIsResizing() || (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id
|
|
1702
1702
|
? 3
|
|
1703
1703
|
: column.getIsPinned() && columnDefType !== 'group'
|
|
1704
1704
|
? 2
|
|
@@ -1807,7 +1807,7 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
|
|
|
1807
1807
|
}, onBlur: handleBlur, onChange: handleChange })));
|
|
1808
1808
|
};
|
|
1809
1809
|
|
|
1810
|
-
const MRT_CopyButton = ({ cell, children, table }) => {
|
|
1810
|
+
const MRT_CopyButton = ({ cell, children, table, }) => {
|
|
1811
1811
|
const { options: { localization, muiTableBodyCellCopyButtonProps }, } = table;
|
|
1812
1812
|
const { column, row } = cell;
|
|
1813
1813
|
const { columnDef } = column;
|
|
@@ -1855,8 +1855,31 @@ const MRT_TableBodyRowGrabHandle = ({ cell, rowRef, table, }) => {
|
|
|
1855
1855
|
return (React__default["default"].createElement(MRT_GrabHandleButton, { iconButtonProps: iconButtonProps, onDragStart: handleDragStart, onDragEnd: handleDragEnd, table: table }));
|
|
1856
1856
|
};
|
|
1857
1857
|
|
|
1858
|
+
const MRT_TableBodyCellValue = ({ cell, table }) => {
|
|
1859
|
+
var _a, _b, _c, _d;
|
|
1860
|
+
const { column, row } = cell;
|
|
1861
|
+
const { columnDef } = column;
|
|
1862
|
+
return (React__default["default"].createElement(React__default["default"].Fragment, null, cell.getIsAggregated() && column.columnDef.aggregationFn
|
|
1863
|
+
? (_a = columnDef.AggregatedCell) === null || _a === void 0 ? void 0 : _a.call(columnDef, {
|
|
1864
|
+
cell,
|
|
1865
|
+
column,
|
|
1866
|
+
row,
|
|
1867
|
+
table,
|
|
1868
|
+
})
|
|
1869
|
+
: row.getIsGrouped() && !cell.getIsGrouped()
|
|
1870
|
+
? null
|
|
1871
|
+
: (cell.getIsGrouped() &&
|
|
1872
|
+
((_b = columnDef.GroupedCell) === null || _b === void 0 ? void 0 : _b.call(columnDef, {
|
|
1873
|
+
cell,
|
|
1874
|
+
column,
|
|
1875
|
+
row,
|
|
1876
|
+
table,
|
|
1877
|
+
}))) ||
|
|
1878
|
+
((_d = (_c = columnDef === null || columnDef === void 0 ? void 0 : columnDef.Cell) === null || _c === void 0 ? void 0 : _c.call(columnDef, { cell, column, row, table })) !== null && _d !== void 0 ? _d : cell.renderValue())));
|
|
1879
|
+
};
|
|
1880
|
+
|
|
1858
1881
|
const MRT_TableBodyCell = ({ cell, enableHover, rowIndex, rowRef, table, }) => {
|
|
1859
|
-
var _a, _b
|
|
1882
|
+
var _a, _b;
|
|
1860
1883
|
const theme = material.useTheme();
|
|
1861
1884
|
const { getState, options: { editingMode, enableClickToCopy, enableColumnOrdering, enableEditing, enableGrouping, enablePagination, enableRowNumbers, muiTableBodyCellProps, muiTableBodyCellSkeletonProps, rowNumberMode, }, refs: { editInputRefs }, setEditingCell, setHoveredColumn, } = table;
|
|
1862
1885
|
const { draggingColumn, editingCell, editingRow, hoveredColumn, density, isLoading, showSkeletons, } = getState();
|
|
@@ -1986,21 +2009,12 @@ const MRT_TableBodyCell = ({ cell, enableHover, rowIndex, rowRef, table, }) => {
|
|
|
1986
2009
|
(column.id === 'mrt-row-select' ||
|
|
1987
2010
|
column.id === 'mrt-row-expand' ||
|
|
1988
2011
|
!row.getIsGrouped()) ? ((_a = columnDef.Cell) === null || _a === void 0 ? void 0 : _a.call(columnDef, { cell, column, row, table })) : isEditing ? (React__default["default"].createElement(MRT_EditCellTextField, { cell: cell, table: table })) : (enableClickToCopy || columnDef.enableClickToCopy) &&
|
|
1989
|
-
columnDef.enableClickToCopy !== false ? (React__default["default"].createElement(
|
|
1990
|
-
React__default["default"].createElement(
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
" (", (_d = row.subRows) === null || _d === void 0 ? void 0 :
|
|
1996
|
-
_d.length,
|
|
1997
|
-
")"))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
1998
|
-
row.getIsGrouped() && !cell.getIsGrouped()
|
|
1999
|
-
? null
|
|
2000
|
-
: (_g = (_f = columnDef === null || columnDef === void 0 ? void 0 : columnDef.Cell) === null || _f === void 0 ? void 0 : _f.call(columnDef, { cell, column, row, table })) !== null && _g !== void 0 ? _g : cell.renderValue(),
|
|
2001
|
-
cell.getIsGrouped() && React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2002
|
-
" (", (_j = (_h = row.subRows) === null || _h === void 0 ? void 0 : _h.length) !== null && _j !== void 0 ? _j : '',
|
|
2003
|
-
")"))))));
|
|
2012
|
+
columnDef.enableClickToCopy !== false ? (React__default["default"].createElement(MRT_CopyButton, { cell: cell, table: table },
|
|
2013
|
+
React__default["default"].createElement(MRT_TableBodyCellValue, { cell: cell, table: table }))) : (React__default["default"].createElement(MRT_TableBodyCellValue, { cell: cell, table: table }))),
|
|
2014
|
+
cell.getIsGrouped() && !columnDef.GroupedCell && (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2015
|
+
" (", (_b = row.subRows) === null || _b === void 0 ? void 0 :
|
|
2016
|
+
_b.length,
|
|
2017
|
+
")"))));
|
|
2004
2018
|
};
|
|
2005
2019
|
|
|
2006
2020
|
const MRT_TableDetailPanel = ({ row, table }) => {
|
|
@@ -2271,7 +2285,7 @@ const MRT_EditRowModal = ({ open, row, table, }) => {
|
|
|
2271
2285
|
};
|
|
2272
2286
|
|
|
2273
2287
|
const MRT_TableRoot = (props) => {
|
|
2274
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
2288
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
2275
2289
|
const bottomToolbarRef = React.useRef(null);
|
|
2276
2290
|
const editInputRefs = React.useRef({});
|
|
2277
2291
|
const filterInputRefs = React.useRef({});
|
|
@@ -2304,23 +2318,26 @@ const MRT_TableRoot = (props) => {
|
|
|
2304
2318
|
const [editingCell, setEditingCell] = React.useState((_e = initialState.editingCell) !== null && _e !== void 0 ? _e : null);
|
|
2305
2319
|
const [editingRow, setEditingRow] = React.useState((_f = initialState.editingRow) !== null && _f !== void 0 ? _f : null);
|
|
2306
2320
|
const [globalFilterFn, setGlobalFilterFn] = React.useState((_g = initialState.globalFilterFn) !== null && _g !== void 0 ? _g : 'fuzzy');
|
|
2307
|
-
const [
|
|
2308
|
-
const [
|
|
2309
|
-
const [
|
|
2310
|
-
const [
|
|
2311
|
-
const [
|
|
2312
|
-
const [
|
|
2321
|
+
const [grouping, setGrouping] = React.useState((_h = initialState.grouping) !== null && _h !== void 0 ? _h : []);
|
|
2322
|
+
const [hoveredColumn, setHoveredColumn] = React.useState((_j = initialState.hoveredColumn) !== null && _j !== void 0 ? _j : null);
|
|
2323
|
+
const [hoveredRow, setHoveredRow] = React.useState((_k = initialState.hoveredRow) !== null && _k !== void 0 ? _k : null);
|
|
2324
|
+
const [isFullScreen, setIsFullScreen] = React.useState((_l = initialState === null || initialState === void 0 ? void 0 : initialState.isFullScreen) !== null && _l !== void 0 ? _l : false);
|
|
2325
|
+
const [showAlertBanner, setShowAlertBanner] = React.useState((_o = (_m = props.initialState) === null || _m === void 0 ? void 0 : _m.showAlertBanner) !== null && _o !== void 0 ? _o : false);
|
|
2326
|
+
const [showColumnFilters, setShowFilters] = React.useState((_p = initialState === null || initialState === void 0 ? void 0 : initialState.showColumnFilters) !== null && _p !== void 0 ? _p : false);
|
|
2327
|
+
const [showGlobalFilter, setShowGlobalFilter] = React.useState((_q = initialState === null || initialState === void 0 ? void 0 : initialState.showGlobalFilter) !== null && _q !== void 0 ? _q : false);
|
|
2313
2328
|
const displayColumns = React.useMemo(() => {
|
|
2314
2329
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2315
2330
|
return [
|
|
2316
2331
|
columnOrder.includes('mrt-row-drag') && Object.assign(Object.assign(Object.assign({ header: (_a = props.localization) === null || _a === void 0 ? void 0 : _a.move, size: 60 }, defaultDisplayColumnDefOptions), (_b = props.displayColumnDefOptions) === null || _b === void 0 ? void 0 : _b['mrt-row-drag']), { id: 'mrt-row-drag' }),
|
|
2317
|
-
columnOrder.includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_ToggleRowActionMenuButton, { row: row, table: table })), header: (_c = props.localization) === null || _c === void 0 ? void 0 : _c.actions, size: 70 }, defaultDisplayColumnDefOptions), (_d = props.displayColumnDefOptions) === null || _d === void 0 ? void 0 : _d['mrt-row-actions']), { id: 'mrt-row-actions' }),
|
|
2318
|
-
columnOrder.includes('mrt-row-expand') &&
|
|
2332
|
+
columnOrder.includes('mrt-row-actions') && Object.assign(Object.assign(Object.assign({ Cell: ({ cell, row }) => (React__default["default"].createElement(MRT_ToggleRowActionMenuButton, { cell: cell, row: row, table: table })), header: (_c = props.localization) === null || _c === void 0 ? void 0 : _c.actions, size: 70 }, defaultDisplayColumnDefOptions), (_d = props.displayColumnDefOptions) === null || _d === void 0 ? void 0 : _d['mrt-row-actions']), { id: 'mrt-row-actions' }),
|
|
2333
|
+
columnOrder.includes('mrt-row-expand') &&
|
|
2334
|
+
showExpandColumn(props, grouping) && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_ExpandButton, { row: row, table: table })), Header: () => props.enableExpandAll ? (React__default["default"].createElement(MRT_ExpandAllButton, { table: table })) : null, header: (_e = props.localization) === null || _e === void 0 ? void 0 : _e.expand, size: 60 }, defaultDisplayColumnDefOptions), (_f = props.displayColumnDefOptions) === null || _f === void 0 ? void 0 : _f['mrt-row-expand']), { id: 'mrt-row-expand' }),
|
|
2319
2335
|
columnOrder.includes('mrt-row-select') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => (React__default["default"].createElement(MRT_SelectCheckbox, { row: row, table: table })), Header: () => props.enableSelectAll ? (React__default["default"].createElement(MRT_SelectCheckbox, { selectAll: true, table: table })) : null, header: (_g = props.localization) === null || _g === void 0 ? void 0 : _g.select, size: 60 }, defaultDisplayColumnDefOptions), (_h = props.displayColumnDefOptions) === null || _h === void 0 ? void 0 : _h['mrt-row-select']), { id: 'mrt-row-select' }),
|
|
2320
2336
|
columnOrder.includes('mrt-row-numbers') && Object.assign(Object.assign(Object.assign({ Cell: ({ row }) => row.index + 1, Header: () => { var _a; return (_a = props.localization) === null || _a === void 0 ? void 0 : _a.rowNumber; }, header: (_j = props.localization) === null || _j === void 0 ? void 0 : _j.rowNumbers, size: 60 }, defaultDisplayColumnDefOptions), (_k = props.displayColumnDefOptions) === null || _k === void 0 ? void 0 : _k['mrt-row-numbers']), { id: 'mrt-row-numbers' }),
|
|
2321
2337
|
].filter(Boolean);
|
|
2322
2338
|
}, [
|
|
2323
2339
|
columnOrder,
|
|
2340
|
+
grouping,
|
|
2324
2341
|
props.displayColumnDefOptions,
|
|
2325
2342
|
props.editingMode,
|
|
2326
2343
|
props.enableColumnDragging,
|
|
@@ -2337,6 +2354,7 @@ const MRT_TableRoot = (props) => {
|
|
|
2337
2354
|
props.enableSelectAll,
|
|
2338
2355
|
props.localization,
|
|
2339
2356
|
props.positionActionsColumn,
|
|
2357
|
+
props.renderDetailPanel,
|
|
2340
2358
|
]);
|
|
2341
2359
|
const columnDefs = React.useMemo(() => prepareColumns([...displayColumns, ...props.columns], columnFilterFns, props.filterFns, props.sortingFns), [columnFilterFns, displayColumns, props.columns]);
|
|
2342
2360
|
const data = React.useMemo(() => {
|
|
@@ -2354,11 +2372,11 @@ const MRT_TableRoot = (props) => {
|
|
|
2354
2372
|
});
|
|
2355
2373
|
})))
|
|
2356
2374
|
: props.data;
|
|
2357
|
-
}, [props.data, (
|
|
2375
|
+
}, [props.data, (_r = props.state) === null || _r === void 0 ? void 0 : _r.isLoading, (_s = props.state) === null || _s === void 0 ? void 0 : _s.showSkeletons]);
|
|
2358
2376
|
//@ts-ignore
|
|
2359
|
-
const table = Object.assign(Object.assign({}, reactTable.useReactTable(Object.assign(Object.assign({ getCoreRowModel: reactTable.getCoreRowModel(), getExpandedRowModel: reactTable.getExpandedRowModel(), getFacetedRowModel: reactTable.getFacetedRowModel(), getFilteredRowModel: reactTable.getFilteredRowModel(), getGroupedRowModel: reactTable.getGroupedRowModel(), getPaginationRowModel: reactTable.getPaginationRowModel(), getSortedRowModel: reactTable.getSortedRowModel(), onColumnOrderChange: setColumnOrder, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows }, props), {
|
|
2377
|
+
const table = Object.assign(Object.assign({}, reactTable.useReactTable(Object.assign(Object.assign({ getCoreRowModel: reactTable.getCoreRowModel(), getExpandedRowModel: reactTable.getExpandedRowModel(), getFacetedRowModel: reactTable.getFacetedRowModel(), getFilteredRowModel: reactTable.getFilteredRowModel(), getGroupedRowModel: reactTable.getGroupedRowModel(), getPaginationRowModel: reactTable.getPaginationRowModel(), getSortedRowModel: reactTable.getSortedRowModel(), onColumnOrderChange: setColumnOrder, onGroupingChange: setGrouping, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows }, props), {
|
|
2360
2378
|
//@ts-ignore
|
|
2361
|
-
columns: columnDefs, data, globalFilterFn: (
|
|
2379
|
+
columns: columnDefs, data, globalFilterFn: (_u = (_t = props.filterFns) === null || _t === void 0 ? void 0 : _t[globalFilterFn]) !== null && _u !== void 0 ? _u : (_v = props.filterFns) === null || _v === void 0 ? void 0 : _v.fuzzy, initialState, state: Object.assign({ columnFilterFns,
|
|
2362
2380
|
columnOrder,
|
|
2363
2381
|
density,
|
|
2364
2382
|
draggingColumn,
|
|
@@ -2366,6 +2384,7 @@ const MRT_TableRoot = (props) => {
|
|
|
2366
2384
|
editingCell,
|
|
2367
2385
|
editingRow,
|
|
2368
2386
|
globalFilterFn,
|
|
2387
|
+
grouping,
|
|
2369
2388
|
hoveredColumn,
|
|
2370
2389
|
hoveredRow,
|
|
2371
2390
|
isFullScreen,
|
|
@@ -2378,7 +2397,7 @@ const MRT_TableRoot = (props) => {
|
|
|
2378
2397
|
searchInputRef,
|
|
2379
2398
|
tableContainerRef,
|
|
2380
2399
|
topToolbarRef,
|
|
2381
|
-
}, setColumnFilterFns: (
|
|
2400
|
+
}, setColumnFilterFns: (_w = props.onFilterFnsChange) !== null && _w !== void 0 ? _w : setColumnFilterFns, setDensity: (_x = props.onDensityChange) !== null && _x !== void 0 ? _x : setDensity, setDraggingColumn: (_y = props.onDraggingColumnChange) !== null && _y !== void 0 ? _y : setDraggingColumn, setDraggingRow: (_z = props.onDraggingRowChange) !== null && _z !== void 0 ? _z : setDraggingRow, setEditingCell: (_0 = props.onEditingCellChange) !== null && _0 !== void 0 ? _0 : setEditingCell, setEditingRow: (_1 = props.onEditingRowChange) !== null && _1 !== void 0 ? _1 : setEditingRow, setGlobalFilterFn: (_2 = props.onGlobalFilterFnChange) !== null && _2 !== void 0 ? _2 : setGlobalFilterFn, setHoveredColumn: (_3 = props.onHoveredColumnChange) !== null && _3 !== void 0 ? _3 : setHoveredColumn, setHoveredRow: (_4 = props.onHoveredRowChange) !== null && _4 !== void 0 ? _4 : setHoveredRow, setIsFullScreen: (_5 = props.onIsFullScreenChange) !== null && _5 !== void 0 ? _5 : setIsFullScreen, setShowAlertBanner: (_6 = props.onShowAlertBannerChange) !== null && _6 !== void 0 ? _6 : setShowAlertBanner, setShowFilters: (_7 = props.onShowFiltersChange) !== null && _7 !== void 0 ? _7 : setShowFilters, setShowGlobalFilter: (_8 = props.onShowGlobalFilterChange) !== null && _8 !== void 0 ? _8 : setShowGlobalFilter });
|
|
2382
2401
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2383
2402
|
React__default["default"].createElement(material.Dialog, { PaperComponent: material.Box, TransitionComponent: material.Grow, disablePortal: true, fullScreen: true, keepMounted: false, onClose: () => setIsFullScreen(false), open: isFullScreen, transitionDuration: 400 },
|
|
2384
2403
|
React__default["default"].createElement(MRT_TablePaper, { table: table })),
|
|
@@ -2391,6 +2410,7 @@ var MaterialReactTable = (_a) => {
|
|
|
2391
2410
|
return (React__default["default"].createElement(MRT_TableRoot, Object.assign({ aggregationFns: Object.assign(Object.assign({}, MRT_AggregationFns), aggregationFns), autoResetExpanded: autoResetExpanded, columnResizeMode: columnResizeMode, defaultColumn: defaultColumn, editingMode: editingMode, enableBottomToolbar: enableBottomToolbar, enableColumnActions: enableColumnActions, enableColumnFilterChangeMode: enableColumnFilterChangeMode, enableColumnFilters: enableColumnFilters, enableColumnOrdering: enableColumnOrdering, enableColumnResizing: enableColumnResizing, enableDensityToggle: enableDensityToggle, enableExpandAll: enableExpandAll, enableFilters: enableFilters, enableFullScreenToggle: enableFullScreenToggle, enableGlobalFilter: enableGlobalFilter, enableGlobalFilterChangeMode: enableGlobalFilterChangeMode, enableGlobalFilterRankedResults: enableGlobalFilterRankedResults, enableGrouping: enableGrouping, enableHiding: enableHiding, enableMultiRowSelection: enableMultiRowSelection, enableMultiSort: enableMultiSort, enablePagination: enablePagination, enablePinning: enablePinning, enableRowSelection: enableRowSelection, enableSelectAll: enableSelectAll, enableSorting: enableSorting, enableStickyHeader: enableStickyHeader, enableTableFooter: enableTableFooter, enableTableHead: enableTableHead, enableToolbarInternalActions: enableToolbarInternalActions, enableTopToolbar: enableTopToolbar, filterFns: Object.assign(Object.assign({}, MRT_FilterFns), filterFns), icons: Object.assign(Object.assign({}, MRT_Default_Icons), icons), localization: Object.assign(Object.assign({}, MRT_DefaultLocalization_EN), localization), positionActionsColumn: positionActionsColumn, positionExpandColumn: positionExpandColumn, positionGlobalFilter: positionGlobalFilter, positionPagination: positionPagination, positionToolbarAlertBanner: positionToolbarAlertBanner, positionToolbarDropZone: positionToolbarDropZone, rowNumberMode: rowNumberMode, selectAllMode: selectAllMode, sortingFns: Object.assign(Object.assign({}, MRT_SortingFns), sortingFns) }, rest)));
|
|
2392
2411
|
};
|
|
2393
2412
|
|
|
2413
|
+
exports.MRT_CopyButton = MRT_CopyButton;
|
|
2394
2414
|
exports.MRT_FullScreenToggleButton = MRT_FullScreenToggleButton;
|
|
2395
2415
|
exports.MRT_GlobalFilterTextField = MRT_GlobalFilterTextField;
|
|
2396
2416
|
exports.MRT_ShowHideColumnsButton = MRT_ShowHideColumnsButton;
|