@mui/x-charts 8.5.2 → 8.6.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.
Files changed (188) hide show
  1. package/BarChart/AnimatedBarElement.js +3 -1
  2. package/BarChart/BarLabel/BarLabelPlot.d.ts +2 -2
  3. package/BarChart/BarLabel/BarLabelPlot.js +33 -25
  4. package/BarChart/BarPlot.js +55 -40
  5. package/BarChart/barClasses.d.ts +12 -0
  6. package/BarChart/barClasses.js +25 -0
  7. package/BarChart/index.d.ts +3 -1
  8. package/BarChart/index.js +23 -1
  9. package/BarChart/types.d.ts +5 -1
  10. package/CHANGELOG.md +203 -11
  11. package/ChartsLegend/ChartsLegend.d.ts +1 -0
  12. package/ChartsLegend/ChartsLegend.js +2 -0
  13. package/ChartsLegend/ContinuousColorLegend.d.ts +1 -0
  14. package/ChartsLegend/PiecewiseColorLegend.d.ts +1 -0
  15. package/ChartsLegend/chartsLegendClasses.d.ts +3 -1
  16. package/ChartsLegend/chartsLegendClasses.js +2 -1
  17. package/ChartsSurface/ChartsSurface.d.ts +1 -1
  18. package/ChartsXAxis/ChartsXAxis.js +4 -108
  19. package/ChartsXAxis/getVisibleLabels.d.ts +14 -0
  20. package/ChartsXAxis/getVisibleLabels.js +71 -0
  21. package/ChartsXAxis/shortenLabels.d.ts +4 -0
  22. package/ChartsXAxis/shortenLabels.js +48 -0
  23. package/ChartsYAxis/ChartsYAxis.js +2 -39
  24. package/ChartsYAxis/shortenLabels.d.ts +4 -0
  25. package/ChartsYAxis/shortenLabels.js +46 -0
  26. package/LineChart/AnimatedArea.js +4 -1
  27. package/LineChart/AnimatedLine.js +4 -1
  28. package/LineChart/CircleMarkElement.js +4 -1
  29. package/LineChart/MarkElement.js +4 -1
  30. package/LineChart/MarkPlot.js +1 -0
  31. package/PieChart/PieArc.js +3 -1
  32. package/PieChart/PiePlot.js +6 -0
  33. package/PieChart/index.d.ts +3 -1
  34. package/PieChart/index.js +18 -1
  35. package/PieChart/pieClasses.d.ts +12 -0
  36. package/PieChart/pieClasses.js +24 -0
  37. package/ScatterChart/Scatter.d.ts +2 -0
  38. package/ScatterChart/Scatter.js +9 -1
  39. package/ScatterChart/index.d.ts +3 -1
  40. package/ScatterChart/index.js +16 -1
  41. package/ScatterChart/scatterClasses.d.ts +8 -0
  42. package/ScatterChart/scatterClasses.js +22 -0
  43. package/Toolbar/ToolbarButton.js +2 -0
  44. package/esm/BarChart/AnimatedBarElement.js +3 -1
  45. package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +2 -2
  46. package/esm/BarChart/BarLabel/BarLabelPlot.js +33 -25
  47. package/esm/BarChart/BarPlot.js +55 -40
  48. package/esm/BarChart/barClasses.d.ts +12 -0
  49. package/esm/BarChart/barClasses.js +15 -0
  50. package/esm/BarChart/index.d.ts +3 -1
  51. package/esm/BarChart/index.js +2 -1
  52. package/esm/BarChart/types.d.ts +5 -1
  53. package/esm/ChartsLegend/ChartsLegend.d.ts +1 -0
  54. package/esm/ChartsLegend/ChartsLegend.js +2 -0
  55. package/esm/ChartsLegend/ContinuousColorLegend.d.ts +1 -0
  56. package/esm/ChartsLegend/PiecewiseColorLegend.d.ts +1 -0
  57. package/esm/ChartsLegend/chartsLegendClasses.d.ts +3 -1
  58. package/esm/ChartsLegend/chartsLegendClasses.js +2 -1
  59. package/esm/ChartsSurface/ChartsSurface.d.ts +1 -1
  60. package/esm/ChartsXAxis/ChartsXAxis.js +2 -106
  61. package/esm/ChartsXAxis/getVisibleLabels.d.ts +14 -0
  62. package/esm/ChartsXAxis/getVisibleLabels.js +67 -0
  63. package/esm/ChartsXAxis/shortenLabels.d.ts +4 -0
  64. package/esm/ChartsXAxis/shortenLabels.js +42 -0
  65. package/esm/ChartsYAxis/ChartsYAxis.js +1 -38
  66. package/esm/ChartsYAxis/shortenLabels.d.ts +4 -0
  67. package/esm/ChartsYAxis/shortenLabels.js +41 -0
  68. package/esm/LineChart/AnimatedArea.js +4 -1
  69. package/esm/LineChart/AnimatedLine.js +4 -1
  70. package/esm/LineChart/CircleMarkElement.js +4 -1
  71. package/esm/LineChart/MarkElement.js +4 -1
  72. package/esm/LineChart/MarkPlot.js +1 -0
  73. package/esm/PieChart/PieArc.js +3 -1
  74. package/esm/PieChart/PiePlot.js +6 -0
  75. package/esm/PieChart/index.d.ts +3 -1
  76. package/esm/PieChart/index.js +2 -1
  77. package/esm/PieChart/pieClasses.d.ts +12 -0
  78. package/esm/PieChart/pieClasses.js +15 -0
  79. package/esm/ScatterChart/Scatter.d.ts +2 -0
  80. package/esm/ScatterChart/Scatter.js +9 -1
  81. package/esm/ScatterChart/index.d.ts +3 -1
  82. package/esm/ScatterChart/index.js +2 -1
  83. package/esm/ScatterChart/scatterClasses.d.ts +8 -0
  84. package/esm/ScatterChart/scatterClasses.js +13 -0
  85. package/esm/Toolbar/ToolbarButton.js +2 -0
  86. package/esm/hooks/useItemHighlighted.js +2 -2
  87. package/esm/index.js +1 -1
  88. package/esm/internals/components/NotRendered.d.ts +9 -0
  89. package/esm/internals/components/NotRendered.js +10 -0
  90. package/esm/internals/createSeriesSelectorOfType.js +2 -2
  91. package/esm/internals/index.d.ts +1 -0
  92. package/esm/internals/index.js +1 -0
  93. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +3 -29
  94. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.js +1 -1
  95. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +30 -2
  96. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +14 -724
  97. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +10 -10
  98. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +8 -2
  99. package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +3 -29
  100. package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +1 -1
  101. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +6 -54
  102. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +2 -2
  103. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +12 -208
  104. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +7 -66
  105. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +2 -3
  106. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +21 -6222
  107. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +4 -6
  108. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +50 -5
  109. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +18 -622
  110. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -3
  111. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +18 -230
  112. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +6 -6
  113. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +20 -4
  114. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +17 -2012
  115. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +2 -2
  116. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +39 -4
  117. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +3 -27
  118. package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.js +1 -1
  119. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +5 -40
  120. package/esm/internals/plugins/utils/selectors.d.ts +18 -6
  121. package/esm/internals/plugins/utils/selectors.js +3 -3
  122. package/esm/internals/store/useSelector.d.ts +2 -2
  123. package/esm/internals/store/useSelector.js +2 -2
  124. package/esm/locales/enUS.d.ts +3 -0
  125. package/esm/locales/enUS.js +8 -2
  126. package/esm/locales/frFR.d.ts +3 -0
  127. package/esm/locales/frFR.js +7 -0
  128. package/esm/locales/ptBR.d.ts +3 -0
  129. package/esm/locales/ptBR.js +7 -1
  130. package/esm/locales/ptPT.d.ts +3 -0
  131. package/esm/locales/ptPT.js +7 -1
  132. package/esm/locales/utils/chartsLocaleTextApi.d.ts +17 -0
  133. package/esm/locales/utils/getChartsLocalization.d.ts +3 -0
  134. package/esm/locales/utils/imageMimeTypes.d.ts +2 -0
  135. package/esm/locales/utils/imageMimeTypes.js +5 -0
  136. package/esm/models/slots/chartsBaseSlotProps.d.ts +4 -0
  137. package/hooks/useItemHighlighted.js +2 -2
  138. package/index.js +1 -1
  139. package/internals/components/NotRendered.d.ts +9 -0
  140. package/internals/components/NotRendered.js +16 -0
  141. package/internals/createSeriesSelectorOfType.js +2 -2
  142. package/internals/index.d.ts +1 -0
  143. package/internals/index.js +12 -0
  144. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +3 -29
  145. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.js +1 -1
  146. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +30 -2
  147. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +14 -724
  148. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +11 -10
  149. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +8 -2
  150. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +3 -29
  151. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +1 -1
  152. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +6 -54
  153. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +2 -2
  154. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +12 -208
  155. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +7 -66
  156. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -3
  157. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +21 -6222
  158. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +4 -6
  159. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +50 -5
  160. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +18 -622
  161. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -3
  162. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +18 -230
  163. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +6 -6
  164. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +20 -4
  165. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +17 -2012
  166. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +2 -2
  167. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +39 -4
  168. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +3 -27
  169. package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.js +1 -1
  170. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +5 -40
  171. package/internals/plugins/utils/selectors.d.ts +18 -6
  172. package/internals/plugins/utils/selectors.js +3 -3
  173. package/internals/store/useSelector.d.ts +2 -2
  174. package/internals/store/useSelector.js +2 -2
  175. package/locales/enUS.d.ts +3 -0
  176. package/locales/enUS.js +8 -2
  177. package/locales/frFR.d.ts +3 -0
  178. package/locales/frFR.js +7 -0
  179. package/locales/ptBR.d.ts +3 -0
  180. package/locales/ptBR.js +7 -1
  181. package/locales/ptPT.d.ts +3 -0
  182. package/locales/ptPT.js +7 -1
  183. package/locales/utils/chartsLocaleTextApi.d.ts +17 -0
  184. package/locales/utils/getChartsLocalization.d.ts +3 -0
  185. package/locales/utils/imageMimeTypes.d.ts +2 -0
  186. package/locales/utils/imageMimeTypes.js +11 -0
  187. package/models/slots/chartsBaseSlotProps.d.ts +4 -0
  188. package/package.json +3 -3
