@mui/x-charts 7.0.0-alpha.2 → 7.0.0-alpha.3

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.
Files changed (100) hide show
  1. package/BarChart/BarElement.d.ts +5 -1
  2. package/BarChart/BarElement.js +24 -1
  3. package/BarChart/index.d.ts +2 -1
  4. package/BarChart/index.js +15 -4
  5. package/CHANGELOG.md +241 -0
  6. package/ChartsLegend/index.d.ts +1 -0
  7. package/ChartsLegend/index.js +11 -0
  8. package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +5 -2
  9. package/ChartsTooltip/ChartsAxisTooltipContent.js +93 -73
  10. package/ChartsTooltip/ChartsItemTooltipContent.d.ts +5 -2
  11. package/ChartsTooltip/ChartsItemTooltipContent.js +38 -57
  12. package/ChartsTooltip/DefaultChartsAxisTooltipContent.d.ts +7 -0
  13. package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +174 -0
  14. package/ChartsTooltip/DefaultChartsItemTooltipContent.d.ts +8 -0
  15. package/ChartsTooltip/DefaultChartsItemTooltipContent.js +99 -0
  16. package/ChartsTooltip/index.d.ts +4 -0
  17. package/ChartsTooltip/index.js +44 -0
  18. package/ChartsYAxis/ChartsYAxis.js +6 -4
  19. package/LineChart/extremums.js +25 -8
  20. package/LineChart/index.d.ts +1 -1
  21. package/LineChart/index.js +11 -11
  22. package/PieChart/PieArc.d.ts +5 -2
  23. package/PieChart/PieArc.js +17 -2
  24. package/PieChart/PieArcLabel.d.ts +1 -1
  25. package/PieChart/PieArcLabel.js +5 -10
  26. package/PieChart/PieArcLabelPlot.d.ts +5 -1
  27. package/PieChart/PieArcLabelPlot.js +91 -3
  28. package/PieChart/PieArcPlot.d.ts +5 -1
  29. package/PieChart/PieArcPlot.js +90 -3
  30. package/PieChart/index.d.ts +3 -1
  31. package/PieChart/index.js +26 -4
  32. package/README.md +0 -1
  33. package/ScatterChart/Scatter.js +1 -1
  34. package/ScatterChart/index.d.ts +1 -1
  35. package/ScatterChart/index.js +8 -8
  36. package/esm/BarChart/BarElement.js +26 -2
  37. package/esm/BarChart/index.js +2 -1
  38. package/esm/ChartsLegend/index.js +2 -1
  39. package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +95 -75
  40. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +40 -58
  41. package/esm/ChartsTooltip/DefaultChartsAxisTooltipContent.js +168 -0
  42. package/esm/ChartsTooltip/DefaultChartsItemTooltipContent.js +92 -0
  43. package/esm/ChartsTooltip/index.js +5 -1
  44. package/esm/ChartsYAxis/ChartsYAxis.js +6 -4
  45. package/esm/LineChart/extremums.js +25 -8
  46. package/esm/LineChart/index.js +1 -1
  47. package/esm/PieChart/PieArc.js +18 -2
  48. package/esm/PieChart/PieArcLabel.js +7 -11
  49. package/esm/PieChart/PieArcLabelPlot.js +92 -3
  50. package/esm/PieChart/PieArcPlot.js +91 -3
  51. package/esm/PieChart/index.js +3 -1
  52. package/esm/ScatterChart/Scatter.js +1 -1
  53. package/esm/ScatterChart/index.js +1 -1
  54. package/esm/internals/defaultizeValueFormatter.js +4 -3
  55. package/index.js +1 -1
  56. package/internals/defaultizeValueFormatter.d.ts +3 -1
  57. package/internals/defaultizeValueFormatter.js +3 -3
  58. package/legacy/BarChart/BarElement.js +26 -2
  59. package/legacy/BarChart/index.js +2 -1
  60. package/legacy/ChartsLegend/index.js +2 -1
  61. package/legacy/ChartsTooltip/ChartsAxisTooltipContent.js +95 -74
  62. package/legacy/ChartsTooltip/ChartsItemTooltipContent.js +40 -55
  63. package/legacy/ChartsTooltip/DefaultChartsAxisTooltipContent.js +167 -0
  64. package/legacy/ChartsTooltip/DefaultChartsItemTooltipContent.js +89 -0
  65. package/legacy/ChartsTooltip/index.js +5 -1
  66. package/legacy/ChartsYAxis/ChartsYAxis.js +6 -4
  67. package/legacy/LineChart/extremums.js +29 -14
  68. package/legacy/LineChart/index.js +1 -1
  69. package/legacy/PieChart/PieArc.js +18 -2
  70. package/legacy/PieChart/PieArcLabel.js +7 -11
  71. package/legacy/PieChart/PieArcLabelPlot.js +92 -3
  72. package/legacy/PieChart/PieArcPlot.js +91 -3
  73. package/legacy/PieChart/index.js +3 -1
  74. package/legacy/ScatterChart/Scatter.js +1 -1
  75. package/legacy/ScatterChart/index.js +1 -1
  76. package/legacy/index.js +1 -1
  77. package/legacy/internals/defaultizeValueFormatter.js +4 -3
  78. package/models/seriesType/config.d.ts +5 -1
  79. package/models/seriesType/scatter.d.ts +1 -1
  80. package/modern/BarChart/BarElement.js +26 -2
  81. package/modern/BarChart/index.js +2 -1
  82. package/modern/ChartsLegend/index.js +2 -1
  83. package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +95 -74
  84. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +40 -58
  85. package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +167 -0
  86. package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +92 -0
  87. package/modern/ChartsTooltip/index.js +5 -1
  88. package/modern/ChartsYAxis/ChartsYAxis.js +6 -4
  89. package/modern/LineChart/extremums.js +25 -8
  90. package/modern/LineChart/index.js +1 -1
  91. package/modern/PieChart/PieArc.js +18 -2
  92. package/modern/PieChart/PieArcLabel.js +7 -11
  93. package/modern/PieChart/PieArcLabelPlot.js +92 -3
  94. package/modern/PieChart/PieArcPlot.js +91 -3
  95. package/modern/PieChart/index.js +3 -1
  96. package/modern/ScatterChart/Scatter.js +1 -1
  97. package/modern/ScatterChart/index.js +1 -1
  98. package/modern/index.js +1 -1
  99. package/modern/internals/defaultizeValueFormatter.js +3 -3
  100. package/package.json +2 -2
