@semcore/d3-chart 3.61.0-prerelease.0 → 3.61.0-prerelease.4
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/lib/cjs/AnimatedClipPath.js +15 -11
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +48 -71
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +108 -170
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +34 -29
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +137 -211
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +82 -92
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +139 -154
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +38 -55
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +18 -15
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +34 -29
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +45 -52
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +41 -63
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +12 -16
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +36 -29
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +261 -281
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +154 -169
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +51 -45
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +25 -20
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +61 -71
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +31 -20
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +16 -12
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +73 -73
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +52 -77
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +3 -2
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +86 -43
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +19 -44
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +2 -1
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +6 -5
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +9 -6
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +64 -63
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +2 -1
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +5 -5
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +17 -15
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +2 -1
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +5 -4
- 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 +5 -4
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +3 -2
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +83 -157
- 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 +51 -24
- 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 +69 -85
- 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 +27 -31
- 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 +147 -340
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +15 -11
- 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 +22 -16
- 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 +44 -16
- 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 +48 -22
- 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 +19 -15
- 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 +21 -16
- 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 +19 -16
- 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 +8 -7
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +23 -45
- 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 +24 -19
- 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 +83 -108
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +2 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +23 -18
- 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 +2 -1
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +20 -16
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +24 -19
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/cjs/createElement.d.js.map +1 -1
- package/lib/cjs/createElement.js +12 -10
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +2 -9
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/area.shadow.css +2 -2
- package/lib/cjs/style/axis.shadow.css +1 -39
- package/lib/cjs/style/bar.shadow.css +1 -1
- package/lib/cjs/style/bubble.shadow.css +3 -11
- package/lib/cjs/style/donut.shadow.css +1 -1
- package/lib/cjs/style/dot.shadow.css +1 -1
- package/lib/cjs/style/hover.shadow.css +2 -2
- package/lib/cjs/style/line.shadow.css +2 -2
- package/lib/cjs/style/plot.shadow.css +6 -8
- package/lib/cjs/style/plotA11yModule.shadow.css +11 -10
- package/lib/cjs/style/plotA11yView.shadow.css +26 -13
- package/lib/cjs/style/radar.shadow.css +3 -3
- package/lib/cjs/style/radial-tree.shadow.css +2 -2
- package/lib/cjs/style/scatterplot.shadow.css +2 -2
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +5 -4
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/translations/de.json +0 -1
- package/lib/cjs/translations/es.json +0 -1
- package/lib/cjs/translations/fr.json +0 -1
- package/lib/cjs/translations/it.json +0 -1
- package/lib/cjs/translations/ja.json +0 -1
- package/lib/cjs/translations/ko.json +0 -1
- package/lib/cjs/translations/nl.json +0 -1
- package/lib/cjs/translations/pl.json +0 -1
- package/lib/cjs/translations/pt.json +0 -1
- package/lib/cjs/translations/sv.json +0 -1
- package/lib/cjs/translations/tr.json +1 -2
- package/lib/cjs/translations/vi.json +0 -1
- package/lib/cjs/translations/zh.json +0 -1
- package/lib/cjs/types/Area.d.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/Bar.d.js.map +1 -1
- package/lib/cjs/types/Bubble.d.js.map +1 -1
- package/lib/cjs/types/ClipPath.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/GroupBar.d.js.map +1 -1
- package/lib/cjs/types/HorizontalBar.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/Reference.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
- package/lib/cjs/types/StackBar.d.js.map +1 -1
- package/lib/cjs/types/StackedArea.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/context.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +2 -14
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +55 -36
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +11 -9
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +45 -70
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +104 -168
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +29 -27
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +135 -211
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +77 -89
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +137 -154
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +36 -55
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +15 -13
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +29 -27
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +41 -51
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +37 -61
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +3 -7
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +32 -28
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +257 -279
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +151 -168
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +45 -43
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +19 -16
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +59 -71
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +27 -17
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +13 -10
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +65 -68
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +48 -75
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +86 -43
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +16 -43
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +4 -4
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +2 -2
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +61 -61
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +2 -3
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +13 -14
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
- 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 +2 -2
- 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 +80 -159
- 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 +48 -23
- 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 +67 -84
- 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 +24 -30
- 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 +144 -341
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +12 -9
- 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 +18 -14
- 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 +41 -15
- 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 +45 -20
- 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 +16 -13
- 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 +18 -15
- 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 +16 -14
- 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/Chart/index.js +6 -6
- package/lib/es6/component/Chart/index.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +20 -43
- 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 +19 -17
- 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 +74 -102
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +17 -15
- 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/ChartLegend/index.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +17 -14
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +21 -17
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
- package/lib/es6/createElement.d.js.map +1 -1
- package/lib/es6/createElement.js +7 -7
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/index.js +0 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/area.shadow.css +2 -2
- package/lib/es6/style/axis.shadow.css +1 -39
- package/lib/es6/style/bar.shadow.css +1 -1
- package/lib/es6/style/bubble.shadow.css +3 -11
- package/lib/es6/style/donut.shadow.css +1 -1
- package/lib/es6/style/dot.shadow.css +1 -1
- package/lib/es6/style/hover.shadow.css +2 -2
- package/lib/es6/style/line.shadow.css +2 -2
- package/lib/es6/style/plot.shadow.css +6 -8
- package/lib/es6/style/plotA11yModule.shadow.css +11 -10
- package/lib/es6/style/plotA11yView.shadow.css +26 -13
- package/lib/es6/style/radar.shadow.css +3 -3
- package/lib/es6/style/radial-tree.shadow.css +2 -2
- package/lib/es6/style/scatterplot.shadow.css +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/translations/de.json +0 -1
- package/lib/es6/translations/es.json +0 -1
- package/lib/es6/translations/fr.json +0 -1
- package/lib/es6/translations/it.json +0 -1
- package/lib/es6/translations/ja.json +0 -1
- package/lib/es6/translations/ko.json +0 -1
- package/lib/es6/translations/nl.json +0 -1
- package/lib/es6/translations/pl.json +0 -1
- package/lib/es6/translations/pt.json +0 -1
- package/lib/es6/translations/sv.json +0 -1
- package/lib/es6/translations/tr.json +1 -2
- package/lib/es6/translations/vi.json +0 -1
- package/lib/es6/translations/zh.json +0 -1
- package/lib/es6/types/Area.d.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/Bar.d.js.map +1 -1
- package/lib/es6/types/Bubble.d.js.map +1 -1
- package/lib/es6/types/ClipPath.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/GroupBar.d.js.map +1 -1
- package/lib/es6/types/HorizontalBar.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/Reference.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/ScatterPlot.d.js.map +1 -1
- package/lib/es6/types/StackBar.d.js.map +1 -1
- package/lib/es6/types/StackedArea.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/types/context.d.js.map +1 -1
- package/lib/es6/types/index.d.js +0 -2
- package/lib/es6/types/index.d.js.map +1 -1
- package/lib/es6/utils.js +16 -16
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +16 -9
- package/lib/esm/Area.mjs +36 -51
- package/lib/esm/Axis.mjs +86 -143
- package/lib/esm/Bar.mjs +34 -31
- package/lib/esm/Bubble.mjs +106 -154
- package/lib/esm/CompactHorizontalBar.mjs +80 -88
- package/lib/esm/Donut.mjs +75 -87
- package/lib/esm/Dots.mjs +34 -50
- package/lib/esm/GroupBar.mjs +14 -12
- package/lib/esm/HorizontalBar.mjs +34 -31
- package/lib/esm/Hover.mjs +50 -53
- package/lib/esm/Line.mjs +31 -45
- package/lib/esm/Pattern.mjs +2 -4
- package/lib/esm/Plot.mjs +35 -30
- package/lib/esm/Radar.mjs +175 -188
- package/lib/esm/RadialTree.mjs +111 -105
- package/lib/esm/Reference.mjs +40 -37
- package/lib/esm/ResponsiveContainer.mjs +21 -18
- package/lib/esm/ScatterPlot.mjs +40 -49
- package/lib/esm/StackBar.mjs +28 -18
- package/lib/esm/StackedArea.mjs +16 -13
- package/lib/esm/Tooltip.mjs +59 -56
- package/lib/esm/Venn.mjs +47 -67
- package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
- package/lib/esm/a11y/PlotA11yModule.mjs +74 -35
- package/lib/esm/a11y/PlotA11yView.mjs +17 -41
- package/lib/esm/a11y/focus.mjs +4 -4
- package/lib/esm/a11y/hints.mjs +2 -2
- package/lib/esm/a11y/insights.mjs +76 -76
- package/lib/esm/a11y/locale.mjs +2 -2
- package/lib/esm/a11y/serialize.mjs +12 -12
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/a11y/translations/module/de.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/en.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/es.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/fr.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/it.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/ja.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/ko.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/nl.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/pl.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/pt.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/sv.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/tr.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/vi.json.mjs +4 -2
- package/lib/esm/a11y/translations/module/zh.json.mjs +4 -2
- package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/component/Chart/AbstractChart.mjs +65 -141
- package/lib/esm/component/Chart/AreaChart.mjs +51 -27
- package/lib/esm/component/Chart/BarChart.mjs +51 -64
- package/lib/esm/component/Chart/BubbleChart.mjs +25 -30
- package/lib/esm/component/Chart/CigaretteChart.mjs +119 -298
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +15 -13
- package/lib/esm/component/Chart/DonutChart.mjs +19 -16
- package/lib/esm/component/Chart/HistogramChart.mjs +46 -22
- package/lib/esm/component/Chart/LineChart.mjs +46 -23
- package/lib/esm/component/Chart/RadarChart.mjs +18 -16
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +21 -18
- package/lib/esm/component/Chart/VennChart.mjs +19 -16
- package/lib/esm/component/Chart/index.mjs +6 -6
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +22 -45
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +22 -19
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +75 -88
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +25 -22
- package/lib/esm/component/ChartLegend/index.mjs +0 -2
- package/lib/esm/component/Cigarette/Cigarette.mjs +19 -16
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +22 -18
- package/lib/esm/createElement.mjs +10 -8
- package/lib/esm/index.mjs +0 -3
- package/lib/esm/style/area.shadow.css +2 -2
- package/lib/esm/style/axis.shadow.css +1 -39
- package/lib/esm/style/bar.shadow.css +1 -1
- package/lib/esm/style/bubble.shadow.css +3 -11
- package/lib/esm/style/donut.shadow.css +1 -1
- package/lib/esm/style/dot.shadow.css +1 -1
- package/lib/esm/style/hover.shadow.css +2 -2
- package/lib/esm/style/line.shadow.css +2 -2
- package/lib/esm/style/plot.shadow.css +6 -8
- package/lib/esm/style/plotA11yModule.shadow.css +11 -10
- package/lib/esm/style/plotA11yView.shadow.css +26 -13
- package/lib/esm/style/radar.shadow.css +3 -3
- package/lib/esm/style/radial-tree.shadow.css +2 -2
- package/lib/esm/style/scatterplot.shadow.css +2 -2
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/esm/translations/es.json.mjs +0 -1
- package/lib/esm/translations/fr.json.mjs +0 -1
- package/lib/esm/translations/it.json.mjs +0 -1
- package/lib/esm/translations/ja.json.mjs +0 -1
- package/lib/esm/translations/ko.json.mjs +0 -1
- package/lib/esm/translations/nl.json.mjs +0 -1
- package/lib/esm/translations/pl.json.mjs +0 -1
- package/lib/esm/translations/pt.json.mjs +0 -1
- package/lib/esm/translations/sv.json.mjs +0 -1
- package/lib/esm/translations/tr.json.mjs +1 -2
- package/lib/esm/translations/vi.json.mjs +0 -1
- package/lib/esm/translations/zh.json.mjs +0 -1
- package/lib/esm/utils.mjs +11 -11
- package/lib/types/Area.d.ts +6 -9
- package/lib/types/Axis.d.ts +3 -10
- package/lib/types/Bar.d.ts +6 -7
- package/lib/types/Bubble.d.ts +5 -21
- package/lib/types/ClipPath.d.ts +3 -4
- package/lib/types/CompactHorizontalBar.d.ts +8 -7
- package/lib/types/Donut.d.ts +5 -8
- package/lib/types/GroupBar.d.ts +6 -6
- package/lib/types/HorizontalBar.d.ts +6 -7
- package/lib/types/Hover.d.ts +8 -8
- package/lib/types/Line.d.ts +6 -9
- package/lib/types/Pattern.d.ts +51 -51
- package/lib/types/Plot.d.ts +9 -11
- package/lib/types/Radar.d.ts +7 -10
- package/lib/types/RadialTree.d.ts +54 -10
- package/lib/types/Reference.d.ts +5 -6
- package/lib/types/ResponsiveContainer.d.ts +4 -5
- package/lib/types/ScatterPlot.d.ts +5 -8
- package/lib/types/StackBar.d.ts +6 -7
- package/lib/types/StackedArea.d.ts +5 -6
- package/lib/types/Tooltip.d.ts +12 -12
- package/lib/types/Venn.d.ts +6 -7
- package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
- package/lib/types/a11y/PlotA11yModule.d.ts +11 -4
- package/lib/types/a11y/PlotA11yView.d.ts +2 -13
- package/lib/types/a11y/hints.d.ts +5 -5
- package/lib/types/a11y/insights.d.ts +1 -1
- package/lib/types/a11y/intl.d.ts +1 -1
- package/lib/types/a11y/serialize.d.ts +7 -7
- package/lib/types/a11y/summarize.d.ts +2 -2
- package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
- package/lib/types/component/Chart/AbstractChart.d.ts +13 -20
- package/lib/types/component/Chart/AbstractChart.type.d.ts +25 -39
- package/lib/types/component/Chart/AreaChart.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +7 -17
- package/lib/types/component/Chart/BarChart.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +9 -14
- package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +5 -10
- package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +8 -18
- package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +6 -10
- package/lib/types/component/Chart/DonutChart.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +7 -16
- package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +4 -7
- package/lib/types/component/Chart/LineChart.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +7 -16
- package/lib/types/component/Chart/RadarChart.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +5 -7
- package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +6 -12
- package/lib/types/component/Chart/VennChart.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +6 -12
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +6 -8
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +5 -4
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +5 -4
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +10 -17
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
- package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
- package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +4 -3
- package/lib/types/index.d.ts +1 -3
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +0 -12
- package/lib/types/utils.d.ts +17 -17
- package/package.json +13 -13
- package/lib/cjs/component/SvgElement.js +0 -21
- package/lib/cjs/component/SvgElement.js.map +0 -1
- package/lib/cjs/style/abstract-chart.shadow.css +0 -12
- package/lib/es6/component/SvgElement.js +0 -14
- package/lib/es6/component/SvgElement.js.map +0 -1
- package/lib/es6/style/abstract-chart.shadow.css +0 -12
- package/lib/esm/component/SvgElement.mjs +0 -14
- package/lib/esm/style/abstract-chart.shadow.css +0 -12
- package/lib/types/component/SvgElement.d.ts +0 -10
|
@@ -1,33 +1,40 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import { sstyled
|
|
5
|
-
import {
|
|
6
|
-
import { Context, useI18n } from "@semcore/core/lib/utils/enhances/WithI18n";
|
|
4
|
+
import { sstyled } from "@semcore/utils/lib/core/index";
|
|
5
|
+
import { sstyled as sstyled$1, assignProps } from "@semcore/core";
|
|
7
6
|
import React from "react";
|
|
8
7
|
import { normalizeLocale } from "./locale.mjs";
|
|
9
8
|
import { localizedMessages } from "./translations/module/__intergalactic-dynamic-locales.mjs";
|
|
9
|
+
import { Context, useI18n } from "@semcore/utils/lib/enhances/WithI18n";
|
|
10
|
+
import { Box } from "@semcore/flex-box";
|
|
10
11
|
/*!__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
|
|
11
12
|
var styles = (
|
|
12
13
|
/*__reshadow_css_start__*/
|
|
13
14
|
(sstyled.insert(
|
|
14
15
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
16
|
+
".___SPlotA11yModule_1a5d0_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1a5d0_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}",
|
|
16
17
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
18
|
+
"1a5d0_gg_"
|
|
18
19
|
), /*__reshadow_css_end__*/
|
|
19
20
|
{
|
|
20
|
-
"__SPlotA11yModule": "
|
|
21
|
+
"__SPlotA11yModule": "___SPlotA11yModule_1a5d0_gg_"
|
|
21
22
|
})
|
|
22
23
|
);
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
var globalWasFocused = false;
|
|
25
|
+
var globalNavWithKeyboard = false;
|
|
26
|
+
var PlotA11yModule = function PlotA11yModule2(props) {
|
|
27
|
+
var _ref = arguments[0], _ref5;
|
|
25
28
|
var SPlotA11yModule = Box;
|
|
26
|
-
var _React$useState = React.useState(
|
|
27
|
-
var _React$useState3 = React.useState(
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
|
|
29
|
+
var _React$useState = React.useState(globalWasFocused), _React$useState2 = _slicedToArray(_React$useState, 2), wasFocused = _React$useState2[0], setWasFocused = _React$useState2[1];
|
|
30
|
+
var _React$useState3 = React.useState(globalNavWithKeyboard), _React$useState4 = _slicedToArray(_React$useState3, 2), navWithKeyboard = _React$useState4[0], setNavWithKeyboard = _React$useState4[1];
|
|
31
|
+
var _React$useState5 = React.useState(null), _React$useState6 = _slicedToArray(_React$useState5, 2), plotA11yView = _React$useState6[0], setPlotA11yView = _React$useState6[1];
|
|
32
|
+
var hadnleHiddenElementsFocus = React.useCallback(function() {
|
|
33
|
+
setWasFocused(true);
|
|
34
|
+
setNavWithKeyboard(true);
|
|
35
|
+
}, []);
|
|
36
|
+
var _React$useState7 = React.useState(false), _React$useState8 = _slicedToArray(_React$useState7, 2), loading = _React$useState8[0], setLoading = _React$useState8[1];
|
|
37
|
+
var _React$useState9 = React.useState(null), _React$useState10 = _slicedToArray(_React$useState9, 2), error = _React$useState10[0], setError = _React$useState10[1];
|
|
31
38
|
var contextLocale = React.useContext(Context);
|
|
32
39
|
var locale = React.useMemo(function() {
|
|
33
40
|
var _props$locale;
|
|
@@ -35,12 +42,42 @@ function PlotA11yModule(props) {
|
|
|
35
42
|
}, [props.locale]);
|
|
36
43
|
var t = useI18n(localizedMessages, locale);
|
|
37
44
|
React.useEffect(function() {
|
|
38
|
-
|
|
45
|
+
var _props$plotRef$curren;
|
|
46
|
+
if (wasFocused) return;
|
|
47
|
+
var focusListener = function focusListener2() {
|
|
48
|
+
globalWasFocused = true;
|
|
49
|
+
setWasFocused(true);
|
|
50
|
+
};
|
|
51
|
+
(_props$plotRef$curren = props.plotRef.current) === null || _props$plotRef$curren === void 0 ? void 0 : _props$plotRef$curren.addEventListener("focus", focusListener);
|
|
52
|
+
return function() {
|
|
53
|
+
var _props$plotRef$curren2;
|
|
54
|
+
return (_props$plotRef$curren2 = props.plotRef.current) === null || _props$plotRef$curren2 === void 0 ? void 0 : _props$plotRef$curren2.removeEventListener("focus", focusListener);
|
|
55
|
+
};
|
|
56
|
+
}, [wasFocused, props.plotRef]);
|
|
57
|
+
React.useEffect(function() {
|
|
58
|
+
var _document$body;
|
|
59
|
+
if (navWithKeyboard) return;
|
|
60
|
+
var keyboardListener = function keyboardListener2(event) {
|
|
61
|
+
var navigationKeys = ["Tab", "ArrowUp", "ArrowLeft", "ArrowDown", "ArrowRight", "ArrowUp", "ArrowLeft"];
|
|
62
|
+
if ("key" in event && navigationKeys.includes(event.key)) {
|
|
63
|
+
setNavWithKeyboard(true);
|
|
64
|
+
globalNavWithKeyboard = true;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
(_document$body = document.body) === null || _document$body === void 0 ? void 0 : _document$body.addEventListener("keydown", keyboardListener);
|
|
68
|
+
return function() {
|
|
69
|
+
var _document$body2;
|
|
70
|
+
return (_document$body2 = document.body) === null || _document$body2 === void 0 ? void 0 : _document$body2.removeEventListener("keydown", keyboardListener);
|
|
71
|
+
};
|
|
72
|
+
}, [navWithKeyboard]);
|
|
73
|
+
var shouldDisplayView = wasFocused && navWithKeyboard;
|
|
74
|
+
React.useEffect(function() {
|
|
75
|
+
if (!shouldDisplayView) return;
|
|
39
76
|
if (plotA11yView) return;
|
|
40
77
|
if (loading) return;
|
|
41
78
|
setLoading(true);
|
|
42
|
-
import("./PlotA11yView.mjs").then(function(
|
|
43
|
-
var PlotA11yView =
|
|
79
|
+
import("./PlotA11yView.mjs").then(function(_ref6) {
|
|
80
|
+
var PlotA11yView = _ref6.PlotA11yView;
|
|
44
81
|
setPlotA11yView({
|
|
45
82
|
Component: PlotA11yView
|
|
46
83
|
});
|
|
@@ -49,30 +86,32 @@ function PlotA11yModule(props) {
|
|
|
49
86
|
})["catch"](function(error2) {
|
|
50
87
|
console.error(error2);
|
|
51
88
|
setError(error2);
|
|
52
|
-
setLoading(false);
|
|
53
89
|
});
|
|
54
|
-
}, [plotA11yView,
|
|
90
|
+
}, [plotA11yView, shouldDisplayView, loading, setLoading]);
|
|
55
91
|
if (plotA11yView) {
|
|
56
|
-
|
|
57
|
-
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(plotA11yView.Component, _extends({}, props, {
|
|
58
|
-
onCloseHandler: function onCloseHandler() {
|
|
59
|
-
setIsOpened(false);
|
|
60
|
-
setPlotA11yView(null);
|
|
61
|
-
},
|
|
62
|
-
triggerRef: srButtonRef,
|
|
92
|
+
return sstyled$1(styles), /* @__PURE__ */ React.createElement(plotA11yView.Component, _extends({}, props, {
|
|
63
93
|
locale
|
|
64
94
|
}));
|
|
65
95
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
96
|
+
if (error) {
|
|
97
|
+
var _ref3;
|
|
98
|
+
return _ref3 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SPlotA11yModule, _ref3.cn("SPlotA11yModule", _objectSpread({}, assignProps({
|
|
99
|
+
"tabIndex": 0,
|
|
100
|
+
"aria-live": "assertive"
|
|
101
|
+
}, _ref))), t("failed"));
|
|
102
|
+
}
|
|
103
|
+
if (loading) {
|
|
104
|
+
var _ref4;
|
|
105
|
+
return _ref4 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SPlotA11yModule, _ref4.cn("SPlotA11yModule", _objectSpread({}, assignProps({
|
|
106
|
+
"tabIndex": 0,
|
|
107
|
+
"aria-live": "polite"
|
|
108
|
+
}, _ref))), t("loading"));
|
|
109
|
+
}
|
|
110
|
+
return _ref5 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SPlotA11yModule, _ref5.cn("SPlotA11yModule", _objectSpread({}, assignProps({
|
|
111
|
+
"tabIndex": 0,
|
|
112
|
+
"onFocus": hadnleHiddenElementsFocus
|
|
113
|
+
}, _ref))), t("disabled"));
|
|
114
|
+
};
|
|
76
115
|
export {
|
|
77
116
|
PlotA11yModule
|
|
78
117
|
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import { sstyled
|
|
4
|
-
import {
|
|
5
|
-
import { useAsyncI18nMessages } from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
3
|
+
import { sstyled } from "@semcore/utils/lib/core/index";
|
|
4
|
+
import { sstyled as sstyled$1, assignProps } from "@semcore/core";
|
|
6
5
|
import React from "react";
|
|
7
|
-
import { DataAccessibilityTable } from "./DataAccessibilityTable.mjs";
|
|
8
6
|
import { heavyFindNextFocusableElement } from "./focus.mjs";
|
|
9
7
|
import { makeDataSummarizationConfig } from "./hints.mjs";
|
|
10
8
|
import { getIntl } from "./intl.mjs";
|
|
11
9
|
import { summarize } from "./summarize.mjs";
|
|
10
|
+
import { Box } from "@semcore/flex-box";
|
|
11
|
+
import { useAsyncI18nMessages } from "@semcore/utils/lib/enhances/i18nEnhance";
|
|
12
12
|
import { localizedMessages } from "./translations/view/__intergalactic-dynamic-locales.mjs";
|
|
13
|
+
import { DataAccessibilityTable } from "./DataAccessibilityTable.mjs";
|
|
13
14
|
/*!__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
|
|
14
15
|
var styles = (
|
|
15
16
|
/*__reshadow_css_start__*/
|
|
16
17
|
(sstyled.insert(
|
|
17
18
|
/*__inner_css_start__*/
|
|
18
|
-
".
|
|
19
|
+
".___SPlotA11yView_lksxo_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral, rgb(255, 255, 255));color:var(--intergalactic-text-primary, rgba(1, 5, 0, 0.899));border:3px solid var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161));font-size:var(--intergalactic-fs-50, 10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}@supports (color:color(display-p3 0 0 0)){.___SPlotA11yView_lksxo_gg_{border:3px solid var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SPlotA11yView_lksxo_gg_{border:3px solid var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}.___SPlotA11yView_lksxo_gg_:focus,.___SPlotA11yView_lksxo_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_lksxo_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_lksxo_gg_ table,.___SPlotA11yView_lksxo_gg_ td,.___SPlotA11yView_lksxo_gg_ th{border:1px solid var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@supports (color:color(display-p3 0 0 0)){.___SPlotA11yView_lksxo_gg_ table,.___SPlotA11yView_lksxo_gg_ td,.___SPlotA11yView_lksxo_gg_ th{border:1px solid var(--intergalactic-border-primary, rgba(0, 12, 8, 0.161))}@media (color-gamut:p3){.___SPlotA11yView_lksxo_gg_ table,.___SPlotA11yView_lksxo_gg_ td,.___SPlotA11yView_lksxo_gg_ th{border:1px solid var(--intergalactic-border-primary, color(display-p3 0.00798 0.04498 0.03219 / 0.161))}}}",
|
|
19
20
|
/*__inner_css_end__*/
|
|
20
|
-
"
|
|
21
|
+
"lksxo_gg_"
|
|
21
22
|
), /*__reshadow_css_end__*/
|
|
22
23
|
{
|
|
23
|
-
"__SPlotA11yView": "
|
|
24
|
+
"__SPlotA11yView": "___SPlotA11yView_lksxo_gg_"
|
|
24
25
|
})
|
|
25
26
|
);
|
|
26
|
-
function
|
|
27
|
+
var PlotA11yView = function PlotA11yView2(_ref3) {
|
|
27
28
|
var _ref = arguments[0], _ref2;
|
|
28
|
-
var id = _ref3.id, providedData = _ref3.
|
|
29
|
+
var id = _ref3.id, providedData = _ref3.data, hints = _ref3.hints, plotLabel = _ref3.plotLabel, plotRef = _ref3.plotRef, providedConfig = _ref3.config, locale = _ref3.locale;
|
|
29
30
|
var SPlotA11yView = Box;
|
|
30
31
|
var translations = useAsyncI18nMessages(localizedMessages, locale);
|
|
31
32
|
var intl = React.useMemo(function() {
|
|
@@ -37,27 +38,8 @@ function PlotA11yView(_ref3) {
|
|
|
37
38
|
var data = React.useMemo(function() {
|
|
38
39
|
return Array.isArray(providedData) ? providedData : [providedData];
|
|
39
40
|
}, [providedData]);
|
|
40
|
-
var rootRef = React.useRef(null);
|
|
41
41
|
var _React$useState = React.useState(null), _React$useState2 = _slicedToArray(_React$useState, 2), summary = _React$useState2[0], setSummary = _React$useState2[1];
|
|
42
42
|
var _React$useState3 = React.useState(true), _React$useState4 = _slicedToArray(_React$useState3, 2), generatingSummary = _React$useState4[0], setGeneratingSummary = _React$useState4[1];
|
|
43
|
-
React.useEffect(function() {
|
|
44
|
-
var _rootRef$current, _rootRef$current3;
|
|
45
|
-
(_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 || _rootRef$current.focus();
|
|
46
|
-
function focusOutHandler(event) {
|
|
47
|
-
var _rootRef$current2;
|
|
48
|
-
if (event.relatedTarget === null) {
|
|
49
|
-
return requestIdleCallback(onCloseHandler);
|
|
50
|
-
}
|
|
51
|
-
if (!(event.relatedTarget instanceof HTMLElement)) return;
|
|
52
|
-
if ((_rootRef$current2 = rootRef.current) !== null && _rootRef$current2 !== void 0 && _rootRef$current2.contains(event.relatedTarget)) return;
|
|
53
|
-
requestIdleCallback(onCloseHandler);
|
|
54
|
-
}
|
|
55
|
-
(_rootRef$current3 = rootRef.current) === null || _rootRef$current3 === void 0 || _rootRef$current3.addEventListener("focusout", focusOutHandler);
|
|
56
|
-
return function() {
|
|
57
|
-
var _rootRef$current4;
|
|
58
|
-
return (_rootRef$current4 = rootRef.current) === null || _rootRef$current4 === void 0 ? void 0 : _rootRef$current4.removeEventListener("focusout", focusOutHandler);
|
|
59
|
-
};
|
|
60
|
-
}, []);
|
|
61
43
|
React.useEffect(function() {
|
|
62
44
|
if (config.disable) {
|
|
63
45
|
setSummary("");
|
|
@@ -75,18 +57,14 @@ function PlotA11yView(_ref3) {
|
|
|
75
57
|
}, 0);
|
|
76
58
|
}, [providedData, hints, config, locale, translations, localizedMessages]);
|
|
77
59
|
var handleClose = React.useCallback(function() {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
var _triggerRef$current;
|
|
81
|
-
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
|
|
82
|
-
});
|
|
60
|
+
var _plotRef$current;
|
|
61
|
+
(_plotRef$current = plotRef.current) === null || _plotRef$current === void 0 ? void 0 : _plotRef$current.focus();
|
|
83
62
|
}, []);
|
|
84
63
|
var handleSkip = React.useCallback(function(event) {
|
|
85
64
|
var _heavyFindNextFocusab;
|
|
86
65
|
event.preventDefault();
|
|
87
66
|
if (!plotRef.current) return;
|
|
88
|
-
(_heavyFindNextFocusab = heavyFindNextFocusableElement(plotRef.current)) === null || _heavyFindNextFocusab === void 0
|
|
89
|
-
onCloseHandler();
|
|
67
|
+
(_heavyFindNextFocusab = heavyFindNextFocusableElement(plotRef.current)) === null || _heavyFindNextFocusab === void 0 ? void 0 : _heavyFindNextFocusab.focus();
|
|
90
68
|
}, []);
|
|
91
69
|
var handleSkipKeyboard = React.useCallback(function(event) {
|
|
92
70
|
if (!(event.key === "Enter" || event.key === " ")) return;
|
|
@@ -95,7 +73,7 @@ function PlotA11yView(_ref3) {
|
|
|
95
73
|
var handleGoToTable = React.useCallback(function(event) {
|
|
96
74
|
var _dataTableRef$current;
|
|
97
75
|
event.preventDefault();
|
|
98
|
-
(_dataTableRef$current = dataTableRef.current) === null || _dataTableRef$current === void 0
|
|
76
|
+
(_dataTableRef$current = dataTableRef.current) === null || _dataTableRef$current === void 0 ? void 0 : _dataTableRef$current.focus();
|
|
99
77
|
}, []);
|
|
100
78
|
var handleGoToTableKeyboard = React.useCallback(function(event) {
|
|
101
79
|
if (!(event.key === "Enter" || event.key === " ")) return;
|
|
@@ -131,12 +109,11 @@ function PlotA11yView(_ref3) {
|
|
|
131
109
|
};
|
|
132
110
|
}, [intl, plotLabel]);
|
|
133
111
|
var dataTableRef = React.useRef(null);
|
|
134
|
-
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SPlotA11yView, _ref2.cn("SPlotA11yView", _objectSpread({}, assignProps({
|
|
112
|
+
return _ref2 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SPlotA11yView, _ref2.cn("SPlotA11yView", _objectSpread({}, assignProps({
|
|
135
113
|
"tabIndex": 0,
|
|
136
114
|
"aria-label": texts.label,
|
|
137
115
|
"role": "dialog",
|
|
138
|
-
"__excludeProps": ["data"]
|
|
139
|
-
"ref": rootRef
|
|
116
|
+
"__excludeProps": ["data"]
|
|
140
117
|
}, _ref))), /* @__PURE__ */ React.createElement("button", _ref2.cn("button", {
|
|
141
118
|
"type": "button",
|
|
142
119
|
"onClick": handleClose
|
|
@@ -163,8 +140,7 @@ function PlotA11yView(_ref3) {
|
|
|
163
140
|
"config": config,
|
|
164
141
|
"intl": intl
|
|
165
142
|
})));
|
|
166
|
-
}
|
|
167
|
-
;
|
|
143
|
+
};
|
|
168
144
|
export {
|
|
169
145
|
PlotA11yView
|
|
170
146
|
};
|
package/lib/esm/a11y/focus.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isFocusable } from "@semcore/
|
|
2
|
-
var
|
|
1
|
+
import { isFocusable } from "@semcore/utils/lib/focus-lock/isFocusable";
|
|
2
|
+
var findNextFocusableElementInChildren = function findNextFocusableElementInChildren2(element) {
|
|
3
3
|
if (element && isFocusable(element)) {
|
|
4
4
|
return element;
|
|
5
5
|
}
|
|
@@ -8,7 +8,7 @@ var _findNextFocusableElementInChildren = function findNextFocusableElementInChi
|
|
|
8
8
|
for (var i = 0; i < children.length; i++) {
|
|
9
9
|
var childChild = children.item(i);
|
|
10
10
|
if (!childChild) continue;
|
|
11
|
-
var result =
|
|
11
|
+
var result = findNextFocusableElementInChildren2(childChild);
|
|
12
12
|
if (result) return result;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -33,7 +33,7 @@ var heavyFindNextFocusableElement = function heavyFindNextFocusableElement2(base
|
|
|
33
33
|
siblings = siblings.slice(siblings.indexOf(parents[i - 1] || base) + 1);
|
|
34
34
|
}
|
|
35
35
|
for (var _i = 0; _i < siblings.length; _i++) {
|
|
36
|
-
var focusable =
|
|
36
|
+
var focusable = findNextFocusableElementInChildren(siblings[_i]);
|
|
37
37
|
if (focusable) return focusable;
|
|
38
38
|
}
|
|
39
39
|
}
|
package/lib/esm/a11y/hints.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
4
|
-
import reactToText from "@semcore/
|
|
4
|
+
import reactToText from "@semcore/utils/lib/reactToText";
|
|
5
5
|
var makeDataHintsContainer = function makeDataHintsContainer2() {
|
|
6
6
|
return {
|
|
7
7
|
fields: {
|
|
@@ -105,7 +105,7 @@ var makeDataSummarizationConfig = function makeDataSummarizationConfig2(config)
|
|
|
105
105
|
"static": 1 / 15,
|
|
106
106
|
weak: 1 / 10,
|
|
107
107
|
medium: 1 / 5,
|
|
108
|
-
strong:
|
|
108
|
+
strong: Infinity
|
|
109
109
|
}, (_config$trendTangens = config === null || config === void 0 ? void 0 : config.trendTangens) !== null && _config$trendTangens !== void 0 ? _config$trendTangens : {}),
|
|
110
110
|
movingAverage: _objectSpread({
|
|
111
111
|
longSize: void 0,
|
|
@@ -124,9 +124,9 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
124
124
|
for (var i2 in values2) {
|
|
125
125
|
var _values$i, _longMovingAverage$i, _shortMovingAverage$i;
|
|
126
126
|
table.push({
|
|
127
|
-
value: ((_values$i = values2[i2]) !== null && _values$i !== void 0 ? _values$i :
|
|
128
|
-
"long": ((_longMovingAverage$i = longMovingAverage[i2]) !== null && _longMovingAverage$i !== void 0 ? _longMovingAverage$i :
|
|
129
|
-
"short": ((_shortMovingAverage$i = shortMovingAverage[i2]) !== null && _shortMovingAverage$i !== void 0 ? _shortMovingAverage$i :
|
|
127
|
+
value: ((_values$i = values2[i2]) !== null && _values$i !== void 0 ? _values$i : NaN).toFixed(2),
|
|
128
|
+
"long": ((_longMovingAverage$i = longMovingAverage[i2]) !== null && _longMovingAverage$i !== void 0 ? _longMovingAverage$i : NaN).toFixed(2),
|
|
129
|
+
"short": ((_shortMovingAverage$i = shortMovingAverage[i2]) !== null && _shortMovingAverage$i !== void 0 ? _shortMovingAverage$i : NaN).toFixed(2)
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
var strengthsMap = {
|
|
@@ -254,7 +254,7 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
254
254
|
_iterator.f();
|
|
255
255
|
}
|
|
256
256
|
} else if (dataType === "points-cloud") {
|
|
257
|
-
var _ref7, _config$clustersGridS, _insights2;
|
|
257
|
+
var _ref7, _config$clustersGridS, _relativeSizeDistrivu, _insights2;
|
|
258
258
|
var guessedXKey = [].concat(_toConsumableArray(hints.fields.horizontalAxes.values()), ["x"])[0];
|
|
259
259
|
var guessedYKey = [].concat(_toConsumableArray(hints.fields.verticalAxes.values()), ["y"])[0];
|
|
260
260
|
var guessedValueKey = [].concat(_toConsumableArray(hints.fields.valueAxes.values()), ["value"])[0];
|
|
@@ -274,9 +274,9 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
274
274
|
var _iterator2 = _createForOfIteratorHelper(normalized), _step2;
|
|
275
275
|
try {
|
|
276
276
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
|
|
277
|
-
var _step2$value = _step2.value,
|
|
278
|
-
usedX.add(
|
|
279
|
-
usedY.add(
|
|
277
|
+
var _step2$value = _step2.value, _x = _step2$value.x, _y = _step2$value.y;
|
|
278
|
+
usedX.add(_x);
|
|
279
|
+
usedY.add(_y);
|
|
280
280
|
}
|
|
281
281
|
} catch (err) {
|
|
282
282
|
_iterator2.e(err);
|
|
@@ -289,29 +289,29 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
289
289
|
var orderedY = _toConsumableArray(usedY).sort(function(a, b) {
|
|
290
290
|
return a - b;
|
|
291
291
|
});
|
|
292
|
-
var distancesX = orderedX.slice(0, -1).map(function(
|
|
293
|
-
return orderedX[index + 1] -
|
|
292
|
+
var distancesX = orderedX.slice(0, -1).map(function(x, index) {
|
|
293
|
+
return orderedX[index + 1] - x;
|
|
294
294
|
});
|
|
295
|
-
var distancesY = orderedY.slice(0, -1).map(function(
|
|
296
|
-
return orderedY[index + 1] -
|
|
295
|
+
var distancesY = orderedY.slice(0, -1).map(function(y, index) {
|
|
296
|
+
return orderedY[index + 1] - y;
|
|
297
297
|
});
|
|
298
|
-
var avgDistanceX = distancesX.reduce(function(sum,
|
|
299
|
-
return sum +
|
|
298
|
+
var avgDistanceX = distancesX.reduce(function(sum, x) {
|
|
299
|
+
return sum + x;
|
|
300
300
|
}, 0) / distancesX.length;
|
|
301
|
-
var avgDistanceY = distancesY.reduce(function(sum,
|
|
302
|
-
return sum +
|
|
301
|
+
var avgDistanceY = distancesY.reduce(function(sum, y) {
|
|
302
|
+
return sum + y;
|
|
303
303
|
}, 0) / distancesY.length;
|
|
304
|
-
var belowAvgDistancesX = distancesX.filter(function(
|
|
305
|
-
return
|
|
304
|
+
var belowAvgDistancesX = distancesX.filter(function(x) {
|
|
305
|
+
return x < avgDistanceX;
|
|
306
306
|
});
|
|
307
|
-
var belowAvgDistancesY = distancesY.filter(function(
|
|
308
|
-
return
|
|
307
|
+
var belowAvgDistancesY = distancesY.filter(function(y) {
|
|
308
|
+
return y < avgDistanceY;
|
|
309
309
|
});
|
|
310
|
-
var betweenDistanceX = belowAvgDistancesX.reduce(function(sum,
|
|
311
|
-
return sum +
|
|
310
|
+
var betweenDistanceX = belowAvgDistancesX.reduce(function(sum, x) {
|
|
311
|
+
return sum + x;
|
|
312
312
|
}, 0) / belowAvgDistancesX.length;
|
|
313
|
-
var betweenDistanceY = belowAvgDistancesY.reduce(function(sum,
|
|
314
|
-
return sum +
|
|
313
|
+
var betweenDistanceY = belowAvgDistancesY.reduce(function(sum, y) {
|
|
314
|
+
return sum + y;
|
|
315
315
|
}, 0) / belowAvgDistancesY.length;
|
|
316
316
|
var avgDistance = 0;
|
|
317
317
|
if (!Number.isNaN(betweenDistanceX) && !Number.isNaN(betweenDistanceY)) {
|
|
@@ -330,11 +330,11 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
330
330
|
var takenX = /* @__PURE__ */ new Set();
|
|
331
331
|
for (var i = 0; i < normalized.length; i++) {
|
|
332
332
|
var _grid$gridX, _grid$gridX$gridY;
|
|
333
|
-
var _normalized$i = normalized[i],
|
|
334
|
-
var gridX = Math.round(
|
|
335
|
-
var gridY = Math.round(
|
|
336
|
-
takenY.add(
|
|
337
|
-
takenX.add(
|
|
333
|
+
var _normalized$i = normalized[i], _x2 = _normalized$i.x, _y2 = _normalized$i.y;
|
|
334
|
+
var gridX = Math.round(_x2 / gridSize);
|
|
335
|
+
var gridY = Math.round(_y2 / gridSize);
|
|
336
|
+
takenY.add(_y2);
|
|
337
|
+
takenX.add(_x2);
|
|
338
338
|
grid[gridX] = (_grid$gridX = grid[gridX]) !== null && _grid$gridX !== void 0 ? _grid$gridX : {};
|
|
339
339
|
grid[gridX][gridY] = (_grid$gridX$gridY = grid[gridX][gridY]) !== null && _grid$gridX$gridY !== void 0 ? _grid$gridX$gridY : {
|
|
340
340
|
clusterId: "".concat(gridX, "_").concat(gridY),
|
|
@@ -343,36 +343,36 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
343
343
|
grid[gridX][gridY].members.push(normalized[i]);
|
|
344
344
|
}
|
|
345
345
|
var clusters = {};
|
|
346
|
-
var _iterator3 = _createForOfIteratorHelper(Object.keys(grid).map(function(
|
|
347
|
-
return
|
|
346
|
+
var _iterator3 = _createForOfIteratorHelper(Object.keys(grid).map(function(x) {
|
|
347
|
+
return parseInt(x, 10);
|
|
348
348
|
})), _step3;
|
|
349
349
|
try {
|
|
350
350
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) {
|
|
351
|
-
var
|
|
352
|
-
var _iterator4 = _createForOfIteratorHelper(Object.keys(grid[
|
|
353
|
-
return
|
|
351
|
+
var _x4 = _step3.value;
|
|
352
|
+
var _iterator4 = _createForOfIteratorHelper(Object.keys(grid[_x4]).map(function(y) {
|
|
353
|
+
return parseInt(y, 10);
|
|
354
354
|
})), _step4;
|
|
355
355
|
try {
|
|
356
356
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) {
|
|
357
|
-
var _clusters$grid$
|
|
358
|
-
var
|
|
357
|
+
var _clusters$grid$_x4$_y, _clusters$grid$_x4$_y2;
|
|
358
|
+
var _y4 = _step4.value;
|
|
359
359
|
var pointHandled = false;
|
|
360
|
-
for (var _i4 = 0, _arr = [
|
|
360
|
+
for (var _i4 = 0, _arr = [_x4 - 1, _x4, _x4 + 1]; _i4 < _arr.length; _i4++) {
|
|
361
361
|
var xNeighbour = _arr[_i4];
|
|
362
|
-
for (var _i5 = 0, _arr2 = [
|
|
362
|
+
for (var _i5 = 0, _arr2 = [_y4 - 1, _y4, _y4 + 1]; _i5 < _arr2.length; _i5++) {
|
|
363
363
|
var _grid$xNeighbour;
|
|
364
364
|
var yNeighbour = _arr2[_i5];
|
|
365
365
|
if (xNeighbour === void 0 || yNeighbour === void 0) continue;
|
|
366
|
-
if (xNeighbour ===
|
|
366
|
+
if (xNeighbour === _x4 && yNeighbour === _y4) continue;
|
|
367
367
|
if (!((_grid$xNeighbour = grid[xNeighbour]) !== null && _grid$xNeighbour !== void 0 && _grid$xNeighbour[yNeighbour])) continue;
|
|
368
368
|
pointHandled = true;
|
|
369
|
-
grid[
|
|
369
|
+
grid[_x4][_y4].clusterId = grid[xNeighbour][yNeighbour].clusterId;
|
|
370
370
|
break;
|
|
371
371
|
}
|
|
372
372
|
if (pointHandled) break;
|
|
373
373
|
}
|
|
374
|
-
clusters[grid[
|
|
375
|
-
(_clusters$grid$
|
|
374
|
+
clusters[grid[_x4][_y4].clusterId] = (_clusters$grid$_x4$_y = clusters[grid[_x4][_y4].clusterId]) !== null && _clusters$grid$_x4$_y !== void 0 ? _clusters$grid$_x4$_y : [];
|
|
375
|
+
(_clusters$grid$_x4$_y2 = clusters[grid[_x4][_y4].clusterId]).push.apply(_clusters$grid$_x4$_y2, _toConsumableArray(grid[_x4][_y4].members));
|
|
376
376
|
}
|
|
377
377
|
} catch (err) {
|
|
378
378
|
_iterator4.e(err);
|
|
@@ -386,13 +386,13 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
386
386
|
_iterator3.f();
|
|
387
387
|
}
|
|
388
388
|
var clustersInsights = [];
|
|
389
|
-
for (var
|
|
389
|
+
for (var _clusterId in clusters) {
|
|
390
390
|
var _hints$axesTitle$hori, _hints$axesTitle$vert3;
|
|
391
|
-
var size = clusters[
|
|
391
|
+
var size = clusters[_clusterId].reduce(function(sum, _ref8) {
|
|
392
392
|
var value = _ref8.value;
|
|
393
393
|
return sum + (value !== null && value !== void 0 ? value : 1);
|
|
394
394
|
}, 0);
|
|
395
|
-
var labels = _toConsumableArray(clusters[
|
|
395
|
+
var labels = _toConsumableArray(clusters[_clusterId]).sort(function(a, b) {
|
|
396
396
|
return b.value - a.value;
|
|
397
397
|
}).map(function(_ref9) {
|
|
398
398
|
var label = _ref9.label;
|
|
@@ -401,14 +401,14 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
401
401
|
return label !== void 0;
|
|
402
402
|
});
|
|
403
403
|
var uniqueLabels = _toConsumableArray(new Set(labels));
|
|
404
|
-
var
|
|
405
|
-
var
|
|
406
|
-
return sum +
|
|
407
|
-
}, 0) / clusters[
|
|
408
|
-
var
|
|
409
|
-
var
|
|
410
|
-
return sum +
|
|
411
|
-
}, 0) / clusters[
|
|
404
|
+
var _x3 = clusters[_clusterId].reduce(function(sum, _ref10) {
|
|
405
|
+
var x = _ref10.x;
|
|
406
|
+
return sum + x;
|
|
407
|
+
}, 0) / clusters[_clusterId].length;
|
|
408
|
+
var _y3 = clusters[_clusterId].reduce(function(sum, _ref11) {
|
|
409
|
+
var y = _ref11.y;
|
|
410
|
+
return sum + y;
|
|
411
|
+
}, 0) / clusters[_clusterId].length;
|
|
412
412
|
clustersInsights.push({
|
|
413
413
|
type: "cluster",
|
|
414
414
|
priority: 1,
|
|
@@ -416,8 +416,8 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
416
416
|
labels: uniqueLabels,
|
|
417
417
|
relativeSize: "average",
|
|
418
418
|
center: {
|
|
419
|
-
x:
|
|
420
|
-
y:
|
|
419
|
+
x: _x3,
|
|
420
|
+
y: _y3,
|
|
421
421
|
xLabel: (_hints$axesTitle$hori = hints.axesTitle.horizontal) !== null && _hints$axesTitle$hori !== void 0 ? _hints$axesTitle$hori : guessedXKey,
|
|
422
422
|
yLabel: (_hints$axesTitle$vert3 = hints.axesTitle.vertical) !== null && _hints$axesTitle$vert3 !== void 0 ? _hints$axesTitle$vert3 : guessedYKey
|
|
423
423
|
}
|
|
@@ -427,28 +427,28 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
427
427
|
clustersInsights.sort(function(a, b) {
|
|
428
428
|
return b.size - a.size;
|
|
429
429
|
});
|
|
430
|
-
var relativeSizeDistrivution =
|
|
431
|
-
max:
|
|
430
|
+
var relativeSizeDistrivution = (_relativeSizeDistrivu = {}, _defineProperty(_relativeSizeDistrivu, "significantly-bigger", {
|
|
431
|
+
max: Infinity,
|
|
432
432
|
min: 0.85
|
|
433
|
-
}), "bigger", {
|
|
433
|
+
}), _defineProperty(_relativeSizeDistrivu, "bigger", {
|
|
434
434
|
min: 0.7,
|
|
435
435
|
max: 0.85
|
|
436
|
-
}), "slightly-bigger", {
|
|
436
|
+
}), _defineProperty(_relativeSizeDistrivu, "slightly-bigger", {
|
|
437
437
|
min: 0.6,
|
|
438
438
|
max: 0.7
|
|
439
|
-
}), "average", {
|
|
439
|
+
}), _defineProperty(_relativeSizeDistrivu, "average", {
|
|
440
440
|
min: 0.4,
|
|
441
441
|
max: 0.6
|
|
442
|
-
}), "slightly-smaller", {
|
|
442
|
+
}), _defineProperty(_relativeSizeDistrivu, "slightly-smaller", {
|
|
443
443
|
max: 0.4,
|
|
444
444
|
min: 0.3
|
|
445
|
-
}), "smaller", {
|
|
445
|
+
}), _defineProperty(_relativeSizeDistrivu, "smaller", {
|
|
446
446
|
min: 0.15,
|
|
447
447
|
max: 0.3
|
|
448
|
-
}), "significantly-smaller", {
|
|
449
|
-
min:
|
|
448
|
+
}), _defineProperty(_relativeSizeDistrivu, "significantly-smaller", {
|
|
449
|
+
min: -Infinity,
|
|
450
450
|
max: 0.15
|
|
451
|
-
});
|
|
451
|
+
}), _relativeSizeDistrivu);
|
|
452
452
|
var averageSize = clustersInsights.reduce(function(sum, cluster) {
|
|
453
453
|
return sum + cluster.size;
|
|
454
454
|
}, 0) / clustersInsights.length;
|
|
@@ -535,12 +535,12 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
535
535
|
var allRowsIds = data.map(makeRowKey);
|
|
536
536
|
var groupedValues = {};
|
|
537
537
|
for (var _i6 = 0; _i6 < data.length; _i6++) {
|
|
538
|
-
var _groupedValues$key, _hints$titles$getHori9, _hints$titles$
|
|
538
|
+
var _groupedValues$key, _hints$titles$getHori9, _hints$titles$getHori10, _hints$titles5;
|
|
539
539
|
var row = data[_i6];
|
|
540
540
|
var key = allRowsIds[_i6];
|
|
541
541
|
var groupKeyValue = getPropByPath(row, groupKeys[0]);
|
|
542
542
|
groupedValues[key] = (_groupedValues$key = groupedValues[key]) !== null && _groupedValues$key !== void 0 ? _groupedValues$key : {
|
|
543
|
-
groupName: (_hints$titles$getHori9 = (_hints$titles$
|
|
543
|
+
groupName: (_hints$titles$getHori9 = (_hints$titles$getHori10 = (_hints$titles5 = hints.titles).getHorizontalAxesTitle) === null || _hints$titles$getHori10 === void 0 ? void 0 : _hints$titles$getHori10.call(_hints$titles5, groupKeyValue)) !== null && _hints$titles$getHori9 !== void 0 ? _hints$titles$getHori9 : groupKeyValue,
|
|
544
544
|
rows: []
|
|
545
545
|
};
|
|
546
546
|
groupedValues[key].rows.push(row);
|
|
@@ -556,9 +556,9 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
556
556
|
fields = fields.filter(function(key2) {
|
|
557
557
|
return !grouppingKeys[key2];
|
|
558
558
|
});
|
|
559
|
-
var groups = Object.entries(groupedValues).map(function(
|
|
559
|
+
var groups = Object.entries(groupedValues).map(function(_ref12) {
|
|
560
560
|
var _group$groupName;
|
|
561
|
-
var
|
|
561
|
+
var _ref13 = _slicedToArray(_ref12, 2), groupKey = _ref13[0], group = _ref13[1];
|
|
562
562
|
var values2 = [];
|
|
563
563
|
var _iterator5 = _createForOfIteratorHelper(group.rows), _step5;
|
|
564
564
|
try {
|
|
@@ -567,10 +567,10 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
567
567
|
var _iterator6 = _createForOfIteratorHelper(fields), _step6;
|
|
568
568
|
try {
|
|
569
569
|
for (_iterator6.s(); !(_step6 = _iterator6.n()).done; ) {
|
|
570
|
-
var
|
|
570
|
+
var _ref15, _hints$titles$valuesA, _hints$titles$getVert, _hints$titles6;
|
|
571
571
|
var field = _step6.value;
|
|
572
572
|
values2.push({
|
|
573
|
-
label: (
|
|
573
|
+
label: (_ref15 = (_hints$titles$valuesA = hints.titles.valuesAxes[field]) !== null && _hints$titles$valuesA !== void 0 ? _hints$titles$valuesA : (_hints$titles$getVert = (_hints$titles6 = hints.titles).getVerticalAxesTitle) === null || _hints$titles$getVert === void 0 ? void 0 : _hints$titles$getVert.call(_hints$titles6, field)) !== null && _ref15 !== void 0 ? _ref15 : field,
|
|
574
574
|
value: getPropByPath(_row, field)
|
|
575
575
|
});
|
|
576
576
|
}
|
|
@@ -589,8 +589,8 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
589
589
|
if (typeof a.value !== "number" || typeof b.value !== "number") return 0;
|
|
590
590
|
return b.value - a.value;
|
|
591
591
|
});
|
|
592
|
-
var averageValue = values2.reduce(function(sum,
|
|
593
|
-
var value =
|
|
592
|
+
var averageValue = values2.reduce(function(sum, _ref14) {
|
|
593
|
+
var value = _ref14.value;
|
|
594
594
|
return sum + value;
|
|
595
595
|
}, 0) / values2.length;
|
|
596
596
|
return {
|
|
@@ -620,9 +620,9 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
620
620
|
_fields2.push.apply(_fields2, _toConsumableArray(Object.keys(keysMap)));
|
|
621
621
|
}
|
|
622
622
|
var values = _fields2.map(function(field) {
|
|
623
|
-
var
|
|
623
|
+
var _ref16, _hints$titles$valuesA2, _hints$titles$getValu, _hints$titles7;
|
|
624
624
|
return {
|
|
625
|
-
label: (
|
|
625
|
+
label: (_ref16 = (_hints$titles$valuesA2 = hints.titles.valuesAxes[field]) !== null && _hints$titles$valuesA2 !== void 0 ? _hints$titles$valuesA2 : (_hints$titles$getValu = (_hints$titles7 = hints.titles).getValueAxesTitle) === null || _hints$titles$getValu === void 0 ? void 0 : _hints$titles$getValu.call(_hints$titles7, field)) !== null && _ref16 !== void 0 ? _ref16 : field,
|
|
626
626
|
value: getPropByPath(data, field)
|
|
627
627
|
};
|
|
628
628
|
});
|
|
@@ -653,8 +653,8 @@ var extractDataInsights = function extractDataInsights2(data, hints, config) {
|
|
|
653
653
|
if (typeof a.value !== "number" || typeof b.value !== "number") return 0;
|
|
654
654
|
return b.value - a.value;
|
|
655
655
|
});
|
|
656
|
-
var averageValue = values2.reduce(function(sum,
|
|
657
|
-
var value =
|
|
656
|
+
var averageValue = values2.reduce(function(sum, _ref17) {
|
|
657
|
+
var value = _ref17.value;
|
|
658
658
|
return sum + value;
|
|
659
659
|
}, 0) / values2.length;
|
|
660
660
|
return {
|