@@ -1,29 +1,5 @@
1
- import { ChartRootSelector } from "../../utils/selectors.js";
2
- import { UseChartVoronoiSignature } from "./useChartVoronoi.types.js";
3
- export declare const selectorChartsVoronoiIsVoronoiEnabled: ((state: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("./useChartVoronoi.types.js").UseChartVoronoiState & Partial<{}> & {
1
+ export declare const selectorChartsVoronoiIsVoronoiEnabled: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("./useChartVoronoi.types.js").UseChartVoronoiState & Partial<{}> & {
4
2
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
5
- }) => boolean | undefined) & {
6
- clearCache: () => void;
7
- resultsCount: () => number;
8
- resetResultsCount: () => void;
9
3
  } & {
10
- resultFunc: (resultFuncArgs_0: {
11
- isVoronoiEnabled?: boolean;
12
- }) => boolean | undefined;
13
- memoizedResultFunc: ((resultFuncArgs_0: {
14
- isVoronoiEnabled?: boolean;
15
- }) => boolean | undefined) & {
16
- clearCache: () => void;
17
- resultsCount: () => number;
18
- resetResultsCount: () => void;
19
- };
20
- lastResult: () => boolean | undefined;
21
- dependencies: [ChartRootSelector<UseChartVoronoiSignature>];
22
- recomputations: () => number;
23
- resetRecomputations: () => void;
24
- dependencyRecomputations: () => number;
25
- resetDependencyRecomputations: () => void;
26
- } & {
27
- memoize: typeof import("reselect").weakMapMemoize;
28
- argsMemoize: typeof import("reselect").weakMapMemoize;
29
- };
4
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
5
+ }, boolean | undefined, any[]>;
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.selectorChartsVoronoiIsVoronoiEnabled = void 0;
7
7
  var _selectors = require("../../utils/selectors");
