@mui/x-data-grid 5.12.1 → 5.13.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 +155 -8
- package/DataGrid/DataGrid.js +4 -4
- package/colDef/gridCheckboxSelectionColDef.d.ts +1 -0
- package/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/colDef/gridDateOperators.d.ts +1 -1
- package/colDef/gridNumericColDef.js +1 -1
- package/colDef/gridStringOperators.d.ts +1 -1
- package/colDef/gridStringOperators.js +11 -6
- package/components/GridRow.js +1 -1
- package/components/cell/GridActionsCellItem.d.ts +2 -2
- package/components/cell/GridBooleanCell.js +4 -3
- package/components/cell/GridEditBooleanCell.js +4 -3
- package/components/cell/GridEditDateCell.js +4 -3
- package/components/cell/GridEditInputCell.js +4 -3
- package/components/cell/GridEditSingleSelectCell.js +9 -7
- package/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/components/containers/GridRootStyles.js +1 -1
- package/components/panel/GridColumnsPanel.js +3 -6
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +11 -4
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +4 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +5 -9
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +42 -19
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -7
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +32 -14
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +6 -3
- package/components/panel/filterPanel/GridFilterPanel.js +1 -2
- package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/constants/localeTextConstants.js +1 -0
- package/hooks/features/columns/useGridColumnSpanning.d.ts +1 -1
- package/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
- package/hooks/features/dimensions/useGridDimensions.js +37 -23
- package/hooks/features/editRows/useGridCellEditing.new.js +6 -0
- package/hooks/features/editRows/useGridCellEditing.old.js +6 -0
- package/hooks/features/editRows/useGridRowEditing.new.js +6 -0
- package/hooks/features/editRows/useGridRowEditing.old.js +6 -0
- package/hooks/features/filter/gridFilterState.d.ts +1 -1
- package/hooks/features/filter/gridFilterUtils.js +8 -5
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/rows/useGridRows.js +16 -3
- package/hooks/features/rows/useGridRowsMeta.js +79 -77
- package/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
- package/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/hooks/utils/useGridApiContext.js +1 -1
- package/hooks/utils/useGridRootProps.js +1 -1
- package/index.js +1 -1
- package/legacy/DataGrid/DataGrid.js +4 -4
- package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/legacy/colDef/gridNumericColDef.js +1 -1
- package/legacy/colDef/gridStringOperators.js +13 -5
- package/legacy/components/GridRow.js +1 -1
- package/legacy/components/cell/GridBooleanCell.js +3 -1
- package/legacy/components/cell/GridEditBooleanCell.js +4 -2
- package/legacy/components/cell/GridEditDateCell.js +4 -2
- package/legacy/components/cell/GridEditInputCell.js +4 -2
- package/legacy/components/cell/GridEditSingleSelectCell.js +9 -7
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/legacy/components/containers/GridRootStyles.js +1 -1
- package/legacy/components/panel/GridColumnsPanel.js +5 -6
- package/legacy/components/panel/filterPanel/GridFilterForm.js +9 -4
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +4 -2
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +34 -12
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +24 -7
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -2
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/legacy/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/legacy/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/legacy/constants/localeTextConstants.js +1 -0
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/legacy/hooks/features/dimensions/useGridDimensions.js +36 -23
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +6 -0
- package/legacy/hooks/features/editRows/useGridCellEditing.old.js +16 -8
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +6 -0
- package/legacy/hooks/features/editRows/useGridRowEditing.old.js +22 -14
- package/legacy/hooks/features/filter/gridFilterUtils.js +8 -5
- package/legacy/hooks/features/rows/useGridRows.js +18 -3
- package/legacy/hooks/features/rows/useGridRowsMeta.js +81 -77
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
- package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/legacy/hooks/utils/useGridApiContext.js +1 -1
- package/legacy/hooks/utils/useGridRootProps.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/locales/arSD.js +1 -0
- package/legacy/locales/bgBG.js +1 -0
- package/legacy/locales/csCZ.js +1 -0
- package/legacy/locales/daDK.js +1 -0
- package/legacy/locales/deDE.js +1 -0
- package/legacy/locales/elGR.js +1 -0
- package/legacy/locales/esES.js +1 -0
- package/legacy/locales/faIR.js +1 -0
- package/legacy/locales/fiFI.js +1 -0
- package/legacy/locales/frFR.js +1 -0
- package/legacy/locales/heIL.js +1 -0
- package/legacy/locales/huHU.js +1 -0
- package/legacy/locales/index.js +3 -0
- package/legacy/locales/itIT.js +1 -0
- package/legacy/locales/jaJP.js +1 -0
- package/legacy/locales/koKR.js +1 -0
- package/legacy/locales/nbNO.js +1 -0
- package/legacy/locales/nlNL.js +1 -0
- package/legacy/locales/plPL.js +1 -0
- package/legacy/locales/ptBR.js +1 -0
- package/legacy/locales/roRO.js +128 -0
- package/legacy/locales/ruRU.js +1 -0
- package/legacy/locales/skSK.js +16 -15
- package/legacy/locales/svSE.js +128 -0
- package/legacy/locales/trTR.js +1 -0
- package/legacy/locales/ukUA.js +1 -0
- package/legacy/locales/viVN.js +1 -0
- package/legacy/locales/zhCN.js +1 -0
- package/legacy/utils/keyboardUtils.js +4 -3
- package/locales/arSD.js +1 -0
- package/locales/bgBG.js +1 -0
- package/locales/csCZ.js +1 -0
- package/locales/daDK.js +1 -0
- package/locales/deDE.js +1 -0
- package/locales/elGR.js +1 -0
- package/locales/esES.js +1 -0
- package/locales/faIR.js +1 -0
- package/locales/fiFI.js +1 -0
- package/locales/frFR.js +1 -0
- package/locales/heIL.js +1 -0
- package/locales/huHU.js +1 -0
- package/locales/index.d.ts +3 -0
- package/locales/index.js +3 -0
- package/locales/itIT.js +1 -0
- package/locales/jaJP.js +1 -0
- package/locales/koKR.js +1 -0
- package/locales/nbNO.js +1 -0
- package/locales/nlNL.js +1 -0
- package/locales/plPL.js +1 -0
- package/locales/ptBR.js +1 -0
- package/locales/roRO.d.ts +2 -0
- package/locales/roRO.js +116 -0
- package/locales/ruRU.js +1 -0
- package/locales/skSK.js +16 -15
- package/locales/svSE.d.ts +2 -0
- package/locales/svSE.js +116 -0
- package/locales/trTR.js +1 -0
- package/locales/ukUA.js +1 -0
- package/locales/viVN.js +1 -0
- package/locales/zhCN.js +1 -0
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/colDef/gridColDef.d.ts +1 -1
- package/modern/DataGrid/DataGrid.js +4 -4
- package/modern/colDef/gridCheckboxSelectionColDef.js +2 -1
- package/modern/colDef/gridNumericColDef.js +1 -1
- package/modern/colDef/gridStringOperators.js +11 -6
- package/modern/components/GridRow.js +1 -1
- package/modern/components/cell/GridBooleanCell.js +4 -3
- package/modern/components/cell/GridEditBooleanCell.js +4 -3
- package/modern/components/cell/GridEditDateCell.js +4 -3
- package/modern/components/cell/GridEditInputCell.js +4 -3
- package/modern/components/cell/GridEditSingleSelectCell.js +9 -7
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/modern/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/modern/components/containers/GridRootStyles.js +1 -1
- package/modern/components/panel/GridColumnsPanel.js +3 -6
- package/modern/components/panel/filterPanel/GridFilterForm.js +11 -4
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +4 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +32 -13
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +22 -8
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -2
- package/modern/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/modern/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/modern/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/modern/constants/localeTextConstants.js +1 -0
- package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +37 -23
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +6 -0
- package/modern/hooks/features/editRows/useGridCellEditing.old.js +6 -0
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +6 -0
- package/modern/hooks/features/editRows/useGridRowEditing.old.js +6 -0
- package/modern/hooks/features/filter/gridFilterUtils.js +8 -5
- package/modern/hooks/features/rows/useGridRows.js +16 -3
- package/modern/hooks/features/rows/useGridRowsMeta.js +77 -75
- package/modern/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
- package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
- package/modern/hooks/utils/useGridApiContext.js +1 -1
- package/modern/hooks/utils/useGridRootProps.js +1 -1
- package/modern/index.js +1 -1
- package/modern/locales/arSD.js +1 -0
- package/modern/locales/bgBG.js +1 -0
- package/modern/locales/csCZ.js +1 -0
- package/modern/locales/daDK.js +1 -0
- package/modern/locales/deDE.js +1 -0
- package/modern/locales/elGR.js +1 -0
- package/modern/locales/esES.js +1 -0
- package/modern/locales/faIR.js +1 -0
- package/modern/locales/fiFI.js +1 -0
- package/modern/locales/frFR.js +1 -0
- package/modern/locales/heIL.js +1 -0
- package/modern/locales/huHU.js +1 -0
- package/modern/locales/index.js +3 -0
- package/modern/locales/itIT.js +1 -0
- package/modern/locales/jaJP.js +1 -0
- package/modern/locales/koKR.js +1 -0
- package/modern/locales/nbNO.js +1 -0
- package/modern/locales/nlNL.js +1 -0
- package/modern/locales/plPL.js +1 -0
- package/modern/locales/ptBR.js +1 -0
- package/modern/locales/roRO.js +116 -0
- package/modern/locales/ruRU.js +1 -0
- package/modern/locales/skSK.js +16 -15
- package/modern/locales/svSE.js +116 -0
- package/modern/locales/trTR.js +1 -0
- package/modern/locales/ukUA.js +1 -0
- package/modern/locales/viVN.js +1 -0
- package/modern/locales/zhCN.js +1 -0
- package/modern/utils/keyboardUtils.js +4 -3
- package/node/DataGrid/DataGrid.js +4 -4
- package/node/colDef/gridCheckboxSelectionColDef.js +4 -2
- package/node/colDef/gridNumericColDef.js +1 -1
- package/node/colDef/gridStringOperators.js +11 -6
- package/node/components/GridRow.js +1 -1
- package/node/components/cell/GridBooleanCell.js +5 -3
- package/node/components/cell/GridEditBooleanCell.js +5 -3
- package/node/components/cell/GridEditDateCell.js +5 -3
- package/node/components/cell/GridEditInputCell.js +5 -3
- package/node/components/cell/GridEditSingleSelectCell.js +10 -7
- package/node/components/columnHeaders/GridColumnHeaderItem.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
- package/node/components/columnSelection/GridHeaderCheckbox.js +0 -1
- package/node/components/containers/GridRootStyles.js +1 -1
- package/node/components/panel/GridColumnsPanel.js +3 -6
- package/node/components/panel/filterPanel/GridFilterForm.js +9 -4
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputDate.js +4 -2
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +43 -20
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +33 -15
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/node/components/panel/filterPanel/GridFilterPanel.js +1 -2
- package/node/components/toolbar/GridToolbarColumnsButton.js +0 -1
- package/node/components/toolbar/GridToolbarDensitySelector.js +0 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +0 -1
- package/node/components/toolbar/GridToolbarFilterButton.js +0 -1
- package/node/constants/localeTextConstants.js +1 -0
- package/node/hooks/features/columns/useGridColumnSpanning.js +11 -16
- package/node/hooks/features/dimensions/useGridDimensions.js +37 -23
- package/node/hooks/features/editRows/useGridCellEditing.new.js +6 -0
- package/node/hooks/features/editRows/useGridCellEditing.old.js +6 -0
- package/node/hooks/features/editRows/useGridRowEditing.new.js +6 -0
- package/node/hooks/features/editRows/useGridRowEditing.old.js +6 -0
- package/node/hooks/features/filter/gridFilterUtils.js +7 -4
- package/node/hooks/features/rows/useGridRows.js +16 -3
- package/node/hooks/features/rows/useGridRowsMeta.js +80 -77
- package/node/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
- package/node/hooks/features/selection/useGridSelectionPreProcessors.js +7 -5
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +42 -9
- package/node/hooks/utils/useGridApiContext.js +1 -1
- package/node/hooks/utils/useGridRootProps.js +1 -1
- package/node/index.js +1 -1
- package/node/locales/arSD.js +1 -0
- package/node/locales/bgBG.js +1 -0
- package/node/locales/csCZ.js +1 -0
- package/node/locales/daDK.js +1 -0
- package/node/locales/deDE.js +1 -0
- package/node/locales/elGR.js +1 -0
- package/node/locales/esES.js +1 -0
- package/node/locales/faIR.js +1 -0
- package/node/locales/fiFI.js +1 -0
- package/node/locales/frFR.js +1 -0
- package/node/locales/heIL.js +1 -0
- package/node/locales/huHU.js +1 -0
- package/node/locales/index.js +39 -0
- package/node/locales/itIT.js +1 -0
- package/node/locales/jaJP.js +1 -0
- package/node/locales/koKR.js +1 -0
- package/node/locales/nbNO.js +1 -0
- package/node/locales/nlNL.js +1 -0
- package/node/locales/plPL.js +1 -0
- package/node/locales/ptBR.js +1 -0
- package/node/locales/roRO.js +126 -0
- package/node/locales/ruRU.js +1 -0
- package/node/locales/skSK.js +16 -15
- package/node/locales/svSE.js +126 -0
- package/node/locales/trTR.js +1 -0
- package/node/locales/ukUA.js +1 -0
- package/node/locales/viVN.js +1 -0
- package/node/locales/zhCN.js +1 -0
- package/node/utils/keyboardUtils.js +4 -3
- package/package.json +3 -3
- package/utils/keyboardUtils.js +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,153 @@
|
|
|
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
|
+
## 5.13.0
|
|
7
|
+
|
|
8
|
+
_Jul 7, 2022_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` are now in beta!
|
|
13
|
+
|
|
14
|
+
- ✨ Allow detail panel's height to match its content (#5163) @m4theushw
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<DataGridPro getDetailPanelHeight={() => 'auto'} />
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- 🌍 Add Romanian (ro-RO) locale on the data grid (#5345) @rolule
|
|
21
|
+
- 📚 Documentation improvements
|
|
22
|
+
- 🐞 Bugfixes
|
|
23
|
+
|
|
24
|
+
### `@mui/x-data-grid@v5.13.0` / `@mui/x-data-grid-pro@v5.13.0` / `@mui/x-data-grid-premium@v5.13.0`
|
|
25
|
+
|
|
26
|
+
#### Changes
|
|
27
|
+
|
|
28
|
+
- [DataGrid] Allows to customize variant of value input in filter panel (#4826) @alexfauquette
|
|
29
|
+
- [DataGrid] Add Romanian (ro-RO) locale (#5345) @rolule
|
|
30
|
+
- [DataGrid] Export Norwegian (nb-NO) locale (#5407) @cherniavskii
|
|
31
|
+
- [DataGrid] Fix broken "start editing" integration with Japanese (#5414) @mnajdova
|
|
32
|
+
- [DataGrid] Fix "stop editing" integration with IME e.g. Japanese (#5257) @Gumichocopengin8
|
|
33
|
+
- [DataGrid] Fix dimensions computation with `autoHeight` and scroll x (#5401) @flaviendelangle
|
|
34
|
+
- [DataGrid] Improve Slovak (sk-SK) locale (#5332) @msidlo
|
|
35
|
+
- [DataGrid] Mention Premium plan in error messages and docs warnings (#5328) @cherniavskii
|
|
36
|
+
- [DataGrid] Remove trailing spaces in filter input (#5279) @alexfauquette
|
|
37
|
+
- [DataGridPro] Allow to infer detail panel height from content (#5163) @m4theushw
|
|
38
|
+
- [DataGridPro] Fix the depth of nodes when switching from a non-flat tree to a flat tree (#5362) @flaviendelangle
|
|
39
|
+
|
|
40
|
+
### `@mui/x-date-pickers@v5.0.0-beta.0` / `@mui/x-date-picker-pro@5.0.0-beta.0`
|
|
41
|
+
|
|
42
|
+
#### Changes
|
|
43
|
+
|
|
44
|
+
- [DateRangePicker] Fix keyboard selection (#5265) @alexfauquette
|
|
45
|
+
- [DayPicker] Remove empty space at the bottom of the day view (#5073) @flaviendelangle
|
|
46
|
+
- [pickers] Add missing type dependencies (#5331) @Methuselah96
|
|
47
|
+
- [pickers] Pass the generics to the components in the theme augmentation (#5199) @toruticas
|
|
48
|
+
|
|
49
|
+
### Docs
|
|
50
|
+
|
|
51
|
+
- [docs] Explain how to use hooks inside a cell renderer (#5158) @flaviendelangle
|
|
52
|
+
- [docs] Fix server-side pagination demo (#5361) @cherniavskii
|
|
53
|
+
- [docs] Fix typo in the quick filter docs (#5313) @alexfauquette
|
|
54
|
+
- [docs] Improve the "Getting started" page (#5293) @alexfauquette
|
|
55
|
+
- [docs] New page for the pickers action bar customization (#5267) @flaviendelangle
|
|
56
|
+
- [docs] Revise and split up "Overview" page into "Introduction" (#4692) @samuelsycamore
|
|
57
|
+
- [docs] Use `useKeepGroupedColumnsHiddren` from the grid package on remaining demo (#5382) @flaviendelangle
|
|
58
|
+
|
|
59
|
+
## v5.12.3
|
|
60
|
+
|
|
61
|
+
_Jun 23, 2022_
|
|
62
|
+
|
|
63
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
64
|
+
|
|
65
|
+
- 🌍 Add Swedish (sv-SE) locale on the data grid and the pickers (#5210) @mrxdst
|
|
66
|
+
- 🌍 Add Dutch (nl-NL) locale on the pickers (#5237) @DDukers
|
|
67
|
+
- 📚 Documentation improvements
|
|
68
|
+
- 🐞 Bugfixes
|
|
69
|
+
|
|
70
|
+
### `@mui/x-data-grid@v5.12.3` / `@mui/x-data-grid-pro@v5.12.3` / `@mui/x-data-grid-premium@v5.12.3`
|
|
71
|
+
|
|
72
|
+
#### Changes
|
|
73
|
+
|
|
74
|
+
- [DataGrid] Do not hide non-hideable column when pressing Hide All button (#5298) @flaviendelangle
|
|
75
|
+
- [DataGrid] Do not regenerate the row tree when the `loading` prop changes (#5213) @flaviendelangle
|
|
76
|
+
- [DataGrid] Fix the default filter operator fallback on state initialization (#5266) @flaviendelangle
|
|
77
|
+
- [DataGrid] Stop using the deprecated `api` prop in the grid components (#5205) @flaviendelangle
|
|
78
|
+
- [DataGrid] Add Swedish (sv-SE) locale (#5210) @mrxdst
|
|
79
|
+
- [DataGridPremium] Fix detail panel on `DataGridPremium` (#5264) @flaviendelangle
|
|
80
|
+
- [DataGridPremium] Fix Excel import with Remix / Vite (#5207) @alexfauquette
|
|
81
|
+
- [DataGridPremium] Fix error with quick filter and grouping rows (#5238) @alexfauquette
|
|
82
|
+
|
|
83
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.7` / `@mui/x-date-pickers-pro@v5.0.0-alpha.7`
|
|
84
|
+
|
|
85
|
+
#### Changes
|
|
86
|
+
|
|
87
|
+
- [pickers] Export adapters from both `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` (#5204) @flaviendelangle
|
|
88
|
+
- [pickers] Add Dutch (nl-NL) locale (#5237) @DDukers
|
|
89
|
+
|
|
90
|
+
### Docs
|
|
91
|
+
|
|
92
|
+
- [docs] Add `DataGridPremium` to all API sections (#5196) @flaviendelangle
|
|
93
|
+
- [docs] Add plan badge next to event name in the Events page (#5200) @flaviendelangle
|
|
94
|
+
- [docs] Add section for theme augmentation in the picker docs (#5276) @flaviendelangle
|
|
95
|
+
- [docs] Add waiting for upvote section for row group panel (#5271) @flaviendelangle
|
|
96
|
+
- [docs] Disable ad on main demo page (#5301) @joserodolfofreitas
|
|
97
|
+
- [docs] Fix typo in the `DateRangePicker` documentation (#5259) @flaviendelangle
|
|
98
|
+
|
|
99
|
+
### Core
|
|
100
|
+
|
|
101
|
+
- [core] Allow having multiple playgrounds (#5288) @alexfauquette
|
|
102
|
+
- [core] Improve typing of `GridFilterInputMultipleSingleSelect` (#5206) @flaviendelangle
|
|
103
|
+
- [core] Remove arbitrary new lines (#5245) @oliviertassinari
|
|
104
|
+
- [core] Remove dead logic (#5282) @oliviertassinari
|
|
105
|
+
- [test] Fix `inputFormat` when testing with different date adapters (#5291) @cherniavskii
|
|
106
|
+
- [test] Fix date assertion in Safari 13 (#5221) @m4theushw
|
|
107
|
+
- [test] Throw if date adapter is not found (#5289) @cherniavskii
|
|
108
|
+
- [test] Use mock for `ResizeObserver` (#5215) @m4theushw
|
|
109
|
+
|
|
110
|
+
## v5.12.2
|
|
111
|
+
|
|
112
|
+
_Jun 16, 2022_
|
|
113
|
+
|
|
114
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
115
|
+
|
|
116
|
+
- 🚀 Performance improvement for dynamic row height (#5135) @m4theushw
|
|
117
|
+
- 🕒 Add demo of how to use the data grid with date pickers (#5053) @cherniavskii
|
|
118
|
+
- 📚 Documentation improvements
|
|
119
|
+
- 🐞 Bugfixes
|
|
120
|
+
|
|
121
|
+
### `@mui/x-data-grid@v5.12.2` / `@mui/x-data-grid-pro@v5.12.2` / `@mui/x-data-grid-premium@v5.12.2`
|
|
122
|
+
|
|
123
|
+
#### Changes
|
|
124
|
+
|
|
125
|
+
- [DataGrid] Fix for cosmetic bug on column filter badge (#5170) @simbahandiane
|
|
126
|
+
- [DataGrid] Hide vertical scrollbar if `autoHeight` is enabled (#5164) @m4theushw
|
|
127
|
+
- [DataGrid] Use exponential search to render non-measured rows (#5135) @m4theushw
|
|
128
|
+
- [DataGridPro] Fix label of the detail panel toggle column (#5191) @m4theushw
|
|
129
|
+
- [DataGridPro] Refresh detail panel caches when props change (#5110) @m4theushw
|
|
130
|
+
|
|
131
|
+
### Docs
|
|
132
|
+
|
|
133
|
+
- [docs] Add example with custom checkbox column (#5161) @flaviendelangle
|
|
134
|
+
- [docs] Batch small changes (#5177) @oliviertassinari
|
|
135
|
+
- [docs] Fix demo currency format (#5034) @oliviertassinari
|
|
136
|
+
- [docs] Fix outdated license description to match the EULA (#5219) @joserodolfofreitas
|
|
137
|
+
- [docs] Fix redundant headers (#5104) @oliviertassinari
|
|
138
|
+
- [docs] Fix some capitalization to match the guidelines (#5105) @oliviertassinari
|
|
139
|
+
- [docs] Improve the `getRowId` doc section (#5156) @flaviendelangle
|
|
140
|
+
- [docs] Instruction to deal with invalid license message (#5074) @joserodolfofreitas
|
|
141
|
+
- [docs] Use redirection in the code (#5114) @oliviertassinari
|
|
142
|
+
- [docs] Add demo of how to use the data grid with date pickers (#5053) @cherniavskii
|
|
143
|
+
|
|
144
|
+
### Core
|
|
145
|
+
|
|
146
|
+
- [core] Improve inline code rendering within the details tag (#5166) @Harmouch101
|
|
147
|
+
- [core] Remove unused props from plugin typing (#5185) @flaviendelangle
|
|
148
|
+
- [core] Use the scrollbar size from `useGridDimensions` on `DataGridProColumnHeaders` (#5201) @flaviendelangle
|
|
149
|
+
- [core] Fix `GridColTypeDef` type (#5167) @cherniavskii
|
|
150
|
+
- [core] Fix `GridColTypeDef` usage in demo (#5197) @cherniavskii
|
|
151
|
+
- [test] Add `waitFor` before asserting height (#5203) @m4theushw
|
|
152
|
+
|
|
6
153
|
## v5.12.1
|
|
7
154
|
|
|
8
155
|
_Jun 9, 2022_
|
|
@@ -28,7 +175,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
28
175
|
- [l10n] Update Japanese (ja-JP) locale (#5122) @hikotq
|
|
29
176
|
- [l10n] Update Russian (ru-RU) locale (#5069) @Artboomy
|
|
30
177
|
|
|
31
|
-
### `@mui/x-date-pickers@
|
|
178
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.6` / `@mui/x-date-pickers-pro@v5.0.0-alpha.6`
|
|
32
179
|
|
|
33
180
|
#### Changes
|
|
34
181
|
|
|
@@ -95,7 +242,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
95
242
|
- [l10n] Add Norwegian (Bokmål) (nb-NO) locale (#5001) @spiftire
|
|
96
243
|
- [l10n] Add Turkish (tr-TR) locale (#5026) @Rassilion
|
|
97
244
|
|
|
98
|
-
### `@mui/x-date-pickers@
|
|
245
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.5` / `@mui/x-date-pickers-pro@v5.0.0-alpha.5`
|
|
99
246
|
|
|
100
247
|
#### Breaking changes
|
|
101
248
|
|
|
@@ -168,7 +315,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
168
315
|
- [DataGridPremium] Support column spanning in the Excel export (#4830) @cherniavskii
|
|
169
316
|
- [l10n] Improve Russian (ru-RU) locale (#4864) @arvkonstantin
|
|
170
317
|
|
|
171
|
-
### `@mui/x-date-pickers@
|
|
318
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.4` / `@mui/x-date-pickers-pro@v5.0.0-alpha.4`
|
|
172
319
|
|
|
173
320
|
#### Breaking changes
|
|
174
321
|
|
|
@@ -293,7 +440,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
293
440
|
- [l10n] Improve German (de-DE) locale (#4748) @sebastianfrey
|
|
294
441
|
- [l10n] Improve German (de-DE) locale (#4668) @izu-co
|
|
295
442
|
|
|
296
|
-
### `@mui/x-date-pickers@
|
|
443
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.3` / `@mui/x-date-pickers-pro@v5.0.0-alpha.3`
|
|
297
444
|
|
|
298
445
|
#### Breaking changes
|
|
299
446
|
|
|
@@ -394,7 +541,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
394
541
|
- [DataGrid] Don't close column menu when updating rows (#4498) @m4theushw
|
|
395
542
|
- [DataGridPro] Introduce row reorder (#4034) @DanailH
|
|
396
543
|
|
|
397
|
-
### `@mui/x-date-pickers@
|
|
544
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.2` / `@mui/x-date-pickers-pro@v5.0.0-alpha.2`
|
|
398
545
|
|
|
399
546
|
- [pickers] Pass `PaperProps` to `DesktopWrapper` component (#4584) @alexfauquette
|
|
400
547
|
- [TimePicker] Fix bug when time picker clear value (#4582) @alexfauquette
|
|
@@ -455,7 +602,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
|
|
|
455
602
|
- [DataGridPro] Fix toggling detail panel using keyboard (#4409) @cherniavskii
|
|
456
603
|
- [l10n] Add Hungarian (hu-HU) locale (#4458) @x22tri
|
|
457
604
|
|
|
458
|
-
### `@mui/x-date-pickers@
|
|
605
|
+
### `@mui/x-date-pickers@v5.0.0-alpha.1` / `@mui/x-date-pickers-pro@v5.0.0-alpha.1`
|
|
459
606
|
|
|
460
607
|
- [ClockPicker] Should call `shouldDisableTime` with the hours with meridiem (#4404) @flaviendelangle
|
|
461
608
|
- [MonthPicker] Clicking on a `PickersMonth` button should not trigger the form submit (#4402) @flaviendelangle
|
|
@@ -4084,9 +4231,9 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
|
|
|
4084
4231
|
|
|
4085
4232
|
### Docs
|
|
4086
4233
|
|
|
4087
|
-
- [docs] Data
|
|
4234
|
+
- [docs] Data grid depends on side effects (#666) @oliviertassinari
|
|
4088
4235
|
- [docs] Clarify the purpose of x-grid-data-generator (#634) @Elius94
|
|
4089
|
-
- [docs] Data
|
|
4236
|
+
- [docs] Data grid is in the lab (#612) @oliviertassinari
|
|
4090
4237
|
- [docs] Fix Demo app, downgrade webpack-cli, known issue in latest version (#647) @dtassone
|
|
4091
4238
|
- [docs] Fix typo in columns.md @stojy
|
|
4092
4239
|
- [docs] Reduce confusion on /export page (#646) @SerdarMustafa1
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -86,7 +86,7 @@ DataGridRaw.propTypes = {
|
|
|
86
86
|
columns: chainPropTypes(PropTypes.array.isRequired, props => {
|
|
87
87
|
// @ts-ignore because otherwise `build:api` doesn't work
|
|
88
88
|
if (props.columns && props.columns.some(column => column.resizable)) {
|
|
89
|
-
return new Error([`MUI: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to
|
|
89
|
+
return new Error([`MUI: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
return null;
|
|
@@ -656,14 +656,14 @@ DataGridRaw.propTypes = {
|
|
|
656
656
|
*/
|
|
657
657
|
pageSize: chainPropTypes(PropTypes.number, props => {
|
|
658
658
|
if (props.pageSize && props.pageSize > MAX_PAGE_SIZE) {
|
|
659
|
-
return new Error([`MUI: \`<DataGrid pageSize={${props.pageSize}} />\` is not a valid prop.`, `Only page size below ${MAX_PAGE_SIZE} is available in the MIT version.`, '', 'You need to upgrade to
|
|
659
|
+
return new Error([`MUI: \`<DataGrid pageSize={${props.pageSize}} />\` is not a valid prop.`, `Only page size below ${MAX_PAGE_SIZE} is available in the MIT version.`, '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
|
|
660
660
|
}
|
|
661
661
|
|
|
662
662
|
return null;
|
|
663
663
|
}),
|
|
664
664
|
pagination: props => {
|
|
665
665
|
if (props.pagination === false) {
|
|
666
|
-
return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to
|
|
666
|
+
return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination.'].join('\n'));
|
|
667
667
|
}
|
|
668
668
|
|
|
669
669
|
return null;
|
|
@@ -743,7 +743,7 @@ DataGridRaw.propTypes = {
|
|
|
743
743
|
*/
|
|
744
744
|
selectionModel: chainPropTypes(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array]), props => {
|
|
745
745
|
if (!props.checkboxSelection && Array.isArray(props.selectionModel) && props.selectionModel.length > 1) {
|
|
746
|
-
return new Error([`MUI: \`<DataGrid selectionModel={${JSON.stringify(props.selectionModel)}} />\` is not a valid prop.`, 'selectionModel can only be of 1 item in DataGrid.', '', 'You need to upgrade to
|
|
746
|
+
return new Error([`MUI: \`<DataGrid selectionModel={${JSON.stringify(props.selectionModel)}} />\` is not a valid prop.`, 'selectionModel can only be of 1 item in DataGrid.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
|
|
747
747
|
}
|
|
748
748
|
|
|
749
749
|
return null;
|
|
@@ -5,8 +5,9 @@ import { GridHeaderCheckbox } from '../components/columnSelection/GridHeaderChec
|
|
|
5
5
|
import { selectedIdsLookupSelector } from '../hooks/features/selection/gridSelectionSelector';
|
|
6
6
|
import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const GRID_CHECKBOX_SELECTION_FIELD = '__check__';
|
|
8
9
|
export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF, {
|
|
9
|
-
field:
|
|
10
|
+
field: GRID_CHECKBOX_SELECTION_FIELD,
|
|
10
11
|
type: 'checkboxSelection',
|
|
11
12
|
width: 50,
|
|
12
13
|
resizable: false,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GridFilterOperator } from '../models/gridFilterOperator';
|
|
2
|
-
export declare const getGridDateOperators: (showTime?: boolean | undefined) => GridFilterOperator<any, string |
|
|
2
|
+
export declare const getGridDateOperators: (showTime?: boolean | undefined) => GridFilterOperator<any, string | Date, any>[];
|
|
@@ -11,7 +11,7 @@ export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
11
11
|
valueParser: value => value === '' ? null : Number(value),
|
|
12
12
|
valueFormatter: ({
|
|
13
13
|
value
|
|
14
|
-
}) =>
|
|
14
|
+
}) => isNumber(value) ? value.toLocaleString() : value || '',
|
|
15
15
|
filterOperators: getGridNumericOperators(),
|
|
16
16
|
getApplyQuickFilterFn: getGridNumericQuickFilterFn
|
|
17
17
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GridFilterOperator } from '../models/gridFilterOperator';
|
|
2
2
|
import { GridCellParams } from '../models';
|
|
3
3
|
export declare const getGridStringQuickFilterFn: (value: any) => (({ value: columnValue }: GridCellParams) => boolean) | null;
|
|
4
|
-
export declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
4
|
+
export declare const getGridStringOperators: (disableTrim?: boolean) => GridFilterOperator<any, number | string | null, any>[];
|
|
@@ -13,14 +13,15 @@ export const getGridStringQuickFilterFn = value => {
|
|
|
13
13
|
return columnValue != null ? filterRegex.test(columnValue.toString()) : false;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
export const getGridStringOperators = () => [{
|
|
16
|
+
export const getGridStringOperators = (disableTrim = false) => [{
|
|
17
17
|
value: 'contains',
|
|
18
18
|
getApplyFilterFn: filterItem => {
|
|
19
19
|
if (!filterItem.value) {
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
|
24
|
+
const filterRegex = new RegExp(escapeRegExp(filterItemValue), 'i');
|
|
24
25
|
return ({
|
|
25
26
|
value
|
|
26
27
|
}) => {
|
|
@@ -35,6 +36,7 @@ export const getGridStringOperators = () => [{
|
|
|
35
36
|
return null;
|
|
36
37
|
}
|
|
37
38
|
|
|
39
|
+
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
|
38
40
|
const collator = new Intl.Collator(undefined, {
|
|
39
41
|
sensitivity: 'base',
|
|
40
42
|
usage: 'search'
|
|
@@ -42,7 +44,7 @@ export const getGridStringOperators = () => [{
|
|
|
42
44
|
return ({
|
|
43
45
|
value
|
|
44
46
|
}) => {
|
|
45
|
-
return value != null ? collator.compare(
|
|
47
|
+
return value != null ? collator.compare(filterItemValue, value.toString()) === 0 : false;
|
|
46
48
|
};
|
|
47
49
|
},
|
|
48
50
|
InputComponent: GridFilterInputValue
|
|
@@ -53,7 +55,8 @@ export const getGridStringOperators = () => [{
|
|
|
53
55
|
return null;
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
const
|
|
58
|
+
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
|
59
|
+
const filterRegex = new RegExp(`^${escapeRegExp(filterItemValue)}.*$`, 'i');
|
|
57
60
|
return ({
|
|
58
61
|
value
|
|
59
62
|
}) => {
|
|
@@ -68,7 +71,8 @@ export const getGridStringOperators = () => [{
|
|
|
68
71
|
return null;
|
|
69
72
|
}
|
|
70
73
|
|
|
71
|
-
const
|
|
74
|
+
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
|
|
75
|
+
const filterRegex = new RegExp(`.*${escapeRegExp(filterItemValue)}$`, 'i');
|
|
72
76
|
return ({
|
|
73
77
|
value
|
|
74
78
|
}) => {
|
|
@@ -101,13 +105,14 @@ export const getGridStringOperators = () => [{
|
|
|
101
105
|
return null;
|
|
102
106
|
}
|
|
103
107
|
|
|
108
|
+
const filterItemValue = disableTrim ? filterItem.value : filterItem.value.map(val => val.trim());
|
|
104
109
|
const collator = new Intl.Collator(undefined, {
|
|
105
110
|
sensitivity: 'base',
|
|
106
111
|
usage: 'search'
|
|
107
112
|
});
|
|
108
113
|
return ({
|
|
109
114
|
value
|
|
110
|
-
}) => value != null ?
|
|
115
|
+
}) => value != null ? filterItemValue.some(filterValue => {
|
|
111
116
|
return collator.compare(filterValue, value.toString() || '') === 0;
|
|
112
117
|
}) : false;
|
|
113
118
|
},
|
package/components/GridRow.js
CHANGED
|
@@ -112,7 +112,7 @@ function GridRow(props) {
|
|
|
112
112
|
// Fallback for IE
|
|
113
113
|
apiRef.current.unstable_storeRowHeightMeasurement(rowId, ref.current.clientHeight);
|
|
114
114
|
}
|
|
115
|
-
});
|
|
115
|
+
}, [apiRef, rowHeight, rowId]);
|
|
116
116
|
React.useLayoutEffect(() => {
|
|
117
117
|
if (currentPage.range) {
|
|
118
118
|
// The index prop is relative to the rows from all pages. As example, the index prop of the
|
|
@@ -43,7 +43,7 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Pick<{
|
|
|
43
43
|
touchRippleRef?: React.Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
44
44
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
45
45
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
46
|
-
}, "color" | "size" | "disabled" | "children" | "action" | "tabIndex" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "
|
|
46
|
+
}, "color" | "size" | "disabled" | "children" | "action" | "tabIndex" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge">, "hidden" | "color" | "size" | "icon" | "translate" | "disabled" | "form" | "label" | "slot" | "title" | "children" | "key" | "action" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "type" | "value" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "showInMenu"> | Pick<{
|
|
47
47
|
label: string;
|
|
48
48
|
icon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
49
49
|
} & {
|
|
@@ -75,5 +75,5 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Pick<{
|
|
|
75
75
|
touchRippleRef?: React.Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
76
76
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof React.LiHTMLAttributes<HTMLLIElement>> & {
|
|
77
77
|
ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
|
|
78
|
-
}, "dense" | "disabled" | "children" | "action" | "autoFocus" | "tabIndex" | "selected" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "
|
|
78
|
+
}, "dense" | "disabled" | "children" | "action" | "autoFocus" | "tabIndex" | "selected" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef">, "hidden" | "color" | "dense" | "icon" | "translate" | "disabled" | "label" | "slot" | "title" | "children" | "key" | "action" | "autoFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "selected" | "value" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "showInMenu">) & React.RefAttributes<HTMLButtonElement>>;
|
|
79
79
|
export { GridActionsCellItem };
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
6
6
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
7
7
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
8
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
|
|
10
11
|
const useUtilityClasses = ownerState => {
|
|
@@ -19,11 +20,11 @@ const useUtilityClasses = ownerState => {
|
|
|
19
20
|
|
|
20
21
|
export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
|
|
21
22
|
const {
|
|
22
|
-
value
|
|
23
|
-
api
|
|
23
|
+
value
|
|
24
24
|
} = props,
|
|
25
25
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
26
26
|
|
|
27
|
+
const apiRef = useGridApiContext();
|
|
27
28
|
const rootProps = useGridRootProps();
|
|
28
29
|
const ownerState = {
|
|
29
30
|
classes: rootProps.classes
|
|
@@ -33,7 +34,7 @@ export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
|
|
|
33
34
|
return /*#__PURE__*/_jsx(Icon, _extends({
|
|
34
35
|
fontSize: "small",
|
|
35
36
|
className: classes.root,
|
|
36
|
-
titleAccess:
|
|
37
|
+
titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
|
|
37
38
|
"data-value": Boolean(value)
|
|
38
39
|
}, other));
|
|
39
40
|
});
|
|
@@ -8,6 +8,7 @@ import { unstable_composeClasses as composeClasses } from '@mui/material';
|
|
|
8
8
|
import { unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
|
|
13
14
|
const useUtilityClasses = ownerState => {
|
|
@@ -26,7 +27,6 @@ function GridEditBooleanCell(props) {
|
|
|
26
27
|
const {
|
|
27
28
|
id: idProp,
|
|
28
29
|
value,
|
|
29
|
-
api,
|
|
30
30
|
field,
|
|
31
31
|
className,
|
|
32
32
|
hasFocus,
|
|
@@ -34,6 +34,7 @@ function GridEditBooleanCell(props) {
|
|
|
34
34
|
} = props,
|
|
35
35
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
36
36
|
|
|
37
|
+
const apiRef = useGridApiContext();
|
|
37
38
|
const inputRef = React.useRef(null);
|
|
38
39
|
const id = useId();
|
|
39
40
|
const [valueState, setValueState] = React.useState(value);
|
|
@@ -50,12 +51,12 @@ function GridEditBooleanCell(props) {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
setValueState(newValue);
|
|
53
|
-
await
|
|
54
|
+
await apiRef.current.setEditCellValue({
|
|
54
55
|
id: idProp,
|
|
55
56
|
field,
|
|
56
57
|
value: newValue
|
|
57
58
|
}, event);
|
|
58
|
-
}, [
|
|
59
|
+
}, [apiRef, field, idProp, onValueChange]);
|
|
59
60
|
React.useEffect(() => {
|
|
60
61
|
setValueState(value);
|
|
61
62
|
}, [value]);
|
|
@@ -8,6 +8,7 @@ import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/u
|
|
|
8
8
|
import InputBase from '@mui/material/InputBase';
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
|
|
13
14
|
const useUtilityClasses = ownerState => {
|
|
@@ -24,7 +25,6 @@ function GridEditDateCell(props) {
|
|
|
24
25
|
const {
|
|
25
26
|
id,
|
|
26
27
|
value: valueProp,
|
|
27
|
-
api,
|
|
28
28
|
field,
|
|
29
29
|
colDef,
|
|
30
30
|
hasFocus,
|
|
@@ -34,6 +34,7 @@ function GridEditDateCell(props) {
|
|
|
34
34
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
35
35
|
|
|
36
36
|
const isDateTime = colDef.type === 'dateTime';
|
|
37
|
+
const apiRef = useGridApiContext();
|
|
37
38
|
const inputRef = React.useRef();
|
|
38
39
|
const valueTransformed = React.useMemo(() => {
|
|
39
40
|
let parsedDate;
|
|
@@ -93,12 +94,12 @@ function GridEditDateCell(props) {
|
|
|
93
94
|
parsed: newParsedDate,
|
|
94
95
|
formatted: newFormattedDate
|
|
95
96
|
});
|
|
96
|
-
|
|
97
|
+
apiRef.current.setEditCellValue({
|
|
97
98
|
id,
|
|
98
99
|
field,
|
|
99
100
|
value: newParsedDate
|
|
100
101
|
}, event);
|
|
101
|
-
}, [
|
|
102
|
+
}, [apiRef, field, id, onValueChange]);
|
|
102
103
|
React.useEffect(() => {
|
|
103
104
|
setValueState(state => {
|
|
104
105
|
var _valueTransformed$par, _state$parsed;
|
|
@@ -11,6 +11,7 @@ import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
|
11
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
12
12
|
import { GridLoadIcon } from '../icons/index';
|
|
13
13
|
import { SUBMIT_FILTER_STROKE_TIME } from '../panel/filterPanel/GridFilterInputValue';
|
|
14
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
|
|
16
17
|
const useUtilityClasses = ownerState => {
|
|
@@ -45,7 +46,6 @@ function GridEditInputCell(props) {
|
|
|
45
46
|
const {
|
|
46
47
|
id,
|
|
47
48
|
value,
|
|
48
|
-
api,
|
|
49
49
|
field,
|
|
50
50
|
colDef,
|
|
51
51
|
hasFocus,
|
|
@@ -55,6 +55,7 @@ function GridEditInputCell(props) {
|
|
|
55
55
|
} = props,
|
|
56
56
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
57
57
|
|
|
58
|
+
const apiRef = useGridApiContext();
|
|
58
59
|
const inputRef = React.useRef();
|
|
59
60
|
const [valueState, setValueState] = React.useState(value);
|
|
60
61
|
const ownerState = {
|
|
@@ -69,13 +70,13 @@ function GridEditInputCell(props) {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
setValueState(newValue);
|
|
72
|
-
|
|
73
|
+
apiRef.current.setEditCellValue({
|
|
73
74
|
id,
|
|
74
75
|
field,
|
|
75
76
|
value: newValue,
|
|
76
77
|
debounceMs
|
|
77
78
|
}, event);
|
|
78
|
-
}, [
|
|
79
|
+
}, [apiRef, debounceMs, field, id, onValueChange]);
|
|
79
80
|
React.useEffect(() => {
|
|
80
81
|
setValueState(value);
|
|
81
82
|
}, [value]);
|