@mui/x-data-grid-pro 6.18.1 → 7.0.0-alpha.1

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 (46) hide show
  1. package/CHANGELOG.md +558 -1
  2. package/DataGridPro/DataGridPro.js +0 -10
  3. package/DataGridPro/useDataGridProProps.js +10 -15
  4. package/components/headerFiltering/GridHeaderFilterCell.js +0 -1
  5. package/components/headerFiltering/GridHeaderFilterMenu.js +0 -1
  6. package/components/headerFiltering/GridHeaderFilterMenuContainer.js +0 -1
  7. package/constants/dataGridProDefaultSlotsComponents.js +4 -4
  8. package/hooks/features/columnResize/useGridColumnResize.js +4 -1
  9. package/index.js +1 -1
  10. package/legacy/DataGridPro/DataGridPro.js +0 -10
  11. package/legacy/DataGridPro/useDataGridProProps.js +9 -17
  12. package/legacy/components/headerFiltering/GridHeaderFilterCell.js +0 -1
  13. package/legacy/components/headerFiltering/GridHeaderFilterMenu.js +0 -1
  14. package/legacy/components/headerFiltering/GridHeaderFilterMenuContainer.js +0 -1
  15. package/legacy/constants/dataGridProDefaultSlotsComponents.js +4 -4
  16. package/legacy/hooks/features/columnResize/useGridColumnResize.js +4 -1
  17. package/legacy/index.js +1 -1
  18. package/legacy/material/index.js +2 -2
  19. package/legacy/utils/releaseInfo.js +1 -1
  20. package/material/index.d.ts +2 -2
  21. package/material/index.js +2 -2
  22. package/models/dataGridProProps.d.ts +3 -13
  23. package/models/gridProIconSlotsComponent.d.ts +2 -2
  24. package/models/gridProSlotsComponent.d.ts +2 -5
  25. package/modern/DataGridPro/DataGridPro.js +0 -10
  26. package/modern/DataGridPro/useDataGridProProps.js +6 -8
  27. package/modern/components/headerFiltering/GridHeaderFilterCell.js +0 -1
  28. package/modern/components/headerFiltering/GridHeaderFilterMenu.js +0 -1
  29. package/modern/components/headerFiltering/GridHeaderFilterMenuContainer.js +0 -1
  30. package/modern/constants/dataGridProDefaultSlotsComponents.js +4 -4
  31. package/modern/hooks/features/columnResize/useGridColumnResize.js +3 -1
  32. package/modern/index.js +1 -1
  33. package/modern/material/index.js +2 -2
  34. package/modern/utils/releaseInfo.js +1 -1
  35. package/node/DataGridPro/DataGridPro.js +0 -10
  36. package/node/DataGridPro/useDataGridProProps.js +5 -7
  37. package/node/components/headerFiltering/GridHeaderFilterCell.js +0 -1
  38. package/node/components/headerFiltering/GridHeaderFilterMenu.js +0 -1
  39. package/node/components/headerFiltering/GridHeaderFilterMenuContainer.js +0 -1
  40. package/node/constants/dataGridProDefaultSlotsComponents.js +4 -4
  41. package/node/hooks/features/columnResize/useGridColumnResize.js +3 -1
  42. package/node/index.js +1 -1
  43. package/node/material/index.js +2 -2
  44. package/node/utils/releaseInfo.js +1 -1
  45. package/package.json +4 -4
  46. package/utils/releaseInfo.js +1 -1
