@mui/x-charts-premium 9.0.0-alpha.0 → 9.0.0-alpha.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/BarChartPremium/BarChartPremium.d.ts +1 -1
- package/BarChartPremium/BarChartPremium.js +23 -6
- package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.js +1 -14
- package/CHANGELOG.md +118 -0
- package/ChartDataProviderPremium/ChartDataProviderPremium.js +1 -1
- package/ChartsContainerPremium/ChartsContainerPremium.js +2 -1
- package/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +1 -2
- package/ChartsContainerPremium/useChartsContainerPremiumProps.js +2 -2
- package/HeatmapPremium/HeatmapPremium.js +18 -2
- package/esm/BarChartPremium/BarChartPremium.d.ts +1 -1
- package/esm/BarChartPremium/BarChartPremium.js +23 -6
- package/esm/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.js +2 -15
- package/esm/ChartDataProviderPremium/ChartDataProviderPremium.js +1 -1
- package/esm/ChartsContainerPremium/ChartsContainerPremium.js +2 -1
- package/esm/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +1 -2
- package/esm/ChartsContainerPremium/useChartsContainerPremiumProps.js +2 -2
- package/esm/HeatmapPremium/HeatmapPremium.js +18 -2
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +20 -8
|
@@ -39,5 +39,5 @@ export interface BarChartPremiumProps extends Omit<BarChartProProps, 'series' |
|
|
|
39
39
|
*
|
|
40
40
|
* - [BarChart API](https://mui.com/x/api/charts/bar-chart/)
|
|
41
41
|
*/
|
|
42
|
-
declare const BarChartPremium: React.ForwardRefExoticComponent<BarChartPremiumProps & React.RefAttributes<
|
|
42
|
+
declare const BarChartPremium: React.ForwardRefExoticComponent<BarChartPremiumProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
43
|
export { BarChartPremium };
|
|
@@ -82,11 +82,12 @@ const BarChartPremium = exports.BarChartPremium = /*#__PURE__*/React.forwardRef(
|
|
|
82
82
|
onZoomChange,
|
|
83
83
|
apiRef,
|
|
84
84
|
plugins: _BarChartPremium2.BAR_CHART_PREMIUM_PLUGINS
|
|
85
|
-
})
|
|
85
|
+
}));
|
|
86
86
|
const Tooltip = props.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
87
87
|
const Toolbar = props.slots?.toolbar ?? _ChartsToolbarPro.ChartsToolbarPro;
|
|
88
88
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPremium.ChartDataProviderPremium, (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
89
89
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
90
|
+
ref: ref,
|
|
90
91
|
children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, (0, _extends2.default)({}, legendProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
91
92
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsGrid.ChartsGrid, (0, _extends2.default)({}, gridProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", (0, _extends2.default)({}, clipPathGroupProps, {
|
|
92
93
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_BarChart.BarPlot, (0, _extends2.default)({}, barPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RangeBarPlot.RangeBarPlot, (0, _extends2.default)({}, rangeBarPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsAxisHighlight.ChartsAxisHighlight, (0, _extends2.default)({}, axisHighlightProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarChart.FocusedBar, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusedRangeBar.FocusedRangeBar, {})]
|
|
@@ -197,8 +198,8 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
197
198
|
*/
|
|
198
199
|
hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
199
200
|
dataIndex: _propTypes.default.number,
|
|
200
|
-
seriesId: _propTypes.default.string,
|
|
201
|
-
type: _propTypes.default.oneOf(['bar'])
|
|
201
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
202
|
+
type: _propTypes.default.oneOf(['bar'])
|
|
202
203
|
})),
|
|
203
204
|
/**
|
|
204
205
|
* If `true`, the legend is not rendered.
|
|
@@ -248,8 +249,8 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
248
249
|
*/
|
|
249
250
|
initialHiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
250
251
|
dataIndex: _propTypes.default.number,
|
|
251
|
-
seriesId: _propTypes.default.string,
|
|
252
|
-
type: _propTypes.default.oneOf(['bar'])
|
|
252
|
+
seriesId: _propTypes.default.string.isRequired,
|
|
253
|
+
type: _propTypes.default.oneOf(['bar'])
|
|
253
254
|
})),
|
|
254
255
|
/**
|
|
255
256
|
* The list of zoom data related to each axis.
|
|
@@ -318,6 +319,14 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
318
319
|
* @param {BarItemIdentifier | RangeBarItemIdentifier} itemIdentifier The item identifier.
|
|
319
320
|
*/
|
|
320
321
|
onItemClick: _propTypes.default.func,
|
|
322
|
+
/**
|
|
323
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
324
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
325
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
326
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
327
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
328
|
+
*/
|
|
329
|
+
onTooltipAxisChange: _propTypes.default.func,
|
|
321
330
|
/**
|
|
322
331
|
* The callback fired when the tooltip item changes.
|
|
323
332
|
*
|
|
@@ -367,6 +376,14 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
367
376
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
368
377
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
369
378
|
title: _propTypes.default.string,
|
|
379
|
+
/**
|
|
380
|
+
* The controlled axis tooltip.
|
|
381
|
+
* Identified by the axis id, and data index.
|
|
382
|
+
*/
|
|
383
|
+
tooltipAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
384
|
+
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
385
|
+
dataIndex: _propTypes.default.number.isRequired
|
|
386
|
+
})),
|
|
370
387
|
/**
|
|
371
388
|
* The tooltip item.
|
|
372
389
|
* Used when the tooltip is controlled.
|
|
@@ -374,7 +391,7 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
374
391
|
tooltipItem: _propTypes.default.shape({
|
|
375
392
|
dataIndex: _propTypes.default.number.isRequired,
|
|
376
393
|
seriesId: _propTypes.default.string.isRequired,
|
|
377
|
-
type: _propTypes.default.oneOf(['bar'])
|
|
394
|
+
type: _propTypes.default.oneOf(['bar'])
|
|
378
395
|
}),
|
|
379
396
|
/**
|
|
380
397
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
@@ -5,18 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
|
-
const keyboardFocusHandler =
|
|
9
|
-
switch (event.key) {
|
|
10
|
-
case 'ArrowRight':
|
|
11
|
-
return (0, _internals.createGetNextIndexFocusedItem)(_internals.composableCartesianSeriesTypes);
|
|
12
|
-
case 'ArrowLeft':
|
|
13
|
-
return (0, _internals.createGetPreviousIndexFocusedItem)(_internals.composableCartesianSeriesTypes);
|
|
14
|
-
case 'ArrowDown':
|
|
15
|
-
return (0, _internals.createGetPreviousSeriesFocusedItem)(_internals.composableCartesianSeriesTypes);
|
|
16
|
-
case 'ArrowUp':
|
|
17
|
-
return (0, _internals.createGetNextSeriesFocusedItem)(_internals.composableCartesianSeriesTypes);
|
|
18
|
-
default:
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
8
|
+
const keyboardFocusHandler = (0, _internals.createCommonKeyboardFocusHandler)(_internals.composableCartesianSeriesTypes);
|
|
22
9
|
var _default = exports.default = keyboardFocusHandler;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,123 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.0.0-alpha.1
|
|
4
|
+
|
|
5
|
+
_Feb 26, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- ⚡️ Improved dynamic data support and cache invalidation in lazy loading for Data Grid Pro
|
|
10
|
+
- ⌨️ Keyboard support for selecting day, month, and year in Date Pickers
|
|
11
|
+
- 📊 Axis tooltip sorting and control improvements in Charts
|
|
12
|
+
- 🐞 Bugfixes and internal improvements
|
|
13
|
+
|
|
14
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
15
|
+
@EllGree, @lion1963
|
|
16
|
+
|
|
17
|
+
The following team members contributed to this release:
|
|
18
|
+
@alexfauquette, @arminmeh, @brijeshb42, @cherniavskii, @dav-is, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes, @sai6855, @siriwatknp, @ZeeshanTamboli
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@9.0.0-alpha.1`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Forward rest props in `GridFilterInputMultipleValue` (#21407) @siriwatknp
|
|
25
|
+
- [DataGrid] Preserve key input during row edit when using `rowModesModel` (#20759) @michelengelen
|
|
26
|
+
- [DataGrid] Remove double rtl inversion logic for columns pinning (#21371) @siriwatknp
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid-pro@9.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
29
|
+
|
|
30
|
+
Same changes as in `@mui/x-data-grid@9.0.0-alpha.1`, plus:
|
|
31
|
+
|
|
32
|
+
- [DataGridPro] Fix number input visibility in header filters (#21328) @michelengelen
|
|
33
|
+
- [DataGridPro] Improve dynamic data support and cache invalidation in lazy loading (#21282) @MBilalShafi
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@9.0.0-alpha.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.1`.
|
|
38
|
+
|
|
39
|
+
### Date and Time Pickers
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers@9.0.0-alpha.1`
|
|
42
|
+
|
|
43
|
+
- [DatePicker] Add keyboard support for selecting day, month, and year (#20859) @michelengelen
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers-pro@9.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-date-pickers@9.0.0-alpha.1`, plus:
|
|
48
|
+
|
|
49
|
+
- [DateRangePicker] Fix timezone update issue leading to `invalidRange` error (#20863) @michelengelen
|
|
50
|
+
|
|
51
|
+
### Charts
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-charts@9.0.0-alpha.1`
|
|
54
|
+
|
|
55
|
+
- [charts] Add `sort` props to the axis tooltip (#21293) @alexfauquette
|
|
56
|
+
- [charts] Controll axis tooltip (#21351) @alexfauquette
|
|
57
|
+
- [charts] De duplicate keyboard focus handler function (#21267) @sai6855
|
|
58
|
+
- [charts] Make `type` optional in identifiers (#21311) @alexfauquette
|
|
59
|
+
- [charts] Move ref to the root component (#21396) @alexfauquette
|
|
60
|
+
- [charts] Refactor loading and no data overlays to use a shared OverlayText component (#21414) @sai6855
|
|
61
|
+
- [charts] Require series ids to be unique (#21330) @alexfauquette
|
|
62
|
+
- [charts] Set `showMark` as `false` by default (#21373) @alexfauquette
|
|
63
|
+
- [charts] Use `createGetNextIndexFocusedItem()` util in Funnel and RangeBar charts (#21390) @sai6855
|
|
64
|
+
- [charts] Remove unnecessary string concatenation (#21418) @sai6855
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts-pro@9.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
|
+
|
|
68
|
+
Same changes as in `@mui/x-charts@9.0.0-alpha.1`.
|
|
69
|
+
|
|
70
|
+
#### `@mui/x-charts-premium@9.0.0-alpha.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
71
|
+
|
|
72
|
+
Same changes as in `@mui/x-charts-pro@9.0.0-alpha.1`.
|
|
73
|
+
|
|
74
|
+
### Tree View
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-tree-view@9.0.0-alpha.1`
|
|
77
|
+
|
|
78
|
+
- [tree view] Focus item sibling on unmount instead of the 1st item (#21254) @flaviendelangle
|
|
79
|
+
|
|
80
|
+
#### `@mui/x-tree-view-pro@9.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
81
|
+
|
|
82
|
+
Same changes as in `@mui/x-tree-view@9.0.0-alpha.1`.
|
|
83
|
+
|
|
84
|
+
### Codemod
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-codemod@9.0.0-alpha.1`
|
|
87
|
+
|
|
88
|
+
Internal changes.
|
|
89
|
+
|
|
90
|
+
### Docs
|
|
91
|
+
|
|
92
|
+
- [docs] Fix external 301s (#21377) @Janpot
|
|
93
|
+
- [docs] Show premium in the overview (#21343) @alexfauquette
|
|
94
|
+
- [docs][charts] Revise the useLegend hook doc (#21352) @mapache-salvaje
|
|
95
|
+
- [docs][charts] Revise the axis hooks doc (#21317) @mapache-salvaje
|
|
96
|
+
- [docs][charts] Revise the scale hooks doc (#21316) @mapache-salvaje
|
|
97
|
+
- [docs][charts] Revise the series hooks doc (#21353) @mapache-salvaje
|
|
98
|
+
- [docs][charts] Revise the useDataset doc (#21336) @mapache-salvaje
|
|
99
|
+
- [docs][charts] Revise the useDrawingArea doc (#21333) @mapache-salvaje
|
|
100
|
+
|
|
101
|
+
### Core
|
|
102
|
+
|
|
103
|
+
- [core] Update docs deploy script to the `docs-next` branch (#21341) @siriwatknp
|
|
104
|
+
- [code-infra] Cleanup unused babel plugins (#21453) @brijeshb42
|
|
105
|
+
- [code-infra] Do not append `x` to the last version for the compare API (#21408) @arminmeh
|
|
106
|
+
- [code-infra] Upgrade react-docgen to v8 X (#21155) @JCQuintas
|
|
107
|
+
- [code-infra] Modernize codemod (#21096) @JCQuintas
|
|
108
|
+
- [docs-infra] Fix current version detection logic (#21417) @cherniavskii
|
|
109
|
+
- [docs-infra] Reapply Cookie Banner (#21281) @dav-is
|
|
110
|
+
- [internal] Headless filtering plugin (#21302) @arminmeh
|
|
111
|
+
- [internal] Headless pagination plugin (#21183) @arminmeh
|
|
112
|
+
- [internal] Headless virtualization followups (#21327) @cherniavskii
|
|
113
|
+
- [internal] Keep cached data for disabled pipe processors (#21348) @arminmeh
|
|
114
|
+
- [internal] Remove autoprefixer package (#21440) @ZeeshanTamboli
|
|
115
|
+
|
|
116
|
+
### Miscellaneous
|
|
117
|
+
|
|
118
|
+
- [l10n] Fix Czech (csCZ) locale: sort/filter labels are swapped (#21400) @EllGree
|
|
119
|
+
- [l10n] Improve Ukrainian (uk-UA) locale (#21366) @lion1963
|
|
120
|
+
|
|
3
121
|
## 9.0.0-alpha.0
|
|
4
122
|
|
|
5
123
|
_Feb 16, 2026_
|
|
@@ -18,7 +18,7 @@ var _seriesConfig = require("../BarChartPremium/RangeBar/seriesConfig");
|
|
|
18
18
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
19
19
|
var _useChartDataProviderPremiumProps = require("./useChartDataProviderPremiumProps");
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
const releaseInfo = "
|
|
21
|
+
const releaseInfo = "MTc3MjA2NDAwMDAwMA==";
|
|
22
22
|
const packageIdentifier = 'x-charts-premium';
|
|
23
23
|
const defaultSeriesConfigPremium = exports.defaultSeriesConfigPremium = (0, _extends2.default)({}, _internals2.defaultSeriesConfigPro, {
|
|
24
24
|
rangeBar: _seriesConfig.rangeBarSeriesConfig
|
|
@@ -42,9 +42,10 @@ const ChartsContainerPremium = exports.ChartsContainerPremium = /*#__PURE__*/Rea
|
|
|
42
42
|
chartDataProviderPremiumProps,
|
|
43
43
|
children,
|
|
44
44
|
chartsSurfaceProps
|
|
45
|
-
} = (0, _useChartsContainerPremiumProps.useChartsContainerPremiumProps)(props
|
|
45
|
+
} = (0, _useChartsContainerPremiumProps.useChartsContainerPremiumProps)(props);
|
|
46
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPremium.ChartDataProviderPremium, (0, _extends2.default)({}, chartDataProviderPremiumProps, {
|
|
47
47
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
48
|
+
ref: ref,
|
|
48
49
|
children: children
|
|
49
50
|
}))
|
|
50
51
|
}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
1
|
import { type ChartAnyPluginSignature, type ChartSeriesType, type UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
3
2
|
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
4
3
|
import type { ChartsContainerPremiumProps } from "./ChartsContainerPremium.js";
|
|
@@ -6,4 +5,4 @@ import type { ChartDataProviderPremiumProps } from "../ChartDataProviderPremium/
|
|
|
6
5
|
export type UseChartsContainerPremiumPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartsContainerPropsReturnValue<TSeries, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
7
6
|
chartDataProviderPremiumProps: ChartDataProviderPremiumProps<TSeries, TSignatures>;
|
|
8
7
|
};
|
|
9
|
-
export declare function useChartsContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures
|
|
8
|
+
export declare function useChartsContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures>): UseChartsContainerPremiumPropsReturnValue<TSeries, TSignatures>;
|
|
@@ -11,7 +11,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var _internals = require("@mui/x-charts-pro/internals");
|
|
12
12
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
13
13
|
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "zoomInteractionConfig", "plugins", "apiRef"];
|
|
14
|
-
function useChartsContainerPremiumProps(props
|
|
14
|
+
function useChartsContainerPremiumProps(props) {
|
|
15
15
|
const _ref = props,
|
|
16
16
|
{
|
|
17
17
|
plugins
|
|
@@ -21,7 +21,7 @@ function useChartsContainerPremiumProps(props, ref) {
|
|
|
21
21
|
chartDataProviderProProps,
|
|
22
22
|
chartsSurfaceProps,
|
|
23
23
|
children
|
|
24
|
-
} = (0, _internals.useChartsContainerProProps)(baseProps
|
|
24
|
+
} = (0, _internals.useChartsContainerProProps)(baseProps);
|
|
25
25
|
const chartDataProviderPremiumProps = (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
26
26
|
plugins: plugins ?? _allPlugins.DEFAULT_PLUGINS
|
|
27
27
|
});
|
|
@@ -176,9 +176,17 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
|
|
|
176
176
|
* The callback fired when an item is clicked.
|
|
177
177
|
*
|
|
178
178
|
* @param {React.MouseEvent<SVGSVGElement, MouseEvent>} event The click event.
|
|
179
|
-
* @param {
|
|
179
|
+
* @param {SeriesItemIdentifierWithType<SeriesType>} item The clicked item.
|
|
180
180
|
*/
|
|
181
181
|
onItemClick: _propTypes.default.func,
|
|
182
|
+
/**
|
|
183
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
184
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
185
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
186
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
187
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
188
|
+
*/
|
|
189
|
+
onTooltipAxisChange: _propTypes.default.func,
|
|
182
190
|
/**
|
|
183
191
|
* The callback fired when the tooltip item changes.
|
|
184
192
|
*
|
|
@@ -226,6 +234,14 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
|
|
|
226
234
|
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
227
235
|
*/
|
|
228
236
|
tooltip: _propTypes.default.object,
|
|
237
|
+
/**
|
|
238
|
+
* The controlled axis tooltip.
|
|
239
|
+
* Identified by the axis id, and data index.
|
|
240
|
+
*/
|
|
241
|
+
tooltipAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
242
|
+
axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
243
|
+
dataIndex: _propTypes.default.number.isRequired
|
|
244
|
+
})),
|
|
229
245
|
/**
|
|
230
246
|
* The tooltip item.
|
|
231
247
|
* Used when the tooltip is controlled.
|
|
@@ -233,7 +249,7 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
|
|
|
233
249
|
tooltipItem: _propTypes.default.shape({
|
|
234
250
|
dataIndex: _propTypes.default.number,
|
|
235
251
|
seriesId: _propTypes.default.string.isRequired,
|
|
236
|
-
type: _propTypes.default.oneOf(['heatmap'])
|
|
252
|
+
type: _propTypes.default.oneOf(['heatmap']),
|
|
237
253
|
xIndex: _propTypes.default.number.isRequired,
|
|
238
254
|
yIndex: _propTypes.default.number.isRequired
|
|
239
255
|
}),
|
|
@@ -39,5 +39,5 @@ export interface BarChartPremiumProps extends Omit<BarChartProProps, 'series' |
|
|
|
39
39
|
*
|
|
40
40
|
* - [BarChart API](https://mui.com/x/api/charts/bar-chart/)
|
|
41
41
|
*/
|
|
42
|
-
declare const BarChartPremium: React.ForwardRefExoticComponent<BarChartPremiumProps & React.RefAttributes<
|
|
42
|
+
declare const BarChartPremium: React.ForwardRefExoticComponent<BarChartPremiumProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
43
|
export { BarChartPremium };
|
|
@@ -75,11 +75,12 @@ const BarChartPremium = /*#__PURE__*/React.forwardRef(function BarChartPremium(i
|
|
|
75
75
|
onZoomChange,
|
|
76
76
|
apiRef,
|
|
77
77
|
plugins: BAR_CHART_PREMIUM_PLUGINS
|
|
78
|
-
})
|
|
78
|
+
}));
|
|
79
79
|
const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
|
|
80
80
|
const Toolbar = props.slots?.toolbar ?? ChartsToolbarPro;
|
|
81
81
|
return /*#__PURE__*/_jsx(ChartDataProviderPremium, _extends({}, chartDataProviderProProps, {
|
|
82
82
|
children: /*#__PURE__*/_jsxs(ChartsWrapper, _extends({}, chartsWrapperProps, {
|
|
83
|
+
ref: ref,
|
|
83
84
|
children: [showToolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, props.slotProps?.toolbar)) : null, !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
84
85
|
children: [/*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsxs("g", _extends({}, clipPathGroupProps, {
|
|
85
86
|
children: [/*#__PURE__*/_jsx(BarPlot, _extends({}, barPlotProps)), /*#__PURE__*/_jsx(RangeBarPlot, _extends({}, rangeBarPlotProps)), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), /*#__PURE__*/_jsx(FocusedBar, {}), /*#__PURE__*/_jsx(FocusedRangeBar, {})]
|
|
@@ -190,8 +191,8 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
190
191
|
*/
|
|
191
192
|
hiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
192
193
|
dataIndex: PropTypes.number,
|
|
193
|
-
seriesId: PropTypes.string,
|
|
194
|
-
type: PropTypes.oneOf(['bar'])
|
|
194
|
+
seriesId: PropTypes.string.isRequired,
|
|
195
|
+
type: PropTypes.oneOf(['bar'])
|
|
195
196
|
})),
|
|
196
197
|
/**
|
|
197
198
|
* If `true`, the legend is not rendered.
|
|
@@ -241,8 +242,8 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
241
242
|
*/
|
|
242
243
|
initialHiddenItems: PropTypes.arrayOf(PropTypes.shape({
|
|
243
244
|
dataIndex: PropTypes.number,
|
|
244
|
-
seriesId: PropTypes.string,
|
|
245
|
-
type: PropTypes.oneOf(['bar'])
|
|
245
|
+
seriesId: PropTypes.string.isRequired,
|
|
246
|
+
type: PropTypes.oneOf(['bar'])
|
|
246
247
|
})),
|
|
247
248
|
/**
|
|
248
249
|
* The list of zoom data related to each axis.
|
|
@@ -311,6 +312,14 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
311
312
|
* @param {BarItemIdentifier | RangeBarItemIdentifier} itemIdentifier The item identifier.
|
|
312
313
|
*/
|
|
313
314
|
onItemClick: PropTypes.func,
|
|
315
|
+
/**
|
|
316
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
317
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
318
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
319
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
320
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
321
|
+
*/
|
|
322
|
+
onTooltipAxisChange: PropTypes.func,
|
|
314
323
|
/**
|
|
315
324
|
* The callback fired when the tooltip item changes.
|
|
316
325
|
*
|
|
@@ -360,6 +369,14 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
360
369
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
361
370
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
362
371
|
title: PropTypes.string,
|
|
372
|
+
/**
|
|
373
|
+
* The controlled axis tooltip.
|
|
374
|
+
* Identified by the axis id, and data index.
|
|
375
|
+
*/
|
|
376
|
+
tooltipAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
377
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
378
|
+
dataIndex: PropTypes.number.isRequired
|
|
379
|
+
})),
|
|
363
380
|
/**
|
|
364
381
|
* The tooltip item.
|
|
365
382
|
* Used when the tooltip is controlled.
|
|
@@ -367,7 +384,7 @@ process.env.NODE_ENV !== "production" ? BarChartPremium.propTypes = {
|
|
|
367
384
|
tooltipItem: PropTypes.shape({
|
|
368
385
|
dataIndex: PropTypes.number.isRequired,
|
|
369
386
|
seriesId: PropTypes.string.isRequired,
|
|
370
|
-
type: PropTypes.oneOf(['bar'])
|
|
387
|
+
type: PropTypes.oneOf(['bar'])
|
|
371
388
|
}),
|
|
372
389
|
/**
|
|
373
390
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const keyboardFocusHandler =
|
|
3
|
-
switch (event.key) {
|
|
4
|
-
case 'ArrowRight':
|
|
5
|
-
return createGetNextIndexFocusedItem(composableCartesianSeriesTypes);
|
|
6
|
-
case 'ArrowLeft':
|
|
7
|
-
return createGetPreviousIndexFocusedItem(composableCartesianSeriesTypes);
|
|
8
|
-
case 'ArrowDown':
|
|
9
|
-
return createGetPreviousSeriesFocusedItem(composableCartesianSeriesTypes);
|
|
10
|
-
case 'ArrowUp':
|
|
11
|
-
return createGetNextSeriesFocusedItem(composableCartesianSeriesTypes);
|
|
12
|
-
default:
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
1
|
+
import { composableCartesianSeriesTypes, createCommonKeyboardFocusHandler } from '@mui/x-charts/internals';
|
|
2
|
+
const keyboardFocusHandler = createCommonKeyboardFocusHandler(composableCartesianSeriesTypes);
|
|
16
3
|
export default keyboardFocusHandler;
|
|
@@ -12,7 +12,7 @@ import { rangeBarSeriesConfig } from "../BarChartPremium/RangeBar/seriesConfig/i
|
|
|
12
12
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
13
13
|
import { useChartDataProviderPremiumProps } from "./useChartDataProviderPremiumProps.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const releaseInfo = "
|
|
15
|
+
const releaseInfo = "MTc3MjA2NDAwMDAwMA==";
|
|
16
16
|
const packageIdentifier = 'x-charts-premium';
|
|
17
17
|
export const defaultSeriesConfigPremium = _extends({}, defaultSeriesConfigPro, {
|
|
18
18
|
rangeBar: rangeBarSeriesConfig
|
|
@@ -35,9 +35,10 @@ const ChartsContainerPremium = /*#__PURE__*/React.forwardRef(function ChartsCont
|
|
|
35
35
|
chartDataProviderPremiumProps,
|
|
36
36
|
children,
|
|
37
37
|
chartsSurfaceProps
|
|
38
|
-
} = useChartsContainerPremiumProps(props
|
|
38
|
+
} = useChartsContainerPremiumProps(props);
|
|
39
39
|
return /*#__PURE__*/_jsx(ChartDataProviderPremium, _extends({}, chartDataProviderPremiumProps, {
|
|
40
40
|
children: /*#__PURE__*/_jsx(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
41
|
+
ref: ref,
|
|
41
42
|
children: children
|
|
42
43
|
}))
|
|
43
44
|
}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
1
|
import { type ChartAnyPluginSignature, type ChartSeriesType, type UseChartsContainerPropsReturnValue } from '@mui/x-charts/internals';
|
|
3
2
|
import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
|
|
4
3
|
import type { ChartsContainerPremiumProps } from "./ChartsContainerPremium.js";
|
|
@@ -6,4 +5,4 @@ import type { ChartDataProviderPremiumProps } from "../ChartDataProviderPremium/
|
|
|
6
5
|
export type UseChartsContainerPremiumPropsReturnValue<TSeries extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = Pick<UseChartsContainerPropsReturnValue<TSeries, TSignatures>, 'chartsSurfaceProps' | 'children'> & {
|
|
7
6
|
chartDataProviderPremiumProps: ChartDataProviderPremiumProps<TSeries, TSignatures>;
|
|
8
7
|
};
|
|
9
|
-
export declare function useChartsContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures
|
|
8
|
+
export declare function useChartsContainerPremiumProps<TSeries extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = AllPluginSignatures<TSeries>>(props: ChartsContainerPremiumProps<TSeries, TSignatures>): UseChartsContainerPremiumPropsReturnValue<TSeries, TSignatures>;
|
|
@@ -5,7 +5,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
5
5
|
const _excluded = ["initialZoom", "zoomData", "onZoomChange", "zoomInteractionConfig", "plugins", "apiRef"];
|
|
6
6
|
import { useChartsContainerProProps } from '@mui/x-charts-pro/internals';
|
|
7
7
|
import { DEFAULT_PLUGINS } from "../internals/plugins/allPlugins.js";
|
|
8
|
-
export function useChartsContainerPremiumProps(props
|
|
8
|
+
export function useChartsContainerPremiumProps(props) {
|
|
9
9
|
const _ref = props,
|
|
10
10
|
{
|
|
11
11
|
plugins
|
|
@@ -15,7 +15,7 @@ export function useChartsContainerPremiumProps(props, ref) {
|
|
|
15
15
|
chartDataProviderProProps,
|
|
16
16
|
chartsSurfaceProps,
|
|
17
17
|
children
|
|
18
|
-
} = useChartsContainerProProps(baseProps
|
|
18
|
+
} = useChartsContainerProProps(baseProps);
|
|
19
19
|
const chartDataProviderPremiumProps = _extends({}, chartDataProviderProProps, {
|
|
20
20
|
plugins: plugins ?? DEFAULT_PLUGINS
|
|
21
21
|
});
|
|
@@ -169,9 +169,17 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
|
|
|
169
169
|
* The callback fired when an item is clicked.
|
|
170
170
|
*
|
|
171
171
|
* @param {React.MouseEvent<SVGSVGElement, MouseEvent>} event The click event.
|
|
172
|
-
* @param {
|
|
172
|
+
* @param {SeriesItemIdentifierWithType<SeriesType>} item The clicked item.
|
|
173
173
|
*/
|
|
174
174
|
onItemClick: PropTypes.func,
|
|
175
|
+
/**
|
|
176
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
177
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
178
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
179
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
180
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
181
|
+
*/
|
|
182
|
+
onTooltipAxisChange: PropTypes.func,
|
|
175
183
|
/**
|
|
176
184
|
* The callback fired when the tooltip item changes.
|
|
177
185
|
*
|
|
@@ -219,6 +227,14 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
|
|
|
219
227
|
* @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
|
|
220
228
|
*/
|
|
221
229
|
tooltip: PropTypes.object,
|
|
230
|
+
/**
|
|
231
|
+
* The controlled axis tooltip.
|
|
232
|
+
* Identified by the axis id, and data index.
|
|
233
|
+
*/
|
|
234
|
+
tooltipAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
235
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
236
|
+
dataIndex: PropTypes.number.isRequired
|
|
237
|
+
})),
|
|
222
238
|
/**
|
|
223
239
|
* The tooltip item.
|
|
224
240
|
* Used when the tooltip is controlled.
|
|
@@ -226,7 +242,7 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
|
|
|
226
242
|
tooltipItem: PropTypes.shape({
|
|
227
243
|
dataIndex: PropTypes.number,
|
|
228
244
|
seriesId: PropTypes.string.isRequired,
|
|
229
|
-
type: PropTypes.oneOf(['heatmap'])
|
|
245
|
+
type: PropTypes.oneOf(['heatmap']),
|
|
230
246
|
xIndex: PropTypes.number.isRequired,
|
|
231
247
|
yIndex: PropTypes.number.isRequired
|
|
232
248
|
}),
|
package/esm/index.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts-premium",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.1",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Premium plan edition of the MUI X Charts components.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@mui/utils": "^7.3.7",
|
|
32
32
|
"clsx": "^2.1.1",
|
|
33
33
|
"prop-types": "^15.8.1",
|
|
34
|
-
"@mui/x-charts": "9.0.0-alpha.
|
|
35
|
-
"@mui/x-charts-pro": "9.0.0-alpha.0",
|
|
34
|
+
"@mui/x-charts": "9.0.0-alpha.1",
|
|
36
35
|
"@mui/x-internals": "9.0.0-alpha.0",
|
|
37
|
-
"@mui/x-charts-
|
|
38
|
-
"@mui/x-license": "9.0.0-alpha.0"
|
|
36
|
+
"@mui/x-charts-pro": "9.0.0-alpha.1",
|
|
37
|
+
"@mui/x-license": "9.0.0-alpha.0",
|
|
38
|
+
"@mui/x-charts-vendor": "9.0.0-alpha.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@emotion/react": "^11.9.0",
|
|
@@ -60,11 +60,13 @@
|
|
|
60
60
|
"node": ">=14.0.0"
|
|
61
61
|
},
|
|
62
62
|
"type": "commonjs",
|
|
63
|
-
"main": "./index.js",
|
|
64
|
-
"types": "./index.d.ts",
|
|
65
63
|
"exports": {
|
|
66
64
|
"./package.json": "./package.json",
|
|
67
65
|
".": {
|
|
66
|
+
"import": {
|
|
67
|
+
"types": "./esm/index.d.ts",
|
|
68
|
+
"default": "./esm/index.js"
|
|
69
|
+
},
|
|
68
70
|
"require": {
|
|
69
71
|
"types": "./index.d.ts",
|
|
70
72
|
"default": "./index.js"
|
|
@@ -75,6 +77,10 @@
|
|
|
75
77
|
}
|
|
76
78
|
},
|
|
77
79
|
"./*": {
|
|
80
|
+
"import": {
|
|
81
|
+
"types": "./esm/*/index.d.ts",
|
|
82
|
+
"default": "./esm/*/index.js"
|
|
83
|
+
},
|
|
78
84
|
"require": {
|
|
79
85
|
"types": "./*/index.d.ts",
|
|
80
86
|
"default": "./*/index.js"
|
|
@@ -85,6 +91,10 @@
|
|
|
85
91
|
}
|
|
86
92
|
},
|
|
87
93
|
"./moduleAugmentation/*": {
|
|
94
|
+
"import": {
|
|
95
|
+
"types": "./esm/moduleAugmentation/*.d.ts",
|
|
96
|
+
"default": "./esm/moduleAugmentation/*.js"
|
|
97
|
+
},
|
|
88
98
|
"require": {
|
|
89
99
|
"types": "./moduleAugmentation/*.d.ts",
|
|
90
100
|
"default": "./moduleAugmentation/*.js"
|
|
@@ -95,5 +105,7 @@
|
|
|
95
105
|
}
|
|
96
106
|
},
|
|
97
107
|
"./esm": null
|
|
98
|
-
}
|
|
108
|
+
},
|
|
109
|
+
"main": "./index.js",
|
|
110
|
+
"types": "./index.d.ts"
|
|
99
111
|
}
|