@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
package/lib/esm/Venn.mjs
CHANGED
|
@@ -1,61 +1,53 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
7
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
3
|
import { sstyled, assignProps, Component } from "@semcore/core";
|
|
10
|
-
import { FadeInOut } from "@semcore/
|
|
4
|
+
import { FadeInOut } from "@semcore/base-components";
|
|
11
5
|
import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
|
|
12
6
|
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
13
7
|
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
14
|
-
import { scaleSolution, normalizeSolution, venn
|
|
8
|
+
import { intersectionAreaPath, scaleSolution, normalizeSolution, venn } from "@upsetjs/venn.js";
|
|
15
9
|
import React from "react";
|
|
16
10
|
import createElement from "./createElement.mjs";
|
|
17
11
|
import { PatternFill } from "./Pattern.mjs";
|
|
18
12
|
import Tooltip from "./Tooltip.mjs";
|
|
19
13
|
import { getChartDefaultColorName } from "./utils.mjs";
|
|
20
14
|
/*!__reshadow-styles__:"./style/venn.shadow.css"*/
|
|
21
|
-
|
|
15
|
+
const style = (
|
|
22
16
|
/*__reshadow_css_start__*/
|
|
23
17
|
(sstyled.insert(
|
|
24
18
|
/*__inner_css_start__*/
|
|
25
|
-
".
|
|
19
|
+
".___SCircle_1irr3_gg_,.___SIntersection_1irr3_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px}.___SCircle_1irr3_gg_{fill:var(--intergalactic-chart-palette-order-2, #59ddaa);fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1irr3);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_1irr3_gg_:hover{fill-opacity:.7}}.___SCircle_1irr3_gg_.__color_1irr3_gg_{fill:var(--color_1irr3)}.___SCircle_1irr3_gg_.__pattern_1irr3_gg_.__color_1irr3_gg_{fill:var(--pattern_1irr3);fill-opacity:.7;stroke:var(--color_1irr3);stroke-width:1px}@media (hover:hover){.___SCircle_1irr3_gg_.__pattern_1irr3_gg_.__color_1irr3_gg_:hover{fill-opacity:.85}}.___SCircle_1irr3_gg_.__transparent_1irr3_gg_{opacity:.3}.___SIntersection_1irr3_gg_{fill-opacity:0}@media (hover:hover){.___SIntersection_1irr3_gg_:hover{fill-opacity:.1}}.___SIntersection_1irr3_gg_.__transparent_1irr3_gg_{opacity:.3}",
|
|
26
20
|
/*__inner_css_end__*/
|
|
27
|
-
"
|
|
21
|
+
"1irr3_gg_"
|
|
28
22
|
), /*__reshadow_css_end__*/
|
|
29
23
|
{
|
|
30
|
-
"__SCircle": "
|
|
31
|
-
"_color": "
|
|
32
|
-
"--color": "--
|
|
33
|
-
"_transparent": "
|
|
34
|
-
"__SIntersection": "
|
|
35
|
-
"--duration": "--
|
|
36
|
-
"_pattern": "
|
|
37
|
-
"--pattern": "--
|
|
24
|
+
"__SCircle": "___SCircle_1irr3_gg_",
|
|
25
|
+
"_color": "__color_1irr3_gg_",
|
|
26
|
+
"--color": "--color_1irr3",
|
|
27
|
+
"_transparent": "__transparent_1irr3_gg_",
|
|
28
|
+
"__SIntersection": "___SIntersection_1irr3_gg_",
|
|
29
|
+
"--duration": "--duration_1irr3",
|
|
30
|
+
"_pattern": "__pattern_1irr3_gg_",
|
|
31
|
+
"--pattern": "--pattern_1irr3"
|
|
38
32
|
})
|
|
39
33
|
);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
eventEmitter.emit("setTooltipVisible_".concat(plotId), visible);
|
|
56
|
-
};
|
|
34
|
+
class VennRoot extends Component {
|
|
35
|
+
constructor(...args) {
|
|
36
|
+
super(...args);
|
|
37
|
+
_defineProperty(this, "virtualElement", canUseDOM() ? document.createElement("div") : {});
|
|
38
|
+
_defineProperty(this, "bindHandlerTooltip", (visible, props, tooltipProps) => ({
|
|
39
|
+
clientX,
|
|
40
|
+
clientY
|
|
41
|
+
}) => {
|
|
42
|
+
const {
|
|
43
|
+
eventEmitter,
|
|
44
|
+
plotId
|
|
45
|
+
} = this.asProps;
|
|
46
|
+
eventEmitter.emit(`setTooltipPosition_${plotId}`, clientX, clientY);
|
|
47
|
+
eventEmitter.emit(`setTooltipRenderingProps_${plotId}`, props, tooltipProps);
|
|
48
|
+
eventEmitter.emit(`setTooltipVisible_${plotId}`, visible);
|
|
57
49
|
});
|
|
58
|
-
_defineProperty(
|
|
50
|
+
_defineProperty(this, "renderElement", /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
59
51
|
return /* @__PURE__ */ React.createElement(FadeInOut, _extends({
|
|
60
52
|
"aria-hidden": true,
|
|
61
53
|
ref,
|
|
@@ -63,154 +55,150 @@ var VennRoot = /* @__PURE__ */ (function(_Component) {
|
|
|
63
55
|
visible: true
|
|
64
56
|
}, props));
|
|
65
57
|
}));
|
|
66
|
-
return _this;
|
|
67
58
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
}, {
|
|
170
|
-
key: "render",
|
|
171
|
-
value: function render() {
|
|
172
|
-
var Element = this.Element;
|
|
173
|
-
this.asProps.dataHintsHandler.establishDataType("values-set");
|
|
174
|
-
this.vennData = this.getVennData();
|
|
175
|
-
return /* @__PURE__ */ React.createElement(Element, {
|
|
176
|
-
"aria-hidden": true,
|
|
177
|
-
render: this.renderElement,
|
|
178
|
-
childrenPosition: "inside",
|
|
179
|
-
vennData: this.vennData
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
}]);
|
|
183
|
-
})(Component);
|
|
59
|
+
generateGetBoundingClientRect(x = 0, y = 0) {
|
|
60
|
+
return () => ({
|
|
61
|
+
width: 0,
|
|
62
|
+
height: 0,
|
|
63
|
+
top: y,
|
|
64
|
+
right: x,
|
|
65
|
+
bottom: y,
|
|
66
|
+
left: x
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
getVennData() {
|
|
70
|
+
const {
|
|
71
|
+
data,
|
|
72
|
+
orientation,
|
|
73
|
+
orientationOrder,
|
|
74
|
+
size
|
|
75
|
+
} = this.asProps;
|
|
76
|
+
const [width, height] = size;
|
|
77
|
+
const vennData = Object.entries(data).map(([dataKey, size2]) => ({
|
|
78
|
+
sets: dataKey.split("/"),
|
|
79
|
+
size: size2
|
|
80
|
+
}));
|
|
81
|
+
return scaleSolution(normalizeSolution(venn(vennData), orientation, orientationOrder), width, height, 10);
|
|
82
|
+
}
|
|
83
|
+
getTooltipProps() {
|
|
84
|
+
return {
|
|
85
|
+
uniqId: this.asProps.uid
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
getCircleProps(props, index) {
|
|
89
|
+
const colorBackwardCapabilityOffset = 1;
|
|
90
|
+
const color = props.color || getChartDefaultColorName(index + colorBackwardCapabilityOffset);
|
|
91
|
+
const tooltipProps = {
|
|
92
|
+
dataKey: props.dataKey,
|
|
93
|
+
name: props.name,
|
|
94
|
+
color,
|
|
95
|
+
patterns: this.asProps.patterns
|
|
96
|
+
};
|
|
97
|
+
return {
|
|
98
|
+
duration: this.asProps.duration,
|
|
99
|
+
data: this.vennData[props.dataKey],
|
|
100
|
+
originalData: this.asProps.data[props.dataKey],
|
|
101
|
+
onMouseMove: this.bindHandlerTooltip(true, props, tooltipProps),
|
|
102
|
+
onMouseLeave: this.bindHandlerTooltip(false, props, tooltipProps),
|
|
103
|
+
transparent: this.asProps.transparent,
|
|
104
|
+
resolveColor: this.asProps.resolveColor,
|
|
105
|
+
color,
|
|
106
|
+
uid: `${this.asProps.uid}-${index}`,
|
|
107
|
+
patterns: this.asProps.patterns,
|
|
108
|
+
minRadius: this.asProps.minRadius,
|
|
109
|
+
onClickCircleRoot: this.handlerOnClick(props.dataKey).bind(this)
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
getIntersectionProps(props) {
|
|
113
|
+
const {
|
|
114
|
+
duration,
|
|
115
|
+
transparent
|
|
116
|
+
} = this.asProps;
|
|
117
|
+
const dataKeys = props.dataKey.split("/");
|
|
118
|
+
const tooltipProps = {
|
|
119
|
+
dataKey: props.dataKey,
|
|
120
|
+
name: props.name,
|
|
121
|
+
color: props.color,
|
|
122
|
+
duration: props.duration,
|
|
123
|
+
transparent: props.transparent
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
duration,
|
|
127
|
+
delay: duration,
|
|
128
|
+
data: Object.values(this.vennData).filter((d) => dataKeys.includes(d.setid)),
|
|
129
|
+
originalData: this.asProps.data[props.dataKey],
|
|
130
|
+
onMouseMove: this.bindHandlerTooltip(true, props, tooltipProps),
|
|
131
|
+
onMouseLeave: this.bindHandlerTooltip(false, props, tooltipProps),
|
|
132
|
+
transparent,
|
|
133
|
+
resolveColor: this.asProps.resolveColor,
|
|
134
|
+
onClickIntersectionRoot: this.handlerOnClick(props.dataKey).bind(this)
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
handlerOnClick(dataKey) {
|
|
138
|
+
return (e) => {
|
|
139
|
+
e.stopPropagation();
|
|
140
|
+
const {
|
|
141
|
+
onClick
|
|
142
|
+
} = this.asProps;
|
|
143
|
+
if (!onClick) return;
|
|
144
|
+
onClick(dataKey, e);
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
render() {
|
|
148
|
+
const Element = this.Element;
|
|
149
|
+
this.asProps.dataHintsHandler.establishDataType("values-set");
|
|
150
|
+
this.vennData = this.getVennData();
|
|
151
|
+
return /* @__PURE__ */ React.createElement(Element, {
|
|
152
|
+
"aria-hidden": true,
|
|
153
|
+
render: this.renderElement,
|
|
154
|
+
childrenPosition: "inside",
|
|
155
|
+
vennData: this.vennData
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
184
159
|
_defineProperty(VennRoot, "displayName", "Venn");
|
|
185
160
|
_defineProperty(VennRoot, "style", style);
|
|
186
161
|
_defineProperty(VennRoot, "defaultProps", {
|
|
187
162
|
orientation: Math.PI / 2,
|
|
188
|
-
orientationOrder:
|
|
189
|
-
return c2.radius - c1.radius;
|
|
190
|
-
},
|
|
163
|
+
orientationOrder: (c1, c2) => c2.radius - c1.radius,
|
|
191
164
|
duration: 500,
|
|
192
165
|
minRadius: 6
|
|
193
166
|
});
|
|
194
167
|
_defineProperty(VennRoot, "enhance", [uniqueIDEnhancement()]);
|
|
195
|
-
function Circle(
|
|
168
|
+
function Circle({
|
|
169
|
+
Element: SCircle,
|
|
170
|
+
styles,
|
|
171
|
+
color,
|
|
172
|
+
resolveColor,
|
|
173
|
+
data,
|
|
174
|
+
duration,
|
|
175
|
+
name,
|
|
176
|
+
dataKey,
|
|
177
|
+
dataHintsHandler,
|
|
178
|
+
transparent,
|
|
179
|
+
uid,
|
|
180
|
+
patterns,
|
|
181
|
+
minRadius,
|
|
182
|
+
onClick,
|
|
183
|
+
onClickCircleRoot
|
|
184
|
+
}) {
|
|
196
185
|
var _ref2;
|
|
197
|
-
var SCircle = _ref8.Element, styles = _ref8.styles, color = _ref8.color, resolveColor = _ref8.resolveColor, data = _ref8.data, duration = _ref8.duration, name = _ref8.name, dataKey = _ref8.dataKey, dataHintsHandler = _ref8.dataHintsHandler, transparent = _ref8.transparent, uid = _ref8.uid, patterns = _ref8.patterns, minRadius = _ref8.minRadius, onClick = _ref8.onClick, onClickCircleRoot = _ref8.onClickCircleRoot;
|
|
198
186
|
dataHintsHandler.describeValueEntity(dataKey, name);
|
|
199
|
-
|
|
187
|
+
const radius = data.radius < minRadius ? minRadius : data.radius;
|
|
200
188
|
if (data.radius === 0) return null;
|
|
201
189
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, (_ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SCircle, _ref2.cn("SCircle", {
|
|
202
190
|
"aria-hidden": true,
|
|
203
191
|
"render": "circle",
|
|
204
192
|
"color": resolveColor(color),
|
|
205
|
-
"pattern": patterns ?
|
|
193
|
+
"pattern": patterns ? `url(#${uid}-pattern)` : void 0,
|
|
206
194
|
"cx": data.x,
|
|
207
195
|
"cy": data.y,
|
|
208
196
|
"r": radius,
|
|
209
197
|
"transparent": transparent,
|
|
210
|
-
"use:duration":
|
|
198
|
+
"use:duration": `${duration}ms`,
|
|
211
199
|
"onClickCapture": callAllEventHandlers(onClickCircleRoot, onClick)
|
|
212
200
|
}))), patterns && /* @__PURE__ */ React.createElement(PatternFill, _ref2.cn("PatternFill", {
|
|
213
|
-
"id":
|
|
201
|
+
"id": `${uid}-pattern`,
|
|
214
202
|
"patternKey": color,
|
|
215
203
|
"color": resolveColor(color),
|
|
216
204
|
"patterns": patterns
|
|
@@ -218,9 +206,19 @@ function Circle(_ref8) {
|
|
|
218
206
|
}
|
|
219
207
|
function Intersection(props) {
|
|
220
208
|
var _ref3;
|
|
221
|
-
|
|
209
|
+
const {
|
|
210
|
+
Element: SIntersection,
|
|
211
|
+
styles,
|
|
212
|
+
data,
|
|
213
|
+
name,
|
|
214
|
+
dataKey,
|
|
215
|
+
dataHintsHandler,
|
|
216
|
+
transparent,
|
|
217
|
+
onClick,
|
|
218
|
+
onClickIntersectionRoot
|
|
219
|
+
} = props;
|
|
222
220
|
dataHintsHandler.describeValueEntity(dataKey, name);
|
|
223
|
-
|
|
221
|
+
const renderIntersection = React.useCallback(/* @__PURE__ */ React.forwardRef((props2, ref) => {
|
|
224
222
|
return /* @__PURE__ */ React.createElement(FadeInOut, _extends({
|
|
225
223
|
"aria-hidden": true,
|
|
226
224
|
ref,
|
|
@@ -238,12 +236,14 @@ function Intersection(props) {
|
|
|
238
236
|
}
|
|
239
237
|
function VennTooltip(props) {
|
|
240
238
|
var _ref = arguments[0], _ref4;
|
|
241
|
-
|
|
242
|
-
return _ref4 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SVennTooltip, _ref4.cn("SVennTooltip",
|
|
243
|
-
|
|
244
|
-
|
|
239
|
+
const SVennTooltip = Tooltip;
|
|
240
|
+
return _ref4 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SVennTooltip, _ref4.cn("SVennTooltip", {
|
|
241
|
+
...assignProps({
|
|
242
|
+
"excludeAnchorProps": true
|
|
243
|
+
}, _ref)
|
|
244
|
+
}));
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
const Venn = createElement(VennRoot, {
|
|
247
247
|
Circle,
|
|
248
248
|
Intersection,
|
|
249
249
|
Tooltip: [VennTooltip, Tooltip._______childrenComponents]
|
|
@@ -1,63 +1,45 @@
|
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
4
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
5
1
|
import React from "react";
|
|
6
|
-
import { defaultValueFormatter
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
fromHints
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
import { defaultValueFormatter } from "./serialize.mjs";
|
|
3
|
+
const DataAccessibilityTable = ({
|
|
4
|
+
id,
|
|
5
|
+
dataTableRef,
|
|
6
|
+
data,
|
|
7
|
+
hints,
|
|
8
|
+
config,
|
|
9
|
+
intl
|
|
10
|
+
}) => {
|
|
11
|
+
const keys = React.useMemo(() => {
|
|
12
|
+
let fromHints = [];
|
|
13
|
+
fromHints.push(...hints.fields.verticalAxes);
|
|
14
|
+
fromHints.push(...hints.fields.horizontalAxes);
|
|
15
|
+
fromHints.push(...hints.fields.valueAxes);
|
|
16
|
+
fromHints.push(...config.additionalFields);
|
|
17
|
+
fromHints.push(...Object.keys(hints.fields.values));
|
|
18
|
+
fromHints = [...new Set(fromHints)].filter((key) => key in data[0]);
|
|
20
19
|
if (fromHints.length === 0) {
|
|
21
|
-
data.forEach(
|
|
22
|
-
var _fromHints6;
|
|
23
|
-
return (_fromHints6 = fromHints).push.apply(_fromHints6, _toConsumableArray(Object.keys(row)));
|
|
24
|
-
});
|
|
20
|
+
data.forEach((row) => fromHints.push(...Object.keys(row)));
|
|
25
21
|
}
|
|
26
|
-
return
|
|
22
|
+
return [...new Set(fromHints)];
|
|
27
23
|
}, [data, hints]);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var doublicated = {};
|
|
40
|
-
var handled = {};
|
|
41
|
-
var _iterator = _createForOfIteratorHelper(baseKeys), _step;
|
|
42
|
-
try {
|
|
43
|
-
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
|
|
44
|
-
var _step$value = _slicedToArray(_step.value, 2), key = _step$value[0], label = _step$value[1];
|
|
45
|
-
if (handled[label]) {
|
|
46
|
-
doublicated[key] = true;
|
|
47
|
-
doublicated[handled[label]] = true;
|
|
48
|
-
}
|
|
49
|
-
handled[label] = key;
|
|
24
|
+
const duplicatedBaseKeys = React.useMemo(() => {
|
|
25
|
+
const baseKeys = keys.filter((key) => !hints.titles.valuesAxes[key]).map((key) => {
|
|
26
|
+
if (hints.fields.verticalAxes.has(key) && hints.axesTitle.vertical) return [key, hints.axesTitle.vertical];
|
|
27
|
+
if (hints.fields.horizontalAxes.has(key) && hints.axesTitle.horizontal) return [key, hints.axesTitle.horizontal];
|
|
28
|
+
}).filter((entry) => entry !== void 0).map((entry) => entry);
|
|
29
|
+
const doublicated = {};
|
|
30
|
+
const handled = {};
|
|
31
|
+
for (const [key, label] of baseKeys) {
|
|
32
|
+
if (handled[label]) {
|
|
33
|
+
doublicated[key] = true;
|
|
34
|
+
doublicated[handled[label]] = true;
|
|
50
35
|
}
|
|
51
|
-
|
|
52
|
-
_iterator.e(err);
|
|
53
|
-
} finally {
|
|
54
|
-
_iterator.f();
|
|
36
|
+
handled[label] = key;
|
|
55
37
|
}
|
|
56
38
|
return doublicated;
|
|
57
39
|
}, [keys, hints]);
|
|
58
|
-
|
|
59
|
-
var
|
|
60
|
-
|
|
40
|
+
const renderTitle = React.useCallback((dataKey) => {
|
|
41
|
+
var _a;
|
|
42
|
+
const formatted = (_a = config.titlesFormatter) == null ? void 0 : _a.call(config, dataKey);
|
|
61
43
|
if (formatted !== void 0) return formatted;
|
|
62
44
|
if (hints.titles.valuesAxes[dataKey]) return hints.titles.valuesAxes[dataKey];
|
|
63
45
|
if (!duplicatedBaseKeys[dataKey]) {
|
|
@@ -66,33 +48,24 @@ var DataAccessibilityTable = function DataAccessibilityTable2(_ref) {
|
|
|
66
48
|
}
|
|
67
49
|
return dataKey;
|
|
68
50
|
}, [data, hints, duplicatedBaseKeys, config]);
|
|
69
|
-
|
|
70
|
-
var
|
|
71
|
-
return (
|
|
51
|
+
const formatValue = React.useCallback((value, row) => {
|
|
52
|
+
var _a;
|
|
53
|
+
return ((_a = config.valuesFormatter) == null ? void 0 : _a.call(config, value, row)) ?? defaultValueFormatter(intl, value);
|
|
72
54
|
}, [intl, config]);
|
|
73
55
|
return /* @__PURE__ */ React.createElement("table", {
|
|
74
|
-
id:
|
|
56
|
+
id: `${id}-data-table`,
|
|
75
57
|
tabIndex: 0,
|
|
76
58
|
ref: dataTableRef
|
|
77
|
-
}, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, keys.map(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var key = "".concat(Object.values(row).filter(function(item) {
|
|
83
|
-
return _typeof(item) !== "symbol";
|
|
84
|
-
}).join("-"), "-").concat(index);
|
|
85
|
-
var cells = keys.map(function(key2) {
|
|
86
|
-
return _typeof(row[key2]) !== "symbol" ? [key2, row[key2]] : [key2, ""];
|
|
87
|
-
});
|
|
59
|
+
}, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, keys.map((key, index) => /* @__PURE__ */ React.createElement("th", {
|
|
60
|
+
key: `${key}-${index}`
|
|
61
|
+
}, renderTitle(key))))), /* @__PURE__ */ React.createElement("tbody", null, data.map((row, index) => {
|
|
62
|
+
const key = `${Object.values(row).filter((item) => typeof item !== "symbol").join("-")}-${index}`;
|
|
63
|
+
const cells = keys.map((key2) => typeof row[key2] !== "symbol" ? [key2, row[key2]] : [key2, ""]);
|
|
88
64
|
return /* @__PURE__ */ React.createElement("tr", {
|
|
89
65
|
key
|
|
90
|
-
}, cells.map(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
key: "".concat(key2, "-").concat(index2)
|
|
94
|
-
}, formatValue(value, keys[index2]));
|
|
95
|
-
}));
|
|
66
|
+
}, cells.map(([key2, value], index2) => /* @__PURE__ */ React.createElement("td", {
|
|
67
|
+
key: `${key2}-${index2}`
|
|
68
|
+
}, formatValue(value, keys[index2]))));
|
|
96
69
|
})));
|
|
97
70
|
};
|
|
98
71
|
export {
|