@amcharts/amcharts5 5.2.49 → 5.3.0

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 (887) hide show
  1. package/.internal/charts/flow/Chord.js +151 -199
  2. package/.internal/charts/flow/Chord.js.map +1 -1
  3. package/.internal/charts/flow/ChordDirected.js +46 -66
  4. package/.internal/charts/flow/ChordDirected.js.map +1 -1
  5. package/.internal/charts/flow/ChordLink.js +32 -42
  6. package/.internal/charts/flow/ChordLink.js.map +1 -1
  7. package/.internal/charts/flow/ChordLinkDirected.js +17 -29
  8. package/.internal/charts/flow/ChordLinkDirected.js.map +1 -1
  9. package/.internal/charts/flow/ChordNodes.js +70 -86
  10. package/.internal/charts/flow/ChordNodes.js.map +1 -1
  11. package/.internal/charts/flow/ChordNonRibbon.js +63 -91
  12. package/.internal/charts/flow/ChordNonRibbon.js.map +1 -1
  13. package/.internal/charts/flow/Flow.js +289 -356
  14. package/.internal/charts/flow/Flow.js.map +1 -1
  15. package/.internal/charts/flow/FlowDefaultTheme.js +187 -199
  16. package/.internal/charts/flow/FlowDefaultTheme.js.map +1 -1
  17. package/.internal/charts/flow/FlowLink.js +34 -49
  18. package/.internal/charts/flow/FlowLink.js.map +1 -1
  19. package/.internal/charts/flow/FlowNode.js +17 -22
  20. package/.internal/charts/flow/FlowNode.js.map +1 -1
  21. package/.internal/charts/flow/FlowNodes.js +141 -202
  22. package/.internal/charts/flow/FlowNodes.js.map +1 -1
  23. package/.internal/charts/flow/Sankey.js +165 -203
  24. package/.internal/charts/flow/Sankey.js.map +1 -1
  25. package/.internal/charts/flow/SankeyLink.js +207 -229
  26. package/.internal/charts/flow/SankeyLink.js.map +1 -1
  27. package/.internal/charts/flow/SankeyNodes.js +70 -90
  28. package/.internal/charts/flow/SankeyNodes.js.map +1 -1
  29. package/.internal/charts/funnel/FunnelSeries.js +353 -447
  30. package/.internal/charts/funnel/FunnelSeries.js.map +1 -1
  31. package/.internal/charts/funnel/FunnelSlice.js +96 -117
  32. package/.internal/charts/funnel/FunnelSlice.js.map +1 -1
  33. package/.internal/charts/funnel/PictorialStackedSeries.js +59 -79
  34. package/.internal/charts/funnel/PictorialStackedSeries.js.map +1 -1
  35. package/.internal/charts/funnel/PyramidSeries.js +106 -122
  36. package/.internal/charts/funnel/PyramidSeries.js.map +1 -1
  37. package/.internal/charts/funnel/SlicedChart.js +17 -29
  38. package/.internal/charts/funnel/SlicedChart.js.map +1 -1
  39. package/.internal/charts/hierarchy/BreadcrumbBar.js +69 -96
  40. package/.internal/charts/hierarchy/BreadcrumbBar.js.map +1 -1
  41. package/.internal/charts/hierarchy/ForceDirected.js +255 -370
  42. package/.internal/charts/hierarchy/ForceDirected.js.map +1 -1
  43. package/.internal/charts/hierarchy/Hierarchy.js +476 -640
  44. package/.internal/charts/hierarchy/Hierarchy.js.map +1 -1
  45. package/.internal/charts/hierarchy/HierarchyDefaultTheme.js +337 -349
  46. package/.internal/charts/hierarchy/HierarchyDefaultTheme.js.map +1 -1
  47. package/.internal/charts/hierarchy/HierarchyLink.js +43 -61
  48. package/.internal/charts/hierarchy/HierarchyLink.js.map +1 -1
  49. package/.internal/charts/hierarchy/HierarchyNode.js +57 -74
  50. package/.internal/charts/hierarchy/HierarchyNode.js.map +1 -1
  51. package/.internal/charts/hierarchy/LinkedHierarchy.js +229 -323
  52. package/.internal/charts/hierarchy/LinkedHierarchy.js.map +1 -1
  53. package/.internal/charts/hierarchy/LinkedHierarchyNode.js +48 -80
  54. package/.internal/charts/hierarchy/LinkedHierarchyNode.js.map +1 -1
  55. package/.internal/charts/hierarchy/Pack.js +105 -147
  56. package/.internal/charts/hierarchy/Pack.js.map +1 -1
  57. package/.internal/charts/hierarchy/Partition.js +183 -230
  58. package/.internal/charts/hierarchy/Partition.js.map +1 -1
  59. package/.internal/charts/hierarchy/Sunburst.js +259 -323
  60. package/.internal/charts/hierarchy/Sunburst.js.map +1 -1
  61. package/.internal/charts/hierarchy/Tree.js +49 -69
  62. package/.internal/charts/hierarchy/Tree.js.map +1 -1
  63. package/.internal/charts/hierarchy/Treemap.js +168 -209
  64. package/.internal/charts/hierarchy/Treemap.js.map +1 -1
  65. package/.internal/charts/map/GraticuleSeries.js +49 -70
  66. package/.internal/charts/map/GraticuleSeries.js.map +1 -1
  67. package/.internal/charts/map/MapChart.js +587 -751
  68. package/.internal/charts/map/MapChart.js.map +1 -1
  69. package/.internal/charts/map/MapChartDefaultTheme.js +98 -110
  70. package/.internal/charts/map/MapChartDefaultTheme.js.map +1 -1
  71. package/.internal/charts/map/MapLine.js +165 -196
  72. package/.internal/charts/map/MapLine.js.map +1 -1
  73. package/.internal/charts/map/MapLineSeries.js +130 -197
  74. package/.internal/charts/map/MapLineSeries.js.map +1 -1
  75. package/.internal/charts/map/MapPointSeries.d.ts +7 -2
  76. package/.internal/charts/map/MapPointSeries.d.ts.map +1 -1
  77. package/.internal/charts/map/MapPointSeries.js +265 -342
  78. package/.internal/charts/map/MapPointSeries.js.map +1 -1
  79. package/.internal/charts/map/MapPolygon.js +86 -122
  80. package/.internal/charts/map/MapPolygon.js.map +1 -1
  81. package/.internal/charts/map/MapPolygonSeries.d.ts +6 -1
  82. package/.internal/charts/map/MapPolygonSeries.d.ts.map +1 -1
  83. package/.internal/charts/map/MapPolygonSeries.js +110 -170
  84. package/.internal/charts/map/MapPolygonSeries.js.map +1 -1
  85. package/.internal/charts/map/MapSeries.d.ts +9 -3
  86. package/.internal/charts/map/MapSeries.d.ts.map +1 -1
  87. package/.internal/charts/map/MapSeries.js +212 -303
  88. package/.internal/charts/map/MapSeries.js.map +1 -1
  89. package/.internal/charts/map/MapUtils.js +19 -19
  90. package/.internal/charts/map/MapUtils.js.map +1 -1
  91. package/.internal/charts/map/ZoomControl.js +52 -67
  92. package/.internal/charts/map/ZoomControl.js.map +1 -1
  93. package/.internal/charts/percent/PercentChart.js +23 -40
  94. package/.internal/charts/percent/PercentChart.js.map +1 -1
  95. package/.internal/charts/percent/PercentDefaultTheme.js +196 -208
  96. package/.internal/charts/percent/PercentDefaultTheme.js.map +1 -1
  97. package/.internal/charts/percent/PercentSeries.js +378 -549
  98. package/.internal/charts/percent/PercentSeries.js.map +1 -1
  99. package/.internal/charts/pie/PieChart.js +85 -110
  100. package/.internal/charts/pie/PieChart.js.map +1 -1
  101. package/.internal/charts/pie/PieSeries.js +175 -232
  102. package/.internal/charts/pie/PieSeries.js.map +1 -1
  103. package/.internal/charts/radar/AxisRendererCircular.js +219 -307
  104. package/.internal/charts/radar/AxisRendererCircular.js.map +1 -1
  105. package/.internal/charts/radar/AxisRendererRadial.js +188 -276
  106. package/.internal/charts/radar/AxisRendererRadial.js.map +1 -1
  107. package/.internal/charts/radar/ClockHand.js +89 -104
  108. package/.internal/charts/radar/ClockHand.js.map +1 -1
  109. package/.internal/charts/radar/RadarChart.js +142 -201
  110. package/.internal/charts/radar/RadarChart.js.map +1 -1
  111. package/.internal/charts/radar/RadarColumnSeries.js +118 -170
  112. package/.internal/charts/radar/RadarColumnSeries.js.map +1 -1
  113. package/.internal/charts/radar/RadarCursor.js +147 -220
  114. package/.internal/charts/radar/RadarCursor.js.map +1 -1
  115. package/.internal/charts/radar/RadarDefaultTheme.js +85 -97
  116. package/.internal/charts/radar/RadarDefaultTheme.js.map +1 -1
  117. package/.internal/charts/radar/RadarLineSeries.js +71 -113
  118. package/.internal/charts/radar/RadarLineSeries.js.map +1 -1
  119. package/.internal/charts/radar/SmoothedRadarLineSeries.js +33 -55
  120. package/.internal/charts/radar/SmoothedRadarLineSeries.js.map +1 -1
  121. package/.internal/charts/stock/PanelControls.js +49 -60
  122. package/.internal/charts/stock/PanelControls.js.map +1 -1
  123. package/.internal/charts/stock/SettingsModal.js +321 -393
  124. package/.internal/charts/stock/SettingsModal.js.map +1 -1
  125. package/.internal/charts/stock/StockChart.d.ts.map +1 -1
  126. package/.internal/charts/stock/StockChart.js +466 -568
  127. package/.internal/charts/stock/StockChart.js.map +1 -1
  128. package/.internal/charts/stock/StockChartDefaultTheme.d.ts.map +1 -1
  129. package/.internal/charts/stock/StockChartDefaultTheme.js +1162 -1162
  130. package/.internal/charts/stock/StockChartDefaultTheme.js.map +1 -1
  131. package/.internal/charts/stock/StockLegend.js +65 -91
  132. package/.internal/charts/stock/StockLegend.js.map +1 -1
  133. package/.internal/charts/stock/StockPanel.js +87 -119
  134. package/.internal/charts/stock/StockPanel.js.map +1 -1
  135. package/.internal/charts/stock/drawing/AverageSeries.d.ts.map +1 -1
  136. package/.internal/charts/stock/drawing/AverageSeries.js +48 -60
  137. package/.internal/charts/stock/drawing/AverageSeries.js.map +1 -1
  138. package/.internal/charts/stock/drawing/CalloutSeries.d.ts +7 -2
  139. package/.internal/charts/stock/drawing/CalloutSeries.d.ts.map +1 -1
  140. package/.internal/charts/stock/drawing/CalloutSeries.js +90 -95
  141. package/.internal/charts/stock/drawing/CalloutSeries.js.map +1 -1
  142. package/.internal/charts/stock/drawing/DoodleSeries.d.ts.map +1 -1
  143. package/.internal/charts/stock/drawing/DoodleSeries.js +82 -122
  144. package/.internal/charts/stock/drawing/DoodleSeries.js.map +1 -1
  145. package/.internal/charts/stock/drawing/DrawingSeries.d.ts +5 -3
  146. package/.internal/charts/stock/drawing/DrawingSeries.d.ts.map +1 -1
  147. package/.internal/charts/stock/drawing/DrawingSeries.js +519 -712
  148. package/.internal/charts/stock/drawing/DrawingSeries.js.map +1 -1
  149. package/.internal/charts/stock/drawing/EllipseSeries.d.ts +3 -0
  150. package/.internal/charts/stock/drawing/EllipseSeries.d.ts.map +1 -1
  151. package/.internal/charts/stock/drawing/EllipseSeries.js +258 -307
  152. package/.internal/charts/stock/drawing/EllipseSeries.js.map +1 -1
  153. package/.internal/charts/stock/drawing/FibonacciSeries.d.ts +2 -3
  154. package/.internal/charts/stock/drawing/FibonacciSeries.d.ts.map +1 -1
  155. package/.internal/charts/stock/drawing/FibonacciSeries.js +189 -250
  156. package/.internal/charts/stock/drawing/FibonacciSeries.js.map +1 -1
  157. package/.internal/charts/stock/drawing/FibonacciTimezoneSeries.d.ts.map +1 -1
  158. package/.internal/charts/stock/drawing/FibonacciTimezoneSeries.js +108 -103
  159. package/.internal/charts/stock/drawing/FibonacciTimezoneSeries.js.map +1 -1
  160. package/.internal/charts/stock/drawing/HorizontalLineSeries.d.ts +4 -2
  161. package/.internal/charts/stock/drawing/HorizontalLineSeries.d.ts.map +1 -1
  162. package/.internal/charts/stock/drawing/HorizontalLineSeries.js +64 -84
  163. package/.internal/charts/stock/drawing/HorizontalLineSeries.js.map +1 -1
  164. package/.internal/charts/stock/drawing/HorizontalRaySeries.d.ts +2 -1
  165. package/.internal/charts/stock/drawing/HorizontalRaySeries.d.ts.map +1 -1
  166. package/.internal/charts/stock/drawing/HorizontalRaySeries.js +57 -92
  167. package/.internal/charts/stock/drawing/HorizontalRaySeries.js.map +1 -1
  168. package/.internal/charts/stock/drawing/IconSeries.d.ts +2 -4
  169. package/.internal/charts/stock/drawing/IconSeries.d.ts.map +1 -1
  170. package/.internal/charts/stock/drawing/IconSeries.js +112 -112
  171. package/.internal/charts/stock/drawing/IconSeries.js.map +1 -1
  172. package/.internal/charts/stock/drawing/LabelSeries.d.ts +5 -2
  173. package/.internal/charts/stock/drawing/LabelSeries.d.ts.map +1 -1
  174. package/.internal/charts/stock/drawing/LabelSeries.js +151 -172
  175. package/.internal/charts/stock/drawing/LabelSeries.js.map +1 -1
  176. package/.internal/charts/stock/drawing/PolylineSeries.d.ts +1 -0
  177. package/.internal/charts/stock/drawing/PolylineSeries.d.ts.map +1 -1
  178. package/.internal/charts/stock/drawing/PolylineSeries.js +101 -122
  179. package/.internal/charts/stock/drawing/PolylineSeries.js.map +1 -1
  180. package/.internal/charts/stock/drawing/QuadrantLineSeries.d.ts.map +1 -1
  181. package/.internal/charts/stock/drawing/QuadrantLineSeries.js +115 -149
  182. package/.internal/charts/stock/drawing/QuadrantLineSeries.js.map +1 -1
  183. package/.internal/charts/stock/drawing/RectangleSeries.d.ts.map +1 -1
  184. package/.internal/charts/stock/drawing/RectangleSeries.js +117 -155
  185. package/.internal/charts/stock/drawing/RectangleSeries.js.map +1 -1
  186. package/.internal/charts/stock/drawing/RegressionSeries.d.ts.map +1 -1
  187. package/.internal/charts/stock/drawing/RegressionSeries.js +64 -82
  188. package/.internal/charts/stock/drawing/RegressionSeries.js.map +1 -1
  189. package/.internal/charts/stock/drawing/SimpleLineSeries.d.ts +6 -2
  190. package/.internal/charts/stock/drawing/SimpleLineSeries.d.ts.map +1 -1
  191. package/.internal/charts/stock/drawing/SimpleLineSeries.js +233 -303
  192. package/.internal/charts/stock/drawing/SimpleLineSeries.js.map +1 -1
  193. package/.internal/charts/stock/drawing/TrendLineSeries.d.ts.map +1 -1
  194. package/.internal/charts/stock/drawing/TrendLineSeries.js +40 -57
  195. package/.internal/charts/stock/drawing/TrendLineSeries.js.map +1 -1
  196. package/.internal/charts/stock/drawing/VerticalLineSeries.d.ts +3 -1
  197. package/.internal/charts/stock/drawing/VerticalLineSeries.d.ts.map +1 -1
  198. package/.internal/charts/stock/drawing/VerticalLineSeries.js +63 -79
  199. package/.internal/charts/stock/drawing/VerticalLineSeries.js.map +1 -1
  200. package/.internal/charts/stock/indicators/AccumulationDistribution.js +68 -88
  201. package/.internal/charts/stock/indicators/AccumulationDistribution.js.map +1 -1
  202. package/.internal/charts/stock/indicators/AccumulativeSwingIndex.js +107 -127
  203. package/.internal/charts/stock/indicators/AccumulativeSwingIndex.js.map +1 -1
  204. package/.internal/charts/stock/indicators/Aroon.js +85 -110
  205. package/.internal/charts/stock/indicators/Aroon.js.map +1 -1
  206. package/.internal/charts/stock/indicators/AwesomeOscillator.js +68 -88
  207. package/.internal/charts/stock/indicators/AwesomeOscillator.js.map +1 -1
  208. package/.internal/charts/stock/indicators/BollingerBands.js +109 -135
  209. package/.internal/charts/stock/indicators/BollingerBands.js.map +1 -1
  210. package/.internal/charts/stock/indicators/ChaikinMoneyFlow.js +77 -97
  211. package/.internal/charts/stock/indicators/ChaikinMoneyFlow.js.map +1 -1
  212. package/.internal/charts/stock/indicators/ChaikinOscillator.js +75 -95
  213. package/.internal/charts/stock/indicators/ChaikinOscillator.js.map +1 -1
  214. package/.internal/charts/stock/indicators/ChartIndicator.js +86 -102
  215. package/.internal/charts/stock/indicators/ChartIndicator.js.map +1 -1
  216. package/.internal/charts/stock/indicators/CommodityChannelIndex.js +136 -161
  217. package/.internal/charts/stock/indicators/CommodityChannelIndex.js.map +1 -1
  218. package/.internal/charts/stock/indicators/DisparityIndex.js +69 -89
  219. package/.internal/charts/stock/indicators/DisparityIndex.js.map +1 -1
  220. package/.internal/charts/stock/indicators/Indicator.d.ts +1 -2
  221. package/.internal/charts/stock/indicators/Indicator.d.ts.map +1 -1
  222. package/.internal/charts/stock/indicators/Indicator.js +286 -383
  223. package/.internal/charts/stock/indicators/Indicator.js.map +1 -1
  224. package/.internal/charts/stock/indicators/MACD.js +129 -159
  225. package/.internal/charts/stock/indicators/MACD.js.map +1 -1
  226. package/.internal/charts/stock/indicators/MedianPrice.js +56 -71
  227. package/.internal/charts/stock/indicators/MedianPrice.js.map +1 -1
  228. package/.internal/charts/stock/indicators/MovingAverage.js +95 -115
  229. package/.internal/charts/stock/indicators/MovingAverage.js.map +1 -1
  230. package/.internal/charts/stock/indicators/MovingAverageDeviation.js +93 -118
  231. package/.internal/charts/stock/indicators/MovingAverageDeviation.js.map +1 -1
  232. package/.internal/charts/stock/indicators/MovingAverageEnvelope.js +114 -144
  233. package/.internal/charts/stock/indicators/MovingAverageEnvelope.js.map +1 -1
  234. package/.internal/charts/stock/indicators/OnBalanceVolume.js +65 -85
  235. package/.internal/charts/stock/indicators/OnBalanceVolume.js.map +1 -1
  236. package/.internal/charts/stock/indicators/RelativeStrengthIndex.js +162 -187
  237. package/.internal/charts/stock/indicators/RelativeStrengthIndex.js.map +1 -1
  238. package/.internal/charts/stock/indicators/StandardDeviation.js +56 -72
  239. package/.internal/charts/stock/indicators/StandardDeviation.js.map +1 -1
  240. package/.internal/charts/stock/indicators/StochasticOscillator.js +142 -173
  241. package/.internal/charts/stock/indicators/StochasticOscillator.js.map +1 -1
  242. package/.internal/charts/stock/indicators/Trix.js +90 -120
  243. package/.internal/charts/stock/indicators/Trix.js.map +1 -1
  244. package/.internal/charts/stock/indicators/TypicalPrice.js +56 -71
  245. package/.internal/charts/stock/indicators/TypicalPrice.js.map +1 -1
  246. package/.internal/charts/stock/indicators/VWAP.js +78 -98
  247. package/.internal/charts/stock/indicators/VWAP.js.map +1 -1
  248. package/.internal/charts/stock/indicators/Volume.js +55 -75
  249. package/.internal/charts/stock/indicators/Volume.js.map +1 -1
  250. package/.internal/charts/stock/indicators/WilliamsR.js +138 -163
  251. package/.internal/charts/stock/indicators/WilliamsR.js.map +1 -1
  252. package/.internal/charts/stock/indicators/ZigZag.js +141 -161
  253. package/.internal/charts/stock/indicators/ZigZag.js.map +1 -1
  254. package/.internal/charts/stock/toolbar/ColorControl.js +78 -101
  255. package/.internal/charts/stock/toolbar/ColorControl.js.map +1 -1
  256. package/.internal/charts/stock/toolbar/ComparisonControl.js +16 -28
  257. package/.internal/charts/stock/toolbar/ComparisonControl.js.map +1 -1
  258. package/.internal/charts/stock/toolbar/DateRangeSelector.js +1157 -345
  259. package/.internal/charts/stock/toolbar/DateRangeSelector.js.map +1 -1
  260. package/.internal/charts/stock/toolbar/DrawingControl.d.ts +26 -0
  261. package/.internal/charts/stock/toolbar/DrawingControl.d.ts.map +1 -1
  262. package/.internal/charts/stock/toolbar/DrawingControl.js +754 -709
  263. package/.internal/charts/stock/toolbar/DrawingControl.js.map +1 -1
  264. package/.internal/charts/stock/toolbar/DrawingToolControl.js +80 -119
  265. package/.internal/charts/stock/toolbar/DrawingToolControl.js.map +1 -1
  266. package/.internal/charts/stock/toolbar/Dropdown.js +102 -150
  267. package/.internal/charts/stock/toolbar/Dropdown.js.map +1 -1
  268. package/.internal/charts/stock/toolbar/DropdownColors.js +92 -141
  269. package/.internal/charts/stock/toolbar/DropdownColors.js.map +1 -1
  270. package/.internal/charts/stock/toolbar/DropdownList.js +186 -249
  271. package/.internal/charts/stock/toolbar/DropdownList.js.map +1 -1
  272. package/.internal/charts/stock/toolbar/DropdownListControl.js +117 -150
  273. package/.internal/charts/stock/toolbar/DropdownListControl.js.map +1 -1
  274. package/.internal/charts/stock/toolbar/IconControl.js +81 -120
  275. package/.internal/charts/stock/toolbar/IconControl.js.map +1 -1
  276. package/.internal/charts/stock/toolbar/IndicatorControl.d.ts +23 -1
  277. package/.internal/charts/stock/toolbar/IndicatorControl.d.ts.map +1 -1
  278. package/.internal/charts/stock/toolbar/IndicatorControl.js +352 -297
  279. package/.internal/charts/stock/toolbar/IndicatorControl.js.map +1 -1
  280. package/.internal/charts/stock/toolbar/IntervalControl.js +16 -28
  281. package/.internal/charts/stock/toolbar/IntervalControl.js.map +1 -1
  282. package/.internal/charts/stock/toolbar/PeriodSelector.js +141 -189
  283. package/.internal/charts/stock/toolbar/PeriodSelector.js.map +1 -1
  284. package/.internal/charts/stock/toolbar/ResetControl.js +26 -44
  285. package/.internal/charts/stock/toolbar/ResetControl.js.map +1 -1
  286. package/.internal/charts/stock/toolbar/SeriesTypeControl.js +14 -21
  287. package/.internal/charts/stock/toolbar/SeriesTypeControl.js.map +1 -1
  288. package/.internal/charts/stock/toolbar/SettingsControl.js +97 -140
  289. package/.internal/charts/stock/toolbar/SettingsControl.js.map +1 -1
  290. package/.internal/charts/stock/toolbar/StockControl.js +114 -177
  291. package/.internal/charts/stock/toolbar/StockControl.js.map +1 -1
  292. package/.internal/charts/stock/toolbar/StockIcons.js +67 -81
  293. package/.internal/charts/stock/toolbar/StockIcons.js.map +1 -1
  294. package/.internal/charts/stock/toolbar/StockToolbar.js +63 -94
  295. package/.internal/charts/stock/toolbar/StockToolbar.js.map +1 -1
  296. package/.internal/charts/stock/toolbar/StockToolbarCSS.js +11 -11
  297. package/.internal/charts/stock/toolbar/StockToolbarCSS.js.map +1 -1
  298. package/.internal/charts/venn/Venn.js +276 -373
  299. package/.internal/charts/venn/Venn.js.map +1 -1
  300. package/.internal/charts/venn/VennDefaultTheme.js +18 -30
  301. package/.internal/charts/venn/VennDefaultTheme.js.map +1 -1
  302. package/.internal/charts/wordcloud/WordCloud.js +381 -452
  303. package/.internal/charts/wordcloud/WordCloud.js.map +1 -1
  304. package/.internal/charts/wordcloud/WordCloudDefaultTheme.js +35 -48
  305. package/.internal/charts/wordcloud/WordCloudDefaultTheme.js.map +1 -1
  306. package/.internal/charts/xy/XYChart.js +956 -1136
  307. package/.internal/charts/xy/XYChart.js.map +1 -1
  308. package/.internal/charts/xy/XYChartDefaultTheme.d.ts.map +1 -1
  309. package/.internal/charts/xy/XYChartDefaultTheme.js +597 -604
  310. package/.internal/charts/xy/XYChartDefaultTheme.js.map +1 -1
  311. package/.internal/charts/xy/XYChartScrollbar.js +78 -95
  312. package/.internal/charts/xy/XYChartScrollbar.js.map +1 -1
  313. package/.internal/charts/xy/XYCursor.d.ts.map +1 -1
  314. package/.internal/charts/xy/XYCursor.js +468 -608
  315. package/.internal/charts/xy/XYCursor.js.map +1 -1
  316. package/.internal/charts/xy/axes/Axis.d.ts +0 -2
  317. package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
  318. package/.internal/charts/xy/axes/Axis.js +509 -726
  319. package/.internal/charts/xy/axes/Axis.js.map +1 -1
  320. package/.internal/charts/xy/axes/AxisBullet.js +30 -40
  321. package/.internal/charts/xy/axes/AxisBullet.js.map +1 -1
  322. package/.internal/charts/xy/axes/AxisLabel.js +17 -22
  323. package/.internal/charts/xy/axes/AxisLabel.js.map +1 -1
  324. package/.internal/charts/xy/axes/AxisLabelRadial.js +17 -22
  325. package/.internal/charts/xy/axes/AxisLabelRadial.js.map +1 -1
  326. package/.internal/charts/xy/axes/AxisRenderer.js +186 -302
  327. package/.internal/charts/xy/axes/AxisRenderer.js.map +1 -1
  328. package/.internal/charts/xy/axes/AxisRendererX.js +308 -400
  329. package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
  330. package/.internal/charts/xy/axes/AxisRendererY.js +319 -421
  331. package/.internal/charts/xy/axes/AxisRendererY.js.map +1 -1
  332. package/.internal/charts/xy/axes/AxisTick.js +17 -22
  333. package/.internal/charts/xy/axes/AxisTick.js.map +1 -1
  334. package/.internal/charts/xy/axes/CategoryAxis.js +312 -454
  335. package/.internal/charts/xy/axes/CategoryAxis.js.map +1 -1
  336. package/.internal/charts/xy/axes/CategoryDateAxis.js +136 -167
  337. package/.internal/charts/xy/axes/CategoryDateAxis.js.map +1 -1
  338. package/.internal/charts/xy/axes/DateAxis.js +579 -758
  339. package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
  340. package/.internal/charts/xy/axes/DurationAxis.js +92 -128
  341. package/.internal/charts/xy/axes/DurationAxis.js.map +1 -1
  342. package/.internal/charts/xy/axes/GaplessDateAxis.js +207 -254
  343. package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -1
  344. package/.internal/charts/xy/axes/Grid.js +19 -31
  345. package/.internal/charts/xy/axes/Grid.js.map +1 -1
  346. package/.internal/charts/xy/axes/ValueAxis.js +848 -1041
  347. package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
  348. package/.internal/charts/xy/series/BaseColumnSeries.js +480 -576
  349. package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
  350. package/.internal/charts/xy/series/Candlestick.js +27 -44
  351. package/.internal/charts/xy/series/Candlestick.js.map +1 -1
  352. package/.internal/charts/xy/series/CandlestickSeries.js +114 -140
  353. package/.internal/charts/xy/series/CandlestickSeries.js.map +1 -1
  354. package/.internal/charts/xy/series/ColumnSeries.js +33 -49
  355. package/.internal/charts/xy/series/ColumnSeries.js.map +1 -1
  356. package/.internal/charts/xy/series/LineSeries.js +447 -548
  357. package/.internal/charts/xy/series/LineSeries.js.map +1 -1
  358. package/.internal/charts/xy/series/OHLC.js +36 -48
  359. package/.internal/charts/xy/series/OHLC.js.map +1 -1
  360. package/.internal/charts/xy/series/OHLCSeries.js +32 -48
  361. package/.internal/charts/xy/series/OHLCSeries.js.map +1 -1
  362. package/.internal/charts/xy/series/SmoothedXLineSeries.js +23 -40
  363. package/.internal/charts/xy/series/SmoothedXLineSeries.js.map +1 -1
  364. package/.internal/charts/xy/series/SmoothedXYLineSeries.js +23 -40
  365. package/.internal/charts/xy/series/SmoothedXYLineSeries.js.map +1 -1
  366. package/.internal/charts/xy/series/SmoothedYLineSeries.js +23 -40
  367. package/.internal/charts/xy/series/SmoothedYLineSeries.js.map +1 -1
  368. package/.internal/charts/xy/series/StepLineSeries.js +114 -131
  369. package/.internal/charts/xy/series/StepLineSeries.js.map +1 -1
  370. package/.internal/charts/xy/series/XYSeries.d.ts +1 -1
  371. package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
  372. package/.internal/charts/xy/series/XYSeries.js +939 -1222
  373. package/.internal/charts/xy/series/XYSeries.js.map +1 -1
  374. package/.internal/core/Classes.d.ts +11 -7
  375. package/.internal/core/Classes.d.ts.map +1 -1
  376. package/.internal/core/Classes.js.map +1 -1
  377. package/.internal/core/Registry.d.ts.map +1 -1
  378. package/.internal/core/Registry.js +6 -8
  379. package/.internal/core/Registry.js.map +1 -1
  380. package/.internal/core/Root.d.ts +20 -0
  381. package/.internal/core/Root.d.ts.map +1 -1
  382. package/.internal/core/Root.js +1006 -1241
  383. package/.internal/core/Root.js.map +1 -1
  384. package/.internal/core/Theme.js +38 -67
  385. package/.internal/core/Theme.js.map +1 -1
  386. package/.internal/core/render/Bullet.js +34 -49
  387. package/.internal/core/render/Bullet.js.map +1 -1
  388. package/.internal/core/render/Button.js +47 -64
  389. package/.internal/core/render/Button.js.map +1 -1
  390. package/.internal/core/render/Chart.js +20 -25
  391. package/.internal/core/render/Chart.js.map +1 -1
  392. package/.internal/core/render/Circle.js +24 -41
  393. package/.internal/core/render/Circle.js.map +1 -1
  394. package/.internal/core/render/Component.js +239 -384
  395. package/.internal/core/render/Component.js.map +1 -1
  396. package/.internal/core/render/Container.d.ts.map +1 -1
  397. package/.internal/core/render/Container.js +444 -548
  398. package/.internal/core/render/Container.js.map +1 -1
  399. package/.internal/core/render/Ellipse.js +24 -41
  400. package/.internal/core/render/Ellipse.js.map +1 -1
  401. package/.internal/core/render/Graphics.d.ts.map +1 -1
  402. package/.internal/core/render/Graphics.js +197 -215
  403. package/.internal/core/render/Graphics.js.map +1 -1
  404. package/.internal/core/render/GridLayout.js +102 -125
  405. package/.internal/core/render/GridLayout.js.map +1 -1
  406. package/.internal/core/render/HeatLegend.js +129 -154
  407. package/.internal/core/render/HeatLegend.js.map +1 -1
  408. package/.internal/core/render/HorizontalLayout.js +79 -91
  409. package/.internal/core/render/HorizontalLayout.js.map +1 -1
  410. package/.internal/core/render/Label.js +109 -150
  411. package/.internal/core/render/Label.js.map +1 -1
  412. package/.internal/core/render/Layout.js +14 -21
  413. package/.internal/core/render/Layout.js.map +1 -1
  414. package/.internal/core/render/Legend.js +230 -282
  415. package/.internal/core/render/Legend.js.map +1 -1
  416. package/.internal/core/render/Line.js +37 -54
  417. package/.internal/core/render/Line.js.map +1 -1
  418. package/.internal/core/render/MonotoneXTension.js +58 -85
  419. package/.internal/core/render/MonotoneXTension.js.map +1 -1
  420. package/.internal/core/render/MonotoneYTension.js +59 -88
  421. package/.internal/core/render/MonotoneYTension.js.map +1 -1
  422. package/.internal/core/render/Picture.js +92 -113
  423. package/.internal/core/render/Picture.js.map +1 -1
  424. package/.internal/core/render/PointedRectangle.js +94 -111
  425. package/.internal/core/render/PointedRectangle.js.map +1 -1
  426. package/.internal/core/render/RadialLabel.js +119 -158
  427. package/.internal/core/render/RadialLabel.js.map +1 -1
  428. package/.internal/core/render/RadialText.js +47 -62
  429. package/.internal/core/render/RadialText.js.map +1 -1
  430. package/.internal/core/render/Rectangle.js +31 -58
  431. package/.internal/core/render/Rectangle.js.map +1 -1
  432. package/.internal/core/render/RoundedRectangle.js +55 -72
  433. package/.internal/core/render/RoundedRectangle.js.map +1 -1
  434. package/.internal/core/render/Scrollbar.js +292 -349
  435. package/.internal/core/render/Scrollbar.js.map +1 -1
  436. package/.internal/core/render/SerialChart.js +64 -85
  437. package/.internal/core/render/SerialChart.js.map +1 -1
  438. package/.internal/core/render/Series.js +472 -660
  439. package/.internal/core/render/Series.js.map +1 -1
  440. package/.internal/core/render/Slice.js +83 -103
  441. package/.internal/core/render/Slice.js.map +1 -1
  442. package/.internal/core/render/Slider.js +25 -42
  443. package/.internal/core/render/Slider.js.map +1 -1
  444. package/.internal/core/render/Sprite.d.ts +17 -1
  445. package/.internal/core/render/Sprite.d.ts.map +1 -1
  446. package/.internal/core/render/Sprite.js +1307 -1777
  447. package/.internal/core/render/Sprite.js.map +1 -1
  448. package/.internal/core/render/SpriteResizer.js +157 -199
  449. package/.internal/core/render/SpriteResizer.js.map +1 -1
  450. package/.internal/core/render/Star.js +37 -54
  451. package/.internal/core/render/Star.js.map +1 -1
  452. package/.internal/core/render/Text.d.ts.map +1 -1
  453. package/.internal/core/render/Text.js +145 -182
  454. package/.internal/core/render/Text.js.map +1 -1
  455. package/.internal/core/render/Tick.js +14 -21
  456. package/.internal/core/render/Tick.js.map +1 -1
  457. package/.internal/core/render/Tooltip.d.ts +0 -1
  458. package/.internal/core/render/Tooltip.d.ts.map +1 -1
  459. package/.internal/core/render/Tooltip.js +272 -333
  460. package/.internal/core/render/Tooltip.js.map +1 -1
  461. package/.internal/core/render/Triangle.js +38 -65
  462. package/.internal/core/render/Triangle.js.map +1 -1
  463. package/.internal/core/render/VerticalLayout.js +79 -91
  464. package/.internal/core/render/VerticalLayout.js.map +1 -1
  465. package/.internal/core/render/backend/CanvasRenderer.d.ts +2 -2
  466. package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
  467. package/.internal/core/render/backend/CanvasRenderer.js +2806 -3721
  468. package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
  469. package/.internal/core/render/backend/Renderer.d.ts +1 -0
  470. package/.internal/core/render/backend/Renderer.d.ts.map +1 -1
  471. package/.internal/core/render/backend/Renderer.js.map +1 -1
  472. package/.internal/core/render/gradients/Gradient.js +45 -72
  473. package/.internal/core/render/gradients/Gradient.js.map +1 -1
  474. package/.internal/core/render/gradients/LinearGradient.js +53 -65
  475. package/.internal/core/render/gradients/LinearGradient.js.map +1 -1
  476. package/.internal/core/render/gradients/RadialGradient.js +69 -81
  477. package/.internal/core/render/gradients/RadialGradient.js.map +1 -1
  478. package/.internal/core/render/patterns/CirclePattern.js +64 -81
  479. package/.internal/core/render/patterns/CirclePattern.js.map +1 -1
  480. package/.internal/core/render/patterns/LinePattern.js +49 -66
  481. package/.internal/core/render/patterns/LinePattern.js.map +1 -1
  482. package/.internal/core/render/patterns/PathPattern.js +72 -89
  483. package/.internal/core/render/patterns/PathPattern.js.map +1 -1
  484. package/.internal/core/render/patterns/Pattern.js +54 -83
  485. package/.internal/core/render/patterns/Pattern.js.map +1 -1
  486. package/.internal/core/render/patterns/PicturePattern.js +69 -90
  487. package/.internal/core/render/patterns/PicturePattern.js.map +1 -1
  488. package/.internal/core/render/patterns/RectanglePattern.js +65 -82
  489. package/.internal/core/render/patterns/RectanglePattern.js.map +1 -1
  490. package/.internal/core/util/Animation.js +102 -151
  491. package/.internal/core/util/Animation.js.map +1 -1
  492. package/.internal/core/util/Array.js +48 -49
  493. package/.internal/core/util/Array.js.map +1 -1
  494. package/.internal/core/util/AsyncPending.js +15 -15
  495. package/.internal/core/util/AsyncPending.js.map +1 -1
  496. package/.internal/core/util/Benchmark.js +37 -55
  497. package/.internal/core/util/Benchmark.js.map +1 -1
  498. package/.internal/core/util/Children.js +42 -67
  499. package/.internal/core/util/Children.js.map +1 -1
  500. package/.internal/core/util/Color.js +110 -206
  501. package/.internal/core/util/Color.js.map +1 -1
  502. package/.internal/core/util/ColorSet.js +73 -110
  503. package/.internal/core/util/ColorSet.js.map +1 -1
  504. package/.internal/core/util/Counter.js +13 -25
  505. package/.internal/core/util/Counter.js.map +1 -1
  506. package/.internal/core/util/Data.js +28 -70
  507. package/.internal/core/util/Data.js.map +1 -1
  508. package/.internal/core/util/DataParser.js +145 -178
  509. package/.internal/core/util/DataParser.js.map +1 -1
  510. package/.internal/core/util/DataProcessor.js +89 -144
  511. package/.internal/core/util/DataProcessor.js.map +1 -1
  512. package/.internal/core/util/DateFormatter.d.ts.map +1 -1
  513. package/.internal/core/util/DateFormatter.js +795 -901
  514. package/.internal/core/util/DateFormatter.js.map +1 -1
  515. package/.internal/core/util/Disposer.js +82 -159
  516. package/.internal/core/util/Disposer.js.map +1 -1
  517. package/.internal/core/util/Draw.js +27 -27
  518. package/.internal/core/util/Draw.js.map +1 -1
  519. package/.internal/core/util/DurationFormatter.js +343 -409
  520. package/.internal/core/util/DurationFormatter.js.map +1 -1
  521. package/.internal/core/util/Ease.js +6 -6
  522. package/.internal/core/util/Entity.d.ts +5 -1
  523. package/.internal/core/util/Entity.d.ts.map +1 -1
  524. package/.internal/core/util/Entity.js +869 -1442
  525. package/.internal/core/util/Entity.js.map +1 -1
  526. package/.internal/core/util/EventDispatcher.js +216 -346
  527. package/.internal/core/util/EventDispatcher.js.map +1 -1
  528. package/.internal/core/util/InterfaceColors.js +14 -21
  529. package/.internal/core/util/InterfaceColors.js.map +1 -1
  530. package/.internal/core/util/Language.js +63 -123
  531. package/.internal/core/util/Language.js.map +1 -1
  532. package/.internal/core/util/List.js +244 -441
  533. package/.internal/core/util/List.js.map +1 -1
  534. package/.internal/core/util/Math.js +35 -35
  535. package/.internal/core/util/Math.js.map +1 -1
  536. package/.internal/core/util/Matrix.js +56 -95
  537. package/.internal/core/util/Matrix.js.map +1 -1
  538. package/.internal/core/util/Modal.js +103 -147
  539. package/.internal/core/util/Modal.js.map +1 -1
  540. package/.internal/core/util/Net.js +19 -19
  541. package/.internal/core/util/Net.js.map +1 -1
  542. package/.internal/core/util/NumberFormatter.js +393 -442
  543. package/.internal/core/util/NumberFormatter.js.map +1 -1
  544. package/.internal/core/util/Object.js +4 -4
  545. package/.internal/core/util/Object.js.map +1 -1
  546. package/.internal/core/util/Order.js +5 -5
  547. package/.internal/core/util/Order.js.map +1 -1
  548. package/.internal/core/util/Percent.js +65 -90
  549. package/.internal/core/util/Percent.js.map +1 -1
  550. package/.internal/core/util/PopulateString.js +28 -28
  551. package/.internal/core/util/PopulateString.js.map +1 -1
  552. package/.internal/core/util/ResizeSensor.js +76 -116
  553. package/.internal/core/util/ResizeSensor.js.map +1 -1
  554. package/.internal/core/util/States.js +116 -188
  555. package/.internal/core/util/States.js.map +1 -1
  556. package/.internal/core/util/Template.js +203 -364
  557. package/.internal/core/util/Template.js.map +1 -1
  558. package/.internal/core/util/TextFormatter.js +148 -184
  559. package/.internal/core/util/TextFormatter.js.map +1 -1
  560. package/.internal/core/util/Throttler.js +18 -26
  561. package/.internal/core/util/Throttler.js.map +1 -1
  562. package/.internal/core/util/Time.d.ts.map +1 -1
  563. package/.internal/core/util/Time.js +61 -63
  564. package/.internal/core/util/Time.js.map +1 -1
  565. package/.internal/core/util/Timezone.js +35 -57
  566. package/.internal/core/util/Timezone.js.map +1 -1
  567. package/.internal/core/util/Type.js +12 -12
  568. package/.internal/core/util/Type.js.map +1 -1
  569. package/.internal/core/util/Utils.d.ts +17 -0
  570. package/.internal/core/util/Utils.d.ts.map +1 -1
  571. package/.internal/core/util/Utils.js +166 -182
  572. package/.internal/core/util/Utils.js.map +1 -1
  573. package/.internal/core/util/Value.js +14 -30
  574. package/.internal/core/util/Value.js.map +1 -1
  575. package/.internal/plugins/exporting/Annotator.js +139 -265
  576. package/.internal/plugins/exporting/Annotator.js.map +1 -1
  577. package/.internal/plugins/exporting/Exporting.js +1216 -1614
  578. package/.internal/plugins/exporting/Exporting.js.map +1 -1
  579. package/.internal/plugins/exporting/ExportingCSS.js +5 -5
  580. package/.internal/plugins/exporting/ExportingCSS.js.map +1 -1
  581. package/.internal/plugins/exporting/ExportingMenu.js +337 -405
  582. package/.internal/plugins/exporting/ExportingMenu.js.map +1 -1
  583. package/.internal/plugins/json/Classes-script.d.ts +16 -0
  584. package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
  585. package/.internal/plugins/json/Classes-script.js +202 -194
  586. package/.internal/plugins/json/Classes-script.js.map +1 -1
  587. package/.internal/plugins/json/Classes.d.ts +16 -0
  588. package/.internal/plugins/json/Classes.d.ts.map +1 -1
  589. package/.internal/plugins/json/Classes.js +202 -194
  590. package/.internal/plugins/json/Classes.js.map +1 -1
  591. package/.internal/plugins/json/Json.d.ts +42 -2
  592. package/.internal/plugins/json/Json.d.ts.map +1 -1
  593. package/.internal/plugins/json/Json.js +391 -278
  594. package/.internal/plugins/json/Json.js.map +1 -1
  595. package/.internal/plugins/json/Serializer.d.ts +62 -0
  596. package/.internal/plugins/json/Serializer.d.ts.map +1 -0
  597. package/.internal/plugins/json/Serializer.js +137 -0
  598. package/.internal/plugins/json/Serializer.js.map +1 -0
  599. package/.internal/plugins/sliceGrouper/SliceGrouper.js +159 -202
  600. package/.internal/plugins/sliceGrouper/SliceGrouper.js.map +1 -1
  601. package/.internal/themes/AnimatedTheme.js +20 -32
  602. package/.internal/themes/AnimatedTheme.js.map +1 -1
  603. package/.internal/themes/DarkTheme.js +28 -40
  604. package/.internal/themes/DarkTheme.js.map +1 -1
  605. package/.internal/themes/DatavizTheme.js +12 -24
  606. package/.internal/themes/DatavizTheme.js.map +1 -1
  607. package/.internal/themes/DefaultTheme.d.ts.map +1 -1
  608. package/.internal/themes/DefaultTheme.js +803 -813
  609. package/.internal/themes/DefaultTheme.js.map +1 -1
  610. package/.internal/themes/FrozenTheme.js +19 -31
  611. package/.internal/themes/FrozenTheme.js.map +1 -1
  612. package/.internal/themes/KellyTheme.js +31 -43
  613. package/.internal/themes/KellyTheme.js.map +1 -1
  614. package/.internal/themes/MaterialTheme.js +28 -40
  615. package/.internal/themes/MaterialTheme.js.map +1 -1
  616. package/.internal/themes/MicrochartTheme.js +67 -79
  617. package/.internal/themes/MicrochartTheme.js.map +1 -1
  618. package/.internal/themes/MoonriseTheme.js +19 -31
  619. package/.internal/themes/MoonriseTheme.js.map +1 -1
  620. package/.internal/themes/ResponsiveTheme.js +613 -790
  621. package/.internal/themes/ResponsiveTheme.js.map +1 -1
  622. package/.internal/themes/SpiritedTheme.js +19 -31
  623. package/.internal/themes/SpiritedTheme.js.map +1 -1
  624. package/CHANGELOG.md +28 -0
  625. package/examples/javascript/flow-chord/package.json +1 -1
  626. package/examples/javascript/flow-chord-directed/package.json +1 -1
  627. package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
  628. package/examples/javascript/flow-sankey/package.json +1 -1
  629. package/examples/javascript/gauge/package.json +1 -1
  630. package/examples/javascript/gauge-bands/index.js +3 -1
  631. package/examples/javascript/gauge-bands/package.json +1 -1
  632. package/examples/javascript/hierarchy-force-directed/package.json +1 -1
  633. package/examples/javascript/hierarchy-pack/package.json +1 -1
  634. package/examples/javascript/hierarchy-partition/package.json +1 -1
  635. package/examples/javascript/hierarchy-sunburst/package.json +1 -1
  636. package/examples/javascript/hierarchy-tree/package.json +1 -1
  637. package/examples/javascript/hierarchy-treemap/package.json +1 -1
  638. package/examples/javascript/jest/package.json +1 -1
  639. package/examples/javascript/{json → json-pie}/README.md +0 -0
  640. package/examples/javascript/{json → json-pie}/index.css +0 -0
  641. package/examples/javascript/json-pie/index.html +12 -0
  642. package/examples/javascript/json-pie/index.js +77 -0
  643. package/examples/javascript/json-pie/package.json +16 -0
  644. package/examples/javascript/{json → json-pie}/webpack.config.js +0 -0
  645. package/examples/{typescript/json → javascript/json-xy}/README.md +0 -0
  646. package/examples/{typescript/json → javascript/json-xy}/index.css +0 -0
  647. package/examples/{typescript/json → javascript/json-xy}/index.html +1 -1
  648. package/examples/javascript/json-xy/index.js +203 -0
  649. package/examples/javascript/{json → json-xy}/package.json +2 -2
  650. package/examples/javascript/json-xy/webpack.config.js +38 -0
  651. package/examples/javascript/map-animating-along-lines/package.json +1 -1
  652. package/examples/javascript/map-day-and-night/package.json +1 -1
  653. package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
  654. package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
  655. package/examples/javascript/map-with-bubbles/package.json +1 -1
  656. package/examples/javascript/map-zoom-to-country/package.json +1 -1
  657. package/examples/javascript/misc-40-charts/package.json +1 -1
  658. package/examples/javascript/misc-microchart-grid/package.json +1 -1
  659. package/examples/javascript/pie-chart/package.json +1 -1
  660. package/examples/javascript/pie-donut-chart/package.json +1 -1
  661. package/examples/javascript/pie-variable-radius/package.json +1 -1
  662. package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
  663. package/examples/javascript/radar-heat-map/index.js +33 -33
  664. package/examples/javascript/radar-heat-map/package.json +1 -1
  665. package/examples/javascript/radar-line/package.json +1 -1
  666. package/examples/javascript/radar-time-line/package.json +1 -1
  667. package/examples/javascript/sliced-funnel/package.json +1 -1
  668. package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
  669. package/examples/javascript/sliced-pyramid/package.json +1 -1
  670. package/examples/javascript/stock-chart/package.json +1 -1
  671. package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
  672. package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
  673. package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
  674. package/examples/javascript/stock-chart-intraday/package.json +1 -1
  675. package/examples/javascript/stock-chart-live/package.json +1 -1
  676. package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
  677. package/examples/javascript/venn-diagram/package.json +1 -1
  678. package/examples/javascript/wordcloud-with-data/package.json +1 -1
  679. package/examples/javascript/wordcloud-with-text/package.json +1 -1
  680. package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
  681. package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  682. package/examples/javascript/xy-bubble/package.json +1 -1
  683. package/examples/javascript/xy-candlestick/package.json +1 -1
  684. package/examples/javascript/xy-clustered-column/package.json +1 -1
  685. package/examples/javascript/xy-column/package.json +1 -1
  686. package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
  687. package/examples/javascript/xy-data-grouping/package.json +1 -1
  688. package/examples/javascript/xy-draggable-range/package.json +1 -1
  689. package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  690. package/examples/javascript/xy-dumbbell plot/package.json +1 -1
  691. package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
  692. package/examples/javascript/xy-line/package.json +1 -1
  693. package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
  694. package/examples/javascript/xy-live-data/package.json +1 -1
  695. package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
  696. package/examples/javascript/xy-ohlc/package.json +1 -1
  697. package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
  698. package/examples/javascript/xy-smoothed-line/package.json +1 -1
  699. package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
  700. package/examples/javascript/xy-stacked-column/package.json +1 -1
  701. package/examples/javascript/xy-stacked-step/package.json +1 -1
  702. package/examples/javascript/xy-stock/package.json +1 -1
  703. package/examples/javascript/xy-stock-comparing/package.json +1 -1
  704. package/examples/typescript/flow-chord/package.json +1 -1
  705. package/examples/typescript/flow-chord/tsconfig.json +1 -1
  706. package/examples/typescript/flow-chord-directed/package.json +1 -1
  707. package/examples/typescript/flow-chord-directed/tsconfig.json +1 -1
  708. package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
  709. package/examples/typescript/flow-chord-non-ribbon/tsconfig.json +1 -1
  710. package/examples/typescript/flow-sankey/package.json +1 -1
  711. package/examples/typescript/flow-sankey/tsconfig.json +1 -1
  712. package/examples/typescript/gauge/package.json +1 -1
  713. package/examples/typescript/gauge/tsconfig.json +1 -1
  714. package/examples/typescript/gauge-bands/index.ts +3 -1
  715. package/examples/typescript/gauge-bands/package.json +1 -1
  716. package/examples/typescript/gauge-bands/tsconfig.json +1 -1
  717. package/examples/typescript/hierarchy-force-directed/package.json +1 -1
  718. package/examples/typescript/hierarchy-force-directed/tsconfig.json +1 -1
  719. package/examples/typescript/hierarchy-pack/package.json +1 -1
  720. package/examples/typescript/hierarchy-pack/tsconfig.json +1 -1
  721. package/examples/typescript/hierarchy-partition/package.json +1 -1
  722. package/examples/typescript/hierarchy-partition/tsconfig.json +1 -1
  723. package/examples/typescript/hierarchy-sunburst/package.json +1 -1
  724. package/examples/typescript/hierarchy-sunburst/tsconfig.json +1 -1
  725. package/examples/typescript/hierarchy-tree/package.json +1 -1
  726. package/examples/typescript/hierarchy-tree/tsconfig.json +1 -1
  727. package/examples/typescript/hierarchy-treemap/package.json +1 -1
  728. package/examples/typescript/hierarchy-treemap/tsconfig.json +1 -1
  729. package/examples/typescript/jest/package.json +1 -1
  730. package/examples/typescript/jest/tsconfig.json +1 -1
  731. package/examples/typescript/json-pie/README.md +6 -0
  732. package/examples/typescript/json-pie/index.css +11 -0
  733. package/examples/typescript/json-pie/index.html +12 -0
  734. package/examples/typescript/json-pie/index.ts +77 -0
  735. package/examples/typescript/json-pie/package.json +18 -0
  736. package/examples/typescript/{json → json-pie}/tsconfig.json +1 -1
  737. package/examples/typescript/{json → json-pie}/webpack.config.js +0 -0
  738. package/examples/typescript/json-xy/README.md +6 -0
  739. package/examples/typescript/json-xy/index.css +11 -0
  740. package/examples/{javascript/json → typescript/json-xy}/index.html +1 -1
  741. package/examples/typescript/json-xy/index.ts +203 -0
  742. package/examples/typescript/{json → json-xy}/package.json +2 -2
  743. package/examples/typescript/json-xy/tsconfig.json +12 -0
  744. package/examples/typescript/json-xy/webpack.config.js +45 -0
  745. package/examples/typescript/map-animating-along-lines/package.json +1 -1
  746. package/examples/typescript/map-animating-along-lines/tsconfig.json +1 -1
  747. package/examples/typescript/map-day-and-night/package.json +1 -1
  748. package/examples/typescript/map-day-and-night/tsconfig.json +1 -1
  749. package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
  750. package/examples/typescript/map-globe-rotate-to-country/tsconfig.json +1 -1
  751. package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
  752. package/examples/typescript/map-globe-with-projected-circles/tsconfig.json +1 -1
  753. package/examples/typescript/map-with-bubbles/package.json +1 -1
  754. package/examples/typescript/map-with-bubbles/tsconfig.json +1 -1
  755. package/examples/typescript/map-zoom-to-country/package.json +1 -1
  756. package/examples/typescript/map-zoom-to-country/tsconfig.json +1 -1
  757. package/examples/typescript/misc-40-charts/package.json +1 -1
  758. package/examples/typescript/misc-40-charts/tsconfig.json +1 -1
  759. package/examples/typescript/misc-microchart-grid/package.json +1 -1
  760. package/examples/typescript/misc-microchart-grid/tsconfig.json +1 -1
  761. package/examples/typescript/pie-chart/package.json +1 -1
  762. package/examples/typescript/pie-chart/tsconfig.json +1 -1
  763. package/examples/typescript/pie-donut-chart/package.json +1 -1
  764. package/examples/typescript/pie-donut-chart/tsconfig.json +1 -1
  765. package/examples/typescript/pie-variable-radius/package.json +1 -1
  766. package/examples/typescript/pie-variable-radius/tsconfig.json +1 -1
  767. package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
  768. package/examples/typescript/radar-column-iwatch-style/tsconfig.json +1 -1
  769. package/examples/typescript/radar-heat-map/index.ts +33 -33
  770. package/examples/typescript/radar-heat-map/package.json +1 -1
  771. package/examples/typescript/radar-heat-map/tsconfig.json +1 -1
  772. package/examples/typescript/radar-line/package.json +1 -1
  773. package/examples/typescript/radar-line/tsconfig.json +1 -1
  774. package/examples/typescript/radar-time-line/package.json +1 -1
  775. package/examples/typescript/radar-time-line/tsconfig.json +1 -1
  776. package/examples/typescript/sliced-funnel/package.json +1 -1
  777. package/examples/typescript/sliced-funnel/tsconfig.json +1 -1
  778. package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
  779. package/examples/typescript/sliced-pictorial-stacked/tsconfig.json +1 -1
  780. package/examples/typescript/sliced-pyramid/package.json +1 -1
  781. package/examples/typescript/sliced-pyramid/tsconfig.json +1 -1
  782. package/examples/typescript/stock-chart/package.json +1 -1
  783. package/examples/typescript/stock-chart/tsconfig.json +1 -1
  784. package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
  785. package/examples/typescript/stock-chart-comparing-stocks/tsconfig.json +1 -1
  786. package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
  787. package/examples/typescript/stock-chart-data-granularity/tsconfig.json +1 -1
  788. package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
  789. package/examples/typescript/stock-chart-data-grouping/tsconfig.json +1 -1
  790. package/examples/typescript/stock-chart-intraday/package.json +1 -1
  791. package/examples/typescript/stock-chart-intraday/tsconfig.json +1 -1
  792. package/examples/typescript/stock-chart-live/package.json +1 -1
  793. package/examples/typescript/stock-chart-live/tsconfig.json +1 -1
  794. package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
  795. package/examples/typescript/stock-chart-volume-separate-panel/tsconfig.json +1 -1
  796. package/examples/typescript/venn-diagram/package.json +1 -1
  797. package/examples/typescript/venn-diagram/tsconfig.json +1 -1
  798. package/examples/typescript/wordcloud-with-data/package.json +1 -1
  799. package/examples/typescript/wordcloud-with-data/tsconfig.json +1 -1
  800. package/examples/typescript/wordcloud-with-text/package.json +1 -1
  801. package/examples/typescript/wordcloud-with-text/tsconfig.json +1 -1
  802. package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
  803. package/examples/typescript/xy-100-percent-stacked-column/tsconfig.json +1 -1
  804. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  805. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/tsconfig.json +1 -1
  806. package/examples/typescript/xy-bubble/package.json +1 -1
  807. package/examples/typescript/xy-bubble/tsconfig.json +1 -1
  808. package/examples/typescript/xy-candlestick/package.json +1 -1
  809. package/examples/typescript/xy-candlestick/tsconfig.json +1 -1
  810. package/examples/typescript/xy-clustered-column/package.json +1 -1
  811. package/examples/typescript/xy-clustered-column/tsconfig.json +1 -1
  812. package/examples/typescript/xy-column/package.json +1 -1
  813. package/examples/typescript/xy-column/tsconfig.json +1 -1
  814. package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
  815. package/examples/typescript/xy-comparing-series-google-analytics-style/tsconfig.json +1 -1
  816. package/examples/typescript/xy-data-grouping/package.json +1 -1
  817. package/examples/typescript/xy-data-grouping/tsconfig.json +1 -1
  818. package/examples/typescript/xy-draggable-range/package.json +1 -1
  819. package/examples/typescript/xy-draggable-range/tsconfig.json +1 -1
  820. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  821. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/tsconfig.json +1 -1
  822. package/examples/typescript/xy-dumbbell plot/package.json +1 -1
  823. package/examples/typescript/xy-dumbbell plot/tsconfig.json +1 -1
  824. package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
  825. package/examples/typescript/xy-evenly-spaced-date-axis/tsconfig.json +1 -1
  826. package/examples/typescript/xy-line/package.json +1 -1
  827. package/examples/typescript/xy-line/tsconfig.json +1 -1
  828. package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
  829. package/examples/typescript/xy-line-highlight-on-legend-hover/tsconfig.json +1 -1
  830. package/examples/typescript/xy-live-data/package.json +1 -1
  831. package/examples/typescript/xy-live-data/tsconfig.json +1 -1
  832. package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
  833. package/examples/typescript/xy-multiple-synced-value-axes/tsconfig.json +1 -1
  834. package/examples/typescript/xy-ohlc/package.json +1 -1
  835. package/examples/typescript/xy-ohlc/tsconfig.json +1 -1
  836. package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
  837. package/examples/typescript/xy-real-time-data-sorting/tsconfig.json +1 -1
  838. package/examples/typescript/xy-smoothed-line/package.json +1 -1
  839. package/examples/typescript/xy-smoothed-line/tsconfig.json +1 -1
  840. package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
  841. package/examples/typescript/xy-stacked-and-clustered-column/tsconfig.json +1 -1
  842. package/examples/typescript/xy-stacked-column/package.json +1 -1
  843. package/examples/typescript/xy-stacked-column/tsconfig.json +1 -1
  844. package/examples/typescript/xy-stacked-step/package.json +1 -1
  845. package/examples/typescript/xy-stacked-step/tsconfig.json +1 -1
  846. package/examples/typescript/xy-stock/package.json +1 -1
  847. package/examples/typescript/xy-stock/tsconfig.json +1 -1
  848. package/examples/typescript/xy-stock-comparing/package.json +1 -1
  849. package/examples/typescript/xy-stock-comparing/tsconfig.json +1 -1
  850. package/locales/ar.js +1 -1
  851. package/locales/bg_BG.js +1 -1
  852. package/locales/bs_BA.js +1 -1
  853. package/locales/ca_ES.js +1 -1
  854. package/locales/cs_CZ.js +1 -1
  855. package/locales/da_DK.js +1 -1
  856. package/locales/el_GR.js +1 -1
  857. package/locales/en.js +1 -1
  858. package/locales/en_CA.js +1 -1
  859. package/locales/en_US.js +1 -1
  860. package/locales/et_EE.js +1 -1
  861. package/locales/fi_FI.js +1 -1
  862. package/locales/fr_FR.js +1 -1
  863. package/locales/he_IL.js +1 -1
  864. package/locales/hi_IN.js +1 -1
  865. package/locales/hr_HR.js +1 -1
  866. package/locales/hu_HU.js +1 -1
  867. package/locales/id_ID.js +1 -1
  868. package/locales/ja_JP.js +1 -1
  869. package/locales/ko_KR.js +1 -1
  870. package/locales/lv_LV.js +1 -1
  871. package/locales/nb_NO.js +1 -1
  872. package/locales/nl_NL.js +1 -1
  873. package/locales/pl_PL.js +1 -1
  874. package/locales/ro_RO.js +1 -1
  875. package/locales/sr_RS.js +1 -1
  876. package/locales/th_TH.js +1 -1
  877. package/locales/tr_TR.js +1 -1
  878. package/locales/vi_VN.js +1 -1
  879. package/locales/zh_Hans.js +1 -1
  880. package/locales/zh_Hant.js +1 -1
  881. package/package.json +1 -1
  882. package/plugins/json.d.ts +1 -0
  883. package/plugins/json.d.ts.map +1 -1
  884. package/plugins/json.js +1 -0
  885. package/plugins/json.js.map +1 -1
  886. package/examples/javascript/json/index.js +0 -206
  887. package/examples/typescript/json/index.ts +0 -206