8
8
  const selectVoronoi = state => state.voronoi;
9
- const selectorChartsVoronoiIsVoronoiEnabled = exports.selectorChartsVoronoiIsVoronoiEnabled = (0, _selectors.createSelector)(selectVoronoi, voronoi => voronoi?.isVoronoiEnabled);
9
+ const selectorChartsVoronoiIsVoronoiEnabled = exports.selectorChartsVoronoiIsVoronoiEnabled = (0, _selectors.createSelector)([selectVoronoi], voronoi => voronoi?.isVoronoiEnabled);
@@ -1,45 +1,10 @@
1
- import { ChartState } from "../../models/chart.js";
2
- import { UseChartZAxisSignature } from "./useChartZAxis.types.js";
3
- export declare const selectorChartZAxis: ((state: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("./useChartZAxis.types.js").UseChartZAxisState & Partial<{}> & {
1
+ export declare const selectorChartZAxis: import("reselect").Selector<import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("./useChartZAxis.types.js").UseChartZAxisState & Partial<{}> & {
4
2
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
5
- }) => {
3
+ } & {
4
+ cacheKey: import("../../models/index.js").ChartStateCacheKey;
5
+ }, {
6
6
  axis: {
7
7
  [axisId: string]: import("../../../index.js").ZAxisDefaultized;
8
8
  };
9
9
  axisIds: import("../../../index.js").AxisId[];
10
- }) & {
11
- clearCache: () => void;
12
- resultsCount: () => number;
13
- resetResultsCount: () => void;
14
- } & {
15
- resultFunc: (resultFuncArgs_0: ChartState<[UseChartZAxisSignature]>) => {
16
- axis: {
17
- [axisId: string]: import("../../../index.js").ZAxisDefaultized;
18
- };
19
- axisIds: import("../../../index.js").AxisId[];
20
- };
21
- memoizedResultFunc: ((resultFuncArgs_0: ChartState<[UseChartZAxisSignature]>) => {
22
- axis: {
23
- [axisId: string]: import("../../../index.js").ZAxisDefaultized;
24
- };
25
- axisIds: import("../../../index.js").AxisId[];
26
- }) & {
27
- clearCache: () => void;
28
- resultsCount: () => number;
29
- resetResultsCount: () => void;
30
- };
31
- lastResult: () => {
32
- axis: {
33
- [axisId: string]: import("../../../index.js").ZAxisDefaultized;
34
- };
35
- axisIds: import("../../../index.js").AxisId[];
36
- };
37
- dependencies: [(state: ChartState<[UseChartZAxisSignature]>) => ChartState<[UseChartZAxisSignature]>];
38
- recomputations: () => number;
39
- resetRecomputations: () => void;
40
- dependencyRecomputations: () => number;
41
- resetDependencyRecomputations: () => void;
42
- } & {
43
- memoize: typeof import("reselect").weakMapMemoize;
44
- argsMemoize: typeof import("reselect").weakMapMemoize;
45
- };
10
+ }, []>;
@@ -1,10 +1,22 @@
1
- import { CreateSelectorFunction } from 'reselect';
2
- import { ChartAnyPluginSignature, ChartState } from "../models/index.js";
3
- export type ChartRootSelector<TSignature extends ChartAnyPluginSignature> = <TSignatures extends [TSignature]>(state: ChartState<TSignatures>) => TSignature['state'][keyof TSignature['state']];
4
- export type ChartOptionalRootSelector<TSignature extends ChartAnyPluginSignature> = <TSignatures extends [TSignature]>(state: ChartState<[], TSignatures>) => TSignature['state'][keyof TSignature['state']] | undefined;
5
- export type ChartsSelector<TState, TArgs, TResult> = (state: TState, args: TArgs) => TResult;
1
+ import { SelectorArray, Combiner, Selector, GetStateFromSelectors, GetParamsFromSelectors, CreateSelectorOptions } from 'reselect';
2
+ import { ChartAnyPluginSignature, ChartState, ChartStateCacheKey } from "../models/index.js";
3
+ export type ChartRootSelector<TSignature extends ChartAnyPluginSignature> = Selector<ChartState<[TSignature]>, TSignature['state'][keyof TSignature['state']]>;
4
+ export type ChartOptionalRootSelector<TSignature extends ChartAnyPluginSignature> = Selector<ChartState<[], [TSignature]>, TSignature['state'][keyof TSignature['state']] | undefined>;
5
+ export type ChartsSelector<Signatures extends readonly ChartAnyPluginSignature[] = [], OptionalSignatures extends readonly ChartAnyPluginSignature[] = [], Result = unknown, Args extends readonly any[] = []> = Selector<ChartState<Signatures, OptionalSignatures>, Result, Args>;
6
+ type InterruptRecursion = NonNullable<unknown>;
7
+ type AnyFunction = (...args: any[]) => any;
8
+ export type Simplify<T> = T extends AnyFunction ? T : { [KeyType in keyof T]: T[KeyType] } & NonNullable<unknown>;
6
9
  /**
7
10
  * Method wrapping reselect's createSelector to provide caching for chart instances.
8
11
  *
9
12
  */
