@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,3 @@
1
- import { __extends, __read, __spreadArray } from "tslib";
2
1
  import { Disposer } from "./Disposer";
3
2
  import { EventDispatcher } from "./EventDispatcher";
4
3
  import { getInterpolate } from "./Animation";
@@ -13,8 +12,8 @@ import * as $order from "./Order";
13
12
  *
14
13
  * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/adapters/} for more info
15
14
  */
16
- var Adapters = /** @class */ (function () {
17
- function Adapters(entity) {
15
+ export class Adapters {
16
+ constructor(entity) {
18
17
  Object.defineProperty(this, "_entity", {
19
18
  enumerable: true,
20
19
  configurable: true,
@@ -40,105 +39,77 @@ var Adapters = /** @class */ (function () {
40
39
  *
41
40
  * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/adapters/} for more info
42
41
  */
43
- Object.defineProperty(Adapters.prototype, "add", {
44
- enumerable: false,
45
- configurable: true,
46
- writable: true,
47
- value: function (key, callback) {
48
- var _this = this;
49
- var callbacks = this._callbacks[key];
50
- if (callbacks === undefined) {
51
- callbacks = this._callbacks[key] = [];
42
+ add(key, callback) {
43
+ let callbacks = this._callbacks[key];
44
+ if (callbacks === undefined) {
45
+ callbacks = this._callbacks[key] = [];
46
+ }
47
+ callbacks.push(callback);
48
+ this._entity._markDirtyKey(key);
49
+ return new Disposer(() => {
50
+ if ($array.removeFirst(callbacks, callback)) {
51
+ this._entity._markDirtyKey(key);
52
52
  }
53
- callbacks.push(callback);
54
- this._entity._markDirtyKey(key);
55
- return new Disposer(function () {
56
- if ($array.removeFirst(callbacks, callback)) {
57
- _this._entity._markDirtyKey(key);
58
- }
59
- });
60
- }
61
- });
53
+ });
54
+ }
62
55
  /**
63
56
  * Removes all adapters for the specific key.
64
57
  *
65
58
  * @since 5.1.0
66
59
  */
67
- Object.defineProperty(Adapters.prototype, "remove", {
68
- enumerable: false,
69
- configurable: true,
70
- writable: true,
71
- value: function (key) {
72
- var callbacks = this._callbacks[key];
73
- if (callbacks !== undefined) {
74
- delete this._callbacks[key];
75
- if (callbacks.length !== 0) {
76
- this._entity._markDirtyKey(key);
77
- }
60
+ remove(key) {
61
+ const callbacks = this._callbacks[key];
62
+ if (callbacks !== undefined) {
63
+ delete this._callbacks[key];
64
+ if (callbacks.length !== 0) {
65
+ this._entity._markDirtyKey(key);
78
66
  }
79
67
  }
80
- });
68
+ }
81
69
  /**
82
70
  * Enables (previously disabled) adapters for specific key.
83
71
  *
84
72
  * @since 5.1.0
85
73
  */
86
- Object.defineProperty(Adapters.prototype, "enable", {
87
- enumerable: false,
88
- configurable: true,
89
- writable: true,
90
- value: function (key) {
91
- if (this._disabled[key]) {
92
- delete this._disabled[key];
93
- this._entity._markDirtyKey(key);
94
- }
74
+ enable(key) {
75
+ if (this._disabled[key]) {
76
+ delete this._disabled[key];
77
+ this._entity._markDirtyKey(key);
95
78
  }
96
- });
79
+ }
97
80
  /**
98
81
  * Disables all adapters for specific key.
99
82
  *
100
83
  * @since 5.1.0
101
84
  */
102
- Object.defineProperty(Adapters.prototype, "disable", {
103
- enumerable: false,
104
- configurable: true,
105
- writable: true,
106
- value: function (key) {
107
- if (!this._disabled[key]) {
108
- this._disabled[key] = true;
109
- this._entity._markDirtyKey(key);
110
- }
85
+ disable(key) {
86
+ if (!this._disabled[key]) {
87
+ this._disabled[key] = true;
88
+ this._entity._markDirtyKey(key);
111
89
  }
112
- });
90
+ }
113
91
  /**
114
92
  * @ignore
115
93
  */
116
- Object.defineProperty(Adapters.prototype, "fold", {
117
- enumerable: false,
118
- configurable: true,
119
- writable: true,
120
- value: function (key, value) {
121
- if (!this._disabled[key]) {
122
- var callbacks = this._callbacks[key];
123
- if (callbacks !== undefined) {
124
- for (var i = 0, len = callbacks.length; i < len; ++i) {
125
- value = callbacks[i](value, this._entity, key);
126
- }
94
+ fold(key, value) {
95
+ if (!this._disabled[key]) {
96
+ const callbacks = this._callbacks[key];
97
+ if (callbacks !== undefined) {
98
+ for (let i = 0, len = callbacks.length; i < len; ++i) {
99
+ value = callbacks[i](value, this._entity, key);
127
100
  }
128
101
  }
129
- return value;
130
102
  }
131
- });
132
- return Adapters;
133
- }());
134
- export { Adapters };
103
+ return value;
104
+ }
105
+ }
135
106
  /**
136
107
  * Animation object.
137
108
  *
138
109
  * @see {@link https://www.amcharts.com/docs/v5/concepts/animations/} for more info
139
110
  */
140
- var Animation = /** @class */ (function () {
141
- function Animation(animation, from, to, duration, easing, loops, startingTime) {
111
+ export class Animation {
112
+ constructor(animation, from, to, duration, easing, loops, startingTime) {
142
113
  Object.defineProperty(this, "_animation", {
143
114
  enumerable: true,
144
115
  configurable: true,
@@ -220,157 +191,94 @@ var Animation = /** @class */ (function () {
220
191
  this._interpolate = getInterpolate(from, to);
221
192
  this._oldTime = startingTime;
222
193
  }
223
- Object.defineProperty(Animation.prototype, "to", {
224
- get: function () {
225
- return this._to;
226
- },
227
- enumerable: false,
228
- configurable: true
229
- });
230
- Object.defineProperty(Animation.prototype, "from", {
231
- get: function () {
232
- return this._from;
233
- },
234
- enumerable: false,
235
- configurable: true
236
- });
237
- Object.defineProperty(Animation.prototype, "playing", {
238
- get: function () {
239
- return this._playing;
240
- },
241
- enumerable: false,
242
- configurable: true
243
- });
244
- Object.defineProperty(Animation.prototype, "stopped", {
245
- get: function () {
246
- return this._stopped;
247
- },
248
- enumerable: false,
249
- configurable: true
250
- });
251
- Object.defineProperty(Animation.prototype, "stop", {
252
- enumerable: false,
253
- configurable: true,
254
- writable: true,
255
- value: function () {
256
- if (!this._stopped) {
257
- this._stopped = true;
258
- this._playing = false;
259
- if (this.events.isEnabled("stopped")) {
260
- this.events.dispatch("stopped", {
261
- type: "stopped",
262
- target: this,
263
- });
264
- }
265
- }
266
- }
267
- });
268
- Object.defineProperty(Animation.prototype, "pause", {
269
- enumerable: false,
270
- configurable: true,
271
- writable: true,
272
- value: function () {
194
+ get to() {
195
+ return this._to;
196
+ }
197
+ get from() {
198
+ return this._from;
199
+ }
200
+ get playing() {
201
+ return this._playing;
202
+ }
203
+ get stopped() {
204
+ return this._stopped;
205
+ }
206
+ stop() {
207
+ if (!this._stopped) {
208
+ this._stopped = true;
273
209
  this._playing = false;
274
- this._oldTime = null;
275
- }
276
- });
277
- Object.defineProperty(Animation.prototype, "play", {
278
- enumerable: false,
279
- configurable: true,
280
- writable: true,
281
- value: function () {
282
- if (!this._stopped && !this._playing) {
283
- this._playing = true;
284
- this._animation._startAnimation();
210
+ if (this.events.isEnabled("stopped")) {
211
+ this.events.dispatch("stopped", {
212
+ type: "stopped",
213
+ target: this,
214
+ });
285
215
  }
286
216
  }
287
- });
288
- Object.defineProperty(Animation.prototype, "percentage", {
289
- get: function () {
290
- return this._time / this._duration;
291
- },
292
- enumerable: false,
293
- configurable: true
294
- });
295
- Object.defineProperty(Animation.prototype, "waitForStop", {
296
- enumerable: false,
297
- configurable: true,
298
- writable: true,
299
- value: function () {
300
- var _this = this;
301
- return new Promise(function (resolve, _reject) {
302
- if (_this._stopped) {
303
- resolve();
304
- }
305
- else {
306
- var listener = function () {
307
- stopped_1.dispose();
308
- resolve();
309
- };
310
- var stopped_1 = _this.events.on("stopped", listener);
311
- }
312
- });
217
+ }
218
+ pause() {
219
+ this._playing = false;
220
+ this._oldTime = null;
221
+ }
222
+ play() {
223
+ if (!this._stopped && !this._playing) {
224
+ this._playing = true;
225
+ this._animation._startAnimation();
313
226
  }
314
- });
315
- Object.defineProperty(Animation.prototype, "_checkEnded", {
316
- enumerable: false,
317
- configurable: true,
318
- writable: true,
319
- value: function () {
320
- if (this._loops > 1) {
321
- --this._loops;
322
- return false;
227
+ }
228
+ get percentage() {
229
+ return this._time / this._duration;
230
+ }
231
+ waitForStop() {
232
+ return new Promise((resolve, _reject) => {
233
+ if (this._stopped) {
234
+ resolve();
323
235
  }
324
236
  else {
325
- return true;
237
+ const listener = () => {
238
+ stopped.dispose();
239
+ resolve();
240
+ };
241
+ const stopped = this.events.on("stopped", listener);
326
242
  }
243
+ });
244
+ }
245
+ _checkEnded() {
246
+ if (this._loops > 1) {
247
+ --this._loops;
248
+ return false;
327
249
  }
328
- });
329
- Object.defineProperty(Animation.prototype, "_run", {
330
- enumerable: false,
331
- configurable: true,
332
- writable: true,
333
- value: function (currentTime) {
334
- if (this._oldTime !== null) {
335
- this._time += currentTime - this._oldTime;
336
- if (this._time > this._duration) {
337
- this._time = this._duration;
338
- }
250
+ else {
251
+ return true;
252
+ }
253
+ }
254
+ _run(currentTime) {
255
+ if (this._oldTime !== null) {
256
+ this._time += currentTime - this._oldTime;
257
+ if (this._time > this._duration) {
258
+ this._time = this._duration;
339
259
  }
340
- this._oldTime = currentTime;
341
- }
342
- });
343
- Object.defineProperty(Animation.prototype, "_reset", {
344
- enumerable: false,
345
- configurable: true,
346
- writable: true,
347
- value: function (currentTime) {
348
- this._oldTime = currentTime;
349
- this._time = 0;
350
- }
351
- });
352
- Object.defineProperty(Animation.prototype, "_value", {
353
- enumerable: false,
354
- configurable: true,
355
- writable: true,
356
- value: function (diff) {
357
- return this._interpolate(this._easing(diff), this._from, this._to);
358
- }
359
- });
360
- return Animation;
361
- }());
362
- export { Animation };
260
+ }
261
+ this._oldTime = currentTime;
262
+ }
263
+ _reset(currentTime) {
264
+ this._oldTime = currentTime;
265
+ this._time = 0;
266
+ }
267
+ _value(diff) {
268
+ return this._interpolate(this._easing(diff), this._from, this._to);
269
+ }
270
+ }
363
271
  /**
364
272
  * @ignore
365
273
  */
366
- var counter = 0;
274
+ let counter = 0;
367
275
  /**
368
276
  * Base class for [[Entity]] objects that support Settings.
369
277
  *
370
278
  * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info
371
279
  */
372
- var Settings = /** @class */ (function () {
373
- function Settings(settings) {
280
+ export class Settings {
281
+ constructor(settings) {
374
282
  /**
375
283
  * Unique ID.
376
284
  */
@@ -443,106 +351,79 @@ var Settings = /** @class */ (function () {
443
351
  });
444
352
  this._settings = settings;
445
353
  }
446
- Object.defineProperty(Settings.prototype, "_checkDirty", {
447
- enumerable: false,
448
- configurable: true,
449
- writable: true,
450
- value: function () {
451
- var _this = this;
452
- $object.keys(this._settings).forEach(function (key) {
453
- _this._userProperties[key] = true;
454
- _this._markDirtyKey(key);
455
- });
456
- }
457
- });
354
+ _checkDirty() {
355
+ $object.keys(this._settings).forEach((key) => {
356
+ this._userProperties[key] = true;
357
+ this._markDirtyKey(key);
358
+ });
359
+ }
458
360
  /**
459
361
  * @ignore
460
362
  */
461
- Object.defineProperty(Settings.prototype, "resetUserSettings", {
462
- enumerable: false,
463
- configurable: true,
464
- writable: true,
465
- value: function () {
466
- this._userProperties = {};
467
- }
468
- });
469
- Object.defineProperty(Settings.prototype, "_runAnimation", {
470
- enumerable: false,
471
- configurable: true,
472
- writable: true,
473
- value: function (currentTime) {
474
- var _this = this;
475
- if (!this.isDisposed()) {
476
- var playing_1 = false;
477
- $object.each(this._animatingSettings, function (key, animation) {
478
- if (animation._stopped) {
479
- _this._stopAnimation(key);
480
- }
481
- else if (animation._playing) {
482
- animation._run(currentTime);
483
- var diff = animation.percentage;
484
- if (diff >= 1) {
485
- if (animation._checkEnded()) {
486
- _this.set(key, animation._value(1));
487
- }
488
- else {
489
- playing_1 = true;
490
- animation._reset(currentTime);
491
- _this._set(key, animation._value(1));
492
- }
363
+ resetUserSettings() {
364
+ this._userProperties = {};
365
+ }
366
+ _runAnimation(currentTime) {
367
+ if (!this.isDisposed()) {
368
+ let playing = false;
369
+ $object.each(this._animatingSettings, (key, animation) => {
370
+ if (animation._stopped) {
371
+ this._stopAnimation(key);
372
+ }
373
+ else if (animation._playing) {
374
+ animation._run(currentTime);
375
+ const diff = animation.percentage;
376
+ if (diff >= 1) {
377
+ if (animation._checkEnded()) {
378
+ this.set(key, animation._value(1));
493
379
  }
494
380
  else {
495
- playing_1 = true;
496
- _this._set(key, animation._value(diff));
381
+ playing = true;
382
+ animation._reset(currentTime);
383
+ this._set(key, animation._value(1));
497
384
  }
498
385
  }
499
- });
500
- $object.each(this._animatingPrivateSettings, function (key, animation) {
501
- if (animation._stopped) {
502
- _this._stopAnimationPrivate(key);
386
+ else {
387
+ playing = true;
388
+ this._set(key, animation._value(diff));
503
389
  }
504
- else if (animation._playing) {
505
- animation._run(currentTime);
506
- var diff = animation.percentage;
507
- if (diff >= 1) {
508
- if (animation._checkEnded()) {
509
- _this.setPrivate(key, animation._value(1));
510
- }
511
- else {
512
- playing_1 = true;
513
- animation._reset(currentTime);
514
- _this._setPrivate(key, animation._value(1));
515
- }
390
+ }
391
+ });
392
+ $object.each(this._animatingPrivateSettings, (key, animation) => {
393
+ if (animation._stopped) {
394
+ this._stopAnimationPrivate(key);
395
+ }
396
+ else if (animation._playing) {
397
+ animation._run(currentTime);
398
+ const diff = animation.percentage;
399
+ if (diff >= 1) {
400
+ if (animation._checkEnded()) {
401
+ this.setPrivate(key, animation._value(1));
516
402
  }
517
403
  else {
518
- playing_1 = true;
519
- _this._setPrivate(key, animation._value(diff));
404
+ playing = true;
405
+ animation._reset(currentTime);
406
+ this._setPrivate(key, animation._value(1));
520
407
  }
521
408
  }
522
- });
523
- return playing_1;
524
- }
525
- else {
526
- return false;
527
- }
409
+ else {
410
+ playing = true;
411
+ this._setPrivate(key, animation._value(diff));
412
+ }
413
+ }
414
+ });
415
+ return playing;
416
+ }
417
+ else {
418
+ return false;
528
419
  }
529
- });
530
- Object.defineProperty(Settings.prototype, "_markDirtyKey", {
531
- enumerable: false,
532
- configurable: true,
533
- writable: true,
534
- value: function (_key) {
535
- this.markDirty();
536
- }
537
- });
538
- Object.defineProperty(Settings.prototype, "_markDirtyPrivateKey", {
539
- enumerable: false,
540
- configurable: true,
541
- writable: true,
542
- value: function (_key) {
543
- this.markDirty();
544
- }
545
- });
420
+ }
421
+ _markDirtyKey(_key) {
422
+ this.markDirty();
423
+ }
424
+ _markDirtyPrivateKey(_key) {
425
+ this.markDirty();
426
+ }
546
427
  /**
547
428
  * Sets a callback function to invoke when specific key of settings changes
548
429
  * or is set.
@@ -552,25 +433,19 @@ var Settings = /** @class */ (function () {
552
433
  * @param callback Callback
553
434
  * @return Disposer for event
554
435
  */
555
- Object.defineProperty(Settings.prototype, "on", {
556
- enumerable: false,
557
- configurable: true,
558
- writable: true,
559
- value: function (key, callback) {
560
- var _this = this;
561
- var events = this._settingEvents[key];
562
- if (events === undefined) {
563
- events = this._settingEvents[key] = [];
564
- }
565
- events.push(callback);
566
- return new Disposer(function () {
567
- $array.removeFirst(events, callback);
568
- if (events.length === 0) {
569
- delete _this._settingEvents[key];
570
- }
571
- });
436
+ on(key, callback) {
437
+ let events = this._settingEvents[key];
438
+ if (events === undefined) {
439
+ events = this._settingEvents[key] = [];
572
440
  }
573
- });
441
+ events.push(callback);
442
+ return new Disposer(() => {
443
+ $array.removeFirst(events, callback);
444
+ if (events.length === 0) {
445
+ delete this._settingEvents[key];
446
+ }
447
+ });
448
+ }
574
449
  /**
575
450
  * Sets a callback function to invoke when specific key of private settings
576
451
  * changes or is set.
@@ -581,133 +456,85 @@ var Settings = /** @class */ (function () {
581
456
  * @param callback Callback
582
457
  * @return Disposer for event
583
458
  */
584
- Object.defineProperty(Settings.prototype, "onPrivate", {
585
- enumerable: false,
586
- configurable: true,
587
- writable: true,
588
- value: function (key, callback) {
589
- var _this = this;
590
- var events = this._privateSettingEvents[key];
591
- if (events === undefined) {
592
- events = this._privateSettingEvents[key] = [];
593
- }
594
- events.push(callback);
595
- return new Disposer(function () {
596
- $array.removeFirst(events, callback);
597
- if (events.length === 0) {
598
- delete _this._privateSettingEvents[key];
599
- }
600
- });
459
+ onPrivate(key, callback) {
460
+ let events = this._privateSettingEvents[key];
461
+ if (events === undefined) {
462
+ events = this._privateSettingEvents[key] = [];
601
463
  }
602
- });
464
+ events.push(callback);
465
+ return new Disposer(() => {
466
+ $array.removeFirst(events, callback);
467
+ if (events.length === 0) {
468
+ delete this._privateSettingEvents[key];
469
+ }
470
+ });
471
+ }
603
472
  /**
604
473
  * @ignore
605
474
  */
606
- Object.defineProperty(Settings.prototype, "getRaw", {
607
- enumerable: false,
608
- configurable: true,
609
- writable: true,
610
- value: function (key, fallback) {
611
- var value = this._settings[key];
612
- if (value !== undefined) {
613
- return value;
614
- }
615
- else {
616
- return fallback;
617
- }
475
+ getRaw(key, fallback) {
476
+ const value = this._settings[key];
477
+ if (value !== undefined) {
478
+ return value;
618
479
  }
619
- });
620
- Object.defineProperty(Settings.prototype, "get", {
621
- enumerable: false,
622
- configurable: true,
623
- writable: true,
624
- value: function (key, fallback) {
625
- return this.getRaw(key, fallback);
626
- }
627
- });
628
- Object.defineProperty(Settings.prototype, "_sendKeyEvent", {
629
- enumerable: false,
630
- configurable: true,
631
- writable: true,
632
- value: function (key, value) {
633
- var _this = this;
634
- var events = this._settingEvents[key];
635
- if (events !== undefined) {
636
- $array.each(events, function (callback) {
637
- callback(value, _this, key);
638
- });
639
- }
480
+ else {
481
+ return fallback;
640
482
  }
641
- });
642
- Object.defineProperty(Settings.prototype, "_sendPrivateKeyEvent", {
643
- enumerable: false,
644
- configurable: true,
645
- writable: true,
646
- value: function (key, value) {
647
- var _this = this;
648
- var events = this._privateSettingEvents[key];
649
- if (events !== undefined) {
650
- $array.each(events, function (callback) {
651
- callback(value, _this, key);
652
- });
653
- }
483
+ }
484
+ get(key, fallback) {
485
+ return this.getRaw(key, fallback);
486
+ }
487
+ _sendKeyEvent(key, value) {
488
+ const events = this._settingEvents[key];
489
+ if (events !== undefined) {
490
+ $array.each(events, (callback) => {
491
+ callback(value, this, key);
492
+ });
493
+ }
494
+ }
495
+ _sendPrivateKeyEvent(key, value) {
496
+ const events = this._privateSettingEvents[key];
497
+ if (events !== undefined) {
498
+ $array.each(events, (callback) => {
499
+ callback(value, this, key);
500
+ });
654
501
  }
655
- });
502
+ }
656
503
  /**
657
504
  * @ignore
658
505
  */
659
- Object.defineProperty(Settings.prototype, "_setRaw", {
660
- enumerable: false,
661
- configurable: true,
662
- writable: true,
663
- value: function (key, old, value) {
664
- this._prevSettings[key] = old;
665
- this._sendKeyEvent(key, value);
666
- }
667
- });
506
+ _setRaw(key, old, value) {
507
+ this._prevSettings[key] = old;
508
+ this._sendKeyEvent(key, value);
509
+ }
668
510
  /**
669
511
  * @ignore
670
512
  */
671
- Object.defineProperty(Settings.prototype, "setRaw", {
672
- enumerable: false,
673
- configurable: true,
674
- writable: true,
675
- value: function (key, value) {
676
- var old = this._settings[key];
677
- this._settings[key] = value;
678
- if (old !== value) {
679
- this._setRaw(key, old, value);
680
- }
513
+ setRaw(key, value) {
514
+ const old = this._settings[key];
515
+ this._settings[key] = value;
516
+ if (old !== value) {
517
+ this._setRaw(key, old, value);
681
518
  }
682
- });
519
+ }
683
520
  /**
684
521
  * @ignore
685
522
  */
686
- Object.defineProperty(Settings.prototype, "_set", {
687
- enumerable: false,
688
- configurable: true,
689
- writable: true,
690
- value: function (key, value) {
691
- var old = this._settings[key];
692
- this._settings[key] = value;
693
- if (old !== value) {
694
- this._setRaw(key, old, value);
695
- this._markDirtyKey(key);
696
- }
523
+ _set(key, value) {
524
+ const old = this._settings[key];
525
+ this._settings[key] = value;
526
+ if (old !== value) {
527
+ this._setRaw(key, old, value);
528
+ this._markDirtyKey(key);
697
529
  }
698
- });
699
- Object.defineProperty(Settings.prototype, "_stopAnimation", {
700
- enumerable: false,
701
- configurable: true,
702
- writable: true,
703
- value: function (key) {
704
- var animation = this._animatingSettings[key];
705
- if (animation) {
706
- delete this._animatingSettings[key];
707
- animation.stop();
708
- }
530
+ }
531
+ _stopAnimation(key) {
532
+ const animation = this._animatingSettings[key];
533
+ if (animation) {
534
+ delete this._animatingSettings[key];
535
+ animation.stop();
709
536
  }
710
- });
537
+ }
711
538
  /**
712
539
  * Sets a setting `value` for the specified `key`, and returns the same `value`.
713
540
  *
@@ -716,155 +543,104 @@ var Settings = /** @class */ (function () {
716
543
  * @param value Setting value
717
544
  * @return Setting value
718
545
  */
719
- Object.defineProperty(Settings.prototype, "set", {
720
- enumerable: false,
721
- configurable: true,
722
- writable: true,
723
- value: function (key, value) {
724
- this._set(key, value);
725
- this._stopAnimation(key);
726
- return value;
727
- }
728
- });
546
+ set(key, value) {
547
+ this._set(key, value);
548
+ this._stopAnimation(key);
549
+ return value;
550
+ }
729
551
  /**
730
552
  * Removes a setting value for the specified `key`;
731
553
  *
732
554
  * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info
733
555
  * @param key Setting key
734
556
  */
735
- Object.defineProperty(Settings.prototype, "remove", {
736
- enumerable: false,
737
- configurable: true,
738
- writable: true,
739
- value: function (key) {
740
- if (key in this._settings) {
741
- this._prevSettings[key] = this._settings[key];
742
- delete this._settings[key];
743
- this._sendKeyEvent(key, undefined);
744
- this._markDirtyKey(key);
745
- }
746
- this._stopAnimation(key);
747
- }
748
- });
557
+ remove(key) {
558
+ if (key in this._settings) {
559
+ this._prevSettings[key] = this._settings[key];
560
+ delete this._settings[key];
561
+ this._sendKeyEvent(key, undefined);
562
+ this._markDirtyKey(key);
563
+ }
564
+ this._stopAnimation(key);
565
+ }
749
566
  /**
750
567
  * Removes all keys;
751
568
  *
752
569
  * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info
753
570
  */
754
- Object.defineProperty(Settings.prototype, "removeAll", {
755
- enumerable: false,
756
- configurable: true,
757
- writable: true,
758
- value: function () {
759
- var _this = this;
760
- $array.each($object.keys(this._settings), function (key) {
761
- _this.remove(key);
762
- });
763
- }
764
- });
571
+ removeAll() {
572
+ $array.each($object.keys(this._settings), (key) => {
573
+ this.remove(key);
574
+ });
575
+ }
765
576
  /**
766
577
  * Returns a value of a private setting.
767
578
  *
768
579
  * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/#Private_settings} for more info
769
580
  */
770
- Object.defineProperty(Settings.prototype, "getPrivate", {
771
- enumerable: false,
772
- configurable: true,
773
- writable: true,
774
- value: function (key, fallback) {
775
- var value = this._privateSettings[key];
776
- if (value !== undefined) {
777
- return value;
778
- }
779
- else {
780
- return fallback;
781
- }
581
+ getPrivate(key, fallback) {
582
+ const value = this._privateSettings[key];
583
+ if (value !== undefined) {
584
+ return value;
782
585
  }
783
- });
586
+ else {
587
+ return fallback;
588
+ }
589
+ }
784
590
  /**
785
591
  * @ignore
786
592
  */
787
- Object.defineProperty(Settings.prototype, "_setPrivateRaw", {
788
- enumerable: false,
789
- configurable: true,
790
- writable: true,
791
- value: function (key, old, value) {
792
- this._prevPrivateSettings[key] = old;
793
- this._sendPrivateKeyEvent(key, value);
794
- }
795
- });
593
+ _setPrivateRaw(key, old, value) {
594
+ this._prevPrivateSettings[key] = old;
595
+ this._sendPrivateKeyEvent(key, value);
596
+ }
796
597
  /**
797
598
  * @ignore
798
599
  */
799
- Object.defineProperty(Settings.prototype, "setPrivateRaw", {
800
- enumerable: false,
801
- configurable: true,
802
- writable: true,
803
- value: function (key, value) {
804
- var old = this._privateSettings[key];
805
- this._privateSettings[key] = value;
806
- if (old !== value) {
807
- this._setPrivateRaw(key, old, value);
808
- }
600
+ setPrivateRaw(key, value) {
601
+ const old = this._privateSettings[key];
602
+ this._privateSettings[key] = value;
603
+ if (old !== value) {
604
+ this._setPrivateRaw(key, old, value);
809
605
  }
810
- });
606
+ }
811
607
  /**
812
608
  * @ignore
813
609
  */
814
- Object.defineProperty(Settings.prototype, "_setPrivate", {
815
- enumerable: false,
816
- configurable: true,
817
- writable: true,
818
- value: function (key, value) {
819
- var old = this._privateSettings[key];
820
- this._privateSettings[key] = value;
821
- if (old !== value) {
822
- this._setPrivateRaw(key, old, value);
823
- this._markDirtyPrivateKey(key);
824
- }
610
+ _setPrivate(key, value) {
611
+ const old = this._privateSettings[key];
612
+ this._privateSettings[key] = value;
613
+ if (old !== value) {
614
+ this._setPrivateRaw(key, old, value);
615
+ this._markDirtyPrivateKey(key);
825
616
  }
826
- });
827
- Object.defineProperty(Settings.prototype, "_stopAnimationPrivate", {
828
- enumerable: false,
829
- configurable: true,
830
- writable: true,
831
- value: function (key) {
832
- var animation = this._animatingPrivateSettings[key];
833
- if (animation) {
834
- animation.stop();
835
- delete this._animatingPrivateSettings[key];
836
- }
617
+ }
618
+ _stopAnimationPrivate(key) {
619
+ const animation = this._animatingPrivateSettings[key];
620
+ if (animation) {
621
+ animation.stop();
622
+ delete this._animatingPrivateSettings[key];
837
623
  }
838
- });
624
+ }
839
625
  /**
840
626
  * @ignore
841
627
  */
842
- Object.defineProperty(Settings.prototype, "setPrivate", {
843
- enumerable: false,
844
- configurable: true,
845
- writable: true,
846
- value: function (key, value) {
847
- this._setPrivate(key, value);
848
- this._stopAnimationPrivate(key);
849
- return value;
850
- }
851
- });
628
+ setPrivate(key, value) {
629
+ this._setPrivate(key, value);
630
+ this._stopAnimationPrivate(key);
631
+ return value;
632
+ }
852
633
  /**
853
634
  * @ignore
854
635
  */
855
- Object.defineProperty(Settings.prototype, "removePrivate", {
856
- enumerable: false,
857
- configurable: true,
858
- writable: true,
859
- value: function (key) {
860
- if (key in this._privateSettings) {
861
- this._prevPrivateSettings[key] = this._privateSettings[key];
862
- delete this._privateSettings[key];
863
- this._markDirtyPrivateKey(key);
864
- }
865
- this._stopAnimationPrivate(key);
636
+ removePrivate(key) {
637
+ if (key in this._privateSettings) {
638
+ this._prevPrivateSettings[key] = this._privateSettings[key];
639
+ delete this._privateSettings[key];
640
+ this._markDirtyPrivateKey(key);
866
641
  }
867
- });
642
+ this._stopAnimationPrivate(key);
643
+ }
868
644
  /**
869
645
  * Sets multiple settings at once.
870
646
  *
@@ -873,17 +649,11 @@ var Settings = /** @class */ (function () {
873
649
  * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info
874
650
  * @param settings Settings
875
651
  */
876
- Object.defineProperty(Settings.prototype, "setAll", {
877
- enumerable: false,
878
- configurable: true,
879
- writable: true,
880
- value: function (settings) {
881
- var _this = this;
882
- $object.each(settings, function (key, value) {
883
- _this.set(key, value);
884
- });
885
- }
886
- });
652
+ setAll(settings) {
653
+ $object.each(settings, (key, value) => {
654
+ this.set(key, value);
655
+ });
656
+ }
887
657
  /**
888
658
  * Animates setting values from current/start values to new ones.
889
659
  *
@@ -891,112 +661,84 @@ var Settings = /** @class */ (function () {
891
661
  * @param options Animation options
892
662
  * @return Animation object
893
663
  */
894
- Object.defineProperty(Settings.prototype, "animate", {
895
- enumerable: false,
896
- configurable: true,
897
- writable: true,
898
- value: function (options) {
899
- var key = options.key;
900
- var to = options.to;
901
- var duration = options.duration || 0;
902
- var loops = options.loops || 1;
903
- var from = (options.from === undefined ? this.get(key) : options.from);
904
- var easing = (options.easing === undefined ? $ease.linear : options.easing);
905
- if (duration === 0) {
664
+ animate(options) {
665
+ const key = options.key;
666
+ const to = options.to;
667
+ const duration = options.duration || 0;
668
+ const loops = options.loops || 1;
669
+ const from = (options.from === undefined ? this.get(key) : options.from);
670
+ const easing = (options.easing === undefined ? $ease.linear : options.easing);
671
+ if (duration === 0) {
672
+ this.set(key, to);
673
+ }
674
+ else {
675
+ if (from === undefined || from === to) {
906
676
  this.set(key, to);
907
677
  }
908
678
  else {
909
- if (from === undefined || from === to) {
910
- this.set(key, to);
911
- }
912
- else {
913
- this.set(key, from);
914
- var animation_1 = this._animatingSettings[key] = new Animation(this, from, to, duration, easing, loops, this._animationTime());
915
- this._startAnimation();
916
- return animation_1;
917
- }
679
+ this.set(key, from);
680
+ const animation = this._animatingSettings[key] = new Animation(this, from, to, duration, easing, loops, this._animationTime());
681
+ this._startAnimation();
682
+ return animation;
918
683
  }
919
- var animation = new Animation(this, from, to, duration, easing, loops, null);
920
- animation.stop();
921
- return animation;
922
684
  }
923
- });
685
+ const animation = new Animation(this, from, to, duration, easing, loops, null);
686
+ animation.stop();
687
+ return animation;
688
+ }
924
689
  /**
925
690
  * @ignore
926
691
  */
927
- Object.defineProperty(Settings.prototype, "animatePrivate", {
928
- enumerable: false,
929
- configurable: true,
930
- writable: true,
931
- value: function (options) {
932
- var key = options.key;
933
- var to = options.to;
934
- var duration = options.duration || 0;
935
- var loops = options.loops || 1;
936
- var from = (options.from === undefined ? this.getPrivate(key) : options.from);
937
- var easing = (options.easing === undefined ? $ease.linear : options.easing);
938
- if (duration === 0) {
692
+ animatePrivate(options) {
693
+ const key = options.key;
694
+ const to = options.to;
695
+ const duration = options.duration || 0;
696
+ const loops = options.loops || 1;
697
+ const from = (options.from === undefined ? this.getPrivate(key) : options.from);
698
+ const easing = (options.easing === undefined ? $ease.linear : options.easing);
699
+ if (duration === 0) {
700
+ this.setPrivate(key, to);
701
+ }
702
+ else {
703
+ if (from === undefined || from === to) {
939
704
  this.setPrivate(key, to);
940
705
  }
941
706
  else {
942
- if (from === undefined || from === to) {
943
- this.setPrivate(key, to);
944
- }
945
- else {
946
- this.setPrivate(key, from);
947
- var animation_2 = this._animatingPrivateSettings[key] = new Animation(this, from, to, duration, easing, loops, this._animationTime());
948
- this._startAnimation();
949
- return animation_2;
950
- }
707
+ this.setPrivate(key, from);
708
+ const animation = this._animatingPrivateSettings[key] = new Animation(this, from, to, duration, easing, loops, this._animationTime());
709
+ this._startAnimation();
710
+ return animation;
951
711
  }
952
- var animation = new Animation(this, from, to, duration, easing, loops, null);
953
- animation.stop();
954
- return animation;
955
- }
956
- });
957
- Object.defineProperty(Settings.prototype, "_dispose", {
958
- enumerable: false,
959
- configurable: true,
960
- writable: true,
961
- value: function () { }
962
- });
712
+ }
713
+ const animation = new Animation(this, from, to, duration, easing, loops, null);
714
+ animation.stop();
715
+ return animation;
716
+ }
717
+ _dispose() { }
963
718
  /**
964
719
  * Returns `true` if this element is disposed.
965
720
  *
966
721
  * @return Disposed
967
722
  */
968
- Object.defineProperty(Settings.prototype, "isDisposed", {
969
- enumerable: false,
970
- configurable: true,
971
- writable: true,
972
- value: function () {
973
- return this._disposed;
974
- }
975
- });
723
+ isDisposed() {
724
+ return this._disposed;
725
+ }
976
726
  /**
977
727
  * Disposes this object.
978
728
  */
979
- Object.defineProperty(Settings.prototype, "dispose", {
980
- enumerable: false,
981
- configurable: true,
982
- writable: true,
983
- value: function () {
984
- if (!this._disposed) {
985
- this._disposed = true;
986
- this._dispose();
987
- }
729
+ dispose() {
730
+ if (!this._disposed) {
731
+ this._disposed = true;
732
+ this._dispose();
988
733
  }
989
- });
990
- return Settings;
991
- }());
992
- export { Settings };
734
+ }
735
+ }
993
736
  /**
994
737
  * Base class.
995
738
  *
996
739
  * @important
997
740
  */
998
- var Entity = /** @class */ (function (_super) {
999
- __extends(Entity, _super);
741
+ export class Entity extends Settings {
1000
742
  /**
1001
743
  * IMPORTANT! Do not instantiate this class via `new Class()` syntax.
1002
744
  *
@@ -1005,105 +747,104 @@ var Entity = /** @class */ (function (_super) {
1005
747
  * @see {@link https://www.amcharts.com/docs/v5/getting-started/#New_element_syntax} for more info
1006
748
  * @ignore
1007
749
  */
1008
- function Entity(root, settings, isReal, templates) {
1009
- if (templates === void 0) { templates = []; }
1010
- var _this = _super.call(this, settings) || this;
1011
- Object.defineProperty(_this, "_root", {
750
+ constructor(root, settings, isReal, templates = []) {
751
+ super(settings);
752
+ Object.defineProperty(this, "_root", {
1012
753
  enumerable: true,
1013
754
  configurable: true,
1014
755
  writable: true,
1015
756
  value: void 0
1016
757
  });
1017
- Object.defineProperty(_this, "_user_id", {
758
+ Object.defineProperty(this, "_user_id", {
1018
759
  enumerable: true,
1019
760
  configurable: true,
1020
761
  writable: true,
1021
762
  value: void 0
1022
763
  }); // for testing purposes
1023
- Object.defineProperty(_this, "states", {
764
+ Object.defineProperty(this, "states", {
1024
765
  enumerable: true,
1025
766
  configurable: true,
1026
767
  writable: true,
1027
- value: new States(_this)
768
+ value: new States(this)
1028
769
  });
1029
- Object.defineProperty(_this, "adapters", {
770
+ Object.defineProperty(this, "adapters", {
1030
771
  enumerable: true,
1031
772
  configurable: true,
1032
773
  writable: true,
1033
- value: new Adapters(_this)
774
+ value: new Adapters(this)
1034
775
  });
1035
- Object.defineProperty(_this, "events", {
776
+ Object.defineProperty(this, "events", {
1036
777
  enumerable: true,
1037
778
  configurable: true,
1038
779
  writable: true,
1039
- value: _this._createEvents()
780
+ value: this._createEvents()
1040
781
  });
1041
- Object.defineProperty(_this, "_userPrivateProperties", {
782
+ Object.defineProperty(this, "_userPrivateProperties", {
1042
783
  enumerable: true,
1043
784
  configurable: true,
1044
785
  writable: true,
1045
786
  value: {}
1046
787
  });
1047
- Object.defineProperty(_this, "_dirty", {
788
+ Object.defineProperty(this, "_dirty", {
1048
789
  enumerable: true,
1049
790
  configurable: true,
1050
791
  writable: true,
1051
792
  value: {}
1052
793
  });
1053
- Object.defineProperty(_this, "_dirtyPrivate", {
794
+ Object.defineProperty(this, "_dirtyPrivate", {
1054
795
  enumerable: true,
1055
796
  configurable: true,
1056
797
  writable: true,
1057
798
  value: {}
1058
799
  });
1059
- Object.defineProperty(_this, "_template", {
800
+ Object.defineProperty(this, "_template", {
1060
801
  enumerable: true,
1061
802
  configurable: true,
1062
803
  writable: true,
1063
804
  value: void 0
1064
805
  });
1065
806
  // Templates for the themes
1066
- Object.defineProperty(_this, "_templates", {
807
+ Object.defineProperty(this, "_templates", {
1067
808
  enumerable: true,
1068
809
  configurable: true,
1069
810
  writable: true,
1070
811
  value: []
1071
812
  });
1072
813
  // Internal templates which can be overridden by the user's templates
1073
- Object.defineProperty(_this, "_internalTemplates", {
814
+ Object.defineProperty(this, "_internalTemplates", {
1074
815
  enumerable: true,
1075
816
  configurable: true,
1076
817
  writable: true,
1077
818
  value: void 0
1078
819
  });
1079
820
  // Default themes which can be overridden by the user's themes
1080
- Object.defineProperty(_this, "_defaultThemes", {
821
+ Object.defineProperty(this, "_defaultThemes", {
1081
822
  enumerable: true,
1082
823
  configurable: true,
1083
824
  writable: true,
1084
825
  value: []
1085
826
  });
1086
827
  // Disposers for all of the templates
1087
- Object.defineProperty(_this, "_templateDisposers", {
828
+ Object.defineProperty(this, "_templateDisposers", {
1088
829
  enumerable: true,
1089
830
  configurable: true,
1090
831
  writable: true,
1091
832
  value: []
1092
833
  });
1093
- Object.defineProperty(_this, "_disposers", {
834
+ Object.defineProperty(this, "_disposers", {
1094
835
  enumerable: true,
1095
836
  configurable: true,
1096
837
  writable: true,
1097
838
  value: []
1098
839
  });
1099
840
  // Whether the template setup function should be run
1100
- Object.defineProperty(_this, "_runSetup", {
841
+ Object.defineProperty(this, "_runSetup", {
1101
842
  enumerable: true,
1102
843
  configurable: true,
1103
844
  writable: true,
1104
845
  value: true
1105
846
  });
1106
- Object.defineProperty(_this, "_disposerProperties", {
847
+ Object.defineProperty(this, "_disposerProperties", {
1107
848
  enumerable: true,
1108
849
  configurable: true,
1109
850
  writable: true,
@@ -1112,12 +853,11 @@ var Entity = /** @class */ (function (_super) {
1112
853
  if (!isReal) {
1113
854
  throw new Error("You cannot use `new Class()`, instead use `Class.new()`");
1114
855
  }
1115
- _this._root = root;
1116
- _this._internalTemplates = templates;
856
+ this._root = root;
857
+ this._internalTemplates = templates;
1117
858
  if (settings.id) {
1118
- _this._registerId(settings.id);
859
+ this._registerId(settings.id);
1119
860
  }
1120
- return _this;
1121
861
  }
1122
862
  /**
1123
863
  * Use this method to create an instance of this class.
@@ -1128,300 +868,180 @@ var Entity = /** @class */ (function (_super) {
1128
868
  * @param template Template
1129
869
  * @return Instantiated object
1130
870
  */
1131
- Object.defineProperty(Entity, "new", {
1132
- enumerable: false,
1133
- configurable: true,
1134
- writable: true,
1135
- value: function (root, settings, template) {
1136
- var x = (new this(root, settings, true));
1137
- x._template = template;
1138
- x._afterNew();
1139
- return x;
1140
- }
1141
- });
1142
- Object.defineProperty(Entity, "_new", {
1143
- enumerable: false,
1144
- configurable: true,
1145
- writable: true,
1146
- value: function (root, settings, templates) {
1147
- if (templates === void 0) { templates = []; }
1148
- var x = (new this(root, settings, true, templates));
1149
- x._afterNew();
1150
- return x;
1151
- }
1152
- });
1153
- Object.defineProperty(Entity.prototype, "_afterNew", {
1154
- enumerable: false,
1155
- configurable: true,
1156
- writable: true,
1157
- value: function () {
1158
- var _this = this;
1159
- this._checkDirty();
1160
- var shouldApply = false;
1161
- var template = this._template;
1162
- if (template) {
1163
- shouldApply = true;
1164
- template._setObjectTemplate(this);
1165
- }
1166
- $array.each(this._internalTemplates, function (template) {
1167
- shouldApply = true;
1168
- template._setObjectTemplate(_this);
1169
- });
1170
- if (shouldApply) {
1171
- this._applyTemplates(false);
1172
- }
1173
- this.states.create("default", {});
1174
- this._setDefaults();
871
+ static new(root, settings, template) {
872
+ const x = (new this(root, settings, true));
873
+ x._template = template;
874
+ x._afterNew();
875
+ return x;
876
+ }
877
+ static _new(root, settings, templates = []) {
878
+ const x = (new this(root, settings, true, templates));
879
+ x._afterNew();
880
+ return x;
881
+ }
882
+ _afterNew() {
883
+ this._checkDirty();
884
+ let shouldApply = false;
885
+ const template = this._template;
886
+ if (template) {
887
+ shouldApply = true;
888
+ template._setObjectTemplate(this);
889
+ }
890
+ $array.each(this._internalTemplates, (template) => {
891
+ shouldApply = true;
892
+ template._setObjectTemplate(this);
893
+ });
894
+ if (shouldApply) {
895
+ this._applyTemplates(false);
1175
896
  }
1176
- });
897
+ this.states.create("default", {});
898
+ this._setDefaults();
899
+ }
1177
900
  // This is the same as _afterNew, except it also applies the themes.
1178
901
  // This should only be used for classes which don't have a parent (because they extend from Entity and not Sprite).
1179
- Object.defineProperty(Entity.prototype, "_afterNewApplyThemes", {
1180
- enumerable: false,
1181
- configurable: true,
1182
- writable: true,
1183
- value: function () {
1184
- var _this = this;
1185
- this._checkDirty();
1186
- var template = this._template;
1187
- if (template) {
1188
- template._setObjectTemplate(this);
1189
- }
1190
- $array.each(this._internalTemplates, function (template) {
1191
- template._setObjectTemplate(_this);
1192
- });
1193
- this.states.create("default", {});
1194
- this._setDefaults();
1195
- this._applyThemes();
1196
- }
1197
- });
1198
- Object.defineProperty(Entity.prototype, "_createEvents", {
1199
- enumerable: false,
1200
- configurable: true,
1201
- writable: true,
1202
- value: function () {
1203
- return new EventDispatcher();
1204
- }
1205
- });
1206
- Object.defineProperty(Entity.prototype, "classNames", {
1207
- /**
1208
- * @ignore
1209
- */
1210
- get: function () {
1211
- return this.constructor.classNames;
1212
- },
1213
- enumerable: false,
1214
- configurable: true
1215
- });
1216
- Object.defineProperty(Entity.prototype, "className", {
1217
- /**
1218
- * @ignore
1219
- */
1220
- get: function () {
1221
- return this.constructor.className;
1222
- },
1223
- enumerable: false,
1224
- configurable: true
1225
- });
1226
- Object.defineProperty(Entity.prototype, "_setDefaults", {
1227
- enumerable: false,
1228
- configurable: true,
1229
- writable: true,
1230
- value: function () {
1231
- }
1232
- });
1233
- Object.defineProperty(Entity.prototype, "_setDefault", {
1234
- enumerable: false,
1235
- configurable: true,
1236
- writable: true,
1237
- value: function (key, value) {
1238
- if (!(key in this._settings)) {
1239
- _super.prototype.set.call(this, key, value);
1240
- }
1241
- }
1242
- });
1243
- Object.defineProperty(Entity.prototype, "_setRawDefault", {
1244
- enumerable: false,
1245
- configurable: true,
1246
- writable: true,
1247
- value: function (key, value) {
1248
- if (!(key in this._settings)) {
1249
- _super.prototype.setRaw.call(this, key, value);
1250
- }
902
+ _afterNewApplyThemes() {
903
+ this._checkDirty();
904
+ const template = this._template;
905
+ if (template) {
906
+ template._setObjectTemplate(this);
907
+ }
908
+ $array.each(this._internalTemplates, (template) => {
909
+ template._setObjectTemplate(this);
910
+ });
911
+ this.states.create("default", {});
912
+ this._setDefaults();
913
+ this._applyThemes();
914
+ }
915
+ _createEvents() {
916
+ return new EventDispatcher();
917
+ }
918
+ /**
919
+ * @ignore
920
+ */
921
+ get classNames() {
922
+ return this.constructor.classNames;
923
+ }
924
+ /**
925
+ * @ignore
926
+ */
927
+ get className() {
928
+ return this.constructor.className;
929
+ }
930
+ _setDefaults() {
931
+ }
932
+ _setDefault(key, value) {
933
+ if (!(key in this._settings)) {
934
+ super.set(key, value);
1251
935
  }
1252
- });
1253
- Object.defineProperty(Entity.prototype, "_clearDirty", {
1254
- enumerable: false,
1255
- configurable: true,
1256
- writable: true,
1257
- value: function () {
1258
- var _this = this;
1259
- $object.keys(this._dirty).forEach(function (key) {
1260
- _this._dirty[key] = false;
1261
- });
1262
- $object.keys(this._dirtyPrivate).forEach(function (key) {
1263
- _this._dirtyPrivate[key] = false;
1264
- });
936
+ }
937
+ _setRawDefault(key, value) {
938
+ if (!(key in this._settings)) {
939
+ super.setRaw(key, value);
1265
940
  }
1266
- });
941
+ }
942
+ _clearDirty() {
943
+ $object.keys(this._dirty).forEach((key) => {
944
+ this._dirty[key] = false;
945
+ });
946
+ $object.keys(this._dirtyPrivate).forEach((key) => {
947
+ this._dirtyPrivate[key] = false;
948
+ });
949
+ }
1267
950
  /**
1268
951
  * @ignore
1269
952
  */
1270
- Object.defineProperty(Entity.prototype, "isDirty", {
1271
- enumerable: false,
1272
- configurable: true,
1273
- writable: true,
1274
- value: function (key) {
1275
- return !!this._dirty[key];
1276
- }
1277
- });
953
+ isDirty(key) {
954
+ return !!this._dirty[key];
955
+ }
1278
956
  /**
1279
957
  * @ignore
1280
958
  */
1281
- Object.defineProperty(Entity.prototype, "isPrivateDirty", {
1282
- enumerable: false,
1283
- configurable: true,
1284
- writable: true,
1285
- value: function (key) {
1286
- return !!this._dirtyPrivate[key];
1287
- }
1288
- });
1289
- Object.defineProperty(Entity.prototype, "_markDirtyKey", {
1290
- enumerable: false,
1291
- configurable: true,
1292
- writable: true,
1293
- value: function (key) {
1294
- this._dirty[key] = true;
1295
- _super.prototype._markDirtyKey.call(this, key);
1296
- }
1297
- });
1298
- Object.defineProperty(Entity.prototype, "_markDirtyPrivateKey", {
1299
- enumerable: false,
1300
- configurable: true,
1301
- writable: true,
1302
- value: function (key) {
1303
- this._dirtyPrivate[key] = true;
1304
- _super.prototype._markDirtyKey.call(this, key);
1305
- }
1306
- });
959
+ isPrivateDirty(key) {
960
+ return !!this._dirtyPrivate[key];
961
+ }
962
+ _markDirtyKey(key) {
963
+ this._dirty[key] = true;
964
+ super._markDirtyKey(key);
965
+ }
966
+ _markDirtyPrivateKey(key) {
967
+ this._dirtyPrivate[key] = true;
968
+ super._markDirtyKey(key);
969
+ }
1307
970
  /**
1308
971
  * Checks if element is of certain class (or inherits one).
1309
972
  *
1310
973
  * @param type Class name to check
1311
974
  * @return {boolean} Is of class?
1312
975
  */
1313
- Object.defineProperty(Entity.prototype, "isType", {
1314
- enumerable: false,
1315
- configurable: true,
1316
- writable: true,
1317
- value: function (type) {
1318
- return this.classNames.indexOf(type) !== -1;
1319
- }
1320
- });
1321
- Object.defineProperty(Entity.prototype, "_pushPropertyDisposer", {
1322
- enumerable: false,
1323
- configurable: true,
1324
- writable: true,
1325
- value: function (key, disposer) {
1326
- var disposers = this._disposerProperties[key];
1327
- if (disposers === undefined) {
1328
- disposers = this._disposerProperties[key] = [];
976
+ isType(type) {
977
+ return this.classNames.indexOf(type) !== -1;
978
+ }
979
+ _pushPropertyDisposer(key, disposer) {
980
+ let disposers = this._disposerProperties[key];
981
+ if (disposers === undefined) {
982
+ disposers = this._disposerProperties[key] = [];
983
+ }
984
+ disposers.push(disposer);
985
+ return disposer;
986
+ }
987
+ _disposeProperty(key) {
988
+ const disposers = this._disposerProperties[key];
989
+ if (disposers !== undefined) {
990
+ $array.each(disposers, (disposer) => {
991
+ disposer.dispose();
992
+ });
993
+ delete this._disposerProperties[key];
994
+ }
995
+ }
996
+ /**
997
+ * @todo needs description
998
+ * @param value Template
999
+ */
1000
+ set template(value) {
1001
+ const template = this._template;
1002
+ if (template !== value) {
1003
+ this._template = value;
1004
+ if (template) {
1005
+ template._removeObjectTemplate(this);
1329
1006
  }
1330
- disposers.push(disposer);
1331
- return disposer;
1332
- }
1333
- });
1334
- Object.defineProperty(Entity.prototype, "_disposeProperty", {
1335
- enumerable: false,
1336
- configurable: true,
1337
- writable: true,
1338
- value: function (key) {
1339
- var disposers = this._disposerProperties[key];
1340
- if (disposers !== undefined) {
1341
- $array.each(disposers, function (disposer) {
1342
- disposer.dispose();
1343
- });
1344
- delete this._disposerProperties[key];
1007
+ if (value) {
1008
+ value._setObjectTemplate(this);
1345
1009
  }
1010
+ this._applyTemplates();
1346
1011
  }
1347
- });
1348
- Object.defineProperty(Entity.prototype, "template", {
1349
- get: function () {
1350
- return this._template;
1351
- },
1352
- /**
1353
- * @todo needs description
1354
- * @param value Template
1355
- */
1356
- set: function (value) {
1357
- var template = this._template;
1358
- if (template !== value) {
1359
- this._template = value;
1360
- if (template) {
1361
- template._removeObjectTemplate(this);
1362
- }
1363
- if (value) {
1364
- value._setObjectTemplate(this);
1365
- }
1366
- this._applyTemplates();
1367
- }
1368
- },
1369
- enumerable: false,
1370
- configurable: true
1371
- });
1012
+ }
1013
+ get template() {
1014
+ return this._template;
1015
+ }
1372
1016
  /**
1373
1017
  * @ignore
1374
1018
  */
1375
- Object.defineProperty(Entity.prototype, "markDirty", {
1376
- enumerable: false,
1377
- configurable: true,
1378
- writable: true,
1379
- value: function () {
1380
- this._root._addDirtyEntity(this);
1381
- }
1382
- });
1383
- Object.defineProperty(Entity.prototype, "_startAnimation", {
1384
- enumerable: false,
1385
- configurable: true,
1386
- writable: true,
1387
- value: function () {
1388
- this._root._addAnimation(this);
1389
- }
1390
- });
1391
- Object.defineProperty(Entity.prototype, "_animationTime", {
1392
- enumerable: false,
1393
- configurable: true,
1394
- writable: true,
1395
- value: function () {
1396
- return this._root.animationTime;
1397
- }
1398
- });
1399
- Object.defineProperty(Entity.prototype, "_applyState", {
1400
- enumerable: false,
1401
- configurable: true,
1402
- writable: true,
1403
- value: function (_name) { }
1404
- });
1405
- Object.defineProperty(Entity.prototype, "_applyStateAnimated", {
1406
- enumerable: false,
1407
- configurable: true,
1408
- writable: true,
1409
- value: function (_name, _duration) { }
1410
- });
1411
- Object.defineProperty(Entity.prototype, "get", {
1412
- enumerable: false,
1413
- configurable: true,
1414
- writable: true,
1415
- value: function (key, fallback) {
1416
- var value = this.adapters.fold(key, this._settings[key]);
1417
- if (value !== undefined) {
1418
- return value;
1419
- }
1420
- else {
1421
- return fallback;
1422
- }
1019
+ markDirty() {
1020
+ this._root._addDirtyEntity(this);
1021
+ }
1022
+ _startAnimation() {
1023
+ this._root._addAnimation(this);
1024
+ }
1025
+ _animationTime() {
1026
+ return this._root.animationTime;
1027
+ }
1028
+ _applyState(_name) { }
1029
+ _applyStateAnimated(_name, _duration) { }
1030
+ get(key, fallback) {
1031
+ const value = this.adapters.fold(key, this._settings[key]);
1032
+ if (value !== undefined) {
1033
+ return value;
1034
+ }
1035
+ else {
1036
+ return fallback;
1423
1037
  }
1424
- });
1038
+ }
1039
+ /**
1040
+ * @ignore
1041
+ */
1042
+ isUserSetting(key) {
1043
+ return this._userProperties[key] || false;
1044
+ }
1425
1045
  /**
1426
1046
  * Sets a setting `value` for the specified `key`, and returns the same `value`.
1427
1047
  *
@@ -1430,27 +1050,17 @@ var Entity = /** @class */ (function (_super) {
1430
1050
  * @param value Setting value
1431
1051
  * @return Setting value
1432
1052
  */
1433
- Object.defineProperty(Entity.prototype, "set", {
1434
- enumerable: false,
1435
- configurable: true,
1436
- writable: true,
1437
- value: function (key, value) {
1438
- this._userProperties[key] = true;
1439
- return _super.prototype.set.call(this, key, value);
1440
- }
1441
- });
1053
+ set(key, value) {
1054
+ this._userProperties[key] = true;
1055
+ return super.set(key, value);
1056
+ }
1442
1057
  /**
1443
1058
  * @ignore
1444
1059
  */
1445
- Object.defineProperty(Entity.prototype, "setRaw", {
1446
- enumerable: false,
1447
- configurable: true,
1448
- writable: true,
1449
- value: function (key, value) {
1450
- this._userProperties[key] = true;
1451
- _super.prototype.setRaw.call(this, key, value);
1452
- }
1453
- });
1060
+ setRaw(key, value) {
1061
+ this._userProperties[key] = true;
1062
+ super.setRaw(key, value);
1063
+ }
1454
1064
  /**
1455
1065
  * Sets a setting `value` for the specified `key` only if the value for this key was not set previously using set method, and returns the same `value`.
1456
1066
  *
@@ -1459,470 +1069,329 @@ var Entity = /** @class */ (function (_super) {
1459
1069
  * @param value Setting value
1460
1070
  * @return Setting value
1461
1071
  */
1462
- Object.defineProperty(Entity.prototype, "_setSoft", {
1463
- enumerable: false,
1464
- configurable: true,
1465
- writable: true,
1466
- value: function (key, value) {
1467
- if (!this._userProperties[key]) {
1468
- return _super.prototype.set.call(this, key, value);
1469
- }
1470
- return value;
1072
+ _setSoft(key, value) {
1073
+ if (!this._userProperties[key]) {
1074
+ return super.set(key, value);
1471
1075
  }
1472
- });
1076
+ return value;
1077
+ }
1473
1078
  /**
1474
1079
  * Removes a setting value for the specified `key`.
1475
1080
  *
1476
1081
  * @see {@link https://www.amcharts.com/docs/v5/concepts/settings/} for more info
1477
1082
  * @param key Setting key
1478
1083
  */
1479
- Object.defineProperty(Entity.prototype, "remove", {
1480
- enumerable: false,
1481
- configurable: true,
1482
- writable: true,
1483
- value: function (key) {
1484
- delete this._userProperties[key];
1485
- this._removeTemplateProperty(key);
1486
- }
1487
- });
1084
+ remove(key) {
1085
+ delete this._userProperties[key];
1086
+ this._removeTemplateProperty(key);
1087
+ }
1488
1088
  /**
1489
1089
  * @ignore
1490
1090
  */
1491
- Object.defineProperty(Entity.prototype, "setPrivate", {
1492
- enumerable: false,
1493
- configurable: true,
1494
- writable: true,
1495
- value: function (key, value) {
1496
- this._userPrivateProperties[key] = true;
1497
- return _super.prototype.setPrivate.call(this, key, value);
1498
- }
1499
- });
1091
+ setPrivate(key, value) {
1092
+ this._userPrivateProperties[key] = true;
1093
+ return super.setPrivate(key, value);
1094
+ }
1500
1095
  /**
1501
1096
  * @ignore
1502
1097
  */
1503
- Object.defineProperty(Entity.prototype, "setPrivateRaw", {
1504
- enumerable: false,
1505
- configurable: true,
1506
- writable: true,
1507
- value: function (key, value) {
1508
- this._userPrivateProperties[key] = true;
1509
- _super.prototype.setPrivateRaw.call(this, key, value);
1510
- }
1511
- });
1098
+ setPrivateRaw(key, value) {
1099
+ this._userPrivateProperties[key] = true;
1100
+ super.setPrivateRaw(key, value);
1101
+ }
1512
1102
  /**
1513
1103
  * @ignore
1514
1104
  */
1515
- Object.defineProperty(Entity.prototype, "removePrivate", {
1516
- enumerable: false,
1517
- configurable: true,
1518
- writable: true,
1519
- value: function (key) {
1520
- delete this._userPrivateProperties[key];
1521
- this._removeTemplatePrivateProperty(key);
1522
- }
1523
- });
1524
- Object.defineProperty(Entity.prototype, "_setTemplateProperty", {
1525
- enumerable: false,
1526
- configurable: true,
1527
- writable: true,
1528
- value: function (template, key, value) {
1529
- if (!this._userProperties[key]) {
1530
- var match = this._findTemplateByKey(key);
1531
- if (template === match) {
1532
- _super.prototype.set.call(this, key, value);
1533
- }
1105
+ removePrivate(key) {
1106
+ delete this._userPrivateProperties[key];
1107
+ this._removeTemplatePrivateProperty(key);
1108
+ }
1109
+ _setTemplateProperty(template, key, value) {
1110
+ if (!this._userProperties[key]) {
1111
+ const match = this._findTemplateByKey(key);
1112
+ if (template === match) {
1113
+ super.set(key, value);
1534
1114
  }
1535
1115
  }
1536
- });
1537
- Object.defineProperty(Entity.prototype, "_setTemplatePrivateProperty", {
1538
- enumerable: false,
1539
- configurable: true,
1540
- writable: true,
1541
- value: function (template, key, value) {
1542
- if (!this._userPrivateProperties[key]) {
1543
- var match = this._findTemplateByPrivateKey(key);
1544
- if (template === match) {
1545
- _super.prototype.setPrivate.call(this, key, value);
1546
- }
1116
+ }
1117
+ _setTemplatePrivateProperty(template, key, value) {
1118
+ if (!this._userPrivateProperties[key]) {
1119
+ const match = this._findTemplateByPrivateKey(key);
1120
+ if (template === match) {
1121
+ super.setPrivate(key, value);
1547
1122
  }
1548
1123
  }
1549
- });
1550
- Object.defineProperty(Entity.prototype, "_removeTemplateProperty", {
1551
- enumerable: false,
1552
- configurable: true,
1553
- writable: true,
1554
- value: function (key) {
1555
- if (!this._userProperties[key]) {
1556
- var match = this._findTemplateByKey(key);
1557
- if (match) {
1558
- // TODO don't stop the animation if the property didn't change
1559
- _super.prototype.set.call(this, key, match._settings[key]);
1560
- }
1561
- else {
1562
- _super.prototype.remove.call(this, key);
1563
- }
1124
+ }
1125
+ _removeTemplateProperty(key) {
1126
+ if (!this._userProperties[key]) {
1127
+ const match = this._findTemplateByKey(key);
1128
+ if (match) {
1129
+ // TODO don't stop the animation if the property didn't change
1130
+ super.set(key, match._settings[key]);
1564
1131
  }
1565
- }
1566
- });
1567
- Object.defineProperty(Entity.prototype, "_removeTemplatePrivateProperty", {
1568
- enumerable: false,
1569
- configurable: true,
1570
- writable: true,
1571
- value: function (key) {
1572
- if (!this._userPrivateProperties[key]) {
1573
- var match = this._findTemplateByPrivateKey(key);
1574
- if (match) {
1575
- // TODO don't stop the animation if the property didn't change
1576
- _super.prototype.setPrivate.call(this, key, match._privateSettings[key]);
1577
- }
1578
- else {
1579
- _super.prototype.removePrivate.call(this, key);
1580
- }
1132
+ else {
1133
+ super.remove(key);
1581
1134
  }
1582
1135
  }
1583
- });
1584
- Object.defineProperty(Entity.prototype, "_walkParents", {
1585
- enumerable: false,
1586
- configurable: true,
1587
- writable: true,
1588
- value: function (f) {
1589
- f(this._root._rootContainer);
1590
- f(this);
1136
+ }
1137
+ _removeTemplatePrivateProperty(key) {
1138
+ if (!this._userPrivateProperties[key]) {
1139
+ const match = this._findTemplateByPrivateKey(key);
1140
+ if (match) {
1141
+ // TODO don't stop the animation if the property didn't change
1142
+ super.setPrivate(key, match._privateSettings[key]);
1143
+ }
1144
+ else {
1145
+ super.removePrivate(key);
1146
+ }
1591
1147
  }
1592
- });
1148
+ }
1149
+ _walkParents(f) {
1150
+ f(this._root._rootContainer);
1151
+ f(this);
1152
+ }
1593
1153
  // TODO faster version of this method which is specialized to just 1 key
1594
- Object.defineProperty(Entity.prototype, "_applyStateByKey", {
1595
- enumerable: false,
1596
- configurable: true,
1597
- writable: true,
1598
- value: function (name) {
1599
- var other = this.states.create(name, {});
1600
- var seen = {};
1601
- this._eachTemplate(function (template) {
1602
- var state = template.states.lookup(name);
1603
- if (state) {
1604
- state._apply(other, seen);
1605
- }
1606
- });
1607
- $object.each(other._settings, function (key) {
1608
- if (!seen[key] && !other._userSettings[key]) {
1609
- other.remove(key);
1610
- }
1611
- });
1612
- }
1613
- });
1614
- Object.defineProperty(Entity.prototype, "_applyTemplate", {
1615
- enumerable: false,
1616
- configurable: true,
1617
- writable: true,
1618
- value: function (template, state) {
1619
- var _this = this;
1620
- this._templateDisposers.push(template._apply(this, state));
1621
- $object.each(template._settings, function (key, value) {
1622
- if (!state.settings[key] && !_this._userProperties[key]) {
1623
- state.settings[key] = true;
1624
- _super.prototype.set.call(_this, key, value);
1625
- }
1626
- });
1627
- $object.each(template._privateSettings, function (key, value) {
1628
- if (!state.privateSettings[key] && !_this._userPrivateProperties[key]) {
1629
- state.privateSettings[key] = true;
1630
- _super.prototype.setPrivate.call(_this, key, value);
1631
- }
1632
- });
1633
- if (this._runSetup && template.setup) {
1634
- this._runSetup = false;
1635
- template.setup(this);
1154
+ _applyStateByKey(name) {
1155
+ const other = this.states.create(name, {});
1156
+ const seen = {};
1157
+ this._eachTemplate((template) => {
1158
+ const state = template.states.lookup(name);
1159
+ if (state) {
1160
+ state._apply(other, seen);
1161
+ }
1162
+ });
1163
+ $object.each(other._settings, (key) => {
1164
+ if (!seen[key] && !other._userSettings[key]) {
1165
+ other.remove(key);
1636
1166
  }
1167
+ });
1168
+ }
1169
+ _applyTemplate(template, state) {
1170
+ this._templateDisposers.push(template._apply(this, state));
1171
+ $object.each(template._settings, (key, value) => {
1172
+ if (!state.settings[key] && !this._userProperties[key]) {
1173
+ state.settings[key] = true;
1174
+ super.set(key, value);
1175
+ }
1176
+ });
1177
+ $object.each(template._privateSettings, (key, value) => {
1178
+ if (!state.privateSettings[key] && !this._userPrivateProperties[key]) {
1179
+ state.privateSettings[key] = true;
1180
+ super.setPrivate(key, value);
1181
+ }
1182
+ });
1183
+ if (this._runSetup && template.setup) {
1184
+ this._runSetup = false;
1185
+ template.setup(this);
1637
1186
  }
1638
- });
1187
+ }
1639
1188
  /**
1640
1189
  * Calls the closure with each template and returns the first template which is true
1641
1190
  */
1642
- Object.defineProperty(Entity.prototype, "_findStaticTemplate", {
1643
- enumerable: false,
1644
- configurable: true,
1645
- writable: true,
1646
- value: function (f) {
1647
- if (this._template) {
1648
- if (f(this._template)) {
1649
- return this._template;
1650
- }
1191
+ _findStaticTemplate(f) {
1192
+ if (this._template) {
1193
+ if (f(this._template)) {
1194
+ return this._template;
1651
1195
  }
1652
1196
  }
1653
- });
1654
- Object.defineProperty(Entity.prototype, "_eachTemplate", {
1655
- enumerable: false,
1656
- configurable: true,
1657
- writable: true,
1658
- value: function (f) {
1659
- this._findStaticTemplate(function (template) {
1660
- f(template);
1661
- return false;
1197
+ }
1198
+ _eachTemplate(f) {
1199
+ this._findStaticTemplate((template) => {
1200
+ f(template);
1201
+ return false;
1202
+ });
1203
+ // _internalTemplates is sorted with most specific to the right
1204
+ $array.eachReverse(this._internalTemplates, f);
1205
+ // _templates is sorted with most specific to the left
1206
+ $array.each(this._templates, f);
1207
+ }
1208
+ _applyTemplates(remove = true) {
1209
+ if (remove) {
1210
+ this._disposeTemplates();
1211
+ }
1212
+ const state = {
1213
+ settings: {},
1214
+ privateSettings: {},
1215
+ states: {},
1216
+ };
1217
+ this._eachTemplate((template) => {
1218
+ this._applyTemplate(template, state);
1219
+ });
1220
+ if (remove) {
1221
+ $object.each(this._settings, (key) => {
1222
+ if (!this._userProperties[key] && !state.settings[key]) {
1223
+ super.remove(key);
1224
+ }
1662
1225
  });
1663
- // _internalTemplates is sorted with most specific to the right
1664
- $array.eachReverse(this._internalTemplates, f);
1665
- // _templates is sorted with most specific to the left
1666
- $array.each(this._templates, f);
1667
- }
1668
- });
1669
- Object.defineProperty(Entity.prototype, "_applyTemplates", {
1670
- enumerable: false,
1671
- configurable: true,
1672
- writable: true,
1673
- value: function (remove) {
1674
- var _this = this;
1675
- if (remove === void 0) { remove = true; }
1676
- if (remove) {
1677
- this._disposeTemplates();
1678
- }
1679
- var state = {
1680
- settings: {},
1681
- privateSettings: {},
1682
- states: {},
1683
- };
1684
- this._eachTemplate(function (template) {
1685
- _this._applyTemplate(template, state);
1226
+ $object.each(this._privateSettings, (key) => {
1227
+ if (!this._userPrivateProperties[key] && !state.privateSettings[key]) {
1228
+ super.removePrivate(key);
1229
+ }
1686
1230
  });
1687
- if (remove) {
1688
- $object.each(this._settings, function (key) {
1689
- if (!_this._userProperties[key] && !state.settings[key]) {
1690
- _super.prototype.remove.call(_this, key);
1691
- }
1692
- });
1693
- $object.each(this._privateSettings, function (key) {
1694
- if (!_this._userPrivateProperties[key] && !state.privateSettings[key]) {
1695
- _super.prototype.removePrivate.call(_this, key);
1696
- }
1697
- });
1698
- }
1699
1231
  }
1700
- });
1701
- Object.defineProperty(Entity.prototype, "_findTemplate", {
1702
- enumerable: false,
1703
- configurable: true,
1704
- writable: true,
1705
- value: function (f) {
1706
- var value = this._findStaticTemplate(f);
1232
+ }
1233
+ _findTemplate(f) {
1234
+ const value = this._findStaticTemplate(f);
1235
+ if (value === undefined) {
1236
+ // _internalTemplates is sorted with most specific to the right
1237
+ const value = $array.findReverse(this._internalTemplates, f);
1707
1238
  if (value === undefined) {
1708
- // _internalTemplates is sorted with most specific to the right
1709
- var value_1 = $array.findReverse(this._internalTemplates, f);
1710
- if (value_1 === undefined) {
1711
- // _templates is sorted with most specific to the left
1712
- return $array.find(this._templates, f);
1713
- }
1714
- else {
1715
- return value_1;
1716
- }
1239
+ // _templates is sorted with most specific to the left
1240
+ return $array.find(this._templates, f);
1717
1241
  }
1718
1242
  else {
1719
1243
  return value;
1720
1244
  }
1721
1245
  }
1722
- });
1723
- Object.defineProperty(Entity.prototype, "_findTemplateByKey", {
1724
- enumerable: false,
1725
- configurable: true,
1726
- writable: true,
1727
- value: function (key) {
1728
- return this._findTemplate(function (template) {
1729
- return key in template._settings;
1730
- });
1246
+ else {
1247
+ return value;
1731
1248
  }
1732
- });
1733
- Object.defineProperty(Entity.prototype, "_findTemplateByPrivateKey", {
1734
- enumerable: false,
1735
- configurable: true,
1736
- writable: true,
1737
- value: function (key) {
1738
- return this._findTemplate(function (template) {
1739
- return key in template._privateSettings;
1249
+ }
1250
+ _findTemplateByKey(key) {
1251
+ return this._findTemplate((template) => {
1252
+ return key in template._settings;
1253
+ });
1254
+ }
1255
+ _findTemplateByPrivateKey(key) {
1256
+ return this._findTemplate((template) => {
1257
+ return key in template._privateSettings;
1258
+ });
1259
+ }
1260
+ _disposeTemplates() {
1261
+ $array.each(this._templateDisposers, (disposer) => {
1262
+ disposer.dispose();
1263
+ });
1264
+ this._templateDisposers.length = 0;
1265
+ }
1266
+ _removeTemplates() {
1267
+ $array.each(this._templates, (template) => {
1268
+ template._removeObjectTemplate(this);
1269
+ });
1270
+ this._templates.length = 0;
1271
+ }
1272
+ _applyThemes() {
1273
+ let isConnected = false;
1274
+ const defaults = [];
1275
+ let themes = [];
1276
+ const themeTags = new Set();
1277
+ const tags = this.get("themeTagsSelf");
1278
+ if (tags) {
1279
+ $array.each(tags, (tag) => {
1280
+ themeTags.add(tag);
1740
1281
  });
1741
1282
  }
1742
- });
1743
- Object.defineProperty(Entity.prototype, "_disposeTemplates", {
1744
- enumerable: false,
1745
- configurable: true,
1746
- writable: true,
1747
- value: function () {
1748
- $array.each(this._templateDisposers, function (disposer) {
1749
- disposer.dispose();
1750
- });
1751
- this._templateDisposers.length = 0;
1752
- }
1753
- });
1754
- Object.defineProperty(Entity.prototype, "_removeTemplates", {
1755
- enumerable: false,
1756
- configurable: true,
1757
- writable: true,
1758
- value: function () {
1759
- var _this = this;
1760
- $array.each(this._templates, function (template) {
1761
- template._removeObjectTemplate(_this);
1762
- });
1763
- this._templates.length = 0;
1764
- }
1765
- });
1766
- Object.defineProperty(Entity.prototype, "_applyThemes", {
1767
- enumerable: false,
1768
- configurable: true,
1769
- writable: true,
1770
- value: function () {
1771
- var _this = this;
1772
- var isConnected = false;
1773
- var defaults = [];
1774
- var themes = [];
1775
- var themeTags = new Set();
1776
- var tags = this.get("themeTagsSelf");
1283
+ this._walkParents((entity) => {
1284
+ if (entity === this._root._rootContainer) {
1285
+ isConnected = true;
1286
+ }
1287
+ if (entity._defaultThemes.length > 0) {
1288
+ defaults.push(entity._defaultThemes);
1289
+ }
1290
+ const theme = entity.get("themes");
1291
+ if (theme) {
1292
+ themes.push(theme);
1293
+ }
1294
+ const tags = entity.get("themeTags");
1777
1295
  if (tags) {
1778
- $array.each(tags, function (tag) {
1296
+ $array.each(tags, (tag) => {
1779
1297
  themeTags.add(tag);
1780
1298
  });
1781
1299
  }
1782
- this._walkParents(function (entity) {
1783
- if (entity === _this._root._rootContainer) {
1784
- isConnected = true;
1785
- }
1786
- if (entity._defaultThemes.length > 0) {
1787
- defaults.push(entity._defaultThemes);
1788
- }
1789
- var theme = entity.get("themes");
1790
- if (theme) {
1791
- themes.push(theme);
1792
- }
1793
- var tags = entity.get("themeTags");
1794
- if (tags) {
1795
- $array.each(tags, function (tag) {
1796
- themeTags.add(tag);
1797
- });
1798
- }
1799
- });
1800
- themes = defaults.concat(themes);
1801
- this._removeTemplates();
1802
- if (isConnected) {
1803
- $array.eachReverse(this.classNames, function (name) {
1804
- var allRules = [];
1805
- $array.each(themes, function (themes) {
1806
- $array.each(themes, function (theme) {
1807
- var rules = theme._lookupRules(name);
1808
- if (rules) {
1809
- $array.eachReverse(rules, function (rule) {
1810
- var matches = rule.tags.every(function (tag) {
1811
- return themeTags.has(tag);
1812
- });
1813
- if (matches) {
1814
- var result = $array.getFirstSortedIndex(allRules, function (x) {
1815
- var order = $order.compare(rule.tags.length, x.tags.length);
1816
- if (order === 0) {
1817
- return $order.compareArray(rule.tags, x.tags, $order.compare);
1818
- }
1819
- else {
1820
- return order;
1821
- }
1822
- });
1823
- allRules.splice(result.index, 0, rule);
1824
- }
1300
+ });
1301
+ themes = defaults.concat(themes);
1302
+ this._removeTemplates();
1303
+ if (isConnected) {
1304
+ $array.eachReverse(this.classNames, (name) => {
1305
+ const allRules = [];
1306
+ $array.each(themes, (themes) => {
1307
+ $array.each(themes, (theme) => {
1308
+ const rules = theme._lookupRules(name);
1309
+ if (rules) {
1310
+ $array.eachReverse(rules, (rule) => {
1311
+ const matches = rule.tags.every((tag) => {
1312
+ return themeTags.has(tag);
1825
1313
  });
1826
- }
1827
- });
1828
- });
1829
- $array.each(allRules, function (rule) {
1830
- _this._templates.push(rule.template);
1831
- rule.template._setObjectTemplate(_this);
1314
+ if (matches) {
1315
+ const result = $array.getFirstSortedIndex(allRules, (x) => {
1316
+ const order = $order.compare(rule.tags.length, x.tags.length);
1317
+ if (order === 0) {
1318
+ return $order.compareArray(rule.tags, x.tags, $order.compare);
1319
+ }
1320
+ else {
1321
+ return order;
1322
+ }
1323
+ });
1324
+ allRules.splice(result.index, 0, rule);
1325
+ }
1326
+ });
1327
+ }
1832
1328
  });
1833
1329
  });
1330
+ $array.each(allRules, (rule) => {
1331
+ this._templates.push(rule.template);
1332
+ rule.template._setObjectTemplate(this);
1333
+ });
1334
+ });
1335
+ }
1336
+ this._applyTemplates();
1337
+ if (isConnected) {
1338
+ // This causes it to only run the setup function the first time that the themes are applied
1339
+ this._runSetup = false;
1340
+ }
1341
+ return isConnected;
1342
+ }
1343
+ _changed() { }
1344
+ _beforeChanged() {
1345
+ if (this.isDirty("id")) {
1346
+ const id = this.get("id");
1347
+ if (id) {
1348
+ this._registerId(id);
1834
1349
  }
1835
- this._applyTemplates();
1836
- if (isConnected) {
1837
- // This causes it to only run the setup function the first time that the themes are applied
1838
- this._runSetup = false;
1839
- }
1840
- return isConnected;
1841
- }
1842
- });
1843
- Object.defineProperty(Entity.prototype, "_changed", {
1844
- enumerable: false,
1845
- configurable: true,
1846
- writable: true,
1847
- value: function () { }
1848
- });
1849
- Object.defineProperty(Entity.prototype, "_beforeChanged", {
1850
- enumerable: false,
1851
- configurable: true,
1852
- writable: true,
1853
- value: function () {
1854
- if (this.isDirty("id")) {
1855
- var id = this.get("id");
1856
- if (id) {
1857
- this._registerId(id);
1858
- }
1859
- var prevId = this._prevSettings.id;
1860
- if (prevId) {
1861
- delete registry.entitiesById[prevId];
1862
- }
1350
+ const prevId = this._prevSettings.id;
1351
+ if (prevId) {
1352
+ delete registry.entitiesById[prevId];
1863
1353
  }
1864
1354
  }
1865
- });
1866
- Object.defineProperty(Entity.prototype, "_registerId", {
1867
- enumerable: false,
1868
- configurable: true,
1869
- writable: true,
1870
- value: function (id) {
1871
- if (registry.entitiesById[id] && registry.entitiesById[id] !== this) {
1872
- throw new Error("An entity with id \"" + id + "\" already exists.");
1873
- }
1874
- registry.entitiesById[id] = this;
1875
- }
1876
- });
1877
- Object.defineProperty(Entity.prototype, "_afterChanged", {
1878
- enumerable: false,
1879
- configurable: true,
1880
- writable: true,
1881
- value: function () { }
1882
- });
1355
+ }
1356
+ _registerId(id) {
1357
+ if (registry.entitiesById[id] && registry.entitiesById[id] !== this) {
1358
+ throw new Error("An entity with id \"" + id + "\" already exists.");
1359
+ }
1360
+ registry.entitiesById[id] = this;
1361
+ }
1362
+ _afterChanged() { }
1883
1363
  /**
1884
1364
  * @ignore
1885
1365
  */
1886
- Object.defineProperty(Entity.prototype, "addDisposer", {
1887
- enumerable: false,
1888
- configurable: true,
1889
- writable: true,
1890
- value: function (disposer) {
1891
- this._disposers.push(disposer);
1892
- return disposer;
1893
- }
1894
- });
1895
- Object.defineProperty(Entity.prototype, "_dispose", {
1896
- enumerable: false,
1897
- configurable: true,
1898
- writable: true,
1899
- value: function () {
1900
- var _this = this;
1901
- _super.prototype._dispose.call(this);
1902
- var template = this._template;
1903
- if (template) {
1904
- template._removeObjectTemplate(this);
1905
- }
1906
- $array.each(this._internalTemplates, function (template) {
1907
- template._removeObjectTemplate(_this);
1908
- });
1909
- this._removeTemplates();
1910
- this._disposeTemplates();
1911
- this.events.dispose();
1912
- this._disposers.forEach(function (x) {
1913
- x.dispose();
1914
- });
1915
- $object.each(this._disposerProperties, function (_, disposers) {
1916
- $array.each(disposers, function (disposer) {
1917
- disposer.dispose();
1918
- });
1366
+ addDisposer(disposer) {
1367
+ this._disposers.push(disposer);
1368
+ return disposer;
1369
+ }
1370
+ _dispose() {
1371
+ super._dispose();
1372
+ const template = this._template;
1373
+ if (template) {
1374
+ template._removeObjectTemplate(this);
1375
+ }
1376
+ $array.each(this._internalTemplates, (template) => {
1377
+ template._removeObjectTemplate(this);
1378
+ });
1379
+ this._removeTemplates();
1380
+ this._disposeTemplates();
1381
+ this.events.dispose();
1382
+ this._disposers.forEach((x) => {
1383
+ x.dispose();
1384
+ });
1385
+ $object.each(this._disposerProperties, (_, disposers) => {
1386
+ $array.each(disposers, (disposer) => {
1387
+ disposer.dispose();
1919
1388
  });
1920
- var id = this.get("id");
1921
- if (id) {
1922
- delete registry.entitiesById[id];
1923
- }
1389
+ });
1390
+ const id = this.get("id");
1391
+ if (id) {
1392
+ delete registry.entitiesById[id];
1924
1393
  }
1925
- });
1394
+ }
1926
1395
  /**
1927
1396
  * Creates and returns a "disposable" timeout.
1928
1397
  *
@@ -1930,121 +1399,79 @@ var Entity = /** @class */ (function (_super) {
1930
1399
  * @param delay Delay in milliseconds
1931
1400
  * @return Timeout disposer
1932
1401
  */
1933
- Object.defineProperty(Entity.prototype, "setTimeout", {
1934
- enumerable: false,
1935
- configurable: true,
1936
- writable: true,
1937
- value: function (fn, delay) {
1938
- var _this = this;
1939
- var id = setTimeout(function () {
1940
- _this.removeDispose(disposer);
1941
- fn();
1942
- }, delay);
1943
- var disposer = new Disposer(function () {
1944
- clearTimeout(id);
1945
- });
1946
- this._disposers.push(disposer);
1947
- return disposer;
1948
- }
1949
- });
1402
+ setTimeout(fn, delay) {
1403
+ const id = setTimeout(() => {
1404
+ this.removeDispose(disposer);
1405
+ fn();
1406
+ }, delay);
1407
+ const disposer = new Disposer(() => {
1408
+ clearTimeout(id);
1409
+ });
1410
+ this._disposers.push(disposer);
1411
+ return disposer;
1412
+ }
1950
1413
  /**
1951
1414
  * @ignore
1952
1415
  */
1953
- Object.defineProperty(Entity.prototype, "removeDispose", {
1954
- enumerable: false,
1955
- configurable: true,
1956
- writable: true,
1957
- value: function (target) {
1958
- if (!this.isDisposed()) {
1959
- var index = $array.indexOf(this._disposers, target);
1960
- if (index > -1) {
1961
- this._disposers.splice(index, 1);
1962
- }
1416
+ removeDispose(target) {
1417
+ if (!this.isDisposed()) {
1418
+ let index = $array.indexOf(this._disposers, target);
1419
+ if (index > -1) {
1420
+ this._disposers.splice(index, 1);
1963
1421
  }
1964
- target.dispose();
1965
1422
  }
1966
- });
1423
+ target.dispose();
1424
+ }
1967
1425
  /**
1968
1426
  * @ignore
1969
1427
  */
1970
- Object.defineProperty(Entity.prototype, "hasTag", {
1971
- enumerable: false,
1972
- configurable: true,
1973
- writable: true,
1974
- value: function (tag) {
1975
- return $array.indexOf(this.get("themeTags", []), tag) !== -1;
1976
- }
1977
- });
1428
+ hasTag(tag) {
1429
+ return $array.indexOf(this.get("themeTags", []), tag) !== -1;
1430
+ }
1978
1431
  /**
1979
1432
  * @ignore
1980
1433
  */
1981
- Object.defineProperty(Entity.prototype, "addTag", {
1982
- enumerable: false,
1983
- configurable: true,
1984
- writable: true,
1985
- value: function (tag) {
1986
- if (!this.hasTag(tag)) {
1987
- var tags = this.get("themeTags", []);
1988
- tags.push(tag);
1989
- this.set("themeTags", tags);
1990
- }
1434
+ addTag(tag) {
1435
+ if (!this.hasTag(tag)) {
1436
+ const tags = this.get("themeTags", []);
1437
+ tags.push(tag);
1438
+ this.set("themeTags", tags);
1991
1439
  }
1992
- });
1440
+ }
1993
1441
  /**
1994
1442
  * @ignore
1995
1443
  */
1996
- Object.defineProperty(Entity.prototype, "removeTag", {
1997
- enumerable: false,
1998
- configurable: true,
1999
- writable: true,
2000
- value: function (tag) {
2001
- if (this.hasTag(tag)) {
2002
- var tags = this.get("themeTags", []);
2003
- $array.remove(tags, tag);
2004
- this.set("themeTags", tags);
2005
- }
2006
- }
2007
- });
2008
- Object.defineProperty(Entity.prototype, "_t", {
2009
- enumerable: false,
2010
- configurable: true,
2011
- writable: true,
2012
- value: function (text, locale) {
2013
- var _a;
2014
- var rest = [];
2015
- for (var _i = 2; _i < arguments.length; _i++) {
2016
- rest[_i - 2] = arguments[_i];
2017
- }
2018
- return (_a = this._root.language).translate.apply(_a, __spreadArray([text, locale], __read(rest), false));
1444
+ removeTag(tag) {
1445
+ if (this.hasTag(tag)) {
1446
+ const tags = this.get("themeTags", []);
1447
+ $array.remove(tags, tag);
1448
+ this.set("themeTags", tags);
2019
1449
  }
2020
- });
2021
- Object.defineProperty(Entity.prototype, "root", {
2022
- /**
2023
- * An instance of [[Root]] object.
2024
- *
2025
- * @readonly
2026
- * @since 5.0.6
2027
- * @return Root object
2028
- */
2029
- get: function () {
2030
- return this._root;
2031
- },
2032
- enumerable: false,
2033
- configurable: true
2034
- });
2035
- Object.defineProperty(Entity, "className", {
2036
- enumerable: true,
2037
- configurable: true,
2038
- writable: true,
2039
- value: "Entity"
2040
- });
2041
- Object.defineProperty(Entity, "classNames", {
2042
- enumerable: true,
2043
- configurable: true,
2044
- writable: true,
2045
- value: ["Entity"]
2046
- });
2047
- return Entity;
2048
- }(Settings));
2049
- export { Entity };
1450
+ }
1451
+ _t(text, locale, ...rest) {
1452
+ return this._root.language.translate(text, locale, ...rest);
1453
+ }
1454
+ /**
1455
+ * An instance of [[Root]] object.
1456
+ *
1457
+ * @readonly
1458
+ * @since 5.0.6
1459
+ * @return Root object
1460
+ */
1461
+ get root() {
1462
+ return this._root;
1463
+ }
1464
+ }
1465
+ Object.defineProperty(Entity, "className", {
1466
+ enumerable: true,
1467
+ configurable: true,
1468
+ writable: true,
1469
+ value: "Entity"
1470
+ });
1471
+ Object.defineProperty(Entity, "classNames", {
1472
+ enumerable: true,
1473
+ configurable: true,
1474
+ writable: true,
1475
+ value: ["Entity"]
1476
+ });
2050
1477
  //# sourceMappingURL=Entity.js.map