@mui/x-data-grid-pro 6.0.3 → 6.1.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +119 -0
  2. package/components/GridProColumnMenu.d.ts +6 -6
  3. package/components/GridProColumnMenu.js +6 -6
  4. package/components/reexports.d.ts +1 -1
  5. package/components/reexports.js +1 -1
  6. package/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
  7. package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -1
  8. package/index.d.ts +1 -1
  9. package/index.js +2 -2
  10. package/legacy/components/GridProColumnMenu.js +6 -6
  11. package/legacy/components/reexports.js +1 -1
  12. package/legacy/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
  13. package/legacy/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -1
  14. package/legacy/index.js +2 -2
  15. package/legacy/typeOverloads/reexports.js +8 -0
  16. package/legacy/utils/domUtils.js +1 -1
  17. package/legacy/utils/releaseInfo.js +1 -1
  18. package/modern/components/GridProColumnMenu.js +6 -6
  19. package/modern/components/reexports.js +1 -1
  20. package/modern/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
  21. package/modern/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -1
  22. package/modern/index.js +2 -2
  23. package/modern/typeOverloads/reexports.js +8 -0
  24. package/modern/utils/domUtils.js +1 -1
  25. package/modern/utils/releaseInfo.js +1 -1
  26. package/node/components/GridProColumnMenu.js +8 -8
  27. package/node/components/reexports.js +4 -4
  28. package/node/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
  29. package/node/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +2 -1
  30. package/node/index.js +7 -7
  31. package/node/utils/domUtils.js +1 -1
  32. package/node/utils/releaseInfo.js +1 -1
  33. package/package.json +3 -3
  34. package/typeOverloads/reexports.js +8 -0
  35. package/utils/domUtils.js +1 -1
  36. package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,125 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.1.0
