@semcore/d3-chart 16.5.0 → 17.0.0-prerelease.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/lib/cjs/AnimatedClipPath.js +28 -41
- package/lib/cjs/AnimatedClipPath.js.map +1 -1
- package/lib/cjs/Area.js +187 -223
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +248 -327
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +162 -185
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +219 -248
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +448 -482
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +349 -396
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +67 -86
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +78 -93
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +149 -167
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +178 -207
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +182 -222
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Pattern.js +124 -126
- package/lib/cjs/Pattern.js.map +1 -1
- package/lib/cjs/Plot.js +100 -126
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/Radar.js +576 -681
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +518 -571
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/Reference.js +147 -178
- package/lib/cjs/Reference.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +64 -82
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +169 -199
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +135 -177
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +60 -73
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +193 -208
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +182 -217
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/DataAccessibilityTable.js +45 -83
- package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +37 -97
- package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yView.js +97 -91
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/a11y/bezier.js +17 -23
- package/lib/cjs/a11y/bezier.js.map +1 -1
- package/lib/cjs/a11y/focus.js +16 -16
- package/lib/cjs/a11y/focus.js.map +1 -1
- package/lib/cjs/a11y/hints.js +72 -75
- package/lib/cjs/a11y/hints.js.map +1 -1
- package/lib/cjs/a11y/insights.js +354 -525
- package/lib/cjs/a11y/insights.js.map +1 -1
- package/lib/cjs/a11y/intl.js +5 -5
- package/lib/cjs/a11y/intl.js.map +1 -1
- package/lib/cjs/a11y/locale.js +12 -19
- package/lib/cjs/a11y/locale.js.map +1 -1
- package/lib/cjs/a11y/serialize.js +164 -203
- package/lib/cjs/a11y/serialize.js.map +1 -1
- package/lib/cjs/a11y/summarize.js +7 -6
- package/lib/cjs/a11y/summarize.js.map +1 -1
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/a11y/translations/module/de.json +2 -2
- package/lib/cjs/a11y/translations/module/en.json +2 -2
- package/lib/cjs/a11y/translations/module/es.json +2 -2
- package/lib/cjs/a11y/translations/module/fr.json +2 -2
- package/lib/cjs/a11y/translations/module/it.json +2 -2
- package/lib/cjs/a11y/translations/module/ja.json +2 -2
- package/lib/cjs/a11y/translations/module/ko.json +2 -2
- package/lib/cjs/a11y/translations/module/nl.json +2 -2
- package/lib/cjs/a11y/translations/module/pl.json +2 -2
- package/lib/cjs/a11y/translations/module/pt.json +2 -2
- package/lib/cjs/a11y/translations/module/sv.json +2 -2
- package/lib/cjs/a11y/translations/module/tr.json +2 -2
- package/lib/cjs/a11y/translations/module/vi.json +2 -2
- package/lib/cjs/a11y/translations/module/zh.json +2 -2
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +16 -16
- package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/color.js +1 -1
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +421 -466
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.js +97 -115
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.js +229 -216
- package/lib/cjs/component/Chart/BarChart.js.map +1 -1
- package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +114 -136
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +280 -305
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +76 -108
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +80 -95
- package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.js +126 -148
- package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
- package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +95 -113
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.js +84 -110
- package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +119 -143
- package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.js +103 -122
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/index.js +2 -2
- package/lib/cjs/component/Chart/index.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.js +72 -105
- package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +58 -70
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +208 -221
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +63 -73
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/index.js +4 -4
- package/lib/cjs/component/ChartLegend/index.js.map +1 -1
- package/lib/cjs/component/Cigarette/Cigarette.js +115 -129
- package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js +107 -137
- package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/cjs/component/SvgElement.js +7 -7
- package/lib/cjs/component/SvgElement.js.map +1 -1
- package/lib/cjs/createElement.js +66 -65
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +62 -62
- package/lib/cjs/style/axis.shadow.css +3 -0
- package/lib/cjs/style/plot.shadow.css +1 -3
- package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
- package/lib/cjs/style/plotA11yView.shadow.css +13 -26
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +15 -15
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/types/Axis.d.js.map +1 -1
- package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Plot.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js.map +1 -1
- package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/cjs/types/Tooltip.d.js.map +1 -1
- package/lib/cjs/types/Venn.d.js.map +1 -1
- package/lib/cjs/types/index.d.js +80 -80
- package/lib/cjs/types/index.d.js.map +1 -1
- package/lib/cjs/utils.js +122 -145
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/AnimatedClipPath.js +24 -37
- package/lib/es6/AnimatedClipPath.js.map +1 -1
- package/lib/es6/Area.js +179 -215
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +242 -321
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +154 -177
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +206 -235
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +433 -467
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +337 -384
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +60 -79
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +74 -89
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +141 -159
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +174 -203
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +173 -213
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Pattern.js +68 -74
- package/lib/es6/Pattern.js.map +1 -1
- package/lib/es6/Plot.js +95 -121
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/Radar.js +554 -659
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +500 -553
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/Reference.js +140 -171
- package/lib/es6/Reference.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +58 -76
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +161 -191
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +130 -172
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +56 -69
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +183 -198
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +169 -204
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/DataAccessibilityTable.js +41 -80
- package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +35 -95
- package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
- package/lib/es6/a11y/PlotA11yView.js +89 -84
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/a11y/bezier.js +16 -23
- package/lib/es6/a11y/bezier.js.map +1 -1
- package/lib/es6/a11y/focus.js +15 -16
- package/lib/es6/a11y/focus.js.map +1 -1
- package/lib/es6/a11y/hints.js +67 -73
- package/lib/es6/a11y/hints.js.map +1 -1
- package/lib/es6/a11y/insights.js +353 -524
- package/lib/es6/a11y/insights.js.map +1 -1
- package/lib/es6/a11y/intl.js +4 -5
- package/lib/es6/a11y/intl.js.map +1 -1
- package/lib/es6/a11y/locale.js +11 -18
- package/lib/es6/a11y/locale.js.map +1 -1
- package/lib/es6/a11y/serialize.js +162 -203
- package/lib/es6/a11y/serialize.js.map +1 -1
- package/lib/es6/a11y/summarize.js +6 -6
- package/lib/es6/a11y/summarize.js.map +1 -1
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/a11y/translations/module/de.json +2 -2
- package/lib/es6/a11y/translations/module/en.json +2 -2
- package/lib/es6/a11y/translations/module/es.json +2 -2
- package/lib/es6/a11y/translations/module/fr.json +2 -2
- package/lib/es6/a11y/translations/module/it.json +2 -2
- package/lib/es6/a11y/translations/module/ja.json +2 -2
- package/lib/es6/a11y/translations/module/ko.json +2 -2
- package/lib/es6/a11y/translations/module/nl.json +2 -2
- package/lib/es6/a11y/translations/module/pl.json +2 -2
- package/lib/es6/a11y/translations/module/pt.json +2 -2
- package/lib/es6/a11y/translations/module/sv.json +2 -2
- package/lib/es6/a11y/translations/module/tr.json +2 -2
- package/lib/es6/a11y/translations/module/vi.json +2 -2
- package/lib/es6/a11y/translations/module/zh.json +2 -2
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +15 -15
- package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/color.js +1 -1
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +416 -462
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.js +92 -111
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.js +225 -213
- package/lib/es6/component/Chart/BarChart.js.map +1 -1
- package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +109 -132
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +276 -301
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js +70 -103
- package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
- package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +74 -90
- package/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.js +121 -144
- package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
- package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +90 -109
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.js +80 -107
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +113 -138
- package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.js +97 -117
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.js +70 -104
- package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
- package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +53 -65
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +198 -211
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +58 -68
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
- package/lib/es6/component/Cigarette/Cigarette.js +108 -122
- package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
- package/lib/es6/component/StackGroupBar/StackGroupBar.js +100 -130
- package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
- package/lib/es6/component/SvgElement.js +4 -5
- package/lib/es6/component/SvgElement.js.map +1 -1
- package/lib/es6/createElement.js +55 -54
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/style/axis.shadow.css +3 -0
- package/lib/es6/style/plot.shadow.css +1 -3
- package/lib/es6/style/plotA11yModule.shadow.css +10 -11
- package/lib/es6/style/plotA11yView.shadow.css +13 -26
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +14 -14
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/types/Axis.d.js.map +1 -1
- package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Plot.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js.map +1 -1
- package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
- package/lib/es6/types/Tooltip.d.js.map +1 -1
- package/lib/es6/types/Venn.d.js.map +1 -1
- package/lib/es6/utils.js +105 -144
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +24 -36
- package/lib/esm/Area.mjs +178 -149
- package/lib/esm/Axis.mjs +241 -242
- package/lib/esm/Bar.mjs +155 -137
- package/lib/esm/Bubble.mjs +205 -171
- package/lib/esm/CompactHorizontalBar.mjs +428 -383
- package/lib/esm/Donut.mjs +315 -266
- package/lib/esm/Dots.mjs +60 -49
- package/lib/esm/GroupBar.mjs +71 -75
- package/lib/esm/HorizontalBar.mjs +142 -120
- package/lib/esm/Hover.mjs +173 -163
- package/lib/esm/Line.mjs +174 -145
- package/lib/esm/Pattern.mjs +67 -63
- package/lib/esm/Plot.mjs +98 -95
- package/lib/esm/Radar.mjs +550 -498
- package/lib/esm/RadialTree.mjs +512 -416
- package/lib/esm/Reference.mjs +137 -122
- package/lib/esm/ResponsiveContainer.mjs +58 -69
- package/lib/esm/ScatterPlot.mjs +163 -162
- package/lib/esm/StackBar.mjs +126 -147
- package/lib/esm/StackedArea.mjs +53 -61
- package/lib/esm/Tooltip.mjs +185 -175
- package/lib/esm/Venn.mjs +170 -170
- package/lib/esm/a11y/DataAccessibilityTable.mjs +46 -73
- package/lib/esm/a11y/PlotA11yModule.mjs +37 -80
- package/lib/esm/a11y/PlotA11yView.mjs +99 -74
- package/lib/esm/a11y/bezier.mjs +16 -23
- package/lib/esm/a11y/focus.mjs +15 -16
- package/lib/esm/a11y/hints.mjs +65 -71
- package/lib/esm/a11y/insights.mjs +347 -495
- package/lib/esm/a11y/intl.mjs +4 -5
- package/lib/esm/a11y/locale.mjs +12 -14
- package/lib/esm/a11y/serialize.mjs +139 -152
- package/lib/esm/a11y/summarize.mjs +3 -3
- package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
- package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
- package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/color.mjs +1 -1
- package/lib/esm/component/Chart/AbstractChart.mjs +422 -415
- package/lib/esm/component/Chart/AreaChart.mjs +92 -91
- package/lib/esm/component/Chart/BarChart.mjs +225 -177
- package/lib/esm/component/Chart/BubbleChart.mjs +110 -118
- package/lib/esm/component/Chart/CigaretteChart.mjs +277 -268
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +70 -87
- package/lib/esm/component/Chart/DonutChart.mjs +74 -84
- package/lib/esm/component/Chart/HistogramChart.mjs +121 -117
- package/lib/esm/component/Chart/LineChart.mjs +90 -89
- package/lib/esm/component/Chart/RadarChart.mjs +81 -97
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +113 -111
- package/lib/esm/component/Chart/VennChart.mjs +98 -111
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +75 -97
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +54 -55
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +194 -165
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +60 -58
- package/lib/esm/component/Cigarette/Cigarette.mjs +109 -99
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +97 -111
- package/lib/esm/component/SvgElement.mjs +4 -4
- package/lib/esm/createElement.mjs +54 -37
- package/lib/esm/style/axis.shadow.css +3 -0
- package/lib/esm/style/plot.shadow.css +1 -3
- package/lib/esm/style/plotA11yModule.shadow.css +10 -11
- package/lib/esm/style/plotA11yView.shadow.css +13 -26
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/utils.mjs +103 -138
- package/lib/types/Axis.d.ts +4 -0
- package/lib/types/CompactHorizontalBar.d.ts +1 -1
- package/lib/types/Hover.d.ts +1 -1
- package/lib/types/Line.d.ts +1 -1
- package/lib/types/Plot.d.ts +1 -1
- package/lib/types/Radar.d.ts +1 -1
- package/lib/types/ResponsiveContainer.d.ts +1 -1
- package/lib/types/Tooltip.d.ts +1 -3
- package/lib/types/Venn.d.ts +1 -1
- package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
- package/lib/types/a11y/PlotA11yView.d.ts +12 -1
- package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
- package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.type.d.ts +1 -1
- package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
- package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
- package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
- package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
- package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
- package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -1
- package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
- package/lib/types/utils.d.ts +10 -10
- package/package.json +9 -12
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
2
|
import { createComponent } from "@semcore/core";
|
|
7
3
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
@@ -11,118 +7,109 @@ import React from "react";
|
|
|
11
7
|
import Venn from "../../Venn.mjs";
|
|
12
8
|
import { AbstractChart } from "./AbstractChart.mjs";
|
|
13
9
|
import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
class VennChartComponent extends AbstractChart {
|
|
11
|
+
get xScale() {
|
|
12
|
+
const {
|
|
13
|
+
xScale
|
|
14
|
+
} = this.asProps;
|
|
15
|
+
if (xScale) {
|
|
16
|
+
return xScale;
|
|
17
|
+
}
|
|
18
|
+
return scaleLinear();
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return xScale;
|
|
26
|
-
}
|
|
27
|
-
return scaleLinear();
|
|
20
|
+
get yScale() {
|
|
21
|
+
const {
|
|
22
|
+
yScale
|
|
23
|
+
} = this.asProps;
|
|
24
|
+
if (yScale) {
|
|
25
|
+
return yScale;
|
|
28
26
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
return scaleLinear();
|
|
28
|
+
}
|
|
29
|
+
get dataKeys() {
|
|
30
|
+
const {
|
|
31
|
+
data
|
|
32
|
+
} = this.props;
|
|
33
|
+
const legendKeys = Object.keys(data).filter((item) => {
|
|
34
|
+
const isIntersection = /\//.test(item);
|
|
35
|
+
return !isIntersection;
|
|
36
|
+
});
|
|
37
|
+
return legendKeys;
|
|
38
|
+
}
|
|
39
|
+
defaultLegendProps() {
|
|
40
|
+
return {
|
|
41
|
+
legendType: "Table"
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
renderChart() {
|
|
45
|
+
const {
|
|
46
|
+
data,
|
|
47
|
+
onClickVennItem
|
|
48
|
+
} = this.asProps;
|
|
49
|
+
const {
|
|
50
|
+
dataDefinitions,
|
|
51
|
+
highlightedLine
|
|
52
|
+
} = this.state;
|
|
53
|
+
const checkedLegendItems = dataDefinitions.filter((item) => item.checked);
|
|
54
|
+
const checkedLegendItemsMap = checkedLegendItems.reduce((result, item) => {
|
|
55
|
+
result[item.id] = item;
|
|
56
|
+
return result;
|
|
57
|
+
}, {});
|
|
58
|
+
const intersections = Object.keys(data).reduce((result, dataKey) => {
|
|
59
|
+
const isIntersection = /\//.test(dataKey);
|
|
60
|
+
if (isIntersection) {
|
|
61
|
+
result.push(dataKey);
|
|
35
62
|
}
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
}, {
|
|
49
|
-
key: "defaultLegendProps",
|
|
50
|
-
value: function defaultLegendProps() {
|
|
51
|
-
return {
|
|
52
|
-
legendType: "Table"
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}, {
|
|
56
|
-
key: "renderChart",
|
|
57
|
-
value: function renderChart() {
|
|
58
|
-
var _this$asProps = this.asProps, data = _this$asProps.data, onClickVennItem = _this$asProps.onClickVennItem;
|
|
59
|
-
var _this$state = this.state, dataDefinitions = _this$state.dataDefinitions, highlightedLine = _this$state.highlightedLine;
|
|
60
|
-
var checkedLegendItems = dataDefinitions.filter(function(item) {
|
|
61
|
-
return item.checked;
|
|
63
|
+
return result;
|
|
64
|
+
}, []);
|
|
65
|
+
return /* @__PURE__ */ React.createElement(Venn, {
|
|
66
|
+
onClick: onClickVennItem
|
|
67
|
+
}, checkedLegendItems.map((item, index) => {
|
|
68
|
+
return /* @__PURE__ */ React.createElement(Venn.Circle, {
|
|
69
|
+
key: item.id,
|
|
70
|
+
dataKey: item.id,
|
|
71
|
+
name: item.label,
|
|
72
|
+
color: item.color,
|
|
73
|
+
transparent: highlightedLine !== -1 && highlightedLine !== index
|
|
62
74
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var intersections = Object.keys(data).reduce(function(result, dataKey) {
|
|
68
|
-
var isIntersection = /\//.test(dataKey);
|
|
69
|
-
if (isIntersection) {
|
|
70
|
-
result.push(dataKey);
|
|
71
|
-
}
|
|
72
|
-
return result;
|
|
73
|
-
}, []);
|
|
74
|
-
return /* @__PURE__ */ React.createElement(Venn, {
|
|
75
|
-
onClick: onClickVennItem
|
|
76
|
-
}, checkedLegendItems.map(function(item, index) {
|
|
77
|
-
return /* @__PURE__ */ React.createElement(Venn.Circle, {
|
|
78
|
-
key: item.id,
|
|
79
|
-
dataKey: item.id,
|
|
80
|
-
name: item.label,
|
|
81
|
-
color: item.color,
|
|
82
|
-
transparent: highlightedLine !== -1 && highlightedLine !== index
|
|
83
|
-
});
|
|
84
|
-
}), intersections.map(function(intersectionKey) {
|
|
85
|
-
var intersectionKeys = intersectionKey.split("/");
|
|
86
|
-
var hasDisabledItems = intersectionKeys.some(function(key) {
|
|
87
|
-
return checkedLegendItemsMap[key] === void 0;
|
|
88
|
-
});
|
|
89
|
-
if (hasDisabledItems) {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
var name = intersectionKeys.map(function(id) {
|
|
93
|
-
var _dataDefinitions$find;
|
|
94
|
-
return ((_dataDefinitions$find = dataDefinitions.find(function(legendItem) {
|
|
95
|
-
return legendItem.id === id;
|
|
96
|
-
})) === null || _dataDefinitions$find === void 0 ? void 0 : _dataDefinitions$find.label) || "";
|
|
97
|
-
}).join(" & ");
|
|
98
|
-
return /* @__PURE__ */ React.createElement(Venn.Intersection, {
|
|
99
|
-
key: intersectionKey,
|
|
100
|
-
dataKey: intersectionKey,
|
|
101
|
-
name
|
|
102
|
-
});
|
|
103
|
-
}));
|
|
104
|
-
}
|
|
105
|
-
}, {
|
|
106
|
-
key: "renderTooltip",
|
|
107
|
-
value: function renderTooltip() {
|
|
108
|
-
return /* @__PURE__ */ React.createElement(Venn.Tooltip, null, function(_ref) {
|
|
109
|
-
var name = _ref.name, dataKey = _ref.dataKey, data = _ref.data;
|
|
110
|
-
return {
|
|
111
|
-
children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Venn.Tooltip.Title, null, name), /* @__PURE__ */ React.createElement(Text, {
|
|
112
|
-
bold: true
|
|
113
|
-
}, data[dataKey]))
|
|
114
|
-
};
|
|
75
|
+
}), intersections.map((intersectionKey) => {
|
|
76
|
+
const intersectionKeys = intersectionKey.split("/");
|
|
77
|
+
const hasDisabledItems = intersectionKeys.some((key) => {
|
|
78
|
+
return checkedLegendItemsMap[key] === void 0;
|
|
115
79
|
});
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
80
|
+
if (hasDisabledItems) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const name = intersectionKeys.map((id) => {
|
|
84
|
+
var _a;
|
|
85
|
+
return ((_a = dataDefinitions.find((legendItem) => legendItem.id === id)) == null ? void 0 : _a.label) || "";
|
|
86
|
+
}).join(" & ");
|
|
87
|
+
return /* @__PURE__ */ React.createElement(Venn.Intersection, {
|
|
88
|
+
key: intersectionKey,
|
|
89
|
+
dataKey: intersectionKey,
|
|
90
|
+
name
|
|
122
91
|
});
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
renderTooltip() {
|
|
95
|
+
return /* @__PURE__ */ React.createElement(Venn.Tooltip, null, ({
|
|
96
|
+
name,
|
|
97
|
+
dataKey,
|
|
98
|
+
data
|
|
99
|
+
}) => {
|
|
100
|
+
return {
|
|
101
|
+
children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Venn.Tooltip.Title, null, name), /* @__PURE__ */ React.createElement(Text, {
|
|
102
|
+
bold: true
|
|
103
|
+
}, data[dataKey]))
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
getLegendAriaLabel() {
|
|
108
|
+
return this.asProps.getI18nText("legendForChart", {
|
|
109
|
+
chartType: "Venn"
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
126
113
|
_defineProperty(VennChartComponent, "displayName", "Chart.Venn");
|
|
127
114
|
_defineProperty(VennChartComponent, "defaultProps", {
|
|
128
115
|
direction: "row-reverse",
|
|
@@ -131,7 +118,7 @@ _defineProperty(VennChartComponent, "defaultProps", {
|
|
|
131
118
|
marginX: 0
|
|
132
119
|
});
|
|
133
120
|
_defineProperty(VennChartComponent, "enhance", [i18nEnhance(localizedMessages)]);
|
|
134
|
-
|
|
121
|
+
const VennChart = createComponent(VennChartComponent);
|
|
135
122
|
export {
|
|
136
123
|
VennChart
|
|
137
124
|
};
|
|
@@ -1,114 +1,92 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
2
|
import { Component } from "@semcore/core";
|
|
8
3
|
import { makeDataHintsHandlers } from "../../a11y/hints.mjs";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(_this$props$onChangeV = (_this$props = _this.props).onChangeVisibleItem) === null || _this$props$onChangeV === void 0 || _this$props$onChangeV.call(_this$props, id, checked);
|
|
22
|
-
if (checked) {
|
|
23
|
-
var _this$props$onMouseEn, _this$props2;
|
|
24
|
-
(_this$props$onMouseEn = (_this$props2 = _this.props).onMouseEnterItem) === null || _this$props$onMouseEn === void 0 || _this$props$onMouseEn.call(_this$props2, id);
|
|
25
|
-
} else {
|
|
26
|
-
var _this$props$onMouseLe, _this$props3;
|
|
27
|
-
(_this$props$onMouseLe = (_this$props3 = _this.props).onMouseLeaveItem) === null || _this$props$onMouseLe === void 0 || _this$props$onMouseLe.call(_this$props3, id);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
4
|
+
class BaseLegend extends Component {
|
|
5
|
+
constructor(...args) {
|
|
6
|
+
super(...args);
|
|
7
|
+
_defineProperty(this, "onChangeLegendItem", (shape) => (id, checked) => {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f;
|
|
9
|
+
if (shape !== "Checkbox") return;
|
|
10
|
+
(_b = (_a = this.props).onChangeVisibleItem) == null ? void 0 : _b.call(_a, id, checked);
|
|
11
|
+
if (checked) {
|
|
12
|
+
(_d = (_c = this.props).onMouseEnterItem) == null ? void 0 : _d.call(_c, id);
|
|
13
|
+
} else {
|
|
14
|
+
(_f = (_e = this.props).onMouseLeaveItem) == null ? void 0 : _f.call(_e, id);
|
|
15
|
+
}
|
|
30
16
|
});
|
|
31
|
-
_defineProperty(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
(_this$props$onMouseEn2 = (_this$props5 = _this.props).onMouseEnterItem) === null || _this$props$onMouseEn2 === void 0 || _this$props$onMouseEn2.call(_this$props5, id);
|
|
39
|
-
};
|
|
17
|
+
_defineProperty(this, "onFocusLegendItem", (checked) => (id) => {
|
|
18
|
+
var _a, _b, _c, _d;
|
|
19
|
+
if (!checked) {
|
|
20
|
+
return (_b = (_a = this.props).onMouseLeaveItem) == null ? void 0 : _b.call(_a, id);
|
|
21
|
+
}
|
|
22
|
+
(_d = (_c = this.props).onMouseEnterItem) == null ? void 0 : _d.call(_c, id);
|
|
40
23
|
});
|
|
41
|
-
_defineProperty(
|
|
42
|
-
var
|
|
43
|
-
(
|
|
24
|
+
_defineProperty(this, "onBlurLegendItem", (id) => {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
(_b = (_a = this.props).onMouseLeaveItem) == null ? void 0 : _b.call(_a, id);
|
|
44
27
|
});
|
|
45
|
-
_defineProperty(
|
|
46
|
-
return
|
|
47
|
-
var
|
|
48
|
-
(
|
|
28
|
+
_defineProperty(this, "bindOnMouseEnterItem", (id) => {
|
|
29
|
+
return (e) => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
(_b = (_a = this.props).onMouseEnterItem) == null ? void 0 : _b.call(_a, id, e);
|
|
49
32
|
};
|
|
50
33
|
});
|
|
51
|
-
_defineProperty(
|
|
52
|
-
return
|
|
53
|
-
var
|
|
54
|
-
(
|
|
34
|
+
_defineProperty(this, "bindOnMouseLeaveItem", (id) => {
|
|
35
|
+
return (e) => {
|
|
36
|
+
var _a, _b;
|
|
37
|
+
(_b = (_a = this.props).onMouseLeaveItem) == null ? void 0 : _b.call(_a, id, e);
|
|
55
38
|
};
|
|
56
39
|
});
|
|
57
|
-
return _this;
|
|
58
40
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
componentDidMount() {
|
|
42
|
+
this.setHints();
|
|
43
|
+
}
|
|
44
|
+
componentDidUpdate(prevProps) {
|
|
45
|
+
if (prevProps.items !== this.props.items || prevProps.dataHints !== this.props.dataHints) {
|
|
63
46
|
this.setHints();
|
|
64
47
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}, {
|
|
82
|
-
key: "getItem",
|
|
83
|
-
value: function getItem(index) {
|
|
84
|
-
var line = this.asProps.items[index];
|
|
85
|
-
if (line === void 0) {
|
|
86
|
-
throw new Error('No index "'.concat(index, '" in lines'));
|
|
87
|
-
}
|
|
88
|
-
return line;
|
|
89
|
-
}
|
|
90
|
-
}, {
|
|
91
|
-
key: "getLegendItemProps",
|
|
92
|
-
value: function getLegendItemProps(_, index) {
|
|
93
|
-
var _this$asProps2 = this.asProps, _this$asProps2$shape = _this$asProps2.shape, shape = _this$asProps2$shape === void 0 ? "Checkbox" : _this$asProps2$shape, _this$asProps2$size = _this$asProps2.size, size = _this$asProps2$size === void 0 ? "m" : _this$asProps2$size, patterns = _this$asProps2.patterns;
|
|
94
|
-
var line = this.getItem(index);
|
|
95
|
-
return _objectSpread(_objectSpread({}, line), {}, {
|
|
96
|
-
shape,
|
|
97
|
-
size,
|
|
98
|
-
onFocusLegendItem: this.onFocusLegendItem(line.checked),
|
|
99
|
-
onBlurLegendItem: this.onBlurLegendItem,
|
|
100
|
-
onChangeLegendItem: this.onChangeLegendItem(shape),
|
|
101
|
-
onMouseEnter: line.checked ? this.bindOnMouseEnterItem(line.id) : void 0,
|
|
102
|
-
onMouseLeave: this.bindOnMouseLeaveItem(line.id),
|
|
103
|
-
style: {
|
|
104
|
-
gridRowStart: "".concat(index + 1),
|
|
105
|
-
gridRowEnd: "".concat(index + 2)
|
|
106
|
-
},
|
|
107
|
-
patterns
|
|
108
|
-
});
|
|
48
|
+
}
|
|
49
|
+
setHints() {
|
|
50
|
+
const {
|
|
51
|
+
items,
|
|
52
|
+
dataHints
|
|
53
|
+
} = this.asProps;
|
|
54
|
+
const dataHintsHandler = dataHints ? makeDataHintsHandlers(dataHints) : void 0;
|
|
55
|
+
items.forEach((legendItem) => {
|
|
56
|
+
dataHintsHandler == null ? void 0 : dataHintsHandler.labelKey("value", legendItem.id, legendItem.label);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
getItem(index) {
|
|
60
|
+
const line = this.asProps.items[index];
|
|
61
|
+
if (line === void 0) {
|
|
62
|
+
throw new Error(`No index "${index}" in lines`);
|
|
109
63
|
}
|
|
110
|
-
|
|
111
|
-
}
|
|
64
|
+
return line;
|
|
65
|
+
}
|
|
66
|
+
getLegendItemProps(_, index) {
|
|
67
|
+
const {
|
|
68
|
+
shape = "Checkbox",
|
|
69
|
+
size = "m",
|
|
70
|
+
patterns
|
|
71
|
+
} = this.asProps;
|
|
72
|
+
const line = this.getItem(index);
|
|
73
|
+
return {
|
|
74
|
+
...line,
|
|
75
|
+
shape,
|
|
76
|
+
size,
|
|
77
|
+
onFocusLegendItem: this.onFocusLegendItem(line.checked),
|
|
78
|
+
onBlurLegendItem: this.onBlurLegendItem,
|
|
79
|
+
onChangeLegendItem: this.onChangeLegendItem(shape),
|
|
80
|
+
onMouseEnter: line.checked ? this.bindOnMouseEnterItem(line.id) : void 0,
|
|
81
|
+
onMouseLeave: this.bindOnMouseLeaveItem(line.id),
|
|
82
|
+
style: {
|
|
83
|
+
gridRowStart: `${index + 1}`,
|
|
84
|
+
gridRowEnd: `${index + 2}`
|
|
85
|
+
},
|
|
86
|
+
patterns
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
112
90
|
export {
|
|
113
91
|
BaseLegend
|
|
114
92
|
};
|
|
@@ -1,81 +1,80 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
2
|
import { createComponent, sstyled, assignProps } from "@semcore/core";
|
|
3
|
+
import { Flex } from "@semcore/base-components";
|
|
8
4
|
import Checkbox from "@semcore/checkbox";
|
|
9
5
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
10
6
|
import Divider from "@semcore/divider";
|
|
11
|
-
import { Flex } from "@semcore/flex-box";
|
|
12
7
|
import React from "react";
|
|
13
8
|
import { localizedMessages } from "../../../translations/__intergalactic-dynamic-locales.mjs";
|
|
14
9
|
import { BaseLegend } from "../BaseLegend.mjs";
|
|
15
10
|
import { LegendItemComponent } from "../LegendItem/LegendItem.mjs";
|
|
16
11
|
/*!__reshadow-styles__:"./legend-flex.shadow.css"*/
|
|
17
|
-
|
|
12
|
+
const style = (
|
|
18
13
|
/*__reshadow_css_start__*/
|
|
19
14
|
(sstyled.insert(
|
|
20
15
|
/*__inner_css_start__*/
|
|
21
|
-
".
|
|
16
|
+
".___SLegendFlex_ftcim_gg_._direction_row_ftcim_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_ftcim_gg_._direction_column_ftcim_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}",
|
|
22
17
|
/*__inner_css_end__*/
|
|
23
|
-
"
|
|
18
|
+
"ftcim_gg_"
|
|
24
19
|
), /*__reshadow_css_end__*/
|
|
25
20
|
{
|
|
26
|
-
"__SLegendFlex": "
|
|
27
|
-
"_direction_row": "
|
|
28
|
-
"_direction_column": "
|
|
21
|
+
"__SLegendFlex": "___SLegendFlex_ftcim_gg_",
|
|
22
|
+
"_direction_row": "_direction_row_ftcim_gg_",
|
|
23
|
+
"_direction_column": "_direction_column_ftcim_gg_"
|
|
29
24
|
})
|
|
30
25
|
);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
class LegendFlexRoot extends BaseLegend {
|
|
27
|
+
renderTrend() {
|
|
28
|
+
const {
|
|
29
|
+
onTrendIsVisibleChange,
|
|
30
|
+
trendIsVisible,
|
|
31
|
+
trendLabel,
|
|
32
|
+
size,
|
|
33
|
+
getI18nText
|
|
34
|
+
} = this.asProps;
|
|
35
|
+
return /* @__PURE__ */ React.createElement(Checkbox, {
|
|
36
|
+
checked: trendIsVisible,
|
|
37
|
+
onChange: onTrendIsVisibleChange,
|
|
38
|
+
theme: "gray-400",
|
|
39
|
+
label: trendLabel ?? getI18nText("trend"),
|
|
40
|
+
size
|
|
41
|
+
});
|
|
35
42
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
key: "render",
|
|
51
|
-
value: function render() {
|
|
52
|
-
var _ref = this.asProps, _ref2;
|
|
53
|
-
var SLegendFlex = Flex;
|
|
54
|
-
var _this$asProps = this.asProps, styles = _this$asProps.styles, Children = _this$asProps.Children, direction = _this$asProps.direction, withTrend = _this$asProps.withTrend, suffix = _this$asProps.suffix, items = _this$asProps.items;
|
|
55
|
-
var orientation = direction === "row" ? "vertical" : "horizontal";
|
|
56
|
-
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SLegendFlex, _ref2.cn("SLegendFlex", _objectSpread({}, assignProps({
|
|
43
|
+
render() {
|
|
44
|
+
var _ref = this.asProps, _ref2;
|
|
45
|
+
const SLegendFlex = Flex;
|
|
46
|
+
const {
|
|
47
|
+
styles,
|
|
48
|
+
Children,
|
|
49
|
+
direction,
|
|
50
|
+
withTrend,
|
|
51
|
+
suffix,
|
|
52
|
+
items
|
|
53
|
+
} = this.asProps;
|
|
54
|
+
const orientation = direction === "row" ? "vertical" : "horizontal";
|
|
55
|
+
return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SLegendFlex, _ref2.cn("SLegendFlex", {
|
|
56
|
+
...assignProps({
|
|
57
57
|
"role": "group"
|
|
58
|
-
}, _ref)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
58
|
+
}, _ref)
|
|
59
|
+
}), items.map(({
|
|
60
|
+
id
|
|
61
|
+
}) => {
|
|
62
|
+
return /* @__PURE__ */ React.createElement(Children, {
|
|
63
|
+
key: id
|
|
64
|
+
});
|
|
65
|
+
}), (withTrend || suffix) && /* @__PURE__ */ React.createElement(Divider, _ref2.cn("Divider", {
|
|
66
|
+
"orientation": orientation
|
|
67
|
+
})), withTrend && this.renderTrend(), suffix ? suffix : null);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
69
70
|
_defineProperty(LegendFlexRoot, "displayName", "LegendFlex");
|
|
70
71
|
_defineProperty(LegendFlexRoot, "style", style);
|
|
71
72
|
_defineProperty(LegendFlexRoot, "enhance", [i18nEnhance(localizedMessages)]);
|
|
72
|
-
_defineProperty(LegendFlexRoot, "defaultProps",
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
});
|
|
78
|
-
var LegendFlex = createComponent(LegendFlexRoot, {
|
|
73
|
+
_defineProperty(LegendFlexRoot, "defaultProps", () => ({
|
|
74
|
+
direction: "row",
|
|
75
|
+
children: /* @__PURE__ */ React.createElement(LegendFlex.LegendItem, null)
|
|
76
|
+
}));
|
|
77
|
+
const LegendFlex = createComponent(LegendFlexRoot, {
|
|
79
78
|
LegendItem: LegendItemComponent
|
|
80
79
|
});
|
|
81
80
|
export {
|