@semcore/d3-chart 16.5.0 → 17.0.0-prerelease.8
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 +11 -14
package/lib/esm/a11y/intl.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { createIntl, createIntlCache } from "@formatjs/intl";
|
|
2
2
|
import { normalizeLocale } from "./locale.mjs";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
locale = (_normalizeLocale = normalizeLocale(locale, availableLocales)) !== null && _normalizeLocale !== void 0 ? _normalizeLocale : "en";
|
|
3
|
+
const messagesCache = createIntlCache();
|
|
4
|
+
const intlCache = {};
|
|
5
|
+
const getIntl = (locale, translations, availableLocales) => {
|
|
6
|
+
locale = normalizeLocale(locale, availableLocales) ?? "en";
|
|
8
7
|
intlCache[locale] = createIntl({
|
|
9
8
|
locale,
|
|
10
9
|
defaultLocale: "en",
|
package/lib/esm/a11y/locale.mjs
CHANGED
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
for (var _locale in translations) {
|
|
7
|
-
translationNames[_locale.toLowerCase()] = _locale;
|
|
1
|
+
const normalizeLocale = (providedLocale, translations = {}) => {
|
|
2
|
+
var _a;
|
|
3
|
+
const translationNames = {};
|
|
4
|
+
for (const locale2 in translations) {
|
|
5
|
+
translationNames[locale2.toLowerCase()] = locale2;
|
|
8
6
|
}
|
|
9
|
-
providedLocale =
|
|
10
|
-
|
|
7
|
+
providedLocale = providedLocale ?? isAvailableLocale((_a = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : _a.language, translations) ?? "en";
|
|
8
|
+
let locale = providedLocale.toLowerCase();
|
|
11
9
|
if (locale.includes("-") && !translations[locale]) {
|
|
12
|
-
|
|
10
|
+
const [localeBase] = locale.split("-");
|
|
13
11
|
if (translations[localeBase]) {
|
|
14
12
|
locale = localeBase;
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
locale = translationNames[locale] ? translationNames[locale] : locale;
|
|
18
16
|
if (!translations[locale]) {
|
|
19
|
-
|
|
17
|
+
const availableLocales = Object.keys(translations).join(", ");
|
|
20
18
|
if (process.env.NODE_ENV !== "production") {
|
|
21
|
-
console.error(
|
|
19
|
+
console.error(`[Intergalactic @semcore/d3-charts a11y module]: No locale "${providedLocale}" available. Available locales: ${availableLocales}`);
|
|
22
20
|
}
|
|
23
21
|
return null;
|
|
24
22
|
}
|
|
25
23
|
return locale;
|
|
26
24
|
};
|
|
27
|
-
|
|
25
|
+
const isAvailableLocale = (locale, translations) => {
|
|
28
26
|
if (typeof locale !== "string") {
|
|
29
27
|
return void 0;
|
|
30
28
|
}
|
|
31
|
-
|
|
29
|
+
const [localeBase] = locale.split("-");
|
|
32
30
|
if (!translations[localeBase]) {
|
|
33
31
|
return void 0;
|
|
34
32
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
4
|
-
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
5
1
|
import { getIntl } from "./intl.mjs";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var stringifyList = function stringifyList2() {
|
|
11
|
-
var cutItems = items.slice(0, limit);
|
|
2
|
+
const formatLimitedSizeList = (items, intl, maxFinalStringLength = 100, includeEllipsis = true) => {
|
|
3
|
+
let limit = items.length;
|
|
4
|
+
const stringifyList = () => {
|
|
5
|
+
const cutItems = items.slice(0, limit);
|
|
12
6
|
if (items.length > limit && includeEllipsis) {
|
|
13
7
|
cutItems.push(intl.formatMessage({
|
|
14
8
|
id: "ellipsis"
|
|
@@ -18,21 +12,21 @@ var formatLimitedSizeList = function formatLimitedSizeList2(items, intl) {
|
|
|
18
12
|
}
|
|
19
13
|
return intl.formatList(cutItems);
|
|
20
14
|
};
|
|
21
|
-
|
|
15
|
+
let formattedList = stringifyList();
|
|
22
16
|
if (formattedList.length <= maxFinalStringLength) {
|
|
23
17
|
return formattedList;
|
|
24
18
|
}
|
|
25
|
-
|
|
19
|
+
const overflowRatio = formattedList.length / maxFinalStringLength;
|
|
26
20
|
limit = Math.floor(limit / overflowRatio);
|
|
27
21
|
if (limit === 0) {
|
|
28
22
|
limit = 1;
|
|
29
23
|
return stringifyList();
|
|
30
24
|
}
|
|
31
25
|
formattedList = stringifyList();
|
|
32
|
-
|
|
33
|
-
for (
|
|
26
|
+
const maxIncreaseAttempts = 4;
|
|
27
|
+
for (let i = 0; i < maxIncreaseAttempts; i++) {
|
|
34
28
|
limit++;
|
|
35
|
-
|
|
29
|
+
const newLimitFormattedList = stringifyList();
|
|
36
30
|
if (newLimitFormattedList.length > maxFinalStringLength) {
|
|
37
31
|
return formattedList;
|
|
38
32
|
}
|
|
@@ -40,15 +34,16 @@ var formatLimitedSizeList = function formatLimitedSizeList2(items, intl) {
|
|
|
40
34
|
}
|
|
41
35
|
return formattedList;
|
|
42
36
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
const isReactComponent = (obj) => typeof obj === "object" && obj && "displayName" in obj && typeof obj.displayName === "string";
|
|
38
|
+
const guessNumberAsTimestampMinDate = (/* @__PURE__ */ new Date("1975")).getTime();
|
|
39
|
+
const defaultValueFormatter = (intl, value, {
|
|
40
|
+
siblingsTimeMark,
|
|
41
|
+
maxListSymbols,
|
|
42
|
+
datesWithTime
|
|
43
|
+
} = {}) => {
|
|
49
44
|
if (typeof value === "number") {
|
|
50
45
|
if (value >= guessNumberAsTimestampMinDate) {
|
|
51
|
-
return
|
|
46
|
+
return defaultValueFormatter(intl, new Date(value), {
|
|
52
47
|
siblingsTimeMark,
|
|
53
48
|
maxListSymbols,
|
|
54
49
|
datesWithTime
|
|
@@ -68,13 +63,11 @@ var _defaultValueFormatter = function defaultValueFormatter(intl, value) {
|
|
|
68
63
|
});
|
|
69
64
|
}
|
|
70
65
|
if (Array.isArray(value)) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
});
|
|
77
|
-
});
|
|
66
|
+
const formattedValues = value.map((subValue) => defaultValueFormatter(intl, subValue, {
|
|
67
|
+
siblingsTimeMark,
|
|
68
|
+
maxListSymbols,
|
|
69
|
+
datesWithTime
|
|
70
|
+
}));
|
|
78
71
|
return formatLimitedSizeList(formattedValues, intl, maxListSymbols);
|
|
79
72
|
}
|
|
80
73
|
if (isReactComponent(value)) {
|
|
@@ -87,12 +80,18 @@ var _defaultValueFormatter = function defaultValueFormatter(intl, value) {
|
|
|
87
80
|
}
|
|
88
81
|
return String(value);
|
|
89
82
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
83
|
+
const formatValuesList = (values, {
|
|
84
|
+
intl,
|
|
85
|
+
limit,
|
|
86
|
+
datesWithTime,
|
|
87
|
+
maxListSymbols
|
|
88
|
+
}) => {
|
|
89
|
+
const result = values.slice(0, limit).map(({
|
|
90
|
+
value: rawValue,
|
|
91
|
+
label
|
|
92
|
+
}) => {
|
|
94
93
|
if (rawValue === void 0) return label;
|
|
95
|
-
|
|
94
|
+
const value = defaultValueFormatter(intl, rawValue, {
|
|
96
95
|
datesWithTime,
|
|
97
96
|
maxListSymbols
|
|
98
97
|
});
|
|
@@ -113,20 +112,34 @@ var formatValuesList = function formatValuesList2(values, _ref2) {
|
|
|
113
112
|
}
|
|
114
113
|
return intl.formatList(result);
|
|
115
114
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
const serialize = ({
|
|
116
|
+
insights,
|
|
117
|
+
dataType,
|
|
118
|
+
dataRange,
|
|
119
|
+
dataTitle,
|
|
120
|
+
entitiesCount
|
|
121
|
+
}, {
|
|
122
|
+
datesWithTime,
|
|
123
|
+
maxListSymbols,
|
|
124
|
+
clustersLimit,
|
|
125
|
+
valuesLimit,
|
|
126
|
+
groupsLimit,
|
|
127
|
+
titlesFormatter,
|
|
128
|
+
valuesFormatter
|
|
129
|
+
}, {
|
|
130
|
+
locale,
|
|
131
|
+
translations,
|
|
132
|
+
availableLocales
|
|
133
|
+
}) => {
|
|
120
134
|
if (insights.length === 0) return null;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
var from = (_valuesFormatter = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(range.from, range.label)) !== null && _valuesFormatter !== void 0 ? _valuesFormatter : _defaultValueFormatter(intl, range.from, {
|
|
135
|
+
const intl = getIntl(locale, translations, availableLocales);
|
|
136
|
+
const dataRangeSummary = intl.formatList(dataRange.map((range) => {
|
|
137
|
+
const from = (valuesFormatter == null ? void 0 : valuesFormatter(range.from, range.label)) ?? defaultValueFormatter(intl, range.from, {
|
|
125
138
|
siblingsTimeMark: range.to,
|
|
126
139
|
datesWithTime,
|
|
127
140
|
maxListSymbols
|
|
128
141
|
});
|
|
129
|
-
|
|
142
|
+
const to = (valuesFormatter == null ? void 0 : valuesFormatter(range.to, range.label)) ?? defaultValueFormatter(intl, range.to, {
|
|
130
143
|
siblingsTimeMark: range.from,
|
|
131
144
|
datesWithTime,
|
|
132
145
|
maxListSymbols
|
|
@@ -136,75 +149,54 @@ var serialize = function serialize2(_ref4, _ref5, _ref6) {
|
|
|
136
149
|
}, {
|
|
137
150
|
from,
|
|
138
151
|
to,
|
|
139
|
-
label: (
|
|
152
|
+
label: (titlesFormatter == null ? void 0 : titlesFormatter(range.label)) ?? range.label
|
|
140
153
|
});
|
|
141
154
|
}));
|
|
142
155
|
if (dataType === "time-series") {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
|
|
149
|
-
var _trendsByDataKey$insi;
|
|
150
|
-
var insight = _step.value;
|
|
151
|
-
trendsByDataKey[insight.dataKey] = (_trendsByDataKey$insi = trendsByDataKey[insight.dataKey]) !== null && _trendsByDataKey$insi !== void 0 ? _trendsByDataKey$insi : [];
|
|
152
|
-
trendsByDataKey[insight.dataKey].push(insight);
|
|
153
|
-
}
|
|
154
|
-
} catch (err) {
|
|
155
|
-
_iterator.e(err);
|
|
156
|
-
} finally {
|
|
157
|
-
_iterator.f();
|
|
156
|
+
const trendsInsights = insights;
|
|
157
|
+
const trendsByDataKey = {};
|
|
158
|
+
for (const insight of trendsInsights) {
|
|
159
|
+
trendsByDataKey[insight.dataKey] = trendsByDataKey[insight.dataKey] ?? [];
|
|
160
|
+
trendsByDataKey[insight.dataKey].push(insight);
|
|
158
161
|
}
|
|
159
|
-
|
|
162
|
+
const entities = intl.formatMessage({
|
|
160
163
|
id: "entity-type-time-series"
|
|
161
164
|
}, {
|
|
162
165
|
count: entitiesCount
|
|
163
166
|
});
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return insight2 !== generalTrend;
|
|
172
|
-
});
|
|
173
|
-
var primaryTrend = generalTrend !== null && generalTrend !== void 0 ? generalTrend : localTrends[0];
|
|
174
|
-
var secondaryTrends = insights2.filter(function(insight2) {
|
|
175
|
-
return insight2 !== primaryTrend;
|
|
176
|
-
});
|
|
177
|
-
var summaryDataKey = entitiesCount !== 1 ? (_primaryTrend$label = primaryTrend.label) !== null && _primaryTrend$label !== void 0 ? _primaryTrend$label : dataKey : "";
|
|
178
|
-
var mainSummary = intl.formatMessage({
|
|
167
|
+
const entitiesList = Object.entries(trendsByDataKey).map(([dataKey, insights2]) => {
|
|
168
|
+
const generalTrend = insights2.find((insight) => insight.type === "general-trend");
|
|
169
|
+
const localTrends = insights2.filter((insight) => insight !== generalTrend);
|
|
170
|
+
const primaryTrend = generalTrend ?? localTrends[0];
|
|
171
|
+
const secondaryTrends = insights2.filter((insight) => insight !== primaryTrend);
|
|
172
|
+
const summaryDataKey = entitiesCount !== 1 ? primaryTrend.label ?? dataKey : "";
|
|
173
|
+
const mainSummary = intl.formatMessage({
|
|
179
174
|
id: "time-series-general-trend"
|
|
180
175
|
}, {
|
|
181
|
-
dataKey: (
|
|
176
|
+
dataKey: (titlesFormatter == null ? void 0 : titlesFormatter(summaryDataKey)) ?? summaryDataKey,
|
|
182
177
|
trend: intl.formatMessage({
|
|
183
|
-
id:
|
|
178
|
+
id: `trend-${primaryTrend.change.strength}`
|
|
184
179
|
}),
|
|
185
|
-
from: (
|
|
186
|
-
to: (
|
|
187
|
-
});
|
|
188
|
-
var secondarySummaries = secondaryTrends.map(function(trend) {
|
|
189
|
-
var _valuesFormatter5, _valuesFormatter6;
|
|
190
|
-
return intl.formatMessage({
|
|
191
|
-
id: "time-series-local-trend"
|
|
192
|
-
}, {
|
|
193
|
-
trend: intl.formatMessage({
|
|
194
|
-
id: "trend-".concat(trend.change.strength)
|
|
195
|
-
}),
|
|
196
|
-
from: (_valuesFormatter5 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(trend.from, trend.dataKey)) !== null && _valuesFormatter5 !== void 0 ? _valuesFormatter5 : _defaultValueFormatter(intl, trend.from, {
|
|
197
|
-
siblingsTimeMark: trend.to,
|
|
198
|
-
datesWithTime,
|
|
199
|
-
maxListSymbols
|
|
200
|
-
}),
|
|
201
|
-
to: (_valuesFormatter6 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(trend.to, trend.dataKey)) !== null && _valuesFormatter6 !== void 0 ? _valuesFormatter6 : _defaultValueFormatter(intl, trend.to, {
|
|
202
|
-
siblingsTimeMark: trend.from,
|
|
203
|
-
datesWithTime,
|
|
204
|
-
maxListSymbols
|
|
205
|
-
})
|
|
206
|
-
});
|
|
180
|
+
from: (valuesFormatter == null ? void 0 : valuesFormatter(primaryTrend.change.from, dataKey)) ?? intl.formatNumber(primaryTrend.change.from),
|
|
181
|
+
to: (valuesFormatter == null ? void 0 : valuesFormatter(primaryTrend.change.to, dataKey)) ?? intl.formatNumber(primaryTrend.change.to)
|
|
207
182
|
});
|
|
183
|
+
const secondarySummaries = secondaryTrends.map((trend) => intl.formatMessage({
|
|
184
|
+
id: "time-series-local-trend"
|
|
185
|
+
}, {
|
|
186
|
+
trend: intl.formatMessage({
|
|
187
|
+
id: `trend-${trend.change.strength}`
|
|
188
|
+
}),
|
|
189
|
+
from: (valuesFormatter == null ? void 0 : valuesFormatter(trend.from, trend.dataKey)) ?? defaultValueFormatter(intl, trend.from, {
|
|
190
|
+
siblingsTimeMark: trend.to,
|
|
191
|
+
datesWithTime,
|
|
192
|
+
maxListSymbols
|
|
193
|
+
}),
|
|
194
|
+
to: (valuesFormatter == null ? void 0 : valuesFormatter(trend.to, trend.dataKey)) ?? defaultValueFormatter(intl, trend.to, {
|
|
195
|
+
siblingsTimeMark: trend.from,
|
|
196
|
+
datesWithTime,
|
|
197
|
+
maxListSymbols
|
|
198
|
+
})
|
|
199
|
+
}));
|
|
208
200
|
if (secondarySummaries.length === 0) {
|
|
209
201
|
return mainSummary;
|
|
210
202
|
}
|
|
@@ -215,24 +207,24 @@ var serialize = function serialize2(_ref4, _ref5, _ref6) {
|
|
|
215
207
|
locals: formatLimitedSizeList(secondarySummaries, intl, 400, false)
|
|
216
208
|
});
|
|
217
209
|
});
|
|
218
|
-
|
|
210
|
+
const summary = intl.formatMessage({
|
|
219
211
|
id: dataTitle ? "chart-summary" : "chart-summary-no-label"
|
|
220
212
|
}, {
|
|
221
213
|
entities,
|
|
222
214
|
entitiesList: intl.formatList(entitiesList),
|
|
223
|
-
label: (
|
|
215
|
+
label: (titlesFormatter == null ? void 0 : titlesFormatter(dataTitle)) ?? dataTitle
|
|
224
216
|
});
|
|
225
217
|
if (dataRangeSummary.length > 0) {
|
|
226
|
-
return
|
|
218
|
+
return `${summary}
|
|
219
|
+
${dataRangeSummary}`;
|
|
227
220
|
}
|
|
228
221
|
return summary;
|
|
229
222
|
} else if (dataType === "points-cloud") {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
var _entities = maxSize === minSize ? intl.formatMessage({
|
|
223
|
+
const clustersInsights = insights;
|
|
224
|
+
const biggestClusters = clustersInsights.slice(0, clustersLimit);
|
|
225
|
+
const maxSize = clustersInsights[0].size;
|
|
226
|
+
const minSize = clustersInsights[clustersInsights.length - 1].size;
|
|
227
|
+
const entities = maxSize === minSize ? intl.formatMessage({
|
|
236
228
|
id: "entity-type-clusters-single-size"
|
|
237
229
|
}, {
|
|
238
230
|
count: entitiesCount,
|
|
@@ -244,54 +236,50 @@ var serialize = function serialize2(_ref4, _ref5, _ref6) {
|
|
|
244
236
|
maxSize,
|
|
245
237
|
minSize
|
|
246
238
|
});
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
var _titlesFormatter4;
|
|
251
|
-
return (_titlesFormatter4 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(label)) !== null && _titlesFormatter4 !== void 0 ? _titlesFormatter4 : label;
|
|
252
|
-
}), intl, maxListSymbols);
|
|
253
|
-
var anonymous = clusterInsight.labels.length === 0 || labels === String(clusterInsight.size);
|
|
239
|
+
const entitiesList = biggestClusters.map((clusterInsight) => {
|
|
240
|
+
const labels = formatLimitedSizeList(clusterInsight.labels.map((label) => (titlesFormatter == null ? void 0 : titlesFormatter(label)) ?? label), intl, maxListSymbols);
|
|
241
|
+
const anonymous = clusterInsight.labels.length === 0 || labels === String(clusterInsight.size);
|
|
254
242
|
return intl.formatMessage({
|
|
255
243
|
id: anonymous ? "entity-type-clusters-label-anonymous" : "entity-type-clusters-label"
|
|
256
244
|
}, {
|
|
257
245
|
relativeSize: intl.formatMessage({
|
|
258
|
-
id:
|
|
246
|
+
id: `relative-size-${clusterInsight.relativeSize}`
|
|
259
247
|
}),
|
|
260
248
|
labels,
|
|
261
249
|
size: clusterInsight.size,
|
|
262
|
-
x: (
|
|
263
|
-
xLabel: (
|
|
264
|
-
y: (
|
|
265
|
-
yLabel: (
|
|
250
|
+
x: (valuesFormatter == null ? void 0 : valuesFormatter(clusterInsight.center.x, clusterInsight.labels)) ?? intl.formatNumber(clusterInsight.center.x),
|
|
251
|
+
xLabel: (titlesFormatter == null ? void 0 : titlesFormatter(clusterInsight.center.xLabel)) ?? clusterInsight.center.xLabel,
|
|
252
|
+
y: (valuesFormatter == null ? void 0 : valuesFormatter(clusterInsight.center.y, clusterInsight.labels)) ?? intl.formatNumber(clusterInsight.center.y),
|
|
253
|
+
yLabel: (titlesFormatter == null ? void 0 : titlesFormatter(clusterInsight.center.yLabel)) ?? clusterInsight.center.yLabel
|
|
266
254
|
});
|
|
267
255
|
});
|
|
268
256
|
if (insights.length > clustersLimit) {
|
|
269
|
-
|
|
257
|
+
entitiesList.push(intl.formatMessage({
|
|
270
258
|
id: "ellipsis"
|
|
271
259
|
}, {
|
|
272
260
|
leftCount: insights.length - clustersLimit
|
|
273
261
|
}));
|
|
274
262
|
}
|
|
275
|
-
|
|
263
|
+
const summary = intl.formatMessage({
|
|
276
264
|
id: dataTitle ? "chart-summary" : "chart-summary-no-label"
|
|
277
265
|
}, {
|
|
278
|
-
entities
|
|
279
|
-
entitiesList: intl.formatList(
|
|
280
|
-
label: (
|
|
266
|
+
entities,
|
|
267
|
+
entitiesList: intl.formatList(entitiesList),
|
|
268
|
+
label: (titlesFormatter == null ? void 0 : titlesFormatter(dataTitle)) ?? dataTitle
|
|
281
269
|
});
|
|
282
270
|
if (dataRangeSummary.length > 0) {
|
|
283
|
-
return
|
|
271
|
+
return `${summary}
|
|
272
|
+
${dataRangeSummary}`;
|
|
284
273
|
}
|
|
285
|
-
return
|
|
274
|
+
return summary;
|
|
286
275
|
} else if (dataType === "values-set") {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
var _entities2 = intl.formatMessage({
|
|
276
|
+
const [valuesInsight] = insights;
|
|
277
|
+
const entities = intl.formatMessage({
|
|
290
278
|
id: "entity-type-values"
|
|
291
279
|
}, {
|
|
292
280
|
count: entitiesCount
|
|
293
281
|
});
|
|
294
|
-
|
|
282
|
+
const entitiesList = formatValuesList(valuesInsight.values, {
|
|
295
283
|
intl,
|
|
296
284
|
limit: valuesLimit,
|
|
297
285
|
datesWithTime,
|
|
@@ -300,19 +288,16 @@ var serialize = function serialize2(_ref4, _ref5, _ref6) {
|
|
|
300
288
|
return intl.formatMessage({
|
|
301
289
|
id: dataTitle ? "chart-summary" : "chart-summary-no-label"
|
|
302
290
|
}, {
|
|
303
|
-
entities
|
|
304
|
-
entitiesList
|
|
305
|
-
label: (
|
|
291
|
+
entities,
|
|
292
|
+
entitiesList,
|
|
293
|
+
label: (titlesFormatter == null ? void 0 : titlesFormatter(dataTitle)) ?? dataTitle
|
|
306
294
|
});
|
|
307
295
|
} else if (dataType === "grouped-values" || dataType === "indexed-groups") {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
var minValuesCount = Math.min.apply(Math, _toConsumableArray(valueCounts));
|
|
314
|
-
var maxValuesCount = Math.max.apply(Math, _toConsumableArray(valueCounts));
|
|
315
|
-
var _entities3 = minValuesCount === maxValuesCount ? intl.formatMessage({
|
|
296
|
+
const groupInsights = insights;
|
|
297
|
+
const valueCounts = groupInsights.map((group) => group.values.length);
|
|
298
|
+
const minValuesCount = Math.min(...valueCounts);
|
|
299
|
+
const maxValuesCount = Math.max(...valueCounts);
|
|
300
|
+
const entities = minValuesCount === maxValuesCount ? intl.formatMessage({
|
|
316
301
|
id: "entity-type-grouped-values-single-size"
|
|
317
302
|
}, {
|
|
318
303
|
groupsCount: groupInsights.length,
|
|
@@ -324,9 +309,11 @@ var serialize = function serialize2(_ref4, _ref5, _ref6) {
|
|
|
324
309
|
minValuesCount,
|
|
325
310
|
maxValuesCount
|
|
326
311
|
});
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
312
|
+
const entitiesList = groupInsights.slice(0, groupsLimit).map(({
|
|
313
|
+
label,
|
|
314
|
+
values
|
|
315
|
+
}) => {
|
|
316
|
+
const formattedValues = formatValuesList(values, {
|
|
330
317
|
intl,
|
|
331
318
|
limit: valuesLimit,
|
|
332
319
|
datesWithTime,
|
|
@@ -340,24 +327,24 @@ var serialize = function serialize2(_ref4, _ref5, _ref6) {
|
|
|
340
327
|
});
|
|
341
328
|
});
|
|
342
329
|
if (groupInsights.values.length > groupsLimit) {
|
|
343
|
-
|
|
330
|
+
entitiesList.push(intl.formatMessage({
|
|
344
331
|
id: "ellipsis"
|
|
345
332
|
}, {
|
|
346
333
|
leftCount: groupInsights.values.length - groupsLimit
|
|
347
334
|
}));
|
|
348
335
|
}
|
|
349
|
-
|
|
336
|
+
const summary = intl.formatMessage({
|
|
350
337
|
id: dataTitle ? "chart-summary" : "chart-summary-no-label"
|
|
351
338
|
}, {
|
|
352
|
-
entities
|
|
353
|
-
entitiesList: intl.formatList(
|
|
354
|
-
label: (
|
|
339
|
+
entities,
|
|
340
|
+
entitiesList: intl.formatList(entitiesList),
|
|
341
|
+
label: (titlesFormatter == null ? void 0 : titlesFormatter(dataTitle)) ?? dataTitle
|
|
355
342
|
});
|
|
356
|
-
return
|
|
343
|
+
return summary;
|
|
357
344
|
}
|
|
358
345
|
return null;
|
|
359
346
|
};
|
|
360
347
|
export {
|
|
361
|
-
|
|
348
|
+
defaultValueFormatter,
|
|
362
349
|
serialize
|
|
363
350
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { extractDataInsights } from "./insights.mjs";
|
|
2
2
|
import { serialize } from "./serialize.mjs";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const summarize = (data, hints, config, locale, translations, availableLocales) => {
|
|
4
|
+
const analyzedData = extractDataInsights(data, hints, config);
|
|
5
|
+
const summary = serialize(analyzedData, config, {
|
|
6
6
|
locale,
|
|
7
7
|
translations,
|
|
8
8
|
availableLocales
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const disabled = "Drücken Sie die Tabulatortaste, um das Zugriffsmodul für grafische Diagramme zu aktivieren.";
|
|
2
1
|
const loading = "Lade Zugriffsmodul.";
|
|
3
2
|
const failed = "Zugriffsmodul konnte nicht geladen werden. Kontaktieren Sie den Support und helfen Sie uns, das Problem schneller zu beheben.";
|
|
4
3
|
const de = {
|
|
5
|
-
disabled,
|
|
6
4
|
loading,
|
|
7
|
-
failed
|
|
5
|
+
failed,
|
|
6
|
+
"PlotA11yModule.ScreenReaderOnlyButton.Label": "Zusammenfassung der Daten öffnen"
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
9
|
de as default,
|
|
11
|
-
disabled,
|
|
12
10
|
failed,
|
|
13
11
|
loading
|
|
14
12
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const disabled = 'Press "Tab" to enable graphical charts accessibility module.';
|
|
2
1
|
const loading = "Loading accessibility module.";
|
|
3
2
|
const failed = "Failed to load accessibility module. Contact service user support to help us resolve issue faster.";
|
|
4
3
|
const en = {
|
|
5
|
-
disabled,
|
|
6
4
|
loading,
|
|
7
|
-
failed
|
|
5
|
+
failed,
|
|
6
|
+
"PlotA11yModule.ScreenReaderOnlyButton.Label": "Open data summary"
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
9
|
en as default,
|
|
11
|
-
disabled,
|
|
12
10
|
failed,
|
|
13
11
|
loading
|
|
14
12
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const disabled = 'Pulse "Tab" para activar el módulo de accesibilidad a los gráficos.';
|
|
2
1
|
const loading = "Cargando módulo de accesibilidad.";
|
|
3
2
|
const failed = "No se ha podido cargar el módulo de accesibilidad. Contacta con el servicio de asistencia al usuario para ayudarnos a resolver el problema rápidamente.";
|
|
4
3
|
const es = {
|
|
5
|
-
disabled,
|
|
6
4
|
loading,
|
|
7
|
-
failed
|
|
5
|
+
failed,
|
|
6
|
+
"PlotA11yModule.ScreenReaderOnlyButton.Label": "Abrir resumen de datos"
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
9
|
es as default,
|
|
11
|
-
disabled,
|
|
12
10
|
failed,
|
|
13
11
|
loading
|
|
14
12
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const disabled = "Appuyez sur « Onglet » pour activer le module d’accessibilité aux diagrammes.";
|
|
2
1
|
const loading = "Chargement du module d’accessibilité en cours.";
|
|
3
2
|
const failed = "Impossible de charger le module d’accessibilité. Contactez le service d’assistance aux utilisateurs pour nous permettre de résoudre le problème plus rapidement.";
|
|
4
3
|
const fr = {
|
|
5
|
-
disabled,
|
|
6
4
|
loading,
|
|
7
|
-
failed
|
|
5
|
+
failed,
|
|
6
|
+
"PlotA11yModule.ScreenReaderOnlyButton.Label": "Ouvrir le récapitulatif des données"
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
9
|
fr as default,
|
|
11
|
-
disabled,
|
|
12
10
|
failed,
|
|
13
11
|
loading
|
|
14
12
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const disabled = 'Premi "Tab" per abilitare il modulo di accessibilità dei dati per i grafici.';
|
|
2
1
|
const loading = "Caricamento del modulo di accessibilità in corso.";
|
|
3
2
|
const failed = "Caricamento del modulo di accessibilità non riuscito. Contatta il servizio di assistenza utenti per risolvere il problema più in fretta.";
|
|
4
3
|
const it = {
|
|
5
|
-
disabled,
|
|
6
4
|
loading,
|
|
7
|
-
failed
|
|
5
|
+
failed,
|
|
6
|
+
"PlotA11yModule.ScreenReaderOnlyButton.Label": "Aprire il riepilogo dei dati"
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
9
|
it as default,
|
|
11
|
-
disabled,
|
|
12
10
|
failed,
|
|
13
11
|
loading
|
|
14
12
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const disabled = "アクセシビリティモジュールのグラフィカルチャートを有効化するには「Tab」キーを押してください。";
|
|
2
1
|
const loading = "アクセシビリティモジュールのロード中。";
|
|
3
2
|
const failed = "アクセシビリティモジュールの読み込みに失敗しました。サービスユーザーサポートに連絡し、問題を迅速に解決します。";
|
|
4
3
|
const ja = {
|
|
5
|
-
disabled,
|
|
6
4
|
loading,
|
|
7
|
-
failed
|
|
5
|
+
failed,
|
|
6
|
+
"PlotA11yModule.ScreenReaderOnlyButton.Label": "データサマリーを開く"
|
|
8
7
|
};
|
|
9
8
|
export {
|
|
10
9
|
ja as default,
|
|
11
|
-
disabled,
|
|
12
10
|
failed,
|
|
13
11
|
loading
|
|
14
12
|
};
|