@mui/x-charts 9.13.0 → 9.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/AnimatedBarElement.mjs +2 -2
- package/BarChart/BarChart.mjs +1 -1
- package/BarChart/BarElement.mjs +2 -2
- package/BarChart/BarLabel/BarLabel.mjs +2 -2
- package/BarChart/BarLabel/BarLabelItem.mjs +2 -2
- package/BarChart/BarLabel/BarLabelPlot.mjs +2 -2
- package/BarChart/BarPlot.mjs +2 -2
- package/BarChart/BatchBarPlot/BarGroup.mjs +2 -2
- package/BarChart/FocusedBar.mjs +1 -1
- package/BarChart/IndividualBarPlot.mjs +2 -2
- package/BarChart/checkBarChartScaleErrors.js +1 -1
- package/BarChart/checkBarChartScaleErrors.mjs +2 -2
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.mjs +1 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.mjs +1 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.js +1 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.mjs +1 -1
- package/BarChart/useBarChartProps.mjs +2 -2
- package/BarChart/useBarPlotData.mjs +1 -1
- package/CHANGELOG.md +325 -0
- package/ChartsAxisHighlight/ChartsAxisHighlightPath.mjs +1 -1
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.mjs +1 -1
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.mjs +1 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.mjs +1 -1
- package/ChartsClipPath/ChartsClipPath.mjs +1 -1
- package/ChartsContainer/ChartsContainer.mjs +1 -1
- package/ChartsContainer/useChartsContainerProps.mjs +2 -2
- package/ChartsDataProvider/ChartsDataProvider.mjs +1 -1
- package/ChartsDataProvider/useChartsDataProviderProps.mjs +2 -2
- package/ChartsGrid/ChartsGrid.mjs +2 -2
- package/ChartsLabel/ChartsLabel.mjs +2 -2
- package/ChartsLabel/ChartsLabelGradient.mjs +2 -2
- package/ChartsLabel/ChartsLabelMark.mjs +2 -2
- package/ChartsLayerContainer/ChartsLayerContainer.js +1 -1
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +4 -4
- package/ChartsLegend/ChartsLegend.mjs +2 -2
- package/ChartsLegend/ContinuousColorLegend.mjs +2 -2
- package/ChartsLegend/PiecewiseColorLegend.mjs +2 -2
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.mjs +2 -2
- package/ChartsOverlay/ChartsLoadingOverlay.mjs +1 -1
- package/ChartsOverlay/ChartsNoDataOverlay.mjs +1 -1
- package/ChartsOverlay/ChartsOverlay.mjs +1 -1
- package/ChartsOverlay/common.mjs +1 -1
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlightPath.mjs +1 -1
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +1 -1
- package/ChartsRadialDataProvider/useChartsRadialDataProviderProps.mjs +2 -2
- package/ChartsRadialGrid/ChartsRadialGrid.mjs +2 -2
- package/ChartsRadiusAxis/ChartsRadiusAxis.mjs +1 -1
- package/ChartsReferenceLine/ChartsReferenceLine.mjs +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.js +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.mjs +3 -3
- package/ChartsReferenceLine/ChartsYReferenceLine.js +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.mjs +3 -3
- package/ChartsReferenceLine/common.mjs +1 -1
- package/ChartsRotationAxis/ChartsRotationAxis.mjs +1 -1
- package/ChartsSurface/ChartsSurface.mjs +2 -2
- package/ChartsSvgLayer/ChartsSvgLayer.mjs +2 -2
- package/ChartsText/ChartsText.mjs +2 -2
- package/ChartsTooltip/ChartsTooltip.mjs +2 -2
- package/ChartsTooltip/ChartsTooltipContainer.js +2 -2
- package/ChartsTooltip/ChartsTooltipContainer.mjs +5 -5
- package/ChartsWrapper/ChartsWrapper.mjs +2 -2
- package/ChartsXAxis/ChartsGroupedXAxisTicks.mjs +1 -1
- package/ChartsXAxis/ChartsSingleXAxisTicks.mjs +1 -1
- package/ChartsXAxis/ChartsXAxis.mjs +1 -1
- package/ChartsXAxis/ChartsXAxisImpl.js +2 -1
- package/ChartsXAxis/ChartsXAxisImpl.mjs +4 -3
- package/ChartsXAxis/useAxisTicksProps.d.mts +17 -17
- package/ChartsXAxis/useAxisTicksProps.d.ts +17 -17
- package/ChartsXAxis/useAxisTicksProps.js +2 -1
- package/ChartsXAxis/useAxisTicksProps.mjs +4 -3
- package/ChartsYAxis/ChartsGroupedYAxisTicks.mjs +1 -1
- package/ChartsYAxis/ChartsSingleYAxisTicks.mjs +1 -1
- package/ChartsYAxis/ChartsYAxis.mjs +1 -1
- package/ChartsYAxis/ChartsYAxisImpl.js +2 -1
- package/ChartsYAxis/ChartsYAxisImpl.mjs +4 -3
- package/ChartsYAxis/useAxisTicksProps.d.mts +17 -17
- package/ChartsYAxis/useAxisTicksProps.d.ts +17 -17
- package/ChartsYAxis/useAxisTicksProps.js +2 -1
- package/ChartsYAxis/useAxisTicksProps.mjs +4 -3
- package/Gauge/Gauge.mjs +2 -2
- package/Gauge/GaugeContainer.mjs +2 -2
- package/Gauge/GaugeReferenceArc.mjs +2 -2
- package/Gauge/GaugeValueArc.mjs +2 -2
- package/Gauge/GaugeValueText.mjs +2 -2
- package/LineChart/AnimatedArea.mjs +2 -2
- package/LineChart/AnimatedLine.mjs +2 -2
- package/LineChart/AreaElement.mjs +2 -2
- package/LineChart/AreaPlot.mjs +2 -2
- package/LineChart/CircleMarkElement.mjs +2 -2
- package/LineChart/LineChart.mjs +1 -1
- package/LineChart/LineElement.mjs +2 -2
- package/LineChart/LineHighlightElement.d.mts +3 -3
- package/LineChart/LineHighlightElement.d.ts +3 -3
- package/LineChart/LineHighlightElement.js +2 -2
- package/LineChart/LineHighlightElement.mjs +4 -4
- package/LineChart/LineHighlightPlot.mjs +2 -2
- package/LineChart/LinePlot.mjs +2 -2
- package/LineChart/MarkElement.mjs +2 -2
- package/LineChart/MarkPlot.mjs +2 -2
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.mjs +1 -1
- package/LineChart/seriesConfig/tooltipPosition.js +1 -1
- package/LineChart/seriesConfig/tooltipPosition.mjs +1 -1
- package/LineChart/useLineChartProps.mjs +2 -2
- package/LineChart/useLinePlotData.js +1 -1
- package/LineChart/useLinePlotData.mjs +2 -2
- package/PieChart/FocusedPieArc.mjs +2 -2
- package/PieChart/PieArc.mjs +2 -2
- package/PieChart/PieArcLabel.mjs +2 -2
- package/PieChart/PieArcLabelPlot.mjs +2 -2
- package/PieChart/PieArcPlot.mjs +2 -2
- package/PieChart/PieChart.mjs +2 -2
- package/PieChart/dataTransform/getModifiedArcProperties.mjs +1 -1
- package/PieChart/dataTransform/useTransformData.mjs +1 -1
- package/PieChart/seriesConfig/getSeriesWithDefaultValues.mjs +1 -1
- package/PieChart/seriesConfig/seriesProcessor.mjs +1 -1
- package/PieChart/seriesConfig/tooltip.mjs +1 -1
- package/PieChart/seriesConfig/tooltipPosition.js +1 -1
- package/PieChart/seriesConfig/tooltipPosition.mjs +1 -1
- package/RadarChart/FocusedRadarMark.mjs +1 -1
- package/RadarChart/RadarAxis/RadarAxis.mjs +1 -1
- package/RadarChart/RadarAxis/RadarAxis.utils.d.mts +1 -1
- package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.js +1 -1
- package/RadarChart/RadarAxis/useRadarAxis.mjs +1 -1
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.mjs +1 -1
- package/RadarChart/RadarChart.mjs +1 -1
- package/RadarChart/RadarDataProvider/RadarDataProvider.mjs +2 -2
- package/RadarChart/RadarMetricLabels/RadarMetricLabels.js +2 -1
- package/RadarChart/RadarMetricLabels/RadarMetricLabels.mjs +3 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.mjs +1 -1
- package/RadarChart/seriesConfig/getSeriesWithDefaultValues.mjs +1 -1
- package/RadarChart/seriesConfig/seriesProcessor.mjs +1 -1
- package/RadarChart/seriesConfig/tooltipPosition.js +1 -1
- package/RadarChart/seriesConfig/tooltipPosition.mjs +1 -1
- package/RadarChart/useRadarChartProps.mjs +1 -1
- package/ScatterChart/FocusedScatterMark.mjs +2 -2
- package/ScatterChart/HighlightedScatterMark.mjs +2 -2
- package/ScatterChart/Scatter.mjs +2 -2
- package/ScatterChart/ScatterChart.mjs +1 -1
- package/ScatterChart/ScatterMarker.mjs +2 -2
- package/ScatterChart/ScatterPlot.mjs +1 -1
- package/ScatterChart/async/ScatterAsyncBatch.mjs +2 -2
- package/ScatterChart/async/scatterRenderData.selectors.js +1 -1
- package/ScatterChart/async/scatterRenderData.selectors.mjs +1 -1
- package/ScatterChart/seriesConfig/getSeriesWithDefaultValues.mjs +1 -1
- package/ScatterChart/seriesConfig/seriesProcessor.mjs +1 -1
- package/ScatterChart/seriesConfig/tooltipPosition.js +1 -1
- package/ScatterChart/seriesConfig/tooltipPosition.mjs +1 -1
- package/ScatterChart/useScatterChartProps.mjs +2 -2
- package/SparkLineChart/SparkLineChart.js +21 -21
- package/SparkLineChart/SparkLineChart.mjs +23 -23
- package/Toolbar/Toolbar.mjs +2 -2
- package/Toolbar/ToolbarButton.mjs +2 -2
- package/context/ChartsProvider/ChartsProvider.types.d.mts +1 -1
- package/context/ChartsProvider/ChartsProvider.types.d.ts +1 -1
- package/context/ChartsSlotsContext.mjs +1 -1
- package/hooks/animation/useAnimate.mjs +1 -1
- package/hooks/useAxisCoordinates.mjs +1 -1
- package/hooks/useAxisTicks.mjs +1 -1
- package/hooks/useIsItemFocusedGetter.js +1 -1
- package/hooks/useIsItemFocusedGetter.mjs +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/Flatbush.js +9 -0
- package/internals/Flatbush.mjs +9 -0
- package/internals/commonNextFocusItem.d.mts +46 -0
- package/internals/commonNextFocusItem.d.ts +46 -0
- package/internals/commonNextFocusItem.js +241 -0
- package/internals/commonNextFocusItem.mjs +235 -0
- package/internals/components/AxisSharedComponents.mjs +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +31 -8
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +32 -9
- package/internals/components/ChartsAccessibilityProxy/useZoomAnnouncement.d.mts +9 -0
- package/internals/components/ChartsAccessibilityProxy/useZoomAnnouncement.d.ts +9 -0
- package/internals/components/ChartsAccessibilityProxy/useZoomAnnouncement.js +67 -0
- package/internals/components/ChartsAccessibilityProxy/useZoomAnnouncement.mjs +62 -0
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.mjs +1 -1
- package/internals/consumeSlots.mjs +2 -2
- package/internals/consumeThemeProps.js +1 -2
- package/internals/consumeThemeProps.mjs +1 -1
- package/internals/createCommonKeyboardFocusHandler.js +16 -0
- package/internals/createCommonKeyboardFocusHandler.mjs +17 -1
- package/internals/defaultizeMargin.mjs +1 -1
- package/internals/geometry.js +1 -1
- package/internals/geometry.mjs +1 -1
- package/internals/getGroupingConfig.mjs +1 -1
- package/internals/getInlineTypographyStyle.d.mts +9 -0
- package/internals/getInlineTypographyStyle.d.ts +9 -0
- package/internals/getInlineTypographyStyle.js +22 -0
- package/internals/getInlineTypographyStyle.mjs +16 -0
- package/internals/getLineLikeTooltip.mjs +1 -1
- package/internals/getWordsByLines.mjs +1 -1
- package/internals/material/index.mjs +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.mjs +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.js +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.mjs +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.mjs +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.mjs +1 -1
- package/internals/plugins/corePlugins/useChartId/useChartId.mjs +1 -1
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.js +1 -1
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.mjs +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.mjs +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.mjs +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.js +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.mjs +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.mjs +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.js +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.mjs +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +10 -10
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +10 -10
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +10 -10
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +10 -10
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +1 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +1 -1
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +23 -9
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +24 -10
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.mts +3 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +3 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +4 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +3 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +12 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +12 -0
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +3 -3
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +3 -3
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.js +1 -1
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.mjs +2 -2
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.mjs +1 -1
- package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useProgressiveRendering/useProgressiveRendering.selectors.mjs +1 -1
- package/internals/plugins/models/plugin.d.mts +1 -1
- package/internals/plugins/models/plugin.d.ts +1 -1
- package/internals/plugins/utils/useLazySelectorEffect.d.mts +1 -1
- package/internals/plugins/utils/useLazySelectorEffect.d.ts +1 -1
- package/internals/processLineLikeSeries.mjs +1 -1
- package/internals/seriesSelectorOfType.js +2 -2
- package/internals/seriesSelectorOfType.mjs +2 -2
- package/internals/store/extractPluginParamsFromProps.mjs +1 -1
- package/internals/store/useCharts.d.mts +1 -1
- package/internals/store/useCharts.d.ts +1 -1
- package/internals/store/useCharts.js +1 -1
- package/internals/store/useCharts.mjs +1 -1
- package/internals/store/useStore.d.mts +1 -1
- package/internals/store/useStore.d.ts +1 -1
- package/internals/ts-generic.d.mts +1 -1
- package/internals/ts-generic.d.ts +1 -1
- package/locales/elGR.d.mts +6 -1
- package/locales/elGR.d.ts +6 -1
- package/locales/elGR.js +8 -0
- package/locales/elGR.mjs +8 -0
- package/locales/enUS.d.mts +6 -1
- package/locales/enUS.d.ts +6 -1
- package/locales/enUS.js +8 -0
- package/locales/enUS.mjs +8 -0
- package/locales/frFR.d.mts +6 -1
- package/locales/frFR.d.ts +6 -1
- package/locales/frFR.js +8 -0
- package/locales/frFR.mjs +8 -0
- package/locales/nbNO.d.mts +6 -1
- package/locales/nbNO.d.ts +6 -1
- package/locales/nbNO.js +8 -0
- package/locales/nbNO.mjs +8 -0
- package/locales/ptBR.d.mts +6 -1
- package/locales/ptBR.d.ts +6 -1
- package/locales/ptBR.js +8 -0
- package/locales/ptBR.mjs +8 -0
- package/locales/ptPT.d.mts +6 -1
- package/locales/ptPT.d.ts +6 -1
- package/locales/ptPT.js +8 -0
- package/locales/ptPT.mjs +8 -0
- package/locales/svSE.d.mts +6 -1
- package/locales/svSE.d.ts +6 -1
- package/locales/svSE.js +8 -0
- package/locales/svSE.mjs +8 -0
- package/locales/utils/chartsLocaleTextApi.d.mts +15 -1
- package/locales/utils/chartsLocaleTextApi.d.ts +15 -1
- package/locales/utils/getChartsLocalization.d.mts +6 -1
- package/locales/utils/getChartsLocalization.d.ts +6 -1
- package/locales/utils/getChartsLocalization.mjs +1 -1
- package/package.json +9 -8
- package/tests/web-components.js +1 -0
- package/tests/web-components.mjs +1 -0
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.createGetFirstIndexFocusedItem = createGetFirstIndexFocusedItem;
|
|
7
|
+
exports.createGetFirstSeriesFirstIndexFocusedItem = createGetFirstSeriesFirstIndexFocusedItem;
|
|
8
|
+
exports.createGetFirstSeriesFocusedItem = createGetFirstSeriesFocusedItem;
|
|
9
|
+
exports.createGetLastIndexFocusedItem = createGetLastIndexFocusedItem;
|
|
10
|
+
exports.createGetLastSeriesFocusedItem = createGetLastSeriesFocusedItem;
|
|
11
|
+
exports.createGetLastSeriesLastIndexFocusedItem = createGetLastSeriesLastIndexFocusedItem;
|
|
6
12
|
exports.createGetNextIndexFocusedItem = createGetNextIndexFocusedItem;
|
|
7
13
|
exports.createGetNextSeriesFocusedItem = createGetNextSeriesFocusedItem;
|
|
8
14
|
exports.createGetPreviousIndexFocusedItem = createGetPreviousIndexFocusedItem;
|
|
9
15
|
exports.createGetPreviousSeriesFocusedItem = createGetPreviousSeriesFocusedItem;
|
|
10
16
|
var _getPreviousNonEmptySeries = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries");
|
|
17
|
+
var _getNonEmptySeriesArray = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray");
|
|
11
18
|
var _getMaxSeriesLength = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength");
|
|
12
19
|
var _getNextNonEmptySeries = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries");
|
|
13
20
|
var _findVisibleDataIndex = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex");
|
|
@@ -125,6 +132,88 @@ useCurrentSeriesMaxLength = true) {
|
|
|
125
132
|
};
|
|
126
133
|
};
|
|
127
134
|
}
|
|
135
|
+
function createGetFirstIndexFocusedItem(
|
|
136
|
+
/**
|
|
137
|
+
* The set of series types compatible with this navigation action.
|
|
138
|
+
*/
|
|
139
|
+
compatibleSeriesTypes,
|
|
140
|
+
/**
|
|
141
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
142
|
+
*/
|
|
143
|
+
useCurrentSeriesMaxLength = true) {
|
|
144
|
+
return function getFirstIndexFocusedItem(currentItem, state) {
|
|
145
|
+
const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
|
|
146
|
+
let seriesId = currentItem?.seriesId;
|
|
147
|
+
let type = currentItem?.type;
|
|
148
|
+
if (!type || seriesId == null || !(0, _seriesHasData.seriesHasData)(processedSeries, type, seriesId) || isSeriesHidden(processedSeries, type, seriesId)) {
|
|
149
|
+
const nextSeries = (0, _getNextNonEmptySeries.getNextNonEmptySeries)(processedSeries, compatibleSeriesTypes, type, seriesId);
|
|
150
|
+
if (nextSeries === null) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
type = nextSeries.type;
|
|
154
|
+
seriesId = nextSeries.seriesId;
|
|
155
|
+
}
|
|
156
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : (0, _getMaxSeriesLength.getMaxSeriesLength)(processedSeries, compatibleSeriesTypes);
|
|
157
|
+
const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
|
|
158
|
+
processedSeries,
|
|
159
|
+
type,
|
|
160
|
+
seriesId,
|
|
161
|
+
startIndex: 0,
|
|
162
|
+
dataLength: maxLength,
|
|
163
|
+
direction: 1,
|
|
164
|
+
allowCycles: false
|
|
165
|
+
});
|
|
166
|
+
if (visibleDataIndex === null) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
type: type,
|
|
171
|
+
seriesId,
|
|
172
|
+
dataIndex: visibleDataIndex
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function createGetLastIndexFocusedItem(
|
|
177
|
+
/**
|
|
178
|
+
* The set of series types compatible with this navigation action.
|
|
179
|
+
*/
|
|
180
|
+
compatibleSeriesTypes,
|
|
181
|
+
/**
|
|
182
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
183
|
+
*/
|
|
184
|
+
useCurrentSeriesMaxLength = true) {
|
|
185
|
+
return function getLastIndexFocusedItem(currentItem, state) {
|
|
186
|
+
const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
|
|
187
|
+
let seriesId = currentItem?.seriesId;
|
|
188
|
+
let type = currentItem?.type;
|
|
189
|
+
if (!type || seriesId == null || !(0, _seriesHasData.seriesHasData)(processedSeries, type, seriesId) || isSeriesHidden(processedSeries, type, seriesId)) {
|
|
190
|
+
const previousSeries = (0, _getPreviousNonEmptySeries.getPreviousNonEmptySeries)(processedSeries, compatibleSeriesTypes, type, seriesId);
|
|
191
|
+
if (previousSeries === null) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
type = previousSeries.type;
|
|
195
|
+
seriesId = previousSeries.seriesId;
|
|
196
|
+
}
|
|
197
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : (0, _getMaxSeriesLength.getMaxSeriesLength)(processedSeries, compatibleSeriesTypes);
|
|
198
|
+
const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
|
|
199
|
+
processedSeries,
|
|
200
|
+
type,
|
|
201
|
+
seriesId,
|
|
202
|
+
startIndex: maxLength - 1,
|
|
203
|
+
dataLength: maxLength,
|
|
204
|
+
direction: -1,
|
|
205
|
+
allowCycles: false
|
|
206
|
+
});
|
|
207
|
+
if (visibleDataIndex === null) {
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
type: type,
|
|
212
|
+
seriesId,
|
|
213
|
+
dataIndex: visibleDataIndex
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
}
|
|
128
217
|
function createGetNextSeriesFocusedItem(
|
|
129
218
|
/**
|
|
130
219
|
* The set of series types compatible with this navigation action.
|
|
@@ -196,4 +285,156 @@ compatibleSeriesTypes) {
|
|
|
196
285
|
dataIndex: visibleDataIndex
|
|
197
286
|
};
|
|
198
287
|
};
|
|
288
|
+
}
|
|
289
|
+
function createGetFirstSeriesFirstIndexFocusedItem(
|
|
290
|
+
/**
|
|
291
|
+
* The set of series types compatible with this navigation action.
|
|
292
|
+
*/
|
|
293
|
+
compatibleSeriesTypes,
|
|
294
|
+
/**
|
|
295
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
296
|
+
*/
|
|
297
|
+
useCurrentSeriesMaxLength = true) {
|
|
298
|
+
return function getFirstSeriesFirstIndexFocusedItem(_currentItem, state) {
|
|
299
|
+
const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
|
|
300
|
+
const firstSeries = (0, _getNonEmptySeriesArray.getNonEmptySeriesArray)(processedSeries, compatibleSeriesTypes)[0];
|
|
301
|
+
if (firstSeries === undefined) {
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
const {
|
|
305
|
+
type,
|
|
306
|
+
seriesId
|
|
307
|
+
} = firstSeries;
|
|
308
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : (0, _getMaxSeriesLength.getMaxSeriesLength)(processedSeries, compatibleSeriesTypes);
|
|
309
|
+
const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
|
|
310
|
+
processedSeries,
|
|
311
|
+
type,
|
|
312
|
+
seriesId,
|
|
313
|
+
startIndex: 0,
|
|
314
|
+
dataLength: maxLength,
|
|
315
|
+
direction: 1,
|
|
316
|
+
allowCycles: false
|
|
317
|
+
});
|
|
318
|
+
if (visibleDataIndex === null) {
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
return {
|
|
322
|
+
type,
|
|
323
|
+
seriesId,
|
|
324
|
+
dataIndex: visibleDataIndex
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
function createGetLastSeriesLastIndexFocusedItem(
|
|
329
|
+
/**
|
|
330
|
+
* The set of series types compatible with this navigation action.
|
|
331
|
+
*/
|
|
332
|
+
compatibleSeriesTypes,
|
|
333
|
+
/**
|
|
334
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
335
|
+
*/
|
|
336
|
+
useCurrentSeriesMaxLength = true) {
|
|
337
|
+
return function getLastSeriesLastIndexFocusedItem(_currentItem, state) {
|
|
338
|
+
const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
|
|
339
|
+
const nonEmptySeries = (0, _getNonEmptySeriesArray.getNonEmptySeriesArray)(processedSeries, compatibleSeriesTypes);
|
|
340
|
+
const lastSeries = nonEmptySeries[nonEmptySeries.length - 1];
|
|
341
|
+
if (lastSeries === undefined) {
|
|
342
|
+
return null;
|
|
343
|
+
}
|
|
344
|
+
const {
|
|
345
|
+
type,
|
|
346
|
+
seriesId
|
|
347
|
+
} = lastSeries;
|
|
348
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : (0, _getMaxSeriesLength.getMaxSeriesLength)(processedSeries, compatibleSeriesTypes);
|
|
349
|
+
const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
|
|
350
|
+
processedSeries,
|
|
351
|
+
type,
|
|
352
|
+
seriesId,
|
|
353
|
+
startIndex: maxLength - 1,
|
|
354
|
+
dataLength: maxLength,
|
|
355
|
+
direction: -1,
|
|
356
|
+
allowCycles: false
|
|
357
|
+
});
|
|
358
|
+
if (visibleDataIndex === null) {
|
|
359
|
+
return null;
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
type,
|
|
363
|
+
seriesId,
|
|
364
|
+
dataIndex: visibleDataIndex
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
function createGetFirstSeriesFocusedItem(
|
|
369
|
+
/**
|
|
370
|
+
* The set of series types compatible with this navigation action.
|
|
371
|
+
*/
|
|
372
|
+
compatibleSeriesTypes) {
|
|
373
|
+
return function getFirstSeriesFocusedItem(currentItem, state) {
|
|
374
|
+
const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
|
|
375
|
+
const firstSeries = (0, _getNonEmptySeriesArray.getNonEmptySeriesArray)(processedSeries, compatibleSeriesTypes)[0];
|
|
376
|
+
if (firstSeries === undefined) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
const {
|
|
380
|
+
type,
|
|
381
|
+
seriesId
|
|
382
|
+
} = firstSeries;
|
|
383
|
+
const data = processedSeries[type].series[seriesId].data;
|
|
384
|
+
const startIndex = currentItem?.dataIndex == null ? 0 : Math.min(currentItem.dataIndex, data.length - 1);
|
|
385
|
+
const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
|
|
386
|
+
processedSeries,
|
|
387
|
+
type,
|
|
388
|
+
seriesId,
|
|
389
|
+
startIndex,
|
|
390
|
+
dataLength: data.length,
|
|
391
|
+
direction: 1,
|
|
392
|
+
allowCycles: true
|
|
393
|
+
});
|
|
394
|
+
if (visibleDataIndex === null) {
|
|
395
|
+
return null;
|
|
396
|
+
}
|
|
397
|
+
return {
|
|
398
|
+
type,
|
|
399
|
+
seriesId,
|
|
400
|
+
dataIndex: visibleDataIndex
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
function createGetLastSeriesFocusedItem(
|
|
405
|
+
/**
|
|
406
|
+
* The set of series types compatible with this navigation action.
|
|
407
|
+
*/
|
|
408
|
+
compatibleSeriesTypes) {
|
|
409
|
+
return function getLastSeriesFocusedItem(currentItem, state) {
|
|
410
|
+
const processedSeries = (0, _useChartSeries.selectorChartSeriesProcessed)(state);
|
|
411
|
+
const nonEmptySeries = (0, _getNonEmptySeriesArray.getNonEmptySeriesArray)(processedSeries, compatibleSeriesTypes);
|
|
412
|
+
const lastSeries = nonEmptySeries[nonEmptySeries.length - 1];
|
|
413
|
+
if (lastSeries === undefined) {
|
|
414
|
+
return null;
|
|
415
|
+
}
|
|
416
|
+
const {
|
|
417
|
+
type,
|
|
418
|
+
seriesId
|
|
419
|
+
} = lastSeries;
|
|
420
|
+
const data = processedSeries[type].series[seriesId].data;
|
|
421
|
+
const startIndex = currentItem?.dataIndex == null ? data.length - 1 : Math.min(currentItem.dataIndex, data.length - 1);
|
|
422
|
+
const visibleDataIndex = (0, _findVisibleDataIndex.findVisibleDataIndex)({
|
|
423
|
+
processedSeries,
|
|
424
|
+
type,
|
|
425
|
+
seriesId,
|
|
426
|
+
startIndex,
|
|
427
|
+
dataLength: data.length,
|
|
428
|
+
direction: -1,
|
|
429
|
+
allowCycles: true
|
|
430
|
+
});
|
|
431
|
+
if (visibleDataIndex === null) {
|
|
432
|
+
return null;
|
|
433
|
+
}
|
|
434
|
+
return {
|
|
435
|
+
type,
|
|
436
|
+
seriesId,
|
|
437
|
+
dataIndex: visibleDataIndex
|
|
438
|
+
};
|
|
439
|
+
};
|
|
199
440
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getPreviousNonEmptySeries } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.mjs";
|
|
2
|
+
import { getNonEmptySeriesArray } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.mjs";
|
|
2
3
|
import { getMaxSeriesLength } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.mjs";
|
|
3
4
|
import { getNextNonEmptySeries } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.mjs";
|
|
4
5
|
import { findVisibleDataIndex } from "./plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.mjs";
|
|
@@ -117,6 +118,88 @@ useCurrentSeriesMaxLength = true) {
|
|
|
117
118
|
};
|
|
118
119
|
};
|
|
119
120
|
}
|
|
121
|
+
export function createGetFirstIndexFocusedItem(
|
|
122
|
+
/**
|
|
123
|
+
* The set of series types compatible with this navigation action.
|
|
124
|
+
*/
|
|
125
|
+
compatibleSeriesTypes,
|
|
126
|
+
/**
|
|
127
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
128
|
+
*/
|
|
129
|
+
useCurrentSeriesMaxLength = true) {
|
|
130
|
+
return function getFirstIndexFocusedItem(currentItem, state) {
|
|
131
|
+
const processedSeries = selectorChartSeriesProcessed(state);
|
|
132
|
+
let seriesId = currentItem?.seriesId;
|
|
133
|
+
let type = currentItem?.type;
|
|
134
|
+
if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId) || isSeriesHidden(processedSeries, type, seriesId)) {
|
|
135
|
+
const nextSeries = getNextNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);
|
|
136
|
+
if (nextSeries === null) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
type = nextSeries.type;
|
|
140
|
+
seriesId = nextSeries.seriesId;
|
|
141
|
+
}
|
|
142
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : getMaxSeriesLength(processedSeries, compatibleSeriesTypes);
|
|
143
|
+
const visibleDataIndex = findVisibleDataIndex({
|
|
144
|
+
processedSeries,
|
|
145
|
+
type,
|
|
146
|
+
seriesId,
|
|
147
|
+
startIndex: 0,
|
|
148
|
+
dataLength: maxLength,
|
|
149
|
+
direction: 1,
|
|
150
|
+
allowCycles: false
|
|
151
|
+
});
|
|
152
|
+
if (visibleDataIndex === null) {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
type: type,
|
|
157
|
+
seriesId,
|
|
158
|
+
dataIndex: visibleDataIndex
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
export function createGetLastIndexFocusedItem(
|
|
163
|
+
/**
|
|
164
|
+
* The set of series types compatible with this navigation action.
|
|
165
|
+
*/
|
|
166
|
+
compatibleSeriesTypes,
|
|
167
|
+
/**
|
|
168
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
169
|
+
*/
|
|
170
|
+
useCurrentSeriesMaxLength = true) {
|
|
171
|
+
return function getLastIndexFocusedItem(currentItem, state) {
|
|
172
|
+
const processedSeries = selectorChartSeriesProcessed(state);
|
|
173
|
+
let seriesId = currentItem?.seriesId;
|
|
174
|
+
let type = currentItem?.type;
|
|
175
|
+
if (!type || seriesId == null || !seriesHasData(processedSeries, type, seriesId) || isSeriesHidden(processedSeries, type, seriesId)) {
|
|
176
|
+
const previousSeries = getPreviousNonEmptySeries(processedSeries, compatibleSeriesTypes, type, seriesId);
|
|
177
|
+
if (previousSeries === null) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
type = previousSeries.type;
|
|
181
|
+
seriesId = previousSeries.seriesId;
|
|
182
|
+
}
|
|
183
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : getMaxSeriesLength(processedSeries, compatibleSeriesTypes);
|
|
184
|
+
const visibleDataIndex = findVisibleDataIndex({
|
|
185
|
+
processedSeries,
|
|
186
|
+
type,
|
|
187
|
+
seriesId,
|
|
188
|
+
startIndex: maxLength - 1,
|
|
189
|
+
dataLength: maxLength,
|
|
190
|
+
direction: -1,
|
|
191
|
+
allowCycles: false
|
|
192
|
+
});
|
|
193
|
+
if (visibleDataIndex === null) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
type: type,
|
|
198
|
+
seriesId,
|
|
199
|
+
dataIndex: visibleDataIndex
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
}
|
|
120
203
|
export function createGetNextSeriesFocusedItem(
|
|
121
204
|
/**
|
|
122
205
|
* The set of series types compatible with this navigation action.
|
|
@@ -188,4 +271,156 @@ compatibleSeriesTypes) {
|
|
|
188
271
|
dataIndex: visibleDataIndex
|
|
189
272
|
};
|
|
190
273
|
};
|
|
274
|
+
}
|
|
275
|
+
export function createGetFirstSeriesFirstIndexFocusedItem(
|
|
276
|
+
/**
|
|
277
|
+
* The set of series types compatible with this navigation action.
|
|
278
|
+
*/
|
|
279
|
+
compatibleSeriesTypes,
|
|
280
|
+
/**
|
|
281
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
282
|
+
*/
|
|
283
|
+
useCurrentSeriesMaxLength = true) {
|
|
284
|
+
return function getFirstSeriesFirstIndexFocusedItem(_currentItem, state) {
|
|
285
|
+
const processedSeries = selectorChartSeriesProcessed(state);
|
|
286
|
+
const firstSeries = getNonEmptySeriesArray(processedSeries, compatibleSeriesTypes)[0];
|
|
287
|
+
if (firstSeries === undefined) {
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
const {
|
|
291
|
+
type,
|
|
292
|
+
seriesId
|
|
293
|
+
} = firstSeries;
|
|
294
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : getMaxSeriesLength(processedSeries, compatibleSeriesTypes);
|
|
295
|
+
const visibleDataIndex = findVisibleDataIndex({
|
|
296
|
+
processedSeries,
|
|
297
|
+
type,
|
|
298
|
+
seriesId,
|
|
299
|
+
startIndex: 0,
|
|
300
|
+
dataLength: maxLength,
|
|
301
|
+
direction: 1,
|
|
302
|
+
allowCycles: false
|
|
303
|
+
});
|
|
304
|
+
if (visibleDataIndex === null) {
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
return {
|
|
308
|
+
type,
|
|
309
|
+
seriesId,
|
|
310
|
+
dataIndex: visibleDataIndex
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
export function createGetLastSeriesLastIndexFocusedItem(
|
|
315
|
+
/**
|
|
316
|
+
* The set of series types compatible with this navigation action.
|
|
317
|
+
*/
|
|
318
|
+
compatibleSeriesTypes,
|
|
319
|
+
/**
|
|
320
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
321
|
+
*/
|
|
322
|
+
useCurrentSeriesMaxLength = true) {
|
|
323
|
+
return function getLastSeriesLastIndexFocusedItem(_currentItem, state) {
|
|
324
|
+
const processedSeries = selectorChartSeriesProcessed(state);
|
|
325
|
+
const nonEmptySeries = getNonEmptySeriesArray(processedSeries, compatibleSeriesTypes);
|
|
326
|
+
const lastSeries = nonEmptySeries[nonEmptySeries.length - 1];
|
|
327
|
+
if (lastSeries === undefined) {
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
const {
|
|
331
|
+
type,
|
|
332
|
+
seriesId
|
|
333
|
+
} = lastSeries;
|
|
334
|
+
const maxLength = useCurrentSeriesMaxLength ? processedSeries[type]?.series[seriesId]?.data.length ?? 0 : getMaxSeriesLength(processedSeries, compatibleSeriesTypes);
|
|
335
|
+
const visibleDataIndex = findVisibleDataIndex({
|
|
336
|
+
processedSeries,
|
|
337
|
+
type,
|
|
338
|
+
seriesId,
|
|
339
|
+
startIndex: maxLength - 1,
|
|
340
|
+
dataLength: maxLength,
|
|
341
|
+
direction: -1,
|
|
342
|
+
allowCycles: false
|
|
343
|
+
});
|
|
344
|
+
if (visibleDataIndex === null) {
|
|
345
|
+
return null;
|
|
346
|
+
}
|
|
347
|
+
return {
|
|
348
|
+
type,
|
|
349
|
+
seriesId,
|
|
350
|
+
dataIndex: visibleDataIndex
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
export function createGetFirstSeriesFocusedItem(
|
|
355
|
+
/**
|
|
356
|
+
* The set of series types compatible with this navigation action.
|
|
357
|
+
*/
|
|
358
|
+
compatibleSeriesTypes) {
|
|
359
|
+
return function getFirstSeriesFocusedItem(currentItem, state) {
|
|
360
|
+
const processedSeries = selectorChartSeriesProcessed(state);
|
|
361
|
+
const firstSeries = getNonEmptySeriesArray(processedSeries, compatibleSeriesTypes)[0];
|
|
362
|
+
if (firstSeries === undefined) {
|
|
363
|
+
return null;
|
|
364
|
+
}
|
|
365
|
+
const {
|
|
366
|
+
type,
|
|
367
|
+
seriesId
|
|
368
|
+
} = firstSeries;
|
|
369
|
+
const data = processedSeries[type].series[seriesId].data;
|
|
370
|
+
const startIndex = currentItem?.dataIndex == null ? 0 : Math.min(currentItem.dataIndex, data.length - 1);
|
|
371
|
+
const visibleDataIndex = findVisibleDataIndex({
|
|
372
|
+
processedSeries,
|
|
373
|
+
type,
|
|
374
|
+
seriesId,
|
|
375
|
+
startIndex,
|
|
376
|
+
dataLength: data.length,
|
|
377
|
+
direction: 1,
|
|
378
|
+
allowCycles: true
|
|
379
|
+
});
|
|
380
|
+
if (visibleDataIndex === null) {
|
|
381
|
+
return null;
|
|
382
|
+
}
|
|
383
|
+
return {
|
|
384
|
+
type,
|
|
385
|
+
seriesId,
|
|
386
|
+
dataIndex: visibleDataIndex
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
export function createGetLastSeriesFocusedItem(
|
|
391
|
+
/**
|
|
392
|
+
* The set of series types compatible with this navigation action.
|
|
393
|
+
*/
|
|
394
|
+
compatibleSeriesTypes) {
|
|
395
|
+
return function getLastSeriesFocusedItem(currentItem, state) {
|
|
396
|
+
const processedSeries = selectorChartSeriesProcessed(state);
|
|
397
|
+
const nonEmptySeries = getNonEmptySeriesArray(processedSeries, compatibleSeriesTypes);
|
|
398
|
+
const lastSeries = nonEmptySeries[nonEmptySeries.length - 1];
|
|
399
|
+
if (lastSeries === undefined) {
|
|
400
|
+
return null;
|
|
401
|
+
}
|
|
402
|
+
const {
|
|
403
|
+
type,
|
|
404
|
+
seriesId
|
|
405
|
+
} = lastSeries;
|
|
406
|
+
const data = processedSeries[type].series[seriesId].data;
|
|
407
|
+
const startIndex = currentItem?.dataIndex == null ? data.length - 1 : Math.min(currentItem.dataIndex, data.length - 1);
|
|
408
|
+
const visibleDataIndex = findVisibleDataIndex({
|
|
409
|
+
processedSeries,
|
|
410
|
+
type,
|
|
411
|
+
seriesId,
|
|
412
|
+
startIndex,
|
|
413
|
+
dataLength: data.length,
|
|
414
|
+
direction: -1,
|
|
415
|
+
allowCycles: true
|
|
416
|
+
});
|
|
417
|
+
if (visibleDataIndex === null) {
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
return {
|
|
421
|
+
type,
|
|
422
|
+
seriesId,
|
|
423
|
+
dataIndex: visibleDataIndex
|
|
424
|
+
};
|
|
425
|
+
};
|
|
191
426
|
}
|
|
@@ -12,6 +12,7 @@ var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
|
12
12
|
var _useChartId = require("../../../hooks/useChartId");
|
|
13
13
|
var _ChartsProvider = require("../../../context/ChartsProvider");
|
|
14
14
|
var _useDescription = require("./useDescription");
|
|
15
|
+
var _useZoomAnnouncement = require("./useZoomAnnouncement");
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
/**
|
|
17
18
|
* Make the proxy looks like a layer.
|
|
@@ -28,6 +29,19 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
28
29
|
pointerEvents: 'none'
|
|
29
30
|
};
|
|
30
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Keeps the live region out of sight without removing it from the accessibility tree.
|
|
34
|
+
*/
|
|
35
|
+
const liveRegionStyle = {
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
width: 1,
|
|
38
|
+
height: 1,
|
|
39
|
+
overflow: 'hidden',
|
|
40
|
+
clipPath: 'inset(50%)',
|
|
41
|
+
whiteSpace: 'nowrap',
|
|
42
|
+
pointerEvents: 'none'
|
|
43
|
+
};
|
|
44
|
+
|
|
31
45
|
// The proxy is implemented by having two divs with the same content, and toggling the visibility of each one when the content changes.
|
|
32
46
|
// The idea is to imitate the behavior of the focus moving from a list element to another, but with the minimal number of DOM elements.
|
|
33
47
|
|
|
@@ -37,6 +51,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
37
51
|
*/
|
|
38
52
|
function ChartsAccessibilityProxy() {
|
|
39
53
|
const message = (0, _useDescription.useDescription)();
|
|
54
|
+
const zoomMessage = (0, _useZoomAnnouncement.useZoomAnnouncement)();
|
|
40
55
|
const chartId = (0, _useChartId.useChartId)();
|
|
41
56
|
const {
|
|
42
57
|
instance
|
|
@@ -99,13 +114,21 @@ function ChartsAccessibilityProxy() {
|
|
|
99
114
|
activeDiv.focus();
|
|
100
115
|
}
|
|
101
116
|
}, [message, chartId]);
|
|
102
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
117
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
118
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
119
|
+
role: "none"
|
|
120
|
+
// Stays focusable once an announcer child owns the tab stop, otherwise the browser would
|
|
121
|
+
// blur the root mid hand-off and the chart would look like it lost the focus.
|
|
122
|
+
,
|
|
123
|
+
tabIndex: message ? -1 : 0,
|
|
124
|
+
ref: handleRef,
|
|
125
|
+
style: fullSizeLayerStyle
|
|
126
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
127
|
+
role: "status",
|
|
128
|
+
"aria-live": "polite",
|
|
129
|
+
"aria-atomic": "true",
|
|
130
|
+
style: liveRegionStyle,
|
|
131
|
+
children: zoomMessage
|
|
132
|
+
})]
|
|
110
133
|
});
|
|
111
134
|
}
|
|
@@ -5,12 +5,13 @@ import useForkRef from '@mui/utils/useForkRef';
|
|
|
5
5
|
import { useChartId } from "../../../hooks/useChartId.mjs";
|
|
6
6
|
import { useChartsContext } from "../../../context/ChartsProvider/index.mjs";
|
|
7
7
|
import { useDescription } from "./useDescription.mjs";
|
|
8
|
+
import { useZoomAnnouncement } from "./useZoomAnnouncement.mjs";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Make the proxy looks like a layer.
|
|
11
12
|
* Having a non-zero size is important for some screen readers to announce the content.
|
|
12
13
|
*/
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
const fullSizeLayerStyle = {
|
|
15
16
|
borderWidth: 0,
|
|
16
17
|
width: '100%',
|
|
@@ -23,6 +24,19 @@ const fullSizeLayerStyle = {
|
|
|
23
24
|
pointerEvents: 'none'
|
|
24
25
|
};
|
|
25
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Keeps the live region out of sight without removing it from the accessibility tree.
|
|
29
|
+
*/
|
|
30
|
+
const liveRegionStyle = {
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
width: 1,
|
|
33
|
+
height: 1,
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
clipPath: 'inset(50%)',
|
|
36
|
+
whiteSpace: 'nowrap',
|
|
37
|
+
pointerEvents: 'none'
|
|
38
|
+
};
|
|
39
|
+
|
|
26
40
|
// The proxy is implemented by having two divs with the same content, and toggling the visibility of each one when the content changes.
|
|
27
41
|
// The idea is to imitate the behavior of the focus moving from a list element to another, but with the minimal number of DOM elements.
|
|
28
42
|
|
|
@@ -32,6 +46,7 @@ const fullSizeLayerStyle = {
|
|
|
32
46
|
*/
|
|
33
47
|
export function ChartsAccessibilityProxy() {
|
|
34
48
|
const message = useDescription();
|
|
49
|
+
const zoomMessage = useZoomAnnouncement();
|
|
35
50
|
const chartId = useChartId();
|
|
36
51
|
const {
|
|
37
52
|
instance
|
|
@@ -94,13 +109,21 @@ export function ChartsAccessibilityProxy() {
|
|
|
94
109
|
activeDiv.focus();
|
|
95
110
|
}
|
|
96
111
|
}, [message, chartId]);
|
|
97
|
-
return /*#__PURE__*/
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
112
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
113
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
114
|
+
role: "none"
|
|
115
|
+
// Stays focusable once an announcer child owns the tab stop, otherwise the browser would
|
|
116
|
+
// blur the root mid hand-off and the chart would look like it lost the focus.
|
|
117
|
+
,
|
|
118
|
+
tabIndex: message ? -1 : 0,
|
|
119
|
+
ref: handleRef,
|
|
120
|
+
style: fullSizeLayerStyle
|
|
121
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
122
|
+
role: "status",
|
|
123
|
+
"aria-live": "polite",
|
|
124
|
+
"aria-atomic": "true",
|
|
125
|
+
style: liveRegionStyle,
|
|
126
|
+
children: zoomMessage
|
|
127
|
+
})]
|
|
105
128
|
});
|
|
106
129
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the message announcing the visible range of the zoomable axes.
|
|
3
|
+
*
|
|
4
|
+
* The message is taken when the keyboard zoom and pan asks for it, not derived from the zoom
|
|
5
|
+
* itself: the zoom also moves on wheel, drag, and from the application, and the live region must
|
|
6
|
+
* stay silent then.
|
|
7
|
+
* @returns {string | null} the message to announce, or `null` when there is nothing to announce
|
|
8
|
+
*/
|
|
9
|
+
export declare function useZoomAnnouncement(): string | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the message announcing the visible range of the zoomable axes.
|
|
3
|
+
*
|
|
4
|
+
* The message is taken when the keyboard zoom and pan asks for it, not derived from the zoom
|
|
5
|
+
* itself: the zoom also moves on wheel, drag, and from the application, and the live region must
|
|
6
|
+
* stay silent then.
|
|
7
|
+
* @returns {string | null} the message to announce, or `null` when there is nothing to announce
|
|
8
|
+
*/
|
|
9
|
+
export declare function useZoomAnnouncement(): string | null;
|