@@ -1355,4 +1355,8 @@ export type BarElementProps = Omit<BarElementOwnerState, 'isFaded' | 'isHighligh
1355
1355
  bar?: React.ElementType;
1356
1356
  };
1357
1357
  };
1358
- export declare function BarElement(props: BarElementProps): React.JSX.Element;
1358
+ declare function BarElement(props: BarElementProps): React.JSX.Element;
1359
+ declare namespace BarElement {
1360
+ var propTypes: any;
1361
+ }
1362
+ export { BarElement };
@@ -10,6 +10,7 @@ exports.getBarElementUtilityClass = getBarElementUtilityClass;
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"));
13
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
14
15
  var _utils = require("@mui/base/utils");
15
16
  var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
@@ -100,4 +101,26 @@ function BarElement(props) {
100
101
  ownerState
101
102
  });
102
103
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Bar, (0, _extends2.default)({}, barProps));
103
- }
104
+ }
105
+ process.env.NODE_ENV !== "production" ? BarElement.propTypes = {
106
+ // ----------------------------- Warning --------------------------------
107
+ // | These PropTypes are generated from the TypeScript type definitions |
108
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
109
+ // ----------------------------------------------------------------------
110
+ classes: _propTypes.default.object,
111
+ dataIndex: _propTypes.default.number.isRequired,
112
+ highlightScope: _propTypes.default.shape({
113
+ faded: _propTypes.default.oneOf(['global', 'none', 'series']),
114
+ highlighted: _propTypes.default.oneOf(['item', 'none', 'series'])
115
+ }),
116
+ /**
117
+ * The props used for each component slot.
118
+ * @default {}
119
+ */
120
+ slotProps: _propTypes.default.object,
121
+ /**
122
+ * Overridable component slots.
123
+ * @default {}
124
+ */
125
+ slots: _propTypes.default.object
126
+ } : void 0;
@@ -1,2 +1,3 @@
1
- export * from './BarPlot';
2
1
  export * from './BarChart';
