@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.
Files changed (439) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/lib/cjs/AnimatedClipPath.js +28 -41
  3. package/lib/cjs/AnimatedClipPath.js.map +1 -1
  4. package/lib/cjs/Area.js +187 -223
  5. package/lib/cjs/Area.js.map +1 -1
  6. package/lib/cjs/Axis.js +248 -327
  7. package/lib/cjs/Axis.js.map +1 -1
  8. package/lib/cjs/Bar.js +162 -185
  9. package/lib/cjs/Bar.js.map +1 -1
  10. package/lib/cjs/Bubble.js +219 -248
  11. package/lib/cjs/Bubble.js.map +1 -1
  12. package/lib/cjs/CompactHorizontalBar.js +448 -482
  13. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  14. package/lib/cjs/Donut.js +349 -396
  15. package/lib/cjs/Donut.js.map +1 -1
  16. package/lib/cjs/Dots.js +67 -86
  17. package/lib/cjs/Dots.js.map +1 -1
  18. package/lib/cjs/GroupBar.js +78 -93
  19. package/lib/cjs/GroupBar.js.map +1 -1
  20. package/lib/cjs/HorizontalBar.js +149 -167
  21. package/lib/cjs/HorizontalBar.js.map +1 -1
  22. package/lib/cjs/Hover.js +178 -207
  23. package/lib/cjs/Hover.js.map +1 -1
  24. package/lib/cjs/Line.js +182 -222
  25. package/lib/cjs/Line.js.map +1 -1
  26. package/lib/cjs/Pattern.js +124 -126
  27. package/lib/cjs/Pattern.js.map +1 -1
  28. package/lib/cjs/Plot.js +100 -126
  29. package/lib/cjs/Plot.js.map +1 -1
  30. package/lib/cjs/Radar.js +576 -681
  31. package/lib/cjs/Radar.js.map +1 -1
  32. package/lib/cjs/RadialTree.js +518 -571
  33. package/lib/cjs/RadialTree.js.map +1 -1
  34. package/lib/cjs/Reference.js +147 -178
  35. package/lib/cjs/Reference.js.map +1 -1
  36. package/lib/cjs/ResponsiveContainer.js +64 -82
  37. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  38. package/lib/cjs/ScatterPlot.js +169 -199
  39. package/lib/cjs/ScatterPlot.js.map +1 -1
  40. package/lib/cjs/StackBar.js +135 -177
  41. package/lib/cjs/StackBar.js.map +1 -1
  42. package/lib/cjs/StackedArea.js +60 -73
  43. package/lib/cjs/StackedArea.js.map +1 -1
  44. package/lib/cjs/Tooltip.js +193 -208
  45. package/lib/cjs/Tooltip.js.map +1 -1
  46. package/lib/cjs/Venn.js +182 -217
  47. package/lib/cjs/Venn.js.map +1 -1
  48. package/lib/cjs/a11y/DataAccessibilityTable.js +45 -83
  49. package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
  50. package/lib/cjs/a11y/PlotA11yModule.js +37 -97
  51. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  52. package/lib/cjs/a11y/PlotA11yView.js +97 -91
  53. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  54. package/lib/cjs/a11y/bezier.js +17 -23
  55. package/lib/cjs/a11y/bezier.js.map +1 -1
  56. package/lib/cjs/a11y/focus.js +16 -16
  57. package/lib/cjs/a11y/focus.js.map +1 -1
  58. package/lib/cjs/a11y/hints.js +72 -75
  59. package/lib/cjs/a11y/hints.js.map +1 -1
  60. package/lib/cjs/a11y/insights.js +354 -525
  61. package/lib/cjs/a11y/insights.js.map +1 -1
  62. package/lib/cjs/a11y/intl.js +5 -5
  63. package/lib/cjs/a11y/intl.js.map +1 -1
  64. package/lib/cjs/a11y/locale.js +12 -19
  65. package/lib/cjs/a11y/locale.js.map +1 -1
  66. package/lib/cjs/a11y/serialize.js +164 -203
  67. package/lib/cjs/a11y/serialize.js.map +1 -1
  68. package/lib/cjs/a11y/summarize.js +7 -6
  69. package/lib/cjs/a11y/summarize.js.map +1 -1
  70. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +16 -16
  71. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  72. package/lib/cjs/a11y/translations/module/de.json +2 -2
  73. package/lib/cjs/a11y/translations/module/en.json +2 -2
  74. package/lib/cjs/a11y/translations/module/es.json +2 -2
  75. package/lib/cjs/a11y/translations/module/fr.json +2 -2
  76. package/lib/cjs/a11y/translations/module/it.json +2 -2
  77. package/lib/cjs/a11y/translations/module/ja.json +2 -2
  78. package/lib/cjs/a11y/translations/module/ko.json +2 -2
  79. package/lib/cjs/a11y/translations/module/nl.json +2 -2
  80. package/lib/cjs/a11y/translations/module/pl.json +2 -2
  81. package/lib/cjs/a11y/translations/module/pt.json +2 -2
  82. package/lib/cjs/a11y/translations/module/sv.json +2 -2
  83. package/lib/cjs/a11y/translations/module/tr.json +2 -2
  84. package/lib/cjs/a11y/translations/module/vi.json +2 -2
  85. package/lib/cjs/a11y/translations/module/zh.json +2 -2
  86. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +16 -16
  87. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  88. package/lib/cjs/color.js +1 -1
  89. package/lib/cjs/color.js.map +1 -1
  90. package/lib/cjs/component/Chart/AbstractChart.js +421 -466
  91. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  92. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  93. package/lib/cjs/component/Chart/AreaChart.js +97 -115
  94. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  95. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  96. package/lib/cjs/component/Chart/BarChart.js +229 -216
  97. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  98. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  99. package/lib/cjs/component/Chart/BubbleChart.js +114 -136
  100. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  101. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  102. package/lib/cjs/component/Chart/CigaretteChart.js +280 -305
  103. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  104. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +76 -108
  105. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  106. package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  107. package/lib/cjs/component/Chart/DonutChart.js +80 -95
  108. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  109. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  110. package/lib/cjs/component/Chart/HistogramChart.js +126 -148
  111. package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
  112. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  113. package/lib/cjs/component/Chart/LineChart.js +95 -113
  114. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  115. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  116. package/lib/cjs/component/Chart/RadarChart.js +84 -110
  117. package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
  118. package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
  119. package/lib/cjs/component/Chart/ScatterPlotChart.js +119 -143
  120. package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
  121. package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
  122. package/lib/cjs/component/Chart/VennChart.js +103 -122
  123. package/lib/cjs/component/Chart/VennChart.js.map +1 -1
  124. package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
  125. package/lib/cjs/component/Chart/index.js +2 -2
  126. package/lib/cjs/component/Chart/index.js.map +1 -1
  127. package/lib/cjs/component/ChartLegend/BaseLegend.js +72 -105
  128. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  129. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  130. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +58 -70
  131. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  132. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  133. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +208 -221
  134. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  135. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  136. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  137. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +63 -73
  138. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  139. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  140. package/lib/cjs/component/ChartLegend/index.js +4 -4
  141. package/lib/cjs/component/ChartLegend/index.js.map +1 -1
  142. package/lib/cjs/component/Cigarette/Cigarette.js +115 -129
  143. package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
  144. package/lib/cjs/component/StackGroupBar/StackGroupBar.js +107 -137
  145. package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
  146. package/lib/cjs/component/SvgElement.js +7 -7
  147. package/lib/cjs/component/SvgElement.js.map +1 -1
  148. package/lib/cjs/createElement.js +66 -65
  149. package/lib/cjs/createElement.js.map +1 -1
  150. package/lib/cjs/index.js +62 -62
  151. package/lib/cjs/style/axis.shadow.css +3 -0
  152. package/lib/cjs/style/plot.shadow.css +1 -3
  153. package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
  154. package/lib/cjs/style/plotA11yView.shadow.css +13 -26
  155. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +15 -15
  156. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  157. package/lib/cjs/types/Axis.d.js.map +1 -1
  158. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  159. package/lib/cjs/types/Hover.d.js.map +1 -1
  160. package/lib/cjs/types/Line.d.js.map +1 -1
  161. package/lib/cjs/types/Plot.d.js.map +1 -1
  162. package/lib/cjs/types/Radar.d.js.map +1 -1
  163. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  164. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  165. package/lib/cjs/types/Venn.d.js.map +1 -1
  166. package/lib/cjs/types/index.d.js +80 -80
  167. package/lib/cjs/types/index.d.js.map +1 -1
  168. package/lib/cjs/utils.js +122 -145
  169. package/lib/cjs/utils.js.map +1 -1
  170. package/lib/es6/AnimatedClipPath.js +24 -37
  171. package/lib/es6/AnimatedClipPath.js.map +1 -1
  172. package/lib/es6/Area.js +179 -215
  173. package/lib/es6/Area.js.map +1 -1
  174. package/lib/es6/Axis.js +242 -321
  175. package/lib/es6/Axis.js.map +1 -1
  176. package/lib/es6/Bar.js +154 -177
  177. package/lib/es6/Bar.js.map +1 -1
  178. package/lib/es6/Bubble.js +206 -235
  179. package/lib/es6/Bubble.js.map +1 -1
  180. package/lib/es6/CompactHorizontalBar.js +433 -467
  181. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  182. package/lib/es6/Donut.js +337 -384
  183. package/lib/es6/Donut.js.map +1 -1
  184. package/lib/es6/Dots.js +60 -79
  185. package/lib/es6/Dots.js.map +1 -1
  186. package/lib/es6/GroupBar.js +74 -89
  187. package/lib/es6/GroupBar.js.map +1 -1
  188. package/lib/es6/HorizontalBar.js +141 -159
  189. package/lib/es6/HorizontalBar.js.map +1 -1
  190. package/lib/es6/Hover.js +174 -203
  191. package/lib/es6/Hover.js.map +1 -1
  192. package/lib/es6/Line.js +173 -213
  193. package/lib/es6/Line.js.map +1 -1
  194. package/lib/es6/Pattern.js +68 -74
  195. package/lib/es6/Pattern.js.map +1 -1
  196. package/lib/es6/Plot.js +95 -121
  197. package/lib/es6/Plot.js.map +1 -1
  198. package/lib/es6/Radar.js +554 -659
  199. package/lib/es6/Radar.js.map +1 -1
  200. package/lib/es6/RadialTree.js +500 -553
  201. package/lib/es6/RadialTree.js.map +1 -1
  202. package/lib/es6/Reference.js +140 -171
  203. package/lib/es6/Reference.js.map +1 -1
  204. package/lib/es6/ResponsiveContainer.js +58 -76
  205. package/lib/es6/ResponsiveContainer.js.map +1 -1
  206. package/lib/es6/ScatterPlot.js +161 -191
  207. package/lib/es6/ScatterPlot.js.map +1 -1
  208. package/lib/es6/StackBar.js +130 -172
  209. package/lib/es6/StackBar.js.map +1 -1
  210. package/lib/es6/StackedArea.js +56 -69
  211. package/lib/es6/StackedArea.js.map +1 -1
  212. package/lib/es6/Tooltip.js +183 -198
  213. package/lib/es6/Tooltip.js.map +1 -1
  214. package/lib/es6/Venn.js +169 -204
  215. package/lib/es6/Venn.js.map +1 -1
  216. package/lib/es6/a11y/DataAccessibilityTable.js +41 -80
  217. package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
  218. package/lib/es6/a11y/PlotA11yModule.js +35 -95
  219. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  220. package/lib/es6/a11y/PlotA11yView.js +89 -84
  221. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  222. package/lib/es6/a11y/bezier.js +16 -23
  223. package/lib/es6/a11y/bezier.js.map +1 -1
  224. package/lib/es6/a11y/focus.js +15 -16
  225. package/lib/es6/a11y/focus.js.map +1 -1
  226. package/lib/es6/a11y/hints.js +67 -73
  227. package/lib/es6/a11y/hints.js.map +1 -1
  228. package/lib/es6/a11y/insights.js +353 -524
  229. package/lib/es6/a11y/insights.js.map +1 -1
  230. package/lib/es6/a11y/intl.js +4 -5
  231. package/lib/es6/a11y/intl.js.map +1 -1
  232. package/lib/es6/a11y/locale.js +11 -18
  233. package/lib/es6/a11y/locale.js.map +1 -1
  234. package/lib/es6/a11y/serialize.js +162 -203
  235. package/lib/es6/a11y/serialize.js.map +1 -1
  236. package/lib/es6/a11y/summarize.js +6 -6
  237. package/lib/es6/a11y/summarize.js.map +1 -1
  238. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +15 -15
  239. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  240. package/lib/es6/a11y/translations/module/de.json +2 -2
  241. package/lib/es6/a11y/translations/module/en.json +2 -2
  242. package/lib/es6/a11y/translations/module/es.json +2 -2
  243. package/lib/es6/a11y/translations/module/fr.json +2 -2
  244. package/lib/es6/a11y/translations/module/it.json +2 -2
  245. package/lib/es6/a11y/translations/module/ja.json +2 -2
  246. package/lib/es6/a11y/translations/module/ko.json +2 -2
  247. package/lib/es6/a11y/translations/module/nl.json +2 -2
  248. package/lib/es6/a11y/translations/module/pl.json +2 -2
  249. package/lib/es6/a11y/translations/module/pt.json +2 -2
  250. package/lib/es6/a11y/translations/module/sv.json +2 -2
  251. package/lib/es6/a11y/translations/module/tr.json +2 -2
  252. package/lib/es6/a11y/translations/module/vi.json +2 -2
  253. package/lib/es6/a11y/translations/module/zh.json +2 -2
  254. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +15 -15
  255. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  256. package/lib/es6/color.js +1 -1
  257. package/lib/es6/color.js.map +1 -1
  258. package/lib/es6/component/Chart/AbstractChart.js +416 -462
  259. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  260. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  261. package/lib/es6/component/Chart/AreaChart.js +92 -111
  262. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  263. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  264. package/lib/es6/component/Chart/BarChart.js +225 -213
  265. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  266. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  267. package/lib/es6/component/Chart/BubbleChart.js +109 -132
  268. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  269. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  270. package/lib/es6/component/Chart/CigaretteChart.js +276 -301
  271. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  272. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +70 -103
  273. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  274. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  275. package/lib/es6/component/Chart/DonutChart.js +74 -90
  276. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  277. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  278. package/lib/es6/component/Chart/HistogramChart.js +121 -144
  279. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  280. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  281. package/lib/es6/component/Chart/LineChart.js +90 -109
  282. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  283. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  284. package/lib/es6/component/Chart/RadarChart.js +80 -107
  285. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  286. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  287. package/lib/es6/component/Chart/ScatterPlotChart.js +113 -138
  288. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  289. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  290. package/lib/es6/component/Chart/VennChart.js +97 -117
  291. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  292. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  293. package/lib/es6/component/ChartLegend/BaseLegend.js +70 -104
  294. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  295. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  296. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +53 -65
  297. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  298. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  299. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +198 -211
  300. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  301. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  302. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  303. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +58 -68
  304. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  305. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  306. package/lib/es6/component/Cigarette/Cigarette.js +108 -122
  307. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  308. package/lib/es6/component/StackGroupBar/StackGroupBar.js +100 -130
  309. package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
  310. package/lib/es6/component/SvgElement.js +4 -5
  311. package/lib/es6/component/SvgElement.js.map +1 -1
  312. package/lib/es6/createElement.js +55 -54
  313. package/lib/es6/createElement.js.map +1 -1
  314. package/lib/es6/style/axis.shadow.css +3 -0
  315. package/lib/es6/style/plot.shadow.css +1 -3
  316. package/lib/es6/style/plotA11yModule.shadow.css +10 -11
  317. package/lib/es6/style/plotA11yView.shadow.css +13 -26
  318. package/lib/es6/translations/__intergalactic-dynamic-locales.js +14 -14
  319. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  320. package/lib/es6/types/Axis.d.js.map +1 -1
  321. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  322. package/lib/es6/types/Hover.d.js.map +1 -1
  323. package/lib/es6/types/Line.d.js.map +1 -1
  324. package/lib/es6/types/Plot.d.js.map +1 -1
  325. package/lib/es6/types/Radar.d.js.map +1 -1
  326. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  327. package/lib/es6/types/Tooltip.d.js.map +1 -1
  328. package/lib/es6/types/Venn.d.js.map +1 -1
  329. package/lib/es6/utils.js +105 -144
  330. package/lib/es6/utils.js.map +1 -1
  331. package/lib/esm/AnimatedClipPath.mjs +24 -36
  332. package/lib/esm/Area.mjs +178 -149
  333. package/lib/esm/Axis.mjs +241 -242
  334. package/lib/esm/Bar.mjs +155 -137
  335. package/lib/esm/Bubble.mjs +205 -171
  336. package/lib/esm/CompactHorizontalBar.mjs +428 -383
  337. package/lib/esm/Donut.mjs +315 -266
  338. package/lib/esm/Dots.mjs +60 -49
  339. package/lib/esm/GroupBar.mjs +71 -75
  340. package/lib/esm/HorizontalBar.mjs +142 -120
  341. package/lib/esm/Hover.mjs +173 -163
  342. package/lib/esm/Line.mjs +174 -145
  343. package/lib/esm/Pattern.mjs +67 -63
  344. package/lib/esm/Plot.mjs +98 -95
  345. package/lib/esm/Radar.mjs +550 -498
  346. package/lib/esm/RadialTree.mjs +512 -416
  347. package/lib/esm/Reference.mjs +137 -122
  348. package/lib/esm/ResponsiveContainer.mjs +58 -69
  349. package/lib/esm/ScatterPlot.mjs +163 -162
  350. package/lib/esm/StackBar.mjs +126 -147
  351. package/lib/esm/StackedArea.mjs +53 -61
  352. package/lib/esm/Tooltip.mjs +185 -175
  353. package/lib/esm/Venn.mjs +170 -170
  354. package/lib/esm/a11y/DataAccessibilityTable.mjs +46 -73
  355. package/lib/esm/a11y/PlotA11yModule.mjs +37 -80
  356. package/lib/esm/a11y/PlotA11yView.mjs +99 -74
  357. package/lib/esm/a11y/bezier.mjs +16 -23
  358. package/lib/esm/a11y/focus.mjs +15 -16
  359. package/lib/esm/a11y/hints.mjs +65 -71
  360. package/lib/esm/a11y/insights.mjs +347 -495
  361. package/lib/esm/a11y/intl.mjs +4 -5
  362. package/lib/esm/a11y/locale.mjs +12 -14
  363. package/lib/esm/a11y/serialize.mjs +139 -152
  364. package/lib/esm/a11y/summarize.mjs +3 -3
  365. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +1 -1
  366. package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
  367. package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
  368. package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
  369. package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
  370. package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
  371. package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
  372. package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
  373. package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
  374. package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
  375. package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
  376. package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
  377. package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
  378. package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
  379. package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
  380. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +1 -1
  381. package/lib/esm/color.mjs +1 -1
  382. package/lib/esm/component/Chart/AbstractChart.mjs +422 -415
  383. package/lib/esm/component/Chart/AreaChart.mjs +92 -91
  384. package/lib/esm/component/Chart/BarChart.mjs +225 -177
  385. package/lib/esm/component/Chart/BubbleChart.mjs +110 -118
  386. package/lib/esm/component/Chart/CigaretteChart.mjs +277 -268
  387. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +70 -87
  388. package/lib/esm/component/Chart/DonutChart.mjs +74 -84
  389. package/lib/esm/component/Chart/HistogramChart.mjs +121 -117
  390. package/lib/esm/component/Chart/LineChart.mjs +90 -89
  391. package/lib/esm/component/Chart/RadarChart.mjs +81 -97
  392. package/lib/esm/component/Chart/ScatterPlotChart.mjs +113 -111
  393. package/lib/esm/component/Chart/VennChart.mjs +98 -111
  394. package/lib/esm/component/ChartLegend/BaseLegend.mjs +75 -97
  395. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +54 -55
  396. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +194 -165
  397. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
  398. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +60 -58
  399. package/lib/esm/component/Cigarette/Cigarette.mjs +109 -99
  400. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +97 -111
  401. package/lib/esm/component/SvgElement.mjs +4 -4
  402. package/lib/esm/createElement.mjs +54 -37
  403. package/lib/esm/style/axis.shadow.css +3 -0
  404. package/lib/esm/style/plot.shadow.css +1 -3
  405. package/lib/esm/style/plotA11yModule.shadow.css +10 -11
  406. package/lib/esm/style/plotA11yView.shadow.css +13 -26
  407. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
  408. package/lib/esm/utils.mjs +103 -138
  409. package/lib/types/Axis.d.ts +4 -0
  410. package/lib/types/CompactHorizontalBar.d.ts +1 -1
  411. package/lib/types/Hover.d.ts +1 -1
  412. package/lib/types/Line.d.ts +1 -1
  413. package/lib/types/Plot.d.ts +1 -1
  414. package/lib/types/Radar.d.ts +1 -1
  415. package/lib/types/ResponsiveContainer.d.ts +1 -1
  416. package/lib/types/Tooltip.d.ts +1 -3
  417. package/lib/types/Venn.d.ts +1 -1
  418. package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
  419. package/lib/types/a11y/PlotA11yView.d.ts +12 -1
  420. package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
  421. package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
  422. package/lib/types/component/Chart/AbstractChart.type.d.ts +1 -1
  423. package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
  424. package/lib/types/component/Chart/BarChart.type.d.ts +1 -1
  425. package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
  426. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
  427. package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
  428. package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
  429. package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
  430. package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
  431. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
  432. package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
  433. package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
  434. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
  435. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +1 -1
  436. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -1
  437. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
  438. package/lib/types/utils.d.ts +10 -10
  439. package/package.json +11 -14
