material-react-table 1.12.1 → 1.13.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/cjs/index.js +121 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/MaterialReactTable.d.ts +1 -1
- package/dist/cjs/types/inputs/MRT_FilterRangeSlider.d.ts +7 -0
- package/dist/cjs/types/types.d.ts +12 -2
- package/dist/esm/material-react-table.esm.js +124 -15
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/dist/esm/types/MaterialReactTable.d.ts +1 -1
- package/dist/esm/types/inputs/MRT_FilterRangeSlider.d.ts +7 -0
- package/dist/esm/types/types.d.ts +12 -2
- package/dist/index.d.ts +13 -3
- package/package.json +1 -1
- package/src/MaterialReactTable.tsx +2 -0
- package/src/column.utils.ts +5 -1
- package/src/head/MRT_TableHeadCellFilterContainer.tsx +4 -1
- package/src/inputs/MRT_FilterRangeFields.tsx +1 -1
- package/src/inputs/MRT_FilterRangeSlider.tsx +134 -0
- package/src/inputs/MRT_FilterTextField.tsx +24 -3
- package/src/menus/MRT_FilterOptionMenu.tsx +8 -1
- package/src/table/MRT_TableRoot.tsx +28 -6
- package/src/types.ts +22 -2
package/dist/cjs/index.js
CHANGED
@@ -69,6 +69,7 @@ var Table = require('@mui/material/Table');
|
|
69
69
|
var TableHead = require('@mui/material/TableHead');
|
70
70
|
var TableRow = require('@mui/material/TableRow');
|
71
71
|
var TableCell = require('@mui/material/TableCell');
|
72
|
+
var material = require('@mui/material');
|
72
73
|
var Badge = require('@mui/material/Badge');
|
73
74
|
var TableSortLabel = require('@mui/material/TableSortLabel');
|
74
75
|
var TableBody = require('@mui/material/TableBody');
|
@@ -391,7 +392,8 @@ const getDefaultColumnOrderIds = (props) => {
|
|
391
392
|
const getDefaultColumnFilterFn = (columnDef) => {
|
392
393
|
if (columnDef.filterVariant === 'multi-select')
|
393
394
|
return 'arrIncludesSome';
|
394
|
-
if (columnDef.filterVariant === 'range'
|
395
|
+
if (columnDef.filterVariant === 'range' ||
|
396
|
+
columnDef.filterVariant === 'range-slider')
|
395
397
|
return 'betweenInclusive';
|
396
398
|
if (columnDef.filterVariant === 'select' ||
|
397
399
|
columnDef.filterVariant === 'checkbox')
|
@@ -742,7 +744,13 @@ const MRT_FilterOptionMenu = ({ anchorEl, header, onSelect, setAnchorEl, setFilt
|
|
742
744
|
const { column } = header !== null && header !== void 0 ? header : {};
|
743
745
|
const { columnDef } = column !== null && column !== void 0 ? column : {};
|
744
746
|
const currentFilterValue = column === null || column === void 0 ? void 0 : column.getFilterValue();
|
745
|
-
|
747
|
+
let allowedColumnFilterOptions = (_a = columnDef === null || columnDef === void 0 ? void 0 : columnDef.columnFilterModeOptions) !== null && _a !== void 0 ? _a : columnFilterModeOptions;
|
748
|
+
if ((columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterVariant) === 'range-slider') {
|
749
|
+
allowedColumnFilterOptions = [
|
750
|
+
...rangeModes,
|
751
|
+
...(allowedColumnFilterOptions !== null && allowedColumnFilterOptions !== void 0 ? allowedColumnFilterOptions : []),
|
752
|
+
].filter((option) => rangeModes.includes(option));
|
753
|
+
}
|
746
754
|
const internalFilterOptions = react.useMemo(() => mrtFilterOptions(localization).filter((filterOption) => columnDef
|
747
755
|
? allowedColumnFilterOptions === undefined ||
|
748
756
|
(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.includes(filterOption.option))
|
@@ -1536,7 +1544,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
|
|
1536
1544
|
};
|
1537
1545
|
|
1538
1546
|
const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
1539
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
1547
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
1540
1548
|
const { options: { enableColumnFilterModes, columnFilterModeOptions, icons: { FilterListIcon, CloseIcon }, localization, manualFiltering, muiTableHeadCellFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
|
1541
1549
|
const { column } = header;
|
1542
1550
|
const { columnDef } = column;
|
@@ -1579,6 +1587,18 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
1579
1587
|
!rangeFilterIndex &&
|
1580
1588
|
(allowedColumnFilterOptions === undefined ||
|
1581
1589
|
!!(allowedColumnFilterOptions === null || allowedColumnFilterOptions === void 0 ? void 0 : allowedColumnFilterOptions.length));
|
1590
|
+
const facetedUniqueValues = column.getFacetedUniqueValues();
|
1591
|
+
const filterSelectOptions = react.useMemo(() => {
|
1592
|
+
var _a;
|
1593
|
+
return (_a = columnDef.filterSelectOptions) !== null && _a !== void 0 ? _a : ((isSelectFilter || isMultiSelectFilter) && facetedUniqueValues
|
1594
|
+
? Array.from(facetedUniqueValues.keys()).sort((a, b) => a.localeCompare(b))
|
1595
|
+
: undefined);
|
1596
|
+
}, [
|
1597
|
+
columnDef.filterSelectOptions,
|
1598
|
+
facetedUniqueValues,
|
1599
|
+
isMultiSelectFilter,
|
1600
|
+
isSelectFilter,
|
1601
|
+
]);
|
1582
1602
|
const [anchorEl, setAnchorEl] = react.useState(null);
|
1583
1603
|
const [filterValue, setFilterValue] = react.useState(() => {
|
1584
1604
|
var _a, _b;
|
@@ -1686,8 +1706,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
1686
1706
|
multiple: isMultiSelectFilter,
|
1687
1707
|
renderValue: isMultiSelectFilter
|
1688
1708
|
? (selected) => !(selected === null || selected === void 0 ? void 0 : selected.length) ? (jsxRuntime.jsx(Box__default["default"], { sx: { opacity: 0.5 }, children: filterPlaceholder })) : (jsxRuntime.jsx(Box__default["default"], { sx: { display: 'flex', flexWrap: 'wrap', gap: '2px' }, children: selected === null || selected === void 0 ? void 0 : selected.map((value) => {
|
1689
|
-
|
1690
|
-
const selectedValue = (_a = columnDef.filterSelectOptions) === null || _a === void 0 ? void 0 : _a.find((option) => option instanceof Object
|
1709
|
+
const selectedValue = filterSelectOptions === null || filterSelectOptions === void 0 ? void 0 : filterSelectOptions.find((option) => option instanceof Object
|
1691
1710
|
? option.value === value
|
1692
1711
|
: option === value);
|
1693
1712
|
return (jsxRuntime.jsx(Chip__default["default"], { label: selectedValue instanceof Object
|
@@ -1709,7 +1728,7 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
1709
1728
|
mr: '1.5rem',
|
1710
1729
|
} }, ((textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx) instanceof Function
|
1711
1730
|
? textFieldProps.sx(theme)
|
1712
|
-
: textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))), children: [(isSelectFilter || isMultiSelectFilter) && (jsxRuntime.jsx(MenuItem__default["default"], { divider: true, disabled: true, hidden: true, value: "", children: jsxRuntime.jsx(Box__default["default"], { sx: { opacity: 0.5 }, children: filterPlaceholder }) })), (_k = textFieldProps.children) !== null && _k !== void 0 ? _k :
|
1731
|
+
: textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))), children: [(isSelectFilter || isMultiSelectFilter) && (jsxRuntime.jsx(MenuItem__default["default"], { divider: true, disabled: true, hidden: true, value: "", children: jsxRuntime.jsx(Box__default["default"], { sx: { opacity: 0.5 }, children: filterPlaceholder }) })), (_k = textFieldProps.children) !== null && _k !== void 0 ? _k : filterSelectOptions === null || filterSelectOptions === void 0 ? void 0 : filterSelectOptions.map((option) => {
|
1713
1732
|
var _a;
|
1714
1733
|
let value;
|
1715
1734
|
let text;
|
@@ -1726,12 +1745,13 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
1726
1745
|
m: 0,
|
1727
1746
|
alignItems: 'center',
|
1728
1747
|
gap: '0.5rem',
|
1729
|
-
}, value: value, children: [isMultiSelectFilter && (jsxRuntime.jsx(Checkbox__default["default"], { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })), text
|
1748
|
+
}, value: value, children: [isMultiSelectFilter && (jsxRuntime.jsx(Checkbox__default["default"], { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })), text, ' ', !columnDef.filterSelectOptions &&
|
1749
|
+
`(${facetedUniqueValues.get(value)})`] }, value));
|
1730
1750
|
})] })), jsxRuntime.jsx(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table, setFilterValue: setFilterValue })] }));
|
1731
1751
|
};
|
1732
1752
|
|
1733
1753
|
const MRT_FilterRangeFields = ({ header, table }) => {
|
1734
|
-
return (jsxRuntime.jsxs(Box__default["default"], { sx: { display: 'grid', gridTemplateColumns: '
|
1754
|
+
return (jsxRuntime.jsxs(Box__default["default"], { sx: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '1rem' }, children: [jsxRuntime.jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 0, table: table }), jsxRuntime.jsx(MRT_FilterTextField, { header: header, rangeFilterIndex: 1, table: table })] }));
|
1735
1755
|
};
|
1736
1756
|
|
1737
1757
|
const MRT_FilterCheckbox = ({ column, table }) => {
|
@@ -1770,12 +1790,85 @@ const MRT_FilterCheckbox = ({ column, table }) => {
|
|
1770
1790
|
: checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.sx))) })), disableTypography: true, label: (_c = checkboxProps.title) !== null && _c !== void 0 ? _c : filterLabel, sx: { color: 'text.secondary', mt: '-4px', fontWeight: 'normal' }, title: undefined }) }));
|
1771
1791
|
};
|
1772
1792
|
|
1793
|
+
const MRT_FilterRangeSlider = ({ header, table }) => {
|
1794
|
+
var _a, _b;
|
1795
|
+
const { options: { localization, muiTableHeadCellFilterSliderProps, enableColumnFilterModes, }, refs: { filterInputRefs }, } = table;
|
1796
|
+
const { column } = header;
|
1797
|
+
const { columnDef } = column;
|
1798
|
+
const currentFilterOption = columnDef._filterFn;
|
1799
|
+
const showChangeModeButton = enableColumnFilterModes && columnDef.enableColumnFilterModes !== false;
|
1800
|
+
const mTableHeadCellFilterTextFieldProps = muiTableHeadCellFilterSliderProps instanceof Function
|
1801
|
+
? muiTableHeadCellFilterSliderProps({
|
1802
|
+
column,
|
1803
|
+
table,
|
1804
|
+
})
|
1805
|
+
: muiTableHeadCellFilterSliderProps;
|
1806
|
+
const mcTableHeadCellFilterTextFieldProps = columnDef.muiTableHeadCellFilterSliderProps instanceof Function
|
1807
|
+
? columnDef.muiTableHeadCellFilterSliderProps({
|
1808
|
+
column,
|
1809
|
+
table,
|
1810
|
+
})
|
1811
|
+
: columnDef.muiTableHeadCellFilterSliderProps;
|
1812
|
+
const sliderProps = Object.assign(Object.assign({}, mTableHeadCellFilterTextFieldProps), mcTableHeadCellFilterTextFieldProps);
|
1813
|
+
const [min, max] = sliderProps.min !== undefined && sliderProps.max !== undefined
|
1814
|
+
? [sliderProps.min, sliderProps.max]
|
1815
|
+
: (_a = column.getFacetedMinMaxValues()) !== null && _a !== void 0 ? _a : [0, 0];
|
1816
|
+
const [filterValues, setFilterValues] = react.useState([min, max]);
|
1817
|
+
const columnFilterValue = column.getFilterValue();
|
1818
|
+
const isMounted = react.useRef(false);
|
1819
|
+
react.useEffect(() => {
|
1820
|
+
if (isMounted.current) {
|
1821
|
+
if (columnFilterValue === undefined) {
|
1822
|
+
setFilterValues([min, max]);
|
1823
|
+
}
|
1824
|
+
else if (Array.isArray(columnFilterValue)) {
|
1825
|
+
if (columnFilterValue[0] <= min && columnFilterValue[1] >= max) {
|
1826
|
+
column.setFilterValue(undefined);
|
1827
|
+
}
|
1828
|
+
else {
|
1829
|
+
setFilterValues(columnFilterValue);
|
1830
|
+
}
|
1831
|
+
}
|
1832
|
+
}
|
1833
|
+
isMounted.current = true;
|
1834
|
+
}, [column.getFilterValue()]);
|
1835
|
+
return (jsxRuntime.jsxs(material.Stack, { children: [jsxRuntime.jsx(material.Slider, Object.assign({ disableSwap: true, min: min, max: max, onChange: (_event, value) => {
|
1836
|
+
setFilterValues(value);
|
1837
|
+
}, onChangeCommitted: (_event, value) => {
|
1838
|
+
column.setFilterValue(value);
|
1839
|
+
}, value: filterValues, valueLabelDisplay: "auto" }, sliderProps, { slotProps: {
|
1840
|
+
input: {
|
1841
|
+
ref: (node) => {
|
1842
|
+
var _a, _b;
|
1843
|
+
if (node) {
|
1844
|
+
filterInputRefs.current[`${column.id}-0`] = node;
|
1845
|
+
// @ts-ignore
|
1846
|
+
if ((_b = (_a = sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.slotProps) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.ref) {
|
1847
|
+
//@ts-ignore
|
1848
|
+
sliderProps.slotProps.input.ref = node;
|
1849
|
+
}
|
1850
|
+
}
|
1851
|
+
},
|
1852
|
+
},
|
1853
|
+
}, sx: (theme) => (Object.assign({ m: 'auto', mt: !showChangeModeButton ? '10px' : '6px', px: '4px', width: 'calc(100% - 8px)' }, ((sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.sx) instanceof Function
|
1854
|
+
? sliderProps.sx(theme)
|
1855
|
+
: sliderProps === null || sliderProps === void 0 ? void 0 : sliderProps.sx))) })), showChangeModeButton ? (jsxRuntime.jsx(material.FormHelperText, { sx: {
|
1856
|
+
m: '-3px -6px',
|
1857
|
+
fontSize: '0.75rem',
|
1858
|
+
lineHeight: '0.8rem',
|
1859
|
+
whiteSpace: 'nowrap',
|
1860
|
+
}, children: localization.filterMode.replace('{filterType}',
|
1861
|
+
// @ts-ignore
|
1862
|
+
localization[`filter${((_b = currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.charAt(0)) === null || _b === void 0 ? void 0 : _b.toUpperCase()) +
|
1863
|
+
(currentFilterOption === null || currentFilterOption === void 0 ? void 0 : currentFilterOption.slice(1))}`]) })) : null] }));
|
1864
|
+
};
|
1865
|
+
|
1773
1866
|
const MRT_TableHeadCellFilterContainer = ({ header, table }) => {
|
1774
1867
|
const { getState } = table;
|
1775
1868
|
const { showColumnFilters } = getState();
|
1776
1869
|
const { column } = header;
|
1777
1870
|
const { columnDef } = column;
|
1778
|
-
return (jsxRuntime.jsx(Collapse__default["default"], { in: showColumnFilters, mountOnEnter: true, unmountOnExit: true, children: columnDef.filterVariant === 'checkbox' ? (jsxRuntime.jsx(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range' ||
|
1871
|
+
return (jsxRuntime.jsx(Collapse__default["default"], { in: showColumnFilters, mountOnEnter: true, unmountOnExit: true, children: columnDef.filterVariant === 'checkbox' ? (jsxRuntime.jsx(MRT_FilterCheckbox, { column: column, table: table })) : columnDef.filterVariant === 'range-slider' ? (jsxRuntime.jsx(MRT_FilterRangeSlider, { header: header, table: table })) : columnDef.filterVariant === 'range' ||
|
1779
1872
|
['between', 'betweenInclusive', 'inNumberRange'].includes(columnDef._filterFn) ? (jsxRuntime.jsx(MRT_FilterRangeFields, { header: header, table: table })) : (jsxRuntime.jsx(MRT_FilterTextField, { header: header, table: table })) }));
|
1780
1873
|
};
|
1781
1874
|
|
@@ -2925,7 +3018,23 @@ const MRT_TableRoot = (props) => {
|
|
2925
3018
|
: props.data;
|
2926
3019
|
}, [props.data, (_v = props.state) === null || _v === void 0 ? void 0 : _v.isLoading, (_w = props.state) === null || _w === void 0 ? void 0 : _w.showSkeletons]);
|
2927
3020
|
//@ts-ignore
|
2928
|
-
const table = Object.assign(Object.assign({}, reactTable.useReactTable(Object.assign(Object.assign({ getCoreRowModel: reactTable.getCoreRowModel(), getExpandedRowModel:
|
3021
|
+
const table = Object.assign(Object.assign({}, reactTable.useReactTable(Object.assign(Object.assign({ getCoreRowModel: reactTable.getCoreRowModel(), getExpandedRowModel: props.enableExpanding || props.enableGrouping
|
3022
|
+
? reactTable.getExpandedRowModel()
|
3023
|
+
: undefined, getFacetedMinMaxValues: props.enableFacetedValues
|
3024
|
+
? reactTable.getFacetedMinMaxValues()
|
3025
|
+
: undefined, getFacetedRowModel: props.enableFacetedValues
|
3026
|
+
? reactTable.getFacetedRowModel()
|
3027
|
+
: undefined, getFacetedUniqueValues: props.enableFacetedValues
|
3028
|
+
? reactTable.getFacetedUniqueValues()
|
3029
|
+
: undefined, getFilteredRowModel: props.enableColumnFilters ||
|
3030
|
+
props.enableGlobalFilter ||
|
3031
|
+
props.enableFilters
|
3032
|
+
? reactTable.getFilteredRowModel()
|
3033
|
+
: undefined, getGroupedRowModel: props.enableGrouping
|
3034
|
+
? reactTable.getGroupedRowModel()
|
3035
|
+
: undefined, getPaginationRowModel: props.enablePagination
|
3036
|
+
? reactTable.getPaginationRowModel()
|
3037
|
+
: undefined, getSortedRowModel: props.enableSorting ? reactTable.getSortedRowModel() : undefined, onColumnOrderChange: setColumnOrder, onGroupingChange: setGrouping, getSubRows: (row) => row === null || row === void 0 ? void 0 : row.subRows }, props), {
|
2929
3038
|
//@ts-ignore
|
2930
3039
|
columns: columnDefs, data, globalFilterFn: (_y = (_x = props.filterFns) === null || _x === void 0 ? void 0 : _x[globalFilterFn]) !== null && _y !== void 0 ? _y : (_z = props.filterFns) === null || _z === void 0 ? void 0 : _z.fuzzy, initialState, state: Object.assign({ columnFilterFns,
|
2931
3040
|
columnOrder,
|
@@ -2991,7 +3100,7 @@ const MRT_TableRoot = (props) => {
|
|
2991
3100
|
|
2992
3101
|
const MaterialReactTable = (_a) => {
|
2993
3102
|
var _b;
|
2994
|
-
var { aggregationFns, autoResetExpanded = false, columnResizeMode = 'onChange', defaultColumn, defaultDisplayColumn, editingMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = false, enableColumnResizing = false, enableDensityToggle = true, enableExpandAll = true, enableFilterMatchHighlighting = true, enableFilters = true, enableFullScreenToggle = true, enableGlobalFilter = true, enableGlobalFilterRankedResults = true, enableGrouping = false, enableHiding = true, enableMultiRowSelection = true, enableMultiSort = true, enablePagination = true, enablePinning = false, enableRowSelection = false, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, layoutMode = 'semantic', localization, manualFiltering, manualGrouping, manualPagination, manualSorting, positionActionsColumn = 'first', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberMode = 'original', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnResizeMode", "defaultColumn", "defaultDisplayColumn", "editingMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enablePinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "positionActionsColumn", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberMode", "selectAllMode", "sortingFns"]);
|
3103
|
+
var { aggregationFns, autoResetExpanded = false, columnResizeMode = 'onChange', defaultColumn, defaultDisplayColumn, editingMode = 'modal', enableBottomToolbar = true, enableColumnActions = true, enableColumnFilters = true, enableColumnOrdering = 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, enablePinning = false, enableRowSelection = false, enableSelectAll = true, enableSorting = true, enableStickyHeader = false, enableTableFooter = true, enableTableHead = true, enableToolbarInternalActions = true, enableTopToolbar = true, filterFns, icons, layoutMode = 'semantic', localization, manualFiltering, manualGrouping, manualPagination, manualSorting, positionActionsColumn = 'first', positionExpandColumn = 'first', positionGlobalFilter = 'right', positionPagination = 'bottom', positionToolbarAlertBanner = 'top', positionToolbarDropZone = 'top', rowNumberMode = 'original', selectAllMode = 'page', sortingFns } = _a, rest = __rest(_a, ["aggregationFns", "autoResetExpanded", "columnResizeMode", "defaultColumn", "defaultDisplayColumn", "editingMode", "enableBottomToolbar", "enableColumnActions", "enableColumnFilters", "enableColumnOrdering", "enableColumnResizing", "enableDensityToggle", "enableExpandAll", "enableExpanding", "enableFilterMatchHighlighting", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableGlobalFilterRankedResults", "enableGrouping", "enableHiding", "enableMultiRowSelection", "enableMultiSort", "enablePagination", "enablePinning", "enableRowSelection", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarInternalActions", "enableTopToolbar", "filterFns", "icons", "layoutMode", "localization", "manualFiltering", "manualGrouping", "manualPagination", "manualSorting", "positionActionsColumn", "positionExpandColumn", "positionGlobalFilter", "positionPagination", "positionToolbarAlertBanner", "positionToolbarDropZone", "rowNumberMode", "selectAllMode", "sortingFns"]);
|
2995
3104
|
const _icons = react.useMemo(() => (Object.assign(Object.assign({}, MRT_Default_Icons), icons)), [icons]);
|
2996
3105
|
const _localization = react.useMemo(() => (Object.assign(Object.assign({}, MRT_Localization_EN), localization)), [localization]);
|
2997
3106
|
const _aggregationFns = react.useMemo(() => (Object.assign(Object.assign({}, MRT_AggregationFns), aggregationFns)), []);
|
@@ -3014,7 +3123,7 @@ const MaterialReactTable = (_a) => {
|
|
3014
3123
|
manualPagination = true;
|
3015
3124
|
manualSorting = true;
|
3016
3125
|
}
|
3017
|
-
return (jsxRuntime.jsx(MRT_TableRoot, Object.assign({ aggregationFns: _aggregationFns, autoResetExpanded: autoResetExpanded, columnResizeMode: columnResizeMode, defaultColumn: _defaultColumn, defaultDisplayColumn: _defaultDisplayColumn, editingMode: editingMode, enableBottomToolbar: enableBottomToolbar, enableColumnActions: enableColumnActions, enableColumnFilters: enableColumnFilters, enableColumnOrdering: enableColumnOrdering, enableColumnResizing: enableColumnResizing, enableDensityToggle: enableDensityToggle, enableExpandAll: enableExpandAll, enableFilterMatchHighlighting: enableFilterMatchHighlighting, enableFilters: enableFilters, enableFullScreenToggle: enableFullScreenToggle, enableGlobalFilter: enableGlobalFilter, 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: _filterFns, icons: _icons, layoutMode: layoutMode, localization: _localization, manualFiltering: manualFiltering, manualGrouping: manualGrouping, manualPagination: manualPagination, manualSorting: manualSorting, positionActionsColumn: positionActionsColumn, positionExpandColumn: positionExpandColumn, positionGlobalFilter: positionGlobalFilter, positionPagination: positionPagination, positionToolbarAlertBanner: positionToolbarAlertBanner, positionToolbarDropZone: positionToolbarDropZone, rowNumberMode: rowNumberMode, selectAllMode: selectAllMode, sortingFns: _sortingFns }, rest)));
|
3126
|
+
return (jsxRuntime.jsx(MRT_TableRoot, Object.assign({ aggregationFns: _aggregationFns, autoResetExpanded: autoResetExpanded, columnResizeMode: columnResizeMode, defaultColumn: _defaultColumn, defaultDisplayColumn: _defaultDisplayColumn, editingMode: editingMode, enableBottomToolbar: enableBottomToolbar, enableColumnActions: enableColumnActions, enableColumnFilters: enableColumnFilters, enableColumnOrdering: enableColumnOrdering, enableColumnResizing: enableColumnResizing, enableDensityToggle: enableDensityToggle, enableExpandAll: enableExpandAll, enableExpanding: enableExpanding, enableFilterMatchHighlighting: enableFilterMatchHighlighting, enableFilters: enableFilters, enableFullScreenToggle: enableFullScreenToggle, enableGlobalFilter: enableGlobalFilter, 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: _filterFns, icons: _icons, layoutMode: layoutMode, localization: _localization, manualFiltering: manualFiltering, manualGrouping: manualGrouping, manualPagination: manualPagination, manualSorting: manualSorting, positionActionsColumn: positionActionsColumn, positionExpandColumn: positionExpandColumn, positionGlobalFilter: positionGlobalFilter, positionPagination: positionPagination, positionToolbarAlertBanner: positionToolbarAlertBanner, positionToolbarDropZone: positionToolbarDropZone, rowNumberMode: rowNumberMode, selectAllMode: selectAllMode, sortingFns: _sortingFns }, rest)));
|
3018
3127
|
};
|
3019
3128
|
|
3020
3129
|
exports.MRT_AggregationFns = MRT_AggregationFns;
|