10
- export declare const createSelector: CreateSelectorFunction;
13
+ export declare const createSelector: <InputSelectors extends SelectorArray<any>, Result>(...createSelectorArgs: [inputSelectors: [...InputSelectors], combiner: Combiner<InputSelectors, Result>, createSelectorOptions?: Simplify<CreateSelectorOptions<any,
14
+ // MemoizeFunction,
15
+ any,
16
+ // ArgsMemoizeFunction,
17
+ any,
18
+ // OverrideMemoizeFunction,
19
+ any>>]) => Selector<GetStateFromSelectors<InputSelectors> & {
20
+ cacheKey: ChartStateCacheKey;
21
+ }, Result, GetParamsFromSelectors<InputSelectors> & InterruptRecursion>;
22
+ export {};
@@ -18,7 +18,7 @@ const cache = new WeakMap();
18
18
  *
19
19
  */
20
20
  const createSelector = (...createSelectorArgs) => {
21
- const selector = (state, selectorArgs) => {
21
+ const selector = (state, ...selectorArgs) => {
22
22
  const cacheKey = state.cacheKey;
23
23
 
24
24
  // If there is no cache for the current chart instance, create one.
@@ -31,13 +31,13 @@ const createSelector = (...createSelectorArgs) => {
31
31
  // If there is a cached selector, execute it.
32
32
  const cachedSelector = cacheForCurrentChartInstance.get(createSelectorArgs);
33
33
  if (cachedSelector) {
34
- return cachedSelector(state, selectorArgs);
34
+ return cachedSelector(state, ...selectorArgs);
35
35
  }
36
36
 
37
37
  // Otherwise, create a new selector and cache it and execute it.
38
38
  const fn = reselectCreateSelector(...createSelectorArgs);
39
39
  cacheForCurrentChartInstance.set(createSelectorArgs, fn);
40
- return fn(state, selectorArgs);
40
+ return fn(state, ...selectorArgs);
41
41
  };
42
42
  return selector;
43
43
  };
@@ -1,4 +1,4 @@
1
- import { ChartAnyPluginSignature, ChartState } from "../plugins/models/index.js";
1
+ import { ChartAnyPluginSignature } from "../plugins/models/index.js";
2
2
  import { ChartsSelector } from "../plugins/utils/selectors.js";
3
3
  import { ChartStore } from "../plugins/utils/ChartStore.js";
4
- export declare const useSelector: <TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[], TArgs, TValue>(store: ChartStore<TSignatures, TOptionalSignatures>, selector: ChartsSelector<ChartState<TSignatures, TOptionalSignatures>, TArgs, TValue>, args?: TArgs, equals?: (a: TValue, b: TValue) => boolean) => TValue;
4
+ export declare const useSelector: <TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[], TArgs extends readonly any[], TResult = unknown>(store: ChartStore<TSignatures, TOptionalSignatures>, selector: ChartsSelector<TSignatures, TOptionalSignatures, TResult, TArgs>, args?: [TArgs] extends [never] ? [] : TArgs, equals?: (a: TResult, b: TResult) => boolean) => TResult;
@@ -9,8 +9,8 @@ var _withSelector = require("use-sync-external-store/shim/with-selector");
9
9
  * More info: https://github.com/mui/mui-x/issues/18303#issuecomment-2958392341 */
10
10
 
11
11
  const defaultCompare = Object.is;
12
- const useSelector = (store, selector, args = undefined, equals = defaultCompare) => {
13
- const selectorWithArgs = state => selector(state, args);
12
+ const useSelector = (store, selector, args = [], equals = defaultCompare) => {
13
+ const selectorWithArgs = state => selector(state, ...args);
14
14
  return (0, _withSelector.useSyncExternalStoreWithSelector)(store.subscribe, store.getSnapshot, store.getSnapshot, selectorWithArgs, equals);
15
15
  };
16
16
  exports.useSelector = useSelector;
package/locales/enUS.d.ts CHANGED
@@ -10,6 +10,9 @@ export declare const enUS: {
10
10
  noData?: string | undefined;
11
11
  zoomIn?: string | undefined;
12
12
  zoomOut?: string | undefined;
13
+ toolbarExport?: string | undefined;
14
+ toolbarExportPrint?: string | undefined;
15
+ toolbarExportImage?: ((mimeType: import("./utils/imageMimeTypes.js").ChartImageExportMimeType | (string & {})) => string) | undefined;
13
16
  };
14
17
  };
15
18
  };
package/locales/enUS.js CHANGED
@@ -4,15 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.enUSLocaleText = exports.enUS = exports.DEFAULT_LOCALE = void 0;
7
+ var _imageMimeTypes = require("./utils/imageMimeTypes");
7
8
  var _getChartsLocalization = require("./utils/getChartsLocalization");
8
9
  // This object is not Partial<ChartsLocaleText> because it is the default values
9
10
 
10
11
  const enUSLocaleText = exports.enUSLocaleText = {
11
- // Overlay
12
+ /* Overlay */
12
13
  loading: 'Loading data…',
13
14
  noData: 'No data to display',
15
+ /* Toolbar */
14
16
  zoomIn: 'Zoom in',
15
- zoomOut: 'Zoom out'
17
+ zoomOut: 'Zoom out',
18
+ toolbarExport: 'Export',
19
+ /* Toolbar Export Menu */
20
+ toolbarExportPrint: 'Print',
21
+ toolbarExportImage: mimeType => `Export as ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}`
16
22
  };
17
23
  const DEFAULT_LOCALE = exports.DEFAULT_LOCALE = enUSLocaleText;
18
24
  const enUS = exports.enUS = (0, _getChartsLocalization.getChartsLocalization)(enUSLocaleText);
package/locales/frFR.d.ts CHANGED
@@ -9,6 +9,9 @@ export declare const frFR: {
9
9
  noData?: string | undefined;
10
10
  zoomIn?: string | undefined;
11
11
  zoomOut?: string | undefined;
12
+ toolbarExport?: string | undefined;
13
+ toolbarExportPrint?: string | undefined;
14
+ toolbarExportImage?: ((mimeType: import("./utils/imageMimeTypes.js").ChartImageExportMimeType | (string & {})) => string) | undefined;
12
15
  };
13
16
  };