@@ -1,4 +1,4 @@
1
- import { __awaiter, __extends, __generator } from "tslib";
1
+ import { __awaiter } from "tslib";
2
2
  import { Entity } from "../util/Entity";
3
3
  import { Template } from "../util/Template";
4
4
  import { Percent } from "../util/Percent";
@@ -16,84 +16,66 @@ import * as $math from "../util/Math";
16
16
  *
17
17
  * @see {@link https://www.amcharts.com/docs/v5/concepts/events/} for more info
18
18
  */
19
- var SpriteEventDispatcher = /** @class */ (function (_super) {
20
- __extends(SpriteEventDispatcher, _super);
21
- function SpriteEventDispatcher(sprite) {
22
- var _this = _super.call(this) || this;
23
- Object.defineProperty(_this, "_sprite", {
19
+ class SpriteEventDispatcher extends EventDispatcher {
20
+ constructor(sprite) {
21
+ super();
22
+ Object.defineProperty(this, "_sprite", {
24
23
  enumerable: true,
25
24
  configurable: true,
26
25
  writable: true,
27
26
  value: void 0
28
27
  });
29
- Object.defineProperty(_this, "_rendererDisposers", {
28
+ Object.defineProperty(this, "_rendererDisposers", {
30
29
  enumerable: true,
31
30
  configurable: true,
32
31
  writable: true,
33
32
  value: {}
34
33
  });
35
- Object.defineProperty(_this, "_dispatchParents", {
34
+ Object.defineProperty(this, "_dispatchParents", {
36
35
  enumerable: true,
37
36
  configurable: true,
38
37
  writable: true,
39
38
  value: true
40
39
  });
41
- _this._sprite = sprite;
42
- return _this;
43
- }
44
- Object.defineProperty(SpriteEventDispatcher.prototype, "_makePointerEvent", {
45
- enumerable: false,
46
- configurable: true,
47
- writable: true,
48
- value: function (key, event) {
49
- return {
50
- type: key,
51
- originalEvent: event.event,
52
- point: event.point,
53
- simulated: event.simulated,
54
- native: event.native,
55
- target: this._sprite
56
- };
57
- }
58
- });
59
- Object.defineProperty(SpriteEventDispatcher.prototype, "_onRenderer", {
60
- enumerable: false,
61
- configurable: true,
62
- writable: true,
63
- value: function (key, dispatch) {
64
- var _this = this;
65
- // TODO: is this OK? it'd be good not to require to set this on each individual element
66
- this._sprite.set("interactive", true);
67
- this._sprite._display.interactive = true;
68
- var events = this._rendererDisposers[key];
69
- if (events === undefined) {
70
- var disposer_1 = this._sprite._display.on(key, function (e) {
71
- dispatch.call(_this, e);
72
- });
73
- events = this._rendererDisposers[key] = new CounterDisposer(function () {
74
- delete _this._rendererDisposers[key];
75
- disposer_1.dispose();
76
- });
77
- }
78
- return events.increment();
79
- }
80
- });
81
- Object.defineProperty(SpriteEventDispatcher.prototype, "_on", {
82
- enumerable: false,
83
- configurable: true,
84
- writable: true,
85
- value: function (once, type, callback, context, shouldClone, dispatch) {
86
- var info = _super.prototype._on.call(this, once, type, callback, context, shouldClone, dispatch);
87
- var rendererEvent = SpriteEventDispatcher.RENDERER_EVENTS[type];
88
- if (rendererEvent !== undefined) {
89
- info.disposer = new MultiDisposer([
90
- info.disposer,
91
- this._onRenderer(type, rendererEvent),
92
- ]);
93
- }
94
- return info;
40
+ this._sprite = sprite;
41
+ }
42
+ _makePointerEvent(key, event) {
43
+ return {
44
+ type: key,
45
+ originalEvent: event.event,
46
+ point: event.point,
47
+ simulated: event.simulated,
48
+ native: event.native,
49
+ target: this._sprite
50
+ };
51
+ }
52
+ _onRenderer(key, dispatch) {
53
+ // TODO: is this OK? it'd be good not to require to set this on each individual element
54
+ this._sprite.set("interactive", true);
55
+ this._sprite._display.interactive = true;
56
+ let events = this._rendererDisposers[key];
57
+ if (events === undefined) {
58
+ const disposer = this._sprite._display.on(key, (e) => {
59
+ dispatch.call(this, e);
60
+ });
61
+ events = this._rendererDisposers[key] = new CounterDisposer(() => {
62
+ delete this._rendererDisposers[key];
63
+ disposer.dispose();
64
+ });
95
65
  }
96
- });
66
+ return events.increment();
67
+ }
68
+ _on(once, type, callback, context, shouldClone, dispatch) {
69
+ const info = super._on(once, type, callback, context, shouldClone, dispatch);
70
+ const rendererEvent = SpriteEventDispatcher.RENDERER_EVENTS[type];
71
+ if (rendererEvent !== undefined) {
72
+ info.disposer = new MultiDisposer([
73
+ info.disposer,
74
+ this._onRenderer(type, rendererEvent),
75
+ ]);
76
+ }
77
+ return info;
78
+ }
97
79
  /**
98
80
  * Will stop any bubbling up of the event to element's parents.
99
81
  *
@@ -114,1613 +96,1339 @@ var SpriteEventDispatcher = /** @class */ (function (_super) {
114
96
  * });
115
97
  * ```
116
98
  */
117
- Object.defineProperty(SpriteEventDispatcher.prototype, "stopParentDispatch", {
118
- enumerable: false,
119
- configurable: true,
120
- writable: true,
121
- value: function () {
122
- this._dispatchParents = false;
123
- }
124
- });
99
+ stopParentDispatch() {
100
+ this._dispatchParents = false;
101
+ }
125
102
  /**
126
103
  * @ignore
127
104
  */
128
- Object.defineProperty(SpriteEventDispatcher.prototype, "dispatchParents", {
129
- enumerable: false,
130
- configurable: true,
131
- writable: true,
132
- value: function (type, event) {
133
- var old = this._dispatchParents;
134
- this._dispatchParents = true;
135
- try {
136
- this.dispatch(type, event);
137
- if (this._dispatchParents && this._sprite.parent) {
138
- this._sprite.parent.events.dispatchParents(type, event);
139
- }
140
- }
141
- finally {
142
- this._dispatchParents = old;
105
+ dispatchParents(type, event) {
106
+ const old = this._dispatchParents;
107
+ this._dispatchParents = true;
108
+ try {
109
+ this.dispatch(type, event);
110
+ if (this._dispatchParents && this._sprite.parent) {
111
+ this._sprite.parent.events.dispatchParents(type, event);
143
112
  }
144
113
  }
145
- });
146
- Object.defineProperty(SpriteEventDispatcher, "RENDERER_EVENTS", {
147
- enumerable: true,
148
- configurable: true,
149
- writable: true,
150
- value: {
151
- "click": function (event) {
152
- if (this.isEnabled("click") && !this._sprite.isDragging() && this._sprite._hasDown() && !this._sprite._hasMoved(this._makePointerEvent("click", event))) {
153
- this.dispatch("click", this._makePointerEvent("click", event));
154
- }
155
- },
156
- "rightclick": function (event) {
157
- if (this.isEnabled("rightclick")) {
158
- this.dispatch("rightclick", this._makePointerEvent("rightclick", event));
159
- }
160
- },
161
- "middleclick": function (event) {
162
- if (this.isEnabled("middleclick")) {
163
- this.dispatch("middleclick", this._makePointerEvent("middleclick", event));
164
- }
165
- },
166
- "dblclick": function (event) {
167
- this.dispatchParents("dblclick", this._makePointerEvent("dblclick", event));
168
- },
169
- "pointerover": function (event) {
170
- if (this.isEnabled("pointerover")) {
171
- this.dispatch("pointerover", this._makePointerEvent("pointerover", event));
172
- }
173
- },
174
- "pointerout": function (event) {
175
- if (this.isEnabled("pointerout")) {
176
- this.dispatch("pointerout", this._makePointerEvent("pointerout", event));
177
- }
178
- },
179
- "pointerdown": function (event) {
180
- this.dispatchParents("pointerdown", this._makePointerEvent("pointerdown", event));
181
- },
182
- "pointerup": function (event) {
183
- if (this.isEnabled("pointerup")) {
184
- this.dispatch("pointerup", this._makePointerEvent("pointerup", event));
185
- }
186
- },
187
- "globalpointerup": function (event) {
188
- if (this.isEnabled("globalpointerup")) {
189
- this.dispatch("globalpointerup", this._makePointerEvent("globalpointerup", event));
190
- }
191
- },
192
- "globalpointermove": function (event) {
193
- if (this.isEnabled("globalpointermove")) {
194
- this.dispatch("globalpointermove", this._makePointerEvent("globalpointermove", event));
195
- }
196
- },
197
- "wheel": function (event) {
198
- this.dispatchParents("wheel", {
199
- type: "wheel",
200
- target: this._sprite,
201
- originalEvent: event.event,
202
- point: event.point,
203
- });
204
- },
114
+ finally {
115
+ this._dispatchParents = old;
205
116
  }
206
- });
207
- return SpriteEventDispatcher;
208
- }(EventDispatcher));
117
+ }
118
+ }
119
+ Object.defineProperty(SpriteEventDispatcher, "RENDERER_EVENTS", {
120
+ enumerable: true,
121
+ configurable: true,
122
+ writable: true,
123
+ value: {
124
+ "click": function (event) {
125
+ if (this.isEnabled("click") && !this._sprite.isDragging() && this._sprite._hasDown() && !this._sprite._hasMoved(this._makePointerEvent("click", event))) {
126
+ this.dispatch("click", this._makePointerEvent("click", event));
127
+ }
128
+ },
129
+ "rightclick": function (event) {
130
+ if (this.isEnabled("rightclick")) {
131
+ this.dispatch("rightclick", this._makePointerEvent("rightclick", event));
132
+ }
133
+ },
134
+ "middleclick": function (event) {
135
+ if (this.isEnabled("middleclick")) {
136
+ this.dispatch("middleclick", this._makePointerEvent("middleclick", event));
137
+ }
138
+ },
139
+ "dblclick": function (event) {
140
+ this.dispatchParents("dblclick", this._makePointerEvent("dblclick", event));
141
+ },
142
+ "pointerover": function (event) {
143
+ if (this.isEnabled("pointerover")) {
144
+ this.dispatch("pointerover", this._makePointerEvent("pointerover", event));
145
+ }
146
+ },
147
+ "pointerout": function (event) {
148
+ if (this.isEnabled("pointerout")) {
149
+ this.dispatch("pointerout", this._makePointerEvent("pointerout", event));
150
+ }
151
+ },
152
+ "pointerdown": function (event) {
153
+ this.dispatchParents("pointerdown", this._makePointerEvent("pointerdown", event));
154
+ },
155
+ "pointerup": function (event) {
156
+ if (this.isEnabled("pointerup")) {
157
+ this.dispatch("pointerup", this._makePointerEvent("pointerup", event));
158
+ }
159
+ },
160
+ "globalpointerup": function (event) {
161
+ if (this.isEnabled("globalpointerup")) {
162
+ this.dispatch("globalpointerup", this._makePointerEvent("globalpointerup", event));
163
+ }
164
+ },
165
+ "globalpointermove": function (event) {
166
+ if (this.isEnabled("globalpointermove")) {
167
+ this.dispatch("globalpointermove", this._makePointerEvent("globalpointermove", event));
168
+ }
169
+ },
170
+ "wheel": function (event) {
171
+ this.dispatchParents("wheel", {
172
+ type: "wheel",
173
+ target: this._sprite,
174
+ originalEvent: event.event,
175
+ point: event.point,
176
+ });
177
+ },
178
+ }
179
+ });
209
180
  /**
210
181
  * A base class for all visual elements.
211
182
  *
212
183
  * @important
213
184
  */
214
- var Sprite = /** @class */ (function (_super) {
215
- __extends(Sprite, _super);
216
- function Sprite() {
217
- var _this = _super !== null && _super.apply(this, arguments) || this;
218
- Object.defineProperty(_this, "_adjustedLocalBounds", {
185
+ export class Sprite extends Entity {
186
+ constructor() {
187
+ super(...arguments);
188
+ Object.defineProperty(this, "_adjustedLocalBounds", {
219
189
  enumerable: true,
220
190
  configurable: true,
221
191
  writable: true,
222
192
  value: { left: 0, right: 0, top: 0, bottom: 0 }
223
193
  });
224
- Object.defineProperty(_this, "_localBounds", {
194
+ Object.defineProperty(this, "_localBounds", {
225
195
  enumerable: true,
226
196
  configurable: true,
227
197
  writable: true,
228
198
  value: { left: 0, right: 0, top: 0, bottom: 0 }
229
199
  });
230
- Object.defineProperty(_this, "_parent", {
200
+ Object.defineProperty(this, "_parent", {
231
201
  enumerable: true,
232
202
  configurable: true,
233
203
  writable: true,
234
204
  value: void 0
235
205
  });
236
- Object.defineProperty(_this, "_dataItem", {
206
+ Object.defineProperty(this, "_dataItem", {
237
207
  enumerable: true,
238
208
  configurable: true,
239
209
  writable: true,
240
210
  value: void 0
241
211
  });
242
- Object.defineProperty(_this, "_templateField", {
212
+ Object.defineProperty(this, "_templateField", {
243
213
  enumerable: true,
244
214
  configurable: true,
245
215
  writable: true,
246
216
  value: void 0
247
217
  });
248
- Object.defineProperty(_this, "_sizeDirty", {
218
+ Object.defineProperty(this, "_sizeDirty", {
249
219
  enumerable: true,
250
220
  configurable: true,
251
221
  writable: true,
252
222
  value: false
253
223
  });
254
224
  // Will be true only when dragging
255
- Object.defineProperty(_this, "_isDragging", {
225
+ Object.defineProperty(this, "_isDragging", {
256
226
  enumerable: true,
257
227
  configurable: true,
258
228
  writable: true,
259
229
  value: false
260
230
  });
261
231
  // The event when the dragging starts
262
- Object.defineProperty(_this, "_dragEvent", {
232
+ Object.defineProperty(this, "_dragEvent", {
263
233
  enumerable: true,
264
234
  configurable: true,
265
235
  writable: true,
266
236
  value: void 0
267
237
  });
268
238
  // The position when dragging starts
269
- Object.defineProperty(_this, "_dragPoint", {
239
+ Object.defineProperty(this, "_dragPoint", {
270
240
  enumerable: true,
271
241
  configurable: true,
272
242
  writable: true,
273
243
  value: void 0
274
244
  });
275
- Object.defineProperty(_this, "_isHidden", {
245
+ Object.defineProperty(this, "_isHidden", {
276
246
  enumerable: true,
277
247
  configurable: true,
278
248
  writable: true,
279
249
  value: false
280
250
  });
281
- Object.defineProperty(_this, "_isShowing", {
251
+ Object.defineProperty(this, "_isShowing", {
282
252
  enumerable: true,
283
253
  configurable: true,
284
254
  writable: true,
285
255
  value: false
286
256
  });
287
- Object.defineProperty(_this, "_isHiding", {
257
+ Object.defineProperty(this, "_isHiding", {
288
258
  enumerable: true,
289
259
  configurable: true,
290
260
  writable: true,
291
261
  value: false
292
262
  });
293
- Object.defineProperty(_this, "_isDown", {
263
+ Object.defineProperty(this, "_isDown", {
294
264
  enumerable: true,
295
265
  configurable: true,
296
266
  writable: true,
297
267
  value: false
298
268
  });
299
- Object.defineProperty(_this, "_downPoint", {
269
+ Object.defineProperty(this, "_downPoint", {
300
270
  enumerable: true,
301
271
  configurable: true,
302
272
  writable: true,
303
273
  value: void 0
304
274
  });
305
- Object.defineProperty(_this, "_downPoints", {
275
+ Object.defineProperty(this, "_downPoints", {
306
276
  enumerable: true,
307
277
  configurable: true,
308
278
  writable: true,
309
279
  value: {}
310
280
  });
311
- Object.defineProperty(_this, "_toggleDp", {
281
+ Object.defineProperty(this, "_toggleDp", {
312
282
  enumerable: true,
313
283
  configurable: true,
314
284
  writable: true,
315
285
  value: void 0
316
286
  });
317
- Object.defineProperty(_this, "_dragDp", {
287
+ Object.defineProperty(this, "_dragDp", {
318
288
  enumerable: true,
319
289
  configurable: true,
320
290
  writable: true,
321
291
  value: void 0
322
292
  });
323
- Object.defineProperty(_this, "_tooltipDp", {
293
+ Object.defineProperty(this, "_tooltipDp", {
324
294
  enumerable: true,
325
295
  configurable: true,
326
296
  writable: true,
327
297
  value: void 0
328
298
  });
329
- Object.defineProperty(_this, "_hoverDp", {
299
+ Object.defineProperty(this, "_hoverDp", {
330
300
  enumerable: true,
331
301
  configurable: true,
332
302
  writable: true,
333
303
  value: void 0
334
304
  });
335
- Object.defineProperty(_this, "_focusDp", {
305
+ Object.defineProperty(this, "_focusDp", {
336
306
  enumerable: true,
337
307
  configurable: true,
338
308
  writable: true,
339
309
  value: void 0
340
310
  });
341
- Object.defineProperty(_this, "_tooltipMoveDp", {
311
+ Object.defineProperty(this, "_tooltipMoveDp", {
342
312
  enumerable: true,
343
313
  configurable: true,
344
314
  writable: true,
345
315
  value: void 0
346
316
  });
347
- Object.defineProperty(_this, "_tooltipPointerDp", {
317
+ Object.defineProperty(this, "_tooltipPointerDp", {
348
318
  enumerable: true,
349
319
  configurable: true,
350
320
  writable: true,
351
321
  value: void 0
352
322
  });
353
- Object.defineProperty(_this, "_statesHandled", {
323
+ Object.defineProperty(this, "_statesHandled", {
354
324
  enumerable: true,
355
325
  configurable: true,
356
326
  writable: true,
357
327
  value: false
358
328
  });
359
- return _this;
360
- }
361
- Object.defineProperty(Sprite.prototype, "_afterNew", {
362
- enumerable: false,
363
- configurable: true,
364
- writable: true,
365
- value: function () {
366
- this.setPrivateRaw("visible", true);
367
- _super.prototype._afterNew.call(this);
368
- }
369
- });
370
- Object.defineProperty(Sprite.prototype, "_markDirtyKey", {
371
- enumerable: false,
372
- configurable: true,
373
- writable: true,
374
- value: function (key) {
375
- _super.prototype._markDirtyKey.call(this, key);
376
- if (key == "x" || key == "y" || key == "dx" || key == "dy") {
377
- this.markDirtyBounds();
378
- this._addPercentagePositionChildren();
379
- this.markDirtyPosition();
380
- }
381
- }
382
- });
383
- Object.defineProperty(Sprite.prototype, "_markDirtyPrivateKey", {
384
- enumerable: false,
385
- configurable: true,
386
- writable: true,
387
- value: function (key) {
388
- _super.prototype._markDirtyPrivateKey.call(this, key);
389
- if (key == "x" || key == "y") {
390
- this.markDirtyPosition();
391
- }
392
- }
393
- });
394
- Object.defineProperty(Sprite.prototype, "_removeTemplateField", {
395
- enumerable: false,
396
- configurable: true,
397
- writable: true,
398
- value: function () {
399
- if (this._templateField) {
400
- this._templateField._removeObjectTemplate(this);
401
- }
402
- }
403
- });
404
- Object.defineProperty(Sprite.prototype, "_createEvents", {
405
- enumerable: false,
406
- configurable: true,
407
- writable: true,
408
- value: function () {
409
- return new SpriteEventDispatcher(this);
410
- }
411
- });
412
- Object.defineProperty(Sprite.prototype, "_processTemplateField", {
413
- enumerable: false,
414
- configurable: true,
415
- writable: true,
416
- value: function () {
417
- var template;
418
- var field = this.get("templateField");
419
- if (field) {
420
- var dataItem = this.dataItem;
421
- if (dataItem) {
422
- var context = dataItem.dataContext;
423
- if (context) {
424
- template = context[field];
425
- if (!(template instanceof Template) && template) {
426
- template = Template.new(template);
427
- }
329
+ }
330
+ _afterNew() {
331
+ this.setPrivateRaw("visible", true);
332
+ super._afterNew();
333
+ }
334
+ _markDirtyKey(key) {
335
+ super._markDirtyKey(key);
336
+ if (key == "x" || key == "y" || key == "dx" || key == "dy") {
337
+ this.markDirtyBounds();
338
+ this._addPercentagePositionChildren();
339
+ this.markDirtyPosition();
340
+ }
341
+ }
342
+ _markDirtyPrivateKey(key) {
343
+ super._markDirtyPrivateKey(key);
344
+ if (key == "x" || key == "y") {
345
+ this.markDirtyPosition();
346
+ }
347
+ }
348
+ _removeTemplateField() {
349
+ if (this._templateField) {
350
+ this._templateField._removeObjectTemplate(this);
351
+ }
352
+ }
353
+ _createEvents() {
354
+ return new SpriteEventDispatcher(this);
355
+ }
356
+ _processTemplateField() {
357
+ let template;
358
+ const field = this.get("templateField");
359
+ if (field) {
360
+ const dataItem = this.dataItem;
361
+ if (dataItem) {
362
+ const context = dataItem.dataContext;
363
+ if (context) {
364
+ template = context[field];
365
+ if (!(template instanceof Template) && template) {
366
+ template = Template.new(template);
428
367
  }
429
368
  }
430
369
  }
431
- if (this._templateField !== template) {
432
- this._removeTemplateField();
433
- this._templateField = template;
434
- if (template) {
435
- template._setObjectTemplate(this);
436
- }
437
- this._applyTemplates();
370
+ }
371
+ if (this._templateField !== template) {
372
+ this._removeTemplateField();
373
+ this._templateField = template;
374
+ if (template) {
375
+ template._setObjectTemplate(this);
438
376
  }
377
+ this._applyTemplates();
439
378
  }
440
- });
379
+ }
441
380
  // TODO change this to run before the element is added to the parent, so that way
442
381
  // it doesn't need to apply the themes twice
443
- Object.defineProperty(Sprite.prototype, "_setDataItem", {
444
- enumerable: false,
445
- configurable: true,
446
- writable: true,
447
- value: function (dataItem) {
448
- var oldDataItem = this._dataItem;
449
- this._dataItem = dataItem;
450
- this._processTemplateField();
451
- var eventType = "dataitemchanged";
452
- if (this.events.isEnabled(eventType)) {
453
- this.events.dispatch(eventType, {
454
- type: eventType,
455
- target: this,
456
- oldDataItem: oldDataItem,
457
- newDataItem: dataItem
458
- });
459
- }
382
+ _setDataItem(dataItem) {
383
+ const oldDataItem = this._dataItem;
384
+ this._dataItem = dataItem;
385
+ this._processTemplateField();
386
+ const eventType = "dataitemchanged";
387
+ if (this.events.isEnabled(eventType)) {
388
+ this.events.dispatch(eventType, {
389
+ type: eventType,
390
+ target: this,
391
+ oldDataItem: oldDataItem,
392
+ newDataItem: dataItem
393
+ });
460
394
  }
461
- });
462
- Object.defineProperty(Sprite.prototype, "dataItem", {
463
- /**
464
- * @return DataItem
465
- */
466
- get: function () {
467
- if (this._dataItem) {
468
- return this._dataItem;
469
- }
470
- else {
471
- var parent_1 = this._parent;
472
- while (parent_1) {
473
- if (parent_1._dataItem) {
474
- return parent_1._dataItem;
475
- }
476
- else {
477
- parent_1 = parent_1._parent;
478
- }
479
- }
480
- }
481
- },
482
- /**
483
- * A [[DataItem]] used for this element.
484
- *
485
- * NOTE: data item is being assigned automatically in most cases where it
486
- * matters. Use this accessor to set data item only if you know what you're
487
- * doing.
488
- *
489
- * @param value Data item
490
- */
491
- set: function (value) {
492
- this._setDataItem(value);
493
- },
494
- enumerable: false,
495
- configurable: true
496
- });
497
- Object.defineProperty(Sprite.prototype, "_addPercentageSizeChildren", {
498
- enumerable: false,
499
- configurable: true,
500
- writable: true,
501
- value: function () {
502
- var parent = this.parent;
503
- if (parent) {
504
- if (this.get("width") instanceof Percent || this.get("height") instanceof Percent) {
505
- $array.pushOne(parent._percentageSizeChildren, this);
395
+ }
396
+ /**
397
+ * A [[DataItem]] used for this element.
398
+ *
399
+ * NOTE: data item is being assigned automatically in most cases where it
400
+ * matters. Use this accessor to set data item only if you know what you're
401
+ * doing.
402
+ *
403
+ * @param value Data item
404
+ */
405
+ set dataItem(value) {
406
+ this._setDataItem(value);
407
+ }
408
+ /**
409
+ * @return DataItem
410
+ */
411
+ get dataItem() {
412
+ if (this._dataItem) {
413
+ return this._dataItem;
414
+ }
415
+ else {
416
+ let parent = this._parent;
417
+ while (parent) {
418
+ if (parent._dataItem) {
419
+ return parent._dataItem;
506
420
  }
507
421
  else {
508
- $array.removeFirst(parent._percentageSizeChildren, this);
422
+ parent = parent._parent;
509
423
  }
510
424
  }
511
425
  }
512
- });
513
- Object.defineProperty(Sprite.prototype, "_addPercentagePositionChildren", {
514
- enumerable: false,
515
- configurable: true,
516
- writable: true,
517
- value: function () {
518
- var parent = this.parent;
519
- if (parent) {
520
- if (this.get("x") instanceof Percent || this.get("y") instanceof Percent) {
521
- $array.pushOne(parent._percentagePositionChildren, this);
522
- }
523
- else {
524
- $array.removeFirst(parent._percentagePositionChildren, this);
525
- }
426
+ }
427
+ _addPercentageSizeChildren() {
428
+ let parent = this.parent;
429
+ if (parent) {
430
+ if (this.get("width") instanceof Percent || this.get("height") instanceof Percent) {
431
+ $array.pushOne(parent._percentageSizeChildren, this);
432
+ }
433
+ else {
434
+ $array.removeFirst(parent._percentageSizeChildren, this);
435
+ }
436
+ }
437
+ }
438
+ _addPercentagePositionChildren() {
439
+ let parent = this.parent;
440
+ if (parent) {
441
+ if (this.get("x") instanceof Percent || this.get("y") instanceof Percent) {
442
+ $array.pushOne(parent._percentagePositionChildren, this);
443
+ }
444
+ else {
445
+ $array.removeFirst(parent._percentagePositionChildren, this);
526
446
  }
527
447
  }
528
- });
448
+ }
529
449
  /**
530
450
  * @ignore
531
451
  */
532
- Object.defineProperty(Sprite.prototype, "markDirtyPosition", {
533
- enumerable: false,
534
- configurable: true,
535
- writable: true,
536
- value: function () {
537
- this._root._addDirtyPosition(this);
538
- }
539
- });
540
- Object.defineProperty(Sprite.prototype, "updatePivotPoint", {
541
- enumerable: false,
542
- configurable: true,
543
- writable: true,
544
- value: function () {
545
- var bounds = this._localBounds;
546
- if (bounds) {
547
- var centerX = this.get("centerX");
548
- if (centerX != null) {
549
- this._display.pivot.x = bounds.left + $utils.relativeToValue(centerX, bounds.right - bounds.left);
550
- }
551
- var centerY = this.get("centerY");
552
- if (centerY != null) {
553
- this._display.pivot.y = bounds.top + $utils.relativeToValue(centerY, bounds.bottom - bounds.top);
554
- }
555
- }
556
- }
557
- });
558
- Object.defineProperty(Sprite.prototype, "_beforeChanged", {
559
- enumerable: false,
560
- configurable: true,
561
- writable: true,
562
- value: function () {
563
- var _this = this;
564
- _super.prototype._beforeChanged.call(this);
565
- // handling states in beforeChanged, otherwise states is not applied without animated theme
566
- this._handleStates();
567
- if (this.isDirty("tooltip")) {
568
- var previous = this._prevSettings.tooltip;
569
- if (previous) {
570
- previous.dispose();
571
- }
572
- }
573
- if (this.isDirty("layer") || this.isDirty("layerMargin")) {
574
- this._display.setLayer(this.get("layer"), this.get("layerMargin"));
575
- this.markDirtyLayer();
452
+ markDirtyPosition() {
453
+ this._root._addDirtyPosition(this);
454
+ }
455
+ updatePivotPoint() {
456
+ const bounds = this._localBounds;
457
+ if (bounds) {
458
+ const centerX = this.get("centerX");
459
+ if (centerX != null) {
460
+ this._display.pivot.x = bounds.left + $utils.relativeToValue(centerX, bounds.right - bounds.left);
576
461
  }
577
- if (this.isDirty("tooltipPosition")) {
578
- var tooltipMoveDp = this._tooltipMoveDp;
579
- if (tooltipMoveDp) {
580
- tooltipMoveDp.dispose();
581
- this._tooltipMoveDp = undefined;
582
- }
583
- var tooltipPointerDp = this._tooltipPointerDp;
584
- if (tooltipPointerDp) {
585
- tooltipPointerDp.dispose();
586
- this._tooltipPointerDp = undefined;
587
- }
588
- if (this.get("tooltipPosition") == "pointer") {
589
- this._tooltipPointerDp = new MultiDisposer([
590
- this.events.on("pointerover", function () {
591
- _this._tooltipMoveDp = _this.events.on("globalpointermove", function (e) {
592
- _this.showTooltip(e.point);
593
- });
594
- }),
595
- this.events.on("pointerout", function () {
596
- var tooltipMoveDp = _this._tooltipMoveDp;
597
- if (tooltipMoveDp) {
598
- tooltipMoveDp.dispose();
599
- _this._tooltipMoveDp = undefined;
600
- }
601
- })
602
- ]);
603
- }
462
+ const centerY = this.get("centerY");
463
+ if (centerY != null) {
464
+ this._display.pivot.y = bounds.top + $utils.relativeToValue(centerY, bounds.bottom - bounds.top);
604
465
  }
605
466
  }
606
- });
607
- Object.defineProperty(Sprite.prototype, "_handleStates", {
608
- enumerable: false,
609
- configurable: true,
610
- writable: true,
611
- value: function () {
612
- if (!this._statesHandled) {
613
- if (this.isDirty("active")) {
614
- if (this.get("active")) {
615
- this.states.applyAnimate("active");
616
- this.set("ariaChecked", true);
617
- }
618
- else {
619
- if (!this.isHidden()) {
620
- this.states.applyAnimate("default");
621
- }
622
- this.set("ariaChecked", false);
623
- }
624
- this.markDirtyAccessibility();
625
- }
626
- if (this.isDirty("disabled")) {
627
- if (this.get("disabled")) {
628
- this.states.applyAnimate("disabled");
629
- this.set("ariaChecked", false);
630
- }
631
- else {
632
- if (!this.isHidden()) {
633
- this.states.applyAnimate("default");
467
+ }
468
+ _beforeChanged() {
469
+ super._beforeChanged();
470
+ // handling states in beforeChanged, otherwise states is not applied without animated theme
471
+ this._handleStates();
472
+ if (this.isDirty("tooltip")) {
473
+ const previous = this._prevSettings.tooltip;
474
+ if (previous) {
475
+ previous.dispose();
476
+ }
477
+ }
478
+ if (this.isDirty("layer") || this.isDirty("layerMargin")) {
479
+ this._display.setLayer(this.get("layer"), this.get("layerMargin"));
480
+ this.markDirtyLayer();
481
+ }
482
+ if (this.isDirty("tooltipPosition")) {
483
+ const tooltipMoveDp = this._tooltipMoveDp;
484
+ if (tooltipMoveDp) {
485
+ tooltipMoveDp.dispose();
486
+ this._tooltipMoveDp = undefined;
487
+ }
488
+ const tooltipPointerDp = this._tooltipPointerDp;
489
+ if (tooltipPointerDp) {
490
+ tooltipPointerDp.dispose();
491
+ this._tooltipPointerDp = undefined;
492
+ }
493
+ if (this.get("tooltipPosition") == "pointer") {
494
+ this._tooltipPointerDp = new MultiDisposer([
495
+ this.events.on("pointerover", () => {
496
+ this._tooltipMoveDp = this.events.on("globalpointermove", (e) => {
497
+ this.showTooltip(e.point);
498
+ });
499
+ }),
500
+ this.events.on("pointerout", () => {
501
+ const tooltipMoveDp = this._tooltipMoveDp;
502
+ if (tooltipMoveDp) {
503
+ tooltipMoveDp.dispose();
504
+ this._tooltipMoveDp = undefined;
634
505
  }
635
- this.set("ariaChecked", true);
636
- }
637
- this.markDirtyAccessibility();
638
- }
639
- this._statesHandled = true;
640
- }
641
- }
642
- });
643
- Object.defineProperty(Sprite.prototype, "_changed", {
644
- enumerable: false,
645
- configurable: true,
646
- writable: true,
647
- value: function () {
648
- var _this = this;
649
- _super.prototype._changed.call(this);
650
- var display = this._display;
651
- var events = this.events;
652
- if (this.isDirty("draggable")) {
653
- var draggable = this.get("draggable");
654
- if (draggable) {
655
- this.set("interactive", true);
656
- this._dragDp = new MultiDisposer([
657
- events.on("pointerdown", function (ev) {
658
- _this.dragStart(ev);
659
- }),
660
- events.on("globalpointermove", function (ev) {
661
- _this.dragMove(ev);
662
- }),
663
- events.on("globalpointerup", function (ev) {
664
- _this.dragStop(ev);
665
- })
666
- ]);
506
+ })
507
+ ]);
508
+ }
509
+ }
510
+ }
511
+ _handleStates() {
512
+ if (!this._statesHandled) {
513
+ if (this.isDirty("active")) {
514
+ if (this.get("active")) {
515
+ this.states.applyAnimate("active");
516
+ this.set("ariaChecked", true);
667
517
  }
668
518
  else {
669
- if (this._dragDp) {
670
- this._dragDp.dispose();
671
- this._dragDp = undefined;
672
- }
673
- }
674
- display.cancelTouch = draggable ? true : false;
675
- }
676
- if (this.isDirty("tooltipText") || this.isDirty("tooltipHTML") || this.isDirty("showTooltipOn")) {
677
- var tooltipText = this.get("tooltipText");
678
- var tooltipHTML = this.get("tooltipHTML");
679
- var showTooltipOn = this.get("showTooltipOn", "hover");
680
- if (this._tooltipDp) {
681
- this._tooltipDp.dispose();
682
- this._tooltipDp = undefined;
683
- }
684
- if (tooltipText || tooltipHTML) {
685
- if (showTooltipOn == "click") {
686
- this._tooltipDp = new MultiDisposer([
687
- events.on("click", function () {
688
- _this.setTimeout(function () { return _this.showTooltip(); }, 10);
689
- }),
690
- $utils.addEventListener(document, "click", function (_ev) {
691
- _this.hideTooltip();
692
- })
693
- ]);
694
- }
695
- else if (showTooltipOn == "always") {
696
- // nothing
697
- }
698
- else {
699
- this._tooltipDp = new MultiDisposer([
700
- events.on("pointerover", function () {
701
- _this.showTooltip();
702
- }),
703
- events.on("pointerout", function () {
704
- _this.hideTooltip();
705
- })
706
- ]);
519
+ if (!this.isHidden()) {
520
+ this.states.applyAnimate("default");
707
521
  }
522
+ this.set("ariaChecked", false);
708
523
  }
524
+ this.markDirtyAccessibility();
709
525
  }
710
- if (this.isDirty("toggleKey")) {
711
- var toggleKey_1 = this.get("toggleKey");
712
- if (toggleKey_1 && toggleKey_1 != "none") {
713
- this._toggleDp = events.on("click", function () {
714
- if (!_this._isDragging) {
715
- _this.set(toggleKey_1, !_this.get(toggleKey_1));
716
- }
717
- });
526
+ if (this.isDirty("disabled")) {
527
+ if (this.get("disabled")) {
528
+ this.states.applyAnimate("disabled");
529
+ this.set("ariaChecked", false);
718
530
  }
719
531
  else {
720
- if (this._toggleDp) {
721
- this._toggleDp.dispose();
722
- this._toggleDp = undefined;
532
+ if (!this.isHidden()) {
533
+ this.states.applyAnimate("default");
723
534
  }
535
+ this.set("ariaChecked", true);
724
536
  }
537
+ this.markDirtyAccessibility();
725
538
  }
726
- if (this.isDirty("opacity")) {
727
- display.alpha = Math.max(0, this.get("opacity", 1));
728
- }
729
- if (this.isDirty("rotation")) {
730
- this.markDirtyBounds();
731
- display.angle = this.get("rotation", 0);
732
- }
733
- if (this.isDirty("scale")) {
734
- this.markDirtyBounds();
735
- display.scale = this.get("scale", 0);
736
- }
737
- if (this.isDirty("centerX") || this.isDirty("centerY")) {
738
- this.markDirtyBounds();
739
- this.updatePivotPoint();
539
+ this._statesHandled = true;
540
+ }
541
+ }
542
+ _changed() {
543
+ super._changed();
544
+ const display = this._display;
545
+ const events = this.events;
546
+ if (this.isDirty("draggable")) {
547
+ const draggable = this.get("draggable");
548
+ if (draggable) {
549
+ this.set("interactive", true);
550
+ this._dragDp = new MultiDisposer([
551
+ events.on("pointerdown", (ev) => {
552
+ this.dragStart(ev);
553
+ }),
554
+ events.on("globalpointermove", (ev) => {
555
+ this.dragMove(ev);
556
+ }),
557
+ events.on("globalpointerup", (ev) => {
558
+ this.dragStop(ev);
559
+ })
560
+ ]);
740
561
  }
741
- if (this.isDirty("visible") || this.isPrivateDirty("visible") || this.isDirty("forceHidden")) {
742
- if (!this.get("visible") || !this.getPrivate("visible") || this.get("forceHidden")) {
743
- display.visible = false;
744
- this.hideTooltip();
562
+ else {
563
+ if (this._dragDp) {
564
+ this._dragDp.dispose();
565
+ this._dragDp = undefined;
566
+ }
567
+ }
568
+ display.cancelTouch = draggable ? true : false;
569
+ }
570
+ if (this.isDirty("tooltipText") || this.isDirty("tooltipHTML") || this.isDirty("showTooltipOn")) {
571
+ const tooltipText = this.get("tooltipText");
572
+ const tooltipHTML = this.get("tooltipHTML");
573
+ const showTooltipOn = this.get("showTooltipOn", "hover");
574
+ if (this._tooltipDp) {
575
+ this._tooltipDp.dispose();
576
+ this._tooltipDp = undefined;
577
+ }
578
+ if (tooltipText || tooltipHTML) {
579
+ if (showTooltipOn == "click") {
580
+ this._tooltipDp = new MultiDisposer([
581
+ events.on("click", () => {
582
+ this.setTimeout(() => this.showTooltip(), 10);
583
+ }),
584
+ $utils.addEventListener(document, "click", (_ev) => {
585
+ this.hideTooltip();
586
+ })
587
+ ]);
745
588
  }
746
- else {
747
- display.visible = true;
589
+ else if (showTooltipOn == "always") {
590
+ // nothing
748
591
  }
749
- this.markDirtyBounds();
750
- if (this.get("focusable")) {
751
- this.markDirtyAccessibility();
592
+ else {
593
+ this._tooltipDp = new MultiDisposer([
594
+ events.on("pointerover", () => {
595
+ this.showTooltip();
596
+ }),
597
+ events.on("pointerout", () => {
598
+ this.hideTooltip();
599
+ })
600
+ ]);
752
601
  }
753
602
  }
754
- if (this.isDirty("width") || this.isDirty("height")) {
755
- this.markDirtyBounds();
756
- this._addPercentageSizeChildren();
757
- var parent_2 = this.parent;
758
- if (parent_2) {
759
- if ((this.isDirty("width") && this.get("width") instanceof Percent) || (this.isDirty("height") && this.get("height") instanceof Percent)) {
760
- parent_2.markDirty();
761
- parent_2._prevWidth = 0;
603
+ }
604
+ if (this.isDirty("toggleKey")) {
605
+ let toggleKey = this.get("toggleKey");
606
+ if (toggleKey && toggleKey != "none") {
607
+ this._toggleDp = events.on("click", () => {
608
+ if (!this._isDragging) {
609
+ this.set(toggleKey, !this.get(toggleKey));
762
610
  }
611
+ });
612
+ }
613
+ else {
614
+ if (this._toggleDp) {
615
+ this._toggleDp.dispose();
616
+ this._toggleDp = undefined;
763
617
  }
764
- this._sizeDirty = true;
765
618
  }
766
- if (this.isDirty("maxWidth") || this.isDirty("maxHeight") || this.isPrivateDirty("width") || this.isPrivateDirty("height") || this.isDirty("minWidth") || this.isDirty("minHeight") || this.isPrivateDirty("maxWidth") || this.isPrivateDirty("maxHeight") || this.isPrivateDirty("minWidth") || this.isPrivateDirty("minHeight")) {
767
- this.markDirtyBounds();
768
- this._sizeDirty = true;
619
+ }
620
+ if (this.isDirty("opacity")) {
621
+ display.alpha = Math.max(0, this.get("opacity", 1));
622
+ }
623
+ if (this.isDirty("rotation")) {
624
+ this.markDirtyBounds();
625
+ display.angle = this.get("rotation", 0);
626
+ }
627
+ if (this.isDirty("scale")) {
628
+ this.markDirtyBounds();
629
+ display.scale = this.get("scale", 0);
630
+ }
631
+ if (this.isDirty("centerX") || this.isDirty("centerY")) {
632
+ this.markDirtyBounds();
633
+ this.updatePivotPoint();
634
+ }
635
+ if (this.isDirty("visible") || this.isPrivateDirty("visible") || this.isDirty("forceHidden")) {
636
+ if (!this.get("visible") || !this.getPrivate("visible") || this.get("forceHidden")) {
637
+ display.visible = false;
638
+ this.hideTooltip();
769
639
  }
770
- if (this._sizeDirty) {
771
- this._updateSize();
640
+ else {
641
+ display.visible = true;
772
642
  }
773
- if (this.isDirty("wheelable")) {
774
- var wheelable = this.get("wheelable");
775
- if (wheelable) {
776
- this.set("interactive", true);
777
- }
778
- display.wheelable = wheelable ? true : false;
643
+ this.markDirtyBounds();
644
+ if (this.get("focusable")) {
645
+ this.markDirtyAccessibility();
779
646
  }
780
- // Accessibility
781
- if (this.isDirty("tabindexOrder") || this.isDirty("focusableGroup")) {
782
- if (this.get("focusable")) {
783
- this._root._registerTabindexOrder(this);
784
- }
785
- else {
786
- this._root._unregisterTabindexOrder(this);
647
+ }
648
+ if (this.isDirty("width") || this.isDirty("height")) {
649
+ this.markDirtyBounds();
650
+ this._addPercentageSizeChildren();
651
+ const parent = this.parent;
652
+ if (parent) {
653
+ if ((this.isDirty("width") && this.get("width") instanceof Percent) || (this.isDirty("height") && this.get("height") instanceof Percent)) {
654
+ parent.markDirty();
655
+ parent._prevWidth = 0;
787
656
  }
788
657
  }
789
- if (this.isDirty("filter")) {
790
- //this.markDirtyBounds();
791
- display.filter = this.get("filter");
658
+ this._sizeDirty = true;
659
+ }
660
+ if (this.isDirty("maxWidth") || this.isDirty("maxHeight") || this.isPrivateDirty("width") || this.isPrivateDirty("height") || this.isDirty("minWidth") || this.isDirty("minHeight") || this.isPrivateDirty("maxWidth") || this.isPrivateDirty("maxHeight") || this.isPrivateDirty("minWidth") || this.isPrivateDirty("minHeight")) {
661
+ this.markDirtyBounds();
662
+ this._sizeDirty = true;
663
+ }
664
+ if (this._sizeDirty) {
665
+ this._updateSize();
666
+ }
667
+ if (this.isDirty("wheelable")) {
668
+ const wheelable = this.get("wheelable");
669
+ if (wheelable) {
670
+ this.set("interactive", true);
792
671
  }
793
- if (this.isDirty("cursorOverStyle")) {
794
- display.cursorOverStyle = this.get("cursorOverStyle");
672
+ display.wheelable = wheelable ? true : false;
673
+ }
674
+ // Accessibility
675
+ if (this.isDirty("tabindexOrder") || this.isDirty("focusableGroup")) {
676
+ if (this.get("focusable")) {
677
+ this._root._registerTabindexOrder(this);
795
678
  }
796
- if (this.isDirty("hoverOnFocus")) {
797
- if (this.get("hoverOnFocus")) {
798
- this._focusDp = new MultiDisposer([
799
- events.on("focus", function () {
800
- // TODO: proper hover, not just tooltip
801
- _this.showTooltip();
802
- }),
803
- events.on("blur", function () {
804
- // TODO: proper hover, not just tooltip
805
- _this.hideTooltip();
806
- })
807
- ]);
808
- }
809
- else {
810
- if (this._focusDp) {
811
- this._focusDp.dispose();
812
- this._focusDp = undefined;
813
- }
814
- }
679
+ else {
680
+ this._root._unregisterTabindexOrder(this);
681
+ }
682
+ }
683
+ if (this.isDirty("filter")) {
684
+ //this.markDirtyBounds();
685
+ display.filter = this.get("filter");
686
+ }
687
+ if (this.isDirty("cursorOverStyle")) {
688
+ display.cursorOverStyle = this.get("cursorOverStyle");
689
+ }
690
+ if (this.isDirty("hoverOnFocus")) {
691
+ if (this.get("hoverOnFocus")) {
692
+ this._focusDp = new MultiDisposer([
693
+ events.on("focus", () => {
694
+ // TODO: proper hover, not just tooltip
695
+ this.showTooltip();
696
+ }),
697
+ events.on("blur", () => {
698
+ // TODO: proper hover, not just tooltip
699
+ this.hideTooltip();
700
+ })
701
+ ]);
815
702
  }
816
- if (this.isDirty("focusable")) {
817
- if (this.get("focusable")) {
818
- this._root._registerTabindexOrder(this);
819
- }
820
- else {
821
- this._root._unregisterTabindexOrder(this);
703
+ else {
704
+ if (this._focusDp) {
705
+ this._focusDp.dispose();
706
+ this._focusDp = undefined;
822
707
  }
823
- this.markDirtyAccessibility();
824
708
  }
825
- if (this.isDirty("role") || this.isDirty("ariaLive") || this.isDirty("ariaChecked") || this.isDirty("ariaHidden") || this.isDirty("ariaOrientation") || this.isDirty("ariaValueNow") || this.isDirty("ariaValueMin") || this.isDirty("ariaValueMax") || this.isDirty("ariaValueText") || this.isDirty("ariaLabel") || this.isDirty("ariaControls")) {
826
- // display.accessibility.ariaLabel = populateString(this, this.get("ariaLabel", ""));
827
- // @todo make sure ariaLabel gets populated in Root
828
- this.markDirtyAccessibility();
709
+ }
710
+ if (this.isDirty("focusable")) {
711
+ if (this.get("focusable")) {
712
+ this._root._registerTabindexOrder(this);
829
713
  }
830
- if (this.isDirty("exportable")) {
831
- display.exportable = this.get("exportable");
832
- }
833
- if (this.isDirty("interactive")) {
834
- var events_1 = this.events;
835
- if (this.get("interactive")) {
836
- this._hoverDp = new MultiDisposer([
837
- events_1.on("click", function (ev) {
838
- if ($utils.isTouchEvent(ev.originalEvent)) {
839
- if (!_this.getPrivate("touchHovering")) {
840
- _this.setTimeout(function () {
841
- _this._handleOver();
842
- if (_this.get("tooltipText") || _this.get("tooltipHTML")) {
843
- _this.showTooltip();
844
- }
845
- _this.setPrivateRaw("touchHovering", true);
846
- _this.events.dispatch("pointerover", {
847
- type: "pointerover",
848
- target: ev.target,
849
- originalEvent: ev.originalEvent,
850
- point: ev.point,
851
- simulated: ev.simulated
852
- });
853
- }, 10);
854
- }
855
- }
856
- }),
857
- events_1.on("globalpointerup", function (ev) {
858
- if ($utils.isTouchEvent(ev.originalEvent)) {
859
- if (_this.getPrivate("touchHovering")) {
860
- _this._handleOut();
861
- if (_this.get("tooltipText") || _this.get("tooltipHTML")) {
862
- _this.hideTooltip();
714
+ else {
715
+ this._root._unregisterTabindexOrder(this);
716
+ }
717
+ this.markDirtyAccessibility();
718
+ }
719
+ if (this.isDirty("role") || this.isDirty("ariaLive") || this.isDirty("ariaChecked") || this.isDirty("ariaHidden") || this.isDirty("ariaOrientation") || this.isDirty("ariaValueNow") || this.isDirty("ariaValueMin") || this.isDirty("ariaValueMax") || this.isDirty("ariaValueText") || this.isDirty("ariaLabel") || this.isDirty("ariaControls")) {
720
+ // display.accessibility.ariaLabel = populateString(this, this.get("ariaLabel", ""));
721
+ // @todo make sure ariaLabel gets populated in Root
722
+ this.markDirtyAccessibility();
723
+ }
724
+ if (this.isDirty("exportable")) {
725
+ display.exportable = this.get("exportable");
726
+ }
727
+ if (this.isDirty("interactive")) {
728
+ const events = this.events;
729
+ if (this.get("interactive")) {
730
+ this._hoverDp = new MultiDisposer([
731
+ events.on("click", (ev) => {
732
+ if ($utils.isTouchEvent(ev.originalEvent)) {
733
+ if (!this.getPrivate("touchHovering")) {
734
+ this.setTimeout(() => {
735
+ this._handleOver();
736
+ if (this.get("tooltipText") || this.get("tooltipHTML")) {
737
+ this.showTooltip();
863
738
  }
864
- }
865
- _this.setPrivateRaw("touchHovering", false);
866
- _this.events.dispatch("pointerout", {
867
- type: "pointerout",
868
- target: ev.target,
869
- originalEvent: ev.originalEvent,
870
- point: ev.point,
871
- simulated: ev.simulated
872
- });
739
+ this.setPrivateRaw("touchHovering", true);
740
+ this.events.dispatch("pointerover", {
741
+ type: "pointerover",
742
+ target: ev.target,
743
+ originalEvent: ev.originalEvent,
744
+ point: ev.point,
745
+ simulated: ev.simulated
746
+ });
747
+ }, 10);
873
748
  }
874
- if (_this._isDown) {
875
- _this._handleUp(ev);
749
+ }
750
+ }),
751
+ events.on("globalpointerup", (ev) => {
752
+ if ($utils.isTouchEvent(ev.originalEvent)) {
753
+ if (this.getPrivate("touchHovering")) {
754
+ this._handleOut();
755
+ if (this.get("tooltipText") || this.get("tooltipHTML")) {
756
+ this.hideTooltip();
757
+ }
876
758
  }
877
- //this._isDown = false;
878
- }),
879
- events_1.on("pointerover", function () {
880
- _this._handleOver();
881
- }),
882
- events_1.on("pointerout", function () {
883
- _this._handleOut();
884
- }),
885
- events_1.on("pointerdown", function (e) {
886
- _this._handleDown(e);
887
- })
888
- ]);
889
- }
890
- else {
891
- this._display.interactive = false;
892
- if (this._hoverDp) {
893
- this._hoverDp.dispose();
894
- this._hoverDp = undefined;
895
- }
896
- }
897
- }
898
- if (this.isDirty("forceInactive")) {
899
- this._display.inactive = this.get("forceInactive", false);
759
+ this.setPrivateRaw("touchHovering", false);
760
+ this.events.dispatch("pointerout", {
761
+ type: "pointerout",
762
+ target: ev.target,
763
+ originalEvent: ev.originalEvent,
764
+ point: ev.point,
765
+ simulated: ev.simulated
766
+ });
767
+ }
768
+ if (this._isDown) {
769
+ this._handleUp(ev);
770
+ }
771
+ //this._isDown = false;
772
+ }),
773
+ events.on("pointerover", () => {
774
+ this._handleOver();
775
+ }),
776
+ events.on("pointerout", () => {
777
+ this._handleOut();
778
+ }),
779
+ events.on("pointerdown", (e) => {
780
+ this._handleDown(e);
781
+ })
782
+ ]);
900
783
  }
901
- if (this.get("showTooltipOn") == "always" && this._display.visible) {
902
- this.showTooltip();
784
+ else {
785
+ this._display.interactive = false;
786
+ if (this._hoverDp) {
787
+ this._hoverDp.dispose();
788
+ this._hoverDp = undefined;
789
+ }
903
790
  }
904
791
  }
905
- });
792
+ if (this.isDirty("forceInactive")) {
793
+ this._display.inactive = this.get("forceInactive", false);
794
+ }
795
+ if (this.get("showTooltipOn") == "always" && this._display.visible) {
796
+ this.showTooltip();
797
+ }
798
+ }
906
799
  /**
907
800
  * @ignore
908
801
  * @todo should this be user-accessible?
909
802
  */
910
- Object.defineProperty(Sprite.prototype, "dragStart", {
911
- enumerable: false,
912
- configurable: true,
913
- writable: true,
914
- value: function (e) {
915
- this._dragEvent = e;
916
- this.events.stopParentDispatch();
917
- }
918
- });
803
+ dragStart(e) {
804
+ this._dragEvent = e;
805
+ this.events.stopParentDispatch();
806
+ }
919
807
  /**
920
808
  * @ignore
921
809
  * @todo should this be user-accessible?
922
810
  */
923
- Object.defineProperty(Sprite.prototype, "dragStop", {
924
- enumerable: false,
925
- configurable: true,
926
- writable: true,
927
- value: function (e) {
928
- this._dragEvent = undefined;
929
- this._dragPoint = undefined;
930
- this.events.stopParentDispatch();
931
- if (this._isDragging) {
932
- this._isDragging = false;
933
- var type = "dragstop";
934
- if (this.events.isEnabled(type)) {
935
- this.events.dispatch(type, {
936
- type: type,
937
- target: this,
938
- originalEvent: e.originalEvent,
939
- point: e.point,
940
- simulated: e.simulated,
941
- });
942
- }
811
+ dragStop(e) {
812
+ this._dragEvent = undefined;
813
+ this._dragPoint = undefined;
814
+ this.events.stopParentDispatch();
815
+ if (this._isDragging) {
816
+ this._isDragging = false;
817
+ const type = "dragstop";
818
+ if (this.events.isEnabled(type)) {
819
+ this.events.dispatch(type, {
820
+ type: type,
821
+ target: this,
822
+ originalEvent: e.originalEvent,
823
+ point: e.point,
824
+ simulated: e.simulated,
825
+ });
943
826
  }
944
827
  }
945
- });
946
- Object.defineProperty(Sprite.prototype, "_handleOver", {
947
- enumerable: false,
948
- configurable: true,
949
- writable: true,
950
- value: function () {
951
- if (!this.isHidden()) {
952
- if (this.get("active") && this.states.lookup("hoverActive")) {
953
- this.states.applyAnimate("hoverActive");
954
- }
955
- else if (this.get("disabled") && this.states.lookup("hoverDisabled")) {
956
- this.states.applyAnimate("hoverDisabled");
957
- }
958
- else {
959
- this.states.applyAnimate("hover");
960
- }
828
+ }
829
+ _handleOver() {
830
+ if (!this.isHidden()) {
831
+ if (this.get("active") && this.states.lookup("hoverActive")) {
832
+ this.states.applyAnimate("hoverActive");
833
+ }
834
+ else if (this.get("disabled") && this.states.lookup("hoverDisabled")) {
835
+ this.states.applyAnimate("hoverDisabled");
836
+ }
837
+ else {
838
+ this.states.applyAnimate("hover");
961
839
  }
962
840
  }
963
- });
964
- Object.defineProperty(Sprite.prototype, "_handleOut", {
965
- enumerable: false,
966
- configurable: true,
967
- writable: true,
968
- value: function () {
969
- if (!this.isHidden()) {
970
- if (this.get("active") && this.states.lookup("active")) {
971
- this.states.applyAnimate("active");
972
- }
973
- else if (this.get("disabled") && this.states.lookup("disabled")) {
974
- this.states.applyAnimate("disabled");
975
- }
976
- else {
977
- if (this.states.lookup("hover") || this.states.lookup("hoverActive")) {
978
- this.states.applyAnimate("default");
979
- }
841
+ }
842
+ _handleOut() {
843
+ if (!this.isHidden()) {
844
+ if (this.get("active") && this.states.lookup("active")) {
845
+ this.states.applyAnimate("active");
846
+ }
847
+ else if (this.get("disabled") && this.states.lookup("disabled")) {
848
+ this.states.applyAnimate("disabled");
849
+ }
850
+ else {
851
+ if (this.states.lookup("hover") || this.states.lookup("hoverActive")) {
852
+ this.states.applyAnimate("default");
980
853
  }
981
854
  }
982
855
  }
983
- });
984
- Object.defineProperty(Sprite.prototype, "_handleUp", {
985
- enumerable: false,
986
- configurable: true,
987
- writable: true,
988
- value: function (e) {
989
- if (!this.isHidden()) {
990
- if (this.get("active") && this.states.lookup("active")) {
991
- this.states.applyAnimate("active");
992
- }
993
- else if (this.get("disabled") && this.states.lookup("disabled")) {
994
- this.states.applyAnimate("disabled");
995
- }
996
- else if (this.states.lookup("down")) {
997
- if (this.isHover()) {
998
- this.states.applyAnimate("hover");
999
- }
1000
- else {
1001
- this.states.applyAnimate("default");
1002
- }
856
+ }
857
+ _handleUp(e) {
858
+ if (!this.isHidden()) {
859
+ if (this.get("active") && this.states.lookup("active")) {
860
+ this.states.applyAnimate("active");
861
+ }
862
+ else if (this.get("disabled") && this.states.lookup("disabled")) {
863
+ this.states.applyAnimate("disabled");
864
+ }
865
+ else if (this.states.lookup("down")) {
866
+ if (this.isHover()) {
867
+ this.states.applyAnimate("hover");
1003
868
  }
1004
- // @todo remove this once migrated to _downPoints
1005
- this._downPoint = undefined;
1006
- var pointerId = $utils.getPointerId(e.originalEvent);
1007
- delete this._downPoints[pointerId];
1008
- if ($object.keys(this._downPoints).length == 0) {
1009
- this._isDown = false;
869
+ else {
870
+ this.states.applyAnimate("default");
1010
871
  }
1011
872
  }
1012
- }
1013
- });
1014
- Object.defineProperty(Sprite.prototype, "_hasMoved", {
1015
- enumerable: false,
1016
- configurable: true,
1017
- writable: true,
1018
- value: function (e) {
1019
873
  // @todo remove this once migrated to _downPoints
1020
- // if (this._downPoint) {
1021
- // const x = Math.abs(this._downPoint.x - e.point.x);
1022
- // const y = Math.abs(this._downPoint.y - e.point.y);
1023
- // return (x > 5) || (y > 5);
1024
- // }
1025
- var pointerId = $utils.getPointerId(e.originalEvent);
1026
- var downPoint = this._downPoints[pointerId];
1027
- if (downPoint) {
1028
- var x = Math.abs(downPoint.x - e.point.x);
1029
- var y = Math.abs(downPoint.y - e.point.y);
1030
- return (x > 5) || (y > 5);
1031
- }
1032
- return false;
1033
- }
1034
- });
1035
- Object.defineProperty(Sprite.prototype, "_hasDown", {
1036
- enumerable: false,
1037
- configurable: true,
1038
- writable: true,
1039
- value: function () {
1040
- return $object.keys(this._downPoints).length > 0;
1041
- }
1042
- });
1043
- Object.defineProperty(Sprite.prototype, "_handleDown", {
1044
- enumerable: false,
1045
- configurable: true,
1046
- writable: true,
1047
- value: function (e) {
1048
- var parent = this.parent;
1049
- if (parent && !this.get("draggable")) {
1050
- parent._handleDown(e);
1051
- }
1052
- if (this.get("interactive") && !this.isHidden()) {
1053
- if (this.states.lookup("down")) {
1054
- this.states.applyAnimate("down");
1055
- }
1056
- this._downPoint = {
1057
- x: e.point.x,
1058
- y: e.point.y
1059
- };
1060
- // @todo remove this once migrated to _downPoints
1061
- this._isDown = true;
1062
- var pointerId = $utils.getPointerId(e.originalEvent);
1063
- this._downPoints[pointerId] = {
1064
- x: e.point.x,
1065
- y: e.point.y
1066
- };
874
+ this._downPoint = undefined;
875
+ const pointerId = $utils.getPointerId(e.originalEvent);
876
+ delete this._downPoints[pointerId];
877
+ if ($object.keys(this._downPoints).length == 0) {
878
+ this._isDown = false;
1067
879
  }
1068
880
  }
1069
- });
881
+ }
882
+ _hasMoved(e) {
883
+ // @todo remove this once migrated to _downPoints
884
+ // if (this._downPoint) {
885
+ // const x = Math.abs(this._downPoint.x - e.point.x);
886
+ // const y = Math.abs(this._downPoint.y - e.point.y);
887
+ // return (x > 5) || (y > 5);
888
+ // }
889
+ const pointerId = $utils.getPointerId(e.originalEvent);
890
+ const downPoint = this._downPoints[pointerId];
891
+ if (downPoint) {
892
+ const x = Math.abs(downPoint.x - e.point.x);
893
+ const y = Math.abs(downPoint.y - e.point.y);
894
+ return (x > 5) || (y > 5);
895
+ }
896
+ return false;
897
+ }
898
+ _hasDown() {
899
+ return $object.keys(this._downPoints).length > 0;
900
+ }
901
+ _handleDown(e) {
902
+ const parent = this.parent;
903
+ if (parent && !this.get("draggable")) {
904
+ parent._handleDown(e);
905
+ }
906
+ if (this.get("interactive") && !this.isHidden()) {
907
+ if (this.states.lookup("down")) {
908
+ this.states.applyAnimate("down");
909
+ }
910
+ this._downPoint = {
911
+ x: e.point.x,
912
+ y: e.point.y
913
+ };
914
+ // @todo remove this once migrated to _downPoints
915
+ this._isDown = true;
916
+ const pointerId = $utils.getPointerId(e.originalEvent);
917
+ this._downPoints[pointerId] = {
918
+ x: e.point.x,
919
+ y: e.point.y
920
+ };
921
+ }
922
+ }
1070
923
  /**
1071
924
  * @ignore
1072
925
  * @todo should this be user-accessible?
1073
926
  */
1074
- Object.defineProperty(Sprite.prototype, "dragMove", {
1075
- enumerable: false,
1076
- configurable: true,
1077
- writable: true,
1078
- value: function (e) {
1079
- var dragEvent = this._dragEvent;
1080
- if (dragEvent) {
1081
- if (dragEvent.simulated && !e.simulated) {
1082
- return true;
927
+ dragMove(e) {
928
+ let dragEvent = this._dragEvent;
929
+ if (dragEvent) {
930
+ if (dragEvent.simulated && !e.simulated) {
931
+ return true;
932
+ }
933
+ let angle = 0;
934
+ let parent = this.parent;
935
+ while (parent != null) {
936
+ angle += parent.get("rotation", 0);
937
+ parent = parent.parent;
938
+ }
939
+ let x = e.point.x - dragEvent.point.x;
940
+ let y = e.point.y - dragEvent.point.y;
941
+ const events = this.events;
942
+ if (dragEvent.simulated && !this._isDragging) {
943
+ this._isDragging = true;
944
+ this._dragEvent = e;
945
+ this._dragPoint = {
946
+ x: this.x(),
947
+ y: this.y()
948
+ };
949
+ const type = "dragstart";
950
+ if (events.isEnabled(type)) {
951
+ events.dispatch(type, {
952
+ type: type,
953
+ target: this,
954
+ originalEvent: e.originalEvent,
955
+ point: e.point,
956
+ simulated: e.simulated,
957
+ });
1083
958
  }
1084
- var angle = 0;
1085
- var parent_3 = this.parent;
1086
- while (parent_3 != null) {
1087
- angle += parent_3.get("rotation", 0);
1088
- parent_3 = parent_3.parent;
959
+ }
960
+ if (this._isDragging) {
961
+ let dragPoint = this._dragPoint;
962
+ this.set("x", dragPoint.x + x * $math.cos(angle) + y * $math.sin(angle));
963
+ this.set("y", dragPoint.y + y * $math.cos(angle) - x * $math.sin(angle));
964
+ const type = "dragged";
965
+ if (events.isEnabled(type)) {
966
+ events.dispatch(type, {
967
+ type: type,
968
+ target: this,
969
+ originalEvent: e.originalEvent,
970
+ point: e.point,
971
+ simulated: e.simulated,
972
+ });
1089
973
  }
1090
- var x = e.point.x - dragEvent.point.x;
1091
- var y = e.point.y - dragEvent.point.y;
1092
- var events = this.events;
1093
- if (dragEvent.simulated && !this._isDragging) {
974
+ }
975
+ else {
976
+ if (Math.hypot(x, y) > 5) {
1094
977
  this._isDragging = true;
1095
978
  this._dragEvent = e;
1096
979
  this._dragPoint = {
1097
980
  x: this.x(),
1098
981
  y: this.y()
1099
982
  };
1100
- var type = "dragstart";
1101
- if (events.isEnabled(type)) {
1102
- events.dispatch(type, {
1103
- type: type,
1104
- target: this,
1105
- originalEvent: e.originalEvent,
1106
- point: e.point,
1107
- simulated: e.simulated,
1108
- });
1109
- }
1110
- }
1111
- if (this._isDragging) {
1112
- var dragPoint = this._dragPoint;
1113
- this.set("x", dragPoint.x + x * $math.cos(angle) + y * $math.sin(angle));
1114
- this.set("y", dragPoint.y + y * $math.cos(angle) - x * $math.sin(angle));
1115
- var type = "dragged";
983
+ const type = "dragstart";
1116
984
  if (events.isEnabled(type)) {
1117
985
  events.dispatch(type, {
1118
986
  type: type,
1119
987
  target: this,
1120
988
  originalEvent: e.originalEvent,
1121
989
  point: e.point,
1122
- simulated: e.simulated,
990
+ simulated: e.simulated
1123
991
  });
1124
992
  }
1125
993
  }
1126
- else {
1127
- if (Math.hypot(x, y) > 5) {
1128
- this._isDragging = true;
1129
- this._dragEvent = e;
1130
- this._dragPoint = {
1131
- x: this.x(),
1132
- y: this.y()
1133
- };
1134
- var type = "dragstart";
1135
- if (events.isEnabled(type)) {
1136
- events.dispatch(type, {
1137
- type: type,
1138
- target: this,
1139
- originalEvent: e.originalEvent,
1140
- point: e.point,
1141
- simulated: e.simulated
1142
- });
1143
- }
1144
- }
1145
- }
1146
- }
1147
- }
1148
- });
1149
- Object.defineProperty(Sprite.prototype, "_updateSize", {
1150
- enumerable: false,
1151
- configurable: true,
1152
- writable: true,
1153
- value: function () {
1154
- }
1155
- });
1156
- Object.defineProperty(Sprite.prototype, "_getBounds", {
1157
- enumerable: false,
1158
- configurable: true,
1159
- writable: true,
1160
- value: function () {
1161
- this._localBounds = this._display.getLocalBounds();
994
+ }
1162
995
  }
1163
- });
996
+ }
997
+ _updateSize() {
998
+ }
999
+ _getBounds() {
1000
+ this._localBounds = this._display.getLocalBounds();
1001
+ }
1164
1002
  /**
1165
1003
  * Returns depth (how deep in the hierachy of the content tree) of this
1166
1004
  * element.
1167
1005
  *
1168
1006
  * @return Depth
1169
1007
  */
1170
- Object.defineProperty(Sprite.prototype, "depth", {
1171
- enumerable: false,
1172
- configurable: true,
1173
- writable: true,
1174
- value: function () {
1175
- var self = this.parent;
1176
- var depth = 0;
1177
- while (true) {
1178
- if (self) {
1179
- ++depth;
1180
- self = self.parent;
1181
- }
1182
- else {
1183
- return depth;
1184
- }
1008
+ depth() {
1009
+ let self = this.parent;
1010
+ let depth = 0;
1011
+ while (true) {
1012
+ if (self) {
1013
+ ++depth;
1014
+ self = self.parent;
1015
+ }
1016
+ else {
1017
+ return depth;
1185
1018
  }
1186
1019
  }
1187
- });
1020
+ }
1188
1021
  /**
1189
1022
  * @ignore
1190
1023
  */
1191
- Object.defineProperty(Sprite.prototype, "markDirtySize", {
1192
- enumerable: false,
1193
- configurable: true,
1194
- writable: true,
1195
- value: function () {
1196
- this._sizeDirty = true;
1197
- this.markDirty();
1198
- }
1199
- });
1024
+ markDirtySize() {
1025
+ this._sizeDirty = true;
1026
+ this.markDirty();
1027
+ }
1200
1028
  /**
1201
1029
  * @ignore
1202
1030
  */
1203
- Object.defineProperty(Sprite.prototype, "markDirtyBounds", {
1204
- enumerable: false,
1205
- configurable: true,
1206
- writable: true,
1207
- value: function () {
1208
- var display = this._display;
1209
- if (this.get("isMeasured")) {
1210
- this._root._addDirtyBounds(this);
1211
- display.isMeasured = true;
1212
- display.invalidateBounds();
1213
- var parent_4 = this.parent;
1214
- if (parent_4 && this.get("position") != "absolute") {
1215
- if (parent_4.get("width") == null || parent_4.get("height") == null || parent_4.get("layout")) {
1216
- parent_4.markDirtyBounds();
1217
- }
1218
- }
1219
- if (this.get("focusable") && this.isFocus()) {
1220
- this.markDirtyAccessibility();
1221
- }
1031
+ markDirtyBounds() {
1032
+ const display = this._display;
1033
+ if (this.get("isMeasured")) {
1034
+ this._root._addDirtyBounds(this);
1035
+ display.isMeasured = true;
1036
+ display.invalidateBounds();
1037
+ const parent = this.parent;
1038
+ if (parent && this.get("position") != "absolute") {
1039
+ if (parent.get("width") == null || parent.get("height") == null || parent.get("layout")) {
1040
+ parent.markDirtyBounds();
1041
+ }
1042
+ }
1043
+ if (this.get("focusable") && this.isFocus()) {
1044
+ this.markDirtyAccessibility();
1222
1045
  }
1223
1046
  }
1224
- });
1047
+ }
1225
1048
  /**
1226
1049
  * @ignore
1227
1050
  */
1228
- Object.defineProperty(Sprite.prototype, "markDirtyAccessibility", {
1229
- enumerable: false,
1230
- configurable: true,
1231
- writable: true,
1232
- value: function () {
1233
- //if (this._root.focused(this)) {
1234
- this._root._invalidateAccessibility(this);
1235
- //}
1236
- }
1237
- });
1051
+ markDirtyAccessibility() {
1052
+ //if (this._root.focused(this)) {
1053
+ this._root._invalidateAccessibility(this);
1054
+ //}
1055
+ }
1238
1056
  /**
1239
1057
  * @ignore
1240
1058
  */
1241
- Object.defineProperty(Sprite.prototype, "markDirtyLayer", {
1242
- enumerable: false,
1243
- configurable: true,
1244
- writable: true,
1245
- value: function () {
1246
- //this._display.markDirtyLayer(this.isDirty("opacity") || this.isDirty("visible")); https://codepen.io/team/amcharts/pen/gOWZPmP <- problems
1247
- this._display.markDirtyLayer(true);
1248
- }
1249
- });
1059
+ markDirtyLayer() {
1060
+ //this._display.markDirtyLayer(this.isDirty("opacity") || this.isDirty("visible")); https://codepen.io/team/amcharts/pen/gOWZPmP <- problems
1061
+ this._display.markDirtyLayer(true);
1062
+ }
1250
1063
  /**
1251
1064
  * @ignore
1252
1065
  */
1253
- Object.defineProperty(Sprite.prototype, "markDirty", {
1254
- enumerable: false,
1255
- configurable: true,
1256
- writable: true,
1257
- value: function () {
1258
- _super.prototype.markDirty.call(this);
1259
- this.markDirtyLayer();
1260
- }
1261
- });
1262
- Object.defineProperty(Sprite.prototype, "_updateBounds", {
1263
- enumerable: false,
1264
- configurable: true,
1265
- writable: true,
1266
- value: function () {
1267
- var oldBounds = this._adjustedLocalBounds;
1268
- var newBounds;
1269
- // if display.visible == false, it still returns bounds
1270
- if (!this.get("visible") || !this.getPrivate("visible") || this.get("forceHidden")) {
1271
- newBounds = {
1272
- left: 0,
1273
- right: 0,
1274
- top: 0,
1275
- bottom: 0
1276
- };
1277
- this._localBounds = newBounds;
1278
- this._adjustedLocalBounds = newBounds;
1066
+ markDirty() {
1067
+ super.markDirty();
1068
+ this.markDirtyLayer();
1069
+ }
1070
+ _updateBounds() {
1071
+ const oldBounds = this._adjustedLocalBounds;
1072
+ let newBounds;
1073
+ // if display.visible == false, it still returns bounds
1074
+ if (!this.get("visible") || !this.getPrivate("visible") || this.get("forceHidden")) {
1075
+ newBounds = {
1076
+ left: 0,
1077
+ right: 0,
1078
+ top: 0,
1079
+ bottom: 0
1080
+ };
1081
+ this._localBounds = newBounds;
1082
+ this._adjustedLocalBounds = newBounds;
1083
+ }
1084
+ else {
1085
+ this._getBounds();
1086
+ this._fixMinBounds(this._localBounds);
1087
+ this.updatePivotPoint();
1088
+ this._adjustedLocalBounds = this._display.getAdjustedBounds(this._localBounds);
1089
+ newBounds = this._adjustedLocalBounds;
1090
+ }
1091
+ if (!oldBounds || (oldBounds.left !== newBounds.left || oldBounds.top !== newBounds.top || oldBounds.right !== newBounds.right || oldBounds.bottom !== newBounds.bottom)) {
1092
+ const eventType = "boundschanged";
1093
+ if (this.events.isEnabled(eventType)) {
1094
+ this.events.dispatch(eventType, { type: eventType, target: this });
1279
1095
  }
1280
- else {
1281
- this._getBounds();
1282
- this._fixMinBounds(this._localBounds);
1283
- this.updatePivotPoint();
1284
- this._adjustedLocalBounds = this._display.getAdjustedBounds(this._localBounds);
1285
- newBounds = this._adjustedLocalBounds;
1286
- }
1287
- if (!oldBounds || (oldBounds.left !== newBounds.left || oldBounds.top !== newBounds.top || oldBounds.right !== newBounds.right || oldBounds.bottom !== newBounds.bottom)) {
1288
- var eventType = "boundschanged";
1289
- if (this.events.isEnabled(eventType)) {
1290
- this.events.dispatch(eventType, { type: eventType, target: this });
1291
- }
1292
- if (this.parent) {
1293
- this.parent.markDirty();
1294
- this.parent.markDirtyBounds();
1295
- }
1096
+ if (this.parent) {
1097
+ this.parent.markDirty();
1098
+ this.parent.markDirtyBounds();
1296
1099
  }
1297
1100
  }
1298
- });
1299
- Object.defineProperty(Sprite.prototype, "_fixMinBounds", {
1300
- enumerable: false,
1301
- configurable: true,
1302
- writable: true,
1303
- value: function (bounds) {
1304
- var minWidth = this.get("minWidth", this.getPrivate("minWidth"));
1305
- var minHeight = this.get("minHeight", this.getPrivate("minHeight"));
1306
- if ($type.isNumber(minWidth)) {
1307
- if (bounds.right - bounds.left < minWidth) {
1308
- bounds.right = bounds.left + minWidth;
1309
- }
1310
- }
1311
- if ($type.isNumber(minHeight)) {
1312
- if (bounds.bottom - bounds.top < minHeight) {
1313
- bounds.bottom = bounds.top + minHeight;
1314
- }
1315
- }
1316
- var privateWidth = this.getPrivate("width");
1317
- var privateHeight = this.getPrivate("height");
1318
- if ($type.isNumber(privateWidth)) {
1319
- bounds.right = bounds.left + privateWidth;
1320
- }
1321
- if ($type.isNumber(privateHeight)) {
1322
- bounds.bottom = bounds.top + privateHeight;
1101
+ }
1102
+ _fixMinBounds(bounds) {
1103
+ let minWidth = this.get("minWidth", this.getPrivate("minWidth"));
1104
+ let minHeight = this.get("minHeight", this.getPrivate("minHeight"));
1105
+ if ($type.isNumber(minWidth)) {
1106
+ if (bounds.right - bounds.left < minWidth) {
1107
+ bounds.right = bounds.left + minWidth;
1323
1108
  }
1324
1109
  }
1325
- });
1326
- Object.defineProperty(Sprite.prototype, "_removeParent", {
1327
- enumerable: false,
1328
- configurable: true,
1329
- writable: true,
1330
- value: function (parent) {
1331
- if (parent) {
1332
- parent.children.removeValue(this);
1333
- $array.removeFirst(parent._percentageSizeChildren, this);
1334
- $array.removeFirst(parent._percentagePositionChildren, this);
1110
+ if ($type.isNumber(minHeight)) {
1111
+ if (bounds.bottom - bounds.top < minHeight) {
1112
+ bounds.bottom = bounds.top + minHeight;
1335
1113
  }
1336
1114
  }
1337
- });
1338
- Object.defineProperty(Sprite.prototype, "_clearDirty", {
1339
- enumerable: false,
1340
- configurable: true,
1341
- writable: true,
1342
- value: function () {
1343
- _super.prototype._clearDirty.call(this);
1344
- this._sizeDirty = false;
1345
- this._statesHandled = false;
1115
+ let privateWidth = this.getPrivate("width");
1116
+ let privateHeight = this.getPrivate("height");
1117
+ if ($type.isNumber(privateWidth)) {
1118
+ bounds.right = bounds.left + privateWidth;
1119
+ }
1120
+ if ($type.isNumber(privateHeight)) {
1121
+ bounds.bottom = bounds.top + privateHeight;
1346
1122
  }
1347
- });
1123
+ }
1124
+ _removeParent(parent) {
1125
+ if (parent) {
1126
+ parent.children.removeValue(this);
1127
+ $array.removeFirst(parent._percentageSizeChildren, this);
1128
+ $array.removeFirst(parent._percentagePositionChildren, this);
1129
+ }
1130
+ }
1131
+ _clearDirty() {
1132
+ super._clearDirty();
1133
+ this._sizeDirty = false;
1134
+ this._statesHandled = false;
1135
+ }
1348
1136
  /**
1349
1137
  * Simulate hover over element.
1350
1138
  */
1351
- Object.defineProperty(Sprite.prototype, "hover", {
1352
- enumerable: false,
1353
- configurable: true,
1354
- writable: true,
1355
- value: function () {
1356
- this.showTooltip();
1357
- this._handleOver();
1358
- }
1359
- });
1139
+ hover() {
1140
+ this.showTooltip();
1141
+ this._handleOver();
1142
+ }
1360
1143
  /**
1361
1144
  * Simulate unhover over element.
1362
1145
  */
1363
- Object.defineProperty(Sprite.prototype, "unhover", {
1364
- enumerable: false,
1365
- configurable: true,
1366
- writable: true,
1367
- value: function () {
1368
- this.hideTooltip();
1369
- this._handleOut();
1370
- }
1371
- });
1146
+ unhover() {
1147
+ this.hideTooltip();
1148
+ this._handleOut();
1149
+ }
1372
1150
  /**
1373
1151
  * Shows element's [[Tooltip]].
1374
1152
  */
1375
- Object.defineProperty(Sprite.prototype, "showTooltip", {
1376
- enumerable: false,
1377
- configurable: true,
1378
- writable: true,
1379
- value: function (point) {
1380
- var tooltip = this.getTooltip();
1381
- var tooltipText = this.get("tooltipText");
1382
- var tooltipHTML = this.get("tooltipHTML");
1383
- if ((tooltipText || tooltipHTML) && tooltip) {
1384
- var tooltipPosition = this.get("tooltipPosition");
1385
- var tooltipTarget = this.getPrivate("tooltipTarget", this);
1386
- if (tooltipPosition == "fixed" || !point) {
1387
- this._display._setMatrix();
1388
- point = this.toGlobal(tooltipTarget._getTooltipPoint());
1389
- }
1390
- tooltip.set("pointTo", point);
1391
- tooltip.set("tooltipTarget", tooltipTarget);
1392
- if (!tooltip.get("x")) {
1393
- tooltip.set("x", point.x);
1394
- }
1395
- if (!tooltip.get("y")) {
1396
- tooltip.set("y", point.y);
1397
- }
1398
- if (tooltipText) {
1399
- tooltip.label.set("text", tooltipText);
1400
- }
1401
- if (tooltipHTML) {
1402
- tooltip.label.set("html", tooltipHTML);
1403
- }
1404
- var dataItem = this.dataItem;
1405
- if (dataItem) {
1406
- tooltip.label._setDataItem(dataItem);
1407
- }
1408
- if (this.get("showTooltipOn") == "always" && (point.x < 0 || point.x > this._root.width() || point.y < 0 || point.y > this._root.height())) {
1409
- this.hideTooltip();
1410
- return;
1411
- }
1412
- tooltip.label.text.markDirtyText();
1413
- var promise = tooltip.show();
1414
- this.setPrivateRaw("showingTooltip", true);
1415
- return promise;
1416
- }
1153
+ showTooltip(point) {
1154
+ const tooltip = this.getTooltip();
1155
+ const tooltipText = this.get("tooltipText");
1156
+ const tooltipHTML = this.get("tooltipHTML");
1157
+ if ((tooltipText || tooltipHTML) && tooltip) {
1158
+ const tooltipPosition = this.get("tooltipPosition");
1159
+ const tooltipTarget = this.getPrivate("tooltipTarget", this);
1160
+ if (tooltipPosition == "fixed" || !point) {
1161
+ this._display._setMatrix();
1162
+ point = this.toGlobal(tooltipTarget._getTooltipPoint());
1163
+ }
1164
+ tooltip.set("pointTo", point);
1165
+ tooltip.set("tooltipTarget", tooltipTarget);
1166
+ if (!tooltip.get("x")) {
1167
+ tooltip.set("x", point.x);
1168
+ }
1169
+ if (!tooltip.get("y")) {
1170
+ tooltip.set("y", point.y);
1171
+ }
1172
+ if (tooltipText) {
1173
+ tooltip.label.set("text", tooltipText);
1174
+ }
1175
+ if (tooltipHTML) {
1176
+ tooltip.label.set("html", tooltipHTML);
1177
+ }
1178
+ const dataItem = this.dataItem;
1179
+ if (dataItem) {
1180
+ tooltip.label._setDataItem(dataItem);
1181
+ }
1182
+ if (this.get("showTooltipOn") == "always" && (point.x < 0 || point.x > this._root.width() || point.y < 0 || point.y > this._root.height())) {
1183
+ this.hideTooltip();
1184
+ return;
1185
+ }
1186
+ tooltip.label.text.markDirtyText();
1187
+ const promise = tooltip.show();
1188
+ this.setPrivateRaw("showingTooltip", true);
1189
+ return promise;
1417
1190
  }
1418
- });
1191
+ }
1419
1192
  /**
1420
1193
  * Hides element's [[Tooltip]].
1421
1194
  */
1422
- Object.defineProperty(Sprite.prototype, "hideTooltip", {
1423
- enumerable: false,
1424
- configurable: true,
1425
- writable: true,
1426
- value: function () {
1427
- var tooltip = this.getTooltip();
1428
- if (tooltip) {
1429
- if (tooltip.get("tooltipTarget") == this.getPrivate("tooltipTarget", this)) {
1430
- var timeout = tooltip.get("keepTargetHover") && tooltip.get("stateAnimationDuration", 0) == 0 ? 400 : undefined;
1431
- var promise = tooltip.hide(timeout);
1432
- this.setPrivateRaw("showingTooltip", false);
1433
- return promise;
1434
- }
1195
+ hideTooltip() {
1196
+ const tooltip = this.getTooltip();
1197
+ if (tooltip) {
1198
+ if (tooltip.get("tooltipTarget") == this.getPrivate("tooltipTarget", this)) {
1199
+ let timeout = tooltip.get("keepTargetHover") && tooltip.get("stateAnimationDuration", 0) == 0 ? 400 : undefined;
1200
+ const promise = tooltip.hide(timeout);
1201
+ this.setPrivateRaw("showingTooltip", false);
1202
+ return promise;
1435
1203
  }
1436
1204
  }
1437
- });
1438
- Object.defineProperty(Sprite.prototype, "_getTooltipPoint", {
1439
- enumerable: false,
1440
- configurable: true,
1441
- writable: true,
1442
- value: function () {
1443
- var bounds = this._localBounds;
1444
- if (bounds) {
1445
- var x = 0;
1446
- var y = 0;
1447
- if (!this.get("isMeasured")) {
1448
- x = $utils.relativeToValue(this.get("tooltipX", 0), this.width());
1449
- y = $utils.relativeToValue(this.get("tooltipY", 0), this.height());
1450
- }
1451
- else {
1452
- x = bounds.left + $utils.relativeToValue(this.get("tooltipX", 0), bounds.right - bounds.left);
1453
- y = bounds.top + $utils.relativeToValue(this.get("tooltipY", 0), bounds.bottom - bounds.top);
1454
- }
1455
- return { x: x, y: y };
1205
+ }
1206
+ _getTooltipPoint() {
1207
+ const bounds = this._localBounds;
1208
+ if (bounds) {
1209
+ let x = 0;
1210
+ let y = 0;
1211
+ if (!this.get("isMeasured")) {
1212
+ x = $utils.relativeToValue(this.get("tooltipX", 0), this.width());
1213
+ y = $utils.relativeToValue(this.get("tooltipY", 0), this.height());
1456
1214
  }
1457
- return { x: 0, y: 0 };
1215
+ else {
1216
+ x = bounds.left + $utils.relativeToValue(this.get("tooltipX", 0), bounds.right - bounds.left);
1217
+ y = bounds.top + $utils.relativeToValue(this.get("tooltipY", 0), bounds.bottom - bounds.top);
1218
+ }
1219
+ return { x, y };
1458
1220
  }
1459
- });
1221
+ return { x: 0, y: 0 };
1222
+ }
1460
1223
  /**
1461
1224
  * Returns [[Tooltip]] used for this element.
1462
1225
  *
1463
1226
  * @return Tooltip
1464
1227
  */
1465
- Object.defineProperty(Sprite.prototype, "getTooltip", {
1466
- enumerable: false,
1467
- configurable: true,
1468
- writable: true,
1469
- value: function () {
1470
- var tooltip = this.get("tooltip");
1471
- if (!tooltip) {
1472
- var parent_5 = this.parent;
1473
- if (parent_5) {
1474
- return parent_5.getTooltip();
1475
- }
1476
- }
1477
- else {
1478
- return tooltip;
1479
- }
1480
- }
1481
- });
1482
- Object.defineProperty(Sprite.prototype, "_updatePosition", {
1483
- enumerable: false,
1484
- configurable: true,
1485
- writable: true,
1486
- value: function () {
1487
- var parent = this.parent;
1488
- var dx = this.get("dx", 0);
1489
- var dy = this.get("dy", 0);
1490
- var x = this.get("x");
1491
- var _x = this.getPrivate("x");
1492
- var xx = 0;
1493
- var yy = 0;
1494
- var position = this.get("position");
1495
- if (x instanceof Percent) {
1496
- if (parent) {
1497
- x = parent.innerWidth() * x.value + parent.get("paddingLeft", 0);
1498
- }
1499
- else {
1500
- x = 0;
1501
- }
1228
+ getTooltip() {
1229
+ let tooltip = this.get("tooltip");
1230
+ if (!tooltip) {
1231
+ let parent = this.parent;
1232
+ if (parent) {
1233
+ return parent.getTooltip();
1502
1234
  }
1503
- if ($type.isNumber(x)) {
1504
- xx = x + dx;
1235
+ }
1236
+ else {
1237
+ return tooltip;
1238
+ }
1239
+ }
1240
+ _updatePosition() {
1241
+ const parent = this.parent;
1242
+ let dx = this.get("dx", 0);
1243
+ let dy = this.get("dy", 0);
1244
+ let x = this.get("x");
1245
+ let _x = this.getPrivate("x");
1246
+ let xx = 0;
1247
+ let yy = 0;
1248
+ const position = this.get("position");
1249
+ if (x instanceof Percent) {
1250
+ if (parent) {
1251
+ x = parent.innerWidth() * x.value + parent.get("paddingLeft", 0);
1505
1252
  }
1506
1253
  else {
1507
- if (_x != null) {
1508
- xx = _x;
1509
- }
1510
- else if (parent) {
1511
- if (position == "relative") {
1512
- xx = parent.get("paddingLeft", 0) + dx;
1513
- }
1514
- }
1254
+ x = 0;
1515
1255
  }
1516
- var y = this.get("y");
1517
- var _y = this.getPrivate("y");
1518
- if (y instanceof Percent) {
1519
- if (parent) {
1520
- y = parent.innerHeight() * y.value + parent.get("paddingTop", 0);
1521
- }
1522
- else {
1523
- y = 0;
1256
+ }
1257
+ if ($type.isNumber(x)) {
1258
+ xx = x + dx;
1259
+ }
1260
+ else {
1261
+ if (_x != null) {
1262
+ xx = _x;
1263
+ }
1264
+ else if (parent) {
1265
+ if (position == "relative") {
1266
+ xx = parent.get("paddingLeft", 0) + dx;
1524
1267
  }
1525
1268
  }
1526
- if ($type.isNumber(y)) {
1527
- yy = y + dy;
1269
+ }
1270
+ let y = this.get("y");
1271
+ let _y = this.getPrivate("y");
1272
+ if (y instanceof Percent) {
1273
+ if (parent) {
1274
+ y = parent.innerHeight() * y.value + parent.get("paddingTop", 0);
1528
1275
  }
1529
1276
  else {
1530
- if (_y != null) {
1531
- yy = _y;
1532
- }
1533
- else if (parent) {
1534
- if (position == "relative") {
1535
- yy = parent.get("paddingTop", 0) + dy;
1536
- }
1537
- }
1277
+ y = 0;
1278
+ }
1279
+ }
1280
+ if ($type.isNumber(y)) {
1281
+ yy = y + dy;
1282
+ }
1283
+ else {
1284
+ if (_y != null) {
1285
+ yy = _y;
1538
1286
  }
1539
- var display = this._display;
1540
- if (display.x != xx || display.y != yy) {
1541
- display.invalidateBounds();
1542
- display.x = xx;
1543
- display.y = yy;
1544
- var eventType = "positionchanged";
1545
- if (this.events.isEnabled(eventType)) {
1546
- this.events.dispatch(eventType, { type: eventType, target: this });
1287
+ else if (parent) {
1288
+ if (position == "relative") {
1289
+ yy = parent.get("paddingTop", 0) + dy;
1547
1290
  }
1548
1291
  }
1549
- // Update tooltip position together with the Sprite
1550
- if (this.getPrivate("showingTooltip")) {
1551
- this.showTooltip();
1292
+ }
1293
+ const display = this._display;
1294
+ if (display.x != xx || display.y != yy) {
1295
+ display.invalidateBounds();
1296
+ display.x = xx;
1297
+ display.y = yy;
1298
+ const eventType = "positionchanged";
1299
+ if (this.events.isEnabled(eventType)) {
1300
+ this.events.dispatch(eventType, { type: eventType, target: this });
1552
1301
  }
1553
1302
  }
1554
- });
1303
+ // Update tooltip position together with the Sprite
1304
+ if (this.getPrivate("showingTooltip")) {
1305
+ this.showTooltip();
1306
+ }
1307
+ }
1555
1308
  /**
1556
1309
  * Returns element's actual X position in pixels.
1557
1310
  *
1558
1311
  * @return X (px)
1559
1312
  */
1560
- Object.defineProperty(Sprite.prototype, "x", {
1561
- enumerable: false,
1562
- configurable: true,
1563
- writable: true,
1564
- value: function () {
1565
- var x = this.get("x");
1566
- var _x = this.getPrivate("x");
1567
- var parent = this.parent;
1568
- if (parent) {
1569
- if (x instanceof Percent) {
1570
- return $utils.relativeToValue(x, parent.innerWidth()) + parent.get("paddingLeft", 0);
1571
- }
1572
- else {
1573
- if (!$type.isNumber(x)) {
1574
- if (_x != null) {
1575
- return _x;
1576
- }
1577
- else {
1578
- return parent.get("paddingLeft", this._display.x);
1579
- }
1313
+ x() {
1314
+ let x = this.get("x");
1315
+ let _x = this.getPrivate("x");
1316
+ const parent = this.parent;
1317
+ if (parent) {
1318
+ if (x instanceof Percent) {
1319
+ return $utils.relativeToValue(x, parent.innerWidth()) + parent.get("paddingLeft", 0);
1320
+ }
1321
+ else {
1322
+ if (!$type.isNumber(x)) {
1323
+ if (_x != null) {
1324
+ return _x;
1580
1325
  }
1581
1326
  else {
1582
- return x;
1327
+ return parent.get("paddingLeft", this._display.x);
1583
1328
  }
1584
1329
  }
1330
+ else {
1331
+ return x;
1332
+ }
1585
1333
  }
1586
- return this._display.x;
1587
1334
  }
1588
- });
1335
+ return this._display.x;
1336
+ }
1589
1337
  /**
1590
1338
  * Returns element's actual Y position in pixels.
1591
1339
  *
1592
1340
  * @return Y (px)
1593
1341
  */
1594
- Object.defineProperty(Sprite.prototype, "y", {
1595
- enumerable: false,
1596
- configurable: true,
1597
- writable: true,
1598
- value: function () {
1599
- var _y = this.getPrivate("y");
1600
- if (_y != null) {
1601
- return _y;
1342
+ y() {
1343
+ let _y = this.getPrivate("y");
1344
+ if (_y != null) {
1345
+ return _y;
1346
+ }
1347
+ let y = this.get("y");
1348
+ const parent = this.parent;
1349
+ if (parent) {
1350
+ if (y instanceof Percent) {
1351
+ return $utils.relativeToValue(y, parent.innerHeight()) + parent.get("paddingTop", 0);
1602
1352
  }
1603
- var y = this.get("y");
1604
- var parent = this.parent;
1605
- if (parent) {
1606
- if (y instanceof Percent) {
1607
- return $utils.relativeToValue(y, parent.innerHeight()) + parent.get("paddingTop", 0);
1608
- }
1609
- else {
1610
- if (!$type.isNumber(y)) {
1611
- if (_y != null) {
1612
- return _y;
1613
- }
1614
- else {
1615
- return parent.get("paddingTop", this._display.y);
1616
- }
1353
+ else {
1354
+ if (!$type.isNumber(y)) {
1355
+ if (_y != null) {
1356
+ return _y;
1617
1357
  }
1618
1358
  else {
1619
- return y;
1359
+ return parent.get("paddingTop", this._display.y);
1620
1360
  }
1621
1361
  }
1362
+ else {
1363
+ return y;
1364
+ }
1622
1365
  }
1623
- return this._display.y;
1624
- }
1625
- });
1626
- Object.defineProperty(Sprite.prototype, "_dispose", {
1627
- enumerable: false,
1628
- configurable: true,
1629
- writable: true,
1630
- value: function () {
1631
- _super.prototype._dispose.call(this);
1632
- this._display.dispose();
1633
- this._removeTemplateField();
1634
- this._removeParent(this.parent);
1635
- this._root._removeFocusElement(this);
1636
- var tooltip = this.get("tooltip");
1637
- if (tooltip) {
1638
- tooltip.dispose();
1639
- }
1640
- this.markDirty();
1641
1366
  }
1642
- });
1367
+ return this._display.y;
1368
+ }
1369
+ _dispose() {
1370
+ super._dispose();
1371
+ this._display.dispose();
1372
+ this._removeTemplateField();
1373
+ this._removeParent(this.parent);
1374
+ this._root._removeFocusElement(this);
1375
+ const tooltip = this.get("tooltip");
1376
+ if (tooltip) {
1377
+ tooltip.dispose();
1378
+ }
1379
+ this.markDirty();
1380
+ }
1643
1381
  /**
1644
1382
  * @ignore
1645
1383
  */
1646
- Object.defineProperty(Sprite.prototype, "adjustedLocalBounds", {
1647
- enumerable: false,
1648
- configurable: true,
1649
- writable: true,
1650
- value: function () {
1651
- this._fixMinBounds(this._adjustedLocalBounds);
1652
- return this._adjustedLocalBounds;
1653
- }
1654
- });
1384
+ adjustedLocalBounds() {
1385
+ this._fixMinBounds(this._adjustedLocalBounds);
1386
+ return this._adjustedLocalBounds;
1387
+ }
1655
1388
  /**
1656
1389
  * Returns local coordinates of the element's bounds.
1657
1390
  *
1658
1391
  * @ignore
1659
1392
  * @return Global bounds
1660
1393
  */
1661
- Object.defineProperty(Sprite.prototype, "localBounds", {
1662
- enumerable: false,
1663
- configurable: true,
1664
- writable: true,
1665
- value: function () {
1666
- return this._localBounds;
1667
- }
1668
- });
1394
+ localBounds() {
1395
+ return this._localBounds;
1396
+ }
1669
1397
  /**
1670
1398
  * Returns adjusted local coordinates of the element's bounds.
1671
1399
  *
1672
1400
  * @ignore
1673
1401
  * @return Global bounds
1674
1402
  */
1675
- Object.defineProperty(Sprite.prototype, "bounds", {
1676
- enumerable: false,
1677
- configurable: true,
1678
- writable: true,
1679
- value: function () {
1680
- var bounds = this._adjustedLocalBounds;
1681
- var x = this.x();
1682
- var y = this.y();
1683
- return { left: bounds.left + x, right: bounds.right + x, top: bounds.top + y, bottom: bounds.bottom + y };
1684
- }
1685
- });
1403
+ bounds() {
1404
+ const bounds = this._adjustedLocalBounds;
1405
+ const x = this.x();
1406
+ const y = this.y();
1407
+ return { left: bounds.left + x, right: bounds.right + x, top: bounds.top + y, bottom: bounds.bottom + y };
1408
+ }
1686
1409
  /**
1687
1410
  * Returns global coordinates of the element's bounds.
1688
1411
  *
1689
1412
  * @ignore
1690
1413
  * @return Global bounds
1691
1414
  */
1692
- Object.defineProperty(Sprite.prototype, "globalBounds", {
1693
- enumerable: false,
1694
- configurable: true,
1695
- writable: true,
1696
- value: function () {
1697
- var bounds = this.localBounds();
1698
- var p0 = this.toGlobal({ x: bounds.left, y: bounds.top });
1699
- var p1 = this.toGlobal({ x: bounds.right, y: bounds.top });
1700
- var p2 = this.toGlobal({ x: bounds.right, y: bounds.bottom });
1701
- var p3 = this.toGlobal({ x: bounds.left, y: bounds.bottom });
1702
- return {
1703
- left: Math.min(p0.x, p1.x, p2.x, p3.x),
1704
- top: Math.min(p0.y, p1.y, p2.y, p3.y),
1705
- right: Math.max(p0.x, p1.x, p2.x, p3.x),
1706
- bottom: Math.max(p0.y, p1.y, p2.y, p3.y)
1707
- };
1708
- }
1709
- });
1710
- Object.defineProperty(Sprite.prototype, "_onShow", {
1711
- enumerable: false,
1712
- configurable: true,
1713
- writable: true,
1714
- value: function (_duration) {
1715
- }
1716
- });
1717
- Object.defineProperty(Sprite.prototype, "_onHide", {
1718
- enumerable: false,
1719
- configurable: true,
1720
- writable: true,
1721
- value: function (_duration) {
1722
- }
1723
- });
1415
+ globalBounds() {
1416
+ const bounds = this.localBounds();
1417
+ const p0 = this.toGlobal({ x: bounds.left, y: bounds.top });
1418
+ const p1 = this.toGlobal({ x: bounds.right, y: bounds.top });
1419
+ const p2 = this.toGlobal({ x: bounds.right, y: bounds.bottom });
1420
+ const p3 = this.toGlobal({ x: bounds.left, y: bounds.bottom });
1421
+ return {
1422
+ left: Math.min(p0.x, p1.x, p2.x, p3.x),
1423
+ top: Math.min(p0.y, p1.y, p2.y, p3.y),
1424
+ right: Math.max(p0.x, p1.x, p2.x, p3.x),
1425
+ bottom: Math.max(p0.y, p1.y, p2.y, p3.y)
1426
+ };
1427
+ }
1428
+ _onShow(_duration) {
1429
+ }
1430
+ _onHide(_duration) {
1431
+ }
1724
1432
  /**
1725
1433
  * Plays initial reveal animation regardless if element is currently hidden
1726
1434
  * or visible.
@@ -1729,34 +1437,21 @@ var Sprite = /** @class */ (function (_super) {
1729
1437
  * @param delay Delay showing of the element by X milliseconds
1730
1438
  * @return Promise
1731
1439
  */
1732
- Object.defineProperty(Sprite.prototype, "appear", {
1733
- enumerable: false,
1734
- configurable: true,
1735
- writable: true,
1736
- value: function (duration, delay) {
1737
- return __awaiter(this, void 0, void 0, function () {
1738
- var _this = this;
1739
- return __generator(this, function (_a) {
1740
- switch (_a.label) {
1741
- case 0: return [4 /*yield*/, this.hide(0)];
1742
- case 1:
1743
- _a.sent();
1744
- if (delay) {
1745
- return [2 /*return*/, new Promise(function (success, _error) {
1746
- _this.setTimeout(function () {
1747
- success(_this.show(duration));
1748
- }, delay);
1749
- })];
1750
- }
1751
- else {
1752
- return [2 /*return*/, this.show(duration)];
1753
- }
1754
- return [2 /*return*/];
1755
- }
1440
+ appear(duration, delay) {
1441
+ return __awaiter(this, void 0, void 0, function* () {
1442
+ yield this.hide(0);
1443
+ if (delay) {
1444
+ return new Promise((success, _error) => {
1445
+ this.setTimeout(() => {
1446
+ success(this.show(duration));
1447
+ }, delay);
1756
1448
  });
1757
- });
1758
- }
1759
- });
1449
+ }
1450
+ else {
1451
+ return this.show(duration);
1452
+ }
1453
+ });
1454
+ }
1760
1455
  /**
1761
1456
  * Shows currently hidden element and returns a `Promise` which completes
1762
1457
  * when all showing animations are finished.
@@ -1774,36 +1469,22 @@ var Sprite = /** @class */ (function (_super) {
1774
1469
  *
1775
1470
  * @return Promise
1776
1471
  */
1777
- Object.defineProperty(Sprite.prototype, "show", {
1778
- enumerable: false,
1779
- configurable: true,
1780
- writable: true,
1781
- value: function (duration) {
1782
- return __awaiter(this, void 0, void 0, function () {
1783
- var animations;
1784
- return __generator(this, function (_a) {
1785
- switch (_a.label) {
1786
- case 0:
1787
- if (!!this._isShowing) return [3 /*break*/, 2];
1788
- this._isHidden = false;
1789
- this._isShowing = true;
1790
- this._isHiding = false;
1791
- if (this.states.lookup("default").get("visible")) {
1792
- this.set("visible", true);
1793
- }
1794
- this._onShow(duration);
1795
- animations = this.states.applyAnimate("default", duration);
1796
- return [4 /*yield*/, waitForAnimations(animations)];
1797
- case 1:
1798
- _a.sent();
1799
- this._isShowing = false;
1800
- _a.label = 2;
1801
- case 2: return [2 /*return*/];
1802
- }
1803
- });
1804
- });
1805
- }
1806
- });
1472
+ show(duration) {
1473
+ return __awaiter(this, void 0, void 0, function* () {
1474
+ if (!this._isShowing) {
1475
+ this._isHidden = false;
1476
+ this._isShowing = true;
1477
+ this._isHiding = false;
1478
+ if (this.states.lookup("default").get("visible")) {
1479
+ this.set("visible", true);
1480
+ }
1481
+ this._onShow(duration);
1482
+ const animations = this.states.applyAnimate("default", duration);
1483
+ yield waitForAnimations(animations);
1484
+ this._isShowing = false;
1485
+ }
1486
+ });
1487
+ }
1807
1488
  /**
1808
1489
  * Hides the element and returns a `Promise` which completes when all hiding
1809
1490
  * animations are finished.
@@ -1821,382 +1502,278 @@ var Sprite = /** @class */ (function (_super) {
1821
1502
  *
1822
1503
  * @return Promise
1823
1504
  */
1824
- Object.defineProperty(Sprite.prototype, "hide", {
1825
- enumerable: false,
1826
- configurable: true,
1827
- writable: true,
1828
- value: function (duration) {
1829
- return __awaiter(this, void 0, void 0, function () {
1830
- var state, animations;
1831
- return __generator(this, function (_a) {
1832
- switch (_a.label) {
1833
- case 0:
1834
- if (!(!this._isHiding && !this._isHidden)) return [3 /*break*/, 2];
1835
- this._isHiding = true;
1836
- this._isShowing = false;
1837
- state = this.states.lookup("hidden");
1838
- if (!state) {
1839
- state = this.states.create("hidden", {
1840
- "opacity": 0,
1841
- "visible": false
1842
- });
1843
- }
1844
- this._isHidden = true;
1845
- this._onHide(duration);
1846
- animations = this.states.applyAnimate("hidden", duration);
1847
- return [4 /*yield*/, waitForAnimations(animations)];
1848
- case 1:
1849
- _a.sent();
1850
- this._isHiding = false;
1851
- _a.label = 2;
1852
- case 2: return [2 /*return*/];
1853
- }
1854
- });
1855
- });
1856
- }
1857
- });
1505
+ hide(duration) {
1506
+ return __awaiter(this, void 0, void 0, function* () {
1507
+ if (!this._isHiding && !this._isHidden) {
1508
+ this._isHiding = true;
1509
+ this._isShowing = false;
1510
+ let state = this.states.lookup("hidden");
1511
+ if (!state) {
1512
+ state = this.states.create("hidden", {
1513
+ "opacity": 0,
1514
+ "visible": false
1515
+ });
1516
+ }
1517
+ this._isHidden = true;
1518
+ this._onHide(duration);
1519
+ const animations = this.states.applyAnimate("hidden", duration);
1520
+ yield waitForAnimations(animations);
1521
+ this._isHiding = false;
1522
+ }
1523
+ });
1524
+ }
1858
1525
  /**
1859
1526
  * Returns `true` if this element is currently hidden.
1860
1527
  *
1861
1528
  * @return Is hidden?
1862
1529
  */
1863
- Object.defineProperty(Sprite.prototype, "isHidden", {
1864
- enumerable: false,
1865
- configurable: true,
1866
- writable: true,
1867
- value: function () {
1868
- return this._isHidden;
1869
- }
1870
- });
1530
+ isHidden() {
1531
+ return this._isHidden;
1532
+ }
1871
1533
  /**
1872
1534
  * Returns `true` if this element is currently animating to a default state.
1873
1535
  *
1874
1536
  * @return Is showing?
1875
1537
  */
1876
- Object.defineProperty(Sprite.prototype, "isShowing", {
1877
- enumerable: false,
1878
- configurable: true,
1879
- writable: true,
1880
- value: function () {
1881
- return this._isShowing;
1882
- }
1883
- });
1538
+ isShowing() {
1539
+ return this._isShowing;
1540
+ }
1884
1541
  /**
1885
1542
  * Returns `true` if this element is currently animating to a hidden state.
1886
1543
  *
1887
1544
  * @return Is hiding?
1888
1545
  */
1889
- Object.defineProperty(Sprite.prototype, "isHiding", {
1890
- enumerable: false,
1891
- configurable: true,
1892
- writable: true,
1893
- value: function () {
1894
- return this._isHiding;
1895
- }
1896
- });
1546
+ isHiding() {
1547
+ return this._isHiding;
1548
+ }
1897
1549
  /**
1898
1550
  * Returns `true` if this element is currently hovered by a pointer.
1899
1551
  *
1900
1552
  * @return Is hovered?
1901
1553
  */
1902
- Object.defineProperty(Sprite.prototype, "isHover", {
1903
- enumerable: false,
1904
- configurable: true,
1905
- writable: true,
1906
- value: function () {
1907
- return this._display.hovering();
1908
- }
1909
- });
1554
+ isHover() {
1555
+ return this._display.hovering();
1556
+ }
1910
1557
  /**
1911
1558
  * Returns `true` if this element does currently have focus.
1912
1559
  *
1913
1560
  * @return Is focused?
1914
1561
  */
1915
- Object.defineProperty(Sprite.prototype, "isFocus", {
1916
- enumerable: false,
1917
- configurable: true,
1918
- writable: true,
1919
- value: function () {
1920
- return this._root.focused(this);
1921
- }
1922
- });
1562
+ isFocus() {
1563
+ return this._root.focused(this);
1564
+ }
1923
1565
  /**
1924
1566
  * Returns `true` if this element is currently being dragged.
1925
1567
  *
1926
1568
  * @return Is dragged?
1927
1569
  */
1928
- Object.defineProperty(Sprite.prototype, "isDragging", {
1929
- enumerable: false,
1930
- configurable: true,
1931
- writable: true,
1932
- value: function () {
1933
- return this._isDragging;
1934
- }
1935
- });
1570
+ isDragging() {
1571
+ return this._isDragging;
1572
+ }
1936
1573
  /**
1937
1574
  * Returns `false` if if either public or private setting `visible` is set
1938
1575
  * to `false`, or `forceHidden` is set to `true`.
1939
1576
  *
1940
1577
  * @return Visible?
1941
1578
  */
1942
- Object.defineProperty(Sprite.prototype, "isVisible", {
1943
- enumerable: false,
1944
- configurable: true,
1945
- writable: true,
1946
- value: function () {
1947
- if (this.get("visible") && this.getPrivate("visible") && !this.get("forceHidden")) {
1948
- return true;
1949
- }
1950
- return false;
1579
+ isVisible() {
1580
+ if (this.get("visible") && this.getPrivate("visible") && !this.get("forceHidden")) {
1581
+ return true;
1951
1582
  }
1952
- });
1583
+ return false;
1584
+ }
1953
1585
  /**
1954
1586
  * Same as `isVisible()`, except it checks all ascendants, too.
1955
1587
  *
1956
1588
  * @since 5.2.7
1957
1589
  * @return Visible?
1958
1590
  */
1959
- Object.defineProperty(Sprite.prototype, "isVisibleDeep", {
1960
- enumerable: false,
1961
- configurable: true,
1962
- writable: true,
1963
- value: function () {
1964
- return this._parent ? (this._parent.isVisibleDeep() && this.isVisible()) : this.isVisible();
1965
- }
1966
- });
1591
+ isVisibleDeep() {
1592
+ return this._parent ? (this._parent.isVisibleDeep() && this.isVisible()) : this.isVisible();
1593
+ }
1967
1594
  /**
1968
1595
  * Returns an actual opacity of the element, taking into account all parents.
1969
1596
  *
1970
1597
  * @return Opacity
1971
1598
  * @since 5.2.11
1972
1599
  */
1973
- Object.defineProperty(Sprite.prototype, "compositeOpacity", {
1974
- enumerable: false,
1975
- configurable: true,
1976
- writable: true,
1977
- value: function () {
1978
- var opacity = this.get("opacity", 1);
1979
- return this._parent ? (this._parent.compositeOpacity() * opacity) : opacity;
1980
- }
1981
- });
1600
+ compositeOpacity() {
1601
+ const opacity = this.get("opacity", 1);
1602
+ return this._parent ? (this._parent.compositeOpacity() * opacity) : opacity;
1603
+ }
1982
1604
  /**
1983
1605
  * Returns width of this element in pixels.
1984
1606
  *
1985
1607
  * @return Width (px)
1986
1608
  */
1987
- Object.defineProperty(Sprite.prototype, "width", {
1988
- enumerable: false,
1989
- configurable: true,
1990
- writable: true,
1991
- value: function () {
1992
- var width = this.get("width");
1993
- var maxWidth = this.get("maxWidth", this.getPrivate("maxWidth"));
1994
- var minWidth = this.get("minWidth", this.getPrivate("minWidth"));
1995
- var privateWidth = this.getPrivate("width");
1996
- var w = 0;
1997
- if ($type.isNumber(privateWidth)) {
1998
- w = privateWidth;
1609
+ width() {
1610
+ let width = this.get("width");
1611
+ let maxWidth = this.get("maxWidth", this.getPrivate("maxWidth"));
1612
+ let minWidth = this.get("minWidth", this.getPrivate("minWidth"));
1613
+ let privateWidth = this.getPrivate("width");
1614
+ let w = 0;
1615
+ if ($type.isNumber(privateWidth)) {
1616
+ w = privateWidth;
1617
+ }
1618
+ else {
1619
+ if (width == null) {
1620
+ if (this._adjustedLocalBounds) {
1621
+ w = this._adjustedLocalBounds.right - this._adjustedLocalBounds.left;
1622
+ }
1999
1623
  }
2000
1624
  else {
2001
- if (width == null) {
2002
- if (this._adjustedLocalBounds) {
2003
- w = this._adjustedLocalBounds.right - this._adjustedLocalBounds.left;
2004
- }
2005
- }
2006
- else {
2007
- if (width instanceof Percent) {
2008
- var parent_6 = this.parent;
2009
- if (parent_6) {
2010
- w = parent_6.innerWidth() * width.value;
2011
- }
2012
- else {
2013
- w = this._root.width() * width.value;
2014
- }
1625
+ if (width instanceof Percent) {
1626
+ const parent = this.parent;
1627
+ if (parent) {
1628
+ w = parent.innerWidth() * width.value;
2015
1629
  }
2016
- else if ($type.isNumber(width)) {
2017
- w = width;
1630
+ else {
1631
+ w = this._root.width() * width.value;
2018
1632
  }
2019
1633
  }
1634
+ else if ($type.isNumber(width)) {
1635
+ w = width;
1636
+ }
2020
1637
  }
2021
- if ($type.isNumber(minWidth)) {
2022
- w = Math.max(minWidth, w);
2023
- }
2024
- if ($type.isNumber(maxWidth)) {
2025
- w = Math.min(maxWidth, w);
2026
- }
2027
- return w;
2028
1638
  }
2029
- });
1639
+ if ($type.isNumber(minWidth)) {
1640
+ w = Math.max(minWidth, w);
1641
+ }
1642
+ if ($type.isNumber(maxWidth)) {
1643
+ w = Math.min(maxWidth, w);
1644
+ }
1645
+ return w;
1646
+ }
2030
1647
  /**
2031
1648
  * Returns maximum allowed width of this element in pixels.
2032
1649
  *
2033
1650
  * @return Maximum width (px)
2034
1651
  */
2035
- Object.defineProperty(Sprite.prototype, "maxWidth", {
2036
- enumerable: false,
2037
- configurable: true,
2038
- writable: true,
2039
- value: function () {
2040
- var maxWidth = this.get("maxWidth", this.getPrivate("maxWidth"));
2041
- if ($type.isNumber(maxWidth)) {
2042
- return maxWidth;
2043
- }
2044
- else {
2045
- var width = this.get("width");
2046
- if ($type.isNumber(width)) {
2047
- return width;
2048
- }
2049
- }
2050
- var parent = this.parent;
2051
- if (parent) {
2052
- return parent.innerWidth();
1652
+ maxWidth() {
1653
+ let maxWidth = this.get("maxWidth", this.getPrivate("maxWidth"));
1654
+ if ($type.isNumber(maxWidth)) {
1655
+ return maxWidth;
1656
+ }
1657
+ else {
1658
+ let width = this.get("width");
1659
+ if ($type.isNumber(width)) {
1660
+ return width;
2053
1661
  }
2054
- return this._root.width();
2055
1662
  }
2056
- });
1663
+ const parent = this.parent;
1664
+ if (parent) {
1665
+ return parent.innerWidth();
1666
+ }
1667
+ return this._root.width();
1668
+ }
2057
1669
  /**
2058
1670
  * Returns maximum allowed height of this element in pixels.
2059
1671
  *
2060
1672
  * @return Maximum height (px)
2061
1673
  */
2062
- Object.defineProperty(Sprite.prototype, "maxHeight", {
2063
- enumerable: false,
2064
- configurable: true,
2065
- writable: true,
2066
- value: function () {
2067
- var maxHeight = this.get("maxHeight", this.getPrivate("maxHeight"));
2068
- if ($type.isNumber(maxHeight)) {
2069
- return maxHeight;
2070
- }
2071
- else {
2072
- var height = this.get("height");
2073
- if ($type.isNumber(height)) {
2074
- return height;
2075
- }
2076
- }
2077
- var parent = this.parent;
2078
- if (parent) {
2079
- return parent.innerHeight();
1674
+ maxHeight() {
1675
+ let maxHeight = this.get("maxHeight", this.getPrivate("maxHeight"));
1676
+ if ($type.isNumber(maxHeight)) {
1677
+ return maxHeight;
1678
+ }
1679
+ else {
1680
+ let height = this.get("height");
1681
+ if ($type.isNumber(height)) {
1682
+ return height;
2080
1683
  }
2081
- return this._root.height();
2082
1684
  }
2083
- });
1685
+ const parent = this.parent;
1686
+ if (parent) {
1687
+ return parent.innerHeight();
1688
+ }
1689
+ return this._root.height();
1690
+ }
2084
1691
  /**
2085
1692
  * Returns height of this element in pixels.
2086
1693
  *
2087
1694
  * @return Height (px)
2088
1695
  */
2089
- Object.defineProperty(Sprite.prototype, "height", {
2090
- enumerable: false,
2091
- configurable: true,
2092
- writable: true,
2093
- value: function () {
2094
- var height = this.get("height");
2095
- var maxHeight = this.get("maxHeight", this.getPrivate("maxHeight"));
2096
- var minHeight = this.get("minHeight", this.getPrivate("minHeight"));
2097
- var privateHeight = this.getPrivate("height");
2098
- var h = 0;
2099
- if ($type.isNumber(privateHeight)) {
2100
- h = privateHeight;
1696
+ height() {
1697
+ let height = this.get("height");
1698
+ let maxHeight = this.get("maxHeight", this.getPrivate("maxHeight"));
1699
+ let minHeight = this.get("minHeight", this.getPrivate("minHeight"));
1700
+ let privateHeight = this.getPrivate("height");
1701
+ let h = 0;
1702
+ if ($type.isNumber(privateHeight)) {
1703
+ h = privateHeight;
1704
+ }
1705
+ else {
1706
+ if (height == null) {
1707
+ if (this._adjustedLocalBounds) {
1708
+ h = this._adjustedLocalBounds.bottom - this._adjustedLocalBounds.top;
1709
+ }
2101
1710
  }
2102
1711
  else {
2103
- if (height == null) {
2104
- if (this._adjustedLocalBounds) {
2105
- h = this._adjustedLocalBounds.bottom - this._adjustedLocalBounds.top;
2106
- }
2107
- }
2108
- else {
2109
- if (height instanceof Percent) {
2110
- var parent_7 = this.parent;
2111
- if (parent_7) {
2112
- h = parent_7.innerHeight() * height.value;
2113
- }
2114
- else {
2115
- h = this._root.height() * height.value;
2116
- }
1712
+ if (height instanceof Percent) {
1713
+ const parent = this.parent;
1714
+ if (parent) {
1715
+ h = parent.innerHeight() * height.value;
2117
1716
  }
2118
- else if ($type.isNumber(height)) {
2119
- h = height;
1717
+ else {
1718
+ h = this._root.height() * height.value;
2120
1719
  }
2121
1720
  }
1721
+ else if ($type.isNumber(height)) {
1722
+ h = height;
1723
+ }
2122
1724
  }
2123
- if ($type.isNumber(minHeight)) {
2124
- h = Math.max(minHeight, h);
2125
- }
2126
- if ($type.isNumber(maxHeight)) {
2127
- h = Math.min(maxHeight, h);
2128
- }
2129
- return h;
2130
- }
2131
- });
2132
- Object.defineProperty(Sprite.prototype, "_findStaticTemplate", {
2133
- enumerable: false,
2134
- configurable: true,
2135
- writable: true,
2136
- value: function (f) {
2137
- // templateField overrides template
2138
- if (this._templateField && f(this._templateField)) {
2139
- return this._templateField;
2140
- }
2141
- return _super.prototype._findStaticTemplate.call(this, f);
2142
- }
2143
- });
2144
- Object.defineProperty(Sprite.prototype, "_walkParents", {
2145
- enumerable: false,
2146
- configurable: true,
2147
- writable: true,
2148
- value: function (f) {
2149
- if (this._parent) {
2150
- this._walkParent(f);
2151
- }
2152
- }
2153
- });
2154
- Object.defineProperty(Sprite.prototype, "_walkParent", {
2155
- enumerable: false,
2156
- configurable: true,
2157
- writable: true,
2158
- value: function (f) {
2159
- if (this._parent) {
2160
- this._parent._walkParent(f);
2161
- }
2162
- f(this);
2163
- }
2164
- });
2165
- Object.defineProperty(Sprite.prototype, "parent", {
2166
- /**
2167
- * Parent [[Container]] of this element.
2168
- *
2169
- * @return Parent container
2170
- */
2171
- get: function () {
2172
- return this._parent;
2173
- },
2174
- enumerable: false,
2175
- configurable: true
2176
- });
2177
- Object.defineProperty(Sprite.prototype, "_setParent", {
2178
- enumerable: false,
2179
- configurable: true,
2180
- writable: true,
2181
- value: function (parent, updateChildren) {
2182
- if (updateChildren === void 0) { updateChildren = false; }
2183
- var prevParent = this._parent;
2184
- if (parent !== prevParent) {
2185
- this.markDirtyBounds();
2186
- parent.markDirty();
2187
- this._parent = parent;
2188
- if (updateChildren) {
2189
- this._removeParent(prevParent);
2190
- if (parent) {
2191
- this._addPercentageSizeChildren();
2192
- this._addPercentagePositionChildren();
2193
- }
1725
+ }
1726
+ if ($type.isNumber(minHeight)) {
1727
+ h = Math.max(minHeight, h);
1728
+ }
1729
+ if ($type.isNumber(maxHeight)) {
1730
+ h = Math.min(maxHeight, h);
1731
+ }
1732
+ return h;
1733
+ }
1734
+ _findStaticTemplate(f) {
1735
+ // templateField overrides template
1736
+ if (this._templateField && f(this._templateField)) {
1737
+ return this._templateField;
1738
+ }
1739
+ return super._findStaticTemplate(f);
1740
+ }
1741
+ _walkParents(f) {
1742
+ if (this._parent) {
1743
+ this._walkParent(f);
1744
+ }
1745
+ }
1746
+ _walkParent(f) {
1747
+ if (this._parent) {
1748
+ this._parent._walkParent(f);
1749
+ }
1750
+ f(this);
1751
+ }
1752
+ /**
1753
+ * Parent [[Container]] of this element.
1754
+ *
1755
+ * @return Parent container
1756
+ */
1757
+ get parent() {
1758
+ return this._parent;
1759
+ }
1760
+ _setParent(parent, updateChildren = false) {
1761
+ const prevParent = this._parent;
1762
+ if (parent !== prevParent) {
1763
+ this.markDirtyBounds();
1764
+ parent.markDirty();
1765
+ this._parent = parent;
1766
+ if (updateChildren) {
1767
+ this._removeParent(prevParent);
1768
+ if (parent) {
1769
+ this._addPercentageSizeChildren();
1770
+ this._addPercentagePositionChildren();
2194
1771
  }
2195
- this.markDirtyPosition();
2196
- this._applyThemes();
2197
1772
  }
1773
+ this.markDirtyPosition();
1774
+ this._applyThemes();
2198
1775
  }
2199
- });
1776
+ }
2200
1777
  /**
2201
1778
  * Returns an instance of [[NumberFormatter]] used in this element.
2202
1779
  *
@@ -2205,14 +1782,9 @@ var Sprite = /** @class */ (function (_super) {
2205
1782
  * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info
2206
1783
  * @return NumberFormatter instace
2207
1784
  */
2208
- Object.defineProperty(Sprite.prototype, "getNumberFormatter", {
2209
- enumerable: false,
2210
- configurable: true,
2211
- writable: true,
2212
- value: function () {
2213
- return this.get("numberFormatter", this._root.numberFormatter);
2214
- }
2215
- });
1785
+ getNumberFormatter() {
1786
+ return this.get("numberFormatter", this._root.numberFormatter);
1787
+ }
2216
1788
  /**
2217
1789
  * Returns an instance of [[DateFormatter]] used in this element.
2218
1790
  *
@@ -2221,14 +1793,9 @@ var Sprite = /** @class */ (function (_super) {
2221
1793
  * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info
2222
1794
  * @return DateFormatter instace
2223
1795
  */
2224
- Object.defineProperty(Sprite.prototype, "getDateFormatter", {
2225
- enumerable: false,
2226
- configurable: true,
2227
- writable: true,
2228
- value: function () {
2229
- return this.get("dateFormatter", this._root.dateFormatter);
2230
- }
2231
- });
1796
+ getDateFormatter() {
1797
+ return this.get("dateFormatter", this._root.dateFormatter);
1798
+ }
2232
1799
  /**
2233
1800
  * Returns an instance of [[DurationFormatter]] used in this element.
2234
1801
  *
@@ -2237,118 +1804,81 @@ var Sprite = /** @class */ (function (_super) {
2237
1804
  * @see {@link https://www.amcharts.com/docs/v5/concepts/using-formatters/} for more info
2238
1805
  * @return DurationFormatter instace
2239
1806
  */
2240
- Object.defineProperty(Sprite.prototype, "getDurationFormatter", {
2241
- enumerable: false,
2242
- configurable: true,
2243
- writable: true,
2244
- value: function () {
2245
- return this.get("durationFormatter", this._root.durationFormatter);
2246
- }
2247
- });
1807
+ getDurationFormatter() {
1808
+ return this.get("durationFormatter", this._root.durationFormatter);
1809
+ }
2248
1810
  /**
2249
1811
  * Converts X/Y coordinate within this element to a global coordinate.
2250
1812
  *
2251
1813
  * @param point Local coordinate
2252
1814
  * @return Global coordinate
2253
1815
  */
2254
- Object.defineProperty(Sprite.prototype, "toGlobal", {
2255
- enumerable: false,
2256
- configurable: true,
2257
- writable: true,
2258
- value: function (point) {
2259
- return this._display.toGlobal(point);
2260
- }
2261
- });
1816
+ toGlobal(point) {
1817
+ return this._display.toGlobal(point);
1818
+ }
2262
1819
  /**
2263
1820
  * Converts global X/Y coordinate to a coordinate within this element.
2264
1821
  *
2265
1822
  * @param point Global coordinate
2266
1823
  * @return Local coordinate
2267
1824
  */
2268
- Object.defineProperty(Sprite.prototype, "toLocal", {
2269
- enumerable: false,
2270
- configurable: true,
2271
- writable: true,
2272
- value: function (point) {
2273
- return this._display.toLocal(point);
2274
- }
2275
- });
2276
- Object.defineProperty(Sprite.prototype, "_getDownPoint", {
2277
- enumerable: false,
2278
- configurable: true,
2279
- writable: true,
2280
- value: function () {
2281
- var id = this._getDownPointId();
2282
- if (id) {
2283
- return this._downPoints[id];
2284
- }
2285
- }
2286
- });
2287
- Object.defineProperty(Sprite.prototype, "_getDownPointId", {
2288
- enumerable: false,
2289
- configurable: true,
2290
- writable: true,
2291
- value: function () {
2292
- if (this._downPoints) {
2293
- return $object.keysOrdered(this._downPoints, function (a, b) {
2294
- if (a > b) {
2295
- return 1;
2296
- }
2297
- if (a < b) {
2298
- return -1;
2299
- }
2300
- return 0;
2301
- })[0];
2302
- }
1825
+ toLocal(point) {
1826
+ return this._display.toLocal(point);
1827
+ }
1828
+ _getDownPoint() {
1829
+ const id = this._getDownPointId();
1830
+ if (id) {
1831
+ return this._downPoints[id];
1832
+ }
1833
+ }
1834
+ _getDownPointId() {
1835
+ if (this._downPoints) {
1836
+ return $object.keysOrdered(this._downPoints, (a, b) => {
1837
+ if (a > b) {
1838
+ return 1;
1839
+ }
1840
+ if (a < b) {
1841
+ return -1;
1842
+ }
1843
+ return 0;
1844
+ })[0];
2303
1845
  }
2304
- });
1846
+ }
2305
1847
  /**
2306
1848
  * Moves sprite to the end of the parent's children array.
2307
1849
  *
2308
1850
  * Depending on `layout` setting of the parten container, it may effect the
2309
1851
  * positioning or overlapping order of the elements.
2310
1852
  */
2311
- Object.defineProperty(Sprite.prototype, "toFront", {
2312
- enumerable: false,
2313
- configurable: true,
2314
- writable: true,
2315
- value: function () {
2316
- var parent = this.parent;
2317
- if (parent) {
2318
- parent.children.moveValue(this, parent.children.length - 1);
2319
- }
1853
+ toFront() {
1854
+ const parent = this.parent;
1855
+ if (parent) {
1856
+ parent.children.moveValue(this, parent.children.length - 1);
2320
1857
  }
2321
- });
1858
+ }
2322
1859
  /**
2323
1860
  * Moves sprite to the beginning of the parent's children array.
2324
1861
  *
2325
1862
  * Depending on `layout` setting of the parten container, it may effect the
2326
1863
  * positioning or overlapping order of the elements.
2327
1864
  */
2328
- Object.defineProperty(Sprite.prototype, "toBack", {
2329
- enumerable: false,
2330
- configurable: true,
2331
- writable: true,
2332
- value: function () {
2333
- var parent = this.parent;
2334
- if (parent) {
2335
- parent.children.moveValue(this, 0);
2336
- }
2337
- }
2338
- });
2339
- Object.defineProperty(Sprite, "className", {
2340
- enumerable: true,
2341
- configurable: true,
2342
- writable: true,
2343
- value: "Sprite"
2344
- });
2345
- Object.defineProperty(Sprite, "classNames", {
2346
- enumerable: true,
2347
- configurable: true,
2348
- writable: true,
2349
- value: Entity.classNames.concat([Sprite.className])
2350
- });
2351
- return Sprite;
2352
- }(Entity));
2353
- export { Sprite };
1865
+ toBack() {
1866
+ const parent = this.parent;
1867
+ if (parent) {
1868
+ parent.children.moveValue(this, 0);
1869
+ }
1870
+ }
1871
+ }
1872
+ Object.defineProperty(Sprite, "className", {
1873
+ enumerable: true,
1874
+ configurable: true,
1875
+ writable: true,
1876
+ value: "Sprite"
1877
+ });
1878
+ Object.defineProperty(Sprite, "classNames", {
1879
+ enumerable: true,
1880
+ configurable: true,
1881
+ writable: true,
1882
+ value: Entity.classNames.concat([Sprite.className])
1883
+ });
2354
1884
  //# sourceMappingURL=Sprite.js.map