@mui/x-charts-pro 8.0.0-beta.3 → 8.1.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 (230) hide show
  1. package/BarChartPro/BarChartPro.js +796 -14
  2. package/BarChartPro/BarChartPro.plugins.d.ts +2 -1
  3. package/BarChartPro/BarChartPro.plugins.js +2 -1
  4. package/CHANGELOG.md +388 -96
  5. package/ChartContainerPro/ChartContainerPro.d.ts +1 -0
  6. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  7. package/ChartDataProviderPro/ChartDataProviderPro.js +36 -22
  8. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
  9. package/ChartDataProviderPro/useChartDataProviderProProps.js +2 -2
  10. package/FunnelChart/FunnelChart.js +78 -4
  11. package/FunnelChart/categoryAxis.types.d.ts +3 -2
  12. package/FunnelChart/funnelSectionClasses.d.ts +5 -0
  13. package/FunnelChart/funnelSectionClasses.js +1 -1
  14. package/FunnelChart/index.d.ts +1 -0
  15. package/FunnelChart/index.js +12 -0
  16. package/FunnelChart/useFunnelChartProps.js +3 -3
  17. package/Heatmap/Heatmap.js +5 -2
  18. package/Heatmap/HeatmapItem.js +1 -1
  19. package/Heatmap/heatmapClasses.d.ts +5 -0
  20. package/Heatmap/heatmapClasses.js +1 -1
  21. package/LineChartPro/LineChartPro.js +796 -14
  22. package/LineChartPro/LineChartPro.plugins.d.ts +2 -1
  23. package/LineChartPro/LineChartPro.plugins.js +2 -1
  24. package/ScatterChartPro/ScatterChartPro.js +796 -14
  25. package/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -1
  26. package/ScatterChartPro/ScatterChartPro.plugins.js +2 -1
  27. package/esm/BarChartPro/BarChartPro.js +796 -14
  28. package/esm/BarChartPro/BarChartPro.plugins.d.ts +2 -1
  29. package/esm/BarChartPro/BarChartPro.plugins.js +2 -1
  30. package/esm/ChartContainerPro/ChartContainerPro.d.ts +1 -0
  31. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  32. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +37 -23
  33. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +2 -2
  34. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +2 -2
  35. package/esm/FunnelChart/FunnelChart.js +78 -4
  36. package/esm/FunnelChart/categoryAxis.types.d.ts +3 -2
  37. package/esm/FunnelChart/funnelSectionClasses.d.ts +5 -0
  38. package/esm/FunnelChart/funnelSectionClasses.js +1 -1
  39. package/esm/FunnelChart/index.d.ts +1 -0
  40. package/esm/FunnelChart/index.js +1 -0
  41. package/esm/FunnelChart/useFunnelChartProps.js +3 -3
  42. package/esm/Heatmap/Heatmap.js +5 -2
  43. package/esm/Heatmap/HeatmapItem.js +1 -1
  44. package/esm/Heatmap/heatmapClasses.d.ts +5 -0
  45. package/esm/Heatmap/heatmapClasses.js +1 -1
  46. package/esm/LineChartPro/LineChartPro.js +796 -14
  47. package/esm/LineChartPro/LineChartPro.plugins.d.ts +2 -1
  48. package/esm/LineChartPro/LineChartPro.plugins.js +2 -1
  49. package/esm/ScatterChartPro/ScatterChartPro.js +796 -14
  50. package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +2 -1
  51. package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -1
  52. package/esm/index.d.ts +1 -0
  53. package/esm/index.js +2 -1
  54. package/esm/internals/plugins/allPlugins.d.ts +5 -4
  55. package/esm/internals/plugins/allPlugins.js +3 -2
  56. package/esm/internals/plugins/useChartProExport/index.d.ts +2 -0
  57. package/esm/internals/plugins/useChartProExport/index.js +2 -0
  58. package/esm/internals/plugins/useChartProExport/print.d.ts +4 -0
  59. package/esm/internals/plugins/useChartProExport/print.js +72 -0
  60. package/esm/internals/plugins/useChartProExport/useChartProExport.d.ts +3 -0
  61. package/esm/internals/plugins/useChartProExport/useChartProExport.js +45 -0
  62. package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +35 -0
  63. package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -1
  64. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +73 -56
  65. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
  66. package/esm/locales/index.d.ts +1 -0
  67. package/esm/locales/index.js +1 -0
  68. package/index.d.ts +1 -0
  69. package/index.js +12 -1
  70. package/internals/plugins/allPlugins.d.ts +5 -4
  71. package/internals/plugins/allPlugins.js +3 -2
  72. package/internals/plugins/useChartProExport/index.d.ts +2 -0
  73. package/internals/plugins/useChartProExport/index.js +27 -0
  74. package/internals/plugins/useChartProExport/print.d.ts +4 -0
  75. package/internals/plugins/useChartProExport/print.js +79 -0
  76. package/internals/plugins/useChartProExport/useChartProExport.d.ts +3 -0
  77. package/internals/plugins/useChartProExport/useChartProExport.js +53 -0
  78. package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +35 -0
  79. package/internals/plugins/useChartProExport/useChartProExport.types.js +5 -0
  80. package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -1
  81. package/internals/plugins/useChartProZoom/useChartProZoom.js +74 -56
  82. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
  83. package/locales/index.d.ts +1 -0
  84. package/locales/index.js +16 -0
  85. package/package.json +6 -14
  86. package/esm/internals/utils/releaseInfo.d.ts +0 -1
  87. package/esm/internals/utils/releaseInfo.js +0 -13
  88. package/internals/utils/releaseInfo.d.ts +0 -1
  89. package/internals/utils/releaseInfo.js +0 -21
  90. package/modern/BarChartPro/BarChartPro.d.ts +0 -18
  91. package/modern/BarChartPro/BarChartPro.js +0 -406
  92. package/modern/BarChartPro/BarChartPro.plugins.d.ts +0 -4
  93. package/modern/BarChartPro/BarChartPro.plugins.js +0 -3
  94. package/modern/BarChartPro/index.d.ts +0 -1
  95. package/modern/BarChartPro/index.js +0 -1
  96. package/modern/ChartContainerPro/ChartContainerPro.d.ts +0 -35
  97. package/modern/ChartContainerPro/ChartContainerPro.js +0 -290
  98. package/modern/ChartContainerPro/index.d.ts +0 -2
  99. package/modern/ChartContainerPro/index.js +0 -2
  100. package/modern/ChartContainerPro/useChartContainerProProps.d.ts +0 -9
  101. package/modern/ChartContainerPro/useChartContainerProProps.js +0 -35
  102. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -37
  103. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +0 -106
  104. package/modern/ChartDataProviderPro/index.d.ts +0 -2
  105. package/modern/ChartDataProviderPro/index.js +0 -2
  106. package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -8
  107. package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -15
  108. package/modern/FunnelChart/FunnelChart.d.ts +0 -37
  109. package/modern/FunnelChart/FunnelChart.js +0 -212
  110. package/modern/FunnelChart/FunnelPlot.d.ts +0 -16
  111. package/modern/FunnelChart/FunnelPlot.js +0 -184
  112. package/modern/FunnelChart/FunnelSection.d.ts +0 -15
  113. package/modern/FunnelChart/FunnelSection.js +0 -56
  114. package/modern/FunnelChart/categoryAxis.types.d.ts +0 -24
  115. package/modern/FunnelChart/funnel.types.d.ts +0 -124
  116. package/modern/FunnelChart/funnel.types.js +0 -1
  117. package/modern/FunnelChart/funnelPlotSlots.types.d.ts +0 -20
  118. package/modern/FunnelChart/funnelPlotSlots.types.js +0 -1
  119. package/modern/FunnelChart/funnelSectionClasses.d.ts +0 -13
  120. package/modern/FunnelChart/funnelSectionClasses.js +0 -20
  121. package/modern/FunnelChart/funnelSlots.types.d.ts +0 -19
  122. package/modern/FunnelChart/funnelSlots.types.js +0 -1
  123. package/modern/FunnelChart/funnelStepCurve.d.ts +0 -4
  124. package/modern/FunnelChart/funnelStepCurve.js +0 -67
  125. package/modern/FunnelChart/index.d.ts +0 -7
  126. package/modern/FunnelChart/index.js +0 -5
  127. package/modern/FunnelChart/labelUtils.d.ts +0 -42
  128. package/modern/FunnelChart/labelUtils.js +0 -166
  129. package/modern/FunnelChart/seriesConfig/extremums.d.ts +0 -3
  130. package/modern/FunnelChart/seriesConfig/extremums.js +0 -42
  131. package/modern/FunnelChart/seriesConfig/getColor.d.ts +0 -3
  132. package/modern/FunnelChart/seriesConfig/getColor.js +0 -4
  133. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  134. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +0 -11
  135. package/modern/FunnelChart/seriesConfig/index.d.ts +0 -2
  136. package/modern/FunnelChart/seriesConfig/index.js +0 -15
  137. package/modern/FunnelChart/seriesConfig/legend.d.ts +0 -3
  138. package/modern/FunnelChart/seriesConfig/legend.js +0 -25
  139. package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +0 -3
  140. package/modern/FunnelChart/seriesConfig/seriesProcessor.js +0 -89
  141. package/modern/FunnelChart/seriesConfig/tooltip.d.ts +0 -3
  142. package/modern/FunnelChart/seriesConfig/tooltip.js +0 -29
  143. package/modern/FunnelChart/useFunnelChartProps.d.ts +0 -30
  144. package/modern/FunnelChart/useFunnelChartProps.js +0 -161
  145. package/modern/Heatmap/Heatmap.d.ts +0 -57
  146. package/modern/Heatmap/Heatmap.js +0 -389
  147. package/modern/Heatmap/Heatmap.plugins.d.ts +0 -3
  148. package/modern/Heatmap/Heatmap.plugins.js +0 -2
  149. package/modern/Heatmap/HeatmapItem.d.ts +0 -49
  150. package/modern/Heatmap/HeatmapItem.js +0 -106
  151. package/modern/Heatmap/HeatmapPlot.d.ts +0 -8
  152. package/modern/Heatmap/HeatmapPlot.js +0 -59
  153. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +0 -16
  154. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltip.js +0 -284
  155. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +0 -4
  156. package/modern/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +0 -22
  157. package/modern/Heatmap/HeatmapTooltip/index.d.ts +0 -1
  158. package/modern/Heatmap/HeatmapTooltip/index.js +0 -1
  159. package/modern/Heatmap/heatmapClasses.d.ts +0 -11
  160. package/modern/Heatmap/heatmapClasses.js +0 -14
  161. package/modern/Heatmap/index.d.ts +0 -4
  162. package/modern/Heatmap/index.js +0 -4
  163. package/modern/Heatmap/seriesConfig/extremums.d.ts +0 -2
  164. package/modern/Heatmap/seriesConfig/extremums.js +0 -8
  165. package/modern/Heatmap/seriesConfig/getColor.d.ts +0 -3
  166. package/modern/Heatmap/seriesConfig/getColor.js +0 -15
  167. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  168. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +0 -8
  169. package/modern/Heatmap/seriesConfig/index.d.ts +0 -2
  170. package/modern/Heatmap/seriesConfig/index.js +0 -14
  171. package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +0 -3
  172. package/modern/Heatmap/seriesConfig/seriesProcessor.js +0 -21
  173. package/modern/Heatmap/seriesConfig/tooltip.d.ts +0 -3
  174. package/modern/Heatmap/seriesConfig/tooltip.js +0 -25
  175. package/modern/LineChartPro/LineChartPro.d.ts +0 -17
  176. package/modern/LineChartPro/LineChartPro.js +0 -403
  177. package/modern/LineChartPro/LineChartPro.plugins.d.ts +0 -4
  178. package/modern/LineChartPro/LineChartPro.plugins.js +0 -3
  179. package/modern/LineChartPro/index.d.ts +0 -1
  180. package/modern/LineChartPro/index.js +0 -1
  181. package/modern/ScatterChartPro/ScatterChartPro.d.ts +0 -17
  182. package/modern/ScatterChartPro/ScatterChartPro.js +0 -397
  183. package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +0 -4
  184. package/modern/ScatterChartPro/ScatterChartPro.plugins.js +0 -3
  185. package/modern/ScatterChartPro/index.d.ts +0 -1
  186. package/modern/ScatterChartPro/index.js +0 -1
  187. package/modern/hooks/index.d.ts +0 -2
  188. package/modern/hooks/index.js +0 -2
  189. package/modern/hooks/useFunnelSeries.d.ts +0 -33
  190. package/modern/hooks/useFunnelSeries.js +0 -42
  191. package/modern/hooks/useHeatmapSeries.d.ts +0 -33
  192. package/modern/hooks/useHeatmapSeries.js +0 -42
  193. package/modern/hooks/zoom/index.d.ts +0 -1
  194. package/modern/hooks/zoom/index.js +0 -1
  195. package/modern/hooks/zoom/useIsZoomInteracting.d.ts +0 -6
  196. package/modern/hooks/zoom/useIsZoomInteracting.js +0 -14
  197. package/modern/index.d.ts +0 -34
  198. package/modern/index.js +0 -45
  199. package/modern/internals/plugins/allPlugins.d.ts +0 -8
  200. package/modern/internals/plugins/allPlugins.js +0 -6
  201. package/modern/internals/plugins/useChartProZoom/index.d.ts +0 -3
  202. package/modern/internals/plugins/useChartProZoom/index.js +0 -3
  203. package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +0 -3
  204. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +0 -350
  205. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +0 -203
  206. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -4
  207. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +0 -53
  208. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +0 -1
  209. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +0 -45
  210. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +0 -126
  211. package/modern/internals/utils/releaseInfo.d.ts +0 -1
  212. package/modern/internals/utils/releaseInfo.js +0 -13
  213. package/modern/models/index.d.ts +0 -2
  214. package/modern/models/index.js +0 -2
  215. package/modern/models/seriesType/heatmap.d.ts +0 -28
  216. package/modern/models/seriesType/heatmap.js +0 -1
  217. package/modern/models/seriesType/index.d.ts +0 -1
  218. package/modern/models/seriesType/index.js +0 -1
  219. package/modern/package.json +0 -1
  220. package/modern/themeAugmentation/components.d.ts +0 -23
  221. package/modern/themeAugmentation/index.d.ts +0 -4
  222. package/modern/themeAugmentation/index.js +0 -0
  223. package/modern/themeAugmentation/overrides.d.ts +0 -11
  224. package/modern/themeAugmentation/props.d.ts +0 -20
  225. package/modern/typeOverloads/index.d.ts +0 -1
  226. package/modern/typeOverloads/index.js +0 -1
  227. package/modern/typeOverloads/modules.d.ts +0 -33
  228. package/modern/typeOverloads/modules.js +0 -1
  229. package/tsconfig.build.tsbuildinfo +0 -1
  230. /package/{modern/FunnelChart/categoryAxis.types.js → esm/internals/plugins/useChartProExport/useChartProExport.types.js} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