14
17
  };
package/locales/frFR.js CHANGED
@@ -9,7 +9,14 @@ const frFRLocalText = exports.frFRLocalText = {
9
9
  // Overlay
10
10
  loading: 'Chargement…',
11
11
  noData: 'Pas de données'
12
+
13
+ // Toolbar
12
14
  // zoomIn: 'Zoom in',
13
15
  // zoomOut: 'Zoom out',
16
+ // toolbarExport: 'Export',
17
+
18
+ // Toolbar Export Menu
19
+ // toolbarExportPrint: 'Print',
20
+ // toolbarExportImage: mimeType => `Export as ${imageMimeTypes[mimeType] ?? mimeType}`,
14
21
  };
15
22
  const frFR = exports.frFR = (0, _getChartsLocalization.getChartsLocalization)(frFRLocalText);
package/locales/ptBR.d.ts CHANGED
@@ -9,6 +9,9 @@ export declare const ptBR: {
9
9
  noData?: string | undefined;
10
10
  zoomIn?: string | undefined;
11
11
  zoomOut?: string | undefined;
12
+ toolbarExport?: string | undefined;
13
+ toolbarExportPrint?: string | undefined;
14
+ toolbarExportImage?: ((mimeType: import("./utils/imageMimeTypes.js").ChartImageExportMimeType | (string & {})) => string) | undefined;
12
15
  };
