@mui/x-charts 6.0.0-alpha.13 → 6.0.0-alpha.15
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/BarChart.d.ts +6 -3
- package/BarChart/BarChart.js +7 -10
- package/BarChart/BarElement.js +2 -4
- package/BarChart/formatter.js +1 -2
- package/BarChart/legend.js +1 -2
- package/CHANGELOG.md +165 -1
- package/ChartContainer/index.js +2 -3
- package/ChartsAxis/axisClasses.js +1 -2
- package/ChartsLegend/ChartsLegend.d.ts +43 -24
- package/ChartsLegend/ChartsLegend.js +186 -148
- package/ChartsLegend/chartsLegendClasses.js +1 -2
- package/ChartsLegend/utils.d.ts +1 -6
- package/ChartsSurface.js +5 -14
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -0
- package/ChartsTooltip/ChartsAxisTooltipContent.js +17 -8
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +3 -2
- package/ChartsTooltip/ChartsItemTooltipContent.js +16 -6
- package/ChartsTooltip/ChartsTooltip.d.ts +23 -0
- package/ChartsTooltip/ChartsTooltip.js +47 -13
- package/ChartsTooltip/ChartsTooltipTable.js +6 -11
- package/ChartsTooltip/tooltipClasses.js +1 -2
- package/ChartsXAxis/ChartsXAxis.js +48 -25
- package/ChartsYAxis/ChartsYAxis.js +47 -26
- package/LineChart/AreaElement.js +2 -4
- package/LineChart/LineChart.d.ts +6 -3
- package/LineChart/LineChart.js +11 -11
- package/LineChart/LineElement.js +2 -4
- package/LineChart/LineHighlightElement.js +1 -2
- package/LineChart/MarkElement.js +1 -2
- package/LineChart/formatter.js +1 -2
- package/LineChart/legend.js +1 -2
- package/PieChart/PieArc.d.ts +1 -0
- package/PieChart/PieArc.js +6 -4
- package/PieChart/PieArcLabel.js +1 -2
- package/PieChart/PieChart.d.ts +8 -4
- package/PieChart/PieChart.js +11 -10
- package/PieChart/PiePlot.d.ts +8 -0
- package/PieChart/PiePlot.js +21 -5
- package/PieChart/formatter.js +1 -2
- package/PieChart/legend.js +1 -2
- package/ResponsiveChartContainer/index.js +2 -3
- package/ScatterChart/ScatterChart.d.ts +6 -3
- package/ScatterChart/ScatterChart.js +7 -10
- package/ScatterChart/formatter.js +1 -2
- package/ScatterChart/legend.js +1 -2
- package/SparkLineChart/SparkLineChart.d.ts +3 -3
- package/SparkLineChart/SparkLineChart.js +7 -3
- package/colorPalettes/colorPalettes.js +6 -12
- package/constants.js +5 -8
- package/context/CartesianContextProvider.js +11 -12
- package/context/DrawingProvider.d.ts +2 -0
- package/context/DrawingProvider.js +4 -4
- package/context/HighlightProvider.js +1 -2
- package/context/InteractionProvider.js +1 -2
- package/context/SeriesContextProvider.js +1 -2
- package/esm/BarChart/BarChart.js +6 -8
- package/esm/ChartsLegend/ChartsLegend.js +184 -142
- package/esm/ChartsSurface.js +3 -11
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +17 -8
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +15 -6
- package/esm/ChartsTooltip/ChartsTooltip.js +47 -12
- package/esm/ChartsXAxis/ChartsXAxis.js +47 -24
- package/esm/ChartsYAxis/ChartsYAxis.js +46 -25
- package/esm/LineChart/LineChart.js +10 -9
- package/esm/PieChart/PieArc.js +5 -2
- package/esm/PieChart/PieChart.js +11 -10
- package/esm/PieChart/PiePlot.js +17 -2
- package/esm/ScatterChart/ScatterChart.js +6 -8
- package/esm/SparkLineChart/SparkLineChart.js +6 -1
- package/esm/constants.js +1 -1
- package/esm/context/CartesianContextProvider.js +11 -11
- package/esm/context/DrawingProvider.js +2 -0
- package/esm/hooks/useChartDimensions.js +2 -0
- package/esm/hooks/useTicks.js +5 -5
- package/esm/internals/components/AxisSharedComponents.js +15 -70
- package/esm/internals/components/ChartsText.js +71 -0
- package/esm/internals/domUtils.js +113 -0
- package/hooks/useChartDimensions.d.ts +2 -0
- package/hooks/useChartDimensions.js +3 -2
- package/hooks/useTicks.d.ts +2 -3
- package/hooks/useTicks.js +7 -8
- package/index.js +1 -1
- package/internals/components/AxisSharedComponents.d.ts +0 -4
- package/internals/components/AxisSharedComponents.js +18 -78
- package/internals/components/ChartsText.d.ts +32 -0
- package/internals/components/ChartsText.js +81 -0
- package/internals/defaultizeValueFormatter.js +1 -2
- package/internals/domUtils.d.ts +14 -0
- package/internals/domUtils.js +122 -0
- package/internals/stackSeries.js +2 -4
- package/legacy/BarChart/BarChart.js +6 -8
- package/legacy/ChartsLegend/ChartsLegend.js +196 -140
- package/legacy/ChartsSurface.js +2 -11
- package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +17 -8
- package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +15 -6
- package/legacy/ChartsTooltip/ChartsTooltip.js +50 -12
- package/legacy/ChartsXAxis/ChartsXAxis.js +47 -24
- package/legacy/ChartsYAxis/ChartsYAxis.js +46 -25
- package/legacy/LineChart/LineChart.js +10 -9
- package/legacy/PieChart/PieArc.js +4 -1
- package/legacy/PieChart/PieChart.js +11 -10
- package/legacy/PieChart/PiePlot.js +17 -2
- package/legacy/ScatterChart/ScatterChart.js +6 -8
- package/legacy/SparkLineChart/SparkLineChart.js +6 -1
- package/legacy/constants.js +1 -1
- package/legacy/context/CartesianContextProvider.js +11 -11
- package/legacy/context/DrawingProvider.js +2 -0
- package/legacy/hooks/useChartDimensions.js +2 -0
- package/legacy/hooks/useTicks.js +5 -5
- package/legacy/index.js +1 -1
- package/legacy/internals/components/AxisSharedComponents.js +9 -63
- package/legacy/internals/components/ChartsText.js +77 -0
- package/legacy/internals/domUtils.js +121 -0
- package/models/axis.d.ts +6 -5
- package/models/layout.d.ts +7 -6
- package/modern/BarChart/BarChart.js +6 -8
- package/modern/ChartsLegend/ChartsLegend.js +184 -142
- package/modern/ChartsSurface.js +3 -11
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +17 -8
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +15 -6
- package/modern/ChartsTooltip/ChartsTooltip.js +46 -12
- package/modern/ChartsXAxis/ChartsXAxis.js +47 -24
- package/modern/ChartsYAxis/ChartsYAxis.js +46 -25
- package/modern/LineChart/LineChart.js +10 -9
- package/modern/PieChart/PieArc.js +5 -2
- package/modern/PieChart/PieChart.js +11 -10
- package/modern/PieChart/PiePlot.js +17 -2
- package/modern/ScatterChart/ScatterChart.js +6 -8
- package/modern/SparkLineChart/SparkLineChart.js +6 -1
- package/modern/constants.js +1 -1
- package/modern/context/CartesianContextProvider.js +11 -11
- package/modern/context/DrawingProvider.js +2 -0
- package/modern/hooks/useChartDimensions.js +2 -0
- package/modern/hooks/useTicks.js +5 -5
- package/modern/index.js +1 -1
- package/modern/internals/components/AxisSharedComponents.js +15 -70
- package/modern/internals/components/ChartsText.js +71 -0
- package/modern/internals/domUtils.js +113 -0
- package/package.json +3 -3
package/BarChart/BarChart.d.ts
CHANGED
|
@@ -4,18 +4,21 @@ import { ResponsiveChartContainerProps } from '../ResponsiveChartContainer';
|
|
|
4
4
|
import { ChartsAxisProps } from '../ChartsAxis';
|
|
5
5
|
import { BarSeriesType } from '../models/seriesType/bar';
|
|
6
6
|
import { MakeOptional } from '../models/helpers';
|
|
7
|
-
import { ChartsTooltipProps } from '../ChartsTooltip';
|
|
7
|
+
import { ChartsTooltipProps, ChartsTooltipSlotComponentProps, ChartsTooltipSlotsComponent } from '../ChartsTooltip';
|
|
8
8
|
import { ChartsLegendProps, ChartsLegendSlotsComponent, ChartsLegendSlotComponentProps } from '../ChartsLegend';
|
|
9
9
|
import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight';
|
|
10
10
|
import { ChartsAxisSlotsComponent, ChartsAxisSlotComponentProps } from '../models/axis';
|
|
11
|
-
export interface BarChartSlotsComponent extends ChartsAxisSlotsComponent, BarPlotSlotsComponent, ChartsLegendSlotsComponent {
|
|
11
|
+
export interface BarChartSlotsComponent extends ChartsAxisSlotsComponent, BarPlotSlotsComponent, ChartsLegendSlotsComponent, ChartsTooltipSlotsComponent {
|
|
12
12
|
}
|
|
13
|
-
export interface BarChartSlotComponentProps extends ChartsAxisSlotComponentProps, BarPlotSlotComponentProps, ChartsLegendSlotComponentProps {
|
|
13
|
+
export interface BarChartSlotComponentProps extends ChartsAxisSlotComponentProps, BarPlotSlotComponentProps, ChartsLegendSlotComponentProps, ChartsTooltipSlotComponentProps {
|
|
14
14
|
}
|
|
15
15
|
export interface BarChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'> {
|
|
16
16
|
series: MakeOptional<BarSeriesType, 'type'>[];
|
|
17
17
|
tooltip?: ChartsTooltipProps;
|
|
18
18
|
axisHighlight?: ChartsAxisHighlightProps;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Consider using `slotProps.legend` instead.
|
|
21
|
+
*/
|
|
19
22
|
legend?: ChartsLegendProps;
|
|
20
23
|
/**
|
|
21
24
|
* Overridable component slots.
|
package/BarChart/BarChart.js
CHANGED
|
@@ -20,7 +20,7 @@ var _ChartsClipPath = require("../ChartsClipPath");
|
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(props, ref) {
|
|
23
|
+
const BarChart = exports.BarChart = /*#__PURE__*/React.forwardRef(function BarChart(props, ref) {
|
|
24
24
|
const {
|
|
25
25
|
xAxis,
|
|
26
26
|
yAxis,
|
|
@@ -101,7 +101,6 @@ const BarChart = /*#__PURE__*/React.forwardRef(function BarChart(props, ref) {
|
|
|
101
101
|
}), children]
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
|
-
exports.BarChart = BarChart;
|
|
105
104
|
process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
106
105
|
// ----------------------------- Warning --------------------------------
|
|
107
106
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -168,23 +167,19 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
168
167
|
tickNumber: _propTypes.default.number,
|
|
169
168
|
tickSize: _propTypes.default.number
|
|
170
169
|
}), _propTypes.default.string]),
|
|
170
|
+
/**
|
|
171
|
+
* @deprecated Consider using `slotProps.legend` instead.
|
|
172
|
+
*/
|
|
171
173
|
legend: _propTypes.default.shape({
|
|
172
174
|
classes: _propTypes.default.object,
|
|
173
175
|
direction: _propTypes.default.oneOf(['column', 'row']),
|
|
174
176
|
hidden: _propTypes.default.bool,
|
|
175
|
-
itemWidth: _propTypes.default.number,
|
|
176
|
-
markSize: _propTypes.default.number,
|
|
177
|
-
offset: _propTypes.default.shape({
|
|
178
|
-
x: _propTypes.default.number,
|
|
179
|
-
y: _propTypes.default.number
|
|
180
|
-
}),
|
|
181
177
|
position: _propTypes.default.shape({
|
|
182
178
|
horizontal: _propTypes.default.oneOf(['left', 'middle', 'right']).isRequired,
|
|
183
179
|
vertical: _propTypes.default.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
184
180
|
}),
|
|
185
181
|
slotProps: _propTypes.default.object,
|
|
186
|
-
slots: _propTypes.default.object
|
|
187
|
-
spacing: _propTypes.default.number
|
|
182
|
+
slots: _propTypes.default.object
|
|
188
183
|
}),
|
|
189
184
|
margin: _propTypes.default.shape({
|
|
190
185
|
bottom: _propTypes.default.number,
|
|
@@ -250,6 +245,8 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
250
245
|
axisContent: _propTypes.default.elementType,
|
|
251
246
|
classes: _propTypes.default.object,
|
|
252
247
|
itemContent: _propTypes.default.elementType,
|
|
248
|
+
slotProps: _propTypes.default.object,
|
|
249
|
+
slots: _propTypes.default.object,
|
|
253
250
|
trigger: _propTypes.default.oneOf(['axis', 'item', 'none'])
|
|
254
251
|
}),
|
|
255
252
|
/**
|
package/BarChart/BarElement.js
CHANGED
|
@@ -26,8 +26,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
26
26
|
function getBarElementUtilityClass(slot) {
|
|
27
27
|
return (0, _generateUtilityClass.default)('MuiBarElement', slot);
|
|
28
28
|
}
|
|
29
|
-
const lineElementClasses = (0, _generateUtilityClasses.default)('MuiBarElement', ['root']);
|
|
30
|
-
exports.lineElementClasses = lineElementClasses;
|
|
29
|
+
const lineElementClasses = exports.lineElementClasses = (0, _generateUtilityClasses.default)('MuiBarElement', ['root']);
|
|
31
30
|
const useUtilityClasses = ownerState => {
|
|
32
31
|
const {
|
|
33
32
|
classes,
|
|
@@ -38,7 +37,7 @@ const useUtilityClasses = ownerState => {
|
|
|
38
37
|
};
|
|
39
38
|
return (0, _composeClasses.default)(slots, getBarElementUtilityClass, classes);
|
|
40
39
|
};
|
|
41
|
-
const BarElementPath = (0, _styles.styled)('rect', {
|
|
40
|
+
const BarElementPath = exports.BarElementPath = (0, _styles.styled)('rect', {
|
|
42
41
|
name: 'MuiBarElement',
|
|
43
42
|
slot: 'Root',
|
|
44
43
|
overridesResolver: (_, styles) => styles.root
|
|
@@ -51,7 +50,6 @@ const BarElementPath = (0, _styles.styled)('rect', {
|
|
|
51
50
|
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in',
|
|
52
51
|
opacity: ownerState.isFaded && 0.3 || 1
|
|
53
52
|
}));
|
|
54
|
-
exports.BarElementPath = BarElementPath;
|
|
55
53
|
function BarElement(props) {
|
|
56
54
|
const {
|
|
57
55
|
id,
|
package/BarChart/formatter.js
CHANGED
package/BarChart/legend.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,170 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 6.16.2
|
|
7
|
+
|
|
8
|
+
_Oct 12, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 📊 Chart's legend text management has been reworked and contains breaking changes (#10138) @alexfauquette
|
|
13
|
+
- 📝 Add [Bulk editing](https://mui.com/x/react-data-grid/recipes-editing/#bulk-editing) demo (#10333) @cherniavskii
|
|
14
|
+
- 🚀 Column grouping now works smoothly with column pinning (#10518) @MBilalShafi
|
|
15
|
+
- 🌍 Improve Arabic (ar-SD) and Spanish (es-ES) locales
|
|
16
|
+
- 🐞 Bugfixes
|
|
17
|
+
- 📚 Documentation improvements
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@6.16.2`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Fix `LazyLoading` demo crash (#10621) @MBilalShafi
|
|
24
|
+
- [DataGrid] Fix cells overlapping the scrollbar in iOS Safari (#10633) @cherniavskii
|
|
25
|
+
- [DataGrid] Fix `getRowId is not defined` error (#10613) @romgrk
|
|
26
|
+
- [DataGrid] Get quick filter to work OOTB with `date` and `dateTime` fields (#10636) @MBilalShafi
|
|
27
|
+
- [DataGrid] Make cursor for selectable cells to be `default` unless editable (#9997) @gitstart
|
|
28
|
+
- [DataGrid] Remove unnecessary syntax in JSDoc (#10567) @Lev-Shapiro
|
|
29
|
+
- [DataGrid] Update row hover behavior to match native hover (#10623) @cherniavskii
|
|
30
|
+
- [l10n] Improve Arabic (ar-SD) locale (#10625) @alabenyahia
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@6.16.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@6.16.2`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Improve column grouping and column pinning friendship (#10518) @MBilalShafi
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-premium@6.16.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid-pro@6.16.2`.
|
|
41
|
+
|
|
42
|
+
### Date Pickers
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-date-pickers@6.16.2`
|
|
45
|
+
|
|
46
|
+
- [DateTimePicker] Add support for `DigitalClock` view renderer (#10624) @LukasTy
|
|
47
|
+
- [fields] Bootstrap the multi-HTML input component (#10638) @flaviendelangle
|
|
48
|
+
- [pickers] Fix timezone `UTC` false positive (#10586) @alexfauquette
|
|
49
|
+
- [l10n] Improve Spanish (es-ES) locale (#10588) @eduardodallmann
|
|
50
|
+
|
|
51
|
+
#### `@mui/x-date-pickers-pro@6.16.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
52
|
+
|
|
53
|
+
Same changes as in `@mui/x-date-pickers@6.16.2`.
|
|
54
|
+
|
|
55
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.15`
|
|
56
|
+
|
|
57
|
+
#### Breaking changes
|
|
58
|
+
|
|
59
|
+
The charts have a new text display mechanism.
|
|
60
|
+
It adds line break support and avoids overlapping text in the legend.
|
|
61
|
+
This comes with some breaking changes.
|
|
62
|
+
|
|
63
|
+
- The DOM structure is modified. An intermediary `<tspan />` element has been added. This can impact how your style is applied.
|
|
64
|
+
```diff
|
|
65
|
+
- <text>The label</text>
|
|
66
|
+
+ <text><tspan>The label</tspan></text>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- The top margin has been reduced from 100 to 50 to benefit from the denser legend.
|
|
70
|
+
|
|
71
|
+
- To accurately compute the text size and then place it, styling should be provided as a JS object. For example, to set the legend font size, you should do:
|
|
72
|
+
```jsx
|
|
73
|
+
<PieChart
|
|
74
|
+
{/** ... */}
|
|
75
|
+
slotProps={{
|
|
76
|
+
legend: {
|
|
77
|
+
labelStyle: {
|
|
78
|
+
fontSize: 16,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
}}
|
|
82
|
+
/>
|
|
83
|
+
```
|
|
84
|
+
Support for other text elements (axis labels and tick labels) will be implemented in follow-up PR.
|
|
85
|
+
|
|
86
|
+
#### Changes
|
|
87
|
+
|
|
88
|
+
- [charts] Fix typo between internal/external variable (#10640) @alexfauquette
|
|
89
|
+
- [charts] Improve the management of the text (#10138) @alexfauquette
|
|
90
|
+
|
|
91
|
+
### Docs
|
|
92
|
+
|
|
93
|
+
- [docs] Add bulk editing demo (#10333) @cherniavskii
|
|
94
|
+
- [docs] Add reference links to DateRangePicker components (#10629) @michelengelen
|
|
95
|
+
- [docs] Add reference links to DateTimePicker components (#10628) @michelengelen
|
|
96
|
+
- [docs] Add reference links to picker field components (#10631) @michelengelen
|
|
97
|
+
- [docs] Added reference links to TimePicker components (#10627) @michelengelen
|
|
98
|
+
- [docs] Avoid Pickers playground error due to empty views (#10654) @LukasTy
|
|
99
|
+
- [docs] Fix DataGrid[Pro/Premium] reference links (#10620) @michelengelen
|
|
100
|
+
|
|
101
|
+
### Core
|
|
102
|
+
|
|
103
|
+
- [core] Bump monorepo (#10619) @alexfauquette
|
|
104
|
+
- [core] Update `no-response` workflow (#10491) @MBilalShafi
|
|
105
|
+
- [core] Update the issue templates to reflect the new support workflow (#10651) @MBilalShafi
|
|
106
|
+
- [test] Fix `testEval` not invoking test assertions (#10587) @cherniavskii
|
|
107
|
+
- [test] Fix dev mode warning (#10610) @oliviertassinari
|
|
108
|
+
- [test] Set UUID chance seed in visual tests (#10609) @oliviertassinari
|
|
109
|
+
|
|
110
|
+
## 6.16.1
|
|
111
|
+
|
|
112
|
+
_Oct 6, 2023_
|
|
113
|
+
|
|
114
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
115
|
+
|
|
116
|
+
- 🥧 Support interaction with pie chart
|
|
117
|
+
- 🐞 Bugfixes
|
|
118
|
+
- 📚 Documentation improvements
|
|
119
|
+
|
|
120
|
+
### Data Grid
|
|
121
|
+
|
|
122
|
+
#### `@mui/x-data-grid@6.16.1`
|
|
123
|
+
|
|
124
|
+
- [DataGrid] Add a new demo with sparklines (#9228) @flaviendelangle
|
|
125
|
+
- [DataGrid] Fix autosize missing a few pixels (#10471) @romgrk
|
|
126
|
+
- [DataGrid] Make `disableColumnSelector` demo idempotent (#10548) @MBilalShafi
|
|
127
|
+
|
|
128
|
+
#### `@mui/x-data-grid-pro@6.16.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
129
|
+
|
|
130
|
+
Same changes as in `@mui/x-data-grid@6.16.1`.
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-data-grid-premium@6.16.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-data-grid-pro@6.16.1`.
|
|
135
|
+
|
|
136
|
+
### Date Pickers
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-date-pickers@6.16.1`
|
|
139
|
+
|
|
140
|
+
- [pickers] Avoid calendar layout shifting when changing views (#10541) @LukasTy
|
|
141
|
+
- [pickers] Fix clearable behavior when disabled (#10542) @noraleonte
|
|
142
|
+
- [pickers] Improve customization playground examples (#10544) @noraleonte
|
|
143
|
+
|
|
144
|
+
#### `@mui/x-date-pickers-pro@6.16.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
145
|
+
|
|
146
|
+
Same changes as in `@mui/x-date-pickers@6.16.1`, plus:
|
|
147
|
+
|
|
148
|
+
- [DateRangePicker] Fix `InputProps` propagation in multi input (#10564) @alexfauquette
|
|
149
|
+
|
|
150
|
+
### Charts / `@mui/x-charts@6.0.0-alpha.14`
|
|
151
|
+
|
|
152
|
+
- [charts] Display cursor pointer for pie chart only if `onClick` is provided (#10551) @giladappsforce
|
|
153
|
+
- [charts] Add `onClick` prop to PieChart (#10506) @giladappsforce
|
|
154
|
+
- [charts] Support `slots`/`slotProps` for the tooltip (#10515) @alexfauquette
|
|
155
|
+
|
|
156
|
+
### Docs
|
|
157
|
+
|
|
158
|
+
- [docs] Add `DateRangePicker` example with a `Button` trigger (#10485) @LukasTy
|
|
159
|
+
- [docs] Add section about disabling columns panel (#10328) @MBilalShafi
|
|
160
|
+
- [docs] Add section about overriding slots to base concepts (#10421) @noraleonte
|
|
161
|
+
- [docs] Add "What's new" page listing all release announcements (#9727) @joserodolfofreitas
|
|
162
|
+
- [docs] Update RTL Support section of the grid localization docs (#10561) @MBilalShafi
|
|
163
|
+
|
|
164
|
+
### Core
|
|
165
|
+
|
|
166
|
+
- [core] Fix casing consistency with legal and marketing content @oliviertassinari
|
|
167
|
+
- [core] Revert the link in the priority support ticket description (#10517) @michelengelen
|
|
168
|
+
- [CHANGELOG] Polish image @oliviertassinari
|
|
169
|
+
|
|
6
170
|
## 6.16.0
|
|
7
171
|
|
|
8
172
|
_Sep 29, 2023_
|
|
@@ -13,7 +177,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
|
|
|
13
177
|
|
|
14
178
|
The pickers and fields now have an out-of-the box implementation for clearing the field value. You can see the documentation for this behavior on the [Date Picker documentation](https://mui.com/x/react-date-pickers/date-picker/#clearing-the-value).
|
|
15
179
|
|
|
16
|
-
<img width="
|
|
180
|
+
<img width="337" height="139" alt="Clearable behavior" src="https://github.com/mui/mui-x/assets/3165635/a5407cb6-0b8a-443c-b4b9-1f81ceb4d087">
|
|
17
181
|
|
|
18
182
|
- 💫 Add Date Picker customization playground (#9581) @noraleonte
|
|
19
183
|
|
package/ChartContainer/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var _HighlightProvider = require("../context/HighlightProvider");
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(props, ref) {
|
|
19
|
+
const ChartContainer = exports.ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(props, ref) {
|
|
20
20
|
const {
|
|
21
21
|
width,
|
|
22
22
|
height,
|
|
@@ -64,5 +64,4 @@ const ChartContainer = /*#__PURE__*/React.forwardRef(function ChartContainer(pro
|
|
|
64
64
|
})
|
|
65
65
|
})
|
|
66
66
|
});
|
|
67
|
-
});
|
|
68
|
-
exports.ChartContainer = ChartContainer;
|
|
67
|
+
});
|
|
@@ -9,5 +9,4 @@ var _utils = require("@mui/utils");
|
|
|
9
9
|
function getAxisUtilityClass(slot) {
|
|
10
10
|
return (0, _utils.unstable_generateUtilityClass)('MuiChartsAxis', slot);
|
|
11
11
|
}
|
|
12
|
-
const axisClasses = (0, _utils.unstable_generateUtilityClasses)('MuiChartsAxis', ['root', 'line', 'tickContainer', 'tick', 'tickLabel', 'label', 'directionX', 'directionY', 'top', 'bottom', 'left', 'right']);
|
|
13
|
-
exports.axisClasses = axisClasses;
|
|
12
|
+
const axisClasses = exports.axisClasses = (0, _utils.unstable_generateUtilityClasses)('MuiChartsAxis', ['root', 'line', 'tickContainer', 'tick', 'tickLabel', 'label', 'directionX', 'directionY', 'top', 'bottom', 'left', 'right']);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Theme } from '@mui/material/styles';
|
|
3
3
|
import { DrawingArea } from '../context/DrawingProvider';
|
|
4
|
-
import { AnchorPosition,
|
|
4
|
+
import { AnchorPosition, Direction } from './utils';
|
|
5
5
|
import { FormattedSeries } from '../context/SeriesContextProvider';
|
|
6
6
|
import { ChartsLegendClasses } from './chartsLegendClasses';
|
|
7
7
|
import { DefaultizedProps } from '../models/helpers';
|
|
8
|
-
import {
|
|
8
|
+
import { LegendParams } from '../models/seriesType/config';
|
|
9
|
+
import { CardinalDirections } from '../models/layout';
|
|
9
10
|
export interface ChartsLegendSlotsComponent {
|
|
10
11
|
legend?: React.JSXElementConstructor<LegendRendererProps>;
|
|
11
12
|
}
|
|
@@ -14,10 +15,6 @@ export interface ChartsLegendSlotComponentProps {
|
|
|
14
15
|
}
|
|
15
16
|
export type ChartsLegendProps = {
|
|
16
17
|
position?: AnchorPosition;
|
|
17
|
-
offset?: Partial<{
|
|
18
|
-
x: number;
|
|
19
|
-
y: number;
|
|
20
|
-
}>;
|
|
21
18
|
/**
|
|
22
19
|
* Override or extend the styles applied to the component.
|
|
23
20
|
*/
|
|
@@ -26,6 +23,11 @@ export type ChartsLegendProps = {
|
|
|
26
23
|
* Set to true to hide the legend.
|
|
27
24
|
*/
|
|
28
25
|
hidden?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The direction of the legend layout.
|
|
28
|
+
* The default depends on the chart.
|
|
29
|
+
*/
|
|
30
|
+
direction?: Direction;
|
|
29
31
|
/**
|
|
30
32
|
* Overridable component slots.
|
|
31
33
|
* @default {}
|
|
@@ -36,36 +38,53 @@ export type ChartsLegendProps = {
|
|
|
36
38
|
* @default {}
|
|
37
39
|
*/
|
|
38
40
|
slotProps?: ChartsLegendSlotComponentProps;
|
|
39
|
-
} & SizingParams;
|
|
40
|
-
type DefaultizedChartsLegendProps = DefaultizedProps<ChartsLegendProps, 'direction' | 'position'>;
|
|
41
|
-
type SeriesLegendOwnerState = ChartSeriesDefaultized<any> & Pick<DefaultizedChartsLegendProps, 'direction'> & {
|
|
42
|
-
seriesIndex: number;
|
|
43
41
|
};
|
|
42
|
+
type DefaultizedChartsLegendProps = DefaultizedProps<ChartsLegendProps, 'direction' | 'position'>;
|
|
44
43
|
export type ChartsLegendRootOwnerState = {
|
|
45
44
|
position: AnchorPosition;
|
|
46
|
-
direction:
|
|
45
|
+
direction: Direction;
|
|
47
46
|
drawingArea: DrawingArea;
|
|
48
47
|
offsetX?: number;
|
|
49
48
|
offsetY?: number;
|
|
50
49
|
seriesNumber: number;
|
|
51
50
|
};
|
|
52
|
-
export declare const ChartsLegendRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme
|
|
53
|
-
ownerState: ChartsLegendRootOwnerState;
|
|
54
|
-
}, Pick<React.SVGProps<SVGGElement>, keyof React.SVGProps<SVGGElement>>, {}>;
|
|
55
|
-
export declare const ChartsSeriesLegendGroup: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
56
|
-
ownerState: SeriesLegendOwnerState;
|
|
57
|
-
}, Pick<React.SVGProps<SVGGElement>, keyof React.SVGProps<SVGGElement>>, {}>;
|
|
58
|
-
export declare const ChartsLegendMark: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
59
|
-
ownerState: {
|
|
60
|
-
color: string;
|
|
61
|
-
};
|
|
62
|
-
}, Pick<React.SVGProps<SVGRectElement>, keyof React.SVGProps<SVGRectElement>>, {}>;
|
|
63
|
-
export declare const ChartsLegendLabel: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, Pick<React.SVGTextElementAttributes<SVGTextElement>, keyof React.SVGTextElementAttributes<SVGTextElement>>, {}>;
|
|
51
|
+
export declare const ChartsLegendRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<Theme>, Pick<React.SVGProps<SVGGElement>, keyof React.SVGProps<SVGGElement>>, {}>;
|
|
64
52
|
export interface LegendRendererProps extends Omit<DefaultizedChartsLegendProps, 'slots' | 'slotProps'> {
|
|
65
53
|
series: FormattedSeries;
|
|
66
54
|
seriesToDisplay: LegendParams[];
|
|
67
55
|
drawingArea: DrawingArea;
|
|
68
|
-
classes: Record<'
|
|
56
|
+
classes: Record<'mark' | 'series' | 'root', string>;
|
|
57
|
+
/**
|
|
58
|
+
* Style applied to legend labels.
|
|
59
|
+
* @default theme.typography.subtitle1
|
|
60
|
+
*/
|
|
61
|
+
labelStyle?: React.CSSProperties;
|
|
62
|
+
/**
|
|
63
|
+
* Width of the item mark (in px).
|
|
64
|
+
* @default 20
|
|
65
|
+
*/
|
|
66
|
+
itemMarkWidth?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Height of the item mark (in px).
|
|
69
|
+
* @default 20
|
|
70
|
+
*/
|
|
71
|
+
itemMarkHeight?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Space between the mark and the label (in px).
|
|
74
|
+
* @default 5
|
|
75
|
+
*/
|
|
76
|
+
markGap?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Space between two legend items (in px).
|
|
79
|
+
* @default 10
|
|
80
|
+
*/
|
|
81
|
+
itemGap?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Legend padding (in px).
|
|
84
|
+
* Can either be a single number, or an object with top, left, bottom, right properties.
|
|
85
|
+
* @default 0
|
|
86
|
+
*/
|
|
87
|
+
padding?: number | Partial<CardinalDirections<number>>;
|
|
69
88
|
}
|
|
70
89
|
export declare function ChartsLegend(inProps: ChartsLegendProps): React.JSX.Element;
|
|
71
90
|
export {};
|