@mui/x-data-grid-pro 6.16.0 → 6.16.2

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 (47) hide show
  1. package/CHANGELOG.md +165 -1
  2. package/DataGridPro/DataGridPro.d.ts +7 -0
  3. package/DataGridPro/DataGridPro.js +8 -1
  4. package/hooks/features/columnResize/useGridColumnResize.js +4 -1
  5. package/hooks/features/lazyLoader/useGridLazyLoader.js +3 -2
  6. package/index.js +1 -1
  7. package/legacy/DataGridPro/DataGridPro.js +8 -1
  8. package/legacy/hooks/features/columnResize/useGridColumnResize.js +4 -1
  9. package/legacy/hooks/features/lazyLoader/useGridLazyLoader.js +3 -2
  10. package/legacy/index.js +1 -1
  11. package/legacy/utils/releaseInfo.js +1 -1
  12. package/models/gridGroupingColDefOverride.d.ts +2 -2
  13. package/modern/DataGridPro/DataGridPro.js +8 -1
  14. package/modern/hooks/features/columnResize/useGridColumnResize.js +4 -1
  15. package/modern/hooks/features/lazyLoader/useGridLazyLoader.js +2 -2
  16. package/modern/index.js +1 -1
  17. package/modern/utils/releaseInfo.js +1 -1
  18. package/node/DataGridPro/DataGridPro.js +9 -3
  19. package/node/DataGridPro/useDataGridProProps.js +1 -2
  20. package/node/components/DataGridProVirtualScroller.js +2 -3
  21. package/node/components/GridColumnHeaders.js +1 -2
  22. package/node/components/GridProColumnMenu.js +3 -6
  23. package/node/components/GridScrollArea.js +1 -2
  24. package/node/components/headerFiltering/GridHeaderFilterCell.js +1 -2
  25. package/node/constants/dataGridProDefaultSlotsComponents.js +2 -3
  26. package/node/hooks/features/columnPinning/gridColumnPinningInterface.js +2 -3
  27. package/node/hooks/features/columnReorder/columnReorderSelector.js +1 -2
  28. package/node/hooks/features/columnResize/columnResizeSelector.js +1 -2
  29. package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -3
  30. package/node/hooks/features/columnResize/useGridColumnResize.js +4 -1
  31. package/node/hooks/features/detailPanel/gridDetailPanelSelector.js +2 -3
  32. package/node/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +3 -5
  33. package/node/hooks/features/lazyLoader/useGridLazyLoader.js +2 -2
  34. package/node/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +1 -2
  35. package/node/hooks/features/rowReorder/gridRowReorderColDef.js +2 -3
  36. package/node/hooks/features/treeData/gridTreeDataGroupColDef.js +4 -7
  37. package/node/hooks/features/treeData/gridTreeDataUtils.js +1 -2
  38. package/node/hooks/utils/useGridApiContext.js +1 -2
  39. package/node/hooks/utils/useGridApiRef.js +1 -2
  40. package/node/hooks/utils/useGridPrivateApiContext.js +1 -2
  41. package/node/hooks/utils/useGridRootProps.js +1 -2
  42. package/node/index.js +1 -1
  43. package/node/material/icons.js +3 -5
  44. package/node/material/index.js +1 -2
  45. package/node/utils/releaseInfo.js +1 -1
  46. package/package.json +4 -4
  47. package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,170 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.16.2