13
16
  };
14
17
  };
package/locales/ptBR.js CHANGED
@@ -4,12 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ptBRLocaleText = exports.ptBR = void 0;
7
+ var _imageMimeTypes = require("./utils/imageMimeTypes");
7
8
  var _getChartsLocalization = require("./utils/getChartsLocalization");
8
9
  const ptBRLocaleText = exports.ptBRLocaleText = {
9
10
  // Overlay
10
11
  loading: 'Carregando dados…',
11
12
  noData: 'Sem dados para exibir',
13
+ // Toolbar
12
14
  zoomIn: 'Aumentar zoom',
13
- zoomOut: 'Diminuir zoom'
15
+ zoomOut: 'Diminuir zoom',
16
+ toolbarExport: 'Exportar',
17
+ // Toolbar Export Menu
18
+ toolbarExportPrint: 'Imprimir',
19
+ toolbarExportImage: mimeType => `Exportar como ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}`
14
20
  };
15
21
  const ptBR = exports.ptBR = (0, _getChartsLocalization.getChartsLocalization)(ptBRLocaleText);
package/locales/ptPT.d.ts CHANGED
@@ -9,6 +9,9 @@ export declare const ptPT: {
9
9
  noData?: string | undefined;
10
10
  zoomIn?: string | undefined;
11
11
  zoomOut?: string | undefined;
12
+ toolbarExport?: string | undefined;
13
+ toolbarExportPrint?: string | undefined;
14
+ toolbarExportImage?: ((mimeType: import("./utils/imageMimeTypes.js").ChartImageExportMimeType | (string & {})) => string) | undefined;
12
15
  };
