@mui/x-charts 9.0.0-alpha.4 → 9.0.0-beta.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/BarChart.js +19 -28
- package/BarChart/BarChart.mjs +19 -28
- package/BarChart/BarElement.js +3 -5
- package/BarChart/BarElement.mjs +3 -5
- package/BarChart/BarLabel/BarLabelPlot.d.mts +0 -2
- package/BarChart/BarLabel/BarLabelPlot.d.ts +0 -2
- package/BarChart/BarLabel/BarLabelPlot.js +2 -3
- package/BarChart/BarLabel/BarLabelPlot.mjs +2 -3
- package/BarChart/BarPlot.d.mts +2 -12
- package/BarChart/BarPlot.d.ts +2 -12
- package/BarChart/BarPlot.js +4 -18
- package/BarChart/BarPlot.mjs +4 -18
- package/BarChart/BatchBarPlot/BatchBarPlot.js +0 -27
- package/BarChart/BatchBarPlot/BatchBarPlot.mjs +0 -27
- package/BarChart/IndividualBarPlot.d.mts +1 -2
- package/BarChart/IndividualBarPlot.d.ts +1 -2
- package/BarChart/IndividualBarPlot.js +5 -10
- package/BarChart/IndividualBarPlot.mjs +5 -10
- package/BarChart/seriesConfig/bar/descriptionGetter.d.mts +3 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.d.ts +3 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.js +36 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.mjs +30 -0
- package/BarChart/seriesConfig/index.js +5 -1
- package/BarChart/seriesConfig/index.mjs +5 -1
- package/BarChart/useBarChartProps.js +2 -4
- package/BarChart/useBarChartProps.mjs +2 -4
- package/CHANGELOG.md +107 -1
- package/ChartsContainer/ChartsContainer.js +29 -29
- package/ChartsContainer/ChartsContainer.mjs +29 -29
- package/ChartsLayerContainer/ChartsLayerContainer.js +6 -2
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +7 -2
- package/ChartsSvgLayer/ChartsSvgLayer.js +2 -2
- package/ChartsSvgLayer/ChartsSvgLayer.mjs +2 -2
- package/ChartsXAxis/ChartsGroupedXAxisTicks.js +12 -3
- package/ChartsXAxis/ChartsGroupedXAxisTicks.mjs +12 -3
- package/ChartsXAxis/useAxisTicksProps.d.mts +89 -89
- package/ChartsXAxis/useAxisTicksProps.d.ts +89 -89
- package/ChartsYAxis/ChartsGroupedYAxisTicks.js +12 -3
- package/ChartsYAxis/ChartsGroupedYAxisTicks.mjs +12 -3
- package/ChartsYAxis/useAxisTicksProps.d.mts +89 -89
- package/ChartsYAxis/useAxisTicksProps.d.ts +89 -89
- package/Gauge/Gauge.js +0 -4
- package/Gauge/Gauge.mjs +0 -4
- package/Gauge/GaugeContainer.d.mts +1 -1
- package/Gauge/GaugeContainer.d.ts +1 -1
- package/Gauge/GaugeContainer.js +0 -4
- package/Gauge/GaugeContainer.mjs +0 -4
- package/LineChart/AreaElement.js +5 -1
- package/LineChart/AreaElement.mjs +5 -1
- package/LineChart/CircleMarkElement.js +8 -5
- package/LineChart/CircleMarkElement.mjs +8 -5
- package/LineChart/LineChart.js +21 -19
- package/LineChart/LineChart.mjs +21 -19
- package/LineChart/LineElement.js +5 -1
- package/LineChart/LineElement.mjs +5 -1
- package/LineChart/MarkElement.js +7 -4
- package/LineChart/MarkElement.mjs +7 -4
- package/LineChart/seriesConfig/curveEvaluation.d.mts +11 -0
- package/LineChart/seriesConfig/curveEvaluation.d.ts +11 -0
- package/LineChart/seriesConfig/curveEvaluation.js +134 -0
- package/LineChart/seriesConfig/curveEvaluation.mjs +129 -0
- package/LineChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/LineChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/LineChart/seriesConfig/descriptionGetter.js +37 -0
- package/LineChart/seriesConfig/descriptionGetter.mjs +31 -0
- package/LineChart/seriesConfig/getItemAtPosition.d.mts +7 -0
- package/LineChart/seriesConfig/getItemAtPosition.d.ts +7 -0
- package/LineChart/seriesConfig/getItemAtPosition.js +356 -0
- package/LineChart/seriesConfig/getItemAtPosition.mjs +351 -0
- package/LineChart/seriesConfig/index.js +4 -0
- package/LineChart/seriesConfig/index.mjs +4 -0
- package/PieChart/PieArc.js +2 -3
- package/PieChart/PieArc.mjs +2 -3
- package/PieChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/PieChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/PieChart/seriesConfig/descriptionGetter.js +26 -0
- package/PieChart/seriesConfig/descriptionGetter.mjs +20 -0
- package/PieChart/seriesConfig/index.js +2 -0
- package/PieChart/seriesConfig/index.mjs +2 -0
- package/RadarChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/RadarChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/RadarChart/seriesConfig/descriptionGetter.js +37 -0
- package/RadarChart/seriesConfig/descriptionGetter.mjs +31 -0
- package/RadarChart/seriesConfig/index.js +2 -0
- package/RadarChart/seriesConfig/index.mjs +2 -0
- package/ScatterChart/ScatterChart.js +18 -18
- package/ScatterChart/ScatterChart.mjs +18 -18
- package/ScatterChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/ScatterChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/ScatterChart/seriesConfig/descriptionGetter.js +34 -0
- package/ScatterChart/seriesConfig/descriptionGetter.mjs +28 -0
- package/ScatterChart/seriesConfig/index.js +2 -0
- package/ScatterChart/seriesConfig/index.mjs +2 -0
- package/SparkLineChart/SparkLineChart.js +21 -19
- package/SparkLineChart/SparkLineChart.mjs +21 -19
- package/constants/index.js +0 -2
- package/constants/index.mjs +0 -2
- package/hooks/useInteractionItemProps.d.mts +1 -1
- package/hooks/useInteractionItemProps.d.ts +1 -1
- package/hooks/useInteractionItemProps.js +3 -3
- package/hooks/useInteractionItemProps.mjs +3 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.mts +5 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.ts +5 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +100 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +96 -0
- package/internals/components/ChartsAccessibilityProxy/index.d.mts +1 -0
- package/internals/components/ChartsAccessibilityProxy/index.d.ts +1 -0
- package/internals/components/ChartsAccessibilityProxy/index.js +16 -0
- package/internals/components/ChartsAccessibilityProxy/index.mjs +1 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.d.mts +5 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.d.ts +5 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.js +71 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.mjs +66 -0
- package/internals/getChartPoint.js +18 -1
- package/internals/getChartPoint.mjs +18 -1
- package/internals/plugins/corePlugins/corePlugins.d.mts +2 -2
- package/internals/plugins/corePlugins/corePlugins.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.mts +22 -7
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +22 -7
- package/internals/plugins/corePlugins/useChartSeries/index.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartSeries/index.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartSeries/index.js +12 -0
- package/internals/plugins/corePlugins/useChartSeries/index.mjs +2 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +1 -8
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +1 -8
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +1 -11
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.mjs +1 -11
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.mts +8 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.ts +8 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.js +19 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.mjs +14 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.mts +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.ts +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.mjs +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +11 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +2 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +2 -0
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.mts +4 -10
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +4 -10
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +28 -19
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs +28 -18
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.mts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.js +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.mjs +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.mts +33 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.ts +33 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.js +318 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.mjs +311 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +63 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.mjs +62 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.mts +12 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +12 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +28 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.mjs +27 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +22 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.mts +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.ts +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.js +96 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.mjs +91 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.mts +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.ts +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.js +36 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.mjs +31 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.mts +15 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.ts +15 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.js +45 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.mjs +39 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.mts +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +53 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.mjs +52 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +4 -9
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +4 -9
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +16 -40
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +19 -43
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +20 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.mjs +20 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +36 -30
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +36 -30
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.mts +8 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +8 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +9 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +9 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +6 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +6 -0
- package/internals/store/useCharts.d.mts +1 -1
- package/internals/store/useCharts.d.ts +1 -1
- package/locales/elGR.d.mts +76 -0
- package/locales/elGR.d.ts +76 -0
- package/locales/elGR.js +89 -0
- package/locales/elGR.mjs +89 -0
- package/locales/enUS.d.mts +76 -0
- package/locales/enUS.d.ts +76 -0
- package/locales/enUS.js +89 -1
- package/locales/enUS.mjs +89 -1
- package/locales/frFR.d.mts +76 -0
- package/locales/frFR.d.ts +76 -0
- package/locales/frFR.js +89 -0
- package/locales/frFR.mjs +89 -0
- package/locales/nbNO.d.mts +76 -0
- package/locales/nbNO.d.ts +76 -0
- package/locales/nbNO.js +89 -0
- package/locales/nbNO.mjs +89 -0
- package/locales/ptBR.d.mts +76 -0
- package/locales/ptBR.d.ts +76 -0
- package/locales/ptBR.js +89 -0
- package/locales/ptBR.mjs +89 -0
- package/locales/ptPT.d.mts +76 -0
- package/locales/ptPT.d.ts +76 -0
- package/locales/ptPT.js +89 -0
- package/locales/ptPT.mjs +89 -0
- package/locales/svSE.d.mts +76 -0
- package/locales/svSE.d.ts +76 -0
- package/locales/svSE.js +89 -0
- package/locales/svSE.mjs +89 -0
- package/locales/utils/chartsLocaleTextApi.d.mts +189 -0
- package/locales/utils/chartsLocaleTextApi.d.ts +189 -0
- package/locales/utils/getChartsLocalization.d.mts +76 -0
- package/locales/utils/getChartsLocalization.d.ts +76 -0
- package/models/axis.d.mts +11 -5
- package/models/axis.d.ts +11 -5
- package/models/seriesType/config.d.mts +29 -0
- package/models/seriesType/config.d.ts +29 -0
- package/package.json +85 -85
package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import useEventCallback from '@mui/utils/useEventCallback';
|
|
6
5
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
7
6
|
import { selectorChartDefaultizedSeries } from "../../corePlugins/useChartSeries/useChartSeries.selectors.mjs";
|
|
8
7
|
import { selectorChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.mjs";
|
|
@@ -14,35 +13,42 @@ export const useChartKeyboardNavigation = ({
|
|
|
14
13
|
const {
|
|
15
14
|
chartsLayerContainerRef
|
|
16
15
|
} = instance;
|
|
17
|
-
const removeFocus = useEventCallback(function removeFocus() {
|
|
18
|
-
if (store.state.keyboardNavigation.isFocused) {
|
|
19
|
-
store.set('keyboardNavigation', _extends({}, store.state.keyboardNavigation, {
|
|
20
|
-
isFocused: false
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const restoreFocus = useEventCallback(function restoreFocus() {
|
|
25
|
-
if (!store.state.keyboardNavigation.isFocused) {
|
|
26
|
-
store.update(_extends({}, store.state.highlight && {
|
|
27
|
-
highlight: _extends({}, store.state.highlight, {
|
|
28
|
-
lastUpdate: 'keyboard'
|
|
29
|
-
})
|
|
30
|
-
}, store.state.interaction && {
|
|
31
|
-
interaction: _extends({}, store.state.interaction, {
|
|
32
|
-
lastUpdate: 'keyboard'
|
|
33
|
-
})
|
|
34
|
-
}, {
|
|
35
|
-
keyboardNavigation: _extends({}, store.state.keyboardNavigation, {
|
|
36
|
-
isFocused: true
|
|
37
|
-
})
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
16
|
React.useEffect(() => {
|
|
42
17
|
const element = chartsLayerContainerRef.current;
|
|
43
18
|
if (!element || params.disableKeyboardNavigation) {
|
|
44
19
|
return undefined;
|
|
45
20
|
}
|
|
21
|
+
function removeFocus(event) {
|
|
22
|
+
const root = event.currentTarget;
|
|
23
|
+
const next = event.relatedTarget;
|
|
24
|
+
|
|
25
|
+
// Avoid removing focus if we know it is moving to another children in the chart.
|
|
26
|
+
// This avoid extra computation ot remove/add focus at each keyboard pressed when navigating in the chart.
|
|
27
|
+
if (root && next instanceof Node && !root.contains(next)) {
|
|
28
|
+
if (store.state.keyboardNavigation.isFocused) {
|
|
29
|
+
store.set('keyboardNavigation', _extends({}, store.state.keyboardNavigation, {
|
|
30
|
+
isFocused: false
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function restoreFocus() {
|
|
36
|
+
if (!store.state.keyboardNavigation.isFocused) {
|
|
37
|
+
store.update(_extends({}, store.state.highlight && {
|
|
38
|
+
highlight: _extends({}, store.state.highlight, {
|
|
39
|
+
lastUpdate: 'keyboard'
|
|
40
|
+
})
|
|
41
|
+
}, store.state.interaction && {
|
|
42
|
+
interaction: _extends({}, store.state.interaction, {
|
|
43
|
+
lastUpdate: 'keyboard'
|
|
44
|
+
})
|
|
45
|
+
}, {
|
|
46
|
+
keyboardNavigation: _extends({}, store.state.keyboardNavigation, {
|
|
47
|
+
isFocused: true
|
|
48
|
+
})
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
46
52
|
function keyboardHandler(event) {
|
|
47
53
|
let newFocusedItem = store.state.keyboardNavigation.item;
|
|
48
54
|
const seriesConfig = selectorChartSeriesConfig(store.state);
|
|
@@ -76,14 +82,14 @@ export const useChartKeyboardNavigation = ({
|
|
|
76
82
|
}
|
|
77
83
|
}
|
|
78
84
|
element.addEventListener('keydown', keyboardHandler);
|
|
79
|
-
element.addEventListener('
|
|
80
|
-
element.addEventListener('
|
|
85
|
+
element.addEventListener('focusout', removeFocus);
|
|
86
|
+
element.addEventListener('focusin', restoreFocus);
|
|
81
87
|
return () => {
|
|
82
88
|
element.removeEventListener('keydown', keyboardHandler);
|
|
83
|
-
element.removeEventListener('
|
|
84
|
-
element.removeEventListener('
|
|
89
|
+
element.removeEventListener('focusout', removeFocus);
|
|
90
|
+
element.removeEventListener('focusin', restoreFocus);
|
|
85
91
|
};
|
|
86
|
-
}, [chartsLayerContainerRef,
|
|
92
|
+
}, [chartsLayerContainerRef, params.disableKeyboardNavigation, store]);
|
|
87
93
|
useEnhancedEffect(() => {
|
|
88
94
|
store.set('keyboardNavigation', _extends({}, store.state.keyboardNavigation, {
|
|
89
95
|
enabled: !params.disableKeyboardNavigation
|
|
@@ -9,6 +9,14 @@ export declare const selectorChartsHasFocusedItem: (args_0: import("../../corePl
|
|
|
9
9
|
export declare const selectorChartsFocusedItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartKeyboardNavigation.types.mjs").UseChartKeyboardNavigationState> & {
|
|
10
10
|
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
11
11
|
}) => FocusedItemIdentifier<keyof import("../../../index.mjs").ChartsSeriesConfig> | null;
|
|
12
|
+
/**
|
|
13
|
+
* The item that is either
|
|
14
|
+
* - currently focused
|
|
15
|
+
* - will be focused when user focuses the chart
|
|
16
|
+
*/
|
|
17
|
+
export declare const selectorChartsFocusedOrToFocusedItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartKeyboardNavigation.types.mjs").UseChartKeyboardNavigationState> & {
|
|
18
|
+
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
19
|
+
}) => FocusedItemIdentifier<keyof import("../../../index.mjs").ChartsSeriesConfig> | null;
|
|
12
20
|
export declare const selectorChartsIsKeyboardNavigationEnabled: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartKeyboardNavigation.types.mjs").UseChartKeyboardNavigationState> & {
|
|
13
21
|
cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
|
|
14
22
|
}) => boolean;
|
|
@@ -9,6 +9,14 @@ export declare const selectorChartsHasFocusedItem: (args_0: import("../../corePl
|
|
|
9
9
|
export declare const selectorChartsFocusedItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState> & {
|
|
10
10
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
11
11
|
}) => FocusedItemIdentifier<keyof import("../../../index.js").ChartsSeriesConfig> | null;
|
|
12
|
+
/**
|
|
13
|
+
* The item that is either
|
|
14
|
+
* - currently focused
|
|
15
|
+
* - will be focused when user focuses the chart
|
|
16
|
+
*/
|
|
17
|
+
export declare const selectorChartsFocusedOrToFocusedItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState> & {
|
|
18
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
19
|
+
}) => FocusedItemIdentifier<keyof import("../../../index.js").ChartsSeriesConfig> | null;
|
|
12
20
|
export declare const selectorChartsIsKeyboardNavigationEnabled: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartKeyboardNavigation.types.js").UseChartKeyboardNavigationState> & {
|
|
13
21
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
14
22
|
}) => boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.selectorChartsKeyboardYAxisIndex = exports.selectorChartsKeyboardXAxisIndex = exports.selectorChartsKeyboardItem = exports.selectorChartsItemIsFocused = exports.selectorChartsIsKeyboardNavigationEnabled = exports.selectorChartsHasFocusedItem = exports.selectorChartsFocusedItem = void 0;
|
|
6
|
+
exports.selectorChartsKeyboardYAxisIndex = exports.selectorChartsKeyboardXAxisIndex = exports.selectorChartsKeyboardItem = exports.selectorChartsItemIsFocused = exports.selectorChartsIsKeyboardNavigationEnabled = exports.selectorChartsHasFocusedItem = exports.selectorChartsFocusedOrToFocusedItem = exports.selectorChartsFocusedItem = void 0;
|
|
7
7
|
var _store = require("@mui/x-internals/store");
|
|
8
8
|
var _fastObjectShallowCompare = require("@mui/x-internals/fastObjectShallowCompare");
|
|
9
9
|
var _useChartSeries = require("../../corePlugins/useChartSeries");
|
|
@@ -12,6 +12,13 @@ const selectKeyboardNavigation = state => state.keyboardNavigation;
|
|
|
12
12
|
const selectorChartsItemIsFocused = exports.selectorChartsItemIsFocused = (0, _store.createSelector)(selectKeyboardNavigation, (keyboardNavigationState, item) => keyboardNavigationState?.isFocused === true && keyboardNavigationState?.item != null && (0, _fastObjectShallowCompare.fastObjectShallowCompare)(keyboardNavigationState.item, item));
|
|
13
13
|
const selectorChartsHasFocusedItem = exports.selectorChartsHasFocusedItem = (0, _store.createSelector)(selectKeyboardNavigation, keyboardNavigationState => keyboardNavigationState?.isFocused === true && keyboardNavigationState?.item != null);
|
|
14
14
|
const selectorChartsFocusedItem = exports.selectorChartsFocusedItem = (0, _store.createSelector)(selectKeyboardNavigation, keyboardNavigationState => keyboardNavigationState?.isFocused === true ? keyboardNavigationState?.item ?? null : null);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The item that is either
|
|
18
|
+
* - currently focused
|
|
19
|
+
* - will be focused when user focuses the chart
|
|
20
|
+
*/
|
|
21
|
+
const selectorChartsFocusedOrToFocusedItem = exports.selectorChartsFocusedOrToFocusedItem = (0, _store.createSelector)(selectKeyboardNavigation, keyboardNavigationState => keyboardNavigationState?.item ?? null);
|
|
15
22
|
const selectorChartsIsKeyboardNavigationEnabled = exports.selectorChartsIsKeyboardNavigationEnabled = (0, _store.createSelector)(selectKeyboardNavigation, keyboardNavigationState => !!keyboardNavigationState?.enabled);
|
|
16
23
|
|
|
17
24
|
/**
|
|
@@ -37,7 +44,7 @@ const createSelectAxisHighlight = direction => (item, axis, series) => {
|
|
|
37
44
|
};
|
|
38
45
|
const selectorChartsKeyboardXAxisIndex = exports.selectorChartsKeyboardXAxisIndex = (0, _store.createSelector)(selectorChartsFocusedItem, _useChartCartesianAxisRendering.selectorChartXAxis, _useChartSeries.selectorChartSeriesProcessed, createSelectAxisHighlight('x'));
|
|
39
46
|
const selectorChartsKeyboardYAxisIndex = exports.selectorChartsKeyboardYAxisIndex = (0, _store.createSelector)(selectorChartsFocusedItem, _useChartCartesianAxisRendering.selectorChartYAxis, _useChartSeries.selectorChartSeriesProcessed, createSelectAxisHighlight('y'));
|
|
40
|
-
const selectorChartsKeyboardItem = exports.selectorChartsKeyboardItem = (0, _store.
|
|
47
|
+
const selectorChartsKeyboardItem = exports.selectorChartsKeyboardItem = (0, _store.createSelectorMemoized)(selectKeyboardNavigation, function selectorChartsKeyboardItem(keyboardState) {
|
|
41
48
|
if (keyboardState?.isFocused !== true || keyboardState?.item == null) {
|
|
42
49
|
return null;
|
|
43
50
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSelector } from '@mui/x-internals/store';
|
|
1
|
+
import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
2
|
import { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';
|
|
3
3
|
import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.mjs";
|
|
4
4
|
import { selectorChartXAxis, selectorChartYAxis } from "../useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs";
|
|
@@ -6,6 +6,13 @@ const selectKeyboardNavigation = state => state.keyboardNavigation;
|
|
|
6
6
|
export const selectorChartsItemIsFocused = createSelector(selectKeyboardNavigation, (keyboardNavigationState, item) => keyboardNavigationState?.isFocused === true && keyboardNavigationState?.item != null && fastObjectShallowCompare(keyboardNavigationState.item, item));
|
|
7
7
|
export const selectorChartsHasFocusedItem = createSelector(selectKeyboardNavigation, keyboardNavigationState => keyboardNavigationState?.isFocused === true && keyboardNavigationState?.item != null);
|
|
8
8
|
export const selectorChartsFocusedItem = createSelector(selectKeyboardNavigation, keyboardNavigationState => keyboardNavigationState?.isFocused === true ? keyboardNavigationState?.item ?? null : null);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The item that is either
|
|
12
|
+
* - currently focused
|
|
13
|
+
* - will be focused when user focuses the chart
|
|
14
|
+
*/
|
|
15
|
+
export const selectorChartsFocusedOrToFocusedItem = createSelector(selectKeyboardNavigation, keyboardNavigationState => keyboardNavigationState?.item ?? null);
|
|
9
16
|
export const selectorChartsIsKeyboardNavigationEnabled = createSelector(selectKeyboardNavigation, keyboardNavigationState => !!keyboardNavigationState?.enabled);
|
|
10
17
|
|
|
11
18
|
/**
|
|
@@ -31,7 +38,7 @@ const createSelectAxisHighlight = direction => (item, axis, series) => {
|
|
|
31
38
|
};
|
|
32
39
|
export const selectorChartsKeyboardXAxisIndex = createSelector(selectorChartsFocusedItem, selectorChartXAxis, selectorChartSeriesProcessed, createSelectAxisHighlight('x'));
|
|
33
40
|
export const selectorChartsKeyboardYAxisIndex = createSelector(selectorChartsFocusedItem, selectorChartYAxis, selectorChartSeriesProcessed, createSelectAxisHighlight('y'));
|
|
34
|
-
export const selectorChartsKeyboardItem =
|
|
41
|
+
export const selectorChartsKeyboardItem = createSelectorMemoized(selectKeyboardNavigation, function selectorChartsKeyboardItem(keyboardState) {
|
|
35
42
|
if (keyboardState?.isFocused !== true || keyboardState?.item == null) {
|
|
36
43
|
return null;
|
|
37
44
|
}
|
|
@@ -7,7 +7,13 @@ import type { ChartSeriesType } from "../../../../models/seriesType/config.mjs";
|
|
|
7
7
|
export interface UseChartKeyboardNavigationInstance {}
|
|
8
8
|
export interface UseChartKeyboardNavigationState {
|
|
9
9
|
keyboardNavigation: {
|
|
10
|
+
/**
|
|
11
|
+
* The item with keyboard focus. It is `null` when no item is focused.
|
|
12
|
+
*/
|
|
10
13
|
item: null | FocusedItemIdentifier<ChartSeriesType>;
|
|
14
|
+
/**
|
|
15
|
+
* If `false` the focus is ignored, but we keep the item in the state to be able to restore it when focus is active again.
|
|
16
|
+
*/
|
|
11
17
|
isFocused: boolean;
|
|
12
18
|
/**
|
|
13
19
|
* Indicates whether keyboard navigation is enabled or not.
|
|
@@ -7,7 +7,13 @@ import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
|
7
7
|
export interface UseChartKeyboardNavigationInstance {}
|
|
8
8
|
export interface UseChartKeyboardNavigationState {
|
|
9
9
|
keyboardNavigation: {
|
|
10
|
+
/**
|
|
11
|
+
* The item with keyboard focus. It is `null` when no item is focused.
|
|
12
|
+
*/
|
|
10
13
|
item: null | FocusedItemIdentifier<ChartSeriesType>;
|
|
14
|
+
/**
|
|
15
|
+
* If `false` the focus is ignored, but we keep the item in the state to be able to restore it when focus is active again.
|
|
16
|
+
*/
|
|
11
17
|
isFocused: boolean;
|
|
12
18
|
/**
|
|
13
19
|
* Indicates whether keyboard navigation is enabled or not.
|
|
@@ -12,7 +12,7 @@ import { type UseChartBaseProps } from "./useCharts.types.mjs";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function useCharts<TSignatures extends readonly ChartAnyPluginSignature[] = []>(inPlugins: ConvertSignaturesIntoPlugins<TSignatures>, props: Partial<UseChartBaseProps<TSignatures>>): {
|
|
14
14
|
contextValue: {
|
|
15
|
-
store: Store<ChartState<readonly [import("../plugins/corePlugins/index.mjs").UseChartElementRefSignature, import("../index.mjs").UseChartIdSignature, import("../index.mjs").UseChartSeriesConfigSignature<keyof import("../index.mjs").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartExperimentalFeature/index.mjs").UseChartExperimentalFeaturesSignature
|
|
15
|
+
store: Store<ChartState<readonly [import("../plugins/corePlugins/index.mjs").UseChartElementRefSignature, import("../index.mjs").UseChartIdSignature, import("../index.mjs").UseChartSeriesConfigSignature<keyof import("../index.mjs").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartExperimentalFeature/index.mjs").UseChartExperimentalFeaturesSignature<keyof import("../index.mjs").ChartsSeriesConfig>, import("../index.mjs").UseChartDimensionsSignature, import("../index.mjs").UseChartSeriesSignature<keyof import("../index.mjs").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartAnimation/index.mjs").UseChartAnimationSignature, import("../index.mjs").UseChartInteractionListenerSignature, ...TSignatures]>>;
|
|
16
16
|
publicAPI: ChartPublicAPI<TSignatures>;
|
|
17
17
|
instance: ChartInstance<TSignatures>;
|
|
18
18
|
};
|
|
@@ -12,7 +12,7 @@ import { type UseChartBaseProps } from "./useCharts.types.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function useCharts<TSignatures extends readonly ChartAnyPluginSignature[] = []>(inPlugins: ConvertSignaturesIntoPlugins<TSignatures>, props: Partial<UseChartBaseProps<TSignatures>>): {
|
|
14
14
|
contextValue: {
|
|
15
|
-
store: Store<ChartState<readonly [import("../plugins/corePlugins/index.js").UseChartElementRefSignature, import("../index.js").UseChartIdSignature, import("../index.js").UseChartSeriesConfigSignature<keyof import("../index.js").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartExperimentalFeature/index.js").UseChartExperimentalFeaturesSignature
|
|
15
|
+
store: Store<ChartState<readonly [import("../plugins/corePlugins/index.js").UseChartElementRefSignature, import("../index.js").UseChartIdSignature, import("../index.js").UseChartSeriesConfigSignature<keyof import("../index.js").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartExperimentalFeature/index.js").UseChartExperimentalFeaturesSignature<keyof import("../index.js").ChartsSeriesConfig>, import("../index.js").UseChartDimensionsSignature, import("../index.js").UseChartSeriesSignature<keyof import("../index.js").ChartsSeriesConfig>, import("../plugins/corePlugins/useChartAnimation/index.js").UseChartAnimationSignature, import("../index.js").UseChartInteractionListenerSignature, ...TSignatures]>>;
|
|
16
16
|
publicAPI: ChartPublicAPI<TSignatures>;
|
|
17
17
|
instance: ChartInstance<TSignatures>;
|
|
18
18
|
};
|
package/locales/elGR.d.mts
CHANGED
|
@@ -112,6 +112,82 @@ export declare const elGR: {
|
|
|
112
112
|
high?: string | undefined;
|
|
113
113
|
low?: string | undefined;
|
|
114
114
|
close?: string | undefined;
|
|
115
|
+
a11yNoValue?: string | undefined;
|
|
116
|
+
a11yConnector?: string | undefined;
|
|
117
|
+
barDescription?: ((params: {
|
|
118
|
+
value: number | null;
|
|
119
|
+
formattedValue: string;
|
|
120
|
+
categoryValue: string | number | null;
|
|
121
|
+
formattedCategoryValue: string;
|
|
122
|
+
seriesLabel?: string;
|
|
123
|
+
}) => string) | undefined;
|
|
124
|
+
lineDescription?: ((params: {
|
|
125
|
+
x: number | null;
|
|
126
|
+
y: number | null;
|
|
127
|
+
formattedXValue: string;
|
|
128
|
+
formattedYValue: string;
|
|
129
|
+
seriesLabel?: string;
|
|
130
|
+
}) => string) | undefined;
|
|
131
|
+
scatterDescription?: ((params: {
|
|
132
|
+
x: number | null;
|
|
133
|
+
y: number | null;
|
|
134
|
+
formattedXValue: string;
|
|
135
|
+
formattedYValue: string;
|
|
136
|
+
seriesLabel?: string;
|
|
137
|
+
}) => string) | undefined;
|
|
138
|
+
pieDescription?: ((params: {
|
|
139
|
+
value: number | null;
|
|
140
|
+
totalValue: number;
|
|
141
|
+
formattedValue: string;
|
|
142
|
+
seriesLabel?: string;
|
|
143
|
+
}) => string) | undefined;
|
|
144
|
+
radarDescription?: ((params: {
|
|
145
|
+
value: number | null;
|
|
146
|
+
formattedValue: string;
|
|
147
|
+
categoryValue: string | number | null;
|
|
148
|
+
formattedCategoryValue: string;
|
|
149
|
+
seriesLabel?: string;
|
|
150
|
+
}) => string) | undefined;
|
|
151
|
+
funnelDescription?: ((params: {
|
|
152
|
+
value: number | null;
|
|
153
|
+
formattedValue: string;
|
|
154
|
+
seriesLabel?: string;
|
|
155
|
+
}) => string) | undefined;
|
|
156
|
+
heatmapDescription?: ((params: {
|
|
157
|
+
x: number | string | null;
|
|
158
|
+
y: number | string | null;
|
|
159
|
+
value: number | null;
|
|
160
|
+
formattedValue: string;
|
|
161
|
+
formattedXValue: string;
|
|
162
|
+
formattedYValue: string;
|
|
163
|
+
}) => string) | undefined;
|
|
164
|
+
sankeyNodeDescription?: ((params: {
|
|
165
|
+
value: number | null;
|
|
166
|
+
formattedValue: string;
|
|
167
|
+
nodeLabel: string;
|
|
168
|
+
}) => string) | undefined;
|
|
169
|
+
sankeyLinkDescription?: ((params: {
|
|
170
|
+
value: number | null;
|
|
171
|
+
formattedValue: string;
|
|
172
|
+
sourceLabel: string;
|
|
173
|
+
targetLabel: string;
|
|
174
|
+
}) => string) | undefined;
|
|
175
|
+
rangeBarDescription?: ((params: {
|
|
176
|
+
value: [number, number] | null;
|
|
177
|
+
formattedValue: string;
|
|
178
|
+
categoryValue: string | number | null;
|
|
179
|
+
formattedCategoryValue: string;
|
|
180
|
+
seriesLabel?: string;
|
|
181
|
+
}) => string) | undefined;
|
|
182
|
+
ohlcDescription?: ((params: {
|
|
183
|
+
open: number | null;
|
|
184
|
+
high: number | null;
|
|
185
|
+
low: number | null;
|
|
186
|
+
close: number | null;
|
|
187
|
+
date: Date | null;
|
|
188
|
+
formattedDate: string;
|
|
189
|
+
seriesLabel?: string;
|
|
190
|
+
}) => string) | undefined;
|
|
115
191
|
};
|
|
116
192
|
};
|
|
117
193
|
};
|
package/locales/elGR.d.ts
CHANGED
|
@@ -112,6 +112,82 @@ export declare const elGR: {
|
|
|
112
112
|
high?: string | undefined;
|
|
113
113
|
low?: string | undefined;
|
|
114
114
|
close?: string | undefined;
|
|
115
|
+
a11yNoValue?: string | undefined;
|
|
116
|
+
a11yConnector?: string | undefined;
|
|
117
|
+
barDescription?: ((params: {
|
|
118
|
+
value: number | null;
|
|
119
|
+
formattedValue: string;
|
|
120
|
+
categoryValue: string | number | null;
|
|
121
|
+
formattedCategoryValue: string;
|
|
122
|
+
seriesLabel?: string;
|
|
123
|
+
}) => string) | undefined;
|
|
124
|
+
lineDescription?: ((params: {
|
|
125
|
+
x: number | null;
|
|
126
|
+
y: number | null;
|
|
127
|
+
formattedXValue: string;
|
|
128
|
+
formattedYValue: string;
|
|
129
|
+
seriesLabel?: string;
|
|
130
|
+
}) => string) | undefined;
|
|
131
|
+
scatterDescription?: ((params: {
|
|
132
|
+
x: number | null;
|
|
133
|
+
y: number | null;
|
|
134
|
+
formattedXValue: string;
|
|
135
|
+
formattedYValue: string;
|
|
136
|
+
seriesLabel?: string;
|
|
137
|
+
}) => string) | undefined;
|
|
138
|
+
pieDescription?: ((params: {
|
|
139
|
+
value: number | null;
|
|
140
|
+
totalValue: number;
|
|
141
|
+
formattedValue: string;
|
|
142
|
+
seriesLabel?: string;
|
|
143
|
+
}) => string) | undefined;
|
|
144
|
+
radarDescription?: ((params: {
|
|
145
|
+
value: number | null;
|
|
146
|
+
formattedValue: string;
|
|
147
|
+
categoryValue: string | number | null;
|
|
148
|
+
formattedCategoryValue: string;
|
|
149
|
+
seriesLabel?: string;
|
|
150
|
+
}) => string) | undefined;
|
|
151
|
+
funnelDescription?: ((params: {
|
|
152
|
+
value: number | null;
|
|
153
|
+
formattedValue: string;
|
|
154
|
+
seriesLabel?: string;
|
|
155
|
+
}) => string) | undefined;
|
|
156
|
+
heatmapDescription?: ((params: {
|
|
157
|
+
x: number | string | null;
|
|
158
|
+
y: number | string | null;
|
|
159
|
+
value: number | null;
|
|
160
|
+
formattedValue: string;
|
|
161
|
+
formattedXValue: string;
|
|
162
|
+
formattedYValue: string;
|
|
163
|
+
}) => string) | undefined;
|
|
164
|
+
sankeyNodeDescription?: ((params: {
|
|
165
|
+
value: number | null;
|
|
166
|
+
formattedValue: string;
|
|
167
|
+
nodeLabel: string;
|
|
168
|
+
}) => string) | undefined;
|
|
169
|
+
sankeyLinkDescription?: ((params: {
|
|
170
|
+
value: number | null;
|
|
171
|
+
formattedValue: string;
|
|
172
|
+
sourceLabel: string;
|
|
173
|
+
targetLabel: string;
|
|
174
|
+
}) => string) | undefined;
|
|
175
|
+
rangeBarDescription?: ((params: {
|
|
176
|
+
value: [number, number] | null;
|
|
177
|
+
formattedValue: string;
|
|
178
|
+
categoryValue: string | number | null;
|
|
179
|
+
formattedCategoryValue: string;
|
|
180
|
+
seriesLabel?: string;
|
|
181
|
+
}) => string) | undefined;
|
|
182
|
+
ohlcDescription?: ((params: {
|
|
183
|
+
open: number | null;
|
|
184
|
+
high: number | null;
|
|
185
|
+
low: number | null;
|
|
186
|
+
close: number | null;
|
|
187
|
+
date: Date | null;
|
|
188
|
+
formattedDate: string;
|
|
189
|
+
seriesLabel?: string;
|
|
190
|
+
}) => string) | undefined;
|
|
115
191
|
};
|
|
116
192
|
};
|
|
117
193
|
};
|
package/locales/elGR.js
CHANGED
|
@@ -121,5 +121,94 @@ const elGRLocaleText = exports.elGRLocaleText = {
|
|
|
121
121
|
// high: 'High',
|
|
122
122
|
// low: 'Low',
|
|
123
123
|
// close: 'Close',
|
|
124
|
+
|
|
125
|
+
// Accessibility descriptions
|
|
126
|
+
// a11yNoValue: 'no value',
|
|
127
|
+
// a11yConnector: '; ',
|
|
128
|
+
// barDescription: function barDescription({
|
|
129
|
+
// value,
|
|
130
|
+
// formattedValue,
|
|
131
|
+
// formattedCategoryValue,
|
|
132
|
+
// seriesLabel
|
|
133
|
+
// }) {
|
|
134
|
+
// return [formattedCategoryValue, seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
135
|
+
// },
|
|
136
|
+
// lineDescription: function lineDescription({
|
|
137
|
+
// y,
|
|
138
|
+
// formattedXValue,
|
|
139
|
+
// formattedYValue,
|
|
140
|
+
// seriesLabel
|
|
141
|
+
// }) {
|
|
142
|
+
// return [formattedXValue, seriesLabel, y === null ? this.a11yNoValue : formattedYValue].filter(Boolean).join(this.a11yConnector);
|
|
143
|
+
// },
|
|
144
|
+
// scatterDescription: function scatterDescription({
|
|
145
|
+
// formattedXValue,
|
|
146
|
+
// formattedYValue,
|
|
147
|
+
// seriesLabel
|
|
148
|
+
// }) {
|
|
149
|
+
// return [seriesLabel, formattedXValue, formattedYValue].filter(Boolean).join(this.a11yConnector);
|
|
150
|
+
// },
|
|
151
|
+
// pieDescription: function pieDescription({
|
|
152
|
+
// value,
|
|
153
|
+
// formattedValue,
|
|
154
|
+
// seriesLabel
|
|
155
|
+
// }) {
|
|
156
|
+
// return [seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
157
|
+
// },
|
|
158
|
+
// radarDescription: function radarDescription({
|
|
159
|
+
// value,
|
|
160
|
+
// formattedValue,
|
|
161
|
+
// formattedCategoryValue,
|
|
162
|
+
// seriesLabel
|
|
163
|
+
// }) {
|
|
164
|
+
// return [formattedCategoryValue, seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
165
|
+
// },
|
|
166
|
+
// funnelDescription: function funnelDescription({
|
|
167
|
+
// value,
|
|
168
|
+
// formattedValue,
|
|
169
|
+
// seriesLabel
|
|
170
|
+
// }) {
|
|
171
|
+
// return [seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
172
|
+
// },
|
|
173
|
+
// heatmapDescription: function heatmapDescription({
|
|
174
|
+
// value,
|
|
175
|
+
// formattedValue,
|
|
176
|
+
// formattedXValue,
|
|
177
|
+
// formattedYValue
|
|
178
|
+
// }) {
|
|
179
|
+
// return [formattedXValue, formattedYValue, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
180
|
+
// },
|
|
181
|
+
// sankeyNodeDescription: function sankeyNodeDescription({
|
|
182
|
+
// formattedValue,
|
|
183
|
+
// nodeLabel
|
|
184
|
+
// }) {
|
|
185
|
+
// return [nodeLabel, formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
186
|
+
// },
|
|
187
|
+
// sankeyLinkDescription: function sankeyLinkDescription({
|
|
188
|
+
// formattedValue,
|
|
189
|
+
// sourceLabel,
|
|
190
|
+
// targetLabel
|
|
191
|
+
// }) {
|
|
192
|
+
// return [sourceLabel && targetLabel ? `${sourceLabel} to ${targetLabel}` : sourceLabel ?? targetLabel, formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
193
|
+
// },
|
|
194
|
+
// rangeBarDescription: function rangeBarDescription({
|
|
195
|
+
// value,
|
|
196
|
+
// formattedValue,
|
|
197
|
+
// formattedCategoryValue,
|
|
198
|
+
// seriesLabel
|
|
199
|
+
// }) {
|
|
200
|
+
// return [formattedCategoryValue, seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
201
|
+
// },
|
|
202
|
+
// ohlcDescription: function ohlcDescription({
|
|
203
|
+
// open,
|
|
204
|
+
// high,
|
|
205
|
+
// low,
|
|
206
|
+
// close,
|
|
207
|
+
// formattedDate,
|
|
208
|
+
// seriesLabel
|
|
209
|
+
// }) {
|
|
210
|
+
// const hasValues = open !== null && high !== null && low !== null && close !== null;
|
|
211
|
+
// return [formattedDate, seriesLabel, hasValues ? `Open: ${open}, High: ${high}, Low: ${low}, Close: ${close}` : this.a11yNoValue].filter(Boolean).join(this.a11yConnector);
|
|
212
|
+
// },
|
|
124
213
|
};
|
|
125
214
|
const elGR = exports.elGR = (0, _getChartsLocalization.getChartsLocalization)(elGRLocaleText);
|
package/locales/elGR.mjs
CHANGED
|
@@ -115,5 +115,94 @@ export const elGRLocaleText = {
|
|
|
115
115
|
// high: 'High',
|
|
116
116
|
// low: 'Low',
|
|
117
117
|
// close: 'Close',
|
|
118
|
+
|
|
119
|
+
// Accessibility descriptions
|
|
120
|
+
// a11yNoValue: 'no value',
|
|
121
|
+
// a11yConnector: '; ',
|
|
122
|
+
// barDescription: function barDescription({
|
|
123
|
+
// value,
|
|
124
|
+
// formattedValue,
|
|
125
|
+
// formattedCategoryValue,
|
|
126
|
+
// seriesLabel
|
|
127
|
+
// }) {
|
|
128
|
+
// return [formattedCategoryValue, seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
129
|
+
// },
|
|
130
|
+
// lineDescription: function lineDescription({
|
|
131
|
+
// y,
|
|
132
|
+
// formattedXValue,
|
|
133
|
+
// formattedYValue,
|
|
134
|
+
// seriesLabel
|
|
135
|
+
// }) {
|
|
136
|
+
// return [formattedXValue, seriesLabel, y === null ? this.a11yNoValue : formattedYValue].filter(Boolean).join(this.a11yConnector);
|
|
137
|
+
// },
|
|
138
|
+
// scatterDescription: function scatterDescription({
|
|
139
|
+
// formattedXValue,
|
|
140
|
+
// formattedYValue,
|
|
141
|
+
// seriesLabel
|
|
142
|
+
// }) {
|
|
143
|
+
// return [seriesLabel, formattedXValue, formattedYValue].filter(Boolean).join(this.a11yConnector);
|
|
144
|
+
// },
|
|
145
|
+
// pieDescription: function pieDescription({
|
|
146
|
+
// value,
|
|
147
|
+
// formattedValue,
|
|
148
|
+
// seriesLabel
|
|
149
|
+
// }) {
|
|
150
|
+
// return [seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
151
|
+
// },
|
|
152
|
+
// radarDescription: function radarDescription({
|
|
153
|
+
// value,
|
|
154
|
+
// formattedValue,
|
|
155
|
+
// formattedCategoryValue,
|
|
156
|
+
// seriesLabel
|
|
157
|
+
// }) {
|
|
158
|
+
// return [formattedCategoryValue, seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
159
|
+
// },
|
|
160
|
+
// funnelDescription: function funnelDescription({
|
|
161
|
+
// value,
|
|
162
|
+
// formattedValue,
|
|
163
|
+
// seriesLabel
|
|
164
|
+
// }) {
|
|
165
|
+
// return [seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
166
|
+
// },
|
|
167
|
+
// heatmapDescription: function heatmapDescription({
|
|
168
|
+
// value,
|
|
169
|
+
// formattedValue,
|
|
170
|
+
// formattedXValue,
|
|
171
|
+
// formattedYValue
|
|
172
|
+
// }) {
|
|
173
|
+
// return [formattedXValue, formattedYValue, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
174
|
+
// },
|
|
175
|
+
// sankeyNodeDescription: function sankeyNodeDescription({
|
|
176
|
+
// formattedValue,
|
|
177
|
+
// nodeLabel
|
|
178
|
+
// }) {
|
|
179
|
+
// return [nodeLabel, formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
180
|
+
// },
|
|
181
|
+
// sankeyLinkDescription: function sankeyLinkDescription({
|
|
182
|
+
// formattedValue,
|
|
183
|
+
// sourceLabel,
|
|
184
|
+
// targetLabel
|
|
185
|
+
// }) {
|
|
186
|
+
// return [sourceLabel && targetLabel ? `${sourceLabel} to ${targetLabel}` : sourceLabel ?? targetLabel, formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
187
|
+
// },
|
|
188
|
+
// rangeBarDescription: function rangeBarDescription({
|
|
189
|
+
// value,
|
|
190
|
+
// formattedValue,
|
|
191
|
+
// formattedCategoryValue,
|
|
192
|
+
// seriesLabel
|
|
193
|
+
// }) {
|
|
194
|
+
// return [formattedCategoryValue, seriesLabel, value === null ? this.a11yNoValue : formattedValue].filter(Boolean).join(this.a11yConnector);
|
|
195
|
+
// },
|
|
196
|
+
// ohlcDescription: function ohlcDescription({
|
|
197
|
+
// open,
|
|
198
|
+
// high,
|
|
199
|
+
// low,
|
|
200
|
+
// close,
|
|
201
|
+
// formattedDate,
|
|
202
|
+
// seriesLabel
|
|
203
|
+
// }) {
|
|
204
|
+
// const hasValues = open !== null && high !== null && low !== null && close !== null;
|
|
205
|
+
// return [formattedDate, seriesLabel, hasValues ? `Open: ${open}, High: ${high}, Low: ${low}, Close: ${close}` : this.a11yNoValue].filter(Boolean).join(this.a11yConnector);
|
|
206
|
+
// },
|
|
118
207
|
};
|
|
119
208
|
export const elGR = getChartsLocalization(elGRLocaleText);
|