@mui/x-data-grid-premium 6.4.0 → 6.5.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 +56 -0
- package/DataGridPremium/DataGridPremium.js +5 -0
- package/DataGridPremium/useDataGridPremiumComponent.js +3 -1
- package/DataGridPremium/useDataGridPremiumProps.js +5 -12
- package/hooks/features/aggregation/gridAggregationUtils.js +1 -0
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -0
- package/index.js +1 -1
- package/legacy/DataGridPremium/DataGridPremium.js +5 -0
- package/legacy/DataGridPremium/useDataGridPremiumComponent.js +3 -1
- package/legacy/DataGridPremium/useDataGridPremiumProps.js +8 -8
- package/legacy/hooks/features/aggregation/gridAggregationUtils.js +1 -0
- package/legacy/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -0
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/modern/DataGridPremium/DataGridPremium.js +5 -0
- package/modern/DataGridPremium/useDataGridPremiumComponent.js +3 -1
- package/modern/DataGridPremium/useDataGridPremiumProps.js +5 -12
- package/modern/hooks/features/aggregation/gridAggregationUtils.js +1 -0
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -0
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/DataGridPremium/DataGridPremium.js +5 -0
- package/node/DataGridPremium/useDataGridPremiumComponent.js +2 -0
- package/node/DataGridPremium/useDataGridPremiumProps.js +4 -11
- package/node/hooks/features/aggregation/gridAggregationUtils.js +1 -0
- package/node/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -0
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +3 -3
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,62 @@
|
|
|
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
|
+
## v6.5.0
|
|
7
|
+
|
|
8
|
+
_May 19, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 💫 Introduce filtering on column headers for `DataGridPro` and `DataGridPremium`:
|
|
13
|
+
|
|
14
|
+
https://github.com/mui/mui-x/assets/12609561/c4c2bfec-59cf-4cab-932d-dc1983081de9
|
|
15
|
+
|
|
16
|
+
See [the documentation](https://mui.com/x/react-data-grid/filtering/#header-filters) for more information
|
|
17
|
+
|
|
18
|
+
- 🌍 Improve Hebrew (he-IL) and Czech (cs-CZ) locales
|
|
19
|
+
- 📝 Support for editing on pinned rows
|
|
20
|
+
- 🚀 Performance improvements
|
|
21
|
+
- 🐞 Bugfixes
|
|
22
|
+
- 📚 Documentation improvements
|
|
23
|
+
|
|
24
|
+
### `@mui/x-data-grid@6.5.0` / `@mui/x-data-grid-pro@6.5.0` / `@mui/x-data-grid-premium@6.5.0`
|
|
25
|
+
|
|
26
|
+
#### Changes
|
|
27
|
+
|
|
28
|
+
- [DataGrid] Fix grid size calculation when `.MuiDataGrid-main` has border (#8882) @cherniavskii
|
|
29
|
+
- [DataGridPro] Filtering on Column Header (#7760) @MBilalShafi
|
|
30
|
+
- [DataGridPro] Improve `treeData` and `rowGrouping` performance (#8990) @MBilalShafi
|
|
31
|
+
- [DataGridPro] Support pinned rows editing (#8921) @cherniavskii
|
|
32
|
+
- [l10n] Improve Hebrew (he-IL) locale (#8943) @Itzik-Tech
|
|
33
|
+
- [l10n] Improve Czech (cs-CZ) locale (#8829) @harastaivan
|
|
34
|
+
- [l10n] Improve Czech (cs-CZ) locale (#8956) @davidzemancz
|
|
35
|
+
|
|
36
|
+
### `@mui/x-date-pickers@6.5.0` / `@mui/x-date-pickers-pro@6.5.0`
|
|
37
|
+
|
|
38
|
+
#### Changes
|
|
39
|
+
|
|
40
|
+
- [fields] Select the first section instead of last when clicking right of content (#9005) @noraleonte
|
|
41
|
+
- [fields] Refactor prop drilling in fields (#8660) @flaviendelangle
|
|
42
|
+
- [pickers] Allow to render the months before `currentMonth` instead of the one after (#8592) @flaviendelangle
|
|
43
|
+
- [pickers] Fix view management when `openTo` or `views` is modified (#8997) @alexfauquette
|
|
44
|
+
- [l10n] Improve Czech (cs-CZ) locale (#8829) @harastaivan
|
|
45
|
+
|
|
46
|
+
### Docs
|
|
47
|
+
|
|
48
|
+
- [docs] Clarify what Controlled / Uncontrolled means (#8926) @flaviendelangle
|
|
49
|
+
- [docs] Fix docs using wrong service worker (#9030) @cherniavskii
|
|
50
|
+
- [docs] Remove prop-types from JS demos (#9008) @flaviendelangle
|
|
51
|
+
|
|
52
|
+
### Core
|
|
53
|
+
|
|
54
|
+
- [core] Add assertion about checkbox rerenders (#8974) @oliviertassinari
|
|
55
|
+
- [core] Allow selecting a section by type in field tests (#9009) @flaviendelangle
|
|
56
|
+
- [core] Fix `yarn.lock` (#8988) @flaviendelangle
|
|
57
|
+
- [core] Fix flacky adapter test (#8995) @flaviendelangle
|
|
58
|
+
- [charts] Clean the axis rendering (#8948) @alexfauquette
|
|
59
|
+
- [DataGrid] Memoize root props for better performance (#8942) @romgrk
|
|
60
|
+
- [test] Skip flaky unit tests in JSDOM (#8994) @cherniavskii
|
|
61
|
+
|
|
6
62
|
## v6.4.0
|
|
7
63
|
|
|
8
64
|
_May 12, 2023_
|
|
@@ -909,6 +909,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
909
909
|
* Set the cell selection model of the grid.
|
|
910
910
|
*/
|
|
911
911
|
unstable_cellSelectionModel: PropTypes.object,
|
|
912
|
+
/**
|
|
913
|
+
* If `true`, enables the data grid filtering on header feature.
|
|
914
|
+
* @default false
|
|
915
|
+
*/
|
|
916
|
+
unstable_headerFilters: PropTypes.bool,
|
|
912
917
|
/**
|
|
913
918
|
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
914
919
|
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors } from '@mui/x-data-grid-pro/internals';
|
|
1
|
+
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, headerFilteringStateInitializer, useGridHeaderFiltering } from '@mui/x-data-grid-pro/internals';
|
|
2
2
|
// Premium-only features
|
|
3
3
|
import { useGridAggregation, aggregationStateInitializer } from '../hooks/features/aggregation/useGridAggregation';
|
|
4
4
|
import { useGridAggregationPreProcessors } from '../hooks/features/aggregation/useGridAggregationPreProcessors';
|
|
@@ -29,6 +29,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
29
29
|
/**
|
|
30
30
|
* Register all state initializers here.
|
|
31
31
|
*/
|
|
32
|
+
useGridInitializeState(headerFilteringStateInitializer, privateApiRef, props);
|
|
32
33
|
useGridInitializeState(rowGroupingStateInitializer, privateApiRef, props);
|
|
33
34
|
useGridInitializeState(aggregationStateInitializer, privateApiRef, props);
|
|
34
35
|
useGridInitializeState(rowSelectionStateInitializer, privateApiRef, props);
|
|
@@ -51,6 +52,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
51
52
|
useGridInitializeState(columnMenuStateInitializer, privateApiRef, props);
|
|
52
53
|
useGridInitializeState(columnGroupsStateInitializer, privateApiRef, props);
|
|
53
54
|
useGridRowGrouping(privateApiRef, props);
|
|
55
|
+
useGridHeaderFiltering(privateApiRef, props);
|
|
54
56
|
useGridTreeData(privateApiRef);
|
|
55
57
|
useGridAggregation(privateApiRef, props);
|
|
56
58
|
useGridKeyboardNavigation(privateApiRef, props);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["components", "componentsProps"];
|
|
4
2
|
import * as React from 'react';
|
|
5
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
6
4
|
import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT } from '@mui/x-data-grid-pro';
|
|
7
|
-
import { computeSlots, uncapitalizeObjectKeys } from '@mui/x-data-grid-pro/internals';
|
|
5
|
+
import { computeSlots, useProps, uncapitalizeObjectKeys } from '@mui/x-data-grid-pro/internals';
|
|
8
6
|
import { GRID_AGGREGATION_FUNCTIONS } from '../hooks/features/aggregation';
|
|
9
7
|
import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from '../constants/dataGridPremiumDefaultSlotsComponents';
|
|
10
8
|
|
|
@@ -24,15 +22,10 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
24
22
|
});
|
|
25
23
|
const defaultSlots = uncapitalizeObjectKeys(DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS);
|
|
26
24
|
export const useDataGridPremiumProps = inProps => {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
components,
|
|
33
|
-
componentsProps
|
|
34
|
-
} = _useThemeProps,
|
|
35
|
-
themedProps = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);
|
|
25
|
+
const [components, componentsProps, themedProps] = useProps(useThemeProps({
|
|
26
|
+
props: inProps,
|
|
27
|
+
name: 'MuiDataGrid'
|
|
28
|
+
}));
|
|
36
29
|
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
37
30
|
const slots = React.useMemo(() => computeSlots({
|
|
38
31
|
defaultSlots,
|
|
@@ -96,6 +96,7 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
96
96
|
};
|
|
97
97
|
if (params.updates.type === 'full') {
|
|
98
98
|
return createRowTree({
|
|
99
|
+
previousTree: params.previousTree,
|
|
99
100
|
nodes: params.updates.rows.map(getRowTreeBuilderNode),
|
|
100
101
|
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
101
102
|
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
package/index.js
CHANGED
|
@@ -909,6 +909,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
909
909
|
* Set the cell selection model of the grid.
|
|
910
910
|
*/
|
|
911
911
|
unstable_cellSelectionModel: PropTypes.object,
|
|
912
|
+
/**
|
|
913
|
+
* If `true`, enables the data grid filtering on header feature.
|
|
914
|
+
* @default false
|
|
915
|
+
*/
|
|
916
|
+
unstable_headerFilters: PropTypes.bool,
|
|
912
917
|
/**
|
|
913
918
|
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
914
919
|
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors } from '@mui/x-data-grid-pro/internals';
|
|
1
|
+
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, headerFilteringStateInitializer, useGridHeaderFiltering } from '@mui/x-data-grid-pro/internals';
|
|
2
2
|
// Premium-only features
|
|
3
3
|
import { useGridAggregation, aggregationStateInitializer } from '../hooks/features/aggregation/useGridAggregation';
|
|
4
4
|
import { useGridAggregationPreProcessors } from '../hooks/features/aggregation/useGridAggregationPreProcessors';
|
|
@@ -29,6 +29,7 @@ export var useDataGridPremiumComponent = function useDataGridPremiumComponent(in
|
|
|
29
29
|
/**
|
|
30
30
|
* Register all state initializers here.
|
|
31
31
|
*/
|
|
32
|
+
useGridInitializeState(headerFilteringStateInitializer, privateApiRef, props);
|
|
32
33
|
useGridInitializeState(rowGroupingStateInitializer, privateApiRef, props);
|
|
33
34
|
useGridInitializeState(aggregationStateInitializer, privateApiRef, props);
|
|
34
35
|
useGridInitializeState(rowSelectionStateInitializer, privateApiRef, props);
|
|
@@ -51,6 +52,7 @@ export var useDataGridPremiumComponent = function useDataGridPremiumComponent(in
|
|
|
51
52
|
useGridInitializeState(columnMenuStateInitializer, privateApiRef, props);
|
|
52
53
|
useGridInitializeState(columnGroupsStateInitializer, privateApiRef, props);
|
|
53
54
|
useGridRowGrouping(privateApiRef, props);
|
|
55
|
+
useGridHeaderFiltering(privateApiRef, props);
|
|
54
56
|
useGridTreeData(privateApiRef);
|
|
55
57
|
useGridAggregation(privateApiRef, props);
|
|
56
58
|
useGridKeyboardNavigation(privateApiRef, props);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
var _excluded = ["components", "componentsProps"];
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import { useThemeProps } from '@mui/material/styles';
|
|
6
5
|
import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT } from '@mui/x-data-grid-pro';
|
|
7
|
-
import { computeSlots, uncapitalizeObjectKeys } from '@mui/x-data-grid-pro/internals';
|
|
6
|
+
import { computeSlots, useProps, uncapitalizeObjectKeys } from '@mui/x-data-grid-pro/internals';
|
|
8
7
|
import { GRID_AGGREGATION_FUNCTIONS } from '../hooks/features/aggregation';
|
|
9
8
|
import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from '../constants/dataGridPremiumDefaultSlotsComponents';
|
|
10
9
|
|
|
@@ -30,13 +29,14 @@ export var DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO_P
|
|
|
30
29
|
});
|
|
31
30
|
var defaultSlots = uncapitalizeObjectKeys(DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS);
|
|
32
31
|
export var useDataGridPremiumProps = function useDataGridPremiumProps(inProps) {
|
|
33
|
-
var
|
|
32
|
+
var _useProps = useProps(useThemeProps({
|
|
34
33
|
props: inProps,
|
|
35
34
|
name: 'MuiDataGrid'
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
})),
|
|
36
|
+
_useProps2 = _slicedToArray(_useProps, 3),
|
|
37
|
+
components = _useProps2[0],
|
|
38
|
+
componentsProps = _useProps2[1],
|
|
39
|
+
themedProps = _useProps2[2];
|
|
40
40
|
var localeText = React.useMemo(function () {
|
|
41
41
|
return _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText);
|
|
42
42
|
}, [themedProps.localeText]);
|
|
@@ -107,6 +107,7 @@ export var useGridRowGroupingPreProcessors = function useGridRowGroupingPreProce
|
|
|
107
107
|
};
|
|
108
108
|
if (params.updates.type === 'full') {
|
|
109
109
|
return createRowTree({
|
|
110
|
+
previousTree: params.previousTree,
|
|
110
111
|
nodes: params.updates.rows.map(getRowTreeBuilderNode),
|
|
111
112
|
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
112
113
|
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
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 = "MTY4NDQ0MzYwMDAwMA==";
|
|
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
|
|
@@ -909,6 +909,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
909
909
|
* Set the cell selection model of the grid.
|
|
910
910
|
*/
|
|
911
911
|
unstable_cellSelectionModel: PropTypes.object,
|
|
912
|
+
/**
|
|
913
|
+
* If `true`, enables the data grid filtering on header feature.
|
|
914
|
+
* @default false
|
|
915
|
+
*/
|
|
916
|
+
unstable_headerFilters: PropTypes.bool,
|
|
912
917
|
/**
|
|
913
918
|
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
914
919
|
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors } from '@mui/x-data-grid-pro/internals';
|
|
1
|
+
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, headerFilteringStateInitializer, useGridHeaderFiltering } from '@mui/x-data-grid-pro/internals';
|
|
2
2
|
// Premium-only features
|
|
3
3
|
import { useGridAggregation, aggregationStateInitializer } from '../hooks/features/aggregation/useGridAggregation';
|
|
4
4
|
import { useGridAggregationPreProcessors } from '../hooks/features/aggregation/useGridAggregationPreProcessors';
|
|
@@ -29,6 +29,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
29
29
|
/**
|
|
30
30
|
* Register all state initializers here.
|
|
31
31
|
*/
|
|
32
|
+
useGridInitializeState(headerFilteringStateInitializer, privateApiRef, props);
|
|
32
33
|
useGridInitializeState(rowGroupingStateInitializer, privateApiRef, props);
|
|
33
34
|
useGridInitializeState(aggregationStateInitializer, privateApiRef, props);
|
|
34
35
|
useGridInitializeState(rowSelectionStateInitializer, privateApiRef, props);
|
|
@@ -51,6 +52,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
51
52
|
useGridInitializeState(columnMenuStateInitializer, privateApiRef, props);
|
|
52
53
|
useGridInitializeState(columnGroupsStateInitializer, privateApiRef, props);
|
|
53
54
|
useGridRowGrouping(privateApiRef, props);
|
|
55
|
+
useGridHeaderFiltering(privateApiRef, props);
|
|
54
56
|
useGridTreeData(privateApiRef);
|
|
55
57
|
useGridAggregation(privateApiRef, props);
|
|
56
58
|
useGridKeyboardNavigation(privateApiRef, props);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["components", "componentsProps"];
|
|
4
2
|
import * as React from 'react';
|
|
5
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
6
4
|
import { DATA_GRID_PRO_PROPS_DEFAULT_VALUES, GRID_DEFAULT_LOCALE_TEXT } from '@mui/x-data-grid-pro';
|
|
7
|
-
import { computeSlots, uncapitalizeObjectKeys } from '@mui/x-data-grid-pro/internals';
|
|
5
|
+
import { computeSlots, useProps, uncapitalizeObjectKeys } from '@mui/x-data-grid-pro/internals';
|
|
8
6
|
import { GRID_AGGREGATION_FUNCTIONS } from '../hooks/features/aggregation';
|
|
9
7
|
import { DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS } from '../constants/dataGridPremiumDefaultSlotsComponents';
|
|
10
8
|
|
|
@@ -24,15 +22,10 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
24
22
|
});
|
|
25
23
|
const defaultSlots = uncapitalizeObjectKeys(DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS);
|
|
26
24
|
export const useDataGridPremiumProps = inProps => {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
components,
|
|
33
|
-
componentsProps
|
|
34
|
-
} = _useThemeProps,
|
|
35
|
-
themedProps = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);
|
|
25
|
+
const [components, componentsProps, themedProps] = useProps(useThemeProps({
|
|
26
|
+
props: inProps,
|
|
27
|
+
name: 'MuiDataGrid'
|
|
28
|
+
}));
|
|
36
29
|
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
37
30
|
const slots = React.useMemo(() => computeSlots({
|
|
38
31
|
defaultSlots,
|
|
@@ -96,6 +96,7 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
96
96
|
};
|
|
97
97
|
if (params.updates.type === 'full') {
|
|
98
98
|
return createRowTree({
|
|
99
|
+
previousTree: params.previousTree,
|
|
99
100
|
nodes: params.updates.rows.map(getRowTreeBuilderNode),
|
|
100
101
|
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
101
102
|
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
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 = "MTY4NDQ0MzYwMDAwMA==";
|
|
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
|
|
@@ -918,6 +918,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
918
918
|
* Set the cell selection model of the grid.
|
|
919
919
|
*/
|
|
920
920
|
unstable_cellSelectionModel: _propTypes.default.object,
|
|
921
|
+
/**
|
|
922
|
+
* If `true`, enables the data grid filtering on header feature.
|
|
923
|
+
* @default false
|
|
924
|
+
*/
|
|
925
|
+
unstable_headerFilters: _propTypes.default.bool,
|
|
921
926
|
/**
|
|
922
927
|
* If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
923
928
|
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
@@ -36,6 +36,7 @@ const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
36
36
|
/**
|
|
37
37
|
* Register all state initializers here.
|
|
38
38
|
*/
|
|
39
|
+
(0, _internals.useGridInitializeState)(_internals.headerFilteringStateInitializer, privateApiRef, props);
|
|
39
40
|
(0, _internals.useGridInitializeState)(_useGridRowGrouping.rowGroupingStateInitializer, privateApiRef, props);
|
|
40
41
|
(0, _internals.useGridInitializeState)(_useGridAggregation.aggregationStateInitializer, privateApiRef, props);
|
|
41
42
|
(0, _internals.useGridInitializeState)(_internals.rowSelectionStateInitializer, privateApiRef, props);
|
|
@@ -58,6 +59,7 @@ const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
58
59
|
(0, _internals.useGridInitializeState)(_internals.columnMenuStateInitializer, privateApiRef, props);
|
|
59
60
|
(0, _internals.useGridInitializeState)(_internals.columnGroupsStateInitializer, privateApiRef, props);
|
|
60
61
|
(0, _useGridRowGrouping.useGridRowGrouping)(privateApiRef, props);
|
|
62
|
+
(0, _internals.useGridHeaderFiltering)(privateApiRef, props);
|
|
61
63
|
(0, _internals.useGridTreeData)(privateApiRef);
|
|
62
64
|
(0, _useGridAggregation.useGridAggregation)(privateApiRef, props);
|
|
63
65
|
(0, _internals.useGridKeyboardNavigation)(privateApiRef, props);
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.useDataGridPremiumProps = exports.DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = void 0;
|
|
8
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var React = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _styles = require("@mui/material/styles");
|
|
@@ -13,7 +12,6 @@ var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
|
13
12
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
14
13
|
var _aggregation = require("../hooks/features/aggregation");
|
|
15
14
|
var _dataGridPremiumDefaultSlotsComponents = require("../constants/dataGridPremiumDefaultSlotsComponents");
|
|
16
|
-
const _excluded = ["components", "componentsProps"];
|
|
17
15
|
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); }
|
|
18
16
|
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; }
|
|
19
17
|
/**
|
|
@@ -33,15 +31,10 @@ const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = (0, _extends2.default)({}, _xData
|
|
|
33
31
|
exports.DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES;
|
|
34
32
|
const defaultSlots = (0, _internals.uncapitalizeObjectKeys)(_dataGridPremiumDefaultSlotsComponents.DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS);
|
|
35
33
|
const useDataGridPremiumProps = inProps => {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
{
|
|
41
|
-
components,
|
|
42
|
-
componentsProps
|
|
43
|
-
} = _useThemeProps,
|
|
44
|
-
themedProps = (0, _objectWithoutPropertiesLoose2.default)(_useThemeProps, _excluded);
|
|
34
|
+
const [components, componentsProps, themedProps] = (0, _internals.useProps)((0, _styles.useThemeProps)({
|
|
35
|
+
props: inProps,
|
|
36
|
+
name: 'MuiDataGrid'
|
|
37
|
+
}));
|
|
45
38
|
const localeText = React.useMemo(() => (0, _extends2.default)({}, _xDataGridPro.GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
46
39
|
const slots = React.useMemo(() => (0, _internals.computeSlots)({
|
|
47
40
|
defaultSlots,
|
|
@@ -104,6 +104,7 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
104
104
|
};
|
|
105
105
|
if (params.updates.type === 'full') {
|
|
106
106
|
return (0, _internals.createRowTree)({
|
|
107
|
+
previousTree: params.previousTree,
|
|
107
108
|
nodes: params.updates.rows.map(getRowTreeBuilderNode),
|
|
108
109
|
defaultGroupingExpansionDepth: props.defaultGroupingExpansionDepth,
|
|
109
110
|
isGroupExpandedByDefault: props.isGroupExpandedByDefault,
|
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 = "MTY4NDQ0MzYwMDAwMA==";
|
|
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.5.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,8 +33,8 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.21.0",
|
|
35
35
|
"@mui/utils": "^5.12.3",
|
|
36
|
-
"@mui/x-data-grid": "6.
|
|
37
|
-
"@mui/x-data-grid-pro": "6.
|
|
36
|
+
"@mui/x-data-grid": "6.5.0",
|
|
37
|
+
"@mui/x-data-grid-pro": "6.5.0",
|
|
38
38
|
"@mui/x-license-pro": "6.0.4",
|
|
39
39
|
"@types/format-util": "^1.0.2",
|
|
40
40
|
"clsx": "^1.2.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 = "MTY4NDQ0MzYwMDAwMA==";
|
|
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
|