@@ -1,21 +1,14 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.serialize = exports.defaultValueFormatter = void 0;
8
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
- var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
11
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
12
7
  var _intl = require("./intl");
13
- var formatLimitedSizeList = function formatLimitedSizeList(items, intl) {
14
- var maxFinalStringLength = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;
15
- var includeEllipsis = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
16
- var limit = items.length;
17
- var stringifyList = function stringifyList() {
18
- var cutItems = items.slice(0, limit);
8
+ const formatLimitedSizeList = (items, intl, maxFinalStringLength = 100, includeEllipsis = true) => {
9
+ let limit = items.length;
10
+ const stringifyList = () => {
11
+ const cutItems = items.slice(0, limit);
19
12
  if (items.length > limit && includeEllipsis) {
20
13
  cutItems.push(intl.formatMessage({
21
14
  id: 'ellipsis'
@@ -25,21 +18,21 @@ var formatLimitedSizeList = function formatLimitedSizeList(items, intl) {
25
18
  }
26
19
  return intl.formatList(cutItems);
27
20
  };
28
- var formattedList = stringifyList();
21
+ let formattedList = stringifyList();
29
22
  if (formattedList.length <= maxFinalStringLength) {
30
23
  return formattedList;
31
24
  }
32
- var overflowRatio = formattedList.length / maxFinalStringLength;
25
+ const overflowRatio = formattedList.length / maxFinalStringLength;
33
26
  limit = Math.floor(limit / overflowRatio);
34
27
  if (limit === 0) {
35
28
  limit = 1;
36
29
  return stringifyList();
37
30
  }
38
31
  formattedList = stringifyList();
39
- var maxIncreaseAttempts = 4;
40
- for (var i = 0; i < maxIncreaseAttempts; i++) {
32
+ const maxIncreaseAttempts = 4;
33
+ for (let i = 0; i < maxIncreaseAttempts; i++) {
41
34
  limit++;
42
- var newLimitFormattedList = stringifyList();
35
+ const newLimitFormattedList = stringifyList();
43
36
  if (newLimitFormattedList.length > maxFinalStringLength) {
44
37
  return formattedList;
45
38
  }
@@ -47,21 +40,19 @@ var formatLimitedSizeList = function formatLimitedSizeList(items, intl) {
47
40
  }
48
41
  return formattedList;
49
42
  };
50
- var isReactComponent = function isReactComponent(obj) {
51
- return (0, _typeof2["default"])(obj) === 'object' && obj && 'displayName' in obj && typeof obj.displayName === 'string';
52
- };
53
- var guessNumberAsTimestampMinDate = new Date('1975').getTime();
54
- var _defaultValueFormatter = exports.defaultValueFormatter = function defaultValueFormatter(intl, value) {
55
- var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
56
- siblingsTimeMark = _ref.siblingsTimeMark,
57
- maxListSymbols = _ref.maxListSymbols,
58
- datesWithTime = _ref.datesWithTime;
43
+ const isReactComponent = obj => typeof obj === 'object' && obj && 'displayName' in obj && typeof obj.displayName === 'string';
44
+ const guessNumberAsTimestampMinDate = new Date('1975').getTime();
45
+ const defaultValueFormatter = (intl, value, {
46
+ siblingsTimeMark,
47
+ maxListSymbols,
48
+ datesWithTime
49
+ } = {}) => {
59
50
  if (typeof value === 'number') {
60
51
  if (value >= guessNumberAsTimestampMinDate) {
61
- return _defaultValueFormatter(intl, new Date(value), {
62
- siblingsTimeMark: siblingsTimeMark,
63
- maxListSymbols: maxListSymbols,
64
- datesWithTime: datesWithTime
52
+ return defaultValueFormatter(intl, new Date(value), {
53
+ siblingsTimeMark,
54
+ maxListSymbols,
55
+ datesWithTime
65
56
  });
66
57
  }
67
58
  return intl.formatNumber(value);
@@ -78,13 +69,11 @@ var _defaultValueFormatter = exports.defaultValueFormatter = function defaultVal
78
69
  });
79
70
  }
80
71
  if (Array.isArray(value)) {
81
- var formattedValues = value.map(function (subValue) {
82
- return _defaultValueFormatter(intl, subValue, {
83
- siblingsTimeMark: siblingsTimeMark,
84
- maxListSymbols: maxListSymbols,
85
- datesWithTime: datesWithTime
86
- });
87
- });
72
+ const formattedValues = value.map(subValue => defaultValueFormatter(intl, subValue, {
73
+ siblingsTimeMark,
74
+ maxListSymbols,
75
+ datesWithTime
76
+ }));
88
77
  return formatLimitedSizeList(formattedValues, intl, maxListSymbols);
89
78
  }
90
79
  if (isReactComponent(value)) {
@@ -97,25 +86,28 @@ var _defaultValueFormatter = exports.defaultValueFormatter = function defaultVal
97
86
  }
98
87
  return String(value);
99
88
  };
100
- var formatValuesList = function formatValuesList(values, _ref2) {
101
- var intl = _ref2.intl,
102
- limit = _ref2.limit,
103
- datesWithTime = _ref2.datesWithTime,
104
- maxListSymbols = _ref2.maxListSymbols;
105
- var result = values.slice(0, limit).map(function (_ref3) {
106
- var rawValue = _ref3.value,
107
- label = _ref3.label;
89
+ exports.defaultValueFormatter = defaultValueFormatter;
90
+ const formatValuesList = (values, {
91
+ intl,
92
+ limit,
93
+ datesWithTime,
94
+ maxListSymbols
95
+ }) => {
96
+ const result = values.slice(0, limit).map(({
97
+ value: rawValue,
98
+ label
99
+ }) => {
108
100
  if (rawValue === undefined) return label;
109
- var value = _defaultValueFormatter(intl, rawValue, {
110
- datesWithTime: datesWithTime,
111
- maxListSymbols: maxListSymbols
101
+ const value = defaultValueFormatter(intl, rawValue, {
102
+ datesWithTime,
103
+ maxListSymbols
112
104
  });
113
105
  if (String(value) === String(label)) return value;
114
106
  return intl.formatMessage({
115
107
  id: 'value-labeled'
116
108
  }, {
117
- label: label,
118
- value: value
109
+ label,
110
+ value
119
111
  });
120
112
  });
121
113
  if (values.length > limit) {
@@ -127,113 +119,91 @@ var formatValuesList = function formatValuesList(values, _ref2) {
127
119
  }
128
120
  return intl.formatList(result);
129
121
  };
130
- var serialize = exports.serialize = function serialize(_ref4, _ref5, _ref6) {
131
- var insights = _ref4.insights,
132
- dataType = _ref4.dataType,
133
- dataRange = _ref4.dataRange,
134
- dataTitle = _ref4.dataTitle,
135
- entitiesCount = _ref4.entitiesCount;
136
- var datesWithTime = _ref5.datesWithTime,
137
- maxListSymbols = _ref5.maxListSymbols,
138
- clustersLimit = _ref5.clustersLimit,
139
- valuesLimit = _ref5.valuesLimit,
140
- groupsLimit = _ref5.groupsLimit,
141
- titlesFormatter = _ref5.titlesFormatter,
142
- valuesFormatter = _ref5.valuesFormatter;
143
- var locale = _ref6.locale,
144
- translations = _ref6.translations,
145
- availableLocales = _ref6.availableLocales;
122
+ const serialize = ({
123
+ insights,
124
+ dataType,
125
+ dataRange,
126
+ dataTitle,
127
+ entitiesCount
128
+ }, {
129
+ datesWithTime,
130
+ maxListSymbols,
131
+ clustersLimit,
132
+ valuesLimit,
133
+ groupsLimit,
134
+ titlesFormatter,
135
+ valuesFormatter
136
+ }, {
137
+ locale,
138
+ translations,
139
+ availableLocales
140
+ }) => {
146
141
  if (insights.length === 0) return null;
147
- var intl = (0, _intl.getIntl)(locale, translations, availableLocales);
148
- var dataRangeSummary = intl.formatList(dataRange.map(function (range) {
149
- var _valuesFormatter, _valuesFormatter2, _titlesFormatter;
150
- var from = (_valuesFormatter = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(range.from, range.label)) !== null && _valuesFormatter !== void 0 ? _valuesFormatter : _defaultValueFormatter(intl, range.from, {
142
+ const intl = (0, _intl.getIntl)(locale, translations, availableLocales);
143
+ const dataRangeSummary = intl.formatList(dataRange.map(range => {
144
+ const from = valuesFormatter?.(range.from, range.label) ?? defaultValueFormatter(intl, range.from, {
151
145
  siblingsTimeMark: range.to,
152
- datesWithTime: datesWithTime,
153
- maxListSymbols: maxListSymbols
146
+ datesWithTime,
147
+ maxListSymbols
154
148
  });
155
- var to = (_valuesFormatter2 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(range.to, range.label)) !== null && _valuesFormatter2 !== void 0 ? _valuesFormatter2 : _defaultValueFormatter(intl, range.to, {
149
+ const to = valuesFormatter?.(range.to, range.label) ?? defaultValueFormatter(intl, range.to, {
156
150
  siblingsTimeMark: range.from,
157
- datesWithTime: datesWithTime,
158
- maxListSymbols: maxListSymbols
151
+ datesWithTime,
152
+ maxListSymbols
159
153
  });
160
154
  return intl.formatMessage({
161
155
  id: range.label ? 'additional-axe' : 'additional-axe-no-label'
162
156
  }, {
163
- from: from,
164
- to: to,
165
- label: (_titlesFormatter = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(range.label)) !== null && _titlesFormatter !== void 0 ? _titlesFormatter : range.label
157
+ from,
158
+ to,
159
+ label: titlesFormatter?.(range.label) ?? range.label
166
160
  });
167
161
  }));
168
162
  if (dataType === 'time-series') {
169
- var _titlesFormatter3;
170
- var trendsInsights = insights;
171
- var trendsByDataKey = {};
172
- var _iterator = (0, _createForOfIteratorHelper2["default"])(trendsInsights),
173
- _step;
174
- try {
175
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
176
- var _trendsByDataKey$insi;
177
- var insight = _step.value;
178
- trendsByDataKey[insight.dataKey] = (_trendsByDataKey$insi = trendsByDataKey[insight.dataKey]) !== null && _trendsByDataKey$insi !== void 0 ? _trendsByDataKey$insi : [];
179
- trendsByDataKey[insight.dataKey].push(insight);
180
- }
181
- } catch (err) {
182
- _iterator.e(err);
183
- } finally {
184
- _iterator.f();
163
+ const trendsInsights = insights;
164
+ const trendsByDataKey = {};
165
+ for (const insight of trendsInsights) {
166
+ trendsByDataKey[insight.dataKey] = trendsByDataKey[insight.dataKey] ?? [];
167
+ trendsByDataKey[insight.dataKey].push(insight);
185
168
  }
186
- var entities = intl.formatMessage({
169
+ const entities = intl.formatMessage({
187
170
  id: 'entity-type-time-series'
188
171
  }, {
189
172
  count: entitiesCount
190
173
  });
191
- var entitiesList = Object.entries(trendsByDataKey).map(function (_ref7) {
192
- var _primaryTrend$label, _titlesFormatter2, _valuesFormatter3, _valuesFormatter4;
193
- var _ref8 = (0, _slicedToArray2["default"])(_ref7, 2),
194
- dataKey = _ref8[0],
195
- insights = _ref8[1];
196
- var generalTrend = insights.find(function (insight) {
197
- return insight.type === 'general-trend';
198
- });
199
- var localTrends = insights.filter(function (insight) {
200
- return insight !== generalTrend;
201
- });
202
- var primaryTrend = generalTrend !== null && generalTrend !== void 0 ? generalTrend : localTrends[0];
203
- var secondaryTrends = insights.filter(function (insight) {
204
- return insight !== primaryTrend;
205
- });
206
- var summaryDataKey = entitiesCount !== 1 ? (_primaryTrend$label = primaryTrend.label) !== null && _primaryTrend$label !== void 0 ? _primaryTrend$label : dataKey : '';
207
- var mainSummary = intl.formatMessage({
174
+ const entitiesList = Object.entries(trendsByDataKey).map(([dataKey, insights]) => {
175
+ const generalTrend = insights.find(insight => insight.type === 'general-trend');
176
+ const localTrends = insights.filter(insight => insight !== generalTrend);
177
+ const primaryTrend = generalTrend ?? localTrends[0];
178
+ const secondaryTrends = insights.filter(insight => insight !== primaryTrend);
179
+ const summaryDataKey = entitiesCount !== 1 ? primaryTrend.label ?? dataKey : '';
180
+ const mainSummary = intl.formatMessage({
208
181
  id: 'time-series-general-trend'
209
182
  }, {
210
- dataKey: (_titlesFormatter2 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(summaryDataKey)) !== null && _titlesFormatter2 !== void 0 ? _titlesFormatter2 : summaryDataKey,
183
+ dataKey: titlesFormatter?.(summaryDataKey) ?? summaryDataKey,
211
184
  trend: intl.formatMessage({
212
- id: "trend-".concat(primaryTrend.change.strength)
185
+ id: `trend-${primaryTrend.change.strength}`
213
186
  }),
214
- from: (_valuesFormatter3 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(primaryTrend.change.from, dataKey)) !== null && _valuesFormatter3 !== void 0 ? _valuesFormatter3 : intl.formatNumber(primaryTrend.change.from),
215
- to: (_valuesFormatter4 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(primaryTrend.change.to, dataKey)) !== null && _valuesFormatter4 !== void 0 ? _valuesFormatter4 : intl.formatNumber(primaryTrend.change.to)
216
- });
217
- var secondarySummaries = secondaryTrends.map(function (trend) {
218
- var _valuesFormatter5, _valuesFormatter6;
219
- return intl.formatMessage({
220
- id: 'time-series-local-trend'
221
- }, {
222
- trend: intl.formatMessage({
223
- id: "trend-".concat(trend.change.strength)
224
- }),
225
- from: (_valuesFormatter5 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(trend.from, trend.dataKey)) !== null && _valuesFormatter5 !== void 0 ? _valuesFormatter5 : _defaultValueFormatter(intl, trend.from, {
226
- siblingsTimeMark: trend.to,
227
- datesWithTime: datesWithTime,
228
- maxListSymbols: maxListSymbols
229
- }),
230
- to: (_valuesFormatter6 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(trend.to, trend.dataKey)) !== null && _valuesFormatter6 !== void 0 ? _valuesFormatter6 : _defaultValueFormatter(intl, trend.to, {
231
- siblingsTimeMark: trend.from,
232
- datesWithTime: datesWithTime,
233
- maxListSymbols: maxListSymbols
234
- })
235
- });
187
+ from: valuesFormatter?.(primaryTrend.change.from, dataKey) ?? intl.formatNumber(primaryTrend.change.from),
188
+ to: valuesFormatter?.(primaryTrend.change.to, dataKey) ?? intl.formatNumber(primaryTrend.change.to)
236
189
  });
190
+ const secondarySummaries = secondaryTrends.map(trend => intl.formatMessage({
191
+ id: 'time-series-local-trend'
192
+ }, {
193
+ trend: intl.formatMessage({
194
+ id: `trend-${trend.change.strength}`
195
+ }),
196
+ from: valuesFormatter?.(trend.from, trend.dataKey) ?? defaultValueFormatter(intl, trend.from, {
197
+ siblingsTimeMark: trend.to,
198
+ datesWithTime,
199
+ maxListSymbols
200
+ }),
201
+ to: valuesFormatter?.(trend.to, trend.dataKey) ?? defaultValueFormatter(intl, trend.to, {
202
+ siblingsTimeMark: trend.from,
203
+ datesWithTime,
204
+ maxListSymbols
205
+ })
206
+ }));
237
207
  if (secondarySummaries.length === 0) {
238
208
  return mainSummary;
239
209
  }
@@ -244,24 +214,23 @@ var serialize = exports.serialize = function serialize(_ref4, _ref5, _ref6) {
244
214
  locals: formatLimitedSizeList(secondarySummaries, intl, 400, false)
245
215
  });
246
216
  });
247
- var summary = intl.formatMessage({
217
+ const summary = intl.formatMessage({
248
218
  id: dataTitle ? 'chart-summary' : 'chart-summary-no-label'
249
219
  }, {
250
- entities: entities,
220
+ entities,
251
221
  entitiesList: intl.formatList(entitiesList),
252
- label: (_titlesFormatter3 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(dataTitle)) !== null && _titlesFormatter3 !== void 0 ? _titlesFormatter3 : dataTitle
222
+ label: titlesFormatter?.(dataTitle) ?? dataTitle
253
223
  });
254
224
  if (dataRangeSummary.length > 0) {
255
- return "".concat(summary, "\n").concat(dataRangeSummary);
225
+ return `${summary}\n${dataRangeSummary}`;
256
226
  }
257
227
  return summary;
258
228
  } else if (dataType === 'points-cloud') {
259
- var _titlesFormatter7;
260
- var clustersInsights = insights;
261
- var biggestClusters = clustersInsights.slice(0, clustersLimit);
262
- var maxSize = clustersInsights[0].size;
263
- var minSize = clustersInsights[clustersInsights.length - 1].size;
264
- var _entities = maxSize === minSize ? intl.formatMessage({
229
+ const clustersInsights = insights;
230
+ const biggestClusters = clustersInsights.slice(0, clustersLimit);
231
+ const maxSize = clustersInsights[0].size;
232
+ const minSize = clustersInsights[clustersInsights.length - 1].size;
233
+ const entities = maxSize === minSize ? intl.formatMessage({
265
234
  id: 'entity-type-clusters-single-size'
266
235
  }, {
267
236
  count: entitiesCount,
@@ -270,80 +239,70 @@ var serialize = exports.serialize = function serialize(_ref4, _ref5, _ref6) {
270
239
  id: 'entity-type-clusters-multiple-size'
271
240
  }, {
272
241
  count: entitiesCount,
273
- maxSize: maxSize,
274
- minSize: minSize
242
+ maxSize,
243
+ minSize
275
244
  });
276
- var _entitiesList = biggestClusters.map(function (clusterInsight) {
277
- var _valuesFormatter7, _titlesFormatter5, _valuesFormatter8, _titlesFormatter6;
278
- var labels = formatLimitedSizeList(clusterInsight.labels.map(function (label) {
279
- var _titlesFormatter4;
280
- return (_titlesFormatter4 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(label)) !== null && _titlesFormatter4 !== void 0 ? _titlesFormatter4 : label;
281
- }), intl, maxListSymbols);
282
- var anonymous = clusterInsight.labels.length === 0 || labels === String(clusterInsight.size);
245
+ const entitiesList = biggestClusters.map(clusterInsight => {
246
+ const labels = formatLimitedSizeList(clusterInsight.labels.map(label => titlesFormatter?.(label) ?? label), intl, maxListSymbols);
247
+ const anonymous = clusterInsight.labels.length === 0 || labels === String(clusterInsight.size);
283
248
  return intl.formatMessage({
284
249
  id: anonymous ? 'entity-type-clusters-label-anonymous' : 'entity-type-clusters-label'
285
250
  }, {
286
251
  relativeSize: intl.formatMessage({
287
- id: "relative-size-".concat(clusterInsight.relativeSize)
252
+ id: `relative-size-${clusterInsight.relativeSize}`
288
253
  }),
289
- labels: labels,
254
+ labels,
290
255
  size: clusterInsight.size,
291
- x: (_valuesFormatter7 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(clusterInsight.center.x, clusterInsight.labels)) !== null && _valuesFormatter7 !== void 0 ? _valuesFormatter7 : intl.formatNumber(clusterInsight.center.x),
292
- xLabel: (_titlesFormatter5 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(clusterInsight.center.xLabel)) !== null && _titlesFormatter5 !== void 0 ? _titlesFormatter5 : clusterInsight.center.xLabel,
293
- y: (_valuesFormatter8 = valuesFormatter === null || valuesFormatter === void 0 ? void 0 : valuesFormatter(clusterInsight.center.y, clusterInsight.labels)) !== null && _valuesFormatter8 !== void 0 ? _valuesFormatter8 : intl.formatNumber(clusterInsight.center.y),
294
- yLabel: (_titlesFormatter6 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(clusterInsight.center.yLabel)) !== null && _titlesFormatter6 !== void 0 ? _titlesFormatter6 : clusterInsight.center.yLabel
256
+ x: valuesFormatter?.(clusterInsight.center.x, clusterInsight.labels) ?? intl.formatNumber(clusterInsight.center.x),
257
+ xLabel: titlesFormatter?.(clusterInsight.center.xLabel) ?? clusterInsight.center.xLabel,
258
+ y: valuesFormatter?.(clusterInsight.center.y, clusterInsight.labels) ?? intl.formatNumber(clusterInsight.center.y),
259
+ yLabel: titlesFormatter?.(clusterInsight.center.yLabel) ?? clusterInsight.center.yLabel
295
260
  });
296
261
  });
297
262
  if (insights.length > clustersLimit) {
298
- _entitiesList.push(intl.formatMessage({
263
+ entitiesList.push(intl.formatMessage({
299
264
  id: 'ellipsis'
300
265
  }, {
301
266
  leftCount: insights.length - clustersLimit
302
267
  }));
303
268
  }
304
- var _summary = intl.formatMessage({
269
+ const summary = intl.formatMessage({
305
270
  id: dataTitle ? 'chart-summary' : 'chart-summary-no-label'
306
271
  }, {
307
- entities: _entities,
308
- entitiesList: intl.formatList(_entitiesList),
309
- label: (_titlesFormatter7 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(dataTitle)) !== null && _titlesFormatter7 !== void 0 ? _titlesFormatter7 : dataTitle
272
+ entities,
273
+ entitiesList: intl.formatList(entitiesList),
274
+ label: titlesFormatter?.(dataTitle) ?? dataTitle
310
275
  });
311
276
  if (dataRangeSummary.length > 0) {
312
- return "".concat(_summary, "\n").concat(dataRangeSummary);
277
+ return `${summary}\n${dataRangeSummary}`;
313
278
  }
314
- return _summary;
279
+ return summary;
315
280
  } else if (dataType === 'values-set') {
316
- var _titlesFormatter8;
317
- var _ref9 = insights,
318
- _ref0 = (0, _slicedToArray2["default"])(_ref9, 1),
319
- valuesInsight = _ref0[0];
320
- var _entities2 = intl.formatMessage({
281
+ const [valuesInsight] = insights;
282
+ const entities = intl.formatMessage({
321
283
  id: 'entity-type-values'
322
284
  }, {
323
285
  count: entitiesCount
324
286
  });
325
- var _entitiesList2 = formatValuesList(valuesInsight.values, {
326
- intl: intl,
287
+ const entitiesList = formatValuesList(valuesInsight.values, {
288
+ intl,
327
289
  limit: valuesLimit,
328
- datesWithTime: datesWithTime,
329
- maxListSymbols: maxListSymbols
290
+ datesWithTime,
291
+ maxListSymbols
330
292
  });
331
293
  return intl.formatMessage({
332
294
  id: dataTitle ? 'chart-summary' : 'chart-summary-no-label'
333
295
  }, {
334
- entities: _entities2,
335
- entitiesList: _entitiesList2,
336
- label: (_titlesFormatter8 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(dataTitle)) !== null && _titlesFormatter8 !== void 0 ? _titlesFormatter8 : dataTitle
296
+ entities,
297
+ entitiesList: entitiesList,
298
+ label: titlesFormatter?.(dataTitle) ?? dataTitle
337
299
  });
338
300
  } else if (dataType === 'grouped-values' || dataType === 'indexed-groups') {
339
- var _titlesFormatter9;
340
- var groupInsights = insights;
341
- var valueCounts = groupInsights.map(function (group) {
342
- return group.values.length;
343
- });
344
- var minValuesCount = Math.min.apply(Math, (0, _toConsumableArray2["default"])(valueCounts));
345
- var maxValuesCount = Math.max.apply(Math, (0, _toConsumableArray2["default"])(valueCounts));
346
- var _entities3 = minValuesCount === maxValuesCount ? intl.formatMessage({
301
+ const groupInsights = insights;
302
+ const valueCounts = groupInsights.map(group => group.values.length);
303
+ const minValuesCount = Math.min(...valueCounts);
304
+ const maxValuesCount = Math.max(...valueCounts);
305
+ const entities = minValuesCount === maxValuesCount ? intl.formatMessage({
347
306
  id: 'entity-type-grouped-values-single-size'
348
307
  }, {
349
308
  groupsCount: groupInsights.length,
@@ -352,41 +311,43 @@ var serialize = exports.serialize = function serialize(_ref4, _ref5, _ref6) {
352
311
  id: 'entity-type-grouped-values-multiple-size'
353
312
  }, {
354
313
  groupsCount: groupInsights.length,
355
- minValuesCount: minValuesCount,
356
- maxValuesCount: maxValuesCount
314
+ minValuesCount,
315
+ maxValuesCount
357
316
  });
358
- var _entitiesList3 = groupInsights.slice(0, groupsLimit).map(function (_ref1) {
359
- var label = _ref1.label,
360
- values = _ref1.values;
361
- var formattedValues = formatValuesList(values, {
362
- intl: intl,
317
+ const entitiesList = groupInsights.slice(0, groupsLimit).map(({
318
+ label,
319
+ values
320
+ }) => {
321
+ const formattedValues = formatValuesList(values, {
322
+ intl,
363
323
  limit: valuesLimit,
364
- datesWithTime: datesWithTime,
365
- maxListSymbols: maxListSymbols
324
+ datesWithTime,
325
+ maxListSymbols
366
326
  });
367
327
  return intl.formatMessage({
368
328
  id: 'values-group'
369
329
  }, {
370
- label: label,
330
+ label,
371
331
  values: formattedValues
372
332
  });
373
333
  });
374
334
  if (groupInsights.values.length > groupsLimit) {
375
- _entitiesList3.push(intl.formatMessage({
335
+ entitiesList.push(intl.formatMessage({
376
336
  id: 'ellipsis'
377
337
  }, {
378
338
  leftCount: groupInsights.values.length - groupsLimit
379
339
  }));
380
340
  }
381
- var _summary2 = intl.formatMessage({
341
+ const summary = intl.formatMessage({
382
342
  id: dataTitle ? 'chart-summary' : 'chart-summary-no-label'
383
343
  }, {
384
- entities: _entities3,
385
- entitiesList: intl.formatList(_entitiesList3),
386
- label: (_titlesFormatter9 = titlesFormatter === null || titlesFormatter === void 0 ? void 0 : titlesFormatter(dataTitle)) !== null && _titlesFormatter9 !== void 0 ? _titlesFormatter9 : dataTitle
344
+ entities,
345
+ entitiesList: intl.formatList(entitiesList),
346
+ label: titlesFormatter?.(dataTitle) ?? dataTitle
387
347
  });
388
- return _summary2;
348
+ return summary;
389
349
  }
390
350
  return null;
391
351
  };
352
+ exports.serialize = serialize;
392
353
  //# sourceMappingURL=serialize.js.map