@mui/x-data-grid-premium 8.15.0 → 8.17.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 +207 -0
- package/DataGridPremium/DataGridPremium.js +3 -1
- package/DataGridPremium/useDataGridPremiumComponent.js +1 -1
- package/components/GridAggregationHeader.d.ts +1 -2
- package/components/GridAggregationHeader.js +0 -2
- package/components/GridBottomContainer.d.ts +1 -1
- package/components/GridDataSourceGroupingCriteriaCell.d.ts +1 -2
- package/components/GridEmptyPivotOverlay.d.ts +2 -3
- package/components/GridEmptyPivotOverlay.js +0 -2
- package/components/GridExcelExportMenuItem.d.ts +1 -2
- package/components/GridExcelExportMenuItem.js +0 -2
- package/components/GridFooterCell.d.ts +1 -2
- package/components/GridFooterCell.js +0 -2
- package/components/GridGroupingColumnFooterCell.d.ts +1 -2
- package/components/GridGroupingColumnFooterCell.js +0 -2
- package/components/GridGroupingColumnLeafCell.d.ts +1 -2
- package/components/GridGroupingColumnLeafCell.js +0 -2
- package/components/GridGroupingCriteriaCell.d.ts +1 -2
- package/components/GridPremiumColumnMenu.d.ts +2 -3
- package/components/GridPremiumColumnMenu.js +0 -2
- package/components/GridPremiumToolbar.d.ts +1 -2
- package/components/aiAssistantPanel/GridAiAssistantPanel.d.ts +1 -2
- package/components/aiAssistantPanel/GridAiAssistantPanelConversation.d.ts +1 -2
- package/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.d.ts +1 -2
- package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.d.ts +1 -2
- package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +0 -2
- package/components/chartsPanel/GridChartsPanel.d.ts +1 -2
- package/components/chartsPanel/chart/GridChartsPanelChart.d.ts +1 -2
- package/components/chartsPanel/chart/GridChartsPanelChart.js +0 -2
- package/components/chartsPanel/customize/GridChartsPanelCustomize.d.ts +1 -2
- package/components/chartsPanel/data/GridChartsPanelData.d.ts +1 -2
- package/components/chartsPanel/data/GridChartsPanelDataBody.d.ts +1 -2
- package/components/chartsPanel/data/GridChartsPanelDataField.d.ts +2 -2
- package/components/chartsPanel/data/GridChartsPanelDataFieldMenu.d.ts +1 -2
- package/components/chartsPanel/data/GridChartsPanelDataHeader.d.ts +1 -2
- package/components/chartsPanel/data/GridChartsPanelDataSearch.d.ts +1 -2
- package/components/collapsible/Collapsible.d.ts +1 -1
- package/components/collapsible/CollapsiblePanel.d.ts +1 -1
- package/components/collapsible/CollapsibleTrigger.d.ts +1 -1
- package/components/columnMenu/menuItems/GridColumnMenuAggregationItem.d.ts +1 -2
- package/components/columnMenu/menuItems/GridColumnMenuChartsItem.d.ts +1 -2
- package/components/columnMenu/menuItems/GridColumnMenuManagePanelItem.d.ts +1 -2
- package/components/columnMenu/menuItems/GridColumnMenuPivotItem.d.ts +1 -2
- package/components/columnMenu/menuItems/GridColumnMenuRowGroupItem.d.ts +1 -2
- package/components/columnMenu/menuItems/GridColumnMenuRowUngroupItem.d.ts +1 -2
- package/components/pivotPanel/GridPivotPanel.d.ts +1 -2
- package/components/pivotPanel/GridPivotPanelBody.d.ts +1 -2
- package/components/pivotPanel/GridPivotPanelField.d.ts +1 -1
- package/components/pivotPanel/GridPivotPanelFieldMenu.d.ts +1 -2
- package/components/pivotPanel/GridPivotPanelHeader.d.ts +1 -2
- package/components/pivotPanel/GridPivotPanelSearch.d.ts +1 -2
- package/components/prompt/GridPrompt.d.ts +1 -2
- package/components/promptField/GridPromptField.d.ts +1 -2
- package/components/promptField/GridPromptField.js +0 -2
- package/components/resizablePanel/ResizablePanel.d.ts +1 -1
- package/components/resizablePanel/ResizablePanelHandle.d.ts +1 -1
- package/components/sidebar/Sidebar.d.ts +1 -1
- package/components/sidebar/SidebarHeader.d.ts +1 -1
- package/context/GridChartsIntegrationContextProvider.d.ts +1 -1
- package/context/GridChartsRendererProxy.d.ts +1 -1
- package/esm/DataGridPremium/DataGridPremium.js +3 -1
- package/esm/DataGridPremium/useDataGridPremiumComponent.js +1 -1
- package/esm/components/GridAggregationHeader.d.ts +1 -2
- package/esm/components/GridAggregationHeader.js +0 -1
- package/esm/components/GridBottomContainer.d.ts +1 -1
- package/esm/components/GridDataSourceGroupingCriteriaCell.d.ts +1 -2
- package/esm/components/GridEmptyPivotOverlay.d.ts +2 -3
- package/esm/components/GridEmptyPivotOverlay.js +0 -1
- package/esm/components/GridExcelExportMenuItem.d.ts +1 -2
- package/esm/components/GridExcelExportMenuItem.js +0 -1
- package/esm/components/GridFooterCell.d.ts +1 -2
- package/esm/components/GridFooterCell.js +0 -1
- package/esm/components/GridGroupingColumnFooterCell.d.ts +1 -2
- package/esm/components/GridGroupingColumnFooterCell.js +0 -1
- package/esm/components/GridGroupingColumnLeafCell.d.ts +1 -2
- package/esm/components/GridGroupingColumnLeafCell.js +0 -1
- package/esm/components/GridGroupingCriteriaCell.d.ts +1 -2
- package/esm/components/GridPremiumColumnMenu.d.ts +2 -3
- package/esm/components/GridPremiumColumnMenu.js +0 -1
- package/esm/components/GridPremiumToolbar.d.ts +1 -2
- package/esm/components/aiAssistantPanel/GridAiAssistantPanel.d.ts +1 -2
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversation.d.ts +1 -2
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.d.ts +1 -2
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.d.ts +1 -2
- package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +0 -1
- package/esm/components/chartsPanel/GridChartsPanel.d.ts +1 -2
- package/esm/components/chartsPanel/chart/GridChartsPanelChart.d.ts +1 -2
- package/esm/components/chartsPanel/chart/GridChartsPanelChart.js +0 -1
- package/esm/components/chartsPanel/customize/GridChartsPanelCustomize.d.ts +1 -2
- package/esm/components/chartsPanel/data/GridChartsPanelData.d.ts +1 -2
- package/esm/components/chartsPanel/data/GridChartsPanelDataBody.d.ts +1 -2
- package/esm/components/chartsPanel/data/GridChartsPanelDataField.d.ts +2 -2
- package/esm/components/chartsPanel/data/GridChartsPanelDataFieldMenu.d.ts +1 -2
- package/esm/components/chartsPanel/data/GridChartsPanelDataHeader.d.ts +1 -2
- package/esm/components/chartsPanel/data/GridChartsPanelDataSearch.d.ts +1 -2
- package/esm/components/collapsible/Collapsible.d.ts +1 -1
- package/esm/components/collapsible/CollapsiblePanel.d.ts +1 -1
- package/esm/components/collapsible/CollapsibleTrigger.d.ts +1 -1
- package/esm/components/columnMenu/menuItems/GridColumnMenuAggregationItem.d.ts +1 -2
- package/esm/components/columnMenu/menuItems/GridColumnMenuChartsItem.d.ts +1 -2
- package/esm/components/columnMenu/menuItems/GridColumnMenuManagePanelItem.d.ts +1 -2
- package/esm/components/columnMenu/menuItems/GridColumnMenuPivotItem.d.ts +1 -2
- package/esm/components/columnMenu/menuItems/GridColumnMenuRowGroupItem.d.ts +1 -2
- package/esm/components/columnMenu/menuItems/GridColumnMenuRowUngroupItem.d.ts +1 -2
- package/esm/components/pivotPanel/GridPivotPanel.d.ts +1 -2
- package/esm/components/pivotPanel/GridPivotPanelBody.d.ts +1 -2
- package/esm/components/pivotPanel/GridPivotPanelField.d.ts +1 -1
- package/esm/components/pivotPanel/GridPivotPanelFieldMenu.d.ts +1 -2
- package/esm/components/pivotPanel/GridPivotPanelHeader.d.ts +1 -2
- package/esm/components/pivotPanel/GridPivotPanelSearch.d.ts +1 -2
- package/esm/components/prompt/GridPrompt.d.ts +1 -2
- package/esm/components/promptField/GridPromptField.d.ts +1 -2
- package/esm/components/promptField/GridPromptField.js +0 -1
- package/esm/components/resizablePanel/ResizablePanel.d.ts +1 -1
- package/esm/components/resizablePanel/ResizablePanelHandle.d.ts +1 -1
- package/esm/components/sidebar/Sidebar.d.ts +1 -1
- package/esm/components/sidebar/SidebarHeader.d.ts +1 -1
- package/esm/context/GridChartsIntegrationContextProvider.d.ts +1 -1
- package/esm/context/GridChartsRendererProxy.d.ts +1 -1
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +0 -1
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +0 -1
- package/esm/hooks/features/chartsIntegration/gridChartsIntegrationSelectors.d.ts +6 -0
- package/esm/hooks/features/chartsIntegration/gridChartsIntegrationSelectors.js +1 -0
- package/esm/hooks/features/chartsIntegration/useGridChartsIntegration.d.ts +1 -1
- package/esm/hooks/features/chartsIntegration/useGridChartsIntegration.js +74 -11
- package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +20 -4
- package/esm/hooks/features/dataSource/utils.d.ts +3 -2
- package/esm/hooks/features/dataSource/utils.js +13 -1
- package/esm/hooks/features/editing/useGridCellEditable.d.ts +8 -0
- package/esm/hooks/features/editing/useGridCellEditable.js +35 -0
- package/esm/hooks/features/rowGrouping/createGroupingColDef.js +3 -4
- package/esm/index.js +1 -1
- package/esm/material/icons.d.ts +0 -1
- package/esm/material/icons.js +0 -1
- package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +0 -1
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +0 -2
- package/hooks/features/chartsIntegration/gridChartsIntegrationSelectors.d.ts +6 -0
- package/hooks/features/chartsIntegration/gridChartsIntegrationSelectors.js +2 -1
- package/hooks/features/chartsIntegration/useGridChartsIntegration.d.ts +1 -1
- package/hooks/features/chartsIntegration/useGridChartsIntegration.js +73 -10
- package/hooks/features/dataSource/useGridDataSourcePremium.js +17 -1
- package/hooks/features/dataSource/utils.d.ts +3 -2
- package/hooks/features/dataSource/utils.js +15 -2
- package/hooks/features/editing/useGridCellEditable.d.ts +8 -0
- package/hooks/features/editing/useGridCellEditable.js +41 -0
- package/hooks/features/rowGrouping/createGroupingColDef.js +3 -5
- package/index.js +1 -1
- package/material/icons.d.ts +0 -1
- package/material/icons.js +0 -2
- package/package.json +6 -6
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
export declare function GridColumnMenuRowGroupItem(props: GridColumnMenuItemProps):
|
|
2
|
+
export declare function GridColumnMenuRowGroupItem(props: GridColumnMenuItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { GridColumnMenuItemProps } from '@mui/x-data-grid-pro';
|
|
3
|
-
export declare function GridColumnMenuRowUngroupItem(props: GridColumnMenuItemProps):
|
|
2
|
+
export declare function GridColumnMenuRowUngroupItem(props: GridColumnMenuItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
export interface FieldTransferObject {
|
|
3
2
|
field: string;
|
|
4
3
|
modelKey: 'columns' | 'rows' | 'values' | null;
|
|
@@ -7,5 +6,5 @@ declare function GridPivotPanelBody({
|
|
|
7
6
|
searchValue
|
|
8
7
|
}: {
|
|
9
8
|
searchValue: string;
|
|
10
|
-
}):
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export { GridPivotPanelBody };
|
|
@@ -18,5 +18,5 @@ type GridPivotPanelFieldProps = {
|
|
|
18
18
|
} | {
|
|
19
19
|
modelKey: null;
|
|
20
20
|
});
|
|
21
|
-
declare function GridPivotPanelField(props: GridPivotPanelFieldProps):
|
|
21
|
+
declare function GridPivotPanelField(props: GridPivotPanelFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export { GridPivotPanelField };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { FieldTransferObject } from "./GridPivotPanelBody.js";
|
|
3
2
|
interface GridPivotPanelFieldMenuProps {
|
|
4
3
|
field: string;
|
|
5
4
|
modelKey: FieldTransferObject['modelKey'];
|
|
6
5
|
}
|
|
7
|
-
declare function GridPivotPanelFieldMenu(props: GridPivotPanelFieldMenuProps):
|
|
6
|
+
declare function GridPivotPanelFieldMenu(props: GridPivotPanelFieldMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export { GridPivotPanelFieldMenu };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
export interface GridPivotPanelHeaderProps {
|
|
3
2
|
searchValue: string;
|
|
4
3
|
onSearchValueChange: (value: string) => void;
|
|
5
4
|
}
|
|
6
|
-
declare function GridPivotPanelHeader(props: GridPivotPanelHeaderProps):
|
|
5
|
+
declare function GridPivotPanelHeader(props: GridPivotPanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export { GridPivotPanelHeader };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { GridSlotProps } from '@mui/x-data-grid-pro';
|
|
3
2
|
export type GridPivotPanelSearchProps = Pick<GridSlotProps['baseTextField'], 'value' | 'onChange'> & {
|
|
4
3
|
onClear: () => void;
|
|
5
4
|
};
|
|
6
|
-
declare function GridPivotPanelSearch(props: GridPivotPanelSearchProps):
|
|
5
|
+
declare function GridPivotPanelSearch(props: GridPivotPanelSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export { GridPivotPanelSearch };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Prompt } from "../../hooks/features/aiAssistant/gridAiAssistantInterfaces.js";
|
|
3
2
|
type GridPromptProps = Prompt & {
|
|
4
3
|
onRerun: () => void;
|
|
5
4
|
};
|
|
6
|
-
declare function GridPrompt(props: GridPromptProps):
|
|
5
|
+
declare function GridPrompt(props: GridPromptProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export { GridPrompt };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { PromptFieldProps } from "./PromptField.js";
|
|
3
|
-
declare function GridPromptField(props: PromptFieldProps):
|
|
2
|
+
declare function GridPromptField(props: PromptFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export { GridPromptField };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["ref"];
|
|
4
|
-
import * as React from 'react';
|
|
5
4
|
import { PromptField } from "./PromptField.js";
|
|
6
5
|
import { PromptFieldControl } from "./PromptFieldControl.js";
|
|
7
6
|
import { PromptFieldRecord } from "./PromptFieldRecord.js";
|
|
@@ -6,5 +6,5 @@ export type ResizablePanelProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
6
6
|
*/
|
|
7
7
|
direction?: 'horizontal' | 'vertical';
|
|
8
8
|
};
|
|
9
|
-
declare function ResizablePanel(props: ResizablePanelProps):
|
|
9
|
+
declare function ResizablePanel(props: ResizablePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export { ResizablePanel };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type ResizablePanelHandleProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
declare function ResizablePanelHandle(props: ResizablePanelHandleProps):
|
|
3
|
+
declare function ResizablePanelHandle(props: ResizablePanelHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { ResizablePanelHandle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type SidebarProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
declare function Sidebar(props: SidebarProps):
|
|
3
|
+
declare function Sidebar(props: SidebarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
export { Sidebar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type SidebarHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
declare function SidebarHeader(props: SidebarHeaderProps):
|
|
3
|
+
declare function SidebarHeader(props: SidebarHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { SidebarHeader };
|
|
@@ -4,4 +4,4 @@ export interface GridChartsIntegrationContextProviderProps {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function GridChartsIntegrationContextProvider({
|
|
6
6
|
children
|
|
7
|
-
}: GridChartsIntegrationContextProviderProps):
|
|
7
|
+
}: GridChartsIntegrationContextProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,7 +27,7 @@ export interface GridChartsRendererProxyProps {
|
|
|
27
27
|
*/
|
|
28
28
|
onRender?: GridChartsRendererProxyRendererCallback;
|
|
29
29
|
}
|
|
30
|
-
declare function GridChartsRendererProxy(props: GridChartsRendererProxyProps):
|
|
30
|
+
declare function GridChartsRendererProxy(props: GridChartsRendererProxyProps): import("react/jsx-runtime").JSX.Element | null;
|
|
31
31
|
declare namespace GridChartsRendererProxy {
|
|
32
32
|
var propTypes: any;
|
|
33
33
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["aggregationWrappedProperties"];
|
|
4
|
-
import * as React from 'react';
|
|
5
4
|
import { gridRowNodeSelector } from '@mui/x-data-grid-pro';
|
|
6
5
|
import { gridAggregationLookupSelector } from "./gridAggregationSelectors.js";
|
|
7
6
|
import { GridFooterCell } from "../../../components/GridFooterCell.js";
|
|
@@ -3,6 +3,12 @@ import { GridStatePremium } from "../../../models/gridStatePremium.js";
|
|
|
3
3
|
export declare const gridChartsIntegrationActiveChartIdSelector: (args_0: import("react").RefObject<{
|
|
4
4
|
state: GridStatePremium;
|
|
5
5
|
} | null>) => string;
|
|
6
|
+
export declare const gridChartsIntegrationChartsLookupSelector: (args_0: import("react").RefObject<{
|
|
7
|
+
state: GridStatePremium;
|
|
8
|
+
} | null>) => Record<string, {
|
|
9
|
+
dimensions: import("./gridChartsIntegrationInterfaces.js").GridChartsIntegrationItem[];
|
|
10
|
+
values: import("./gridChartsIntegrationInterfaces.js").GridChartsIntegrationItem[];
|
|
11
|
+
}>;
|
|
6
12
|
export declare const gridChartsPanelOpenSelector: (args_0: import("react").RefObject<{
|
|
7
13
|
state: GridStatePremium;
|
|
8
14
|
} | null>) => boolean;
|
|
@@ -3,6 +3,7 @@ import { gridSidebarStateSelector, GridSidebarValue } from "../sidebar/index.js"
|
|
|
3
3
|
import { gridPivotModelSelector } from "../pivoting/gridPivotingSelectors.js";
|
|
4
4
|
const gridChartsIntegrationStateSelector = createRootSelector(state => state.chartsIntegration);
|
|
5
5
|
export const gridChartsIntegrationActiveChartIdSelector = createSelector(gridChartsIntegrationStateSelector, chartsIntegration => chartsIntegration.activeChartId);
|
|
6
|
+
export const gridChartsIntegrationChartsLookupSelector = createSelector(gridChartsIntegrationStateSelector, chartsIntegration => chartsIntegration.charts);
|
|
6
7
|
export const gridChartsPanelOpenSelector = createSelector(gridSidebarStateSelector, sidebar => sidebar.value === GridSidebarValue.Charts && sidebar.open);
|
|
7
8
|
export const gridChartableColumnsSelector = createSelectorMemoized(gridColumnLookupSelector, gridPivotActiveSelector, gridPivotModelSelector, (columns, pivotActive, pivotModel) => {
|
|
8
9
|
let chartableColumns = Object.values(columns).filter(column => column.chartable);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
4
|
-
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
4
|
+
import type { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
5
5
|
import { ChartState } from "../../../models/gridChartsIntegration.js";
|
|
6
6
|
export declare const EMPTY_CHART_INTEGRATION_CONTEXT_STATE: ChartState;
|
|
7
7
|
export declare const chartsIntegrationStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'chartsIntegration' | 'initialState' | 'activeChartId' | 'rowGroupingModel' | 'pivotModel' | 'experimentalFeatures'>, GridPrivateApiPremium>;
|
|
@@ -6,7 +6,7 @@ import debounce from '@mui/utils/debounce';
|
|
|
6
6
|
import { gridColumnGroupsLookupSelector, gridColumnGroupsUnwrappedModelSelector, gridRowIdSelector, gridRowNodeSelector, gridRowTreeSelector } from '@mui/x-data-grid-pro';
|
|
7
7
|
import { useGridApiMethod, useGridEvent, gridColumnLookupSelector, runIf, gridPivotActiveSelector, useGridRegisterPipeProcessor, gridColumnFieldsSelector, gridFilteredSortedDepthRowEntriesSelector, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD } from '@mui/x-data-grid-pro/internals';
|
|
8
8
|
import { getRowGroupingFieldFromGroupingCriteria } from "../rowGrouping/gridRowGroupingUtils.js";
|
|
9
|
-
import { gridChartsPanelOpenSelector, gridChartsDimensionsSelector, gridChartsValuesSelector, gridChartsIntegrationActiveChartIdSelector, gridChartableColumnsSelector } from "./gridChartsIntegrationSelectors.js";
|
|
9
|
+
import { gridChartsPanelOpenSelector, gridChartsDimensionsSelector, gridChartsValuesSelector, gridChartsIntegrationActiveChartIdSelector, gridChartableColumnsSelector, gridChartsIntegrationChartsLookupSelector } from "./gridChartsIntegrationSelectors.js";
|
|
10
10
|
import { useGridChartsIntegrationContext } from "../../utils/useGridChartIntegration.js";
|
|
11
11
|
import { isBlockedForSection } from "./utils.js";
|
|
12
12
|
import { gridRowGroupingSanitizedModelSelector } from "../rowGrouping/gridRowGroupingSelector.js";
|
|
@@ -150,19 +150,21 @@ export const useGridChartsIntegration = (apiRef, props) => {
|
|
|
150
150
|
if (!pivotActive && visibleValues.current[activeChartId] && rowGroupingModel.length > 0) {
|
|
151
151
|
// with row grouping add the aggregation model to the newly added value dataset
|
|
152
152
|
const aggregatedFields = Object.keys(aggregationModel);
|
|
153
|
+
const aggregationsToAdd = {};
|
|
153
154
|
visibleValues.current[activeChartId].forEach(item => {
|
|
154
155
|
const hasAggregation = aggregatedFields.includes(item.field);
|
|
155
156
|
if (!hasAggregation) {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
})[0]
|
|
163
|
-
}));
|
|
157
|
+
// use the first available aggregation function
|
|
158
|
+
aggregationsToAdd[item.field] = getAvailableAggregationFunctions({
|
|
159
|
+
aggregationFunctions: props.aggregationFunctions,
|
|
160
|
+
colDef: item,
|
|
161
|
+
isDataSource: !!props.dataSource
|
|
162
|
+
})[0];
|
|
164
163
|
}
|
|
165
164
|
});
|
|
165
|
+
if (Object.keys(aggregationsToAdd).length > 0) {
|
|
166
|
+
apiRef.current.setAggregationModel(_extends({}, aggregationModel, aggregationsToAdd));
|
|
167
|
+
}
|
|
166
168
|
}
|
|
167
169
|
}, [apiRef, props.aggregationFunctions, props.dataSource, activeChartId, pivotActive, aggregationModel]);
|
|
168
170
|
const handleRowDataUpdate = React.useCallback(chartIds => {
|
|
@@ -296,8 +298,8 @@ export const useGridChartsIntegration = (apiRef, props) => {
|
|
|
296
298
|
}
|
|
297
299
|
});
|
|
298
300
|
updateOtherModels();
|
|
299
|
-
|
|
300
|
-
}, [apiRef, chartStateLookup, pivotActive, pivotModel,
|
|
301
|
+
debouncedHandleRowDataUpdate(chartIds);
|
|
302
|
+
}, [apiRef, chartStateLookup, pivotActive, pivotModel, debouncedHandleRowDataUpdate, updateOtherModels]);
|
|
301
303
|
const debouncedHandleColumnDataUpdate = React.useMemo(() => debounce(handleColumnDataUpdate, 0), [handleColumnDataUpdate]);
|
|
302
304
|
const setChartsPanelOpen = React.useCallback(callback => {
|
|
303
305
|
if (!isChartsIntegrationAvailable) {
|
|
@@ -496,6 +498,67 @@ export const useGridChartsIntegration = (apiRef, props) => {
|
|
|
496
498
|
useGridEvent(apiRef, 'pivotModeChange', runIf(isChartsIntegrationAvailable, () => debouncedHandleColumnDataUpdate(syncedChartIds)));
|
|
497
499
|
useGridEvent(apiRef, 'filteredRowsSet', runIf(isChartsIntegrationAvailable, () => debouncedHandleRowDataUpdate(syncedChartIds)));
|
|
498
500
|
useGridEvent(apiRef, 'sortedRowsSet', runIf(isChartsIntegrationAvailable, () => debouncedHandleRowDataUpdate(syncedChartIds)));
|
|
501
|
+
const stateExportPreProcessing = React.useCallback((prevState, exportContext) => {
|
|
502
|
+
if (!props.chartsIntegration || !props.experimentalFeatures?.charts) {
|
|
503
|
+
return prevState;
|
|
504
|
+
}
|
|
505
|
+
const currentActiveChartId = gridChartsIntegrationActiveChartIdSelector(apiRef);
|
|
506
|
+
const chartsLookup = gridChartsIntegrationChartsLookupSelector(apiRef);
|
|
507
|
+
const integrationContextToExport = Object.fromEntries(Object.entries(chartStateLookup).map(([chartId, chartState]) => [chartId,
|
|
508
|
+
// keep only the state that is controlled by the user, drop the data and labels
|
|
509
|
+
{
|
|
510
|
+
synced: chartState.synced,
|
|
511
|
+
type: chartState.type,
|
|
512
|
+
configuration: chartState.configuration
|
|
513
|
+
}]));
|
|
514
|
+
const shouldExportChartState =
|
|
515
|
+
// Always export if the `exportOnlyDirtyModels` property is not activated
|
|
516
|
+
!exportContext.exportOnlyDirtyModels ||
|
|
517
|
+
// Always export if the chart state has been initialized
|
|
518
|
+
props.initialState?.chartsIntegration != null ||
|
|
519
|
+
// Export if the chart model or context is not empty
|
|
520
|
+
Object.keys(chartsLookup).length > 0 || Object.keys(integrationContextToExport).length > 0;
|
|
521
|
+
if (!shouldExportChartState) {
|
|
522
|
+
return prevState;
|
|
523
|
+
}
|
|
524
|
+
const chartStateToExport = {
|
|
525
|
+
activeChartId: currentActiveChartId,
|
|
526
|
+
charts: chartsLookup,
|
|
527
|
+
// add a custom prop to keep the integration context in the exported state
|
|
528
|
+
integrationContext: integrationContextToExport
|
|
529
|
+
};
|
|
530
|
+
return _extends({}, prevState, {
|
|
531
|
+
chartsIntegration: chartStateToExport
|
|
532
|
+
});
|
|
533
|
+
}, [apiRef, chartStateLookup, props.chartsIntegration, props.experimentalFeatures?.charts, props.initialState?.chartsIntegration]);
|
|
534
|
+
const stateRestorePreProcessing = React.useCallback((params, restoreContext) => {
|
|
535
|
+
const chartsRestoreState = restoreContext.stateToRestore.chartsIntegration;
|
|
536
|
+
if (!chartsRestoreState) {
|
|
537
|
+
return params;
|
|
538
|
+
}
|
|
539
|
+
const {
|
|
540
|
+
activeChartId: activeChartIdToRestore,
|
|
541
|
+
charts: chartsToRestore,
|
|
542
|
+
integrationContext
|
|
543
|
+
} = chartsRestoreState;
|
|
544
|
+
if (activeChartIdToRestore === undefined || chartsToRestore === undefined || Object.keys(chartsToRestore).length === 0) {
|
|
545
|
+
return params;
|
|
546
|
+
}
|
|
547
|
+
apiRef.current.setState(_extends({}, apiRef.current.state, {
|
|
548
|
+
chartsIntegration: {
|
|
549
|
+
activeChartId: activeChartIdToRestore,
|
|
550
|
+
charts: chartsToRestore
|
|
551
|
+
}
|
|
552
|
+
}));
|
|
553
|
+
|
|
554
|
+
// restore the integration context for each chart
|
|
555
|
+
Object.entries(integrationContext).forEach(([chartId, chartContextState]) => {
|
|
556
|
+
setChartState(chartId, chartContextState);
|
|
557
|
+
});
|
|
558
|
+
return params;
|
|
559
|
+
}, [apiRef, setChartState]);
|
|
560
|
+
useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);
|
|
561
|
+
useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
499
562
|
React.useEffect(() => {
|
|
500
563
|
if (!activeChartId && availableChartIds.length > 0) {
|
|
501
564
|
setActiveChartId(availableChartIds[0]);
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
6
|
+
import { useGridEvent as addEventHandler, useGridApiMethod, GRID_ROOT_GROUP_ID, useGridEvent, gridRowTreeSelector } from '@mui/x-data-grid-pro';
|
|
7
|
+
import { useGridDataSourceBasePro, useGridRegisterStrategyProcessor, useGridRegisterPipeProcessor, gridPivotInitialColumnsSelector, runIf, gridPivotActiveSelector, GridStrategyGroup, DataSourceRowsUpdateStrategy, getGroupKeys } from '@mui/x-data-grid-pro/internals';
|
|
7
8
|
import { gridPivotModelSelector } from "../pivoting/gridPivotingSelectors.js";
|
|
8
|
-
import { getPropsOverrides } from "./utils.js";
|
|
9
|
+
import { getPropsOverrides, fetchParents } from "./utils.js";
|
|
9
10
|
import { gridRowGroupingSanitizedModelSelector } from "../rowGrouping/gridRowGroupingSelector.js";
|
|
11
|
+
import { gridAggregationModelSelector } from "../aggregation/gridAggregationSelectors.js";
|
|
10
12
|
function getKeyPremium(params) {
|
|
11
13
|
return JSON.stringify([params.filterModel, params.sortModel, params.groupKeys, params.groupFields, params.start, params.end, params.pivotModel ? {} : params.aggregationModel, params.pivotModel]);
|
|
12
14
|
}
|
|
@@ -16,18 +18,32 @@ const options = {
|
|
|
16
18
|
}
|
|
17
19
|
};
|
|
18
20
|
export const useGridDataSourcePremium = (apiRef, props) => {
|
|
21
|
+
const aggregationModel = gridAggregationModelSelector(apiRef);
|
|
19
22
|
const groupingModelSize = gridRowGroupingSanitizedModelSelector(apiRef).length;
|
|
20
23
|
const setStrategyAvailability = React.useCallback(() => {
|
|
21
24
|
const targetStrategy = props.treeData || !props.disableRowGrouping && groupingModelSize > 0 ? DataSourceRowsUpdateStrategy.GroupedData : DataSourceRowsUpdateStrategy.Default;
|
|
22
25
|
apiRef.current.setStrategyAvailability(GridStrategyGroup.DataSource, targetStrategy, props.dataSource && !props.lazyLoading ? () => true : () => false);
|
|
23
26
|
}, [apiRef, props.dataSource, props.lazyLoading, props.treeData, props.disableRowGrouping, groupingModelSize]);
|
|
27
|
+
const handleEditRowWithAggregation = React.useCallback((params, updatedRow) => {
|
|
28
|
+
const rowTree = gridRowTreeSelector(apiRef);
|
|
29
|
+
if (updatedRow && !isDeepEqual(updatedRow, params.previousRow)) {
|
|
30
|
+
// Reset the outdated cache, only if the row is _actually_ updated
|
|
31
|
+
apiRef.current.dataSource.cache.clear();
|
|
32
|
+
}
|
|
33
|
+
const groupKeys = getGroupKeys(rowTree, params.rowId);
|
|
34
|
+
apiRef.current.updateNestedRows([updatedRow], groupKeys);
|
|
35
|
+
// To refresh the aggregation values of all parent rows and the footer row, recursively re-fetch all parent levels
|
|
36
|
+
fetchParents(rowTree, params.rowId, apiRef.current.dataSource.fetchRows);
|
|
37
|
+
}, [apiRef]);
|
|
24
38
|
const {
|
|
25
39
|
api,
|
|
26
40
|
debouncedFetchRows,
|
|
27
41
|
flatTreeStrategyProcessor,
|
|
28
42
|
groupedDataStrategyProcessor,
|
|
29
43
|
events
|
|
30
|
-
} = useGridDataSourceBasePro(apiRef, props,
|
|
44
|
+
} = useGridDataSourceBasePro(apiRef, props, _extends({}, !props.disableAggregation && Object.keys(aggregationModel).length > 0 ? {
|
|
45
|
+
handleEditRow: handleEditRowWithAggregation
|
|
46
|
+
} : {}, options));
|
|
31
47
|
const aggregateRowRef = React.useRef({});
|
|
32
48
|
const initialColumns = gridPivotInitialColumnsSelector(apiRef);
|
|
33
49
|
const pivotActive = gridPivotActiveSelector(apiRef);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridColDef } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { GridColDef, GridRowId, GridRowTreeConfig } from '@mui/x-data-grid-pro';
|
|
3
3
|
import type { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
4
4
|
import type { GridPivotingDynamicPropsOverrides, PivotingColDefCallback, GridPivotModel } from "../pivoting/gridPivotingInterfaces.js";
|
|
5
5
|
import type { GridGetRowsResponsePivotColumn } from "./models.js";
|
|
6
|
-
export declare const getPropsOverrides: (pivotColumns: GridGetRowsResponsePivotColumn[], pivotingColDef: PivotingColDefCallback, pivotModel: GridPivotModel, initialColumns: Map<string, GridColDef>, apiRef: RefObject<GridPrivateApiPremium>) => GridPivotingDynamicPropsOverrides;
|
|
6
|
+
export declare const getPropsOverrides: (pivotColumns: GridGetRowsResponsePivotColumn[], pivotingColDef: PivotingColDefCallback, pivotModel: GridPivotModel, initialColumns: Map<string, GridColDef>, apiRef: RefObject<GridPrivateApiPremium>) => GridPivotingDynamicPropsOverrides;
|
|
7
|
+
export declare const fetchParents: (rowTree: GridRowTreeConfig, rowId: GridRowId, fetchHandler: (id?: GridRowId) => Promise<void>) => Promise<void[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { gridStringOrNumberComparator } from '@mui/x-data-grid-pro';
|
|
2
|
+
import { gridStringOrNumberComparator, GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
|
|
3
3
|
export const getPropsOverrides = (pivotColumns, pivotingColDef, pivotModel, initialColumns, apiRef) => {
|
|
4
4
|
const visiblePivotColumns = pivotModel.columns.filter(column => !column.hidden);
|
|
5
5
|
const visiblePivotValues = pivotModel.values.filter(value => !value.hidden);
|
|
@@ -137,4 +137,16 @@ export const getPropsOverrides = (pivotColumns, pivotingColDef, pivotModel, init
|
|
|
137
137
|
columnGroupingModel,
|
|
138
138
|
aggregationModel
|
|
139
139
|
};
|
|
140
|
+
};
|
|
141
|
+
export const fetchParents = (rowTree, rowId, fetchHandler) => {
|
|
142
|
+
const parents = [];
|
|
143
|
+
|
|
144
|
+
// collect all parents ids
|
|
145
|
+
let currentId = rowId;
|
|
146
|
+
while (currentId !== undefined && currentId !== GRID_ROOT_GROUP_ID) {
|
|
147
|
+
const parentId = rowTree[currentId].parent;
|
|
148
|
+
parents.push(parentId);
|
|
149
|
+
currentId = parentId;
|
|
150
|
+
}
|
|
151
|
+
return Promise.all(parents.reverse().map(fetchHandler));
|
|
140
152
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
+
import { CellEditableConditionFn } from '@mui/x-data-grid-pro/internals';
|
|
3
|
+
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
4
|
+
import { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
5
|
+
/**
|
|
6
|
+
* Implementation of the cell editable condition hook of the Data Grid Premium
|
|
7
|
+
*/
|
|
8
|
+
export declare const useIsCellEditable: (apiRef: RefObject<GridPrivateApiPremium>, props: DataGridPremiumProcessedProps) => CellEditableConditionFn;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useIsCellEditable as useIsCellEditableCommunity } from '@mui/x-data-grid-pro/internals';
|
|
5
|
+
import { gridAggregationModelSelector } from "../aggregation/gridAggregationSelectors.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Implementation of the cell editable condition hook of the Data Grid Premium
|
|
9
|
+
*/
|
|
10
|
+
export const useIsCellEditable = (apiRef, props) => {
|
|
11
|
+
const isCellEditableCommunity = useIsCellEditableCommunity();
|
|
12
|
+
return React.useCallback(params => {
|
|
13
|
+
const isCellEditable = isCellEditableCommunity(params);
|
|
14
|
+
|
|
15
|
+
// If the cell is not editable by the community hook, return false immediately
|
|
16
|
+
if (!isCellEditable) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// If the data source is not used or aggregation is disabled or both tree data and row grouping are disabled, return the community hook result
|
|
21
|
+
if (!props.dataSource || props.disableAggregation || !props.treeData && props.disableRowGrouping) {
|
|
22
|
+
return isCellEditable;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// If the cell is not a part of the aggregation model, return the community hook result
|
|
26
|
+
const aggregationModelFields = Object.keys(gridAggregationModelSelector(apiRef));
|
|
27
|
+
if (!aggregationModelFields.includes(params.field)) {
|
|
28
|
+
return isCellEditable;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// The cell is a part of the aggregation model and it is retrieved from the server-side data.
|
|
32
|
+
// Allow editing only for the non-grouped rows.
|
|
33
|
+
return params.rowNode.type !== 'group';
|
|
34
|
+
}, [apiRef, props.dataSource, props.treeData, props.disableAggregation, props.disableRowGrouping, isCellEditableCommunity]);
|
|
35
|
+
};
|
|
@@ -2,7 +2,6 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["leafField", "mainGroupingCriteria", "hideDescendantCount"],
|
|
4
4
|
_excluded2 = ["leafField", "mainGroupingCriteria", "hideDescendantCount"];
|
|
5
|
-
import * as React from 'react';
|
|
6
5
|
import { GRID_STRING_COL_DEF, gridRowIdSelector, gridRowNodeSelector } from '@mui/x-data-grid-pro';
|
|
7
6
|
import { isSingleSelectColDef, RowGroupingStrategy } from '@mui/x-data-grid-pro/internals';
|
|
8
7
|
import { GridGroupingColumnFooterCell } from "../../../components/GridGroupingColumnFooterCell.js";
|
|
@@ -84,12 +83,12 @@ function getGroupingCriteriaProperties(groupedByColDef, rowGroupingColumnMode, r
|
|
|
84
83
|
const rowId = gridRowIdSelector(apiRef, row);
|
|
85
84
|
const rowNode = gridRowNodeSelector(apiRef, rowId);
|
|
86
85
|
if (rowNode?.type === 'group') {
|
|
87
|
-
const originalColDef = columnsLookup[rowNode.groupingField];
|
|
88
|
-
if (originalColDef
|
|
86
|
+
const originalColDef = rowNode.groupingField ? columnsLookup[rowNode.groupingField] : null;
|
|
87
|
+
if (originalColDef?.type === 'singleSelect') {
|
|
89
88
|
// the default valueFormatter of a singleSelect colDef won't work with the grouping column values
|
|
90
89
|
return value;
|
|
91
90
|
}
|
|
92
|
-
const columnValueFormatter = originalColDef
|
|
91
|
+
const columnValueFormatter = originalColDef?.valueFormatter;
|
|
93
92
|
if (typeof columnValueFormatter === 'function') {
|
|
94
93
|
return columnValueFormatter(value, row, column, apiRef);
|
|
95
94
|
}
|
package/esm/index.js
CHANGED
package/esm/material/icons.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
export declare const GridWorkspacesIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
3
2
|
export declare const GridGroupWorkIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
4
3
|
export declare const GridFunctionsIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
package/esm/material/icons.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.wrapColumnWithAggregationValue = exports.unwrapColumnFromAggregation = void 0;
|
|
9
8
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
13
11
|
var _gridAggregationSelectors = require("./gridAggregationSelectors");
|
|
14
12
|
var _GridFooterCell = require("../../../components/GridFooterCell");
|
|
@@ -3,6 +3,12 @@ import { GridStatePremium } from "../../../models/gridStatePremium.js";
|
|
|
3
3
|
export declare const gridChartsIntegrationActiveChartIdSelector: (args_0: import("react").RefObject<{
|
|
4
4
|
state: GridStatePremium;
|
|
5
5
|
} | null>) => string;
|
|
6
|
+
export declare const gridChartsIntegrationChartsLookupSelector: (args_0: import("react").RefObject<{
|
|
7
|
+
state: GridStatePremium;
|
|
8
|
+
} | null>) => Record<string, {
|
|
9
|
+
dimensions: import("./gridChartsIntegrationInterfaces.js").GridChartsIntegrationItem[];
|
|
10
|
+
values: import("./gridChartsIntegrationInterfaces.js").GridChartsIntegrationItem[];
|
|
11
|
+
}>;
|
|
6
12
|
export declare const gridChartsPanelOpenSelector: (args_0: import("react").RefObject<{
|
|
7
13
|
state: GridStatePremium;
|
|
8
14
|
} | null>) => boolean;
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.gridChartsValuesSelector = exports.gridChartsPanelOpenSelector = exports.gridChartsIntegrationActiveChartIdSelector = exports.gridChartsDimensionsSelector = exports.gridChartableColumnsSelector = void 0;
|
|
6
|
+
exports.gridChartsValuesSelector = exports.gridChartsPanelOpenSelector = exports.gridChartsIntegrationChartsLookupSelector = exports.gridChartsIntegrationActiveChartIdSelector = exports.gridChartsDimensionsSelector = exports.gridChartableColumnsSelector = void 0;
|
|
7
7
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
8
8
|
var _sidebar = require("../sidebar");
|
|
9
9
|
var _gridPivotingSelectors = require("../pivoting/gridPivotingSelectors");
|
|
10
10
|
const gridChartsIntegrationStateSelector = (0, _internals.createRootSelector)(state => state.chartsIntegration);
|
|
11
11
|
const gridChartsIntegrationActiveChartIdSelector = exports.gridChartsIntegrationActiveChartIdSelector = (0, _internals.createSelector)(gridChartsIntegrationStateSelector, chartsIntegration => chartsIntegration.activeChartId);
|
|
12
|
+
const gridChartsIntegrationChartsLookupSelector = exports.gridChartsIntegrationChartsLookupSelector = (0, _internals.createSelector)(gridChartsIntegrationStateSelector, chartsIntegration => chartsIntegration.charts);
|
|
12
13
|
const gridChartsPanelOpenSelector = exports.gridChartsPanelOpenSelector = (0, _internals.createSelector)(_sidebar.gridSidebarStateSelector, sidebar => sidebar.value === _sidebar.GridSidebarValue.Charts && sidebar.open);
|
|
13
14
|
const gridChartableColumnsSelector = exports.gridChartableColumnsSelector = (0, _internals.createSelectorMemoized)(_internals.gridColumnLookupSelector, _internals.gridPivotActiveSelector, _gridPivotingSelectors.gridPivotModelSelector, (columns, pivotActive, pivotModel) => {
|
|
14
15
|
let chartableColumns = Object.values(columns).filter(column => column.chartable);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
4
|
-
import { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
4
|
+
import type { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
5
5
|
import { ChartState } from "../../../models/gridChartsIntegration.js";
|
|
6
6
|
export declare const EMPTY_CHART_INTEGRATION_CONTEXT_STATE: ChartState;
|
|
7
7
|
export declare const chartsIntegrationStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'chartsIntegration' | 'initialState' | 'activeChartId' | 'rowGroupingModel' | 'pivotModel' | 'experimentalFeatures'>, GridPrivateApiPremium>;
|