@mui/x-charts 9.3.0 → 9.4.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/BarChart/BarElement.d.mts +3 -2
- package/BarChart/BarElement.d.ts +3 -2
- package/BarChart/BarLabel/BarLabelItem.d.mts +3 -2
- package/BarChart/BarLabel/BarLabelItem.d.ts +3 -2
- package/BarChart/seriesConfig/bar/extremums.js +7 -2
- package/BarChart/seriesConfig/bar/extremums.mjs +7 -2
- package/CHANGELOG.md +196 -0
- package/ChartsContainer/ChartsContainer.js +21 -0
- package/ChartsContainer/ChartsContainer.mjs +21 -0
- package/ChartsLabel/ChartsLabelMark.js +1 -21
- package/ChartsLabel/ChartsLabelMark.mjs +0 -20
- package/ChartsLegend/chartsLegend.types.d.mts +3 -2
- package/ChartsLegend/chartsLegend.types.d.ts +3 -2
- package/ChartsLegend/piecewiseColorLegendClasses.js +8 -2
- package/ChartsLegend/piecewiseColorLegendClasses.mjs +8 -2
- package/ChartsOverlay/ChartsOverlay.d.mts +5 -4
- package/ChartsOverlay/ChartsOverlay.d.ts +5 -4
- package/ChartsReferenceLine/ChartsXReferenceLine.js +6 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.mjs +6 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.js +5 -0
- package/ChartsReferenceLine/ChartsYReferenceLine.mjs +5 -0
- package/ChartsTooltip/ChartTooltip.types.d.mts +3 -2
- package/ChartsTooltip/ChartTooltip.types.d.ts +3 -2
- package/ChartsTooltip/useAxesTooltip.js +2 -2
- package/ChartsTooltip/useAxesTooltip.mjs +2 -2
- package/ChartsTooltip/useItemTooltip.js +2 -2
- package/ChartsTooltip/useItemTooltip.mjs +2 -2
- package/ChartsXAxis/useAxisTicksProps.d.mts +84 -3
- package/ChartsXAxis/useAxisTicksProps.d.ts +84 -3
- package/ChartsYAxis/useAxisTicksProps.d.mts +84 -3
- package/ChartsYAxis/useAxisTicksProps.d.ts +84 -3
- package/LineChart/AreaElement.d.mts +3 -2
- package/LineChart/AreaElement.d.ts +3 -2
- package/LineChart/LineElement.d.mts +3 -2
- package/LineChart/LineElement.d.ts +3 -2
- package/LineChart/LineHighlightPlot.d.mts +3 -2
- package/LineChart/LineHighlightPlot.d.ts +3 -2
- package/LineChart/LineHighlightPlot.js +65 -45
- package/LineChart/LineHighlightPlot.mjs +65 -45
- package/LineChart/MarkPlot.d.mts +3 -2
- package/LineChart/MarkPlot.d.ts +3 -2
- package/LineChart/seriesConfig/curveEvaluation.js +28 -14
- package/LineChart/seriesConfig/curveEvaluation.mjs +27 -14
- package/LineChart/seriesConfig/extremums.js +5 -1
- package/LineChart/seriesConfig/extremums.mjs +5 -1
- package/LineChart/useMarkPlotData.js +3 -1
- package/LineChart/useMarkPlotData.mjs +3 -1
- package/PieChart/PieArcLabelPlot.d.mts +3 -2
- package/PieChart/PieArcLabelPlot.d.ts +3 -2
- package/PieChart/PieArcPlot.d.mts +3 -2
- package/PieChart/PieArcPlot.d.ts +3 -2
- package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +2 -2
- package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
- package/ScatterChart/BatchScatter.d.mts +2 -8
- package/ScatterChart/BatchScatter.d.ts +2 -8
- package/ScatterChart/BatchScatter.js +17 -12
- package/ScatterChart/BatchScatter.mjs +17 -12
- package/ScatterChart/FocusedScatterMark.js +2 -2
- package/ScatterChart/FocusedScatterMark.mjs +2 -2
- package/ScatterChart/HighlightedScatterMark.js +3 -3
- package/ScatterChart/HighlightedScatterMark.mjs +3 -3
- package/ScatterChart/Scatter.d.mts +5 -0
- package/ScatterChart/Scatter.d.ts +5 -0
- package/ScatterChart/Scatter.js +7 -2
- package/ScatterChart/Scatter.mjs +7 -2
- package/ScatterChart/ScatterChart.d.mts +2 -1
- package/ScatterChart/ScatterChart.d.ts +2 -1
- package/ScatterChart/ScatterChart.js +21 -0
- package/ScatterChart/ScatterChart.mjs +21 -0
- package/ScatterChart/ScatterMarker.types.d.mts +3 -2
- package/ScatterChart/ScatterMarker.types.d.ts +3 -2
- package/ScatterChart/ScatterPlot.d.mts +3 -2
- package/ScatterChart/ScatterPlot.d.ts +3 -2
- package/ScatterChart/ScatterPlot.js +6 -1
- package/ScatterChart/ScatterPlot.mjs +6 -1
- package/ScatterChart/seriesConfig/extremums.js +6 -0
- package/ScatterChart/seriesConfig/extremums.mjs +6 -0
- package/ScatterChart/seriesConfig/getColor.js +1 -1
- package/ScatterChart/seriesConfig/getColor.mjs +1 -1
- package/ScatterChart/seriesConfig/getMarkerSize.d.mts +18 -0
- package/ScatterChart/seriesConfig/getMarkerSize.d.ts +18 -0
- package/ScatterChart/seriesConfig/getMarkerSize.js +43 -0
- package/ScatterChart/seriesConfig/getMarkerSize.mjs +37 -0
- package/ScatterChart/seriesConfig/seriesProcessor.js +23 -8
- package/ScatterChart/seriesConfig/seriesProcessor.mjs +23 -8
- package/ScatterChart/useScatterItemPosition.d.mts +4 -0
- package/ScatterChart/useScatterItemPosition.d.ts +4 -0
- package/ScatterChart/useScatterItemPosition.js +9 -0
- package/ScatterChart/useScatterItemPosition.mjs +8 -0
- package/Toolbar/Toolbar.types.d.mts +3 -2
- package/Toolbar/Toolbar.types.d.ts +3 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/animation/animation.d.mts +1 -2
- package/internals/animation/animation.d.ts +1 -2
- package/internals/commonNextFocusItem.d.mts +10 -2
- package/internals/commonNextFocusItem.d.ts +10 -2
- package/internals/commonNextFocusItem.js +12 -4
- package/internals/commonNextFocusItem.mjs +12 -4
- package/internals/createCommonKeyboardFocusHandler.d.mts +1 -1
- package/internals/createCommonKeyboardFocusHandler.d.ts +1 -1
- package/internals/createCommonKeyboardFocusHandler.js +3 -3
- package/internals/createCommonKeyboardFocusHandler.mjs +3 -3
- package/internals/incompleteDatasetKeysError.d.mts +1 -0
- package/internals/incompleteDatasetKeysError.d.ts +1 -0
- package/internals/incompleteDatasetKeysError.js +11 -0
- package/internals/incompleteDatasetKeysError.mjs +4 -0
- package/internals/index.d.mts +2 -0
- package/internals/index.d.ts +2 -0
- package/internals/index.js +24 -0
- package/internals/index.mjs +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createZoomLookup.mjs +4 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.mts +10 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.d.ts +10 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +18 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.mjs +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +24 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +24 -5
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +46 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.mjs +47 -2
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +46 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +46 -11
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +2 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +3 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +3 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.mts +4 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +4 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +3 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.mjs +1 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +5 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +7 -5
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +17 -3
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +17 -3
- package/internals/sizeScale.d.mts +6 -0
- package/internals/sizeScale.d.ts +6 -0
- package/internals/sizeScale.js +46 -0
- package/internals/sizeScale.mjs +38 -0
- package/models/axis.d.mts +18 -12
- package/models/axis.d.ts +18 -12
- package/models/chartsSlotsComponentsProps.d.mts +25 -0
- package/models/chartsSlotsComponentsProps.d.ts +25 -0
- package/models/chartsSlotsComponentsProps.js +5 -0
- package/models/chartsSlotsComponentsProps.mjs +1 -0
- package/models/index.d.mts +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +11 -0
- package/models/index.mjs +1 -0
- package/models/seriesType/line.d.mts +5 -2
- package/models/seriesType/line.d.ts +5 -2
- package/models/seriesType/scatter.d.mts +34 -2
- package/models/seriesType/scatter.d.ts +34 -2
- package/models/sizeMapping.d.mts +64 -0
- package/models/sizeMapping.d.ts +64 -0
- package/models/sizeMapping.js +5 -0
- package/models/sizeMapping.mjs +1 -0
- package/models/slots/chartsBaseSlots.d.mts +6 -5
- package/models/slots/chartsBaseSlots.d.ts +6 -5
- package/models/z-axis.d.mts +10 -1
- package/models/z-axis.d.ts +10 -1
- package/package.json +6 -6
|
@@ -2,15 +2,16 @@ import * as React from 'react';
|
|
|
2
2
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
3
|
import { type BarElementOwnerState } from "./barClasses.mjs";
|
|
4
4
|
import { type BarProps } from "./AnimatedBarElement.mjs";
|
|
5
|
+
import type { BarPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
5
6
|
export interface BarElementSlots {
|
|
6
7
|
/**
|
|
7
8
|
* The component that renders the bar.
|
|
8
9
|
* @default BarElementPath
|
|
9
10
|
*/
|
|
10
|
-
bar?: React.JSXElementConstructor<BarProps>;
|
|
11
|
+
bar?: React.JSXElementConstructor<BarProps & BarPropsOverrides>;
|
|
11
12
|
}
|
|
12
13
|
export interface BarElementSlotProps {
|
|
13
|
-
bar?: SlotComponentPropsFromProps<BarProps,
|
|
14
|
+
bar?: SlotComponentPropsFromProps<BarProps, BarPropsOverrides, BarElementOwnerState>;
|
|
14
15
|
}
|
|
15
16
|
export type BarElementProps = Omit<BarElementOwnerState, 'isFaded' | 'isHighlighted' | 'isFocused'> & Omit<React.SVGProps<SVGRectElement>, 'ref'> & {
|
|
16
17
|
/**
|
package/BarChart/BarElement.d.ts
CHANGED
|
@@ -2,15 +2,16 @@ import * as React from 'react';
|
|
|
2
2
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
3
3
|
import { type BarElementOwnerState } from "./barClasses.js";
|
|
4
4
|
import { type BarProps } from "./AnimatedBarElement.js";
|
|
5
|
+
import type { BarPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
5
6
|
export interface BarElementSlots {
|
|
6
7
|
/**
|
|
7
8
|
* The component that renders the bar.
|
|
8
9
|
* @default BarElementPath
|
|
9
10
|
*/
|
|
10
|
-
bar?: React.JSXElementConstructor<BarProps>;
|
|
11
|
+
bar?: React.JSXElementConstructor<BarProps & BarPropsOverrides>;
|
|
11
12
|
}
|
|
12
13
|
export interface BarElementSlotProps {
|
|
13
|
-
bar?: SlotComponentPropsFromProps<BarProps,
|
|
14
|
+
bar?: SlotComponentPropsFromProps<BarProps, BarPropsOverrides, BarElementOwnerState>;
|
|
14
15
|
}
|
|
15
16
|
export type BarElementProps = Omit<BarElementOwnerState, 'isFaded' | 'isHighlighted' | 'isFocused'> & Omit<React.SVGProps<SVGRectElement>, 'ref'> & {
|
|
16
17
|
/**
|
|
@@ -3,15 +3,16 @@ import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
|
3
3
|
import { type BarLabelOwnerState, type BarItem, type BarLabelContext } from "./BarLabel.types.mjs";
|
|
4
4
|
import { type BarLabelProps } from "./BarLabel.mjs";
|
|
5
5
|
import { type BarValueType } from "../../models/index.mjs";
|
|
6
|
+
import type { BarLabelPropsOverrides } from "../../models/chartsSlotsComponentsProps.mjs";
|
|
6
7
|
export interface BarLabelSlots {
|
|
7
8
|
/**
|
|
8
9
|
* The component that renders the bar label.
|
|
9
10
|
* @default BarLabel
|
|
10
11
|
*/
|
|
11
|
-
barLabel?: React.JSXElementConstructor<BarLabelProps>;
|
|
12
|
+
barLabel?: React.JSXElementConstructor<BarLabelProps & BarLabelPropsOverrides>;
|
|
12
13
|
}
|
|
13
14
|
export interface BarLabelSlotProps {
|
|
14
|
-
barLabel?: SlotComponentPropsFromProps<BarLabelProps,
|
|
15
|
+
barLabel?: SlotComponentPropsFromProps<BarLabelProps, BarLabelPropsOverrides, BarLabelOwnerState>;
|
|
15
16
|
}
|
|
16
17
|
export type BarLabelItemProps<V extends BarValueType | null> = Omit<BarLabelOwnerState, 'isFaded' | 'isHighlighted'> & Pick<BarLabelProps, 'style'> & {
|
|
17
18
|
/**
|
|
@@ -3,15 +3,16 @@ import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
|
3
3
|
import { type BarLabelOwnerState, type BarItem, type BarLabelContext } from "./BarLabel.types.js";
|
|
4
4
|
import { type BarLabelProps } from "./BarLabel.js";
|
|
5
5
|
import { type BarValueType } from "../../models/index.js";
|
|
6
|
+
import type { BarLabelPropsOverrides } from "../../models/chartsSlotsComponentsProps.js";
|
|
6
7
|
export interface BarLabelSlots {
|
|
7
8
|
/**
|
|
8
9
|
* The component that renders the bar label.
|
|
9
10
|
* @default BarLabel
|
|
10
11
|
*/
|
|
11
|
-
barLabel?: React.JSXElementConstructor<BarLabelProps>;
|
|
12
|
+
barLabel?: React.JSXElementConstructor<BarLabelProps & BarLabelPropsOverrides>;
|
|
12
13
|
}
|
|
13
14
|
export interface BarLabelSlotProps {
|
|
14
|
-
barLabel?: SlotComponentPropsFromProps<BarLabelProps,
|
|
15
|
+
barLabel?: SlotComponentPropsFromProps<BarLabelProps, BarLabelPropsOverrides, BarLabelOwnerState>;
|
|
15
16
|
}
|
|
16
17
|
export type BarLabelItemProps<V extends BarValueType | null> = Omit<BarLabelOwnerState, 'isFaded' | 'isHighlighted'> & Pick<BarLabelProps, 'style'> & {
|
|
17
18
|
/**
|
|
@@ -42,10 +42,14 @@ const getValueExtremum = direction => params => {
|
|
|
42
42
|
} = params;
|
|
43
43
|
return Object.keys(series).filter(seriesId => {
|
|
44
44
|
const axisId = direction === 'x' ? series[seriesId].xAxisId : series[seriesId].yAxisId;
|
|
45
|
+
if (axis.domainSeries === 'visible' && series[seriesId].hidden) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
45
48
|
return axisId === axis.id || isDefaultAxis && axisId === undefined;
|
|
46
49
|
}).reduce((acc, seriesId) => {
|
|
47
50
|
const {
|
|
48
|
-
stackedData
|
|
51
|
+
stackedData,
|
|
52
|
+
visibleStackedData
|
|
49
53
|
} = series[seriesId];
|
|
50
54
|
const filter = getFilters?.({
|
|
51
55
|
currentAxisId: axis.id,
|
|
@@ -53,7 +57,8 @@ const getValueExtremum = direction => params => {
|
|
|
53
57
|
seriesXAxisId: series[seriesId].xAxisId,
|
|
54
58
|
seriesYAxisId: series[seriesId].yAxisId
|
|
55
59
|
});
|
|
56
|
-
const
|
|
60
|
+
const stackedDataToUse = axis.domainSeries === 'visible' ? visibleStackedData : stackedData;
|
|
61
|
+
const [seriesMin, seriesMax] = stackedDataToUse?.reduce((seriesAcc, values, index) => {
|
|
57
62
|
if (filter && (!filter(createResult(values[0], direction), index) || !filter(createResult(values[1], direction), index))) {
|
|
58
63
|
return seriesAcc;
|
|
59
64
|
}
|
|
@@ -36,10 +36,14 @@ const getValueExtremum = direction => params => {
|
|
|
36
36
|
} = params;
|
|
37
37
|
return Object.keys(series).filter(seriesId => {
|
|
38
38
|
const axisId = direction === 'x' ? series[seriesId].xAxisId : series[seriesId].yAxisId;
|
|
39
|
+
if (axis.domainSeries === 'visible' && series[seriesId].hidden) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
39
42
|
return axisId === axis.id || isDefaultAxis && axisId === undefined;
|
|
40
43
|
}).reduce((acc, seriesId) => {
|
|
41
44
|
const {
|
|
42
|
-
stackedData
|
|
45
|
+
stackedData,
|
|
46
|
+
visibleStackedData
|
|
43
47
|
} = series[seriesId];
|
|
44
48
|
const filter = getFilters?.({
|
|
45
49
|
currentAxisId: axis.id,
|
|
@@ -47,7 +51,8 @@ const getValueExtremum = direction => params => {
|
|
|
47
51
|
seriesXAxisId: series[seriesId].xAxisId,
|
|
48
52
|
seriesYAxisId: series[seriesId].yAxisId
|
|
49
53
|
});
|
|
50
|
-
const
|
|
54
|
+
const stackedDataToUse = axis.domainSeries === 'visible' ? visibleStackedData : stackedData;
|
|
55
|
+
const [seriesMin, seriesMax] = stackedDataToUse?.reduce((seriesAcc, values, index) => {
|
|
51
56
|
if (filter && (!filter(createResult(values[0], direction), index) || !filter(createResult(values[1], direction), index))) {
|
|
52
57
|
return seriesAcc;
|
|
53
58
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,201 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.4.0
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v9.3.0..master -->
|
|
6
|
+
|
|
7
|
+
_Jun 4, 2026_
|
|
8
|
+
|
|
9
|
+
We'd like to extend a big thank you to the 21 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- 🎉 Scheduler is now in Beta shipping with Timeline vitualization and lazy loading
|
|
12
|
+
- 📆 Implement Event Timeline virtualization (#22339)
|
|
13
|
+
- 🫧 Introduce bubble charts (#22537)
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
18
|
+
@imxv, @mixelburg, @mustafajw07
|
|
19
|
+
|
|
20
|
+
The following team members contributed to this release:
|
|
21
|
+
@aemartos, @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @joserodolfofreitas, @LukasTy, @MBilalShafi, @michelengelen, @mj12albert, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@9.4.0`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Fix `avg` aggregation when the average is zero (#22652) @mj12albert
|
|
28
|
+
- [DataGrid] Inherit icon `fontSize` from `baseIconButton` size (#22187) @imxv
|
|
29
|
+
- [DataGrid] Fix `noRowsOverlay` flicker between `dataSource` re-fetches (#22465) @LukasTy
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@9.4.0`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@9.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
> This release includes a version bump of the `@mui/x-internal-exceljs-fork` package to address the vulnerable dependencies.
|
|
38
|
+
> The following CVEs are fixed:
|
|
39
|
+
>
|
|
40
|
+
> - <https://github.com/advisories/GHSA-ph9p-34f9-6g65>
|
|
41
|
+
> - <https://github.com/isaacs/minimatch/security/advisories/GHSA-23c5-xmqv-rm74>
|
|
42
|
+
> - <https://github.com/advisories/GHSA-w5hq-g745-h8pq>
|
|
43
|
+
>
|
|
44
|
+
> To make this security update possible, we bumped the `node` version requirement from `>=14.0.0` to `>=14.17.0`.
|
|
45
|
+
> [Node.js 14.17.0](https://nodejs.org/en/blog/release/v14.17.0) was released in May 2021, so we consider it safe to bump the requirement without causing issues for our users.
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-data-grid-pro@9.4.0`, plus:
|
|
48
|
+
|
|
49
|
+
- [DataGridPremium] Nested Lazy Loading (#21043) @MBilalShafi
|
|
50
|
+
- [DataGridPremium] Update exceljs fork (#22658) @cherniavskii
|
|
51
|
+
|
|
52
|
+
### Date and Time Pickers
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-pickers@9.4.0`
|
|
55
|
+
|
|
56
|
+
Internal changes.
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-date-pickers-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
59
|
+
|
|
60
|
+
Same changes as in `@mui/x-date-pickers@9.4.0`.
|
|
61
|
+
|
|
62
|
+
### Charts
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-charts@9.4.0`
|
|
65
|
+
|
|
66
|
+
- [charts] Add functionality to hide elements during chart export (#22525) @sai6855
|
|
67
|
+
- [charts] Add option to show marks only on the first/last values (#22645) @alexfauquette
|
|
68
|
+
- [charts] Add text customization section and demo for axis labels (#22597) @sai6855
|
|
69
|
+
- [charts] Allow axes to scale according to the visible series only (#22566) @alexfauquette
|
|
70
|
+
- [charts] Correctly handle different identifiers for each series (#22556) @sai6855
|
|
71
|
+
- [charts] Fix inverted Y axis zoom/pan on ordinal scales (#22654) @JCQuintas
|
|
72
|
+
- [charts] Introduce bubble charts (#22537) @alexfauquette
|
|
73
|
+
- [charts] Let scatter chart tooltip ignore hidden series (#22614) @alexfauquette
|
|
74
|
+
- [charts] Make `'sqrt'` size mapping the default (#22683) @alexfauquette
|
|
75
|
+
- [charts] Remove unused proptypes (#22618) @alexfauquette
|
|
76
|
+
- [charts] Support module augmentation for slots (#22519) @sai6855
|
|
77
|
+
- [charts] Support multiple marker size in `findClosestPoint` (#22622) @alexfauquette
|
|
78
|
+
- [charts] Upgrade bezier-easing to v3 and use it for line chart hit-detection (#22608) @sai6855
|
|
79
|
+
- [charts] Use `useLayoutEffect` with `ResizeObserver` (#22646) @JCQuintas
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-charts-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-charts@9.4.0`, plus:
|
|
84
|
+
|
|
85
|
+
- [charts-pro] Auto-select range button matching current zoom (#22137) @JCQuintas
|
|
86
|
+
- [charts-pro] Support range values in `initialZoom` (#22563) @JCQuintas
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-charts-premium@9.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
89
|
+
|
|
90
|
+
Same changes as in `@mui/x-charts-pro@9.4.0`, plus:
|
|
91
|
+
|
|
92
|
+
- [charts-premium] Support range-bar series in WebGL bar renderer (#22607) @JCQuintas
|
|
93
|
+
- [charts-premium] Fix `onAxisClick` for radial bar and lines (#22522) @alexfauquette
|
|
94
|
+
|
|
95
|
+
### Tree View
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-tree-view@9.4.0`
|
|
98
|
+
|
|
99
|
+
Internal changes.
|
|
100
|
+
|
|
101
|
+
#### `@mui/x-tree-view-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
102
|
+
|
|
103
|
+
Same changes as in `@mui/x-tree-view@9.4.0`.
|
|
104
|
+
|
|
105
|
+
### Scheduler
|
|
106
|
+
|
|
107
|
+
#### Breaking changes
|
|
108
|
+
|
|
109
|
+
The theme `styleOverrides` slots for the skeleton and the error container were
|
|
110
|
+
renamed and unified. The CSS utility class names (for example
|
|
111
|
+
`.MuiEventCalendar-eventSkeleton`) are **not** affected — only
|
|
112
|
+
`theme.components.*` overrides need updating.
|
|
113
|
+
|
|
114
|
+
**Event skeleton**
|
|
115
|
+
|
|
116
|
+
| Before | After |
|
|
117
|
+
| --------------------------------------- | ------------------------------ |
|
|
118
|
+
| `MuiEventCalendar` slot `EventSkeleton` | `MuiEventSkeleton` slot `Root` |
|
|
119
|
+
| `MuiEventTimeline` slot `EventSkeleton` | `MuiEventSkeleton` slot `Root` |
|
|
120
|
+
|
|
121
|
+
**Error container**
|
|
122
|
+
|
|
123
|
+
| Before | After |
|
|
124
|
+
| ------------------------------------------------------------- | --------------------------------------- |
|
|
125
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorContainer` | `MuiEventErrorContainer` slot `Root` |
|
|
126
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorAlert` | `MuiEventErrorContainer` slot `Alert` |
|
|
127
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorMessage` | `MuiEventErrorContainer` slot `Message` |
|
|
128
|
+
|
|
129
|
+
If you customized these through the theme, update the component name and slot
|
|
130
|
+
names accordingly:
|
|
131
|
+
|
|
132
|
+
```diff
|
|
133
|
+
components: {
|
|
134
|
+
- MuiEventCalendar: {
|
|
135
|
+
+ MuiEventSkeleton: {
|
|
136
|
+
styleOverrides: {
|
|
137
|
+
- EventSkeleton: { /* ... */ },
|
|
138
|
+
+ Root: { /* ... */ },
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-scheduler@9.0.0-beta.0`
|
|
146
|
+
|
|
147
|
+
- [scheduler] Add a prop to control whether the resource of an event can be cleared (#22464) @rita-codes
|
|
148
|
+
- [scheduler] Add week number labels to agenda, day and week views (#22594) @mustafajw07
|
|
149
|
+
- [scheduler] Add `weekStartsOn` preference and update date functions to support custom week start (#22426) @mustafajw07
|
|
150
|
+
- [scheduler] Export premium version of the standalone views (#22621) @flaviendelangle
|
|
151
|
+
- [scheduler] Implement timeline virtualization (#22339) @romgrk
|
|
152
|
+
- [scheduler] Split scheduler overview (#22453) @joserodolfofreitas
|
|
153
|
+
- [scheduler] Unify `EventSkeleton` and `ErrorContainer` between `EventCalendar` and `EventTimeline` (#22676) @noraleonte
|
|
154
|
+
|
|
155
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
156
|
+
|
|
157
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.0`.
|
|
158
|
+
|
|
159
|
+
### Docs
|
|
160
|
+
|
|
161
|
+
- [docs] Add a performance docs page for charts (#22656) @alexfauquette
|
|
162
|
+
- [docs] Add real dataset for maps documentation (#22599) @alexfauquette
|
|
163
|
+
- [docs] Add spacing between selects on charts overview demo (#22589) @bernardobelchior
|
|
164
|
+
- [docs] Reorganize existing chat docs navigation (#22478) @hasdfa
|
|
165
|
+
- [docs] Switch to visionscarto's world atlas dataset (#22669) @cherniavskii
|
|
166
|
+
- [docs] Update TreeView `domstructure` docs and add demo (#22420) @mj12albert
|
|
167
|
+
- [docs] Fix indexation of Scheduler (#22567) @oliviertassinari
|
|
168
|
+
- [docs] Fix wide layout on event timeline lazy loading and Import title (#22604) @rita-codes
|
|
169
|
+
- [docs] Derive class name owners for shared charts classes (#22674) @JCQuintas
|
|
170
|
+
|
|
171
|
+
### Core
|
|
172
|
+
|
|
173
|
+
- [code-infra] Drop unused and now-transitive deps from docs/package.json (#22549) @LukasTy
|
|
174
|
+
- [code-infra] Refresh CI Node pins to 22.22.3 (#22598) @LukasTy
|
|
175
|
+
- [code-infra] Skip empty product sections in changelog (#22541) @rita-codes
|
|
176
|
+
- [code-infra] Stabilize DataGridScrollRestoration visual regression test (#22553) @Janpot
|
|
177
|
+
- [internal] Add license to the `x-data-grid-generator` (#22240) @arminmeh
|
|
178
|
+
- [internal] Express default value for resource_class (#22569) @oliviertassinari
|
|
179
|
+
- [internal] Fix use of ellipsis (#21852) @oliviertassinari
|
|
180
|
+
- [internal] `useLayoutEffect` with `ResizeObserver` (#22428) @romgrk
|
|
181
|
+
|
|
182
|
+
### Miscellaneous
|
|
183
|
+
|
|
184
|
+
- [chat-headless] Add built-in chat adapters (#22479) @hasdfa
|
|
185
|
+
- [chat-headless] Harden runtime model and message errors (#22480) @hasdfa
|
|
186
|
+
- [core] Prepare for TypeScript 6 bump (#22551) @LukasTy
|
|
187
|
+
- [core] Use CircleCI Gen2 resource classes (#22610) @LukasTy
|
|
188
|
+
- [infra] Fix broken tag retrieval on `master` during release (#22174) @michelengelen
|
|
189
|
+
- [infra] Group Base UI renovate updates (#22590) @LukasTy
|
|
190
|
+
- [pnpm] Add security settings to pnpm-workspace.yaml (#22611) @Janpot
|
|
191
|
+
- [release] Fix release PR scripts (#22680) @JCQuintas
|
|
192
|
+
- [test] Add a Tree View regression test for lazy loading with getChildrenCount returning -1 (#22605) @mixelburg
|
|
193
|
+
- [test] Disable LCD subpixel antialiasing in regression screenshots (#22602) @Janpot
|
|
194
|
+
- [test] Fix flaky Data Grid Pro data source tree data tests (#22659) @LukasTy
|
|
195
|
+
- [test] Remove stale form-submit TODO from e2e suite (#22564) @LukasTy
|
|
196
|
+
- [x-license] Exclude test keys from the published npm package (#22647) @aemartos
|
|
197
|
+
- [test] Fix flaky WebGL benchmark by polling for canvas content (#22535) @JCQuintas
|
|
198
|
+
|
|
3
199
|
## 9.3.0
|
|
4
200
|
|
|
5
201
|
_May 21, 2026_
|
|
@@ -364,6 +364,27 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes = {
|
|
|
364
364
|
id: _propTypes.default.string,
|
|
365
365
|
max: _propTypes.default.number,
|
|
366
366
|
min: _propTypes.default.number,
|
|
367
|
+
sizeMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
368
|
+
interpolator: _propTypes.default.oneOf(['linear', 'log', 'sqrt']),
|
|
369
|
+
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
370
|
+
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
371
|
+
size: _propTypes.default.arrayOf(_propTypes.default.number.isRequired).isRequired,
|
|
372
|
+
type: _propTypes.default.oneOf(['continuous']).isRequired
|
|
373
|
+
}), _propTypes.default.shape({
|
|
374
|
+
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
375
|
+
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
376
|
+
size: _propTypes.default.func.isRequired,
|
|
377
|
+
type: _propTypes.default.oneOf(['continuous']).isRequired
|
|
378
|
+
}), _propTypes.default.shape({
|
|
379
|
+
sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
|
|
380
|
+
thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
|
|
381
|
+
type: _propTypes.default.oneOf(['piecewise']).isRequired
|
|
382
|
+
}), _propTypes.default.shape({
|
|
383
|
+
sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
|
|
384
|
+
type: _propTypes.default.oneOf(['ordinal']).isRequired,
|
|
385
|
+
unknownSize: _propTypes.default.number,
|
|
386
|
+
values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
|
|
387
|
+
})]),
|
|
367
388
|
valueGetter: _propTypes.default.func
|
|
368
389
|
}))
|
|
369
390
|
} : void 0;
|
|
@@ -357,6 +357,27 @@ process.env.NODE_ENV !== "production" ? ChartsContainer.propTypes = {
|
|
|
357
357
|
id: PropTypes.string,
|
|
358
358
|
max: PropTypes.number,
|
|
359
359
|
min: PropTypes.number,
|
|
360
|
+
sizeMap: PropTypes.oneOfType([PropTypes.shape({
|
|
361
|
+
interpolator: PropTypes.oneOf(['linear', 'log', 'sqrt']),
|
|
362
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
363
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
364
|
+
size: PropTypes.arrayOf(PropTypes.number.isRequired).isRequired,
|
|
365
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
366
|
+
}), PropTypes.shape({
|
|
367
|
+
max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
368
|
+
min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
369
|
+
size: PropTypes.func.isRequired,
|
|
370
|
+
type: PropTypes.oneOf(['continuous']).isRequired
|
|
371
|
+
}), PropTypes.shape({
|
|
372
|
+
sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
373
|
+
thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
|
|
374
|
+
type: PropTypes.oneOf(['piecewise']).isRequired
|
|
375
|
+
}), PropTypes.shape({
|
|
376
|
+
sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
|
|
377
|
+
type: PropTypes.oneOf(['ordinal']).isRequired,
|
|
378
|
+
unknownSize: PropTypes.number,
|
|
379
|
+
values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
|
|
380
|
+
})]),
|
|
360
381
|
valueGetter: PropTypes.func
|
|
361
382
|
}))
|
|
362
383
|
} : void 0;
|
|
@@ -10,7 +10,6 @@ exports.ChartsLabelMark = void 0;
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
14
|
var _styles = require("@mui/material/styles");
|
|
16
15
|
var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
@@ -133,23 +132,4 @@ const ChartsLabelMark = exports.ChartsLabelMark = (0, _consumeThemeProps.consume
|
|
|
133
132
|
})]
|
|
134
133
|
})
|
|
135
134
|
}));
|
|
136
|
-
});
|
|
137
|
-
process.env.NODE_ENV !== "production" ? ChartsLabelMark.propTypes = {
|
|
138
|
-
// ----------------------------- Warning --------------------------------
|
|
139
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
140
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
141
|
-
// ----------------------------------------------------------------------
|
|
142
|
-
/**
|
|
143
|
-
* Override or extend the styles applied to the component.
|
|
144
|
-
*/
|
|
145
|
-
classes: _propTypes.default.object,
|
|
146
|
-
/**
|
|
147
|
-
* The color of the mark.
|
|
148
|
-
*/
|
|
149
|
-
color: _propTypes.default.string,
|
|
150
|
-
/**
|
|
151
|
-
* The type of the mark.
|
|
152
|
-
* @default 'square'
|
|
153
|
-
*/
|
|
154
|
-
type: _propTypes.default.oneOf(['circle', 'line', 'square'])
|
|
155
|
-
} : void 0;
|
|
135
|
+
});
|
|
@@ -4,7 +4,6 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["type", "markShape", "color", "className", "classes"];
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import PropTypes from 'prop-types';
|
|
8
7
|
import clsx from 'clsx';
|
|
9
8
|
import { styled, useTheme } from '@mui/material/styles';
|
|
10
9
|
import { symbol as d3Symbol, symbolsFill as d3SymbolsFill } from '@mui/x-charts-vendor/d3-shape';
|
|
@@ -127,23 +126,4 @@ const ChartsLabelMark = consumeThemeProps('MuiChartsLabelMark', {
|
|
|
127
126
|
})
|
|
128
127
|
}));
|
|
129
128
|
});
|
|
130
|
-
process.env.NODE_ENV !== "production" ? ChartsLabelMark.propTypes = {
|
|
131
|
-
// ----------------------------- Warning --------------------------------
|
|
132
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
133
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
134
|
-
// ----------------------------------------------------------------------
|
|
135
|
-
/**
|
|
136
|
-
* Override or extend the styles applied to the component.
|
|
137
|
-
*/
|
|
138
|
-
classes: PropTypes.object,
|
|
139
|
-
/**
|
|
140
|
-
* The color of the mark.
|
|
141
|
-
*/
|
|
142
|
-
color: PropTypes.string,
|
|
143
|
-
/**
|
|
144
|
-
* The type of the mark.
|
|
145
|
-
* @default 'square'
|
|
146
|
-
*/
|
|
147
|
-
type: PropTypes.oneOf(['circle', 'line', 'square'])
|
|
148
|
-
} : void 0;
|
|
149
129
|
export { ChartsLabelMark };
|
|
@@ -2,15 +2,16 @@ import type { ChartsLegendProps } from "./ChartsLegend.mjs";
|
|
|
2
2
|
import { type ContinuousColorLegendProps } from "./ContinuousColorLegend.mjs";
|
|
3
3
|
import { type ChartsLegendPosition } from "./legend.types.mjs";
|
|
4
4
|
import { type PiecewiseColorLegendProps } from "./PiecewiseColorLegend.mjs";
|
|
5
|
+
import type { LegendPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
5
6
|
export interface ChartsLegendSlots {
|
|
6
7
|
/**
|
|
7
8
|
* Custom rendering of the legend.
|
|
8
9
|
* @default ChartsLegend
|
|
9
10
|
*/
|
|
10
|
-
legend?: React.JSXElementConstructor<ChartsLegendProps> | React.JSXElementConstructor<ContinuousColorLegendProps> | React.JSXElementConstructor<PiecewiseColorLegendProps>;
|
|
11
|
+
legend?: React.JSXElementConstructor<ChartsLegendProps & LegendPropsOverrides> | React.JSXElementConstructor<ContinuousColorLegendProps & LegendPropsOverrides> | React.JSXElementConstructor<PiecewiseColorLegendProps & LegendPropsOverrides>;
|
|
11
12
|
}
|
|
12
13
|
export interface ChartsLegendSlotProps {
|
|
13
|
-
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition;
|
|
14
|
+
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition & LegendPropsOverrides;
|
|
14
15
|
}
|
|
15
16
|
export interface ChartsLegendSlotExtension {
|
|
16
17
|
/**
|
|
@@ -2,15 +2,16 @@ import type { ChartsLegendProps } from "./ChartsLegend.js";
|
|
|
2
2
|
import { type ContinuousColorLegendProps } from "./ContinuousColorLegend.js";
|
|
3
3
|
import { type ChartsLegendPosition } from "./legend.types.js";
|
|
4
4
|
import { type PiecewiseColorLegendProps } from "./PiecewiseColorLegend.js";
|
|
5
|
+
import type { LegendPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
5
6
|
export interface ChartsLegendSlots {
|
|
6
7
|
/**
|
|
7
8
|
* Custom rendering of the legend.
|
|
8
9
|
* @default ChartsLegend
|
|
9
10
|
*/
|
|
10
|
-
legend?: React.JSXElementConstructor<ChartsLegendProps> | React.JSXElementConstructor<ContinuousColorLegendProps> | React.JSXElementConstructor<PiecewiseColorLegendProps>;
|
|
11
|
+
legend?: React.JSXElementConstructor<ChartsLegendProps & LegendPropsOverrides> | React.JSXElementConstructor<ContinuousColorLegendProps & LegendPropsOverrides> | React.JSXElementConstructor<PiecewiseColorLegendProps & LegendPropsOverrides>;
|
|
11
12
|
}
|
|
12
13
|
export interface ChartsLegendSlotProps {
|
|
13
|
-
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition;
|
|
14
|
+
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition & LegendPropsOverrides;
|
|
14
15
|
}
|
|
15
16
|
export interface ChartsLegendSlotExtension {
|
|
16
17
|
/**
|
|
@@ -8,8 +8,14 @@ exports.useUtilityClasses = exports.piecewiseColorLegendClasses = void 0;
|
|
|
8
8
|
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
9
9
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
10
10
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
11
|
+
const CORRECT_PREFIX = 'MuiPiecewiseColorLegend';
|
|
12
|
+
// TODO v10: remove `MuiPiecewiseColorLegendClasses`. Kept for backwards compatibility with
|
|
13
|
+
// users targeting the historically-incorrect prefix.
|
|
14
|
+
const LEGACY_PREFIX = 'MuiPiecewiseColorLegendClasses';
|
|
15
|
+
|
|
16
|
+
// Used by `useUtilityClasses` to also emit the legacy prefix in the rendered className.
|
|
11
17
|
function getLegendUtilityClass(slot) {
|
|
12
|
-
return (0, _generateUtilityClass.default)(
|
|
18
|
+
return `${(0, _generateUtilityClass.default)(CORRECT_PREFIX, slot)} ${(0, _generateUtilityClass.default)(LEGACY_PREFIX, slot)}`;
|
|
13
19
|
}
|
|
14
20
|
const useUtilityClasses = props => {
|
|
15
21
|
const {
|
|
@@ -28,4 +34,4 @@ const useUtilityClasses = props => {
|
|
|
28
34
|
return (0, _composeClasses.default)(slots, getLegendUtilityClass, classes);
|
|
29
35
|
};
|
|
30
36
|
exports.useUtilityClasses = useUtilityClasses;
|
|
31
|
-
const piecewiseColorLegendClasses = exports.piecewiseColorLegendClasses = (0, _generateUtilityClasses.default)(
|
|
37
|
+
const piecewiseColorLegendClasses = exports.piecewiseColorLegendClasses = (0, _generateUtilityClasses.default)(CORRECT_PREFIX, ['root', 'minLabel', 'maxLabel', 'item', 'vertical', 'horizontal', 'start', 'end', 'extremes', 'inlineStart', 'inlineEnd', 'mark', 'label']);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
2
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
3
|
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
+
const CORRECT_PREFIX = 'MuiPiecewiseColorLegend';
|
|
5
|
+
// TODO v10: remove `MuiPiecewiseColorLegendClasses`. Kept for backwards compatibility with
|
|
6
|
+
// users targeting the historically-incorrect prefix.
|
|
7
|
+
const LEGACY_PREFIX = 'MuiPiecewiseColorLegendClasses';
|
|
8
|
+
|
|
9
|
+
// Used by `useUtilityClasses` to also emit the legacy prefix in the rendered className.
|
|
4
10
|
function getLegendUtilityClass(slot) {
|
|
5
|
-
return generateUtilityClass(
|
|
11
|
+
return `${generateUtilityClass(CORRECT_PREFIX, slot)} ${generateUtilityClass(LEGACY_PREFIX, slot)}`;
|
|
6
12
|
}
|
|
7
13
|
export const useUtilityClasses = props => {
|
|
8
14
|
const {
|
|
@@ -20,4 +26,4 @@ export const useUtilityClasses = props => {
|
|
|
20
26
|
};
|
|
21
27
|
return composeClasses(slots, getLegendUtilityClass, classes);
|
|
22
28
|
};
|
|
23
|
-
export const piecewiseColorLegendClasses = generateUtilityClasses(
|
|
29
|
+
export const piecewiseColorLegendClasses = generateUtilityClasses(CORRECT_PREFIX, ['root', 'minLabel', 'maxLabel', 'item', 'vertical', 'horizontal', 'start', 'end', 'extremes', 'inlineStart', 'inlineEnd', 'mark', 'label']);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SxProps, type Theme } from '@mui/material/styles';
|
|
3
3
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
4
|
+
import type { LoadingOverlayPropsOverrides, NoDataOverlayPropsOverrides } from "../models/chartsSlotsComponentsProps.mjs";
|
|
4
5
|
export declare function useNoData(): boolean;
|
|
5
6
|
export type CommonOverlayProps = React.SVGAttributes<SVGTextElement> & {
|
|
6
7
|
sx?: SxProps<Theme>;
|
|
@@ -10,16 +11,16 @@ export interface ChartsOverlaySlots {
|
|
|
10
11
|
* Overlay component rendered when the chart is in a loading state.
|
|
11
12
|
* @default ChartsLoadingOverlay
|
|
12
13
|
*/
|
|
13
|
-
loadingOverlay?: React.ElementType<CommonOverlayProps>;
|
|
14
|
+
loadingOverlay?: React.ElementType<CommonOverlayProps & LoadingOverlayPropsOverrides>;
|
|
14
15
|
/**
|
|
15
16
|
* Overlay component rendered when the chart has no data to display.
|
|
16
17
|
* @default ChartsNoDataOverlay
|
|
17
18
|
*/
|
|
18
|
-
noDataOverlay?: React.ElementType<CommonOverlayProps>;
|
|
19
|
+
noDataOverlay?: React.ElementType<CommonOverlayProps & NoDataOverlayPropsOverrides>;
|
|
19
20
|
}
|
|
20
21
|
export interface ChartsOverlaySlotProps {
|
|
21
|
-
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps,
|
|
22
|
-
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps,
|
|
22
|
+
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, LoadingOverlayPropsOverrides, {}>;
|
|
23
|
+
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, NoDataOverlayPropsOverrides, {}>;
|
|
23
24
|
}
|
|
24
25
|
export interface ChartsOverlayProps {
|
|
25
26
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SxProps, type Theme } from '@mui/material/styles';
|
|
3
3
|
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
|
|
4
|
+
import type { LoadingOverlayPropsOverrides, NoDataOverlayPropsOverrides } from "../models/chartsSlotsComponentsProps.js";
|
|
4
5
|
export declare function useNoData(): boolean;
|
|
5
6
|
export type CommonOverlayProps = React.SVGAttributes<SVGTextElement> & {
|
|
6
7
|
sx?: SxProps<Theme>;
|
|
@@ -10,16 +11,16 @@ export interface ChartsOverlaySlots {
|
|
|
10
11
|
* Overlay component rendered when the chart is in a loading state.
|
|
11
12
|
* @default ChartsLoadingOverlay
|
|
12
13
|
*/
|
|
13
|
-
loadingOverlay?: React.ElementType<CommonOverlayProps>;
|
|
14
|
+
loadingOverlay?: React.ElementType<CommonOverlayProps & LoadingOverlayPropsOverrides>;
|
|
14
15
|
/**
|
|
15
16
|
* Overlay component rendered when the chart has no data to display.
|
|
16
17
|
* @default ChartsNoDataOverlay
|
|
17
18
|
*/
|
|
18
|
-
noDataOverlay?: React.ElementType<CommonOverlayProps>;
|
|
19
|
+
noDataOverlay?: React.ElementType<CommonOverlayProps & NoDataOverlayPropsOverrides>;
|
|
19
20
|
}
|
|
20
21
|
export interface ChartsOverlaySlotProps {
|
|
21
|
-
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps,
|
|
22
|
-
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps,
|
|
22
|
+
loadingOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, LoadingOverlayPropsOverrides, {}>;
|
|
23
|
+
noDataOverlay?: SlotComponentPropsFromProps<CommonOverlayProps, NoDataOverlayPropsOverrides, {}>;
|
|
23
24
|
}
|
|
24
25
|
export interface ChartsOverlayProps {
|
|
25
26
|
/**
|
|
@@ -76,7 +76,9 @@ function ChartsXReferenceLine(props) {
|
|
|
76
76
|
} = props;
|
|
77
77
|
const {
|
|
78
78
|
top,
|
|
79
|
-
height
|
|
79
|
+
height,
|
|
80
|
+
left,
|
|
81
|
+
width
|
|
80
82
|
} = (0, _hooks.useDrawingArea)();
|
|
81
83
|
const xAxisScale = (0, _hooks.useXScale)(axisId);
|
|
82
84
|
const xPosition = xAxisScale(x);
|
|
@@ -86,6 +88,9 @@ function ChartsXReferenceLine(props) {
|
|
|
86
88
|
}
|
|
87
89
|
return null;
|
|
88
90
|
}
|
|
91
|
+
if (xPosition < left || xPosition > left + width) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
89
94
|
const d = `M ${xPosition} ${top} l 0 ${height}`;
|
|
90
95
|
const classes = getXReferenceLineClasses(inClasses);
|
|
91
96
|
const textParams = (0, _extends2.default)({
|
|
@@ -69,7 +69,9 @@ function ChartsXReferenceLine(props) {
|
|
|
69
69
|
} = props;
|
|
70
70
|
const {
|
|
71
71
|
top,
|
|
72
|
-
height
|
|
72
|
+
height,
|
|
73
|
+
left,
|
|
74
|
+
width
|
|
73
75
|
} = useDrawingArea();
|
|
74
76
|
const xAxisScale = useXScale(axisId);
|
|
75
77
|
const xPosition = xAxisScale(x);
|
|
@@ -79,6 +81,9 @@ function ChartsXReferenceLine(props) {
|
|
|
79
81
|
}
|
|
80
82
|
return null;
|
|
81
83
|
}
|
|
84
|
+
if (xPosition < left || xPosition > left + width) {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
82
87
|
const d = `M ${xPosition} ${top} l 0 ${height}`;
|
|
83
88
|
const classes = getXReferenceLineClasses(inClasses);
|
|
84
89
|
const textParams = _extends({
|