@mui/x-data-grid-generator 6.0.0-alpha.10 → 6.0.0-alpha.11

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,119 @@
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.11
7
+
8
+ _Dec 8, 2022_
9
+
10
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Add dragging support for the new Date Range Picker (`NextDateRangePicker`) (#6763) @LukasTy
13
+ - ⚡️ Improve performance of the `day` view (#7066) @flaviendelangle
14
+ - ✨ Fix lazy-loading feature not working in `DataGridPremium` (#7124) @m4theushw
15
+ - 🐞 Bugfixes
16
+
17
+ ### `@mui/x-data-grid@v6.0.0-alpha.11` / `@mui/x-data-grid-pro@v6.0.0-alpha.11` / `@mui/x-data-grid-premium@v6.0.0-alpha.11`
18
+
19
+ #### Breaking changes
20
+
21
+ - The `filterPanelOperators` translation key was renamed to `filterPanelOperator` (#7062) @MBilalShafi
22
+ - The `components.Header` slot was removed. Use `components.Toolbar` slot instead (#6999) @cherniavskii
23
+
24
+ #### Changes
25
+
26
+ - [DataGrid] Fix rows not rendering properly after height change (#6892) @MBilalShafi
27
+ - [DataGrid] Remove `Header` slot (#6999) @cherniavskii
28
+ - [DataGrid] Rename `filterPanelOperators` -> `filterPanelOperator` (#7062) @MBilalShafi
29
+ - [DataGridPremium] Add support for lazy-loading (#7124) @m4theushw
30
+ - [DataGridPremium] Pass `groupId` to aggregation function (#7003) @m4theushw
31
+
32
+ ### `@mui/x-date-pickers@v6.0.0-alpha.11` / `@mui/x-date-pickers-pro@v6.0.0-alpha.11`
33
+
34
+ #### Breaking changes
35
+
36
+ - Remove the callback version of the `action` prop on the `actionBar` slot (#7038) @flaviendelangle
37
+
38
+ The `action` prop of the `actionBar` slot is no longer supporting a callback.
39
+ Instead, you can pass a callback at the slot level:
40
+
41
+ ```diff
42
+ <DatePicker
43
+ componentsProps={{
44
+ - actionBar: {
45
+ - actions: (variant) => (variant === 'desktop' ? [] : ['clear']),
46
+ - },
47
+ + actionBar: ({ wrapperVariant }) => ({
48
+ + actions: wrapperVariant === 'desktop' ? [] : ['clear'],
49
+ + }),
50
+ }}
51
+ />
52
+ ```
53
+
54
+ - The `selectedDays` prop has been removed from the `Day` component (#7066) @flaviendelangle
55
+ If you need to access it, you can control the value and pass it to the slot using `componentsProps`:
56
+
57
+ ```tsx
58
+ function CustomDay({ selectedDay, ...other }) {
59
+ // do something with 'selectedDay'
60
+ return <PickersDay {...other} />;
61
+ }
62
+ function App() {
63
+ const [value, setValue] = React.useState(null);
64
+ return (
65
+ <DatePicker
66
+ value={value}
67
+ onChange={(newValue) => setValue(newValue)}
68
+ components={{ Day: CustomDay }}
69
+ componentsProps={{
70
+ day: { selectedDay: value },
71
+ }}
72
+ />
73
+ );
74
+ }
75
+ ```
76
+
77
+ - The `currentlySelectingRangeEnd` / `setCurrentlySelectingRangeEnd` props on the Date Range Picker toolbar have been renamed to `rangePosition` / `onRangePositionChange` (#6989) @flaviendelangle
78
+
79
+ ```diff
80
+ const CustomToolbarComponent = props => (
81
+ <div>
82
+ - <button onChange={() => props.setCurrentlySelectingRangeEnd('end')}>Edit end date</button>
83
+ + <button onClick={() => props.onRangePositionChange('end')}>Edit end date</button>
84
+ - <div>Is editing end date: {props.currentlySelectingRangeEnd === 'end'}</div>
85
+ + <div>Is editing end date: {props.rangePosition === 'end'}</div>
86
+ </div>
87
+ )
88
+ <DateRangePicker
89
+ components={{
90
+ Toolbar: CustomToolbarComponent
91
+ }}
92
+ />
93
+ ```
94
+
95
+ #### Changes
96
+
97
+ - [DateRangePicker] Add dragging support to edit range (#6763) @LukasTy
98
+ - [pickers] Fix lost props on Date Range Pickers (#7092) @flaviendelangle
99
+ - [pickers] Fix toolbar on the new range pickers (#6989) @flaviendelangle
100
+ - [pickers] Improve performance of `DayCalendar` (#7066) @flaviendelangle
101
+ - [pickers] Initialize date without time when selecting year or month (#7120) @LukasTy
102
+ - [pickers] Remove the callback version of the `action` prop in the `actionBar` component slot (#7038) @flaviendelangle
103
+
104
+ ### Docs
105
+
106
+ - [docs] Add `GridCell` change in migration guide (#7087) @MBilalShafi
107
+ - [docs] Fix API page ad space regression (#7051) @oliviertassinari
108
+ - [docs] Update localization doc to use existing locale (#7102) @LukasTy
109
+
110
+ ### Core
111
+
112
+ - [core] Add codemod to move l10n translation (#7027) @alexfauquette
113
+ - [core] Add notes to remove the legacy pickers internals (#7133) @flaviendelangle
114
+ - [core] Remove `internals-fields` imports (#7119) @flaviendelangle
115
+ - [core] Remove unused code (#7094) @flaviendelangle
116
+ - [core] Sync `ApiPage.js` with monorepo (#7073) @oliviertassinari
117
+ - [test] Fix karma-mocha assertion error messages (#7054) @cherniavskii
118
+
6
119
  ## 6.0.0-alpha.10
7
120
 
8
121
  _Dec 1, 2022_
@@ -1,13 +1,13 @@
1
1
  import { GridColumnVisibilityModel } from '@mui/x-data-grid-premium';
2
2
  import { GridColDefGenerator } from '../services/gridColDefGenerator';
3
3
  import { AddPathToDemoDataOptions, DemoTreeDataValue } from '../services/tree-data-generator';
4
- export declare type DemoDataReturnType = {
4
+ export type DemoDataReturnType = {
5
5
  data: DemoTreeDataValue;
6
6
  loading: boolean;
7
7
  setRowLength: (count: number) => void;
8
8
  loadNewData: () => void;
9
9
  };
10
- declare type DataSet = 'Commodity' | 'Employee';
10
+ type DataSet = 'Commodity' | 'Employee';
11
11
  export interface UseDemoDataOptions {
12
12
  dataSet: DataSet;
13
13
  rowLength: number;
@@ -1,5 +1,5 @@
1
1
  import { GridColumns } from '@mui/x-data-grid-premium';
2
- export declare type Movie = {
2
+ export type Movie = {
3
3
  id: number;
4
4
  title: string;
5
5
  gross: number;
@@ -20,7 +20,7 @@ interface DefaultServerOptions {
20
20
  maxDelay: number;
21
21
  useCursorPagination?: boolean;
22
22
  }
23
- declare type ServerOptions = Partial<DefaultServerOptions>;
23
+ type ServerOptions = Partial<DefaultServerOptions>;
24
24
  export interface QueryOptions {
25
25
  cursor?: GridRowId;
26
26
  page?: number;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v6.0.0-alpha.10
1
+ /** @license MUI v6.0.0-alpha.11
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v6.0.0-alpha.10
1
+ /** @license MUI v6.0.0-alpha.11
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v6.0.0-alpha.10
1
+ /** @license MUI v6.0.0-alpha.11
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v6.0.0-alpha.10
1
+ /** @license MUI v6.0.0-alpha.11
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-generator",
3
- "version": "6.0.0-alpha.10",
3
+ "version": "6.0.0-alpha.11",
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.1",
23
- "@mui/base": "^5.0.0-alpha.106",
24
- "@mui/x-data-grid-premium": "6.0.0-alpha.10",
23
+ "@mui/base": "^5.0.0-alpha.109",
24
+ "@mui/x-data-grid-premium": "6.0.0-alpha.11",
25
25
  "chance": "^1.1.9",
26
26
  "clsx": "^1.2.1",
27
27
  "lru-cache": "^7.14.1"
@@ -1,5 +1,5 @@
1
1
  import { GridDataGeneratorContext } from './gridColDefGenerator';
2
- declare type ColumnDataGenerator<Value> = (data: any, context: GridDataGeneratorContext) => Value;
2
+ type ColumnDataGenerator<Value> = (data: any, context: GridDataGeneratorContext) => Value;
3
3
  export declare const random: (min: number, max: number) => number;
4
4
  export declare const randomInt: (min: number, max: number) => number;
5
5
  export declare const randomPrice: (min?: number, max?: number) => number;