@mui/x-charts 9.0.0-alpha.2 → 9.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/AnimatedBarElement.d.mts +1 -1
- package/BarChart/AnimatedBarElement.d.ts +1 -1
- package/BarChart/BarChart.js +5 -2
- package/BarChart/BarChart.mjs +5 -2
- package/BarChart/BarElement.d.mts +1 -1
- package/BarChart/BarElement.d.ts +1 -1
- package/BarChart/BarElement.js +8 -7
- package/BarChart/BarElement.mjs +8 -7
- package/BarChart/BarLabel/BarLabel.js +4 -0
- package/BarChart/BarLabel/BarLabel.mjs +4 -0
- package/BarChart/BarLabel/BarLabel.types.d.mts +2 -2
- package/BarChart/BarLabel/BarLabel.types.d.ts +2 -2
- package/BarChart/BarLabel/BarLabelItem.js +8 -7
- package/BarChart/BarLabel/BarLabelItem.mjs +8 -7
- package/BarChart/BarLabel/barLabelClasses.d.mts +15 -0
- package/BarChart/BarLabel/barLabelClasses.d.ts +15 -0
- package/BarChart/BarLabel/barLabelClasses.js +19 -0
- package/BarChart/BarLabel/barLabelClasses.mjs +20 -0
- package/BarChart/BarPlot.js +1 -2
- package/BarChart/BarPlot.mjs +2 -3
- package/BarChart/barClasses.d.mts +21 -1
- package/BarChart/barClasses.d.ts +21 -1
- package/BarChart/barClasses.js +9 -3
- package/BarChart/barClasses.mjs +9 -3
- package/BarChart/barElementClasses.d.mts +17 -10
- package/BarChart/barElementClasses.d.ts +17 -10
- package/BarChart/barElementClasses.js +19 -0
- package/BarChart/barElementClasses.mjs +20 -0
- package/BarChart/index.d.mts +1 -1
- package/BarChart/index.d.ts +1 -1
- package/BarChart/index.js +1 -8
- package/BarChart/index.mjs +1 -1
- package/CHANGELOG.md +123 -1
- package/ChartContainer/ChartContainer.d.mts +1 -1
- package/ChartContainer/ChartContainer.d.ts +1 -1
- package/ChartContainer/useChartContainerProps.d.mts +2 -2
- package/ChartContainer/useChartContainerProps.d.ts +2 -2
- package/ChartDataProvider/ChartDataProvider.d.mts +1 -1
- package/ChartDataProvider/ChartDataProvider.d.ts +1 -1
- package/ChartDataProvider/useChartDataProviderProps.d.mts +2 -2
- package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/ChartsContainer/ChartsContainer.d.mts +1 -1
- package/ChartsContainer/ChartsContainer.d.ts +1 -1
- package/ChartsContainer/ChartsContainer.js +5 -2
- package/ChartsContainer/ChartsContainer.mjs +5 -2
- package/ChartsContainer/useChartsContainerProps.d.mts +3 -3
- package/ChartsContainer/useChartsContainerProps.d.ts +3 -3
- package/ChartsContainer/useChartsContainerProps.js +3 -3
- package/ChartsContainer/useChartsContainerProps.mjs +3 -3
- package/ChartsDataProvider/ChartsDataProvider.d.mts +2 -2
- package/ChartsDataProvider/ChartsDataProvider.d.ts +2 -2
- package/ChartsDataProvider/useChartsDataProviderProps.d.mts +2 -2
- package/ChartsDataProvider/useChartsDataProviderProps.d.ts +2 -2
- package/ChartsLabel/ChartsLabelMark.d.mts +8 -1
- package/ChartsLabel/ChartsLabelMark.d.ts +8 -1
- package/ChartsLabel/ChartsLabelMark.js +29 -3
- package/ChartsLabel/ChartsLabelMark.mjs +29 -3
- package/ChartsLabel/labelMarkClasses.d.mts +2 -0
- package/ChartsLabel/labelMarkClasses.d.ts +2 -0
- package/ChartsLabel/labelMarkClasses.js +1 -1
- package/ChartsLabel/labelMarkClasses.mjs +1 -1
- package/ChartsLegend/ChartsLegend.js +4 -2
- package/ChartsLegend/ChartsLegend.mjs +4 -2
- package/ChartsLegend/legendContext.types.d.mts +1 -0
- package/ChartsLegend/legendContext.types.d.ts +1 -0
- package/ChartsTooltip/ChartsAxisTooltipContent.js +3 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.mjs +3 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +6 -2
- package/ChartsTooltip/ChartsItemTooltipContent.mjs +6 -2
- package/ChartsTooltip/ChartsTooltipContainer.js +7 -5
- package/ChartsTooltip/ChartsTooltipContainer.mjs +6 -4
- package/ChartsTooltip/ChartsTooltipTable.d.mts +1 -1
- package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/ChartsTooltip/useAxesTooltip.d.mts +1 -0
- package/ChartsTooltip/useAxesTooltip.d.ts +1 -0
- package/ChartsTooltip/useAxesTooltip.js +6 -4
- package/ChartsTooltip/useAxesTooltip.mjs +6 -4
- package/ChartsTooltip/useItemTooltip.d.mts +5 -3
- package/ChartsTooltip/useItemTooltip.d.ts +5 -3
- package/ChartsXAxis/useAxisTicksProps.d.mts +286 -286
- package/ChartsXAxis/useAxisTicksProps.d.ts +286 -286
- package/ChartsYAxis/useAxisTicksProps.d.mts +286 -286
- package/ChartsYAxis/useAxisTicksProps.d.ts +286 -286
- package/LineChart/AreaElement.d.mts +12 -0
- package/LineChart/AreaElement.d.ts +12 -0
- package/LineChart/AreaElement.js +28 -9
- package/LineChart/AreaElement.mjs +30 -9
- package/LineChart/AreaPlot.js +10 -4
- package/LineChart/AreaPlot.mjs +11 -5
- package/LineChart/CircleMarkElement.js +9 -2
- package/LineChart/CircleMarkElement.mjs +10 -3
- package/LineChart/LineChart.js +5 -2
- package/LineChart/LineChart.mjs +5 -2
- package/LineChart/LineElement.d.mts +12 -0
- package/LineChart/LineElement.d.ts +12 -0
- package/LineChart/LineElement.js +28 -9
- package/LineChart/LineElement.mjs +30 -9
- package/LineChart/LineHighlightElement.d.mts +12 -0
- package/LineChart/LineHighlightElement.d.ts +12 -0
- package/LineChart/LineHighlightElement.js +22 -3
- package/LineChart/LineHighlightElement.mjs +24 -3
- package/LineChart/LinePlot.js +11 -5
- package/LineChart/LinePlot.mjs +12 -6
- package/LineChart/MarkElement.js +9 -2
- package/LineChart/MarkElement.mjs +10 -3
- package/LineChart/MarkPlot.js +19 -9
- package/LineChart/MarkPlot.mjs +20 -10
- package/LineChart/index.d.mts +3 -1
- package/LineChart/index.d.ts +3 -1
- package/LineChart/index.js +10 -2
- package/LineChart/index.mjs +2 -1
- package/LineChart/lineClasses.d.mts +34 -0
- package/LineChart/lineClasses.d.ts +34 -0
- package/LineChart/lineClasses.js +32 -0
- package/LineChart/lineClasses.mjs +23 -0
- package/LineChart/markElementClasses.d.mts +17 -8
- package/LineChart/markElementClasses.d.ts +17 -8
- package/LineChart/markElementClasses.js +19 -0
- package/LineChart/markElementClasses.mjs +20 -0
- package/LineChart/seriesConfig/legend.js +1 -0
- package/LineChart/seriesConfig/legend.mjs +1 -0
- package/LineChart/seriesConfig/seriesProcessor.js +1 -1
- package/LineChart/seriesConfig/seriesProcessor.mjs +1 -1
- package/LineChart/seriesConfig/tooltip.js +2 -1
- package/LineChart/seriesConfig/tooltip.mjs +2 -1
- package/PieChart/FocusedPieArc.js +8 -6
- package/PieChart/FocusedPieArc.mjs +8 -6
- package/PieChart/PieArc.d.mts +14 -11
- package/PieChart/PieArc.d.ts +14 -11
- package/PieChart/PieArc.js +22 -4
- package/PieChart/PieArc.mjs +24 -4
- package/PieChart/PieArcLabel.d.mts +16 -2
- package/PieChart/PieArcLabel.d.ts +16 -2
- package/PieChart/PieArcLabel.js +26 -5
- package/PieChart/PieArcLabel.mjs +28 -5
- package/PieChart/PieArcLabelPlot.js +6 -1
- package/PieChart/PieArcLabelPlot.mjs +6 -1
- package/PieChart/PieArcPlot.js +6 -1
- package/PieChart/PieArcPlot.mjs +6 -1
- package/PieChart/PieChart.js +5 -2
- package/PieChart/PieChart.mjs +5 -2
- package/PieChart/PiePlot.d.mts +1 -0
- package/PieChart/PiePlot.d.ts +1 -0
- package/PieChart/PiePlot.js +4 -1
- package/PieChart/PiePlot.mjs +4 -1
- package/PieChart/dataTransform/useTransformData.js +6 -8
- package/PieChart/dataTransform/useTransformData.mjs +6 -8
- package/PieChart/pieClasses.d.mts +22 -1
- package/PieChart/pieClasses.d.ts +22 -1
- package/PieChart/pieClasses.js +10 -3
- package/PieChart/pieClasses.mjs +10 -3
- package/RadarChart/RadarChart.js +5 -2
- package/RadarChart/RadarChart.mjs +5 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +3 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +3 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +4 -9
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +4 -9
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -16
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.mjs +8 -16
- package/RadarChart/seriesConfig/tooltip.js +13 -8
- package/RadarChart/seriesConfig/tooltip.mjs +13 -8
- package/RadarChart/useRadarChartProps.js +3 -3
- package/RadarChart/useRadarChartProps.mjs +3 -3
- package/ScatterChart/BatchScatter.d.mts +2 -1
- package/ScatterChart/BatchScatter.d.ts +2 -1
- package/ScatterChart/BatchScatter.js +5 -3
- package/ScatterChart/BatchScatter.mjs +4 -3
- package/ScatterChart/FocusedScatterMark.d.mts +4 -1
- package/ScatterChart/FocusedScatterMark.d.ts +4 -1
- package/ScatterChart/FocusedScatterMark.js +12 -2
- package/ScatterChart/FocusedScatterMark.mjs +11 -1
- package/ScatterChart/Scatter.d.mts +1 -1
- package/ScatterChart/Scatter.d.ts +1 -1
- package/ScatterChart/Scatter.js +11 -9
- package/ScatterChart/Scatter.mjs +11 -9
- package/ScatterChart/ScatterChart.js +5 -2
- package/ScatterChart/ScatterChart.mjs +5 -2
- package/ScatterChart/ScatterPlot.d.mts +2 -1
- package/ScatterChart/ScatterPlot.d.ts +2 -1
- package/ScatterChart/ScatterPlot.js +16 -2
- package/ScatterChart/ScatterPlot.mjs +16 -2
- package/ScatterChart/index.d.mts +2 -2
- package/ScatterChart/index.d.ts +2 -2
- package/ScatterChart/scatterClasses.d.mts +14 -2
- package/ScatterChart/scatterClasses.d.ts +14 -2
- package/ScatterChart/scatterClasses.js +9 -3
- package/ScatterChart/scatterClasses.mjs +9 -3
- package/SparkLineChart/SparkLineChart.js +5 -2
- package/SparkLineChart/SparkLineChart.mjs +5 -2
- package/context/ChartApi.d.mts +1 -1
- package/context/ChartApi.d.ts +1 -1
- package/context/ChartProvider/ChartProvider.types.d.mts +2 -2
- package/context/ChartProvider/ChartProvider.types.d.ts +2 -2
- package/context/ChartsProvider/ChartsProvider.d.mts +1 -1
- package/context/ChartsProvider/ChartsProvider.d.ts +1 -1
- package/context/ChartsProvider/ChartsProvider.types.d.mts +3 -3
- package/context/ChartsProvider/ChartsProvider.types.d.ts +3 -3
- package/hooks/index.d.mts +2 -2
- package/hooks/index.d.ts +2 -2
- package/hooks/index.js +8 -8
- package/hooks/index.mjs +2 -2
- package/hooks/useInteractionItemProps.d.mts +1 -2
- package/hooks/useInteractionItemProps.d.ts +1 -2
- package/hooks/{useItemHighlighted.d.mts → useItemHighlightState.d.mts} +5 -13
- package/hooks/{useItemHighlighted.d.ts → useItemHighlightState.d.ts} +5 -13
- package/hooks/{useItemHighlighted.js → useItemHighlightState.js} +5 -10
- package/hooks/useItemHighlightState.mjs +17 -0
- package/hooks/useItemHighlightStateGetter.d.mts +9 -0
- package/hooks/useItemHighlightStateGetter.d.ts +9 -0
- package/hooks/useItemHighlightStateGetter.js +21 -0
- package/hooks/useItemHighlightStateGetter.mjs +16 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/commonNextFocusItem.d.mts +5 -5
- package/internals/commonNextFocusItem.d.ts +5 -5
- package/internals/createCommonKeyboardFocusHandler.d.mts +2 -2
- package/internals/createCommonKeyboardFocusHandler.d.ts +2 -2
- package/internals/identifierCleaner.d.mts +8 -4
- package/internals/identifierCleaner.d.ts +8 -4
- package/internals/identifierCleaner.js +5 -1
- package/internals/identifierCleaner.mjs +5 -1
- package/internals/identifierSerializer.d.mts +10 -2
- package/internals/identifierSerializer.d.ts +10 -2
- package/internals/identifierSerializer.js +8 -0
- package/internals/identifierSerializer.mjs +8 -0
- package/internals/plugins/allPlugins.d.mts +2 -2
- package/internals/plugins/allPlugins.d.ts +2 -2
- package/internals/plugins/corePlugins/corePlugins.d.mts +1 -1
- package/internals/plugins/corePlugins/corePlugins.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.mts +6 -6
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -6
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.mts +9 -9
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +9 -9
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +28 -28
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +28 -28
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.mts +6 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.ts +6 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +21 -11
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +21 -11
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.mts +10 -10
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +10 -10
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.mts +1 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +1 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +0 -5
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.mjs +0 -4
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.mts +10 -29
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +10 -29
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +27 -64
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs +24 -60
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -10
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +8 -10
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +8 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +8 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +6 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +6 -4
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.mts +10 -10
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +10 -10
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.mts +16 -16
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +16 -16
- package/internals/plugins/models/chart.d.mts +1 -1
- package/internals/plugins/models/chart.d.ts +1 -1
- package/models/seriesType/config.d.mts +18 -6
- package/models/seriesType/config.d.ts +18 -6
- package/models/seriesType/index.d.mts +8 -8
- package/models/seriesType/index.d.ts +8 -8
- package/models/seriesType/line.d.mts +2 -1
- package/models/seriesType/line.d.ts +2 -1
- package/models/seriesType/radar.d.mts +1 -1
- package/models/seriesType/radar.d.ts +1 -1
- package/package.json +3 -3
- package/themeAugmentation/components.d.mts +26 -1
- package/themeAugmentation/components.d.ts +26 -1
- package/themeAugmentation/overrides.d.mts +15 -1
- package/themeAugmentation/overrides.d.ts +15 -1
- package/hooks/useItemHighlighted.mjs +0 -22
- package/hooks/useItemHighlightedGetter.d.mts +0 -53
- package/hooks/useItemHighlightedGetter.d.ts +0 -53
- package/hooks/useItemHighlightedGetter.js +0 -26
- package/hooks/useItemHighlightedGetter.mjs +0 -21
|
@@ -8,8 +8,8 @@ export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignatu
|
|
|
8
8
|
/**
|
|
9
9
|
* @deprecated Use `ChartsPluginParams` instead. We added S to the charts prefix to align with other components.
|
|
10
10
|
*/
|
|
11
|
-
export type ChartPluginParams<
|
|
11
|
+
export type ChartPluginParams<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsPluginParams<SeriesType, TSignatures>;
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Use `ChartsProviderProps` instead. We added S to the charts prefix to align with other components.
|
|
14
14
|
*/
|
|
15
|
-
export type ChartProviderProps<
|
|
15
|
+
export type ChartProviderProps<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsProviderProps<SeriesType, TSignatures>;
|
|
@@ -8,8 +8,8 @@ export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignatu
|
|
|
8
8
|
/**
|
|
9
9
|
* @deprecated Use `ChartsPluginParams` instead. We added S to the charts prefix to align with other components.
|
|
10
10
|
*/
|
|
11
|
-
export type ChartPluginParams<
|
|
11
|
+
export type ChartPluginParams<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsPluginParams<SeriesType, TSignatures>;
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Use `ChartsProviderProps` instead. We added S to the charts prefix to align with other components.
|
|
14
14
|
*/
|
|
15
|
-
export type ChartProviderProps<
|
|
15
|
+
export type ChartProviderProps<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsProviderProps<SeriesType, TSignatures>;
|
|
@@ -3,5 +3,5 @@ import type { ChartsProviderProps } from "./ChartsProvider.types.mjs";
|
|
|
3
3
|
import { type ChartAnyPluginSignature } from "../../internals/plugins/models/index.mjs";
|
|
4
4
|
import type { ChartSeriesType } from "../../models/seriesType/config.mjs";
|
|
5
5
|
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.mjs";
|
|
6
|
-
declare function ChartsProvider<
|
|
6
|
+
declare function ChartsProvider<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<SeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<SeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { ChartsProvider };
|
|
@@ -3,5 +3,5 @@ import type { ChartsProviderProps } from "./ChartsProvider.types.js";
|
|
|
3
3
|
import { type ChartAnyPluginSignature } from "../../internals/plugins/models/index.js";
|
|
4
4
|
import type { ChartSeriesType } from "../../models/seriesType/config.js";
|
|
5
5
|
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.js";
|
|
6
|
-
declare function ChartsProvider<
|
|
6
|
+
declare function ChartsProvider<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<SeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<SeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export { ChartsProvider };
|
|
@@ -17,11 +17,11 @@ export type ChartsContextValue<TSignatures extends readonly ChartAnyPluginSignat
|
|
|
17
17
|
*/
|
|
18
18
|
store: Store<ChartState<TSignatures, TOptionalSignatures>>;
|
|
19
19
|
};
|
|
20
|
-
export type ChartsPluginParams<
|
|
21
|
-
export interface ChartsProviderProps<
|
|
20
|
+
export type ChartsPluginParams<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures<SeriesType>, ...TSignatures], 'params'>;
|
|
21
|
+
export interface ChartsProviderProps<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> {
|
|
22
22
|
/**
|
|
23
23
|
* Array of plugins used to add features to the chart.
|
|
24
24
|
*/
|
|
25
25
|
plugins?: ConvertSignaturesIntoPlugins<TSignatures>;
|
|
26
|
-
pluginParams?: ChartsPluginParams<
|
|
26
|
+
pluginParams?: ChartsPluginParams<SeriesType, TSignatures>;
|
|
27
27
|
}
|
|
@@ -17,11 +17,11 @@ export type ChartsContextValue<TSignatures extends readonly ChartAnyPluginSignat
|
|
|
17
17
|
*/
|
|
18
18
|
store: Store<ChartState<TSignatures, TOptionalSignatures>>;
|
|
19
19
|
};
|
|
20
|
-
export type ChartsPluginParams<
|
|
21
|
-
export interface ChartsProviderProps<
|
|
20
|
+
export type ChartsPluginParams<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures<SeriesType>, ...TSignatures], 'params'>;
|
|
21
|
+
export interface ChartsProviderProps<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> {
|
|
22
22
|
/**
|
|
23
23
|
* Array of plugins used to add features to the chart.
|
|
24
24
|
*/
|
|
25
25
|
plugins?: ConvertSignaturesIntoPlugins<TSignatures>;
|
|
26
|
-
pluginParams?: ChartsPluginParams<
|
|
26
|
+
pluginParams?: ChartsPluginParams<SeriesType, TSignatures>;
|
|
27
27
|
}
|
package/hooks/index.d.mts
CHANGED
|
@@ -12,8 +12,8 @@ export { type UsePieSeriesReturnValue, type UsePieSeriesContextReturnValue, useP
|
|
|
12
12
|
export * from "./useBarSeries.mjs";
|
|
13
13
|
export * from "./useLineSeries.mjs";
|
|
14
14
|
export * from "./useRadarSeries.mjs";
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
15
|
+
export * from "./useItemHighlightState.mjs";
|
|
16
|
+
export * from "./useItemHighlightStateGetter.mjs";
|
|
17
17
|
export * from "./useLegend.mjs";
|
|
18
18
|
export { useChartGradientId, useChartGradientIdObjectBound } from "./useChartGradientId.mjs";
|
|
19
19
|
export * from "./animation/index.mjs";
|
package/hooks/index.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export { type UsePieSeriesReturnValue, type UsePieSeriesContextReturnValue, useP
|
|
|
12
12
|
export * from "./useBarSeries.js";
|
|
13
13
|
export * from "./useLineSeries.js";
|
|
14
14
|
export * from "./useRadarSeries.js";
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
15
|
+
export * from "./useItemHighlightState.js";
|
|
16
|
+
export * from "./useItemHighlightStateGetter.js";
|
|
17
17
|
export * from "./useLegend.js";
|
|
18
18
|
export { useChartGradientId, useChartGradientIdObjectBound } from "./useChartGradientId.js";
|
|
19
19
|
export * from "./animation/index.js";
|
package/hooks/index.js
CHANGED
|
@@ -204,27 +204,27 @@ Object.keys(_useRadarSeries).forEach(function (key) {
|
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
|
-
var
|
|
208
|
-
Object.keys(
|
|
207
|
+
var _useItemHighlightState = require("./useItemHighlightState");
|
|
208
|
+
Object.keys(_useItemHighlightState).forEach(function (key) {
|
|
209
209
|
if (key === "default" || key === "__esModule") return;
|
|
210
210
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
211
|
-
if (key in exports && exports[key] ===
|
|
211
|
+
if (key in exports && exports[key] === _useItemHighlightState[key]) return;
|
|
212
212
|
Object.defineProperty(exports, key, {
|
|
213
213
|
enumerable: true,
|
|
214
214
|
get: function () {
|
|
215
|
-
return
|
|
215
|
+
return _useItemHighlightState[key];
|
|
216
216
|
}
|
|
217
217
|
});
|
|
218
218
|
});
|
|
219
|
-
var
|
|
220
|
-
Object.keys(
|
|
219
|
+
var _useItemHighlightStateGetter = require("./useItemHighlightStateGetter");
|
|
220
|
+
Object.keys(_useItemHighlightStateGetter).forEach(function (key) {
|
|
221
221
|
if (key === "default" || key === "__esModule") return;
|
|
222
222
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
223
|
-
if (key in exports && exports[key] ===
|
|
223
|
+
if (key in exports && exports[key] === _useItemHighlightStateGetter[key]) return;
|
|
224
224
|
Object.defineProperty(exports, key, {
|
|
225
225
|
enumerable: true,
|
|
226
226
|
get: function () {
|
|
227
|
-
return
|
|
227
|
+
return _useItemHighlightStateGetter[key];
|
|
228
228
|
}
|
|
229
229
|
});
|
|
230
230
|
});
|
package/hooks/index.mjs
CHANGED
|
@@ -12,8 +12,8 @@ export { usePieSeries, usePieSeriesContext } from "./usePieSeries.mjs";
|
|
|
12
12
|
export * from "./useBarSeries.mjs";
|
|
13
13
|
export * from "./useLineSeries.mjs";
|
|
14
14
|
export * from "./useRadarSeries.mjs";
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
15
|
+
export * from "./useItemHighlightState.mjs";
|
|
16
|
+
export * from "./useItemHighlightStateGetter.mjs";
|
|
17
17
|
export * from "./useLegend.mjs";
|
|
18
18
|
export { useChartGradientId, useChartGradientIdObjectBound } from "./useChartGradientId.mjs";
|
|
19
19
|
export * from "./animation/index.mjs";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type SeriesItemIdentifierWithData } from "../models/index.mjs";
|
|
3
2
|
import type { UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.mjs";
|
|
4
3
|
import type { UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.mjs";
|
|
5
4
|
import type { ChartSeriesType } from "../models/seriesType/config.mjs";
|
|
6
5
|
import type { SeriesItemIdentifierWithType } from "../models/seriesType/index.mjs";
|
|
7
6
|
import type { ChartInstance } from "../internals/plugins/models/index.mjs";
|
|
8
7
|
import type { UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.mjs";
|
|
9
|
-
export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data:
|
|
8
|
+
export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data: SeriesItemIdentifierWithType<SeriesType>, skip?: boolean) => {
|
|
10
9
|
onPointerEnter?: () => void;
|
|
11
10
|
onPointerLeave?: () => void;
|
|
12
11
|
onPointerDown?: (event: React.PointerEvent) => void;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type SeriesItemIdentifierWithData } from "../models/index.js";
|
|
3
2
|
import type { UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
4
3
|
import type { UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
5
4
|
import type { ChartSeriesType } from "../models/seriesType/config.js";
|
|
6
5
|
import type { SeriesItemIdentifierWithType } from "../models/seriesType/index.js";
|
|
7
6
|
import type { ChartInstance } from "../internals/plugins/models/index.js";
|
|
8
7
|
import type { UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.js";
|
|
9
|
-
export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data:
|
|
8
|
+
export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data: SeriesItemIdentifierWithType<SeriesType>, skip?: boolean) => {
|
|
10
9
|
onPointerEnter?: () => void;
|
|
11
10
|
onPointerLeave?: () => void;
|
|
12
11
|
onPointerDown?: (event: React.PointerEvent) => void;
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import type { HighlightItemIdentifierWithType } from "../models/seriesType/index.mjs";
|
|
2
2
|
import type { ChartSeriesType } from "../models/seriesType/config.mjs";
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
* Whether the item is highlighted.
|
|
6
|
-
*/
|
|
7
|
-
isHighlighted: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Whether the item is faded.
|
|
10
|
-
*/
|
|
11
|
-
isFaded: boolean;
|
|
12
|
-
};
|
|
3
|
+
export type HighlightState = 'highlighted' | 'faded' | 'none';
|
|
4
|
+
type UseItemHighlightedReturnType = HighlightState;
|
|
13
5
|
type UseItemHighlightedParams<SeriesType extends ChartSeriesType = ChartSeriesType> = HighlightItemIdentifierWithType<SeriesType> | null;
|
|
14
6
|
/**
|
|
15
7
|
* A hook to check the highlighted state of the item.
|
|
16
8
|
* This function already calculates that an item is not faded if it is highlighted.
|
|
17
9
|
*
|
|
18
|
-
* If you need fine control over the state, use the `
|
|
10
|
+
* If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
|
|
19
11
|
*
|
|
20
12
|
* @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
|
|
21
|
-
* @returns {
|
|
13
|
+
* @returns {HighlightState} the state of the item
|
|
22
14
|
*/
|
|
23
|
-
export declare function
|
|
15
|
+
export declare function useItemHighlightState<SeriesType extends ChartSeriesType = ChartSeriesType>(item: UseItemHighlightedParams<SeriesType>): UseItemHighlightedReturnType;
|
|
24
16
|
export {};
|
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import type { HighlightItemIdentifierWithType } from "../models/seriesType/index.js";
|
|
2
2
|
import type { ChartSeriesType } from "../models/seriesType/config.js";
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
* Whether the item is highlighted.
|
|
6
|
-
*/
|
|
7
|
-
isHighlighted: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Whether the item is faded.
|
|
10
|
-
*/
|
|
11
|
-
isFaded: boolean;
|
|
12
|
-
};
|
|
3
|
+
export type HighlightState = 'highlighted' | 'faded' | 'none';
|
|
4
|
+
type UseItemHighlightedReturnType = HighlightState;
|
|
13
5
|
type UseItemHighlightedParams<SeriesType extends ChartSeriesType = ChartSeriesType> = HighlightItemIdentifierWithType<SeriesType> | null;
|
|
14
6
|
/**
|
|
15
7
|
* A hook to check the highlighted state of the item.
|
|
16
8
|
* This function already calculates that an item is not faded if it is highlighted.
|
|
17
9
|
*
|
|
18
|
-
* If you need fine control over the state, use the `
|
|
10
|
+
* If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
|
|
19
11
|
*
|
|
20
12
|
* @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
|
|
21
|
-
* @returns {
|
|
13
|
+
* @returns {HighlightState} the state of the item
|
|
22
14
|
*/
|
|
23
|
-
export declare function
|
|
15
|
+
export declare function useItemHighlightState<SeriesType extends ChartSeriesType = ChartSeriesType>(item: UseItemHighlightedParams<SeriesType>): UseItemHighlightedReturnType;
|
|
24
16
|
export {};
|
|
@@ -4,24 +4,19 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.useItemHighlightState = useItemHighlightState;
|
|
8
8
|
var _useStore = require("../internals/store/useStore");
|
|
9
9
|
var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight");
|
|
10
10
|
/**
|
|
11
11
|
* A hook to check the highlighted state of the item.
|
|
12
12
|
* This function already calculates that an item is not faded if it is highlighted.
|
|
13
13
|
*
|
|
14
|
-
* If you need fine control over the state, use the `
|
|
14
|
+
* If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
|
|
15
15
|
*
|
|
16
16
|
* @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
|
|
17
|
-
* @returns {
|
|
17
|
+
* @returns {HighlightState} the state of the item
|
|
18
18
|
*/
|
|
19
|
-
function
|
|
19
|
+
function useItemHighlightState(item) {
|
|
20
20
|
const store = (0, _useStore.useStore)();
|
|
21
|
-
|
|
22
|
-
const isFaded = store.use(_useChartHighlight.selectorChartsIsFaded, item);
|
|
23
|
-
return {
|
|
24
|
-
isHighlighted,
|
|
25
|
-
isFaded: !isHighlighted && isFaded
|
|
26
|
-
};
|
|
21
|
+
return store.use(_useChartHighlight.selectorChartsHighlightState, item);
|
|
27
22
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useStore } from "../internals/store/useStore.mjs";
|
|
4
|
+
import { selectorChartsHighlightState } from "../internals/plugins/featurePlugins/useChartHighlight/index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* A hook to check the highlighted state of the item.
|
|
7
|
+
* This function already calculates that an item is not faded if it is highlighted.
|
|
8
|
+
*
|
|
9
|
+
* If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
|
|
10
|
+
*
|
|
11
|
+
* @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
|
|
12
|
+
* @returns {HighlightState} the state of the item
|
|
13
|
+
*/
|
|
14
|
+
export function useItemHighlightState(item) {
|
|
15
|
+
const store = useStore();
|
|
16
|
+
return store.use(selectorChartsHighlightState, item);
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ChartSeriesType } from "../models/seriesType/config.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A hook to get a callback that returns the highlight state of an item.
|
|
4
|
+
*
|
|
5
|
+
* If you're interested by a single item, consider using `useItemHighlightState`.
|
|
6
|
+
*
|
|
7
|
+
* @returns {(item: HighlightItemIdentifierWithType | null) => HighlightState} callback to get the highlight state of an item.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useItemHighlightStateGetter<SeriesType extends ChartSeriesType>(): (item: import("../index.mjs").HighlightItemIdentifierWithType<import("../internals/index.mjs").ComposableChartSeriesType<keyof import("../internals/index.mjs").ChartsSeriesConfig>> | null) => import("./useItemHighlightState.mjs").HighlightState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ChartSeriesType } from "../models/seriesType/config.js";
|
|
2
|
+
/**
|
|
3
|
+
* A hook to get a callback that returns the highlight state of an item.
|
|
4
|
+
*
|
|
5
|
+
* If you're interested by a single item, consider using `useItemHighlightState`.
|
|
6
|
+
*
|
|
7
|
+
* @returns {(item: HighlightItemIdentifierWithType | null) => HighlightState} callback to get the highlight state of an item.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useItemHighlightStateGetter<SeriesType extends ChartSeriesType>(): (item: import("../index.js").HighlightItemIdentifierWithType<import("../internals/index.js").ComposableChartSeriesType<keyof import("../internals/index.js").ChartsSeriesConfig>> | null) => import("./useItemHighlightState.js").HighlightState;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useItemHighlightStateGetter = useItemHighlightStateGetter;
|
|
8
|
+
var _useStore = require("../internals/store/useStore");
|
|
9
|
+
var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors");
|
|
10
|
+
/**
|
|
11
|
+
* A hook to get a callback that returns the highlight state of an item.
|
|
12
|
+
*
|
|
13
|
+
* If you're interested by a single item, consider using `useItemHighlightState`.
|
|
14
|
+
*
|
|
15
|
+
* @returns {(item: HighlightItemIdentifierWithType | null) => HighlightState} callback to get the highlight state of an item.
|
|
16
|
+
*/
|
|
17
|
+
function useItemHighlightStateGetter() {
|
|
18
|
+
const store = (0, _useStore.useStore)();
|
|
19
|
+
const getHighlightState = store.use(_useChartHighlight.selectorChartsHighlightStateCallback);
|
|
20
|
+
return getHighlightState;
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useStore } from "../internals/store/useStore.mjs";
|
|
4
|
+
import { selectorChartsHighlightStateCallback } from "../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* A hook to get a callback that returns the highlight state of an item.
|
|
7
|
+
*
|
|
8
|
+
* If you're interested by a single item, consider using `useItemHighlightState`.
|
|
9
|
+
*
|
|
10
|
+
* @returns {(item: HighlightItemIdentifierWithType | null) => HighlightState} callback to get the highlight state of an item.
|
|
11
|
+
*/
|
|
12
|
+
export function useItemHighlightStateGetter() {
|
|
13
|
+
const store = useStore();
|
|
14
|
+
const getHighlightState = store.use(selectorChartsHighlightStateCallback);
|
|
15
|
+
return getHighlightState;
|
|
16
|
+
}
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -7,8 +7,8 @@ type ReturnedItem<OutSeriesType extends ChartSeriesType> = {
|
|
|
7
7
|
seriesId: SeriesId;
|
|
8
8
|
dataIndex: number;
|
|
9
9
|
} | null;
|
|
10
|
-
type StateParameters<
|
|
11
|
-
export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
|
|
10
|
+
type StateParameters<SeriesType extends ChartSeriesType> = Pick<ChartState<[UseChartKeyboardNavigationSignature], [], SeriesType>, 'series'>;
|
|
11
|
+
export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
12
12
|
/**
|
|
13
13
|
* The set of series types compatible with this navigation action.
|
|
14
14
|
*/
|
|
@@ -17,7 +17,7 @@ compatibleSeriesTypes: Set<OutSeriesType>,
|
|
|
17
17
|
* If true, allows cycling from the last item to the first one.
|
|
18
18
|
*/
|
|
19
19
|
allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
20
|
-
export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
|
|
20
|
+
export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
21
21
|
/**
|
|
22
22
|
* The set of series types compatible with this navigation action.
|
|
23
23
|
*/
|
|
@@ -26,12 +26,12 @@ compatibleSeriesTypes: Set<OutSeriesType>,
|
|
|
26
26
|
* If true, allows cycling from the last item to the first one.
|
|
27
27
|
*/
|
|
28
28
|
allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
29
|
-
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
|
|
29
|
+
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
30
30
|
/**
|
|
31
31
|
* The set of series types compatible with this navigation action.
|
|
32
32
|
*/
|
|
33
33
|
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
34
|
-
export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
|
|
34
|
+
export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
35
35
|
/**
|
|
36
36
|
* The set of series types compatible with this navigation action.
|
|
37
37
|
*/
|
|
@@ -7,8 +7,8 @@ type ReturnedItem<OutSeriesType extends ChartSeriesType> = {
|
|
|
7
7
|
seriesId: SeriesId;
|
|
8
8
|
dataIndex: number;
|
|
9
9
|
} | null;
|
|
10
|
-
type StateParameters<
|
|
11
|
-
export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
|
|
10
|
+
type StateParameters<SeriesType extends ChartSeriesType> = Pick<ChartState<[UseChartKeyboardNavigationSignature], [], SeriesType>, 'series'>;
|
|
11
|
+
export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
12
12
|
/**
|
|
13
13
|
* The set of series types compatible with this navigation action.
|
|
14
14
|
*/
|
|
@@ -17,7 +17,7 @@ compatibleSeriesTypes: Set<OutSeriesType>,
|
|
|
17
17
|
* If true, allows cycling from the last item to the first one.
|
|
18
18
|
*/
|
|
19
19
|
allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
20
|
-
export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
|
|
20
|
+
export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
21
21
|
/**
|
|
22
22
|
* The set of series types compatible with this navigation action.
|
|
23
23
|
*/
|
|
@@ -26,12 +26,12 @@ compatibleSeriesTypes: Set<OutSeriesType>,
|
|
|
26
26
|
* If true, allows cycling from the last item to the first one.
|
|
27
27
|
*/
|
|
28
28
|
allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
29
|
-
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
|
|
29
|
+
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
30
30
|
/**
|
|
31
31
|
* The set of series types compatible with this navigation action.
|
|
32
32
|
*/
|
|
33
33
|
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
34
|
-
export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
|
|
34
|
+
export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
35
35
|
/**
|
|
36
36
|
* The set of series types compatible with this navigation action.
|
|
37
37
|
*/
|
|
@@ -2,14 +2,14 @@ import type { ChartSeriesType } from "../models/seriesType/config.mjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
|
|
4
4
|
*/
|
|
5
|
-
export declare function createCommonKeyboardFocusHandler<
|
|
5
|
+
export declare function createCommonKeyboardFocusHandler<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = SeriesType>(outSeriesTypes: Set<SeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.mjs").FocusedItemIdentifier<TInputSeriesType> | null, state: {
|
|
6
6
|
series: {
|
|
7
7
|
defaultizedSeries: import("./plugins/corePlugins/useChartSeries/useChartSeries.types.mjs").DefaultizedSeriesGroups<TInputSeriesType>;
|
|
8
8
|
idToType: import("./index.mjs").SeriesIdToType;
|
|
9
9
|
dataset?: Readonly<import("./index.mjs").DatasetType>;
|
|
10
10
|
};
|
|
11
11
|
}) => {
|
|
12
|
-
type:
|
|
12
|
+
type: SeriesType;
|
|
13
13
|
seriesId: import("../index.mjs").SeriesId;
|
|
14
14
|
dataIndex: number;
|
|
15
15
|
} | null) | null;
|
|
@@ -2,14 +2,14 @@ import type { ChartSeriesType } from "../models/seriesType/config.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
|
|
4
4
|
*/
|
|
5
|
-
export declare function createCommonKeyboardFocusHandler<
|
|
5
|
+
export declare function createCommonKeyboardFocusHandler<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = SeriesType>(outSeriesTypes: Set<SeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.js").FocusedItemIdentifier<TInputSeriesType> | null, state: {
|
|
6
6
|
series: {
|
|
7
7
|
defaultizedSeries: import("./plugins/corePlugins/useChartSeries/useChartSeries.types.js").DefaultizedSeriesGroups<TInputSeriesType>;
|
|
8
8
|
idToType: import("./index.js").SeriesIdToType;
|
|
9
9
|
dataset?: Readonly<import("./index.js").DatasetType>;
|
|
10
10
|
};
|
|
11
11
|
}) => {
|
|
12
|
-
type:
|
|
12
|
+
type: SeriesType;
|
|
13
13
|
seriesId: import("../index.js").SeriesId;
|
|
14
14
|
dataIndex: number;
|
|
15
15
|
} | null) | null;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { SeriesId, SeriesItemIdentifierWithType } from "../models/index.mjs";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SeriesTypeWithDataIndex } from "../models/seriesType/config.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
|
|
5
5
|
* This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
|
|
6
|
+
*
|
|
7
|
+
* The generic constraint ensures this can only be used for series types whose
|
|
8
|
+
* identifier actually includes `dataIndex`. Series types with different identifier
|
|
9
|
+
* properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
|
|
6
10
|
*/
|
|
7
|
-
export declare const identifierCleanerSeriesIdDataIndex: <
|
|
8
|
-
type:
|
|
11
|
+
export declare const identifierCleanerSeriesIdDataIndex: <SeriesType extends SeriesTypeWithDataIndex>(identifier: {
|
|
12
|
+
type: SeriesType;
|
|
9
13
|
seriesId: SeriesId;
|
|
10
14
|
dataIndex?: number;
|
|
11
|
-
}) => SeriesItemIdentifierWithType<
|
|
15
|
+
}) => SeriesItemIdentifierWithType<SeriesType>;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { SeriesId, SeriesItemIdentifierWithType } from "../models/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SeriesTypeWithDataIndex } from "../models/seriesType/config.js";
|
|
3
3
|
/**
|
|
4
4
|
* Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
|
|
5
5
|
* This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
|
|
6
|
+
*
|
|
7
|
+
* The generic constraint ensures this can only be used for series types whose
|
|
8
|
+
* identifier actually includes `dataIndex`. Series types with different identifier
|
|
9
|
+
* properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
|
|
6
10
|
*/
|
|
7
|
-
export declare const identifierCleanerSeriesIdDataIndex: <
|
|
8
|
-
type:
|
|
11
|
+
export declare const identifierCleanerSeriesIdDataIndex: <SeriesType extends SeriesTypeWithDataIndex>(identifier: {
|
|
12
|
+
type: SeriesType;
|
|
9
13
|
seriesId: SeriesId;
|
|
10
14
|
dataIndex?: number;
|
|
11
|
-
}) => SeriesItemIdentifierWithType<
|
|
15
|
+
}) => SeriesItemIdentifierWithType<SeriesType>;
|
|
@@ -7,9 +7,13 @@ exports.identifierCleanerSeriesIdDataIndex = void 0;
|
|
|
7
7
|
/**
|
|
8
8
|
* Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
|
|
9
9
|
* This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
|
|
10
|
+
*
|
|
11
|
+
* The generic constraint ensures this can only be used for series types whose
|
|
12
|
+
* identifier actually includes `dataIndex`. Series types with different identifier
|
|
13
|
+
* properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
|
|
10
14
|
*/
|
|
11
15
|
const identifierCleanerSeriesIdDataIndex = identifier => {
|
|
12
|
-
// @ts-expect-error we need to trust the output type here, since
|
|
16
|
+
// @ts-expect-error we need to trust the output type here, since SeriesType is generic
|
|
13
17
|
return {
|
|
14
18
|
type: identifier.type,
|
|
15
19
|
seriesId: identifier.seriesId,
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
|
|
3
3
|
* This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
|
|
4
|
+
*
|
|
5
|
+
* The generic constraint ensures this can only be used for series types whose
|
|
6
|
+
* identifier actually includes `dataIndex`. Series types with different identifier
|
|
7
|
+
* properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
|
|
4
8
|
*/
|
|
5
9
|
export const identifierCleanerSeriesIdDataIndex = identifier => {
|
|
6
|
-
// @ts-expect-error we need to trust the output type here, since
|
|
10
|
+
// @ts-expect-error we need to trust the output type here, since SeriesType is generic
|
|
7
11
|
return {
|
|
8
12
|
type: identifier.type,
|
|
9
13
|
seriesId: identifier.seriesId,
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { SeriesId } from "../models/index.mjs";
|
|
2
|
+
import type { SeriesTypeWithDataIndex } from "../models/seriesType/config.mjs";
|
|
2
3
|
export declare const typeSerializer: (type: string) => string;
|
|
3
4
|
export declare const seriesIdSerializer: (id: SeriesId) => string;
|
|
4
5
|
export declare const dataIndexSerializer: (dataIndex?: number) => string;
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Serializes an identifier using type, seriesId, and dataIndex properties.
|
|
8
|
+
*
|
|
9
|
+
* The generic constraint ensures this can only be used for series types whose
|
|
10
|
+
* identifier actually includes `dataIndex`. Series types with different identifier
|
|
11
|
+
* properties (like heatmap's xIndex/yIndex) must provide their own serializer.
|
|
12
|
+
*/
|
|
13
|
+
export declare const identifierSerializerSeriesIdDataIndex: <SeriesType extends SeriesTypeWithDataIndex>(identifier: {
|
|
14
|
+
type: SeriesType;
|
|
7
15
|
seriesId: SeriesId;
|
|
8
16
|
dataIndex?: number;
|
|
9
17
|
}) => string;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { SeriesId } from "../models/index.js";
|
|
2
|
+
import type { SeriesTypeWithDataIndex } from "../models/seriesType/config.js";
|
|
2
3
|
export declare const typeSerializer: (type: string) => string;
|
|
3
4
|
export declare const seriesIdSerializer: (id: SeriesId) => string;
|
|
4
5
|
export declare const dataIndexSerializer: (dataIndex?: number) => string;
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Serializes an identifier using type, seriesId, and dataIndex properties.
|
|
8
|
+
*
|
|
9
|
+
* The generic constraint ensures this can only be used for series types whose
|
|
10
|
+
* identifier actually includes `dataIndex`. Series types with different identifier
|
|
11
|
+
* properties (like heatmap's xIndex/yIndex) must provide their own serializer.
|
|
12
|
+
*/
|
|
13
|
+
export declare const identifierSerializerSeriesIdDataIndex: <SeriesType extends SeriesTypeWithDataIndex>(identifier: {
|
|
14
|
+
type: SeriesType;
|
|
7
15
|
seriesId: SeriesId;
|
|
8
16
|
dataIndex?: number;
|
|
9
17
|
}) => string;
|
|
@@ -9,6 +9,14 @@ exports.typeSerializer = typeSerializer;
|
|
|
9
9
|
const seriesIdSerializer = id => `Series(${id})`;
|
|
10
10
|
exports.seriesIdSerializer = seriesIdSerializer;
|
|
11
11
|
const dataIndexSerializer = dataIndex => dataIndex === undefined ? '' : `Index(${dataIndex})`;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Serializes an identifier using type, seriesId, and dataIndex properties.
|
|
15
|
+
*
|
|
16
|
+
* The generic constraint ensures this can only be used for series types whose
|
|
17
|
+
* identifier actually includes `dataIndex`. Series types with different identifier
|
|
18
|
+
* properties (like heatmap's xIndex/yIndex) must provide their own serializer.
|
|
19
|
+
*/
|
|
12
20
|
exports.dataIndexSerializer = dataIndexSerializer;
|
|
13
21
|
const identifierSerializerSeriesIdDataIndex = identifier => {
|
|
14
22
|
return `${typeSerializer(identifier.type)}${seriesIdSerializer(identifier.seriesId)}${dataIndexSerializer(identifier.dataIndex)}`;
|