@dooherceg/material-react-table 3.2.11 → 3.2.12
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.esm.js +22 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1679,7 +1679,13 @@ const MRT_ExpandAllButton = (_a) => {
|
|
|
1679
1679
|
table,
|
|
1680
1680
|
})), rest);
|
|
1681
1681
|
const isAllRowsExpanded = getIsAllRowsExpanded();
|
|
1682
|
-
|
|
1682
|
+
const handleToggleExpandAll = (event) => {
|
|
1683
|
+
var _a;
|
|
1684
|
+
event.stopPropagation();
|
|
1685
|
+
toggleAllRowsExpanded(!isAllRowsExpanded);
|
|
1686
|
+
(_a = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(iconButtonProps, event);
|
|
1687
|
+
};
|
|
1688
|
+
return (jsxRuntime.jsx(Tooltip, Object.assign({}, getCommonTooltipProps(), { title: (_b = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.title) !== null && _b !== void 0 ? _b : (isAllRowsExpanded ? localization.collapseAll : localization.expandAll), children: jsxRuntime.jsx("span", { children: jsxRuntime.jsx(IconButton, Object.assign({ "aria-label": localization.expandAll, disabled: isLoading || (!renderDetailPanel && !getCanSomeRowsExpand()) }, iconButtonProps, { onClick: handleToggleExpandAll, sx: (theme) => (Object.assign({ height: density === 'compact' ? '1.75rem' : '2.25rem', mt: density !== 'compact' ? '-0.25rem' : undefined, width: density === 'compact' ? '1.75rem' : '2.25rem' }, parseFromValuesOrFunc(iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.sx, theme))), title: undefined, children: (_c = iconButtonProps === null || iconButtonProps === void 0 ? void 0 : iconButtonProps.children) !== null && _c !== void 0 ? _c : (jsxRuntime.jsx(KeyboardDoubleArrowDownIcon, { style: {
|
|
1683
1689
|
transform: `rotate(${isAllRowsExpanded ? -180 : getIsSomeRowsExpanded() ? -90 : 0}deg)`,
|
|
1684
1690
|
transition: 'transform 150ms',
|
|
1685
1691
|
} })) })) }) })));
|
|
@@ -1722,18 +1728,29 @@ const MRT_ExpandButton = ({ row, staticRowIndex, table, }) => {
|
|
|
1722
1728
|
const INSERT_HERE_TOOLTIP = 'Insert here';
|
|
1723
1729
|
const ACTION_ICON_SIZE$1 = 'small';
|
|
1724
1730
|
const MRT_InsertHereAction = ({ onClick, }) => {
|
|
1725
|
-
|
|
1731
|
+
const handleClick = (event) => {
|
|
1732
|
+
event.stopPropagation();
|
|
1733
|
+
onClick();
|
|
1734
|
+
};
|
|
1735
|
+
return (jsxRuntime.jsx(Tooltip, { title: INSERT_HERE_TOOLTIP, disableInteractive: true, children: jsxRuntime.jsx(IconButton, { onClick: handleClick, size: ACTION_ICON_SIZE$1, children: jsxRuntime.jsx(SubdirectoryArrowLeftIcon, { color: "warning" }) }) }));
|
|
1726
1736
|
};
|
|
1727
1737
|
|
|
1728
1738
|
const MOVE_TO_TOP_TOOLTIP = 'Move to top level';
|
|
1729
1739
|
const ACTION_ICON_SIZE = 'small';
|
|
1730
1740
|
const ACTION_BUTTON_HEIGHT = '1.75rem';
|
|
1731
1741
|
const MRT_MoveToTopAction = ({ onClick }) => {
|
|
1732
|
-
|
|
1742
|
+
const handleClick = (event) => {
|
|
1743
|
+
event.stopPropagation();
|
|
1744
|
+
onClick();
|
|
1745
|
+
};
|
|
1746
|
+
return (jsxRuntime.jsx(Tooltip, { title: MOVE_TO_TOP_TOOLTIP, disableInteractive: true, children: jsxRuntime.jsx(IconButton, { onClick: handleClick, size: ACTION_ICON_SIZE, sx: { height: ACTION_BUTTON_HEIGHT }, children: jsxRuntime.jsx(VerticalAlignTopIcon, { fontSize: "small" }) }) }));
|
|
1733
1747
|
};
|
|
1734
1748
|
|
|
1735
1749
|
const MRT_ReorderRowCheckbox = ({ onChange, isSelected, }) => {
|
|
1736
|
-
|
|
1750
|
+
const handleClick = (event) => {
|
|
1751
|
+
event.stopPropagation();
|
|
1752
|
+
};
|
|
1753
|
+
return (jsxRuntime.jsx(Checkbox, { checked: isSelected, color: "warning", disableRipple: true, onChange: onChange, onClick: handleClick, sx: {
|
|
1737
1754
|
color: (theme) => theme.palette.warning.main,
|
|
1738
1755
|
'&.Mui-checked': {
|
|
1739
1756
|
color: (theme) => theme.palette.warning.main,
|
|
@@ -2004,7 +2021,7 @@ const getMRT_RowExpandColumnDef = (tableOptions) => {
|
|
|
2004
2021
|
});
|
|
2005
2022
|
if (groupedColumnMode === 'remove' && row.groupingColumnId) {
|
|
2006
2023
|
const defaultGroupedCell = (jsxRuntime.jsx(Tooltip, Object.assign({}, getCommonTooltipProps('right'), { title: table.getColumn(row.groupingColumnId).columnDef.header, children: jsxRuntime.jsx("span", { children: row.groupingValue }) })));
|
|
2007
|
-
return (jsxRuntime.jsxs(Stack, { alignItems: "center", flexDirection: "row", gap: TREE_REORDER_ICON_SPACING, onMouseEnter: cellLogic.handleRowHoverEnter, onMouseLeave: cellLogic.handleRowHoverLeave,
|
|
2024
|
+
return (jsxRuntime.jsxs(Stack, { alignItems: "center", flexDirection: "row", gap: TREE_REORDER_ICON_SPACING, onMouseEnter: cellLogic.handleRowHoverEnter, onMouseLeave: cellLogic.handleRowHoverLeave, children: [jsxRuntime.jsx(MRT_ExpandButton, Object.assign({}, expandButtonProps)), column.columnDef.GroupedCell
|
|
2008
2025
|
? customGroupedCell
|
|
2009
2026
|
: defaultGroupedCell, cellLogic.shouldShowReorderCheckbox && (jsxRuntime.jsx(MRT_ReorderRowCheckbox, { isSelected: cellLogic.isReorderCheckboxSelected, onChange: cellLogic.handleReorderCheckboxChange })), cellLogic.shouldShowInsertHereAction && (jsxRuntime.jsx(MRT_InsertHereAction, { onClick: cellLogic.handleInsertHereActionClick })), !!subRowsLength && jsxRuntime.jsxs("span", { children: ["(", subRowsLength, ")"] })] }));
|
|
2010
2027
|
}
|