@mui/x-data-grid 8.0.0-alpha.6 → 8.0.0-alpha.7

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 (95) hide show
  1. package/CHANGELOG.md +127 -1
  2. package/DataGrid/useDataGridComponent.d.ts +1 -1
  3. package/components/cell/GridActionsCellItem.d.ts +16 -9
  4. package/components/cell/GridActionsCellItem.js +2 -0
  5. package/components/cell/GridEditDateCell.js +1 -1
  6. package/components/cell/GridEditInputCell.js +1 -1
  7. package/components/cell/GridEditSingleSelectCell.js +2 -2
  8. package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  9. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  10. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -1
  11. package/components/columnSelection/GridHeaderCheckbox.js +6 -2
  12. package/components/columnsManagement/GridColumnsManagement.js +2 -2
  13. package/components/panel/GridPanel.d.ts +1 -1
  14. package/components/panel/filterPanel/GridFilterInputValue.js +7 -10
  15. package/components/toolbar/GridToolbarQuickFilter.js +2 -2
  16. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
  17. package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +1 -1
  18. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +1 -1
  19. package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  20. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +1 -1
  21. package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  22. package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +1 -1
  23. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +1 -1
  24. package/hooks/core/useGridApiInitialization.d.ts +1 -1
  25. package/hooks/core/useGridApiInitialization.js +2 -2
  26. package/hooks/core/useGridInitialization.d.ts +1 -1
  27. package/hooks/core/useGridIsRtl.d.ts +1 -1
  28. package/hooks/core/useGridLocaleText.d.ts +1 -1
  29. package/hooks/core/useGridLoggerFactory.d.ts +1 -1
  30. package/hooks/core/useGridRefs.d.ts +1 -1
  31. package/hooks/core/useGridStateInitialization.d.ts +1 -1
  32. package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
  33. package/hooks/features/columnResize/useGridColumnResize.js +4 -4
  34. package/hooks/features/editing/useGridRowEditing.js +1 -1
  35. package/hooks/features/export/useGridPrintExport.js +1 -1
  36. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
  37. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  38. package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +1 -1
  39. package/hooks/features/rows/useGridRowsPreProcessors.d.ts +1 -1
  40. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +3 -3
  41. package/hooks/features/virtualization/useGridVirtualScroller.js +5 -1
  42. package/hooks/utils/useGridApiEventHandler.js +1 -1
  43. package/hooks/utils/useGridApiMethod.d.ts +1 -1
  44. package/hooks/utils/useGridApiRef.d.ts +1 -1
  45. package/hooks/utils/useGridInitializeState.d.ts +2 -2
  46. package/hooks/utils/useGridLogger.d.ts +1 -1
  47. package/hooks/utils/useGridVisibleRows.d.ts +2 -2
  48. package/index.js +1 -1
  49. package/internals/index.d.ts +1 -1
  50. package/models/api/gridCoreApi.d.ts +7 -7
  51. package/models/api/gridDensityApi.d.ts +1 -1
  52. package/models/gridBaseSlots.d.ts +32 -2
  53. package/models/gridSlotsComponentsProps.d.ts +12 -8
  54. package/models/props/DataGridProps.d.ts +1 -1
  55. package/modern/components/cell/GridActionsCellItem.js +2 -0
  56. package/modern/components/cell/GridEditDateCell.js +1 -1
  57. package/modern/components/cell/GridEditInputCell.js +1 -1
  58. package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
  59. package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  60. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -1
  61. package/modern/components/columnSelection/GridHeaderCheckbox.js +6 -2
  62. package/modern/components/columnsManagement/GridColumnsManagement.js +2 -2
  63. package/modern/components/panel/filterPanel/GridFilterInputValue.js +7 -10
  64. package/modern/components/toolbar/GridToolbarQuickFilter.js +2 -2
  65. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  66. package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  67. package/modern/hooks/core/useGridApiInitialization.js +2 -2
  68. package/modern/hooks/features/columnResize/useGridColumnResize.js +4 -4
  69. package/modern/hooks/features/editing/useGridRowEditing.js +1 -1
  70. package/modern/hooks/features/export/useGridPrintExport.js +1 -1
  71. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  72. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -1
  73. package/modern/hooks/utils/useGridApiEventHandler.js +1 -1
  74. package/modern/index.js +1 -1
  75. package/node/components/cell/GridActionsCellItem.js +1 -1
  76. package/node/components/cell/GridEditDateCell.js +1 -1
  77. package/node/components/cell/GridEditInputCell.js +1 -1
  78. package/node/components/cell/GridEditSingleSelectCell.js +2 -2
  79. package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +0 -1
  80. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -1
  81. package/node/components/columnSelection/GridHeaderCheckbox.js +6 -2
  82. package/node/components/columnsManagement/GridColumnsManagement.js +2 -2
  83. package/node/components/panel/filterPanel/GridFilterInputValue.js +7 -10
  84. package/node/components/toolbar/GridToolbarQuickFilter.js +2 -2
  85. package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
  86. package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
  87. package/node/hooks/core/useGridApiInitialization.js +2 -2
  88. package/node/hooks/features/columnResize/useGridColumnResize.js +4 -4
  89. package/node/hooks/features/editing/useGridRowEditing.js +1 -1
  90. package/node/hooks/features/export/useGridPrintExport.js +1 -1
  91. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  92. package/node/hooks/features/virtualization/useGridVirtualScroller.js +5 -1
  93. package/node/hooks/utils/useGridApiEventHandler.js +1 -1
  94. package/node/index.js +1 -1
  95. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,132 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.0.0-alpha.7
