@mui/x-charts-pro 8.18.0 → 8.19.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/BarChartPro/BarChartPro.js +6 -1
- package/CHANGELOG.md +113 -0
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +6 -3
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +1 -1
- package/LineChartPro/LineChartPro.js +6 -1
- package/SankeyChart/plugins/useSankeyHighlight.selectors.js +10 -10
- package/ScatterChartPro/ScatterChartPro.js +6 -1
- package/esm/BarChartPro/BarChartPro.js +6 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +6 -3
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.js +3 -3
- package/esm/LineChartPro/LineChartPro.js +6 -1
- package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.js +10 -10
- package/esm/ScatterChartPro/ScatterChartPro.js +6 -1
- package/esm/hooks/useFunnelSeries.js +3 -5
- package/esm/hooks/useHeatmapSeries.js +3 -5
- package/esm/hooks/useSankeySeries.js +3 -5
- package/esm/index.js +1 -1
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +4 -12
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.js +5 -4
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +17 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +8 -0
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +98 -0
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.js +2 -2
- package/esm/internals/plugins/useChartProZoom/initializeZoomInteractionConfig.d.ts +2 -1
- package/esm/internals/plugins/useChartProZoom/initializeZoomInteractionConfig.js +38 -5
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +9 -3
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +7 -6
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.js +2 -0
- package/hooks/useFunnelSeries.js +2 -5
- package/hooks/useHeatmapSeries.js +2 -5
- package/hooks/useSankeySeries.js +2 -5
- package/index.js +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.d.ts +4 -12
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.selectors.js +4 -3
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +17 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +8 -0
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +105 -0
- package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.js +2 -2
- package/internals/plugins/useChartProZoom/initializeZoomInteractionConfig.d.ts +2 -1
- package/internals/plugins/useChartProZoom/initializeZoomInteractionConfig.js +38 -5
- package/internals/plugins/useChartProZoom/useChartProZoom.js +9 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +6 -5
- package/package.json +6 -6
- package/utils/index.d.ts +1 -0
- package/utils/index.js +16 -0
|
@@ -1446,7 +1446,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1446
1446
|
* Configuration for zoom interactions.
|
|
1447
1447
|
*/
|
|
1448
1448
|
zoomInteractionConfig: _propTypes.default.shape({
|
|
1449
|
-
pan: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['drag', 'pressAndDrag']), _propTypes.default.shape({
|
|
1449
|
+
pan: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['drag', 'pressAndDrag', 'wheel']), _propTypes.default.shape({
|
|
1450
1450
|
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
1451
1451
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1452
1452
|
type: _propTypes.default.oneOf(['drag']).isRequired
|
|
@@ -1454,6 +1454,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1454
1454
|
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
1455
1455
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1456
1456
|
type: _propTypes.default.oneOf(['pressAndDrag']).isRequired
|
|
1457
|
+
}), _propTypes.default.shape({
|
|
1458
|
+
allowedDirection: _propTypes.default.oneOf(['x', 'xy', 'y']),
|
|
1459
|
+
pointerMode: _propTypes.default.any,
|
|
1460
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1461
|
+
type: _propTypes.default.oneOf(['wheel']).isRequired
|
|
1457
1462
|
})]).isRequired),
|
|
1458
1463
|
zoom: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), _propTypes.default.shape({
|
|
1459
1464
|
pointerMode: _propTypes.default.any,
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,119 @@
|
|
|
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.19.0
|
|
9
|
+
|
|
10
|
+
_Nov 20, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🔎 Add pan on `wheel` to the charts zoom
|
|
15
|
+
- ⌨️ Allow opt-in to [tab navigation](https://mui.com/x/react-data-grid/accessibility/#tab-navigation) inside the Data Grid.
|
|
16
|
+
- ⚙️ New way of defining [action columns](https://mui.com/x/react-data-grid/column-definition/#ActionsWithModalGrid.tsx) in the Data Grid that makes it easier to keep `columns` prop stable.
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
- 📚 Documentation improvements
|
|
19
|
+
|
|
20
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
21
|
+
@lauri865, @noobyogi0010, @sai6855
|
|
22
|
+
|
|
23
|
+
The following team members contributed to this release:
|
|
24
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mj12albert, @noraleonte, @rita-codes, @siriwatknp, @ZeeshanTamboli
|
|
25
|
+
|
|
26
|
+
### Data Grid
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid@8.19.0`
|
|
29
|
+
|
|
30
|
+
- [DataGrid] Add `tabNavigation` prop to control tab navigation in the grid (#20286) @arminmeh
|
|
31
|
+
- [DataGrid] Allow to focus disabled checkbox cells (#19959) @mj12albert
|
|
32
|
+
- [DataGrid] Alternative actions column definition API (#15041) @cherniavskii
|
|
33
|
+
- [DataGrid] Fix failing tests (#20332) @cherniavskii
|
|
34
|
+
- [DataGrid] Prevent Safari 26 error in the event handler (#20369) @arminmeh
|
|
35
|
+
- [DataGrid] Undeprecate the `autoHeight` prop (#20363) @cherniavskii
|
|
36
|
+
- [DataGrid] Fix print export grid dimensions with dynamic row height and print styles (#19835) @cherniavskii
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-pro@8.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid@8.19.0`.
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-premium@8.19.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid-pro@8.19.0`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPremium] Fix aggregation with sorting (#19892) @lauri865
|
|
47
|
+
- [DataGridPremium] Lock `ExcelJS` version (#20329) @cherniavskii
|
|
48
|
+
|
|
49
|
+
### Date and Time Pickers
|
|
50
|
+
|
|
51
|
+
#### `@mui/x-date-pickers@8.19.0`
|
|
52
|
+
|
|
53
|
+
- [pickers] Do not loose `slotProps.field.slotProps` (#20322) @flaviendelangle
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-date-pickers-pro@8.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-date-pickers@8.19.0`.
|
|
58
|
+
|
|
59
|
+
### Charts
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts@8.19.0`
|
|
62
|
+
|
|
63
|
+
- [charts] Expose `niceDomain` utility (#20250) @bernardobelchior
|
|
64
|
+
- [charts] Fix benchmark regression by downgrading to JSDOM v26 (#20405) @bernardobelchior
|
|
65
|
+
- [charts] Fix Pie Chart keyboard focus highlight (#20358) @JCQuintas
|
|
66
|
+
- [charts] Memoize series selectors (#20326) @JCQuintas
|
|
67
|
+
- [charts] Relax dataset type (#20294) @bernardobelchior
|
|
68
|
+
- [charts] Remove `touch-action: pan-y` when zoom is disabled (#20204) @bernardobelchior
|
|
69
|
+
- [charts] Use `getBBox()` for correct SVG sizes in firefox (#20309) @JCQuintas
|
|
70
|
+
- [charts] Use directly selector from `@mui/x-internals` (#20365) @alexfauquette
|
|
71
|
+
- [charts] Fix unnecessary errors in dev mode (#20380) @JCQuintas
|
|
72
|
+
|
|
73
|
+
#### `@mui/x-charts-pro@8.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
74
|
+
|
|
75
|
+
Same changes as in `@mui/x-charts@8.19.0`, plus:
|
|
76
|
+
|
|
77
|
+
- [charts-pro] Add pan on `wheel` to zoom (#19998) @JCQuintas
|
|
78
|
+
- [charts-pro] Fix zoom slider preview having an opaque background in dark mode (#20367) @bernardobelchior
|
|
79
|
+
|
|
80
|
+
#### `@mui/x-charts-premium@8.19.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
81
|
+
|
|
82
|
+
Same changes as in `@mui/x-charts-pro@8.19.0`.
|
|
83
|
+
|
|
84
|
+
### Tree View
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-tree-view@8.19.0`
|
|
87
|
+
|
|
88
|
+
- [tree view] Enable lazy load when children count is not know in tree view (#18680) @noobyogi0010
|
|
89
|
+
- [tree view] Fix unwanted behaviors on the item re-ordering (#20368) @flaviendelangle
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view-pro@8.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
92
|
+
|
|
93
|
+
Same changes as in `@mui/x-tree-view@8.19.0`.
|
|
94
|
+
|
|
95
|
+
### Codemod
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-codemod@8.19.0`
|
|
98
|
+
|
|
99
|
+
Internal changes.
|
|
100
|
+
|
|
101
|
+
### Docs
|
|
102
|
+
|
|
103
|
+
- [docs] Add minimum Typescript version to migration guide (#20320) @siriwatknp
|
|
104
|
+
- [docs] Fix Autosizing documentation (#20348) @siriwatknp
|
|
105
|
+
- [docs] Fix separator opacity in demo (#20293) @sai6855
|
|
106
|
+
- [docs] Replace deprecated `LoadingButton` with `Button` component (#20208) @Janpot
|
|
107
|
+
|
|
108
|
+
### Core
|
|
109
|
+
|
|
110
|
+
- [code-infra] Add new broken links checker (#20120) @Janpot
|
|
111
|
+
- [code-infra] Disable Codspeed pipeline (#20370) @JCQuintas
|
|
112
|
+
- [code-infra] Optimize `checkMaterialVersion` (#20307) @Janpot
|
|
113
|
+
- [code-infra] Use utils from code-infra for changelog and PR creation (#20406) @brijeshb42
|
|
114
|
+
- [docs-infra] Revert `@docsearch/react` (#20313) @Janpot
|
|
115
|
+
|
|
116
|
+
### Miscellaneous
|
|
117
|
+
|
|
118
|
+
- [test] Fix browser tests skipping some projects (#20318) @cherniavskii
|
|
119
|
+
- [test] Update `use-react-version` pnpm script (#20319) @cherniavskii
|
|
120
|
+
|
|
8
121
|
## 8.18.0
|
|
9
122
|
|
|
10
123
|
<!-- generated comparing v8.17.0..master -->
|
|
@@ -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 = "MTc2MzU5NjgwMDAwMA==";
|
|
20
20
|
const packageIdentifier = 'x-charts-pro';
|
|
21
21
|
/**
|
|
22
22
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -34,12 +34,15 @@ const ZoomSliderActiveTrackRect = (0, _styles.styled)('rect', {
|
|
|
34
34
|
props: {
|
|
35
35
|
preview: true
|
|
36
36
|
},
|
|
37
|
-
style: {
|
|
38
|
-
fill: 'transparent'
|
|
37
|
+
style: (0, _extends2.default)({
|
|
38
|
+
fill: 'transparent'
|
|
39
|
+
}, theme.applyStyles('dark', {
|
|
40
|
+
fill: 'transparent'
|
|
41
|
+
}), {
|
|
39
42
|
rx: 4,
|
|
40
43
|
ry: 4,
|
|
41
44
|
stroke: theme.palette.grey[500]
|
|
42
|
-
}
|
|
45
|
+
})
|
|
43
46
|
}]
|
|
44
47
|
}));
|
|
45
48
|
function ChartAxisZoomSliderActiveTrack({
|
|
@@ -9,7 +9,7 @@ var _internals = require("@mui/x-charts/internals");
|
|
|
9
9
|
var _computeAxisValue = require("./computeAxisValue");
|
|
10
10
|
const selectorFunnel = state => state.funnel;
|
|
11
11
|
exports.selectorFunnel = selectorFunnel;
|
|
12
|
-
const selectorFunnelGap = exports.selectorFunnelGap = (0,
|
|
12
|
+
const selectorFunnelGap = exports.selectorFunnelGap = (0, _store.createSelector)(selectorFunnel, funnel => funnel?.gap ?? 0);
|
|
13
13
|
const selectorChartXAxis = exports.selectorChartXAxis = (0, _store.createSelectorMemoized)(_internals.selectorChartRawXAxis, _internals.selectorChartDrawingArea, _internals.selectorChartSeriesProcessed, _internals.selectorChartSeriesConfig, selectorFunnelGap, (axis, drawingArea, formattedSeries, seriesConfig, gap) => (0, _computeAxisValue.computeAxisValue)({
|
|
14
14
|
drawingArea,
|
|
15
15
|
formattedSeries,
|
|
@@ -1448,7 +1448,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1448
1448
|
* Configuration for zoom interactions.
|
|
1449
1449
|
*/
|
|
1450
1450
|
zoomInteractionConfig: _propTypes.default.shape({
|
|
1451
|
-
pan: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['drag', 'pressAndDrag']), _propTypes.default.shape({
|
|
1451
|
+
pan: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['drag', 'pressAndDrag', 'wheel']), _propTypes.default.shape({
|
|
1452
1452
|
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
1453
1453
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1454
1454
|
type: _propTypes.default.oneOf(['drag']).isRequired
|
|
@@ -1456,6 +1456,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1456
1456
|
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
1457
1457
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1458
1458
|
type: _propTypes.default.oneOf(['pressAndDrag']).isRequired
|
|
1459
|
+
}), _propTypes.default.shape({
|
|
1460
|
+
allowedDirection: _propTypes.default.oneOf(['x', 'xy', 'y']),
|
|
1461
|
+
pointerMode: _propTypes.default.any,
|
|
1462
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1463
|
+
type: _propTypes.default.oneOf(['wheel']).isRequired
|
|
1459
1464
|
})]).isRequired),
|
|
1460
1465
|
zoom: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), _propTypes.default.shape({
|
|
1461
1466
|
pointerMode: _propTypes.default.any,
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.selectorSankeyHighlightedItem = exports.selectorNodeHighlightConfig = exports.selectorNodeFadeConfig = exports.selectorLinkHighlightConfig = exports.selectorLinkFadeConfig = exports.selectorIsSankeyItemFaded = exports.selectorIsNodeHighlighted = exports.selectorIsLinkHighlighted = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _store = require("@mui/x-internals/store");
|
|
8
8
|
const selectorSankeyHighlight = state => state.highlight;
|
|
9
9
|
const selectSeries = state => state.series;
|
|
10
|
-
const selectorSankeySeries = (0,
|
|
10
|
+
const selectorSankeySeries = (0, _store.createSelector)(selectSeries, series => series.processedSeries.sankey?.series[series.processedSeries.sankey?.seriesOrder[0]] || null);
|
|
11
11
|
const DEFAULT_NODE_HIGHLIGHT = 'links';
|
|
12
12
|
const DEFAULT_LINK_HIGHLIGHT = 'links';
|
|
13
13
|
const DEFAULT_FADE = 'none';
|
|
@@ -16,32 +16,32 @@ const DEFAULT_FADE = 'none';
|
|
|
16
16
|
* Get the node highlight configuration from the Sankey series.
|
|
17
17
|
* Defaults to 'nodes' if not specified.
|
|
18
18
|
*/
|
|
19
|
-
const selectorNodeHighlightConfig = exports.selectorNodeHighlightConfig = (0,
|
|
19
|
+
const selectorNodeHighlightConfig = exports.selectorNodeHighlightConfig = (0, _store.createSelector)(selectorSankeySeries, series => series?.nodeOptions?.highlight ?? DEFAULT_NODE_HIGHLIGHT);
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Get the node fade configuration from the Sankey series.
|
|
23
23
|
* Defaults to 'none' if not specified.
|
|
24
24
|
*/
|
|
25
|
-
const selectorNodeFadeConfig = exports.selectorNodeFadeConfig = (0,
|
|
25
|
+
const selectorNodeFadeConfig = exports.selectorNodeFadeConfig = (0, _store.createSelector)(selectorSankeySeries, series => series?.nodeOptions?.fade ?? DEFAULT_FADE);
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Get the link highlight configuration from the Sankey series.
|
|
29
29
|
* Defaults to 'links' if not specified.
|
|
30
30
|
*/
|
|
31
|
-
const selectorLinkHighlightConfig = exports.selectorLinkHighlightConfig = (0,
|
|
31
|
+
const selectorLinkHighlightConfig = exports.selectorLinkHighlightConfig = (0, _store.createSelector)(selectorSankeySeries, series => series?.linkOptions?.highlight ?? DEFAULT_LINK_HIGHLIGHT);
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Get the link fade configuration from the Sankey series.
|
|
35
35
|
* Defaults to 'none' if not specified.
|
|
36
36
|
*/
|
|
37
|
-
const selectorLinkFadeConfig = exports.selectorLinkFadeConfig = (0,
|
|
37
|
+
const selectorLinkFadeConfig = exports.selectorLinkFadeConfig = (0, _store.createSelector)(selectorSankeySeries, series => series?.linkOptions?.fade ?? DEFAULT_FADE);
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Get the currently highlighted item in the Sankey chart.
|
|
41
41
|
* @param {UseSankeyHighlightSignature['state']} state The state of the chart.
|
|
42
42
|
* @returns {SankeyItemIdentifier | null} The highlighted item identifier or null.
|
|
43
43
|
*/
|
|
44
|
-
const selectorSankeyHighlightedItem = exports.selectorSankeyHighlightedItem = (0,
|
|
44
|
+
const selectorSankeyHighlightedItem = exports.selectorSankeyHighlightedItem = (0, _store.createSelector)(selectorSankeyHighlight, highlight => highlight.item);
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* Determines if a specific node should be highlighted.
|
|
@@ -49,7 +49,7 @@ const selectorSankeyHighlightedItem = exports.selectorSankeyHighlightedItem = (0
|
|
|
49
49
|
* - It's the highlighted node (unless highlight mode is 'none')
|
|
50
50
|
* - It's connected to a highlighted link (based on linkOptions.highlight)
|
|
51
51
|
*/
|
|
52
|
-
const selectorIsNodeHighlighted = exports.selectorIsNodeHighlighted = (0,
|
|
52
|
+
const selectorIsNodeHighlighted = exports.selectorIsNodeHighlighted = (0, _store.createSelector)(selectorSankeyHighlightedItem, selectorNodeHighlightConfig, selectorLinkHighlightConfig, (highlightedItem, nodeHighlight, linkHighlight, nodeId) => {
|
|
53
53
|
if (!highlightedItem) {
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
@@ -84,7 +84,7 @@ const selectorIsNodeHighlighted = exports.selectorIsNodeHighlighted = (0, _inter
|
|
|
84
84
|
* - It's the highlighted link (unless highlight mode is 'none')
|
|
85
85
|
* - It's connected to a highlighted node (based on nodeOptions.highlight)
|
|
86
86
|
*/
|
|
87
|
-
const selectorIsLinkHighlighted = exports.selectorIsLinkHighlighted = (0,
|
|
87
|
+
const selectorIsLinkHighlighted = exports.selectorIsLinkHighlighted = (0, _store.createSelector)(selectorSankeyHighlightedItem, selectorNodeHighlightConfig, selectorLinkHighlightConfig, (highlightedItem, nodeHighlight, linkHighlight, link) => {
|
|
88
88
|
if (!highlightedItem) {
|
|
89
89
|
return false;
|
|
90
90
|
}
|
|
@@ -117,7 +117,7 @@ const selectorIsLinkHighlighted = exports.selectorIsLinkHighlighted = (0, _inter
|
|
|
117
117
|
* - This item is not highlighted
|
|
118
118
|
* - The fade mode is 'global' for the highlighted element type
|
|
119
119
|
*/
|
|
120
|
-
const selectorIsSankeyItemFaded = exports.selectorIsSankeyItemFaded = (0,
|
|
120
|
+
const selectorIsSankeyItemFaded = exports.selectorIsSankeyItemFaded = (0, _store.createSelector)(selectorSankeyHighlightedItem, selectorNodeFadeConfig, selectorLinkFadeConfig, (highlightedItem, nodeFade, linkFade, isHighlighted) => {
|
|
121
121
|
if (!highlightedItem || isHighlighted) {
|
|
122
122
|
return false;
|
|
123
123
|
}
|
|
@@ -1430,7 +1430,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1430
1430
|
* Configuration for zoom interactions.
|
|
1431
1431
|
*/
|
|
1432
1432
|
zoomInteractionConfig: _propTypes.default.shape({
|
|
1433
|
-
pan: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['drag', 'pressAndDrag']), _propTypes.default.shape({
|
|
1433
|
+
pan: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['drag', 'pressAndDrag', 'wheel']), _propTypes.default.shape({
|
|
1434
1434
|
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
1435
1435
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1436
1436
|
type: _propTypes.default.oneOf(['drag']).isRequired
|
|
@@ -1438,6 +1438,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1438
1438
|
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
1439
1439
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1440
1440
|
type: _propTypes.default.oneOf(['pressAndDrag']).isRequired
|
|
1441
|
+
}), _propTypes.default.shape({
|
|
1442
|
+
allowedDirection: _propTypes.default.oneOf(['x', 'xy', 'y']),
|
|
1443
|
+
pointerMode: _propTypes.default.any,
|
|
1444
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1445
|
+
type: _propTypes.default.oneOf(['wheel']).isRequired
|
|
1441
1446
|
})]).isRequired),
|
|
1442
1447
|
zoom: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), _propTypes.default.shape({
|
|
1443
1448
|
pointerMode: _propTypes.default.any,
|
|
@@ -1439,7 +1439,7 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1439
1439
|
* Configuration for zoom interactions.
|
|
1440
1440
|
*/
|
|
1441
1441
|
zoomInteractionConfig: PropTypes.shape({
|
|
1442
|
-
pan: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['drag', 'pressAndDrag']), PropTypes.shape({
|
|
1442
|
+
pan: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['drag', 'pressAndDrag', 'wheel']), PropTypes.shape({
|
|
1443
1443
|
pointerMode: PropTypes.oneOf(['mouse', 'touch']),
|
|
1444
1444
|
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1445
1445
|
type: PropTypes.oneOf(['drag']).isRequired
|
|
@@ -1447,6 +1447,11 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1447
1447
|
pointerMode: PropTypes.oneOf(['mouse', 'touch']),
|
|
1448
1448
|
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1449
1449
|
type: PropTypes.oneOf(['pressAndDrag']).isRequired
|
|
1450
|
+
}), PropTypes.shape({
|
|
1451
|
+
allowedDirection: PropTypes.oneOf(['x', 'xy', 'y']),
|
|
1452
|
+
pointerMode: PropTypes.any,
|
|
1453
|
+
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1454
|
+
type: PropTypes.oneOf(['wheel']).isRequired
|
|
1450
1455
|
})]).isRequired),
|
|
1451
1456
|
zoom: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), PropTypes.shape({
|
|
1452
1457
|
pointerMode: PropTypes.any,
|
|
@@ -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 = "MTc2MzU5NjgwMDAwMA==";
|
|
14
14
|
const packageIdentifier = 'x-charts-pro';
|
|
15
15
|
/**
|
|
16
16
|
* Orchestrates the data providers for the chart components and hooks.
|
|
@@ -27,12 +27,15 @@ const ZoomSliderActiveTrackRect = styled('rect', {
|
|
|
27
27
|
props: {
|
|
28
28
|
preview: true
|
|
29
29
|
},
|
|
30
|
-
style: {
|
|
31
|
-
fill: 'transparent'
|
|
30
|
+
style: _extends({
|
|
31
|
+
fill: 'transparent'
|
|
32
|
+
}, theme.applyStyles('dark', {
|
|
33
|
+
fill: 'transparent'
|
|
34
|
+
}), {
|
|
32
35
|
rx: 4,
|
|
33
36
|
ry: 4,
|
|
34
37
|
stroke: theme.palette.grey[500]
|
|
35
|
-
}
|
|
38
|
+
})
|
|
36
39
|
}]
|
|
37
40
|
}));
|
|
38
41
|
export function ChartAxisZoomSliderActiveTrack({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
|
-
import {
|
|
1
|
+
import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
|
+
import { selectorChartSeriesConfig, selectorChartSeriesProcessed, selectorChartDrawingArea, selectorChartRawXAxis, selectorChartRawYAxis } from '@mui/x-charts/internals';
|
|
3
3
|
import { computeAxisValue } from "./computeAxisValue.js";
|
|
4
4
|
export const selectorFunnel = state => state.funnel;
|
|
5
|
-
export const selectorFunnelGap = createSelector(
|
|
5
|
+
export const selectorFunnelGap = createSelector(selectorFunnel, funnel => funnel?.gap ?? 0);
|
|
6
6
|
export const selectorChartXAxis = createSelectorMemoized(selectorChartRawXAxis, selectorChartDrawingArea, selectorChartSeriesProcessed, selectorChartSeriesConfig, selectorFunnelGap, (axis, drawingArea, formattedSeries, seriesConfig, gap) => computeAxisValue({
|
|
7
7
|
drawingArea,
|
|
8
8
|
formattedSeries,
|
|
@@ -1441,7 +1441,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1441
1441
|
* Configuration for zoom interactions.
|
|
1442
1442
|
*/
|
|
1443
1443
|
zoomInteractionConfig: PropTypes.shape({
|
|
1444
|
-
pan: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['drag', 'pressAndDrag']), PropTypes.shape({
|
|
1444
|
+
pan: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['drag', 'pressAndDrag', 'wheel']), PropTypes.shape({
|
|
1445
1445
|
pointerMode: PropTypes.oneOf(['mouse', 'touch']),
|
|
1446
1446
|
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1447
1447
|
type: PropTypes.oneOf(['drag']).isRequired
|
|
@@ -1449,6 +1449,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1449
1449
|
pointerMode: PropTypes.oneOf(['mouse', 'touch']),
|
|
1450
1450
|
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1451
1451
|
type: PropTypes.oneOf(['pressAndDrag']).isRequired
|
|
1452
|
+
}), PropTypes.shape({
|
|
1453
|
+
allowedDirection: PropTypes.oneOf(['x', 'xy', 'y']),
|
|
1454
|
+
pointerMode: PropTypes.any,
|
|
1455
|
+
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1456
|
+
type: PropTypes.oneOf(['wheel']).isRequired
|
|
1452
1457
|
})]).isRequired),
|
|
1453
1458
|
zoom: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), PropTypes.shape({
|
|
1454
1459
|
pointerMode: PropTypes.any,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createSelector } from '@mui/x-
|
|
1
|
+
import { createSelector } from '@mui/x-internals/store';
|
|
2
2
|
const selectorSankeyHighlight = state => state.highlight;
|
|
3
3
|
const selectSeries = state => state.series;
|
|
4
|
-
const selectorSankeySeries = createSelector(
|
|
4
|
+
const selectorSankeySeries = createSelector(selectSeries, series => series.processedSeries.sankey?.series[series.processedSeries.sankey?.seriesOrder[0]] || null);
|
|
5
5
|
const DEFAULT_NODE_HIGHLIGHT = 'links';
|
|
6
6
|
const DEFAULT_LINK_HIGHLIGHT = 'links';
|
|
7
7
|
const DEFAULT_FADE = 'none';
|
|
@@ -10,32 +10,32 @@ const DEFAULT_FADE = 'none';
|
|
|
10
10
|
* Get the node highlight configuration from the Sankey series.
|
|
11
11
|
* Defaults to 'nodes' if not specified.
|
|
12
12
|
*/
|
|
13
|
-
export const selectorNodeHighlightConfig = createSelector(
|
|
13
|
+
export const selectorNodeHighlightConfig = createSelector(selectorSankeySeries, series => series?.nodeOptions?.highlight ?? DEFAULT_NODE_HIGHLIGHT);
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Get the node fade configuration from the Sankey series.
|
|
17
17
|
* Defaults to 'none' if not specified.
|
|
18
18
|
*/
|
|
19
|
-
export const selectorNodeFadeConfig = createSelector(
|
|
19
|
+
export const selectorNodeFadeConfig = createSelector(selectorSankeySeries, series => series?.nodeOptions?.fade ?? DEFAULT_FADE);
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Get the link highlight configuration from the Sankey series.
|
|
23
23
|
* Defaults to 'links' if not specified.
|
|
24
24
|
*/
|
|
25
|
-
export const selectorLinkHighlightConfig = createSelector(
|
|
25
|
+
export const selectorLinkHighlightConfig = createSelector(selectorSankeySeries, series => series?.linkOptions?.highlight ?? DEFAULT_LINK_HIGHLIGHT);
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Get the link fade configuration from the Sankey series.
|
|
29
29
|
* Defaults to 'none' if not specified.
|
|
30
30
|
*/
|
|
31
|
-
export const selectorLinkFadeConfig = createSelector(
|
|
31
|
+
export const selectorLinkFadeConfig = createSelector(selectorSankeySeries, series => series?.linkOptions?.fade ?? DEFAULT_FADE);
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Get the currently highlighted item in the Sankey chart.
|
|
35
35
|
* @param {UseSankeyHighlightSignature['state']} state The state of the chart.
|
|
36
36
|
* @returns {SankeyItemIdentifier | null} The highlighted item identifier or null.
|
|
37
37
|
*/
|
|
38
|
-
export const selectorSankeyHighlightedItem = createSelector(
|
|
38
|
+
export const selectorSankeyHighlightedItem = createSelector(selectorSankeyHighlight, highlight => highlight.item);
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Determines if a specific node should be highlighted.
|
|
@@ -43,7 +43,7 @@ export const selectorSankeyHighlightedItem = createSelector([selectorSankeyHighl
|
|
|
43
43
|
* - It's the highlighted node (unless highlight mode is 'none')
|
|
44
44
|
* - It's connected to a highlighted link (based on linkOptions.highlight)
|
|
45
45
|
*/
|
|
46
|
-
export const selectorIsNodeHighlighted = createSelector(
|
|
46
|
+
export const selectorIsNodeHighlighted = createSelector(selectorSankeyHighlightedItem, selectorNodeHighlightConfig, selectorLinkHighlightConfig, (highlightedItem, nodeHighlight, linkHighlight, nodeId) => {
|
|
47
47
|
if (!highlightedItem) {
|
|
48
48
|
return false;
|
|
49
49
|
}
|
|
@@ -78,7 +78,7 @@ export const selectorIsNodeHighlighted = createSelector([selectorSankeyHighlight
|
|
|
78
78
|
* - It's the highlighted link (unless highlight mode is 'none')
|
|
79
79
|
* - It's connected to a highlighted node (based on nodeOptions.highlight)
|
|
80
80
|
*/
|
|
81
|
-
export const selectorIsLinkHighlighted = createSelector(
|
|
81
|
+
export const selectorIsLinkHighlighted = createSelector(selectorSankeyHighlightedItem, selectorNodeHighlightConfig, selectorLinkHighlightConfig, (highlightedItem, nodeHighlight, linkHighlight, link) => {
|
|
82
82
|
if (!highlightedItem) {
|
|
83
83
|
return false;
|
|
84
84
|
}
|
|
@@ -111,7 +111,7 @@ export const selectorIsLinkHighlighted = createSelector([selectorSankeyHighlight
|
|
|
111
111
|
* - This item is not highlighted
|
|
112
112
|
* - The fade mode is 'global' for the highlighted element type
|
|
113
113
|
*/
|
|
114
|
-
export const selectorIsSankeyItemFaded = createSelector(
|
|
114
|
+
export const selectorIsSankeyItemFaded = createSelector(selectorSankeyHighlightedItem, selectorNodeFadeConfig, selectorLinkFadeConfig, (highlightedItem, nodeFade, linkFade, isHighlighted) => {
|
|
115
115
|
if (!highlightedItem || isHighlighted) {
|
|
116
116
|
return false;
|
|
117
117
|
}
|
|
@@ -1423,7 +1423,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1423
1423
|
* Configuration for zoom interactions.
|
|
1424
1424
|
*/
|
|
1425
1425
|
zoomInteractionConfig: PropTypes.shape({
|
|
1426
|
-
pan: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['drag', 'pressAndDrag']), PropTypes.shape({
|
|
1426
|
+
pan: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['drag', 'pressAndDrag', 'wheel']), PropTypes.shape({
|
|
1427
1427
|
pointerMode: PropTypes.oneOf(['mouse', 'touch']),
|
|
1428
1428
|
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1429
1429
|
type: PropTypes.oneOf(['drag']).isRequired
|
|
@@ -1431,6 +1431,11 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1431
1431
|
pointerMode: PropTypes.oneOf(['mouse', 'touch']),
|
|
1432
1432
|
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1433
1433
|
type: PropTypes.oneOf(['pressAndDrag']).isRequired
|
|
1434
|
+
}), PropTypes.shape({
|
|
1435
|
+
allowedDirection: PropTypes.oneOf(['x', 'xy', 'y']),
|
|
1436
|
+
pointerMode: PropTypes.any,
|
|
1437
|
+
requiredKeys: PropTypes.arrayOf(PropTypes.string),
|
|
1438
|
+
type: PropTypes.oneOf(['wheel']).isRequired
|
|
1434
1439
|
})]).isRequired),
|
|
1435
1440
|
zoom: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['brush', 'doubleTapReset', 'pinch', 'tapAndDrag', 'wheel']), PropTypes.shape({
|
|
1436
1441
|
pointerMode: PropTypes.any,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
const useSelectorSeries = createSeriesSelectorsOfType('funnel');
|
|
5
|
-
const useSelectorSeriesContext = createAllSeriesSelectorOfType('funnel');
|
|
3
|
+
import { useSeriesOfType, useAllSeriesOfType } from '@mui/x-charts/internals';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Get access to the internal state of funnel series.
|
|
@@ -27,7 +25,7 @@ const useSelectorSeriesContext = createAllSeriesSelectorOfType('funnel');
|
|
|
27
25
|
*/
|
|
28
26
|
|
|
29
27
|
export function useFunnelSeries(seriesIds) {
|
|
30
|
-
return
|
|
28
|
+
return useSeriesOfType('funnel', seriesIds);
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
/**
|
|
@@ -38,5 +36,5 @@ export function useFunnelSeries(seriesIds) {
|
|
|
38
36
|
* @returns the funnel series
|
|
39
37
|
*/
|
|
40
38
|
export function useFunnelSeriesContext() {
|
|
41
|
-
return
|
|
39
|
+
return useAllSeriesOfType('funnel');
|
|
42
40
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
const useSelectorSeries = createSeriesSelectorsOfType('heatmap');
|
|
5
|
-
const useSelectorSeriesContext = createAllSeriesSelectorOfType('heatmap');
|
|
3
|
+
import { useSeriesOfType, useAllSeriesOfType } from '@mui/x-charts/internals';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Get access to the internal state of heatmap series.
|
|
@@ -27,7 +25,7 @@ const useSelectorSeriesContext = createAllSeriesSelectorOfType('heatmap');
|
|
|
27
25
|
*/
|
|
28
26
|
|
|
29
27
|
export function useHeatmapSeries(seriesIds) {
|
|
30
|
-
return
|
|
28
|
+
return useSeriesOfType('heatmap', seriesIds);
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
/**
|
|
@@ -38,5 +36,5 @@ export function useHeatmapSeries(seriesIds) {
|
|
|
38
36
|
* @returns the heatmap series
|
|
39
37
|
*/
|
|
40
38
|
export function useHeatmapSeriesContext() {
|
|
41
|
-
return
|
|
39
|
+
return useAllSeriesOfType('heatmap');
|
|
42
40
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
const useSelectorSeries = createSeriesSelectorsOfType('sankey');
|
|
5
|
-
const useSelectorSeriesContext = createAllSeriesSelectorOfType('sankey');
|
|
3
|
+
import { useSeriesOfType, useAllSeriesOfType } from '@mui/x-charts/internals';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Get access to the internal state of sankey series.
|
|
@@ -27,7 +25,7 @@ const useSelectorSeriesContext = createAllSeriesSelectorOfType('sankey');
|
|
|
27
25
|
*/
|
|
28
26
|
|
|
29
27
|
export function useSankeySeries(seriesIds) {
|
|
30
|
-
return
|
|
28
|
+
return useSeriesOfType('sankey', seriesIds);
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
/**
|
|
@@ -38,5 +36,5 @@ export function useSankeySeries(seriesIds) {
|
|
|
38
36
|
* @returns the sankey series
|
|
39
37
|
*/
|
|
40
38
|
export function useSankeySeriesContext() {
|
|
41
|
-
return
|
|
39
|
+
return useAllSeriesOfType('sankey');
|
|
42
40
|
}
|
package/esm/index.js
CHANGED
|
@@ -8,10 +8,11 @@ export declare const selectorZoomInteractionConfig: (args_0: import("@mui/x-char
|
|
|
8
8
|
requiredKeys?: import("@mui/x-internal-gestures/core").KeyboardKey[];
|
|
9
9
|
};
|
|
10
10
|
pointerMode?: import("@mui/x-internal-gestures/core").PointerMode[];
|
|
11
|
+
allowedDirection?: "x" | "y" | "xy";
|
|
11
12
|
}) | null;
|
|
12
13
|
export declare const selectorPanInteractionConfig: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
13
14
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
14
|
-
}, interactionName: "drag" | "pressAndDrag") => (Omit<import("./ZoomInteractionConfig.types.js").PanInteraction, "pointerMode"> & {
|
|
15
|
+
}, interactionName: "wheel" | "drag" | "pressAndDrag") => (Omit<import("./ZoomInteractionConfig.types.js").PanInteraction, "pointerMode"> & {
|
|
15
16
|
mouse: {
|
|
16
17
|
requiredKeys?: import("@mui/x-internal-gestures/core").KeyboardKey[];
|
|
17
18
|
};
|
|
@@ -19,15 +20,6 @@ export declare const selectorPanInteractionConfig: (args_0: import("@mui/x-chart
|
|
|
19
20
|
requiredKeys?: import("@mui/x-internal-gestures/core").KeyboardKey[];
|
|
20
21
|
};
|
|
21
22
|
pointerMode?: import("@mui/x-internal-gestures/core").PointerMode[];
|
|
23
|
+
allowedDirection?: "x" | "y" | "xy";
|
|
22
24
|
}) | null;
|
|
23
|
-
export declare const selectorIsZoomBrushEnabled: (args_0:
|
|
24
|
-
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
25
|
-
}) => false | (Omit<import("./ZoomInteractionConfig.types.js").ZoomInteraction, "pointerMode"> & {
|
|
26
|
-
mouse: {
|
|
27
|
-
requiredKeys?: import("@mui/x-internal-gestures/core").KeyboardKey[];
|
|
28
|
-
};
|
|
29
|
-
touch: {
|
|
30
|
-
requiredKeys?: import("@mui/x-internal-gestures/core").KeyboardKey[];
|
|
31
|
-
};
|
|
32
|
-
pointerMode?: import("@mui/x-internal-gestures/core").PointerMode[];
|
|
33
|
-
});
|
|
25
|
+
export declare const selectorIsZoomBrushEnabled: (args_0: {}, zoomInteractionConfig: any) => any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createSelector
|
|
1
|
+
import { createSelector } from '@mui/x-internals/store';
|
|
2
|
+
import { selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
|
|
2
3
|
import { selectorChartZoomState } from "./useChartProZoom.selectors.js";
|
|
3
|
-
export const selectorZoomInteractionConfig = createSelector(
|
|
4
|
-
export const selectorPanInteractionConfig = createSelector(
|
|
5
|
-
export const selectorIsZoomBrushEnabled = createSelector(
|
|
4
|
+
export const selectorZoomInteractionConfig = createSelector(selectorChartZoomState, (zoomState, interactionName) => zoomState.zoomInteractionConfig.zoom[interactionName] ?? null);
|
|
5
|
+
export const selectorPanInteractionConfig = createSelector(selectorChartZoomState, (zoomState, interactionName) => zoomState.zoomInteractionConfig.pan[interactionName] ?? null);
|
|
6
|
+
export const selectorIsZoomBrushEnabled = createSelector(selectorChartZoomOptionsLookup, state => selectorZoomInteractionConfig(state, 'brush'), (zoomOptions, zoomInteractionConfig) => Object.keys(zoomOptions).length > 0 && zoomInteractionConfig || false);
|