7
+
8
+ _Apr 7, 2023_
9
+
10
+ We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Add Catalan (ca-ES), Kazakh (kz-KZ) and improve Spanish (es-ES), Dutch (nl-NL), Hebrew (he-IL), Hungarian (hu-HU), Japanese (ja-JP), Portuguese (pt-BR), and Russian (ru-RU) locales
13
+ - ✨ Allow to control visibility of columns shown in the columns panel (#8401) @MBilalShafi
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ ### `@mui/x-data-grid@v6.1.0` / `@mui/x-data-grid-pro@v6.1.0` / `@mui/x-data-grid-premium@v6.1.0`
18
+
19
+ #### Changes
20
+
21
+ - [DataGrid] Allow to control visibility of columns shown in the `ColumnsPanel` component (#8401) @MBilalShafi
22
+ - [DataGrid] Fix filters with empty array value not being removed from the filter model (#8501) @cherniavskii
23
+ - [DataGrid] Fix memory leaks in development (#8301) @cherniavskii
24
+ - [DataGrid] Sync `date` column value when entering edit mode by pressing a digit (#8364) @m4theushw
25
+ - [DataGrid] Wrap column menu button with a tooltip (#7890) @cherniavskii
26
+ - [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
27
+ - [l10n] Improve Hungarian (hu-HU) locale (#8486) @PetakCC
28
+ - [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
29
+ - [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
30
+ - [l10n] Improve Russian (ru-RU) locale (#8510) @alexrapro
31
+
32
+ ### `@mui/x-date-pickers@v6.1.0` / `@mui/x-date-pickers-pro@v6.1.0`
33
+
34
+ #### Changes
35
+
36
+ - [fields] Fix RTL navigation (#8490) @alexfauquette
37
+ - [fields] Fix usage of `slotProps.textField.InputProps` (#8428) @flaviendelangle
38
+ - [pickers] Fix `componentsProps.dialog` propagation (#8509) @LukasTy
39
+ - [pickers] Move `hasError` from `fieldValueManager` to `valueManager` (#8453) @flaviendelangle
40
+ - [pickers] Move the adapters interfaces to the X repository (#8412) @flaviendelangle
41
+ - [pickers] Update peer dependency versions (#8531) @LukasTy
42
+ - [pickers] Fix `isValid` regression (#8543) @LukasTy
43
+ - [l10n] Add Catalan (Spain) (ca-ES) and improve Spanish (es-ES) locales (#8498) @makenshikuro
44
+ - [l10n] Add Kazakh (kz-KZ) locale (#8451) @zhunus
45
+ - [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
46
+ - [l10n] Improve Hebrew (he-IL) locale (#8464) @soris1989
47
+ - [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
48
+ - [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
49
+
50
+ ### Docs
51
+
52
+ - [docs] Fix 301 redirect (#8524) @alexfauquette
53
+ - [docs] Fix 404 links (#8454) @alexfauquette
54
+ - [docs] Fix broken API reference link (#8460) @oliviertassinari
55
+
56
+ ### Core
57
+
58
+ - [core] Avoid 301 links (#8383) @oliviertassinari
59
+ - [core] Fix the l10n helper by using danger instead of actions (#8512) @alexfauquette
60
+ - [core] Help contributors for l10n PRs (#8503) @alexfauquette
61
+ - [core] Remove legacy token (#8457) @oliviertassinari
62
+ - [charts] Add a styling system (#8445) @alexfauquette
63
+
64
+ ## 6.0.4
65
+
66
+ _Mar 30, 2023_
67
+
68
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
69
+
70
+ - 🌍 Add Danish (da-DK), and improve Norwegian (nb-NO), Spanish (es-ES), and Swedish (sv-SE) locales
71
+ - 🐞 Bugfixes
72
+ - 📚 Documentation improvements
73
+
74
+ ### `@mui/x-data-grid@v6.0.4` / `@mui/x-data-grid-pro@v6.0.4` / `@mui/x-data-grid-premium@v6.0.4`
75
+
76
+ #### Changes
77
+
78
+ - [DataGrid] Fix column header tooltip not showing when the title is truncated (#8433) @rohitnatesh
79
+ - [DataGrid] Fix filter model buttons' display condition (#8415) @MBilalShafi
80
+ - [DataGrid] Fix infinite rerender in a flex parent (#8436) @cherniavskii
81
+ - [DataGrid] Prevent reopening column menu when clicking in the button while it is open (#8286) @tanuj-22
82
+ - [DataGrid] Rename `components` by `slots` in column menu API (#7999) @MBilalShafi
83
+ - [DataGrid] Remove hardcoded CSS classes' usages (#8444) @MBilalShafi
84
+ - [DataGridPremium] Fix aggregation initial state causing issue with quick filter (#8441) @MBilalShafi
85
+ - [l10n] Improve Danish (da-DK) locale (#8368) @BossElijah
86
+ - [l10n] Improve Danish (da-DK) locale (#8378) @BossElijah
87
+ - [l10n] Improve Norwegian (nb-NO) locale (#8367) @BossElijah
88
+ - [l10n] Improve Norwegian (nb-NO) locale (#8409) @BossElijah
89
+ - [l10n] Improve Spanish (es-ES) locale (#8420) @martjanz
90
+ - [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
91
+
92
+ ### `@mui/x-date-pickers@v6.0.4` / `@mui/x-date-pickers-pro@v6.0.4`
93
+
94
+ #### Changes
95
+
96
+ - [fields] Add missing tokens to `AdapterDateFnsJalali` (#8402) @flaviendelangle
97
+ - [fields] Clean the active date manager (#8370) @flaviendelangle
98
+ - [fields] Cleanup `useFieldState` (#8292) @flaviendelangle
99
+ - [fields] Only add RTL characters when needed (#8325) @flaviendelangle
100
+ - [pickers] Add support for single input fields in range pickers (#7927) @flaviendelangle
101
+ - [pickers] Allows non token characters in format (#8256) @alexfauquette
102
+ - [pickers] Avoid root imports and move public models to the models folder (#8337) @flaviendelangle
103
+ - [pickers] Update `view` when `views` or `openTo` changes (#8361) @LukasTy
104
+ - [l10n] Improve Norwegian (nb-NO) locale (#8382) @BossElijah
105
+ - [l10n] Add Danish (da-DK) locale (#8379) @BossElijah
106
+ - [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
107
+
108
+ ### `@mui/x-codemod@v6.0.4`
109
+
110
+ #### Changes
111
+
112
+ - [codemod] Fix `remove-stabilized-experimentalFeatures` codemod (#8289) @alexfauquette
113
+
114
+ ### Docs
115
+
116
+ - [docs] Fix `GridCellParams` signature in migration guide (#8427) @cherniavskii
117
+ - [docs] Fix "Custom field" demos responsive styles (#8408) @LukasTy
118
+ - [docs] Remove `label` from demos where it reduces clarity (#8416) @LukasTy
119
+ - [docs] Update slots' references in Data Grid migration guide (#8159) @MBilalShafi
120
+
121
+ ### Core
122
+
123
+ - [charts] Work on typing (#8421) @flaviendelangle
124
+
6
125
  ## 6.0.3
7
126
 
8
127
  _Mar 23, 2023_
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { GridColumnMenuProps } from '@mui/x-data-grid';
3
3
  import { GridColumnMenuPinningItem } from './GridColumnMenuPinningItem';
4
- export declare const GRID_COLUMN_MENU_COMPONENTS_PRO: {
5
- ColumnMenuPinningItem: typeof GridColumnMenuPinningItem;
6
- ColumnMenuSortItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuSortItem").GridColumnMenuSortItem;
7
- ColumnMenuFilterItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem").GridColumnMenuFilterItem;
8
- ColumnMenuColumnsItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem").GridColumnMenuColumnsItem;
4
+ export declare const GRID_COLUMN_MENU_SLOTS_PRO: {
5
+ columnMenuPinningItem: typeof GridColumnMenuPinningItem;
6
+ columnMenuSortItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuSortItem").GridColumnMenuSortItem;
7
+ columnMenuFilterItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem").GridColumnMenuFilterItem;
8
+ columnMenuColumnsItem: typeof import("@mui/x-data-grid/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem").GridColumnMenuColumnsItem;
9
9
  };
10
- export declare const GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO: {
10
+ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PRO: {
11
11
  columnMenuPinningItem: {
12
12
  displayOrder: number;
13
13
  };
@@ -1,13 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { GridGenericColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from '@mui/x-data-grid';
4
+ import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
5
5
  import { GridColumnMenuPinningItem } from './GridColumnMenuPinningItem';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
- export const GRID_COLUMN_MENU_COMPONENTS_PRO = _extends({}, GRID_COLUMN_MENU_COMPONENTS, {
8
- ColumnMenuPinningItem: GridColumnMenuPinningItem
7
+ export const GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
8
+ columnMenuPinningItem: GridColumnMenuPinningItem
9
9
  });
10
- export const GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_COMPONENTS_PROPS, {
10
+ export const GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
11
11
  columnMenuPinningItem: {
12
12
  displayOrder: 15
13
13
  }
@@ -16,8 +16,8 @@ const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMe
16
16
  return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
17
17
  ref: ref
18
18
  }, props, {
19
- defaultComponents: GRID_COLUMN_MENU_COMPONENTS_PRO,
20
- defaultComponentsProps: GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO
19
+ defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
20
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
21
21
  }));
22
22
  });
23
23
  process.env.NODE_ENV !== "production" ? GridProColumnMenu.propTypes = {
@@ -1 +1 @@
1
- export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS_PRO as GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO as GRID_COLUMN_MENU_COMPONENTS_PROPS, } from './GridProColumnMenu';
1
+ export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS, } from './GridProColumnMenu';
@@ -1 +1 @@
1
- export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS_PRO as GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO as GRID_COLUMN_MENU_COMPONENTS_PROPS } from './GridProColumnMenu';
1
+ export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from './GridProColumnMenu';
@@ -118,7 +118,7 @@ export const useGridColumnPinning = (apiRef, props) => {
118
118
  if (colDef.pinnable === false) {
119
119
  return columnMenuItems;
120
120
  }
121
- return [...columnMenuItems, 'ColumnMenuPinningItem'];
121
+ return [...columnMenuItems, 'columnMenuPinningItem'];
122
122
  }, [props.disableColumnPinning]);
123
123
  const checkIfCanBeReordered = React.useCallback((initialValue, {
124
124
  targetIndex
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
+ import { gridClasses } from '@mui/x-data-grid';
3
4
  import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
4
5
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from './gridDetailPanelToggleColDef';
5
6
  import { gridDetailPanelExpandedRowIdsSelector } from './gridDetailPanelSelector';
@@ -35,7 +36,7 @@ export const useGridDetailPanelPreProcessors = (privateApiRef, props) => {
35
36
  if (!expandedRowIds.includes(id)) {
36
37
  return classes;
37
38
  }
38
- return [...classes, 'MuiDataGrid-row--detailPanelExpanded'];
39
+ return [...classes, gridClasses['row--detailPanelExpanded']];
39
40
  }, [privateApiRef, props.getDetailPanelContent]);
40
41
  useGridRegisterPipeProcessor(privateApiRef, 'hydrateColumns', addToggleColumn);
41
42
  useGridRegisterPipeProcessor(privateApiRef, 'rowClassName', addExpandedClassToRow);
package/index.d.ts CHANGED
@@ -17,5 +17,5 @@ export * from './utils';
17
17
  export type { DataGridProProps, GridExperimentalProFeatures } from './models/dataGridProProps';
18
18
  export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
19
19
  export type { GridApi, GridInitialState, GridState } from './typeOverloads/reexports';
20
- export { GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS, } from './components/reexports';
20
+ export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS, } from './components/reexports';
21
21
  export { GridColumnHeaders } from './components/GridColumnHeaders';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.0.3
2
+ * @mui/x-data-grid-pro v6.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -21,5 +21,5 @@ export * from './models';
21
21
  export * from './components';
22
22
  export * from './utils';
23
23
  export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
24
- export { GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from './components/reexports';
24
+ export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexports';
25
25
  export { GridColumnHeaders } from './components/GridColumnHeaders';
@@ -1,13 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { GridGenericColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from '@mui/x-data-grid';
4
+ import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
5
5
  import { GridColumnMenuPinningItem } from './GridColumnMenuPinningItem';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
- export var GRID_COLUMN_MENU_COMPONENTS_PRO = _extends({}, GRID_COLUMN_MENU_COMPONENTS, {
8
- ColumnMenuPinningItem: GridColumnMenuPinningItem
7
+ export var GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
8
+ columnMenuPinningItem: GridColumnMenuPinningItem
9
9
  });
10
- export var GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_COMPONENTS_PROPS, {
10
+ export var GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
11
11
  columnMenuPinningItem: {
12
12
  displayOrder: 15
13
13
  }
@@ -16,8 +16,8 @@ var GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu
16
16
  return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
17
17
  ref: ref
18
18
  }, props, {
19
- defaultComponents: GRID_COLUMN_MENU_COMPONENTS_PRO,
20
- defaultComponentsProps: GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO
19
+ defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
20
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
21
21
  }));
22
22
  });
23
23
  process.env.NODE_ENV !== "production" ? GridProColumnMenu.propTypes = {
@@ -1 +1 @@
1
- export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS_PRO as GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO as GRID_COLUMN_MENU_COMPONENTS_PROPS } from './GridProColumnMenu';
1
+ export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from './GridProColumnMenu';
@@ -128,7 +128,7 @@ export var useGridColumnPinning = function useGridColumnPinning(apiRef, props) {
128
128
  if (colDef.pinnable === false) {
129
129
  return columnMenuItems;
130
130
  }
131
- return [].concat(_toConsumableArray(columnMenuItems), ['ColumnMenuPinningItem']);
131
+ return [].concat(_toConsumableArray(columnMenuItems), ['columnMenuPinningItem']);
132
132
  }, [props.disableColumnPinning]);
133
133
  var checkIfCanBeReordered = React.useCallback(function (initialValue, _ref) {
134
134
  var targetIndex = _ref.targetIndex;
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  import * as React from 'react';
4
+ import { gridClasses } from '@mui/x-data-grid';
4
5
  import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
5
6
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from './gridDetailPanelToggleColDef';
6
7
  import { gridDetailPanelExpandedRowIdsSelector } from './gridDetailPanelSelector';
@@ -38,7 +39,7 @@ export var useGridDetailPanelPreProcessors = function useGridDetailPanelPreProce
38
39
  if (!expandedRowIds.includes(id)) {
39
40
  return classes;
40
41
  }
41
- return [].concat(_toConsumableArray(classes), ['MuiDataGrid-row--detailPanelExpanded']);
42
+ return [].concat(_toConsumableArray(classes), [gridClasses['row--detailPanelExpanded']]);
42
43
  }, [privateApiRef, props.getDetailPanelContent]);
43
44
  useGridRegisterPipeProcessor(privateApiRef, 'hydrateColumns', addToggleColumn);
44
45
  useGridRegisterPipeProcessor(privateApiRef, 'rowClassName', addExpandedClassToRow);
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.0.3
2
+ * @mui/x-data-grid-pro v6.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -21,5 +21,5 @@ export * from './models';
21
21
  export * from './components';
22
22
  export * from './utils';
23
23
  export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
24
- export { GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from './components/reexports';
24
+ export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexports';
25
25
  export { GridColumnHeaders } from './components/GridColumnHeaders';
@@ -4,4 +4,12 @@ export { useGridRootProps } from '../hooks/utils/useGridRootProps';
4
4
 
5
5
  /**
6
6
  * The full grid API.
7
+ */
8
+
9
+ /**
10
+ * The state of `DataGridPro`.
11
+ */
12
+
13
+ /**
14
+ * The initial state of `DataGridPro`.
7
15
  */
@@ -11,7 +11,7 @@ export function findGroupHeaderElementsFromField(elem, field) {
11
11
  return Array.from((_elem$querySelectorAl = elem.querySelectorAll("[data-fields*=\"|-".concat(field, "-|\"]"))) != null ? _elem$querySelectorAl : []);
12
12
  }
13
13
  export function findGridCellElementsFromCol(col, api) {
14
- var root = findParentElementFromClassName(col, 'MuiDataGrid-root');
14
+ var root = findParentElementFromClassName(col, gridClasses.root);
15
15
  if (!root) {
16
16
  throw new Error('MUI: The root element is not found.');
17
17
  }
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY3OTUyNjAwMDAwMA==";
3
+ var releaseInfo = "MTY4MTA3NDAwMDAwMA==";
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
@@ -1,13 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { GridGenericColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from '@mui/x-data-grid';
4
+ import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
5
5
  import { GridColumnMenuPinningItem } from './GridColumnMenuPinningItem';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
- export const GRID_COLUMN_MENU_COMPONENTS_PRO = _extends({}, GRID_COLUMN_MENU_COMPONENTS, {
8
- ColumnMenuPinningItem: GridColumnMenuPinningItem
7
+ export const GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
8
+ columnMenuPinningItem: GridColumnMenuPinningItem
9
9
  });
10
- export const GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_COMPONENTS_PROPS, {
10
+ export const GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
11
11
  columnMenuPinningItem: {
12
12
  displayOrder: 15
13
13
  }
@@ -16,8 +16,8 @@ const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMe
16
16
  return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
17
17
  ref: ref
18
18
  }, props, {
19
- defaultComponents: GRID_COLUMN_MENU_COMPONENTS_PRO,
20
- defaultComponentsProps: GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO
19
+ defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
20
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
21
21
  }));
22
22
  });
23
23
  process.env.NODE_ENV !== "production" ? GridProColumnMenu.propTypes = {
@@ -1 +1 @@
1
- export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS_PRO as GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO as GRID_COLUMN_MENU_COMPONENTS_PROPS } from './GridProColumnMenu';
1
+ export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from './GridProColumnMenu';
@@ -114,7 +114,7 @@ export const useGridColumnPinning = (apiRef, props) => {
114
114
  if (colDef.pinnable === false) {
115
115
  return columnMenuItems;
116
116
  }
117
- return [...columnMenuItems, 'ColumnMenuPinningItem'];
117
+ return [...columnMenuItems, 'columnMenuPinningItem'];
118
118
  }, [props.disableColumnPinning]);
119
119
  const checkIfCanBeReordered = React.useCallback((initialValue, {
120
120
  targetIndex
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
+ import { gridClasses } from '@mui/x-data-grid';
3
4
  import { useGridRegisterPipeProcessor } from '@mui/x-data-grid/internals';
4
5
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_DETAIL_PANEL_TOGGLE_COL_DEF } from './gridDetailPanelToggleColDef';
5
6
  import { gridDetailPanelExpandedRowIdsSelector } from './gridDetailPanelSelector';
@@ -35,7 +36,7 @@ export const useGridDetailPanelPreProcessors = (privateApiRef, props) => {
35
36
  if (!expandedRowIds.includes(id)) {
36
37
  return classes;
37
38
  }
38
- return [...classes, 'MuiDataGrid-row--detailPanelExpanded'];
39
+ return [...classes, gridClasses['row--detailPanelExpanded']];
39
40
  }, [privateApiRef, props.getDetailPanelContent]);
40
41
  useGridRegisterPipeProcessor(privateApiRef, 'hydrateColumns', addToggleColumn);
41
42
  useGridRegisterPipeProcessor(privateApiRef, 'rowClassName', addExpandedClassToRow);
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.0.3
2
+ * @mui/x-data-grid-pro v6.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -21,5 +21,5 @@ export * from './models';
21
21
  export * from './components';
22
22
  export * from './utils';
23
23
  export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
24
- export { GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from './components/reexports';
24
+ export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexports';
25
25
  export { GridColumnHeaders } from './components/GridColumnHeaders';
@@ -4,4 +4,12 @@ export { useGridRootProps } from '../hooks/utils/useGridRootProps';
4
4
 
5
5
  /**
6
6
  * The full grid API.
7
+ */
8
+
9
+ /**
10
+ * The state of `DataGridPro`.
11
+ */
12
+
13
+ /**
14
+ * The initial state of `DataGridPro`.
7
15
  */
@@ -10,7 +10,7 @@ export function findGroupHeaderElementsFromField(elem, field) {
10
10
  return Array.from(elem.querySelectorAll(`[data-fields*="|-${field}-|"]`) ?? []);
11
11
  }
12
12
  export function findGridCellElementsFromCol(col, api) {
13
- const root = findParentElementFromClassName(col, 'MuiDataGrid-root');
13
+ const root = findParentElementFromClassName(col, gridClasses.root);
14
14
  if (!root) {
15
15
  throw new Error('MUI: The root element is not found.');
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY3OTUyNjAwMDAwMA==";
3
+ const releaseInfo = "MTY4MTA3NDAwMDAwMA==";
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
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.GridProColumnMenu = exports.GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO = exports.GRID_COLUMN_MENU_COMPONENTS_PRO = void 0;
7
+ exports.GridProColumnMenu = exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO = exports.GRID_COLUMN_MENU_SLOTS_PRO = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -13,22 +13,22 @@ var _GridColumnMenuPinningItem = require("./GridColumnMenuPinningItem");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
- const GRID_COLUMN_MENU_COMPONENTS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_COMPONENTS, {
17
- ColumnMenuPinningItem: _GridColumnMenuPinningItem.GridColumnMenuPinningItem
16
+ const GRID_COLUMN_MENU_SLOTS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOTS, {
17
+ columnMenuPinningItem: _GridColumnMenuPinningItem.GridColumnMenuPinningItem
18
18
  });
19
- exports.GRID_COLUMN_MENU_COMPONENTS_PRO = GRID_COLUMN_MENU_COMPONENTS_PRO;
20
- const GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_COMPONENTS_PROPS, {
19
+ exports.GRID_COLUMN_MENU_SLOTS_PRO = GRID_COLUMN_MENU_SLOTS_PRO;
20
+ const GRID_COLUMN_MENU_SLOT_PROPS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOT_PROPS, {
21
21
  columnMenuPinningItem: {
22
22
  displayOrder: 15
23
23
  }
24
24
  });
25
- exports.GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO = GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO;
25
+ exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO = GRID_COLUMN_MENU_SLOT_PROPS_PRO;
26
26
  const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu(props, ref) {
27
27
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridGenericColumnMenu, (0, _extends2.default)({
28
28
  ref: ref
29
29
  }, props, {
30
- defaultComponents: GRID_COLUMN_MENU_COMPONENTS_PRO,
31
- defaultComponentsProps: GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO
30
+ defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
31
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
32
32
  }));
33
33
  });
34
34
  exports.GridProColumnMenu = GridProColumnMenu;
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "GRID_COLUMN_MENU_COMPONENTS", {
6
+ Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOTS", {
7
7
  enumerable: true,
8
8
  get: function () {
9
- return _GridProColumnMenu.GRID_COLUMN_MENU_COMPONENTS_PRO;
9
+ return _GridProColumnMenu.GRID_COLUMN_MENU_SLOTS_PRO;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "GRID_COLUMN_MENU_COMPONENTS_PROPS", {
12
+ Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOT_PROPS", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _GridProColumnMenu.GRID_COLUMN_MENU_COMPONENTS_PROPS_PRO;
15
+ return _GridProColumnMenu.GRID_COLUMN_MENU_SLOT_PROPS_PRO;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "GridColumnMenu", {
@@ -124,7 +124,7 @@ const useGridColumnPinning = (apiRef, props) => {
124
124
  if (colDef.pinnable === false) {
125
125
  return columnMenuItems;
126
126
  }
127
- return [...columnMenuItems, 'ColumnMenuPinningItem'];
127
+ return [...columnMenuItems, 'columnMenuPinningItem'];
128
128
  }, [props.disableColumnPinning]);
129
129
  const checkIfCanBeReordered = React.useCallback((initialValue, {
130
130
  targetIndex
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.useGridDetailPanelPreProcessors = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var React = _interopRequireWildcard(require("react"));
10
+ var _xDataGrid = require("@mui/x-data-grid");
10
11
  var _internals = require("@mui/x-data-grid/internals");
11
12
  var _gridDetailPanelToggleColDef = require("./gridDetailPanelToggleColDef");
12
13
  var _gridDetailPanelSelector = require("./gridDetailPanelSelector");
@@ -44,7 +45,7 @@ const useGridDetailPanelPreProcessors = (privateApiRef, props) => {
44
45
  if (!expandedRowIds.includes(id)) {
45
46
  return classes;
46
47
  }
47
- return [...classes, 'MuiDataGrid-row--detailPanelExpanded'];
48
+ return [...classes, _xDataGrid.gridClasses['row--detailPanelExpanded']];
48
49
  }, [privateApiRef, props.getDetailPanelContent]);
49
50
  (0, _internals.useGridRegisterPipeProcessor)(privateApiRef, 'hydrateColumns', addToggleColumn);
50
51
  (0, _internals.useGridRegisterPipeProcessor)(privateApiRef, 'rowClassName', addExpandedClassToRow);
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.0.3
2
+ * @mui/x-data-grid-pro v6.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -16,20 +16,20 @@ var _exportNames = {
16
16
  useGridApiRef: true,
17
17
  useGridRootProps: true,
18
18
  GridColumnMenu: true,
19
- GRID_COLUMN_MENU_COMPONENTS: true,
20
- GRID_COLUMN_MENU_COMPONENTS_PROPS: true,
19
+ GRID_COLUMN_MENU_SLOTS: true,
20
+ GRID_COLUMN_MENU_SLOT_PROPS: true,
21
21
  GridColumnHeaders: true
22
22
  };
23
- Object.defineProperty(exports, "GRID_COLUMN_MENU_COMPONENTS", {
23
+ Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOTS", {
24
24
  enumerable: true,
25
25
  get: function () {
26
- return _reexports2.GRID_COLUMN_MENU_COMPONENTS;
26
+ return _reexports2.GRID_COLUMN_MENU_SLOTS;
27
27
  }
28
28
  });
29
- Object.defineProperty(exports, "GRID_COLUMN_MENU_COMPONENTS_PROPS", {
29
+ Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOT_PROPS", {
30
30
  enumerable: true,
31
31
  get: function () {
32
- return _reexports2.GRID_COLUMN_MENU_COMPONENTS_PROPS;
32
+ return _reexports2.GRID_COLUMN_MENU_SLOT_PROPS;
33
33
  }
34
34
  });
35
35
  Object.defineProperty(exports, "GridColumnHeaders", {
@@ -19,7 +19,7 @@ function findGroupHeaderElementsFromField(elem, field) {
19
19
  return Array.from(elem.querySelectorAll(`[data-fields*="|-${field}-|"]`) ?? []);
20
20
  }
21
21
  function findGridCellElementsFromCol(col, api) {
22
- const root = (0, _internals.findParentElementFromClassName)(col, 'MuiDataGrid-root');
22
+ const root = (0, _internals.findParentElementFromClassName)(col, _xDataGrid.gridClasses.root);
23
23
  if (!root) {
24
24
  throw new Error('MUI: The root element is not found.');
25
25
  }
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTY3OTUyNjAwMDAwMA==";
9
+ const releaseInfo = "MTY4MTA3NDAwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "6.0.3",
3
+ "version": "6.1.0",
4
4
  "description": "The Pro plan edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -33,8 +33,8 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.21.0",
35
35
  "@mui/utils": "^5.11.13",
36
- "@mui/x-data-grid": "6.0.3",
37
- "@mui/x-license-pro": "6.0.3",
36
+ "@mui/x-data-grid": "6.1.0",
37
+ "@mui/x-license-pro": "6.0.4",
38
38
  "@types/format-util": "^1.0.2",
39
39
  "clsx": "^1.2.1",
40
40
  "prop-types": "^15.8.1",
@@ -4,4 +4,12 @@ export { useGridRootProps } from '../hooks/utils/useGridRootProps';
4
4
 
5
5
  /**
6
6
  * The full grid API.
7
+ */
8
+
9
+ /**
10
+ * The state of `DataGridPro`.
11
+ */
12
+
13
+ /**
14
+ * The initial state of `DataGridPro`.
7
15
  */
package/utils/domUtils.js CHANGED
@@ -11,7 +11,7 @@ export function findGroupHeaderElementsFromField(elem, field) {
11
11
  return Array.from((_elem$querySelectorAl = elem.querySelectorAll(`[data-fields*="|-${field}-|"]`)) != null ? _elem$querySelectorAl : []);
12
12
  }
13
13
  export function findGridCellElementsFromCol(col, api) {
14
- const root = findParentElementFromClassName(col, 'MuiDataGrid-root');
14
+ const root = findParentElementFromClassName(col, gridClasses.root);
15
15
  if (!root) {
16
16
  throw new Error('MUI: The root element is not found.');
17
17
  }
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY3OTUyNjAwMDAwMA==";
3
+ const releaseInfo = "MTY4MTA3NDAwMDAwMA==";
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