@mui/x-data-grid-premium 6.0.4 → 6.1.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 CHANGED
@@ -3,6 +3,64 @@
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.1.0
7
+
8
+ _Apr 7, 2023_
9
+
10
+ We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Add Catalan (ca-ES), Kazakh (kz-KZ) and improve Spanish (es-ES), Dutch (nl-NL), Hebrew (he-IL), Hungarian (hu-HU), Japanese (ja-JP), Portuguese (pt-BR), and Russian (ru-RU) locales
13
+ - ✨ Allow to control visibility of columns shown in the columns panel (#8401) @MBilalShafi
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ ### `@mui/x-data-grid@v6.1.0` / `@mui/x-data-grid-pro@v6.1.0` / `@mui/x-data-grid-premium@v6.1.0`
18
+
19
+ #### Changes
20
+
21
+ - [DataGrid] Allow to control visibility of columns shown in the `ColumnsPanel` component (#8401) @MBilalShafi
22
+ - [DataGrid] Fix filters with empty array value not being removed from the filter model (#8501) @cherniavskii
23
+ - [DataGrid] Fix memory leaks in development (#8301) @cherniavskii
24
+ - [DataGrid] Sync `date` column value when entering edit mode by pressing a digit (#8364) @m4theushw
25
+ - [DataGrid] Wrap column menu button with a tooltip (#7890) @cherniavskii
26
+ - [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
27
+ - [l10n] Improve Hungarian (hu-HU) locale (#8486) @PetakCC
28
+ - [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
29
+ - [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
30
+ - [l10n] Improve Russian (ru-RU) locale (#8510) @alexrapro
31
+
32
+ ### `@mui/x-date-pickers@v6.1.0` / `@mui/x-date-pickers-pro@v6.1.0`
33
+
34
+ #### Changes
35
+
36
+ - [fields] Fix RTL navigation (#8490) @alexfauquette
37
+ - [fields] Fix usage of `slotProps.textField.InputProps` (#8428) @flaviendelangle
38
+ - [pickers] Fix `componentsProps.dialog` propagation (#8509) @LukasTy
39
+ - [pickers] Move `hasError` from `fieldValueManager` to `valueManager` (#8453) @flaviendelangle
40
+ - [pickers] Move the adapters interfaces to the X repository (#8412) @flaviendelangle
41
+ - [pickers] Update peer dependency versions (#8531) @LukasTy
42
+ - [pickers] Fix `isValid` regression (#8543) @LukasTy
43
+ - [l10n] Add Catalan (Spain) (ca-ES) and improve Spanish (es-ES) locales (#8498) @makenshikuro
44
+ - [l10n] Add Kazakh (kz-KZ) locale (#8451) @zhunus
45
+ - [l10n] Improve Dutch (nl-NL) locale (#8491) @thedutchruben
46
+ - [l10n] Improve Hebrew (he-IL) locale (#8464) @soris1989
47
+ - [l10n] Improve Japanese (ja-JP) locale (#8462) @megos
48
+ - [l10n] Improve Portuguese (pt-BR) locale (#8480) @pwnedev
49
+
50
+ ### Docs
51
+
52
+ - [docs] Fix 301 redirect (#8524) @alexfauquette
53
+ - [docs] Fix 404 links (#8454) @alexfauquette
54
+ - [docs] Fix broken API reference link (#8460) @oliviertassinari
55
+
56
+ ### Core
57
+
58
+ - [core] Avoid 301 links (#8383) @oliviertassinari
59
+ - [core] Fix the l10n helper by using danger instead of actions (#8512) @alexfauquette
60
+ - [core] Help contributors for l10n PRs (#8503) @alexfauquette
61
+ - [core] Remove legacy token (#8457) @oliviertassinari
62
+ - [charts] Add a styling system (#8445) @alexfauquette
63
+
6
64
  ## 6.0.4
7
65
 
8
66
  _Mar 30, 2023_
@@ -38,9 +38,9 @@ export declare const getCellGroupingCriteria: ({ row, id, colDef, groupingRule,
38
38
  export declare const getGroupingRules: ({ sanitizedRowGroupingModel, columnsLookup, }: {
39
39
  sanitizedRowGroupingModel: GridRowGroupingModel;
40
40
  columnsLookup: GridColumnRawLookup;
41
- }) => GridGroupingRules<import("@mui/x-data-grid-pro").GridValidRowModel>;
41
+ }) => GridGroupingRules;
42
42
  /**
43
43
  * Compares two sets of grouping rules to determine if they are equal or not.
44
44
  */
45
- export declare const areGroupingRulesEqual: (newValue: GridGroupingRules<import("@mui/x-data-grid-pro").GridValidRowModel>, previousValue: GridGroupingRules<import("@mui/x-data-grid-pro").GridValidRowModel>) => boolean;
45
+ export declare const areGroupingRulesEqual: (newValue: GridGroupingRules, previousValue: GridGroupingRules) => boolean;
46
46
  export {};
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.0.4
2
+ * @mui/x-data-grid-premium v6.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -13,18 +13,16 @@ var getExcelJs = /*#__PURE__*/function () {
13
13
  var _excelJsModule$defaul;
14
14
  var excelJsModule;
15
15
  return _regeneratorRuntime.wrap(function _callee$(_context) {
16
- while (1) {
17
- switch (_context.prev = _context.next) {
18
- case 0:
19
- _context.next = 2;
20
- return import('exceljs');
21
- case 2:
22
- excelJsModule = _context.sent;
23
- return _context.abrupt("return", (_excelJsModule$defaul = excelJsModule.default) != null ? _excelJsModule$defaul : excelJsModule);
24
- case 4:
25
- case "end":
26
- return _context.stop();
27
- }
16
+ while (1) switch (_context.prev = _context.next) {
17
+ case 0:
18
+ _context.next = 2;
19
+ return import('exceljs');
20
+ case 2:
21
+ excelJsModule = _context.sent;
22
+ return _context.abrupt("return", (_excelJsModule$defaul = excelJsModule.default) != null ? _excelJsModule$defaul : excelJsModule);
23
+ case 4:
24
+ case "end":
25
+ return _context.stop();
28
26
  }
29
27
  }, _callee);
30
28
  }));
@@ -256,41 +254,39 @@ function _getDataForValueOptionsSheet() {
256
254
  _getDataForValueOptionsSheet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(columns, valueOptionsSheetName, api) {
257
255
  var candidateColumns, excelJS, workbook, worksheet;
258
256
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
259
- while (1) {
260
- switch (_context3.prev = _context3.next) {
261
- case 0:
262
- candidateColumns = columns.filter(function (column) {
263
- return isSingleSelectColDef(column) && Array.isArray(column.valueOptions);
264
- }); // Creates a temp worksheet to obtain the column letters
265
- _context3.next = 3;
266
- return getExcelJs();
267
- case 3:
268
- excelJS = _context3.sent;
269
- workbook = new excelJS.Workbook();
270
- worksheet = workbook.addWorksheet('Sheet1');
271
- worksheet.columns = candidateColumns.map(function (column) {
272
- return {
273
- key: column.field
274
- };
275
- });
276
- return _context3.abrupt("return", candidateColumns.reduce(function (acc, column) {
277
- var _column$headerName2;
278
- var singleSelectColumn = column;
279
- var formattedValueOptions = getFormattedValueOptions(singleSelectColumn, singleSelectColumn.valueOptions, api);
280
- var header = (_column$headerName2 = column.headerName) != null ? _column$headerName2 : column.field;
281
- var values = [header].concat(_toConsumableArray(formattedValueOptions));
282
- var letter = worksheet.getColumn(column.field).letter;
283
- var address = "".concat(valueOptionsSheetName, "!$").concat(letter, "$2:$").concat(letter, "$").concat(values.length);
284
- acc[column.field] = {
285
- values: values,
286
- address: address
287
- };
288
- return acc;
289
- }, {}));
290
- case 8:
291
- case "end":
292
- return _context3.stop();
293
- }
257
+ while (1) switch (_context3.prev = _context3.next) {
258
+ case 0:
259
+ candidateColumns = columns.filter(function (column) {
260
+ return isSingleSelectColDef(column) && Array.isArray(column.valueOptions);
261
+ }); // Creates a temp worksheet to obtain the column letters
262
+ _context3.next = 3;
263
+ return getExcelJs();
264
+ case 3:
265
+ excelJS = _context3.sent;
266
+ workbook = new excelJS.Workbook();
267
+ worksheet = workbook.addWorksheet('Sheet1');
268
+ worksheet.columns = candidateColumns.map(function (column) {
269
+ return {
270
+ key: column.field
271
+ };
272
+ });
273
+ return _context3.abrupt("return", candidateColumns.reduce(function (acc, column) {
274
+ var _column$headerName2;
275
+ var singleSelectColumn = column;
276
+ var formattedValueOptions = getFormattedValueOptions(singleSelectColumn, singleSelectColumn.valueOptions, api);
277
+ var header = (_column$headerName2 = column.headerName) != null ? _column$headerName2 : column.field;
278
+ var values = [header].concat(_toConsumableArray(formattedValueOptions));
279
+ var letter = worksheet.getColumn(column.field).letter;
280
+ var address = "".concat(valueOptionsSheetName, "!$").concat(letter, "$2:$").concat(letter, "$").concat(values.length);
281
+ acc[column.field] = {
282
+ values: values,
283
+ address: address
284
+ };
285
+ return acc;
286
+ }, {}));
287
+ case 8:
288
+ case "end":
289
+ return _context3.stop();
294
290
  }
295
291
  }, _callee3);
296
292
  }));
@@ -322,31 +318,29 @@ function _createValueOptionsSheetIfNeeded() {
322
318
  _createValueOptionsSheetIfNeeded = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(valueOptionsData, sheetName, workbook) {
323
319
  var valueOptionsWorksheet;
324
320
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
325
- while (1) {
326
- switch (_context4.prev = _context4.next) {
327
- case 0:
328
- if (!(Object.keys(valueOptionsData).length === 0)) {
329
- _context4.next = 2;
330
- break;
331
- }
332
- return _context4.abrupt("return");
333
- case 2:
334
- valueOptionsWorksheet = workbook.addWorksheet(sheetName);
335
- valueOptionsWorksheet.columns = Object.keys(valueOptionsData).map(function (key) {
336
- return {
337
- key: key
338
- };
339
- });
340
- Object.entries(valueOptionsData).forEach(function (_ref5) {
341
- var _ref6 = _slicedToArray(_ref5, 2),
342
- field = _ref6[0],
343
- values = _ref6[1].values;
344
- valueOptionsWorksheet.getColumn(field).values = values;
345
- });
346
- case 5:
347
- case "end":
348
- return _context4.stop();
349
- }
321
+ while (1) switch (_context4.prev = _context4.next) {
322
+ case 0:
323
+ if (!(Object.keys(valueOptionsData).length === 0)) {
324
+ _context4.next = 2;
325
+ break;
326
+ }
327
+ return _context4.abrupt("return");
328
+ case 2:
329
+ valueOptionsWorksheet = workbook.addWorksheet(sheetName);
330
+ valueOptionsWorksheet.columns = Object.keys(valueOptionsData).map(function (key) {
331
+ return {
332
+ key: key
333
+ };
334
+ });
335
+ Object.entries(valueOptionsData).forEach(function (_ref5) {
336
+ var _ref6 = _slicedToArray(_ref5, 2),
337
+ field = _ref6[0],
338
+ values = _ref6[1].values;
339
+ valueOptionsWorksheet.getColumn(field).values = values;
340
+ });
341
+ case 5:
342
+ case "end":
343
+ return _context4.stop();
350
344
  }
351
345
  }, _callee4);
352
346
  }));
@@ -359,133 +353,129 @@ function _buildExcel() {
359
353
  _buildExcel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(options, api) {
360
354
  var columns, rowIds, includeHeaders, includeColumnGroupsHeaders, _options$valueOptions, valueOptionsSheetName, exceljsPreProcess, exceljsPostProcess, _options$columnsStyle, columnsStyles, excelJS, workbook, worksheet, serializedColumns, columnGroupPaths, valueOptionsData;
361
355
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
362
- while (1) {
363
- switch (_context5.prev = _context5.next) {
356
+ while (1) switch (_context5.prev = _context5.next) {
357
+ case 0:
358
+ columns = options.columns, rowIds = options.rowIds, includeHeaders = options.includeHeaders, includeColumnGroupsHeaders = options.includeColumnGroupsHeaders, _options$valueOptions = options.valueOptionsSheetName, valueOptionsSheetName = _options$valueOptions === void 0 ? 'Options' : _options$valueOptions, exceljsPreProcess = options.exceljsPreProcess, exceljsPostProcess = options.exceljsPostProcess, _options$columnsStyle = options.columnsStyles, columnsStyles = _options$columnsStyle === void 0 ? {} : _options$columnsStyle;
359
+ _context5.next = 3;
360
+ return getExcelJs();
361
+ case 3:
362
+ excelJS = _context5.sent;
363
+ workbook = new excelJS.Workbook();
364
+ worksheet = workbook.addWorksheet('Sheet1');
365
+ serializedColumns = serializeColumns(columns, columnsStyles);
366
+ worksheet.columns = serializedColumns;
367
+ if (!exceljsPreProcess) {
368
+ _context5.next = 11;
369
+ break;
370
+ }
371
+ _context5.next = 11;
372
+ return exceljsPreProcess({
373
+ workbook: workbook,
374
+ worksheet: worksheet
375
+ });
376
+ case 11:
377
+ if (includeColumnGroupsHeaders) {
378
+ columnGroupPaths = columns.reduce(function (acc, column) {
379
+ acc[column.field] = api.unstable_getColumnGroupPath(column.field);
380
+ return acc;
381
+ }, {});
382
+ addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths, api.unstable_getAllGroupDetails());
383
+ }
384
+ if (includeHeaders) {
385
+ worksheet.addRow(columns.map(function (column) {
386
+ var _column$headerName3;
387
+ return (_column$headerName3 = column.headerName) != null ? _column$headerName3 : column.field;
388
+ }));
389
+ }
390
+ _context5.next = 15;
391
+ return getDataForValueOptionsSheet(columns, valueOptionsSheetName, api);
392
+ case 15:
393
+ valueOptionsData = _context5.sent;
394
+ createValueOptionsSheetIfNeeded(valueOptionsData, valueOptionsSheetName, workbook);
395
+ rowIds.forEach(function (id) {
396
+ var serializedRow = serializeRow(id, columns, api, valueOptionsData);
397
+ addSerializedRowToWorksheet(serializedRow, worksheet);
398
+ });
399
+ if (!exceljsPostProcess) {
400
+ _context5.next = 21;
401
+ break;
402
+ }
403
+ _context5.next = 21;
404
+ return exceljsPostProcess({
405
+ workbook: workbook,
406
+ worksheet: worksheet
407
+ });
408
+ case 21:
409
+ return _context5.abrupt("return", workbook);
410
+ case 22:
411
+ case "end":
412
+ return _context5.stop();
413
+ }
414
+ }, _callee5);
415
+ }));
416
+ return _buildExcel.apply(this, arguments);
417
+ }
418
+ export function setupExcelExportWebWorker() {
419
+ var workerOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
420
+ // eslint-disable-next-line no-restricted-globals
421
+ addEventListener('message', /*#__PURE__*/function () {
422
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(event) {
423
+ var _options$includeHeade;
424
+ var _event$data, serializedColumns, serializedRows, options, valueOptionsSheetName, valueOptionsData, columnGroupDetails, columnGroupPaths, exceljsPostProcess, exceljsPreProcess, excelJS, workbook, worksheet, includeHeaders;
425
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
426
+ while (1) switch (_context2.prev = _context2.next) {
364
427
  case 0:
365
- columns = options.columns, rowIds = options.rowIds, includeHeaders = options.includeHeaders, includeColumnGroupsHeaders = options.includeColumnGroupsHeaders, _options$valueOptions = options.valueOptionsSheetName, valueOptionsSheetName = _options$valueOptions === void 0 ? 'Options' : _options$valueOptions, exceljsPreProcess = options.exceljsPreProcess, exceljsPostProcess = options.exceljsPostProcess, _options$columnsStyle = options.columnsStyles, columnsStyles = _options$columnsStyle === void 0 ? {} : _options$columnsStyle;
366
- _context5.next = 3;
428
+ _event$data = event.data, serializedColumns = _event$data.serializedColumns, serializedRows = _event$data.serializedRows, options = _event$data.options, valueOptionsSheetName = _event$data.valueOptionsSheetName, valueOptionsData = _event$data.valueOptionsData, columnGroupDetails = _event$data.columnGroupDetails, columnGroupPaths = _event$data.columnGroupPaths;
429
+ exceljsPostProcess = workerOptions.exceljsPostProcess, exceljsPreProcess = workerOptions.exceljsPreProcess;
430
+ _context2.next = 4;
367
431
  return getExcelJs();
368
- case 3:
369
- excelJS = _context5.sent;
432
+ case 4:
433
+ excelJS = _context2.sent;
370
434
  workbook = new excelJS.Workbook();
371
435
  worksheet = workbook.addWorksheet('Sheet1');
372
- serializedColumns = serializeColumns(columns, columnsStyles);
373
436
  worksheet.columns = serializedColumns;
374
437
  if (!exceljsPreProcess) {
375
- _context5.next = 11;
438
+ _context2.next = 11;
376
439
  break;
377
440
  }
378
- _context5.next = 11;
441
+ _context2.next = 11;
379
442
  return exceljsPreProcess({
380
443
  workbook: workbook,
381
444
  worksheet: worksheet
382
445
  });
383
446
  case 11:
384
- if (includeColumnGroupsHeaders) {
385
- columnGroupPaths = columns.reduce(function (acc, column) {
386
- acc[column.field] = api.unstable_getColumnGroupPath(column.field);
387
- return acc;
388
- }, {});
389
- addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths, api.unstable_getAllGroupDetails());
447
+ if (options.includeColumnGroupsHeaders) {
448
+ addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths, columnGroupDetails);
390
449
  }
450
+ includeHeaders = (_options$includeHeade = options.includeHeaders) != null ? _options$includeHeade : true;
391
451
  if (includeHeaders) {
392
- worksheet.addRow(columns.map(function (column) {
393
- var _column$headerName3;
394
- return (_column$headerName3 = column.headerName) != null ? _column$headerName3 : column.field;
452
+ worksheet.addRow(serializedColumns.map(function (column) {
453
+ return column.headerText;
395
454
  }));
396
455
  }
397
- _context5.next = 15;
398
- return getDataForValueOptionsSheet(columns, valueOptionsSheetName, api);
399
- case 15:
400
- valueOptionsData = _context5.sent;
401
456
  createValueOptionsSheetIfNeeded(valueOptionsData, valueOptionsSheetName, workbook);
402
- rowIds.forEach(function (id) {
403
- var serializedRow = serializeRow(id, columns, api, valueOptionsData);
457
+ serializedRows.forEach(function (serializedRow) {
404
458
  addSerializedRowToWorksheet(serializedRow, worksheet);
405
459
  });
406
460
  if (!exceljsPostProcess) {
407
- _context5.next = 21;
461
+ _context2.next = 19;
408
462
  break;
409
463
  }
410
- _context5.next = 21;
464
+ _context2.next = 19;
411
465
  return exceljsPostProcess({
412
466
  workbook: workbook,
413
467
  worksheet: worksheet
414
468
  });
415
- case 21:
416
- return _context5.abrupt("return", workbook);
469
+ case 19:
470
+ _context2.t0 = postMessage;
471
+ _context2.next = 22;
472
+ return workbook.xlsx.writeBuffer();
417
473
  case 22:
474
+ _context2.t1 = _context2.sent;
475
+ (0, _context2.t0)(_context2.t1);
476
+ case 24:
418
477
  case "end":
419
- return _context5.stop();
420
- }
421
- }
422
- }, _callee5);
423
- }));
424
- return _buildExcel.apply(this, arguments);
425
- }
426
- export function setupExcelExportWebWorker() {
427
- var workerOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
428
- // eslint-disable-next-line no-restricted-globals
429
- addEventListener('message', /*#__PURE__*/function () {
430
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(event) {
431
- var _options$includeHeade;
432
- var _event$data, serializedColumns, serializedRows, options, valueOptionsSheetName, valueOptionsData, columnGroupDetails, columnGroupPaths, exceljsPostProcess, exceljsPreProcess, excelJS, workbook, worksheet, includeHeaders;
433
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
434
- while (1) {
435
- switch (_context2.prev = _context2.next) {
436
- case 0:
437
- _event$data = event.data, serializedColumns = _event$data.serializedColumns, serializedRows = _event$data.serializedRows, options = _event$data.options, valueOptionsSheetName = _event$data.valueOptionsSheetName, valueOptionsData = _event$data.valueOptionsData, columnGroupDetails = _event$data.columnGroupDetails, columnGroupPaths = _event$data.columnGroupPaths;
438
- exceljsPostProcess = workerOptions.exceljsPostProcess, exceljsPreProcess = workerOptions.exceljsPreProcess;
439
- _context2.next = 4;
440
- return getExcelJs();
441
- case 4:
442
- excelJS = _context2.sent;
443
- workbook = new excelJS.Workbook();
444
- worksheet = workbook.addWorksheet('Sheet1');
445
- worksheet.columns = serializedColumns;
446
- if (!exceljsPreProcess) {
447
- _context2.next = 11;
448
- break;
449
- }
450
- _context2.next = 11;
451
- return exceljsPreProcess({
452
- workbook: workbook,
453
- worksheet: worksheet
454
- });
455
- case 11:
456
- if (options.includeColumnGroupsHeaders) {
457
- addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths, columnGroupDetails);
458
- }
459
- includeHeaders = (_options$includeHeade = options.includeHeaders) != null ? _options$includeHeade : true;
460
- if (includeHeaders) {
461
- worksheet.addRow(serializedColumns.map(function (column) {
462
- return column.headerText;
463
- }));
464
- }
465
- createValueOptionsSheetIfNeeded(valueOptionsData, valueOptionsSheetName, workbook);
466
- serializedRows.forEach(function (serializedRow) {
467
- addSerializedRowToWorksheet(serializedRow, worksheet);
468
- });
469
- if (!exceljsPostProcess) {
470
- _context2.next = 19;
471
- break;
472
- }
473
- _context2.next = 19;
474
- return exceljsPostProcess({
475
- workbook: workbook,
476
- worksheet: worksheet
477
- });
478
- case 19:
479
- _context2.t0 = postMessage;
480
- _context2.next = 22;
481
- return workbook.xlsx.writeBuffer();
482
- case 22:
483
- _context2.t1 = _context2.sent;
484
- (0, _context2.t0)(_context2.t1);
485
- case 24:
486
- case "end":
487
- return _context2.stop();
488
- }
478
+ return _context2.stop();
489
479
  }
490
480
  }, _callee2);
491
481
  }));
@@ -67,101 +67,97 @@ export var useGridExcelExport = function useGridExcelExport(apiRef, props) {
67
67
  message,
68
68
  _args2 = arguments;
69
69
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
70
- while (1) {
71
- switch (_context2.prev = _context2.next) {
72
- case 0:
73
- options = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
74
- workerFn = options.worker, exceljsPostProcess = options.exceljsPostProcess, exceljsPreProcess = options.exceljsPreProcess, columnsStyles = options.columnsStyles, includeHeaders = options.includeHeaders, _options$getRowsToExp2 = options.getRowsToExport, getRowsToExport = _options$getRowsToExp2 === void 0 ? defaultGetRowsToExport : _options$getRowsToExp2, _options$valueOptions = options.valueOptionsSheetName, valueOptionsSheetName = _options$valueOptions === void 0 ? 'Options' : _options$valueOptions, cloneableOptions = _objectWithoutProperties(options, _excluded);
75
- sendExcelToUser = function sendExcelToUser(buffer) {
76
- var blob = new Blob([buffer], {
77
- type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
78
- });
79
- exportAs(blob, 'xlsx', options == null ? void 0 : options.fileName);
80
- };
81
- if (workerFn) {
82
- _context2.next = 16;
83
- break;
84
- }
85
- apiRef.current.publishEvent('excelExportStateChange', 'pending');
86
- _context2.next = 7;
87
- return getDataAsExcel(options);
88
- case 7:
89
- workbook = _context2.sent;
90
- if (!(workbook === null)) {
91
- _context2.next = 10;
92
- break;
93
- }
94
- return _context2.abrupt("return");
95
- case 10:
96
- _context2.next = 12;
97
- return workbook.xlsx.writeBuffer();
98
- case 12:
99
- content = _context2.sent;
100
- apiRef.current.publishEvent('excelExportStateChange', 'finished');
101
- sendExcelToUser(content);
102
- return _context2.abrupt("return");
103
- case 16:
104
- if (exceljsPostProcess && process.env.NODE_ENV !== 'production') {
105
- console.warn(["MUI: The exceljsPostProcess option is not supported when a web worker is used.", 'As alternative, pass the callback to the same option in setupExcelExportWebWorker.'].join('\n'));
106
- }
107
- if (exceljsPreProcess && process.env.NODE_ENV !== 'production') {
108
- console.warn(["MUI: The exceljsPreProcess option is not supported when a web worker is used.", 'As alternative, pass the callback to the same option in setupExcelExportWebWorker.'].join('\n'));
109
- }
110
- worker = workerFn();
111
- apiRef.current.publishEvent('excelExportStateChange', 'pending');
112
- worker.onmessage = /*#__PURE__*/function () {
113
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {
114
- return _regeneratorRuntime.wrap(function _callee$(_context) {
115
- while (1) {
116
- switch (_context.prev = _context.next) {
117
- case 0:
118
- sendExcelToUser(event.data);
119
- apiRef.current.publishEvent('excelExportStateChange', 'finished');
120
- worker.terminate();
121
- case 3:
122
- case "end":
123
- return _context.stop();
124
- }
125
- }
126
- }, _callee);
127
- }));
128
- return function (_x) {
129
- return _ref2.apply(this, arguments);
130
- };
131
- }();
132
- exportedRowIds = getRowsToExport({
133
- apiRef: apiRef
134
- });
135
- exportedColumns = getColumnsToExport({
136
- apiRef: apiRef,
137
- options: options
138
- });
139
- _context2.next = 25;
140
- return getDataForValueOptionsSheet(exportedColumns, valueOptionsSheetName, apiRef.current);
141
- case 25:
142
- valueOptionsData = _context2.sent;
143
- serializedColumns = serializeColumns(exportedColumns, options.columnsStyles || {});
144
- serializedRows = exportedRowIds.map(function (id) {
145
- return serializeRow(id, exportedColumns, apiRef.current, valueOptionsData);
70
+ while (1) switch (_context2.prev = _context2.next) {
71
+ case 0:
72
+ options = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
73
+ workerFn = options.worker, exceljsPostProcess = options.exceljsPostProcess, exceljsPreProcess = options.exceljsPreProcess, columnsStyles = options.columnsStyles, includeHeaders = options.includeHeaders, _options$getRowsToExp2 = options.getRowsToExport, getRowsToExport = _options$getRowsToExp2 === void 0 ? defaultGetRowsToExport : _options$getRowsToExp2, _options$valueOptions = options.valueOptionsSheetName, valueOptionsSheetName = _options$valueOptions === void 0 ? 'Options' : _options$valueOptions, cloneableOptions = _objectWithoutProperties(options, _excluded);
74
+ sendExcelToUser = function sendExcelToUser(buffer) {
75
+ var blob = new Blob([buffer], {
76
+ type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
146
77
  });
147
- columnGroupPaths = exportedColumns.reduce(function (acc, column) {
148
- acc[column.field] = apiRef.current.unstable_getColumnGroupPath(column.field);
149
- return acc;
150
- }, {});
151
- message = {
152
- serializedColumns: serializedColumns,
153
- serializedRows: serializedRows,
154
- valueOptionsData: valueOptionsData,
155
- columnGroupPaths: columnGroupPaths,
156
- columnGroupDetails: apiRef.current.unstable_getAllGroupDetails(),
157
- options: cloneableOptions,
158
- valueOptionsSheetName: valueOptionsSheetName
78
+ exportAs(blob, 'xlsx', options == null ? void 0 : options.fileName);
79
+ };
80
+ if (workerFn) {
81
+ _context2.next = 16;
82
+ break;
83
+ }
84
+ apiRef.current.publishEvent('excelExportStateChange', 'pending');
85
+ _context2.next = 7;
86
+ return getDataAsExcel(options);
87
+ case 7:
88
+ workbook = _context2.sent;
89
+ if (!(workbook === null)) {
90
+ _context2.next = 10;
91
+ break;
92
+ }
93
+ return _context2.abrupt("return");
94
+ case 10:
95
+ _context2.next = 12;
96
+ return workbook.xlsx.writeBuffer();
97
+ case 12:
98
+ content = _context2.sent;
99
+ apiRef.current.publishEvent('excelExportStateChange', 'finished');
100
+ sendExcelToUser(content);
101
+ return _context2.abrupt("return");
102
+ case 16:
103
+ if (exceljsPostProcess && process.env.NODE_ENV !== 'production') {
104
+ console.warn(["MUI: The exceljsPostProcess option is not supported when a web worker is used.", 'As alternative, pass the callback to the same option in setupExcelExportWebWorker.'].join('\n'));
105
+ }
106
+ if (exceljsPreProcess && process.env.NODE_ENV !== 'production') {
107
+ console.warn(["MUI: The exceljsPreProcess option is not supported when a web worker is used.", 'As alternative, pass the callback to the same option in setupExcelExportWebWorker.'].join('\n'));
108
+ }
109
+ worker = workerFn();
110
+ apiRef.current.publishEvent('excelExportStateChange', 'pending');
111
+ worker.onmessage = /*#__PURE__*/function () {
112
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {
113
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
114
+ while (1) switch (_context.prev = _context.next) {
115
+ case 0:
116
+ sendExcelToUser(event.data);
117
+ apiRef.current.publishEvent('excelExportStateChange', 'finished');
118
+ worker.terminate();
119
+ case 3:
120
+ case "end":
121
+ return _context.stop();
122
+ }
123
+ }, _callee);
124
+ }));
125
+ return function (_x) {
126
+ return _ref2.apply(this, arguments);
159
127
  };
160
- worker.postMessage(message);
161
- case 31:
162
- case "end":
163
- return _context2.stop();
164
- }
128
+ }();
129
+ exportedRowIds = getRowsToExport({
130
+ apiRef: apiRef
131
+ });
132
+ exportedColumns = getColumnsToExport({
133
+ apiRef: apiRef,
134
+ options: options
135
+ });
136
+ _context2.next = 25;
137
+ return getDataForValueOptionsSheet(exportedColumns, valueOptionsSheetName, apiRef.current);
138
+ case 25:
139
+ valueOptionsData = _context2.sent;
140
+ serializedColumns = serializeColumns(exportedColumns, options.columnsStyles || {});
141
+ serializedRows = exportedRowIds.map(function (id) {
142
+ return serializeRow(id, exportedColumns, apiRef.current, valueOptionsData);
143
+ });
144
+ columnGroupPaths = exportedColumns.reduce(function (acc, column) {
145
+ acc[column.field] = apiRef.current.unstable_getColumnGroupPath(column.field);
146
+ return acc;
147
+ }, {});
148
+ message = {
149
+ serializedColumns: serializedColumns,
150
+ serializedRows: serializedRows,
151
+ valueOptionsData: valueOptionsData,
152
+ columnGroupPaths: columnGroupPaths,
153
+ columnGroupDetails: apiRef.current.unstable_getAllGroupDetails(),
154
+ options: cloneableOptions,
155
+ valueOptionsSheetName: valueOptionsSheetName
156
+ };
157
+ worker.postMessage(message);
158
+ case 31:
159
+ case "end":
160
+ return _context2.stop();
165
161
  }
166
162
  }, _callee2);
167
163
  })), [apiRef, getDataAsExcel]);
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.0.4
2
+ * @mui/x-data-grid-premium v6.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -4,4 +4,12 @@ export { useGridRootProps } from '../hooks/utils/useGridRootProps';
4
4
 
5
5
  /**
6
6
  * The full grid API.
7
+ */
8
+
9
+ /**
10
+ * The state of `DataGridPremium`.
11
+ */
12
+
13
+ /**
14
+ * The initial state of `DataGridPremium`.
7
15
  */
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY4MDEyNzIwMDAwMA==";
3
+ var releaseInfo = "MTY4MTA3NDAwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.0.4
2
+ * @mui/x-data-grid-premium v6.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -4,4 +4,12 @@ export { useGridRootProps } from '../hooks/utils/useGridRootProps';
4
4
 
5
5
  /**
6
6
  * The full grid API.
7
+ */
8
+
9
+ /**
10
+ * The state of `DataGridPremium`.
11
+ */
12
+
13
+ /**
14
+ * The initial state of `DataGridPremium`.
7
15
  */
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY4MDEyNzIwMDAwMA==";
3
+ const releaseInfo = "MTY4MTA3NDAwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -13,8 +13,6 @@ var _excelSerializer = require("./serializer/excelSerializer");
13
13
  var _components = require("../../../components");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  const _excluded = ["worker", "exceljsPostProcess", "exceljsPreProcess", "columnsStyles", "includeHeaders", "getRowsToExport", "valueOptionsSheetName"];
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
16
  /**
19
17
  * @requires useGridColumns (state)
20
18
  * @requires useGridFilter (state)
@@ -22,6 +20,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
22
20
  * @requires useGridSelection (state)
23
21
  * @requires useGridParamsApi (method)
24
22
  */
23
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
25
  const useGridExcelExport = (apiRef, props) => {
26
26
  const logger = (0, _xDataGrid.useGridLogger)(apiRef, 'useGridExcelExport');
27
27
  const getDataAsExcel = React.useCallback((options = {}) => {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v6.0.4
2
+ * @mui/x-data-grid-premium v6.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTY4MDEyNzIwMDAwMA==";
9
+ const releaseInfo = "MTY4MTA3NDAwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-premium",
3
- "version": "6.0.4",
3
+ "version": "6.1.0",
4
4
  "description": "The Premium plan edition of the data grid component (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -33,9 +33,9 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.21.0",
35
35
  "@mui/utils": "^5.11.13",
36
- "@mui/x-data-grid": "6.0.4",
37
- "@mui/x-data-grid-pro": "6.0.4",
38
- "@mui/x-license-pro": "6.0.3",
36
+ "@mui/x-data-grid": "6.1.0",
37
+ "@mui/x-data-grid-pro": "6.1.0",
38
+ "@mui/x-license-pro": "6.0.4",
39
39
  "@types/format-util": "^1.0.2",
40
40
  "clsx": "^1.2.1",
41
41
  "exceljs": "^4.3.0",
@@ -4,4 +4,12 @@ export { useGridRootProps } from '../hooks/utils/useGridRootProps';
4
4
 
5
5
  /**
6
6
  * The full grid API.
7
+ */
8
+
9
+ /**
10
+ * The state of `DataGridPremium`.
11
+ */
12
+
13
+ /**
14
+ * The initial state of `DataGridPremium`.
7
15
  */
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY4MDEyNzIwMDAwMA==";
3
+ const releaseInfo = "MTY4MTA3NDAwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat