@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
package/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
@@ -22,7 +22,7 @@ export { GridColumnHeaders } from './components/GridColumnHeaders';
22
22
  /**
23
23
  * Reexportable components.
24
24
  */
25
- export { GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from './components/reexportable';
25
+ export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexportable';
26
26
 
27
27
  /**
28
28
  * The full grid API.
@@ -47,7 +47,7 @@ function EmptyCell(_ref) {
47
47
  width: width
48
48
  };
49
49
  return /*#__PURE__*/_jsx("div", {
50
- className: "MuiDataGrid-cell MuiDataGrid-withBorderColor",
50
+ className: "".concat(gridClasses.cell, " ").concat(gridClasses.withBorderColor),
51
51
  style: style
52
52
  }); // TODO change to .MuiDataGrid-emptyCell or .MuiDataGrid-rowFiller
53
53
  }
@@ -45,16 +45,15 @@ var ColumnHeaderInnerTitle = /*#__PURE__*/React.forwardRef(function ColumnHeader
45
45
  function GridColumnHeaderTitle(props) {
46
46
  var _rootProps$slotProps;
47
47
  var label = props.label,
48
- description = props.description,
49
- columnWidth = props.columnWidth;
48
+ description = props.description;
50
49
  var rootProps = useGridRootProps();
51
50
  var titleRef = React.useRef(null);
52
51
  var _React$useState = React.useState(''),
53
52
  _React$useState2 = _slicedToArray(_React$useState, 2),
54
53
  tooltip = _React$useState2[0],
55
54
  setTooltip = _React$useState2[1];
56
- React.useEffect(function () {
57
- if (!description && titleRef && titleRef.current) {
55
+ var handleMouseOver = React.useCallback(function () {
56
+ if (!description && titleRef != null && titleRef.current) {
58
57
  var isOver = isOverflown(titleRef.current);
59
58
  if (isOver) {
60
59
  setTooltip(label);
@@ -62,11 +61,12 @@ function GridColumnHeaderTitle(props) {
62
61
  setTooltip('');
63
62
  }
64
63
  }
65
- }, [titleRef, columnWidth, description, label]);
64
+ }, [description, label]);
66
65
  return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
67
66
  title: description || tooltip
68
67
  }, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTooltip, {
69
68
  children: /*#__PURE__*/_jsx(ColumnHeaderInnerTitle, {
69
+ onMouseOver: handleMouseOver,
70
70
  ref: titleRef,
71
71
  children: label
72
72
  })
@@ -19,8 +19,10 @@ function GridColumnHeaderMenu(_ref) {
19
19
  var hideMenu = React.useCallback(function (event) {
20
20
  // Prevent triggering the sorting
21
21
  event.stopPropagation();
22
- apiRef.current.hideColumnMenu();
23
- }, [apiRef]);
22
+ if (!(target != null && target.contains(event.target))) {
23
+ apiRef.current.hideColumnMenu();
24
+ }
25
+ }, [apiRef, target]);
24
26
  if (!target) {
25
27
  return null;
26
28
  }
@@ -1,21 +1,21 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["defaultComponents", "defaultComponentsProps", "components", "componentsProps"];
4
+ var _excluded = ["defaultSlots", "defaultSlotProps", "slots", "slotProps"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
- import { useGridColumnMenuComponents } from '../../../hooks/features/columnMenu/useGridColumnMenuComponents';
7
+ import { useGridColumnMenuSlots } from '../../../hooks/features/columnMenu/useGridColumnMenuSlots';
8
8
  import { GridColumnMenuContainer } from './GridColumnMenuContainer';
9
9
  import { GridColumnMenuColumnsItem } from './menuItems/GridColumnMenuColumnsItem';
10
10
  import { GridColumnMenuFilterItem } from './menuItems/GridColumnMenuFilterItem';
11
11
  import { GridColumnMenuSortItem } from './menuItems/GridColumnMenuSortItem';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- export var GRID_COLUMN_MENU_COMPONENTS = {
14
- ColumnMenuSortItem: GridColumnMenuSortItem,
15
- ColumnMenuFilterItem: GridColumnMenuFilterItem,
16
- ColumnMenuColumnsItem: GridColumnMenuColumnsItem
13
+ export var GRID_COLUMN_MENU_SLOTS = {
14
+ columnMenuSortItem: GridColumnMenuSortItem,
15
+ columnMenuFilterItem: GridColumnMenuFilterItem,
16
+ columnMenuColumnsItem: GridColumnMenuColumnsItem
17
17
  };
18
- export var GRID_COLUMN_MENU_COMPONENTS_PROPS = {
18
+ export var GRID_COLUMN_MENU_SLOT_PROPS = {
19
19
  columnMenuSortItem: {
20
20
  displayOrder: 10
21
21
  },
@@ -27,33 +27,33 @@ export var GRID_COLUMN_MENU_COMPONENTS_PROPS = {
27
27
  }
28
28
  };
29
29
  var GridGenericColumnMenu = /*#__PURE__*/React.forwardRef(function GridGenericColumnMenu(props, ref) {
30
- var defaultComponents = props.defaultComponents,
31
- defaultComponentsProps = props.defaultComponentsProps,
32
- components = props.components,
33
- componentsProps = props.componentsProps,
30
+ var defaultSlots = props.defaultSlots,
31
+ defaultSlotProps = props.defaultSlotProps,
32
+ slots = props.slots,
33
+ slotProps = props.slotProps,
34
34
  other = _objectWithoutProperties(props, _excluded);
35
- var orderedComponents = useGridColumnMenuComponents(_extends({}, other, {
36
- defaultComponents: defaultComponents,
37
- defaultComponentsProps: defaultComponentsProps,
38
- components: components,
39
- componentsProps: componentsProps
35
+ var orderedSlots = useGridColumnMenuSlots(_extends({}, other, {
36
+ defaultSlots: defaultSlots,
37
+ defaultSlotProps: defaultSlotProps,
38
+ slots: slots,
39
+ slotProps: slotProps
40
40
  }));
41
41
  return /*#__PURE__*/_jsx(GridColumnMenuContainer, _extends({
42
42
  ref: ref
43
43
  }, other, {
44
- children: orderedComponents.map(function (_ref, index) {
44
+ children: orderedSlots.map(function (_ref, index) {
45
45
  var _ref2 = _slicedToArray(_ref, 2),
46
46
  Component = _ref2[0],
47
- componentProps = _ref2[1];
48
- return /*#__PURE__*/_jsx(Component, _extends({}, componentProps), index);
47
+ otherProps = _ref2[1];
48
+ return /*#__PURE__*/_jsx(Component, _extends({}, otherProps), index);
49
49
  })
50
50
  }));
51
51
  });
52
52
  var GridColumnMenu = /*#__PURE__*/React.forwardRef(function GridColumnMenu(props, ref) {
53
53
  return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
54
54
  ref: ref,
55
- defaultComponents: GRID_COLUMN_MENU_COMPONENTS,
56
- defaultComponentsProps: GRID_COLUMN_MENU_COMPONENTS_PROPS
55
+ defaultSlots: GRID_COLUMN_MENU_SLOTS,
56
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS
57
57
  }));
58
58
  });
59
59
  process.env.NODE_ENV !== "production" ? GridColumnMenu.propTypes = {
@@ -62,20 +62,20 @@ process.env.NODE_ENV !== "production" ? GridColumnMenu.propTypes = {
62
62
  // | To update them edit the TypeScript types and run "yarn proptypes" |
63
63
  // ----------------------------------------------------------------------
64
64
  colDef: PropTypes.object.isRequired,
65
- /**
66
- * `components` could be used to add new and (or) override default column menu items
67
- * If you register a nee component you must pass it's `displayOrder` in `componentsProps`
68
- * or it will be placed in the end of the list
69
- */
70
- components: PropTypes.object,
65
+ hideMenu: PropTypes.func.isRequired,
66
+ id: PropTypes.string,
67
+ labelledby: PropTypes.string,
68
+ open: PropTypes.bool.isRequired,
71
69
  /**
72
70
  * Could be used to pass new props or override props specific to a column menu component
73
71
  * e.g. `displayOrder`
74
72
  */
75
- componentsProps: PropTypes.object,
76
- hideMenu: PropTypes.func.isRequired,
77
- id: PropTypes.string,
78
- labelledby: PropTypes.string,
79
- open: PropTypes.bool.isRequired
73
+ slotProps: PropTypes.object,
74
+ /**
75
+ * `slots` 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 `slotProps`
77
+ * or it will be placed in the end of the list
78
+ */
79
+ slots: PropTypes.object
80
80
  } : void 0;
81
81
  export { GridColumnMenu, GridGenericColumnMenu };
@@ -156,7 +156,7 @@ var GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(pro
156
156
  columnsSort: columnsSort
157
157
  }, filterFormProps), item.id == null ? index : item.id);
158
158
  })
159
- }), !rootProps.disableMultipleColumnsFiltering && !disableAddFilterButton && !disableRemoveAllButton ? /*#__PURE__*/_jsxs(GridPanelFooter, {
159
+ }), !rootProps.disableMultipleColumnsFiltering && !(disableAddFilterButton && disableRemoveAllButton) ? /*#__PURE__*/_jsxs(GridPanelFooter, {
160
160
  children: [!disableAddFilterButton ? /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
161
161
  onClick: addNewFilter,
162
162
  startIcon: /*#__PURE__*/_jsx(rootProps.slots.filterPanelAddIcon, {})
@@ -1 +1 @@
1
- export { GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from './menu/columnMenu/GridColumnMenu';
1
+ export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './menu/columnMenu/GridColumnMenu';
@@ -6,54 +6,49 @@ var _excluded = ["displayOrder"];
6
6
  import * as React from 'react';
7
7
  import Divider from '@mui/material/Divider';
8
8
  import { useGridPrivateApiContext } from '../../utils/useGridPrivateApiContext';
9
- var camelize = function camelize(pascalCase) {
10
- var camelCase = pascalCase.split('');
11
- camelCase[0] = camelCase[0].toLowerCase();
12
- return camelCase.join('');
13
- };
14
- var useGridColumnMenuComponents = function useGridColumnMenuComponents(props) {
9
+ var useGridColumnMenuSlots = function useGridColumnMenuSlots(props) {
15
10
  var apiRef = useGridPrivateApiContext();
16
- var defaultComponents = props.defaultComponents,
17
- defaultComponentsProps = props.defaultComponentsProps,
18
- _props$components = props.components,
19
- components = _props$components === void 0 ? {} : _props$components,
20
- _props$componentsProp = props.componentsProps,
21
- componentsProps = _props$componentsProp === void 0 ? {} : _props$componentsProp,
11
+ var defaultSlots = props.defaultSlots,
12
+ defaultSlotProps = props.defaultSlotProps,
13
+ _props$slots = props.slots,
14
+ slots = _props$slots === void 0 ? {} : _props$slots,
15
+ _props$slotProps = props.slotProps,
16
+ slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
22
17
  hideMenu = props.hideMenu,
23
18
  colDef = props.colDef,
24
19
  _props$addDividers = props.addDividers,
25
20
  addDividers = _props$addDividers === void 0 ? true : _props$addDividers;
26
21
  var processedComponents = React.useMemo(function () {
27
- return _extends({}, defaultComponents, components);
28
- }, [defaultComponents, components]);
29
- var processedComponentsProps = React.useMemo(function () {
30
- if (!componentsProps || Object.keys(componentsProps).length === 0) {
31
- return defaultComponentsProps;
22
+ return _extends({}, defaultSlots, slots);
23
+ }, [defaultSlots, slots]);
24
+ var processedSlotProps = React.useMemo(function () {
25
+ if (!slotProps || Object.keys(slotProps).length === 0) {
26
+ return defaultSlotProps;
32
27
  }
33
- var mergedProps = _extends({}, componentsProps);
34
- Object.entries(defaultComponentsProps).forEach(function (_ref) {
28
+ var mergedProps = _extends({}, slotProps);
29
+ Object.entries(defaultSlotProps).forEach(function (_ref) {
35
30
  var _ref2 = _slicedToArray(_ref, 2),
36
31
  key = _ref2[0],
37
- currentComponentProps = _ref2[1];
38
- mergedProps[key] = _extends({}, currentComponentProps, componentsProps[key] || {});
32
+ currentSlotProps = _ref2[1];
33
+ mergedProps[key] = _extends({}, currentSlotProps, slotProps[key] || {});
39
34
  });
40
35
  return mergedProps;
41
- }, [defaultComponentsProps, componentsProps]);
36
+ }, [defaultSlotProps, slotProps]);
42
37
  var defaultItems = apiRef.current.unstable_applyPipeProcessors('columnMenu', [], props.colDef);
43
38
  var userItems = React.useMemo(function () {
44
- var defaultComponentKeys = Object.keys(defaultComponents);
45
- return Object.keys(components).filter(function (key) {
39
+ var defaultComponentKeys = Object.keys(defaultSlots);
40
+ return Object.keys(slots).filter(function (key) {
46
41
  return !defaultComponentKeys.includes(key);
47
42
  });
48
- }, [components, defaultComponents]);
43
+ }, [slots, defaultSlots]);
49
44
  return React.useMemo(function () {
50
45
  var uniqueItems = Array.from(new Set([].concat(_toConsumableArray(defaultItems), _toConsumableArray(userItems))));
51
46
  var cleansedItems = uniqueItems.filter(function (key) {
52
47
  return processedComponents[key] != null;
53
48
  });
54
49
  var sorted = cleansedItems.sort(function (a, b) {
55
- var leftItemProps = processedComponentsProps[camelize(a)];
56
- var rightItemProps = processedComponentsProps[camelize(b)];
50
+ var leftItemProps = processedSlotProps[a];
51
+ var rightItemProps = processedSlotProps[b];
57
52
  var leftDisplayOrder = Number.isFinite(leftItemProps == null ? void 0 : leftItemProps.displayOrder) ? leftItemProps.displayOrder : 100;
58
53
  var rightDisplayOrder = Number.isFinite(rightItemProps == null ? void 0 : rightItemProps.displayOrder) ? rightItemProps.displayOrder : 100;
59
54
  return leftDisplayOrder - rightDisplayOrder;
@@ -63,7 +58,7 @@ var useGridColumnMenuComponents = function useGridColumnMenuComponents(props) {
63
58
  colDef: colDef,
64
59
  onClick: hideMenu
65
60
  };
66
- var processedComponentProps = processedComponentsProps[camelize(key)];
61
+ var processedComponentProps = processedSlotProps[key];
67
62
  if (processedComponentProps) {
68
63
  var displayOrder = processedComponentProps.displayOrder,
69
64
  customProps = _objectWithoutProperties(processedComponentProps, _excluded);
@@ -71,6 +66,6 @@ var useGridColumnMenuComponents = function useGridColumnMenuComponents(props) {
71
66
  }
72
67
  return addDividers && index !== sorted.length - 1 ? [].concat(_toConsumableArray(acc), [[processedComponents[key], itemProps], [Divider, {}]]) : [].concat(_toConsumableArray(acc), [[processedComponents[key], itemProps]]);
73
68
  }, []);
74
- }, [addDividers, colDef, defaultItems, hideMenu, processedComponents, processedComponentsProps, userItems]);
69
+ }, [addDividers, colDef, defaultItems, hideMenu, processedComponents, processedSlotProps, userItems]);
75
70
  };
76
- export { useGridColumnMenuComponents };
71
+ export { useGridColumnMenuSlots };
@@ -245,7 +245,7 @@ export function useGridColumns(apiRef, props) {
245
245
  if (props.disableColumnSelector) {
246
246
  return columnMenuItems;
247
247
  }
248
- return [].concat(_toConsumableArray(columnMenuItems), ['ColumnMenuColumnsItem']);
248
+ return [].concat(_toConsumableArray(columnMenuItems), ['columnMenuColumnsItem']);
249
249
  }, [props.disableColumnSelector]);
250
250
  useGridRegisterPipeProcessor(apiRef, 'columnMenu', addColumnMenuItems);
251
251
  useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);
@@ -60,7 +60,7 @@ export var useGridFilter = function useGridFilter(apiRef, props) {
60
60
  if (colDef == null || colDef.filterable === false || props.disableColumnFilter) {
61
61
  return columnMenuItems;
62
62
  }
63
- return [].concat(_toConsumableArray(columnMenuItems), ['ColumnMenuFilterItem']);
63
+ return [].concat(_toConsumableArray(columnMenuItems), ['columnMenuFilterItem']);
64
64
  }, [props.disableColumnFilter]);
65
65
 
66
66
  /**
@@ -81,7 +81,7 @@ export var useGridSorting = function useGridSorting(apiRef, props) {
81
81
  if (sortingOrder.some(function (item) {
82
82
  return !!item;
83
83
  })) {
84
- return [].concat(_toConsumableArray(columnMenuItems), ['ColumnMenuSortItem']);
84
+ return [].concat(_toConsumableArray(columnMenuItems), ['columnMenuSortItem']);
85
85
  }
86
86
  return columnMenuItems;
87
87
  }, [props.sortingOrder]);
@@ -450,7 +450,7 @@ export var useGridVirtualScroller = function useGridVirtualScroller(props) {
450
450
  prevRootRowStyle.current = rootRowStyle;
451
451
  return rows;
452
452
  };
453
- var needsHorizontalScrollbar = containerDimensions.width && columnsTotalWidth > containerDimensions.width;
453
+ var needsHorizontalScrollbar = containerDimensions.width && columnsTotalWidth >= containerDimensions.width;
454
454
  var contentSize = React.useMemo(function () {
455
455
  // In cases where the columns exceed the available width,
456
456
  // the horizontal scrollbar should be shown even when there're no rows.
package/legacy/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
@@ -22,7 +22,7 @@ export { GridColumnHeaders } from './components/GridColumnHeaders';
22
22
  /**
23
23
  * Reexportable components.
24
24
  */
25
- export { GridColumnMenu, GRID_COLUMN_MENU_COMPONENTS, GRID_COLUMN_MENU_COMPONENTS_PROPS } from './components/reexportable';
25
+ export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './components/reexportable';
26
26
 
27
27
  /**
28
28
  * The full grid API.
@@ -22,17 +22,15 @@ var daDKGrid = {
22
22
  return count !== 1 ? "".concat(count, " aktive filtre") : "".concat(count, " aktivt filter");
23
23
  },
24
24
  // Quick filter toolbar field
25
- // toolbarQuickFilterPlaceholder: 'Search…',
26
- // toolbarQuickFilterLabel: 'Search',
27
- // toolbarQuickFilterDeleteIconLabel: 'Clear',
28
-
25
+ toolbarQuickFilterPlaceholder: 'Søg…',
26
+ toolbarQuickFilterLabel: 'Søg',
27
+ toolbarQuickFilterDeleteIconLabel: 'Ryd',
29
28
  // Export selector toolbar button text
30
- // toolbarExport: 'Export',
29
+ toolbarExport: 'Eksport',
31
30
  toolbarExportLabel: 'Eksporter',
32
31
  toolbarExportCSV: 'Download som CSV',
33
32
  toolbarExportPrint: 'Print',
34
- // toolbarExportExcel: 'Download as Excel',
35
-
33
+ toolbarExportExcel: 'Download som Excel',
36
34
  // Columns panel text
37
35
  columnsPanelTextFieldLabel: 'Find kolonne',
38
36
  columnsPanelTextFieldPlaceholder: 'Kolonne titel',
@@ -41,7 +39,7 @@ var daDKGrid = {
41
39
  columnsPanelHideAllButton: 'Skjul alle',
42
40
  // Filter panel text
43
41
  filterPanelAddFilter: 'Tilføj filter',
44
- // filterPanelRemoveAll: 'Remove all',
42
+ filterPanelRemoveAll: 'Fjern alle',
45
43
  filterPanelDeleteIconLabel: 'Slet',
46
44
  filterPanelLogicOperator: 'Logisk operator',
47
45
  filterPanelOperator: 'Operatorer',
@@ -71,7 +69,7 @@ var daDKGrid = {
71
69
  // Column menu text
72
70
  columnMenuLabel: 'Menu',
73
71
  columnMenuShowColumns: 'Vis Kolonner',
74
- // columnMenuManageColumns: 'Manage columns',
72
+ columnMenuManageColumns: 'Administrer kolonner',
75
73
  columnMenuFilter: 'Filtre',
76
74
  columnMenuHideColumn: 'Skjul',
77
75
  columnMenuUnsort: 'Fjern sortering',
@@ -121,20 +119,17 @@ var daDKGrid = {
121
119
  return "Fjern grupp\xE9ring efter ".concat(name);
122
120
  },
123
121
  // Master/detail
124
- // detailPanelToggle: 'Detail panel toggle',
122
+ detailPanelToggle: 'Udvid/kollaps detaljepanel',
125
123
  expandDetailPanel: 'Udvid',
126
- collapseDetailPanel: 'Kollaps'
127
-
124
+ collapseDetailPanel: 'Kollaps',
128
125
  // Row reordering text
129
- // rowReorderingHeaderName: 'Row reordering',
130
-
126
+ rowReorderingHeaderName: 'Omarrangering af rækker',
131
127
  // Aggregation
132
- // aggregationMenuItemHeader: 'Aggregation',
133
- // aggregationFunctionLabelSum: 'sum',
134
- // aggregationFunctionLabelAvg: 'avg',
135
- // aggregationFunctionLabelMin: 'min',
136
- // aggregationFunctionLabelMax: 'max',
137
- // aggregationFunctionLabelSize: 'size',
128
+ aggregationMenuItemHeader: 'Aggregation',
129
+ aggregationFunctionLabelSum: 'sum',
130
+ aggregationFunctionLabelAvg: 'gns',
131
+ aggregationFunctionLabelMin: 'min',
132
+ aggregationFunctionLabelMax: 'max',
133
+ aggregationFunctionLabelSize: 'størrelse'
138
134
  };
139
-
140
135
  export var daDK = getGridLocalization(daDKGrid, daDKCore);
@@ -69,7 +69,7 @@ var esESGrid = {
69
69
  // Column menu text
70
70
  columnMenuLabel: 'Menú',
71
71
  columnMenuShowColumns: 'Mostrar columnas',
72
- // columnMenuManageColumns: 'Manage columns',
72
+ columnMenuManageColumns: 'Administrar columnas',
73
73
  columnMenuFilter: 'Filtro',
74
74
  columnMenuHideColumn: 'Ocultar',
75
75
  columnMenuUnsort: 'Desordenar',
@@ -39,7 +39,7 @@ var nbNOGrid = {
39
39
  columnsPanelHideAllButton: 'Skjul alle',
40
40
  // Filter panel text
41
41
  filterPanelAddFilter: 'Legg til filter',
42
- // filterPanelRemoveAll: 'Remove all',
42
+ filterPanelRemoveAll: 'Fjern alle',
43
43
  filterPanelDeleteIconLabel: 'Slett',
44
44
  filterPanelLogicOperator: 'Logisk operator',
45
45
  filterPanelOperator: 'Operatører',
@@ -69,7 +69,7 @@ var nbNOGrid = {
69
69
  // Column menu text
70
70
  columnMenuLabel: 'Meny',
71
71
  columnMenuShowColumns: 'Vis kolonner',
72
- // columnMenuManageColumns: 'Manage columns',
72
+ columnMenuManageColumns: 'Administrer kolonner',
73
73
  columnMenuFilter: 'Filter',
74
74
  columnMenuHideColumn: 'Skjul',
75
75
  columnMenuUnsort: 'Usorter',
@@ -119,19 +119,17 @@ var nbNOGrid = {
119
119
  return "Stopp \xE5 grupper p\xE5 ".concat(name);
120
120
  },
121
121
  // Master/detail
122
- // detailPanelToggle: 'Detail panel toggle',
122
+ detailPanelToggle: 'Utvid/kollaps detalj panel',
123
123
  expandDetailPanel: 'Utvid',
124
124
  collapseDetailPanel: 'Kollaps',
125
125
  // Row reordering text
126
- rowReorderingHeaderName: 'Rad reorganisering'
127
-
126
+ rowReorderingHeaderName: 'Rad reorganisering',
128
127
  // Aggregation
129
- // aggregationMenuItemHeader: 'Aggregation',
130
- // aggregationFunctionLabelSum: 'sum',
131
- // aggregationFunctionLabelAvg: 'avg',
132
- // aggregationFunctionLabelMin: 'min',
133
- // aggregationFunctionLabelMax: 'max',
134
- // aggregationFunctionLabelSize: 'size',
128
+ aggregationMenuItemHeader: 'Aggregering',
129
+ aggregationFunctionLabelSum: 'sum',
130
+ aggregationFunctionLabelAvg: 'snitt',
131
+ aggregationFunctionLabelMin: 'min',
132
+ aggregationFunctionLabelMax: 'maks',
133
+ aggregationFunctionLabelSize: 'størrelse'
135
134
  };
136
-
137
135
  export var nbNO = getGridLocalization(nbNOGrid, nbNOCore);
@@ -39,7 +39,7 @@ var svSEGrid = {
39
39
  columnsPanelHideAllButton: 'Dölj alla',
40
40
  // Filter panel text
41
41
  filterPanelAddFilter: 'Lägg till filter',
42
- // filterPanelRemoveAll: 'Remove all',
42
+ filterPanelRemoveAll: 'Ta bort alla',
43
43
  filterPanelDeleteIconLabel: 'Ta bort',
44
44
  filterPanelLogicOperator: 'Logisk operatör',
45
45
  filterPanelOperator: 'Operatör',
@@ -69,7 +69,7 @@ var svSEGrid = {
69
69
  // Column menu text
70
70
  columnMenuLabel: 'Meny',
71
71
  columnMenuShowColumns: 'Visa kolumner',
72
- // columnMenuManageColumns: 'Manage columns',
72
+ columnMenuManageColumns: 'Hantera kolumner',
73
73
  columnMenuFilter: 'Filtrera',
74
74
  columnMenuHideColumn: 'Dölj',
75
75
  columnMenuUnsort: 'Osortera',
package/locales/daDK.js CHANGED
@@ -20,17 +20,15 @@ const daDKGrid = {
20
20
  toolbarFiltersTooltipShow: 'Vis filtre',
21
21
  toolbarFiltersTooltipActive: count => count !== 1 ? `${count} aktive filtre` : `${count} aktivt filter`,
22
22
  // Quick filter toolbar field
23
- // toolbarQuickFilterPlaceholder: 'Search…',
24
- // toolbarQuickFilterLabel: 'Search',
25
- // toolbarQuickFilterDeleteIconLabel: 'Clear',
26
-
23
+ toolbarQuickFilterPlaceholder: 'Søg…',
24
+ toolbarQuickFilterLabel: 'Søg',
25
+ toolbarQuickFilterDeleteIconLabel: 'Ryd',
27
26
  // Export selector toolbar button text
28
- // toolbarExport: 'Export',
27
+ toolbarExport: 'Eksport',
29
28
  toolbarExportLabel: 'Eksporter',
30
29
  toolbarExportCSV: 'Download som CSV',
31
30
  toolbarExportPrint: 'Print',
32
- // toolbarExportExcel: 'Download as Excel',
33
-
31
+ toolbarExportExcel: 'Download som Excel',
34
32
  // Columns panel text
35
33
  columnsPanelTextFieldLabel: 'Find kolonne',
36
34
  columnsPanelTextFieldPlaceholder: 'Kolonne titel',
@@ -39,7 +37,7 @@ const daDKGrid = {
39
37
  columnsPanelHideAllButton: 'Skjul alle',
40
38
  // Filter panel text
41
39
  filterPanelAddFilter: 'Tilføj filter',
42
- // filterPanelRemoveAll: 'Remove all',
40
+ filterPanelRemoveAll: 'Fjern alle',
43
41
  filterPanelDeleteIconLabel: 'Slet',
44
42
  filterPanelLogicOperator: 'Logisk operator',
45
43
  filterPanelOperator: 'Operatorer',
@@ -69,7 +67,7 @@ const daDKGrid = {
69
67
  // Column menu text
70
68
  columnMenuLabel: 'Menu',
71
69
  columnMenuShowColumns: 'Vis Kolonner',
72
- // columnMenuManageColumns: 'Manage columns',
70
+ columnMenuManageColumns: 'Administrer kolonner',
73
71
  columnMenuFilter: 'Filtre',
74
72
  columnMenuHideColumn: 'Skjul',
75
73
  columnMenuUnsort: 'Fjern sortering',
@@ -109,20 +107,17 @@ const daDKGrid = {
109
107
  groupColumn: name => `Gruppér efter ${name}`,
110
108
  unGroupColumn: name => `Fjern gruppéring efter ${name}`,
111
109
  // Master/detail
112
- // detailPanelToggle: 'Detail panel toggle',
110
+ detailPanelToggle: 'Udvid/kollaps detaljepanel',
113
111
  expandDetailPanel: 'Udvid',
114
- collapseDetailPanel: 'Kollaps'
115
-
112
+ collapseDetailPanel: 'Kollaps',
116
113
  // Row reordering text
117
- // rowReorderingHeaderName: 'Row reordering',
118
-
114
+ rowReorderingHeaderName: 'Omarrangering af rækker',
119
115
  // Aggregation
120
- // aggregationMenuItemHeader: 'Aggregation',
121
- // aggregationFunctionLabelSum: 'sum',
122
- // aggregationFunctionLabelAvg: 'avg',
123
- // aggregationFunctionLabelMin: 'min',
124
- // aggregationFunctionLabelMax: 'max',
125
- // aggregationFunctionLabelSize: 'size',
116
+ aggregationMenuItemHeader: 'Aggregation',
117
+ aggregationFunctionLabelSum: 'sum',
118
+ aggregationFunctionLabelAvg: 'gns',
119
+ aggregationFunctionLabelMin: 'min',
120
+ aggregationFunctionLabelMax: 'max',
121
+ aggregationFunctionLabelSize: 'størrelse'
126
122
  };
127
-
128
123
  export const daDK = getGridLocalization(daDKGrid, daDKCore);
package/locales/esES.js CHANGED
@@ -67,7 +67,7 @@ const esESGrid = {
67
67
  // Column menu text
68
68
  columnMenuLabel: 'Menú',
69
69
  columnMenuShowColumns: 'Mostrar columnas',
70
- // columnMenuManageColumns: 'Manage columns',
70
+ columnMenuManageColumns: 'Administrar columnas',
71
71
  columnMenuFilter: 'Filtro',
72
72
  columnMenuHideColumn: 'Ocultar',
73
73
  columnMenuUnsort: 'Desordenar',
package/locales/nbNO.js CHANGED
@@ -37,7 +37,7 @@ const nbNOGrid = {
37
37
  columnsPanelHideAllButton: 'Skjul alle',
38
38
  // Filter panel text
39
39
  filterPanelAddFilter: 'Legg til filter',
40
- // filterPanelRemoveAll: 'Remove all',
40
+ filterPanelRemoveAll: 'Fjern alle',
41
41
  filterPanelDeleteIconLabel: 'Slett',
42
42
  filterPanelLogicOperator: 'Logisk operator',
43
43
  filterPanelOperator: 'Operatører',
@@ -67,7 +67,7 @@ const nbNOGrid = {
67
67
  // Column menu text
68
68
  columnMenuLabel: 'Meny',
69
69
  columnMenuShowColumns: 'Vis kolonner',
70
- // columnMenuManageColumns: 'Manage columns',
70
+ columnMenuManageColumns: 'Administrer kolonner',
71
71
  columnMenuFilter: 'Filter',
72
72
  columnMenuHideColumn: 'Skjul',
73
73
  columnMenuUnsort: 'Usorter',
@@ -107,19 +107,17 @@ const nbNOGrid = {
107
107
  groupColumn: name => `Grupper på ${name}`,
108
108
  unGroupColumn: name => `Stopp å grupper på ${name}`,
109
109
  // Master/detail
110
- // detailPanelToggle: 'Detail panel toggle',
110
+ detailPanelToggle: 'Utvid/kollaps detalj panel',
111
111
  expandDetailPanel: 'Utvid',
112
112
  collapseDetailPanel: 'Kollaps',
113
113
  // Row reordering text
114
- rowReorderingHeaderName: 'Rad reorganisering'
115
-
114
+ rowReorderingHeaderName: 'Rad reorganisering',
116
115
  // Aggregation
117
- // aggregationMenuItemHeader: 'Aggregation',
118
- // aggregationFunctionLabelSum: 'sum',
119
- // aggregationFunctionLabelAvg: 'avg',
120
- // aggregationFunctionLabelMin: 'min',
121
- // aggregationFunctionLabelMax: 'max',
122
- // aggregationFunctionLabelSize: 'size',
116
+ aggregationMenuItemHeader: 'Aggregering',
117
+ aggregationFunctionLabelSum: 'sum',
118
+ aggregationFunctionLabelAvg: 'snitt',
119
+ aggregationFunctionLabelMin: 'min',
120
+ aggregationFunctionLabelMax: 'maks',
121
+ aggregationFunctionLabelSize: 'størrelse'
123
122
  };
124
-
125
123
  export const nbNO = getGridLocalization(nbNOGrid, nbNOCore);