@mui/x-data-grid-pro 5.7.0 → 5.8.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/CHANGELOG.md +74 -0
- package/DataGridPro/DataGridPro.d.ts +7 -1
- package/DataGridPro/DataGridPro.js +29 -5
- package/DataGridPro/useDataGridProComponent.js +2 -3
- package/DataGridPro/useDataGridProProps.d.ts +2 -1
- package/components/GridDetailPanelToggleCell.js +2 -2
- package/components/GridGroupingCriteriaCell.d.ts +2 -5
- package/components/GridGroupingCriteriaCell.js +2 -74
- package/components/GridTreeDataGroupingCell.js +2 -2
- package/hooks/features/columnPinning/useGridColumnPinning.js +6 -6
- package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +2 -2
- package/hooks/features/columnReorder/useGridColumnReorder.js +1 -1
- package/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -2
- package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +1 -1
- package/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +2 -2
- package/hooks/features/treeData/useGridTreeDataPreProcessors.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/legacy/DataGridPro/DataGridPro.js +29 -5
- package/legacy/DataGridPro/useDataGridProComponent.js +2 -3
- package/legacy/components/GridDetailPanelToggleCell.js +2 -2
- package/legacy/components/GridGroupingCriteriaCell.js +2 -74
- package/legacy/components/GridTreeDataGroupingCell.js +2 -2
- package/legacy/hooks/features/columnPinning/useGridColumnPinning.js +6 -6
- package/legacy/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +2 -2
- package/legacy/hooks/features/columnReorder/useGridColumnReorder.js +1 -1
- package/legacy/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/legacy/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -2
- package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/legacy/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +2 -2
- package/legacy/hooks/features/treeData/useGridTreeDataPreProcessors.js +2 -2
- package/legacy/index.js +2 -2
- package/legacy/utils/releaseInfo.js +1 -1
- package/models/dataGridProProps.d.ts +9 -8
- package/models/gridGroupingColDefOverride.d.ts +2 -2
- package/models/gridGroupingValueGetterParams.d.ts +1 -1
- package/modern/DataGridPro/DataGridPro.js +29 -5
- package/modern/DataGridPro/useDataGridProComponent.js +2 -3
- package/modern/components/GridDetailPanelToggleCell.js +2 -2
- package/modern/components/GridGroupingCriteriaCell.js +2 -74
- package/modern/components/GridTreeDataGroupingCell.js +2 -2
- package/modern/hooks/features/columnPinning/useGridColumnPinning.js +6 -6
- package/modern/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +2 -2
- package/modern/hooks/features/columnReorder/useGridColumnReorder.js +1 -1
- package/modern/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/modern/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -2
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +2 -2
- package/modern/hooks/features/treeData/useGridTreeDataPreProcessors.js +2 -2
- package/modern/index.js +2 -2
- package/modern/utils/releaseInfo.js +1 -1
- package/node/DataGridPro/DataGridPro.js +29 -5
- package/node/DataGridPro/useDataGridProComponent.js +1 -2
- package/node/components/GridDetailPanelToggleCell.js +2 -2
- package/node/components/GridGroupingCriteriaCell.js +1 -72
- package/node/components/GridTreeDataGroupingCell.js +2 -2
- package/node/hooks/features/columnPinning/useGridColumnPinning.js +5 -5
- package/node/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +1 -1
- package/node/hooks/features/columnReorder/useGridColumnReorder.js +1 -1
- package/node/hooks/features/detailPanel/useGridDetailPanel.js +1 -1
- package/node/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +1 -1
- package/node/hooks/features/rowGrouping/useGridRowGrouping.js +3 -3
- package/node/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -1
- package/node/hooks/features/treeData/useGridTreeDataPreProcessors.js +1 -1
- package/node/index.js +9 -9
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +2 -2
- package/typeOverloads/modules.d.ts +6 -6
- package/typeOverloads/reexports.d.ts +1 -1
- package/utils/releaseInfo.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { GridEvents, useGridSelector, useGridApiEventHandler, useGridApiMethod } from '@mui/x-data-grid';
|
|
4
|
-
import {
|
|
4
|
+
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
5
5
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from './gridDetailPanelToggleColDef';
|
|
6
6
|
import { gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector, gridDetailPanelExpandedRowsHeightCacheSelector } from './gridDetailPanelSelector';
|
|
7
7
|
export const detailPanelStateInitializer = (state, props) => {
|
|
@@ -54,7 +54,7 @@ export const useGridDetailPanel = (apiRef, props) => {
|
|
|
54
54
|
|
|
55
55
|
});
|
|
56
56
|
}, [apiRef, expandedRowIds]);
|
|
57
|
-
|
|
57
|
+
useGridRegisterPipeProcessor(apiRef, 'rowHeight', addDetailHeight);
|
|
58
58
|
apiRef.current.unstable_updateControlState({
|
|
59
59
|
stateId: 'detailPanels',
|
|
60
60
|
propModel: props.detailPanelExpandedRowIds,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
|
|
3
3
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from './gridDetailPanelToggleColDef';
|
|
4
4
|
export const useGridDetailPanelPreProcessors = (apiRef, props) => {
|
|
5
5
|
const addToggleColumn = React.useCallback(columnsState => {
|
|
@@ -24,5 +24,5 @@ export const useGridDetailPanelPreProcessors = (apiRef, props) => {
|
|
|
24
24
|
columnsState.lookup[GRID_DETAIL_PANEL_TOGGLE_FIELD] = GRID_DETAIL_PANEL_TOGGLE_COL_DEF;
|
|
25
25
|
return columnsState;
|
|
26
26
|
}, [props.getDetailPanelContent]);
|
|
27
|
-
|
|
27
|
+
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', addToggleColumn);
|
|
28
28
|
};
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import Divider from '@mui/material/Divider';
|
|
4
4
|
import { GridEvents, useGridApiEventHandler, useGridApiMethod, gridFilteredDescendantCountLookupSelector } from '@mui/x-data-grid';
|
|
5
|
-
import {
|
|
5
|
+
import { useGridRegisterPipeProcessor, isDeepEqual } from '@mui/x-data-grid/internals';
|
|
6
6
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector, gridRowGroupingStateSelector } from './gridRowGroupingSelector';
|
|
7
7
|
import { getRowGroupingFieldFromGroupingCriteria, ROW_GROUPING_STRATEGY, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability } from './gridRowGroupingUtils';
|
|
8
8
|
import { GridRowGroupableColumnMenuItems } from '../../../components/GridRowGroupableColumnMenuItems';
|
|
@@ -137,9 +137,9 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
137
137
|
|
|
138
138
|
return params;
|
|
139
139
|
}, [apiRef, props.disableRowGrouping]);
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
useGridRegisterPipeProcessor(apiRef, 'columnMenu', addColumnMenuButtons);
|
|
141
|
+
useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);
|
|
142
|
+
useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
143
143
|
/**
|
|
144
144
|
* EVENTS
|
|
145
145
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { gridColumnLookupSelector, gridRowIdsSelector, gridRowTreeSelector, useFirstRender } from '@mui/x-data-grid';
|
|
4
|
-
import {
|
|
4
|
+
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor } from '@mui/x-data-grid/internals';
|
|
5
5
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from './gridRowGroupingSelector';
|
|
6
6
|
import { createGroupingColDefForAllGroupingCriteria, createGroupingColDefForOneGroupingCriteria } from './createGroupingColDef';
|
|
7
7
|
import { filterRowTreeFromGroupingColumns, getColDefOverrides, ROW_GROUPING_STRATEGY, isGroupingColumn, setStrategyAvailability } from './gridRowGroupingUtils';
|
|
@@ -177,7 +177,7 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
177
177
|
disableChildrenSorting: false
|
|
178
178
|
});
|
|
179
179
|
}, [apiRef]);
|
|
180
|
-
|
|
180
|
+
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateGroupingColumn);
|
|
181
181
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'rowTreeCreation', createRowTree);
|
|
182
182
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'filtering', filterRows);
|
|
183
183
|
useGridRegisterStrategyProcessor(apiRef, ROW_GROUPING_STRATEGY, 'sorting', sortRows);
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["hideDescendantCount"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { gridRowIdsSelector, gridRowTreeSelector, useFirstRender } from '@mui/x-data-grid';
|
|
6
|
-
import {
|
|
6
|
+
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor } from '@mui/x-data-grid/internals';
|
|
7
7
|
import { GRID_TREE_DATA_GROUPING_COL_DEF, GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES } from './gridTreeDataGroupColDef';
|
|
8
8
|
import { filterRowTreeFromTreeData, TREE_DATA_STRATEGY } from './gridTreeDataUtils';
|
|
9
9
|
import { GridTreeDataGroupingCell } from '../../../components';
|
|
@@ -110,7 +110,7 @@ export const useGridTreeDataPreProcessors = (apiRef, props) => {
|
|
|
110
110
|
disableChildrenSorting: props.disableChildrenSorting
|
|
111
111
|
});
|
|
112
112
|
}, [apiRef, props.disableChildrenSorting]);
|
|
113
|
-
|
|
113
|
+
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateGroupingColumn);
|
|
114
114
|
useGridRegisterStrategyProcessor(apiRef, TREE_DATA_STRATEGY, 'rowTreeCreation', createRowTree);
|
|
115
115
|
useGridRegisterStrategyProcessor(apiRef, TREE_DATA_STRATEGY, 'filtering', filterRows);
|
|
116
116
|
useGridRegisterStrategyProcessor(apiRef, TREE_DATA_STRATEGY, 'sorting', sortRows);
|
package/modern/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.
|
|
1
|
+
/** @license MUI v5.8.0
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -11,8 +11,8 @@ export * from '@mui/x-data-grid/hooks';
|
|
|
11
11
|
export * from '@mui/x-data-grid/locales';
|
|
12
12
|
export * from '@mui/x-data-grid/models';
|
|
13
13
|
export * from '@mui/x-data-grid/context';
|
|
14
|
-
export * from '@mui/x-data-grid/colDef';
|
|
15
14
|
export * from '@mui/x-data-grid/utils';
|
|
15
|
+
export * from '@mui/x-data-grid/colDef';
|
|
16
16
|
export * from './DataGridPro';
|
|
17
17
|
export * from './hooks';
|
|
18
18
|
export * from './models';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY0OTAyMzIwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -377,7 +377,8 @@ DataGridProRaw.propTypes = {
|
|
|
377
377
|
* Determines the path of a row in the tree data.
|
|
378
378
|
* For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"].
|
|
379
379
|
* Note that all paths must contain at least one element.
|
|
380
|
-
* @
|
|
380
|
+
* @template R
|
|
381
|
+
* @param {R} row The row from which we want the path.
|
|
381
382
|
* @returns {string[]} The path to the row.
|
|
382
383
|
*/
|
|
383
384
|
getTreeDataPath: _propTypes.default.func,
|
|
@@ -688,6 +689,28 @@ DataGridProRaw.propTypes = {
|
|
|
688
689
|
*/
|
|
689
690
|
onPinnedColumnsChange: _propTypes.default.func,
|
|
690
691
|
|
|
692
|
+
/**
|
|
693
|
+
* Callback fired when the preferences panel is closed.
|
|
694
|
+
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
|
695
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
696
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
697
|
+
*/
|
|
698
|
+
onPreferencePanelClose: _propTypes.default.func,
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* Callback fired when the preferences panel is opened.
|
|
702
|
+
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
|
703
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
704
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
705
|
+
*/
|
|
706
|
+
onPreferencePanelOpen: _propTypes.default.func,
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Callback called when `processRowUpdate` throws an error or rejects.
|
|
710
|
+
* @param {any} error The error thrown.
|
|
711
|
+
*/
|
|
712
|
+
onProcessRowUpdateError: _propTypes.default.func,
|
|
713
|
+
|
|
691
714
|
/**
|
|
692
715
|
* Callback fired when the grid is resized.
|
|
693
716
|
* @param {ElementSize} containerSize With all properties from [[ElementSize]].
|
|
@@ -810,9 +833,10 @@ DataGridProRaw.propTypes = {
|
|
|
810
833
|
/**
|
|
811
834
|
* Callback called before updating a row with new values in the row and cell editing.
|
|
812
835
|
* Only applied if `props.experimentalFeatures.newEditingApi: true`.
|
|
813
|
-
* @
|
|
814
|
-
* @param {
|
|
815
|
-
* @
|
|
836
|
+
* @template R
|
|
837
|
+
* @param {R} newRow Row object with the new values.
|
|
838
|
+
* @param {R} oldRow Row object with the old values.
|
|
839
|
+
* @returns {Promise<R> | R} The final values to update the row.
|
|
816
840
|
*/
|
|
817
841
|
processRowUpdate: _propTypes.default.func,
|
|
818
842
|
|
|
@@ -849,7 +873,7 @@ DataGridProRaw.propTypes = {
|
|
|
849
873
|
/**
|
|
850
874
|
* Set of rows of type [[GridRowsProp]].
|
|
851
875
|
*/
|
|
852
|
-
rows: _propTypes.default.
|
|
876
|
+
rows: _propTypes.default.array.isRequired,
|
|
853
877
|
|
|
854
878
|
/**
|
|
855
879
|
* Sets the type of space between rows added by `getRowSpacing`.
|
|
@@ -71,6 +71,7 @@ const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
71
71
|
(0, _internals.useGridInitializeState)(_internals.columnMenuStateInitializer, apiRef, props);
|
|
72
72
|
(0, _useGridRowGrouping.useGridRowGrouping)(apiRef, props);
|
|
73
73
|
(0, _useGridTreeData.useGridTreeData)(apiRef);
|
|
74
|
+
(0, _internals.useGridKeyboardNavigation)(apiRef, props);
|
|
74
75
|
(0, _internals.useGridSelection)(apiRef, props);
|
|
75
76
|
(0, _useGridDetailPanel.useGridDetailPanel)(apiRef, props);
|
|
76
77
|
(0, _useGridColumnPinning.useGridColumnPinning)(apiRef, props);
|
|
@@ -92,8 +93,6 @@ const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
92
93
|
(0, _internals.useGridScroll)(apiRef, props);
|
|
93
94
|
(0, _useGridInfiniteLoader.useGridInfiniteLoader)(apiRef, props);
|
|
94
95
|
(0, _internals.useGridColumnMenu)(apiRef);
|
|
95
|
-
(0, _internals.useGridKeyboard)(apiRef);
|
|
96
|
-
(0, _internals.useGridKeyboardNavigation)(apiRef, props);
|
|
97
96
|
(0, _internals.useGridCsvExport)(apiRef);
|
|
98
97
|
(0, _internals.useGridPrintExport)(apiRef, props);
|
|
99
98
|
(0, _internals.useGridClipboard)(apiRef);
|
|
@@ -104,7 +104,7 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
104
104
|
* Get the cell value of a row and field.
|
|
105
105
|
* @param {GridRowId} id The row id.
|
|
106
106
|
* @param {string} field The field.
|
|
107
|
-
* @returns {
|
|
107
|
+
* @returns {any} The cell value.
|
|
108
108
|
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
109
109
|
*/
|
|
110
110
|
getValue: _propTypes.default.func.isRequired,
|
|
@@ -127,7 +127,7 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
127
127
|
/**
|
|
128
128
|
* The row model of the row that the current cell belongs to.
|
|
129
129
|
*/
|
|
130
|
-
row: _propTypes.default.
|
|
130
|
+
row: _propTypes.default.object.isRequired,
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
133
|
* The node of the row that the current cell belongs to.
|
|
@@ -9,8 +9,6 @@ exports.GridGroupingCriteriaCell = void 0;
|
|
|
9
9
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
12
|
var _material = require("@mui/material");
|
|
15
13
|
|
|
16
14
|
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
@@ -98,73 +96,4 @@ const GridGroupingCriteriaCell = props => {
|
|
|
98
96
|
});
|
|
99
97
|
};
|
|
100
98
|
|
|
101
|
-
exports.GridGroupingCriteriaCell = GridGroupingCriteriaCell;
|
|
102
|
-
process.env.NODE_ENV !== "production" ? GridGroupingCriteriaCell.propTypes = {
|
|
103
|
-
// ----------------------------- Warning --------------------------------
|
|
104
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
105
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
106
|
-
// ----------------------------------------------------------------------
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* GridApi that let you manipulate the grid.
|
|
110
|
-
*/
|
|
111
|
-
api: _propTypes.default.any.isRequired,
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* The mode of the cell.
|
|
115
|
-
*/
|
|
116
|
-
cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* The column of the row that the current cell belongs to.
|
|
120
|
-
*/
|
|
121
|
-
colDef: _propTypes.default.object.isRequired,
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The column field of the cell that triggered the event.
|
|
125
|
-
*/
|
|
126
|
-
field: _propTypes.default.string.isRequired,
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* The cell value formatted with the column valueFormatter.
|
|
130
|
-
*/
|
|
131
|
-
formattedValue: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string, _propTypes.default.bool]),
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Get the cell value of a row and field.
|
|
135
|
-
* @param {GridRowId} id The row id.
|
|
136
|
-
* @param {string} field The field.
|
|
137
|
-
* @returns {GridCellValue} The cell value.
|
|
138
|
-
*/
|
|
139
|
-
getValue: _propTypes.default.func.isRequired,
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* If true, the cell is the active element.
|
|
143
|
-
*/
|
|
144
|
-
hasFocus: _propTypes.default.bool.isRequired,
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* The grid row id.
|
|
148
|
-
*/
|
|
149
|
-
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* If true, the cell is editable.
|
|
153
|
-
*/
|
|
154
|
-
isEditable: _propTypes.default.bool,
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* The row model of the row that the current cell belongs to.
|
|
158
|
-
*/
|
|
159
|
-
row: _propTypes.default.object.isRequired,
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* the tabIndex value.
|
|
163
|
-
*/
|
|
164
|
-
tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* The cell value, but if the column has valueGetter, use getValue.
|
|
168
|
-
*/
|
|
169
|
-
value: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.object, _propTypes.default.string, _propTypes.default.bool])
|
|
170
|
-
} : void 0;
|
|
99
|
+
exports.GridGroupingCriteriaCell = GridGroupingCriteriaCell;
|
|
@@ -138,7 +138,7 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
138
138
|
* Get the cell value of a row and field.
|
|
139
139
|
* @param {GridRowId} id The row id.
|
|
140
140
|
* @param {string} field The field.
|
|
141
|
-
* @returns {
|
|
141
|
+
* @returns {any} The cell value.
|
|
142
142
|
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
143
143
|
*/
|
|
144
144
|
getValue: _propTypes.default.func.isRequired,
|
|
@@ -162,7 +162,7 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
162
162
|
/**
|
|
163
163
|
* The row model of the row that the current cell belongs to.
|
|
164
164
|
*/
|
|
165
|
-
row: _propTypes.default.
|
|
165
|
+
row: _propTypes.default.object.isRequired,
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
* The node of the row that the current cell belongs to.
|
|
@@ -205,11 +205,11 @@ const useGridColumnPinning = (apiRef, props) => {
|
|
|
205
205
|
|
|
206
206
|
return params;
|
|
207
207
|
}, [apiRef]);
|
|
208
|
-
(0, _internals.
|
|
209
|
-
(0, _internals.
|
|
210
|
-
(0, _internals.
|
|
211
|
-
(0, _internals.
|
|
212
|
-
(0, _internals.
|
|
208
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'scrollToIndexes', calculateScrollLeft);
|
|
209
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'columnMenu', addColumnMenuButtons);
|
|
210
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'canBeReordered', checkIfCanBeReordered);
|
|
211
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'exportState', stateExportPreProcessing);
|
|
212
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
213
213
|
apiRef.current.unstable_updateControlState({
|
|
214
214
|
stateId: 'pinnedColumns',
|
|
215
215
|
propModel: props.pinnedColumns,
|
|
@@ -60,7 +60,7 @@ const useGridColumnPinningPreProcessors = (apiRef, props) => {
|
|
|
60
60
|
all: [...leftPinnedColumns, ...centerColumns, ...rightPinnedColumns]
|
|
61
61
|
});
|
|
62
62
|
}, [disableColumnPinning, pinnedColumns]);
|
|
63
|
-
(0, _internals.
|
|
63
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'hydrateColumns', reorderPinnedColumns);
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
exports.useGridColumnPinningPreProcessors = useGridColumnPinningPreProcessors;
|
|
@@ -137,7 +137,7 @@ const useGridColumnReorder = (apiRef, props) => {
|
|
|
137
137
|
canBeReordered = targetColIndex < visibleColumns.length - 1 && !visibleColumns[targetColIndex + 1].disableReorder;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
const canBeReorderedProcessed = apiRef.current.
|
|
140
|
+
const canBeReorderedProcessed = apiRef.current.unstable_applyPipeProcessors('canBeReordered', canBeReordered, {
|
|
141
141
|
targetIndex: targetColVisibleIndex
|
|
142
142
|
});
|
|
143
143
|
|
|
@@ -80,7 +80,7 @@ const useGridDetailPanel = (apiRef, props) => {
|
|
|
80
80
|
|
|
81
81
|
});
|
|
82
82
|
}, [apiRef, expandedRowIds]);
|
|
83
|
-
(0, _internals.
|
|
83
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'rowHeight', addDetailHeight);
|
|
84
84
|
apiRef.current.unstable_updateControlState({
|
|
85
85
|
stateId: 'detailPanels',
|
|
86
86
|
propModel: props.detailPanelExpandedRowIds,
|
|
@@ -38,7 +38,7 @@ const useGridDetailPanelPreProcessors = (apiRef, props) => {
|
|
|
38
38
|
columnsState.lookup[_gridDetailPanelToggleColDef.GRID_DETAIL_PANEL_TOGGLE_FIELD] = _gridDetailPanelToggleColDef.GRID_DETAIL_PANEL_TOGGLE_COL_DEF;
|
|
39
39
|
return columnsState;
|
|
40
40
|
}, [props.getDetailPanelContent]);
|
|
41
|
-
(0, _internals.
|
|
41
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'hydrateColumns', addToggleColumn);
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
exports.useGridDetailPanelPreProcessors = useGridDetailPanelPreProcessors;
|
|
@@ -169,9 +169,9 @@ const useGridRowGrouping = (apiRef, props) => {
|
|
|
169
169
|
|
|
170
170
|
return params;
|
|
171
171
|
}, [apiRef, props.disableRowGrouping]);
|
|
172
|
-
(0, _internals.
|
|
173
|
-
(0, _internals.
|
|
174
|
-
(0, _internals.
|
|
172
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'columnMenu', addColumnMenuButtons);
|
|
173
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'exportState', stateExportPreProcessing);
|
|
174
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
175
175
|
/**
|
|
176
176
|
* EVENTS
|
|
177
177
|
*/
|
|
@@ -199,7 +199,7 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
199
199
|
disableChildrenSorting: false
|
|
200
200
|
});
|
|
201
201
|
}, [apiRef]);
|
|
202
|
-
(0, _internals.
|
|
202
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'hydrateColumns', updateGroupingColumn);
|
|
203
203
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridRowGroupingUtils.ROW_GROUPING_STRATEGY, 'rowTreeCreation', createRowTree);
|
|
204
204
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridRowGroupingUtils.ROW_GROUPING_STRATEGY, 'filtering', filterRows);
|
|
205
205
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridRowGroupingUtils.ROW_GROUPING_STRATEGY, 'sorting', sortRows);
|
|
@@ -136,7 +136,7 @@ const useGridTreeDataPreProcessors = (apiRef, props) => {
|
|
|
136
136
|
disableChildrenSorting: props.disableChildrenSorting
|
|
137
137
|
});
|
|
138
138
|
}, [apiRef, props.disableChildrenSorting]);
|
|
139
|
-
(0, _internals.
|
|
139
|
+
(0, _internals.useGridRegisterPipeProcessor)(apiRef, 'hydrateColumns', updateGroupingColumn);
|
|
140
140
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridTreeDataUtils.TREE_DATA_STRATEGY, 'rowTreeCreation', createRowTree);
|
|
141
141
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridTreeDataUtils.TREE_DATA_STRATEGY, 'filtering', filterRows);
|
|
142
142
|
(0, _internals.useGridRegisterStrategyProcessor)(apiRef, _gridTreeDataUtils.TREE_DATA_STRATEGY, 'sorting', sortRows);
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.
|
|
1
|
+
/** @license MUI v5.8.0
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -127,30 +127,30 @@ Object.keys(_context).forEach(function (key) {
|
|
|
127
127
|
});
|
|
128
128
|
});
|
|
129
129
|
|
|
130
|
-
var
|
|
130
|
+
var _utils = require("@mui/x-data-grid/utils");
|
|
131
131
|
|
|
132
|
-
Object.keys(
|
|
132
|
+
Object.keys(_utils).forEach(function (key) {
|
|
133
133
|
if (key === "default" || key === "__esModule") return;
|
|
134
134
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
135
|
-
if (key in exports && exports[key] ===
|
|
135
|
+
if (key in exports && exports[key] === _utils[key]) return;
|
|
136
136
|
Object.defineProperty(exports, key, {
|
|
137
137
|
enumerable: true,
|
|
138
138
|
get: function () {
|
|
139
|
-
return
|
|
139
|
+
return _utils[key];
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
var
|
|
144
|
+
var _colDef = require("@mui/x-data-grid/colDef");
|
|
145
145
|
|
|
146
|
-
Object.keys(
|
|
146
|
+
Object.keys(_colDef).forEach(function (key) {
|
|
147
147
|
if (key === "default" || key === "__esModule") return;
|
|
148
148
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
149
|
-
if (key in exports && exports[key] ===
|
|
149
|
+
if (key in exports && exports[key] === _colDef[key]) return;
|
|
150
150
|
Object.defineProperty(exports, key, {
|
|
151
151
|
enumerable: true,
|
|
152
152
|
get: function () {
|
|
153
|
-
return
|
|
153
|
+
return _colDef[key];
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
156
|
});
|
|
@@ -8,7 +8,7 @@ exports.getReleaseInfo = void 0;
|
|
|
8
8
|
var _utils = require("@mui/utils");
|
|
9
9
|
|
|
10
10
|
const getReleaseInfo = () => {
|
|
11
|
-
const releaseInfo = "
|
|
11
|
+
const releaseInfo = "MTY0OTAyMzIwMDAwMA==";
|
|
12
12
|
|
|
13
13
|
if (process.env.NODE_ENV !== 'production') {
|
|
14
14
|
// A simple hack to set the value in the test environment (has no build step).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "The commercial edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@mui/utils": "^5.4.4",
|
|
35
|
-
"@mui/x-data-grid": "5.
|
|
35
|
+
"@mui/x-data-grid": "5.8.0",
|
|
36
36
|
"@mui/x-license-pro": "5.7.0",
|
|
37
37
|
"@types/format-util": "^1.0.2",
|
|
38
38
|
"clsx": "^1.0.4",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridKeyValue } from '@mui/x-data-grid';
|
|
1
|
+
import { GridKeyValue, GridValidRowModel } from '@mui/x-data-grid';
|
|
2
2
|
import type { GridRowScrollEndParams, GridGroupingValueGetterParams } from '../models';
|
|
3
3
|
import type { GridPinnedColumns, GridRowGroupingModel } from '../hooks';
|
|
4
4
|
import type { GridCanBeReorderedPreProcessingContext } from '../hooks/features/columnReorder/columnReorderInterfaces';
|
|
@@ -15,27 +15,27 @@ export interface GridEventLookupPro {
|
|
|
15
15
|
params: GridRowScrollEndParams;
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface GridPipeProcessingLookupPro {
|
|
19
19
|
canBeReordered: {
|
|
20
20
|
value: boolean;
|
|
21
21
|
context: GridCanBeReorderedPreProcessingContext;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
export interface GridColDefPro {
|
|
24
|
+
export interface GridColDefPro<R extends GridValidRowModel = any, V = any, F = V> {
|
|
25
25
|
/**
|
|
26
26
|
* Function that transforms a complex cell value into a key that be used for grouping the rows.
|
|
27
27
|
* @param {GridGroupingValueGetterParams} params Object containing parameters for the getter.
|
|
28
28
|
* @returns {GridKeyValue | null | undefined} The cell key.
|
|
29
29
|
*/
|
|
30
|
-
groupingValueGetter?: (params: GridGroupingValueGetterParams) => GridKeyValue | null | undefined;
|
|
30
|
+
groupingValueGetter?: (params: GridGroupingValueGetterParams<V, R>) => GridKeyValue | null | undefined;
|
|
31
31
|
}
|
|
32
32
|
declare module '@mui/x-data-grid' {
|
|
33
|
-
interface GridColDef extends GridColDefPro {
|
|
33
|
+
interface GridColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridColDefPro<R, V, F> {
|
|
34
34
|
}
|
|
35
35
|
interface GridEventLookup extends GridEventLookupPro {
|
|
36
36
|
}
|
|
37
37
|
interface GridControlledStateEventLookup extends GridControlledStateEventLookupPro {
|
|
38
38
|
}
|
|
39
|
-
interface
|
|
39
|
+
interface GridPipeProcessingLookup extends GridPipeProcessingLookupPro {
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { GridApiPro } from '../models/gridApiPro';
|
|
3
|
-
import { GridInitialStatePro, GridStatePro } from '../models/gridStatePro';
|
|
3
|
+
import type { GridInitialStatePro, GridStatePro } from '../models/gridStatePro';
|
|
4
4
|
export { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
5
5
|
export { useGridApiRef } from '../hooks/utils/useGridApiRef';
|
|
6
6
|
export { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
package/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 = "MTY0OTAyMzIwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|