@@ -144,13 +144,16 @@ function extractColumnWidths(apiRef, options, columns) {
144
144
  if (options.includeHeaders) {
145
145
  const header = findGridHeader(apiRef.current, column.field);
146
146
  if (header) {
147
+ var _iconContainer$client, _menuContainer$client;
147
148
  const title = header.querySelector(`.${gridClasses.columnHeaderTitle}`);
148
149
  const content = header.querySelector(`.${gridClasses.columnHeaderTitleContainerContent}`);
150
+ const iconContainer = header.querySelector(`.${gridClasses.iconButtonContainer}`);
151
+ const menuContainer = header.querySelector(`.${gridClasses.menuIcon}`);
149
152
  const element = title != null ? title : content;
150
153
  const style = window.getComputedStyle(header, null);
151
154
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
152
155
  const contentWidth = element.scrollWidth + 1;
153
- const width = paddingWidth + contentWidth;
156
+ const width = contentWidth + paddingWidth + ((_iconContainer$client = iconContainer == null ? void 0 : iconContainer.clientWidth) != null ? _iconContainer$client : 0) + ((_menuContainer$client = menuContainer == null ? void 0 : menuContainer.clientWidth) != null ? _menuContainer$client : 0);
154
157
  filteredWidths.push(width);
155
158
  }
156
159
  }
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.18.1
2
+ * @mui/x-data-grid-pro v7.0.0-alpha.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -145,16 +145,6 @@ DataGridProRaw.propTypes = {
145
145
  * If defined, the grid will ignore the `hide` property in [[GridColDef]].
146
146
  */
147
147
  columnVisibilityModel: PropTypes.object,
148
- /**
149
- * Overridable components.
150
- * @deprecated Use the `slots` prop instead.
151
- */
152
- components: PropTypes.object,
153
- /**
154
- * Overridable components props dynamically passed to the component at rendering.
155
- * @deprecated Use the `slotProps` prop instead.
156
- */
157
- componentsProps: PropTypes.object,
158
148
  /**
159
149
  * If above 0, the row children will be expanded up to this depth.
160
150
  * If equal to -1, all the row children will be expanded.
@@ -1,9 +1,8 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
1
  import _extends from "@babel/runtime/helpers/esm/extends";
3
2
  import * as React from 'react';
4
3
  import { useThemeProps } from '@mui/material/styles';
5
4
  import { GRID_DEFAULT_LOCALE_TEXT, DATA_GRID_PROPS_DEFAULT_VALUES } from '@mui/x-data-grid';
6
- import { computeSlots, uncapitalizeObjectKeys, useProps } from '@mui/x-data-grid/internals';
5
+ import { computeSlots, useProps } from '@mui/x-data-grid/internals';
7
6
  import { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from '../constants/dataGridProDefaultSlotsComponents';
8
7
 
9
8
  /**
@@ -26,33 +25,26 @@ export var DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_DEF
26
25
  },
27
26
  unstable_headerFilters: false
28
27
  });
29
- var defaultSlots = uncapitalizeObjectKeys(DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS);
28
+ var defaultSlots = DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS;
30
29
  export var useDataGridProProps = function useDataGridProProps(inProps) {
31
- var _useProps = useProps(useThemeProps({
32
- props: inProps,
33
- name: 'MuiDataGrid'
34
- })),
35
- _useProps2 = _slicedToArray(_useProps, 3),
36
- components = _useProps2[0],
37
- componentsProps = _useProps2[1],
38
- themedProps = _useProps2[2];
30
+ var themedProps = useProps(useThemeProps({
31
+ props: inProps,
32
+ name: 'MuiDataGrid'
33
+ }));
39
34
  var localeText = React.useMemo(function () {
40
35
  return _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText);
41
36
  }, [themedProps.localeText]);
42
37
  var slots = React.useMemo(function () {
43
38
  return computeSlots({
44
39
  defaultSlots: defaultSlots,
45
- slots: themedProps.slots,
46
- components: components
40
+ slots: themedProps.slots
47
41
  });
48
- }, [components, themedProps.slots]);
42
+ }, [themedProps.slots]);
49
43
  return React.useMemo(function () {
50
- var _themedProps$slotProp;
51
44
  return _extends({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, themedProps, {
52
45
  localeText: localeText,
53
46
  slots: slots,
54
- slotProps: (_themedProps$slotProp = themedProps.slotProps) != null ? _themedProps$slotProp : componentsProps,
55
47
  signature: 'DataGridPro'
56
48
  });
57
- }, [themedProps, localeText, slots, componentsProps]);
49
+ }, [themedProps, localeText, slots]);
58
50
  };
@@ -224,7 +224,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
224
224
  colIndex: PropTypes.number.isRequired,
225
225
  filterOperators: PropTypes.arrayOf(PropTypes.shape({
226
226
  getApplyFilterFn: PropTypes.func.isRequired,
227
- getApplyFilterFnV7: PropTypes.func,
228
227
  getValueAsString: PropTypes.func,
229
228
  headerLabel: PropTypes.string,
230
229
  InputComponent: PropTypes.elementType,
@@ -75,7 +75,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
75
75
  open: PropTypes.bool.isRequired,
76
76
  operators: PropTypes.arrayOf(PropTypes.shape({
77
77
  getApplyFilterFn: PropTypes.func.isRequired,
78
- getApplyFilterFnV7: PropTypes.func,
79
78
  getValueAsString: PropTypes.func,
80
79
  headerLabel: PropTypes.string,
81
80
  InputComponent: PropTypes.elementType,
@@ -81,7 +81,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
81
81
  }).isRequired,
82
82
  operators: PropTypes.arrayOf(PropTypes.shape({
83
83
  getApplyFilterFn: PropTypes.func.isRequired,
84
- getApplyFilterFnV7: PropTypes.func,
85
84
  getValueAsString: PropTypes.func,
86
85
  headerLabel: PropTypes.string,
87
86
  InputComponent: PropTypes.elementType,
@@ -6,8 +6,8 @@ import { GridHeaderFilterMenu } from '../components/headerFiltering/GridHeaderFi
6
6
  import { GridHeaderFilterCell } from '../components/headerFiltering/GridHeaderFilterCell';
7
7
  import materialSlots from '../material';
8
8
  export var DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = _extends({}, DATA_GRID_DEFAULT_SLOTS_COMPONENTS, materialSlots, {
9
- ColumnMenu: GridProColumnMenu,
10
- ColumnHeaders: GridColumnHeaders,
11
- HeaderFilterCell: GridHeaderFilterCell,
12
- HeaderFilterMenu: GridHeaderFilterMenu
9
+ columnMenu: GridProColumnMenu,
10
+ columnHeaders: GridColumnHeaders,
11
+ headerFilterCell: GridHeaderFilterCell,
12
+ headerFilterMenu: GridHeaderFilterMenu
13
13
  });
@@ -153,13 +153,16 @@ function extractColumnWidths(apiRef, options, columns) {
153
153
  if (options.includeHeaders) {
154
154
  var header = findGridHeader(apiRef.current, column.field);
155
155
  if (header) {
156
+ var _iconContainer$client, _menuContainer$client;
156
157
  var title = header.querySelector(".".concat(gridClasses.columnHeaderTitle));
157
158
  var content = header.querySelector(".".concat(gridClasses.columnHeaderTitleContainerContent));
159
+ var iconContainer = header.querySelector(".".concat(gridClasses.iconButtonContainer));
160
+ var menuContainer = header.querySelector(".".concat(gridClasses.menuIcon));
158
161
  var element = title != null ? title : content;
159
162
  var style = window.getComputedStyle(header, null);
160
163
  var paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
161
164
  var contentWidth = element.scrollWidth + 1;
162
- var width = paddingWidth + contentWidth;
165
+ var width = contentWidth + paddingWidth + ((_iconContainer$client = iconContainer == null ? void 0 : iconContainer.clientWidth) != null ? _iconContainer$client : 0) + ((_menuContainer$client = menuContainer == null ? void 0 : menuContainer.clientWidth) != null ? _menuContainer$client : 0);
163
166
  filteredWidths.push(width);
164
167
  }
165
168
  }
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.18.1
2
+ * @mui/x-data-grid-pro v7.0.0-alpha.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { GridPushPinRightIcon, GridPushPinLeftIcon } from './icons';
3
3
  var iconSlots = {
4
- ColumnMenuPinRightIcon: GridPushPinRightIcon,
5
- ColumnMenuPinLeftIcon: GridPushPinLeftIcon
4
+ columnMenuPinRightIcon: GridPushPinRightIcon,
5
+ columnMenuPinLeftIcon: GridPushPinLeftIcon
6
6
  };
7
7
  var materialSlots = _extends({}, iconSlots);
8
8
  export default materialSlots;
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY5OTQ4NDQwMDAwMA==";
3
+ var releaseInfo = "MTcwMDE3MjAwMDAwMA==";
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,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const materialSlots: {
3
- ColumnMenuPinLeftIcon: import("react").JSXElementConstructor<any>;
4
- ColumnMenuPinRightIcon: import("react").JSXElementConstructor<any>;
3
+ columnMenuPinLeftIcon: import("react").JSXElementConstructor<any>;
4
+ columnMenuPinRightIcon: import("react").JSXElementConstructor<any>;
5
5
  };
6
6
  export default materialSlots;
package/material/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { GridPushPinRightIcon, GridPushPinLeftIcon } from './icons';
3
3
  const iconSlots = {
4
- ColumnMenuPinRightIcon: GridPushPinRightIcon,
5
- ColumnMenuPinLeftIcon: GridPushPinLeftIcon
4
+ columnMenuPinRightIcon: GridPushPinRightIcon,
5
+ columnMenuPinLeftIcon: GridPushPinLeftIcon
6
6
  };
7
7
  const materialSlots = _extends({}, iconSlots);
8
8
  export default materialSlots;
@@ -6,7 +6,7 @@ import type { GridPinnedRowsProp } from '../hooks/features/rowPinning';
6
6
  import { GridApiPro } from './gridApiPro';
7
7
  import { GridGroupingColDefOverride, GridGroupingColDefOverrideParams } from './gridGroupingColDefOverride';
8
8
  import { GridInitialStatePro } from './gridStatePro';
9
- import { GridProSlotsComponent, UncapitalizedGridProSlotsComponent } from './gridProSlotsComponent';
9
+ import { GridProSlotsComponent } from './gridProSlotsComponent';
10
10
  import type { GridProSlotProps } from './gridProSlotProps';
11
11
  import { GridAutosizeOptions } from '../hooks';
12
12
  export interface GridExperimentalProFeatures extends GridExperimentalFeatures {
@@ -18,13 +18,8 @@ export interface GridExperimentalProFeatures extends GridExperimentalFeatures {
18
18
  interface DataGridProPropsWithComplexDefaultValueBeforeProcessing extends Omit<DataGridPropsWithComplexDefaultValueBeforeProcessing, 'components'> {
19
19
  /**
20
20
  * Overridable components.
21
- * @deprecated Use the `slots` prop instead.
22
21
  */
23
- components?: Partial<GridProSlotsComponent>;
24
- /**
25
- * Overridable components.
26
- */
27
- slots?: Partial<UncapitalizedGridProSlotsComponent>;
22
+ slots?: Partial<GridProSlotsComponent>;
28
23
  }
29
24
  /**
30
25
  * The props users can give to the `DataGridProProps` component.
@@ -32,7 +27,7 @@ interface DataGridProPropsWithComplexDefaultValueBeforeProcessing extends Omit<D
32
27
  export interface DataGridProProps<R extends GridValidRowModel = any> extends Omit<Partial<DataGridProPropsWithDefaultValue> & DataGridProPropsWithComplexDefaultValueBeforeProcessing & DataGridProPropsWithoutDefaultValue<R>, DataGridProForcedPropsKey> {
33
28
  }
34
29
  interface DataGridProPropsWithComplexDefaultValueAfterProcessing extends Omit<DataGridPropsWithComplexDefaultValueAfterProcessing, 'slots'> {
35
- slots: UncapitalizedGridProSlotsComponent;
30
+ slots: GridProSlotsComponent;
36
31
  }
37
32
  /**
38
33
  * The props of the `DataGridPro` component after the pre-processing phase.
@@ -227,10 +222,5 @@ export interface DataGridProPropsWithoutDefaultValue<R extends GridValidRowModel
227
222
  * Overridable components props dynamically passed to the component at rendering.
228
223
  */
229
224
  slotProps?: GridProSlotProps;
230
- /**
231
- * Overridable components props dynamically passed to the component at rendering.
232
- * @deprecated Use the `slotProps` prop instead.
233
- */
234
- componentsProps?: GridProSlotProps;
235
225
  }
