@mui/x-data-grid 6.0.3 → 6.0.4

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 (74) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/components/GridPagination.d.ts +2 -2
  3. package/components/GridRow.js +1 -1
  4. package/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
  5. package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
  6. package/components/menu/columnMenu/GridColumnMenu.d.ts +5 -5
  7. package/components/menu/columnMenu/GridColumnMenu.js +30 -30
  8. package/components/menu/columnMenu/GridColumnMenuProps.d.ts +1 -1
  9. package/components/panel/GridPanel.d.ts +1 -1
  10. package/components/panel/filterPanel/GridFilterPanel.js +1 -1
  11. package/components/reexportable.d.ts +1 -1
  12. package/components/reexportable.js +1 -1
  13. package/hooks/features/columnMenu/columnMenuInterfaces.d.ts +11 -11
  14. package/hooks/features/columnMenu/{useGridColumnMenuComponents.d.ts → useGridColumnMenuSlots.d.ts} +4 -4
  15. package/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +21 -26
  16. package/hooks/features/columns/useGridColumns.js +1 -1
  17. package/hooks/features/filter/useGridFilter.js +1 -1
  18. package/hooks/features/sorting/useGridSorting.js +1 -1
  19. package/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
  20. package/index.d.ts +1 -1
  21. package/index.js +2 -2
  22. package/legacy/components/GridRow.js +1 -1
  23. package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
  24. package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
  25. package/legacy/components/menu/columnMenu/GridColumnMenu.js +32 -32
  26. package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -1
  27. package/legacy/components/reexportable.js +1 -1
  28. package/legacy/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +25 -30
  29. package/legacy/hooks/features/columns/useGridColumns.js +1 -1
  30. package/legacy/hooks/features/filter/useGridFilter.js +1 -1
  31. package/legacy/hooks/features/sorting/useGridSorting.js +1 -1
  32. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
  33. package/legacy/index.js +2 -2
  34. package/legacy/locales/daDK.js +16 -21
  35. package/legacy/locales/esES.js +1 -1
  36. package/legacy/locales/nbNO.js +10 -12
  37. package/legacy/locales/svSE.js +2 -2
  38. package/locales/daDK.js +16 -21
  39. package/locales/esES.js +1 -1
  40. package/locales/nbNO.js +10 -12
  41. package/locales/svSE.js +2 -2
  42. package/modern/components/GridRow.js +1 -1
  43. package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
  44. package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
  45. package/modern/components/menu/columnMenu/GridColumnMenu.js +30 -30
  46. package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
  47. package/modern/components/reexportable.js +1 -1
  48. package/modern/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +21 -26
  49. package/modern/hooks/features/columns/useGridColumns.js +1 -1
  50. package/modern/hooks/features/filter/useGridFilter.js +1 -1
  51. package/modern/hooks/features/sorting/useGridSorting.js +1 -1
  52. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
  53. package/modern/index.js +2 -2
  54. package/modern/locales/daDK.js +16 -21
  55. package/modern/locales/esES.js +1 -1
  56. package/modern/locales/nbNO.js +10 -12
  57. package/modern/locales/svSE.js +2 -2
  58. package/node/components/GridRow.js +1 -1
  59. package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
  60. package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
  61. package/node/components/menu/columnMenu/GridColumnMenu.js +33 -33
  62. package/node/components/panel/filterPanel/GridFilterPanel.js +1 -1
  63. package/node/components/reexportable.js +4 -4
  64. package/node/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +22 -27
  65. package/node/hooks/features/columns/useGridColumns.js +1 -1
  66. package/node/hooks/features/filter/useGridFilter.js +1 -1
  67. package/node/hooks/features/sorting/useGridSorting.js +1 -1
  68. package/node/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
  69. package/node/index.js +7 -7
  70. package/node/locales/daDK.js +16 -21
  71. package/node/locales/esES.js +1 -1
  72. package/node/locales/nbNO.js +10 -12
  73. package/node/locales/svSE.js +2 -2
  74. package/package.json +1 -1
