@semcore/d3-chart 16.5.0 → 17.0.0-prerelease.9
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/CHANGELOG.md +10 -0
- package/lib/cjs/AnimatedClipPath.js +28 -41
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +187 -223
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +248 -327
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +162 -185
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +219 -248
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +448 -482
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +349 -396
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +67 -86
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +78 -93
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +149 -167
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +178 -207
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +182 -222
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +124 -126
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +100 -126
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +576 -681
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +518 -571
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +147 -178
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +64 -82
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +169 -199
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +135 -177
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +60 -73
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +193 -208
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +182 -217
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +45 -83
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +37 -97
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +97 -91
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +17 -23
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +16 -16
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +72 -75
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +354 -525
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +5 -5
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +12 -19
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +164 -203
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +7 -6
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/a11y/translations/module/de.json +2 -2
- package/lib/cjs/a11y/translations/module/en.json +2 -2
- package/lib/cjs/a11y/translations/module/es.json +2 -2
- package/lib/cjs/a11y/translations/module/fr.json +2 -2
- package/lib/cjs/a11y/translations/module/it.json +2 -2
- package/lib/cjs/a11y/translations/module/ja.json +2 -2
- package/lib/cjs/a11y/translations/module/ko.json +2 -2
- package/lib/cjs/a11y/translations/module/nl.json +2 -2
- package/lib/cjs/a11y/translations/module/pl.json +2 -2
- package/lib/cjs/a11y/translations/module/pt.json +2 -2
- package/lib/cjs/a11y/translations/module/sv.json +2 -2
- package/lib/cjs/a11y/translations/module/tr.json +2 -2
- package/lib/cjs/a11y/translations/module/vi.json +2 -2
- package/lib/cjs/a11y/translations/module/zh.json +2 -2
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +1 -1
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +421 -466
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +97 -115
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +229 -216
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +114 -136
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +280 -305
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +76 -108
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +80 -95
- package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js +126 -148
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +95 -113
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.js +84 -110
- package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +119 -143
- package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.js +103 -122
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/index.js +2 -2
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +72 -105
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +58 -70
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +208 -221
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +63 -73
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/index.js +4 -4
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +115 -129
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +107 -137
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/SvgElement.js +7 -7
- package/lib/cjs/component/SvgElement.js.map +1 -1
- package/lib/cjs/createElement.js +66 -65
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +62 -62
- package/lib/cjs/style/axis.shadow.css +3 -0
- package/lib/cjs/style/plot.shadow.css +1 -3
- package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
- package/lib/cjs/style/plotA11yView.shadow.css +13 -26
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +15 -15
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/Tooltip.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +80 -80
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +122 -145
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +24 -37
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +179 -215
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +242 -321
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +154 -177
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +206 -235
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +433 -467
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +337 -384
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +60 -79
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +74 -89
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +141 -159
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +174 -203
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +173 -213
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +68 -74
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +95 -121
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +554 -659
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +500 -553
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +140 -171
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +58 -76
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +161 -191
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +130 -172
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +56 -69
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +183 -198
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +169 -204
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js +41 -80
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +35 -95
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +89 -84
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js +16 -23
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +15 -16
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +67 -73
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +353 -524
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js +4 -5
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +11 -18
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +162 -203
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js +6 -6
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/a11y/translations/module/de.json +2 -2
- package/lib/es6/a11y/translations/module/en.json +2 -2
- package/lib/es6/a11y/translations/module/es.json +2 -2
- package/lib/es6/a11y/translations/module/fr.json +2 -2
- package/lib/es6/a11y/translations/module/it.json +2 -2
- package/lib/es6/a11y/translations/module/ja.json +2 -2
- package/lib/es6/a11y/translations/module/ko.json +2 -2
- package/lib/es6/a11y/translations/module/nl.json +2 -2
- package/lib/es6/a11y/translations/module/pl.json +2 -2
- package/lib/es6/a11y/translations/module/pt.json +2 -2
- package/lib/es6/a11y/translations/module/sv.json +2 -2
- package/lib/es6/a11y/translations/module/tr.json +2 -2
- package/lib/es6/a11y/translations/module/vi.json +2 -2
- package/lib/es6/a11y/translations/module/zh.json +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/color.js +1 -1
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +416 -462
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +92 -111
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +225 -213
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +109 -132
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +276 -301
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +70 -103
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +74 -90
- package/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.js +121 -144
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +90 -109
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.js +80 -107
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +113 -138
- package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.js +97 -117
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +70 -104
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +53 -65
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +198 -211
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +58 -68
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +108 -122
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +100 -130
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/SvgElement.js +4 -5
- package/lib/es6/component/SvgElement.js.map +1 -1
- package/lib/es6/createElement.js +55 -54
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/style/axis.shadow.css +3 -0
- package/lib/es6/style/plot.shadow.css +1 -3
- package/lib/es6/style/plotA11yModule.shadow.css +10 -11
- package/lib/es6/style/plotA11yView.shadow.css +13 -26
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +14 -14
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/Tooltip.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/es6/utils.js +105 -144
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +24 -36
- package/lib/esm/Area.mjs +178 -149
- package/lib/esm/Axis.mjs +241 -242
- package/lib/esm/Bar.mjs +155 -137
- package/lib/esm/Bubble.mjs +205 -171
- package/lib/esm/CompactHorizontalBar.mjs +428 -383
- package/lib/esm/Donut.mjs +315 -266
- package/lib/esm/Dots.mjs +60 -49
- package/lib/esm/GroupBar.mjs +71 -75
- package/lib/esm/HorizontalBar.mjs +142 -120
- package/lib/esm/Hover.mjs +173 -163
- package/lib/esm/Line.mjs +174 -145
- package/lib/esm/Pattern.mjs +67 -63
- package/lib/esm/Plot.mjs +98 -95
- package/lib/esm/Radar.mjs +550 -498
- package/lib/esm/RadialTree.mjs +512 -416
- package/lib/esm/Reference.mjs +137 -122
- package/lib/esm/ResponsiveContainer.mjs +58 -69
- package/lib/esm/ScatterPlot.mjs +163 -162
- package/lib/esm/StackBar.mjs +126 -147
- package/lib/esm/StackedArea.mjs +53 -61
- package/lib/esm/Tooltip.mjs +185 -175
- package/lib/esm/Venn.mjs +170 -170
- package/lib/esm/a11y/DataAccessibilityTable.mjs +46 -73
- package/lib/esm/a11y/PlotA11yModule.mjs +37 -80
- package/lib/esm/a11y/PlotA11yView.mjs +99 -74
- package/lib/esm/a11y/bezier.mjs +16 -23
- package/lib/esm/a11y/focus.mjs +15 -16
- package/lib/esm/a11y/hints.mjs +65 -71
- package/lib/esm/a11y/insights.mjs +347 -495
- package/lib/esm/a11y/intl.mjs +4 -5
- package/lib/esm/a11y/locale.mjs +12 -14
- package/lib/esm/a11y/serialize.mjs +139 -152
- package/lib/esm/a11y/summarize.mjs +3 -3
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
- package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/color.mjs +1 -1
- package/lib/esm/component/Chart/AbstractChart.mjs +422 -415
- package/lib/esm/component/Chart/AreaChart.mjs +92 -91
- package/lib/esm/component/Chart/BarChart.mjs +225 -177
- package/lib/esm/component/Chart/BubbleChart.mjs +110 -118
- package/lib/esm/component/Chart/CigaretteChart.mjs +277 -268
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +70 -87
- package/lib/esm/component/Chart/DonutChart.mjs +74 -84
- package/lib/esm/component/Chart/HistogramChart.mjs +121 -117
- package/lib/esm/component/Chart/LineChart.mjs +90 -89
- package/lib/esm/component/Chart/RadarChart.mjs +81 -97
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +113 -111
- package/lib/esm/component/Chart/VennChart.mjs +98 -111
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +75 -97
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +54 -55
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +194 -165
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +60 -58
- package/lib/esm/component/Cigarette/Cigarette.mjs +109 -99
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +97 -111
- package/lib/esm/component/SvgElement.mjs +4 -4
- package/lib/esm/createElement.mjs +54 -37
- package/lib/esm/style/axis.shadow.css +3 -0
- package/lib/esm/style/plot.shadow.css +1 -3
- package/lib/esm/style/plotA11yModule.shadow.css +10 -11
- package/lib/esm/style/plotA11yView.shadow.css +13 -26
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/utils.mjs +103 -138
- package/lib/types/Axis.d.ts +4 -0
- package/lib/types/CompactHorizontalBar.d.ts +1 -1
- package/lib/types/Hover.d.ts +1 -1
- package/lib/types/Line.d.ts +1 -1
- package/lib/types/Plot.d.ts +1 -1
- package/lib/types/Radar.d.ts +1 -1
- package/lib/types/ResponsiveContainer.d.ts +1 -1
- package/lib/types/Tooltip.d.ts +1 -3
- package/lib/types/Venn.d.ts +1 -1
- package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
- package/lib/types/a11y/PlotA11yView.d.ts +12 -1
- package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
- package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
- package/lib/types/utils.d.ts +10 -10
- package/package.json +9 -12
|
@@ -1,115 +1,72 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
2
|
import { sstyled, assignProps } from "@semcore/core";
|
|
3
|
+
import { Box } from "@semcore/base-components";
|
|
5
4
|
import { Context, useI18n } from "@semcore/core/lib/utils/enhances/WithI18n";
|
|
6
|
-
import { Box } from "@semcore/flex-box";
|
|
7
5
|
import React from "react";
|
|
8
6
|
import { normalizeLocale } from "./locale.mjs";
|
|
9
7
|
import { localizedMessages } from "./translations/module/__intergalactic-dynamic-locales.mjs";
|
|
10
8
|
/*!__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
|
|
11
|
-
|
|
9
|
+
const styles = (
|
|
12
10
|
/*__reshadow_css_start__*/
|
|
13
11
|
(sstyled.insert(
|
|
14
12
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
13
|
+
".___SPlotA11yModule_18nes_gg_{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0,}",
|
|
16
14
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
15
|
+
"18nes_gg_"
|
|
18
16
|
), /*__reshadow_css_end__*/
|
|
19
17
|
{
|
|
20
|
-
"__SPlotA11yModule": "
|
|
18
|
+
"__SPlotA11yModule": "___SPlotA11yModule_18nes_gg_"
|
|
21
19
|
})
|
|
22
20
|
);
|
|
23
|
-
var globalWasFocused = false;
|
|
24
|
-
var globalNavWithKeyboard = false;
|
|
25
21
|
function PlotA11yModule(props) {
|
|
26
|
-
var _ref = arguments[0],
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var locale = React.useMemo(function() {
|
|
39
|
-
var _props$locale;
|
|
40
|
-
return normalizeLocale((_props$locale = props.locale) !== null && _props$locale !== void 0 ? _props$locale : contextLocale, localizedMessages);
|
|
41
|
-
}, [props.locale]);
|
|
42
|
-
var t = useI18n(localizedMessages, locale);
|
|
43
|
-
React.useEffect(function() {
|
|
44
|
-
var _props$plotRef$curren;
|
|
45
|
-
if (wasFocused) return;
|
|
46
|
-
var focusListener = function focusListener2() {
|
|
47
|
-
globalWasFocused = true;
|
|
48
|
-
setWasFocused(true);
|
|
49
|
-
};
|
|
50
|
-
(_props$plotRef$curren = props.plotRef.current) === null || _props$plotRef$curren === void 0 || _props$plotRef$curren.addEventListener("focus", focusListener);
|
|
51
|
-
return function() {
|
|
52
|
-
var _props$plotRef$curren2;
|
|
53
|
-
return (_props$plotRef$curren2 = props.plotRef.current) === null || _props$plotRef$curren2 === void 0 ? void 0 : _props$plotRef$curren2.removeEventListener("focus", focusListener);
|
|
54
|
-
};
|
|
55
|
-
}, [wasFocused, props.plotRef]);
|
|
56
|
-
React.useEffect(function() {
|
|
57
|
-
var _document$body;
|
|
58
|
-
if (navWithKeyboard) return;
|
|
59
|
-
var keyboardListener = function keyboardListener2(event) {
|
|
60
|
-
var navigationKeys = ["Tab", "ArrowUp", "ArrowLeft", "ArrowDown", "ArrowRight", "ArrowUp", "ArrowLeft"];
|
|
61
|
-
if ("key" in event && navigationKeys.includes(event.key)) {
|
|
62
|
-
setNavWithKeyboard(true);
|
|
63
|
-
globalNavWithKeyboard = true;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
(_document$body = document.body) === null || _document$body === void 0 || _document$body.addEventListener("keydown", keyboardListener);
|
|
67
|
-
return function() {
|
|
68
|
-
var _document$body2;
|
|
69
|
-
return (_document$body2 = document.body) === null || _document$body2 === void 0 ? void 0 : _document$body2.removeEventListener("keydown", keyboardListener);
|
|
70
|
-
};
|
|
71
|
-
}, [navWithKeyboard]);
|
|
72
|
-
var shouldDisplayView = wasFocused && navWithKeyboard;
|
|
73
|
-
React.useEffect(function() {
|
|
74
|
-
if (!shouldDisplayView) return;
|
|
22
|
+
var _ref = arguments[0], _ref3;
|
|
23
|
+
const SPlotA11yModule = Box;
|
|
24
|
+
const [isOpened, setIsOpened] = React.useState(false);
|
|
25
|
+
const [plotA11yView, setPlotA11yView] = React.useState(null);
|
|
26
|
+
const srButtonRef = React.useRef(null);
|
|
27
|
+
const [loading, setLoading] = React.useState(false);
|
|
28
|
+
const [error, setError] = React.useState(null);
|
|
29
|
+
const contextLocale = React.useContext(Context);
|
|
30
|
+
const locale = React.useMemo(() => normalizeLocale(props.locale ?? contextLocale, localizedMessages), [props.locale]);
|
|
31
|
+
const t = useI18n(localizedMessages, locale);
|
|
32
|
+
React.useEffect(() => {
|
|
33
|
+
if (!isOpened) return;
|
|
75
34
|
if (plotA11yView) return;
|
|
76
35
|
if (loading) return;
|
|
77
36
|
setLoading(true);
|
|
78
|
-
import("./PlotA11yView.mjs").then(
|
|
79
|
-
|
|
37
|
+
import("./PlotA11yView.mjs").then(({
|
|
38
|
+
PlotA11yView
|
|
39
|
+
}) => {
|
|
80
40
|
setPlotA11yView({
|
|
81
41
|
Component: PlotA11yView
|
|
82
42
|
});
|
|
83
43
|
setLoading(false);
|
|
84
44
|
setError(null);
|
|
85
|
-
})
|
|
45
|
+
}).catch((error2) => {
|
|
86
46
|
console.error(error2);
|
|
87
47
|
setError(error2);
|
|
48
|
+
setLoading(false);
|
|
88
49
|
});
|
|
89
|
-
}, [plotA11yView,
|
|
50
|
+
}, [plotA11yView, isOpened, loading, setLoading]);
|
|
90
51
|
if (plotA11yView) {
|
|
91
52
|
return sstyled(styles), /* @__PURE__ */ React.createElement(plotA11yView.Component, _extends({}, props, {
|
|
53
|
+
onCloseHandler: () => {
|
|
54
|
+
setIsOpened(false);
|
|
55
|
+
setPlotA11yView(null);
|
|
56
|
+
},
|
|
57
|
+
triggerRef: srButtonRef,
|
|
92
58
|
locale
|
|
93
59
|
}));
|
|
94
60
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SPlotA11yModule, _ref4.cn("SPlotA11yModule", _objectSpread({}, assignProps({
|
|
105
|
-
"tabIndex": 0,
|
|
106
|
-
"aria-live": "polite"
|
|
107
|
-
}, _ref))), t("loading"));
|
|
108
|
-
}
|
|
109
|
-
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SPlotA11yModule, _ref5.cn("SPlotA11yModule", _objectSpread({}, assignProps({
|
|
110
|
-
"tabIndex": 0,
|
|
111
|
-
"onFocus": hadnleHiddenElementsFocus
|
|
112
|
-
}, _ref))), t("disabled"));
|
|
61
|
+
return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SPlotA11yModule, _ref3.cn("SPlotA11yModule", {
|
|
62
|
+
...assignProps({}, _ref)
|
|
63
|
+
}), /* @__PURE__ */ React.createElement("button", _ref3.cn("button", {
|
|
64
|
+
"ref": srButtonRef,
|
|
65
|
+
"onClick": () => setIsOpened(true),
|
|
66
|
+
"aria-label": t("PlotA11yModule.ScreenReaderOnlyButton.Label")
|
|
67
|
+
})), /* @__PURE__ */ React.createElement(Box, _ref3.cn("Box", {
|
|
68
|
+
"role": "status"
|
|
69
|
+
}), loading && t("loading"), error && t("failed")));
|
|
113
70
|
}
|
|
114
71
|
export {
|
|
115
72
|
PlotA11yModule
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
1
|
import { sstyled, assignProps } from "@semcore/core";
|
|
2
|
+
import { Box } from "@semcore/base-components";
|
|
4
3
|
import { useAsyncI18nMessages } from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
5
|
-
import { Box } from "@semcore/flex-box";
|
|
6
4
|
import React from "react";
|
|
7
5
|
import { DataAccessibilityTable } from "./DataAccessibilityTable.mjs";
|
|
8
6
|
import { heavyFindNextFocusableElement } from "./focus.mjs";
|
|
@@ -11,35 +9,57 @@ import { getIntl } from "./intl.mjs";
|
|
|
11
9
|
import { summarize } from "./summarize.mjs";
|
|
12
10
|
import { localizedMessages } from "./translations/view/__intergalactic-dynamic-locales.mjs";
|
|
13
11
|
/*!__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
|
|
14
|
-
|
|
12
|
+
const styles = (
|
|
15
13
|
/*__reshadow_css_start__*/
|
|
16
14
|
(sstyled.insert(
|
|
17
15
|
/*__inner_css_start__*/
|
|
18
|
-
".
|
|
16
|
+
".___SPlotA11yView_9ugu2_gg_{position:relative;display:block;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);z-index:var(--intergalactic-z-index-overlay, 500);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_9ugu2_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_9ugu2_gg_ table,.___SPlotA11yView_9ugu2_gg_ td,.___SPlotA11yView_9ugu2_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}",
|
|
19
17
|
/*__inner_css_end__*/
|
|
20
|
-
"
|
|
18
|
+
"9ugu2_gg_"
|
|
21
19
|
), /*__reshadow_css_end__*/
|
|
22
20
|
{
|
|
23
|
-
"__SPlotA11yView": "
|
|
21
|
+
"__SPlotA11yView": "___SPlotA11yView_9ugu2_gg_"
|
|
24
22
|
})
|
|
25
23
|
);
|
|
26
|
-
|
|
24
|
+
const PlotA11yView = ({
|
|
25
|
+
id,
|
|
26
|
+
payload: providedData,
|
|
27
|
+
hints,
|
|
28
|
+
plotLabel,
|
|
29
|
+
triggerRef,
|
|
30
|
+
plotRef,
|
|
31
|
+
config: providedConfig,
|
|
32
|
+
locale,
|
|
33
|
+
onCloseHandler
|
|
34
|
+
}) => {
|
|
27
35
|
var _ref = arguments[0], _ref2;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
const SPlotA11yView = Box;
|
|
37
|
+
const translations = useAsyncI18nMessages(localizedMessages, locale);
|
|
38
|
+
const intl = React.useMemo(() => getIntl(locale, translations, localizedMessages), [locale, translations, localizedMessages]);
|
|
39
|
+
const config = React.useMemo(() => makeDataSummarizationConfig(providedConfig), [providedConfig]);
|
|
40
|
+
const data = React.useMemo(() => Array.isArray(providedData) ? providedData : [providedData], [providedData]);
|
|
41
|
+
const rootRef = React.useRef(null);
|
|
42
|
+
const [summary, setSummary] = React.useState(null);
|
|
43
|
+
const [generatingSummary, setGeneratingSummary] = React.useState(true);
|
|
44
|
+
React.useEffect(() => {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
(_a = rootRef.current) == null ? void 0 : _a.focus();
|
|
47
|
+
function focusOutHandler(event) {
|
|
48
|
+
var _a2;
|
|
49
|
+
if (event.relatedTarget === null) {
|
|
50
|
+
return requestIdleCallback(onCloseHandler);
|
|
51
|
+
}
|
|
52
|
+
if (!(event.relatedTarget instanceof HTMLElement)) return;
|
|
53
|
+
if ((_a2 = rootRef.current) == null ? void 0 : _a2.contains(event.relatedTarget)) return;
|
|
54
|
+
requestIdleCallback(onCloseHandler);
|
|
55
|
+
}
|
|
56
|
+
(_b = rootRef.current) == null ? void 0 : _b.addEventListener("focusout", focusOutHandler);
|
|
57
|
+
return () => {
|
|
58
|
+
var _a2;
|
|
59
|
+
return (_a2 = rootRef.current) == null ? void 0 : _a2.removeEventListener("focusout", focusOutHandler);
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
React.useEffect(() => {
|
|
43
63
|
if (config.disable) {
|
|
44
64
|
setSummary("");
|
|
45
65
|
setGeneratingSummary(false);
|
|
@@ -50,70 +70,75 @@ var PlotA11yView = function PlotA11yView2(_ref3) {
|
|
|
50
70
|
setGeneratingSummary(false);
|
|
51
71
|
return;
|
|
52
72
|
}
|
|
53
|
-
setTimeout(
|
|
73
|
+
setTimeout(() => {
|
|
54
74
|
setSummary(summarize(providedData, hints, config, locale, translations, localizedMessages));
|
|
55
75
|
setGeneratingSummary(false);
|
|
56
76
|
}, 0);
|
|
57
77
|
}, [providedData, hints, config, locale, translations, localizedMessages]);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
(
|
|
78
|
+
const handleClose = React.useCallback(() => {
|
|
79
|
+
onCloseHandler();
|
|
80
|
+
requestIdleCallback(() => {
|
|
81
|
+
var _a;
|
|
82
|
+
(_a = triggerRef.current) == null ? void 0 : _a.focus();
|
|
83
|
+
});
|
|
61
84
|
}, []);
|
|
62
|
-
|
|
63
|
-
var
|
|
85
|
+
const handleSkip = React.useCallback((event) => {
|
|
86
|
+
var _a;
|
|
64
87
|
event.preventDefault();
|
|
65
88
|
if (!plotRef.current) return;
|
|
66
|
-
(
|
|
89
|
+
(_a = heavyFindNextFocusableElement(plotRef.current)) == null ? void 0 : _a.focus();
|
|
90
|
+
onCloseHandler();
|
|
67
91
|
}, []);
|
|
68
|
-
|
|
92
|
+
const handleSkipKeyboard = React.useCallback((event) => {
|
|
69
93
|
if (!(event.key === "Enter" || event.key === " ")) return;
|
|
70
94
|
handleSkip(event);
|
|
71
95
|
}, [handleSkip]);
|
|
72
|
-
|
|
73
|
-
var
|
|
96
|
+
const handleGoToTable = React.useCallback((event) => {
|
|
97
|
+
var _a;
|
|
74
98
|
event.preventDefault();
|
|
75
|
-
(
|
|
99
|
+
(_a = dataTableRef.current) == null ? void 0 : _a.focus();
|
|
76
100
|
}, []);
|
|
77
|
-
|
|
101
|
+
const handleGoToTableKeyboard = React.useCallback((event) => {
|
|
78
102
|
if (!(event.key === "Enter" || event.key === " ")) return;
|
|
79
103
|
handleGoToTable(event);
|
|
80
104
|
}, [handleGoToTable]);
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
id: "view-default-plot-label"
|
|
88
|
-
})
|
|
89
|
-
}),
|
|
90
|
-
close: intl.formatMessage({
|
|
91
|
-
id: "view-close"
|
|
92
|
-
}),
|
|
93
|
-
skipPlot: intl.formatMessage({
|
|
94
|
-
id: "view-skip-plot"
|
|
95
|
-
}),
|
|
96
|
-
goToTable: intl.formatMessage({
|
|
97
|
-
id: "view-go-to-table"
|
|
98
|
-
}),
|
|
99
|
-
summary: intl.formatMessage({
|
|
100
|
-
id: "view-data-summary"
|
|
101
|
-
}),
|
|
102
|
-
summaryPlaceholder: intl.formatMessage({
|
|
103
|
-
id: "view-summary-placeholder"
|
|
104
|
-
}),
|
|
105
|
-
table: intl.formatMessage({
|
|
106
|
-
id: "view-table"
|
|
105
|
+
const texts = React.useMemo(() => ({
|
|
106
|
+
label: intl.formatMessage({
|
|
107
|
+
id: "view-label"
|
|
108
|
+
}, {
|
|
109
|
+
plotLabel: plotLabel ?? intl.formatMessage({
|
|
110
|
+
id: "view-default-plot-label"
|
|
107
111
|
})
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
}),
|
|
113
|
+
close: intl.formatMessage({
|
|
114
|
+
id: "view-close"
|
|
115
|
+
}),
|
|
116
|
+
skipPlot: intl.formatMessage({
|
|
117
|
+
id: "view-skip-plot"
|
|
118
|
+
}),
|
|
119
|
+
goToTable: intl.formatMessage({
|
|
120
|
+
id: "view-go-to-table"
|
|
121
|
+
}),
|
|
122
|
+
summary: intl.formatMessage({
|
|
123
|
+
id: "view-data-summary"
|
|
124
|
+
}),
|
|
125
|
+
summaryPlaceholder: intl.formatMessage({
|
|
126
|
+
id: "view-summary-placeholder"
|
|
127
|
+
}),
|
|
128
|
+
table: intl.formatMessage({
|
|
129
|
+
id: "view-table"
|
|
130
|
+
})
|
|
131
|
+
}), [intl, plotLabel]);
|
|
132
|
+
const dataTableRef = React.useRef(null);
|
|
133
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SPlotA11yView, _ref2.cn("SPlotA11yView", {
|
|
134
|
+
...assignProps({
|
|
135
|
+
"tabIndex": 0,
|
|
136
|
+
"aria-label": texts.label,
|
|
137
|
+
"role": "dialog",
|
|
138
|
+
"__excludeProps": ["data"],
|
|
139
|
+
"ref": rootRef
|
|
140
|
+
}, _ref)
|
|
141
|
+
}), /* @__PURE__ */ React.createElement("button", _ref2.cn("button", {
|
|
117
142
|
"type": "button",
|
|
118
143
|
"onClick": handleClose
|
|
119
144
|
}), texts.close), /* @__PURE__ */ React.createElement("a", _ref2.cn("a", {
|
|
@@ -121,16 +146,16 @@ var PlotA11yView = function PlotA11yView2(_ref3) {
|
|
|
121
146
|
"onKeyDown": handleSkipKeyboard,
|
|
122
147
|
"onClick": handleSkip
|
|
123
148
|
}), texts.skipPlot), /* @__PURE__ */ React.createElement("a", _ref2.cn("a", {
|
|
124
|
-
"href":
|
|
149
|
+
"href": `#${id}-data-table`,
|
|
125
150
|
"onKeyDown": handleGoToTableKeyboard,
|
|
126
151
|
"onClick": handleGoToTable
|
|
127
152
|
}), texts.goToTable), /* @__PURE__ */ React.createElement("strong", _ref2.cn("strong", {}), /* @__PURE__ */ React.createElement("label", _ref2.cn("label", {
|
|
128
|
-
"htmlFor":
|
|
153
|
+
"htmlFor": `${id}-data-summary`
|
|
129
154
|
}), texts.summary)), /* @__PURE__ */ React.createElement("div", _ref2.cn("div", {
|
|
130
|
-
"id":
|
|
155
|
+
"id": `${id}-data-summary`,
|
|
131
156
|
"aria-busy": generatingSummary
|
|
132
157
|
}), generatingSummary ? texts.summaryPlaceholder : summary), /* @__PURE__ */ React.createElement("strong", _ref2.cn("strong", {}), /* @__PURE__ */ React.createElement("label", _ref2.cn("label", {
|
|
133
|
-
"htmlFor":
|
|
158
|
+
"htmlFor": `${id}-data-table`
|
|
134
159
|
}), texts.table)), /* @__PURE__ */ React.createElement(DataAccessibilityTable, _ref2.cn("DataAccessibilityTable", {
|
|
135
160
|
"id": id,
|
|
136
161
|
"dataTableRef": dataTableRef,
|
package/lib/esm/a11y/bezier.mjs
CHANGED
|
@@ -1,29 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var tPower = i;
|
|
16
|
-
var reversedTPower = points2.length - 1 - i;
|
|
17
|
-
var edge = i === 0 || i === points2.length - 1;
|
|
18
|
-
var factor = edge ? 1 : points2.length - 1;
|
|
19
|
-
var point = points2[i];
|
|
20
|
-
var weight = weightPoints[i];
|
|
21
|
-
result += factor * Math.pow(t, tPower) * Math.pow(1 - t, reversedTPower) * point * weight;
|
|
1
|
+
const makeBezier = (points, bounds) => {
|
|
2
|
+
const yPoints = points.map((point) => point.y);
|
|
3
|
+
const noPoints = points.map(() => 1);
|
|
4
|
+
const weightPoints = points.map((point) => point.weight ?? 1);
|
|
5
|
+
const process = (t, points2) => {
|
|
6
|
+
let result = 0;
|
|
7
|
+
for (let i = 0; i < points2.length; i++) {
|
|
8
|
+
const tPower = i;
|
|
9
|
+
const reversedTPower = points2.length - 1 - i;
|
|
10
|
+
const edge = i === 0 || i === points2.length - 1;
|
|
11
|
+
const factor = edge ? 1 : points2.length - 1;
|
|
12
|
+
const point = points2[i];
|
|
13
|
+
const weight = weightPoints[i];
|
|
14
|
+
result += factor * t ** tPower * (1 - t) ** reversedTPower * point * weight;
|
|
22
15
|
}
|
|
23
16
|
return result;
|
|
24
17
|
};
|
|
25
|
-
return
|
|
26
|
-
|
|
18
|
+
return (x) => {
|
|
19
|
+
const t = x / bounds.width;
|
|
27
20
|
return process(t, yPoints) / process(t, noPoints);
|
|
28
21
|
};
|
|
29
22
|
};
|
package/lib/esm/a11y/focus.mjs
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { isFocusable } from "@semcore/core/lib/utils/focus-lock/isFocusable";
|
|
2
|
-
|
|
2
|
+
const findNextFocusableElementInChildren = (element) => {
|
|
3
3
|
if (element && isFocusable(element)) {
|
|
4
4
|
return element;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
const children = element == null ? void 0 : element.children;
|
|
7
7
|
if (children) {
|
|
8
|
-
for (
|
|
9
|
-
|
|
8
|
+
for (let i = 0; i < children.length; i++) {
|
|
9
|
+
const childChild = children.item(i);
|
|
10
10
|
if (!childChild) continue;
|
|
11
|
-
|
|
11
|
+
const result = findNextFocusableElementInChildren(childChild);
|
|
12
12
|
if (result) return result;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const makeParentsChain = (element) => {
|
|
18
|
+
const parents = [];
|
|
19
|
+
let parent = element.parentElement;
|
|
20
20
|
while (parent) {
|
|
21
21
|
parents.push(parent);
|
|
22
22
|
parent = parent.parentElement;
|
|
23
23
|
}
|
|
24
24
|
return parents;
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
for (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var siblings = Array.from((_parent$children = parent === null || parent === void 0 ? void 0 : parent.children) !== null && _parent$children !== void 0 ? _parent$children : []);
|
|
26
|
+
const heavyFindNextFocusableElement = (base) => {
|
|
27
|
+
const parents = makeParentsChain(base);
|
|
28
|
+
for (let i = 0; i < parents.length; i++) {
|
|
29
|
+
const parent = parents[i];
|
|
30
|
+
let siblings = Array.from((parent == null ? void 0 : parent.children) ?? []);
|
|
32
31
|
if (siblings.indexOf(parents[i - 1] || base) !== -1) {
|
|
33
32
|
siblings = siblings.slice(siblings.indexOf(parents[i - 1] || base) + 1);
|
|
34
33
|
}
|
|
35
|
-
for (
|
|
36
|
-
|
|
34
|
+
for (let i2 = 0; i2 < siblings.length; i2++) {
|
|
35
|
+
const focusable = findNextFocusableElementInChildren(siblings[i2]);
|
|
37
36
|
if (focusable) return focusable;
|
|
38
37
|
}
|
|
39
38
|
}
|