@mui/x-data-grid-premium 5.17.11 → 5.17.12

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,33 @@
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.12
7
+
8
+ _Nov 17, 2022_
9
+
10
+ We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Improve Finnish (fi-FI) locale (#6859) @RainoPikkarainen
13
+ - 🐞 Bugfixes
14
+
15
+ ### `@mui/x-data-grid@v5.17.12` / `@mui/x-data-grid-pro@v5.17.12` / `@mui/x-data-grid-premium@v5.17.12`
16
+
17
+ #### Changes
18
+
19
+ - [DataGrid] Fix conflict with the latest version of `@types/react` (#6883) @vizv
20
+ - [DataGridPremium] Support aggregating data from multiple row fields (#6844) @cherniavskii
21
+ - [DataGridPro] Fix detail panel not working with `getRowSpacing` prop (#6858) @cherniavskii
22
+ - [l10n] Improve Finnish (fi-FI) locale (#6859) @RainoPikkarainen
23
+
24
+ ### Docs
25
+
26
+ - [docs] Clarify DataGrid Row Pinning docs (#6891) @cherniavskii
27
+
28
+ ### Core
29
+
30
+ - [core] Upgrade monorepo (#6864) @m4theushw
31
+ - [license] Polish error messages (#6881) @oliviertassinari
32
+
6
33
  ## 5.17.11
7
34
 
8
35
  _Nov 10, 2022_
@@ -42,7 +42,14 @@ const getAggregationCellValue = ({
42
42
  return;
43
43
  }
44
44
 
45
- values.push(apiRef.current.getCellValue(rowId, field));
45
+ if (typeof aggregationFunction.getCellValue === 'function') {
46
+ const row = apiRef.current.getRow(rowId);
47
+ values.push(aggregationFunction.getCellValue({
48
+ row
49
+ }));
50
+ } else {
51
+ values.push(apiRef.current.getCellValue(rowId, field));
52
+ }
46
53
  });
47
54
  return aggregationFunction.apply({
48
55
  values
@@ -1,4 +1,4 @@
1
- import { GridValueFormatterParams, GridRowId } from '@mui/x-data-grid-pro';
1
+ import { GridValueFormatterParams, GridRowId, GridRowModel } from '@mui/x-data-grid-pro';
2
2
  export interface GridAggregationState {
3
3
  model: GridAggregationModel;
4
4
  lookup: GridAggregationLookup;
@@ -17,6 +17,12 @@ export interface GridAggregationApi {
17
17
  */
18
18
  setAggregationModel: (model: GridAggregationModel) => void;
19
19
  }
20
+ export interface GridAggregationGetCellValueParams {
21
+ /**
22
+ * The row model of the row that the current cell belongs to.
23
+ */
24
+ row: GridRowModel;
25
+ }
20
26
  /**
21
27
  * Grid aggregation function definition interface.
22
28
  */
@@ -53,6 +59,14 @@ export interface GridAggregationFunction<V = any, AV = V, FAV = AV> {
53
59
  * @default `true`
54
60
  */
55
61
  hasCellUnit?: boolean;
62
+ /**
63
+ * Function that allows to transform the value of the cell passed to the aggregation function applier.
64
+ * Useful for aggregating data from multiple row fields.
65
+ * @demo https://mui.com/x/react-data-grid/aggregation/#aggregating-data-from-multiple-row-fields
66
+ * @param {GridAggregationGetCellValueParams} params The params of the current cell
67
+ * @returns {V} The value of the cell that will be passed to the aggregation `apply` function
68
+ */
69
+ getCellValue?: (params: GridAggregationGetCellValueParams) => V;
56
70
  }
57
71
  interface GridAggregationParams<V = any> {
58
72
  values: (V | undefined)[];
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.17.11
1
+ /** @license MUI v5.17.12
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.
@@ -43,7 +43,14 @@ var getAggregationCellValue = function getAggregationCellValue(_ref) {
43
43
  return;
44
44
  }
45
45
 
46
- values.push(apiRef.current.getCellValue(rowId, field));
46
+ if (typeof aggregationFunction.getCellValue === 'function') {
47
+ var row = apiRef.current.getRow(rowId);
48
+ values.push(aggregationFunction.getCellValue({
49
+ row: row
50
+ }));
51
+ } else {
52
+ values.push(apiRef.current.getCellValue(rowId, field));
53
+ }
47
54
  });
48
55
  return aggregationFunction.apply({
49
56
  values: values
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.17.11
1
+ /** @license MUI v5.17.12
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.
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export var getReleaseInfo = function getReleaseInfo() {
3
- var releaseInfo = "MTY2ODAyMDQwMDAwMA==";
3
+ var releaseInfo = "MTY2ODYzNjAwMDAwMA==";
4
4
 
5
5
  if (process.env.NODE_ENV !== 'production') {
6
6
  // A simple hack to set the value in the test environment (has no build step).
@@ -40,7 +40,14 @@ const getAggregationCellValue = ({
40
40
  return;
41
41
  }
42
42
 
43
- values.push(apiRef.current.getCellValue(rowId, field));
43
+ if (typeof aggregationFunction.getCellValue === 'function') {
44
+ const row = apiRef.current.getRow(rowId);
45
+ values.push(aggregationFunction.getCellValue({
46
+ row
47
+ }));
48
+ } else {
49
+ values.push(apiRef.current.getCellValue(rowId, field));
50
+ }
44
51
  });
45
52
  return aggregationFunction.apply({
46
53
  values
package/modern/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.17.11
1
+ /** @license MUI v5.17.12
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.
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY2ODAyMDQwMDAwMA==";
3
+ const releaseInfo = "MTY2ODYzNjAwMDAwMA==";
4
4
 
5
5
  if (process.env.NODE_ENV !== 'production') {
6
6
  // A simple hack to set the value in the test environment (has no build step).
@@ -51,7 +51,14 @@ const getAggregationCellValue = ({
51
51
  return;
52
52
  }
53
53
 
54
- values.push(apiRef.current.getCellValue(rowId, field));
54
+ if (typeof aggregationFunction.getCellValue === 'function') {
55
+ const row = apiRef.current.getRow(rowId);
56
+ values.push(aggregationFunction.getCellValue({
57
+ row
58
+ }));
59
+ } else {
60
+ values.push(apiRef.current.getCellValue(rowId, field));
61
+ }
55
62
  });
56
63
  return aggregationFunction.apply({
57
64
  values
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.17.11
1
+ /** @license MUI v5.17.12
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.
@@ -8,7 +8,7 @@ exports.getReleaseInfo = void 0;
8
8
  var _utils = require("@mui/utils");
9
9
 
10
10
  const getReleaseInfo = () => {
11
- const releaseInfo = "MTY2ODAyMDQwMDAwMA==";
11
+ const releaseInfo = "MTY2ODYzNjAwMDAwMA==";
12
12
 
13
13
  if (process.env.NODE_ENV !== 'production') {
14
14
  // A simple hack to set the value in the test environment (has no build step).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-premium",
3
- "version": "5.17.11",
3
+ "version": "5.17.12",
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.18.9",
35
35
  "@mui/utils": "^5.10.3",
36
- "@mui/x-data-grid": "5.17.11",
37
- "@mui/x-data-grid-pro": "5.17.11",
38
- "@mui/x-license-pro": "5.17.11",
36
+ "@mui/x-data-grid": "5.17.12",
37
+ "@mui/x-data-grid-pro": "5.17.12",
38
+ "@mui/x-license-pro": "5.17.12",
39
39
  "@types/format-util": "^1.0.2",
40
40
  "clsx": "^1.2.1",
41
41
  "exceljs": "^4.3.0",
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTY2ODAyMDQwMDAwMA==";
3
+ const releaseInfo = "MTY2ODYzNjAwMDAwMA==";
4
4
 
5
5
  if (process.env.NODE_ENV !== 'production') {
6
6
  // A simple hack to set the value in the test environment (has no build step).