@mui/x-data-grid-premium 8.11.3 → 8.12.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 +151 -6
- package/DataGridPremium/DataGridPremium.js +29 -1
- package/DataGridPremium/useDataGridPremiumComponent.d.ts +1 -1
- package/DataGridPremium/useDataGridPremiumComponent.js +5 -2
- package/DataGridPremium/useDataGridPremiumProps.js +2 -1
- package/components/GridPremiumColumnMenu.d.ts +4 -4
- package/components/GridPremiumColumnMenu.js +6 -6
- package/components/GridPremiumToolbar.js +11 -0
- package/components/chartsIntegration/GridChartsIntegrationContext.d.ts +2 -0
- package/components/chartsIntegration/GridChartsIntegrationContext.js +11 -0
- package/components/chartsPanel/ChartsPanelTrigger.d.ts +33 -0
- package/components/chartsPanel/ChartsPanelTrigger.js +92 -0
- package/components/chartsPanel/GridChartsPanel.d.ts +21 -0
- package/components/chartsPanel/GridChartsPanel.js +243 -0
- package/components/chartsPanel/chart/GridChartsPanelChart.d.ts +12 -0
- package/components/chartsPanel/chart/GridChartsPanelChart.js +111 -0
- package/components/chartsPanel/customize/GridChartsPanelCustomize.d.ts +8 -0
- package/components/chartsPanel/customize/GridChartsPanelCustomize.js +147 -0
- package/components/chartsPanel/data/GridChartsPanelData.d.ts +4 -0
- package/components/chartsPanel/data/GridChartsPanelData.js +23 -0
- package/components/chartsPanel/data/GridChartsPanelDataBody.d.ts +12 -0
- package/components/chartsPanel/data/GridChartsPanelDataBody.js +380 -0
- package/components/chartsPanel/data/GridChartsPanelDataField.d.ts +25 -0
- package/components/chartsPanel/data/GridChartsPanelDataField.js +334 -0
- package/components/chartsPanel/data/GridChartsPanelDataFieldMenu.d.ts +11 -0
- package/components/chartsPanel/data/GridChartsPanelDataFieldMenu.js +179 -0
- package/components/chartsPanel/data/GridChartsPanelDataHeader.d.ts +7 -0
- package/components/chartsPanel/data/GridChartsPanelDataHeader.js +24 -0
- package/components/chartsPanel/data/GridChartsPanelDataSearch.d.ts +7 -0
- package/components/chartsPanel/data/GridChartsPanelDataSearch.js +80 -0
- package/components/chartsPanel/index.d.ts +2 -0
- package/components/chartsPanel/index.js +27 -0
- package/components/collapsible/Collapsible.d.ts +3 -1
- package/components/collapsible/Collapsible.js +4 -3
- package/components/{GridColumnMenuAggregationItem.js → columnMenu/menuItems/GridColumnMenuAggregationItem.js} +4 -4
- package/components/columnMenu/menuItems/GridColumnMenuChartsItem.d.ts +3 -0
- package/components/columnMenu/menuItems/GridColumnMenuChartsItem.js +36 -0
- package/components/columnMenu/menuItems/GridColumnMenuManagePanelItem.d.ts +4 -0
- package/components/columnMenu/menuItems/GridColumnMenuManagePanelItem.js +18 -0
- package/{esm/components → components/columnMenu/menuItems}/GridColumnMenuPivotItem.d.ts +1 -1
- package/components/{GridColumnMenuPivotItem.js → columnMenu/menuItems/GridColumnMenuPivotItem.js} +7 -4
- package/components/{GridColumnMenuRowGroupItem.js → columnMenu/menuItems/GridColumnMenuRowGroupItem.js} +4 -4
- package/components/{GridColumnMenuRowUngroupItem.js → columnMenu/menuItems/GridColumnMenuRowUngroupItem.js} +3 -3
- package/components/index.d.ts +3 -2
- package/components/index.js +13 -1
- package/components/pivotPanel/GridPivotPanelField.js +14 -2
- package/components/pivotPanel/GridPivotPanelHeader.js +1 -0
- package/components/pivotPanel/GridPivotPanelSearch.js +3 -0
- package/constants/columnGroups.d.ts +1 -0
- package/constants/columnGroups.js +7 -0
- package/constants/dataGridPremiumDefaultSlotsComponents.js +1 -0
- package/context/GridChartsIntegrationContextProvider.d.ts +7 -0
- package/context/GridChartsIntegrationContextProvider.js +35 -0
- package/context/GridChartsRendererProxy.d.ts +34 -0
- package/context/GridChartsRendererProxy.js +77 -0
- package/context/index.d.ts +2 -0
- package/context/index.js +27 -0
- package/esm/DataGridPremium/DataGridPremium.js +30 -2
- package/esm/DataGridPremium/useDataGridPremiumComponent.d.ts +1 -1
- package/esm/DataGridPremium/useDataGridPremiumComponent.js +5 -2
- package/esm/DataGridPremium/useDataGridPremiumProps.js +2 -1
- package/esm/components/GridPremiumColumnMenu.d.ts +4 -4
- package/esm/components/GridPremiumColumnMenu.js +6 -6
- package/esm/components/GridPremiumToolbar.js +11 -0
- package/esm/components/chartsIntegration/GridChartsIntegrationContext.d.ts +2 -0
- package/esm/components/chartsIntegration/GridChartsIntegrationContext.js +5 -0
- package/esm/components/chartsPanel/ChartsPanelTrigger.d.ts +33 -0
- package/esm/components/chartsPanel/ChartsPanelTrigger.js +85 -0
- package/esm/components/chartsPanel/GridChartsPanel.d.ts +21 -0
- package/esm/components/chartsPanel/GridChartsPanel.js +237 -0
- package/esm/components/chartsPanel/chart/GridChartsPanelChart.d.ts +12 -0
- package/esm/components/chartsPanel/chart/GridChartsPanelChart.js +104 -0
- package/esm/components/chartsPanel/customize/GridChartsPanelCustomize.d.ts +8 -0
- package/esm/components/chartsPanel/customize/GridChartsPanelCustomize.js +139 -0
- package/esm/components/chartsPanel/data/GridChartsPanelData.d.ts +4 -0
- package/esm/components/chartsPanel/data/GridChartsPanelData.js +18 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataBody.d.ts +12 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataBody.js +374 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataField.d.ts +25 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataField.js +327 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataFieldMenu.d.ts +11 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataFieldMenu.js +173 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataHeader.d.ts +7 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataHeader.js +18 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataSearch.d.ts +7 -0
- package/esm/components/chartsPanel/data/GridChartsPanelDataSearch.js +73 -0
- package/esm/components/chartsPanel/index.d.ts +2 -0
- package/esm/components/chartsPanel/index.js +2 -0
- package/esm/components/collapsible/Collapsible.d.ts +3 -1
- package/esm/components/collapsible/Collapsible.js +4 -3
- package/esm/components/{GridColumnMenuAggregationItem.js → columnMenu/menuItems/GridColumnMenuAggregationItem.js} +4 -4
- package/esm/components/columnMenu/menuItems/GridColumnMenuChartsItem.d.ts +3 -0
- package/esm/components/columnMenu/menuItems/GridColumnMenuChartsItem.js +29 -0
- package/esm/components/columnMenu/menuItems/GridColumnMenuManagePanelItem.d.ts +4 -0
- package/esm/components/columnMenu/menuItems/GridColumnMenuManagePanelItem.js +11 -0
- package/{components → esm/components/columnMenu/menuItems}/GridColumnMenuPivotItem.d.ts +1 -1
- package/esm/components/{GridColumnMenuPivotItem.js → columnMenu/menuItems/GridColumnMenuPivotItem.js} +7 -4
- package/esm/components/{GridColumnMenuRowGroupItem.js → columnMenu/menuItems/GridColumnMenuRowGroupItem.js} +4 -4
- package/esm/components/{GridColumnMenuRowUngroupItem.js → columnMenu/menuItems/GridColumnMenuRowUngroupItem.js} +3 -3
- package/esm/components/index.d.ts +3 -2
- package/esm/components/index.js +3 -2
- package/esm/components/pivotPanel/GridPivotPanelField.js +15 -3
- package/esm/components/pivotPanel/GridPivotPanelHeader.js +1 -0
- package/esm/components/pivotPanel/GridPivotPanelSearch.js +3 -0
- package/esm/constants/columnGroups.d.ts +1 -0
- package/esm/constants/columnGroups.js +1 -0
- package/esm/constants/dataGridPremiumDefaultSlotsComponents.js +1 -0
- package/esm/context/GridChartsIntegrationContextProvider.d.ts +7 -0
- package/esm/context/GridChartsIntegrationContextProvider.js +28 -0
- package/esm/context/GridChartsRendererProxy.d.ts +34 -0
- package/esm/context/GridChartsRendererProxy.js +71 -0
- package/esm/context/index.d.ts +2 -0
- package/esm/context/index.js +2 -0
- package/esm/hooks/features/aggregation/createAggregationLookup.js +5 -3
- package/esm/hooks/features/aggregation/gridAggregationInterfaces.d.ts +1 -0
- package/esm/hooks/features/aggregation/gridAggregationSelectors.d.ts +1 -0
- package/esm/hooks/features/aggregation/gridAggregationSelectors.js +3 -0
- package/esm/hooks/features/aggregation/useGridAggregation.js +13 -1
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +2 -1
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +1 -45
- package/esm/hooks/features/chartsIntegration/gridChartsIntegrationInterfaces.d.ts +65 -0
- package/esm/hooks/features/chartsIntegration/gridChartsIntegrationInterfaces.js +1 -0
- package/esm/hooks/features/chartsIntegration/gridChartsIntegrationSelectors.d.ts +17 -0
- package/esm/hooks/features/chartsIntegration/gridChartsIntegrationSelectors.js +24 -0
- package/esm/hooks/features/chartsIntegration/useGridChartsIntegration.d.ts +8 -0
- package/esm/hooks/features/chartsIntegration/useGridChartsIntegration.js +525 -0
- package/esm/hooks/features/chartsIntegration/utils.d.ts +5 -0
- package/esm/hooks/features/chartsIntegration/utils.js +32 -0
- package/esm/hooks/features/pivoting/useGridPivoting.js +1 -1
- package/esm/hooks/features/pivoting/utils.js +9 -7
- package/esm/hooks/features/rowGrouping/createGroupingColDef.js +3 -1
- package/esm/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +1 -0
- package/esm/hooks/features/rowGrouping/gridRowGroupingUtils.js +3 -2
- package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -0
- package/esm/hooks/features/sidebar/gridSidebarInterfaces.d.ts +1 -0
- package/esm/hooks/features/sidebar/gridSidebarInterfaces.js +1 -0
- package/esm/hooks/utils/index.d.ts +2 -1
- package/esm/hooks/utils/index.js +2 -1
- package/esm/hooks/utils/useGridChartIntegration.d.ts +2 -0
- package/esm/hooks/utils/useGridChartIntegration.js +9 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/material/icons.d.ts +4 -1
- package/esm/material/icons.js +16 -2
- package/esm/material/index.d.ts +11 -0
- package/esm/material/index.js +13 -2
- package/esm/models/dataGridPremiumProps.d.ts +22 -1
- package/esm/models/gridApiPremium.d.ts +3 -2
- package/esm/models/gridChartsIntegration.d.ts +17 -0
- package/esm/models/gridChartsIntegration.js +1 -0
- package/esm/models/gridPremiumIconSlotsComponent.d.ts +55 -0
- package/esm/models/gridPremiumSlotProps.d.ts +8 -0
- package/esm/models/gridPremiumSlotProps.js +1 -0
- package/esm/models/gridPremiumSlotsComponent.d.ts +6 -0
- package/esm/models/gridStatePremium.d.ts +5 -2
- package/esm/typeOverloads/modules.d.ts +20 -0
- package/hooks/features/aggregation/createAggregationLookup.js +5 -3
- package/hooks/features/aggregation/gridAggregationInterfaces.d.ts +1 -0
- package/hooks/features/aggregation/gridAggregationSelectors.d.ts +1 -0
- package/hooks/features/aggregation/gridAggregationSelectors.js +3 -0
- package/hooks/features/aggregation/useGridAggregation.js +12 -0
- package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +2 -1
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +0 -44
- package/hooks/features/chartsIntegration/gridChartsIntegrationInterfaces.d.ts +65 -0
- package/hooks/features/chartsIntegration/gridChartsIntegrationInterfaces.js +5 -0
- package/hooks/features/chartsIntegration/gridChartsIntegrationSelectors.d.ts +17 -0
- package/hooks/features/chartsIntegration/gridChartsIntegrationSelectors.js +30 -0
- package/hooks/features/chartsIntegration/useGridChartsIntegration.d.ts +8 -0
- package/hooks/features/chartsIntegration/useGridChartsIntegration.js +534 -0
- package/hooks/features/chartsIntegration/utils.d.ts +5 -0
- package/hooks/features/chartsIntegration/utils.js +40 -0
- package/hooks/features/pivoting/useGridPivoting.js +1 -1
- package/hooks/features/pivoting/utils.js +9 -7
- package/hooks/features/rowGrouping/createGroupingColDef.js +3 -1
- package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +1 -0
- package/hooks/features/rowGrouping/gridRowGroupingUtils.js +3 -2
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -0
- package/hooks/features/sidebar/gridSidebarInterfaces.d.ts +1 -0
- package/hooks/features/sidebar/gridSidebarInterfaces.js +1 -0
- package/hooks/utils/index.d.ts +2 -1
- package/hooks/utils/index.js +11 -0
- package/hooks/utils/useGridChartIntegration.d.ts +2 -0
- package/hooks/utils/useGridChartIntegration.js +17 -0
- package/index.d.ts +1 -0
- package/index.js +13 -1
- package/material/icons.d.ts +4 -1
- package/material/icons.js +16 -2
- package/material/index.d.ts +11 -0
- package/material/index.js +12 -1
- package/models/dataGridPremiumProps.d.ts +22 -1
- package/models/gridApiPremium.d.ts +3 -2
- package/models/gridChartsIntegration.d.ts +17 -0
- package/models/gridChartsIntegration.js +5 -0
- package/models/gridPremiumIconSlotsComponent.d.ts +55 -0
- package/models/gridPremiumSlotProps.d.ts +8 -0
- package/models/gridPremiumSlotProps.js +5 -0
- package/models/gridPremiumSlotsComponent.d.ts +6 -0
- package/models/gridStatePremium.d.ts +5 -2
- package/package.json +5 -5
- package/typeOverloads/modules.d.ts +20 -0
- /package/components/{GridColumnMenuAggregationItem.d.ts → columnMenu/menuItems/GridColumnMenuAggregationItem.d.ts} +0 -0
- /package/components/{GridColumnMenuRowGroupItem.d.ts → columnMenu/menuItems/GridColumnMenuRowGroupItem.d.ts} +0 -0
- /package/components/{GridColumnMenuRowUngroupItem.d.ts → columnMenu/menuItems/GridColumnMenuRowUngroupItem.d.ts} +0 -0
- /package/esm/components/{GridColumnMenuAggregationItem.d.ts → columnMenu/menuItems/GridColumnMenuAggregationItem.d.ts} +0 -0
- /package/esm/components/{GridColumnMenuRowGroupItem.d.ts → columnMenu/menuItems/GridColumnMenuRowGroupItem.d.ts} +0 -0
- /package/esm/components/{GridColumnMenuRowUngroupItem.d.ts → columnMenu/menuItems/GridColumnMenuRowUngroupItem.d.ts} +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
type CollapsibleProps = React.HTMLAttributes<HTMLDivElement
|
|
2
|
+
type CollapsibleProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
initiallyOpen?: boolean;
|
|
4
|
+
};
|
|
3
5
|
declare function Collapsible(props: CollapsibleProps): React.JSX.Element;
|
|
4
6
|
export { Collapsible };
|
|
@@ -19,7 +19,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
19
19
|
var _CollapsibleContext = require("./CollapsibleContext");
|
|
20
20
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
const _excluded = ["className", "children"];
|
|
22
|
+
const _excluded = ["className", "children", "initiallyOpen"];
|
|
23
23
|
const useUtilityClasses = ownerState => {
|
|
24
24
|
const {
|
|
25
25
|
classes
|
|
@@ -43,10 +43,11 @@ const CollapsibleRoot = (0, _system.styled)('div', {
|
|
|
43
43
|
function Collapsible(props) {
|
|
44
44
|
const {
|
|
45
45
|
className,
|
|
46
|
-
children
|
|
46
|
+
children,
|
|
47
|
+
initiallyOpen = true
|
|
47
48
|
} = props,
|
|
48
49
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
49
|
-
const [open, setOpen] = React.useState(
|
|
50
|
+
const [open, setOpen] = React.useState(initiallyOpen);
|
|
50
51
|
const panelId = (0, _useId.default)();
|
|
51
52
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
52
53
|
const ownerState = {
|
|
@@ -14,10 +14,10 @@ var React = _react;
|
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
15
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
16
16
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
17
|
-
var _useGridApiContext = require("
|
|
18
|
-
var _useGridRootProps = require("
|
|
19
|
-
var _gridAggregationUtils = require("
|
|
20
|
-
var _gridAggregationSelectors = require("
|
|
17
|
+
var _useGridApiContext = require("../../../hooks/utils/useGridApiContext");
|
|
18
|
+
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
19
|
+
var _gridAggregationUtils = require("../../../hooks/features/aggregation/gridAggregationUtils");
|
|
20
|
+
var _gridAggregationSelectors = require("../../../hooks/features/aggregation/gridAggregationSelectors");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _excluded = ["native"];
|
|
23
23
|
function GridColumnMenuAggregationItem(props) {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.GridColumnMenuChartsItem = GridColumnMenuChartsItem;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
10
|
+
var _gridChartsIntegrationSelectors = require("../../../hooks/features/chartsIntegration/gridChartsIntegrationSelectors");
|
|
11
|
+
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
12
|
+
var _useGridApiContext = require("../../../hooks/utils/useGridApiContext");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function GridColumnMenuChartsItem(props) {
|
|
15
|
+
const {
|
|
16
|
+
onClick
|
|
17
|
+
} = props;
|
|
18
|
+
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
19
|
+
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
20
|
+
const isChartsPanelOpen = (0, _xDataGridPro.useGridSelector)(apiRef, _gridChartsIntegrationSelectors.gridChartsPanelOpenSelector);
|
|
21
|
+
const openChartsSettings = event => {
|
|
22
|
+
onClick(event);
|
|
23
|
+
apiRef.current.setChartsPanelOpen(true);
|
|
24
|
+
};
|
|
25
|
+
if (!rootProps.experimentalFeatures?.charts || !rootProps.chartsIntegration) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
29
|
+
onClick: openChartsSettings,
|
|
30
|
+
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.chartsIcon, {
|
|
31
|
+
fontSize: "small"
|
|
32
|
+
}),
|
|
33
|
+
disabled: isChartsPanelOpen,
|
|
34
|
+
children: apiRef.current.getLocaleText('columnMenuManageCharts')
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.GridColumnMenuManagePanelItem = GridColumnMenuManagePanelItem;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _GridColumnMenuPivotItem = require("./GridColumnMenuPivotItem");
|
|
12
|
+
var _GridColumnMenuChartsItem = require("./GridColumnMenuChartsItem");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function GridColumnMenuManagePanelItem(props) {
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
16
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnMenuPivotItem.GridColumnMenuPivotItem, (0, _extends2.default)({}, props)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnMenuChartsItem.GridColumnMenuChartsItem, (0, _extends2.default)({}, props))]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
export declare function GridColumnMenuPivotItem(props: GridColumnMenuItemProps): React.JSX.Element;
|
|
3
|
+
export declare function GridColumnMenuPivotItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
package/components/{GridColumnMenuPivotItem.js → columnMenu/menuItems/GridColumnMenuPivotItem.js}
RENAMED
|
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.GridColumnMenuPivotItem = GridColumnMenuPivotItem;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
10
|
-
var _gridPivotingSelectors = require("
|
|
11
|
-
var _useGridRootProps = require("
|
|
12
|
-
var _useGridApiContext = require("
|
|
13
|
-
var _sidebar = require("
|
|
10
|
+
var _gridPivotingSelectors = require("../../../hooks/features/pivoting/gridPivotingSelectors");
|
|
11
|
+
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
12
|
+
var _useGridApiContext = require("../../../hooks/utils/useGridApiContext");
|
|
13
|
+
var _sidebar = require("../../../hooks/features/sidebar");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function GridColumnMenuPivotItem(props) {
|
|
16
16
|
const {
|
|
@@ -23,6 +23,9 @@ function GridColumnMenuPivotItem(props) {
|
|
|
23
23
|
onClick(event);
|
|
24
24
|
apiRef.current.showSidebar(_sidebar.GridSidebarValue.Pivot);
|
|
25
25
|
};
|
|
26
|
+
if (rootProps.disablePivoting) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
26
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
27
30
|
onClick: openPivotSettings,
|
|
28
31
|
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.pivotIcon, {
|
|
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.GridColumnMenuRowGroupItem = GridColumnMenuRowGroupItem;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
10
|
-
var _useGridApiContext = require("
|
|
11
|
-
var _gridRowGroupingSelector = require("
|
|
12
|
-
var _gridRowGroupingUtils = require("
|
|
13
|
-
var _useGridRootProps = require("
|
|
10
|
+
var _useGridApiContext = require("../../../hooks/utils/useGridApiContext");
|
|
11
|
+
var _gridRowGroupingSelector = require("../../../hooks/features/rowGrouping/gridRowGroupingSelector");
|
|
12
|
+
var _gridRowGroupingUtils = require("../../../hooks/features/rowGrouping/gridRowGroupingUtils");
|
|
13
|
+
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function GridColumnMenuRowGroupItem(props) {
|
|
16
16
|
const {
|
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.GridColumnMenuRowUngroupItem = GridColumnMenuRowUngroupItem;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
10
|
-
var _useGridApiContext = require("
|
|
11
|
-
var _gridRowGroupingSelector = require("
|
|
12
|
-
var _useGridRootProps = require("
|
|
10
|
+
var _useGridApiContext = require("../../../hooks/utils/useGridApiContext");
|
|
11
|
+
var _gridRowGroupingSelector = require("../../../hooks/features/rowGrouping/gridRowGroupingSelector");
|
|
12
|
+
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function GridColumnMenuRowUngroupItem(props) {
|
|
15
15
|
const {
|
package/components/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export * from "./GridExcelExportMenuItem.js";
|
|
2
2
|
export * from "../material/icons.js";
|
|
3
|
-
export * from "./GridColumnMenuAggregationItem.js";
|
|
3
|
+
export * from "./columnMenu/menuItems/GridColumnMenuAggregationItem.js";
|
|
4
4
|
export * from "./promptField/index.js";
|
|
5
5
|
export { GridColumnMenuGroupingItem } from "./GridPremiumColumnMenu.js";
|
|
6
6
|
export * from "./export/index.js";
|
|
7
7
|
export * from "./GridEmptyPivotOverlay.js";
|
|
8
8
|
export * from "./pivotPanel/index.js";
|
|
9
|
-
export * from "./aiAssistantPanel/index.js";
|
|
9
|
+
export * from "./aiAssistantPanel/index.js";
|
|
10
|
+
export * from "./chartsPanel/index.js";
|
package/components/index.js
CHANGED
|
@@ -36,7 +36,7 @@ Object.keys(_icons).forEach(function (key) {
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
-
var _GridColumnMenuAggregationItem = require("./GridColumnMenuAggregationItem");
|
|
39
|
+
var _GridColumnMenuAggregationItem = require("./columnMenu/menuItems/GridColumnMenuAggregationItem");
|
|
40
40
|
Object.keys(_GridColumnMenuAggregationItem).forEach(function (key) {
|
|
41
41
|
if (key === "default" || key === "__esModule") return;
|
|
42
42
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -108,4 +108,16 @@ Object.keys(_aiAssistantPanel).forEach(function (key) {
|
|
|
108
108
|
return _aiAssistantPanel[key];
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
|
+
});
|
|
112
|
+
var _chartsPanel = require("./chartsPanel");
|
|
113
|
+
Object.keys(_chartsPanel).forEach(function (key) {
|
|
114
|
+
if (key === "default" || key === "__esModule") return;
|
|
115
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
116
|
+
if (key in exports && exports[key] === _chartsPanel[key]) return;
|
|
117
|
+
Object.defineProperty(exports, key, {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function () {
|
|
120
|
+
return _chartsPanel[key];
|
|
121
|
+
}
|
|
122
|
+
});
|
|
111
123
|
});
|
|
@@ -159,7 +159,13 @@ function AggregationSelect({
|
|
|
159
159
|
};
|
|
160
160
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
161
161
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseChip, {
|
|
162
|
-
label:
|
|
162
|
+
label: (0, _gridAggregationUtils.getAggregationFunctionLabel)({
|
|
163
|
+
apiRef,
|
|
164
|
+
aggregationRule: {
|
|
165
|
+
aggregationFunctionName: aggFunc,
|
|
166
|
+
aggregationFunction: rootProps.aggregationFunctions[aggFunc]
|
|
167
|
+
}
|
|
168
|
+
}),
|
|
163
169
|
size: "small",
|
|
164
170
|
variant: "outlined",
|
|
165
171
|
ref: aggregationMenuTriggerRef,
|
|
@@ -182,7 +188,13 @@ function AggregationSelect({
|
|
|
182
188
|
selected: aggFunc === func,
|
|
183
189
|
onClick: () => handleClick(func)
|
|
184
190
|
}, rootProps.slotProps?.baseMenuItem, {
|
|
185
|
-
children:
|
|
191
|
+
children: (0, _gridAggregationUtils.getAggregationFunctionLabel)({
|
|
192
|
+
apiRef,
|
|
193
|
+
aggregationRule: {
|
|
194
|
+
aggregationFunctionName: func,
|
|
195
|
+
aggregationFunction: rootProps.aggregationFunctions[func]
|
|
196
|
+
}
|
|
197
|
+
})
|
|
186
198
|
}), func))
|
|
187
199
|
}))
|
|
188
200
|
})]
|
|
@@ -50,6 +50,7 @@ const GridPivotPanelSwitchLabel = (0, _system.styled)('span', {
|
|
|
50
50
|
name: 'MuiDataGrid',
|
|
51
51
|
slot: 'PivotPanelSwitchLabel'
|
|
52
52
|
})({
|
|
53
|
+
font: _internals.vars.typography.font.large,
|
|
53
54
|
fontWeight: _internals.vars.typography.fontWeight.medium
|
|
54
55
|
});
|
|
55
56
|
function GridPivotPanelHeader(props) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COLUMN_GROUP_ID_SEPARATOR = ">->";
|
|
@@ -14,6 +14,7 @@ var _GridEmptyPivotOverlay = require("../components/GridEmptyPivotOverlay");
|
|
|
14
14
|
var _GridPremiumToolbar = require("../components/GridPremiumToolbar");
|
|
15
15
|
const DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS = exports.DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS = (0, _extends2.default)({}, _internals.DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS, _material.default, {
|
|
16
16
|
aiAssistantPanel: null,
|
|
17
|
+
chartsPanel: null,
|
|
17
18
|
columnMenu: _GridPremiumColumnMenu.GridPremiumColumnMenu,
|
|
18
19
|
bottomContainer: _GridBottomContainer.GridBottomContainer,
|
|
19
20
|
emptyPivotOverlay: _GridEmptyPivotOverlay.GridEmptyPivotOverlay,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface GridChartsIntegrationContextProviderProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function GridChartsIntegrationContextProvider({
|
|
6
|
+
children
|
|
7
|
+
}: GridChartsIntegrationContextProviderProps): React.JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.GridChartsIntegrationContextProvider = GridChartsIntegrationContextProvider;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _GridChartsIntegrationContext = require("../components/chartsIntegration/GridChartsIntegrationContext");
|
|
13
|
+
var _useGridChartsIntegration = require("../hooks/features/chartsIntegration/useGridChartsIntegration");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function GridChartsIntegrationContextProvider({
|
|
16
|
+
children
|
|
17
|
+
}) {
|
|
18
|
+
const [chartStateLookup, setChartStateLookup] = React.useState({});
|
|
19
|
+
const setChartState = React.useCallback((id, state) => {
|
|
20
|
+
if (id === '') {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
setChartStateLookup(prev => (0, _extends2.default)({}, prev, {
|
|
24
|
+
[id]: (0, _extends2.default)({}, prev[id] || _useGridChartsIntegration.EMPTY_CHART_INTEGRATION_CONTEXT_STATE, state)
|
|
25
|
+
}));
|
|
26
|
+
}, []);
|
|
27
|
+
const value = React.useMemo(() => ({
|
|
28
|
+
chartStateLookup,
|
|
29
|
+
setChartState
|
|
30
|
+
}), [chartStateLookup, setChartState]);
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridChartsIntegrationContext.GridChartsIntegrationContext.Provider, {
|
|
32
|
+
value: value,
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ChartState } from "../models/gridChartsIntegration.js";
|
|
3
|
+
export type GridChartsRendererProxyRendererCallback = (type: string, props: Record<string, any>, Component: React.ComponentType<any>) => React.ReactNode;
|
|
4
|
+
type GridChartsRendererProxyRenderer = React.ComponentType<{
|
|
5
|
+
dimensions: ChartState['dimensions'];
|
|
6
|
+
values: ChartState['values'];
|
|
7
|
+
chartType: ChartState['type'];
|
|
8
|
+
configuration: ChartState['configuration'];
|
|
9
|
+
onRender?: GridChartsRendererProxyRendererCallback;
|
|
10
|
+
}>;
|
|
11
|
+
export interface GridChartsRendererProxyProps {
|
|
12
|
+
/**
|
|
13
|
+
* The unique identifier for the chart.
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* The label for the chart.
|
|
18
|
+
*/
|
|
19
|
+
label?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The renderer component that will render the chart.
|
|
22
|
+
*/
|
|
23
|
+
renderer: GridChartsRendererProxyRenderer;
|
|
24
|
+
/**
|
|
25
|
+
* Callback function called when the chart is about to be rendered.
|
|
26
|
+
* Use this to check and modify the chart props before it is rendered.
|
|
27
|
+
*/
|
|
28
|
+
onRender?: GridChartsRendererProxyRendererCallback;
|
|
29
|
+
}
|
|
30
|
+
declare function GridChartsRendererProxy(props: GridChartsRendererProxyProps): React.JSX.Element | null;
|
|
31
|
+
declare namespace GridChartsRendererProxy {
|
|
32
|
+
var propTypes: any;
|
|
33
|
+
}
|
|
34
|
+
export { GridChartsRendererProxy };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.GridChartsRendererProxy = GridChartsRendererProxy;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _useGridChartIntegration = require("../hooks/utils/useGridChartIntegration");
|
|
14
|
+
var _useGridChartsIntegration = require("../hooks/features/chartsIntegration/useGridChartsIntegration");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function GridChartsRendererProxy(props) {
|
|
17
|
+
const {
|
|
18
|
+
renderer: Renderer,
|
|
19
|
+
id,
|
|
20
|
+
label,
|
|
21
|
+
onRender
|
|
22
|
+
} = props;
|
|
23
|
+
const {
|
|
24
|
+
chartStateLookup,
|
|
25
|
+
setChartState
|
|
26
|
+
} = (0, _useGridChartIntegration.useGridChartsIntegrationContext)();
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
if (!chartStateLookup[id]) {
|
|
29
|
+
// With this, the proxy "registers" the chart to the context
|
|
30
|
+
setChartState(id, (0, _extends2.default)({}, _useGridChartsIntegration.EMPTY_CHART_INTEGRATION_CONTEXT_STATE, {
|
|
31
|
+
label
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
return () => {
|
|
35
|
+
delete chartStateLookup[id];
|
|
36
|
+
};
|
|
37
|
+
}, [id, label, setChartState, chartStateLookup]);
|
|
38
|
+
if (!chartStateLookup[id]) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const {
|
|
42
|
+
dimensions,
|
|
43
|
+
values,
|
|
44
|
+
type,
|
|
45
|
+
configuration
|
|
46
|
+
} = chartStateLookup[id];
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Renderer, {
|
|
48
|
+
dimensions: dimensions,
|
|
49
|
+
values: values,
|
|
50
|
+
chartType: type,
|
|
51
|
+
configuration: configuration,
|
|
52
|
+
onRender: onRender
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
process.env.NODE_ENV !== "production" ? GridChartsRendererProxy.propTypes = {
|
|
56
|
+
// ----------------------------- Warning --------------------------------
|
|
57
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
58
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
59
|
+
// ----------------------------------------------------------------------
|
|
60
|
+
/**
|
|
61
|
+
* The unique identifier for the chart.
|
|
62
|
+
*/
|
|
63
|
+
id: _propTypes.default.string.isRequired,
|
|
64
|
+
/**
|
|
65
|
+
* The label for the chart.
|
|
66
|
+
*/
|
|
67
|
+
label: _propTypes.default.string,
|
|
68
|
+
/**
|
|
69
|
+
* Callback function called when the chart is about to be rendered.
|
|
70
|
+
* Use this to check and modify the chart props before it is rendered.
|
|
71
|
+
*/
|
|
72
|
+
onRender: _propTypes.default.func,
|
|
73
|
+
/**
|
|
74
|
+
* The renderer component that will render the chart.
|
|
75
|
+
*/
|
|
76
|
+
renderer: _propTypes.default.func.isRequired
|
|
77
|
+
} : void 0;
|
package/context/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _GridChartsIntegrationContextProvider = require("./GridChartsIntegrationContextProvider");
|
|
7
|
+
Object.keys(_GridChartsIntegrationContextProvider).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _GridChartsIntegrationContextProvider[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _GridChartsIntegrationContextProvider[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _GridChartsRendererProxy = require("./GridChartsRendererProxy");
|
|
18
|
+
Object.keys(_GridChartsRendererProxy).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _GridChartsRendererProxy[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _GridChartsRendererProxy[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -4,7 +4,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useLicenseVerifier, Watermark } from '@mui/x-license';
|
|
7
|
-
import { GridRoot, GridContextProvider, useGridSelector } from '@mui/x-data-grid-pro';
|
|
7
|
+
import { GridRoot, GridContextProvider, useGridSelector, gridRowIdSelector } from '@mui/x-data-grid-pro';
|
|
8
8
|
import { propValidatorsDataGrid, propValidatorsDataGridPro, validateProps, useGridApiInitialization } from '@mui/x-data-grid-pro/internals';
|
|
9
9
|
import { useMaterialCSSVariables } from '@mui/x-data-grid/material';
|
|
10
10
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
@@ -30,10 +30,23 @@ const configuration = {
|
|
|
30
30
|
field
|
|
31
31
|
});
|
|
32
32
|
},
|
|
33
|
+
useSortValueGetter: apiRef => (id, field) => gridCellAggregationResultSelector(apiRef, {
|
|
34
|
+
id,
|
|
35
|
+
field
|
|
36
|
+
})?.value ?? apiRef.current.getCellValue(id, field),
|
|
37
|
+
useFilterValueGetter: (apiRef, props) => (row, column) => {
|
|
38
|
+
if (props.aggregationRowsScope === 'filtered') {
|
|
39
|
+
return apiRef.current.getRowValue(row, column);
|
|
40
|
+
}
|
|
41
|
+
return gridCellAggregationResultSelector(apiRef, {
|
|
42
|
+
id: gridRowIdSelector(apiRef, row),
|
|
43
|
+
field: column.field
|
|
44
|
+
})?.value ?? apiRef.current.getRowValue(row, column);
|
|
45
|
+
},
|
|
33
46
|
useGridRowsOverridableMethods
|
|
34
47
|
}
|
|
35
48
|
};
|
|
36
|
-
const releaseInfo = "
|
|
49
|
+
const releaseInfo = "MTc1ODc1MTIwMDAwMA==";
|
|
37
50
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
38
51
|
packageName: "x-data-grid-premium",
|
|
39
52
|
releaseInfo: releaseInfo
|
|
@@ -73,6 +86,10 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
73
86
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
74
87
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
75
88
|
// ----------------------------------------------------------------------
|
|
89
|
+
/**
|
|
90
|
+
* The id of the active chart.
|
|
91
|
+
*/
|
|
92
|
+
activeChartId: PropTypes.string,
|
|
76
93
|
/**
|
|
77
94
|
* Aggregation functions available on the grid.
|
|
78
95
|
* @default GRID_AGGREGATION_FUNCTIONS when `dataSource` is not provided, `{}` when `dataSource` is provided
|
|
@@ -189,6 +206,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
189
206
|
* Set the cell selection model of the grid.
|
|
190
207
|
*/
|
|
191
208
|
cellSelectionModel: PropTypes.object,
|
|
209
|
+
/**
|
|
210
|
+
* If `true`, the charts integration feature is enabled.
|
|
211
|
+
* @default false
|
|
212
|
+
*/
|
|
213
|
+
chartsIntegration: PropTypes.bool,
|
|
192
214
|
/**
|
|
193
215
|
* If `true`, the Data Grid will display an extra column with checkboxes for selecting rows.
|
|
194
216
|
* @default false
|
|
@@ -400,6 +422,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
400
422
|
* For each feature, if the flag is not explicitly set to `true`, then the feature is fully disabled, and neither property nor method calls will have any effect.
|
|
401
423
|
*/
|
|
402
424
|
experimentalFeatures: PropTypes.shape({
|
|
425
|
+
charts: PropTypes.bool,
|
|
403
426
|
warnIfFocusStateIsNotSynced: PropTypes.bool
|
|
404
427
|
}),
|
|
405
428
|
/**
|
|
@@ -660,6 +683,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
660
683
|
* Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute).
|
|
661
684
|
*/
|
|
662
685
|
nonce: PropTypes.string,
|
|
686
|
+
/**
|
|
687
|
+
* Callback fired when the active chart changes.
|
|
688
|
+
* @param {string} activeChartId The new active chart id.
|
|
689
|
+
*/
|
|
690
|
+
onActiveChartIdChange: PropTypes.func,
|
|
663
691
|
/**
|
|
664
692
|
* Callback fired when the row grouping model changes.
|
|
665
693
|
* @param {GridAggregationModel} model The aggregated columns.
|
|
@@ -2,4 +2,4 @@ import { RefObject } from '@mui/x-internals/types';
|
|
|
2
2
|
import { type GridConfiguration } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
import { GridPrivateApiPremium } from "../models/gridApiPremium.js";
|
|
4
4
|
import { DataGridPremiumProcessedProps } from "../models/dataGridPremiumProps.js";
|
|
5
|
-
export declare const useDataGridPremiumComponent: (apiRef: RefObject<GridPrivateApiPremium>, inProps: DataGridPremiumProcessedProps, configuration: GridConfiguration<GridPrivateApiPremium>) => DataGridPremiumProcessedProps;
|
|
5
|
+
export declare const useDataGridPremiumComponent: (apiRef: RefObject<GridPrivateApiPremium>, inProps: DataGridPremiumProcessedProps, configuration: GridConfiguration<GridPrivateApiPremium, DataGridPremiumProcessedProps>) => DataGridPremiumProcessedProps;
|
|
@@ -18,6 +18,7 @@ import { pivotingStateInitializer, useGridPivoting, useGridPivotingExportState }
|
|
|
18
18
|
import { gridPivotPropsOverridesSelector } from "../hooks/features/pivoting/gridPivotingSelectors.js";
|
|
19
19
|
import { useGridAiAssistant, aiAssistantStateInitializer } from "../hooks/features/aiAssistant/useGridAiAssistant.js";
|
|
20
20
|
import { useGridSidebar, sidebarStateInitializer } from "../hooks/features/sidebar/useGridSidebar.js";
|
|
21
|
+
import { chartsIntegrationStateInitializer, useGridChartsIntegration } from "../hooks/features/chartsIntegration/useGridChartsIntegration.js";
|
|
21
22
|
export const useDataGridPremiumComponent = (apiRef, inProps, configuration) => {
|
|
22
23
|
const pivotPropsOverrides = useGridSelector(apiRef, gridPivotPropsOverridesSelector);
|
|
23
24
|
const props = React.useMemo(() => {
|
|
@@ -90,6 +91,7 @@ export const useDataGridPremiumComponent = (apiRef, inProps, configuration) => {
|
|
|
90
91
|
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
91
92
|
useGridInitializeState(listViewStateInitializer, apiRef, props);
|
|
92
93
|
useGridInitializeState(aiAssistantStateInitializer, apiRef, props);
|
|
94
|
+
useGridInitializeState(chartsIntegrationStateInitializer, apiRef, props);
|
|
93
95
|
useGridVirtualizer(apiRef, props);
|
|
94
96
|
useGridSidebar(apiRef, props);
|
|
95
97
|
useGridPivoting(apiRef, props, inProps.columns, inProps.rows);
|
|
@@ -113,8 +115,8 @@ export const useDataGridPremiumComponent = (apiRef, inProps, configuration) => {
|
|
|
113
115
|
useGridEditing(apiRef, props);
|
|
114
116
|
useGridFocus(apiRef, props);
|
|
115
117
|
useGridPreferencesPanel(apiRef, props);
|
|
116
|
-
useGridFilter(apiRef, props);
|
|
117
|
-
useGridSorting(apiRef, props);
|
|
118
|
+
useGridFilter(apiRef, props, configuration);
|
|
119
|
+
useGridSorting(apiRef, props, configuration);
|
|
118
120
|
useGridDensity(apiRef, props);
|
|
119
121
|
useGridColumnReorder(apiRef, props);
|
|
120
122
|
useGridColumnResize(apiRef, props);
|
|
@@ -138,6 +140,7 @@ export const useDataGridPremiumComponent = (apiRef, inProps, configuration) => {
|
|
|
138
140
|
useGridVirtualization(apiRef, props);
|
|
139
141
|
useGridListView(apiRef, props);
|
|
140
142
|
useGridAiAssistant(apiRef, props);
|
|
143
|
+
useGridChartsIntegration(apiRef, props);
|
|
141
144
|
useGridPivotingExportState(apiRef);
|
|
142
145
|
|
|
143
146
|
// Should be the last thing to run, because all pre-processors should have been registered by now.
|
|
@@ -36,7 +36,8 @@ export const DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PRO
|
|
|
36
36
|
},
|
|
37
37
|
disablePivoting: false,
|
|
38
38
|
getPivotDerivedColumns: defaultGetPivotDerivedColumns,
|
|
39
|
-
aiAssistant: false
|
|
39
|
+
aiAssistant: false,
|
|
40
|
+
chartsIntegration: false
|
|
40
41
|
});
|
|
41
42
|
const defaultSlots = DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS;
|
|
42
43
|
export const useDataGridPremiumProps = inProps => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuProps, GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
import { GridColumnMenuAggregationItem } from "./GridColumnMenuAggregationItem.js";
|
|
4
|
-
import {
|
|
3
|
+
import { GridColumnMenuAggregationItem } from "./columnMenu/menuItems/GridColumnMenuAggregationItem.js";
|
|
4
|
+
import { GridColumnMenuManagePanelItem } from "./columnMenu/menuItems/GridColumnMenuManagePanelItem.js";
|
|
5
5
|
export declare function GridColumnMenuGroupingItem(props: GridColumnMenuItemProps): React.JSX.Element;
|
|
6
6
|
export declare const GRID_COLUMN_MENU_SLOTS_PREMIUM: {
|
|
7
7
|
columnMenuAggregationItem: typeof GridColumnMenuAggregationItem;
|
|
8
8
|
columnMenuGroupingItem: typeof GridColumnMenuGroupingItem;
|
|
9
|
-
|
|
9
|
+
columnMenuManagePanelItem: typeof GridColumnMenuManagePanelItem;
|
|
10
10
|
columnMenuPinningItem: typeof import("@mui/x-data-grid-pro").GridColumnMenuPinningItem;
|
|
11
11
|
columnMenuSortItem: typeof import("@mui/x-data-grid").GridColumnMenuSortItem;
|
|
12
12
|
columnMenuFilterItem: typeof import("@mui/x-data-grid").GridColumnMenuFilterItem;
|
|
@@ -19,7 +19,7 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM: {
|
|
|
19
19
|
columnMenuGroupingItem: {
|
|
20
20
|
displayOrder: number;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
columnMenuManagePanelItem: {
|
|
23
23
|
displayOrder: number;
|
|
24
24
|
};
|
|
25
25
|
columnMenuPinningItem: {
|