@@ -4,27 +4,27 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.GridGenericColumnMenu = exports.GridColumnMenu = exports.GRID_COLUMN_MENU_COMPONENTS_PROPS = exports.GRID_COLUMN_MENU_COMPONENTS = void 0;
7
+ exports.GridGenericColumnMenu = exports.GridColumnMenu = exports.GRID_COLUMN_MENU_SLOT_PROPS = exports.GRID_COLUMN_MENU_SLOTS = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
- var _useGridColumnMenuComponents = require("../../../hooks/features/columnMenu/useGridColumnMenuComponents");
12
+ var _useGridColumnMenuSlots = require("../../../hooks/features/columnMenu/useGridColumnMenuSlots");
13
13
  var _GridColumnMenuContainer = require("./GridColumnMenuContainer");
14
14
  var _GridColumnMenuColumnsItem = require("./menuItems/GridColumnMenuColumnsItem");
15
15
  var _GridColumnMenuFilterItem = require("./menuItems/GridColumnMenuFilterItem");
16
16
  var _GridColumnMenuSortItem = require("./menuItems/GridColumnMenuSortItem");
17
17
  var _jsxRuntime = require("react/jsx-runtime");
18
- const _excluded = ["defaultComponents", "defaultComponentsProps", "components", "componentsProps"];
18
+ const _excluded = ["defaultSlots", "defaultSlotProps", "slots", "slotProps"];
19
19
  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); }
20
20
  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; }
21
- const GRID_COLUMN_MENU_COMPONENTS = {
22
- ColumnMenuSortItem: _GridColumnMenuSortItem.GridColumnMenuSortItem,
23
- ColumnMenuFilterItem: _GridColumnMenuFilterItem.GridColumnMenuFilterItem,
24
- ColumnMenuColumnsItem: _GridColumnMenuColumnsItem.GridColumnMenuColumnsItem
21
+ const GRID_COLUMN_MENU_SLOTS = {
22
+ columnMenuSortItem: _GridColumnMenuSortItem.GridColumnMenuSortItem,
23
+ columnMenuFilterItem: _GridColumnMenuFilterItem.GridColumnMenuFilterItem,
24
+ columnMenuColumnsItem: _GridColumnMenuColumnsItem.GridColumnMenuColumnsItem
25
25
  };
26
- exports.GRID_COLUMN_MENU_COMPONENTS = GRID_COLUMN_MENU_COMPONENTS;
27
- const GRID_COLUMN_MENU_COMPONENTS_PROPS = {
26
+ exports.GRID_COLUMN_MENU_SLOTS = GRID_COLUMN_MENU_SLOTS;
27
+ const GRID_COLUMN_MENU_SLOT_PROPS = {
28
28
  columnMenuSortItem: {
29
29
  displayOrder: 10
30
30
  },
@@ -35,33 +35,33 @@ const GRID_COLUMN_MENU_COMPONENTS_PROPS = {
35
35
  displayOrder: 30
36
36
  }
37
37
  };
38
- exports.GRID_COLUMN_MENU_COMPONENTS_PROPS = GRID_COLUMN_MENU_COMPONENTS_PROPS;
38
+ exports.GRID_COLUMN_MENU_SLOT_PROPS = GRID_COLUMN_MENU_SLOT_PROPS;
39
39
  const GridGenericColumnMenu = /*#__PURE__*/React.forwardRef(function GridGenericColumnMenu(props, ref) {
40
40
  const {
41
- defaultComponents,
42
- defaultComponentsProps,
43
- components,
44
- componentsProps
41
+ defaultSlots,
42
+ defaultSlotProps,
43
+ slots,
44
+ slotProps
45
45
  } = props,
46
46
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
47
- const orderedComponents = (0, _useGridColumnMenuComponents.useGridColumnMenuComponents)((0, _extends2.default)({}, other, {
48
- defaultComponents,
49
- defaultComponentsProps,
50
- components,
51
- componentsProps
47
+ const orderedSlots = (0, _useGridColumnMenuSlots.useGridColumnMenuSlots)((0, _extends2.default)({}, other, {
48
+ defaultSlots,
49
+ defaultSlotProps,
50
+ slots,
51
+ slotProps
52
52
  }));
53
53
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnMenuContainer.GridColumnMenuContainer, (0, _extends2.default)({
54
54
  ref: ref
55
55
  }, other, {
56
- children: orderedComponents.map(([Component, componentProps], index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, (0, _extends2.default)({}, componentProps), index))
56
+ children: orderedSlots.map(([Component, otherProps], index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, (0, _extends2.default)({}, otherProps), index))
57
57
  }));
58
58
  });
59
59
  exports.GridGenericColumnMenu = GridGenericColumnMenu;
60
60
  const GridColumnMenu = /*#__PURE__*/React.forwardRef(function GridColumnMenu(props, ref) {
61
61
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridGenericColumnMenu, (0, _extends2.default)({}, props, {
62
62
  ref: ref,
63
- defaultComponents: GRID_COLUMN_MENU_COMPONENTS,
64
- defaultComponentsProps: GRID_COLUMN_MENU_COMPONENTS_PROPS
63
+ defaultSlots: GRID_COLUMN_MENU_SLOTS,
64
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS
65
65
  }));
66
66
  });
67
67
  exports.GridColumnMenu = GridColumnMenu;
@@ -71,19 +71,19 @@ process.env.NODE_ENV !== "production" ? GridColumnMenu.propTypes = {
71
71
  // | To update them edit the TypeScript types and run "yarn proptypes" |
72
72
  // ----------------------------------------------------------------------
73
73
  colDef: _propTypes.default.object.isRequired,
74
- /**
75
- * `components` could be used to add new and (or) override default column menu items
76
- * If you register a nee component you must pass it's `displayOrder` in `componentsProps`
77
- * or it will be placed in the end of the list
78
- */
79
- components: _propTypes.default.object,
74
+ hideMenu: _propTypes.default.func.isRequired,
75
+ id: _propTypes.default.string,
76
+ labelledby: _propTypes.default.string,
77
+ open: _propTypes.default.bool.isRequired,
80
78
  /**
81
79
  * Could be used to pass new props or override props specific to a column menu component
82
80
  * e.g. `displayOrder`
83
81
  */
84
- componentsProps: _propTypes.default.object,
85
- hideMenu: _propTypes.default.func.isRequired,
86
- id: _propTypes.default.string,
87
- labelledby: _propTypes.default.string,
88
- open: _propTypes.default.bool.isRequired
82
+ slotProps: _propTypes.default.object,
83
+ /**
84
+ * `slots` could be used to add new and (or) override default column menu items
85
+ * If you register a nee component you must pass it's `displayOrder` in `slotProps`
86
+ * or it will be placed in the end of the list
87
+ */
88
+ slots: _propTypes.default.object
89
89
  } : void 0;
@@ -151,7 +151,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
151
151
  logicOperators: logicOperators,
152
152
  columnsSort: columnsSort
153
153
  }, filterFormProps), item.id == null ? index : item.id))
