@mui/x-data-grid 7.16.0 → 7.18.0
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.
- package/CHANGELOG.md +184 -4
- package/DataGrid/DataGrid.js +11 -1
- package/DataGrid/useDataGridComponent.js +3 -0
- package/DataGrid/useDataGridProps.js +2 -1
- package/colDef/gridStringOperators.js +49 -33
- package/components/GridRow.js +1 -0
- package/components/cell/GridCell.js +30 -5
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +2 -0
- package/components/columnHeaders/GridColumnHeaderItem.js +9 -2
- package/components/columnHeaders/GridColumnHeaderTitle.js +3 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -2
- package/components/containers/GridRootStyles.js +3 -7
- package/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/constants/gridClasses.d.ts +10 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +4 -0
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +0 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +17 -12
- package/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +4 -0
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/hooks/features/editing/useGridCellEditing.js +3 -19
- package/hooks/features/editing/useGridRowEditing.js +7 -2
- package/hooks/features/editing/utils.d.ts +2 -0
- package/hooks/features/editing/utils.js +15 -0
- package/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/hooks/features/export/useGridPrintExport.js +2 -1
- package/hooks/features/filter/gridFilterUtils.js +1 -1
- package/hooks/features/focus/useGridFocus.js +2 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +10 -46
- package/hooks/features/keyboardNavigation/utils.d.ts +17 -0
- package/hooks/features/keyboardNavigation/utils.js +58 -0
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +4 -0
- package/hooks/features/rows/gridRowSpanningSelectors.js +5 -0
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +10 -0
- package/hooks/features/rows/gridRowSpanningUtils.js +42 -0
- package/hooks/features/rows/useGridRowSpanning.d.ts +27 -0
- package/hooks/features/rows/useGridRowSpanning.js +257 -0
- package/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/hooks/utils/useGridApiEventHandler.js +0 -1
- package/hooks/utils/useGridSelector.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +1 -0
- package/internals/index.js +1 -0
- package/internals/utils/index.d.ts +0 -1
- package/internals/utils/index.js +1 -2
- package/internals/utils/propValidation.js +1 -1
- package/locales/arSD.js +4 -0
- package/locales/beBY.js +4 -0
- package/locales/bgBG.js +4 -0
- package/locales/csCZ.js +4 -0
- package/locales/daDK.js +4 -0
- package/locales/deDE.js +4 -0
- package/locales/elGR.js +4 -0
- package/locales/esES.js +4 -0
- package/locales/faIR.js +4 -0
- package/locales/fiFI.js +4 -0
- package/locales/frFR.js +4 -0
- package/locales/heIL.js +4 -0
- package/locales/hrHR.js +4 -0
- package/locales/huHU.js +11 -8
- package/locales/isIS.js +4 -0
- package/locales/itIT.js +4 -0
- package/locales/jaJP.js +4 -0
- package/locales/koKR.js +4 -0
- package/locales/nbNO.js +4 -0
- package/locales/nlNL.js +4 -0
- package/locales/nnNO.js +4 -0
- package/locales/plPL.js +4 -0
- package/locales/ptBR.js +4 -0
- package/locales/ptPT.js +4 -0
- package/locales/roRO.js +4 -0
- package/locales/ruRU.js +4 -0
- package/locales/skSK.js +4 -0
- package/locales/svSE.js +4 -0
- package/locales/trTR.js +4 -0
- package/locales/ukUA.js +4 -0
- package/locales/urPK.js +4 -0
- package/locales/viVN.js +4 -0
- package/locales/zhCN.js +4 -0
- package/locales/zhHK.js +4 -0
- package/locales/zhTW.js +4 -0
- package/models/api/gridLocaleTextApi.d.ts +4 -0
- package/models/colDef/gridColDef.d.ts +4 -0
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/props/DataGridProps.d.ts +10 -0
- package/modern/DataGrid/DataGrid.js +11 -1
- package/modern/DataGrid/useDataGridComponent.js +3 -0
- package/modern/DataGrid/useDataGridProps.js +2 -1
- package/modern/colDef/gridStringOperators.js +49 -33
- package/modern/components/GridRow.js +1 -0
- package/modern/components/cell/GridCell.js +30 -5
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +9 -2
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +3 -1
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -2
- package/modern/components/containers/GridRootStyles.js +3 -7
- package/modern/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +4 -0
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +17 -12
- package/modern/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/modern/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +3 -19
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -2
- package/modern/hooks/features/editing/utils.js +15 -0
- package/modern/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/modern/hooks/features/export/useGridPrintExport.js +2 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +1 -1
- package/modern/hooks/features/focus/useGridFocus.js +2 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +10 -46
- package/modern/hooks/features/keyboardNavigation/utils.js +58 -0
- package/modern/hooks/features/rows/gridRowSpanningSelectors.js +5 -0
- package/modern/hooks/features/rows/gridRowSpanningUtils.js +42 -0
- package/modern/hooks/features/rows/useGridRowSpanning.js +257 -0
- package/modern/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/modern/hooks/utils/useGridApiEventHandler.js +0 -1
- package/modern/hooks/utils/useGridSelector.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/internals/utils/index.js +1 -2
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/arSD.js +4 -0
- package/modern/locales/beBY.js +4 -0
- package/modern/locales/bgBG.js +4 -0
- package/modern/locales/csCZ.js +4 -0
- package/modern/locales/daDK.js +4 -0
- package/modern/locales/deDE.js +4 -0
- package/modern/locales/elGR.js +4 -0
- package/modern/locales/esES.js +4 -0
- package/modern/locales/faIR.js +4 -0
- package/modern/locales/fiFI.js +4 -0
- package/modern/locales/frFR.js +4 -0
- package/modern/locales/heIL.js +4 -0
- package/modern/locales/hrHR.js +4 -0
- package/modern/locales/huHU.js +11 -8
- package/modern/locales/isIS.js +4 -0
- package/modern/locales/itIT.js +4 -0
- package/modern/locales/jaJP.js +4 -0
- package/modern/locales/koKR.js +4 -0
- package/modern/locales/nbNO.js +4 -0
- package/modern/locales/nlNL.js +4 -0
- package/modern/locales/nnNO.js +4 -0
- package/modern/locales/plPL.js +4 -0
- package/modern/locales/ptBR.js +4 -0
- package/modern/locales/ptPT.js +4 -0
- package/modern/locales/roRO.js +4 -0
- package/modern/locales/ruRU.js +4 -0
- package/modern/locales/skSK.js +4 -0
- package/modern/locales/svSE.js +4 -0
- package/modern/locales/trTR.js +4 -0
- package/modern/locales/ukUA.js +4 -0
- package/modern/locales/urPK.js +4 -0
- package/modern/locales/viVN.js +4 -0
- package/modern/locales/zhCN.js +4 -0
- package/modern/locales/zhHK.js +4 -0
- package/modern/locales/zhTW.js +4 -0
- package/modern/utils/createSelector.js +1 -1
- package/modern/utils/domUtils.js +12 -12
- package/node/DataGrid/DataGrid.js +11 -1
- package/node/DataGrid/useDataGridComponent.js +3 -0
- package/node/DataGrid/useDataGridProps.js +2 -1
- package/node/colDef/gridStringOperators.js +49 -33
- package/node/components/GridRow.js +1 -0
- package/node/components/cell/GridCell.js +30 -5
- package/node/components/columnHeaders/GridColumnHeaderItem.js +9 -2
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +3 -1
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -2
- package/node/components/containers/GridRootStyles.js +3 -7
- package/node/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +4 -0
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +17 -12
- package/node/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/node/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/node/hooks/features/editing/useGridCellEditing.js +3 -19
- package/node/hooks/features/editing/useGridRowEditing.js +7 -2
- package/node/hooks/features/editing/utils.js +22 -0
- package/node/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/node/hooks/features/export/useGridPrintExport.js +2 -1
- package/node/hooks/features/filter/gridFilterUtils.js +1 -1
- package/node/hooks/features/focus/useGridFocus.js +2 -1
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +16 -53
- package/node/hooks/features/keyboardNavigation/utils.js +68 -0
- package/node/hooks/features/rows/gridRowSpanningSelectors.js +11 -0
- package/node/hooks/features/rows/gridRowSpanningUtils.js +52 -0
- package/node/hooks/features/rows/useGridRowSpanning.js +267 -0
- package/node/hooks/features/sorting/gridSortingUtils.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/node/hooks/utils/useGridApiEventHandler.js +0 -1
- package/node/hooks/utils/useGridSelector.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +15 -0
- package/node/internals/utils/index.js +0 -11
- package/node/internals/utils/propValidation.js +1 -1
- package/node/locales/arSD.js +4 -0
- package/node/locales/beBY.js +4 -0
- package/node/locales/bgBG.js +4 -0
- package/node/locales/csCZ.js +4 -0
- package/node/locales/daDK.js +4 -0
- package/node/locales/deDE.js +4 -0
- package/node/locales/elGR.js +4 -0
- package/node/locales/esES.js +4 -0
- package/node/locales/faIR.js +4 -0
- package/node/locales/fiFI.js +4 -0
- package/node/locales/frFR.js +4 -0
- package/node/locales/heIL.js +4 -0
- package/node/locales/hrHR.js +4 -0
- package/node/locales/huHU.js +11 -8
- package/node/locales/isIS.js +4 -0
- package/node/locales/itIT.js +4 -0
- package/node/locales/jaJP.js +4 -0
- package/node/locales/koKR.js +4 -0
- package/node/locales/nbNO.js +4 -0
- package/node/locales/nlNL.js +4 -0
- package/node/locales/nnNO.js +4 -0
- package/node/locales/plPL.js +4 -0
- package/node/locales/ptBR.js +4 -0
- package/node/locales/ptPT.js +4 -0
- package/node/locales/roRO.js +4 -0
- package/node/locales/ruRU.js +4 -0
- package/node/locales/skSK.js +4 -0
- package/node/locales/svSE.js +4 -0
- package/node/locales/trTR.js +4 -0
- package/node/locales/ukUA.js +4 -0
- package/node/locales/urPK.js +4 -0
- package/node/locales/viVN.js +4 -0
- package/node/locales/zhCN.js +4 -0
- package/node/locales/zhHK.js +4 -0
- package/node/locales/zhTW.js +4 -0
- package/node/utils/createSelector.js +1 -1
- package/node/utils/domUtils.js +12 -12
- package/package.json +3 -3
- package/utils/createSelector.js +1 -1
- package/utils/domUtils.d.ts +4 -4
- package/utils/domUtils.js +12 -12
- package/internals/utils/warning.d.ts +0 -2
- package/internals/utils/warning.js +0 -21
- package/modern/internals/utils/warning.js +0 -21
- package/node/internals/utils/warning.js +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,186 @@
|
|
|
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
|
+
## 7.18.0
|
|
7
|
+
|
|
8
|
+
_Sep 20, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 💫 Support [Row spanning](https://mui.com/x/react-data-grid/row-spanning/) on the Data Grid that automatically merges the consecutive cells in a column based on the cell value
|
|
13
|
+
|
|
14
|
+
<img width="600" src="https://github.com/user-attachments/assets/d32ec936-d238-4c92-9e1a-af6788d74cdf" alt="data grid row spanning" />
|
|
15
|
+
|
|
16
|
+
- ⏰ Support `date-fns` v4 (#14673) @LukasTy
|
|
17
|
+
- 🎉 Add option for Pickers to change the order of displayed years (#11780) @thomasmoon
|
|
18
|
+
- 🐞 Bugfixes
|
|
19
|
+
- 📚 Documentation improvements
|
|
20
|
+
|
|
21
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@7.18.0`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Add default reset value in row edit mode (#14050) @michelengelen
|
|
28
|
+
- [DataGrid] Add `columnGroupHeaderHeight` prop for sizing column group headers (#14637) @KenanYusuf
|
|
29
|
+
- [DataGrid] Fix `document` reference when the grid is rendered in a popup window (#14649) @arminmeh
|
|
30
|
+
- [DataGrid] Remove `minFirstColumn` from `GetHeadersParams` interface (#14450) @k-rajat19
|
|
31
|
+
- [DataGrid] Row spanning (#14124) @MBilalShafi
|
|
32
|
+
|
|
33
|
+
#### `@mui/x-data-grid-pro@7.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
34
|
+
|
|
35
|
+
Same changes as in `@mui/x-data-grid@7.18.0`, plus:
|
|
36
|
+
|
|
37
|
+
- [DataGridPro] Fix `onRowsScrollEnd` being triggered instantly when bottom pinned row is present (#14602) @arminmeh
|
|
38
|
+
- [DataGridPro] Fix header filters rendering issue for `isEmpty` and `isNotEmpty` filter operators (#14493) @k-rajat19
|
|
39
|
+
- [DataGridPro] Fix pinned columns in RTL mode (#14586) @KenanYusuf
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-data-grid-premium@7.18.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-data-grid-pro@7.18.0`.
|
|
44
|
+
|
|
45
|
+
### Date and Time Pickers
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-date-pickers@7.18.0`
|
|
48
|
+
|
|
49
|
+
- [pickers] Add option to change the order of displayed years (#11780) @thomasmoon
|
|
50
|
+
- [pickers] Support `date-fns` v4 (#14673) @LukasTy
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers-pro@7.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-date-pickers@7.18.0`.
|
|
55
|
+
|
|
56
|
+
### Charts
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-charts@7.18.0`
|
|
59
|
+
|
|
60
|
+
- [charts] Add a `PolarProvider` to manage polar axes (#14642) @alexfauquette
|
|
61
|
+
- [charts] Fix `LineChart` animation being stuck with initial drawing area value (#14553) @JCQuintas
|
|
62
|
+
- [charts] Fix legend slot typing (#14657) @alexfauquette
|
|
63
|
+
- [charts] Pass the axis index to extremum getter (#14641) @alexfauquette
|
|
64
|
+
- [charts] Provide hooks to create custom tooltip (#14377) @alexfauquette
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts-pro@7.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
|
+
|
|
68
|
+
Same changes as in `@mui/x-charts@7.18.0`.
|
|
69
|
+
|
|
70
|
+
### Tree View
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-tree-view@7.18.0`
|
|
73
|
+
|
|
74
|
+
- [TreeView] Add `"use client"` directive to every public component and hook (#14579) @flaviendelangle
|
|
75
|
+
|
|
76
|
+
### Docs
|
|
77
|
+
|
|
78
|
+
- [docs] Add `groupingValueGetter` callout in column definition docs (#14599) @michelengelen
|
|
79
|
+
- [docs] Clean v6 => v7 migration guide (#14652) @flaviendelangle
|
|
80
|
+
- [docs] Copy `vale-action.yml` from main repo @oliviertassinari
|
|
81
|
+
- [docs] Edit the Pickers Getting started doc (#14555) @samuelsycamore
|
|
82
|
+
- [docs] Fix TypeScript capitalization @oliviertassinari
|
|
83
|
+
- [docs] Fix Vale error @oliviertassinari
|
|
84
|
+
- [docs] Make the migration guide diff a bit easier to read @oliviertassinari
|
|
85
|
+
- [docs] Report Vale at warning level (#14660) @oliviertassinari
|
|
86
|
+
- [docs] Warn about the `valueGetter` and `valueFormatter` signature change (#14613) @cherniavskii
|
|
87
|
+
- [docs] Polish code formatting (#14603) @oliviertassinari
|
|
88
|
+
- [test] Spy on `observe` method to avoid flaky wait for a callback (#14640) @arminmeh
|
|
89
|
+
|
|
90
|
+
### Core
|
|
91
|
+
|
|
92
|
+
- [core] Fix 301 link to Next.js and git diff @oliviertassinari
|
|
93
|
+
- [core] Fix failing CI on `master` (#14644) @cherniavskii
|
|
94
|
+
- [core] Fix `package.json` repository rule @oliviertassinari
|
|
95
|
+
- [core] MUI X repository moved to a new location @oliviertassinari
|
|
96
|
+
- [docs-infra] Strengthen CSP (#14581) @oliviertassinari
|
|
97
|
+
- [license] Finish renaming of LicensingModel (#14615) @oliviertassinari
|
|
98
|
+
|
|
99
|
+
## 7.17.0
|
|
100
|
+
|
|
101
|
+
_Sep 13, 2024_
|
|
102
|
+
|
|
103
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
104
|
+
|
|
105
|
+
- 📊 Charts performance improvement
|
|
106
|
+
- 🧑💻 New Data Grid [custom columns demo](https://mui.com/x/react-data-grid/custom-columns/#full-example)
|
|
107
|
+
- 🐞 Bugfixes
|
|
108
|
+
- 📚 Documentation improvements
|
|
109
|
+
- 🌍 Improve Hungarian (hu-HU) locale on the Data Grid
|
|
110
|
+
|
|
111
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
112
|
+
|
|
113
|
+
### Data Grid
|
|
114
|
+
|
|
115
|
+
#### `@mui/x-data-grid@7.17.0`
|
|
116
|
+
|
|
117
|
+
- [DataGrid] Add "does not equal" and "does not contain" filter operators (#14489) @KenanYusuf
|
|
118
|
+
- [DataGrid] Add demo to the "Custom columns" page that does not use generator (#13695) @arminmeh
|
|
119
|
+
- [DataGrid] Fix Voice Over reading the column name twice (#14482) @arminmeh
|
|
120
|
+
- [DataGrid] Fix bug in CRUD example (#14513) @michelengelen
|
|
121
|
+
- [DataGrid] Fix failing jsdom tests caused by `:has()` selectors (#14559) @KenanYusuf
|
|
122
|
+
- [DataGrid] Refactor string operator filter functions (#14564) @KenanYusuf
|
|
123
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#14506) @ntamas
|
|
124
|
+
|
|
125
|
+
#### `@mui/x-data-grid-pro@7.17.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
126
|
+
|
|
127
|
+
Same changes as in `@mui/x-data-grid@7.17.0`.
|
|
128
|
+
|
|
129
|
+
#### `@mui/x-data-grid-premium@7.17.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
130
|
+
|
|
131
|
+
Same changes as in `@mui/x-data-grid-pro@7.17.0`.
|
|
132
|
+
|
|
133
|
+
### Date and Time Pickers
|
|
134
|
+
|
|
135
|
+
#### `@mui/x-date-pickers@7.17.0`
|
|
136
|
+
|
|
137
|
+
- [fields] Improve `useSplitFieldProps` and make it public (#14514) @flaviendelangle
|
|
138
|
+
- [pickers] Improve clear action label (#14243) @oliviertassinari
|
|
139
|
+
- [pickers] Add `"use client"` directive to every public component and hook (#14562) @flaviendelangle
|
|
140
|
+
- [pickers] Allow custom fields to validate the value (#14486) @flaviendelangle
|
|
141
|
+
- [pickers] Stop using utils in locales (#14505) @flaviendelangle
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-date-pickers-pro@7.17.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-date-pickers@7.17.0`, plus:
|
|
146
|
+
|
|
147
|
+
- [DateRangePicker] Fix `currentMonthCalendarPosition` not scrolling to future sibling (#14442) @GMchris
|
|
148
|
+
|
|
149
|
+
### Charts
|
|
150
|
+
|
|
151
|
+
#### `@mui/x-charts@7.17.0`
|
|
152
|
+
|
|
153
|
+
- [charts] Add `"use client"` directive to every public component and hook (#14578) @flaviendelangle
|
|
154
|
+
- [charts] Allow `onItemClick` on the `Legend` component (#14231) @JCQuintas
|
|
155
|
+
- [charts] Fix `onAxisClick` with `layout='horizontal'` (#14547) @alexfauquette
|
|
156
|
+
- [charts] Replace `path` with `circle` for performance improvement (#14518) @alexfauquette
|
|
157
|
+
|
|
158
|
+
#### `@mui/x-charts-pro@7.0.0-beta.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
159
|
+
|
|
160
|
+
Same changes as in `@mui/x-charts@7.17.0`.
|
|
161
|
+
|
|
162
|
+
### Tree View
|
|
163
|
+
|
|
164
|
+
#### `@mui/x-tree-view@7.17.0`
|
|
165
|
+
|
|
166
|
+
- [TreeView] Make `useTreeItem2` stable (#14498) @flaviendelangle
|
|
167
|
+
|
|
168
|
+
### Docs
|
|
169
|
+
|
|
170
|
+
- [docs] Add missing callout on "Imperative API" tree view sections (#14503) @flaviendelangle
|
|
171
|
+
- [docs] Fix broken redirection to MUI X v5 @oliviertassinari
|
|
172
|
+
- [docs] Fix multiple `console.error` messages on `charts` docs (#14554) @JCQuintas
|
|
173
|
+
- [docs] Fixed typo in Row Grouping recipes (#14549) @Miodini
|
|
174
|
+
- [docs] Match title with blog posts @oliviertassinari
|
|
175
|
+
|
|
176
|
+
### Core
|
|
177
|
+
|
|
178
|
+
- [core] Move warning methods to `@mui/x-internals` (#14528) @k-rajat19
|
|
179
|
+
- [core] Sync with core release flow @oliviertassinari
|
|
180
|
+
- [code-infra] Fix charts benchmark workflow (#14573) @JCQuintas
|
|
181
|
+
- [docs-infra] Type interface API pages (#14138) @alexfauquette
|
|
182
|
+
- [infra] Create `ESLint plugins` renovate group (#14574) @LukasTy
|
|
183
|
+
- [license] Clean-up terminology to match codebase (#14531) @oliviertassinari
|
|
184
|
+
- [test] Remove dead `act()` logic (#14529) @oliviertassinari
|
|
185
|
+
|
|
6
186
|
## 7.16.0
|
|
7
187
|
|
|
8
188
|
_Sep 5, 2024_
|
|
@@ -108,7 +288,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
108
288
|
|
|
109
289
|
- 💫 Support Material UI v6 (`@mui/material@6`) peer dependency (#14142) @cherniavskii
|
|
110
290
|
|
|
111
|
-
You can now use MUI
|
|
291
|
+
You can now use MUI X components with either v5 or v6 of `@mui/material` package 🎉
|
|
112
292
|
|
|
113
293
|
- 🐞 Bugfixes
|
|
114
294
|
|
|
@@ -153,7 +333,7 @@ Same changes as in `@mui/x-charts@7.15.0`, plus:
|
|
|
153
333
|
|
|
154
334
|
- [docs] Fix sentence case `h2` @oliviertassinari
|
|
155
335
|
- [docs] Clarify contribution guide references @oliviertassinari
|
|
156
|
-
- [docs] Fix Stack
|
|
336
|
+
- [docs] Fix Stack Overflow issue canned response @oliviertassinari
|
|
157
337
|
- [docs] Fix outdated link to support page @oliviertassinari
|
|
158
338
|
- [docs] Fix use of Material UI @oliviertassinari
|
|
159
339
|
- [docs] Update deprecated props in docs (#14295) @JCQuintas
|
|
@@ -411,7 +591,7 @@ The [Pro plan](https://mui.com/x/introduction/licensing/#pro-plan) is receiving
|
|
|
411
591
|
|
|
412
592
|
As always, every feature released as part of the MIT plan will remain free and MIT licensed forever.
|
|
413
593
|
|
|
414
|
-
This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI
|
|
594
|
+
This expansion of the Pro plan comes with some adjustments to our pricing strategy. Learn more about those in the [Upcoming changes to MUI X pricing in 2024](https://mui.com/blog/mui-x-sep-2024-price-update/) blog post.
|
|
415
595
|
|
|
416
596
|
### Highlights
|
|
417
597
|
|
|
@@ -476,7 +656,7 @@ Same changes as in `@mui/x-date-pickers@7.12.0`.
|
|
|
476
656
|
#### `@mui/x-charts@7.12.0`
|
|
477
657
|
|
|
478
658
|
- [charts] Fix incorrect `axisId` prop being allowed in xAxis/yAxis config. Use `id` instead. (#13986) @JCQuintas
|
|
479
|
-
- [charts] Use vendor to have
|
|
659
|
+
- [charts] Use vendor to have CommonJS bundle working out of the box (#13608) @alexfauquette
|
|
480
660
|
- [charts] Divide the `SeriesProvider` to use in filtering (#14026) @JCQuintas
|
|
481
661
|
|
|
482
662
|
### Tree View
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -118,6 +118,11 @@ DataGridRaw.propTypes = {
|
|
|
118
118
|
* @default 150
|
|
119
119
|
*/
|
|
120
120
|
columnBufferPx: PropTypes.number,
|
|
121
|
+
/**
|
|
122
|
+
* Sets the height in pixels of the column group headers in the Data Grid.
|
|
123
|
+
* Inherits the `columnHeaderHeight` value if not set.
|
|
124
|
+
*/
|
|
125
|
+
columnGroupHeaderHeight: PropTypes.number,
|
|
121
126
|
columnGroupingModel: PropTypes.arrayOf(PropTypes.object),
|
|
122
127
|
/**
|
|
123
128
|
* Sets the height in pixel of the column headers in the Data Grid.
|
|
@@ -743,5 +748,10 @@ DataGridRaw.propTypes = {
|
|
|
743
748
|
/**
|
|
744
749
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
745
750
|
*/
|
|
746
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
751
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
752
|
+
/**
|
|
753
|
+
* If `true`, the Data Grid will auto span the cells over the rows having the same value.
|
|
754
|
+
* @default false
|
|
755
|
+
*/
|
|
756
|
+
unstable_rowSpanning: PropTypes.bool
|
|
747
757
|
};
|
|
@@ -27,6 +27,7 @@ import { useGridColumnSpanning } from "../hooks/features/columns/useGridColumnSp
|
|
|
27
27
|
import { useGridColumnGrouping, columnGroupsStateInitializer } from "../hooks/features/columnGrouping/useGridColumnGrouping.js";
|
|
28
28
|
import { useGridVirtualization, virtualizationStateInitializer } from "../hooks/features/virtualization/index.js";
|
|
29
29
|
import { columnResizeStateInitializer, useGridColumnResize } from "../hooks/features/columnResize/useGridColumnResize.js";
|
|
30
|
+
import { rowSpanningStateInitializer, useGridRowSpanning } from "../hooks/features/rows/useGridRowSpanning.js";
|
|
30
31
|
export const useDataGridComponent = (inputApiRef, props) => {
|
|
31
32
|
const apiRef = useGridInitialization(inputApiRef, props);
|
|
32
33
|
|
|
@@ -48,6 +49,7 @@ export const useDataGridComponent = (inputApiRef, props) => {
|
|
|
48
49
|
useGridInitializeState(sortingStateInitializer, apiRef, props);
|
|
49
50
|
useGridInitializeState(preferencePanelStateInitializer, apiRef, props);
|
|
50
51
|
useGridInitializeState(filterStateInitializer, apiRef, props);
|
|
52
|
+
useGridInitializeState(rowSpanningStateInitializer, apiRef, props);
|
|
51
53
|
useGridInitializeState(densityStateInitializer, apiRef, props);
|
|
52
54
|
useGridInitializeState(columnResizeStateInitializer, apiRef, props);
|
|
53
55
|
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
@@ -59,6 +61,7 @@ export const useDataGridComponent = (inputApiRef, props) => {
|
|
|
59
61
|
useGridRowSelection(apiRef, props);
|
|
60
62
|
useGridColumns(apiRef, props);
|
|
61
63
|
useGridRows(apiRef, props);
|
|
64
|
+
useGridRowSpanning(apiRef, props);
|
|
62
65
|
useGridParamsApi(apiRef);
|
|
63
66
|
useGridColumnSpanning(apiRef);
|
|
64
67
|
useGridColumnGrouping(apiRef, props);
|
|
@@ -73,7 +73,8 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
73
73
|
showColumnVerticalBorder: false,
|
|
74
74
|
sortingMode: 'client',
|
|
75
75
|
sortingOrder: ['asc', 'desc', null],
|
|
76
|
-
throttleRowsMs: 0
|
|
76
|
+
throttleRowsMs: 0,
|
|
77
|
+
unstable_rowSpanning: false
|
|
77
78
|
};
|
|
78
79
|
const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
79
80
|
export const useDataGridProps = inProps => {
|
|
@@ -15,34 +15,58 @@ export const getGridStringQuickFilterFn = value => {
|
|
|
15
15
|
return columnValue != null ? filterRegex.test(columnValue.toString()) : false;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
+
const createContainsFilterFn = (disableTrim, negate) => filterItem => {
|
|
19
|
+
if (!filterItem.value) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const trimmedValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
|
23
|
+
const filterRegex = new RegExp(escapeRegExp(trimmedValue), 'i');
|
|
24
|
+
return value => {
|
|
25
|
+
if (value == null) {
|
|
26
|
+
return negate;
|
|
27
|
+
}
|
|
28
|
+
const matches = filterRegex.test(String(value));
|
|
29
|
+
return negate ? !matches : matches;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const createEqualityFilterFn = (disableTrim, negate) => filterItem => {
|
|
33
|
+
if (!filterItem.value) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const trimmedValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
|
37
|
+
const collator = new Intl.Collator(undefined, {
|
|
38
|
+
sensitivity: 'base',
|
|
39
|
+
usage: 'search'
|
|
40
|
+
});
|
|
41
|
+
return value => {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return negate;
|
|
44
|
+
}
|
|
45
|
+
const isEqual = collator.compare(trimmedValue, value.toString()) === 0;
|
|
46
|
+
return negate ? !isEqual : isEqual;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
const createEmptyFilterFn = negate => () => {
|
|
50
|
+
return value => {
|
|
51
|
+
const isEmpty = value === '' || value == null;
|
|
52
|
+
return negate ? !isEmpty : isEmpty;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
18
55
|
export const getGridStringOperators = (disableTrim = false) => [{
|
|
19
56
|
value: 'contains',
|
|
20
|
-
getApplyFilterFn:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const filterRegex = new RegExp(escapeRegExp(filterItemValue), 'i');
|
|
26
|
-
return value => {
|
|
27
|
-
return value != null ? filterRegex.test(String(value)) : false;
|
|
28
|
-
};
|
|
29
|
-
},
|
|
57
|
+
getApplyFilterFn: createContainsFilterFn(disableTrim, false),
|
|
58
|
+
InputComponent: GridFilterInputValue
|
|
59
|
+
}, {
|
|
60
|
+
value: 'doesNotContain',
|
|
61
|
+
getApplyFilterFn: createContainsFilterFn(disableTrim, true),
|
|
30
62
|
InputComponent: GridFilterInputValue
|
|
31
63
|
}, {
|
|
32
64
|
value: 'equals',
|
|
33
|
-
getApplyFilterFn:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const collator = new Intl.Collator(undefined, {
|
|
39
|
-
sensitivity: 'base',
|
|
40
|
-
usage: 'search'
|
|
41
|
-
});
|
|
42
|
-
return value => {
|
|
43
|
-
return value != null ? collator.compare(filterItemValue, value.toString()) === 0 : false;
|
|
44
|
-
};
|
|
45
|
-
},
|
|
65
|
+
getApplyFilterFn: createEqualityFilterFn(disableTrim, false),
|
|
66
|
+
InputComponent: GridFilterInputValue
|
|
67
|
+
}, {
|
|
68
|
+
value: 'doesNotEqual',
|
|
69
|
+
getApplyFilterFn: createEqualityFilterFn(disableTrim, true),
|
|
46
70
|
InputComponent: GridFilterInputValue
|
|
47
71
|
}, {
|
|
48
72
|
value: 'startsWith',
|
|
@@ -72,19 +96,11 @@ export const getGridStringOperators = (disableTrim = false) => [{
|
|
|
72
96
|
InputComponent: GridFilterInputValue
|
|
73
97
|
}, {
|
|
74
98
|
value: 'isEmpty',
|
|
75
|
-
getApplyFilterFn: ()
|
|
76
|
-
return value => {
|
|
77
|
-
return value === '' || value == null;
|
|
78
|
-
};
|
|
79
|
-
},
|
|
99
|
+
getApplyFilterFn: createEmptyFilterFn(false),
|
|
80
100
|
requiresFilterValue: false
|
|
81
101
|
}, {
|
|
82
102
|
value: 'isNotEmpty',
|
|
83
|
-
getApplyFilterFn: ()
|
|
84
|
-
return value => {
|
|
85
|
-
return value !== '' && value != null;
|
|
86
|
-
};
|
|
87
|
-
},
|
|
103
|
+
getApplyFilterFn: createEmptyFilterFn(true),
|
|
88
104
|
requiresFilterValue: false
|
|
89
105
|
}, {
|
|
90
106
|
value: 'isAnyOf',
|
package/components/GridRow.js
CHANGED
|
@@ -338,6 +338,7 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
338
338
|
height: PropTypes.number.isRequired,
|
|
339
339
|
width: PropTypes.number.isRequired
|
|
340
340
|
}).isRequired,
|
|
341
|
+
groupHeaderHeight: PropTypes.number.isRequired,
|
|
341
342
|
hasScrollX: PropTypes.bool.isRequired,
|
|
342
343
|
hasScrollY: PropTypes.bool.isRequired,
|
|
343
344
|
headerFilterHeight: PropTypes.number.isRequired,
|
|
@@ -7,6 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_ownerDocument as ownerDocument, unstable_capitalize as capitalize } from '@mui/utils';
|
|
9
9
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
10
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
10
11
|
import { doesSupportPreventScroll } from "../../utils/doesSupportPreventScroll.js";
|
|
11
12
|
import { getDataGridUtilityClass, gridClasses } from "../../constants/gridClasses.js";
|
|
12
13
|
import { GridCellModes } from "../../models/index.js";
|
|
@@ -17,6 +18,7 @@ import { gridFocusCellSelector } from "../../hooks/features/focus/gridFocusState
|
|
|
17
18
|
import { MissingRowIdError } from "../../hooks/features/rows/useGridParamsApi.js";
|
|
18
19
|
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../../utils/cellBorderUtils.js";
|
|
19
20
|
import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.js";
|
|
21
|
+
import { gridRowSpanningHiddenCellsSelector, gridRowSpanningSpannedCellsSelector } from "../../hooks/features/rows/gridRowSpanningSelectors.js";
|
|
20
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
23
|
export let PinnedPosition = /*#__PURE__*/function (PinnedPosition) {
|
|
22
24
|
PinnedPosition[PinnedPosition["NONE"] = 0] = "NONE";
|
|
@@ -106,6 +108,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
106
108
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
107
109
|
const apiRef = useGridApiContext();
|
|
108
110
|
const rootProps = useGridRootProps();
|
|
111
|
+
const isRtl = useRtl();
|
|
109
112
|
const field = column.field;
|
|
110
113
|
const cellParams = useGridSelector(apiRef, () => {
|
|
111
114
|
// This is required because `.getCellParams` tries to get the `state.rows.tree` entry
|
|
@@ -126,6 +129,8 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
126
129
|
id: rowId,
|
|
127
130
|
field
|
|
128
131
|
}));
|
|
132
|
+
const hiddenCells = useGridSelector(apiRef, gridRowSpanningHiddenCellsSelector);
|
|
133
|
+
const spannedCells = useGridSelector(apiRef, gridRowSpanningSpannedCellsSelector);
|
|
129
134
|
const {
|
|
130
135
|
cellMode,
|
|
131
136
|
hasFocus,
|
|
@@ -198,6 +203,8 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
198
203
|
propHandler(event);
|
|
199
204
|
}
|
|
200
205
|
}, [apiRef, field, rowId]);
|
|
206
|
+
const isCellRowSpanned = hiddenCells[rowId]?.[field] ?? false;
|
|
207
|
+
const rowSpan = spannedCells[rowId]?.[field] ?? 1;
|
|
201
208
|
const style = React.useMemo(() => {
|
|
202
209
|
if (isNotVisible) {
|
|
203
210
|
return {
|
|
@@ -210,14 +217,21 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
210
217
|
const cellStyle = _extends({
|
|
211
218
|
'--width': `${width}px`
|
|
212
219
|
}, styleProp);
|
|
213
|
-
|
|
214
|
-
|
|
220
|
+
const isLeftPinned = pinnedPosition === PinnedPosition.LEFT;
|
|
221
|
+
const isRightPinned = pinnedPosition === PinnedPosition.RIGHT;
|
|
222
|
+
if (isLeftPinned || isRightPinned) {
|
|
223
|
+
let side = isLeftPinned ? 'left' : 'right';
|
|
224
|
+
if (isRtl) {
|
|
225
|
+
side = isLeftPinned ? 'right' : 'left';
|
|
226
|
+
}
|
|
227
|
+
cellStyle[side] = pinnedOffset;
|
|
215
228
|
}
|
|
216
|
-
if (
|
|
217
|
-
cellStyle.
|
|
229
|
+
if (rowSpan > 1) {
|
|
230
|
+
cellStyle.height = `calc(var(--height) * ${rowSpan})`;
|
|
231
|
+
cellStyle.zIndex = 5;
|
|
218
232
|
}
|
|
219
233
|
return cellStyle;
|
|
220
|
-
}, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition]);
|
|
234
|
+
}, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition, isRtl, rowSpan]);
|
|
221
235
|
React.useEffect(() => {
|
|
222
236
|
if (!hasFocus || cellMode === GridCellModes.Edit) {
|
|
223
237
|
return;
|
|
@@ -237,6 +251,16 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
237
251
|
}
|
|
238
252
|
}
|
|
239
253
|
}, [hasFocus, cellMode, apiRef]);
|
|
254
|
+
if (isCellRowSpanned) {
|
|
255
|
+
return /*#__PURE__*/_jsx("div", {
|
|
256
|
+
"data-colindex": colIndex,
|
|
257
|
+
role: "presentation",
|
|
258
|
+
style: _extends({}, style, {
|
|
259
|
+
minWidth: 'var(--width)',
|
|
260
|
+
maxWidth: 'var(--width)'
|
|
261
|
+
})
|
|
262
|
+
});
|
|
263
|
+
}
|
|
240
264
|
if (cellParams === EMPTY_CELL_PARAMS) {
|
|
241
265
|
return null;
|
|
242
266
|
}
|
|
@@ -297,6 +321,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
297
321
|
"data-colindex": colIndex,
|
|
298
322
|
"aria-colindex": colIndex + 1,
|
|
299
323
|
"aria-colspan": colSpan,
|
|
324
|
+
"aria-rowspan": rowSpan,
|
|
300
325
|
style: style,
|
|
301
326
|
title: title,
|
|
302
327
|
tabIndex: tabIndex,
|
|
@@ -23,6 +23,8 @@ interface GridColumnHeaderItemProps {
|
|
|
23
23
|
indexInSection: number;
|
|
24
24
|
sectionLength: number;
|
|
25
25
|
gridHasFiller: boolean;
|
|
26
|
+
isLastUnpinned: boolean;
|
|
27
|
+
isSiblingFocused: boolean;
|
|
26
28
|
}
|
|
27
29
|
declare function GridColumnHeaderItem(props: GridColumnHeaderItemProps): React.JSX.Element;
|
|
28
30
|
declare namespace GridColumnHeaderItem {
|
|
@@ -22,14 +22,19 @@ const useUtilityClasses = ownerState => {
|
|
|
22
22
|
showRightBorder,
|
|
23
23
|
showLeftBorder,
|
|
24
24
|
filterItemsCounter,
|
|
25
|
-
pinnedPosition
|
|
25
|
+
pinnedPosition,
|
|
26
|
+
isLastUnpinned,
|
|
27
|
+
isSiblingFocused
|
|
26
28
|
} = ownerState;
|
|
27
29
|
const isColumnSorted = sortDirection != null;
|
|
28
30
|
const isColumnFiltered = filterItemsCounter != null && filterItemsCounter > 0;
|
|
29
31
|
// todo refactor to a prop on col isNumeric or ?? ie: coltype===price wont work
|
|
30
32
|
const isColumnNumeric = colDef.type === 'number';
|
|
31
33
|
const slots = {
|
|
32
|
-
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', colDef.sortable && 'columnHeader--sortable', isDragging && 'columnHeader--moving', isColumnSorted && 'columnHeader--sorted', isColumnFiltered && 'columnHeader--filtered', isColumnNumeric && 'columnHeader--numeric', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === 'right' && 'columnHeader--pinnedRight'
|
|
34
|
+
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', colDef.sortable && 'columnHeader--sortable', isDragging && 'columnHeader--moving', isColumnSorted && 'columnHeader--sorted', isColumnFiltered && 'columnHeader--filtered', isColumnNumeric && 'columnHeader--numeric', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === 'left' && 'columnHeader--pinnedLeft', pinnedPosition === 'right' && 'columnHeader--pinnedRight',
|
|
35
|
+
// TODO: Remove classes below and restore `:has` selectors when they are supported in jsdom
|
|
36
|
+
// See https://github.com/mui/mui-x/pull/14559
|
|
37
|
+
isLastUnpinned && 'columnHeader--lastUnpinned', isSiblingFocused && 'columnHeader--siblingFocused'],
|
|
33
38
|
draggableContainer: ['columnHeaderDraggableContainer'],
|
|
34
39
|
titleContainer: ['columnHeaderTitleContainer'],
|
|
35
40
|
titleContainerContent: ['columnHeaderTitleContainerContent']
|
|
@@ -209,7 +214,9 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes = {
|
|
|
209
214
|
indexInSection: PropTypes.number.isRequired,
|
|
210
215
|
isDragging: PropTypes.bool.isRequired,
|
|
211
216
|
isLast: PropTypes.bool.isRequired,
|
|
217
|
+
isLastUnpinned: PropTypes.bool.isRequired,
|
|
212
218
|
isResizing: PropTypes.bool.isRequired,
|
|
219
|
+
isSiblingFocused: PropTypes.bool.isRequired,
|
|
213
220
|
pinnedPosition: PropTypes.oneOf(['left', 'right']),
|
|
214
221
|
sectionLength: PropTypes.number.isRequired,
|
|
215
222
|
separatorSide: PropTypes.oneOf(['left', 'right']),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["className"];
|
|
3
|
+
const _excluded = ["className", "aria-label"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -31,6 +31,8 @@ const GridColumnHeaderTitleRoot = styled('div', {
|
|
|
31
31
|
lineHeight: 'normal'
|
|
32
32
|
});
|
|
33
33
|
const ColumnHeaderInnerTitle = /*#__PURE__*/React.forwardRef(function ColumnHeaderInnerTitle(props, ref) {
|
|
34
|
+
// Tooltip adds aria-label to the props, which is not needed since the children prop is a string
|
|
35
|
+
// See https://github.com/mui/mui-x/pull/14482
|
|
34
36
|
const {
|
|
35
37
|
className
|
|
36
38
|
} = props,
|
|
@@ -63,8 +63,7 @@ const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridG
|
|
|
63
63
|
role: "columnheader",
|
|
64
64
|
tabIndex: tabIndex,
|
|
65
65
|
"aria-colindex": colIndex + 1,
|
|
66
|
-
"aria-sort": ariaSort
|
|
67
|
-
"aria-label": headerComponent == null ? label : undefined
|
|
66
|
+
"aria-sort": ariaSort
|
|
68
67
|
}, other, {
|
|
69
68
|
children: [/*#__PURE__*/_jsxs("div", _extends({
|
|
70
69
|
className: classes.draggableContainer,
|
|
@@ -280,12 +280,10 @@ export const GridRootStyles = styled('div', {
|
|
|
280
280
|
// - the column has a left or right border
|
|
281
281
|
// - the next column is pinned right and has a left border
|
|
282
282
|
[`& .${c.columnHeader}:focus,
|
|
283
|
-
& .${c.columnHeader}:focus-within,
|
|
284
|
-
& .${c.columnHeader}:has(+ .${c.columnHeader}:focus),
|
|
285
|
-
& .${c.columnHeader}:has(+ .${c.columnHeader}:focus-within),
|
|
286
283
|
& .${c['columnHeader--withLeftBorder']},
|
|
287
284
|
& .${c['columnHeader--withRightBorder']},
|
|
288
|
-
& .${c
|
|
285
|
+
& .${c['columnHeader--siblingFocused']},
|
|
286
|
+
& .${c['virtualScroller--hasScrollX']} .${c['columnHeader--lastUnpinned']},
|
|
289
287
|
& .${c['virtualScroller--hasScrollX']} .${c['columnHeader--last']}
|
|
290
288
|
`]: {
|
|
291
289
|
[`& .${c.columnSeparator}`]: {
|
|
@@ -400,9 +398,7 @@ export const GridRootStyles = styled('div', {
|
|
|
400
398
|
'@media (hover: none)': {
|
|
401
399
|
[`& .${c.columnHeader}`]: columnHeaderStyles,
|
|
402
400
|
[`& .${c.columnHeader}:focus,
|
|
403
|
-
& .${c
|
|
404
|
-
& .${c.columnHeader}:has(+ .${c.columnHeader}:focus),
|
|
405
|
-
& .${c.columnHeader}:has(+ .${c.columnHeader}:focus-within)`]: {
|
|
401
|
+
& .${c['columnHeader--siblingFocused']}`]: {
|
|
406
402
|
[`.${c['columnSeparator--resizable']}`]: {
|
|
407
403
|
color: (t.vars || t).palette.primary.main
|
|
408
404
|
}
|
|
@@ -74,7 +74,7 @@ const FilterFormOperatorInput = styled('div', {
|
|
|
74
74
|
slot: 'FilterFormOperatorInput',
|
|
75
75
|
overridesResolver: (_, styles) => styles.filterFormOperatorInput
|
|
76
76
|
})({
|
|
77
|
-
width:
|
|
77
|
+
width: 150
|
|
78
78
|
});
|
|
79
79
|
const FilterFormValueInput = styled('div', {
|
|
80
80
|
name: 'MuiDataGrid',
|
|
@@ -158,6 +158,16 @@ export interface GridClasses {
|
|
|
158
158
|
* Styles applied to the last column header element.
|
|
159
159
|
*/
|
|
160
160
|
'columnHeader--last': string;
|
|
161
|
+
/**
|
|
162
|
+
* Styles applied to the last unpinned column header item.
|
|
163
|
+
* @ignore - do not document.
|
|
164
|
+
*/
|
|
165
|
+
'columnHeader--lastUnpinned': string;
|
|
166
|
+
/**
|
|
167
|
+
* Styles applied to a column header item when its sibling with a bordering separator is focused.
|
|
168
|
+
* @ignore - do not document.
|
|
169
|
+
*/
|
|
170
|
+
'columnHeader--siblingFocused': string;
|
|
161
171
|
/**
|
|
162
172
|
* Styles applied to the header checkbox cell element.
|
|
163
173
|
*/
|
package/constants/gridClasses.js
CHANGED
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
|
|
|
2
2
|
export function getDataGridUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
4
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
5
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|