7
+
8
+ _Oct 12, 2023_
9
+
10
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 📊 Chart's legend text management has been reworked and contains breaking changes (#10138) @alexfauquette
13
+ - 📝 Add [Bulk editing](https://mui.com/x/react-data-grid/recipes-editing/#bulk-editing) demo (#10333) @cherniavskii
14
+ - 🚀 Column grouping now works smoothly with column pinning (#10518) @MBilalShafi
15
+ - 🌍 Improve Arabic (ar-SD) and Spanish (es-ES) locales
16
+ - 🐞 Bugfixes
17
+ - 📚 Documentation improvements
18
+
19
+ ### Data Grid
20
+
21
+ #### `@mui/x-data-grid@6.16.2`
22
+
23
+ - [DataGrid] Fix `LazyLoading` demo crash (#10621) @MBilalShafi
24
+ - [DataGrid] Fix cells overlapping the scrollbar in iOS Safari (#10633) @cherniavskii
25
+ - [DataGrid] Fix `getRowId is not defined` error (#10613) @romgrk
26
+ - [DataGrid] Get quick filter to work OOTB with `date` and `dateTime` fields (#10636) @MBilalShafi
27
+ - [DataGrid] Make cursor for selectable cells to be `default` unless editable (#9997) @gitstart
28
+ - [DataGrid] Remove unnecessary syntax in JSDoc (#10567) @Lev-Shapiro
29
+ - [DataGrid] Update row hover behavior to match native hover (#10623) @cherniavskii
30
+ - [l10n] Improve Arabic (ar-SD) locale (#10625) @alabenyahia
31
+
32
+ #### `@mui/x-data-grid-pro@6.16.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
33
+
34
+ Same changes as in `@mui/x-data-grid@6.16.2`, plus:
35
+
36
+ - [DataGridPro] Improve column grouping and column pinning friendship (#10518) @MBilalShafi
37
+
38
+ #### `@mui/x-data-grid-premium@6.16.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
39
+
40
+ Same changes as in `@mui/x-data-grid-pro@6.16.2`.
41
+
42
+ ### Date Pickers
43
+
44
+ #### `@mui/x-date-pickers@6.16.2`
45
+
46
+ - [DateTimePicker] Add support for `DigitalClock` view renderer (#10624) @LukasTy
47
+ - [fields] Bootstrap the multi-HTML input component (#10638) @flaviendelangle
48
+ - [pickers] Fix timezone `UTC` false positive (#10586) @alexfauquette
49
+ - [l10n] Improve Spanish (es-ES) locale (#10588) @eduardodallmann
50
+
51
+ #### `@mui/x-date-pickers-pro@6.16.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
52
+
53
+ Same changes as in `@mui/x-date-pickers@6.16.2`.
54
+
55
+ ### Charts / `@mui/x-charts@6.0.0-alpha.15`
56
+
57
+ #### Breaking changes
58
+
59
+ The charts have a new text display mechanism.
60
+ It adds line break support and avoids overlapping text in the legend.
61
+ This comes with some breaking changes.
62
+
63
+ - The DOM structure is modified. An intermediary `<tspan />` element has been added. This can impact how your style is applied.
64
+ ```diff
65
+ - <text>The label</text>
66
+ + <text><tspan>The label</tspan></text>
67
+ ```
68
+
69
+ - The top margin has been reduced from 100 to 50 to benefit from the denser legend.
70
+
71
+ - To accurately compute the text size and then place it, styling should be provided as a JS object. For example, to set the legend font size, you should do:
72
+ ```jsx
73
+ <PieChart
74
+ {/** ... */}
75
+ slotProps={{
76
+ legend: {
77
+ labelStyle: {
78
+ fontSize: 16,
79
+ },
80
+ },
81
+ }}
82
+ />
83
+ ```
84
+ Support for other text elements (axis labels and tick labels) will be implemented in follow-up PR.
85
+
86
+ #### Changes
87
+
88
+ - [charts] Fix typo between internal/external variable (#10640) @alexfauquette
89
+ - [charts] Improve the management of the text (#10138) @alexfauquette
90
+
91
+ ### Docs
92
+
93
+ - [docs] Add bulk editing demo (#10333) @cherniavskii
94
+ - [docs] Add reference links to DateRangePicker components (#10629) @michelengelen
95
+ - [docs] Add reference links to DateTimePicker components (#10628) @michelengelen
96
+ - [docs] Add reference links to picker field components (#10631) @michelengelen
97
+ - [docs] Added reference links to TimePicker components (#10627) @michelengelen
98
+ - [docs] Avoid Pickers playground error due to empty views (#10654) @LukasTy
99
+ - [docs] Fix DataGrid[Pro/Premium] reference links (#10620) @michelengelen
100
+
101
+ ### Core
102
+
103
+ - [core] Bump monorepo (#10619) @alexfauquette
104
+ - [core] Update `no-response` workflow (#10491) @MBilalShafi
105
+ - [core] Update the issue templates to reflect the new support workflow (#10651) @MBilalShafi
106
+ - [test] Fix `testEval` not invoking test assertions (#10587) @cherniavskii
107
+ - [test] Fix dev mode warning (#10610) @oliviertassinari
108
+ - [test] Set UUID chance seed in visual tests (#10609) @oliviertassinari
109
+
110
+ ## 6.16.1
111
+
112
+ _Oct 6, 2023_
113
+
114
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
115
+
116
+ - 🥧 Support interaction with pie chart
117
+ - 🐞 Bugfixes
118
+ - 📚 Documentation improvements
119
+
120
+ ### Data Grid
121
+
122
+ #### `@mui/x-data-grid@6.16.1`
123
+
124
+ - [DataGrid] Add a new demo with sparklines (#9228) @flaviendelangle
125
+ - [DataGrid] Fix autosize missing a few pixels (#10471) @romgrk
126
+ - [DataGrid] Make `disableColumnSelector` demo idempotent (#10548) @MBilalShafi
127
+
128
+ #### `@mui/x-data-grid-pro@6.16.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
129
+
130
+ Same changes as in `@mui/x-data-grid@6.16.1`.
131
+
132
+ #### `@mui/x-data-grid-premium@6.16.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
133
+
134
+ Same changes as in `@mui/x-data-grid-pro@6.16.1`.
135
+
136
+ ### Date Pickers
137
+
138
+ #### `@mui/x-date-pickers@6.16.1`
139
+
140
+ - [pickers] Avoid calendar layout shifting when changing views (#10541) @LukasTy
141
+ - [pickers] Fix clearable behavior when disabled (#10542) @noraleonte
142
+ - [pickers] Improve customization playground examples (#10544) @noraleonte
143
+
144
+ #### `@mui/x-date-pickers-pro@6.16.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
145
+
146
+ Same changes as in `@mui/x-date-pickers@6.16.1`, plus:
147
+
148
+ - [DateRangePicker] Fix `InputProps` propagation in multi input (#10564) @alexfauquette
149
+
150
+ ### Charts / `@mui/x-charts@6.0.0-alpha.14`
151
+
152
+ - [charts] Display cursor pointer for pie chart only if `onClick` is provided (#10551) @giladappsforce
153
+ - [charts] Add `onClick` prop to PieChart (#10506) @giladappsforce
154
+ - [charts] Support `slots`/`slotProps` for the tooltip (#10515) @alexfauquette
155
+
156
+ ### Docs
157
+
158
+ - [docs] Add `DateRangePicker` example with a `Button` trigger (#10485) @LukasTy
159
+ - [docs] Add section about disabling columns panel (#10328) @MBilalShafi
160
+ - [docs] Add section about overriding slots to base concepts (#10421) @noraleonte
161
+ - [docs] Add "What's new" page listing all release announcements (#9727) @joserodolfofreitas
162
+ - [docs] Update RTL Support section of the grid localization docs (#10561) @MBilalShafi
163
+
164
+ ### Core
165
+
166
+ - [core] Fix casing consistency with legal and marketing content @oliviertassinari
167
+ - [core] Revert the link in the priority support ticket description (#10517) @michelengelen
168
+ - [CHANGELOG] Polish image @oliviertassinari
169
+
6
170
  ## 6.16.0
7
171
 
8
172
  _Sep 29, 2023_
@@ -13,7 +177,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
13
177
 
14
178
  The pickers and fields now have an out-of-the box implementation for clearing the field value. You can see the documentation for this behavior on the [Date Picker documentation](https://mui.com/x/react-date-pickers/date-picker/#clearing-the-value).
15
179
 
16
- <img width="380" alt="Clearable behavior" src="https://github.com/mui/mui-x/assets/72460825/e4a66169-83b5-4579-b9f6-6e15bb528411">
180
+ <img width="337" height="139" alt="Clearable behavior" src="https://github.com/mui/mui-x/assets/3165635/a5407cb6-0b8a-443c-b4b9-1f81ceb4d087">
17
181
 
18
182
  - 💫 Add Date Picker customization playground (#9581) @noraleonte
19
183
 
@@ -5,5 +5,12 @@ interface DataGridProComponent {
5
5
  <R extends GridValidRowModel = any>(props: DataGridProProps<R> & React.RefAttributes<HTMLDivElement>): React.JSX.Element;
6
6
  propTypes?: any;
7
7
  }
8
+ /**
9
+ * Demos:
10
+ * - [DataGridPro](https://mui.com/x/react-data-grid/demo/)
11
+ *
12
+ * API:
13
+ * - [DataGridPro API](https://mui.com/x/api/data-grid/data-grid-pro/)
14
+ */
8
15
  export declare const DataGridPro: DataGridProComponent;
9
16
  export {};
@@ -39,6 +39,13 @@ const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProp
39
39
  }))
40
40
  });
41
41
  });
42
+ /**
43
+ * Demos:
44
+ * - [DataGridPro](https://mui.com/x/react-data-grid/demo/)
45
+ *
46
+ * API:
47
+ * - [DataGridPro API](https://mui.com/x/api/data-grid/data-grid-pro/)
48
+ */
42
49
  export const DataGridPro = /*#__PURE__*/React.memo(DataGridProRaw);
43
50
  DataGridProRaw.propTypes = {
44
51
  // ----------------------------- Warning --------------------------------
@@ -878,7 +885,7 @@ DataGridProRaw.propTypes = {
878
885
  /**
879
886
  * If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
880
887
  * If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
881
- * @default: false
888
+ * @default false
882
889
  */
883
890
  unstable_ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({
884
891
  clipboardExport: PropTypes.bool,
@@ -129,6 +129,8 @@ function excludeOutliers(inputValues, factor) {
129
129
  }
130
130
  function extractColumnWidths(apiRef, options, columns) {
131
131
  const widthByField = {};
132
+ const root = apiRef.current.rootElementRef.current;
133
+ root.classList.add(gridClasses.autosizing);
132
134
  columns.forEach(column => {
133
135
  const cells = findGridCells(apiRef.current, column.field);
134
136
  const widths = cells.map(cell => {
@@ -141,7 +143,7 @@ function extractColumnWidths(apiRef, options, columns) {
141
143
  }
142
144
  const style = window.getComputedStyle(cell, null);
143
145
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
144
- const contentWidth = ((_cell$firstElementChi = (_cell$firstElementChi2 = cell.firstElementChild) == null ? void 0 : _cell$firstElementChi2.scrollWidth) != null ? _cell$firstElementChi : -1) + 1;
146
+ const contentWidth = (_cell$firstElementChi = (_cell$firstElementChi2 = cell.firstElementChild) == null ? void 0 : _cell$firstElementChi2.getBoundingClientRect().width) != null ? _cell$firstElementChi : 0;
145
147
  return paddingWidth + contentWidth;
146
148
  });
147
149
  const filteredWidths = options.includeOutliers ? widths : excludeOutliers(widths, options.outliersFactor);
@@ -165,6 +167,7 @@ function extractColumnWidths(apiRef, options, columns) {
165
167
  const maxContent = filteredWidths.length === 0 ? 0 : Math.max(...filteredWidths);
166
168
  widthByField[column.field] = clamp(maxContent, min, max);
167
169
  });
170
+ root.classList.remove(gridClasses.autosizing);
168
171
  return widthByField;
169
172
  }
170
173
  export const columnResizeStateInitializer = state => _extends({}, state, {
@@ -15,8 +15,9 @@ function findSkeletonRowsSection({
15
15
  let endIndex = visibleRowsSection.length - 1;
16
16
  let isSkeletonSectionFound = false;
17
17
  while (!isSkeletonSectionFound && firstRowIndex < lastRowIndex) {
18
- const isStartingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[startIndex].id).type === 'skeletonRow';
19
- const isEndingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[endIndex].id).type === 'skeletonRow';
18
+ var _apiRef$current$getRo, _apiRef$current$getRo2;
19
+ const isStartingWithASkeletonRow = ((_apiRef$current$getRo = apiRef.current.getRowNode(visibleRowsSection[startIndex].id)) == null ? void 0 : _apiRef$current$getRo.type) === 'skeletonRow';
20
+ const isEndingWithASkeletonRow = ((_apiRef$current$getRo2 = apiRef.current.getRowNode(visibleRowsSection[endIndex].id)) == null ? void 0 : _apiRef$current$getRo2.type) === 'skeletonRow';
20
21
  if (isStartingWithASkeletonRow && isEndingWithASkeletonRow) {
21
22
  isSkeletonSectionFound = true;
22
23
  }
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.16.0
2
+ * @mui/x-data-grid-pro v6.16.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -39,6 +39,13 @@ var DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProps,
39
39
  }))
40
40
  });
41
41
  });
42
+ /**
43
+ * Demos:
44
+ * - [DataGridPro](https://mui.com/x/react-data-grid/demo/)
45
+ *
46
+ * API:
47
+ * - [DataGridPro API](https://mui.com/x/api/data-grid/data-grid-pro/)
48
+ */
42
49
  export var DataGridPro = /*#__PURE__*/React.memo(DataGridProRaw);
43
50
  DataGridProRaw.propTypes = {
44
51
  // ----------------------------- Warning --------------------------------
@@ -878,7 +885,7 @@ DataGridProRaw.propTypes = {
878
885
  /**
879
886
  * If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
880
887
  * If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
881
- * @default: false
888
+ * @default false
882
889
  */
883
890
  unstable_ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({
884
891
  clipboardExport: PropTypes.bool,
@@ -138,6 +138,8 @@ function excludeOutliers(inputValues, factor) {
138
138
  }
139
139
  function extractColumnWidths(apiRef, options, columns) {
140
140
  var widthByField = {};
141
+ var root = apiRef.current.rootElementRef.current;
142
+ root.classList.add(gridClasses.autosizing);
141
143
  columns.forEach(function (column) {
142
144
  var cells = findGridCells(apiRef.current, column.field);
143
145
  var widths = cells.map(function (cell) {
@@ -150,7 +152,7 @@ function extractColumnWidths(apiRef, options, columns) {
150
152
  }
151
153
  var style = window.getComputedStyle(cell, null);
152
154
  var paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
153
- var contentWidth = ((_cell$firstElementChi = (_cell$firstElementChi2 = cell.firstElementChild) == null ? void 0 : _cell$firstElementChi2.scrollWidth) != null ? _cell$firstElementChi : -1) + 1;
155
+ var contentWidth = (_cell$firstElementChi = (_cell$firstElementChi2 = cell.firstElementChild) == null ? void 0 : _cell$firstElementChi2.getBoundingClientRect().width) != null ? _cell$firstElementChi : 0;
154
156
  return paddingWidth + contentWidth;
155
157
  });
156
158
  var filteredWidths = options.includeOutliers ? widths : excludeOutliers(widths, options.outliersFactor);
@@ -174,6 +176,7 @@ function extractColumnWidths(apiRef, options, columns) {
174
176
  var maxContent = filteredWidths.length === 0 ? 0 : Math.max.apply(Math, _toConsumableArray(filteredWidths));
175
177
  widthByField[column.field] = clamp(maxContent, min, max);
176
178
  });
179
+ root.classList.remove(gridClasses.autosizing);
177
180
  return widthByField;
178
181
  }
179
182
  export var columnResizeStateInitializer = function columnResizeStateInitializer(state) {
@@ -13,8 +13,9 @@ function findSkeletonRowsSection(_ref) {
13
13
  var endIndex = visibleRowsSection.length - 1;
14
14
  var isSkeletonSectionFound = false;
15
15
  while (!isSkeletonSectionFound && firstRowIndex < lastRowIndex) {
16
- var isStartingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[startIndex].id).type === 'skeletonRow';
17
- var isEndingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[endIndex].id).type === 'skeletonRow';
16
+ var _apiRef$current$getRo, _apiRef$current$getRo2;
17
+ var isStartingWithASkeletonRow = ((_apiRef$current$getRo = apiRef.current.getRowNode(visibleRowsSection[startIndex].id)) == null ? void 0 : _apiRef$current$getRo.type) === 'skeletonRow';
18
+ var isEndingWithASkeletonRow = ((_apiRef$current$getRo2 = apiRef.current.getRowNode(visibleRowsSection[endIndex].id)) == null ? void 0 : _apiRef$current$getRo2.type) === 'skeletonRow';
18
19
  if (isStartingWithASkeletonRow && isEndingWithASkeletonRow) {
19
20
  isSkeletonSectionFound = true;
20
21
  }
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.16.0
2
+ * @mui/x-data-grid-pro v6.16.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY5NTkzODQwMDAwMA==";
3
+ var releaseInfo = "MTY5NzA1MDgwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -4,7 +4,7 @@ export interface GridGroupingColDefOverride<R extends GridValidRowModel = any> e
4
4
  * The field from which we want to apply the sorting and the filtering for the grouping column.
5
5
  * It is only useful when `props.rowGroupingColumnMode === "multiple"` to decide which grouping criteria should be used for sorting and filtering.
6
6
  * Do not have any effect when building the tree with the `props.treeData` feature.
7
- * @default: The sorting and filtering is applied based on the leaf field in any, otherwise based on top level grouping criteria.
7
+ * @default The sorting and filtering is applied based on the leaf field in any, otherwise based on top level grouping criteria.
8
8
  */
9
9
  mainGroupingCriteria?: string;
10
10
  /**
@@ -14,7 +14,7 @@ export interface GridGroupingColDefOverride<R extends GridValidRowModel = any> e
14
14
  leafField?: string;
15
15
  /**
16
16
  * If `true`, the grouping cells will not render the amount of descendants.
17
- * @default: false
17
+ * @default false
18
18
  */
19
19
  hideDescendantCount?: boolean;
20
20
  }
@@ -39,6 +39,13 @@ const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProp
39
39
  }))
40
40
  });
41
41
  });
42
+ /**
43
+ * Demos:
44
+ * - [DataGridPro](https://mui.com/x/react-data-grid/demo/)
45
+ *
46
+ * API:
47
+ * - [DataGridPro API](https://mui.com/x/api/data-grid/data-grid-pro/)
48
+ */
42
49
  export const DataGridPro = /*#__PURE__*/React.memo(DataGridProRaw);
43
50
  DataGridProRaw.propTypes = {
44
51
  // ----------------------------- Warning --------------------------------
@@ -878,7 +885,7 @@ DataGridProRaw.propTypes = {
878
885
  /**
879
886
  * If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
880
887
  * If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
881
- * @default: false
888
+ * @default false
882
889
  */
883
890
  unstable_ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({
884
891
  clipboardExport: PropTypes.bool,
@@ -129,6 +129,8 @@ function excludeOutliers(inputValues, factor) {
129
129
  }
130
130
  function extractColumnWidths(apiRef, options, columns) {
131
131
  const widthByField = {};
132
+ const root = apiRef.current.rootElementRef.current;
133
+ root.classList.add(gridClasses.autosizing);
132
134
  columns.forEach(column => {
133
135
  const cells = findGridCells(apiRef.current, column.field);
134
136
  const widths = cells.map(cell => {
@@ -139,7 +141,7 @@ function extractColumnWidths(apiRef, options, columns) {
139
141
  }
140
142
  const style = window.getComputedStyle(cell, null);
141
143
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
142
- const contentWidth = (cell.firstElementChild?.scrollWidth ?? -1) + 1;
144
+ const contentWidth = cell.firstElementChild?.getBoundingClientRect().width ?? 0;
143
145
  return paddingWidth + contentWidth;
144
146
  });
145
147
  const filteredWidths = options.includeOutliers ? widths : excludeOutliers(widths, options.outliersFactor);
@@ -163,6 +165,7 @@ function extractColumnWidths(apiRef, options, columns) {
163
165
  const maxContent = filteredWidths.length === 0 ? 0 : Math.max(...filteredWidths);
164
166
  widthByField[column.field] = clamp(maxContent, min, max);
165
167
  });
168
+ root.classList.remove(gridClasses.autosizing);
166
169
  return widthByField;
167
170
  }
168
171
  export const columnResizeStateInitializer = state => _extends({}, state, {
@@ -15,8 +15,8 @@ function findSkeletonRowsSection({
15
15
  let endIndex = visibleRowsSection.length - 1;
16
16
  let isSkeletonSectionFound = false;
17
17
  while (!isSkeletonSectionFound && firstRowIndex < lastRowIndex) {
18
- const isStartingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[startIndex].id).type === 'skeletonRow';
19
- const isEndingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[endIndex].id).type === 'skeletonRow';
18
+ const isStartingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[startIndex].id)?.type === 'skeletonRow';
19
+ const isEndingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[endIndex].id)?.type === 'skeletonRow';
20
20
  if (isStartingWithASkeletonRow && isEndingWithASkeletonRow) {
21
21
  isSkeletonSectionFound = true;
22
22
  }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.16.0
2
+ * @mui/x-data-grid-pro v6.16.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY5NTkzODQwMDAwMA==";
3
+ const releaseInfo = "MTY5NzA1MDgwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -47,8 +47,14 @@ const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProp
47
47
  }))
48
48
  });
49
49
  });
50
- const DataGridPro = /*#__PURE__*/React.memo(DataGridProRaw);
51
- exports.DataGridPro = DataGridPro;
50
+ /**
51
+ * Demos:
52
+ * - [DataGridPro](https://mui.com/x/react-data-grid/demo/)
53
+ *
54
+ * API:
55
+ * - [DataGridPro API](https://mui.com/x/api/data-grid/data-grid-pro/)
56
+ */
57
+ const DataGridPro = exports.DataGridPro = /*#__PURE__*/React.memo(DataGridProRaw);
52
58
  DataGridProRaw.propTypes = {
53
59
  // ----------------------------- Warning --------------------------------
54
60
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -887,7 +893,7 @@ DataGridProRaw.propTypes = {
887
893
  /**
888
894
  * If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
889
895
  * If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
890
- * @default: false
896
+ * @default false
891
897
  */
892
898
  unstable_ignoreValueFormatterDuringExport: _propTypes.default.oneOfType([_propTypes.default.shape({
893
899
  clipboardExport: _propTypes.default.bool,
@@ -16,7 +16,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
16
16
  /**
17
17
  * The default values of `DataGridProPropsWithDefaultValue` to inject in the props of DataGridPro.
18
18
  */
19
- const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = (0, _extends2.default)({}, _xDataGrid.DATA_GRID_PROPS_DEFAULT_VALUES, {
19
+ const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PRO_PROPS_DEFAULT_VALUES = (0, _extends2.default)({}, _xDataGrid.DATA_GRID_PROPS_DEFAULT_VALUES, {
20
20
  scrollEndThreshold: 80,
21
21
  treeData: false,
22
22
  defaultGroupingExpansionDepth: 0,
@@ -31,7 +31,6 @@ const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = (0, _extends2.default)({}, _xDataGrid
31
31
  getDetailPanelHeight: () => 500,
32
32
  unstable_headerFilters: false
33
33
  });
34
- exports.DATA_GRID_PRO_PROPS_DEFAULT_VALUES = DATA_GRID_PRO_PROPS_DEFAULT_VALUES;
35
34
  const defaultSlots = (0, _internals.uncapitalizeObjectKeys)(_dataGridProDefaultSlotsComponents.DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS);
36
35
  const useDataGridProProps = inProps => {
37
36
  const [components, componentsProps, themedProps] = (0, _internals.useProps)((0, _styles.useThemeProps)({
@@ -155,7 +155,7 @@ const VirtualScrollerPinnedRows = (0, _styles.styled)('div', {
155
155
  const VirtualScrollerPinnedRowsRenderZone = (0, _styles.styled)('div')({
156
156
  position: 'absolute'
157
157
  });
158
- const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGridProVirtualScroller(props, ref) {
158
+ const DataGridProVirtualScroller = exports.DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGridProVirtualScroller(props, ref) {
159
159
  const other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
160
160
  const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
161
161
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
@@ -439,5 +439,4 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
439
439
  })]
440
440
  }) : null]
441
441
  }));
442
- });
443
- exports.DataGridProVirtualScroller = DataGridProVirtualScroller;
442
+ });
@@ -84,7 +84,7 @@ GridColumnHeadersPinnedColumnHeaders.propTypes = {
84
84
  // ----------------------------------------------------------------------
85
85
  ownerState: _propTypes.default.object.isRequired
86
86
  };
87
- const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(props, ref) {
87
+ const GridColumnHeaders = exports.GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(props, ref) {
88
88
  const {
89
89
  className,
90
90
  innerRef,
@@ -243,7 +243,6 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
243
243
  }))]
244
244
  }));
245
245
  });
246
- exports.GridColumnHeaders = GridColumnHeaders;
247
246
  process.env.NODE_ENV !== "production" ? GridColumnHeaders.propTypes = {
248
247
  // ----------------------------- Warning --------------------------------
249
248
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -13,17 +13,15 @@ var _GridColumnMenuPinningItem = require("./GridColumnMenuPinningItem");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
- const GRID_COLUMN_MENU_SLOTS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOTS, {
16
+ const GRID_COLUMN_MENU_SLOTS_PRO = exports.GRID_COLUMN_MENU_SLOTS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOTS, {
17
17
  columnMenuPinningItem: _GridColumnMenuPinningItem.GridColumnMenuPinningItem
18
18
  });
19
- exports.GRID_COLUMN_MENU_SLOTS_PRO = GRID_COLUMN_MENU_SLOTS_PRO;
20
- const GRID_COLUMN_MENU_SLOT_PROPS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOT_PROPS, {
19
+ const GRID_COLUMN_MENU_SLOT_PROPS_PRO = exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOT_PROPS, {
21
20
  columnMenuPinningItem: {
22
21
  displayOrder: 15
23
22
  }
24
23
  });
25
- exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO = GRID_COLUMN_MENU_SLOT_PROPS_PRO;
26
- const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu(props, ref) {
24
+ const GridProColumnMenu = exports.GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu(props, ref) {
27
25
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridGenericColumnMenu, (0, _extends2.default)({
28
26
  ref: ref
29
27
  }, props, {
@@ -31,7 +29,6 @@ const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMe
31
29
  defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
32
30
  }));
33
31
  });
34
- exports.GridProColumnMenu = GridProColumnMenu;
35
32
  process.env.NODE_ENV !== "production" ? GridProColumnMenu.propTypes = {
36
33
  // ----------------------------- Warning --------------------------------
37
34
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -140,5 +140,4 @@ process.env.NODE_ENV !== "production" ? GridScrollAreaRaw.propTypes = {
140
140
  // ----------------------------------------------------------------------
141
141
  scrollDirection: _propTypes.default.oneOf(['left', 'right']).isRequired
142
142
  } : void 0;
143
- const GridScrollArea = /*#__PURE__*/React.memo(GridScrollAreaRaw);
144
- exports.GridScrollArea = GridScrollArea;
143
+ const GridScrollArea = exports.GridScrollArea = /*#__PURE__*/React.memo(GridScrollAreaRaw);
@@ -36,7 +36,7 @@ const dateSx = {
36
36
  color: 'transparent'
37
37
  }
38
38
  };
39
- const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
39
+ const GridHeaderFilterCell = exports.GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
40
40
  const {
41
41
  colIndex,
42
42
  height,
@@ -215,7 +215,6 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
215
215
  }) : null]
216
216
  }));
217
217
  });
218
- exports.GridHeaderFilterCell = GridHeaderFilterCell;
219
218
  process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
220
219
  // ----------------------------- Warning --------------------------------
221
220
  // | These PropTypes are generated from the TypeScript type definitions |
@@ -12,10 +12,9 @@ var _GridColumnHeaders = require("../components/GridColumnHeaders");
12
12
  var _GridHeaderFilterMenu = require("../components/headerFiltering/GridHeaderFilterMenu");
13
13
  var _GridHeaderFilterCell = require("../components/headerFiltering/GridHeaderFilterCell");
14
14
  var _material = _interopRequireDefault(require("../material"));
15
- const DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = (0, _extends2.default)({}, _internals.DATA_GRID_DEFAULT_SLOTS_COMPONENTS, _material.default, {
15
+ const DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = exports.DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = (0, _extends2.default)({}, _internals.DATA_GRID_DEFAULT_SLOTS_COMPONENTS, _material.default, {
16
16
  ColumnMenu: _GridProColumnMenu.GridProColumnMenu,
17
17
  ColumnHeaders: _GridColumnHeaders.GridColumnHeaders,
18
18
  HeaderFilterCell: _GridHeaderFilterCell.GridHeaderFilterCell,
19
19
  HeaderFilterMenu: _GridHeaderFilterMenu.GridHeaderFilterMenu
20
- });
21
- exports.DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS;
20
+ });
@@ -4,12 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.GridPinnedPosition = void 0;
7
- var GridPinnedPosition = /*#__PURE__*/function (GridPinnedPosition) {
7
+ var GridPinnedPosition = exports.GridPinnedPosition = /*#__PURE__*/function (GridPinnedPosition) {
8
8
  GridPinnedPosition["left"] = "left";
9
9
  GridPinnedPosition["right"] = "right";
10
10
  return GridPinnedPosition;
11
11
  }(GridPinnedPosition || {});
12
12
  /**
13
13
  * The column pinning API interface that is available in the grid [[apiRef]].
14
- */
15
- exports.GridPinnedPosition = GridPinnedPosition;
14
+ */
@@ -7,5 +7,4 @@ exports.gridColumnReorderSelector = exports.gridColumnReorderDragColSelector = v
7
7
  var _internals = require("@mui/x-data-grid/internals");
8
8
  const gridColumnReorderSelector = state => state.columnReorder;
9
9
  exports.gridColumnReorderSelector = gridColumnReorderSelector;
10
- const gridColumnReorderDragColSelector = (0, _internals.createSelector)(gridColumnReorderSelector, columnReorder => columnReorder.dragCol);
11
- exports.gridColumnReorderDragColSelector = gridColumnReorderDragColSelector;
10
+ const gridColumnReorderDragColSelector = exports.gridColumnReorderDragColSelector = (0, _internals.createSelector)(gridColumnReorderSelector, columnReorder => columnReorder.dragCol);
@@ -7,5 +7,4 @@ exports.gridResizingColumnFieldSelector = exports.gridColumnResizeSelector = voi
7
7
  var _internals = require("@mui/x-data-grid/internals");
8
8
  const gridColumnResizeSelector = state => state.columnResize;
9
9
  exports.gridColumnResizeSelector = gridColumnResizeSelector;
10
- const gridResizingColumnFieldSelector = (0, _internals.createSelector)(gridColumnResizeSelector, columnResize => columnResize.resizingColumnField);
11
- exports.gridResizingColumnFieldSelector = gridResizingColumnFieldSelector;
10
+ const gridResizingColumnFieldSelector = exports.gridResizingColumnFieldSelector = (0, _internals.createSelector)(gridColumnResizeSelector, columnResize => columnResize.resizingColumnField);
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_GRID_AUTOSIZE_OPTIONS = void 0;
7
- const DEFAULT_GRID_AUTOSIZE_OPTIONS = {
7
+ const DEFAULT_GRID_AUTOSIZE_OPTIONS = exports.DEFAULT_GRID_AUTOSIZE_OPTIONS = {
8
8
  includeHeaders: true,
9
9
  includeOutliers: false,
10
10
  outliersFactor: 1.5,
@@ -13,5 +13,4 @@ const DEFAULT_GRID_AUTOSIZE_OPTIONS = {
13
13
 
14
14
  /**
15
15
  * The Resize API interface that is available in the grid `apiRef`.
16
- */
17
- exports.DEFAULT_GRID_AUTOSIZE_OPTIONS = DEFAULT_GRID_AUTOSIZE_OPTIONS;
16
+ */
@@ -138,6 +138,8 @@ function excludeOutliers(inputValues, factor) {
138
138
  }
139
139
  function extractColumnWidths(apiRef, options, columns) {
140
140
  const widthByField = {};
141
+ const root = apiRef.current.rootElementRef.current;
142
+ root.classList.add(_xDataGrid.gridClasses.autosizing);
141
143
  columns.forEach(column => {
142
144
  const cells = (0, _domUtils.findGridCells)(apiRef.current, column.field);
143
145
  const widths = cells.map(cell => {
@@ -148,7 +150,7 @@ function extractColumnWidths(apiRef, options, columns) {
148
150
  }
149
151
  const style = window.getComputedStyle(cell, null);
150
152
  const paddingWidth = parseInt(style.paddingLeft, 10) + parseInt(style.paddingRight, 10);
151
- const contentWidth = (cell.firstElementChild?.scrollWidth ?? -1) + 1;
153
+ const contentWidth = cell.firstElementChild?.getBoundingClientRect().width ?? 0;
152
154
  return paddingWidth + contentWidth;
153
155
  });
154
156
  const filteredWidths = options.includeOutliers ? widths : excludeOutliers(widths, options.outliersFactor);
@@ -172,6 +174,7 @@ function extractColumnWidths(apiRef, options, columns) {
172
174
  const maxContent = filteredWidths.length === 0 ? 0 : Math.max(...filteredWidths);
173
175
  widthByField[column.field] = (0, _internals.clamp)(maxContent, min, max);
174
176
  });
177
+ root.classList.remove(_xDataGrid.gridClasses.autosizing);
175
178
  return widthByField;
176
179
  }
177
180
  const columnResizeStateInitializer = state => (0, _extends2.default)({}, state, {
@@ -13,10 +13,9 @@ const gridDetailPanelRawHeightCacheSelector = state => state.detailPanel.heightC
13
13
 
14
14
  // TODO v6: Make this selector return the full object, including the autoHeight flag
15
15
  exports.gridDetailPanelRawHeightCacheSelector = gridDetailPanelRawHeightCacheSelector;
16
- const gridDetailPanelExpandedRowsHeightCacheSelector = (0, _internals.createSelectorMemoized)(gridDetailPanelRawHeightCacheSelector, heightCache => Object.entries(heightCache).reduce((acc, [id, {
16
+ const gridDetailPanelExpandedRowsHeightCacheSelector = exports.gridDetailPanelExpandedRowsHeightCacheSelector = (0, _internals.createSelectorMemoized)(gridDetailPanelRawHeightCacheSelector, heightCache => Object.entries(heightCache).reduce((acc, [id, {
17
17
  height
18
18
  }]) => {
19
19
  acc[id] = height || 0;
20
20
  return acc;
21
- }, {}));
22
- exports.gridDetailPanelExpandedRowsHeightCacheSelector = gridDetailPanelExpandedRowsHeightCacheSelector;
21
+ }, {}));
@@ -13,9 +13,8 @@ var _gridDetailPanelSelector = require("./gridDetailPanelSelector");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
- const GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';
17
- exports.GRID_DETAIL_PANEL_TOGGLE_FIELD = GRID_DETAIL_PANEL_TOGGLE_FIELD;
18
- const GRID_DETAIL_PANEL_TOGGLE_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GRID_STRING_COL_DEF, {
16
+ const GRID_DETAIL_PANEL_TOGGLE_FIELD = exports.GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';
17
+ const GRID_DETAIL_PANEL_TOGGLE_COL_DEF = exports.GRID_DETAIL_PANEL_TOGGLE_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GRID_STRING_COL_DEF, {
19
18
  field: GRID_DETAIL_PANEL_TOGGLE_FIELD,
20
19
  type: 'detailPanelToggle',
21
20
  editable: false,
@@ -35,5 +34,4 @@ const GRID_DETAIL_PANEL_TOGGLE_COL_DEF = (0, _extends2.default)({}, _xDataGrid.G
35
34
  },
36
35
  renderCell: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridDetailPanelToggleCell.GridDetailPanelToggleCell, (0, _extends2.default)({}, params)),
37
36
  renderHeader: () => null
38
- });
39
- exports.GRID_DETAIL_PANEL_TOGGLE_COL_DEF = GRID_DETAIL_PANEL_TOGGLE_COL_DEF;
37
+ });
@@ -23,8 +23,8 @@ function findSkeletonRowsSection({
23
23
  let endIndex = visibleRowsSection.length - 1;
24
24
  let isSkeletonSectionFound = false;
25
25
  while (!isSkeletonSectionFound && firstRowIndex < lastRowIndex) {
26
- const isStartingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[startIndex].id).type === 'skeletonRow';
27
- const isEndingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[endIndex].id).type === 'skeletonRow';
26
+ const isStartingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[startIndex].id)?.type === 'skeletonRow';
27
+ const isEndingWithASkeletonRow = apiRef.current.getRowNode(visibleRowsSection[endIndex].id)?.type === 'skeletonRow';
28
28
  if (isStartingWithASkeletonRow && isEndingWithASkeletonRow) {
29
29
  isSkeletonSectionFound = true;
30
30
  }
@@ -11,8 +11,7 @@ var _internals = require("@mui/x-data-grid/internals");
11
11
  var _xDataGrid = require("@mui/x-data-grid");
12
12
  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); }
13
13
  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; }
14
- const GRID_SKELETON_ROW_ROOT_ID = 'auto-generated-skeleton-row-root';
15
- exports.GRID_SKELETON_ROW_ROOT_ID = GRID_SKELETON_ROW_ROOT_ID;
14
+ const GRID_SKELETON_ROW_ROOT_ID = exports.GRID_SKELETON_ROW_ROOT_ID = 'auto-generated-skeleton-row-root';
16
15
  const getSkeletonRowId = index => `${GRID_SKELETON_ROW_ROOT_ID}-${index}`;
17
16
  const useGridLazyLoaderPreProcessors = (privateApiRef, props) => {
18
17
  const {
@@ -8,7 +8,7 @@ exports.GRID_REORDER_COL_DEF = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _xDataGrid = require("@mui/x-data-grid");
10
10
  var _GridRowReorderCell = require("../../../components/GridRowReorderCell");
11
- const GRID_REORDER_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GRID_STRING_COL_DEF, {
11
+ const GRID_REORDER_COL_DEF = exports.GRID_REORDER_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GRID_STRING_COL_DEF, {
12
12
  field: '__reorder__',
13
13
  type: 'reorder',
14
14
  sortable: false,
@@ -24,5 +24,4 @@ const GRID_REORDER_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GRID_STRING_C
24
24
  aggregable: false,
25
25
  renderHeader: () => ' ',
26
26
  renderCell: _GridRowReorderCell.renderRowReorderCell
27
- });
28
- exports.GRID_REORDER_COL_DEF = GRID_REORDER_COL_DEF;
27
+ });
@@ -10,7 +10,7 @@ var _xDataGrid = require("@mui/x-data-grid");
10
10
  /**
11
11
  * TODO: Add sorting and filtering on the value and the filteredDescendantCount
12
12
  */
13
- const GRID_TREE_DATA_GROUPING_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GRID_STRING_COL_DEF, {
13
+ const GRID_TREE_DATA_GROUPING_COL_DEF = exports.GRID_TREE_DATA_GROUPING_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GRID_STRING_COL_DEF, {
14
14
  type: 'treeDataGroup',
15
15
  sortable: false,
16
16
  filterable: false,
@@ -20,12 +20,9 @@ const GRID_TREE_DATA_GROUPING_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GR
20
20
  width: 200,
21
21
  valueGetter: params => params.rowNode.type === 'group' ? params.rowNode.groupingKey : undefined
22
22
  });
23
- exports.GRID_TREE_DATA_GROUPING_COL_DEF = GRID_TREE_DATA_GROUPING_COL_DEF;
24
- const GRID_TREE_DATA_GROUPING_FIELD = '__tree_data_group__';
25
- exports.GRID_TREE_DATA_GROUPING_FIELD = GRID_TREE_DATA_GROUPING_FIELD;
26
- const GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = {
23
+ const GRID_TREE_DATA_GROUPING_FIELD = exports.GRID_TREE_DATA_GROUPING_FIELD = '__tree_data_group__';
24
+ const GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = exports.GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = {
27
25
  field: GRID_TREE_DATA_GROUPING_FIELD,
28
26
  editable: false,
29
27
  groupable: false
30
- };
31
- exports.GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES;
28
+ };
@@ -5,14 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.filterRowTreeFromTreeData = exports.TREE_DATA_STRATEGY = void 0;
7
7
  var _internals = require("@mui/x-data-grid/internals");
8
- const TREE_DATA_STRATEGY = 'tree-data';
8
+ const TREE_DATA_STRATEGY = exports.TREE_DATA_STRATEGY = 'tree-data';
9
9
 
10
10
  /**
11
11
  * A node is visible if one of the following criteria is met:
12
12
  * - One of its children is passing the filter
13
13
  * - It is passing the filter
14
14
  */
15
- exports.TREE_DATA_STRATEGY = TREE_DATA_STRATEGY;
16
15
  const filterRowTreeFromTreeData = params => {
17
16
  const {
18
17
  apiRef,
@@ -5,5 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useGridApiContext = void 0;
7
7
  var _xDataGrid = require("@mui/x-data-grid");
8
- const useGridApiContext = _xDataGrid.useGridApiContext;
9
- exports.useGridApiContext = useGridApiContext;
8
+ const useGridApiContext = exports.useGridApiContext = _xDataGrid.useGridApiContext;
@@ -5,5 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useGridApiRef = void 0;
7
7
  var _xDataGrid = require("@mui/x-data-grid");
8
- const useGridApiRef = _xDataGrid.useGridApiRef;
9
- exports.useGridApiRef = useGridApiRef;
8
+ const useGridApiRef = exports.useGridApiRef = _xDataGrid.useGridApiRef;
@@ -5,5 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useGridPrivateApiContext = void 0;
7
7
  var _internals = require("@mui/x-data-grid/internals");
8
- const useGridPrivateApiContext = _internals.useGridPrivateApiContext;
9
- exports.useGridPrivateApiContext = useGridPrivateApiContext;
8
+ const useGridPrivateApiContext = exports.useGridPrivateApiContext = _internals.useGridPrivateApiContext;
@@ -5,5 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useGridRootProps = void 0;
7
7
  var _xDataGrid = require("@mui/x-data-grid");
8
- const useGridRootProps = _xDataGrid.useGridRootProps;
9
- exports.useGridRootProps = useGridRootProps;
8
+ const useGridRootProps = exports.useGridRootProps = _xDataGrid.useGridRootProps;
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v6.16.0
2
+ * @mui/x-data-grid-pro v6.16.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -9,19 +9,17 @@ var _utils = require("@mui/material/utils");
9
9
  var _jsxRuntime = require("react/jsx-runtime");
10
10
  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); }
11
11
  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; }
12
- const GridPushPinRightIcon = (0, _utils.createSvgIcon)( /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
12
+ const GridPushPinRightIcon = exports.GridPushPinRightIcon = (0, _utils.createSvgIcon)( /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
13
13
  transform: "rotate(-30 15 10)",
14
14
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
15
15
  d: "M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",
16
16
  fillRule: "evenodd"
17
17
  })
18
18
  }), 'PushPinRight');
19
- exports.GridPushPinRightIcon = GridPushPinRightIcon;
20
- const GridPushPinLeftIcon = (0, _utils.createSvgIcon)( /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
19
+ const GridPushPinLeftIcon = exports.GridPushPinLeftIcon = (0, _utils.createSvgIcon)( /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
21
20
  transform: "rotate(30 8 12)",
22
21
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
23
22
  d: "M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",
24
23
  fillRule: "evenodd"
25
24
  })
26
- }), 'PushPinLeft');
27
- exports.GridPushPinLeftIcon = GridPushPinLeftIcon;
25
+ }), 'PushPinLeft');
@@ -12,5 +12,4 @@ const iconSlots = {
12
12
  ColumnMenuPinLeftIcon: _icons.GridPushPinLeftIcon
13
13
  };
14
14
  const materialSlots = (0, _extends2.default)({}, iconSlots);
15
- var _default = materialSlots;
16
- exports.default = _default;
15
+ var _default = exports.default = materialSlots;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTY5NTkzODQwMDAwMA==";
9
+ const releaseInfo = "MTY5NzA1MDgwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "6.16.0",
3
+ "version": "6.16.2",
4
4
  "description": "The Pro plan edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -31,9 +31,9 @@
31
31
  "directory": "packages/grid/x-data-grid-pro"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/runtime": "^7.22.15",
35
- "@mui/utils": "^5.14.8",
36
- "@mui/x-data-grid": "6.16.0",
34
+ "@babel/runtime": "^7.23.1",
35
+ "@mui/utils": "^5.14.11",
36
+ "@mui/x-data-grid": "6.16.2",
37
37
  "@mui/x-license-pro": "6.10.2",
38
38
  "@types/format-util": "^1.0.2",
39
39
  "clsx": "^2.0.0",
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY5NTkzODQwMDAwMA==";
3
+ const releaseInfo = "MTY5NzA1MDgwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat