@mui/x-data-grid-premium 7.5.1 → 7.6.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 +87 -1
- package/DataGridPremium/DataGridPremium.js +1 -1
- package/esm/DataGridPremium/DataGridPremium.js +1 -1
- package/esm/hooks/features/export/serializer/excelSerializer.js +33 -23
- package/esm/hooks/features/export/useGridExcelExport.js +5 -3
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/export/serializer/excelSerializer.d.ts +9 -2
- package/hooks/features/export/serializer/excelSerializer.js +34 -24
- package/hooks/features/export/useGridExcelExport.js +4 -2
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/modern/DataGridPremium/DataGridPremium.js +1 -1
- package/modern/hooks/features/export/serializer/excelSerializer.js +33 -23
- package/modern/hooks/features/export/useGridExcelExport.js +5 -3
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +6 -6
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,92 @@
|
|
|
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
|
+
## 7.6.0
|
|
7
|
+
|
|
8
|
+
_May 30, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 Allow to define and customize the indentation of nested items in the Tree View
|
|
13
|
+
- ✨ Allow charts highlights to be controlled
|
|
14
|
+
- 🌍 Improve Persian (fa-IR) locale on the Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@7.6.0`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Avoid re-rendering all cells on column change (#12980) @romgrk
|
|
25
|
+
- [DataGrid] Export `GridColumnHeadersProps` (#13229) @cherniavskii
|
|
26
|
+
- [DataGrid] Fix header filters' issue with custom filters (#13255) @MBilalShafi
|
|
27
|
+
- [DataGrid] Remove dead logic to support Safari < 13 (#13249) @oliviertassinari
|
|
28
|
+
- [l10n] Improve Persian (fa-IR) locale (#12994) @amiryxe
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-pro@7.6.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid@7.6.0`.
|
|
33
|
+
|
|
34
|
+
#### `@mui/x-data-grid-premium@7.6.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
35
|
+
|
|
36
|
+
Same changes as in `@mui/x-data-grid-pro@7.6.0`, plus:
|
|
37
|
+
|
|
38
|
+
- [DataGridPremium] Fix excel export causing column with wrong width (#13191) @romgrk
|
|
39
|
+
|
|
40
|
+
### Date and Time Pickers
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-date-pickers@7.6.0`
|
|
43
|
+
|
|
44
|
+
- [pickers] Fix `DateBuilderReturnType` when the date is `undefined` (#13244) @alexey-kozlenkov
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-date-pickers-pro@7.6.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
47
|
+
|
|
48
|
+
Same changes as in `@mui/x-date-pickers@7.6.0`.
|
|
49
|
+
|
|
50
|
+
### Charts
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-charts@7.6.0`
|
|
53
|
+
|
|
54
|
+
- [charts] Allow charts highlights to be controlled (#12828) @JCQuintas
|
|
55
|
+
- [charts] Refactor axis band scaleType check (#13295) @JCQuintas
|
|
56
|
+
- [charts] Refactor checkScaleErrors to improve readability and simplify axis message logic (#13305) @JCQuintas
|
|
57
|
+
|
|
58
|
+
### Tree View
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-tree-view@7.6.0`
|
|
61
|
+
|
|
62
|
+
- [TreeView] Add JSDoc to every instance method (#13219) @flaviendelangle
|
|
63
|
+
- [TreeView] Allow to customize the indentation of nested items (#13225) @flaviendelangle
|
|
64
|
+
- [TreeView] Allow to define indentation at the item level (#13126) @flaviendelangle
|
|
65
|
+
|
|
66
|
+
### Docs
|
|
67
|
+
|
|
68
|
+
- [docs] Add Bulk editing demo for the Community plan (#12800) @cherniavskii
|
|
69
|
+
- [docs] Add conditional label formatting on tooltip page and link to label page (#13235) @JCQuintas
|
|
70
|
+
- [docs] Add information about key combinations on a11y sections (#13234) @arthurbalduini
|
|
71
|
+
- [docs] Cleanup of the Tree View demos (#13237) @flaviendelangle
|
|
72
|
+
- [docs] Document how to customize a subsection of a line chart (#13210) @alexfauquette
|
|
73
|
+
- [docs] Fix Pickers FAQ callout (#13238) @LukasTy
|
|
74
|
+
- [docs] Fix Vale errors @oliviertassinari
|
|
75
|
+
- [docs] Fix a small typo in property comment (#13245) @Janpot
|
|
76
|
+
- [docs] Improve the Data Grid FAQ page (#13258) @MBilalShafi
|
|
77
|
+
- [docs] Removes unused lines in TreeItem2 styling (#13264) @arthurbalduini
|
|
78
|
+
- [docs] Small improvements on accessibility data grid doc (#13233) @arthurbalduini
|
|
79
|
+
- [docs] Update Pickers demo configurations (#13303) @LukasTy
|
|
80
|
+
|
|
81
|
+
### Core
|
|
82
|
+
|
|
83
|
+
- [core] Add comment on why logic to sync column header (#13248) @oliviertassinari
|
|
84
|
+
- [core] Fix `l10n` script execution with arguments (#13297) @LukasTy
|
|
85
|
+
- [core] Prevent "Add reviewers" workflow from triggering since it doesn't work (#13236) @JCQuintas
|
|
86
|
+
- [docs-infra] Fix `@mui/material` version used in sandboxes (#13260) @LukasTy
|
|
87
|
+
- [test] Use `describeTreeView` for keyboard navigation tests on disabled items (#13184) @flaviendelangle
|
|
88
|
+
- [test] Use `describeTreeView` for remaining items tests (#13262) @flaviendelangle
|
|
89
|
+
- [test] Use test-utils from npm (#12880) @michaldudak
|
|
90
|
+
- [typescript] Remove duplicate `DateRangePosition` type in favor of `RangePosition` (#13288) @LukasTy
|
|
91
|
+
|
|
6
92
|
## v7.5.1
|
|
7
93
|
|
|
8
94
|
_May 23, 2024_
|
|
@@ -339,7 +425,7 @@ Same changes as in `@mui/x-date-pickers@7.3.1`.
|
|
|
339
425
|
### Core
|
|
340
426
|
|
|
341
427
|
- [core] Fix `l10n` GH workflow (#12895) @LukasTy
|
|
342
|
-
- [core] Match Base
|
|
428
|
+
- [core] Match Base UI and Toolpad @oliviertassinari
|
|
343
429
|
- [core] Remove redundant `setupFiles` entries in `package.json` (#12899) @LukasTy
|
|
344
430
|
- [core] Use `describeTreeView` for focus tests (#12698) @flaviendelangle
|
|
345
431
|
- [core] Use `describeTreeView` for type-ahead tests (#12811) @flaviendelangle
|
|
@@ -92,7 +92,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
92
92
|
*/
|
|
93
93
|
'aria-labelledby': _propTypes.default.string,
|
|
94
94
|
/**
|
|
95
|
-
* If `true`, the Data Grid height is dynamic and
|
|
95
|
+
* If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
|
|
96
96
|
* @default false
|
|
97
97
|
*/
|
|
98
98
|
autoHeight: _propTypes.default.bool,
|
|
@@ -84,7 +84,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
84
84
|
*/
|
|
85
85
|
'aria-labelledby': PropTypes.string,
|
|
86
86
|
/**
|
|
87
|
-
* If `true`, the Data Grid height is dynamic and
|
|
87
|
+
* If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
|
|
88
88
|
* @default false
|
|
89
89
|
*/
|
|
90
90
|
autoHeight: PropTypes.bool,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { buildWarning, isObject, isSingleSelectColDef } from '@mui/x-data-grid/internals';
|
|
3
|
+
import { buildWarning, isObject, isSingleSelectColDef, gridHasColSpanSelector } from '@mui/x-data-grid/internals';
|
|
4
4
|
const getExcelJs = async () => {
|
|
5
5
|
const excelJsModule = await import('exceljs');
|
|
6
6
|
return excelJsModule.default ?? excelJsModule;
|
|
@@ -23,22 +23,30 @@ const getFormattedValueOptions = (colDef, row, valueOptions, api) => {
|
|
|
23
23
|
}
|
|
24
24
|
return valueOptionsFormatted.map(option => typeof option === 'object' ? option.label : option);
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* FIXME: This function mutates the colspan info, but colspan info assumes that the columns
|
|
28
|
+
* passed to it are always consistent. In this case, the exported columns may differ from the
|
|
29
|
+
* actual rendered columns.
|
|
30
|
+
* The caller of this function MUST call `resetColSpan()` before and after usage.
|
|
31
|
+
*/
|
|
32
|
+
export const serializeRowUnsafe = (id, columns, apiRef, defaultValueOptionsFormulae, options) => {
|
|
27
33
|
const row = {};
|
|
28
34
|
const dataValidation = {};
|
|
29
35
|
const mergedCells = [];
|
|
30
|
-
const firstCellParams =
|
|
36
|
+
const firstCellParams = apiRef.current.getCellParams(id, columns[0].field);
|
|
31
37
|
const outlineLevel = firstCellParams.rowNode.depth;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const hasColSpan = gridHasColSpanSelector(apiRef);
|
|
39
|
+
if (hasColSpan) {
|
|
40
|
+
// `colSpan` is only calculated for rendered rows, so we need to calculate it during export for every row
|
|
41
|
+
apiRef.current.calculateColSpan({
|
|
42
|
+
rowId: id,
|
|
43
|
+
minFirstColumn: 0,
|
|
44
|
+
maxLastColumn: columns.length,
|
|
45
|
+
columns
|
|
46
|
+
});
|
|
47
|
+
}
|
|
40
48
|
columns.forEach((column, colIndex) => {
|
|
41
|
-
const colSpanInfo =
|
|
49
|
+
const colSpanInfo = hasColSpan ? apiRef.current.unstable_getCellColSpanInfo(id, colIndex) : undefined;
|
|
42
50
|
if (colSpanInfo && colSpanInfo.spannedByColSpan) {
|
|
43
51
|
return;
|
|
44
52
|
}
|
|
@@ -48,7 +56,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
48
56
|
rightIndex: colIndex + colSpanInfo.cellProps.colSpan
|
|
49
57
|
});
|
|
50
58
|
}
|
|
51
|
-
const cellParams =
|
|
59
|
+
const cellParams = apiRef.current.getCellParams(id, column.field);
|
|
52
60
|
let cellValue;
|
|
53
61
|
switch (cellParams.colDef.type) {
|
|
54
62
|
case 'singleSelect':
|
|
@@ -62,7 +70,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
62
70
|
row,
|
|
63
71
|
field: cellParams.field
|
|
64
72
|
});
|
|
65
|
-
const formattedValueOptions = getFormattedValueOptions(castColumn, row, valueOptions,
|
|
73
|
+
const formattedValueOptions = getFormattedValueOptions(castColumn, row, valueOptions, apiRef.current);
|
|
66
74
|
dataValidation[castColumn.field] = {
|
|
67
75
|
type: 'list',
|
|
68
76
|
allowBlank: true,
|
|
@@ -78,7 +86,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
78
86
|
formulae: [address]
|
|
79
87
|
};
|
|
80
88
|
}
|
|
81
|
-
const formattedValue =
|
|
89
|
+
const formattedValue = apiRef.current.getCellParams(id, castColumn.field).formattedValue;
|
|
82
90
|
if (process.env.NODE_ENV !== 'production') {
|
|
83
91
|
if (String(cellParams.formattedValue) === '[object Object]') {
|
|
84
92
|
warnInvalidFormattedValue();
|
|
@@ -93,7 +101,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
93
101
|
}
|
|
94
102
|
case 'boolean':
|
|
95
103
|
case 'number':
|
|
96
|
-
cellValue =
|
|
104
|
+
cellValue = apiRef.current.getCellParams(id, column.field).value;
|
|
97
105
|
break;
|
|
98
106
|
case 'date':
|
|
99
107
|
case 'dateTime':
|
|
@@ -101,7 +109,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
101
109
|
// Excel does not do any timezone conversion, so we create a date using UTC instead of local timezone
|
|
102
110
|
// Solution from: https://github.com/exceljs/exceljs/issues/486#issuecomment-432557582
|
|
103
111
|
// About Date.UTC(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC#exemples
|
|
104
|
-
const value =
|
|
112
|
+
const value = apiRef.current.getCellParams(id, column.field).value;
|
|
105
113
|
// value may be `undefined` in auto-generated grouping rows
|
|
106
114
|
if (!value) {
|
|
107
115
|
break;
|
|
@@ -113,7 +121,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
113
121
|
case 'actions':
|
|
114
122
|
break;
|
|
115
123
|
default:
|
|
116
|
-
cellValue =
|
|
124
|
+
cellValue = apiRef.current.getCellParams(id, column.field).formattedValue;
|
|
117
125
|
if (process.env.NODE_ENV !== 'production') {
|
|
118
126
|
if (String(cellParams.formattedValue) === '[object Object]') {
|
|
119
127
|
warnInvalidFormattedValue();
|
|
@@ -276,7 +284,7 @@ async function createValueOptionsSheetIfNeeded(valueOptionsData, sheetName, work
|
|
|
276
284
|
valueOptionsWorksheet.getColumn(field).values = values;
|
|
277
285
|
});
|
|
278
286
|
}
|
|
279
|
-
export async function buildExcel(options,
|
|
287
|
+
export async function buildExcel(options, apiRef) {
|
|
280
288
|
const {
|
|
281
289
|
columns,
|
|
282
290
|
rowIds,
|
|
@@ -300,20 +308,22 @@ export async function buildExcel(options, api) {
|
|
|
300
308
|
}
|
|
301
309
|
if (includeColumnGroupsHeaders) {
|
|
302
310
|
const columnGroupPaths = columns.reduce((acc, column) => {
|
|
303
|
-
acc[column.field] =
|
|
311
|
+
acc[column.field] = apiRef.current.getColumnGroupPath(column.field);
|
|
304
312
|
return acc;
|
|
305
313
|
}, {});
|
|
306
|
-
addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths,
|
|
314
|
+
addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths, apiRef.current.getAllGroupDetails());
|
|
307
315
|
}
|
|
308
316
|
if (includeHeaders) {
|
|
309
317
|
worksheet.addRow(columns.map(column => column.headerName ?? column.field));
|
|
310
318
|
}
|
|
311
|
-
const valueOptionsData = await getDataForValueOptionsSheet(columns, valueOptionsSheetName,
|
|
319
|
+
const valueOptionsData = await getDataForValueOptionsSheet(columns, valueOptionsSheetName, apiRef.current);
|
|
312
320
|
createValueOptionsSheetIfNeeded(valueOptionsData, valueOptionsSheetName, workbook);
|
|
321
|
+
apiRef.current.resetColSpan();
|
|
313
322
|
rowIds.forEach(id => {
|
|
314
|
-
const serializedRow =
|
|
323
|
+
const serializedRow = serializeRowUnsafe(id, columns, apiRef, valueOptionsData, options);
|
|
315
324
|
addSerializedRowToWorksheet(serializedRow, worksheet);
|
|
316
325
|
});
|
|
326
|
+
apiRef.current.resetColSpan();
|
|
317
327
|
if (exceljsPostProcess) {
|
|
318
328
|
await exceljsPostProcess({
|
|
319
329
|
workbook,
|
|
@@ -3,7 +3,7 @@ const _excluded = ["worker", "exceljsPostProcess", "exceljsPreProcess", "columns
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useGridApiMethod, useGridLogger, useGridApiOptionHandler } from '@mui/x-data-grid';
|
|
5
5
|
import { useGridRegisterPipeProcessor, exportAs, getColumnsToExport, defaultGetRowsToExport } from '@mui/x-data-grid/internals';
|
|
6
|
-
import { buildExcel, getDataForValueOptionsSheet, serializeColumns,
|
|
6
|
+
import { buildExcel, getDataForValueOptionsSheet, serializeColumns, serializeRowUnsafe } from './serializer/excelSerializer';
|
|
7
7
|
import { GridExcelExportMenuItem } from '../../../components';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -36,7 +36,7 @@ export const useGridExcelExport = (apiRef, props) => {
|
|
|
36
36
|
exceljsPreProcess: options?.exceljsPreProcess,
|
|
37
37
|
exceljsPostProcess: options?.exceljsPostProcess,
|
|
38
38
|
escapeFormulas: options.escapeFormulas ?? true
|
|
39
|
-
}, apiRef
|
|
39
|
+
}, apiRef);
|
|
40
40
|
}, [logger, apiRef]);
|
|
41
41
|
const exportDataAsExcel = React.useCallback(async (options = {}) => {
|
|
42
42
|
const {
|
|
@@ -88,9 +88,11 @@ export const useGridExcelExport = (apiRef, props) => {
|
|
|
88
88
|
});
|
|
89
89
|
const valueOptionsData = await getDataForValueOptionsSheet(exportedColumns, valueOptionsSheetName, apiRef.current);
|
|
90
90
|
const serializedColumns = serializeColumns(exportedColumns, options.columnsStyles || {});
|
|
91
|
-
|
|
91
|
+
apiRef.current.resetColSpan();
|
|
92
|
+
const serializedRows = exportedRowIds.map(id => serializeRowUnsafe(id, exportedColumns, apiRef, valueOptionsData, {
|
|
92
93
|
escapeFormulas: options.escapeFormulas ?? true
|
|
93
94
|
}));
|
|
95
|
+
apiRef.current.resetColSpan();
|
|
94
96
|
const columnGroupPaths = exportedColumns.reduce((acc, column) => {
|
|
95
97
|
acc[column.field] = apiRef.current.getColumnGroupPath(column.field);
|
|
96
98
|
return acc;
|
package/esm/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcxNzAxNjQwMDAwMA==";
|
|
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
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type * as Excel from 'exceljs';
|
|
2
3
|
import { GridRowId, GridColDef } from '@mui/x-data-grid-pro';
|
|
3
4
|
import { GridStateColDef, GridColumnGroupLookup } from '@mui/x-data-grid/internals';
|
|
@@ -12,7 +13,13 @@ interface SerializedRow {
|
|
|
12
13
|
rightIndex: number;
|
|
13
14
|
}[];
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
/**
|
|
17
|
+
* FIXME: This function mutates the colspan info, but colspan info assumes that the columns
|
|
18
|
+
* passed to it are always consistent. In this case, the exported columns may differ from the
|
|
19
|
+
* actual rendered columns.
|
|
20
|
+
* The caller of this function MUST call `resetColSpan()` before and after usage.
|
|
21
|
+
*/
|
|
22
|
+
export declare const serializeRowUnsafe: (id: GridRowId, columns: GridStateColDef[], apiRef: React.MutableRefObject<GridPrivateApiPremium>, defaultValueOptionsFormulae: {
|
|
16
23
|
[field: string]: {
|
|
17
24
|
address: string;
|
|
18
25
|
};
|
|
@@ -47,7 +54,7 @@ interface BuildExcelOptions extends Pick<GridExcelExportOptions, 'exceljsPreProc
|
|
|
47
54
|
rowIds: GridRowId[];
|
|
48
55
|
columnsStyles?: ColumnsStylesInterface;
|
|
49
56
|
}
|
|
50
|
-
export declare function buildExcel(options: BuildExcelOptions,
|
|
57
|
+
export declare function buildExcel(options: BuildExcelOptions, apiRef: React.MutableRefObject<GridPrivateApiPremium>): Promise<Excel.Workbook>;
|
|
51
58
|
export interface ExcelExportInitEvent {
|
|
52
59
|
serializedColumns: SerializedColumns;
|
|
53
60
|
serializedRows: SerializedRow[];
|
|
@@ -8,7 +8,7 @@ exports.buildExcel = buildExcel;
|
|
|
8
8
|
exports.getDataForValueOptionsSheet = getDataForValueOptionsSheet;
|
|
9
9
|
exports.serializeColumn = void 0;
|
|
10
10
|
exports.serializeColumns = serializeColumns;
|
|
11
|
-
exports.
|
|
11
|
+
exports.serializeRowUnsafe = void 0;
|
|
12
12
|
exports.setupExcelExportWebWorker = setupExcelExportWebWorker;
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
14
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
@@ -37,22 +37,30 @@ const getFormattedValueOptions = (colDef, row, valueOptions, api) => {
|
|
|
37
37
|
}
|
|
38
38
|
return valueOptionsFormatted.map(option => typeof option === 'object' ? option.label : option);
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
/**
|
|
41
|
+
* FIXME: This function mutates the colspan info, but colspan info assumes that the columns
|
|
42
|
+
* passed to it are always consistent. In this case, the exported columns may differ from the
|
|
43
|
+
* actual rendered columns.
|
|
44
|
+
* The caller of this function MUST call `resetColSpan()` before and after usage.
|
|
45
|
+
*/
|
|
46
|
+
const serializeRowUnsafe = (id, columns, apiRef, defaultValueOptionsFormulae, options) => {
|
|
41
47
|
const row = {};
|
|
42
48
|
const dataValidation = {};
|
|
43
49
|
const mergedCells = [];
|
|
44
|
-
const firstCellParams =
|
|
50
|
+
const firstCellParams = apiRef.current.getCellParams(id, columns[0].field);
|
|
45
51
|
const outlineLevel = firstCellParams.rowNode.depth;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
const hasColSpan = (0, _internals.gridHasColSpanSelector)(apiRef);
|
|
53
|
+
if (hasColSpan) {
|
|
54
|
+
// `colSpan` is only calculated for rendered rows, so we need to calculate it during export for every row
|
|
55
|
+
apiRef.current.calculateColSpan({
|
|
56
|
+
rowId: id,
|
|
57
|
+
minFirstColumn: 0,
|
|
58
|
+
maxLastColumn: columns.length,
|
|
59
|
+
columns
|
|
60
|
+
});
|
|
61
|
+
}
|
|
54
62
|
columns.forEach((column, colIndex) => {
|
|
55
|
-
const colSpanInfo =
|
|
63
|
+
const colSpanInfo = hasColSpan ? apiRef.current.unstable_getCellColSpanInfo(id, colIndex) : undefined;
|
|
56
64
|
if (colSpanInfo && colSpanInfo.spannedByColSpan) {
|
|
57
65
|
return;
|
|
58
66
|
}
|
|
@@ -62,7 +70,7 @@ const serializeRow = (id, columns, api, defaultValueOptionsFormulae, options) =>
|
|
|
62
70
|
rightIndex: colIndex + colSpanInfo.cellProps.colSpan
|
|
63
71
|
});
|
|
64
72
|
}
|
|
65
|
-
const cellParams =
|
|
73
|
+
const cellParams = apiRef.current.getCellParams(id, column.field);
|
|
66
74
|
let cellValue;
|
|
67
75
|
switch (cellParams.colDef.type) {
|
|
68
76
|
case 'singleSelect':
|
|
@@ -76,7 +84,7 @@ const serializeRow = (id, columns, api, defaultValueOptionsFormulae, options) =>
|
|
|
76
84
|
row,
|
|
77
85
|
field: cellParams.field
|
|
78
86
|
});
|
|
79
|
-
const formattedValueOptions = getFormattedValueOptions(castColumn, row, valueOptions,
|
|
87
|
+
const formattedValueOptions = getFormattedValueOptions(castColumn, row, valueOptions, apiRef.current);
|
|
80
88
|
dataValidation[castColumn.field] = {
|
|
81
89
|
type: 'list',
|
|
82
90
|
allowBlank: true,
|
|
@@ -92,7 +100,7 @@ const serializeRow = (id, columns, api, defaultValueOptionsFormulae, options) =>
|
|
|
92
100
|
formulae: [address]
|
|
93
101
|
};
|
|
94
102
|
}
|
|
95
|
-
const formattedValue =
|
|
103
|
+
const formattedValue = apiRef.current.getCellParams(id, castColumn.field).formattedValue;
|
|
96
104
|
if (process.env.NODE_ENV !== 'production') {
|
|
97
105
|
if (String(cellParams.formattedValue) === '[object Object]') {
|
|
98
106
|
warnInvalidFormattedValue();
|
|
@@ -107,7 +115,7 @@ const serializeRow = (id, columns, api, defaultValueOptionsFormulae, options) =>
|
|
|
107
115
|
}
|
|
108
116
|
case 'boolean':
|
|
109
117
|
case 'number':
|
|
110
|
-
cellValue =
|
|
118
|
+
cellValue = apiRef.current.getCellParams(id, column.field).value;
|
|
111
119
|
break;
|
|
112
120
|
case 'date':
|
|
113
121
|
case 'dateTime':
|
|
@@ -115,7 +123,7 @@ const serializeRow = (id, columns, api, defaultValueOptionsFormulae, options) =>
|
|
|
115
123
|
// Excel does not do any timezone conversion, so we create a date using UTC instead of local timezone
|
|
116
124
|
// Solution from: https://github.com/exceljs/exceljs/issues/486#issuecomment-432557582
|
|
117
125
|
// About Date.UTC(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC#exemples
|
|
118
|
-
const value =
|
|
126
|
+
const value = apiRef.current.getCellParams(id, column.field).value;
|
|
119
127
|
// value may be `undefined` in auto-generated grouping rows
|
|
120
128
|
if (!value) {
|
|
121
129
|
break;
|
|
@@ -127,7 +135,7 @@ const serializeRow = (id, columns, api, defaultValueOptionsFormulae, options) =>
|
|
|
127
135
|
case 'actions':
|
|
128
136
|
break;
|
|
129
137
|
default:
|
|
130
|
-
cellValue =
|
|
138
|
+
cellValue = apiRef.current.getCellParams(id, column.field).formattedValue;
|
|
131
139
|
if (process.env.NODE_ENV !== 'production') {
|
|
132
140
|
if (String(cellParams.formattedValue) === '[object Object]') {
|
|
133
141
|
warnInvalidFormattedValue();
|
|
@@ -152,7 +160,7 @@ const serializeRow = (id, columns, api, defaultValueOptionsFormulae, options) =>
|
|
|
152
160
|
mergedCells
|
|
153
161
|
};
|
|
154
162
|
};
|
|
155
|
-
exports.
|
|
163
|
+
exports.serializeRowUnsafe = serializeRowUnsafe;
|
|
156
164
|
const defaultColumnsStyles = {
|
|
157
165
|
[_xDataGridPro.GRID_DATE_COL_DEF.type]: {
|
|
158
166
|
numFmt: 'dd.mm.yyyy'
|
|
@@ -292,7 +300,7 @@ async function createValueOptionsSheetIfNeeded(valueOptionsData, sheetName, work
|
|
|
292
300
|
valueOptionsWorksheet.getColumn(field).values = values;
|
|
293
301
|
});
|
|
294
302
|
}
|
|
295
|
-
async function buildExcel(options,
|
|
303
|
+
async function buildExcel(options, apiRef) {
|
|
296
304
|
const {
|
|
297
305
|
columns,
|
|
298
306
|
rowIds,
|
|
@@ -316,20 +324,22 @@ async function buildExcel(options, api) {
|
|
|
316
324
|
}
|
|
317
325
|
if (includeColumnGroupsHeaders) {
|
|
318
326
|
const columnGroupPaths = columns.reduce((acc, column) => {
|
|
319
|
-
acc[column.field] =
|
|
327
|
+
acc[column.field] = apiRef.current.getColumnGroupPath(column.field);
|
|
320
328
|
return acc;
|
|
321
329
|
}, {});
|
|
322
|
-
addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths,
|
|
330
|
+
addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths, apiRef.current.getAllGroupDetails());
|
|
323
331
|
}
|
|
324
332
|
if (includeHeaders) {
|
|
325
333
|
worksheet.addRow(columns.map(column => column.headerName ?? column.field));
|
|
326
334
|
}
|
|
327
|
-
const valueOptionsData = await getDataForValueOptionsSheet(columns, valueOptionsSheetName,
|
|
335
|
+
const valueOptionsData = await getDataForValueOptionsSheet(columns, valueOptionsSheetName, apiRef.current);
|
|
328
336
|
createValueOptionsSheetIfNeeded(valueOptionsData, valueOptionsSheetName, workbook);
|
|
337
|
+
apiRef.current.resetColSpan();
|
|
329
338
|
rowIds.forEach(id => {
|
|
330
|
-
const serializedRow =
|
|
339
|
+
const serializedRow = serializeRowUnsafe(id, columns, apiRef, valueOptionsData, options);
|
|
331
340
|
addSerializedRowToWorksheet(serializedRow, worksheet);
|
|
332
341
|
});
|
|
342
|
+
apiRef.current.resetColSpan();
|
|
333
343
|
if (exceljsPostProcess) {
|
|
334
344
|
await exceljsPostProcess({
|
|
335
345
|
workbook,
|
|
@@ -44,7 +44,7 @@ const useGridExcelExport = (apiRef, props) => {
|
|
|
44
44
|
exceljsPreProcess: options?.exceljsPreProcess,
|
|
45
45
|
exceljsPostProcess: options?.exceljsPostProcess,
|
|
46
46
|
escapeFormulas: options.escapeFormulas ?? true
|
|
47
|
-
}, apiRef
|
|
47
|
+
}, apiRef);
|
|
48
48
|
}, [logger, apiRef]);
|
|
49
49
|
const exportDataAsExcel = React.useCallback(async (options = {}) => {
|
|
50
50
|
const {
|
|
@@ -96,9 +96,11 @@ const useGridExcelExport = (apiRef, props) => {
|
|
|
96
96
|
});
|
|
97
97
|
const valueOptionsData = await (0, _excelSerializer.getDataForValueOptionsSheet)(exportedColumns, valueOptionsSheetName, apiRef.current);
|
|
98
98
|
const serializedColumns = (0, _excelSerializer.serializeColumns)(exportedColumns, options.columnsStyles || {});
|
|
99
|
-
|
|
99
|
+
apiRef.current.resetColSpan();
|
|
100
|
+
const serializedRows = exportedRowIds.map(id => (0, _excelSerializer.serializeRowUnsafe)(id, exportedColumns, apiRef, valueOptionsData, {
|
|
100
101
|
escapeFormulas: options.escapeFormulas ?? true
|
|
101
102
|
}));
|
|
103
|
+
apiRef.current.resetColSpan();
|
|
102
104
|
const columnGroupPaths = exportedColumns.reduce((acc, column) => {
|
|
103
105
|
acc[column.field] = apiRef.current.getColumnGroupPath(column.field);
|
|
104
106
|
return acc;
|
package/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './hooks';
|
|
|
22
22
|
export * from './models';
|
|
23
23
|
export * from './components';
|
|
24
24
|
export { GridColumnHeaders } from '@mui/x-data-grid-pro';
|
|
25
|
+
export type { GridColumnHeadersProps } from '@mui/x-data-grid-pro';
|
|
25
26
|
export type { DataGridPremiumProps, GridExperimentalPremiumFeatures, } from './models/dataGridPremiumProps';
|
|
26
27
|
export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
|
|
27
28
|
export type { GridApi, GridInitialState, GridState } from './typeOverloads/reexports';
|
package/index.js
CHANGED
|
@@ -84,7 +84,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
84
84
|
*/
|
|
85
85
|
'aria-labelledby': PropTypes.string,
|
|
86
86
|
/**
|
|
87
|
-
* If `true`, the Data Grid height is dynamic and
|
|
87
|
+
* If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
|
|
88
88
|
* @default false
|
|
89
89
|
*/
|
|
90
90
|
autoHeight: PropTypes.bool,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { GRID_DATE_COL_DEF, GRID_DATETIME_COL_DEF } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { buildWarning, isObject, isSingleSelectColDef } from '@mui/x-data-grid/internals';
|
|
3
|
+
import { buildWarning, isObject, isSingleSelectColDef, gridHasColSpanSelector } from '@mui/x-data-grid/internals';
|
|
4
4
|
const getExcelJs = async () => {
|
|
5
5
|
const excelJsModule = await import('exceljs');
|
|
6
6
|
return excelJsModule.default ?? excelJsModule;
|
|
@@ -23,22 +23,30 @@ const getFormattedValueOptions = (colDef, row, valueOptions, api) => {
|
|
|
23
23
|
}
|
|
24
24
|
return valueOptionsFormatted.map(option => typeof option === 'object' ? option.label : option);
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* FIXME: This function mutates the colspan info, but colspan info assumes that the columns
|
|
28
|
+
* passed to it are always consistent. In this case, the exported columns may differ from the
|
|
29
|
+
* actual rendered columns.
|
|
30
|
+
* The caller of this function MUST call `resetColSpan()` before and after usage.
|
|
31
|
+
*/
|
|
32
|
+
export const serializeRowUnsafe = (id, columns, apiRef, defaultValueOptionsFormulae, options) => {
|
|
27
33
|
const row = {};
|
|
28
34
|
const dataValidation = {};
|
|
29
35
|
const mergedCells = [];
|
|
30
|
-
const firstCellParams =
|
|
36
|
+
const firstCellParams = apiRef.current.getCellParams(id, columns[0].field);
|
|
31
37
|
const outlineLevel = firstCellParams.rowNode.depth;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const hasColSpan = gridHasColSpanSelector(apiRef);
|
|
39
|
+
if (hasColSpan) {
|
|
40
|
+
// `colSpan` is only calculated for rendered rows, so we need to calculate it during export for every row
|
|
41
|
+
apiRef.current.calculateColSpan({
|
|
42
|
+
rowId: id,
|
|
43
|
+
minFirstColumn: 0,
|
|
44
|
+
maxLastColumn: columns.length,
|
|
45
|
+
columns
|
|
46
|
+
});
|
|
47
|
+
}
|
|
40
48
|
columns.forEach((column, colIndex) => {
|
|
41
|
-
const colSpanInfo =
|
|
49
|
+
const colSpanInfo = hasColSpan ? apiRef.current.unstable_getCellColSpanInfo(id, colIndex) : undefined;
|
|
42
50
|
if (colSpanInfo && colSpanInfo.spannedByColSpan) {
|
|
43
51
|
return;
|
|
44
52
|
}
|
|
@@ -48,7 +56,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
48
56
|
rightIndex: colIndex + colSpanInfo.cellProps.colSpan
|
|
49
57
|
});
|
|
50
58
|
}
|
|
51
|
-
const cellParams =
|
|
59
|
+
const cellParams = apiRef.current.getCellParams(id, column.field);
|
|
52
60
|
let cellValue;
|
|
53
61
|
switch (cellParams.colDef.type) {
|
|
54
62
|
case 'singleSelect':
|
|
@@ -62,7 +70,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
62
70
|
row,
|
|
63
71
|
field: cellParams.field
|
|
64
72
|
});
|
|
65
|
-
const formattedValueOptions = getFormattedValueOptions(castColumn, row, valueOptions,
|
|
73
|
+
const formattedValueOptions = getFormattedValueOptions(castColumn, row, valueOptions, apiRef.current);
|
|
66
74
|
dataValidation[castColumn.field] = {
|
|
67
75
|
type: 'list',
|
|
68
76
|
allowBlank: true,
|
|
@@ -78,7 +86,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
78
86
|
formulae: [address]
|
|
79
87
|
};
|
|
80
88
|
}
|
|
81
|
-
const formattedValue =
|
|
89
|
+
const formattedValue = apiRef.current.getCellParams(id, castColumn.field).formattedValue;
|
|
82
90
|
if (process.env.NODE_ENV !== 'production') {
|
|
83
91
|
if (String(cellParams.formattedValue) === '[object Object]') {
|
|
84
92
|
warnInvalidFormattedValue();
|
|
@@ -93,7 +101,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
93
101
|
}
|
|
94
102
|
case 'boolean':
|
|
95
103
|
case 'number':
|
|
96
|
-
cellValue =
|
|
104
|
+
cellValue = apiRef.current.getCellParams(id, column.field).value;
|
|
97
105
|
break;
|
|
98
106
|
case 'date':
|
|
99
107
|
case 'dateTime':
|
|
@@ -101,7 +109,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
101
109
|
// Excel does not do any timezone conversion, so we create a date using UTC instead of local timezone
|
|
102
110
|
// Solution from: https://github.com/exceljs/exceljs/issues/486#issuecomment-432557582
|
|
103
111
|
// About Date.UTC(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/UTC#exemples
|
|
104
|
-
const value =
|
|
112
|
+
const value = apiRef.current.getCellParams(id, column.field).value;
|
|
105
113
|
// value may be `undefined` in auto-generated grouping rows
|
|
106
114
|
if (!value) {
|
|
107
115
|
break;
|
|
@@ -113,7 +121,7 @@ export const serializeRow = (id, columns, api, defaultValueOptionsFormulae, opti
|
|
|
113
121
|
case 'actions':
|
|
114
122
|
break;
|
|
115
123
|
default:
|
|
116
|
-
cellValue =
|
|
124
|
+
cellValue = apiRef.current.getCellParams(id, column.field).formattedValue;
|
|
117
125
|
if (process.env.NODE_ENV !== 'production') {
|
|
118
126
|
if (String(cellParams.formattedValue) === '[object Object]') {
|
|
119
127
|
warnInvalidFormattedValue();
|
|
@@ -276,7 +284,7 @@ async function createValueOptionsSheetIfNeeded(valueOptionsData, sheetName, work
|
|
|
276
284
|
valueOptionsWorksheet.getColumn(field).values = values;
|
|
277
285
|
});
|
|
278
286
|
}
|
|
279
|
-
export async function buildExcel(options,
|
|
287
|
+
export async function buildExcel(options, apiRef) {
|
|
280
288
|
const {
|
|
281
289
|
columns,
|
|
282
290
|
rowIds,
|
|
@@ -300,20 +308,22 @@ export async function buildExcel(options, api) {
|
|
|
300
308
|
}
|
|
301
309
|
if (includeColumnGroupsHeaders) {
|
|
302
310
|
const columnGroupPaths = columns.reduce((acc, column) => {
|
|
303
|
-
acc[column.field] =
|
|
311
|
+
acc[column.field] = apiRef.current.getColumnGroupPath(column.field);
|
|
304
312
|
return acc;
|
|
305
313
|
}, {});
|
|
306
|
-
addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths,
|
|
314
|
+
addColumnGroupingHeaders(worksheet, serializedColumns, columnGroupPaths, apiRef.current.getAllGroupDetails());
|
|
307
315
|
}
|
|
308
316
|
if (includeHeaders) {
|
|
309
317
|
worksheet.addRow(columns.map(column => column.headerName ?? column.field));
|
|
310
318
|
}
|
|
311
|
-
const valueOptionsData = await getDataForValueOptionsSheet(columns, valueOptionsSheetName,
|
|
319
|
+
const valueOptionsData = await getDataForValueOptionsSheet(columns, valueOptionsSheetName, apiRef.current);
|
|
312
320
|
createValueOptionsSheetIfNeeded(valueOptionsData, valueOptionsSheetName, workbook);
|
|
321
|
+
apiRef.current.resetColSpan();
|
|
313
322
|
rowIds.forEach(id => {
|
|
314
|
-
const serializedRow =
|
|
323
|
+
const serializedRow = serializeRowUnsafe(id, columns, apiRef, valueOptionsData, options);
|
|
315
324
|
addSerializedRowToWorksheet(serializedRow, worksheet);
|
|
316
325
|
});
|
|
326
|
+
apiRef.current.resetColSpan();
|
|
317
327
|
if (exceljsPostProcess) {
|
|
318
328
|
await exceljsPostProcess({
|
|
319
329
|
workbook,
|
|
@@ -3,7 +3,7 @@ const _excluded = ["worker", "exceljsPostProcess", "exceljsPreProcess", "columns
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useGridApiMethod, useGridLogger, useGridApiOptionHandler } from '@mui/x-data-grid';
|
|
5
5
|
import { useGridRegisterPipeProcessor, exportAs, getColumnsToExport, defaultGetRowsToExport } from '@mui/x-data-grid/internals';
|
|
6
|
-
import { buildExcel, getDataForValueOptionsSheet, serializeColumns,
|
|
6
|
+
import { buildExcel, getDataForValueOptionsSheet, serializeColumns, serializeRowUnsafe } from './serializer/excelSerializer';
|
|
7
7
|
import { GridExcelExportMenuItem } from '../../../components';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -36,7 +36,7 @@ export const useGridExcelExport = (apiRef, props) => {
|
|
|
36
36
|
exceljsPreProcess: options?.exceljsPreProcess,
|
|
37
37
|
exceljsPostProcess: options?.exceljsPostProcess,
|
|
38
38
|
escapeFormulas: options.escapeFormulas ?? true
|
|
39
|
-
}, apiRef
|
|
39
|
+
}, apiRef);
|
|
40
40
|
}, [logger, apiRef]);
|
|
41
41
|
const exportDataAsExcel = React.useCallback(async (options = {}) => {
|
|
42
42
|
const {
|
|
@@ -88,9 +88,11 @@ export const useGridExcelExport = (apiRef, props) => {
|
|
|
88
88
|
});
|
|
89
89
|
const valueOptionsData = await getDataForValueOptionsSheet(exportedColumns, valueOptionsSheetName, apiRef.current);
|
|
90
90
|
const serializedColumns = serializeColumns(exportedColumns, options.columnsStyles || {});
|
|
91
|
-
|
|
91
|
+
apiRef.current.resetColSpan();
|
|
92
|
+
const serializedRows = exportedRowIds.map(id => serializeRowUnsafe(id, exportedColumns, apiRef, valueOptionsData, {
|
|
92
93
|
escapeFormulas: options.escapeFormulas ?? true
|
|
93
94
|
}));
|
|
95
|
+
apiRef.current.resetColSpan();
|
|
94
96
|
const columnGroupPaths = exportedColumns.reduce((acc, column) => {
|
|
95
97
|
acc[column.field] = apiRef.current.getColumnGroupPath(column.field);
|
|
96
98
|
return acc;
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcxNzAxNjQwMDAwMA==";
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.0",
|
|
4
4
|
"description": "The Premium plan edition of the Data Grid Components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"directory": "packages/x-data-grid-premium"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@babel/runtime": "^7.24.
|
|
37
|
-
"@mui/system": "^5.15.
|
|
36
|
+
"@babel/runtime": "^7.24.6",
|
|
37
|
+
"@mui/system": "^5.15.15",
|
|
38
38
|
"@mui/utils": "^5.15.14",
|
|
39
39
|
"@types/format-util": "^1.0.4",
|
|
40
40
|
"clsx": "^2.1.1",
|
|
41
41
|
"exceljs": "^4.4.0",
|
|
42
42
|
"prop-types": "^15.8.1",
|
|
43
43
|
"reselect": "^4.1.8",
|
|
44
|
-
"@mui/x-data-grid": "7.
|
|
45
|
-
"@mui/x-data-grid
|
|
46
|
-
"@mui/x-license": "7.
|
|
44
|
+
"@mui/x-data-grid-pro": "7.6.0",
|
|
45
|
+
"@mui/x-data-grid": "7.6.0",
|
|
46
|
+
"@mui/x-license": "7.6.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@mui/material": "^5.15.14",
|
package/utils/releaseInfo.js
CHANGED
|
@@ -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 = "
|
|
9
|
+
const releaseInfo = "MTcxNzAxNjQwMDAwMA==";
|
|
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
|