@mui/x-charts-premium 9.3.0 → 9.4.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 (176) hide show
  1. package/BarChartPremium/BarChartPremium.js +35 -5
  2. package/BarChartPremium/BarChartPremium.mjs +35 -5
  3. package/BarChartPremium/RangeBar/RangeBarPlot.d.mts +10 -0
  4. package/BarChartPremium/RangeBar/RangeBarPlot.d.ts +10 -0
  5. package/BarChartPremium/RangeBar/RangeBarPlot.js +59 -2
  6. package/BarChartPremium/RangeBar/RangeBarPlot.mjs +59 -2
  7. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.d.mts +10 -0
  8. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.d.ts +10 -0
  9. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.js +82 -0
  10. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.mjs +76 -0
  11. package/BarChartPremium/RangeBar/seriesConfig/extrema.js +3 -0
  12. package/BarChartPremium/RangeBar/seriesConfig/extrema.mjs +3 -0
  13. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.js +2 -2
  14. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.mjs +2 -2
  15. package/BarChartPremium/useBarChartPremiumProps.js +2 -1
  16. package/BarChartPremium/useBarChartPremiumProps.mjs +2 -1
  17. package/BarChartPremium/webgl/useBarWebGLPlotData.d.mts +2 -7
  18. package/BarChartPremium/webgl/useBarWebGLPlotData.d.ts +2 -7
  19. package/BarChartPremium/webgl/useBarWebGLPlotData.js +4 -151
  20. package/BarChartPremium/webgl/useBarWebGLPlotData.mjs +4 -150
  21. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.mts +39 -0
  22. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.ts +39 -0
  23. package/BarChartPremium/webgl/useWebGLBarLikePlotData.js +169 -0
  24. package/BarChartPremium/webgl/useWebGLBarLikePlotData.mjs +163 -0
  25. package/CHANGELOG.md +196 -0
  26. package/CandlestickChart/CandlestickChart.js +11 -2
  27. package/CandlestickChart/CandlestickChart.mjs +11 -2
  28. package/CandlestickChart/seriesConfig/extrema.js +3 -0
  29. package/CandlestickChart/seriesConfig/extrema.mjs +3 -0
  30. package/CandlestickChart/seriesConfig/seriesProcessor.js +2 -2
  31. package/CandlestickChart/seriesConfig/seriesProcessor.mjs +2 -2
  32. package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +2 -2
  33. package/ChartsDataProviderPremium/ChartsDataProviderPremium.mjs +2 -2
  34. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.mts +35 -0
  35. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.ts +35 -0
  36. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.js +125 -0
  37. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.mjs +119 -0
  38. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.mts +5 -0
  39. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.ts +5 -0
  40. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.js +10 -0
  41. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.mjs +4 -0
  42. package/ChartsGeoDataProviderPremium/index.d.mts +3 -0
  43. package/ChartsGeoDataProviderPremium/index.d.ts +3 -0
  44. package/ChartsGeoDataProviderPremium/index.js +20 -0
  45. package/ChartsGeoDataProviderPremium/index.mjs +3 -0
  46. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.mts +10 -0
  47. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.ts +10 -0
  48. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.js +49 -0
  49. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.mjs +42 -0
  50. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.js +2 -2
  51. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.mjs +2 -2
  52. package/HeatmapPremium/HeatmapPremium.js +32 -2
  53. package/HeatmapPremium/HeatmapPremium.mjs +32 -2
  54. package/Map/FocusedMapShape.d.mts +4 -0
  55. package/Map/FocusedMapShape.d.ts +4 -0
  56. package/Map/FocusedMapShape.js +66 -0
  57. package/Map/FocusedMapShape.mjs +60 -0
  58. package/Map/GeoDataPlot.d.mts +26 -0
  59. package/Map/GeoDataPlot.d.ts +26 -0
  60. package/Map/GeoDataPlot.js +65 -0
  61. package/Map/GeoDataPlot.mjs +60 -0
  62. package/Map/Graticule.d.mts +1 -0
  63. package/Map/Graticule.d.ts +1 -0
  64. package/Map/Graticule.js +30 -0
  65. package/Map/Graticule.mjs +24 -0
  66. package/Map/MapShape.d.mts +10 -0
  67. package/Map/MapShape.d.ts +10 -0
  68. package/Map/MapShape.js +55 -0
  69. package/Map/MapShape.mjs +49 -0
  70. package/Map/MapShapePlot.d.mts +21 -0
  71. package/Map/MapShapePlot.d.ts +21 -0
  72. package/Map/MapShapePlot.js +86 -0
  73. package/Map/MapShapePlot.mjs +80 -0
  74. package/Map/index.d.mts +7 -0
  75. package/Map/index.d.ts +7 -0
  76. package/Map/index.js +60 -0
  77. package/Map/index.mjs +8 -0
  78. package/Map/seriesConfig/descriptionGetter.d.mts +3 -0
  79. package/Map/seriesConfig/descriptionGetter.d.ts +3 -0
  80. package/Map/seriesConfig/descriptionGetter.js +19 -0
  81. package/Map/seriesConfig/descriptionGetter.mjs +13 -0
  82. package/Map/seriesConfig/getColor.d.mts +3 -0
  83. package/Map/seriesConfig/getColor.d.ts +3 -0
  84. package/Map/seriesConfig/getColor.js +35 -0
  85. package/Map/seriesConfig/getColor.mjs +29 -0
  86. package/Map/seriesConfig/getSeriesWithDefaultValues.d.mts +3 -0
  87. package/Map/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  88. package/Map/seriesConfig/getSeriesWithDefaultValues.js +15 -0
  89. package/Map/seriesConfig/getSeriesWithDefaultValues.mjs +8 -0
  90. package/Map/seriesConfig/index.d.mts +2 -0
  91. package/Map/seriesConfig/index.d.ts +2 -0
  92. package/Map/seriesConfig/index.js +28 -0
  93. package/Map/seriesConfig/index.mjs +21 -0
  94. package/Map/seriesConfig/keyboardFocusHandler.d.mts +9 -0
  95. package/Map/seriesConfig/keyboardFocusHandler.d.ts +9 -0
  96. package/Map/seriesConfig/keyboardFocusHandler.js +19 -0
  97. package/Map/seriesConfig/keyboardFocusHandler.mjs +13 -0
  98. package/Map/seriesConfig/legend.d.mts +3 -0
  99. package/Map/seriesConfig/legend.d.ts +3 -0
  100. package/Map/seriesConfig/legend.js +28 -0
  101. package/Map/seriesConfig/legend.mjs +22 -0
  102. package/Map/seriesConfig/seriesProcessor.d.mts +3 -0
  103. package/Map/seriesConfig/seriesProcessor.d.ts +3 -0
  104. package/Map/seriesConfig/seriesProcessor.js +66 -0
  105. package/Map/seriesConfig/seriesProcessor.mjs +59 -0
  106. package/Map/seriesConfig/tooltip.d.mts +3 -0
  107. package/Map/seriesConfig/tooltip.d.ts +3 -0
  108. package/Map/seriesConfig/tooltip.js +33 -0
  109. package/Map/seriesConfig/tooltip.mjs +27 -0
  110. package/RadialLineChart/RadialLineHighlightPlot.d.mts +3 -2
  111. package/RadialLineChart/RadialLineHighlightPlot.d.ts +3 -2
  112. package/ScatterChartPremium/ScatterChartPremium.d.mts +2 -1
  113. package/ScatterChartPremium/ScatterChartPremium.d.ts +2 -1
  114. package/ScatterChartPremium/ScatterChartPremium.js +32 -2
  115. package/ScatterChartPremium/ScatterChartPremium.mjs +32 -2
  116. package/hooks/index.d.mts +4 -1
  117. package/hooks/index.d.ts +4 -1
  118. package/hooks/index.js +33 -0
  119. package/hooks/index.mjs +4 -1
  120. package/hooks/useGeoData.d.mts +6 -0
  121. package/hooks/useGeoData.d.ts +6 -0
  122. package/hooks/useGeoData.js +17 -0
  123. package/hooks/useGeoData.mjs +13 -0
  124. package/hooks/useGeoFeatureIndexesByName.d.mts +7 -0
  125. package/hooks/useGeoFeatureIndexesByName.d.ts +7 -0
  126. package/hooks/useGeoFeatureIndexesByName.js +19 -0
  127. package/hooks/useGeoFeatureIndexesByName.mjs +15 -0
  128. package/hooks/useGeoPath.d.mts +6 -0
  129. package/hooks/useGeoPath.d.ts +6 -0
  130. package/hooks/useGeoPath.js +17 -0
  131. package/hooks/useGeoPath.mjs +13 -0
  132. package/hooks/useMapShapeSeries.d.mts +34 -0
  133. package/hooks/useMapShapeSeries.d.ts +34 -0
  134. package/hooks/useMapShapeSeries.js +45 -0
  135. package/hooks/useMapShapeSeries.mjs +40 -0
  136. package/index.d.mts +2 -0
  137. package/index.d.ts +2 -0
  138. package/index.js +25 -1
  139. package/index.mjs +3 -1
  140. package/internals/plugins/useGeoProjection/index.d.mts +3 -0
  141. package/internals/plugins/useGeoProjection/index.d.ts +3 -0
  142. package/internals/plugins/useGeoProjection/index.js +38 -0
  143. package/internals/plugins/useGeoProjection/index.mjs +3 -0
  144. package/internals/plugins/useGeoProjection/useGeoProjection.d.mts +3 -0
  145. package/internals/plugins/useGeoProjection/useGeoProjection.d.ts +3 -0
  146. package/internals/plugins/useGeoProjection/useGeoProjection.js +58 -0
  147. package/internals/plugins/useGeoProjection/useGeoProjection.mjs +50 -0
  148. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.d.mts +39 -0
  149. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.d.ts +39 -0
  150. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.js +135 -0
  151. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.mjs +128 -0
  152. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.mts +55 -0
  153. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.ts +55 -0
  154. package/internals/plugins/useGeoProjection/useGeoProjection.types.js +5 -0
  155. package/internals/plugins/useGeoProjection/useGeoProjection.types.mjs +1 -0
  156. package/models/chartsSlotsComponentsPropsPremium.d.mts +1 -0
  157. package/models/chartsSlotsComponentsPropsPremium.d.ts +1 -0
  158. package/models/chartsSlotsComponentsPropsPremium.js +5 -0
  159. package/models/chartsSlotsComponentsPropsPremium.mjs +1 -0
  160. package/models/index.d.mts +2 -1
  161. package/models/index.d.ts +2 -1
  162. package/models/index.js +11 -0
  163. package/models/index.mjs +2 -1
  164. package/models/seriesType/index.d.mts +2 -1
  165. package/models/seriesType/index.d.ts +2 -1
  166. package/models/seriesType/index.js +11 -0
  167. package/models/seriesType/index.mjs +2 -1
  168. package/models/seriesType/mapShape.d.mts +105 -0
  169. package/models/seriesType/mapShape.d.ts +105 -0
  170. package/models/seriesType/mapShape.js +5 -0
  171. package/models/seriesType/mapShape.mjs +1 -0
  172. package/package.json +35 -7
  173. package/typeOverloads/modules.d.mts +16 -1
  174. package/typeOverloads/modules.d.ts +16 -1
  175. package/utils/webgl/useWebGLResizeObserver.js +3 -3
  176. package/utils/webgl/useWebGLResizeObserver.mjs +2 -2