2
+ import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
2
3
  import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
3
- export type ScatterChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature, UseChartProZoomSignature];
4
+ export type ScatterChartProPluginsSignatures = [UseChartZAxisSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVoronoiSignature, UseChartProZoomSignature, UseChartProExportSignature];
4
5
  export declare const SCATTER_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<ScatterChartProPluginsSignatures>;
@@ -1,3 +1,4 @@
1
1
  import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi } from '@mui/x-charts/internals';
2
+ import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
2
3
  import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
3
- export const SCATTER_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi, useChartProZoom];
4
+ export const SCATTER_CHART_PRO_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartVoronoi, useChartProZoom, useChartProExport];
package/esm/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export * from '@mui/x-charts/ChartsGrid';
13
13
  export * from '@mui/x-charts/ChartsText';
14
14
  export * from '@mui/x-charts/ChartsTooltip';
15
15
  export * from '@mui/x-charts/ChartsLegend';
16
+ export * from '@mui/x-charts/ChartsLocalizationProvider';
16
17
  export * from '@mui/x-charts/ChartsAxisHighlight';
17
18
  export * from '@mui/x-charts/BarChart';
18
19
  export * from '@mui/x-charts/LineChart';
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.0.0-beta.3
2
+ * @mui/x-charts-pro v8.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -22,6 +22,7 @@ export * from '@mui/x-charts/ChartsGrid';
22
22
  export * from '@mui/x-charts/ChartsText';