13
16
  };
14
17
  };
package/locales/ptPT.js CHANGED
@@ -4,12 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ptPTLocaleText = exports.ptPT = void 0;
7
+ var _imageMimeTypes = require("./utils/imageMimeTypes");
7
8
  var _getChartsLocalization = require("./utils/getChartsLocalization");
8
9
  const ptPTLocaleText = exports.ptPTLocaleText = {
9
10
  // Overlay
10
11
  loading: 'Carregando dados…',
11
12
  noData: 'Sem dados para mostrar',
13
+ // Toolbar
12
14
  zoomIn: 'Aumentar zoom',
13
- zoomOut: 'Diminuir zoom'
15
+ zoomOut: 'Diminuir zoom',
16
+ toolbarExport: 'Exportar',
17
+ // Toolbar Export Menu
18
+ toolbarExportPrint: 'Imprimir',
19
+ toolbarExportImage: mimeType => `Exportar como ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}`
14
20
  };
15
21
  const ptPT = exports.ptPT = (0, _getChartsLocalization.getChartsLocalization)(ptPTLocaleText);
@@ -1,3 +1,4 @@
1
+ import { ChartImageExportMimeType } from "./imageMimeTypes.js";
1
2
  export interface ChartsLocaleText {
2
3
  /**
3
4
  * Title displayed in the overlay if `loading` is `true`.
@@ -15,5 +16,21 @@ export interface ChartsLocaleText {
15
16
  * Tooltip text shown when hovering over the zoom out button.
16
17
  */
17
18
  zoomOut: string;
19
+ /**
20
+ * Text for the export button tooltip in the toolbar.
21
+ */
22
+ toolbarExport: string;
23
+ /**
24
+ * Text for the print button in the toolbar's export menu.
25
+ */
26
+ toolbarExportPrint: string;
27
+ /**
28
+ * Text for an "Export as {image type}" button in the toolbar's export menu.
29
+ * The only format supported in all browsers is 'image/png'.
30
+ *
31
+ * @param {string} mimeType The MIME type of the image to export, e.g., 'image/png'.
32
+ * @returns {string} The localized string for an export image button.
33
+ */
34
+ toolbarExportImage: (mimeType: ChartImageExportMimeType | (string & {})) => string;
18
35
  }