236
226
  export {};
@@ -4,10 +4,10 @@ export interface GridProIconSlotsComponent {
4
4
  * Icon displayed in column menu for left pinning
5
5
  * @default GridPushPinLeftIcon
6
6
  */
7
- ColumnMenuPinLeftIcon: React.JSXElementConstructor<any>;
7
+ columnMenuPinLeftIcon: React.JSXElementConstructor<any>;
8
8
  /**
9
9
  * Icon displayed in column menu for right pinning
10
10
  * @default GridPushPinRightIcon
11
11
  */
12
- ColumnMenuPinRightIcon: React.JSXElementConstructor<any>;
12
+ columnMenuPinRightIcon: React.JSXElementConstructor<any>;
13
13
  }
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { GridSlotsComponent } from '@mui/x-data-grid';
3
- import { UncapitalizeObjectKeys } from '@mui/x-data-grid/internals';
4
3
  import { GridProIconSlotsComponent } from './gridProIconSlotsComponent';
5
4
  /**
6
5
  * Grid components React prop interface containing all the overridable components
@@ -11,12 +10,10 @@ export interface GridProSlotsComponent extends GridSlotsComponent, GridProIconSl
11
10
  * Component responsible for showing menu adornment in Header filter row
12
11
  * @default GridHeaderFilterCell
13
12
  */