package/Map/index.js ADDED
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _GeoDataPlot = require("./GeoDataPlot");
7
+ Object.keys(_GeoDataPlot).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _GeoDataPlot[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _GeoDataPlot[key];
14
+ }
15
+ });
16
+ });
17
+ var _MapShapePlot = require("./MapShapePlot");
18
+ Object.keys(_MapShapePlot).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _MapShapePlot[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _MapShapePlot[key];
25
+ }
26
+ });
27
+ });
28
+ var _MapShape = require("./MapShape");
29
+ Object.keys(_MapShape).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _MapShape[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _MapShape[key];
36
+ }
37
+ });
38
+ });
39
+ var _FocusedMapShape = require("./FocusedMapShape");
40
+ Object.keys(_FocusedMapShape).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (key in exports && exports[key] === _FocusedMapShape[key]) return;
43
+ Object.defineProperty(exports, key, {
44
+ enumerable: true,
45
+ get: function () {
46
+ return _FocusedMapShape[key];
47
+ }
48
+ });
49
+ });
50
+ var _Graticule = require("./Graticule");
51
+ Object.keys(_Graticule).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _Graticule[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _Graticule[key];
58
+ }
59
+ });
60
+ });
package/Map/index.mjs ADDED
@@ -0,0 +1,8 @@
1
+ export * from "./GeoDataPlot.mjs";
2
+ export * from "./MapShapePlot.mjs";
3
+ export * from "./MapShape.mjs";
4
+ export * from "./FocusedMapShape.mjs";
5
+ export * from "./Graticule.mjs";
6
+
7
+ // Types useful to the public API of the Map charts
8
+ export {};
@@ -0,0 +1,3 @@
1
+ import { type DescriptionGetter } from '@mui/x-charts/internals';
2
+ declare const descriptionGetter: DescriptionGetter<'mapShape'>;
3
+ export default descriptionGetter;
@@ -0,0 +1,3 @@
1
+ import { type DescriptionGetter } from '@mui/x-charts/internals';
2
+ declare const descriptionGetter: DescriptionGetter<'mapShape'>;
3
+ export default descriptionGetter;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _internals = require("@mui/x-charts/internals");
8
+ const descriptionGetter = ({
9
+ identifier,
10
+ series
11
+ }) => {
12
+ const item = series.data[identifier.dataIndex];
13
+ if (!item) {
14
+ return '';
15
+ }
16
+ const label = (0, _internals.getLabel)(item.label ?? item.name, 'tooltip') ?? item.name;
17
+ return `${label}: ${item.value}`;
18
+ };
19
+ var _default = exports.default = descriptionGetter;
@@ -0,0 +1,13 @@
1
+ import { getLabel } from '@mui/x-charts/internals';
2
+ const descriptionGetter = ({
3
+ identifier,
4
+ series
5
+ }) => {
6
+ const item = series.data[identifier.dataIndex];
7
+ if (!item) {
8
+ return '';
9
+ }
10
+ const label = getLabel(item.label ?? item.name, 'tooltip') ?? item.name;
11
+ return `${label}: ${item.value}`;
12
+ };
13
+ export default descriptionGetter;
@@ -0,0 +1,3 @@
1
+ import type { ColorProcessor } from '@mui/x-charts/internals';
2
+ declare const getColor: ColorProcessor<'mapShape'>;
3
+ export default getColor;
@@ -0,0 +1,3 @@
1
+ import type { ColorProcessor } from '@mui/x-charts/internals';
2
+ declare const getColor: ColorProcessor<'mapShape'>;
3
+ export default getColor;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
8
+ const colorScale = zAxis?.colorScale;
9
+ if (colorScale) {
10
+ return dataIndex => {
11
+ if (dataIndex == null) {
12
+ return series.color;
13
+ }
14
+ const item = series.data[dataIndex];
15
+ if (item === undefined) {
16
+ return series.color;
17
+ }
18
+ const scaleInput = item.colorValue ?? item.value;
19
+ if (scaleInput != null) {
20
+ const color = colorScale(scaleInput);
21
+ if (color !== null) {
22
+ return color;
23
+ }
24
+ }
25
+ return item.color ?? series.color;
26
+ };
27
+ }
28
+ return dataIndex => {
29
+ if (dataIndex == null) {
30
+ return series.color;
31
+ }
32
+ return series.data[dataIndex].color ?? series.color;
33
+ };
34
+ };
35
+ var _default = exports.default = getColor;
@@ -0,0 +1,29 @@
1
+ const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
2
+ const colorScale = zAxis?.colorScale;
3
+ if (colorScale) {
4
+ return dataIndex => {
5
+ if (dataIndex == null) {
6
+ return series.color;
7
+ }
8
+ const item = series.data[dataIndex];
9
+ if (item === undefined) {
10
+ return series.color;
11
+ }
12
+ const scaleInput = item.colorValue ?? item.value;
13
+ if (scaleInput != null) {
14
+ const color = colorScale(scaleInput);
15
+ if (color !== null) {
16
+ return color;
17
+ }
18
+ }
19
+ return item.color ?? series.color;
20
+ };
21
+ }
22
+ return dataIndex => {
23
+ if (dataIndex == null) {
24
+ return series.color;
25
+ }
26
+ return series.data[dataIndex].color ?? series.color;
27
+ };
28
+ };
29
+ export default getColor;
@@ -0,0 +1,3 @@
1
+ import type { GetSeriesWithDefaultValues } from '@mui/x-charts/internals';
2
+ declare const getSeriesWithDefaultValues: GetSeriesWithDefaultValues<'mapShape'>;
3
+ export default getSeriesWithDefaultValues;
@@ -0,0 +1,3 @@
1
+ import type { GetSeriesWithDefaultValues } from '@mui/x-charts/internals';
2
+ declare const getSeriesWithDefaultValues: GetSeriesWithDefaultValues<'mapShape'>;
3
+ export default getSeriesWithDefaultValues;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
10
+ return (0, _extends2.default)({}, seriesData, {
11
+ id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,
12
+ color: seriesData.color ?? colors[seriesIndex % colors.length]
13
+ });
14
+ };
15
+ var _default = exports.default = getSeriesWithDefaultValues;
@@ -0,0 +1,8 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
3
+ return _extends({}, seriesData, {
4
+ id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,
5
+ color: seriesData.color ?? colors[seriesIndex % colors.length]
6
+ });
7
+ };
8
+ export default getSeriesWithDefaultValues;
@@ -0,0 +1,2 @@
1
+ import { type ChartSeriesTypeConfig } from '@mui/x-charts/internals';
2
+ export declare const mapShapeSeriesConfig: ChartSeriesTypeConfig<'mapShape'>;
@@ -0,0 +1,2 @@
1
+ import { type ChartSeriesTypeConfig } from '@mui/x-charts/internals';
2
+ export declare const mapShapeSeriesConfig: ChartSeriesTypeConfig<'mapShape'>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.mapShapeSeriesConfig = void 0;
8
+ var _internals = require("@mui/x-charts/internals");
9
+ var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
10
+ var _getColor = _interopRequireDefault(require("./getColor"));
11
+ var _legend = _interopRequireDefault(require("./legend"));
12
+ var _tooltip = _interopRequireDefault(require("./tooltip"));
13
+ var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
14
+ var _descriptionGetter = _interopRequireDefault(require("./descriptionGetter"));
15
+ var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
16
+ const mapShapeSeriesConfig = exports.mapShapeSeriesConfig = {
17
+ seriesProcessor: _seriesProcessor.default,
18
+ colorProcessor: _getColor.default,
19
+ legendGetter: _legend.default,
20
+ tooltipGetter: _tooltip.default,
21
+ getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
22
+ keyboardFocusHandler: _keyboardFocusHandler.default,
23
+ identifierSerializer: _internals.identifierSerializerSeriesIdDataIndex,
24
+ identifierCleaner: _internals.identifierCleanerSeriesIdDataIndex,
25
+ descriptionGetter: _descriptionGetter.default,
26
+ isHighlightedCreator: _internals.createIsHighlighted,
27
+ isFadedCreator: _internals.createIsFaded
28
+ };
@@ -0,0 +1,21 @@
1
+ import { identifierSerializerSeriesIdDataIndex, identifierCleanerSeriesIdDataIndex, createIsHighlighted, createIsFaded } from '@mui/x-charts/internals';
2
+ import seriesProcessor from "./seriesProcessor.mjs";
3
+ import getColor from "./getColor.mjs";
4
+ import legendGetter from "./legend.mjs";
5
+ import tooltipGetter from "./tooltip.mjs";
6
+ import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.mjs";
7
+ import descriptionGetter from "./descriptionGetter.mjs";
8
+ import keyboardFocusHandler from "./keyboardFocusHandler.mjs";
9
+ export const mapShapeSeriesConfig = {
10
+ seriesProcessor,
11
+ colorProcessor: getColor,
12
+ legendGetter,
13
+ tooltipGetter,
14
+ getSeriesWithDefaultValues,
15
+ keyboardFocusHandler,
16
+ identifierSerializer: identifierSerializerSeriesIdDataIndex,
17
+ identifierCleaner: identifierCleanerSeriesIdDataIndex,
18
+ descriptionGetter,
19
+ isHighlightedCreator: createIsHighlighted,
20
+ isFadedCreator: createIsFaded
21
+ };
@@ -0,0 +1,9 @@
1
+ import { type KeyboardFocusHandler } from '@mui/x-charts/internals';
2
+ /**
3
+ * Move the focus across the shapes of the map series.
4
+ *
5
+ * `ArrowRight`/`ArrowLeft` move to the next/previous shape of the focused series,
6
+ * while `ArrowUp`/`ArrowDown` move between series.
7
+ */
8
+ declare const keyboardFocusHandler: KeyboardFocusHandler<'mapShape', 'mapShape'>;
9
+ export default keyboardFocusHandler;
@@ -0,0 +1,9 @@
1
+ import { type KeyboardFocusHandler } from '@mui/x-charts/internals';
2
+ /**
3
+ * Move the focus across the shapes of the map series.
4
+ *
5
+ * `ArrowRight`/`ArrowLeft` move to the next/previous shape of the focused series,
6
+ * while `ArrowUp`/`ArrowDown` move between series.
7
+ */
8
+ declare const keyboardFocusHandler: KeyboardFocusHandler<'mapShape', 'mapShape'>;
9
+ export default keyboardFocusHandler;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _internals = require("@mui/x-charts/internals");
8
+ const mapShapeSeriesTypes = new Set(['mapShape']);
9
+ const allowCycles = false;
10
+ const useCurrentSeriesMaxLength = true;
11
+
12
+ /**
13
+ * Move the focus across the shapes of the map series.
14
+ *
15
+ * `ArrowRight`/`ArrowLeft` move to the next/previous shape of the focused series,
16
+ * while `ArrowUp`/`ArrowDown` move between series.
17
+ */
18
+ const keyboardFocusHandler = (0, _internals.createCommonKeyboardFocusHandler)(mapShapeSeriesTypes, allowCycles, useCurrentSeriesMaxLength);
19
+ var _default = exports.default = keyboardFocusHandler;
@@ -0,0 +1,13 @@
1
+ import { createCommonKeyboardFocusHandler } from '@mui/x-charts/internals';
2
+ const mapShapeSeriesTypes = new Set(['mapShape']);
3
+ const allowCycles = false;
4
+ const useCurrentSeriesMaxLength = true;
5
+
6
+ /**
7
+ * Move the focus across the shapes of the map series.
8
+ *
9
+ * `ArrowRight`/`ArrowLeft` move to the next/previous shape of the focused series,
10
+ * while `ArrowUp`/`ArrowDown` move between series.
11
+ */
12
+ const keyboardFocusHandler = createCommonKeyboardFocusHandler(mapShapeSeriesTypes, allowCycles, useCurrentSeriesMaxLength);
13
+ export default keyboardFocusHandler;
@@ -0,0 +1,3 @@
1
+ import { type LegendGetter } from '@mui/x-charts/internals';
2
+ declare const legendGetter: LegendGetter<'mapShape'>;
3
+ export default legendGetter;
@@ -0,0 +1,3 @@
1
+ import { type LegendGetter } from '@mui/x-charts/internals';
2
+ declare const legendGetter: LegendGetter<'mapShape'>;
3
+ export default legendGetter;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _internals = require("@mui/x-charts/internals");
8
+ const legendGetter = ({
9
+ seriesOrder,
10
+ series
11
+ }) => {
12
+ return seriesOrder.reduce((acc, seriesId) => {
13
+ const s = series[seriesId];
14
+ const seriesLabel = (0, _internals.getLabel)(s.label, 'legend');
15
+ if (seriesLabel === undefined) {
16
+ return acc;
17
+ }
18
+ acc.push({
19
+ type: 'mapShape',
20
+ markType: s.labelMarkType,
21
+ seriesId,
22
+ color: s.color,
23
+ label: seriesLabel
24
+ });
25
+ return acc;
26
+ }, []);
27
+ };
28
+ var _default = exports.default = legendGetter;
@@ -0,0 +1,22 @@
1
+ import { getLabel } from '@mui/x-charts/internals';
2
+ const legendGetter = ({
3
+ seriesOrder,
4
+ series
5
+ }) => {
6
+ return seriesOrder.reduce((acc, seriesId) => {
7
+ const s = series[seriesId];
8
+ const seriesLabel = getLabel(s.label, 'legend');
9
+ if (seriesLabel === undefined) {
10
+ return acc;
11
+ }
12
+ acc.push({
13
+ type: 'mapShape',
14
+ markType: s.labelMarkType,
15
+ seriesId,
16
+ color: s.color,
17
+ label: seriesLabel
18
+ });
19
+ return acc;
20
+ }, []);
21
+ };
22
+ export default legendGetter;
@@ -0,0 +1,3 @@
1
+ import { type SeriesProcessor } from '@mui/x-charts/internals';
2
+ declare const seriesProcessor: SeriesProcessor<'mapShape'>;
3
+ export default seriesProcessor;
@@ -0,0 +1,3 @@
1
+ import { type SeriesProcessor } from '@mui/x-charts/internals';
2
+ declare const seriesProcessor: SeriesProcessor<'mapShape'>;
3
+ export default seriesProcessor;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _internals = require("@mui/x-charts/internals");
10
+ const defaultValueFormatter = v => v == null ? '' : String(v.value);
11
+ const seriesProcessor = ({
12
+ series,
13
+ seriesOrder
14
+ }, dataset, isItemVisible) => {
15
+ const defaultizedSeries = {};
16
+ seriesOrder.forEach(seriesId => {
17
+ const input = series[seriesId];
18
+ const datasetKeys = input.datasetKeys;
19
+ if (datasetKeys && typeof datasetKeys.name !== 'string') {
20
+ (0, _internals.incompleteDatasetKeysError)('MapShape', seriesId, ['name']);
21
+ }
22
+ let data;
23
+ if (input.valueGetter) {
24
+ data = dataset?.map(input.valueGetter) ?? [];
25
+ } else if (datasetKeys) {
26
+ data = dataset?.map(d => {
27
+ const rep = {
28
+ name: d[datasetKeys.name]
29
+ };
30
+ if (datasetKeys.label !== undefined) {
31
+ rep.label = d[datasetKeys.label];
32
+ }
33
+ if (datasetKeys.value !== undefined) {
34
+ rep.value = d[datasetKeys.value];
35
+ }
36
+ if (datasetKeys.colorValue !== undefined) {
37
+ rep.colorValue = d[datasetKeys.colorValue];
38
+ }
39
+ return rep;
40
+ }) ?? [];
41
+ } else {
42
+ data = input.data ?? [];
43
+ }
44
+ defaultizedSeries[seriesId] = (0, _extends2.default)({
45
+ labelMarkType: 'square'
46
+ }, input, {
47
+ data: data.map((item, dataIndex) => (0, _extends2.default)({}, item, {
48
+ hidden: !isItemVisible?.({
49
+ type: 'mapShape',
50
+ seriesId,
51
+ dataIndex
52
+ })
53
+ })),
54
+ hidden: !isItemVisible?.({
55
+ type: 'mapShape',
56
+ seriesId
57
+ }),
58
+ valueFormatter: input.valueFormatter ?? defaultValueFormatter
59
+ });
60
+ });
61
+ return {
62
+ series: defaultizedSeries,
63
+ seriesOrder
64
+ };
65
+ };
66
+ var _default = exports.default = seriesProcessor;
@@ -0,0 +1,59 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import { incompleteDatasetKeysError } from '@mui/x-charts/internals';
3
+ const defaultValueFormatter = v => v == null ? '' : String(v.value);
4
+ const seriesProcessor = ({
5
+ series,
6
+ seriesOrder
7
+ }, dataset, isItemVisible) => {
8
+ const defaultizedSeries = {};
9
+ seriesOrder.forEach(seriesId => {
10
+ const input = series[seriesId];
11
+ const datasetKeys = input.datasetKeys;
12
+ if (datasetKeys && typeof datasetKeys.name !== 'string') {
13
+ incompleteDatasetKeysError('MapShape', seriesId, ['name']);
14
+ }
15
+ let data;
16
+ if (input.valueGetter) {
17
+ data = dataset?.map(input.valueGetter) ?? [];
18
+ } else if (datasetKeys) {
19
+ data = dataset?.map(d => {
20
+ const rep = {
21
+ name: d[datasetKeys.name]
22
+ };
23
+ if (datasetKeys.label !== undefined) {
24
+ rep.label = d[datasetKeys.label];
25
+ }
26
+ if (datasetKeys.value !== undefined) {
27
+ rep.value = d[datasetKeys.value];
28
+ }
29
+ if (datasetKeys.colorValue !== undefined) {
30
+ rep.colorValue = d[datasetKeys.colorValue];
31
+ }
32
+ return rep;
33
+ }) ?? [];
34
+ } else {
35
+ data = input.data ?? [];
36
+ }
37
+ defaultizedSeries[seriesId] = _extends({
38
+ labelMarkType: 'square'
39
+ }, input, {
40
+ data: data.map((item, dataIndex) => _extends({}, item, {
41
+ hidden: !isItemVisible?.({
42
+ type: 'mapShape',
43
+ seriesId,
44
+ dataIndex
45
+ })
46
+ })),
47
+ hidden: !isItemVisible?.({
48
+ type: 'mapShape',
49
+ seriesId
50
+ }),
51
+ valueFormatter: input.valueFormatter ?? defaultValueFormatter
52
+ });
53
+ });
54
+ return {
55
+ series: defaultizedSeries,
56
+ seriesOrder
57
+ };
58
+ };
59
+ export default seriesProcessor;
@@ -0,0 +1,3 @@
1
+ import { type TooltipGetter } from '@mui/x-charts/internals';
2
+ declare const tooltipGetter: TooltipGetter<'mapShape'>;
3
+ export default tooltipGetter;
@@ -0,0 +1,3 @@
1
+ import { type TooltipGetter } from '@mui/x-charts/internals';
2
+ declare const tooltipGetter: TooltipGetter<'mapShape'>;
3
+ export default tooltipGetter;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _internals = require("@mui/x-charts/internals");
8
+ const tooltipGetter = ({
9
+ series,
10
+ getColor,
11
+ identifier
12
+ }) => {
13
+ if (!identifier || identifier.dataIndex === undefined) {
14
+ return null;
15
+ }
16
+ const point = series.data[identifier.dataIndex];
17
+ if (point == null) {
18
+ return null;
19
+ }
20
+ const label = (0, _internals.getLabel)(point.label ?? point.name, 'tooltip');
21
+ const formattedValue = series.valueFormatter(point, {
22
+ dataIndex: identifier.dataIndex
23
+ });
24
+ return {
25
+ identifier,
26
+ color: getColor(identifier.dataIndex),
27
+ label,
28
+ value: point,
29
+ formattedValue,
30
+ markType: series.labelMarkType
31
+ };
32
+ };
33
+ var _default = exports.default = tooltipGetter;
@@ -0,0 +1,27 @@
1
+ import { getLabel } from '@mui/x-charts/internals';
2
+ const tooltipGetter = ({
3
+ series,
4
+ getColor,
5
+ identifier
6
+ }) => {
7
+ if (!identifier || identifier.dataIndex === undefined) {
8
+ return null;
9
+ }
10
+ const point = series.data[identifier.dataIndex];
11
+ if (point == null) {
12
+ return null;
13
+ }
14
+ const label = getLabel(point.label ?? point.name, 'tooltip');
15
+ const formattedValue = series.valueFormatter(point, {
16
+ dataIndex: identifier.dataIndex
17
+ });
18
+ return {
19
+ identifier,
20
+ color: getColor(identifier.dataIndex),
21
+ label,
22
+ value: point,
23
+ formattedValue,
24
+ markType: series.labelMarkType
25
+ };
26
+ };
27
+ export default tooltipGetter;
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
3
3
  import { type RadialLineHighlightElementProps } from "./RadialLineHighlightElement.mjs";