154
- }), !rootProps.disableMultipleColumnsFiltering && !disableAddFilterButton && !disableRemoveAllButton ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridPanelFooter.GridPanelFooter, {
154
+ }), !rootProps.disableMultipleColumnsFiltering && !(disableAddFilterButton && disableRemoveAllButton) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridPanelFooter.GridPanelFooter, {
155
155
  children: [!disableAddFilterButton ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseButton, (0, _extends2.default)({
156
156
  onClick: addNewFilter,
157
157
  startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.filterPanelAddIcon, {})
@@ -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 _GridColumnMenu.GRID_COLUMN_MENU_COMPONENTS;
9
+ return _GridColumnMenu.GRID_COLUMN_MENU_SLOTS;
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 _GridColumnMenu.GRID_COLUMN_MENU_COMPONENTS_PROPS;
15
+ return _GridColumnMenu.GRID_COLUMN_MENU_SLOT_PROPS;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "GridColumnMenu", {
@@ -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.useGridColumnMenuComponents = void 0;
7
+ exports.useGridColumnMenuSlots = void 0;
8
8
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var React = _interopRequireWildcard(require("react"));
@@ -13,44 +13,39 @@ var _useGridPrivateApiContext = require("../../utils/useGridPrivateApiContext");
13
13
  const _excluded = ["displayOrder"];
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 camelize = pascalCase => {
17
- const camelCase = pascalCase.split('');
18
- camelCase[0] = camelCase[0].toLowerCase();
19
- return camelCase.join('');
20
- };
21
- const useGridColumnMenuComponents = props => {
16
+ const useGridColumnMenuSlots = props => {
22
17
  const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
23
18
  const {
24
- defaultComponents,
25
- defaultComponentsProps,
26
- components = {},
27
- componentsProps = {},
19
+ defaultSlots,
20
+ defaultSlotProps,
21
+ slots = {},
22
+ slotProps = {},
28
23
  hideMenu,
29
24
  colDef,
30
25
  addDividers = true
31
26
  } = props;
32
- const processedComponents = React.useMemo(() => (0, _extends2.default)({}, defaultComponents, components), [defaultComponents, components]);
33
- const processedComponentsProps = React.useMemo(() => {
34
- if (!componentsProps || Object.keys(componentsProps).length === 0) {
35
- return defaultComponentsProps;
27
+ const processedComponents = React.useMemo(() => (0, _extends2.default)({}, defaultSlots, slots), [defaultSlots, slots]);
28
+ const processedSlotProps = React.useMemo(() => {
29
+ if (!slotProps || Object.keys(slotProps).length === 0) {
30
+ return defaultSlotProps;
36
31
  }
37
- const mergedProps = (0, _extends2.default)({}, componentsProps);
38
- Object.entries(defaultComponentsProps).forEach(([key, currentComponentProps]) => {
39
- mergedProps[key] = (0, _extends2.default)({}, currentComponentProps, componentsProps[key] || {});
32
+ const mergedProps = (0, _extends2.default)({}, slotProps);
33
+ Object.entries(defaultSlotProps).forEach(([key, currentSlotProps]) => {
34
+ mergedProps[key] = (0, _extends2.default)({}, currentSlotProps, slotProps[key] || {});
40
35
  });
41
36
  return mergedProps;
42
- }, [defaultComponentsProps, componentsProps]);
37
+ }, [defaultSlotProps, slotProps]);
43
38
  const defaultItems = apiRef.current.unstable_applyPipeProcessors('columnMenu', [], props.colDef);
44
39
  const userItems = React.useMemo(() => {
45
- const defaultComponentKeys = Object.keys(defaultComponents);
46
- return Object.keys(components).filter(key => !defaultComponentKeys.includes(key));
47
- }, [components, defaultComponents]);
40
+ const defaultComponentKeys = Object.keys(defaultSlots);
41
+ return Object.keys(slots).filter(key => !defaultComponentKeys.includes(key));
42
+ }, [slots, defaultSlots]);
48
43
  return React.useMemo(() => {
49
44
  const uniqueItems = Array.from(new Set([...defaultItems, ...userItems]));
50
45
  const cleansedItems = uniqueItems.filter(key => processedComponents[key] != null);
51
46
  const sorted = cleansedItems.sort((a, b) => {
52
- const leftItemProps = processedComponentsProps[camelize(a)];
53
- const rightItemProps = processedComponentsProps[camelize(b)];
47
+ const leftItemProps = processedSlotProps[a];
48
+ const rightItemProps = processedSlotProps[b];
54
49
  const leftDisplayOrder = Number.isFinite(leftItemProps?.displayOrder) ? leftItemProps.displayOrder : 100;
55
50
  const rightDisplayOrder = Number.isFinite(rightItemProps?.displayOrder) ? rightItemProps.displayOrder : 100;
56
51
  return leftDisplayOrder - rightDisplayOrder;
@@ -60,13 +55,13 @@ const useGridColumnMenuComponents = props => {
60
55
  colDef,
61
56
  onClick: hideMenu
62
57
  };
63
- const processedComponentProps = processedComponentsProps[camelize(key)];
58
+ const processedComponentProps = processedSlotProps[key];
64
59
  if (processedComponentProps) {
65
60
  const customProps = (0, _objectWithoutPropertiesLoose2.default)(processedComponentProps, _excluded);
66
61
  itemProps = (0, _extends2.default)({}, itemProps, customProps);
67
62
  }
68
63
  return addDividers && index !== sorted.length - 1 ? [...acc, [processedComponents[key], itemProps], [_Divider.default, {}]] : [...acc, [processedComponents[key], itemProps]];
69
64
  }, []);
70
- }, [addDividers, colDef, defaultItems, hideMenu, processedComponents, processedComponentsProps, userItems]);
65
+ }, [addDividers, colDef, defaultItems, hideMenu, processedComponents, processedSlotProps, userItems]);
71
66
  };
72
- exports.useGridColumnMenuComponents = useGridColumnMenuComponents;
67
+ exports.useGridColumnMenuSlots = useGridColumnMenuSlots;
@@ -237,7 +237,7 @@ function useGridColumns(apiRef, props) {
237
237
  if (props.disableColumnSelector) {
238
238
  return columnMenuItems;
239
239
  }
240
- return [...columnMenuItems, 'ColumnMenuColumnsItem'];
240
+ return [...columnMenuItems, 'columnMenuColumnsItem'];
241
241
  }, [props.disableColumnSelector]);
242
242
  (0, _pipeProcessing.useGridRegisterPipeProcessor)(apiRef, 'columnMenu', addColumnMenuItems);
243
243
  (0, _pipeProcessing.useGridRegisterPipeProcessor)(apiRef, 'exportState', stateExportPreProcessing);
@@ -67,7 +67,7 @@ const useGridFilter = (apiRef, props) => {
67
67
  if (colDef == null || colDef.filterable === false || props.disableColumnFilter) {
68
68
  return columnMenuItems;
69
69
  }
70
- return [...columnMenuItems, 'ColumnMenuFilterItem'];
70
+ return [...columnMenuItems, 'columnMenuFilterItem'];
71
71
  }, [props.disableColumnFilter]);
72
72
 
73
73
  /**
@@ -80,7 +80,7 @@ const useGridSorting = (apiRef, props) => {
80
80
  }
81
81
  const sortingOrder = colDef.sortingOrder || props.sortingOrder;
82
82
  if (sortingOrder.some(item => !!item)) {
83
- return [...columnMenuItems, 'ColumnMenuSortItem'];
83
+ return [...columnMenuItems, 'columnMenuSortItem'];
84
84
  }
85
85
  return columnMenuItems;
86
86
  }, [props.sortingOrder]);
@@ -436,7 +436,7 @@ const useGridVirtualScroller = props => {
436
436
  prevRootRowStyle.current = rootRowStyle;
437
437
  return rows;
438
438
  };
439
- const needsHorizontalScrollbar = containerDimensions.width && columnsTotalWidth > containerDimensions.width;
439
+ const needsHorizontalScrollbar = containerDimensions.width && columnsTotalWidth >= containerDimensions.width;
440
440
  const contentSize = React.useMemo(() => {
441
441
  // In cases where the columns exceed the available width,
442
442
  // the horizontal scrollbar should be shown even when there're no rows.
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.0.3
2
+ * @mui/x-data-grid v6.0.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -16,19 +16,19 @@ var _exportNames = {
16
16
  useGridRootProps: true,
17
17
  GridColumnHeaders: 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
  };
22
- Object.defineProperty(exports, "GRID_COLUMN_MENU_COMPONENTS", {
22
+ Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOTS", {
23
23
  enumerable: true,
24
24
  get: function () {
25
- return _reexportable.GRID_COLUMN_MENU_COMPONENTS;
25
+ return _reexportable.GRID_COLUMN_MENU_SLOTS;
26
26
  }
27
27
  });
28
- Object.defineProperty(exports, "GRID_COLUMN_MENU_COMPONENTS_PROPS", {
28
+ Object.defineProperty(exports, "GRID_COLUMN_MENU_SLOT_PROPS", {
29
29
  enumerable: true,
30
30
  get: function () {
31
- return _reexportable.GRID_COLUMN_MENU_COMPONENTS_PROPS;
31
+ return _reexportable.GRID_COLUMN_MENU_SLOT_PROPS;
32
32
  }
33
33
  });
34
34
  Object.defineProperty(exports, "GridColumnHeaders", {
@@ -26,17 +26,15 @@ const daDKGrid = {
26
26
  toolbarFiltersTooltipShow: 'Vis filtre',
27
27
  toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktive filtre` : `${count} aktivt filter`,
28
28
  // Quick filter toolbar field
29
- // toolbarQuickFilterPlaceholder: 'Search…',
30
- // toolbarQuickFilterLabel: 'Search',
31
- // toolbarQuickFilterDeleteIconLabel: 'Clear',
32
-
29
+ toolbarQuickFilterPlaceholder: 'Søg…',
30
+ toolbarQuickFilterLabel: 'Søg',
31
+ toolbarQuickFilterDeleteIconLabel: 'Ryd',
33
32
  // Export selector toolbar button text
34
- // toolbarExport: 'Export',
33
+ toolbarExport: 'Eksport',
35
34
  toolbarExportLabel: 'Eksporter',
36
35
  toolbarExportCSV: 'Download som CSV',
37
36
  toolbarExportPrint: 'Print',
38
- // toolbarExportExcel: 'Download as Excel',
39
-
37
+ toolbarExportExcel: 'Download som Excel',
40
38
  // Columns panel text
41
39
  columnsPanelTextFieldLabel: 'Find kolonne',
42
40
  columnsPanelTextFieldPlaceholder: 'Kolonne titel',
@@ -45,7 +43,7 @@ const daDKGrid = {
45
43
  columnsPanelHideAllButton: 'Skjul alle',
46
44
  // Filter panel text
47
45
  filterPanelAddFilter: 'Tilføj filter',
48
- // filterPanelRemoveAll: 'Remove all',
46
+ filterPanelRemoveAll: 'Fjern alle',
49
47
  filterPanelDeleteIconLabel: 'Slet',
50
48
  filterPanelLogicOperator: 'Logisk operator',
51
49
  filterPanelOperator: 'Operatorer',
@@ -75,7 +73,7 @@ const daDKGrid = {
75
73
  // Column menu text
76
74
  columnMenuLabel: 'Menu',
77
75
  columnMenuShowColumns: 'Vis Kolonner',
78
- // columnMenuManageColumns: 'Manage columns',
76
+ columnMenuManageColumns: 'Administrer kolonner',
79
77
  columnMenuFilter: 'Filtre',
80
78
  columnMenuHideColumn: 'Skjul',
81
79
  columnMenuUnsort: 'Fjern sortering',
@@ -115,21 +113,18 @@ const daDKGrid = {
115
113
  groupColumn: name => `Gruppér efter ${name}`,
116
114
  unGroupColumn: name => `Fjern gruppéring efter ${name}`,
117
115
  // Master/detail
118
- // detailPanelToggle: 'Detail panel toggle',
116
+ detailPanelToggle: 'Udvid/kollaps detaljepanel',
119
117
  expandDetailPanel: 'Udvid',
120
- collapseDetailPanel: 'Kollaps'
121
-
118
+ collapseDetailPanel: 'Kollaps',
122
119
  // Row reordering text
123
- // rowReorderingHeaderName: 'Row reordering',
124
-
120
+ rowReorderingHeaderName: 'Omarrangering af rækker',
125
121
  // Aggregation
126
- // aggregationMenuItemHeader: 'Aggregation',
127
- // aggregationFunctionLabelSum: 'sum',
128
- // aggregationFunctionLabelAvg: 'avg',
129
- // aggregationFunctionLabelMin: 'min',
130
- // aggregationFunctionLabelMax: 'max',
131
- // aggregationFunctionLabelSize: 'size',
122
+ aggregationMenuItemHeader: 'Aggregation',
123
+ aggregationFunctionLabelSum: 'sum',
124
+ aggregationFunctionLabelAvg: 'gns',
125
+ aggregationFunctionLabelMin: 'min',
126
+ aggregationFunctionLabelMax: 'max',
127
+ aggregationFunctionLabelSize: 'størrelse'
132
128
  };
133
-
134
129
  const daDK = (0, _getGridLocalization.getGridLocalization)(daDKGrid, _locale.daDK);
135
130
  exports.daDK = daDK;
@@ -73,7 +73,7 @@ const esESGrid = {
73
73
  // Column menu text
74
74
  columnMenuLabel: 'Menú',
75
75
  columnMenuShowColumns: 'Mostrar columnas',
76
- // columnMenuManageColumns: 'Manage columns',
76
+ columnMenuManageColumns: 'Administrar columnas',
77
77
  columnMenuFilter: 'Filtro',
78
78
  columnMenuHideColumn: 'Ocultar',
79
79
  columnMenuUnsort: 'Desordenar',
@@ -43,7 +43,7 @@ const nbNOGrid = {
43
43
  columnsPanelHideAllButton: 'Skjul alle',
44
44
  // Filter panel text
45
45
  filterPanelAddFilter: 'Legg til filter',
46
- // filterPanelRemoveAll: 'Remove all',
46
+ filterPanelRemoveAll: 'Fjern alle',
47
47
  filterPanelDeleteIconLabel: 'Slett',
48
48
  filterPanelLogicOperator: 'Logisk operator',
49
49
  filterPanelOperator: 'Operatører',
@@ -73,7 +73,7 @@ const nbNOGrid = {
73
73
  // Column menu text
74
74
  columnMenuLabel: 'Meny',
75
75
  columnMenuShowColumns: 'Vis kolonner',
76
- // columnMenuManageColumns: 'Manage columns',
76
+ columnMenuManageColumns: 'Administrer kolonner',
77
77
  columnMenuFilter: 'Filter',
78
78
  columnMenuHideColumn: 'Skjul',
79
79
  columnMenuUnsort: 'Usorter',
@@ -113,20 +113,18 @@ const nbNOGrid = {
113
113
  groupColumn: name => `Grupper på ${name}`,
114
114
  unGroupColumn: name => `Stopp å grupper på ${name}`,
115
115
  // Master/detail
116
- // detailPanelToggle: 'Detail panel toggle',
116
+ detailPanelToggle: 'Utvid/kollaps detalj panel',
117
117
  expandDetailPanel: 'Utvid',
118
118
  collapseDetailPanel: 'Kollaps',
119
119
  // Row reordering text
120
- rowReorderingHeaderName: 'Rad reorganisering'
121
-
120
+ rowReorderingHeaderName: 'Rad reorganisering',
122
121
  // Aggregation
123
- // aggregationMenuItemHeader: 'Aggregation',
124
- // aggregationFunctionLabelSum: 'sum',
125
- // aggregationFunctionLabelAvg: 'avg',
126
- // aggregationFunctionLabelMin: 'min',
127
- // aggregationFunctionLabelMax: 'max',
128
- // aggregationFunctionLabelSize: 'size',
122
+ aggregationMenuItemHeader: 'Aggregering',
123
+ aggregationFunctionLabelSum: 'sum',
124
+ aggregationFunctionLabelAvg: 'snitt',
125
+ aggregationFunctionLabelMin: 'min',
126
+ aggregationFunctionLabelMax: 'maks',
127
+ aggregationFunctionLabelSize: 'størrelse'
129
128
  };
130
-
131
129
  const nbNO = (0, _getGridLocalization.getGridLocalization)(nbNOGrid, _locale.nbNO);
132
130
  exports.nbNO = nbNO;
@@ -43,7 +43,7 @@ const svSEGrid = {
43
43
  columnsPanelHideAllButton: 'Dölj alla',
44
44
  // Filter panel text
45
45
  filterPanelAddFilter: 'Lägg till filter',
46
- // filterPanelRemoveAll: 'Remove all',
46
+ filterPanelRemoveAll: 'Ta bort alla',
47
47
  filterPanelDeleteIconLabel: 'Ta bort',
48
48
  filterPanelLogicOperator: 'Logisk operatör',
49
49
  filterPanelOperator: 'Operatör',
@@ -73,7 +73,7 @@ const svSEGrid = {
73
73
  // Column menu text
74
74
  columnMenuLabel: 'Meny',
75
75
  columnMenuShowColumns: 'Visa kolumner',
76
- // columnMenuManageColumns: 'Manage columns',
76
+ columnMenuManageColumns: 'Hantera kolumner',
77
77
  columnMenuFilter: 'Filtrera',
78
78
  columnMenuHideColumn: 'Dölj',
79
79
  columnMenuUnsort: 'Osortera',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "6.0.3",
3
+ "version": "6.0.4",
4
4
  "description": "The community edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",