@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
package/lib/esm/Donut.mjs CHANGED
@@ -1,11 +1,4 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
- import _createClass from "@babel/runtime/helpers/esm/createClass";
5
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
9
2
  import { sstyled, assignProps, Component } from "@semcore/core";
10
3
  import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
11
4
  import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
@@ -19,45 +12,49 @@ import createElement from "./createElement.mjs";
19
12
  import { PatternFill } from "./Pattern.mjs";
20
13
  import Tooltip from "./Tooltip.mjs";
21
14
  import { getChartDefaultColorName } from "./utils.mjs";
22
- var _excluded = ["Element", "styles", "d3Arc", "data", "color", "$animationActivePie", "active", "d3ArcOut", "name", "dataKey", "dataHintsHandler", "transparent", "innerRadius", "outerRadius", "resolveColor", "halfsize", "uid", "patterns", "onClick", "onClickPieRoot"];
23
15
  /*!__reshadow-styles__:"./style/donut.shadow.css"*/
24
- var style = (
16
+ const style = (
25
17
  /*__reshadow_css_start__*/
26
18
  (sstyled.insert(
27
19
  /*__inner_css_start__*/
28
- ".___SPie_1yxlu_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPie_1yxlu_gg_.__color_1yxlu_gg_{fill:var(--color_1yxlu)}.___SPie_1yxlu_gg_.__pattern_1yxlu_gg_.__color_1yxlu_gg_{fill:var(--pattern_1yxlu);stroke:var(--color_1yxlu);stroke-width:1px}.___SPie_1yxlu_gg_.__transparent_1yxlu_gg_{opacity:.3}.___SEmptyData_1yxlu_gg_{fill:var(--intergalactic-chart-palette-order-null, #e0e1e9)}.___SEmptyData_1yxlu_gg_.__color_1yxlu_gg_{fill:var(--color_1yxlu)}.___SLabel_1yxlu_gg_{text-anchor:middle;vertical-anchor:middle;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}",
20
+ ".___SPie_1s4vb_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPie_1s4vb_gg_.__color_1s4vb_gg_{fill:var(--color_1s4vb)}.___SPie_1s4vb_gg_.__pattern_1s4vb_gg_.__color_1s4vb_gg_{fill:var(--pattern_1s4vb);stroke:var(--color_1s4vb);stroke-width:1px}.___SPie_1s4vb_gg_.__transparent_1s4vb_gg_{opacity:.3}.___SEmptyData_1s4vb_gg_{fill:var(--intergalactic-chart-palette-order-null, #e0e1e9)}.___SEmptyData_1s4vb_gg_.__color_1s4vb_gg_{fill:var(--color_1s4vb)}.___SLabel_1s4vb_gg_{text-anchor:middle;vertical-anchor:middle;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}",
29
21
  /*__inner_css_end__*/
30
- "1yxlu_gg_"
22
+ "1s4vb_gg_"
31
23
  ), /*__reshadow_css_end__*/
32
24
  {
33
- "__SPie": "___SPie_1yxlu_gg_",
34
- "_color": "__color_1yxlu_gg_",
35
- "--color": "--color_1yxlu",
36
- "_pattern": "__pattern_1yxlu_gg_",
37
- "--pattern": "--pattern_1yxlu",
38
- "_transparent": "__transparent_1yxlu_gg_",
39
- "__SEmptyData": "___SEmptyData_1yxlu_gg_",
40
- "__SLabel": "___SLabel_1yxlu_gg_"
25
+ "__SPie": "___SPie_1s4vb_gg_",
26
+ "_color": "__color_1s4vb_gg_",
27
+ "--color": "--color_1s4vb",
28
+ "_pattern": "__pattern_1s4vb_gg_",
29
+ "--pattern": "--pattern_1s4vb",
30
+ "_transparent": "__transparent_1s4vb_gg_",
31
+ "__SEmptyData": "___SEmptyData_1s4vb_gg_",
32
+ "__SLabel": "___SLabel_1s4vb_gg_"
41
33
  })
42
34
  );
43
- var DEFAULT_INSTANCE = Symbol("DEFAULT_INSTANCE");
44
- function transitionAnglePie(_ref6) {
45
- var selector = _ref6.selector, duration = _ref6.duration, halfsize = _ref6.halfsize, d3Arc = _ref6.d3Arc, d3ArcOut = _ref6.d3ArcOut, arcs = _ref6.arcs, activeIndexPie = _ref6.activeIndexPie;
35
+ const DEFAULT_INSTANCE = Symbol("DEFAULT_INSTANCE");
36
+ function transitionAnglePie({
37
+ selector,
38
+ duration,
39
+ halfsize,
40
+ d3Arc,
41
+ d3ArcOut,
42
+ arcs,
43
+ activeIndexPie
44
+ }) {
46
45
  return transition().selection().selectAll(selector).interrupt().transition().duration(duration).attrTween("d", function(_, ind) {
47
- if (!arcs[ind]) return function() {
48
- return "";
49
- };
50
- var d = Object.assign({}, arcs[ind]);
51
- var self = this;
52
- var initAngle = halfsize ? -Math.PI / 2 : 0;
53
- var prevStartAngle = initAngle;
54
- var prevEndAngle = initAngle;
46
+ if (!arcs[ind]) return () => "";
47
+ const d = Object.assign({}, arcs[ind]);
48
+ const self = this;
49
+ const initAngle = halfsize ? -Math.PI / 2 : 0;
50
+ let prevStartAngle = initAngle;
51
+ let prevEndAngle = initAngle;
55
52
  if (self.arc) {
56
53
  prevStartAngle = self.arc.startAngle;
57
54
  prevEndAngle = self.arc.endAngle;
58
55
  }
59
- var iStartAngle = interpolate(prevStartAngle, d.startAngle);
60
- var iEndAngle = interpolate(prevEndAngle, d.endAngle);
56
+ const iStartAngle = interpolate(prevStartAngle, d.startAngle);
57
+ const iEndAngle = interpolate(prevEndAngle, d.endAngle);
61
58
  return function(t) {
62
59
  d.startAngle = iStartAngle(t);
63
60
  d.endAngle = iEndAngle(t);
@@ -66,55 +63,71 @@ function transitionAnglePie(_ref6) {
66
63
  };
67
64
  });
68
65
  }
69
- function transitionRadiusPie(_ref7) {
70
- var data = _ref7.data, selector = _ref7.selector, element = _ref7.element, duration = _ref7.duration, innerRadius = _ref7.innerRadius, outerRadiusStartEnd = _ref7.outerRadiusStartEnd, paddingAngle = _ref7.paddingAngle;
66
+ function transitionRadiusPie({
67
+ data,
68
+ selector,
69
+ element,
70
+ duration,
71
+ innerRadius,
72
+ outerRadiusStartEnd,
73
+ paddingAngle
74
+ }) {
71
75
  return transition().selection().select(selector).interrupt().transition().duration(duration).attrTween("d", function() {
72
- var _outerRadiusStartEnd = _slicedToArray(outerRadiusStartEnd, 2), start = _outerRadiusStartEnd[0], end = _outerRadiusStartEnd[1];
73
- var iOuterRadius = interpolate(start, end);
76
+ const [start, end] = outerRadiusStartEnd;
77
+ const iOuterRadius = interpolate(start, end);
74
78
  return function(t) {
75
- var outerRadiusPX = iOuterRadius(t);
79
+ const outerRadiusPX = iOuterRadius(t);
76
80
  element.dataset["currentRadius"] = outerRadiusPX;
77
- var d3ArcOut = arc().innerRadius(innerRadius).outerRadius(outerRadiusPX).padAngle(paddingAngle);
81
+ const d3ArcOut = arc().innerRadius(innerRadius).outerRadius(outerRadiusPX).padAngle(paddingAngle);
78
82
  return d3ArcOut(data);
79
83
  };
80
84
  });
81
85
  }
82
- var increaseFactor = 8;
83
- function getOuterRadius(_ref8) {
84
- var size = _ref8.size, halfsize = _ref8.halfsize;
85
- var _size = _slicedToArray(size, 2), width = _size[0], height = _size[1];
86
- var minORmax = halfsize ? Math.max : Math.min;
86
+ const increaseFactor = 8;
87
+ function getOuterRadius({
88
+ size,
89
+ halfsize
90
+ }) {
91
+ const [width, height] = size;
92
+ const minORmax = halfsize ? Math.max : Math.min;
87
93
  return minORmax(width - increaseFactor * 2, height - increaseFactor * 2) / 2;
88
94
  }
89
- var DonutRoot = /* @__PURE__ */ (function(_Component) {
90
- function DonutRoot2() {
91
- var _this;
92
- _classCallCheck(this, DonutRoot2);
93
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
94
- args[_key] = arguments[_key];
95
- }
96
- _this = _callSuper(this, DonutRoot2, [].concat(args));
97
- _defineProperty(_this, "virtualElement", canUseDOM() ? document.createElement("div") : {});
98
- _defineProperty(_this, "activeIndexPie", void 0);
99
- _defineProperty(_this, "canAnimatedHover", false);
100
- _defineProperty(_this, "bindHandlerTooltip", function(visible, props, tooltipProps) {
101
- return function(_ref9) {
102
- var clientX = _ref9.clientX, clientY = _ref9.clientY;
103
- var _this$asProps = _this.asProps, eventEmitter = _this$asProps.eventEmitter, plotId = _this$asProps.plotId;
104
- eventEmitter.emit("setTooltipPosition_".concat(plotId), clientX, clientY);
105
- eventEmitter.emit("setTooltipRenderingProps_".concat(plotId), props, tooltipProps);
106
- eventEmitter.emit("setTooltipVisible_".concat(plotId), visible);
107
- };
95
+ class DonutRoot extends Component {
96
+ constructor(...args) {
97
+ super(...args);
98
+ _defineProperty(this, "virtualElement", canUseDOM() ? document.createElement("div") : {});
99
+ _defineProperty(this, "activeIndexPie", void 0);
100
+ _defineProperty(this, "canAnimatedHover", false);
101
+ _defineProperty(this, "bindHandlerTooltip", (visible, props, tooltipProps) => ({
102
+ clientX,
103
+ clientY
104
+ }) => {
105
+ const {
106
+ eventEmitter,
107
+ plotId
108
+ } = this.asProps;
109
+ eventEmitter.emit(`setTooltipPosition_${plotId}`, clientX, clientY);
110
+ eventEmitter.emit(`setTooltipRenderingProps_${plotId}`, props, tooltipProps);
111
+ eventEmitter.emit(`setTooltipVisible_${plotId}`, visible);
108
112
  });
109
- _defineProperty(_this, "animationActivePie", function(_ref0) {
110
- var data = _ref0.data, active = _ref0.active, selector = _ref0.selector, element = _ref0.element;
111
- var _this$asProps2 = _this.asProps, duration = _this$asProps2.duration, innerRadius = _this$asProps2.innerRadius, d3Arc = _this$asProps2.d3Arc, paddingAngle = _this$asProps2.paddingAngle;
112
- var outerRadius = d3Arc.outerRadius()();
113
- var outerRadiusStartEnd = active ? [+element.dataset["currentRadius"] || outerRadius, outerRadius + increaseFactor] : [+element.dataset["currentRadius"] || outerRadius, outerRadius];
114
- if (_this.canAnimatedHover && duration > 0) {
113
+ _defineProperty(this, "animationActivePie", ({
114
+ data,
115
+ active,
116
+ selector,
117
+ element
118
+ }) => {
119
+ const {
120
+ duration,
121
+ innerRadius,
122
+ d3Arc,
123
+ paddingAngle
124
+ } = this.asProps;
125
+ const outerRadius = d3Arc.outerRadius()();
126
+ const outerRadiusStartEnd = active ? [+element.dataset["currentRadius"] || outerRadius, outerRadius + increaseFactor] : [+element.dataset["currentRadius"] || outerRadius, outerRadius];
127
+ if (this.canAnimatedHover && duration > 0) {
115
128
  transitionRadiusPie({
116
129
  data,
117
- selector: "#".concat(_this.id, " ").concat(selector),
130
+ selector: `#${this.id} ${selector}`,
118
131
  element,
119
132
  duration: duration === 0 ? 0 : 300,
120
133
  innerRadius,
@@ -123,211 +136,211 @@ var DonutRoot = /* @__PURE__ */ (function(_Component) {
123
136
  });
124
137
  }
125
138
  });
126
- _defineProperty(_this, "animationTimeout", null);
127
- _defineProperty(_this, "animationUpdatePie", function() {
128
- clearTimeout(_this.animationTimeout);
129
- _this.animationTimeout = setTimeout(function() {
130
- var _this$asProps3 = _this.asProps, duration = _this$asProps3.duration, d3Arc = _this$asProps3.d3Arc, halfsize = _this$asProps3.halfsize, d3ArcOut = _this$asProps3.d3ArcOut;
131
- _this.canAnimatedHover = false;
139
+ _defineProperty(this, "animationTimeout", null);
140
+ _defineProperty(this, "animationUpdatePie", () => {
141
+ clearTimeout(this.animationTimeout);
142
+ this.animationTimeout = setTimeout(() => {
143
+ const {
144
+ duration,
145
+ d3Arc,
146
+ halfsize,
147
+ d3ArcOut
148
+ } = this.asProps;
149
+ this.canAnimatedHover = false;
132
150
  if (duration > 0) {
133
151
  transitionAnglePie({
134
- selector: "#".concat(_this.id, ' [data-ui-name="Donut.Pie"]'),
152
+ selector: `#${this.id} [data-ui-name="Donut.Pie"]`,
135
153
  duration,
136
- arcs: _this.arcs,
154
+ arcs: this.arcs,
137
155
  halfsize,
138
156
  d3Arc,
139
157
  d3ArcOut,
140
- activeIndexPie: _this.activeIndexPie
141
- }).on("end", function() {
142
- _this.canAnimatedHover = true;
158
+ activeIndexPie: this.activeIndexPie
159
+ }).on("end", () => {
160
+ this.canAnimatedHover = true;
143
161
  });
144
162
  } else {
145
- _this.canAnimatedHover = true;
163
+ this.canAnimatedHover = true;
146
164
  }
147
165
  }, 0);
148
166
  });
149
- return _this;
150
167
  }
151
- _inherits(DonutRoot2, _Component);
152
- return _createClass(DonutRoot2, [{
153
- key: "id",
154
- get: function get() {
155
- var _this$asProps4 = this.asProps, uid = _this$asProps4.uid, id = _this$asProps4.id;
156
- return id || uid;
157
- }
158
- }, {
159
- key: "generateGetBoundingClientRect",
160
- value: function generateGetBoundingClientRect() {
161
- var x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
162
- var y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
163
- return function() {
164
- return {
165
- width: 0,
166
- height: 0,
167
- top: y,
168
- right: x,
169
- bottom: y,
170
- left: x
171
- };
172
- };
173
- }
174
- }, {
175
- key: "getArcs",
176
- value: function getArcs() {
177
- var _this$asProps5 = this.asProps, Children = _this$asProps5.Children, data = _this$asProps5.data, d3Pie = _this$asProps5.d3Pie;
178
- var pieData = Object.entries(data);
179
- if (d3Pie[DEFAULT_INSTANCE]) {
180
- var keys = React.Children.toArray(getOriginChildren(Children)).reduce(function(acc, child) {
181
- if (/* @__PURE__ */ React.isValidElement(child) && child.type === Donut.Pie) {
182
- acc.push(child.props.dataKey);
183
- }
184
- return acc;
185
- }, []);
186
- pieData = Object.entries(data).filter(function(_ref1) {
187
- var _ref10 = _slicedToArray(_ref1, 2), key = _ref10[0], value = _ref10[1];
188
- return keys.includes(key) && value > 0;
189
- }).sort(function(_ref11, _ref12) {
190
- var _ref13 = _slicedToArray(_ref11, 1), a = _ref13[0];
191
- var _ref14 = _slicedToArray(_ref12, 1), b = _ref14[0];
192
- return keys.indexOf(a) > keys.indexOf(b) ? 1 : -1;
193
- });
194
- }
195
- var minValue = pieData.reduce(function(acc, cur) {
196
- if (cur[1]) acc += cur[1];
168
+ get id() {
169
+ const {
170
+ uid,
171
+ id
172
+ } = this.asProps;
173
+ return id || uid;
174
+ }
175
+ generateGetBoundingClientRect(x = 0, y = 0) {
176
+ return () => ({
177
+ width: 0,
178
+ height: 0,
179
+ top: y,
180
+ right: x,
181
+ bottom: y,
182
+ left: x
183
+ });
184
+ }
185
+ getArcs() {
186
+ const {
187
+ Children,
188
+ data,
189
+ d3Pie
190
+ } = this.asProps;
191
+ let pieData = Object.entries(data);
192
+ if (d3Pie[DEFAULT_INSTANCE]) {
193
+ const keys = React.Children.toArray(getOriginChildren(Children)).reduce((acc, child) => {
194
+ if (/* @__PURE__ */ React.isValidElement(child) && child.type === Donut.Pie) {
195
+ acc.push(child.props.dataKey);
196
+ }
197
197
  return acc;
198
- }, 0) / 100;
199
- pieData = pieData.map(function(d) {
200
- if (d[1] && d[1] < minValue) d[1] = minValue;
201
- return d;
202
- });
203
- return d3Pie(pieData);
204
- }
205
- }, {
206
- key: "handlerOnClick",
207
- value: function handlerOnClick(key) {
208
- var _this2 = this;
209
- return function(e) {
210
- e.stopPropagation();
211
- var onClick = _this2.asProps.onClick;
212
- if (!onClick) return;
213
- onClick(key, e);
214
- };
198
+ }, []);
199
+ pieData = Object.entries(data).filter(([key, value]) => keys.includes(key) && value > 0).sort(([a], [b]) => keys.indexOf(a) > keys.indexOf(b) ? 1 : -1);
215
200
  }
216
- }, {
217
- key: "getPieProps",
218
- value: function getPieProps(props, index) {
219
- var _this3 = this;
220
- var _this$asProps6 = this.asProps, d3Arc = _this$asProps6.d3Arc, d3ArcOut = _this$asProps6.d3ArcOut, innerRadius = _this$asProps6.innerRadius, outerRadius = _this$asProps6.outerRadius, halfsize = _this$asProps6.halfsize, resolveColor = _this$asProps6.resolveColor, uid = _this$asProps6.uid, patterns = _this$asProps6.patterns;
221
- var active = props.active;
222
- var data = this.arcs.find(function(arc2) {
223
- return arc2.data[0] === props.dataKey;
224
- });
225
- if (active) {
226
- this.activeIndexPie = index;
227
- }
228
- var tooltipProps = {
229
- dataKey: props.dataKey,
230
- name: props.name,
231
- resolveColor,
232
- color: props.color || getChartDefaultColorName(index),
233
- active: props.active,
234
- transparent: props.transparent,
235
- patterns
236
- };
237
- return {
238
- data,
239
- d3Arc,
240
- d3ArcOut,
241
- innerRadius,
242
- outerRadius,
243
- uid: "".concat(uid, "-").concat(index),
244
- patterns,
245
- halfsize,
246
- color: props.color || getChartDefaultColorName(index),
247
- resolveColor,
248
- $animationActivePie: this.animationActivePie,
249
- onMouseMove: this.bindHandlerTooltip(true, props, tooltipProps),
250
- onMouseLeave: this.bindHandlerTooltip(false, props, tooltipProps),
251
- onMouseOver: function onMouseOver(e) {
252
- if (!active) {
253
- _this3.animationActivePie({
254
- active: true,
255
- data,
256
- selector: '[d="'.concat(e.target.getAttribute("d"), '"]'),
257
- element: e.target
258
- });
259
- }
260
- },
261
- onMouseOut: function onMouseOut(e) {
262
- if (!active) {
263
- _this3.animationActivePie({
264
- active: false,
265
- data,
266
- selector: '[d="'.concat(e.target.getAttribute("d"), '"]'),
267
- element: e.target
268
- });
269
- }
270
- },
271
- onClickPieRoot: this.handlerOnClick(props.dataKey)
272
- };
273
- }
274
- }, {
275
- key: "getEmptyDataProps",
276
- value: function getEmptyDataProps() {
277
- var d3Arc = this.asProps.d3Arc;
278
- return {
279
- d3Arc
280
- };
281
- }
282
- }, {
283
- key: "componentDidUpdate",
284
- value: function componentDidUpdate(prevProps) {
285
- var data = this.asProps.data;
286
- if (prevProps.$rootProps.data !== data) {
287
- this.animationUpdatePie();
288
- }
201
+ const minValue = pieData.reduce((acc, cur) => {
202
+ if (cur[1]) acc += cur[1];
203
+ return acc;
204
+ }, 0) / 100;
205
+ pieData = pieData.map((d) => {
206
+ if (d[1] && d[1] < minValue) d[1] = minValue;
207
+ return d;
208
+ });
209
+ return d3Pie(pieData);
210
+ }
211
+ handlerOnClick(key) {
212
+ return (e) => {
213
+ e.stopPropagation();
214
+ const {
215
+ onClick
216
+ } = this.asProps;
217
+ if (!onClick) return;
218
+ onClick(key, e);
219
+ };
220
+ }
221
+ getPieProps(props, index) {
222
+ const {
223
+ d3Arc,
224
+ d3ArcOut,
225
+ innerRadius,
226
+ outerRadius,
227
+ halfsize,
228
+ resolveColor,
229
+ uid,
230
+ patterns
231
+ } = this.asProps;
232
+ const {
233
+ active
234
+ } = props;
235
+ const data = this.arcs.find((arc2) => arc2.data[0] === props.dataKey);
236
+ if (active) {
237
+ this.activeIndexPie = index;
289
238
  }
290
- }, {
291
- key: "componentDidMount",
292
- value: function componentDidMount() {
239
+ const tooltipProps = {
240
+ dataKey: props.dataKey,
241
+ name: props.name,
242
+ resolveColor,
243
+ color: props.color || getChartDefaultColorName(index),
244
+ active: props.active,
245
+ transparent: props.transparent,
246
+ patterns
247
+ };
248
+ return {
249
+ data,
250
+ d3Arc,
251
+ d3ArcOut,
252
+ innerRadius,
253
+ outerRadius,
254
+ uid: `${uid}-${index}`,
255
+ patterns,
256
+ halfsize,
257
+ color: props.color || getChartDefaultColorName(index),
258
+ resolveColor,
259
+ $animationActivePie: this.animationActivePie,
260
+ onMouseMove: this.bindHandlerTooltip(true, props, tooltipProps),
261
+ onMouseLeave: this.bindHandlerTooltip(false, props, tooltipProps),
262
+ onMouseOver: (e) => {
263
+ if (!active) {
264
+ this.animationActivePie({
265
+ active: true,
266
+ data,
267
+ selector: `[d="${e.target.getAttribute("d")}"]`,
268
+ element: e.target
269
+ });
270
+ }
271
+ },
272
+ onMouseOut: (e) => {
273
+ if (!active) {
274
+ this.animationActivePie({
275
+ active: false,
276
+ data,
277
+ selector: `[d="${e.target.getAttribute("d")}"]`,
278
+ element: e.target
279
+ });
280
+ }
281
+ },
282
+ onClickPieRoot: this.handlerOnClick(props.dataKey)
283
+ };
284
+ }
285
+ getEmptyDataProps() {
286
+ const {
287
+ d3Arc
288
+ } = this.asProps;
289
+ return {
290
+ d3Arc
291
+ };
292
+ }
293
+ componentDidUpdate(prevProps) {
294
+ const {
295
+ data
296
+ } = this.asProps;
297
+ if (prevProps.$rootProps.data !== data) {
293
298
  this.animationUpdatePie();
294
299
  }
295
- }, {
296
- key: "render",
297
- value: function render() {
298
- var _this$asProps7 = this.asProps, halfsize = _this$asProps7.halfsize, size = _this$asProps7.size;
299
- this.asProps.dataHintsHandler.establishDataType("values-set");
300
- var _size2 = _slicedToArray(size, 2), width = _size2[0], height = _size2[1];
301
- var Element = this.Element;
302
- var k = halfsize ? 1 : 2;
303
- this.arcs = this.getArcs();
304
- return /* @__PURE__ */ React.createElement(Element, {
305
- "aria-hidden": true,
306
- id: this.id,
307
- render: "g",
308
- childrenPosition: "inside",
309
- transform: "translate(".concat(width / 2, ",").concat(height / k, ")")
310
- });
311
- }
312
- }]);
313
- })(Component);
300
+ }
301
+ componentDidMount() {
302
+ this.animationUpdatePie();
303
+ }
304
+ render() {
305
+ const {
306
+ halfsize,
307
+ size
308
+ } = this.asProps;
309
+ this.asProps.dataHintsHandler.establishDataType("values-set");
310
+ const [width, height] = size;
311
+ const Element = this.Element;
312
+ const k = halfsize ? 1 : 2;
313
+ this.arcs = this.getArcs();
314
+ return /* @__PURE__ */ React.createElement(Element, {
315
+ "aria-hidden": true,
316
+ id: this.id,
317
+ render: "g",
318
+ childrenPosition: "inside",
319
+ transform: `translate(${width / 2},${height / k})`
320
+ });
321
+ }
322
+ }
314
323
  _defineProperty(DonutRoot, "displayName", "Donut");
315
324
  _defineProperty(DonutRoot, "style", style);
316
325
  _defineProperty(DonutRoot, "enhance", [uniqueIDEnhancement()]);
317
- _defineProperty(DonutRoot, "defaultProps", function(_ref18) {
318
- var _ref18$innerRadius = _ref18.innerRadius, innerRadius = _ref18$innerRadius === void 0 ? 0 : _ref18$innerRadius, _ref18$paddingAngle = _ref18.paddingAngle, paddingAngle = _ref18$paddingAngle === void 0 ? 0 : _ref18$paddingAngle, outerRadius = _ref18.outerRadius, _ref18$halfsize = _ref18.halfsize, halfsize = _ref18$halfsize === void 0 ? false : _ref18$halfsize, size = _ref18.$rootProps.size;
319
- var d3Arc = arc().outerRadius(outerRadius || getOuterRadius({
326
+ _defineProperty(DonutRoot, "defaultProps", ({
327
+ innerRadius = 0,
328
+ paddingAngle = 0,
329
+ outerRadius,
330
+ halfsize = false,
331
+ $rootProps: {
332
+ size
333
+ }
334
+ }) => {
335
+ const d3Arc = arc().outerRadius(outerRadius || getOuterRadius({
320
336
  size,
321
337
  halfsize
322
338
  })).innerRadius(innerRadius).padAngle(paddingAngle);
323
- var d3ArcOut = arc().outerRadius((outerRadius || getOuterRadius({
339
+ const d3ArcOut = arc().outerRadius((outerRadius || getOuterRadius({
324
340
  size,
325
341
  halfsize
326
342
  })) + increaseFactor).innerRadius(innerRadius).padAngle(paddingAngle);
327
- var d3Pie = pie().sort(null).value(function(_ref19) {
328
- var _ref20 = _slicedToArray(_ref19, 2), value = _ref20[1];
329
- return value;
330
- });
343
+ let d3Pie = pie().sort(null).value(([, value]) => value);
331
344
  d3Pie[DEFAULT_INSTANCE] = true;
332
345
  if (halfsize) {
333
346
  d3Pie = d3Pie.startAngle(-Math.PI / 2).endAngle(Math.PI / 2);
@@ -341,12 +354,33 @@ _defineProperty(DonutRoot, "defaultProps", function(_ref18) {
341
354
  innerRadius
342
355
  };
343
356
  });
344
- function Pie(_ref15) {
357
+ function Pie({
358
+ Element: SPie,
359
+ styles,
360
+ d3Arc,
361
+ data,
362
+ color,
363
+ $animationActivePie,
364
+ active,
365
+ d3ArcOut,
366
+ name,
367
+ dataKey,
368
+ dataHintsHandler,
369
+ transparent,
370
+ innerRadius,
371
+ outerRadius,
372
+ resolveColor,
373
+ halfsize,
374
+ uid,
375
+ patterns,
376
+ onClick,
377
+ onClickPieRoot,
378
+ ...other
379
+ }) {
345
380
  var _ref2;
346
- var SPie = _ref15.Element, styles = _ref15.styles, d3Arc = _ref15.d3Arc, data = _ref15.data, color = _ref15.color, $animationActivePie = _ref15.$animationActivePie, active = _ref15.active, d3ArcOut = _ref15.d3ArcOut, name = _ref15.name, dataKey = _ref15.dataKey, dataHintsHandler = _ref15.dataHintsHandler, transparent = _ref15.transparent, innerRadius = _ref15.innerRadius, outerRadius = _ref15.outerRadius, resolveColor = _ref15.resolveColor, halfsize = _ref15.halfsize, uid = _ref15.uid, patterns = _ref15.patterns, onClick = _ref15.onClick, onClickPieRoot = _ref15.onClickPieRoot, other = _objectWithoutProperties(_ref15, _excluded);
347
- var _React$useState = React.useState(false), _React$useState2 = _slicedToArray(_React$useState, 2), isMount = _React$useState2[0], setIsMount = _React$useState2[1];
348
- var pieRef = React.useRef(null);
349
- React.useEffect(function() {
381
+ const [isMount, setIsMount] = React.useState(false);
382
+ const pieRef = React.useRef(null);
383
+ React.useEffect(() => {
350
384
  if (!pieRef.current) return;
351
385
  pieRef.current.dataset["currentRadius"] = (active ? d3ArcOut : d3Arc).outerRadius()();
352
386
  if (!isMount) {
@@ -357,12 +391,12 @@ function Pie(_ref15) {
357
391
  $animationActivePie({
358
392
  active,
359
393
  data,
360
- selector: '[name="'.concat(other.name, '"]'),
394
+ selector: `[name="${other.name}"]`,
361
395
  element: pieRef.current
362
396
  });
363
397
  }
364
398
  }, [active, Boolean(data)]);
365
- React.useEffect(function() {
399
+ React.useEffect(() => {
366
400
  if (!pieRef.current) return;
367
401
  pieRef.current.dataset["currentRadius"] = (active ? d3ArcOut : d3Arc).outerRadius()();
368
402
  }, [active, innerRadius, outerRadius, halfsize, Boolean(data)]);
@@ -373,20 +407,25 @@ function Pie(_ref15) {
373
407
  "render": "path",
374
408
  "ref": pieRef,
375
409
  "color": resolveColor(color),
376
- "pattern": patterns ? "url(#".concat(uid, "-pattern)") : void 0,
410
+ "pattern": patterns ? `url(#${uid}-pattern)` : void 0,
377
411
  "d": active ? d3ArcOut(data) : d3Arc(data),
378
412
  "transparent": transparent,
379
413
  "use:onClick": callAllEventHandlers(onClickPieRoot, onClick)
380
414
  }))), patterns && /* @__PURE__ */ React.createElement(PatternFill, _ref2.cn("PatternFill", {
381
- "id": "".concat(uid, "-pattern"),
415
+ "id": `${uid}-pattern`,
382
416
  "patternKey": color,
383
417
  "color": resolveColor(color),
384
418
  "patterns": patterns
385
419
  })));
386
420
  }
387
- function EmptyData(_ref16) {
421
+ function EmptyData({
422
+ Element: SEmptyData,
423
+ styles,
424
+ d3Arc,
425
+ color,
426
+ resolveColor
427
+ }) {
388
428
  var _ref3;
389
- var SEmptyData = _ref16.Element, styles = _ref16.styles, d3Arc = _ref16.d3Arc, color = _ref16.color, resolveColor = _ref16.resolveColor;
390
429
  return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SEmptyData, _ref3.cn("SEmptyData", {
391
430
  "render": "path",
392
431
  "color": resolveColor(color),
@@ -396,9 +435,17 @@ function EmptyData(_ref16) {
396
435
  })
397
436
  }));
398
437
  }
399
- function Label(_ref17) {
438
+ function Label({
439
+ Element: SLabel,
440
+ styles,
441
+ Children,
442
+ children,
443
+ label,
444
+ dataHintsHandler,
445
+ x = 0,
446
+ y = 0
447
+ }) {
400
448
  var _ref4;
401
- var SLabel = _ref17.Element, styles = _ref17.styles, Children = _ref17.Children, children = _ref17.children, label = _ref17.label, dataHintsHandler = _ref17.dataHintsHandler, _ref17$x = _ref17.x, x = _ref17$x === void 0 ? 0 : _ref17$x, _ref17$y = _ref17.y, y = _ref17$y === void 0 ? 0 : _ref17$y;
402
449
  dataHintsHandler.setTitle("vertical", label || children);
403
450
  return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SLabel, _ref4.cn("SLabel", {
404
451
  "render": "text",
@@ -409,12 +456,14 @@ function Label(_ref17) {
409
456
  }
410
457
  function DonutTooltip(props) {
411
458
  var _ref = arguments[0], _ref5;
412
- var SDonutTooltip = Tooltip;
413
- return _ref5 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SDonutTooltip, _ref5.cn("SDonutTooltip", _objectSpread({}, assignProps({
414
- "excludeAnchorProps": true
415
- }, _ref))));
459
+ const SDonutTooltip = Tooltip;
460
+ return _ref5 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SDonutTooltip, _ref5.cn("SDonutTooltip", {
461
+ ...assignProps({
462
+ "excludeAnchorProps": true
463
+ }, _ref)
464
+ }));
416
465
  }
417
- var Donut = createElement(DonutRoot, {
466
+ const Donut = createElement(DonutRoot, {
418
467
  Pie,
419
468
  Label,
420
469
  EmptyData,