4
+ import type { RadialLineHighlightPropsOverrides } from "../models/chartsSlotsComponentsPropsPremium.mjs";
4
5
  export interface RadialLineHighlightPlotSlots {
5
- radialLineHighlight?: React.JSXElementConstructor<RadialLineHighlightElementProps>;
6
+ radialLineHighlight?: React.JSXElementConstructor<RadialLineHighlightElementProps & RadialLineHighlightPropsOverrides>;
6
7
  }
7
8
  export interface RadialLineHighlightPlotSlotProps {
8
- radialLineHighlight?: SlotComponentPropsFromProps<RadialLineHighlightElementProps, {}, {}>;
9
+ radialLineHighlight?: SlotComponentPropsFromProps<RadialLineHighlightElementProps, RadialLineHighlightPropsOverrides, {}>;
9
10
  }
10
11
  export interface RadialLineHighlightPlotProps extends React.SVGAttributes<SVGGElement> {
11
12
  /**
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
3
3
  import { type RadialLineHighlightElementProps } from "./RadialLineHighlightElement.js";
4
+ import type { RadialLineHighlightPropsOverrides } from "../models/chartsSlotsComponentsPropsPremium.js";
4
5
  export interface RadialLineHighlightPlotSlots {
5
- radialLineHighlight?: React.JSXElementConstructor<RadialLineHighlightElementProps>;
6
+ radialLineHighlight?: React.JSXElementConstructor<RadialLineHighlightElementProps & RadialLineHighlightPropsOverrides>;
6
7
  }
7
8
  export interface RadialLineHighlightPlotSlotProps {
8
- radialLineHighlight?: SlotComponentPropsFromProps<RadialLineHighlightElementProps, {}, {}>;
9
+ radialLineHighlight?: SlotComponentPropsFromProps<RadialLineHighlightElementProps, RadialLineHighlightPropsOverrides, {}>;
9
10
  }
10
11
  export interface RadialLineHighlightPlotProps extends React.SVGAttributes<SVGGElement> {
11
12
  /**