14
- HeaderFilterCell: React.JSXElementConstructor<any>;
13
+ headerFilterCell: React.JSXElementConstructor<any>;
15
14
  /**
16
15
  * Component responsible for showing menu in Header filter row
17
16
  * @default GridHeaderFilterMenu
18
17
  */
19
- HeaderFilterMenu: React.JSXElementConstructor<any> | null;
20
- }
21
- export interface UncapitalizedGridProSlotsComponent extends UncapitalizeObjectKeys<GridProSlotsComponent> {
18
+ headerFilterMenu: React.JSXElementConstructor<any> | null;
22
19
  }
@@ -145,16 +145,6 @@ DataGridProRaw.propTypes = {
145
145
  * If defined, the grid will ignore the `hide` property in [[GridColDef]].
146
146
  */
147
147
  columnVisibilityModel: PropTypes.object,
148
- /**
149
- * Overridable components.
150
- * @deprecated Use the `slots` prop instead.
151
- */
152
- components: PropTypes.object,
153
- /**
154
- * Overridable components props dynamically passed to the component at rendering.
155
- * @deprecated Use the `slotProps` prop instead.
156
- */
157
- componentsProps: PropTypes.object,
158
148
  /**
159
149
  * If above 0, the row children will be expanded up to this depth.
160
150
  * If equal to -1, all the row children will be expanded.
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { useThemeProps } from '@mui/material/styles';
4
4
  import { GRID_DEFAULT_LOCALE_TEXT, DATA_GRID_PROPS_DEFAULT_VALUES } from '@mui/x-data-grid';
5
- import { computeSlots, uncapitalizeObjectKeys, useProps } from '@mui/x-data-grid/internals';
5
+ import { computeSlots, useProps } from '@mui/x-data-grid/internals';
6
6
  import { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from '../constants/dataGridProDefaultSlotsComponents';
7
7
 
8
8
  /**
@@ -23,22 +23,20 @@ export const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_D
23
23
  getDetailPanelHeight: () => 500,
24
24
  unstable_headerFilters: false
25
25
  });
26
- const defaultSlots = uncapitalizeObjectKeys(DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS);
26
+ const defaultSlots = DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS;
27
27
  export const useDataGridProProps = inProps => {
28
- const [components, componentsProps, themedProps] = useProps(useThemeProps({
28
+ const themedProps = useProps(useThemeProps({
29
29
  props: inProps,
30
30
  name: 'MuiDataGrid'
31
31
  }));
32
32
  const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
33
33
  const slots = React.useMemo(() => computeSlots({
34
34
  defaultSlots,
35
- slots: themedProps.slots,
36
- components
37
- }), [components, themedProps.slots]);
35
+ slots: themedProps.slots
36
+ }), [themedProps.slots]);
38
37
  return React.useMemo(() => _extends({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, themedProps, {
39
38
  localeText,
40
39
  slots,
41
- slotProps: themedProps.slotProps ?? componentsProps,
42
40
  signature: 'DataGridPro'
43
- }), [themedProps, localeText, slots, componentsProps]);
41
+ }), [themedProps, localeText, slots]);
44
42
  };
@@ -216,7 +216,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
216
216
  colIndex: PropTypes.number.isRequired,
217
217
  filterOperators: PropTypes.arrayOf(PropTypes.shape({
218
218
  getApplyFilterFn: PropTypes.func.isRequired,
219
- getApplyFilterFnV7: PropTypes.func,
220
219
  getValueAsString: PropTypes.func,
221
220
  headerLabel: PropTypes.string,
222
221
  InputComponent: PropTypes.elementType,
@@ -75,7 +75,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
75
75
  open: PropTypes.bool.isRequired,
76
76
  operators: PropTypes.arrayOf(PropTypes.shape({
77
77
  getApplyFilterFn: PropTypes.func.isRequired,
78
- getApplyFilterFnV7: PropTypes.func,
79
78
  getValueAsString: PropTypes.func,
80
79
  headerLabel: PropTypes.string,
81
80
  InputComponent: PropTypes.elementType,
@@ -82,7 +82,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
82
82
  }).isRequired,
83
83
  operators: PropTypes.arrayOf(PropTypes.shape({
84
84
  getApplyFilterFn: PropTypes.func.isRequired,
85
- getApplyFilterFnV7: PropTypes.func,
86
85
  getValueAsString: PropTypes.func,
87
86
  headerLabel: PropTypes.string,
88
87
  InputComponent: PropTypes.elementType,
@@ -6,8 +6,8 @@ import { GridHeaderFilterMenu } from '../components/headerFiltering/GridHeaderFi
6
6
  import { GridHeaderFilterCell } from '../components/headerFiltering/GridHeaderFilterCell';
7
7
  import materialSlots from '../material';
8
8
  export const DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = _extends({}, DATA_GRID_DEFAULT_SLOTS_COMPONENTS, materialSlots, {
9
- ColumnMenu: GridProColumnMenu,
10
- ColumnHeaders: GridColumnHeaders,
11
- HeaderFilterCell: GridHeaderFilterCell,
12
- HeaderFilterMenu: GridHeaderFilterMenu
9
+ columnMenu: GridProColumnMenu,
10
+ columnHeaders: GridColumnHeaders,
11
+ headerFilterCell: GridHeaderFilterCell,
12
+ headerFilterMenu: GridHeaderFilterMenu
13
13
  });
@@ -145,11 +145,13 @@ function extractColumnWidths(apiRef, options, columns) {
145
145
  if (header) {
146
146
  const title = header.querySelector(`.${gridClasses.columnHeaderTitle}`);
147
147
  const content = header.querySelector(`.${gridClasses.columnHeaderTitleContainerContent}`);
148
+ const iconContainer = header.querySelector(`.${gridClasses.iconButtonContainer}`);
149
+ const menuContainer = header.querySelector(`.${gridClasses.menuIcon}`);
148
150
  const element = title ?? content;
149
151
  const style = window.getComputedStyle(header, null);
150
152
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
151
153
  const contentWidth = element.scrollWidth + 1;
152
- const width = paddingWidth + contentWidth;
154
+ const width = contentWidth + paddingWidth + (iconContainer?.clientWidth ?? 0) + (menuContainer?.clientWidth ?? 0);
153
155
  filteredWidths.push(width);
154
156
  }
155
157
  }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.18.1
2
+ * @mui/x-data-grid-pro v7.0.0-alpha.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { GridPushPinRightIcon, GridPushPinLeftIcon } from './icons';
3
3
  const iconSlots = {
4
- ColumnMenuPinRightIcon: GridPushPinRightIcon,
5
- ColumnMenuPinLeftIcon: GridPushPinLeftIcon
4
+ columnMenuPinRightIcon: GridPushPinRightIcon,
5
+ columnMenuPinLeftIcon: GridPushPinLeftIcon
6
6
  };
7
7
  const materialSlots = _extends({}, iconSlots);
8
8
  export default materialSlots;
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY5OTQ4NDQwMDAwMA==";
3
+ const releaseInfo = "MTcwMDE3MjAwMDAwMA==";
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
@@ -153,16 +153,6 @@ DataGridProRaw.propTypes = {
153
153
  * If defined, the grid will ignore the `hide` property in [[GridColDef]].
154
154
  */
155
155
  columnVisibilityModel: _propTypes.default.object,
156
- /**
157
- * Overridable components.
158
- * @deprecated Use the `slots` prop instead.
159
- */
160
- components: _propTypes.default.object,
161
- /**
162
- * Overridable components props dynamically passed to the component at rendering.
163
- * @deprecated Use the `slotProps` prop instead.
164
- */
165
- componentsProps: _propTypes.default.object,
166
156
  /**
167
157
  * If above 0, the row children will be expanded up to this depth.
168
158
  * If equal to -1, all the row children will be expanded.
@@ -31,23 +31,21 @@ const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PRO_PROPS_DEFAULT_V
31
31
  getDetailPanelHeight: () => 500,
32
32
  unstable_headerFilters: false
33
33
  });
34
- const defaultSlots = (0, _internals.uncapitalizeObjectKeys)(_dataGridProDefaultSlotsComponents.DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS);
34
+ const defaultSlots = _dataGridProDefaultSlotsComponents.DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS;
35
35
  const useDataGridProProps = inProps => {
36
- const [components, componentsProps, themedProps] = (0, _internals.useProps)((0, _styles.useThemeProps)({
36
+ const themedProps = (0, _internals.useProps)((0, _styles.useThemeProps)({
37
37
  props: inProps,
38
38
  name: 'MuiDataGrid'
39
39
  }));
40
40
  const localeText = React.useMemo(() => (0, _extends2.default)({}, _xDataGrid.GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
41
41
  const slots = React.useMemo(() => (0, _internals.computeSlots)({
42
42
  defaultSlots,
43
- slots: themedProps.slots,
44
- components
45
- }), [components, themedProps.slots]);
43
+ slots: themedProps.slots
44
+ }), [themedProps.slots]);
46
45
  return React.useMemo(() => (0, _extends2.default)({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, themedProps, {
47
46
  localeText,
48
47
  slots,
49
- slotProps: themedProps.slotProps ?? componentsProps,
50
48
  signature: 'DataGridPro'
51
- }), [themedProps, localeText, slots, componentsProps]);
49
+ }), [themedProps, localeText, slots]);
52
50
  };
53
51
  exports.useDataGridProProps = useDataGridProProps;
@@ -224,7 +224,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
224
224
  colIndex: _propTypes.default.number.isRequired,
225
225
  filterOperators: _propTypes.default.arrayOf(_propTypes.default.shape({
226
226
  getApplyFilterFn: _propTypes.default.func.isRequired,
227
- getApplyFilterFnV7: _propTypes.default.func,
228
227
  getValueAsString: _propTypes.default.func,
229
228
  headerLabel: _propTypes.default.string,
230
229
  InputComponent: _propTypes.default.elementType,
@@ -84,7 +84,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
84
84
  open: _propTypes.default.bool.isRequired,
85
85
  operators: _propTypes.default.arrayOf(_propTypes.default.shape({
86
86
  getApplyFilterFn: _propTypes.default.func.isRequired,
87
- getApplyFilterFnV7: _propTypes.default.func,
88
87
  getValueAsString: _propTypes.default.func,
89
88
  headerLabel: _propTypes.default.string,
90
89
  InputComponent: _propTypes.default.elementType,
@@ -90,7 +90,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
90
90
  }).isRequired,
91
91
  operators: _propTypes.default.arrayOf(_propTypes.default.shape({
92
92
  getApplyFilterFn: _propTypes.default.func.isRequired,
93
- getApplyFilterFnV7: _propTypes.default.func,
94
93
  getValueAsString: _propTypes.default.func,
95
94
  headerLabel: _propTypes.default.string,
96
95
  InputComponent: _propTypes.default.elementType,
@@ -13,8 +13,8 @@ var _GridHeaderFilterMenu = require("../components/headerFiltering/GridHeaderFil
13
13
  var _GridHeaderFilterCell = require("../components/headerFiltering/GridHeaderFilterCell");
14
14
  var _material = _interopRequireDefault(require("../material"));
15
15
  const DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = exports.DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = (0, _extends2.default)({}, _internals.DATA_GRID_DEFAULT_SLOTS_COMPONENTS, _material.default, {
16
- ColumnMenu: _GridProColumnMenu.GridProColumnMenu,
17
- ColumnHeaders: _GridColumnHeaders.GridColumnHeaders,
18
- HeaderFilterCell: _GridHeaderFilterCell.GridHeaderFilterCell,
19
- HeaderFilterMenu: _GridHeaderFilterMenu.GridHeaderFilterMenu
16
+ columnMenu: _GridProColumnMenu.GridProColumnMenu,
17
+ columnHeaders: _GridColumnHeaders.GridColumnHeaders,
18
+ headerFilterCell: _GridHeaderFilterCell.GridHeaderFilterCell,
19
+ headerFilterMenu: _GridHeaderFilterMenu.GridHeaderFilterMenu
20
20
  });
@@ -154,11 +154,13 @@ function extractColumnWidths(apiRef, options, columns) {
154
154
  if (header) {
155
155
  const title = header.querySelector(`.${_xDataGrid.gridClasses.columnHeaderTitle}`);
156
156
  const content = header.querySelector(`.${_xDataGrid.gridClasses.columnHeaderTitleContainerContent}`);
157
+ const iconContainer = header.querySelector(`.${_xDataGrid.gridClasses.iconButtonContainer}`);
158
+ const menuContainer = header.querySelector(`.${_xDataGrid.gridClasses.menuIcon}`);
157
159
  const element = title ?? content;
158
160
  const style = window.getComputedStyle(header, null);
159
161
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
160
162
  const contentWidth = element.scrollWidth + 1;
161
- const width = paddingWidth + contentWidth;
163
+ const width = contentWidth + paddingWidth + (iconContainer?.clientWidth ?? 0) + (menuContainer?.clientWidth ?? 0);
162
164
  filteredWidths.push(width);
163
165
  }
164
166
  }
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.18.1
2
+ * @mui/x-data-grid-pro v7.0.0-alpha.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -8,8 +8,8 @@ exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _icons = require("./icons");
10
10
  const iconSlots = {
11
- ColumnMenuPinRightIcon: _icons.GridPushPinRightIcon,
12
- ColumnMenuPinLeftIcon: _icons.GridPushPinLeftIcon
11
+ columnMenuPinRightIcon: _icons.GridPushPinRightIcon,
12
+ columnMenuPinLeftIcon: _icons.GridPushPinLeftIcon
13
13
  };
14
14
  const materialSlots = (0, _extends2.default)({}, iconSlots);
15
15
  var _default = exports.default = materialSlots;
@@ -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 = "MTY5OTQ4NDQwMDAwMA==";
9
+ const releaseInfo = "MTcwMDE3MjAwMDAwMA==";
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.18.1",
3
+ "version": "7.0.0-alpha.1",
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,9 +33,9 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.23.2",
35
35
  "@mui/utils": "^5.14.16",
36
- "@mui/x-data-grid": "6.18.1",
37
- "@mui/x-license-pro": "6.10.2",
38
- "@types/format-util": "^1.0.3",
36
+ "@mui/x-data-grid": "7.0.0-alpha.1",
37
+ "@mui/x-license-pro": "7.0.0-alpha.1",
38
+ "@types/format-util": "^1.0.4",
39
39
  "clsx": "^2.0.0",
40
40
  "prop-types": "^15.8.1",
41
41
  "reselect": "^4.1.8"
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY5OTQ4NDQwMDAwMA==";
3
+ const releaseInfo = "MTcwMDE3MjAwMDAwMA==";
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