23
23
  export * from '@mui/x-charts/ChartsTooltip';
24
24
  export * from '@mui/x-charts/ChartsLegend';
25
+ export * from '@mui/x-charts/ChartsLocalizationProvider';
25
26
  export * from '@mui/x-charts/ChartsAxisHighlight';
26
27
  export * from '@mui/x-charts/BarChart';
27
28
  export * from '@mui/x-charts/LineChart';
@@ -1,8 +1,9 @@
1
1
  import { ChartSeriesType, ConvertSignaturesIntoPlugins, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartZAxisSignature, UseChartHighlightSignature, UseChartPolarAxisSignature } from '@mui/x-charts/internals';
2
+ import { UseChartProExportSignature } from "./useChartProExport/index.js";
2
3
  import { UseChartProZoomSignature } from "./useChartProZoom/index.js";
3
- export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
4
+ export type AllPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
4
5
  export type AllPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<AllPluginSignatures<TSeries>>;
5
- export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
6
- export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature];
6
+ export declare const ALL_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>> | import("@mui/x-charts/internals").ChartPlugin<UseChartPolarAxisSignature<any>>)[];
7
+ export type DefaultPluginSignatures<TSeries extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartCartesianAxisSignature<TSeries>, UseChartPolarAxisSignature<TSeries>, UseChartInteractionSignature, UseChartHighlightSignature, UseChartProZoomSignature, UseChartProExportSignature];
7
8
  export type DefaultPluginsType<TSeries extends ChartSeriesType = ChartSeriesType> = ConvertSignaturesIntoPlugins<DefaultPluginSignatures<TSeries>>;
