@mui/x-charts 9.14.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 +176 -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/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/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 +8 -4
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +9 -5
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +2 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +2 -2
- 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 +1 -1
- package/locales/elGR.d.ts +1 -1
- package/locales/enUS.d.mts +1 -1
- package/locales/enUS.d.ts +1 -1
- package/locales/frFR.d.mts +1 -1
- package/locales/frFR.d.ts +1 -1
- package/locales/nbNO.d.mts +1 -1
- package/locales/nbNO.d.ts +1 -1
- package/locales/ptBR.d.mts +1 -1
- package/locales/ptBR.d.ts +1 -1
- package/locales/ptPT.d.mts +1 -1
- package/locales/ptPT.d.ts +1 -1
- package/locales/svSE.d.mts +1 -1
- package/locales/svSE.d.ts +1 -1
- package/locales/utils/chartsLocaleTextApi.d.mts +1 -1
- package/locales/utils/chartsLocaleTextApi.d.ts +1 -1
- package/locales/utils/getChartsLocalization.d.mts +1 -1
- package/locales/utils/getChartsLocalization.d.ts +1 -1
- package/locales/utils/getChartsLocalization.mjs +1 -1
- package/package.json +7 -6
- package/tests/web-components.js +1 -0
- package/tests/web-components.mjs +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
5
|
-
const _excluded = ["xAxis", "yAxis", "width", "height", "margin", "color", "baseline", "sx", "showTooltip", "showHighlight", "axisHighlight", "children", "slots", "slotProps", "data", "plotType", "valueFormatter", "area", "curve", "className", "disableClipping", "clipAreaOffset", "
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
|
+
const _excluded = ["xAxis", "yAxis", "width", "height", "margin", "color", "baseline", "sx", "showTooltip", "showHighlight", "axisHighlight", "children", "slots", "slotProps", "data", "plotType", "valueFormatter", "area", "curve", "className", "disableClipping", "clipAreaOffset", "onHighlightedAxisChange", "disableAxisListener"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import useId from '@mui/utils/useId';
|
|
@@ -10,6 +10,7 @@ import { ChartsClipPath } from "../ChartsClipPath/index.mjs";
|
|
|
10
10
|
import { BarPlot } from "../BarChart/index.mjs";
|
|
11
11
|
import { LinePlot, AreaPlot, LineHighlightPlot } from "../LineChart/index.mjs";
|
|
12
12
|
import { ChartsDataProvider } from "../ChartsDataProvider/index.mjs";
|
|
13
|
+
import { useChartsContainerProps } from "../ChartsContainer/useChartsContainerProps.mjs";
|
|
13
14
|
import { ChartsSurface } from "../ChartsSurface/index.mjs";
|
|
14
15
|
import { DEFAULT_X_AXIS_KEY, DEFAULT_Y_AXIS_KEY } from "../constants/index.mjs";
|
|
15
16
|
import { ChartsTooltip } from "../ChartsTooltip/index.mjs";
|
|
@@ -51,10 +52,8 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
51
52
|
className,
|
|
52
53
|
disableClipping,
|
|
53
54
|
clipAreaOffset,
|
|
54
|
-
onHighlightChange,
|
|
55
55
|
onHighlightedAxisChange,
|
|
56
|
-
|
|
57
|
-
highlightedItem
|
|
56
|
+
disableAxisListener
|
|
58
57
|
} = props,
|
|
59
58
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
60
59
|
const id = useId();
|
|
@@ -103,24 +102,25 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
103
102
|
}, yAxisProps, {
|
|
104
103
|
position: 'none'
|
|
105
104
|
})], [yAxisProps]);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
105
|
+
const {
|
|
106
|
+
chartsDataProviderProps,
|
|
107
|
+
chartsSurfaceProps
|
|
108
|
+
} = useChartsContainerProps(_extends({}, other, {
|
|
109
|
+
series,
|
|
110
|
+
width,
|
|
111
|
+
height,
|
|
112
|
+
margin,
|
|
113
|
+
colors,
|
|
114
|
+
xAxis,
|
|
115
|
+
yAxis,
|
|
116
|
+
onHighlightedAxisChange,
|
|
117
|
+
sx,
|
|
118
|
+
disableAxisListener: disableAxisListener ?? (onHighlightedAxisChange === undefined && (!showTooltip || (slotProps?.tooltip?.trigger ?? 'axis') !== 'axis') && !(showHighlight && plotType === 'line') && (axisHighlight?.x ?? 'none') === 'none' && (axisHighlight?.y ?? 'none') === 'none')
|
|
119
|
+
}));
|
|
120
|
+
return /*#__PURE__*/_jsxs(ChartsDataProvider, _extends({}, chartsDataProviderProps, {
|
|
121
|
+
children: [/*#__PURE__*/_jsxs(ChartsSurface, _extends({}, chartsSurfaceProps, {
|
|
120
122
|
className: className,
|
|
121
123
|
ref: ref,
|
|
122
|
-
sx: sx
|
|
123
|
-
}, other, {
|
|
124
124
|
children: [/*#__PURE__*/_jsxs("g", {
|
|
125
125
|
clipPath: `url(#${clipPathId})`,
|
|
126
126
|
children: [plotType === 'bar' && /*#__PURE__*/_jsx(BarPlot, {
|
|
@@ -148,7 +148,7 @@ const SparkLineChart = /*#__PURE__*/React.forwardRef(function SparkLineChart(pro
|
|
|
148
148
|
offset: clipPathOffset
|
|
149
149
|
}), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlight)), children]
|
|
150
150
|
})), showTooltip && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip))]
|
|
151
|
-
});
|
|
151
|
+
}));
|
|
152
152
|
});
|
|
153
153
|
if (process.env.NODE_ENV !== "production") SparkLineChart.displayName = "SparkLineChart";
|
|
154
154
|
process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes /* remove-proptypes */ = {
|
package/Toolbar/Toolbar.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["className", "render"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["render", "onKeyDown", "onFocus", "onBlur", "disabled", "aria-disabled"],
|
|
6
6
|
_excluded2 = ["tabIndex"];
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Store } from '@
|
|
1
|
+
import type { Store } from '@base-ui/utils/store';
|
|
2
2
|
import type { ChartAnyPluginSignature, ChartInstance, ChartPublicAPI, ChartState, ConvertSignaturesIntoPlugins, MergeSignaturesProperty } from "../../internals/plugins/models/index.mjs";
|
|
3
3
|
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.mjs";
|
|
4
4
|
import type { UseChartBaseProps } from "../../internals/store/useCharts.types.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Store } from '@
|
|
1
|
+
import type { Store } from '@base-ui/utils/store';
|
|
2
2
|
import type { ChartAnyPluginSignature, ChartInstance, ChartPublicAPI, ChartState, ConvertSignaturesIntoPlugins, MergeSignaturesProperty } from "../../internals/plugins/models/index.js";
|
|
3
3
|
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.js";
|
|
4
4
|
import type { UseChartBaseProps } from "../../internals/store/useCharts.types.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _formatErrorMessage from "@mui/x-internals/formatErrorMessage";
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import useForkRef from '@mui/utils/useForkRef';
|
|
5
5
|
import { useAnimateInternal } from "../../internals/animation/useAnimateInternal.mjs";
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import { useThemeProps } from '@mui/material/styles';
|
|
3
3
|
import { useDrawingArea } from "./useDrawingArea.mjs";
|
|
4
4
|
import { useXAxes, useYAxes } from "./useAxis.mjs";
|
package/hooks/useAxisTicks.mjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.useIsItemFocusedGetter = useIsItemFocusedGetter;
|
|
8
|
-
var _fastObjectShallowCompare = require("@
|
|
8
|
+
var _fastObjectShallowCompare = require("@base-ui/utils/fastObjectShallowCompare");
|
|
9
9
|
var _useFocusedItem = require("./useFocusedItem");
|
|
10
10
|
/**
|
|
11
11
|
* A hook to check focus state of multiple items.
|
package/index.js
CHANGED
package/index.mjs
CHANGED
package/internals/Flatbush.js
CHANGED
|
@@ -14,6 +14,15 @@ const ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint1
|
|
|
14
14
|
const VERSION = 3; // serialized format version
|
|
15
15
|
|
|
16
16
|
class Flatbush {
|
|
17
|
+
_queue;
|
|
18
|
+
_boxes;
|
|
19
|
+
_indices;
|
|
20
|
+
data;
|
|
21
|
+
numItems;
|
|
22
|
+
nodeSize;
|
|
23
|
+
_levelBounds;
|
|
24
|
+
byteOffset;
|
|
25
|
+
|
|
17
26
|
/**
|
|
18
27
|
* Recreate a Flatbush index from raw `ArrayBuffer` or `SharedArrayBuffer` data.
|
|
19
28
|
* @param {ArrayBufferLike} data
|
package/internals/Flatbush.mjs
CHANGED
|
@@ -6,6 +6,15 @@ const ARRAY_TYPES = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint1
|
|
|
6
6
|
const VERSION = 3; // serialized format version
|
|
7
7
|
|
|
8
8
|
export class Flatbush {
|
|
9
|
+
_queue;
|
|
10
|
+
_boxes;
|
|
11
|
+
_indices;
|
|
12
|
+
data;
|
|
13
|
+
numItems;
|
|
14
|
+
nodeSize;
|
|
15
|
+
_levelBounds;
|
|
16
|
+
byteOffset;
|
|
17
|
+
|
|
9
18
|
/**
|
|
10
19
|
* Recreate a Flatbush index from raw `ArrayBuffer` or `SharedArrayBuffer` data.
|
|
11
20
|
* @param {ArrayBufferLike} data
|
|
@@ -44,6 +44,24 @@ allowCycles?: boolean,
|
|
|
44
44
|
* If true (default), series max index is defined by the current series length and not all series.
|
|
45
45
|
*/
|
|
46
46
|
useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
47
|
+
export declare function createGetFirstIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
48
|
+
/**
|
|
49
|
+
* The set of series types compatible with this navigation action.
|
|
50
|
+
*/
|
|
51
|
+
compatibleSeriesTypes: Set<OutSeriesType>,
|
|
52
|
+
/**
|
|
53
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
54
|
+
*/
|
|
55
|
+
useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
56
|
+
export declare function createGetLastIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
57
|
+
/**
|
|
58
|
+
* The set of series types compatible with this navigation action.
|
|
59
|
+
*/
|
|
60
|
+
compatibleSeriesTypes: Set<OutSeriesType>,
|
|
61
|
+
/**
|
|
62
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
63
|
+
*/
|
|
64
|
+
useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
47
65
|
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
48
66
|
/**
|
|
49
67
|
* The set of series types compatible with this navigation action.
|
|
@@ -54,4 +72,32 @@ export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends
|
|
|
54
72
|
* The set of series types compatible with this navigation action.
|
|
55
73
|
*/
|
|
56
74
|
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
75
|
+
export declare function createGetFirstSeriesFirstIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
76
|
+
/**
|
|
77
|
+
* The set of series types compatible with this navigation action.
|
|
78
|
+
*/
|
|
79
|
+
compatibleSeriesTypes: Set<OutSeriesType>,
|
|
80
|
+
/**
|
|
81
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
82
|
+
*/
|
|
83
|
+
useCurrentSeriesMaxLength?: boolean): (_currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
84
|
+
export declare function createGetLastSeriesLastIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
85
|
+
/**
|
|
86
|
+
* The set of series types compatible with this navigation action.
|
|
87
|
+
*/
|
|
88
|
+
compatibleSeriesTypes: Set<OutSeriesType>,
|
|
89
|
+
/**
|
|
90
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
91
|
+
*/
|
|
92
|
+
useCurrentSeriesMaxLength?: boolean): (_currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
93
|
+
export declare function createGetFirstSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
94
|
+
/**
|
|
95
|
+
* The set of series types compatible with this navigation action.
|
|
96
|
+
*/
|
|
97
|
+
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
98
|
+
export declare function createGetLastSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
99
|
+
/**
|
|
100
|
+
* The set of series types compatible with this navigation action.
|
|
101
|
+
*/
|
|
102
|
+
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
57
103
|
export {};
|
|
@@ -44,6 +44,24 @@ allowCycles?: boolean,
|
|
|
44
44
|
* If true (default), series max index is defined by the current series length and not all series.
|
|
45
45
|
*/
|
|
46
46
|
useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
47
|
+
export declare function createGetFirstIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
48
|
+
/**
|
|
49
|
+
* The set of series types compatible with this navigation action.
|
|
50
|
+
*/
|
|
51
|
+
compatibleSeriesTypes: Set<OutSeriesType>,
|
|
52
|
+
/**
|
|
53
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
54
|
+
*/
|
|
55
|
+
useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
56
|
+
export declare function createGetLastIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
57
|
+
/**
|
|
58
|
+
* The set of series types compatible with this navigation action.
|
|
59
|
+
*/
|
|
60
|
+
compatibleSeriesTypes: Set<OutSeriesType>,
|
|
61
|
+
/**
|
|
62
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
63
|
+
*/
|
|
64
|
+
useCurrentSeriesMaxLength?: boolean): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
47
65
|
export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
48
66
|
/**
|
|
49
67
|
* The set of series types compatible with this navigation action.
|
|
@@ -54,4 +72,32 @@ export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends
|
|
|
54
72
|
* The set of series types compatible with this navigation action.
|
|
55
73
|
*/
|
|
56
74
|
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
75
|
+
export declare function createGetFirstSeriesFirstIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
76
|
+
/**
|
|
77
|
+
* The set of series types compatible with this navigation action.
|
|
78
|
+
*/
|
|
79
|
+
compatibleSeriesTypes: Set<OutSeriesType>,
|
|
80
|
+
/**
|
|
81
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
82
|
+
*/
|
|
83
|
+
useCurrentSeriesMaxLength?: boolean): (_currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
84
|
+
export declare function createGetLastSeriesLastIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
85
|
+
/**
|
|
86
|
+
* The set of series types compatible with this navigation action.
|
|
87
|
+
*/
|
|
88
|
+
compatibleSeriesTypes: Set<OutSeriesType>,
|
|
89
|
+
/**
|
|
90
|
+
* If true, series max index is defined by the current series length and not all series.
|
|
91
|
+
*/
|
|
92
|
+
useCurrentSeriesMaxLength?: boolean): (_currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
93
|
+
export declare function createGetFirstSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
94
|
+
/**
|
|
95
|
+
* The set of series types compatible with this navigation action.
|
|
96
|
+
*/
|
|
97
|
+
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
98
|
+
export declare function createGetLastSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
|
|
99
|
+
/**
|
|
100
|
+
* The set of series types compatible with this navigation action.
|
|
101
|
+
*/
|
|
102
|
+
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: WorkingItem | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
57
103
|
export {};
|
|
@@ -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
|
}
|