19
36
  export type ChartsTranslationKeys = keyof ChartsLocaleText;
@@ -13,6 +13,9 @@ export declare const getChartsLocalization: (chartsTranslations: Partial<ChartsL
13
13
  noData?: string | undefined;
14
14
  zoomIn?: string | undefined;
15
15
  zoomOut?: string | undefined;
16
+ toolbarExport?: string | undefined;
17
+ toolbarExportPrint?: string | undefined;
18
+ toolbarExportImage?: ((mimeType: import("./imageMimeTypes.js").ChartImageExportMimeType | (string & {})) => string) | undefined;
16
19
  };
17
20
  };
18
21
  };
@@ -0,0 +1,2 @@
1
+ export declare const imageMimeTypes: Record<string, string | undefined>;
2
+ export type ChartImageExportMimeType = 'image/png' | 'image/jpeg' | 'image/webp';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.imageMimeTypes = void 0;
7
+ const imageMimeTypes = exports.imageMimeTypes = {
8
+ 'image/png': 'PNG',
9
+ 'image/jpeg': 'JPEG',
10
+ 'image/webp': 'WebP'
11
+ };
@@ -7,14 +7,18 @@ export type ChartBaseCommonProps<T = HTMLElement> = React.DOMAttributes<T> & {
7
7
  };
8
8
  export type ChartBaseIconProps = ChartBaseCommonProps<SVGSVGElement> & {
9
9
  titleAccess?: string;
10
+ fontSize?: 'small' | 'medium' | 'large' | 'inherit';
10
11
  };
11
12
  export type ChartBaseButtonProps = ChartBaseCommonProps & {
12
13
  ref?: React.Ref<HTMLButtonElement>;
14
+ id?: string;
13
15
  disabled?: boolean;
14
16
  tabIndex?: number;
15
17
  };
16
18
  export type ChartBaseIconButtonProps = ChartBaseCommonProps & {
17
19
  ref?: React.Ref<HTMLButtonElement>;
20
+ id?: string;
18
21
  disabled?: boolean;
19
22
  tabIndex?: number;
23
+ size?: 'small' | 'medium' | 'large';
20
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts",
3
- "version": "8.5.2",
3
+ "version": "8.6.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The community edition of MUI X Charts components.",
6
6
  "main": "./index.js",
@@ -36,8 +36,8 @@
36
36
  "prop-types": "^15.8.1",
37
37
  "reselect": "^5.1.1",
38
38
  "use-sync-external-store": "^1.5.0",
39
- "@mui/x-charts-vendor": "8.5.2",
40
- "@mui/x-internals": "8.5.2"
39
+ "@mui/x-charts-vendor": "8.5.3",
40
+ "@mui/x-internals": "8.6.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@emotion/react": "^11.9.0",