8
- export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
9
+ export declare const DEFAULT_PLUGINS: (import("@mui/x-charts/internals").ChartPlugin<UseChartProZoomSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature> | import("@mui/x-charts/internals").ChartPlugin<UseChartCartesianAxisSignature<any>>)[];
@@ -1,6 +1,7 @@
1
1
  // This file should be removed after creating all plugins in favor of a file per chart type.
2
2
 
3
3
  import { useChartCartesianAxis, useChartInteraction, useChartZAxis, useChartHighlight, useChartPolarAxis } from '@mui/x-charts/internals';
4
+ import { useChartProExport } from "./useChartProExport/index.js";
4
5
  import { useChartProZoom } from "./useChartProZoom/index.js";
5
- export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartPolarAxis, useChartInteraction, useChartHighlight, useChartProZoom];
6
- export const DEFAULT_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom];
6
+ export const ALL_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartPolarAxis, useChartInteraction, useChartHighlight, useChartProZoom, useChartProExport];
7
+ export const DEFAULT_PLUGINS = [useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartProZoom, useChartProExport];
@@ -0,0 +1,2 @@
1
+ export * from "./useChartProExport.js";
2
+ export * from "./useChartProExport.types.js";
@@ -0,0 +1,2 @@
1
+ export * from "./useChartProExport.js";
2
+ export * from "./useChartProExport.types.js";
@@ -0,0 +1,4 @@
1
+ import { ChartPrintExportOptions } from "./useChartProExport.types.js";
2
+ export declare function printChart(element: HTMLElement | SVGElement, {
3
+ fileName
4
+ }?: ChartPrintExportOptions): void;
@@ -0,0 +1,72 @@
1
+ import ownerDocument from '@mui/utils/ownerDocument';
2
+ export function printChart(element, {
3
+ fileName
4
+ } = {}) {
5
+ const printWindow = buildPrintWindow(fileName);
6
+ const doc = ownerDocument(element);
7
+ printWindow.onload = async () => {
8
+ const printDoc = printWindow.contentDocument;
9
+ const elementClone = element.cloneNode(true);
10
+ const container = document.createElement('div');
11
+ container.appendChild(elementClone);
12
+ printDoc.body.innerHTML = container.innerHTML;
13
+ await loadStyleSheets(printDoc, element);
14
+ printWindow.contentWindow.print();
15
+ const mediaQueryList = printWindow.contentWindow.matchMedia('print');
16
+ mediaQueryList.addEventListener('change', mql => {
17
+ const isAfterPrint = mql.matches === false;
18
+ if (isAfterPrint) {
19
+ doc.body.removeChild(printWindow);
20
+ }
21
+ });
22
+ };
23
+ doc.body.appendChild(printWindow);
24
+ }
25
+ function buildPrintWindow(title) {
26
+ const iframeEl = document.createElement('iframe');
27
+ iframeEl.style.position = 'absolute';
28
+ iframeEl.style.width = '0px';
29
+ iframeEl.style.height = '0px';
30
+ iframeEl.title = title || document.title;
31
+ return iframeEl;
32
+ }
33
+ function loadStyleSheets(printDoc, element) {
34
+ const stylesheetLoadPromises = [];
35
+ const doc = ownerDocument(element);
36
+ const rootCandidate = element.getRootNode();
37
+ const root = rootCandidate.constructor.name === 'ShadowRoot' ? rootCandidate : doc;
38
+ const headStyleElements = root.querySelectorAll("style, link[rel='stylesheet']");
39
+ for (let i = 0; i < headStyleElements.length; i += 1) {
40
+ const node = headStyleElements[i];
41
+ if (node.tagName === 'STYLE') {
42
+ const newHeadStyleElements = printDoc.createElement(node.tagName);
43
+ const sheet = node.sheet;
44
+ if (sheet) {
45
+ let styleCSS = '';
46
+ // NOTE: for-of is not supported by IE
47
+ for (let j = 0; j < sheet.cssRules.length; j += 1) {
48
+ if (typeof sheet.cssRules[j].cssText === 'string') {
49
+ styleCSS += `${sheet.cssRules[j].cssText}\r\n`;
50
+ }
51
+ }
52
+ newHeadStyleElements.appendChild(printDoc.createTextNode(styleCSS));
53
+ printDoc.head.appendChild(newHeadStyleElements);
54
+ }
55
+ } else if (node.getAttribute('href')) {
56
+ // If `href` tag is empty, avoid loading these links
57
+
58
+ const newHeadStyleElements = printDoc.createElement(node.tagName);
59
+ for (let j = 0; j < node.attributes.length; j += 1) {
60
+ const attr = node.attributes[j];
61
+ if (attr) {
62
+ newHeadStyleElements.setAttribute(attr.nodeName, attr.nodeValue || '');
63
+ }
64
+ }
65
+ stylesheetLoadPromises.push(new Promise(resolve => {
66
+ newHeadStyleElements.addEventListener('load', () => resolve());
67
+ }));
68
+ printDoc.head.appendChild(newHeadStyleElements);
69
+ }
70
+ }
71
+ return Promise.all(stylesheetLoadPromises);
72
+ }
@@ -0,0 +1,3 @@
1
+ import { ChartPlugin } from '@mui/x-charts/internals';
2
+ import { UseChartProExportSignature } from "./useChartProExport.types.js";
3
+ export declare const useChartProExport: ChartPlugin<UseChartProExportSignature>;
@@ -0,0 +1,45 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import { printChart } from "./print.js";
3
+ function waitForAnimationFrame() {
4
+ let resolve;
5
+ const promise = new Promise(res => {
6
+ resolve = res;
7
+ });
8
+ window.requestAnimationFrame(() => {
9
+ resolve();
10
+ });
11
+ return promise;
12
+ }
13
+ export const useChartProExport = ({
14
+ chartRootRef,
15
+ instance
16
+ }) => {
17
+ const exportAsPrint = async options => {
18
+ const chartRoot = chartRootRef.current;
19
+ if (chartRoot) {
20
+ const enableAnimation = instance.disableAnimation();
21
+ try {
22
+ // Wait for animation frame to ensure the animation finished
23
+ await waitForAnimationFrame();
24
+ printChart(chartRoot, options);
25
+ } finally {
26
+ enableAnimation();
27
+ }
28
+ }
29
+ };
30
+ return {
31
+ publicAPI: {
32
+ exportAsPrint
33
+ },
34
+ instance: {
35
+ exportAsPrint
36
+ }
37
+ };
38
+ };
39
+ useChartProExport.params = {};
40
+ useChartProExport.getDefaultizedParams = ({
41
+ params
42
+ }) => _extends({}, params);
43
+ useChartProExport.getInitialState = () => ({
44
+ export: {}
45
+ });
@@ -0,0 +1,35 @@
1
+ import { UseChartSeriesSignature, ChartPluginSignature, UseChartCartesianAxisSignature } from '@mui/x-charts/internals';
2
+ export interface UseChartProExportParameters {}
3
+ export type UseChartProExportDefaultizedParameters = UseChartProExportParameters;
4
+ export interface UseChartProExportState {
5
+ export: {};
6
+ }
7
+ /**
8
+ * The options to apply on the Print export.
9
+ * @demos
10
+ * - [Print export](/x/react-charts/export/#print-export-as-pdf)
11
+ */
12
+ export interface ChartPrintExportOptions {
13
+ /**
14
+ * The value to be used as the print window title.
15
+ * @default The title of the page.
16
+ */
17
+ fileName?: string;
18
+ }
19
+ export interface UseChartProExportPublicApi {
20
+ /**
21
+ * Opens the browser's print dialog, which can be used to print the chart or export it as PDF.
22
+ * @param {ChartPrintExportOptions} options Options to customize the print export.
23
+ * @returns {void}
24
+ */
25
+ exportAsPrint: (options?: ChartPrintExportOptions) => void;
26
+ }
27
+ export interface UseChartProExportInstance extends UseChartProExportPublicApi {}
28
+ export type UseChartProExportSignature = ChartPluginSignature<{
29
+ params: UseChartProExportParameters;
30
+ defaultizedParams: UseChartProExportDefaultizedParameters;
31
+ state: UseChartProExportState;
32
+ publicAPI: UseChartProExportPublicApi;
33
+ instance: UseChartProExportInstance;
34
+ dependencies: [UseChartSeriesSignature, UseChartCartesianAxisSignature];
35
+ }>;
@@ -1,3 +1,4 @@
1
- import { ChartPlugin } from '@mui/x-charts/internals';
1
+ import { ChartPlugin, AxisId, DefaultizedZoomOptions, ZoomData } from '@mui/x-charts/internals';
2
2
  import { UseChartProZoomSignature } from "./useChartProZoom.types.js";