9
+
10
+ _Jan 9, 2025_
11
+
12
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 📊 Charts legend is now an HTML element which can be styled more easily
15
+ - 💫 Support [aggregation with server-side data](/x/react-data-grid/server-side-data/aggregation/)
16
+ - 🏎️ Improve Data Grid aggregation performance
17
+ - 🌍 Add Chinese (Taiwan) (zh-TW) locale on the Date and Time Pickers
18
+ - 🌍 Improve Norwegian (nb-NO) locale on the Date and Time Pickers
19
+ - 🐞 Bugfixes
20
+
21
+ Special thanks go out to the community contributors who have helped make this release possible:
22
+ @derek-0000, @josteinjhauge, @k-rajat19, @nusr, @tomashauser.
23
+ Following are all team members who have contributed to this release:
24
+ @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @arminmeh, @romgrk, @oliviertassinari.
25
+
26
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
27
+
28
+ ### Data Grid
29
+
30
+ #### `@mui/x-data-grid@8.0.0-alpha.7`
31
+
32
+ - [DataGrid] Improve React 19 support (#15769) @LukasTy
33
+ - [DataGrid] Add `name` attribute to the checkbox selection column (#15178) @derek-0000
34
+ - [DataGrid] Fix number filter field formatting values while typing (#16062) @arminmeh
35
+ - [DataGrid] Fix select all checkbox state reset with server side data (#16034) @MBilalShafi
36
+ - [DataGrid] Refactor: create base button props (#15930) @romgrk
37
+ - [DataGrid] Refactor: create tooltip props (#16086) @romgrk
38
+ - [DataGrid] Fix TS error (#16046) @cherniavskii
39
+
40
+ #### `@mui/x-data-grid-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
41
+
42
+ Same changes as in `@mui/x-data-grid@8.0.0-alpha.7`.
43
+
44
+ #### `@mui/x-data-grid-premium@8.0.0-alpha.7` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
45
+
46
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.7`, plus:
47
+
48
+ - [DataGridPremium] Improve aggregation performance for multiple columns (#16097) @cherniavskii
49
+ - [DataGridPremium] Make Aggregation keyboard accessible in the column menu (#15934) @k-rajat19
50
+ - [DataGridPremium] Server-side aggregation with data source (#15741) @MBilalShafi
51
+
52
+ ### Date and Time Pickers
53
+
54
+ #### Breaking changes
55
+
56
+ - The `date-fns` and `date-fns-jalali` date library adapters have been renamed to better align with the current stable major versions — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#✅-rename-date-fns-adapter-imports)
57
+ - Update default `closeOnSelect` and Action Bar `actions` values - [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#update-default-closeonselect-and-action-bar-actions-values)
58
+ - The component passed to the `layout` slot no longer receives the `value`, `onChange` and `onSelectShortcut` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
59
+ - The component passed to the `toolbar` slot no longer receives the `value`, `onChange` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
60
+ - The component passed to the `shortcuts` slot no longer receives the `onChange`, `isValid` and `isLandscape` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-shortcuts).
61
+ - The `PickerShortcutChangeImportance` type has been renamed `PickerChangeImportance` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables-and-types).
62
+ - The component passed to the `layout` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-layout).
63
+ - The component passed to the `toolbar` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-toolbar).
64
+ - The component passed to the `tabs` slot no longer receives the `rangePosition` and `onRangePositionChange` on range pickers — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-tabs).
65
+
66
+ #### `@mui/x-date-pickers@8.0.0-alpha.7`
67
+
68
+ - [fields] Handle focusing container with `inputRef.current.focus` on `accessibleFieldDOMStructure` (#15985) @LukasTy
69
+ - [pickers] Always use `setValue` internally to update the picker value (#16056) @flaviendelangle
70
+ - [pickers] Create a new context to pass the range position props to the layout components and to the views (#15846) @flaviendelangle
71
+ - [pickers] Introduce a new concept of `manager` (#15339) @flaviendelangle
72
+ - [pickers] Improve React 19 support (#15769) @LukasTy
73
+ - [pickers] Memoize `<PickersActionBar />` (#16071) @LukasTy
74
+ - [pickers] Remove `NonEmptyDateRange` type (#16035) @flaviendelangle
75
+ - [pickers] Rename `AdapterDateFns` into `AdapterDateFnsV2` and `AdapterDateFnsV3` into `AdapterDateFns` (#16082) @LukasTy
76
+ - [pickers] Rename `ctx.onViewChange` to `ctx.setView` and add it to the actions context (#16044) @flaviendelangle
77
+ - [pickers] Support `date-fns-jalali` v4 (#16011) @LukasTy
78
+ - [pickers] Update `closeOnSelect` and `actionBar.actions` default values (#15944) @LukasTy
79
+ - [pickers] Use `usePickerContext()` and `usePickerActionsContext()` instead of passing props to the `shortcuts` and `toolbar` slots (#15948) @flaviendelangle
80
+ - [l10n] Add Chinese (Taiwan) (zh-TW) locale (#16033) @nusr
81
+ - [l10n] Improve Norwegian (nb-NO) locale (#16089) @josteinjhauge
82
+
83
+ #### `@mui/x-date-pickers-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
84
+
85
+ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.7`.
86
+
87
+ ### Charts
88
+
89
+ #### Breaking changes
90
+
91
+ - Removed `DefaultChartsLegend` component, since it is now easier to create custom legends — [Learn more](https://next.mui.com/x/react-charts/components/#html-components).
92
+ - The default legend is now an HTML element and can be styled more easily.
93
+ - The `width` and `height` properties of the charts now only apply to the `svg` element, and not their wrappers, this might cause some layout shifts.
94
+ - `slotProps.legend.direction` now accepts `'horizontal' | 'vertical'` instead of `'row' | 'column'` — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-direction-value-change-✅).
95
+ - The `getSeriesToDisplay` function was removed in favor of the `useLegend` hook. — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#the-getseriestodisplay-function-was-removed).
96
+
97
+ #### `@mui/x-charts@8.0.0-alpha.7`
98
+
99
+ - [charts] New HTML legend & styles (#15733) @JCQuintas
100
+ - [charts] Improve React 19 support (#15769) @LukasTy
101
+ - [charts] Fix 301 redirection in the API documentation @oliviertassinari
102
+
103
+ #### `@mui/x-charts-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
104
+
105
+ Same changes as in `@mui/x-charts@8.0.0-alpha.7`.
106
+
107
+ ### Tree View
108
+
109
+ #### `@mui/x-tree-view@8.0.0-alpha.7`
110
+
111
+ - [TreeView] Improve React 19 support (#15769) @LukasTy
112
+
113
+ #### `@mui/x-tree-view-pro@8.0.0-alpha.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
114
+
115
+ Same changes as in `@mui/x-tree-view@8.0.0-alpha.7`.
116
+
117
+ ### Docs
118
+
119
+ - [docs] Fix `EditingWithDatePickers` demo (#15967) @k-rajat19
120
+ - [docs] Fix inconsistent multi input range field separators (#16043) @flaviendelangle
121
+ - [docs] Fix non-existing "adapter" property of `LocalizationProvider` (#16084) @tomashauser
122
+ - [docs] Refactor Data Grid with Date Pickers example (#15992) @LukasTy
123
+ - [docs] Unify the wording of the pickers slots breaking changes (#16036) @flaviendelangle
124
+
125
+ ### Core
126
+
127
+ - [core] Clarify the release strategy (#16014) @MBilalShafi
128
+ - [core] Small fixes on docs @oliviertassinari
129
+ - [core] Sync with other repos @oliviertassinari
130
+ - [core] Update the `release:version` docs (#16038) @cherniavskii
131
+ - [code-infra] Add `testSkipIf` and `describeSkipIf` (#16049) @JCQuintas
132
+ - [test] Stabilize flaky Data Grid tests (#16053) @LukasTy
133
+
8
134
  ## 8.0.0-alpha.6
9
135
 
10
136
  _Dec 26, 2024_
@@ -104,7 +230,7 @@ Following are all team members who have contributed to this release:
104
230
 
105
231
  #### Breaking changes
106
232
 
107
- - Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`.
233
+ - Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`:
108
234
 
109
235
  - For `.root` element, use `slotProps.root`.
110
236
  - For `.main` element (the one with `role="grid"`), use `slotProps.main`.
@@ -1,3 +1,3 @@
1
1
  import { DataGridProcessedProps } from '../models/props/DataGridProps';
2
2
  import { GridApiCommunity, GridPrivateApiCommunity } from '../models/api/gridApiCommunity';
3
- export declare const useDataGridComponent: (inputApiRef: React.MutableRefObject<GridApiCommunity> | undefined, props: DataGridProcessedProps) => import("react").MutableRefObject<GridPrivateApiCommunity>;
3
+ export declare const useDataGridComponent: (inputApiRef: React.RefObject<GridApiCommunity> | undefined, props: DataGridProcessedProps) => import("react").RefObject<GridPrivateApiCommunity>;
@@ -1,16 +1,15 @@
1
1
  import * as React from 'react';
2
- import { IconButtonProps } from '@mui/material/IconButton';
3
- import { MenuItemProps } from '@mui/material/MenuItem';
2
+ import { GridSlotProps } from '../../models/gridSlotsComponentsProps';
4
3
  interface GridActionsCellItemCommonProps {
5
4
  label: string;
6
- icon?: React.ReactElement;
5
+ icon?: React.ReactElement<any>;
7
6
  /** from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component */
8
7
  component?: React.ElementType;
9
8
  }
10
9
  export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
11
10
  showInMenu?: false;
12
- icon: React.ReactElement;
13
- } & Omit<IconButtonProps, 'component'>) | ({
11
+ icon: React.ReactElement<any>;
12
+ } & Omit<GridSlotProps['baseIconButton'], 'component'>) | ({
14
13
  showInMenu: true;
15
14
  /**
16
15
  * If false, the menu will not close when this item is clicked.
@@ -18,11 +17,17 @@ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
18
17
  */
19
18
  closeMenuOnClick?: boolean;
20
19
  closeMenu?: () => void;
21
- } & Omit<MenuItemProps, 'component'>));
20
+ } & Omit<GridSlotProps['baseMenuItem'], 'component'>));
22
21
  declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCellItemProps> | React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
23
22
  showInMenu?: false;
24
- icon: React.ReactElement;
25
- } & Omit<IconButtonProps, "component">, "ref"> | Omit<GridActionsCellItemCommonProps & {
23
+ icon: React.ReactElement<any>;
24
+ } & Omit<Omit<import("../../models/gridBaseSlots").ButtonProps, "startIcon"> & {
25
+ label?: string;
26
+ color?: "default" | "inherit" | "primary";
27
+ edge?: "start" | "end" | false;
28
+ } & import("../..").BaseIconButtonPropsOverrides & import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children" | "tabIndex" | "className" | "style" | "classes" | "color" | "sx" | "disabled" | "size" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
29
+ component?: React.ElementType;
30
+ }, "component">, "ref"> | Omit<GridActionsCellItemCommonProps & {
26
31
  showInMenu: true;
27
32
  /**
28
33
  * If false, the menu will not close when this item is clicked.
@@ -30,5 +35,7 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCe
30
35
  */
31
36
  closeMenuOnClick?: boolean;
32
37
  closeMenu?: () => void;
33
- } & Omit<MenuItemProps, "component">, "ref">) & React.RefAttributes<HTMLElement>>;
38
+ } & Omit<import("../../models/gridBaseSlots").MenuItemProps & import("../..").BaseMenuItemPropsOverrides & import("@mui/material").MenuItemOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "children" | "tabIndex" | "className" | "style" | "classes" | "sx" | "autoFocus" | "disabled" | "dense" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableGutters" | "divider" | "selected"> & {
39
+ component?: React.ElementType;
40
+ }, "component">, "ref">) & React.RefAttributes<HTMLElement>>;
34
41
  export { GridActionsCellItem };
@@ -6,6 +6,8 @@ import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import { forwardRef } from '@mui/x-internals/forwardRef';
8
8
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
9
+
10
+ // FIXME(v8:romgrk): Make parametric
9
11
  import { jsx as _jsx } from "react/jsx-runtime";
10
12
  const GridActionsCellItem = forwardRef((props, ref) => {
11
13
  const rootProps = useGridRootProps();
@@ -35,7 +35,7 @@ function GridEditDateCell(props) {
35
35
  other = _objectWithoutPropertiesLoose(props, _excluded);
36
36
  const isDateTime = colDef.type === 'dateTime';
37
37
  const apiRef = useGridApiContext();
38
- const inputRef = React.useRef();
38
+ const inputRef = React.useRef(null);
39
39
  const valueTransformed = React.useMemo(() => {
40
40
  let parsedDate;
41
41
  if (valueProp == null) {
@@ -47,7 +47,7 @@ const GridEditInputCell = forwardRef((props, ref) => {
47
47
  } = props,
48
48
  other = _objectWithoutPropertiesLoose(props, _excluded);
49
49
  const apiRef = useGridApiContext();
50
- const inputRef = React.useRef();
50
+ const inputRef = React.useRef(null);
51
51
  const [valueState, setValueState] = React.useState(value);
52
52
  const classes = useUtilityClasses(rootProps);
53
53
  const handleChange = React.useCallback(async event => {
@@ -30,8 +30,8 @@ function GridEditSingleSelectCell(props) {
30
30
  } = props,
31
31
  other = _objectWithoutPropertiesLoose(props, _excluded);
32
32
  const apiRef = useGridApiContext();
33
- const ref = React.useRef();
34
- const inputRef = React.useRef();
33
+ const ref = React.useRef(null);
34
+ const inputRef = React.useRef(null);
35
35
  const [open, setOpen] = React.useState(initialOpen);
36
36
  const baseSelectProps = rootProps.slotProps?.baseSelect || {};
37
37
  const isSelectNative = baseSelectProps.native ?? false;
@@ -5,6 +5,6 @@ export interface ColumnHeaderMenuIconProps {
5
5
  columnMenuId: string;
6
6
  columnMenuButtonId: string;
7
7
  open: boolean;
8
- iconButtonRef: React.RefObject<HTMLButtonElement>;
8
+ iconButtonRef: React.RefObject<HTMLButtonElement | null>;
9
9
  }
10
10
  export declare const ColumnHeaderMenuIcon: React.MemoExoticComponent<(props: ColumnHeaderMenuIconProps) => React.JSX.Element>;
@@ -57,7 +57,6 @@ function GridColumnHeaderFilterIconButton(props) {
57
57
  const iconButton = /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
58
58
  id: labelId,
59
59
  onClick: toggleFilter,
60
- color: "default",
61
60
  "aria-label": apiRef.current.getLocaleText('columnHeaderFiltersLabel'),
62
61
  size: "small",
63
62
  tabIndex: -1,
@@ -87,7 +87,8 @@ const GridCellCheckboxForwardRef = forwardRef(function GridCellCheckboxRenderer(
87
87
  onChange: handleChange,
88
88
  className: classes.root,
89
89
  inputProps: {
90
- 'aria-label': label
90
+ 'aria-label': label,
91
+ name: 'select_row'
91
92
  },
92
93
  onKeyDown: handleKeyDown,
93
94
  indeterminate: isIndeterminate,
@@ -42,13 +42,16 @@ const GridHeaderCheckbox = forwardRef(function GridHeaderCheckbox(props, ref) {
42
42
  return selection;
43
43
  }
44
44
  return selection.filter(id => {
45
+ if (rootProps.keepNonExistentRowsSelected) {
46
+ return true;
47
+ }
45
48
  // The row might have been deleted
46
49
  if (!apiRef.current.getRow(id)) {
47
50
  return false;
48
51
  }
49
52
  return rootProps.isRowSelectable(apiRef.current.getRowParams(id));
50
53
  });
51
- }, [apiRef, rootProps.isRowSelectable, selection]);
54
+ }, [apiRef, rootProps.isRowSelectable, selection, rootProps.keepNonExistentRowsSelected]);
52
55
 
53
56
  // All the rows that could be selected / unselected by toggling this checkbox
54
57
  const selectionCandidates = React.useMemo(() => {
@@ -103,7 +106,8 @@ const GridHeaderCheckbox = forwardRef(function GridHeaderCheckbox(props, ref) {
103
106
  onChange: handleChange,
104
107
  className: classes.root,
105
108
  inputProps: {
106
- 'aria-label': label
109
+ 'aria-label': label,
110
+ name: 'select_all_rows'
107
111
  },
108
112
  tabIndex: tabIndex,
109
113
  onKeyDown: handleKeyDown,
@@ -140,11 +140,11 @@ function GridColumnsManagement(props) {
140
140
  endAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
141
141
  "aria-label": apiRef.current.getLocaleText('columnsManagementDeleteIconLabel'),
142
142
  size: "small",
143
- sx: [searchValue ? {
143
+ style: searchValue ? {
144
144
  visibility: 'visible'
145
145
  } : {
146
146
  visibility: 'hidden'
147
- }],
147
+ },
148
148
  tabIndex: -1,
149
149
  onClick: handleSearchReset
150
150
  }, rootProps.slotProps?.baseIconButton, {
@@ -16,7 +16,7 @@ export interface GridPanelProps extends Partial<React.ComponentProps<typeof Grid
16
16
  open: boolean;
17
17
  }
18
18
  export declare const gridPanelClasses: Record<keyof GridPanelClasses, string>;
19
- declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").PopperProps & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "component" | "sx" | "components" | "componentsProps" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
19
+ declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").PopperProps & React.RefAttributes<HTMLDivElement>, "id" | "children" | "tabIndex" | "ref" | "className" | "style" | "color" | "componentsProps" | "components" | "slotProps" | "slots" | "sx" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "lang" | "nonce" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "container" | "transition" | "component" | "open" | "disablePortal" | "anchorEl" | "keepMounted" | "modifiers" | "placement" | "popperOptions" | "popperRef"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
20
20
  ownerState: OwnerState;
21
21
  }, {}, {}>;
22
22
  declare const GridPanel: React.ForwardRefExoticComponent<GridPanelProps> | React.ForwardRefExoticComponent<Omit<GridPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -22,17 +22,17 @@ function GridFilterInputValue(props) {
22
22
  } = props,
23
23
  others = _objectWithoutPropertiesLoose(props, _excluded);
24
24
  const filterTimeout = useTimeout();
25
- const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value, type));
25
+ const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
26
26
  const [applying, setIsApplying] = React.useState(false);
27
27
  const id = useId();
28
28
  const rootProps = useGridRootProps();
29
29
  const onFilterChange = React.useCallback(event => {
30
- const value = sanitizeFilterItemValue(event.target.value, type);
30
+ const value = sanitizeFilterItemValue(event.target.value);
31
31
  setFilterValueState(value);
32
32
  setIsApplying(true);
33
33
  filterTimeout.start(rootProps.filterDebounceMs, () => {
34
34
  const newItem = _extends({}, item, {
35
- value,
35
+ value: type === 'number' && !Number.isNaN(Number(value)) ? Number(value) : value,
36
36
  fromInput: id
37
37
  });
38
38
  applyValue(newItem);
@@ -42,14 +42,14 @@ function GridFilterInputValue(props) {
42
42
  React.useEffect(() => {
43
43
  const itemPlusTag = item;
44
44
  if (itemPlusTag.fromInput !== id || item.value == null) {
45
- setFilterValueState(sanitizeFilterItemValue(item.value, type));
45
+ setFilterValueState(sanitizeFilterItemValue(item.value));
46
46
  }
47
- }, [id, item, type]);
47
+ }, [id, item]);
48
48
  return /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({
49
49
  id: id,
50
50
  label: apiRef.current.getLocaleText('filterPanelInputLabel'),
51
51
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
52
- value: filterValueState === undefined ? '' : String(filterValueState),
52
+ value: filterValueState ?? '',
53
53
  onChange: onFilterChange,
54
54
  variant: variant,
55
55
  type: type || 'text',
@@ -71,13 +71,10 @@ function GridFilterInputValue(props) {
71
71
  inputRef: focusElementRef
72
72
  }, others, rootProps.slotProps?.baseTextField));
73
73
  }
74
- function sanitizeFilterItemValue(value, type) {
74
+ function sanitizeFilterItemValue(value) {
75
75
  if (value == null || value === '') {
76
76
  return undefined;
77
77
  }
78
- if (type === 'number') {
79
- return Number(value);
80
- }
81
78
  return String(value);
82
79
  }
83
80
  process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
@@ -109,11 +109,11 @@ function GridToolbarQuickFilter(props) {
109
109
  "aria-label": apiRef.current.getLocaleText('toolbarQuickFilterDeleteIconLabel'),
110
110
  size: "small",
111
111
  edge: "end",
112
- sx: [searchValue ? {
112
+ style: searchValue ? {
113
113
  visibility: 'visible'
114
114
  } : {
115
115
  visibility: 'hidden'
116
- }],
116
+ },
117
117
  onClick: handleSearchReset
118
118
  }, rootProps.slotProps?.baseIconButton, {
119
119
  children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterClearIcon, {
@@ -6,7 +6,7 @@ import { GridHydrateColumnsValue, GridPinnedColumnPosition } from '../../feature
6
6
  import { GridRowEntry, GridRowId } from '../../../models/gridRows';
7
7
  import { GridHydrateRowsValue } from '../../features/rows/gridRowsInterfaces';
8
8
  import { GridPreferencePanelsValue } from '../../features/preferencesPanel';
9
- import { GridGetRowsParams } from '../../../models/gridDataSource';
9
+ import { GridGetRowsParams, GridGetRowsResponse } from '../../../models/gridDataSource';
10
10
  import { HeightEntry } from '../../features/rows/gridRowsMetaInterfaces';
11
11
  export type GridPipeProcessorGroup = keyof GridPipeProcessingLookup;
12
12
  export interface GridPipeProcessingLookup {
@@ -29,7 +29,7 @@ export interface GridPipeProcessingLookup {
29
29
  };
30
30
  exportMenu: {
31
31
  value: {
32
- component: React.ReactElement;
32
+ component: React.ReactElement<any>;
33
33
  componentName: string;
34
34
  }[];
35
35
  context: any;
@@ -84,6 +84,13 @@ export interface GridPipeProcessingLookup {
84
84
  value: GridPinnedColumnPosition | false;
85
85
  context: string;
86
86
  };
87
+ processDataSourceRows: {
88
+ value: {
89
+ params: GridGetRowsParams;
90
+ response: GridGetRowsResponse;
91
+ };
92
+ context: boolean;
93
+ };
87
94
  }
88
95
  export type GridPipeProcessor<P extends GridPipeProcessorGroup> = (value: GridPipeProcessingLookup[P]['value'], context: GridPipeProcessingLookup[P] extends {
89
96
  context: any;
@@ -29,4 +29,4 @@ import { GridPrivateApiCommon } from '../../../models/api/gridApiCommon';
29
29
  * * a processor is registered.
30
30
  * * `apiRef.current.requestPipeProcessorsApplication` is called for the given group.
31
31
  */
32
- export declare const useGridPipeProcessing: (apiRef: React.MutableRefObject<GridPrivateApiCommon>) => void;
32
+ export declare const useGridPipeProcessing: (apiRef: React.RefObject<GridPrivateApiCommon>) => void;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { GridPrivateApiCommon } from '../../../models/api/gridApiCommon';
3
3
  import { GridPipeProcessorGroup } from './gridPipeProcessingApi';
4
- export declare const useGridRegisterPipeApplier: <PrivateApi extends GridPrivateApiCommon, G extends GridPipeProcessorGroup>(apiRef: React.MutableRefObject<PrivateApi>, group: G, callback: () => void) => void;
4
+ export declare const useGridRegisterPipeApplier: <PrivateApi extends GridPrivateApiCommon, G extends GridPipeProcessorGroup>(apiRef: React.RefObject<PrivateApi>, group: G, callback: () => void) => void;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useFirstRender } from "../../utils/useFirstRender.js";
3
3
  export const useGridRegisterPipeApplier = (apiRef, group, callback) => {
4
- const cleanup = React.useRef();
4
+ const cleanup = React.useRef(null);
5
5
  const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
6
6
  const registerPreProcessor = React.useCallback(() => {
7
7
  cleanup.current = apiRef.current.registerPipeApplier(group, id.current, callback);
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { GridPrivateApiCommon } from '../../../models/api/gridApiCommon';
3
3
  import { GridPipeProcessorGroup, GridPipeProcessor } from './gridPipeProcessingApi';
4
- export declare const useGridRegisterPipeProcessor: <PrivateApi extends GridPrivateApiCommon, G extends GridPipeProcessorGroup>(apiRef: React.MutableRefObject<PrivateApi>, group: G, callback: GridPipeProcessor<G>) => void;
4
+ export declare const useGridRegisterPipeProcessor: <PrivateApi extends GridPrivateApiCommon, G extends GridPipeProcessorGroup>(apiRef: React.RefObject<PrivateApi>, group: G, callback: GridPipeProcessor<G>) => void;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useFirstRender } from "../../utils/useFirstRender.js";
3
3
  export const useGridRegisterPipeProcessor = (apiRef, group, callback) => {
4
- const cleanup = React.useRef();
4
+ const cleanup = React.useRef(null);
5
5
  const id = React.useRef(`mui-${Math.round(Math.random() * 1e9)}`);
6
6
  const registerPreProcessor = React.useCallback(() => {
7
7
  cleanup.current = apiRef.current.registerPipeProcessor(group, id.current, callback);
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { GridPrivateApiCommon } from '../../../models/api/gridApiCommon';
3
3
  import { GridStrategyProcessorName, GridStrategyProcessor } from './gridStrategyProcessingApi';
4
- export declare const useGridRegisterStrategyProcessor: <Api extends GridPrivateApiCommon, G extends GridStrategyProcessorName>(apiRef: React.MutableRefObject<Api>, strategyName: string, group: G, processor: GridStrategyProcessor<G>) => void;
4
+ export declare const useGridRegisterStrategyProcessor: <Api extends GridPrivateApiCommon, G extends GridStrategyProcessorName>(apiRef: React.RefObject<Api>, strategyName: string, group: G, processor: GridStrategyProcessor<G>) => void;
@@ -42,4 +42,4 @@ export declare const GRID_STRATEGIES_PROCESSORS: {
42
42
  * Each processor name is part of a strategy group which can only have one active strategy at the time.
43
43
  * There are two active groups named `rowTree` and `dataSource`.
44
44
  */
45
- export declare const useGridStrategyProcessing: (apiRef: React.MutableRefObject<GridPrivateApiCommon>) => void;
45
+ export declare const useGridStrategyProcessing: (apiRef: React.RefObject<GridPrivateApiCommon>) => void;
@@ -2,4 +2,4 @@ import * as React from 'react';
2
2
  import { DataGridProcessedProps } from '../../models/props/DataGridProps';
3
3
  import type { GridApiCommon, GridPrivateApiCommon } from '../../models/api/gridApiCommon';
4
4
  export declare function unwrapPrivateAPI<PrivateApi extends GridPrivateApiCommon, Api extends GridApiCommon>(publicApi: Api): PrivateApi;
5
- export declare function useGridApiInitialization<PrivateApi extends GridPrivateApiCommon, Api extends GridApiCommon>(inputApiRef: React.MutableRefObject<Api> | undefined, props: Pick<DataGridProcessedProps, 'signature'>): React.MutableRefObject<PrivateApi>;
5
+ export declare function useGridApiInitialization<PrivateApi extends GridPrivateApiCommon, Api extends GridApiCommon>(inputApiRef: React.RefObject<Api> | undefined, props: Pick<DataGridProcessedProps, 'signature'>): React.RefObject<PrivateApi>;
@@ -68,8 +68,8 @@ function createPublicAPI(privateApiRef) {
68
68
  return publicApi;
69
69
  }
70
70
  export function useGridApiInitialization(inputApiRef, props) {
71
- const publicApiRef = React.useRef();
72
- const privateApiRef = React.useRef();
71
+ const publicApiRef = React.useRef(null);
72
+ const privateApiRef = React.useRef(null);
73
73
  if (!privateApiRef.current) {
74
74
  privateApiRef.current = createPrivateAPI(publicApiRef);
75
75
  }
@@ -4,4 +4,4 @@ import { DataGridProcessedProps } from '../../models/props/DataGridProps';
4
4
  /**
5
5
  * Initialize the technical pieces of the DataGrid (logger, state, ...) that any DataGrid implementation needs
6
6
  */
7
- export declare const useGridInitialization: <PrivateApi extends GridPrivateApiCommon, Api extends GridApiCommon>(inputApiRef: React.MutableRefObject<Api> | undefined, props: DataGridProcessedProps) => React.MutableRefObject<PrivateApi>;
7
+ export declare const useGridInitialization: <PrivateApi extends GridPrivateApiCommon, Api extends GridApiCommon>(inputApiRef: React.RefObject<Api> | undefined, props: DataGridProcessedProps) => React.RefObject<PrivateApi>;
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  import { GridPrivateApiCommon } from '../../models/api/gridApiCommon';
3
- export declare const useGridIsRtl: (apiRef: React.MutableRefObject<GridPrivateApiCommon>) => void;
3
+ export declare const useGridIsRtl: (apiRef: React.RefObject<GridPrivateApiCommon>) => void;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { GridPrivateApiCommon } from '../../models/api/gridApiCommon';
3
3
  import { DataGridProcessedProps } from '../../models/props/DataGridProps';
4
- export declare const useGridLocaleText: (apiRef: React.MutableRefObject<GridPrivateApiCommon>, props: Pick<DataGridProcessedProps, "localeText">) => void;
4
+ export declare const useGridLocaleText: (apiRef: React.RefObject<GridPrivateApiCommon>, props: Pick<DataGridProcessedProps, "localeText">) => void;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { GridPrivateApiCommon } from '../../models/api/gridApiCommon';
3
3
  import { DataGridProcessedProps } from '../../models/props/DataGridProps';
4
- export declare const useGridLoggerFactory: (apiRef: React.MutableRefObject<GridPrivateApiCommon>, props: Pick<DataGridProcessedProps, "logger" | "logLevel">) => void;
4
+ export declare const useGridLoggerFactory: (apiRef: React.RefObject<GridPrivateApiCommon>, props: Pick<DataGridProcessedProps, "logger" | "logLevel">) => void;
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  import type { GridPrivateApiCommon } from '../../models/api/gridApiCommon';
3
- export declare const useGridRefs: <PrivateApi extends GridPrivateApiCommon>(apiRef: React.MutableRefObject<PrivateApi>) => void;
3
+ export declare const useGridRefs: <PrivateApi extends GridPrivateApiCommon>(apiRef: React.RefObject<PrivateApi>) => void;
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  import type { GridPrivateApiCommon } from '../../models/api/gridApiCommon';
3
- export declare const useGridStateInitialization: <PrivateApi extends GridPrivateApiCommon>(apiRef: React.MutableRefObject<PrivateApi>) => void;
3
+ export declare const useGridStateInitialization: <PrivateApi extends GridPrivateApiCommon>(apiRef: React.RefObject<PrivateApi>) => void;
@@ -7,4 +7,4 @@ export declare const columnResizeStateInitializer: GridStateInitializer;
7
7
  * @requires useGridColumns (method, event)
8
8
  * TODO: improve experience for last column
9
9
  */
10
- export declare const useGridColumnResize: (apiRef: React.MutableRefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "autosizeOptions" | "autosizeOnMount" | "disableAutosize" | "onColumnResize" | "onColumnWidthChange" | "disableVirtualization">) => void;
10
+ export declare const useGridColumnResize: (apiRef: React.RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "autosizeOptions" | "autosizeOnMount" | "disableAutosize" | "onColumnResize" | "onColumnWidthChange" | "disableVirtualization">) => void;
@@ -70,7 +70,7 @@ function preventClick(event) {
70
70
  * is disabled.
71
71
  */
72
72
  function useColumnVirtualizationDisabled(apiRef) {
73
- const promise = React.useRef();
73
+ const promise = React.useRef(undefined);
74
74
  const selector = () => gridVirtualizationColumnEnabledSelector(apiRef);
75
75
  const value = useGridSelector(apiRef, selector);
76
76
  React.useEffect(() => {
@@ -184,10 +184,10 @@ export const useGridColumnResize = (apiRef, props) => {
184
184
  // To improve accessibility, the separator has padding on both sides.
185
185
  // Clicking inside the padding area should be treated as a click in the separator.
186
186
  // This ref stores the offset between the click and the separator.
187
- const initialOffsetToSeparator = React.useRef();
188
- const resizeDirection = React.useRef();
187
+ const initialOffsetToSeparator = React.useRef(null);
188
+ const resizeDirection = React.useRef(null);
189
189
  const stopResizeEventTimeout = useTimeout();
190
- const touchId = React.useRef();
190
+ const touchId = React.useRef(undefined);
191
191
  const updateWidth = newWidth => {
192
192
  logger.debug(`Updating width to ${newWidth} for col ${refs.colDef.field}`);
193
193
  const prevWidth = refs.columnHeaderElement.offsetWidth;