2
+ export * from './BarPlot';
3
+ export * from './BarElement';
package/BarChart/index.js CHANGED
@@ -3,6 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _BarChart = require("./BarChart");
7
+ Object.keys(_BarChart).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _BarChart[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _BarChart[key];
14
+ }
15
+ });
16
+ });
6
17
  var _BarPlot = require("./BarPlot");
7
18
  Object.keys(_BarPlot).forEach(function (key) {
8
19
  if (key === "default" || key === "__esModule") return;
@@ -14,14 +25,14 @@ Object.keys(_BarPlot).forEach(function (key) {
14
25
  }
15
26
  });
16
27
  });
17
- var _BarChart = require("./BarChart");
18
- Object.keys(_BarChart).forEach(function (key) {
28
+ var _BarElement = require("./BarElement");
29
+ Object.keys(_BarElement).forEach(function (key) {
19
30
  if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _BarChart[key]) return;
31
+ if (key in exports && exports[key] === _BarElement[key]) return;
21
32
  Object.defineProperty(exports, key, {
22
33
  enumerable: true,
23
34
  get: function () {
24
- return _BarChart[key];
35
+ return _BarElement[key];
25
36
  }
26
37
  });
27
38
  });
package/CHANGELOG.md CHANGED
@@ -3,6 +3,188 @@
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
+ ## 7.0.0-alpha.3
7
+
8
+ _Dec 4, 2023_
9
+
10
+ We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Support localized start of the week on pickers' `AdapterLuxon`
13
+
14
+ When using Luxon 3.4.4 or higher, the start of the week will be defined by the date locale (e.g.: Sunday for `en-US`, Monday for `fr-FR`).
15
+
16
+ - 📈 Fix a lot of Charts package issues
17
+ - 🎉 The Data Grid features Cell selection and Clipboard paste are now stable
18
+ - 🌍 Improve Bulgarian (bg-BG) locale on Data Grid
19
+ - 🐞 Bugfixes
20
+ - 📚 Documentation improvements
21
+
22
+ ### Data Grid
23
+
24
+ #### Breaking changes
25
+
26
+ - The clipboard paste feature is now enabled by default. The flag `clipboardPaste` is no longer needed to be passed to the `experimentalFeatures` prop.
27
+
28
+ - The clipboard related exports `ignoreValueFormatterDuringExport` and `splitClipboardPastedText` are no longer prefixed with `unstable_`.
29
+
30
+ - The deprecated constants `SUBMIT_FILTER_STROKE_TIME` and `SUBMIT_FILTER_DATE_STROKE_TIME` have been removed from the `DataGrid` exports. Use the [`filterDebounceMs`](https://next.mui.com/x/api/data-grid/data-grid/#DataGrid-prop-filterDebounceMs) prop to customize filter debounce time.
31
+
32
+ - The `slots.preferencesPanel` slot and the `slotProps.preferencesPanel` prop were removed. Use `slots.panel` and `slotProps.panel` instead.
33
+
34
+ - The `GridPreferencesPanel` component is not exported anymore as it wasn't meant to be used outside of the Data Grid.
35
+
36
+ - The `unstable_` prefix has been removed from the cell selection props listed below.
37
+
38
+ | Old name | New name |
39
+ | :------------------------------------ | :--------------------------- |
40
+ | `unstable_cellSelection` | `cellSelection` |
41
+ | `unstable_cellSelectionModel` | `cellSelectionModel` |
42
+ | `unstable_onCellSelectionModelChange` | `onCellSelectionModelChange` |
43
+
44
+ - The `unstable_` prefix has been removed from the cell selection API methods listed below.
45
+
46
+ | Old name | New name |
47
+ | :--------------------------------- | :------------------------ |
48
+ | `unstable_getCellSelectionModel` | `getCellSelectionModel` |
49
+ | `unstable_getSelectedCellsAsArray` | `getSelectedCellsAsArray` |
50
+ | `unstable_isCellSelected` | `isCellSelected` |
51
+ | `unstable_selectCellRange` | `selectCellRange` |
52
+ | `unstable_setCellSelectionModel` | `setCellSelectionModel` |
53
+
54
+ - The Quick Filter now ignores hidden columns by default.
55
+ See [including hidden columns](https://next.mui.com/x/react-data-grid/filtering/quick-filter/#including-hidden-columns) section for more details.
56
+
57
+ #### `@mui/x-data-grid@7.0.0-alpha.3`
58
+
59
+ - [DataGrid] Fix cell editing adding a leading "v" on paste (#9205) @prasad5795
60
+ - [DataGrid] Exclude hidden columns from quick filtering by default (#11229) @cherniavskii
61
+ - [DataGrid] Fix `onFilterModelChange` being fired with stale field value (#11000) @gitstart
62
+ - [DataGrid] Fix handling of event target in portal (#11174) @cherniavskii
63
+ - [DataGrid] Remove deprecated constants (#11233) @michelengelen
64
+ - [DataGrid] Remove the `preferencesPanel` slot (#11228) @cherniavskii
65
+ - [l10n] Improve Bulgarian (bg-BG) locale (#10856) @Kristiqn95
66
+
67
+ #### `@mui/x-data-grid-pro@7.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
68
+
69
+ Same changes as in `@mui/x-data-grid@7.0.0-alpha.3`.
70
+
71
+ #### `@mui/x-data-grid-premium@7.0.0-alpha.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
72
+
73
+ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.3`, plus:
74
+
75
+ - [DataGridPremium] Fix aggregated column ignoring column definition changes (#11129) @cherniavskii
76
+ - [DataGridPremium] Make Cell selection feature stable (#11246) @MBilalShafi
77
+ - [DataGridPremium] Make Clipboard paste feature stable (#11248) @MBilalShafi
78
+
79
+ ### Date Pickers
80
+
81
+ #### Breaking changes
82
+
83
+ - The Date and Time Pickers now use the localized week when using `AdapterLuxon` and Luxon v3.4.4 or higher is installed.
84
+ This new behavior allows `AdapterLuxon` to have the same behavior as the other adapters.
85
+ If you want to keep the start of the week on Monday even if your locale says otherwise, you can hardcode the week settings as follows:
86
+ The Firefox browser currently does not support this behavior because the [getWeekInfo](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) API is not yet implemented.
87
+
88
+ ```ts
89
+ import { Settings } from 'luxon';
90
+
91
+ Settings.defaultWeekSettings = {
92
+ firstDay: 1,
93
+ minimalDays: Info.getMinimumDaysInFirstWeek(),
94
+ weekend: [6, 7],
95
+ };
96
+ ```
97
+
98
+ - Add new parameters to the `shortcuts` slot `onChange` callback
99
+
100
+ The `onChange` callback fired when selecting a shortcut now requires two new parameters (previously they were optional):
101
+
102
+ - The [`changeImportance`](/x/react-date-pickers/shortcuts/#behavior-when-selecting-a-shortcut) of the shortcut.
103
+ - The `item` containing the entire shortcut object.
104
+
105
+ ```diff
106
+ const CustomShortcuts = (props) => {
107
+ return (
108
+ <React.Fragment>
109
+ {props.items.map(item => {
110
+ const value = item.getValue({ isValid: props.isValid });
111
+ return (
112
+ <button
113
+ - onClick={() => onChange(value)}
114
+ + onClick={() => onChange(value, props.changeImportance ?? 'accept', item)}
115
+ >
116
+ {value}
117
+ </button>
118
+ )
119
+ }}
120
+ </React.Fragment>
121
+ )
122
+ }
123
+
124
+ <DatePicker slots={{ shortcuts: CustomShortcuts }} />
125
+ ```
126
+
127
+ - Usage of `AdapterDayjs` with the `customParseFormat` plugin
128
+ The call to `dayjs.extend(customParseFormatPlugin)` has been moved to the `AdapterDayjs` constructor. This allows users to pass custom options to this plugin before the adapter uses it.
129
+
130
+ If you are using this plugin before the rendering of the first `LocalizationProvider` component and did not call `dayjs.extend` in your own codebase, you will need to manually extend `dayjs`:
131
+
132
+ ```tsx
133
+ import dayjs from 'dayjs';
134
+ import customParseFormatPlugin from 'dayjs/plugin/customParseFormat';
135
+
136
+ dayjs.extend(customParseFormatPlugin);
137
+ ```
138
+
139
+ The other plugins are still added before the adapter initialization.
140
+
141
+ #### `@mui/x-date-pickers@7.0.0-alpha.3`
142
+
143
+ - [pickers] Expand field placeholder methods flexibility by providing `format` parameter (#11130) @LukasTy
144
+ - [pickers] Make `changeImportance` and `shortcut` mandatory in `PickersShortcuts` (#10941) @flaviendelangle
145
+ - [pickers] Moved extend with `customParseFormat` to constructor (#11151) @michelengelen
146
+ - [pickers] POC: `PickersTextField` styling - outlined variant (#10778) @noraleonte
147
+ - [pickers] Support localized start of the week on `AdapterLuxon` (#10964) @flaviendelangle
148
+ - [pickers] Use adapter methods instead of date library ones whenever possible (#11142) @flaviendelangle
149
+
150
+ #### `@mui/x-date-pickers-pro@7.0.0-alpha.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
151
+
152
+ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.3`.
153
+
154
+ ### Charts / `@mui/x-charts@7.0.0-alpha.3`
155
+
156
+ - [charts] Adjusted `defaultizeValueFormatter` util to accept an optional `series.valueFormatter` value (#11144) @michelengelen
157
+ - [charts] Apply `labelStyle` and `tickLabelStyle` props on `<ChartsYAxis />` (#11180) @akamfoad
158
+ - [charts] Fix TS config (#11259) @alexfauquette
159
+ - [charts] Fix error with empty dataset (#11063) @alexfauquette
160
+ - [charts] Fix export strategy (#11235) @alexfauquette
161
+ - [charts] Remove outdated prop-types (#11045) @alexfauquette
162
+
163
+ ### Docs
164
+
165
+ - [docs] Add `TextField` styling example to customization playground (#10812) @noraleonte
166
+ - [docs] Add a card grid to the installation page (#11177) @danilo-leal
167
+ - [docs] Add end v6 blogpost to whats new page (#10999) @joserodolfofreitas
168
+ - [docs] Add small formatting improvements to the licensing page (#11178) @danilo-leal
169
+ - [docs] Document charts composition (#10710) (#11239) @alexfauquette
170
+ - [docs] Fix <title> generation (#11182) @oliviertassinari
171
+ - [docs] Fix dead anchor link (#11265) @oliviertassinari
172
+ - [docs] Improve Data Grid togglable columns example (#11238) @MBilalShafi
173
+ - [docs] Improve the prop descriptions of `DayCalendar` (#11158) @flaviendelangle
174
+ - [docs] Move the adapter breaking changes in a collapsable block (#11205) @flaviendelangle
175
+ - [docs] Polish Next.js header description @oliviertassinari
176
+ - [docs] Remove the `newFeature` flag on v6 features (#11168) @flaviendelangle
177
+ - [docs] Simplify a bit chart demo (#11173) @oliviertassinari
178
+ - [docs] Standardize the usage of callouts in the MUI X docs (#7127) @samuelsycamore
179
+ - [docs] Adjust the Data Grid demo page design (#11231) @danilo-leal
180
+
181
+ ### Core
182
+
183
+ - [core] Make `@mui/system` a direct dependency (#11128) @LukasTy
184
+ - [core] Remove blank lines, coding style @oliviertassinari
185
+ - [core] Remove outdated `ENABLE_AD` env variable (#11181) @oliviertassinari
186
+ - [github] Do not add `plan: Pro` and `plan: Premium` labels on pro / premium issue templates (#10183) @flaviendelangle
187
+
6
188
  ## 7.0.0-alpha.2
7
189
 
8
190
  _Nov 23, 2023_
@@ -684,6 +866,65 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
684
866
  - [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
685
867
  - [license] Correctly throw errors (#10924) @oliviertassinari
686
868
 
869
+ ## 6.18.3
870
+
871
+ _Dec 4, 2023_
872
+
873
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
874
+
875
+ - 📈 Fix a lot of Charts package issues
876
+ - 🌍 Improve Bulgarian (bg-BG) locale on Data Grid
877
+ - 🐞 Bugfixes
878
+ - 📚 Documentation improvements
879
+
880
+ ### Data Grid
881
+
882
+ #### `@mui/x-data-grid@6.18.3`
883
+
884
+ - [DataGrid] Fix cell editing adding a leading "v" on paste (#11166) @prasad5795
885
+ - [DataGrid] Fix handling of event target in portal (#11209) @cherniavskii
886
+ - [DataGrid] Fix `onFilterModelChange` being fired with stale field value (#11244) @gitstart
887
+ - [l10n] Improve Bulgarian (bg-BG) locale (#10856) (#11206) @Kristiqn95
888
+
889
+ #### `@mui/x-data-grid-pro@6.18.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
890
+
891
+ Same changes as in `@mui/x-data-grid@6.18.3`.
892
+
893
+ #### `@mui/x-data-grid-premium@6.18.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
894
+
895
+ Same changes as in `@mui/x-data-grid-pro@6.18.3`, plus:
896
+
897
+ - [DataGridPremium] Fix aggregated column ignoring column definition changes (#11176) @cherniavskii
898
+ - [DataGridPremium] Fix custom filter operators not working on aggregated column (#11201) @cherniavskii
899
+
900
+ ### Date Pickers
901
+
902
+ #### `@mui/x-date-pickers@6.18.3`
903
+
904
+ - [pickers] Correctly format `MultiSectionDigitalClock` number sections (#11297) @LukasTy
905
+ - [pickers] Expand field placeholder methods flexibility by providing `format` parameter (#11254) @LukasTy
906
+
907
+ #### `@mui/x-date-pickers-pro@6.18.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
908
+
909
+ Same changes as in `@mui/x-date-pickers@6.18.3`.
910
+
911
+ ### Charts / `@mui/x-charts@6.18.3`
912
+
913
+ - [charts] Adjusted `defaultizeValueFormatter` util to accept an optional `series.valueFormatter` value (#11213) @michelengelen
914
+ - [charts] Apply `labelStyle` and `tickLabelStyle` props on `<ChartsYAxis />` (#11180) @akamfoad
915
+ - [charts] Fix TS config (#11259) @alexfauquette
916
+ - [charts] Fix error with empty dataset (#11063) @alexfauquette
917
+ - [charts] Fix export strategy (#11235) @alexfauquette
918
+
919
+ ### Docs
920
+
921
+ - [docs] Add LTS section to support page (#11300) @joserodolfofreitas
922
+ - [docs] Add end v6 blogpost to whats new page (#11299) @joserodolfofreitas
923
+ - [docs] Document charts composition (#10710) @alexfauquette
924
+ - [docs] Fix version links (#11167) @LukasTy
925
+ - [docs] Improve Data Grid togglable columns example (#11241) @MBilalShafi
926
+ - [docs] Split charts overview and getting started in distinct pages (#10910) @alexfauquette
927
+
687
928
  ## 6.18.2
688
929
 
689
930
  _Nov 23, 2023_
@@ -1,2 +1,3 @@
1
1
  export * from './ChartsLegend';
2
2
  export * from './chartsLegendClasses';
3
+ export * from './utils';
@@ -24,4 +24,15 @@ Object.keys(_chartsLegendClasses).forEach(function (key) {
24
24
  return _chartsLegendClasses[key];
25
25
  }
26
26
  });
27
+ });
28
+ var _utils = require("./utils");
29
+ Object.keys(_utils).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _utils[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _utils[key];
36
+ }
37
+ });
27
38
  });
@@ -31,11 +31,14 @@ export type ChartsAxisContentProps = {
31
31
  classes: ChartsTooltipClasses;
32
32
  sx?: SxProps<Theme>;
33
33
  };
34
- export declare function DefaultChartsAxisContent(props: ChartsAxisContentProps): React.JSX.Element | null;
35
- export declare function ChartsAxisTooltipContent(props: {
34
+ declare function ChartsAxisTooltipContent(props: {
36
35
  axisData: AxisInteractionData;
37
36
  content?: React.ElementType<ChartsAxisContentProps>;
38
37
  contentProps?: Partial<ChartsAxisContentProps>;
39
38
  sx?: SxProps<Theme>;
40
39
  classes: ChartsAxisContentProps['classes'];
41
40
  }): React.JSX.Element;
41
+ declare namespace ChartsAxisTooltipContent {
42
+ var propTypes: any;
43
+ }
44
+ export { ChartsAxisTooltipContent };
@@ -5,85 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.ChartsAxisTooltipContent = ChartsAxisTooltipContent;
8
- exports.DefaultChartsAxisContent = DefaultChartsAxisContent;
9
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
9
  var React = _interopRequireWildcard(require("react"));
11
- var _clsx = _interopRequireDefault(require("clsx"));
12
- var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
11
  var _utils = require("@mui/base/utils");
14
12
  var _SeriesContextProvider = require("../context/SeriesContextProvider");
15
13
  var _CartesianContextProvider = require("../context/CartesianContextProvider");
16
- var _ChartsTooltipTable = require("./ChartsTooltipTable");
14
+ var _DefaultChartsAxisTooltipContent = require("./DefaultChartsAxisTooltipContent");
17
15
  var _jsxRuntime = require("react/jsx-runtime");
18
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
- function DefaultChartsAxisContent(props) {
21
- const {
22
- series,
23
- axis,
24
- dataIndex,
25
- axisValue,
26
- sx,
27
- classes
28
- } = props;
29
- if (dataIndex == null) {
30
- return null;
31
- }
32
- const axisFormatter = axis.valueFormatter ?? (v => v.toLocaleString());
33
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipPaper, {
34
- sx: sx,
35
- className: classes.root,
36
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltipTable.ChartsTooltipTable, {
37
- className: classes.table,
38
- children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)("thead", {
39
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipRow, {
40
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
41
- colSpan: 3,
42
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
43
- children: axisFormatter(axisValue)
44
- })
45
- })
46
- })
47
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
48
- children: series.map(({
49
- color,
50
- id,
51
- label,
52
- valueFormatter,
53
- data
54
- }) => {
55
- const formattedValue = valueFormatter(data[dataIndex]);
56
- if (formattedValue == null) {
57
- return null;
58
- }
59
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsTooltipTable.ChartsTooltipRow, {
60
- className: classes.row,
61
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
62
- className: (0, _clsx.default)(classes.markCell, classes.cell),
63
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipMark, {
64
- ownerState: {
65
- color
66
- },
67
- boxShadow: 1,
68
- className: classes.mark
69
- })
70
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
71
- className: (0, _clsx.default)(classes.labelCell, classes.cell),
72
- children: label ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
73
- children: label
74
- }) : null
75
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsTooltipTable.ChartsTooltipCell, {
76
- className: (0, _clsx.default)(classes.valueCell, classes.cell),
77
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
78
- children: formattedValue
79
- })
80
- })]
81
- }, id);
82
- })
83
- })]
84
- })
85
- });
86
- }
87
18
  function ChartsAxisTooltipContent(props) {
88
19
  const {
89
20
  content,
@@ -119,7 +50,7 @@ function ChartsAxisTooltipContent(props) {
119
50
  const relevantAxis = React.useMemo(() => {
120
51
  return isXaxis ? xAxis[USED_AXIS_ID] : yAxis[USED_AXIS_ID];
121
52
  }, [USED_AXIS_ID, isXaxis, xAxis, yAxis]);
122
- const Content = content ?? DefaultChartsAxisContent;
53
+ const Content = content ?? _DefaultChartsAxisTooltipContent.DefaultChartsAxisTooltipContent;
123
54
  const chartTooltipContentProps = (0, _utils.useSlotProps)({
124
55
  elementType: Content,
125
56
  externalSlotProps: contentProps,
@@ -135,4 +66,93 @@ function ChartsAxisTooltipContent(props) {
135
66
  ownerState: {}
136
67
  });
137
68
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Content, (0, _extends2.default)({}, chartTooltipContentProps));
138
- }
69
+ }
70
+ process.env.NODE_ENV !== "production" ? ChartsAxisTooltipContent.propTypes = {
71
+ // ----------------------------- Warning --------------------------------
72
+ // | These PropTypes are generated from the TypeScript type definitions |
73
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
74
+ // ----------------------------------------------------------------------
75
+ axisData: _propTypes.default.shape({
76
+ x: _propTypes.default.shape({
77
+ index: _propTypes.default.number,
78
+ value: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired
79
+ }),
80
+ y: _propTypes.default.shape({
81
+ index: _propTypes.default.number,
82
+ value: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired
83
+ })
84
+ }).isRequired,
85
+ classes: _propTypes.default.object.isRequired,
86
+ content: _propTypes.default.elementType,
87
+ contentProps: _propTypes.default.shape({
88
+ axis: _propTypes.default.shape({
89
+ axisId: _propTypes.default.string,
90
+ classes: _propTypes.default.object,
91
+ data: _propTypes.default.array,
92
+ dataKey: _propTypes.default.string,
93
+ disableLine: _propTypes.default.bool,
94
+ disableTicks: _propTypes.default.bool,
95
+ fill: _propTypes.default.string,
96
+ hideTooltip: _propTypes.default.bool,
97
+ id: _propTypes.default.string.isRequired,
98
+ label: _propTypes.default.string,
99
+ labelFontSize: _propTypes.default.number,
100
+ labelStyle: _propTypes.default.object,
101
+ max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
102
+ min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
103
+ position: _propTypes.default.oneOf(['bottom', 'left', 'right', 'top']),
104
+ scale: _propTypes.default.func.isRequired,
105
+ scaleType: _propTypes.default.oneOf(['time']).isRequired,
106
+ slotProps: _propTypes.default.object,
107
+ slots: _propTypes.default.object,
108
+ stroke: _propTypes.default.string,
109
+ tickFontSize: _propTypes.default.number,
110
+ tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
111
+ tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
112
+ tickLabelStyle: _propTypes.default.object,
113
+ tickMaxStep: _propTypes.default.number,
114
+ tickMinStep: _propTypes.default.number,
115
+ tickNumber: _propTypes.default.number.isRequired,
116
+ tickSize: _propTypes.default.number,
117
+ valueFormatter: _propTypes.default.func
118
+ }),
119
+ axisData: _propTypes.default.shape({
120
+ x: _propTypes.default.shape({
121
+ index: _propTypes.default.number,
122
+ value: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired
123
+ }),
124
+ y: _propTypes.default.shape({
125
+ index: _propTypes.default.number,
126
+ value: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired
127
+ })
128
+ }),
129
+ axisValue: _propTypes.default.any,
130
+ classes: _propTypes.default.object,
131
+ dataIndex: _propTypes.default.number,
132
+ series: _propTypes.default.arrayOf(_propTypes.default.shape({
133
+ area: _propTypes.default.bool,
134
+ color: _propTypes.default.string.isRequired,
135
+ connectNulls: _propTypes.default.bool,
136
+ curve: _propTypes.default.oneOf(['catmullRom', 'linear', 'monotoneX', 'monotoneY', 'natural', 'step', 'stepAfter', 'stepBefore']),
137
+ data: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
138
+ dataKey: _propTypes.default.string,
139
+ disableHighlight: _propTypes.default.bool,
140
+ highlightScope: _propTypes.default.shape({
141
+ faded: _propTypes.default.oneOf(['global', 'none', 'series']),
142
+ highlighted: _propTypes.default.oneOf(['item', 'none', 'series'])
143
+ }),
144
+ id: _propTypes.default.string.isRequired,
145
+ label: _propTypes.default.string,
146
+ showMark: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.bool]),
147
+ stack: _propTypes.default.string,
148
+ stackOffset: _propTypes.default.oneOf(['diverging', 'expand', 'none', 'silhouette', 'wiggle']),
149
+ stackOrder: _propTypes.default.oneOf(['appearance', 'ascending', 'descending', 'insideOut', 'none', 'reverse']),
150
+ type: _propTypes.default.oneOf(['line']).isRequired,
151
+ valueFormatter: _propTypes.default.func.isRequired,
152
+ xAxisKey: _propTypes.default.string,
153
+ yAxisKey: _propTypes.default.string
154
+ })),
155
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
156
+ }),
157
+ sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
158
+ } : void 0;
@@ -18,11 +18,14 @@ export type ChartsItemContentProps<T extends ChartSeriesType = ChartSeriesType>
18
18
  classes: ChartsTooltipClasses;
19
19
  sx?: SxProps<Theme>;
20
20
  };
21
- export declare function DefaultChartsItemContent<T extends ChartSeriesType = ChartSeriesType>(props: ChartsItemContentProps<T>): React.JSX.Element | null;
22
- export declare function ChartsItemTooltipContent<T extends ChartSeriesType>(props: {
21
+ declare function ChartsItemTooltipContent<T extends ChartSeriesType>(props: {
23
22
  itemData: ItemInteractionData<T>;
24
23
  content?: React.ElementType<ChartsItemContentProps<T>>;
25
24
  contentProps?: Partial<ChartsItemContentProps<T>>;
26
25
  sx?: SxProps<Theme>;
27
26
  classes: ChartsItemContentProps<T>['classes'];
28
27
  }): React.JSX.Element;
28
+ declare namespace ChartsItemTooltipContent {
29
+ var propTypes: any;
30
+ }
31
+ export { ChartsItemTooltipContent };