3
+ export declare function initializeZoomData(options: Record<AxisId, DefaultizedZoomOptions>, zoomData?: readonly ZoomData[]): ZoomData[];
3
4
  export declare const useChartProZoom: ChartPlugin<UseChartProZoomSignature>;
@@ -2,21 +2,35 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
- import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
6
5
  import { useSelector, getSVGPoint, selectorChartDrawingArea, createZoomLookup, selectorChartZoomOptionsLookup } from '@mui/x-charts/internals';
6
+ import { useEventCallback } from '@mui/material/utils';
7
+ import { rafThrottle } from '@mui/x-internals/rafThrottle';
8
+ import debounce from '@mui/utils/debounce';
7
9
  import { getDiff, getHorizontalCenterRatio, getPinchScaleRatio, getVerticalCenterRatio, getWheelScaleRatio, isSpanValid, preventDefault, zoomAtPoint } from "./useChartProZoom.utils.js";
8
10
 
9
11
  // It is helpful to avoid the need to provide the possibly auto-generated id for each axis.
10
- function initializeZoomData(options) {
12
+ export function initializeZoomData(options, zoomData) {
13
+ const zoomDataMap = new Map();
14
+ zoomData?.forEach(zoom => {
15
+ const option = options[zoom.axisId];
16
+ if (option) {
17
+ zoomDataMap.set(zoom.axisId, zoom);
18
+ }
19
+ });
11
20
  return Object.values(options).map(({
12
21
  axisId,
13
22
  minStart: start,
14
23
  maxEnd: end
15
- }) => ({
16
- axisId,
17
- start,
18
- end
19
- }));
24
+ }) => {
25
+ if (zoomDataMap.has(axisId)) {
26
+ return zoomDataMap.get(axisId);
27
+ }
28
+ return {
29
+ axisId,
30
+ start,
31
+ end
32
+ };
33
+ });
20
34
  }
