@mui/x-data-grid-premium 8.0.0-beta.2 → 8.0.0-beta.3
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/CHANGELOG.md +141 -0
- package/DataGridPremium/DataGridPremium.js +23 -17
- package/components/export/ExportExcel.js +4 -129
- package/esm/DataGridPremium/DataGridPremium.js +23 -17
- package/esm/components/export/ExportExcel.js +4 -129
- package/esm/hooks/features/aggregation/useGridAggregation.js +4 -4
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +6 -6
- package/esm/hooks/features/clipboard/useGridClipboardImport.js +4 -4
- package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +1 -1
- package/esm/hooks/features/export/useGridExcelExport.js +2 -2
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +5 -5
- package/esm/index.js +1 -1
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/aggregation/useGridAggregation.js +3 -3
- package/hooks/features/cellSelection/useGridCellSelection.js +5 -5
- package/hooks/features/clipboard/useGridClipboardImport.js +3 -3
- package/hooks/features/dataSource/useGridDataSourcePremium.js +1 -1
- package/hooks/features/export/useGridExcelExport.js +1 -1
- package/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/index.js +1 -1
- package/modern/DataGridPremium/DataGridPremium.js +23 -17
- package/modern/components/export/ExportExcel.js +4 -129
- package/modern/hooks/features/aggregation/useGridAggregation.js +4 -4
- package/modern/hooks/features/cellSelection/useGridCellSelection.js +6 -6
- package/modern/hooks/features/clipboard/useGridClipboardImport.js +4 -4
- package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +1 -1
- package/modern/hooks/features/export/useGridExcelExport.js +2 -2
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +5 -5
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +9 -9
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/releaseInfo.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
const _excluded = ["worker", "exceljsPostProcess", "exceljsPreProcess", "columnsStyles", "includeHeaders", "getRowsToExport", "valueOptionsSheetName"];
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { useGridApiMethod, useGridLogger,
|
|
4
|
+
import { useGridApiMethod, useGridLogger, useGridEventPriority } from '@mui/x-data-grid';
|
|
5
5
|
import { useGridRegisterPipeProcessor, exportAs, getColumnsToExport, defaultGetRowsToExport } from '@mui/x-data-grid/internals';
|
|
6
6
|
import { buildExcel, getDataForValueOptionsSheet, serializeColumns, serializeRowUnsafe } from "./serializer/excelSerializer.js";
|
|
7
7
|
import { GridExcelExportMenuItem } from "../../../components/index.js";
|
|
@@ -135,5 +135,5 @@ export const useGridExcelExport = (apiRef, props) => {
|
|
|
135
135
|
}];
|
|
136
136
|
}, []);
|
|
137
137
|
useGridRegisterPipeProcessor(apiRef, 'exportMenu', addExportMenuButtons);
|
|
138
|
-
|
|
138
|
+
useGridEventPriority(apiRef, 'excelExportStateChange', props.onExcelExportStateChange);
|
|
139
139
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useGridEvent, useGridApiMethod, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { useGridRegisterPipeProcessor, GridStrategyGroup } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
6
6
|
import { getRowGroupingFieldFromGroupingCriteria, RowGroupingStrategy, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from "./gridRowGroupingUtils.js";
|
|
@@ -166,10 +166,10 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}, [apiRef, props.disableRowGrouping]);
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
useGridEvent(apiRef, 'cellKeyDown', handleCellKeyDown);
|
|
170
|
+
useGridEvent(apiRef, 'columnsChange', checkGroupingColumnsModelDiff);
|
|
171
|
+
useGridEvent(apiRef, 'rowGroupingModelChange', checkGroupingColumnsModelDiff);
|
|
172
|
+
useGridEvent(apiRef, 'rowGroupingModelChange', () => apiRef.current.dataSource.fetchRows());
|
|
173
173
|
|
|
174
174
|
/*
|
|
175
175
|
* EFFECTS
|
package/esm/index.js
CHANGED
package/esm/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTc0MzYzMTIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -97,9 +97,9 @@ const useGridAggregation = (apiRef, props) => {
|
|
|
97
97
|
apiRef.current.requestPipeProcessorsApplication('hydrateColumns');
|
|
98
98
|
}
|
|
99
99
|
}, [apiRef, applyAggregation, props.aggregationFunctions, props.disableAggregation, props.dataSource]);
|
|
100
|
-
(0, _xDataGridPro.
|
|
101
|
-
(0, _xDataGridPro.
|
|
102
|
-
(0, _xDataGridPro.
|
|
100
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'aggregationModelChange', checkAggregationRulesDiff);
|
|
101
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'columnsChange', checkAggregationRulesDiff);
|
|
102
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'filteredRowsSet', applyAggregation);
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* EFFECTS
|
|
@@ -363,11 +363,11 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
363
363
|
field
|
|
364
364
|
}, cellWithVirtualFocus.current);
|
|
365
365
|
});
|
|
366
|
-
(0, _xDataGridPro.
|
|
367
|
-
(0, _xDataGridPro.
|
|
368
|
-
(0, _xDataGridPro.
|
|
369
|
-
(0, _xDataGridPro.
|
|
370
|
-
(0, _xDataGridPro.
|
|
366
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'cellClick', runIfCellSelectionIsEnabled(handleCellClick));
|
|
367
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'cellFocusIn', runIfCellSelectionIsEnabled(handleCellFocusIn));
|
|
368
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'cellKeyDown', runIfCellSelectionIsEnabled(handleCellKeyDown));
|
|
369
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'cellMouseDown', runIfCellSelectionIsEnabled(handleCellMouseDown));
|
|
370
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'cellMouseOver', runIfCellSelectionIsEnabled(handleCellMouseOver));
|
|
371
371
|
React.useEffect(() => {
|
|
372
372
|
if (props.cellSelectionModel) {
|
|
373
373
|
apiRef.current.setCellSelectionModel(props.cellSelectionModel);
|
|
@@ -336,9 +336,9 @@ const useGridClipboardImport = (apiRef, props) => {
|
|
|
336
336
|
}
|
|
337
337
|
return initialValue;
|
|
338
338
|
}, [enableClipboardPaste]);
|
|
339
|
-
(0, _xDataGrid.
|
|
340
|
-
(0, _xDataGrid.
|
|
341
|
-
(0, _xDataGrid.
|
|
339
|
+
(0, _xDataGrid.useGridEvent)(apiRef, 'cellKeyDown', handlePaste);
|
|
340
|
+
(0, _xDataGrid.useGridEventPriority)(apiRef, 'clipboardPasteStart', props.onClipboardPasteStart);
|
|
341
|
+
(0, _xDataGrid.useGridEventPriority)(apiRef, 'clipboardPasteEnd', props.onClipboardPasteEnd);
|
|
342
342
|
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'canStartEditing', checkIfCanStartEditing);
|
|
343
343
|
};
|
|
344
344
|
exports.useGridClipboardImport = useGridClipboardImport;
|
|
@@ -59,7 +59,7 @@ const useGridDataSourcePremium = (apiRef, props) => {
|
|
|
59
59
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, strategyProcessor.strategyName, strategyProcessor.group, strategyProcessor.processor);
|
|
60
60
|
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'processDataSourceRows', processDataSourceRows);
|
|
61
61
|
Object.entries(events).forEach(([event, handler]) => {
|
|
62
|
-
(0, _xDataGridPro.
|
|
62
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, event, handler);
|
|
63
63
|
});
|
|
64
64
|
React.useEffect(() => {
|
|
65
65
|
setStrategyAvailability();
|
|
@@ -143,6 +143,6 @@ const useGridExcelExport = (apiRef, props) => {
|
|
|
143
143
|
}];
|
|
144
144
|
}, []);
|
|
145
145
|
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'exportMenu', addExportMenuButtons);
|
|
146
|
-
(0, _xDataGrid.
|
|
146
|
+
(0, _xDataGrid.useGridEventPriority)(apiRef, 'excelExportStateChange', props.onExcelExportStateChange);
|
|
147
147
|
};
|
|
148
148
|
exports.useGridExcelExport = useGridExcelExport;
|
|
@@ -175,10 +175,10 @@ const useGridRowGrouping = (apiRef, props) => {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}, [apiRef, props.disableRowGrouping]);
|
|
178
|
-
(0, _xDataGridPro.
|
|
179
|
-
(0, _xDataGridPro.
|
|
180
|
-
(0, _xDataGridPro.
|
|
181
|
-
(0, _xDataGridPro.
|
|
178
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'cellKeyDown', handleCellKeyDown);
|
|
179
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'columnsChange', checkGroupingColumnsModelDiff);
|
|
180
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'rowGroupingModelChange', checkGroupingColumnsModelDiff);
|
|
181
|
+
(0, _xDataGridPro.useGridEvent)(apiRef, 'rowGroupingModelChange', () => apiRef.current.dataSource.fetchRows());
|
|
182
182
|
|
|
183
183
|
/*
|
|
184
184
|
* EFFECTS
|
package/index.js
CHANGED
|
@@ -79,11 +79,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
79
79
|
current: PropTypes.object
|
|
80
80
|
}),
|
|
81
81
|
/**
|
|
82
|
-
* The label of the Data Grid.
|
|
82
|
+
* The `aria-label` of the Data Grid.
|
|
83
83
|
*/
|
|
84
84
|
'aria-label': PropTypes.string,
|
|
85
85
|
/**
|
|
86
|
-
* The id of the element containing a label for the Data Grid.
|
|
86
|
+
* The `id` of the element containing a label for the Data Grid.
|
|
87
87
|
*/
|
|
88
88
|
'aria-labelledby': PropTypes.string,
|
|
89
89
|
/**
|
|
@@ -508,6 +508,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
508
508
|
* @default false
|
|
509
509
|
*/
|
|
510
510
|
keepNonExistentRowsSelected: PropTypes.bool,
|
|
511
|
+
/**
|
|
512
|
+
* The label of the Data Grid.
|
|
513
|
+
* If the `showToolbar` prop is `true`, the label will be displayed in the toolbar and applied to the `aria-label` attribute of the grid.
|
|
514
|
+
* If the `showToolbar` prop is `false`, the label will not be visible but will be applied to the `aria-label` attribute of the grid.
|
|
515
|
+
*/
|
|
516
|
+
label: PropTypes.string,
|
|
511
517
|
/**
|
|
512
518
|
* Used together with `dataSource` to enable lazy loading.
|
|
513
519
|
* If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
|
|
@@ -520,6 +526,21 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
520
526
|
* @default 500
|
|
521
527
|
*/
|
|
522
528
|
lazyLoadingRequestThrottleMs: PropTypes.number,
|
|
529
|
+
/**
|
|
530
|
+
* If `true`, displays the data in a list view.
|
|
531
|
+
* Use in combination with `listViewColumn`.
|
|
532
|
+
*/
|
|
533
|
+
listView: PropTypes.bool,
|
|
534
|
+
/**
|
|
535
|
+
* Definition of the column rendered when the `listView` prop is enabled.
|
|
536
|
+
*/
|
|
537
|
+
listViewColumn: PropTypes.shape({
|
|
538
|
+
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
539
|
+
cellClassName: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
540
|
+
display: PropTypes.oneOf(['flex', 'text']),
|
|
541
|
+
field: PropTypes.string.isRequired,
|
|
542
|
+
renderCell: PropTypes.func
|
|
543
|
+
}),
|
|
523
544
|
/**
|
|
524
545
|
* If `true`, a loading overlay is displayed.
|
|
525
546
|
* @default false
|
|
@@ -1087,21 +1108,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1087
1108
|
* @default false
|
|
1088
1109
|
*/
|
|
1089
1110
|
treeData: PropTypes.bool,
|
|
1090
|
-
/**
|
|
1091
|
-
* Definition of the column rendered when the `unstable_listView` prop is enabled.
|
|
1092
|
-
*/
|
|
1093
|
-
unstable_listColumn: PropTypes.shape({
|
|
1094
|
-
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
1095
|
-
cellClassName: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
1096
|
-
display: PropTypes.oneOf(['flex', 'text']),
|
|
1097
|
-
field: PropTypes.string.isRequired,
|
|
1098
|
-
renderCell: PropTypes.func
|
|
1099
|
-
}),
|
|
1100
|
-
/**
|
|
1101
|
-
* If `true`, displays the data in a list view.
|
|
1102
|
-
* Use in combination with `unstable_listColumn`.
|
|
1103
|
-
*/
|
|
1104
|
-
unstable_listView: PropTypes.bool,
|
|
1105
1111
|
/**
|
|
1106
1112
|
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
1107
1113
|
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
@@ -47,113 +47,9 @@ process.env.NODE_ENV !== "production" ? ExportExcel.propTypes = {
|
|
|
47
47
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
48
48
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
49
49
|
// ----------------------------------------------------------------------
|
|
50
|
-
/**
|
|
51
|
-
* A ref for imperative actions.
|
|
52
|
-
* It currently only supports `focusVisible()` action.
|
|
53
|
-
*/
|
|
54
|
-
action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
55
|
-
current: PropTypes.shape({
|
|
56
|
-
focusVisible: PropTypes.func.isRequired
|
|
57
|
-
})
|
|
58
|
-
})]),
|
|
59
|
-
/**
|
|
60
|
-
* If `true`, the ripples are centered.
|
|
61
|
-
* They won't start at the cursor interaction position.
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
centerRipple: PropTypes.bool,
|
|
65
50
|
className: PropTypes.string,
|
|
66
|
-
/**
|
|
67
|
-
* The color of the component.
|
|
68
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
69
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
70
|
-
* @default 'primary'
|
|
71
|
-
*/
|
|
72
|
-
color: PropTypes.oneOf(['error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
|
|
73
|
-
component: PropTypes.elementType,
|
|
74
|
-
/**
|
|
75
|
-
* If `true`, the component is disabled.
|
|
76
|
-
*/
|
|
77
51
|
disabled: PropTypes.bool,
|
|
78
|
-
|
|
79
|
-
* If `true`, no elevation is used.
|
|
80
|
-
* @default false
|
|
81
|
-
*/
|
|
82
|
-
disableElevation: PropTypes.bool,
|
|
83
|
-
/**
|
|
84
|
-
* If `true`, the keyboard focus ripple is disabled.
|
|
85
|
-
* @default false
|
|
86
|
-
*/
|
|
87
|
-
disableFocusRipple: PropTypes.bool,
|
|
88
|
-
/**
|
|
89
|
-
* If `true`, the ripple effect is disabled.
|
|
90
|
-
*
|
|
91
|
-
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
92
|
-
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
93
|
-
* @default false
|
|
94
|
-
*/
|
|
95
|
-
disableRipple: PropTypes.bool,
|
|
96
|
-
/**
|
|
97
|
-
* If `true`, the touch ripple effect is disabled.
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
disableTouchRipple: PropTypes.bool,
|
|
101
|
-
/**
|
|
102
|
-
* Element placed after the children.
|
|
103
|
-
*/
|
|
104
|
-
endIcon: PropTypes.node,
|
|
105
|
-
/**
|
|
106
|
-
* If `true`, the base button will have a keyboard focus ripple.
|
|
107
|
-
* @default false
|
|
108
|
-
*/
|
|
109
|
-
focusRipple: PropTypes.bool,
|
|
110
|
-
/**
|
|
111
|
-
* This prop can help identify which element has keyboard focus.
|
|
112
|
-
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
113
|
-
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
114
|
-
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
115
|
-
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
116
|
-
* if needed.
|
|
117
|
-
*/
|
|
118
|
-
focusVisibleClassName: PropTypes.string,
|
|
119
|
-
/**
|
|
120
|
-
* If `true`, the button will take up the full width of its container.
|
|
121
|
-
* @default false
|
|
122
|
-
*/
|
|
123
|
-
fullWidth: PropTypes.bool,
|
|
124
|
-
/**
|
|
125
|
-
* The URL to link to when the button is clicked.
|
|
126
|
-
* If defined, an `a` element will be used as the root node.
|
|
127
|
-
*/
|
|
128
|
-
href: PropTypes.string,
|
|
129
|
-
/**
|
|
130
|
-
* The component used to render a link when the `href` prop is provided.
|
|
131
|
-
* @default 'a'
|
|
132
|
-
*/
|
|
133
|
-
LinkComponent: PropTypes.elementType,
|
|
134
|
-
/**
|
|
135
|
-
* If `true`, the loading indicator is visible and the button is disabled.
|
|
136
|
-
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
137
|
-
* @default null
|
|
138
|
-
*/
|
|
139
|
-
loading: PropTypes.bool,
|
|
140
|
-
/**
|
|
141
|
-
* Element placed before the children if the button is in loading state.
|
|
142
|
-
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
143
|
-
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
144
|
-
* @default <CircularProgress color="inherit" size={16} />
|
|
145
|
-
*/
|
|
146
|
-
loadingIndicator: PropTypes.node,
|
|
147
|
-
/**
|
|
148
|
-
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
149
|
-
* @default 'center'
|
|
150
|
-
*/
|
|
151
|
-
loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),
|
|
152
|
-
/**
|
|
153
|
-
* Callback fired when the component is focused with a keyboard.
|
|
154
|
-
* We trigger a `onFocus` callback too.
|
|
155
|
-
*/
|
|
156
|
-
onFocusVisible: PropTypes.func,
|
|
52
|
+
id: PropTypes.string,
|
|
157
53
|
/**
|
|
158
54
|
* The options to apply on the Excel export.
|
|
159
55
|
* @demos
|
|
@@ -177,33 +73,12 @@ process.env.NODE_ENV !== "production" ? ExportExcel.propTypes = {
|
|
|
177
73
|
* A function to customize rendering of the component.
|
|
178
74
|
*/
|
|
179
75
|
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
180
|
-
|
|
181
|
-
* The size of the component.
|
|
182
|
-
* `small` is equivalent to the dense button styling.
|
|
183
|
-
*/
|
|
76
|
+
role: PropTypes.string,
|
|
184
77
|
size: PropTypes.oneOf(['large', 'medium', 'small']),
|
|
185
|
-
/**
|
|
186
|
-
* Element placed before the children.
|
|
187
|
-
*/
|
|
188
78
|
startIcon: PropTypes.node,
|
|
189
79
|
style: PropTypes.object,
|
|
190
|
-
/**
|
|
191
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
192
|
-
*/
|
|
193
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
194
80
|
tabIndex: PropTypes.number,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
*/
|
|
198
|
-
TouchRippleProps: PropTypes.object,
|
|
199
|
-
/**
|
|
200
|
-
* A ref that points to the `TouchRipple` element.
|
|
201
|
-
*/
|
|
202
|
-
touchRippleRef: PropTypes.any,
|
|
203
|
-
/**
|
|
204
|
-
* The variant to use.
|
|
205
|
-
* @default 'text'
|
|
206
|
-
*/
|
|
207
|
-
variant: PropTypes.oneOf(['contained', 'outlined', 'text'])
|
|
81
|
+
title: PropTypes.string,
|
|
82
|
+
touchRippleRef: PropTypes.any
|
|
208
83
|
} : void 0;
|
|
209
84
|
export { ExportExcel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { gridColumnLookupSelector,
|
|
3
|
+
import { gridColumnLookupSelector, useGridEvent, useGridApiMethod } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
6
6
|
import { getAggregationRules, mergeStateWithAggregationModel, areAggregationRulesEqual } from "./gridAggregationUtils.js";
|
|
@@ -88,9 +88,9 @@ export const useGridAggregation = (apiRef, props) => {
|
|
|
88
88
|
apiRef.current.requestPipeProcessorsApplication('hydrateColumns');
|
|
89
89
|
}
|
|
90
90
|
}, [apiRef, applyAggregation, props.aggregationFunctions, props.disableAggregation, props.dataSource]);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
useGridEvent(apiRef, 'aggregationModelChange', checkAggregationRulesDiff);
|
|
92
|
+
useGridEvent(apiRef, 'columnsChange', checkAggregationRulesDiff);
|
|
93
|
+
useGridEvent(apiRef, 'filteredRowsSet', applyAggregation);
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* EFFECTS
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
4
4
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
5
5
|
import { getTotalHeaderHeight, getVisibleRows, isNavigationKey, serializeCellValue, useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
6
|
-
import {
|
|
6
|
+
import { useGridEvent, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, gridClasses, gridFocusCellSelector, GRID_REORDER_COL_DEF, gridSortedRowIdsSelector, gridDimensionsSelector } from '@mui/x-data-grid-pro';
|
|
7
7
|
import { gridCellSelectionStateSelector } from "./gridCellSelectionSelector.js";
|
|
8
8
|
export const cellSelectionStateInitializer = (state, props) => _extends({}, state, {
|
|
9
9
|
cellSelection: _extends({}, props.cellSelectionModel ?? props.initialState?.cellSelection)
|
|
@@ -354,11 +354,11 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
354
354
|
field
|
|
355
355
|
}, cellWithVirtualFocus.current);
|
|
356
356
|
});
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
357
|
+
useGridEvent(apiRef, 'cellClick', runIfCellSelectionIsEnabled(handleCellClick));
|
|
358
|
+
useGridEvent(apiRef, 'cellFocusIn', runIfCellSelectionIsEnabled(handleCellFocusIn));
|
|
359
|
+
useGridEvent(apiRef, 'cellKeyDown', runIfCellSelectionIsEnabled(handleCellKeyDown));
|
|
360
|
+
useGridEvent(apiRef, 'cellMouseDown', runIfCellSelectionIsEnabled(handleCellMouseDown));
|
|
361
|
+
useGridEvent(apiRef, 'cellMouseOver', runIfCellSelectionIsEnabled(handleCellMouseOver));
|
|
362
362
|
React.useEffect(() => {
|
|
363
363
|
if (props.cellSelectionModel) {
|
|
364
364
|
apiRef.current.setCellSelectionModel(props.cellSelectionModel);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector,
|
|
3
|
+
import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridEventPriority, useGridEvent, gridPaginatedVisibleSortedGridRowIdsSelector, gridExpandedSortedRowIdsSelector, gridRowSelectionIdsSelector, gridRowSelectionCountSelector } from '@mui/x-data-grid';
|
|
4
4
|
import { getRowIdFromRowModel, getActiveElement, useGridRegisterPipeProcessor, getPublicApiRef, isPasteShortcut, useGridLogger } from '@mui/x-data-grid/internals';
|
|
5
5
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
6
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_REORDER_COL_DEF } from '@mui/x-data-grid-pro';
|
|
@@ -328,8 +328,8 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
328
328
|
}
|
|
329
329
|
return initialValue;
|
|
330
330
|
}, [enableClipboardPaste]);
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
331
|
+
useGridEvent(apiRef, 'cellKeyDown', handlePaste);
|
|
332
|
+
useGridEventPriority(apiRef, 'clipboardPasteStart', props.onClipboardPasteStart);
|
|
333
|
+
useGridEventPriority(apiRef, 'clipboardPasteEnd', props.onClipboardPasteEnd);
|
|
334
334
|
useGridRegisterPipeProcessor(apiRef, 'canStartEditing', checkIfCanStartEditing);
|
|
335
335
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useGridEvent as addEventHandler, useGridApiMethod, GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { useGridDataSourceBasePro, useGridRegisterStrategyProcessor, useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
function getKeyPremium(params) {
|
|
6
6
|
return JSON.stringify([params.filterModel, params.sortModel, params.groupKeys, params.groupFields, params.start, params.end, params.aggregationModel]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
const _excluded = ["worker", "exceljsPostProcess", "exceljsPreProcess", "columnsStyles", "includeHeaders", "getRowsToExport", "valueOptionsSheetName"];
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { useGridApiMethod, useGridLogger,
|
|
4
|
+
import { useGridApiMethod, useGridLogger, useGridEventPriority } from '@mui/x-data-grid';
|
|
5
5
|
import { useGridRegisterPipeProcessor, exportAs, getColumnsToExport, defaultGetRowsToExport } from '@mui/x-data-grid/internals';
|
|
6
6
|
import { buildExcel, getDataForValueOptionsSheet, serializeColumns, serializeRowUnsafe } from "./serializer/excelSerializer.js";
|
|
7
7
|
import { GridExcelExportMenuItem } from "../../../components/index.js";
|
|
@@ -135,5 +135,5 @@ export const useGridExcelExport = (apiRef, props) => {
|
|
|
135
135
|
}];
|
|
136
136
|
}, []);
|
|
137
137
|
useGridRegisterPipeProcessor(apiRef, 'exportMenu', addExportMenuButtons);
|
|
138
|
-
|
|
138
|
+
useGridEventPriority(apiRef, 'excelExportStateChange', props.onExcelExportStateChange);
|
|
139
139
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useGridEvent, useGridApiMethod, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { useGridRegisterPipeProcessor, GridStrategyGroup } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
6
6
|
import { getRowGroupingFieldFromGroupingCriteria, RowGroupingStrategy, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from "./gridRowGroupingUtils.js";
|
|
@@ -166,10 +166,10 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}, [apiRef, props.disableRowGrouping]);
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
useGridEvent(apiRef, 'cellKeyDown', handleCellKeyDown);
|
|
170
|
+
useGridEvent(apiRef, 'columnsChange', checkGroupingColumnsModelDiff);
|
|
171
|
+
useGridEvent(apiRef, 'rowGroupingModelChange', checkGroupingColumnsModelDiff);
|
|
172
|
+
useGridEvent(apiRef, 'rowGroupingModelChange', () => apiRef.current.dataSource.fetchRows());
|
|
173
173
|
|
|
174
174
|
/*
|
|
175
175
|
* EFFECTS
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTc0MzYzMTIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.3",
|
|
4
4
|
"description": "The Premium plan edition of the Data Grid Components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -33,23 +33,23 @@
|
|
|
33
33
|
"directory": "packages/x-data-grid-premium"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@babel/runtime": "^7.
|
|
37
|
-
"@mui/utils": "^7.0.0
|
|
36
|
+
"@babel/runtime": "^7.27.0",
|
|
37
|
+
"@mui/utils": "^7.0.0",
|
|
38
38
|
"@types/format-util": "^1.0.4",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"exceljs": "^4.4.0",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
42
|
"reselect": "^5.1.1",
|
|
43
|
-
"@mui/x-
|
|
44
|
-
"@mui/x-
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-
|
|
43
|
+
"@mui/x-data-grid": "8.0.0-beta.3",
|
|
44
|
+
"@mui/x-data-grid-pro": "8.0.0-beta.3",
|
|
45
|
+
"@mui/x-internals": "8.0.0-beta.3",
|
|
46
|
+
"@mui/x-license": "8.0.0-beta.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|
|
50
50
|
"@emotion/styled": "^11.8.1",
|
|
51
|
-
"@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0
|
|
52
|
-
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0
|
|
51
|
+
"@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
52
|
+
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
53
53
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
54
54
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
55
55
|
},
|