@mui/x-data-grid-premium 6.16.3 → 6.18.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 +127 -0
- package/DataGridPremium/DataGridPremium.js +13 -0
- package/hooks/features/aggregation/gridAggregationFunctions.d.ts +3 -3
- package/hooks/features/aggregation/gridAggregationFunctions.js +16 -6
- package/hooks/features/cellSelection/useGridCellSelection.js +1 -1
- package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +2 -2
- package/index.js +1 -1
- package/legacy/DataGridPremium/DataGridPremium.js +13 -0
- package/legacy/hooks/features/aggregation/gridAggregationFunctions.js +23 -12
- package/legacy/hooks/features/cellSelection/useGridCellSelection.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/models/gridApiPremium.d.ts +2 -1
- package/modern/DataGridPremium/DataGridPremium.js +13 -0
- package/modern/hooks/features/aggregation/gridAggregationFunctions.js +16 -6
- package/modern/hooks/features/cellSelection/useGridCellSelection.js +1 -1
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/DataGridPremium/DataGridPremium.js +13 -0
- package/node/hooks/features/aggregation/gridAggregationFunctions.js +16 -6
- package/node/hooks/features/cellSelection/useGridCellSelection.js +1 -1
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +5 -5
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,133 @@
|
|
|
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.18.0
|
|
7
|
+
|
|
8
|
+
_Nov 3, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 The Charts package is now officially stable!
|
|
13
|
+
- 🥧 Pie charts are now animated.
|
|
14
|
+
- 📈 Line charts now support partial data, and can interpolate missing data.
|
|
15
|
+
|
|
16
|
+
<img width="380" alt="line charts with partial data" src="https://github.com/mui/mui-x/assets/45398769/385ecf77-19b2-4a03-8aef-5d547db1d9ad">
|
|
17
|
+
|
|
18
|
+
- ✨ Allow to ignore [diacritics](https://en.wikipedia.org/wiki/Diacritic) when filtering
|
|
19
|
+
- 📚 Documentation improvements
|
|
20
|
+
|
|
21
|
+
### Data Grid
|
|
22
|
+
|
|
23
|
+
#### `@mui/x-data-grid@6.18.0`
|
|
24
|
+
|
|
25
|
+
- [DataGrid] Allow to ignore [diacritics](https://en.wikipedia.org/wiki/Diacritic) when filtering (#10569) @cherniavskii
|
|
26
|
+
- [DataGrid] Fix a typo in `gridFilterApi` (#10786) @vu-dao-93
|
|
27
|
+
- [DataGrid] Fix `undefined` row id (#10670) @romgrk
|
|
28
|
+
- [DataGrid] Make column autosizing work with dynamic row height (#10693) @cherniavskii
|
|
29
|
+
- [l10n] Allow to customize sorting label per column (#10839) @JerryWu1234
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@6.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@6.18.0`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@6.18.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.0`.
|
|
38
|
+
|
|
39
|
+
### Date Pickers
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers@6.18.0`
|
|
42
|
+
|
|
43
|
+
- [pickers] Add reference links to calendar components (#10644) @michelengelen
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers-pro@6.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-date-pickers@6.18.0`.
|
|
48
|
+
|
|
49
|
+
### Charts / `@mui/x-charts@6.18.0`
|
|
50
|
+
|
|
51
|
+
- [charts] Add animation on pie chart (#10782) @alexfauquette
|
|
52
|
+
- [charts] Add reference links to shared/misc chart components (#10660) @michelengelen
|
|
53
|
+
- [charts] Allows to connect nulls (#10803) @alexfauquette
|
|
54
|
+
- [charts] Fix axis highlight in dark mode (#10820) @LukasTy
|
|
55
|
+
|
|
56
|
+
### Docs
|
|
57
|
+
|
|
58
|
+
- [docs] Add a data grid recipe for autosizing columns after fetching row-data (#10822) @michelengelen
|
|
59
|
+
- [docs] Add a data grid recipe showing how to remove cell outline on `focus` (#10843) @michelengelen
|
|
60
|
+
- [docs] Add demo about how to use charts margin (#10886) @alexfauquette
|
|
61
|
+
- [docs] Improve custom field input demos readability (#10559) @LukasTy
|
|
62
|
+
|
|
63
|
+
### Core
|
|
64
|
+
|
|
65
|
+
- [core] Generate `slot` API descriptions based on `slots` or `components` (#10879) @LukasTy
|
|
66
|
+
|
|
67
|
+
## 6.17.0
|
|
68
|
+
|
|
69
|
+
_Oct 27, 2023_
|
|
70
|
+
|
|
71
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
72
|
+
|
|
73
|
+
- 🎁 The Tree View package is now officially stable!
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
- ✨ Improve the handling of non-numeric values by Data Grid aggregation
|
|
78
|
+
- 🚀 Support lines with different domains on the line charts
|
|
79
|
+
- 🐞 Bugfixes
|
|
80
|
+
- 📚 Documentation improvements
|
|
81
|
+
|
|
82
|
+
### Data Grid
|
|
83
|
+
|
|
84
|
+
#### `@mui/x-data-grid@6.17.0`
|
|
85
|
+
|
|
86
|
+
- [DataGrid] Allow custom debounce time for row positions calculation (#10708) @cherniavskii
|
|
87
|
+
- [DataGrid] Persist stable row index for focused row (#10674) @cherniavskii
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-data-grid-pro@6.17.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
90
|
+
|
|
91
|
+
Same changes as in `@mui/x-data-grid@6.17.0`, plus:
|
|
92
|
+
|
|
93
|
+
- [DataGridPro] Fix `undefined` values passed to `valueFormatter` for tree leaf nodes (#10748) @cherniavskii
|
|
94
|
+
|
|
95
|
+
#### `@mui/x-data-grid-premium@6.17.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
96
|
+
|
|
97
|
+
Same changes as in `@mui/x-data-grid-pro@6.17.0`, plus:
|
|
98
|
+
|
|
99
|
+
- [DataGridPremium] Fix `avg` aggregation to ignore non-numeric values (#10787) @cherniavskii
|
|
100
|
+
- [DataGridPremium] Fix `size` aggregation to ignore `undefined` values (#10745) @cherniavskii
|
|
101
|
+
- [DataGridPremium] Fix `sum` aggregation to ignore non-numeric values (#10730) @cherniavskii
|
|
102
|
+
- [DataGridPremium] Fix cell selection throwing index error on second page and beyond (#10784) @MBilalShafi
|
|
103
|
+
|
|
104
|
+
### Date Pickers
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-date-pickers@6.17.0`
|
|
107
|
+
|
|
108
|
+
- [fields] POC: Use `contentEditable` on `FakeTextField` (#10779) @flaviendelangle
|
|
109
|
+
- [pickers] Fix weekday label localization (#10809) @LukasTy
|
|
110
|
+
|
|
111
|
+
#### `@mui/x-date-pickers-pro@6.17.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
112
|
+
|
|
113
|
+
Same changes as in `@mui/x-date-pickers@6.17.0`.
|
|
114
|
+
|
|
115
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.17`
|
|
116
|
+
|
|
117
|
+
- [charts] Fix text position in Safari (#10815) @lhilgert9
|
|
118
|
+
- [charts] Support lines with different domains (#10801) @alexfauquette
|
|
119
|
+
|
|
120
|
+
### Tree View / `@mui/x-tree-view@6.17.0`
|
|
121
|
+
|
|
122
|
+
No change
|
|
123
|
+
|
|
124
|
+
### Docs
|
|
125
|
+
|
|
126
|
+
- [docs] Correct editing related props' description (#10798) @MBilalShafi
|
|
127
|
+
- [docs] Fix RTL data grid demo (#10728) @oliviertassinari
|
|
128
|
+
- [docs] Fix unclosed warning (#10796) @flaviendelangle
|
|
129
|
+
- [docs] Improve performance of `Save and restore the state from external storage` recipe (#10811) @michelengelen
|
|
130
|
+
|
|
131
|
+
- [test] Add missing type on `cleanText` utility function (#10780) @flaviendelangle
|
|
132
|
+
|
|
6
133
|
## 6.16.3
|
|
7
134
|
|
|
8
135
|
_Oct 20, 2023_
|
|
@@ -428,6 +428,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
428
428
|
* @default false
|
|
429
429
|
*/
|
|
430
430
|
hideFooterSelectedRowCount: PropTypes.bool,
|
|
431
|
+
/**
|
|
432
|
+
* If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
|
|
433
|
+
* E.g. when filter value is `cafe`, the rows with `café` will be visible.
|
|
434
|
+
* @default false
|
|
435
|
+
*/
|
|
436
|
+
ignoreDiacritics: PropTypes.bool,
|
|
431
437
|
/**
|
|
432
438
|
* The initial state of the DataGridPremium.
|
|
433
439
|
* The data in it is set in the state on initialization but isn't controlled.
|
|
@@ -854,6 +860,13 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
854
860
|
* Controls the modes of the rows.
|
|
855
861
|
*/
|
|
856
862
|
rowModesModel: PropTypes.object,
|
|
863
|
+
/**
|
|
864
|
+
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
865
|
+
* Setting it to a lower value could be useful when using dynamic row height,
|
|
866
|
+
* but might reduce performance when displaying a large number of rows.
|
|
867
|
+
* @default 166
|
|
868
|
+
*/
|
|
869
|
+
rowPositionsDebounceMs: PropTypes.number,
|
|
857
870
|
/**
|
|
858
871
|
* If `true`, the reordering of rows is enabled.
|
|
859
872
|
* @default false
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { GridAggregationFunction } from './gridAggregationInterfaces';
|
|
2
2
|
export declare const GRID_AGGREGATION_FUNCTIONS: {
|
|
3
|
-
sum: GridAggregationFunction<
|
|
4
|
-
avg: GridAggregationFunction<
|
|
3
|
+
sum: GridAggregationFunction<unknown, number, number>;
|
|
4
|
+
avg: GridAggregationFunction<unknown, number, number>;
|
|
5
5
|
min: GridAggregationFunction<number | Date, number | Date, number | Date>;
|
|
6
6
|
max: GridAggregationFunction<number | Date, number | Date, number | Date>;
|
|
7
|
-
size: GridAggregationFunction<
|
|
7
|
+
size: GridAggregationFunction<unknown, number, number>;
|
|
8
8
|
};
|
|
@@ -6,7 +6,7 @@ const sumAgg = {
|
|
|
6
6
|
let sum = 0;
|
|
7
7
|
for (let i = 0; i < values.length; i += 1) {
|
|
8
8
|
const value = values[i];
|
|
9
|
-
if (value
|
|
9
|
+
if (isNumber(value)) {
|
|
10
10
|
sum += value;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -15,12 +15,22 @@ const sumAgg = {
|
|
|
15
15
|
columnTypes: ['number']
|
|
16
16
|
};
|
|
17
17
|
const avgAgg = {
|
|
18
|
-
apply:
|
|
19
|
-
|
|
18
|
+
apply: ({
|
|
19
|
+
values
|
|
20
|
+
}) => {
|
|
21
|
+
if (values.length === 0) {
|
|
20
22
|
return null;
|
|
21
23
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
let sum = 0;
|
|
25
|
+
let valuesCount = 0;
|
|
26
|
+
for (let i = 0; i < values.length; i += 1) {
|
|
27
|
+
const value = values[i];
|
|
28
|
+
if (isNumber(value)) {
|
|
29
|
+
valuesCount += 1;
|
|
30
|
+
sum += value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return sum / valuesCount;
|
|
24
34
|
},
|
|
25
35
|
columnTypes: ['number']
|
|
26
36
|
};
|
|
@@ -64,7 +74,7 @@ const sizeAgg = {
|
|
|
64
74
|
apply: ({
|
|
65
75
|
values
|
|
66
76
|
}) => {
|
|
67
|
-
return values.length;
|
|
77
|
+
return values.filter(value => typeof value !== 'undefined').length;
|
|
68
78
|
},
|
|
69
79
|
valueFormatter: params => {
|
|
70
80
|
if (params.value == null || !isNumber(params.value)) {
|
|
@@ -389,7 +389,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
389
389
|
} else {
|
|
390
390
|
newClasses.push(gridClasses['cell--rangeTop']);
|
|
391
391
|
}
|
|
392
|
-
if (rowIndex < visibleRows.range.lastRowIndex) {
|
|
392
|
+
if (rowIndex + visibleRows.range.firstRowIndex < visibleRows.range.lastRowIndex) {
|
|
393
393
|
const {
|
|
394
394
|
id: nextRowId
|
|
395
395
|
} = visibleRows.rows[rowIndex + 1];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridRowId, GridRowTreeConfig, GridFilterState, GridFilterModel, GridRowModel, GridColDef, GridKeyValue } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { GridAggregatedFilterItemApplier, GridColumnRawLookup
|
|
3
|
+
import { GridAggregatedFilterItemApplier, GridColumnRawLookup } from '@mui/x-data-grid-pro/internals';
|
|
4
4
|
import { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
|
|
5
5
|
import { GridGroupingRule, GridGroupingRules, GridRowGroupingModel } from './gridRowGroupingInterfaces';
|
|
6
6
|
import { GridStatePremium } from '../../../models/gridStatePremium';
|
|
@@ -14,7 +14,7 @@ interface FilterRowTreeFromTreeDataParams {
|
|
|
14
14
|
rowTree: GridRowTreeConfig;
|
|
15
15
|
isRowMatchingFilters: GridAggregatedFilterItemApplier | null;
|
|
16
16
|
filterModel: GridFilterModel;
|
|
17
|
-
apiRef: React.MutableRefObject<
|
|
17
|
+
apiRef: React.MutableRefObject<GridPrivateApiPremium>;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* A leaf is visible if it passed the filter
|
package/index.js
CHANGED
|
@@ -428,6 +428,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
428
428
|
* @default false
|
|
429
429
|
*/
|
|
430
430
|
hideFooterSelectedRowCount: PropTypes.bool,
|
|
431
|
+
/**
|
|
432
|
+
* If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
|
|
433
|
+
* E.g. when filter value is `cafe`, the rows with `café` will be visible.
|
|
434
|
+
* @default false
|
|
435
|
+
*/
|
|
436
|
+
ignoreDiacritics: PropTypes.bool,
|
|
431
437
|
/**
|
|
432
438
|
* The initial state of the DataGridPremium.
|
|
433
439
|
* The data in it is set in the state on initialization but isn't controlled.
|
|
@@ -854,6 +860,13 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
854
860
|
* Controls the modes of the rows.
|
|
855
861
|
*/
|
|
856
862
|
rowModesModel: PropTypes.object,
|
|
863
|
+
/**
|
|
864
|
+
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
865
|
+
* Setting it to a lower value could be useful when using dynamic row height,
|
|
866
|
+
* but might reduce performance when displaying a large number of rows.
|
|
867
|
+
* @default 166
|
|
868
|
+
*/
|
|
869
|
+
rowPositionsDebounceMs: PropTypes.number,
|
|
857
870
|
/**
|
|
858
871
|
* If `true`, the reordering of rows is enabled.
|
|
859
872
|
* @default false
|
|
@@ -5,7 +5,7 @@ var sumAgg = {
|
|
|
5
5
|
var sum = 0;
|
|
6
6
|
for (var i = 0; i < values.length; i += 1) {
|
|
7
7
|
var value = values[i];
|
|
8
|
-
if (value
|
|
8
|
+
if (isNumber(value)) {
|
|
9
9
|
sum += value;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -14,18 +14,27 @@ var sumAgg = {
|
|
|
14
14
|
columnTypes: ['number']
|
|
15
15
|
};
|
|
16
16
|
var avgAgg = {
|
|
17
|
-
apply: function apply(
|
|
18
|
-
|
|
17
|
+
apply: function apply(_ref2) {
|
|
18
|
+
var values = _ref2.values;
|
|
19
|
+
if (values.length === 0) {
|
|
19
20
|
return null;
|
|
20
21
|
}
|
|
21
|
-
var sum =
|
|
22
|
-
|
|
22
|
+
var sum = 0;
|
|
23
|
+
var valuesCount = 0;
|
|
24
|
+
for (var i = 0; i < values.length; i += 1) {
|
|
25
|
+
var value = values[i];
|
|
26
|
+
if (isNumber(value)) {
|
|
27
|
+
valuesCount += 1;
|
|
28
|
+
sum += value;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return sum / valuesCount;
|
|
23
32
|
},
|
|
24
33
|
columnTypes: ['number']
|
|
25
34
|
};
|
|
26
35
|
var minAgg = {
|
|
27
|
-
apply: function apply(
|
|
28
|
-
var values =
|
|
36
|
+
apply: function apply(_ref3) {
|
|
37
|
+
var values = _ref3.values;
|
|
29
38
|
if (values.length === 0) {
|
|
30
39
|
return null;
|
|
31
40
|
}
|
|
@@ -41,8 +50,8 @@ var minAgg = {
|
|
|
41
50
|
columnTypes: ['number', 'date', 'dateTime']
|
|
42
51
|
};
|
|
43
52
|
var maxAgg = {
|
|
44
|
-
apply: function apply(
|
|
45
|
-
var values =
|
|
53
|
+
apply: function apply(_ref4) {
|
|
54
|
+
var values = _ref4.values;
|
|
46
55
|
if (values.length === 0) {
|
|
47
56
|
return null;
|
|
48
57
|
}
|
|
@@ -58,9 +67,11 @@ var maxAgg = {
|
|
|
58
67
|
columnTypes: ['number', 'date', 'dateTime']
|
|
59
68
|
};
|
|
60
69
|
var sizeAgg = {
|
|
61
|
-
apply: function apply(
|
|
62
|
-
var values =
|
|
63
|
-
return values.
|
|
70
|
+
apply: function apply(_ref5) {
|
|
71
|
+
var values = _ref5.values;
|
|
72
|
+
return values.filter(function (value) {
|
|
73
|
+
return typeof value !== 'undefined';
|
|
74
|
+
}).length;
|
|
64
75
|
},
|
|
65
76
|
valueFormatter: function valueFormatter(params) {
|
|
66
77
|
if (params.value == null || !isNumber(params.value)) {
|
|
@@ -380,7 +380,7 @@ export var useGridCellSelection = function useGridCellSelection(apiRef, props) {
|
|
|
380
380
|
} else {
|
|
381
381
|
newClasses.push(gridClasses['cell--rangeTop']);
|
|
382
382
|
}
|
|
383
|
-
if (rowIndex < visibleRows.range.lastRowIndex) {
|
|
383
|
+
if (rowIndex + visibleRows.range.firstRowIndex < visibleRows.range.lastRowIndex) {
|
|
384
384
|
var nextRowId = visibleRows.rows[rowIndex + 1].id;
|
|
385
385
|
if (!apiRef.current.unstable_isCellSelected(nextRowId, field)) {
|
|
386
386
|
newClasses.push(gridClasses['cell--rangeBottom']);
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export var getReleaseInfo = function getReleaseInfo() {
|
|
3
|
-
var releaseInfo = "
|
|
3
|
+
var releaseInfo = "MTY5ODk2NjAwMDAwMA==";
|
|
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
|
|
@@ -3,11 +3,12 @@ import { GridApiCommon, GridColumnPinningApi, GridColumnResizeApi, GridDetailPan
|
|
|
3
3
|
import { GridInitialStatePremium, GridStatePremium } from './gridStatePremium';
|
|
4
4
|
import type { GridRowGroupingApi, GridExcelExportApi, GridAggregationApi } from '../hooks';
|
|
5
5
|
import { GridCellSelectionApi } from '../hooks/features/cellSelection/gridCellSelectionInterfaces';
|
|
6
|
+
import type { DataGridPremiumProcessedProps } from './dataGridPremiumProps';
|
|
6
7
|
/**
|
|
7
8
|
* The api of `DataGridPremium`.
|
|
8
9
|
* TODO: Do not redefine manually the pro features
|
|
9
10
|
*/
|
|
10
11
|
export interface GridApiPremium extends GridApiCommon<GridStatePremium, GridInitialStatePremium>, GridRowProApi, GridColumnPinningApi, GridColumnResizeApi, GridDetailPanelApi, GridRowGroupingApi, GridExcelExportApi, GridAggregationApi, GridRowPinningApi, GridCellSelectionApi, GridRowMultiSelectionApi, GridColumnReorderApi {
|
|
11
12
|
}
|
|
12
|
-
export interface GridPrivateApiPremium extends GridApiPremium, GridPrivateOnlyApiCommon<GridApiPremium, GridPrivateApiPremium>, GridDetailPanelPrivateApi {
|
|
13
|
+
export interface GridPrivateApiPremium extends GridApiPremium, GridPrivateOnlyApiCommon<GridApiPremium, GridPrivateApiPremium, DataGridPremiumProcessedProps>, GridDetailPanelPrivateApi {
|
|
13
14
|
}
|
|
@@ -428,6 +428,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
428
428
|
* @default false
|
|
429
429
|
*/
|
|
430
430
|
hideFooterSelectedRowCount: PropTypes.bool,
|
|
431
|
+
/**
|
|
432
|
+
* If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
|
|
433
|
+
* E.g. when filter value is `cafe`, the rows with `café` will be visible.
|
|
434
|
+
* @default false
|
|
435
|
+
*/
|
|
436
|
+
ignoreDiacritics: PropTypes.bool,
|
|
431
437
|
/**
|
|
432
438
|
* The initial state of the DataGridPremium.
|
|
433
439
|
* The data in it is set in the state on initialization but isn't controlled.
|
|
@@ -854,6 +860,13 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
854
860
|
* Controls the modes of the rows.
|
|
855
861
|
*/
|
|
856
862
|
rowModesModel: PropTypes.object,
|
|
863
|
+
/**
|
|
864
|
+
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
865
|
+
* Setting it to a lower value could be useful when using dynamic row height,
|
|
866
|
+
* but might reduce performance when displaying a large number of rows.
|
|
867
|
+
* @default 166
|
|
868
|
+
*/
|
|
869
|
+
rowPositionsDebounceMs: PropTypes.number,
|
|
857
870
|
/**
|
|
858
871
|
* If `true`, the reordering of rows is enabled.
|
|
859
872
|
* @default false
|
|
@@ -6,7 +6,7 @@ const sumAgg = {
|
|
|
6
6
|
let sum = 0;
|
|
7
7
|
for (let i = 0; i < values.length; i += 1) {
|
|
8
8
|
const value = values[i];
|
|
9
|
-
if (value
|
|
9
|
+
if (isNumber(value)) {
|
|
10
10
|
sum += value;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -15,12 +15,22 @@ const sumAgg = {
|
|
|
15
15
|
columnTypes: ['number']
|
|
16
16
|
};
|
|
17
17
|
const avgAgg = {
|
|
18
|
-
apply:
|
|
19
|
-
|
|
18
|
+
apply: ({
|
|
19
|
+
values
|
|
20
|
+
}) => {
|
|
21
|
+
if (values.length === 0) {
|
|
20
22
|
return null;
|
|
21
23
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
let sum = 0;
|
|
25
|
+
let valuesCount = 0;
|
|
26
|
+
for (let i = 0; i < values.length; i += 1) {
|
|
27
|
+
const value = values[i];
|
|
28
|
+
if (isNumber(value)) {
|
|
29
|
+
valuesCount += 1;
|
|
30
|
+
sum += value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return sum / valuesCount;
|
|
24
34
|
},
|
|
25
35
|
columnTypes: ['number']
|
|
26
36
|
};
|
|
@@ -64,7 +74,7 @@ const sizeAgg = {
|
|
|
64
74
|
apply: ({
|
|
65
75
|
values
|
|
66
76
|
}) => {
|
|
67
|
-
return values.length;
|
|
77
|
+
return values.filter(value => typeof value !== 'undefined').length;
|
|
68
78
|
},
|
|
69
79
|
valueFormatter: params => {
|
|
70
80
|
if (params.value == null || !isNumber(params.value)) {
|
|
@@ -380,7 +380,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
380
380
|
} else {
|
|
381
381
|
newClasses.push(gridClasses['cell--rangeTop']);
|
|
382
382
|
}
|
|
383
|
-
if (rowIndex < visibleRows.range.lastRowIndex) {
|
|
383
|
+
if (rowIndex + visibleRows.range.firstRowIndex < visibleRows.range.lastRowIndex) {
|
|
384
384
|
const {
|
|
385
385
|
id: nextRowId
|
|
386
386
|
} = visibleRows.rows[rowIndex + 1];
|
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 = "MTY5ODk2NjAwMDAwMA==";
|
|
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
|
|
@@ -436,6 +436,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
436
436
|
* @default false
|
|
437
437
|
*/
|
|
438
438
|
hideFooterSelectedRowCount: _propTypes.default.bool,
|
|
439
|
+
/**
|
|
440
|
+
* If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
|
|
441
|
+
* E.g. when filter value is `cafe`, the rows with `café` will be visible.
|
|
442
|
+
* @default false
|
|
443
|
+
*/
|
|
444
|
+
ignoreDiacritics: _propTypes.default.bool,
|
|
439
445
|
/**
|
|
440
446
|
* The initial state of the DataGridPremium.
|
|
441
447
|
* The data in it is set in the state on initialization but isn't controlled.
|
|
@@ -862,6 +868,13 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
862
868
|
* Controls the modes of the rows.
|
|
863
869
|
*/
|
|
864
870
|
rowModesModel: _propTypes.default.object,
|
|
871
|
+
/**
|
|
872
|
+
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
873
|
+
* Setting it to a lower value could be useful when using dynamic row height,
|
|
874
|
+
* but might reduce performance when displaying a large number of rows.
|
|
875
|
+
* @default 166
|
|
876
|
+
*/
|
|
877
|
+
rowPositionsDebounceMs: _propTypes.default.number,
|
|
865
878
|
/**
|
|
866
879
|
* If `true`, the reordering of rows is enabled.
|
|
867
880
|
* @default false
|
|
@@ -12,7 +12,7 @@ const sumAgg = {
|
|
|
12
12
|
let sum = 0;
|
|
13
13
|
for (let i = 0; i < values.length; i += 1) {
|
|
14
14
|
const value = values[i];
|
|
15
|
-
if (
|
|
15
|
+
if ((0, _internals.isNumber)(value)) {
|
|
16
16
|
sum += value;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -21,12 +21,22 @@ const sumAgg = {
|
|
|
21
21
|
columnTypes: ['number']
|
|
22
22
|
};
|
|
23
23
|
const avgAgg = {
|
|
24
|
-
apply:
|
|
25
|
-
|
|
24
|
+
apply: ({
|
|
25
|
+
values
|
|
26
|
+
}) => {
|
|
27
|
+
if (values.length === 0) {
|
|
26
28
|
return null;
|
|
27
29
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
let sum = 0;
|
|
31
|
+
let valuesCount = 0;
|
|
32
|
+
for (let i = 0; i < values.length; i += 1) {
|
|
33
|
+
const value = values[i];
|
|
34
|
+
if ((0, _internals.isNumber)(value)) {
|
|
35
|
+
valuesCount += 1;
|
|
36
|
+
sum += value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return sum / valuesCount;
|
|
30
40
|
},
|
|
31
41
|
columnTypes: ['number']
|
|
32
42
|
};
|
|
@@ -70,7 +80,7 @@ const sizeAgg = {
|
|
|
70
80
|
apply: ({
|
|
71
81
|
values
|
|
72
82
|
}) => {
|
|
73
|
-
return values.length;
|
|
83
|
+
return values.filter(value => typeof value !== 'undefined').length;
|
|
74
84
|
},
|
|
75
85
|
valueFormatter: params => {
|
|
76
86
|
if (params.value == null || !(0, _internals.isNumber)(params.value)) {
|
|
@@ -390,7 +390,7 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
390
390
|
} else {
|
|
391
391
|
newClasses.push(_xDataGridPro.gridClasses['cell--rangeTop']);
|
|
392
392
|
}
|
|
393
|
-
if (rowIndex < visibleRows.range.lastRowIndex) {
|
|
393
|
+
if (rowIndex + visibleRows.range.firstRowIndex < visibleRows.range.lastRowIndex) {
|
|
394
394
|
const {
|
|
395
395
|
id: nextRowId
|
|
396
396
|
} = visibleRows.rows[rowIndex + 1];
|
package/node/index.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 = "MTY5ODk2NjAwMDAwMA==";
|
|
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.
|
|
3
|
+
"version": "6.18.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",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.23.2",
|
|
35
|
-
"@mui/utils": "^5.14.
|
|
36
|
-
"@mui/x-data-grid": "6.
|
|
37
|
-
"@mui/x-data-grid-pro": "6.
|
|
35
|
+
"@mui/utils": "^5.14.16",
|
|
36
|
+
"@mui/x-data-grid": "6.18.0",
|
|
37
|
+
"@mui/x-data-grid-pro": "6.18.0",
|
|
38
38
|
"@mui/x-license-pro": "6.10.2",
|
|
39
|
-
"@types/format-util": "^1.0.
|
|
39
|
+
"@types/format-util": "^1.0.3",
|
|
40
40
|
"clsx": "^2.0.0",
|
|
41
41
|
"exceljs": "^4.3.0",
|
|
42
42
|
"prop-types": "^15.8.1",
|
package/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 = "MTY5ODk2NjAwMDAwMA==";
|
|
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
|