@mui/x-charts-pro 8.22.0 → 8.22.1
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 +101 -0
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +1 -1
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
- package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/FunnelChart/FunnelPlot.js +3 -3
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +2 -2
- package/SankeyChart/SankeyLinkElement.js +2 -2
- package/SankeyChart/SankeyNodeElement.js +2 -2
- package/SankeyChart/SankeyNodeLabel.js +2 -2
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +2 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +2 -2
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +3 -3
- package/esm/ChartsToolbarPro/ChartsToolbarPro.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +2 -2
- package/esm/FunnelChart/FunnelPlot.js +4 -4
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +3 -3
- package/esm/SankeyChart/SankeyLinkElement.js +3 -3
- package/esm/SankeyChart/SankeyNodeElement.js +3 -3
- package/esm/SankeyChart/SankeyNodeLabel.js +3 -3
- package/esm/hooks/useSankeySeries.js +2 -2
- package/esm/hooks/zoom/useIsZoomInteracting.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -0
- package/esm/internals/index.js +1 -0
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +3 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +4 -4
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +2 -2
- package/hooks/useSankeySeries.js +1 -1
- package/hooks/zoom/useIsZoomInteracting.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +12 -0
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +3 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,107 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.22.1
|
|
9
|
+
|
|
10
|
+
_Dec 17, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🌎 Improve Swedish (sv-SE) locale on the Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@KyeongJooni, @VismaAndreasIvarsson
|
|
19
|
+
|
|
20
|
+
The following team members contributed to this release:
|
|
21
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @Janpot, @JCQuintas, @mapache-salvaje, @michelengelen, @mj12albert, @prakhargupta1, @romgrk, @siriwatknp
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@8.22.1`
|
|
26
|
+
|
|
27
|
+
- [data grid] Fix column menu keyboard shortcut (#20621) @mj12albert
|
|
28
|
+
- [data grid] Fix row checkbox disabled state on first render and keep cell focusable (ARIA) (#20641) @michelengelen
|
|
29
|
+
- [data grid] Fix tree data selection bug (#20528) @michelengelen
|
|
30
|
+
- [data grid] Prevent clear cell selection on edit mode (#20544) @siriwatknp
|
|
31
|
+
- [data grid] Refactor column merge logic to prioritize defined properties only (#20640) @michelengelen
|
|
32
|
+
- [data grid] Reset row spanning on row expansion change (#20661) @siriwatknp
|
|
33
|
+
- [data grid] Resize newly added rows while resize action is happening (#20676)
|
|
34
|
+
- [l10n] Improve Swedish (sv-SE) locale (#20682) @VismaAndreasIvarsson
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-data-grid-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
37
|
+
|
|
38
|
+
Same changes as in `@mui/x-data-grid@8.22.1`.
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-premium@8.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid-pro@8.22.1`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPremium] Import `useId()` from `@mui/utils` to maintain React 17 compatibility (#20635) @arminmeh
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@8.22.1`
|
|
49
|
+
|
|
50
|
+
- [pickers] Add minutesStep validation test (#20672) @KyeongJooni
|
|
51
|
+
- [pickers] Fix `onAccept()` returning wrong year after selecting year then month (#20639) @michelengelen
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-date-pickers-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
54
|
+
|
|
55
|
+
Same changes as in `@mui/x-date-pickers@8.22.1`.
|
|
56
|
+
|
|
57
|
+
### Charts
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-charts@8.22.1`
|
|
60
|
+
|
|
61
|
+
- [charts] Extract `FocusedPieArc` from `PieArcPlot` (#20613) @alexfauquette
|
|
62
|
+
- [charts] Fix regression on the highlight control (#20627) @alexfauquette
|
|
63
|
+
- [charts] Refactor: `useSelector()` => `store.use()` (#20681) @romgrk
|
|
64
|
+
- [charts] Remove duplicated types (#20694) @alexfauquette
|
|
65
|
+
- [charts] Remove unused generics from bar charts (#20642) @bernardobelchior
|
|
66
|
+
- [charts] Simplify tooltip position getter for pie chart (#20625) @alexfauquette
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-charts-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
69
|
+
|
|
70
|
+
Same changes as in `@mui/x-charts@8.22.1`, plus:
|
|
71
|
+
|
|
72
|
+
- [charts-pro] Add heatmap performance benchmark (#20695) @bernardobelchior
|
|
73
|
+
|
|
74
|
+
#### `@mui/x-charts-premium@8.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
75
|
+
|
|
76
|
+
Same changes as in `@mui/x-charts-pro@8.22.1`, plus:
|
|
77
|
+
|
|
78
|
+
- [charts-premium] Create `BarChartPremium` (#20643) @bernardobelchior
|
|
79
|
+
|
|
80
|
+
### Tree View
|
|
81
|
+
|
|
82
|
+
#### `@mui/x-tree-view@8.22.1`
|
|
83
|
+
|
|
84
|
+
Internal changes.
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-tree-view-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
87
|
+
|
|
88
|
+
Same changes as in `@mui/x-tree-view@8.22.1`.
|
|
89
|
+
|
|
90
|
+
### Codemod
|
|
91
|
+
|
|
92
|
+
#### `@mui/x-codemod@8.22.1`
|
|
93
|
+
|
|
94
|
+
Internal changes.
|
|
95
|
+
|
|
96
|
+
### Docs
|
|
97
|
+
|
|
98
|
+
- [docs] Add button to GitHub source code for the Data Grid advanced demos (DX-50) (#20633) @alelthomas
|
|
99
|
+
- [docs] Remove `seriesConfig` to prevent future confusion (#20678) @alexfauquette
|
|
100
|
+
- [docs] Revise the Data Grid's API object doc for clarity and style (#20649) @mapache-salvaje
|
|
101
|
+
- [docs] Update list of charts (#20479) @prakhargupta1
|
|
102
|
+
|
|
103
|
+
### Core
|
|
104
|
+
|
|
105
|
+
- [code-infra] Regression tests improvements (#20441) @Janpot
|
|
106
|
+
- [code-infra] Test utils upgrade (#20592) @Janpot
|
|
107
|
+
- [code-infra] Try to fix the Tree View flacky tests (#20573) @JCQuintas
|
|
108
|
+
|
|
8
109
|
## 8.22.0
|
|
9
110
|
|
|
10
111
|
_Dec 11, 2025_
|
|
@@ -16,7 +16,7 @@ var _material = require("../internals/material");
|
|
|
16
16
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
17
17
|
var _useChartDataProviderProProps = require("./useChartDataProviderProProps");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const releaseInfo = "
|
|
19
|
+
const releaseInfo = "MTc2NjAxNjAwMDAwMA==";
|
|
20
20
|
const packageIdentifier = 'x-charts-pro';
|
|
21
21
|
/**
|
|
22
22
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -25,8 +25,8 @@ function ChartAxisZoomSlider({
|
|
|
25
25
|
}) {
|
|
26
26
|
const store = (0, _internals.useStore)();
|
|
27
27
|
const drawingArea = (0, _internals.useDrawingArea)();
|
|
28
|
-
const zoomData =
|
|
29
|
-
const zoomOptions =
|
|
28
|
+
const zoomData = store.use(_useChartProZoom.selectorChartAxisZoomData, axisId);
|
|
29
|
+
const zoomOptions = store.use(_internals.selectorChartAxisZoomOptionsLookup, axisId);
|
|
30
30
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
31
31
|
const {
|
|
32
32
|
xAxis
|
|
@@ -62,7 +62,7 @@ function ChartAxisZoomSliderActiveTrack({
|
|
|
62
62
|
svgRef
|
|
63
63
|
} = (0, _internals.useChartContext)();
|
|
64
64
|
const store = (0, _internals.useStore)();
|
|
65
|
-
const axis =
|
|
65
|
+
const axis = store.use(_internals.selectorChartAxis, axisId);
|
|
66
66
|
const drawingArea = (0, _internals.useDrawingArea)();
|
|
67
67
|
const activePreviewRectRef = React.useRef(null);
|
|
68
68
|
const [startThumbEl, setStartThumbEl] = React.useState(null);
|
|
@@ -50,8 +50,8 @@ function PreviewRectangles(props) {
|
|
|
50
50
|
axisDirection
|
|
51
51
|
} = props;
|
|
52
52
|
const store = (0, _internals.useStore)();
|
|
53
|
-
const zoomData =
|
|
54
|
-
const zoomOptions =
|
|
53
|
+
const zoomData = store.use(_useChartProZoom.selectorChartAxisZoomData, axisId);
|
|
54
|
+
const zoomOptions = store.use(_internals.selectorChartAxisZoomOptionsLookup, axisId);
|
|
55
55
|
const id = (0, _useId.default)();
|
|
56
56
|
if (!zoomData) {
|
|
57
57
|
return null;
|
|
@@ -23,7 +23,7 @@ function ChartAxisZoomSliderPreviewContent(props) {
|
|
|
23
23
|
height
|
|
24
24
|
} = props;
|
|
25
25
|
const store = (0, _internals.useStore)();
|
|
26
|
-
const processedSeries =
|
|
26
|
+
const processedSeries = store.use(_internals.selectorChartSeriesProcessed);
|
|
27
27
|
const children = [];
|
|
28
28
|
const clipId = `zoom-preview-mask-${axisId}`;
|
|
29
29
|
const hasLineSeries = (processedSeries.line?.seriesOrder?.length ?? 0) > 0;
|
|
@@ -55,7 +55,7 @@ function PreviewAreaElement(_ref) {
|
|
|
55
55
|
}
|
|
56
56
|
function useAreaPreviewData(axisId) {
|
|
57
57
|
const store = (0, _internals.useStore)();
|
|
58
|
-
const xAxes =
|
|
59
|
-
const yAxes =
|
|
58
|
+
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
59
|
+
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
60
60
|
return (0, _internals.useAreaPlotData)(xAxes, yAxes);
|
|
61
61
|
}
|
|
@@ -54,7 +54,7 @@ function BarPreviewPlot(props) {
|
|
|
54
54
|
}
|
|
55
55
|
function useBarPreviewData(axisId, drawingArea) {
|
|
56
56
|
const store = (0, _internals.useStore)();
|
|
57
|
-
const xAxes =
|
|
58
|
-
const yAxes =
|
|
57
|
+
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
58
|
+
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
59
59
|
return (0, _internals.useBarPlotData)(drawingArea, xAxes, yAxes);
|
|
60
60
|
}
|
|
@@ -53,7 +53,7 @@ function PreviewLineElement(_ref) {
|
|
|
53
53
|
}
|
|
54
54
|
function useLinePreviewData(axisId) {
|
|
55
55
|
const store = (0, _internals.useStore)();
|
|
56
|
-
const xAxes =
|
|
57
|
-
const yAxes =
|
|
56
|
+
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
57
|
+
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
58
58
|
return (0, _internals.useLinePlotData)(xAxes, yAxes);
|
|
59
59
|
}
|
|
@@ -19,8 +19,8 @@ function ScatterPreviewPlot({
|
|
|
19
19
|
}) {
|
|
20
20
|
const store = (0, _internals.useStore)();
|
|
21
21
|
const seriesData = (0, _hooks.useScatterSeriesContext)();
|
|
22
|
-
const xAxes =
|
|
23
|
-
const yAxes =
|
|
22
|
+
const xAxes = store.use(_internals.selectorChartPreviewComputedXAxis, axisId);
|
|
23
|
+
const yAxes = store.use(_internals.selectorChartPreviewComputedYAxis, axisId);
|
|
24
24
|
const defaultXAxisId = (0, _hooks.useXAxes)().xAxisIds[0];
|
|
25
25
|
const defaultYAxisId = (0, _hooks.useYAxes)().yAxisIds[0];
|
|
26
26
|
const {
|
|
@@ -51,7 +51,7 @@ function ChartsToolbarPro(_ref) {
|
|
|
51
51
|
const exportMenuTriggerRef = React.useRef(null);
|
|
52
52
|
const exportMenuId = (0, _useId.default)();
|
|
53
53
|
const exportMenuTriggerId = (0, _useId.default)();
|
|
54
|
-
const isZoomEnabled =
|
|
54
|
+
const isZoomEnabled = store.use(_useChartProZoom.selectorChartZoomIsEnabled);
|
|
55
55
|
const imageExportOptionList = rawImageExportOptions ?? DEFAULT_IMAGE_EXPORT_OPTIONS;
|
|
56
56
|
const showExportMenu = !printOptions?.disableToolbarButton || imageExportOptionList.length > 0;
|
|
57
57
|
const children = [];
|
|
@@ -33,7 +33,7 @@ const ChartsToolbarZoomInTrigger = exports.ChartsToolbarZoomInTrigger = /*#__PUR
|
|
|
33
33
|
instance,
|
|
34
34
|
store
|
|
35
35
|
} = (0, _internals.useChartContext)();
|
|
36
|
-
const disabled =
|
|
36
|
+
const disabled = store.use(_useChartProZoom.selectorChartCanZoomIn);
|
|
37
37
|
const element = (0, _useComponentRenderer.useComponentRenderer)(slots.baseButton, render, (0, _extends2.default)({}, slotProps.baseButton, {
|
|
38
38
|
onClick: () => instance.zoomIn(),
|
|
39
39
|
disabled
|
|
@@ -33,7 +33,7 @@ const ChartsToolbarZoomOutTrigger = exports.ChartsToolbarZoomOutTrigger = /*#__P
|
|
|
33
33
|
instance,
|
|
34
34
|
store
|
|
35
35
|
} = (0, _internals.useChartContext)();
|
|
36
|
-
const disabled =
|
|
36
|
+
const disabled = store.use(_useChartProZoom.selectorChartCanZoomOut);
|
|
37
37
|
const element = (0, _useComponentRenderer.useComponentRenderer)(slots.baseButton, render, (0, _extends2.default)({}, slotProps.baseButton, {
|
|
38
38
|
onClick: () => instance.zoomOut(),
|
|
39
39
|
disabled
|
|
@@ -29,12 +29,12 @@ const useAggregatedData = () => {
|
|
|
29
29
|
const {
|
|
30
30
|
axis: xAxis,
|
|
31
31
|
axisIds: xAxisIds
|
|
32
|
-
} =
|
|
32
|
+
} = store.use(_useChartFunnelAxisRendering.selectorChartXAxis);
|
|
33
33
|
const {
|
|
34
34
|
axis: yAxis,
|
|
35
35
|
axisIds: yAxisIds
|
|
36
|
-
} =
|
|
37
|
-
const gap =
|
|
36
|
+
} = store.use(_useChartFunnelAxisRendering.selectorChartYAxis);
|
|
37
|
+
const gap = store.use(_useChartFunnelAxisRendering.selectorFunnelGap);
|
|
38
38
|
const allData = React.useMemo(() => {
|
|
39
39
|
if (seriesData === undefined) {
|
|
40
40
|
return [];
|
|
@@ -32,8 +32,8 @@ const useChartFunnelAxis = ({
|
|
|
32
32
|
(0, _warning.warnOnce)([`MUI X Charts: The following axis ids are duplicated: ${Array.from(duplicates).join(', ')}.`, `Please make sure that each axis has a unique id.`].join('\n'), 'error');
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
const drawingArea =
|
|
36
|
-
const isInteractionEnabled =
|
|
35
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
36
|
+
const isInteractionEnabled = store.use(_internals.selectorChartsInteractionIsInitialized);
|
|
37
37
|
const isFirstRender = React.useRef(true);
|
|
38
38
|
React.useEffect(() => {
|
|
39
39
|
if (isFirstRender.current) {
|
|
@@ -33,8 +33,8 @@ const SankeyLinkElement = exports.SankeyLinkElement = /*#__PURE__*/React.forward
|
|
|
33
33
|
sourceId: link.source.id,
|
|
34
34
|
link
|
|
35
35
|
};
|
|
36
|
-
const isHighlighted =
|
|
37
|
-
const isFaded =
|
|
36
|
+
const isHighlighted = store.use(_plugins.selectorIsLinkHighlighted, link);
|
|
37
|
+
const isFaded = store.use(_useSankeyHighlight.selectorIsSankeyItemFaded, isHighlighted);
|
|
38
38
|
|
|
39
39
|
// Add interaction props for tooltips
|
|
40
40
|
const interactionProps = (0, _internals.useInteractionItemProps)(identifier);
|
|
@@ -37,8 +37,8 @@ const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forward
|
|
|
37
37
|
nodeId: node.id,
|
|
38
38
|
node
|
|
39
39
|
};
|
|
40
|
-
const isHighlighted =
|
|
41
|
-
const isFaded =
|
|
40
|
+
const isHighlighted = store.use(_plugins.selectorIsNodeHighlighted, node.id);
|
|
41
|
+
const isFaded = store.use(_useSankeyHighlight.selectorIsSankeyItemFaded, isHighlighted);
|
|
42
42
|
|
|
43
43
|
// Add interaction props for tooltips
|
|
44
44
|
const interactionProps = (0, _internals.useInteractionItemProps)(identifier);
|
|
@@ -31,8 +31,8 @@ const SankeyNodeLabel = exports.SankeyNodeLabel = /*#__PURE__*/React.forwardRef(
|
|
|
31
31
|
: x0 - 6; // Left side for other columns
|
|
32
32
|
|
|
33
33
|
const labelAnchor = node.depth === 0 ? 'start' : 'end';
|
|
34
|
-
const isHighlighted =
|
|
35
|
-
const isFaded =
|
|
34
|
+
const isHighlighted = store.use(_plugins.selectorIsNodeHighlighted, node.id);
|
|
35
|
+
const isFaded = store.use(_useSankeyHighlight.selectorIsSankeyItemFaded, isHighlighted);
|
|
36
36
|
let opacity = 1;
|
|
37
37
|
if (isFaded) {
|
|
38
38
|
opacity = 0.3;
|
|
@@ -10,7 +10,7 @@ import { defaultSlotsMaterial } from "../internals/material/index.js";
|
|
|
10
10
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
11
11
|
import { useChartDataProviderProProps } from "./useChartDataProviderProProps.js";
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const releaseInfo = "
|
|
13
|
+
const releaseInfo = "MTc2NjAxNjAwMDAwMA==";
|
|
14
14
|
const packageIdentifier = 'x-charts-pro';
|
|
15
15
|
/**
|
|
16
16
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP, selectorChartAxisZoomOptionsLookup, useDrawingArea,
|
|
4
|
+
import { DEFAULT_ZOOM_SLIDER_SHOW_TOOLTIP, selectorChartAxisZoomOptionsLookup, useDrawingArea, useStore, ZOOM_SLIDER_MARGIN, ZOOM_SLIDER_PREVIEW_SIZE } from '@mui/x-charts/internals';
|
|
5
5
|
import { useXAxes, useYAxes } from '@mui/x-charts/hooks';
|
|
6
6
|
import { ChartAxisZoomSliderPreview } from "./ChartAxisZoomSliderPreview.js";
|
|
7
7
|
import { ZOOM_SLIDER_ACTIVE_TRACK_SIZE, ZOOM_SLIDER_SIZE, ZOOM_SLIDER_TRACK_SIZE } from "./constants.js";
|
|
@@ -19,8 +19,8 @@ export function ChartAxisZoomSlider({
|
|
|
19
19
|
}) {
|
|
20
20
|
const store = useStore();
|
|
21
21
|
const drawingArea = useDrawingArea();
|
|
22
|
-
const zoomData =
|
|
23
|
-
const zoomOptions =
|
|
22
|
+
const zoomData = store.use(selectorChartAxisZoomData, axisId);
|
|
23
|
+
const zoomOptions = store.use(selectorChartAxisZoomOptionsLookup, axisId);
|
|
24
24
|
const [showTooltip, setShowTooltip] = React.useState(false);
|
|
25
25
|
const {
|
|
26
26
|
xAxis
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { getSVGPoint, invertScale, selectorChartAxis, selectorChartAxisZoomOptionsLookup, useChartContext, useDrawingArea,
|
|
5
|
+
import { getSVGPoint, invertScale, selectorChartAxis, selectorChartAxisZoomOptionsLookup, useChartContext, useDrawingArea, useStore } from '@mui/x-charts/internals';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
8
8
|
import { shouldForwardProp } from '@mui/system';
|
|
@@ -55,7 +55,7 @@ export function ChartAxisZoomSliderActiveTrack({
|
|
|
55
55
|
svgRef
|
|
56
56
|
} = useChartContext();
|
|
57
57
|
const store = useStore();
|
|
58
|
-
const axis =
|
|
58
|
+
const axis = store.use(selectorChartAxis, axisId);
|
|
59
59
|
const drawingArea = useDrawingArea();
|
|
60
60
|
const activePreviewRectRef = React.useRef(null);
|
|
61
61
|
const [startThumbEl, setStartThumbEl] = React.useState(null);
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["axisId", "axisDirection", "reverse"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { selectorChartAxisZoomOptionsLookup,
|
|
6
|
+
import { selectorChartAxisZoomOptionsLookup, useStore } from '@mui/x-charts/internals';
|
|
7
7
|
import { alpha } from '@mui/system';
|
|
8
8
|
import useId from '@mui/utils/useId';
|
|
9
9
|
import { selectorChartAxisZoomData } from "../../internals/plugins/useChartProZoom/index.js";
|
|
@@ -42,8 +42,8 @@ function PreviewRectangles(props) {
|
|
|
42
42
|
axisDirection
|
|
43
43
|
} = props;
|
|
44
44
|
const store = useStore();
|
|
45
|
-
const zoomData =
|
|
46
|
-
const zoomOptions =
|
|
45
|
+
const zoomData = store.use(selectorChartAxisZoomData, axisId);
|
|
46
|
+
const zoomOptions = store.use(selectorChartAxisZoomOptionsLookup, axisId);
|
|
47
47
|
const id = useId();
|
|
48
48
|
if (!zoomData) {
|
|
49
49
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { selectorChartSeriesProcessed,
|
|
3
|
+
import { selectorChartSeriesProcessed, useStore } from '@mui/x-charts/internals';
|
|
4
4
|
import { LinePreviewPlot } from "./previews/LinePreviewPlot.js";
|
|
5
5
|
import { AreaPreviewPlot } from "./previews/AreaPreviewPlot.js";
|
|
6
6
|
import { BarPreviewPlot } from "./previews/BarPreviewPlot.js";
|
|
@@ -15,7 +15,7 @@ export function ChartAxisZoomSliderPreviewContent(props) {
|
|
|
15
15
|
height
|
|
16
16
|
} = props;
|
|
17
17
|
const store = useStore();
|
|
18
|
-
const processedSeries =
|
|
18
|
+
const processedSeries = store.use(selectorChartSeriesProcessed);
|
|
19
19
|
const children = [];
|
|
20
20
|
const clipId = `zoom-preview-mask-${axisId}`;
|
|
21
21
|
const hasLineSeries = (processedSeries.line?.seriesOrder?.length ?? 0) > 0;
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["id", "color", "gradientId", "onClick"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
|
-
import {
|
|
6
|
+
import { useStore, useAreaPlotData, selectorChartPreviewComputedXAxis, selectorChartPreviewComputedYAxis } from '@mui/x-charts/internals';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const AreaPlotRoot = styled('g', {
|
|
9
9
|
name: 'MuiAreaPlot',
|
|
@@ -47,7 +47,7 @@ function PreviewAreaElement(_ref) {
|
|
|
47
47
|
}
|
|
48
48
|
function useAreaPreviewData(axisId) {
|
|
49
49
|
const store = useStore();
|
|
50
|
-
const xAxes =
|
|
51
|
-
const yAxes =
|
|
50
|
+
const xAxes = store.use(selectorChartPreviewComputedXAxis, axisId);
|
|
51
|
+
const yAxes = store.use(selectorChartPreviewComputedYAxis, axisId);
|
|
52
52
|
return useAreaPlotData(xAxes, yAxes);
|
|
53
53
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { selectorChartPreviewComputedXAxis, selectorChartPreviewComputedYAxis, useBarPlotData,
|
|
1
|
+
import { selectorChartPreviewComputedXAxis, selectorChartPreviewComputedYAxis, useBarPlotData, useStore } from '@mui/x-charts/internals';
|
|
2
2
|
import { BarElement } from '@mui/x-charts/BarChart';
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
export function BarPreviewPlot(props) {
|
|
@@ -48,7 +48,7 @@ export function BarPreviewPlot(props) {
|
|
|
48
48
|
}
|
|
49
49
|
function useBarPreviewData(axisId, drawingArea) {
|
|
50
50
|
const store = useStore();
|
|
51
|
-
const xAxes =
|
|
52
|
-
const yAxes =
|
|
51
|
+
const xAxes = store.use(selectorChartPreviewComputedXAxis, axisId);
|
|
52
|
+
const yAxes = store.use(selectorChartPreviewComputedYAxis, axisId);
|
|
53
53
|
return useBarPlotData(drawingArea, xAxes, yAxes);
|
|
54
54
|
}
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["id", "color", "gradientId", "onClick"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { useStore, useLinePlotData, selectorChartPreviewComputedXAxis, selectorChartPreviewComputedYAxis } from '@mui/x-charts/internals';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export function LinePreviewPlot({
|
|
8
8
|
axisId
|
|
@@ -45,7 +45,7 @@ function PreviewLineElement(_ref) {
|
|
|
45
45
|
}
|
|
46
46
|
function useLinePreviewData(axisId) {
|
|
47
47
|
const store = useStore();
|
|
48
|
-
const xAxes =
|
|
49
|
-
const yAxes =
|
|
48
|
+
const xAxes = store.use(selectorChartPreviewComputedXAxis, axisId);
|
|
49
|
+
const yAxes = store.use(selectorChartPreviewComputedYAxis, axisId);
|
|
50
50
|
return useLinePlotData(xAxes, yAxes);
|
|
51
51
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useStore, useScatterPlotData, scatterSeriesConfig, selectorChartPreviewComputedXAxis, selectorChartPreviewComputedYAxis } from '@mui/x-charts/internals';
|
|
3
3
|
import { useScatterSeriesContext, useXAxes, useYAxes, useZAxes } from '@mui/x-charts/hooks';
|
|
4
4
|
import { ScatterMarker } from '@mui/x-charts/ScatterChart';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,8 +12,8 @@ export function ScatterPreviewPlot({
|
|
|
12
12
|
}) {
|
|
13
13
|
const store = useStore();
|
|
14
14
|
const seriesData = useScatterSeriesContext();
|
|
15
|
-
const xAxes =
|
|
16
|
-
const yAxes =
|
|
15
|
+
const xAxes = store.use(selectorChartPreviewComputedXAxis, axisId);
|
|
16
|
+
const yAxes = store.use(selectorChartPreviewComputedYAxis, axisId);
|
|
17
17
|
const defaultXAxisId = useXAxes().xAxisIds[0];
|
|
18
18
|
const defaultYAxisId = useYAxes().yAxisIds[0];
|
|
19
19
|
const {
|
|
@@ -6,7 +6,7 @@ const _excluded = ["printOptions", "imageExportOptions"];
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { Toolbar, ToolbarButton } from '@mui/x-charts/Toolbar';
|
|
9
|
-
import { useChartContext,
|
|
9
|
+
import { useChartContext, useChartsSlots } from '@mui/x-charts/internals';
|
|
10
10
|
import { useChartsLocalization } from '@mui/x-charts/hooks';
|
|
11
11
|
import useId from '@mui/utils/useId';
|
|
12
12
|
import { ChartsToolbarDivider } from "./internals/ChartsToolbarDivider.js";
|
|
@@ -44,7 +44,7 @@ function ChartsToolbarPro(_ref) {
|
|
|
44
44
|
const exportMenuTriggerRef = React.useRef(null);
|
|
45
45
|
const exportMenuId = useId();
|
|
46
46
|
const exportMenuTriggerId = useId();
|
|
47
|
-
const isZoomEnabled =
|
|
47
|
+
const isZoomEnabled = store.use(selectorChartZoomIsEnabled);
|
|
48
48
|
const imageExportOptionList = rawImageExportOptions ?? DEFAULT_IMAGE_EXPORT_OPTIONS;
|
|
49
49
|
const showExportMenu = !printOptions?.disableToolbarButton || imageExportOptionList.length > 0;
|
|
50
50
|
const children = [];
|
|
@@ -5,7 +5,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
5
5
|
const _excluded = ["render"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { useChartContext,
|
|
8
|
+
import { useChartContext, useChartsSlots } from '@mui/x-charts/internals';
|
|
9
9
|
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
10
10
|
import { selectorChartCanZoomIn } from "../internals/plugins/useChartProZoom/index.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,7 +26,7 @@ const ChartsToolbarZoomInTrigger = /*#__PURE__*/React.forwardRef(function Charts
|
|
|
26
26
|
instance,
|
|
27
27
|
store
|
|
28
28
|
} = useChartContext();
|
|
29
|
-
const disabled =
|
|
29
|
+
const disabled = store.use(selectorChartCanZoomIn);
|
|
30
30
|
const element = useComponentRenderer(slots.baseButton, render, _extends({}, slotProps.baseButton, {
|
|
31
31
|
onClick: () => instance.zoomIn(),
|
|
32
32
|
disabled
|
|
@@ -5,7 +5,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
5
5
|
const _excluded = ["render"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { useChartContext,
|
|
8
|
+
import { useChartContext, useChartsSlots } from '@mui/x-charts/internals';
|
|
9
9
|
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
10
10
|
import { selectorChartCanZoomOut } from "../internals/plugins/useChartProZoom/index.js";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,7 +26,7 @@ const ChartsToolbarZoomOutTrigger = /*#__PURE__*/React.forwardRef(function Chart
|
|
|
26
26
|
instance,
|
|
27
27
|
store
|
|
28
28
|
} = useChartContext();
|
|
29
|
-
const disabled =
|
|
29
|
+
const disabled = store.use(selectorChartCanZoomOut);
|
|
30
30
|
const element = useComponentRenderer(slots.baseButton, render, _extends({}, slotProps.baseButton, {
|
|
31
31
|
onClick: () => instance.zoomOut(),
|
|
32
32
|
disabled
|
|
@@ -4,7 +4,7 @@ const _excluded = ["onItemClick"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { line as d3Line } from '@mui/x-charts-vendor/d3-shape';
|
|
7
|
-
import { cartesianSeriesTypes,
|
|
7
|
+
import { cartesianSeriesTypes, useStore } from '@mui/x-charts/internals';
|
|
8
8
|
import { FunnelSection } from "./FunnelSection.js";
|
|
9
9
|
import { alignLabel, positionLabel } from "./labelUtils.js";
|
|
10
10
|
import { useFunnelSeriesContext } from "../hooks/useFunnelSeries.js";
|
|
@@ -21,12 +21,12 @@ const useAggregatedData = () => {
|
|
|
21
21
|
const {
|
|
22
22
|
axis: xAxis,
|
|
23
23
|
axisIds: xAxisIds
|
|
24
|
-
} =
|
|
24
|
+
} = store.use(selectorChartXAxis);
|
|
25
25
|
const {
|
|
26
26
|
axis: yAxis,
|
|
27
27
|
axisIds: yAxisIds
|
|
28
|
-
} =
|
|
29
|
-
const gap =
|
|
28
|
+
} = store.use(selectorChartYAxis);
|
|
29
|
+
const gap = store.use(selectorFunnelGap);
|
|
30
30
|
const allData = React.useMemo(() => {
|
|
31
31
|
if (seriesData === undefined) {
|
|
32
32
|
return [];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
|
-
import { getSVGPoint, getCartesianAxisIndex, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartsInteractionIsInitialized,
|
|
6
|
+
import { getSVGPoint, getCartesianAxisIndex, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartsInteractionIsInitialized, defaultizeXAxis, defaultizeYAxis } from '@mui/x-charts/internals';
|
|
7
7
|
import { selectorChartXAxis, selectorChartYAxis } from "./useChartFunnelAxisRendering.selectors.js";
|
|
8
8
|
export const useChartFunnelAxis = ({
|
|
9
9
|
params,
|
|
@@ -25,8 +25,8 @@ export const useChartFunnelAxis = ({
|
|
|
25
25
|
warnOnce([`MUI X Charts: The following axis ids are duplicated: ${Array.from(duplicates).join(', ')}.`, `Please make sure that each axis has a unique id.`].join('\n'), 'error');
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const drawingArea =
|
|
29
|
-
const isInteractionEnabled =
|
|
28
|
+
const drawingArea = store.use(selectorChartDrawingArea);
|
|
29
|
+
const isInteractionEnabled = store.use(selectorChartsInteractionIsInitialized);
|
|
30
30
|
const isFirstRender = React.useRef(true);
|
|
31
31
|
React.useEffect(() => {
|
|
32
32
|
if (isFirstRender.current) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
6
|
-
import { useInteractionItemProps, useStore
|
|
6
|
+
import { useInteractionItemProps, useStore } from '@mui/x-charts/internals';
|
|
7
7
|
import { selectorIsLinkHighlighted } from "./plugins/index.js";
|
|
8
8
|
import { selectorIsSankeyItemFaded } from "./plugins/useSankeyHighlight.selectors.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,8 +26,8 @@ export const SankeyLinkElement = /*#__PURE__*/React.forwardRef(function SankeyLi
|
|
|
26
26
|
sourceId: link.source.id,
|
|
27
27
|
link
|
|
28
28
|
};
|
|
29
|
-
const isHighlighted =
|
|
30
|
-
const isFaded =
|
|
29
|
+
const isHighlighted = store.use(selectorIsLinkHighlighted, link);
|
|
30
|
+
const isFaded = store.use(selectorIsSankeyItemFaded, isHighlighted);
|
|
31
31
|
|
|
32
32
|
// Add interaction props for tooltips
|
|
33
33
|
const interactionProps = useInteractionItemProps(identifier);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
6
|
-
import { useInteractionItemProps, useStore
|
|
6
|
+
import { useInteractionItemProps, useStore } from '@mui/x-charts/internals';
|
|
7
7
|
import { selectorIsNodeHighlighted } from "./plugins/index.js";
|
|
8
8
|
import { selectorIsSankeyItemFaded } from "./plugins/useSankeyHighlight.selectors.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -30,8 +30,8 @@ export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNo
|
|
|
30
30
|
nodeId: node.id,
|
|
31
31
|
node
|
|
32
32
|
};
|
|
33
|
-
const isHighlighted =
|
|
34
|
-
const isFaded =
|
|
33
|
+
const isHighlighted = store.use(selectorIsNodeHighlighted, node.id);
|
|
34
|
+
const isFaded = store.use(selectorIsSankeyItemFaded, isHighlighted);
|
|
35
35
|
|
|
36
36
|
// Add interaction props for tooltips
|
|
37
37
|
const interactionProps = useInteractionItemProps(identifier);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { useStore
|
|
4
|
+
import { useStore } from '@mui/x-charts/internals';
|
|
5
5
|
import { useTheme } from '@mui/material/styles';
|
|
6
6
|
import { selectorIsNodeHighlighted } from "./plugins/index.js";
|
|
7
7
|
import { selectorIsSankeyItemFaded } from "./plugins/useSankeyHighlight.selectors.js";
|
|
@@ -25,8 +25,8 @@ export const SankeyNodeLabel = /*#__PURE__*/React.forwardRef(function SankeyNode
|
|
|
25
25
|
: x0 - 6; // Left side for other columns
|
|
26
26
|
|
|
27
27
|
const labelAnchor = node.depth === 0 ? 'start' : 'end';
|
|
28
|
-
const isHighlighted =
|
|
29
|
-
const isFaded =
|
|
28
|
+
const isHighlighted = store.use(selectorIsNodeHighlighted, node.id);
|
|
29
|
+
const isFaded = store.use(selectorIsSankeyItemFaded, isHighlighted);
|
|
30
30
|
let opacity = 1;
|
|
31
31
|
if (isFaded) {
|
|
32
32
|
opacity = 0.3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useSeriesOfType, useAllSeriesOfType,
|
|
3
|
+
import { useSeriesOfType, useAllSeriesOfType, useStore, selectorChartSeriesLayout } from '@mui/x-charts/internals';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Get access to the internal state of sankey series.
|
|
@@ -47,7 +47,7 @@ export function useSankeyLayout() {
|
|
|
47
47
|
const store = useStore();
|
|
48
48
|
const seriesContext = useSankeySeriesContext();
|
|
49
49
|
const seriesId = seriesContext?.seriesOrder?.[0];
|
|
50
|
-
const layout =
|
|
50
|
+
const layout = store.use(selectorChartSeriesLayout);
|
|
51
51
|
if (!seriesId) {
|
|
52
52
|
return undefined;
|
|
53
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useStore } from '@mui/x-charts/internals';
|
|
4
4
|
import { selectorChartZoomIsInteracting } from "../../internals/plugins/useChartProZoom/index.js";
|
|
5
5
|
/**
|
|
6
6
|
* Get access to the zoom state.
|
|
@@ -9,6 +9,6 @@ import { selectorChartZoomIsInteracting } from "../../internals/plugins/useChart
|
|
|
9
9
|
*/
|
|
10
10
|
export function useIsZoomInteracting() {
|
|
11
11
|
const store = useStore();
|
|
12
|
-
const isInteracting =
|
|
12
|
+
const isInteracting = store.use(selectorChartZoomIsInteracting);
|
|
13
13
|
return isInteracting;
|
|
14
14
|
}
|
package/esm/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useChartContainerProProps } from "../ChartContainerPro/useChartContainerProProps.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
5
5
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
6
6
|
import { translateZoom } from "./useZoom.utils.js";
|
|
7
7
|
import { selectorPanInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
|
|
@@ -10,9 +10,9 @@ export const usePanOnDrag = ({
|
|
|
10
10
|
instance,
|
|
11
11
|
svgRef
|
|
12
12
|
}, setZoomDataCallback) => {
|
|
13
|
-
const drawingArea =
|
|
14
|
-
const optionsLookup =
|
|
15
|
-
const config =
|
|
13
|
+
const drawingArea = store.use(selectorChartDrawingArea);
|
|
14
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
15
|
+
const config = store.use(selectorPanInteractionConfig, 'drag');
|
|
16
16
|
const isPanOnDragEnabled = Object.values(optionsLookup).some(v => v.panning) && Boolean(config);
|
|
17
17
|
React.useEffect(() => {
|
|
18
18
|
if (!isPanOnDragEnabled) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
5
5
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
6
6
|
import { translateZoom } from "./useZoom.utils.js";
|
|
7
7
|
import { selectorPanInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
|
|
@@ -10,14 +10,14 @@ export const usePanOnPressAndDrag = ({
|
|
|
10
10
|
instance,
|
|
11
11
|
svgRef
|
|
12
12
|
}, setZoomDataCallback) => {
|
|
13
|
-
const drawingArea =
|
|
14
|
-
const optionsLookup =
|
|
13
|
+
const drawingArea = store.use(selectorChartDrawingArea);
|
|
14
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
15
15
|
const isInteracting = React.useRef(false);
|
|
16
16
|
const accumulatedChange = React.useRef({
|
|
17
17
|
x: 0,
|
|
18
18
|
y: 0
|
|
19
19
|
});
|
|
20
|
-
const config =
|
|
20
|
+
const config = store.use(selectorPanInteractionConfig, 'pressAndDrag');
|
|
21
21
|
const isPanOnPressAndDragEnabled = Object.values(optionsLookup).some(v => v.panning) && Boolean(config);
|
|
22
22
|
React.useEffect(() => {
|
|
23
23
|
if (!isPanOnPressAndDragEnabled) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { getSVGPoint, selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
5
5
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
6
6
|
import { translateZoom } from "./useZoom.utils.js";
|
|
7
7
|
import { selectorPanInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
|
|
@@ -10,11 +10,11 @@ export const usePanOnWheel = ({
|
|
|
10
10
|
instance,
|
|
11
11
|
svgRef
|
|
12
12
|
}, setZoomDataCallback) => {
|
|
13
|
-
const drawingArea =
|
|
14
|
-
const optionsLookup =
|
|
13
|
+
const drawingArea = store.use(selectorChartDrawingArea);
|
|
14
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
15
15
|
const startedOutsideRef = React.useRef(false);
|
|
16
16
|
const startedOutsideTimeoutRef = React.useRef(null);
|
|
17
|
-
const config =
|
|
17
|
+
const config = store.use(selectorPanInteractionConfig, 'wheel');
|
|
18
18
|
const isPanOnWheelEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
19
19
|
React.useEffect(() => {
|
|
20
20
|
if (!isPanOnWheelEnabled) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { getSVGPoint, selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
5
5
|
import { getHorizontalCenterRatio, getVerticalCenterRatio, isSpanValid } from "./useZoom.utils.js";
|
|
6
6
|
import { selectorZoomInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
|
|
7
7
|
export const useZoomOnBrush = ({
|
|
@@ -9,9 +9,9 @@ export const useZoomOnBrush = ({
|
|
|
9
9
|
instance,
|
|
10
10
|
svgRef
|
|
11
11
|
}, setZoomDataCallback) => {
|
|
12
|
-
const drawingArea =
|
|
13
|
-
const optionsLookup =
|
|
14
|
-
const config =
|
|
12
|
+
const drawingArea = store.use(selectorChartDrawingArea);
|
|
13
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
14
|
+
const config = store.use(selectorZoomInteractionConfig, 'brush');
|
|
15
15
|
const isZoomOnBrushEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
16
16
|
React.useEffect(() => {
|
|
17
17
|
instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
5
5
|
import { selectorZoomInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
|
|
6
6
|
export const useZoomOnDoubleTapReset = ({
|
|
7
7
|
store,
|
|
8
8
|
instance,
|
|
9
9
|
svgRef
|
|
10
10
|
}, setZoomDataCallback) => {
|
|
11
|
-
const optionsLookup =
|
|
12
|
-
const config =
|
|
11
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
12
|
+
const config = store.use(selectorZoomInteractionConfig, 'doubleTapReset');
|
|
13
13
|
const isZoomOnDoubleTapResetEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
14
14
|
React.useEffect(() => {
|
|
15
15
|
if (!isZoomOnDoubleTapResetEnabled) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { getSVGPoint, selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
5
5
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
6
6
|
import { getHorizontalCenterRatio, getVerticalCenterRatio, isSpanValid, zoomAtPoint } from "./useZoom.utils.js";
|
|
7
7
|
import { selectorZoomInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
|
|
@@ -10,9 +10,9 @@ export const useZoomOnPinch = ({
|
|
|
10
10
|
instance,
|
|
11
11
|
svgRef
|
|
12
12
|
}, setZoomDataCallback) => {
|
|
13
|
-
const drawingArea =
|
|
14
|
-
const optionsLookup =
|
|
15
|
-
const config =
|
|
13
|
+
const drawingArea = store.use(selectorChartDrawingArea);
|
|
14
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
15
|
+
const config = store.use(selectorZoomInteractionConfig, 'pinch');
|
|
16
16
|
const isZoomOnPinchEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
17
17
|
React.useEffect(() => {
|
|
18
18
|
if (!isZoomOnPinchEnabled) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { getSVGPoint, selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
5
5
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
6
6
|
import { getHorizontalCenterRatio, getVerticalCenterRatio, isSpanValid, zoomAtPoint } from "./useZoom.utils.js";
|
|
7
7
|
import { selectorZoomInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
|
|
@@ -10,9 +10,9 @@ export const useZoomOnTapAndDrag = ({
|
|
|
10
10
|
instance,
|
|
11
11
|
svgRef
|
|
12
12
|
}, setZoomDataCallback) => {
|
|
13
|
-
const drawingArea =
|
|
14
|
-
const optionsLookup =
|
|
15
|
-
const config =
|
|
13
|
+
const drawingArea = store.use(selectorChartDrawingArea);
|
|
14
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
15
|
+
const config = store.use(selectorZoomInteractionConfig, 'tapAndDrag');
|
|
16
16
|
const isZoomOnTapAndDragEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
17
17
|
React.useEffect(() => {
|
|
18
18
|
if (!isZoomOnTapAndDragEnabled) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { getSVGPoint, selectorChartDrawingArea, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
5
5
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
6
6
|
import { getHorizontalCenterRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, zoomAtPoint } from "./useZoom.utils.js";
|
|
7
7
|
import { selectorZoomInteractionConfig } from "../ZoomInteractionConfig.selectors.js";
|
|
@@ -10,11 +10,11 @@ export const useZoomOnWheel = ({
|
|
|
10
10
|
instance,
|
|
11
11
|
svgRef
|
|
12
12
|
}, setZoomDataCallback) => {
|
|
13
|
-
const drawingArea =
|
|
14
|
-
const optionsLookup =
|
|
13
|
+
const drawingArea = store.use(selectorChartDrawingArea);
|
|
14
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
15
15
|
const startedOutsideRef = React.useRef(false);
|
|
16
16
|
const startedOutsideTimeoutRef = React.useRef(null);
|
|
17
|
-
const config =
|
|
17
|
+
const config = store.use(selectorZoomInteractionConfig, 'wheel');
|
|
18
18
|
const isZoomOnWheelEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
19
19
|
React.useEffect(() => {
|
|
20
20
|
if (!isZoomOnWheelEnabled) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { selectorChartZoomOptionsLookup, createZoomLookup, selectorChartAxisZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
6
6
|
import debounce from '@mui/utils/debounce';
|
|
7
7
|
import { useEffectAfterFirstRender } from '@mui/x-internals/useEffectAfterFirstRender';
|
|
8
8
|
import { useEventCallback } from '@mui/material/utils';
|
|
@@ -29,7 +29,7 @@ export const useChartProZoom = pluginData => {
|
|
|
29
29
|
zoomInteractionConfig
|
|
30
30
|
} = params;
|
|
31
31
|
const onZoomChange = useEventCallback(onZoomChangeProp ?? (() => {}));
|
|
32
|
-
const optionsLookup =
|
|
32
|
+
const optionsLookup = store.use(selectorChartZoomOptionsLookup);
|
|
33
33
|
useEffectAfterFirstRender(() => {
|
|
34
34
|
store.set('zoom', _extends({}, store.state.zoom, {
|
|
35
35
|
zoomInteractionConfig: initializeZoomInteractionConfig(zoomInteractionConfig, optionsLookup)
|
package/hooks/useSankeySeries.js
CHANGED
|
@@ -53,7 +53,7 @@ function useSankeyLayout() {
|
|
|
53
53
|
const store = (0, _internals.useStore)();
|
|
54
54
|
const seriesContext = useSankeySeriesContext();
|
|
55
55
|
const seriesId = seriesContext?.seriesOrder?.[0];
|
|
56
|
-
const layout =
|
|
56
|
+
const layout = store.use(_internals.selectorChartSeriesLayout);
|
|
57
57
|
if (!seriesId) {
|
|
58
58
|
return undefined;
|
|
59
59
|
}
|
|
@@ -14,6 +14,6 @@ var _useChartProZoom = require("../../internals/plugins/useChartProZoom");
|
|
|
14
14
|
*/
|
|
15
15
|
function useIsZoomInteracting() {
|
|
16
16
|
const store = (0, _internals.useStore)();
|
|
17
|
-
const isInteracting =
|
|
17
|
+
const isInteracting = store.use(_useChartProZoom.selectorChartZoomIsInteracting);
|
|
18
18
|
return isInteracting;
|
|
19
19
|
}
|
package/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "useChartContainerProProps", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _useChartContainerProProps.useChartContainerProProps;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
|
|
@@ -16,9 +16,9 @@ const usePanOnDrag = ({
|
|
|
16
16
|
instance,
|
|
17
17
|
svgRef
|
|
18
18
|
}, setZoomDataCallback) => {
|
|
19
|
-
const drawingArea =
|
|
20
|
-
const optionsLookup =
|
|
21
|
-
const config =
|
|
19
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
20
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
21
|
+
const config = store.use(_ZoomInteractionConfig.selectorPanInteractionConfig, 'drag');
|
|
22
22
|
const isPanOnDragEnabled = Object.values(optionsLookup).some(v => v.panning) && Boolean(config);
|
|
23
23
|
React.useEffect(() => {
|
|
24
24
|
if (!isPanOnDragEnabled) {
|
|
@@ -16,14 +16,14 @@ const usePanOnPressAndDrag = ({
|
|
|
16
16
|
instance,
|
|
17
17
|
svgRef
|
|
18
18
|
}, setZoomDataCallback) => {
|
|
19
|
-
const drawingArea =
|
|
20
|
-
const optionsLookup =
|
|
19
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
20
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
21
21
|
const isInteracting = React.useRef(false);
|
|
22
22
|
const accumulatedChange = React.useRef({
|
|
23
23
|
x: 0,
|
|
24
24
|
y: 0
|
|
25
25
|
});
|
|
26
|
-
const config =
|
|
26
|
+
const config = store.use(_ZoomInteractionConfig.selectorPanInteractionConfig, 'pressAndDrag');
|
|
27
27
|
const isPanOnPressAndDragEnabled = Object.values(optionsLookup).some(v => v.panning) && Boolean(config);
|
|
28
28
|
React.useEffect(() => {
|
|
29
29
|
if (!isPanOnPressAndDragEnabled) {
|
|
@@ -16,11 +16,11 @@ const usePanOnWheel = ({
|
|
|
16
16
|
instance,
|
|
17
17
|
svgRef
|
|
18
18
|
}, setZoomDataCallback) => {
|
|
19
|
-
const drawingArea =
|
|
20
|
-
const optionsLookup =
|
|
19
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
20
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
21
21
|
const startedOutsideRef = React.useRef(false);
|
|
22
22
|
const startedOutsideTimeoutRef = React.useRef(null);
|
|
23
|
-
const config =
|
|
23
|
+
const config = store.use(_ZoomInteractionConfig.selectorPanInteractionConfig, 'wheel');
|
|
24
24
|
const isPanOnWheelEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
25
25
|
React.useEffect(() => {
|
|
26
26
|
if (!isPanOnWheelEnabled) {
|
|
@@ -15,9 +15,9 @@ const useZoomOnBrush = ({
|
|
|
15
15
|
instance,
|
|
16
16
|
svgRef
|
|
17
17
|
}, setZoomDataCallback) => {
|
|
18
|
-
const drawingArea =
|
|
19
|
-
const optionsLookup =
|
|
20
|
-
const config =
|
|
18
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
19
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
20
|
+
const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'brush');
|
|
21
21
|
const isZoomOnBrushEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
22
22
|
React.useEffect(() => {
|
|
23
23
|
instance.setZoomBrushEnabled(isZoomOnBrushEnabled);
|
|
@@ -14,8 +14,8 @@ const useZoomOnDoubleTapReset = ({
|
|
|
14
14
|
instance,
|
|
15
15
|
svgRef
|
|
16
16
|
}, setZoomDataCallback) => {
|
|
17
|
-
const optionsLookup =
|
|
18
|
-
const config =
|
|
17
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
18
|
+
const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'doubleTapReset');
|
|
19
19
|
const isZoomOnDoubleTapResetEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
20
20
|
React.useEffect(() => {
|
|
21
21
|
if (!isZoomOnDoubleTapResetEnabled) {
|
|
@@ -16,9 +16,9 @@ const useZoomOnPinch = ({
|
|
|
16
16
|
instance,
|
|
17
17
|
svgRef
|
|
18
18
|
}, setZoomDataCallback) => {
|
|
19
|
-
const drawingArea =
|
|
20
|
-
const optionsLookup =
|
|
21
|
-
const config =
|
|
19
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
20
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
21
|
+
const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'pinch');
|
|
22
22
|
const isZoomOnPinchEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
23
23
|
React.useEffect(() => {
|
|
24
24
|
if (!isZoomOnPinchEnabled) {
|
|
@@ -16,9 +16,9 @@ const useZoomOnTapAndDrag = ({
|
|
|
16
16
|
instance,
|
|
17
17
|
svgRef
|
|
18
18
|
}, setZoomDataCallback) => {
|
|
19
|
-
const drawingArea =
|
|
20
|
-
const optionsLookup =
|
|
21
|
-
const config =
|
|
19
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
20
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
21
|
+
const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'tapAndDrag');
|
|
22
22
|
const isZoomOnTapAndDragEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
23
23
|
React.useEffect(() => {
|
|
24
24
|
if (!isZoomOnTapAndDragEnabled) {
|
|
@@ -16,11 +16,11 @@ const useZoomOnWheel = ({
|
|
|
16
16
|
instance,
|
|
17
17
|
svgRef
|
|
18
18
|
}, setZoomDataCallback) => {
|
|
19
|
-
const drawingArea =
|
|
20
|
-
const optionsLookup =
|
|
19
|
+
const drawingArea = store.use(_internals.selectorChartDrawingArea);
|
|
20
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
21
21
|
const startedOutsideRef = React.useRef(false);
|
|
22
22
|
const startedOutsideTimeoutRef = React.useRef(null);
|
|
23
|
-
const config =
|
|
23
|
+
const config = store.use(_ZoomInteractionConfig.selectorZoomInteractionConfig, 'wheel');
|
|
24
24
|
const isZoomOnWheelEnabled = Object.keys(optionsLookup).length > 0 && Boolean(config);
|
|
25
25
|
React.useEffect(() => {
|
|
26
26
|
if (!isZoomOnWheelEnabled) {
|
|
@@ -36,7 +36,7 @@ const useChartProZoom = pluginData => {
|
|
|
36
36
|
zoomInteractionConfig
|
|
37
37
|
} = params;
|
|
38
38
|
const onZoomChange = (0, _utils.useEventCallback)(onZoomChangeProp ?? (() => {}));
|
|
39
|
-
const optionsLookup =
|
|
39
|
+
const optionsLookup = store.use(_internals.selectorChartZoomOptionsLookup);
|
|
40
40
|
(0, _useEffectAfterFirstRender.useEffectAfterFirstRender)(() => {
|
|
41
41
|
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
42
42
|
zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(zoomInteractionConfig, optionsLookup)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts-pro",
|
|
3
|
-
"version": "8.22.
|
|
3
|
+
"version": "8.22.1",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Pro plan edition of the MUI X Charts components.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@mui/utils": "^7.3.5",
|
|
32
32
|
"clsx": "^2.1.1",
|
|
33
33
|
"prop-types": "^15.8.1",
|
|
34
|
-
"@mui/x-charts": "8.22.
|
|
35
|
-
"@mui/x-charts-vendor": "8.22.0",
|
|
34
|
+
"@mui/x-charts": "8.22.1",
|
|
36
35
|
"@mui/x-internal-gestures": "0.3.6",
|
|
37
36
|
"@mui/x-internals": "8.22.0",
|
|
37
|
+
"@mui/x-charts-vendor": "8.22.0",
|
|
38
38
|
"@mui/x-license": "8.22.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|