21
35
  export const useChartProZoom = ({
22
36
  store,
@@ -26,15 +40,15 @@ export const useChartProZoom = ({
26
40
  }) => {
27
41
  const {
28
42
  zoomData: paramsZoomData,
29
- onZoomChange
43
+ onZoomChange: onZoomChangeProp
30
44
  } = params;
31
45
  const drawingArea = useSelector(store, selectorChartDrawingArea);
32
46
  const optionsLookup = useSelector(store, selectorChartZoomOptionsLookup);
33
47
  const isZoomEnabled = Object.keys(optionsLookup).length > 0;
48
+ const onZoomChange = useEventCallback(onZoomChangeProp ?? (() => {}));
34
49
 
35
50
  // Manage controlled state
36
-
37
- useEnhancedEffect(() => {
51
+ React.useEffect(() => {
38
52
  if (paramsZoomData === undefined) {
39
53
  return undefined;
40
54
  }
@@ -63,14 +77,14 @@ export const useChartProZoom = ({
63
77
  };
64
78
  }, [store, paramsZoomData]);
65
79
 
66
- // Add instance methods
67
- const setIsInteracting = React.useCallback(isInteracting => {
68
- store.update(prev => _extends({}, prev, {
69
- zoom: _extends({}, prev.zoom, {
70
- isInteracting
80
+ // This is debounced. We want to run it only once after the interaction ends.
81
+ const removeIsInteracting = React.useMemo(() => debounce(() => store.update(prevState => {
82
+ return _extends({}, prevState, {
83
+ zoom: _extends({}, prevState.zoom, {
84
+ isInteracting: false
71
85
  })
72
- }));
73
- }, [store]);
86
+ });
87
+ }), 166), [store]);
74
88
  const setZoomDataCallback = React.useCallback(zoomData => {
75
89
  store.update(prevState => {
76
90
  const newZoomData = typeof zoomData === 'function' ? zoomData([...prevState.zoom.zoomData]) : zoomData;
@@ -78,19 +92,25 @@ export const useChartProZoom = ({
78
92
  if (prevState.zoom.isControlled) {
79
93
  return prevState;
80
94
  }
95
+ removeIsInteracting();
81
96
  return _extends({}, prevState, {
82
97
  zoom: _extends({}, prevState.zoom, {
98
+ isInteracting: true,
83
99
  zoomData: newZoomData
84
100
  })
85
101
  });
86
102
  });
87
- }, [onZoomChange, store]);
103
+ }, [onZoomChange, store, removeIsInteracting]);
104
+ React.useEffect(() => {
105
+ return () => {
106
+ removeIsInteracting.clear();
107
+ };
108
+ }, [setZoomDataCallback, removeIsInteracting]);
88
109
 
89
110
  // Add events
90
111
  const panningEventCacheRef = React.useRef([]);
91
112
  const zoomEventCacheRef = React.useRef([]);
92
113
  const eventPrevDiff = React.useRef(0);
93
- const interactionTimeoutRef = React.useRef(undefined);
94
114
 
95
115
  // Add event for chart panning
96
116
  const isPanEnabled = React.useMemo(() => Object.values(optionsLookup).some(v => v.panning) || false, [optionsLookup]);
@@ -101,17 +121,10 @@ export const useChartProZoom = ({
101
121
  if (element === null || !isPanEnabled) {
102
122
  return () => {};
103
123
  }
104
- const handlePan = event => {
105
- if (element === null || !isDraggingRef.current || panningEventCacheRef.current.length > 1) {
106
- return;
107
- }
108
- if (touchStartRef.current == null) {
109
- return;
110
- }
111
- const point = getSVGPoint(element, event);
112
- const movementX = point.x - touchStartRef.current.x;
113
- const movementY = (point.y - touchStartRef.current.y) * -1;
114
- const newZoomData = touchStartRef.current.zoomData.map(zoom => {
124
+ const throttledHandlePan = rafThrottle((touchStart, point) => {
125
+ const movementX = point.x - touchStart.x;
126
+ const movementY = (point.y - touchStart.y) * -1;
127
+ const newZoomData = touchStart.zoomData.map(zoom => {
115
128
  const options = optionsLookup[zoom.axisId];
116
129
  if (!options || !options.panning) {
117
130
  return zoom;
@@ -142,6 +155,17 @@ export const useChartProZoom = ({
142
155
  });
143
156
  });
144
157
  setZoomDataCallback(newZoomData);
158
+ });
159
+ const handlePan = event => {
160
+ if (element === null || !isDraggingRef.current || panningEventCacheRef.current.length > 1) {
161
+ return;
162
+ }
163
+ if (touchStartRef.current == null) {
164
+ return;
165
+ }
166
+ const touchStart = touchStartRef.current;
167
+ const point = getSVGPoint(element, event);
168
+ throttledHandlePan(touchStart, point);
145
169
  };
146
170
  const handleDown = event => {
147
171
  panningEventCacheRef.current.push(event);
@@ -154,7 +178,6 @@ export const useChartProZoom = ({
154
178
  event.preventDefault();
155
179
  }
156
180
  isDraggingRef.current = true;
157
- setIsInteracting(true);
158
181
  touchStartRef.current = {
159
182
  x: point.x,
160
183
  y: point.y,
@@ -163,7 +186,6 @@ export const useChartProZoom = ({
163
186
  };
164
187
  const handleUp = event => {
165
188
  panningEventCacheRef.current.splice(panningEventCacheRef.current.findIndex(cachedEvent => cachedEvent.pointerId === event.pointerId), 1);
166
- setIsInteracting(false);
167
189
  isDraggingRef.current = false;
168
190
  touchStartRef.current = null;
169
191
  };
@@ -178,8 +200,9 @@ export const useChartProZoom = ({
178
200
  document.removeEventListener('pointerup', handleUp);
179
201
  document.removeEventListener('pointercancel', handleUp);
180
202
  document.removeEventListener('pointerleave', handleUp);
203
+ throttledHandlePan.clear();
181
204
  };
182
- }, [instance, svgRef, isDraggingRef, setIsInteracting, isPanEnabled, optionsLookup, drawingArea.width, drawingArea.height, setZoomDataCallback, store]);
205
+ }, [instance, svgRef, isDraggingRef, isPanEnabled, optionsLookup, drawingArea.width, drawingArea.height, setZoomDataCallback, store]);
183
206
 
184
207
  // Add event for chart zoom in/out
185
208
  React.useEffect(() => {
@@ -187,6 +210,7 @@ export const useChartProZoom = ({
187
210
  if (element === null || !isZoomEnabled) {
188
211
  return () => {};
189
212
  }
213
+ const rafThrottledSetZoomData = rafThrottle(setZoomDataCallback);
190
214
  const wheelHandler = event => {
191
215
  if (element === null) {
192
216
  return;
@@ -196,16 +220,13 @@ export const useChartProZoom = ({
196
220
  return;
197
221
  }
198
222
  event.preventDefault();
199
- if (interactionTimeoutRef.current) {
200
- clearTimeout(interactionTimeoutRef.current);
201
- }
202
- setIsInteracting(true);
203
- // Debounce transition to `isInteractive=false`.
204
- // Useful because wheel events don't have an "end" event.
205
- interactionTimeoutRef.current = window.setTimeout(() => {
206
- setIsInteracting(false);
207
- }, 166);
208
- setZoomDataCallback(prevZoomData => {
223
+
224
+ /*
225
+ * Need to throttle `setZoomDataCallback` instead of `wheelHandler` because we're calling `event.preventDefault()`.
226
+ * If we throttle the event, then some events' default behavior won't be prevented and the page will scroll while
227
+ * the user is trying to zoom in.
228
+ */
229
+ rafThrottledSetZoomData(prevZoomData => {
209
230
  return prevZoomData.map(zoom => {
210
231
  const option = optionsLookup[zoom.axisId];
211
232
  if (!option) {
@@ -230,9 +251,8 @@ export const useChartProZoom = ({
230
251
  };
231
252
  function pointerDownHandler(event) {
232
253
  zoomEventCacheRef.current.push(event);
233
- setIsInteracting(true);
234
254
  }
235
- function pointerMoveHandler(event) {
255
+ const pointerMoveHandler = rafThrottle(function pointerMoveHandler(event) {
236
256
  if (element === null) {
237
257
  return;
238
258
  }
@@ -275,15 +295,12 @@ export const useChartProZoom = ({
275
295
  eventPrevDiff.current = curDiff;
276
296
  return newZoomData;
277
297
  });
278
- }
298
+ });
279
299
  function pointerUpHandler(event) {
280
300
  zoomEventCacheRef.current.splice(zoomEventCacheRef.current.findIndex(cachedEvent => cachedEvent.pointerId === event.pointerId), 1);
281
301
  if (zoomEventCacheRef.current.length < 2) {
282
302
  eventPrevDiff.current = 0;
283
303
  }
284
- if (event.type === 'pointerup' || event.type === 'pointercancel') {
285
- setIsInteracting(false);
286
- }
287
304
  }
288
305
  element.addEventListener('wheel', wheelHandler);
289
306
  element.addEventListener('pointerdown', pointerDownHandler);
@@ -306,11 +323,10 @@ export const useChartProZoom = ({
306
323
  element.removeEventListener('pointerleave', pointerUpHandler);
307
324
  element.removeEventListener('touchstart', preventDefault);
308
325
  element.removeEventListener('touchmove', preventDefault);
309
- if (interactionTimeoutRef.current) {
310
- clearTimeout(interactionTimeoutRef.current);
311
- }
326
+ pointerMoveHandler.clear();
327
+ rafThrottledSetZoomData.clear();
312
328
  };
313
- }, [svgRef, drawingArea, isZoomEnabled, optionsLookup, setIsInteracting, instance, setZoomDataCallback]);
329
+ }, [svgRef, drawingArea, isZoomEnabled, optionsLookup, instance, setZoomDataCallback]);
314
330
  return {
315
331
  publicAPI: {
316
332
  setZoomData: setZoomDataCallback
@@ -338,11 +354,12 @@ useChartProZoom.getInitialState = params => {
338
354
  defaultizedYAxis
339
355
  } = params;
340
356
  const optionsLookup = _extends({}, createZoomLookup('x')(defaultizedXAxis), createZoomLookup('y')(defaultizedYAxis));
357
+ const userZoomData =
358
+ // eslint-disable-next-line no-nested-ternary
359
+ zoomData !== undefined ? zoomData : initialZoom !== undefined ? initialZoom : undefined;
341
360
  return {
342
361
  zoom: {
343
- zoomData:
344
- // eslint-disable-next-line no-nested-ternary
345
- zoomData !== undefined ? zoomData : initialZoom !== undefined ? initialZoom : initializeZoomData(optionsLookup),
362
+ zoomData: initializeZoomData(optionsLookup, userZoomData),
346
363
  isInteracting: false,
347
364
  isControlled: zoomData !== undefined
348
365
  }
@@ -1,7 +1,7 @@
1
1
  import { ChartRootSelector } from '@mui/x-charts/internals';
2
2
  import { UseChartProZoomSignature } from "./useChartProZoom.types.js";
3
3
  export declare const selectorChartZoomState: ChartRootSelector<UseChartProZoomSignature>;
4
- export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("./useChartProZoom.types").UseChartProZoomState & Partial<{}> & {
4
+ export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("./useChartProZoom.types").UseChartProZoomState & Partial<{}> & {
5
5
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
6
6
  }) => boolean) & {
7
7
  clearCache: () => void;
@@ -32,7 +32,7 @@ export declare const selectorChartZoomIsInteracting: ((state: import("@mui/x-cha
32
32
  argsMemoize: typeof import("reselect").weakMapMemoize;
33
33
  memoize: typeof import("reselect").weakMapMemoize;
34
34
  };
35
- export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
35
+ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
36
36
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
37
37
  }) => boolean) & {
38
38
  clearCache: () => void;
@@ -52,7 +52,7 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
52
52
  resetResultsCount: () => void;
53
53
  };
54
54
  lastResult: () => boolean;
55
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
55
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
56
56
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
57
57
  }) => {
58
58
  [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
@@ -78,7 +78,7 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
78
78
  [x: string]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
79
79
  [x: number]: import("@mui/x-charts/internals").DefaultizedZoomOptions;
80
80
  };
81
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
81
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
82
82
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
83
83
  }) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
84
84
  clearCache: () => void;
@@ -92,7 +92,7 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
92
92
  resetResultsCount: () => void;
93
93
  };
94
94
  lastResult: () => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
95
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
95
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
96
96
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
97
97
  }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsXAxisProps>[] | undefined) & {
98
98
  clearCache: () => void;
@@ -131,7 +131,7 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
131
131
  } & {
132
132
  memoize: typeof import("reselect").weakMapMemoize;
133
133
  argsMemoize: typeof import("reselect").weakMapMemoize;
134
- }, ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
134
+ }, ((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
135
135
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
136
136
  }) => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>) & {
137
137
  clearCache: () => void;
@@ -145,7 +145,7 @@ export declare const selectorChartZoomIsEnabled: ((state: import("@mui/x-charts/
145
145
  resetResultsCount: () => void;
146
146
  };
147
147
  lastResult: () => Record<import("@mui/x-charts/internals").AxisId, import("@mui/x-charts/internals").DefaultizedZoomOptions>;
148
- dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
148
+ dependencies: [((state: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & Partial<import("@mui/x-charts/internals").UseChartCartesianAxisState> & {
149
149
  cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
150
150
  }) => import("@mui/x-charts").AxisConfig<keyof import("@mui/x-charts/internals").AxisScaleConfig, any, import("@mui/x-charts").ChartsYAxisProps>[] | undefined) & {
151
151
  clearCache: () => void;
@@ -0,0 +1 @@
1
+ export * from '@mui/x-charts/locales';
@@ -0,0 +1 @@
1
+ export * from '@mui/x-charts/locales';
package/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export * from '@mui/x-charts/ChartsGrid';
13
13
  export * from '@mui/x-charts/ChartsText';
14
14
  export * from '@mui/x-charts/ChartsTooltip';
15
15
  export * from '@mui/x-charts/ChartsLegend';
16
+ export * from '@mui/x-charts/ChartsLocalizationProvider';
16
17
  export * from '@mui/x-charts/ChartsAxisHighlight';
17
18
  export * from '@mui/x-charts/BarChart';
18
19
  export * from '@mui/x-charts/LineChart';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v8.0.0-beta.3
2
+ * @mui/x-charts-pro v8.1.0
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -165,6 +165,17 @@ Object.keys(_ChartsLegend).forEach(function (key) {
165
165
  }
166
166
  });
167
167
  });
168
+ var _ChartsLocalizationProvider = require("@mui/x-charts/ChartsLocalizationProvider");
169
+ Object.keys(_ChartsLocalizationProvider).forEach(function (key) {
170
+ if (key === "default" || key === "__esModule") return;
171
+ if (key in exports && exports[key] === _ChartsLocalizationProvider[key]) return;
172
+ Object.defineProperty(exports, key, {
173
+ enumerable: true,
174
+ get: function () {
175
+ return _ChartsLocalizationProvider[key];
176
+ }
177
+ });
178
+ });
168
179
  var _ChartsAxisHighlight = require("@mui/x-charts/ChartsAxisHighlight");
169
180
  Object.keys(_ChartsAxisHighlight).forEach(function (key) {
170
181
  if (key === "default" || key === "__esModule") return;