@mui/x-charts-pro 8.27.4 → 8.28.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 +2 -2
- package/CHANGELOG.md +143 -0
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +1 -1
- package/FunnelChart/FunnelPlot.js +8 -3
- package/FunnelChart/FunnelSection.js +7 -3
- package/FunnelChart/FunnelSectionLabel.d.ts +6 -0
- package/FunnelChart/FunnelSectionLabel.js +18 -5
- package/FunnelChart/funnelClasses.d.ts +29 -0
- package/FunnelChart/funnelClasses.js +29 -0
- package/FunnelChart/funnelSectionClasses.d.ts +13 -0
- package/FunnelChart/funnelSectionClasses.js +19 -0
- package/FunnelChart/index.d.ts +2 -0
- package/FunnelChart/index.js +8 -0
- package/Heatmap/Heatmap.js +2 -2
- package/Heatmap/HeatmapCell.d.ts +34 -0
- package/Heatmap/HeatmapCell.js +64 -0
- package/Heatmap/HeatmapItem.d.ts +1 -8
- package/Heatmap/HeatmapItem.js +4 -19
- package/Heatmap/heatmapClasses.d.ts +6 -1
- package/Heatmap/heatmapClasses.js +18 -3
- package/Heatmap/index.d.ts +4 -2
- package/Heatmap/index.js +17 -13
- package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
- package/LineChartPro/LineChartPro.js +2 -2
- package/SankeyChart/SankeyLinkElement.js +4 -2
- package/SankeyChart/SankeyLinkLabel.js +3 -0
- package/SankeyChart/SankeyNodeElement.d.ts +1 -1
- package/SankeyChart/SankeyNodeElement.js +5 -3
- package/SankeyChart/SankeyNodeLabel.js +3 -0
- package/SankeyChart/SankeyPlot.js +2 -2
- package/SankeyChart/index.d.ts +2 -1
- package/SankeyChart/index.js +7 -0
- package/SankeyChart/sankeyClasses.d.ts +27 -6
- package/SankeyChart/sankeyClasses.js +27 -8
- package/ScatterChartPro/ScatterChartPro.js +2 -2
- package/esm/BarChartPro/BarChartPro.js +2 -2
- package/esm/ChartsDataProviderPro/ChartsDataProviderPro.js +1 -1
- package/esm/FunnelChart/FunnelPlot.js +8 -3
- package/esm/FunnelChart/FunnelSection.js +9 -5
- package/esm/FunnelChart/FunnelSectionLabel.d.ts +6 -0
- package/esm/FunnelChart/FunnelSectionLabel.js +20 -7
- package/esm/FunnelChart/funnelClasses.d.ts +29 -0
- package/esm/FunnelChart/funnelClasses.js +19 -0
- package/esm/FunnelChart/funnelSectionClasses.d.ts +13 -0
- package/esm/FunnelChart/funnelSectionClasses.js +20 -0
- package/esm/FunnelChart/index.d.ts +2 -0
- package/esm/FunnelChart/index.js +1 -0
- package/esm/Heatmap/Heatmap.js +2 -2
- package/esm/Heatmap/HeatmapCell.d.ts +34 -0
- package/esm/Heatmap/HeatmapCell.js +58 -0
- package/esm/Heatmap/HeatmapItem.d.ts +1 -8
- package/esm/Heatmap/HeatmapItem.js +4 -19
- package/esm/Heatmap/heatmapClasses.d.ts +6 -1
- package/esm/Heatmap/heatmapClasses.js +16 -2
- package/esm/Heatmap/index.d.ts +4 -2
- package/esm/Heatmap/index.js +2 -1
- package/esm/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
- package/esm/LineChartPro/LineChartPro.js +2 -2
- package/esm/SankeyChart/SankeyLinkElement.js +4 -2
- package/esm/SankeyChart/SankeyLinkLabel.js +3 -0
- package/esm/SankeyChart/SankeyNodeElement.d.ts +1 -1
- package/esm/SankeyChart/SankeyNodeElement.js +5 -3
- package/esm/SankeyChart/SankeyNodeLabel.js +3 -0
- package/esm/SankeyChart/SankeyPlot.js +2 -2
- package/esm/SankeyChart/index.d.ts +2 -1
- package/esm/SankeyChart/index.js +1 -1
- package/esm/SankeyChart/sankeyClasses.d.ts +27 -6
- package/esm/SankeyChart/sankeyClasses.js +25 -6
- package/esm/ScatterChartPro/ScatterChartPro.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/esm/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +13 -0
- package/esm/themeAugmentation/components.d.ts +19 -1
- package/esm/themeAugmentation/overrides.d.ts +5 -2
- package/esm/themeAugmentation/props.d.ts +8 -0
- package/index.js +1 -1
- package/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +13 -0
- package/package.json +2 -2
- package/themeAugmentation/components.d.ts +19 -1
- package/themeAugmentation/overrides.d.ts +5 -2
- package/themeAugmentation/props.d.ts +8 -0
- package/Heatmap/internals/HeatmapCell.d.ts +0 -21
- package/Heatmap/internals/HeatmapCell.js +0 -18
- package/esm/Heatmap/internals/HeatmapCell.d.ts +0 -21
- package/esm/Heatmap/internals/HeatmapCell.js +0 -12
|
@@ -1595,8 +1595,8 @@ process.env.NODE_ENV !== "production" ? BarChartPro.propTypes = {
|
|
|
1595
1595
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1596
1596
|
type: _propTypes.default.oneOf(['doubleTapReset']).isRequired
|
|
1597
1597
|
}), _propTypes.default.shape({
|
|
1598
|
-
pointerMode: _propTypes.default.
|
|
1599
|
-
requiredKeys: _propTypes.default.
|
|
1598
|
+
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
1599
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
1600
1600
|
type: _propTypes.default.oneOf(['brush']).isRequired
|
|
1601
1601
|
})]).isRequired)
|
|
1602
1602
|
})
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,149 @@
|
|
|
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.28.0
|
|
9
|
+
|
|
10
|
+
_Mar 19, 2026_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 5 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
TODO INSERT HIGHLIGHTS
|
|
15
|
+
|
|
16
|
+
The following team members contributed to this release:
|
|
17
|
+
@alexfauquette, @brijeshb42, @Janpot, @JCQuintas, @sai6855
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@8.28.0`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Move `elementOverrides` to constants and remove duplicates (@sai6855) (#21752) @github-actions[bot]
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid-pro@8.28.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
26
|
+
|
|
27
|
+
Same changes as in `@mui/x-data-grid@8.28.0`.
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-premium@8.28.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid-pro@8.28.0`.
|
|
32
|
+
|
|
33
|
+
### Date and Time Pickers
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-date-pickers@8.27.2`
|
|
36
|
+
|
|
37
|
+
Internal changes.
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-date-pickers-pro@8.27.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
40
|
+
|
|
41
|
+
Same changes as in `@mui/x-date-pickers@8.27.2`.
|
|
42
|
+
|
|
43
|
+
### Charts
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-charts@8.28.0`
|
|
46
|
+
|
|
47
|
+
- [charts] Improve deprecation warnings (#21760) (#21767) @alexfauquette
|
|
48
|
+
- [charts] Refactor `FunnelChart` classes structure (@JCQuintas) (#21763) @github-actions[bot]
|
|
49
|
+
- [charts] Refactor `Heatmap` classes structure (#21653) (#21745) @JCQuintas
|
|
50
|
+
- [charts] Refactor `PieChart` classes structure (@JCQuintas) (#21715) @github-actions[bot]
|
|
51
|
+
- [charts] Refactor `RadarChart` classes structure (@JCQuintas) (#21730) @github-actions[bot]
|
|
52
|
+
- [charts] Refactor `SankeyChart` classes structure (#21654) (#21726) @JCQuintas
|
|
53
|
+
- [charts] Rename `data-series-id` by `data-series` (#21761) (#21772) @alexfauquette
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-charts-pro@8.28.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-charts@8.28.0`, plus:
|
|
58
|
+
|
|
59
|
+
- [charts-pro] Allow `brush` interaction to accept `requiredKeys/pointerMode` (#21723) @JCQuintas
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts-premium@8.28.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
62
|
+
|
|
63
|
+
Same changes as in `@mui/x-charts-pro@8.28.0`.
|
|
64
|
+
|
|
65
|
+
### Tree View
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-tree-view@8.27.2`
|
|
68
|
+
|
|
69
|
+
Internal changes.
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-tree-view-pro@8.27.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-tree-view@8.27.2`.
|
|
74
|
+
|
|
75
|
+
### Codemod
|
|
76
|
+
|
|
77
|
+
#### `@mui/x-codemod@8.27.0`
|
|
78
|
+
|
|
79
|
+
Internal changes.
|
|
80
|
+
|
|
81
|
+
### Core
|
|
82
|
+
|
|
83
|
+
- [code-infra] Fix contributor generation in changelog (#21712) @brijeshb42
|
|
84
|
+
- [code-infra] Install pkg-pr-new (#21778) @Janpot
|
|
85
|
+
|
|
86
|
+
## 8.27.5
|
|
87
|
+
|
|
88
|
+
_Mar 11, 2026_
|
|
89
|
+
|
|
90
|
+
We'd like to extend a big thank you to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
91
|
+
|
|
92
|
+
- 🐞 Bugfixes
|
|
93
|
+
|
|
94
|
+
The following team members contributed to this release:
|
|
95
|
+
@bernardobelchior, @JCQuintas, @MBilalShafi, @michelengelen, @mj12albert, @sai6855, @siriwatknp
|
|
96
|
+
|
|
97
|
+
### Data Grid
|
|
98
|
+
|
|
99
|
+
#### `@mui/x-data-grid@8.27.5`
|
|
100
|
+
|
|
101
|
+
- [DataGrid] Fix crash when `rows` and `rowModesModel` are updated simultaneously (#21684) @michelengelen
|
|
102
|
+
- [DataGrid] Forward rest props in `GridFilterInputMultipleValue` (#21444) @siriwatknp
|
|
103
|
+
- [DataGrid] Remove double rtl inversion logic for columns pinning (#21443) @siriwatknp
|
|
104
|
+
- [DataGrid] Add missing `resizablePanelHandle` classes to `gridClasses` object (#21632) @sai6855
|
|
105
|
+
- [DataGrid] Refactor `headerAlign` style calls (#21633) @sai6855
|
|
106
|
+
- [DataGrid] Fix keyboard navigation with single-row checkbox selection (#21529) @mj12albert
|
|
107
|
+
|
|
108
|
+
#### `@mui/x-data-grid-pro@8.27.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
109
|
+
|
|
110
|
+
Same changes as in `@mui/x-data-grid@8.27.5`, plus:
|
|
111
|
+
|
|
112
|
+
- [DataGridPro] Add `role="presentation"` to detail panel toggle header content (#21691) @michelengelen
|
|
113
|
+
- [DataGridPro] Fix sorting not reflected in nested server-side data (#21641) @MBilalShafi
|
|
114
|
+
|
|
115
|
+
#### `@mui/x-data-grid-premium@8.27.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
116
|
+
|
|
117
|
+
Same changes as in `@mui/x-data-grid-pro@8.27.5`.
|
|
118
|
+
|
|
119
|
+
### Charts
|
|
120
|
+
|
|
121
|
+
#### `@mui/x-charts@8.27.5`
|
|
122
|
+
|
|
123
|
+
- [charts] Refactor `BarChart` classes structure (#21601) (#21644) @JCQuintas
|
|
124
|
+
- [charts] Refactor `LineChart` classes structure (#21672) @JCQuintas
|
|
125
|
+
- [charts] Refactor `ScatterChart` classes structure (#21706) @JCQuintas
|
|
126
|
+
|
|
127
|
+
#### `@mui/x-charts-pro@8.27.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
128
|
+
|
|
129
|
+
Same changes as in `@mui/x-charts@8.27.5`, plus:
|
|
130
|
+
|
|
131
|
+
- [charts-pro] Fix image export truncated when page is zoomed out (#21696) @bernardobelchior
|
|
132
|
+
|
|
133
|
+
#### `@mui/x-charts-premium@8.27.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
134
|
+
|
|
135
|
+
Same changes as in `@mui/x-charts-pro@8.27.5`.
|
|
136
|
+
|
|
137
|
+
### Docs
|
|
138
|
+
|
|
139
|
+
- [docs] Fix `AssistantWithDataSource` demo crashing (#21631) @sai6855
|
|
140
|
+
- [docs] Move Range Bar Chart to existing charts (#21122) @bernardobelchior
|
|
141
|
+
|
|
142
|
+
### Core
|
|
143
|
+
|
|
144
|
+
- [code-infra] Fix datagrid test flakyness (#21657) @JCQuintas
|
|
145
|
+
- [code-infra] Removed `getTeamMembers` function and usage from the release script (#21608) @michelengelen
|
|
146
|
+
|
|
147
|
+
### Miscellaneous
|
|
148
|
+
|
|
149
|
+
- [test] Add missing tests for forwarding props to filter operators in DataGrid (#21700) @siriwatknp
|
|
150
|
+
|
|
8
151
|
## 8.27.4
|
|
9
152
|
|
|
10
153
|
_Mar 5, 2026_
|
|
@@ -17,7 +17,7 @@ var _material = require("../internals/material");
|
|
|
17
17
|
var _allPlugins = require("../internals/plugins/allPlugins");
|
|
18
18
|
var _useChartsDataProviderProProps = require("./useChartsDataProviderProProps");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const releaseInfo = "
|
|
20
|
+
const releaseInfo = "MTc3Mzk2NDgwMDAwMA==";
|
|
21
21
|
const packageIdentifier = 'x-charts-pro';
|
|
22
22
|
const defaultSeriesConfigPro = exports.defaultSeriesConfigPro = _internals.defaultSeriesConfig;
|
|
23
23
|
|
|
@@ -15,6 +15,7 @@ var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
|
15
15
|
var _internals = require("@mui/x-charts/internals");
|
|
16
16
|
var _FunnelSection = require("./FunnelSection");
|
|
17
17
|
var _labelUtils = require("./labelUtils");
|
|
18
|
+
var _funnelClasses = require("./funnelClasses");
|
|
18
19
|
var _useFunnelSeries = require("../hooks/useFunnelSeries");
|
|
19
20
|
var _curves = require("./curves");
|
|
20
21
|
var _FunnelSectionLabel = require("./FunnelSectionLabel");
|
|
@@ -110,7 +111,9 @@ function FunnelPlot(props) {
|
|
|
110
111
|
} = props,
|
|
111
112
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
112
113
|
const data = useAggregatedData();
|
|
113
|
-
|
|
114
|
+
const classes = (0, _funnelClasses.useUtilityClasses)();
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
116
|
+
className: classes.root,
|
|
114
117
|
children: [data.map(series => {
|
|
115
118
|
if (series.length === 0) {
|
|
116
119
|
return null;
|
|
@@ -150,7 +153,8 @@ function FunnelPlot(props) {
|
|
|
150
153
|
id,
|
|
151
154
|
label,
|
|
152
155
|
seriesId,
|
|
153
|
-
dataIndex
|
|
156
|
+
dataIndex,
|
|
157
|
+
variant
|
|
154
158
|
}) => {
|
|
155
159
|
if (!label || !label.value) {
|
|
156
160
|
return null;
|
|
@@ -158,7 +162,8 @@ function FunnelPlot(props) {
|
|
|
158
162
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FunnelSectionLabel.FunnelSectionLabel, (0, _extends2.default)({
|
|
159
163
|
label: label,
|
|
160
164
|
dataIndex: dataIndex,
|
|
161
|
-
seriesId: seriesId
|
|
165
|
+
seriesId: seriesId,
|
|
166
|
+
variant: variant
|
|
162
167
|
}, other), id);
|
|
163
168
|
})
|
|
164
169
|
}, series[0].seriesId);
|
|
@@ -15,11 +15,12 @@ var _internals = require("@mui/x-charts/internals");
|
|
|
15
15
|
var _hooks = require("@mui/x-charts/hooks");
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
var _funnelSectionClasses = require("./funnelSectionClasses");
|
|
18
|
+
var _funnelClasses = require("./funnelClasses");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
const _excluded = ["seriesId", "dataIndex", "classes", "color", "onClick", "className", "variant"];
|
|
20
21
|
const FunnelSectionPath = exports.FunnelSectionPath = (0, _styles.styled)('path', {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
name: 'MuiFunnelChart',
|
|
23
|
+
slot: 'Section'
|
|
23
24
|
})(() => ({
|
|
24
25
|
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, fill-opacity 0.2s ease-in, filter 0.2s ease-in'
|
|
25
26
|
}));
|
|
@@ -52,6 +53,9 @@ const FunnelSection = exports.FunnelSection = (0, _internals.consumeSlots)('MuiF
|
|
|
52
53
|
seriesId,
|
|
53
54
|
dataIndex
|
|
54
55
|
});
|
|
56
|
+
const newClasses = (0, _funnelClasses.useUtilityClasses)({
|
|
57
|
+
variant
|
|
58
|
+
});
|
|
55
59
|
const isOutlined = variant === 'outlined';
|
|
56
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FunnelSectionPath, (0, _extends2.default)({}, interactionProps, {
|
|
57
61
|
filter: isHighlighted && !isOutlined ? 'brightness(120%)' : undefined,
|
|
@@ -65,7 +69,7 @@ const FunnelSection = exports.FunnelSection = (0, _internals.consumeSlots)('MuiF
|
|
|
65
69
|
onClick: onClick,
|
|
66
70
|
"data-highlighted": isHighlighted || undefined,
|
|
67
71
|
"data-faded": isFaded || undefined,
|
|
68
|
-
className: (0, _clsx.default)(classes?.root, className, isOutlined ? classes?.outlined : classes?.filled, isHighlighted && classes?.highlighted, isFaded && classes?.faded)
|
|
72
|
+
className: (0, _clsx.default)(newClasses.section, classes?.root, className, isOutlined ? classes?.outlined : classes?.filled, isHighlighted && classes?.highlighted, isFaded && classes?.faded)
|
|
69
73
|
}, other, {
|
|
70
74
|
ref: ref
|
|
71
75
|
}));
|
|
@@ -11,9 +11,15 @@ export interface FunnelSectionLabelConfig {
|
|
|
11
11
|
export interface FunnelSectionLabelProps extends Omit<React.SVGProps<SVGTextElement>, 'ref' | 'id'> {
|
|
12
12
|
classes?: Partial<FunnelSectionClasses>;
|
|
13
13
|
label: FunnelSectionLabelConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Indicate if the section is filled or outlined.
|
|
16
|
+
* Can be used to apply different styles to the label.
|
|
17
|
+
*/
|
|
18
|
+
variant?: 'filled' | 'outlined';
|
|
14
19
|
seriesId: SeriesId;
|
|
15
20
|
dataIndex: number;
|
|
16
21
|
}
|
|
22
|
+
export declare const FunnelSectionLabelText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGTextElementAttributes<SVGTextElement>, keyof React.SVGTextElementAttributes<SVGTextElement>>, {}>;
|
|
17
23
|
/**
|
|
18
24
|
* @ignore - internal component.
|
|
19
25
|
*/
|
|
@@ -6,15 +6,24 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.FunnelSectionLabel = void 0;
|
|
9
|
+
exports.FunnelSectionLabelText = exports.FunnelSectionLabel = 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
13
|
var _styles = require("@mui/material/styles");
|
|
14
14
|
var _internals = require("@mui/x-charts/internals");
|
|
15
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
16
|
var _funnelSectionClasses = require("./funnelSectionClasses");
|
|
17
|
+
var _funnelClasses = require("./funnelClasses");
|
|
16
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["classes", "color", "onClick", "className", "label", "seriesId", "dataIndex"];
|
|
19
|
+
const _excluded = ["classes", "color", "onClick", "className", "label", "variant", "seriesId", "dataIndex"];
|
|
20
|
+
const FunnelSectionLabelText = exports.FunnelSectionLabelText = (0, _styles.styled)('text', {
|
|
21
|
+
name: 'MuiFunnelChart',
|
|
22
|
+
slot: 'SectionLabel'
|
|
23
|
+
})(() => ({
|
|
24
|
+
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, fill-opacity 0.2s ease-in, filter 0.2s ease-in'
|
|
25
|
+
}));
|
|
26
|
+
|
|
18
27
|
/**
|
|
19
28
|
* @ignore - internal component.
|
|
20
29
|
*/
|
|
@@ -23,11 +32,15 @@ const FunnelSectionLabel = exports.FunnelSectionLabel = (0, _internals.consumeSl
|
|
|
23
32
|
}, /*#__PURE__*/React.forwardRef(function FunnelSectionLabel(props, ref) {
|
|
24
33
|
const {
|
|
25
34
|
classes,
|
|
26
|
-
label
|
|
35
|
+
label,
|
|
36
|
+
variant = 'filled'
|
|
27
37
|
} = props,
|
|
28
38
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
29
39
|
const theme = (0, _styles.useTheme)();
|
|
30
|
-
|
|
40
|
+
const newClasses = (0, _funnelClasses.useUtilityClasses)({
|
|
41
|
+
variant
|
|
42
|
+
});
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FunnelSectionLabelText, (0, _extends2.default)({
|
|
31
44
|
stroke: "none",
|
|
32
45
|
pointerEvents: "none",
|
|
33
46
|
fontFamily: theme.typography.body2.fontFamily,
|
|
@@ -39,7 +52,7 @@ const FunnelSectionLabel = exports.FunnelSectionLabel = (0, _internals.consumeSl
|
|
|
39
52
|
fontStyle: theme.typography.body2.fontStyle,
|
|
40
53
|
fontVariant: theme.typography.body2.fontVariant,
|
|
41
54
|
fill: (theme.vars || theme)?.palette?.text?.primary,
|
|
42
|
-
className: classes?.label,
|
|
55
|
+
className: (0, _clsx.default)(newClasses.sectionLabel, classes?.label),
|
|
43
56
|
x: label.x,
|
|
44
57
|
y: label.y,
|
|
45
58
|
textAnchor: label.textAnchor ?? 'middle',
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type SeriesId } from '@mui/x-charts/internals';
|
|
2
|
+
export interface FunnelClasses {
|
|
3
|
+
/** Styles applied to the funnel plot element. */
|
|
4
|
+
root: string;
|
|
5
|
+
/** Styles applied to an individual funnel section element. */
|
|
6
|
+
section: string;
|
|
7
|
+
/** Styles applied to a funnel section element if `variant="filled"`. */
|
|
8
|
+
sectionFilled: string;
|
|
9
|
+
/** Styles applied to a funnel section element if `variant="outlined"`. */
|
|
10
|
+
sectionOutlined: string;
|
|
11
|
+
/** Styles applied to a funnel section label element. */
|
|
12
|
+
sectionLabel: string;
|
|
13
|
+
}
|
|
14
|
+
export type FunnelClassKey = keyof FunnelClasses;
|
|
15
|
+
export interface FunnelSectionOwnerState {
|
|
16
|
+
seriesId: SeriesId;
|
|
17
|
+
dataIndex: number;
|
|
18
|
+
color: string;
|
|
19
|
+
isFaded: boolean;
|
|
20
|
+
isHighlighted: boolean;
|
|
21
|
+
classes?: Partial<FunnelClasses>;
|
|
22
|
+
}
|
|
23
|
+
export declare function getFunnelUtilityClass(slot: string): string;
|
|
24
|
+
export declare const funnelClasses: FunnelClasses;
|
|
25
|
+
export interface UseUtilityClassesOptions {
|
|
26
|
+
variant?: 'filled' | 'outlined';
|
|
27
|
+
classes?: Partial<FunnelClasses>;
|
|
28
|
+
}
|
|
29
|
+
export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"section" | "sectionLabel" | "root", string>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.funnelClasses = void 0;
|
|
8
|
+
exports.getFunnelUtilityClass = getFunnelUtilityClass;
|
|
9
|
+
exports.useUtilityClasses = void 0;
|
|
10
|
+
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
11
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
12
|
+
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
13
|
+
function getFunnelUtilityClass(slot) {
|
|
14
|
+
return (0, _generateUtilityClass.default)('MuiFunnelChart', slot);
|
|
15
|
+
}
|
|
16
|
+
const funnelClasses = exports.funnelClasses = (0, _generateUtilityClasses.default)('MuiFunnelChart', ['root', 'section', 'sectionFilled', 'sectionOutlined', 'sectionLabel', 'sectionLabelFilled', 'sectionLabelOutlined']);
|
|
17
|
+
const useUtilityClasses = options => {
|
|
18
|
+
const {
|
|
19
|
+
variant,
|
|
20
|
+
classes
|
|
21
|
+
} = options ?? {};
|
|
22
|
+
const slots = {
|
|
23
|
+
root: ['root'],
|
|
24
|
+
section: ['section', variant === 'filled' && 'sectionFilled', variant === 'outlined' && 'sectionOutlined'],
|
|
25
|
+
sectionLabel: ['sectionLabel', variant === 'filled' && 'sectionLabelFilled', variant === 'outlined' && 'sectionLabelOutlined']
|
|
26
|
+
};
|
|
27
|
+
return (0, _composeClasses.default)(slots, getFunnelUtilityClass, classes);
|
|
28
|
+
};
|
|
29
|
+
exports.useUtilityClasses = useUtilityClasses;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { FunnelSectionProps } from "./FunnelSection.js";
|
|
2
2
|
import type { FunnelSectionLabelProps } from "./FunnelSectionLabel.js";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `FunnelClasses` from `funnelClasses` instead.
|
|
5
|
+
*/
|
|
3
6
|
export interface FunnelSectionClasses {
|
|
4
7
|
/** Styles applied to the root element. */
|
|
5
8
|
root: string;
|
|
@@ -16,9 +19,19 @@ export interface FunnelSectionClasses {
|
|
|
16
19
|
/**
|
|
17
20
|
* Styles applied to the root element for a specified series.
|
|
18
21
|
* Needs to be suffixed with the series ID: `.${funnelSectionClasses.series}-${seriesId}`.
|
|
22
|
+
* @deprecated Use `[data-series]` selector instead.
|
|
19
23
|
*/
|
|
20
24
|
series: string;
|
|
21
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `useUtilityClasses` from `funnelClasses` instead.
|
|
28
|
+
*/
|
|
22
29
|
export declare const useUtilityClasses: (props: FunnelSectionProps) => Record<"label" | "filled" | "outlined" | "highlighted" | "faded" | "root", string>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Use `useUtilityClasses` from `funnelClasses` instead.
|
|
32
|
+
*/
|
|
23
33
|
export declare const useLabelUtilityClasses: (props: FunnelSectionLabelProps) => Record<"label", string>;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use `funnelClasses` from `funnelClasses` instead.
|
|
36
|
+
*/
|
|
24
37
|
export declare const funnelSectionClasses: FunnelSectionClasses;
|
|
@@ -8,9 +8,20 @@ exports.useUtilityClasses = exports.useLabelUtilityClasses = exports.funnelSecti
|
|
|
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
|
+
/**
|
|
12
|
+
* @deprecated Use `FunnelClasses` from `funnelClasses` instead.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `getFunnelUtilityClass` from `funnelClasses` instead.
|
|
17
|
+
*/
|
|
11
18
|
function getFunnelSectionUtilityClass(slot) {
|
|
12
19
|
return (0, _generateUtilityClass.default)('MuiFunnelSection', slot);
|
|
13
20
|
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use `useUtilityClasses` from `funnelClasses` instead.
|
|
24
|
+
*/
|
|
14
25
|
const useUtilityClasses = props => {
|
|
15
26
|
const {
|
|
16
27
|
classes,
|
|
@@ -28,6 +39,10 @@ const useUtilityClasses = props => {
|
|
|
28
39
|
};
|
|
29
40
|
return (0, _composeClasses.default)(slots, getFunnelSectionUtilityClass, classes);
|
|
30
41
|
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `useUtilityClasses` from `funnelClasses` instead.
|
|
45
|
+
*/
|
|
31
46
|
exports.useUtilityClasses = useUtilityClasses;
|
|
32
47
|
const useLabelUtilityClasses = props => {
|
|
33
48
|
const {
|
|
@@ -40,5 +55,9 @@ const useLabelUtilityClasses = props => {
|
|
|
40
55
|
};
|
|
41
56
|
return (0, _composeClasses.default)(slots, getFunnelSectionUtilityClass, classes);
|
|
42
57
|
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated Use `funnelClasses` from `funnelClasses` instead.
|
|
61
|
+
*/
|
|
43
62
|
exports.useLabelUtilityClasses = useLabelUtilityClasses;
|
|
44
63
|
const funnelSectionClasses = exports.funnelSectionClasses = (0, _generateUtilityClasses.default)('MuiFunnelSection', ['root', 'highlighted', 'faded', 'filled', 'outlined', 'label', 'series', 'data-index']);
|
package/FunnelChart/index.d.ts
CHANGED
|
@@ -13,5 +13,7 @@ export * from "./FunnelChart.plugins.js";
|
|
|
13
13
|
export type { FunnelCurveType } from "./curves/index.js";
|
|
14
14
|
export { funnelSectionClasses } from "./funnelSectionClasses.js";
|
|
15
15
|
export type { FunnelSectionClasses } from "./funnelSectionClasses.js";
|
|
16
|
+
export { funnelClasses } from "./funnelClasses.js";
|
|
17
|
+
export type { FunnelClassKey, FunnelClasses } from "./funnelClasses.js";
|
|
16
18
|
export { FunnelSection } from "./FunnelSection.js";
|
|
17
19
|
export { FunnelSectionLabel } from "./FunnelSectionLabel.js";
|
package/FunnelChart/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var _exportNames = {
|
|
|
7
7
|
Unstable_FunnelChart: true,
|
|
8
8
|
FunnelChart: true,
|
|
9
9
|
funnelSectionClasses: true,
|
|
10
|
+
funnelClasses: true,
|
|
10
11
|
FunnelSection: true,
|
|
11
12
|
FunnelSectionLabel: true
|
|
12
13
|
};
|
|
@@ -29,6 +30,12 @@ Object.defineProperty(exports, "FunnelSectionLabel", {
|
|
|
29
30
|
}
|
|
30
31
|
});
|
|
31
32
|
exports.Unstable_FunnelChart = void 0;
|
|
33
|
+
Object.defineProperty(exports, "funnelClasses", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () {
|
|
36
|
+
return _funnelClasses.funnelClasses;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
32
39
|
Object.defineProperty(exports, "funnelSectionClasses", {
|
|
33
40
|
enumerable: true,
|
|
34
41
|
get: function () {
|
|
@@ -109,6 +116,7 @@ Object.keys(_FunnelChart2).forEach(function (key) {
|
|
|
109
116
|
});
|
|
110
117
|
});
|
|
111
118
|
var _funnelSectionClasses = require("./funnelSectionClasses");
|
|
119
|
+
var _funnelClasses = require("./funnelClasses");
|
|
112
120
|
var _FunnelSection = require("./FunnelSection");
|
|
113
121
|
var _FunnelSectionLabel = require("./FunnelSectionLabel");
|
|
114
122
|
/**
|
package/Heatmap/Heatmap.js
CHANGED
|
@@ -569,8 +569,8 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
569
569
|
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
570
570
|
type: _propTypes.default.oneOf(['doubleTapReset']).isRequired
|
|
571
571
|
}), _propTypes.default.shape({
|
|
572
|
-
pointerMode: _propTypes.default.
|
|
573
|
-
requiredKeys: _propTypes.default.
|
|
572
|
+
pointerMode: _propTypes.default.oneOf(['mouse', 'touch']),
|
|
573
|
+
requiredKeys: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
574
574
|
type: _propTypes.default.oneOf(['brush']).isRequired
|
|
575
575
|
})]).isRequired)
|
|
576
576
|
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SeriesId } from "../models/index.js";
|
|
3
|
+
import type { HeatmapClasses } from "./heatmapClasses.js";
|
|
4
|
+
export interface HeatmapCellOwnerState {
|
|
5
|
+
seriesId: SeriesId;
|
|
6
|
+
dataIndex: number;
|
|
7
|
+
color: string;
|
|
8
|
+
value: number;
|
|
9
|
+
isFaded: boolean;
|
|
10
|
+
isHighlighted: boolean;
|
|
11
|
+
classes?: Partial<HeatmapClasses>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use `HeatmapCellOwnerState` instead.
|
|
15
|
+
*/
|
|
16
|
+
export type HeatmapItemOwnerState = HeatmapCellOwnerState;
|
|
17
|
+
export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
ownerState: HeatmapCellOwnerState;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Demos:
|
|
26
|
+
*
|
|
27
|
+
* - [Heatmap](https://mui.com/x/react-charts/heatmap/)
|
|
28
|
+
*
|
|
29
|
+
* API:
|
|
30
|
+
*
|
|
31
|
+
* - [HeatmapCell API](https://mui.com/x/api/charts/heatmap-cell/)
|
|
32
|
+
*/
|
|
33
|
+
declare const HeatmapCell: React.ForwardRefExoticComponent<Omit<HeatmapCellProps, "ref"> & React.RefAttributes<SVGRectElement>>;
|
|
34
|
+
export { HeatmapCell };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.HeatmapCell = void 0;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _styles = require("@mui/material/styles");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `HeatmapCellOwnerState` instead.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const HeatmapCellRoot = (0, _styles.styled)('rect', {
|
|
20
|
+
name: 'MuiHeatmap',
|
|
21
|
+
slot: 'Cell',
|
|
22
|
+
overridesResolver: (_, styles) => styles.cell
|
|
23
|
+
})(({
|
|
24
|
+
ownerState
|
|
25
|
+
}) => ({
|
|
26
|
+
filter: ownerState.isHighlighted && 'saturate(120%)' || ownerState.isFaded && 'saturate(80%)' || undefined,
|
|
27
|
+
fill: ownerState.color,
|
|
28
|
+
shapeRendering: 'crispEdges'
|
|
29
|
+
}));
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Demos:
|
|
33
|
+
*
|
|
34
|
+
* - [Heatmap](https://mui.com/x/react-charts/heatmap/)
|
|
35
|
+
*
|
|
36
|
+
* API:
|
|
37
|
+
*
|
|
38
|
+
* - [HeatmapCell API](https://mui.com/x/api/charts/heatmap-cell/)
|
|
39
|
+
*/
|
|
40
|
+
const HeatmapCell = exports.HeatmapCell = /*#__PURE__*/React.forwardRef(function HeatmapCell(props, ref) {
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(HeatmapCellRoot, (0, _extends2.default)({
|
|
42
|
+
ref: ref
|
|
43
|
+
}, props));
|
|
44
|
+
});
|
|
45
|
+
if (process.env.NODE_ENV !== "production") HeatmapCell.displayName = "HeatmapCell";
|
|
46
|
+
process.env.NODE_ENV !== "production" ? HeatmapCell.propTypes = {
|
|
47
|
+
// ----------------------------- Warning --------------------------------
|
|
48
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
49
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
50
|
+
// ----------------------------------------------------------------------
|
|
51
|
+
height: _propTypes.default.number.isRequired,
|
|
52
|
+
ownerState: _propTypes.default.shape({
|
|
53
|
+
classes: _propTypes.default.object,
|
|
54
|
+
color: _propTypes.default.string.isRequired,
|
|
55
|
+
dataIndex: _propTypes.default.number.isRequired,
|
|
56
|
+
isFaded: _propTypes.default.bool.isRequired,
|
|
57
|
+
isHighlighted: _propTypes.default.bool.isRequired,
|
|
58
|
+
seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
|
|
59
|
+
value: _propTypes.default.number.isRequired
|
|
60
|
+
}).isRequired,
|
|
61
|
+
width: _propTypes.default.number.isRequired,
|
|
62
|
+
x: _propTypes.default.number.isRequired,
|
|
63
|
+
y: _propTypes.default.number.isRequired
|
|
64
|
+
} : void 0;
|
package/Heatmap/HeatmapItem.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import { type
|
|
3
|
+
import { type HeatmapCellProps } from "./HeatmapCell.js";
|
|
4
4
|
export interface HeatmapItemSlots {
|
|
5
5
|
/**
|
|
6
6
|
* The component that renders the heatmap cell.
|
|
@@ -33,13 +33,6 @@ export interface HeatmapItemProps {
|
|
|
33
33
|
*/
|
|
34
34
|
slots?: HeatmapItemSlots;
|
|
35
35
|
}
|
|
36
|
-
export interface HeatmapCellProps extends React.ComponentPropsWithRef<'rect'> {
|
|
37
|
-
x: number;
|
|
38
|
-
y: number;
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
ownerState: HeatmapItemOwnerState;
|
|
42
|
-
}
|
|
43
36
|
/**
|
|
44
37
|
* @ignore - internal component.
|
|
45
38
|
*/
|