@mui/x-data-grid-generator 5.16.0 → 5.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,143 @@
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.17.2
7
+
8
+ _Sep 9, 2022_
9
+
10
+ This release will the last regular release for our `v5` packages.
11
+ From now on, we'll be focusing on developing MUI X v6.
12
+ You can check the [roadmap](https://github.com/mui/mui-x/projects/1) for more details on what's coming next.
13
+
14
+ And if you'd like to help, please consider volunteering to give us a [user interview](https://docs.google.com/forms/d/11L_zxL7oD_B-ZrZDuSyIkUzJLzOTUU2M4vHXxMVtWhU/edit).
15
+ We'd love to know more about your use cases, pain points and expectations for the future.
16
+
17
+ The `v5` packages will only get new versions to patch critical bug fixes.
18
+
19
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
20
+
21
+ - 📃 Add support for column grouping when exporting to Excel (#5895) @alexfauquette
22
+ - 🐞 Bugfixes
23
+
24
+ ### `@mui/x-data-grid@v5.17.2` / `@mui/x-data-grid-pro@v5.17.2` / `@mui/x-data-grid-premium@v5.17.2`
25
+
26
+ #### Changes
27
+
28
+ - [DataGrid] Revert mode if cell/row couldn't be saved due to validation error (#5897) @m4theushw
29
+ - [DataGridPremium] Export column grouping in Excel (#5895) @alexfauquette
30
+
31
+ ### `@mui/x-date-pickers@v5.0.1` / `@mui/x-date-pickers-pro@v5.0.1`
32
+
33
+ #### Changes
34
+
35
+ - [DateTimePicker] Remove circular import (#6087) @flaviendelangle
36
+ - [pickers] Add `sx` prop to the equality check of `PickersDay` (#6030) @TheUnlocked
37
+ - [pickers] Add warning when `openTo` is invalid based on available `views` (#6042) @LukasTy
38
+ - [pickers] Allow keyboard navigation to ignore disabled date for left / right arrow (#6082) @alexfauquette
39
+ - [pickers] Fix mobile picker not opening on label click (#6074) @LukasTy
40
+
41
+ ### Docs
42
+
43
+ - [docs] Add Recipes section
44
+
45
+ ### Core
46
+
47
+ - [core] Add `yarn release:tag` script (#5169) @DanailH
48
+ - [core] Upgrade monorepo (#6072) @m4theushw
49
+
50
+ ## 5.17.1
51
+
52
+ _Sep 5, 2022_
53
+
54
+ We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
55
+
56
+ - 🐞 Bugfixes
57
+
58
+ ### `@mui/x-data-grid@v5.17.1` / `@mui/x-data-grid-pro@v5.17.1` / `@mui/x-data-grid-premium@v5.17.1`
59
+
60
+ #### Changes
61
+
62
+ - [DataGrid] Fix cells being focused on mouseUp (#5980) @cherniavskii
63
+ - [DataGrid] Fix focused cell if column is spanned and new editing API is used (#5962) @m4theushw
64
+ - [DataGridPro] Fix import in lazy-loading causing a bundling error (#6031) @flaviendelangle
65
+
66
+ ## 5.17.0
67
+
68
+ _Sep 2, 2022_
69
+
70
+ 🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` packages!
71
+
72
+ If you are still using picker components from the `lab`, take a look at the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/).
73
+
74
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
75
+
76
+ - 🎁 Implement Lazy loading (#5214) @DanailH
77
+
78
+ Pro users now can try the experimental lazy loading feature.
79
+ In a few steps, you can load your data on demand, as the rows are displayed.
80
+
81
+ To enable this feature, add `experimentalFeatures={{ lazyLoading: true }}`.
82
+ Lazy Loading requires a few other settings.
83
+ See the [documentation](https://mui.com/x/react-data-grid/row-updates/#lazy-loading) to explore the example in detail.
84
+
85
+ - 🚀 Improve `pickers` focus management (#5820) @alexfauquette
86
+ - 🎉 Enable disabling `day` on date range picker depending on `position` (#5773) @alexfauquette
87
+ - ✨ Various improvements
88
+ - 📚 Documentation improvements
89
+ - 🐞 Bugfixes
90
+
91
+ ### `@mui/x-data-grid@v5.17.0` / `@mui/x-data-grid-pro@v5.17.0` / `@mui/x-data-grid-premium@v5.17.0`
92
+
93
+ #### Changes
94
+
95
+ - [DataGrid] Add `sort` prop to columns panel slot (#5888) @gavbrennan
96
+ - [DataGrid] Do not throw if `fieldToFocus` cannot be found (#5871) @cherniavskii
97
+ - [DataGrid] Support `getRowId` in the `replaceRows` method (#5988) @flaviendelangle
98
+ - [DataGridPro] Add class name to row with open detail panel (#5924) @m4theushw
99
+ - [DataGridPro] Fix crash when using `pinnedRows` + `getRowClassName` props and `rows=[]` (#5851) @cherniavskii
100
+ - [DataGridPro] Fix filtering with inactive filter items (#5993) @alexfauquette
101
+ - [DataGridPro] Implement Lazy loading (#5214) @DanailH
102
+ - [DataGridPro] Support pinned columns and dynamic row height (#5782) @m4theushw
103
+ - [DataGridPremium] Add state initializer for column groups (#5963) @alexfauquette
104
+ - [DataGridPremium] Update grouping when `groupingValueGetter` changes (#5919) @flaviendelangle
105
+ - [DataGridPremium] Use the aggregated value on tree data real groups (#5953) @flaviendelangle
106
+
107
+ ### `@mui/x-date-pickers@v5.0.0` / `@mui/x-date-pickers-pro@v5.0.0`
108
+
109
+ #### Changes
110
+
111
+ - [DatePicker] Improve focus management (#5820) @alexfauquette
112
+ - [DateRangePicker] Enable disabling `day` depending on `position` (#5773) @alexfauquette
113
+ - [DateTimePicker] Create a new `tabs` component slot (#5972) @LukasTy
114
+ - [pickers] Do not forward validation props to the DOM on field components (#5971) @flaviendelangle
115
+ - [pickers] Do not hardcode `date-fns` elements in field components (#5975) @flaviendelangle
116
+ - [pickers] Do not require `date-fns` in `@mui/x-date-pickers-pro` (#5941) @flaviendelangle
117
+ - [pickers] Fix mobile picker not opening on label click (#5651) @LukasTy
118
+ - [pickers] Improve DOM event management on `useField` (#5901) @flaviendelangle
119
+ - [pickers] Include `community` package `themeAugmentation` in `pro` package types (#5969) @LukasTy
120
+ - [pickers] Rename `DateRangeField` into `SingleInputDateRangeField` (#5961) @flaviendelangle
121
+ - [pickers] Support `isSameError` on field components (#5984) @flaviendelangle
122
+
123
+ ### Docs
124
+
125
+ - [docs] Add `description` and `default` to pickers slots (#5893) @alexfauquette
126
+ - [docs] Fix typo (#5945) @wettopa
127
+ - [docs] Fix typo `onYearPicker` to `onYearChange` (#5954) @alexfauquette
128
+ - [docs] Update `GridCellParams`'s `value` description (#5849) @cherniavskii
129
+ - [docs] Update `README.md` to match Introduction section of the docs (#5754) @samuelsycamore
130
+
131
+ ### Core
132
+
133
+ - [core] Fix typo (#5990) @flaviendelangle
134
+ - [core] Remove old babel resolve rule (#5939) @oliviertassinari
135
+ - [core] Remove outdated TODO (#5956) @flaviendelangle
136
+ - [core] Upgrade monorepo (#5960) @cherniavskii
137
+ - [core] Fix statics (#5986) @DanailH
138
+ - [core] Remove unused dependencies (#5937) @oliviertassinari
139
+ - [license] Remove CLI (#5757) @flaviendelangle
140
+ - [test] Fix time zone sensitive test (#5955) @LukasTy
141
+ - [test] Use `userEvent.mousePress` instead of `fireClickEvent` (#5920) @cherniavskii
142
+
6
143
  ## 5.16.0
7
144
 
8
145
  _Aug 25, 2022_
@@ -585,7 +722,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
585
722
 
586
723
  **MonthPicker**: The prop `onMonthChange` has been removed, you can use `onChange` instead since every change is a month change
587
724
 
588
- **YearPicker**: The prop `onYearPicker` has been removed, you can use `onChange` instead since every change is a year change
725
+ **YearPicker**: The prop `onYearChange` has been removed, you can use `onChange` instead since every change is a year change
589
726
 
590
727
  **DayPicker**: The prop `isDateDisabled` has been removed, you can now use the same validation props as for the other components (`maxDate`, `minDate`, `shouldDisableDate`, `disableFuture` and `disablePast`)
591
728
 
@@ -1,24 +1,83 @@
1
- import { GridRowModel, GridFilterModel, GridSortModel, GridRowId } from '@mui/x-data-grid-pro';
1
+ import * as React from 'react';
2
+ import { GridRowModel, GridFilterModel, GridSortModel, GridRowId, GridFilterOperator, GridColDef } from '@mui/x-data-grid-pro';
2
3
  import { UseDemoDataOptions } from './useDemoData';
4
+ /**
5
+ * Simulates server data loading
6
+ */
7
+ export declare const loadServerRows: (rows: GridRowModel[], queryOptions: QueryOptions, serverOptions: ServerOptions, columnsWithDefaultColDef: GridColDef[]) => Promise<FakeServerResponse>;
8
+ interface FakeServerResponse {
9
+ returnedRows: GridRowModel[];
10
+ nextCursor?: string;
11
+ totalRowCount: number;
12
+ }
3
13
  interface PageInfo {
4
14
  totalRowCount?: number;
5
15
  nextCursor?: string;
6
16
  pageSize?: number;
7
17
  }
8
- export interface ServerOptions {
18
+ interface DefaultServerOptions {
9
19
  minDelay: number;
10
20
  maxDelay: number;
11
21
  useCursorPagination?: boolean;
12
22
  }
23
+ declare type ServerOptions = Partial<DefaultServerOptions>;
13
24
  export interface QueryOptions {
14
25
  cursor?: GridRowId;
15
26
  page?: number;
16
27
  pageSize?: number;
17
28
  filterModel?: GridFilterModel;
18
29
  sortModel?: GridSortModel;
30
+ firstRowToRender?: number;
31
+ lastRowToRender?: number;
19
32
  }
20
- export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOptions>, serverOptions?: Partial<ServerOptions>) => {
33
+ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOptions>, serverOptions?: ServerOptions) => {
21
34
  columns: import("..").GridColDefGenerator[];
35
+ columnsWithDefaultColDef: {
36
+ generateData?: ((row: any, context: import("..").GridDataGeneratorContext) => any) | undefined;
37
+ dataGeneratorUniquenessEnabled?: boolean | undefined;
38
+ field: string;
39
+ headerName?: string | undefined;
40
+ description?: string | undefined;
41
+ width?: number | undefined;
42
+ flex?: number | undefined;
43
+ minWidth?: number | undefined;
44
+ maxWidth?: number | undefined;
45
+ hide?: boolean | undefined;
46
+ hideable?: boolean | undefined;
47
+ sortable?: boolean | undefined;
48
+ sortingOrder?: import("@mui/x-data-grid-pro").GridSortDirection[] | undefined;
49
+ resizable?: boolean | undefined;
50
+ editable?: boolean | undefined;
51
+ groupable?: boolean | undefined;
52
+ pinnable?: boolean | undefined;
53
+ sortComparator?: import("@mui/x-data-grid-pro").GridComparatorFn<any> | undefined;
54
+ type?: string | undefined;
55
+ valueOptions?: import("@mui/x-data-grid-pro").ValueOptions[] | ((params: import("@mui/x-data-grid-pro").GridValueOptionsParams<any>) => import("@mui/x-data-grid-pro").ValueOptions[]) | undefined;
56
+ align?: import("@mui/x-data-grid-pro").GridAlignment | undefined;
57
+ valueGetter?: ((params: import("@mui/x-data-grid-pro").GridValueGetterParams<any, any>) => any) | undefined;
58
+ valueSetter?: ((params: import("@mui/x-data-grid-pro").GridValueSetterParams<any, any>) => any) | undefined;
59
+ valueFormatter?: ((params: import("@mui/x-data-grid-pro").GridValueFormatterParams<any>) => any) | undefined;
60
+ valueParser?: ((value: any, params?: import("@mui/x-data-grid-pro").GridCellParams<any, any, any> | undefined) => any) | undefined;
61
+ cellClassName?: import("@mui/x-data-grid-pro").GridCellClassNamePropType | undefined;
62
+ renderCell?: ((params: import("@mui/x-data-grid-pro").GridRenderCellParams<any, any, any>) => React.ReactNode) | undefined;
63
+ renderEditCell?: ((params: import("@mui/x-data-grid-pro").GridRenderEditCellParams<any, any, any>) => React.ReactNode) | undefined;
64
+ preProcessEditCellProps?: ((params: import("@mui/x-data-grid-pro").GridPreProcessEditCellProps<any, any>) => import("@mui/x-data-grid-pro").GridEditCellProps<any> | Promise<import("@mui/x-data-grid-pro").GridEditCellProps<any>>) | undefined;
65
+ headerClassName?: import("@mui/x-data-grid-pro").GridColumnHeaderClassNamePropType | undefined;
66
+ renderHeader?: ((params: import("@mui/x-data-grid-pro").GridColumnHeaderParams<any, any, any>) => React.ReactNode) | undefined;
67
+ headerAlign?: import("@mui/x-data-grid-pro").GridAlignment | undefined;
68
+ hideSortIcons?: boolean | undefined;
69
+ disableColumnMenu?: boolean | undefined;
70
+ filterable?: boolean | undefined;
71
+ filterOperators?: GridFilterOperator<any, any, any>[] | undefined;
72
+ getApplyQuickFilterFn?: ((value: any, colDef: import("@mui/x-data-grid-pro").GridStateColDef<any, any, any>, apiRef: React.MutableRefObject<import("@mui/x-data-grid/internals").GridApiCommunity>) => ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any>) => boolean) | null) | undefined;
73
+ disableReorder?: boolean | undefined;
74
+ disableExport?: boolean | undefined;
75
+ colSpan?: number | ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any>) => number | undefined) | undefined;
76
+ aggregable?: boolean | undefined;
77
+ availableAggregationFunctions?: string[] | undefined;
78
+ groupingValueGetter?: ((params: import("@mui/x-data-grid-premium").GridGroupingValueGetterParams<any, any>) => import("@mui/x-data-grid-pro").GridKeyValue | null | undefined) | undefined;
79
+ extendType?: import("@mui/x-data-grid-pro").GridNativeColTypes | undefined;
80
+ }[];
22
81
  initialState: {
23
82
  columns: {
24
83
  columnVisibilityModel: import("@mui/x-data-grid-pro").GridColumnVisibilityModel;
package/hooks/useQuery.js CHANGED
@@ -109,7 +109,7 @@ const getFilteredRows = (rows, filterModel, columnsWithDefaultColDef) => {
109
109
  */
110
110
 
111
111
 
112
- const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDefaultColDef) => {
112
+ export const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDefaultColDef) => {
113
113
  const {
114
114
  minDelay = 100,
115
115
  maxDelay = 300,
@@ -161,7 +161,6 @@ const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDefaultCol
161
161
  }, delay); // simulate network latency
162
162
  });
163
163
  };
164
-
165
164
  const DEFAULT_DATASET_OPTIONS = {
166
165
  dataSet: 'Commodity',
167
166
  rowLength: 100,
@@ -245,6 +244,7 @@ export const createFakeServer = (dataSetOptions, serverOptions) => {
245
244
 
246
245
  return {
247
246
  columns,
247
+ columnsWithDefaultColDef,
248
248
  initialState,
249
249
  useQuery
250
250
  };
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.16.0
1
+ /** @license MUI v5.17.2
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.
@@ -128,7 +128,7 @@ var getFilteredRows = function getFilteredRows(rows, filterModel, columnsWithDef
128
128
  */
129
129
 
130
130
 
131
- var loadServerRows = function loadServerRows(rows, queryOptions, serverOptions, columnsWithDefaultColDef) {
131
+ export var loadServerRows = function loadServerRows(rows, queryOptions, serverOptions, columnsWithDefaultColDef) {
132
132
  var _serverOptions$minDel = serverOptions.minDelay,
133
133
  minDelay = _serverOptions$minDel === void 0 ? 100 : _serverOptions$minDel,
134
134
  _serverOptions$maxDel = serverOptions.maxDelay,
@@ -180,7 +180,6 @@ var loadServerRows = function loadServerRows(rows, queryOptions, serverOptions,
180
180
  }, delay); // simulate network latency
181
181
  });
182
182
  };
183
-
184
183
  var DEFAULT_DATASET_OPTIONS = {
185
184
  dataSet: 'Commodity',
186
185
  rowLength: 100,
@@ -303,6 +302,7 @@ export var createFakeServer = function createFakeServer(dataSetOptions, serverOp
303
302
 
304
303
  return {
305
304
  columns: columns,
305
+ columnsWithDefaultColDef: columnsWithDefaultColDef,
306
306
  initialState: initialState,
307
307
  useQuery: useQuery
308
308
  };
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.16.0
1
+ /** @license MUI v5.17.2
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.
@@ -105,7 +105,7 @@ const getFilteredRows = (rows, filterModel, columnsWithDefaultColDef) => {
105
105
  */
106
106
 
107
107
 
108
- const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDefaultColDef) => {
108
+ export const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDefaultColDef) => {
109
109
  const {
110
110
  minDelay = 100,
111
111
  maxDelay = 300,
@@ -157,7 +157,6 @@ const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDefaultCol
157
157
  }, delay); // simulate network latency
158
158
  });
159
159
  };
160
-
161
160
  const DEFAULT_DATASET_OPTIONS = {
162
161
  dataSet: 'Commodity',
163
162
  rowLength: 100,
@@ -241,6 +240,7 @@ export const createFakeServer = (dataSetOptions, serverOptions) => {
241
240
 
242
241
  return {
243
242
  columns,
243
+ columnsWithDefaultColDef,
244
244
  initialState,
245
245
  useQuery
246
246
  };
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.16.0
1
+ /** @license MUI v5.17.2
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.
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.createFakeServer = void 0;
8
+ exports.loadServerRows = exports.createFakeServer = void 0;
9
9
 
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
@@ -179,6 +179,7 @@ const loadServerRows = (rows, queryOptions, serverOptions, columnsWithDefaultCol
179
179
  });
180
180
  };
181
181
 
182
+ exports.loadServerRows = loadServerRows;
182
183
  const DEFAULT_DATASET_OPTIONS = {
183
184
  dataSet: 'Commodity',
184
185
  rowLength: 100,
@@ -261,6 +262,7 @@ const createFakeServer = (dataSetOptions, serverOptions) => {
261
262
 
262
263
  return {
263
264
  columns,
265
+ columnsWithDefaultColDef,
264
266
  initialState,
265
267
  useQuery
266
268
  };
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.16.0
1
+ /** @license MUI v5.17.2
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": "5.16.0",
3
+ "version": "5.17.2",
4
4
  "description": "Generate fake data for demo purposes only.",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.18.9",
23
23
  "@mui/base": "^5.0.0-alpha.94",
24
- "@mui/x-data-grid-premium": "5.16.0",
24
+ "@mui/x-data-grid-premium": "5.17.2",
25
25
  "chance": "^1.1.8",
26
26
  "clsx": "^1.2.1",
27
27
  "lru-cache": "^7.14.0"