@mui/x-data-grid-generator 6.0.0-alpha.14 → 6.0.0-alpha.15

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 CHANGED
@@ -3,6 +3,163 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.0.0-alpha.15
7
+
8
+ _Jan 13, 2023_
9
+
10
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Support components and slots for new pickers (#7390) @alexfauquette
13
+ - ✨ Update `onColumnOrderChange` behavior to match `onRowsOrderChange` (#7385) @DanailH
14
+ - 🌍 Improve Spanish (es-ES) and Belarusian (be-BY) locales
15
+ - 📚 Documentation improvements
16
+ - 🐞 Bugfixes
17
+
18
+ ### `@mui/x-data-grid@v6.0.0-alpha.15` / `@mui/x-data-grid-pro@6.0.0-alpha.15` / `@mui/x-data-grid-premium@6.0.0-alpha.15`
19
+
20
+ #### Breaking changes
21
+
22
+ - Remove the `onCellFocusOut` prop (#6302) @cherniavskii
23
+
24
+ The `onCellFocusOut` prop was removed. Use `componentsProps.cell.onBlur` instead:
25
+
26
+ ```tsx
27
+ <DataGrid
28
+ componentsProps={{
29
+ cell: {
30
+ onBlur: (event) => {
31
+ const cellElement = event.currentTarget;
32
+ const field = cellElement.getAttribute('data-field');
33
+ const rowId = cell.parentElement.getAttribute('data-id');
34
+ },
35
+ },
36
+ }}
37
+ />
38
+ ```
39
+
40
+ - [DataGrid] Stop exporting editing selector (#7456) @m4theushw
41
+
42
+ The `gridEditRowsStateSelector` selector was removed.
43
+
44
+ - [DataGrid] Rework column headers and virtual scroller positioning (#7001) @cherniavskii
45
+
46
+ The `headerHeight` prop was renamed to `columnHeaderHeight`.
47
+
48
+ - [DataGrid] Remove the `columnTypes` prop (#7309) @cherniavskii
49
+
50
+ The `columnTypes` prop was removed. For custom column types see [Custom column types](https://mui.com/x/react-data-grid/column-definition/#custom-column-types) docs.
51
+
52
+ - [DataGrid] Rename `linkOperators` to `logicOperators` (#7310) @cherniavskii
53
+
54
+ The `apiRef.current.setFilterLinkOperator` method was renamed to `apiRef.current.setFilterLogicOperator`.
55
+ The `GridLinkOperator` enum was renamed to `GridLogicOperator`.
56
+ The `GridFilterModel['linkOperator']` was renamed to `GridFilterModel['logicOperator']`.
57
+ The `linkOperators` prop of `GridFilterForm` and `GridFilterPanel` components was renamed to `logicOperators`.
58
+ The `linkOperatorInputProps` prop of `GridFilterForm` component was renamed to `logicOperatorInputProps`.
59
+ The `filterFormProps.linkOperatorInputProps` prop in `GridFilterForm` component was renamed to `filterFormProps.logicOperatorInputProps`.
60
+ The `GridLocaleText['filterPanelLinkOperator']` property was renamed to `GridLocaleText['filterPanelLogicOperator']`.
61
+ The `.MuiDataGrid-filterFormLinkOperatorInput`CSS class was renamed to `.MuiDataGrid-filterFormLogicOperatorInput`.
62
+
63
+ - [DataGrid] Remove `Alt+C` keyboard shortcut (#7466) @MBilalShafi
64
+
65
+ <kbd>Alt</kbd> (or <kbd>⌥ Option</kbd>) + <kbd>C</kbd> keyboard shortcut is no longer supported.
66
+
67
+ #### Changes
68
+
69
+ - [DataGrid] Fix <kbd>Tab</kbd> between portaled and non-portaled edit components (#7098) @m4theushw
70
+ - [DataGrid] Remove the `columnTypes` prop (#7309) @cherniavskii
71
+ - [DataGrid] Remove the `onCellFocusOut` prop (#6302) @cherniavskii
72
+ - [DataGrid] Rename `linkOperators` to `logicOperators` (#7310) @cherniavskii
73
+ - [DataGrid] Rework column headers and virtual scroller positioning (#7001) @cherniavskii
74
+ - [DataGrid] Stop exporting editing selector (#7456) @m4theushw
75
+ - [DataGrid] Update `onColumnOrderChange` behavior to match `onRowsOrderChange` (#7385) @DanailH
76
+ - [DataGrid] Improve Spanish (es-ES) locale (#7447) @Anderssxn
77
+ - [DataGrid] Remove Alt+C keyboard shortcut (#7466) @MBilalShafi
78
+ - [DataGridPremium] Fix Excel export not working with date strings (#7396) @cherniavskii
79
+
80
+ ### `@mui/x-date-pickers@6.0.0-alpha.15` / `@mui/x-date-pickers-pro@6.0.0-alpha.15`
81
+
82
+ #### Breaking changes
83
+
84
+ - [pickers] Stop using the `WrapperVariantContext` in `MonthCalendar` and `YearCalendar` (#7382) @flaviendelangle
85
+
86
+ The `modeMobile` and `modeDesktop` classes have been removed from the `PickersMonth` and `PickersYear` internal components.
87
+
88
+ If you were using those classes on responsive components,
89
+ you can import `DEFAULT_DESKTOP_MODE_MEDIA_QUERY` from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro` (or use your custom media query if any):
90
+
91
+ ```diff
92
+ <GlobalStyles
93
+ styles={{
94
+ - [`.${pickersYearClasses.modeDesktop}`]: {
95
+ - backgroundColor: 'red'
96
+ - }
97
+ + [DEFAULT_DESKTOP_MODE_MEDIA_QUERY]: {
98
+ + [`.${pickersYearClasses.root}`]: {
99
+ + backgroundColor: 'red'
100
+ + }
101
+ + }
102
+ - [`.${pickersYearClasses.modeMobile}`]: {
103
+ - backgroundColor: 'red'
104
+ - }
105
+ + [DEFAULT_DESKTOP_MODE_MEDIA_QUERY.replace('@media', '@media not')]: {
106
+ + [`.${pickersYearClasses.root}`]: {
107
+ + backgroundColor: 'red'
108
+ + }
109
+ + }
110
+ }}
111
+ />
112
+ ```
113
+
114
+ Works exactly the same way for `PickersMonth`.
115
+
116
+ - [pickers] Refactor `shouldDisableTime` (#7299) @LukasTy
117
+
118
+ The `shouldDisableTime` prop signature has been changed. Either rename the prop usage to `shouldDisableClock` or refactor usage.
119
+
120
+ ```diff
121
+ <DateTimePicker
122
+ - shouldDisableTime={(timeValue, view) => view === 'hours' && timeValue < 12}
123
+ + shouldDisableClock={(timeValue, view) => view === 'hours' && timeValue < 12}
124
+ />
125
+ ```
126
+
127
+ ```diff
128
+ <DateTimePicker
129
+ - shouldDisableTime={(timeValue, view) => view === 'hours' && timeValue < 12}
130
+ + shouldDisableTime={(time, view) => view === 'hours' && value.hour() < 12}
131
+ />
132
+ ```
133
+
134
+ #### Changes
135
+
136
+ - [fields] Fix Android editing (#7444) @flaviendelangle
137
+ - [pickers] Add Belarusian (be-BY) locale (#7395) @volhalink
138
+ - [pickers] Hide am/pm controls when their is no hour view (#7380) @flaviendelangle
139
+ - [pickers] Hide the tabs by default on `DesktopNextDateTimePicker` (#7503) @flaviendelangle
140
+ - [pickers] Refactor `shouldDisableTime` (#7299) @LukasTy
141
+ - [pickers] Remove `WrapperVariantContext` from `DateTimePickerTabs` (#7374) @LukasTy
142
+ - [pickers] Stop using the `WrapperVariantContext` in `MonthCalendar` and `YearCalendar` (#7382) @flaviendelangle
143
+ - [pickers] Support `components` and `slots` for new pickers (#7390) @alexfauquette
144
+ - [pickers] Replace `slotsProps` by `slotProps` (#7528) @alexfauquette
145
+
146
+ ### Docs
147
+
148
+ - [docs] Fix codesandboxes using `DemoContainer` (#7388) @LukasTy
149
+ - [docs] Fix wrong reference to currentView (#7441) @oliviertassinari
150
+ - [docs] New page for `DateRangeCalendar` (#7378) @flaviendelangle
151
+ - [docs] Update the migration guide with the breaking changes between the legacy and the new pickers (#7345) @flaviendelangle
152
+ - [docs] Use new pickers on "Custom components" demos (#7194) @flaviendelangle
153
+
154
+ ### Core
155
+
156
+ - [core] Handle selection edge case (#7350) @oliviertassinari
157
+ - [core] Improve license message @oliviertassinari
158
+ - [pickers] Move default `closeOnSelect` to prop definition (#7459) @flaviendelangle
159
+ - [core] Move interfaces of UI views to dedicated files (#7458) @flaviendelangle
160
+ - [core] Update package used to import LicenseInfo (#7442) @oliviertassinari
161
+ - [test] Add a few inheritComponent (#7352) @oliviertassinari
162
+
6
163
  ## 6.0.0-alpha.14
7
164
 
8
165
  _Jan 5, 2023_
package/hooks/useQuery.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { getGridDefaultColumnTypes, GridLinkOperator } from '@mui/x-data-grid-pro';
3
+ import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-pro';
4
4
  import { isDeepEqual } from '@mui/x-data-grid/internals';
5
5
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
6
6
  const simplifiedValueGetter = (field, colDef) => row => {
@@ -70,7 +70,7 @@ const getFilteredRows = (rows, filterModel, columnsWithDefaultColDef) => {
70
70
  value: parsedValue
71
71
  }, colDef);
72
72
  });
73
- if (filterModel.linkOperator === GridLinkOperator.Or) {
73
+ if (filterModel.logicOperator === GridLogicOperator.Or) {
74
74
  return rows.filter(row => filterModel.items.some((_, index) => {
75
75
  const value = valueGetters[index](row);
76
76
  return filterFunctions[index] === null ? true : filterFunctions[index]({
package/index.js CHANGED
@@ -1,5 +1,7 @@
1
- /** @license MUI X v6.0.0-alpha.14
1
+ /**
2
+ * @mui/x-data-grid-generator v6.0.0-alpha.15
2
3
  *
4
+ * @license MUI X Commercial
3
5
  * This source code is licensed under the commercial license found in the
4
6
  * LICENSE file in the root directory of this source tree.
5
7
  */
@@ -4,7 +4,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import * as React from 'react';
7
- import { getGridDefaultColumnTypes, GridLinkOperator } from '@mui/x-data-grid-pro';
7
+ import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-pro';
8
8
  import { isDeepEqual } from '@mui/x-data-grid/internals';
9
9
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
10
10
  var simplifiedValueGetter = function simplifiedValueGetter(field, colDef) {
@@ -86,7 +86,7 @@ var getFilteredRows = function getFilteredRows(rows, filterModel, columnsWithDef
86
86
  value: parsedValue
87
87
  }, colDef);
88
88
  });
89
- if (filterModel.linkOperator === GridLinkOperator.Or) {
89
+ if (filterModel.logicOperator === GridLogicOperator.Or) {
90
90
  return rows.filter(function (row) {
91
91
  return filterModel.items.some(function (_, index) {
92
92
  var value = valueGetters[index](row);
package/legacy/index.js CHANGED
@@ -1,5 +1,7 @@
1
- /** @license MUI X v6.0.0-alpha.14
1
+ /**
2
+ * @mui/x-data-grid-generator v6.0.0-alpha.15
2
3
  *
4
+ * @license MUI X Commercial
3
5
  * This source code is licensed under the commercial license found in the
4
6
  * LICENSE file in the root directory of this source tree.
5
7
  */
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
- import { getGridDefaultColumnTypes, GridLinkOperator } from '@mui/x-data-grid-pro';
3
+ import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-pro';
4
4
  import { isDeepEqual } from '@mui/x-data-grid/internals';
5
5
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
6
6
  const simplifiedValueGetter = (field, colDef) => row => {
@@ -68,7 +68,7 @@ const getFilteredRows = (rows, filterModel, columnsWithDefaultColDef) => {
68
68
  value: parsedValue
69
69
  }, colDef);
70
70
  });
71
- if (filterModel.linkOperator === GridLinkOperator.Or) {
71
+ if (filterModel.logicOperator === GridLogicOperator.Or) {
72
72
  return rows.filter(row => filterModel.items.some((_, index) => {
73
73
  const value = valueGetters[index](row);
74
74
  return filterFunctions[index] === null ? true : filterFunctions[index]({
package/modern/index.js CHANGED
@@ -1,5 +1,7 @@
1
- /** @license MUI X v6.0.0-alpha.14
1
+ /**
2
+ * @mui/x-data-grid-generator v6.0.0-alpha.15
2
3
  *
4
+ * @license MUI X Commercial
3
5
  * This source code is licensed under the commercial license found in the
4
6
  * LICENSE file in the root directory of this source tree.
5
7
  */
@@ -77,7 +77,7 @@ const getFilteredRows = (rows, filterModel, columnsWithDefaultColDef) => {
77
77
  value: parsedValue
78
78
  }, colDef);
79
79
  });
80
- if (filterModel.linkOperator === _xDataGridPro.GridLinkOperator.Or) {
80
+ if (filterModel.logicOperator === _xDataGridPro.GridLogicOperator.Or) {
81
81
  return rows.filter(row => filterModel.items.some((_, index) => {
82
82
  const value = valueGetters[index](row);
83
83
  return filterFunctions[index] === null ? true : filterFunctions[index]({
package/node/index.js CHANGED
@@ -1,5 +1,7 @@
1
- /** @license MUI X v6.0.0-alpha.14
1
+ /**
2
+ * @mui/x-data-grid-generator v6.0.0-alpha.15
2
3
  *
4
+ * @license MUI X Commercial
3
5
  * This source code is licensed under the commercial license found in the
4
6
  * LICENSE file in the root directory of this source tree.
5
7
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-generator",
3
- "version": "6.0.0-alpha.14",
3
+ "version": "6.0.0-alpha.15",
4
4
  "description": "Generate fake data for demo purposes only.",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.7",
23
- "@mui/base": "^5.0.0-alpha.112",
24
- "@mui/x-data-grid-premium": "6.0.0-alpha.14",
23
+ "@mui/base": "^5.0.0-alpha.113",
24
+ "@mui/x-data-grid-premium": "6.0.0-alpha.15",
25
25
  "chance": "^1.1.9",
26
26
  "clsx": "^1.2.1",
27
27
  "lru-cache": "^7.14.1"