@mui/x-charts-pro 9.0.0-alpha.2 → 9.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChartPro/BarChartPro.d.mts +2 -2
- package/BarChartPro/BarChartPro.d.ts +2 -2
- package/BarChartPro/BarChartPro.js +43 -10
- package/BarChartPro/BarChartPro.mjs +43 -10
- package/CHANGELOG.md +246 -1
- package/ChartsContainerPro/ChartsContainerPro.d.mts +2 -2
- package/ChartsContainerPro/ChartsContainerPro.d.ts +2 -2
- package/ChartsContainerPro/ChartsContainerPro.js +2 -2
- package/ChartsContainerPro/ChartsContainerPro.mjs +2 -2
- package/ChartsContainerPro/useChartsContainerProProps.d.mts +4 -4
- package/ChartsContainerPro/useChartsContainerProProps.d.ts +4 -4
- package/ChartsContainerPro/useChartsContainerProProps.js +3 -3
- package/ChartsContainerPro/useChartsContainerProProps.mjs +3 -3
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.mts +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.d.ts +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +8 -11
- package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +8 -11
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.mts +1 -1
- package/ChartsDataProviderPro/useChartsDataProviderProProps.d.ts +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarPro.mjs +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +2 -2
- package/ChartsToolbarPro/index.d.mts +2 -1
- package/ChartsToolbarPro/index.d.ts +2 -1
- package/ChartsToolbarPro/index.mjs +2 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.js +1 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderActiveTrack.mjs +2 -2
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.js +1 -1
- package/ChartsZoomSlider/internals/ChartsAxisZoomSliderTrack.mjs +2 -2
- package/FunnelChart/FunnelChart.d.mts +2 -2
- package/FunnelChart/FunnelChart.d.ts +2 -2
- package/FunnelChart/FunnelChart.js +23 -8
- package/FunnelChart/FunnelChart.mjs +23 -8
- package/FunnelChart/FunnelPlot.js +8 -3
- package/FunnelChart/FunnelPlot.mjs +8 -3
- package/FunnelChart/FunnelSection.d.mts +3 -3
- package/FunnelChart/FunnelSection.d.ts +3 -3
- package/FunnelChart/FunnelSection.js +8 -9
- package/FunnelChart/FunnelSection.mjs +8 -9
- package/FunnelChart/FunnelSectionLabel.d.mts +9 -3
- package/FunnelChart/FunnelSectionLabel.d.ts +9 -3
- package/FunnelChart/FunnelSectionLabel.js +15 -6
- package/FunnelChart/FunnelSectionLabel.mjs +15 -6
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.mts +3 -3
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +3 -3
- package/FunnelChart/funnelClasses.d.mts +29 -0
- package/FunnelChart/funnelClasses.d.ts +29 -0
- package/FunnelChart/funnelClasses.js +29 -0
- package/FunnelChart/funnelClasses.mjs +19 -0
- package/FunnelChart/index.d.mts +2 -2
- package/FunnelChart/index.d.ts +2 -2
- package/FunnelChart/index.js +4 -4
- package/FunnelChart/index.mjs +1 -1
- package/FunnelChart/seriesConfig/legend.js +0 -2
- package/FunnelChart/seriesConfig/legend.mjs +0 -2
- package/FunnelChart/useFunnelChartProps.d.mts +2 -2
- package/FunnelChart/useFunnelChartProps.d.ts +2 -2
- package/FunnelChart/useFunnelChartProps.js +2 -2
- package/FunnelChart/useFunnelChartProps.mjs +2 -2
- package/Heatmap/Heatmap.d.mts +2 -11
- package/Heatmap/Heatmap.d.ts +2 -11
- package/Heatmap/Heatmap.js +25 -19
- package/Heatmap/Heatmap.mjs +25 -19
- package/Heatmap/HeatmapCell.d.mts +33 -0
- package/Heatmap/HeatmapCell.d.ts +33 -0
- package/Heatmap/HeatmapCell.js +62 -0
- package/Heatmap/HeatmapCell.mjs +55 -0
- package/Heatmap/HeatmapItem.d.mts +1 -9
- package/Heatmap/HeatmapItem.d.ts +1 -9
- package/Heatmap/HeatmapItem.js +5 -23
- package/Heatmap/HeatmapItem.mjs +5 -23
- package/Heatmap/HeatmapSVGPlot.js +14 -7
- package/Heatmap/HeatmapSVGPlot.mjs +15 -8
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.js +2 -2
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.mjs +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.js +16 -13
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.mjs +16 -13
- package/Heatmap/heatmapClasses.d.mts +6 -1
- package/Heatmap/heatmapClasses.d.ts +6 -1
- package/Heatmap/heatmapClasses.js +18 -3
- package/Heatmap/heatmapClasses.mjs +16 -2
- package/Heatmap/index.d.mts +4 -2
- package/Heatmap/index.d.ts +4 -2
- package/Heatmap/index.js +17 -13
- package/Heatmap/index.mjs +2 -1
- package/Heatmap/seriesConfig/getColor.js +5 -3
- package/Heatmap/seriesConfig/getColor.mjs +5 -3
- package/Heatmap/seriesConfig/getItemAtPosition.d.mts +2 -2
- package/Heatmap/seriesConfig/getItemAtPosition.d.ts +2 -2
- package/Heatmap/seriesConfig/getItemAtPosition.js +3 -11
- package/Heatmap/seriesConfig/getItemAtPosition.mjs +3 -11
- package/Heatmap/seriesConfig/identifierCleaner.d.mts +3 -0
- package/Heatmap/seriesConfig/identifierCleaner.d.ts +3 -0
- package/Heatmap/seriesConfig/identifierCleaner.js +15 -0
- package/Heatmap/seriesConfig/identifierCleaner.mjs +9 -0
- package/Heatmap/seriesConfig/identifierSerializer.d.mts +3 -0
- package/Heatmap/seriesConfig/identifierSerializer.d.ts +3 -0
- package/Heatmap/seriesConfig/identifierSerializer.js +11 -0
- package/Heatmap/seriesConfig/identifierSerializer.mjs +5 -0
- package/Heatmap/seriesConfig/index.js +4 -2
- package/Heatmap/seriesConfig/index.mjs +5 -3
- package/Heatmap/seriesConfig/keyboardFocusHandler.js +6 -19
- package/Heatmap/seriesConfig/keyboardFocusHandler.mjs +6 -19
- package/Heatmap/seriesConfig/seriesProcessor.js +8 -3
- package/Heatmap/seriesConfig/seriesProcessor.mjs +8 -3
- package/Heatmap/seriesConfig/tooltip.js +7 -6
- package/Heatmap/seriesConfig/tooltip.mjs +7 -6
- package/Heatmap/seriesConfig/tooltipPosition.js +3 -4
- package/Heatmap/seriesConfig/tooltipPosition.mjs +3 -4
- package/Heatmap/shouldRegisterPointerInteractionsGlobally.js +1 -1
- package/Heatmap/shouldRegisterPointerInteractionsGlobally.mjs +1 -1
- package/Heatmap/useHeatmapProps.d.mts +2 -2
- package/Heatmap/useHeatmapProps.d.ts +2 -2
- package/Heatmap/useHeatmapProps.js +4 -6
- package/Heatmap/useHeatmapProps.mjs +4 -6
- package/LineChartPro/LineChartPro.d.mts +2 -2
- package/LineChartPro/LineChartPro.d.ts +2 -2
- package/LineChartPro/LineChartPro.js +40 -13
- package/LineChartPro/LineChartPro.mjs +40 -13
- package/PieChartPro/PieChartPro.d.mts +2 -2
- package/PieChartPro/PieChartPro.d.ts +2 -2
- package/PieChartPro/PieChartPro.js +22 -7
- package/PieChartPro/PieChartPro.mjs +22 -7
- package/RadarChartPro/RadarChartPro.d.mts +1 -1
- package/RadarChartPro/RadarChartPro.d.ts +1 -1
- package/RadarChartPro/RadarChartPro.js +20 -2
- package/RadarChartPro/RadarChartPro.mjs +20 -2
- package/SankeyChart/SankeyChart.d.mts +2 -2
- package/SankeyChart/SankeyChart.d.ts +2 -2
- package/SankeyChart/SankeyChart.js +21 -12
- package/SankeyChart/SankeyChart.mjs +21 -12
- package/SankeyChart/SankeyDataProvider.d.mts +2 -2
- package/SankeyChart/SankeyDataProvider.d.ts +2 -2
- package/SankeyChart/SankeyDataProvider.js +2 -2
- package/SankeyChart/SankeyDataProvider.mjs +2 -2
- package/SankeyChart/SankeyLinkElement.js +7 -3
- package/SankeyChart/SankeyLinkElement.mjs +8 -4
- package/SankeyChart/SankeyLinkLabel.js +3 -0
- package/SankeyChart/SankeyLinkLabel.mjs +3 -0
- package/SankeyChart/SankeyLinkLabelPlot.d.mts +2 -2
- package/SankeyChart/SankeyLinkLabelPlot.d.ts +2 -2
- package/SankeyChart/SankeyLinkLabelPlot.js +1 -1
- package/SankeyChart/SankeyLinkLabelPlot.mjs +1 -1
- package/SankeyChart/SankeyLinkPlot.d.mts +2 -2
- package/SankeyChart/SankeyLinkPlot.d.ts +2 -2
- package/SankeyChart/SankeyLinkPlot.js +1 -1
- package/SankeyChart/SankeyLinkPlot.mjs +1 -1
- package/SankeyChart/SankeyNodeElement.d.mts +1 -1
- package/SankeyChart/SankeyNodeElement.d.ts +1 -1
- package/SankeyChart/SankeyNodeElement.js +20 -18
- package/SankeyChart/SankeyNodeElement.mjs +21 -19
- package/SankeyChart/SankeyNodeLabel.js +3 -0
- package/SankeyChart/SankeyNodeLabel.mjs +3 -0
- package/SankeyChart/SankeyNodeLabelPlot.d.mts +2 -2
- package/SankeyChart/SankeyNodeLabelPlot.d.ts +2 -2
- package/SankeyChart/SankeyNodeLabelPlot.js +1 -1
- package/SankeyChart/SankeyNodeLabelPlot.mjs +1 -1
- package/SankeyChart/SankeyNodePlot.d.mts +2 -2
- package/SankeyChart/SankeyNodePlot.d.ts +2 -2
- package/SankeyChart/SankeyNodePlot.js +1 -1
- package/SankeyChart/SankeyNodePlot.mjs +1 -1
- package/SankeyChart/SankeyPlot.d.mts +2 -2
- package/SankeyChart/SankeyPlot.d.ts +2 -2
- package/SankeyChart/SankeyPlot.js +3 -3
- package/SankeyChart/SankeyPlot.mjs +3 -3
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.js +2 -2
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.mjs +1 -1
- package/SankeyChart/index.d.mts +2 -1
- package/SankeyChart/index.d.ts +2 -1
- package/SankeyChart/index.js +3 -3
- package/SankeyChart/index.mjs +1 -1
- package/SankeyChart/sankeyClasses.d.mts +15 -6
- package/SankeyChart/sankeyClasses.d.ts +15 -6
- package/SankeyChart/sankeyClasses.js +12 -8
- package/SankeyChart/sankeyClasses.mjs +10 -6
- package/SankeyChart/sankeyHighlightHooks.d.mts +2 -2
- package/SankeyChart/sankeyHighlightHooks.d.ts +2 -2
- package/SankeyChart/sankeyHighlightHooks.js +2 -10
- package/SankeyChart/sankeyHighlightHooks.mjs +3 -11
- package/SankeyChart/useSankeyChartProps.d.mts +2 -2
- package/SankeyChart/useSankeyChartProps.d.ts +2 -2
- package/SankeyChart/useSankeyChartProps.js +2 -2
- package/SankeyChart/useSankeyChartProps.mjs +2 -2
- package/ScatterChartPro/ScatterChartPro.d.mts +2 -2
- package/ScatterChartPro/ScatterChartPro.d.ts +2 -2
- package/ScatterChartPro/ScatterChartPro.js +62 -17
- package/ScatterChartPro/ScatterChartPro.mjs +62 -17
- package/context/useChartProApiContext.d.mts +1 -1
- package/context/useChartProApiContext.d.ts +1 -1
- package/context/useChartProApiContext.js +1 -1
- package/context/useChartProApiContext.mjs +1 -1
- package/index.d.mts +0 -4
- package/index.d.ts +0 -4
- package/index.js +2 -34
- package/index.mjs +1 -4
- package/internals/ChartsWatermark.d.mts +2 -2
- package/internals/ChartsWatermark.d.ts +2 -2
- package/internals/ChartsWatermark.js +5 -8
- package/internals/ChartsWatermark.mjs +3 -6
- package/internals/index.d.mts +0 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +0 -8
- package/internals/index.mjs +0 -1
- package/internals/plugins/allPlugins.d.mts +4 -4
- package/internals/plugins/allPlugins.d.ts +4 -4
- package/internals/plugins/useChartProExport/common.js +4 -8
- package/internals/plugins/useChartProExport/common.mjs +4 -8
- package/internals/plugins/useChartProExport/exportImage.js +1 -1
- package/internals/plugins/useChartProExport/exportImage.mjs +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.mts +1 -1
- package/internals/plugins/useChartProZoom/ZoomInteractionConfig.types.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +16 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.mjs +16 -1
- package/models/seriesType/heatmap.d.mts +36 -9
- package/models/seriesType/heatmap.d.ts +36 -9
- package/models/seriesType/heatmap.js +28 -1
- package/models/seriesType/heatmap.mjs +25 -1
- package/package.json +5 -61
- package/plugins/selectors/useChartHeatmapPosition.selectors.d.mts +2 -2
- package/plugins/selectors/useChartHeatmapPosition.selectors.d.ts +2 -2
- package/plugins/selectors/useChartHeatmapPosition.selectors.js +4 -4
- package/plugins/selectors/useChartHeatmapPosition.selectors.mjs +4 -4
- package/themeAugmentation/components.d.mts +19 -1
- package/themeAugmentation/components.d.ts +19 -1
- package/themeAugmentation/overrides.d.mts +5 -2
- package/themeAugmentation/overrides.d.ts +5 -2
- package/themeAugmentation/props.d.mts +8 -0
- package/themeAugmentation/props.d.ts +8 -0
- package/typeOverloads/modules.d.mts +2 -2
- package/typeOverloads/modules.d.ts +2 -2
- package/ChartContainer/index.d.mts +0 -1
- package/ChartContainer/index.d.ts +0 -1
- package/ChartContainer/index.js +0 -16
- package/ChartContainer/index.mjs +0 -2
- package/ChartContainerPro/ChartContainerPro.d.mts +0 -21
- package/ChartContainerPro/ChartContainerPro.d.ts +0 -21
- package/ChartContainerPro/ChartContainerPro.js +0 -24
- package/ChartContainerPro/ChartContainerPro.mjs +0 -20
- package/ChartContainerPro/index.d.mts +0 -9
- package/ChartContainerPro/index.d.ts +0 -9
- package/ChartContainerPro/index.js +0 -17
- package/ChartContainerPro/index.mjs +0 -6
- package/ChartContainerPro/useChartContainerProProps.d.mts +0 -12
- package/ChartContainerPro/useChartContainerProProps.d.ts +0 -12
- package/ChartContainerPro/useChartContainerProProps.js +0 -19
- package/ChartContainerPro/useChartContainerProProps.mjs +0 -14
- package/ChartDataProvider/index.d.mts +0 -1
- package/ChartDataProvider/index.d.ts +0 -1
- package/ChartDataProvider/index.js +0 -16
- package/ChartDataProvider/index.mjs +0 -2
- package/ChartDataProviderPro/ChartDataProviderPro.d.mts +0 -20
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -20
- package/ChartDataProviderPro/ChartDataProviderPro.js +0 -30
- package/ChartDataProviderPro/ChartDataProviderPro.mjs +0 -21
- package/ChartDataProviderPro/index.d.mts +0 -2
- package/ChartDataProviderPro/index.d.ts +0 -2
- package/ChartDataProviderPro/index.js +0 -13
- package/ChartDataProviderPro/index.mjs +0 -2
- package/ChartDataProviderPro/useChartDataProviderProProps.d.mts +0 -10
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -10
- package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -12
- package/ChartDataProviderPro/useChartDataProviderProProps.mjs +0 -8
- package/FunnelChart/funnelSectionClasses.d.mts +0 -30
- package/FunnelChart/funnelSectionClasses.d.ts +0 -30
- package/FunnelChart/funnelSectionClasses.js +0 -44
- package/FunnelChart/funnelSectionClasses.mjs +0 -35
- package/Heatmap/internals/HeatmapCell.d.mts +0 -21
- package/Heatmap/internals/HeatmapCell.d.ts +0 -21
- package/Heatmap/internals/HeatmapCell.js +0 -18
- package/Heatmap/internals/HeatmapCell.mjs +0 -12
- package/tests/constants.js +0 -7
- package/tests/constants.mjs +0 -1
|
@@ -5,7 +5,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
5
5
|
const _excluded = ["render"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import {
|
|
8
|
+
import { useChartsContext, useChartsSlots } from '@mui/x-charts/internals';
|
|
9
9
|
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
10
10
|
import { selectorChartCanZoomOut } from "../internals/plugins/useChartProZoom/index.mjs";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -25,7 +25,7 @@ const ChartsToolbarZoomOutTrigger = /*#__PURE__*/React.forwardRef(function Chart
|
|
|
25
25
|
const {
|
|
26
26
|
instance,
|
|
27
27
|
store
|
|
28
|
-
} =
|
|
28
|
+
} = useChartsContext();
|
|
29
29
|
const disabled = store.use(selectorChartCanZoomOut);
|
|
30
30
|
const element = useComponentRenderer(slots.baseButton, render, _extends({}, slotProps.baseButton, {
|
|
31
31
|
onClick: () => instance.zoomOut(),
|
|
@@ -2,4 +2,5 @@ export * from "./ChartsToolbarPro.mjs";
|
|
|
2
2
|
export * from "./ChartsToolbarZoomInTrigger.mjs";
|
|
3
3
|
export * from "./ChartsToolbarZoomOutTrigger.mjs";
|
|
4
4
|
export * from "./ChartsToolbarPrintExportTrigger.mjs";
|
|
5
|
-
export * from "./ChartsToolbarImageExportTrigger.mjs";
|
|
5
|
+
export * from "./ChartsToolbarImageExportTrigger.mjs";
|
|
6
|
+
export type { ChartsToolbarProSlots, ChartsToolbarProSlotProps } from "./Toolbar.types.mjs";
|
|
@@ -2,4 +2,5 @@ export * from "./ChartsToolbarPro.js";
|
|
|
2
2
|
export * from "./ChartsToolbarZoomInTrigger.js";
|
|
3
3
|
export * from "./ChartsToolbarZoomOutTrigger.js";
|
|
4
4
|
export * from "./ChartsToolbarPrintExportTrigger.js";
|
|
5
|
-
export * from "./ChartsToolbarImageExportTrigger.js";
|
|
5
|
+
export * from "./ChartsToolbarImageExportTrigger.js";
|
|
6
|
+
export type { ChartsToolbarProSlots, ChartsToolbarProSlotProps } from "./Toolbar.types.js";
|
|
@@ -2,4 +2,5 @@ export * from "./ChartsToolbarPro.mjs";
|
|
|
2
2
|
export * from "./ChartsToolbarZoomInTrigger.mjs";
|
|
3
3
|
export * from "./ChartsToolbarZoomOutTrigger.mjs";
|
|
4
4
|
export * from "./ChartsToolbarPrintExportTrigger.mjs";
|
|
5
|
-
export * from "./ChartsToolbarImageExportTrigger.mjs";
|
|
5
|
+
export * from "./ChartsToolbarImageExportTrigger.mjs";
|
|
6
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import { styled } from '@mui/material/styles';
|
|
5
|
-
import { getChartPoint, invertScale, selectorChartAxis, selectorChartAxisZoomOptionsLookup,
|
|
5
|
+
import { getChartPoint, invertScale, selectorChartAxis, selectorChartAxisZoomOptionsLookup, useChartsContext, useDrawingArea, useStore } from '@mui/x-charts/internals';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
8
8
|
import { shouldForwardProp } from '@mui/system';
|
|
@@ -53,7 +53,7 @@ export function ChartsAxisZoomSliderActiveTrack({
|
|
|
53
53
|
}) {
|
|
54
54
|
const {
|
|
55
55
|
instance
|
|
56
|
-
} =
|
|
56
|
+
} = useChartsContext();
|
|
57
57
|
const {
|
|
58
58
|
chartsLayerContainerRef
|
|
59
59
|
} = instance;
|
|
@@ -4,7 +4,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
const _excluded = ["axisId", "axisDirection", "reverse", "onSelectStart", "onSelectEnd"];
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { useChartsContext, getChartPoint, selectorChartAxisZoomOptionsLookup, useStore } from '@mui/x-charts/internals';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
9
|
import { rafThrottle } from '@mui/x-internals/rafThrottle';
|
|
10
10
|
import { shouldForwardProp } from '@mui/system';
|
|
@@ -52,7 +52,7 @@ export function ChartsAxisZoomSliderTrack(_ref) {
|
|
|
52
52
|
const ref = React.useRef(null);
|
|
53
53
|
const {
|
|
54
54
|
instance
|
|
55
|
-
} =
|
|
55
|
+
} = useChartsContext();
|
|
56
56
|
const {
|
|
57
57
|
chartsLayerContainerRef
|
|
58
58
|
} = instance;
|
|
@@ -4,12 +4,12 @@ import { type MakeOptional } from '@mui/x-internals/types';
|
|
|
4
4
|
import { type ChartsAxisHighlightProps } from '@mui/x-charts/ChartsAxisHighlight';
|
|
5
5
|
import { type FunnelPlotProps } from "./FunnelPlot.mjs";
|
|
6
6
|
import { type FunnelSeriesType } from "./funnel.types.mjs";
|
|
7
|
-
import { type
|
|
7
|
+
import { type ChartsContainerProProps } from "../ChartsContainerPro/index.mjs";
|
|
8
8
|
import { type FunnelChartSlotExtension } from "./funnelSlots.types.mjs";
|
|
9
9
|
import { type CategoryAxis } from "./categoryAxis.types.mjs";
|
|
10
10
|
import { type FunnelChartPluginSignatures } from "./FunnelChart.plugins.mjs";
|
|
11
11
|
export type FunnelSeries = MakeOptional<FunnelSeriesType, 'type'>;
|
|
12
|
-
export interface FunnelChartProps extends Omit<
|
|
12
|
+
export interface FunnelChartProps extends Omit<ChartsContainerProProps<'funnel', FunnelChartPluginSignatures>, 'series' | 'plugins' | 'zAxis' | 'zoom' | 'onZoomChange' | 'dataset' | 'yAxis' | 'xAxis' | 'rotationAxis' | 'radiusAxis' | 'slots' | 'slotProps'>, Omit<FunnelPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, FunnelChartSlotExtension {
|
|
13
13
|
/**
|
|
14
14
|
* The series to display in the funnel chart.
|
|
15
15
|
* An array of [[FunnelSeries]] objects.
|
|
@@ -4,12 +4,12 @@ import { type MakeOptional } from '@mui/x-internals/types';
|
|
|
4
4
|
import { type ChartsAxisHighlightProps } from '@mui/x-charts/ChartsAxisHighlight';
|
|
5
5
|
import { type FunnelPlotProps } from "./FunnelPlot.js";
|
|
6
6
|
import { type FunnelSeriesType } from "./funnel.types.js";
|
|
7
|
-
import { type
|
|
7
|
+
import { type ChartsContainerProProps } from "../ChartsContainerPro/index.js";
|
|
8
8
|
import { type FunnelChartSlotExtension } from "./funnelSlots.types.js";
|
|
9
9
|
import { type CategoryAxis } from "./categoryAxis.types.js";
|
|
10
10
|
import { type FunnelChartPluginSignatures } from "./FunnelChart.plugins.js";
|
|
11
11
|
export type FunnelSeries = MakeOptional<FunnelSeriesType, 'type'>;
|
|
12
|
-
export interface FunnelChartProps extends Omit<
|
|
12
|
+
export interface FunnelChartProps extends Omit<ChartsContainerProProps<'funnel', FunnelChartPluginSignatures>, 'series' | 'plugins' | 'zAxis' | 'zoom' | 'onZoomChange' | 'dataset' | 'yAxis' | 'xAxis' | 'rotationAxis' | 'radiusAxis' | 'slots' | 'slotProps'>, Omit<FunnelPlotProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, FunnelChartSlotExtension {
|
|
13
13
|
/**
|
|
14
14
|
* The series to display in the funnel chart.
|
|
15
15
|
* An array of [[FunnelSeries]] objects.
|
|
@@ -21,8 +21,8 @@ var _ChartsWrapper = require("@mui/x-charts/ChartsWrapper");
|
|
|
21
21
|
var _FunnelPlot = require("./FunnelPlot");
|
|
22
22
|
var _useFunnelChartProps = require("./useFunnelChartProps");
|
|
23
23
|
var _seriesConfig = require("./seriesConfig");
|
|
24
|
-
var
|
|
25
|
-
var
|
|
24
|
+
var _useChartsContainerProProps = require("../ChartsContainerPro/useChartsContainerProProps");
|
|
25
|
+
var _ChartsDataProviderPro = require("../ChartsDataProviderPro");
|
|
26
26
|
var _FunnelChart2 = require("./FunnelChart.plugins");
|
|
27
27
|
var _FocusedFunnelSection = require("./FocusedFunnelSection");
|
|
28
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -35,7 +35,7 @@ const FunnelChart = exports.FunnelChart = /*#__PURE__*/React.forwardRef(function
|
|
|
35
35
|
name: 'MuiFunnelChart'
|
|
36
36
|
});
|
|
37
37
|
const {
|
|
38
|
-
|
|
38
|
+
chartsContainerProps,
|
|
39
39
|
funnelPlotProps,
|
|
40
40
|
overlayProps,
|
|
41
41
|
legendProps,
|
|
@@ -45,11 +45,11 @@ const FunnelChart = exports.FunnelChart = /*#__PURE__*/React.forwardRef(function
|
|
|
45
45
|
children
|
|
46
46
|
} = (0, _useFunnelChartProps.useFunnelChartProps)(themedProps);
|
|
47
47
|
const {
|
|
48
|
-
|
|
48
|
+
chartsDataProviderProProps,
|
|
49
49
|
chartsSurfaceProps
|
|
50
|
-
} = (0,
|
|
50
|
+
} = (0, _useChartsContainerProProps.useChartsContainerProProps)(chartsContainerProps);
|
|
51
51
|
const Tooltip = themedProps.slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
|
|
52
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
52
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsDataProviderPro.ChartsDataProviderPro, (0, _extends2.default)({}, chartsDataProviderProProps, {
|
|
53
53
|
gap: themedProps.gap,
|
|
54
54
|
seriesConfig: seriesConfig,
|
|
55
55
|
plugins: _FunnelChart2.FUNNEL_CHART_PLUGINS,
|
|
@@ -177,6 +177,10 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
177
177
|
* @default rainbowSurgePalette
|
|
178
178
|
*/
|
|
179
179
|
colors: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.func]),
|
|
180
|
+
/**
|
|
181
|
+
* The description of the chart.
|
|
182
|
+
* Used to provide an accessible description for the chart.
|
|
183
|
+
*/
|
|
180
184
|
desc: _propTypes.default.string,
|
|
181
185
|
/**
|
|
182
186
|
* If `true`, the charts will not listen to the mouse move event.
|
|
@@ -184,7 +188,14 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
184
188
|
* @default false
|
|
185
189
|
*/
|
|
186
190
|
disableAxisListener: _propTypes.default.bool,
|
|
187
|
-
|
|
191
|
+
/**
|
|
192
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
193
|
+
*/
|
|
194
|
+
disableKeyboardNavigation: _propTypes.default.bool,
|
|
195
|
+
/**
|
|
196
|
+
* Options to enable features planned for the next major.
|
|
197
|
+
*/
|
|
198
|
+
experimentalFeatures: _propTypes.default.object,
|
|
188
199
|
/**
|
|
189
200
|
* The gap, in pixels, between funnel sections.
|
|
190
201
|
* @default 0
|
|
@@ -323,7 +334,7 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
323
334
|
/**
|
|
324
335
|
* The callback fired when the tooltip item changes.
|
|
325
336
|
*
|
|
326
|
-
* @param {SeriesItemIdentifier<
|
|
337
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
327
338
|
*/
|
|
328
339
|
onTooltipItemChange: _propTypes.default.func,
|
|
329
340
|
/**
|
|
@@ -348,6 +359,10 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
348
359
|
slots: _propTypes.default.object,
|
|
349
360
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
350
361
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
362
|
+
/**
|
|
363
|
+
* The title of the chart.
|
|
364
|
+
* Used to provide an accessible label for the chart.
|
|
365
|
+
*/
|
|
351
366
|
title: _propTypes.default.string,
|
|
352
367
|
/**
|
|
353
368
|
* The tooltip item.
|
|
@@ -14,8 +14,8 @@ import { ChartsWrapper } from '@mui/x-charts/ChartsWrapper';
|
|
|
14
14
|
import { FunnelPlot } from "./FunnelPlot.mjs";
|
|
15
15
|
import { useFunnelChartProps } from "./useFunnelChartProps.mjs";
|
|
16
16
|
import { funnelSeriesConfig } from "./seriesConfig/index.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
17
|
+
import { useChartsContainerProProps } from "../ChartsContainerPro/useChartsContainerProProps.mjs";
|
|
18
|
+
import { ChartsDataProviderPro } from "../ChartsDataProviderPro/index.mjs";
|
|
19
19
|
import { FUNNEL_CHART_PLUGINS } from "./FunnelChart.plugins.mjs";
|
|
20
20
|
import { FocusedFunnelSection } from "./FocusedFunnelSection.mjs";
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -28,7 +28,7 @@ const FunnelChart = /*#__PURE__*/React.forwardRef(function FunnelChart(props, re
|
|
|
28
28
|
name: 'MuiFunnelChart'
|
|
29
29
|
});
|
|
30
30
|
const {
|
|
31
|
-
|
|
31
|
+
chartsContainerProps,
|
|
32
32
|
funnelPlotProps,
|
|
33
33
|
overlayProps,
|
|
34
34
|
legendProps,
|
|
@@ -38,11 +38,11 @@ const FunnelChart = /*#__PURE__*/React.forwardRef(function FunnelChart(props, re
|
|
|
38
38
|
children
|
|
39
39
|
} = useFunnelChartProps(themedProps);
|
|
40
40
|
const {
|
|
41
|
-
|
|
41
|
+
chartsDataProviderProProps,
|
|
42
42
|
chartsSurfaceProps
|
|
43
|
-
} =
|
|
43
|
+
} = useChartsContainerProProps(chartsContainerProps);
|
|
44
44
|
const Tooltip = themedProps.slots?.tooltip ?? ChartsTooltip;
|
|
45
|
-
return /*#__PURE__*/_jsx(
|
|
45
|
+
return /*#__PURE__*/_jsx(ChartsDataProviderPro, _extends({}, chartsDataProviderProProps, {
|
|
46
46
|
gap: themedProps.gap,
|
|
47
47
|
seriesConfig: seriesConfig,
|
|
48
48
|
plugins: FUNNEL_CHART_PLUGINS,
|
|
@@ -170,6 +170,10 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
170
170
|
* @default rainbowSurgePalette
|
|
171
171
|
*/
|
|
172
172
|
colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
173
|
+
/**
|
|
174
|
+
* The description of the chart.
|
|
175
|
+
* Used to provide an accessible description for the chart.
|
|
176
|
+
*/
|
|
173
177
|
desc: PropTypes.string,
|
|
174
178
|
/**
|
|
175
179
|
* If `true`, the charts will not listen to the mouse move event.
|
|
@@ -177,7 +181,14 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
177
181
|
* @default false
|
|
178
182
|
*/
|
|
179
183
|
disableAxisListener: PropTypes.bool,
|
|
180
|
-
|
|
184
|
+
/**
|
|
185
|
+
* If `true`, disables keyboard navigation for the chart.
|
|
186
|
+
*/
|
|
187
|
+
disableKeyboardNavigation: PropTypes.bool,
|
|
188
|
+
/**
|
|
189
|
+
* Options to enable features planned for the next major.
|
|
190
|
+
*/
|
|
191
|
+
experimentalFeatures: PropTypes.object,
|
|
181
192
|
/**
|
|
182
193
|
* The gap, in pixels, between funnel sections.
|
|
183
194
|
* @default 0
|
|
@@ -316,7 +327,7 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
316
327
|
/**
|
|
317
328
|
* The callback fired when the tooltip item changes.
|
|
318
329
|
*
|
|
319
|
-
* @param {SeriesItemIdentifier<
|
|
330
|
+
* @param {SeriesItemIdentifier<SeriesType> | null} tooltipItem The newly highlighted item.
|
|
320
331
|
*/
|
|
321
332
|
onTooltipItemChange: PropTypes.func,
|
|
322
333
|
/**
|
|
@@ -341,6 +352,10 @@ process.env.NODE_ENV !== "production" ? FunnelChart.propTypes = {
|
|
|
341
352
|
slots: PropTypes.object,
|
|
342
353
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
343
354
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
355
|
+
/**
|
|
356
|
+
* The title of the chart.
|
|
357
|
+
* Used to provide an accessible label for the chart.
|
|
358
|
+
*/
|
|
344
359
|
title: PropTypes.string,
|
|
345
360
|
/**
|
|
346
361
|
* The tooltip item.
|
|
@@ -15,6 +15,7 @@ var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
|
15
15
|
var _internals = require("@mui/x-charts/internals");
|
|
16
16
|
var _FunnelSection = require("./FunnelSection");
|
|
17
17
|
var _labelUtils = require("./labelUtils");
|
|
18
|
+
var _funnelClasses = require("./funnelClasses");
|
|
18
19
|
var _useFunnelSeries = require("../hooks/useFunnelSeries");
|
|
19
20
|
var _curves = require("./curves");
|
|
20
21
|
var _FunnelSectionLabel = require("./FunnelSectionLabel");
|
|
@@ -110,7 +111,9 @@ function FunnelPlot(props) {
|
|
|
110
111
|
} = props,
|
|
111
112
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
112
113
|
const data = useAggregatedData();
|
|
113
|
-
|
|
114
|
+
const classes = (0, _funnelClasses.useUtilityClasses)();
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
116
|
+
className: classes.root,
|
|
114
117
|
children: [data.map(series => {
|
|
115
118
|
if (series.length === 0) {
|
|
116
119
|
return null;
|
|
@@ -150,7 +153,8 @@ function FunnelPlot(props) {
|
|
|
150
153
|
id,
|
|
151
154
|
label,
|
|
152
155
|
seriesId,
|
|
153
|
-
dataIndex
|
|
156
|
+
dataIndex,
|
|
157
|
+
variant
|
|
154
158
|
}) => {
|
|
155
159
|
if (!label || !label.value) {
|
|
156
160
|
return null;
|
|
@@ -158,7 +162,8 @@ function FunnelPlot(props) {
|
|
|
158
162
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FunnelSectionLabel.FunnelSectionLabel, (0, _extends2.default)({
|
|
159
163
|
label: label,
|
|
160
164
|
dataIndex: dataIndex,
|
|
161
|
-
seriesId: seriesId
|
|
165
|
+
seriesId: seriesId,
|
|
166
|
+
variant: variant
|
|
162
167
|
}, other), id);
|
|
163
168
|
})
|
|
164
169
|
}, series[0].seriesId);
|
|
@@ -7,6 +7,7 @@ import { line as d3Line } from '@mui/x-charts-vendor/d3-shape';
|
|
|
7
7
|
import { cartesianSeriesTypes, useStore } from '@mui/x-charts/internals';
|
|
8
8
|
import { FunnelSection } from "./FunnelSection.mjs";
|
|
9
9
|
import { alignLabel, positionLabel } from "./labelUtils.mjs";
|
|
10
|
+
import { useUtilityClasses } from "./funnelClasses.mjs";
|
|
10
11
|
import { useFunnelSeriesContext } from "../hooks/useFunnelSeries.mjs";
|
|
11
12
|
import { getFunnelCurve } from "./curves/index.mjs";
|
|
12
13
|
import { FunnelSectionLabel } from "./FunnelSectionLabel.mjs";
|
|
@@ -102,7 +103,9 @@ function FunnelPlot(props) {
|
|
|
102
103
|
} = props,
|
|
103
104
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
104
105
|
const data = useAggregatedData();
|
|
105
|
-
|
|
106
|
+
const classes = useUtilityClasses();
|
|
107
|
+
return /*#__PURE__*/_jsxs("g", {
|
|
108
|
+
className: classes.root,
|
|
106
109
|
children: [data.map(series => {
|
|
107
110
|
if (series.length === 0) {
|
|
108
111
|
return null;
|
|
@@ -142,7 +145,8 @@ function FunnelPlot(props) {
|
|
|
142
145
|
id,
|
|
143
146
|
label,
|
|
144
147
|
seriesId,
|
|
145
|
-
dataIndex
|
|
148
|
+
dataIndex,
|
|
149
|
+
variant
|
|
146
150
|
}) => {
|
|
147
151
|
if (!label || !label.value) {
|
|
148
152
|
return null;
|
|
@@ -150,7 +154,8 @@ function FunnelPlot(props) {
|
|
|
150
154
|
return /*#__PURE__*/_jsx(FunnelSectionLabel, _extends({
|
|
151
155
|
label: label,
|
|
152
156
|
dataIndex: dataIndex,
|
|
153
|
-
seriesId: seriesId
|
|
157
|
+
seriesId: seriesId,
|
|
158
|
+
variant: variant
|
|
154
159
|
}, other), id);
|
|
155
160
|
})
|
|
156
161
|
}, series[0].seriesId);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import { type
|
|
3
|
+
import { type FunnelClasses } from "./funnelClasses.mjs";
|
|
4
4
|
export interface FunnelSectionProps extends Omit<React.SVGProps<SVGPathElement>, 'ref'> {
|
|
5
5
|
seriesId: SeriesId;
|
|
6
6
|
dataIndex: number;
|
|
7
7
|
color: string;
|
|
8
|
-
classes?: Partial<
|
|
8
|
+
classes?: Partial<FunnelClasses>;
|
|
9
9
|
variant?: 'filled' | 'outlined';
|
|
10
10
|
}
|
|
11
11
|
export declare const FunnelSectionPath: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGProps<SVGPathElement>, keyof React.SVGProps<SVGPathElement>>, {}>;
|
|
12
12
|
/**
|
|
13
13
|
* @ignore - internal component.
|
|
14
14
|
*/
|
|
15
|
-
declare const FunnelSection: React.ForwardRefExoticComponent<FunnelSectionProps & React.RefAttributes<
|
|
15
|
+
declare const FunnelSection: React.ForwardRefExoticComponent<FunnelSectionProps & React.RefAttributes<SVGPathElement>>;
|
|
16
16
|
export { FunnelSection };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import { type
|
|
3
|
+
import { type FunnelClasses } from "./funnelClasses.js";
|
|
4
4
|
export interface FunnelSectionProps extends Omit<React.SVGProps<SVGPathElement>, 'ref'> {
|
|
5
5
|
seriesId: SeriesId;
|
|
6
6
|
dataIndex: number;
|
|
7
7
|
color: string;
|
|
8
|
-
classes?: Partial<
|
|
8
|
+
classes?: Partial<FunnelClasses>;
|
|
9
9
|
variant?: 'filled' | 'outlined';
|
|
10
10
|
}
|
|
11
11
|
export declare const FunnelSectionPath: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGProps<SVGPathElement>, keyof React.SVGProps<SVGPathElement>>, {}>;
|
|
12
12
|
/**
|
|
13
13
|
* @ignore - internal component.
|
|
14
14
|
*/
|
|
15
|
-
declare const FunnelSection: React.ForwardRefExoticComponent<FunnelSectionProps & React.RefAttributes<
|
|
15
|
+
declare const FunnelSection: React.ForwardRefExoticComponent<FunnelSectionProps & React.RefAttributes<SVGPathElement>>;
|
|
16
16
|
export { FunnelSection };
|
|
@@ -14,12 +14,12 @@ var _styles = require("@mui/material/styles");
|
|
|
14
14
|
var _internals = require("@mui/x-charts/internals");
|
|
15
15
|
var _hooks = require("@mui/x-charts/hooks");
|
|
16
16
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
|
-
var
|
|
17
|
+
var _funnelClasses = require("./funnelClasses");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
const _excluded = ["seriesId", "dataIndex", "classes", "color", "onClick", "className", "variant"];
|
|
20
20
|
const FunnelSectionPath = exports.FunnelSectionPath = (0, _styles.styled)('path', {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
name: 'MuiFunnelChart',
|
|
22
|
+
slot: 'Section'
|
|
23
23
|
})(() => ({
|
|
24
24
|
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, fill-opacity 0.2s ease-in, filter 0.2s ease-in'
|
|
25
25
|
}));
|
|
@@ -28,7 +28,7 @@ const FunnelSectionPath = exports.FunnelSectionPath = (0, _styles.styled)('path'
|
|
|
28
28
|
* @ignore - internal component.
|
|
29
29
|
*/
|
|
30
30
|
const FunnelSection = exports.FunnelSection = (0, _internals.consumeSlots)('MuiFunnelSection', 'funnelSection', {
|
|
31
|
-
classesResolver:
|
|
31
|
+
classesResolver: _funnelClasses.useUtilityClasses
|
|
32
32
|
}, /*#__PURE__*/React.forwardRef(function FunnelSection(props, ref) {
|
|
33
33
|
const {
|
|
34
34
|
seriesId,
|
|
@@ -46,10 +46,9 @@ const FunnelSection = exports.FunnelSection = (0, _internals.consumeSlots)('MuiF
|
|
|
46
46
|
dataIndex
|
|
47
47
|
}), [seriesId, dataIndex]);
|
|
48
48
|
const interactionProps = (0, _internals.useInteractionItemProps)(identifier);
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
} = (0, _hooks.useItemHighlighted)(identifier);
|
|
49
|
+
const highlightState = (0, _hooks.useItemHighlightState)(identifier);
|
|
50
|
+
const isHighlighted = highlightState === 'highlighted';
|
|
51
|
+
const isFaded = highlightState === 'faded';
|
|
53
52
|
const isOutlined = variant === 'outlined';
|
|
54
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FunnelSectionPath, (0, _extends2.default)({}, interactionProps, {
|
|
55
54
|
filter: isHighlighted && !isOutlined ? 'brightness(120%)' : undefined,
|
|
@@ -63,7 +62,7 @@ const FunnelSection = exports.FunnelSection = (0, _internals.consumeSlots)('MuiF
|
|
|
63
62
|
onClick: onClick,
|
|
64
63
|
"data-highlighted": isHighlighted || undefined,
|
|
65
64
|
"data-faded": isFaded || undefined,
|
|
66
|
-
className: (0, _clsx.default)(classes?.
|
|
65
|
+
className: (0, _clsx.default)(classes?.section, className)
|
|
67
66
|
}, other, {
|
|
68
67
|
ref: ref
|
|
69
68
|
}));
|
|
@@ -6,13 +6,13 @@ const _excluded = ["seriesId", "dataIndex", "classes", "color", "onClick", "clas
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { styled } from '@mui/material/styles';
|
|
8
8
|
import { useInteractionItemProps, consumeSlots } from '@mui/x-charts/internals';
|
|
9
|
-
import {
|
|
9
|
+
import { useItemHighlightState } from '@mui/x-charts/hooks';
|
|
10
10
|
import clsx from 'clsx';
|
|
11
|
-
import { useUtilityClasses } from "./
|
|
11
|
+
import { useUtilityClasses } from "./funnelClasses.mjs";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
export const FunnelSectionPath = styled('path', {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
name: 'MuiFunnelChart',
|
|
15
|
+
slot: 'Section'
|
|
16
16
|
})(() => ({
|
|
17
17
|
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, fill-opacity 0.2s ease-in, filter 0.2s ease-in'
|
|
18
18
|
}));
|
|
@@ -39,10 +39,9 @@ const FunnelSection = consumeSlots('MuiFunnelSection', 'funnelSection', {
|
|
|
39
39
|
dataIndex
|
|
40
40
|
}), [seriesId, dataIndex]);
|
|
41
41
|
const interactionProps = useInteractionItemProps(identifier);
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} = useItemHighlighted(identifier);
|
|
42
|
+
const highlightState = useItemHighlightState(identifier);
|
|
43
|
+
const isHighlighted = highlightState === 'highlighted';
|
|
44
|
+
const isFaded = highlightState === 'faded';
|
|
46
45
|
const isOutlined = variant === 'outlined';
|
|
47
46
|
return /*#__PURE__*/_jsx(FunnelSectionPath, _extends({}, interactionProps, {
|
|
48
47
|
filter: isHighlighted && !isOutlined ? 'brightness(120%)' : undefined,
|
|
@@ -56,7 +55,7 @@ const FunnelSection = consumeSlots('MuiFunnelSection', 'funnelSection', {
|
|
|
56
55
|
onClick: onClick,
|
|
57
56
|
"data-highlighted": isHighlighted || undefined,
|
|
58
57
|
"data-faded": isFaded || undefined,
|
|
59
|
-
className: clsx(classes?.
|
|
58
|
+
className: clsx(classes?.section, className)
|
|
60
59
|
}, other, {
|
|
61
60
|
ref: ref
|
|
62
61
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import { type
|
|
3
|
+
import { type FunnelClasses } from "./funnelClasses.mjs";
|
|
4
4
|
export interface FunnelSectionLabelConfig {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
@@ -9,13 +9,19 @@ export interface FunnelSectionLabelConfig {
|
|
|
9
9
|
dominantBaseline?: React.SVGProps<SVGTextElement>['dominantBaseline'];
|
|
10
10
|
}
|
|
11
11
|
export interface FunnelSectionLabelProps extends Omit<React.SVGProps<SVGTextElement>, 'ref' | 'id'> {
|
|
12
|
-
classes?: Partial<
|
|
12
|
+
classes?: Partial<FunnelClasses>;
|
|
13
13
|
label: FunnelSectionLabelConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Indicate if the section is filled or outlined.
|
|
16
|
+
* Can be used to apply different styles to the label.
|
|
17
|
+
*/
|
|
18
|
+
variant?: 'filled' | 'outlined';
|
|
14
19
|
seriesId: SeriesId;
|
|
15
20
|
dataIndex: number;
|
|
16
21
|
}
|
|
22
|
+
export declare const FunnelSectionLabelText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGTextElementAttributes<SVGTextElement>, keyof React.SVGTextElementAttributes<SVGTextElement>>, {}>;
|
|
17
23
|
/**
|
|
18
24
|
* @ignore - internal component.
|
|
19
25
|
*/
|
|
20
|
-
declare const FunnelSectionLabel: React.ForwardRefExoticComponent<FunnelSectionLabelProps & React.RefAttributes<
|
|
26
|
+
declare const FunnelSectionLabel: React.ForwardRefExoticComponent<FunnelSectionLabelProps & React.RefAttributes<SVGTextElement>>;
|
|
21
27
|
export { FunnelSectionLabel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import { type
|
|
3
|
+
import { type FunnelClasses } from "./funnelClasses.js";
|
|
4
4
|
export interface FunnelSectionLabelConfig {
|
|
5
5
|
x: number;
|
|
6
6
|
y: number;
|
|
@@ -9,13 +9,19 @@ export interface FunnelSectionLabelConfig {
|
|
|
9
9
|
dominantBaseline?: React.SVGProps<SVGTextElement>['dominantBaseline'];
|
|
10
10
|
}
|
|
11
11
|
export interface FunnelSectionLabelProps extends Omit<React.SVGProps<SVGTextElement>, 'ref' | 'id'> {
|
|
12
|
-
classes?: Partial<
|
|
12
|
+
classes?: Partial<FunnelClasses>;
|
|
13
13
|
label: FunnelSectionLabelConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Indicate if the section is filled or outlined.
|
|
16
|
+
* Can be used to apply different styles to the label.
|
|
17
|
+
*/
|
|
18
|
+
variant?: 'filled' | 'outlined';
|
|
14
19
|
seriesId: SeriesId;
|
|
15
20
|
dataIndex: number;
|
|
16
21
|
}
|
|
22
|
+
export declare const FunnelSectionLabelText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.SVGTextElementAttributes<SVGTextElement>, keyof React.SVGTextElementAttributes<SVGTextElement>>, {}>;
|
|
17
23
|
/**
|
|
18
24
|
* @ignore - internal component.
|
|
19
25
|
*/
|
|
20
|
-
declare const FunnelSectionLabel: React.ForwardRefExoticComponent<FunnelSectionLabelProps & React.RefAttributes<
|
|
26
|
+
declare const FunnelSectionLabel: React.ForwardRefExoticComponent<FunnelSectionLabelProps & React.RefAttributes<SVGTextElement>>;
|
|
21
27
|
export { FunnelSectionLabel };
|
|
@@ -6,28 +6,37 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.FunnelSectionLabel = void 0;
|
|
9
|
+
exports.FunnelSectionLabelText = exports.FunnelSectionLabel = void 0;
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _styles = require("@mui/material/styles");
|
|
14
14
|
var _internals = require("@mui/x-charts/internals");
|
|
15
|
-
var
|
|
15
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
16
|
+
var _funnelClasses = require("./funnelClasses");
|
|
16
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["classes", "color", "onClick", "className", "label", "seriesId", "dataIndex"];
|
|
18
|
+
const _excluded = ["classes", "color", "onClick", "className", "label", "variant", "seriesId", "dataIndex"];
|
|
19
|
+
const FunnelSectionLabelText = exports.FunnelSectionLabelText = (0, _styles.styled)('text', {
|
|
20
|
+
name: 'MuiFunnelChart',
|
|
21
|
+
slot: 'SectionLabel'
|
|
22
|
+
})(() => ({
|
|
23
|
+
transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, fill-opacity 0.2s ease-in, filter 0.2s ease-in'
|
|
24
|
+
}));
|
|
25
|
+
|
|
18
26
|
/**
|
|
19
27
|
* @ignore - internal component.
|
|
20
28
|
*/
|
|
21
29
|
const FunnelSectionLabel = exports.FunnelSectionLabel = (0, _internals.consumeSlots)('MuiFunnelSectionLabel', 'funnelSectionLabel', {
|
|
22
|
-
classesResolver:
|
|
30
|
+
classesResolver: _funnelClasses.useUtilityClasses
|
|
23
31
|
}, /*#__PURE__*/React.forwardRef(function FunnelSectionLabel(props, ref) {
|
|
24
32
|
const {
|
|
25
33
|
classes,
|
|
34
|
+
className,
|
|
26
35
|
label
|
|
27
36
|
} = props,
|
|
28
37
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
29
38
|
const theme = (0, _styles.useTheme)();
|
|
30
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FunnelSectionLabelText, (0, _extends2.default)({
|
|
31
40
|
stroke: "none",
|
|
32
41
|
pointerEvents: "none",
|
|
33
42
|
fontFamily: theme.typography.body2.fontFamily,
|
|
@@ -39,7 +48,7 @@ const FunnelSectionLabel = exports.FunnelSectionLabel = (0, _internals.consumeSl
|
|
|
39
48
|
fontStyle: theme.typography.body2.fontStyle,
|
|
40
49
|
fontVariant: theme.typography.body2.fontVariant,
|
|
41
50
|
fill: (theme.vars || theme)?.palette?.text?.primary,
|
|
42
|
-
className: classes?.
|
|
51
|
+
className: (0, _clsx.default)(classes?.sectionLabel, className),
|
|
43
52
|
x: label.x,
|
|
44
53
|
y: label.y,
|
|
45
54
|
textAnchor: label.textAnchor ?? 'middle',
|