@progress/kendo-charts 2.7.2-dev.202502101310 → 2.7.2-develop.1

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 (363) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/barcode/barcode-validator.js +10 -12
  4. package/dist/es/barcode/barcode.js +84 -96
  5. package/dist/es/barcode/encodings/code11.js +41 -57
  6. package/dist/es/barcode/encodings/code128.js +222 -354
  7. package/dist/es/barcode/encodings/code39-extended.js +20 -34
  8. package/dist/es/barcode/encodings/code39.js +49 -75
  9. package/dist/es/barcode/encodings/code93-extended.js +12 -24
  10. package/dist/es/barcode/encodings/code93.js +52 -70
  11. package/dist/es/barcode/encodings/ean13.js +28 -42
  12. package/dist/es/barcode/encodings/ean8.js +8 -18
  13. package/dist/es/barcode/encodings/encoding.js +18 -24
  14. package/dist/es/barcode/encodings/main.js +13 -10
  15. package/dist/es/barcode/encodings/msi.js +56 -112
  16. package/dist/es/barcode/encodings/postnet.js +31 -45
  17. package/dist/es/barcode/surface-size.js +2 -2
  18. package/dist/es/chart/aggregates/aggregates.js +23 -23
  19. package/dist/es/chart/aggregates/default-aggregates.js +10 -18
  20. package/dist/es/chart/aggregates/series-aggregator.js +42 -54
  21. package/dist/es/chart/animations/bar-chart-animation.js +15 -26
  22. package/dist/es/chart/animations/bubble-animation.js +7 -17
  23. package/dist/es/chart/animations/clip-animation.js +13 -23
  24. package/dist/es/chart/animations/fade-in-animation.js +6 -16
  25. package/dist/es/chart/animations/pie-animation.js +6 -16
  26. package/dist/es/chart/api-elements/chart-axis.js +14 -22
  27. package/dist/es/chart/api-elements/chart-pane.js +10 -8
  28. package/dist/es/chart/api-elements/chart-plotarea.js +4 -10
  29. package/dist/es/chart/api-elements/find-axis-by-name.js +1 -1
  30. package/dist/es/chart/area-chart/area-chart.js +46 -60
  31. package/dist/es/chart/area-chart/area-segment.js +46 -52
  32. package/dist/es/chart/area-chart/spline-area-segment.js +12 -21
  33. package/dist/es/chart/area-chart/step-area-segment.js +6 -15
  34. package/dist/es/chart/axis-group-range-tracker.js +14 -20
  35. package/dist/es/chart/bar-chart/bar-chart.js +65 -80
  36. package/dist/es/chart/bar-chart/bar-label.js +25 -32
  37. package/dist/es/chart/bar-chart/bar.js +76 -91
  38. package/dist/es/chart/box-plot-chart/box-plot-chart.js +33 -48
  39. package/dist/es/chart/box-plot-chart/box-plot.js +55 -68
  40. package/dist/es/chart/box-plot-chart/vertical-box-plot.js +13 -23
  41. package/dist/es/chart/bubble-chart/bubble-chart.js +51 -64
  42. package/dist/es/chart/bubble-chart/bubble.js +21 -27
  43. package/dist/es/chart/bullet-chart/bullet-chart.js +45 -57
  44. package/dist/es/chart/bullet-chart/bullet.js +48 -57
  45. package/dist/es/chart/bullet-chart/target.js +1 -11
  46. package/dist/es/chart/candlestick-chart/candlestick-chart.js +41 -55
  47. package/dist/es/chart/candlestick-chart/candlestick.js +60 -69
  48. package/dist/es/chart/categorical-chart.js +178 -206
  49. package/dist/es/chart/chart-container.js +30 -39
  50. package/dist/es/chart/chart.js +641 -701
  51. package/dist/es/chart/constants.js +103 -103
  52. package/dist/es/chart/crosshair/crosshair-tooltip.js +22 -34
  53. package/dist/es/chart/crosshair/crosshair.js +39 -47
  54. package/dist/es/chart/donut-chart/donut-chart.js +36 -48
  55. package/dist/es/chart/donut-chart/donut-segment.js +12 -24
  56. package/dist/es/chart/error-bars/categorical-error-bar.js +5 -15
  57. package/dist/es/chart/error-bars/error-bar-base.js +37 -49
  58. package/dist/es/chart/error-bars/error-range-calculator.js +46 -56
  59. package/dist/es/chart/error-bars/scatter-error-bar.js +6 -16
  60. package/dist/es/chart/funnel-chart/funnel-chart.js +86 -103
  61. package/dist/es/chart/funnel-chart/funnel-segment.js +46 -54
  62. package/dist/es/chart/funnel-chart/pyramid-chart.js +5 -11
  63. package/dist/es/chart/heatmap-chart/color-scale.js +7 -9
  64. package/dist/es/chart/heatmap-chart/heatmap-chart.js +87 -110
  65. package/dist/es/chart/heatmap-chart/heatmap-point.js +72 -78
  66. package/dist/es/chart/highlight.js +26 -36
  67. package/dist/es/chart/layout/cluster-layout.js +16 -25
  68. package/dist/es/chart/layout/radar-cluster-layout.js +15 -24
  69. package/dist/es/chart/layout/radar-stack-layout.js +10 -22
  70. package/dist/es/chart/layout/stack-wrap.js +12 -24
  71. package/dist/es/chart/layout/utils.js +2 -2
  72. package/dist/es/chart/legend/legend-item-line-area.js +8 -19
  73. package/dist/es/chart/legend/legend-item-line.js +21 -31
  74. package/dist/es/chart/legend/legend-item-marker.js +18 -28
  75. package/dist/es/chart/legend/legend-item-square.js +8 -18
  76. package/dist/es/chart/legend/legend-item.js +91 -105
  77. package/dist/es/chart/legend/legend-layout.js +18 -25
  78. package/dist/es/chart/legend/legend.js +68 -92
  79. package/dist/es/chart/line-chart/line-chart.js +35 -48
  80. package/dist/es/chart/line-chart/line-point.js +90 -103
  81. package/dist/es/chart/line-chart/line-segment.js +23 -34
  82. package/dist/es/chart/line-chart/spline-segment.js +10 -20
  83. package/dist/es/chart/line-chart/step-line-mixin.js +14 -17
  84. package/dist/es/chart/line-chart/step-line-segment.js +4 -14
  85. package/dist/es/chart/mixins/accessibility-attributes-mixin.js +7 -7
  86. package/dist/es/chart/mixins/clip-animation-mixin.js +7 -7
  87. package/dist/es/chart/mixins/line-chart-mixin.js +27 -31
  88. package/dist/es/chart/mixins/note-mixin.js +3 -3
  89. package/dist/es/chart/mixins/pie-chart-mixin.js +9 -9
  90. package/dist/es/chart/mixins/plotarea-events-mixin.js +1 -1
  91. package/dist/es/chart/mixins/point-events-mixin.js +1 -1
  92. package/dist/es/chart/ohlc-chart/ohlc-chart.js +4 -14
  93. package/dist/es/chart/ohlc-chart/ohlc-point.js +15 -28
  94. package/dist/es/chart/pan-and-zoom/accept-key.js +3 -3
  95. package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +25 -33
  96. package/dist/es/chart/pan-and-zoom/pannable.js +29 -37
  97. package/dist/es/chart/pan-and-zoom/to-chart-axis-ranges.js +3 -3
  98. package/dist/es/chart/pan-and-zoom/zoom-selection.js +61 -70
  99. package/dist/es/chart/pane.js +71 -79
  100. package/dist/es/chart/pie-chart/pie-chart.js +153 -183
  101. package/dist/es/chart/pie-chart/pie-segment.js +82 -98
  102. package/dist/es/chart/plotarea/categorical-plotarea.js +285 -318
  103. package/dist/es/chart/plotarea/donut-plotarea.js +12 -22
  104. package/dist/es/chart/plotarea/funnel-plotarea.js +17 -27
  105. package/dist/es/chart/plotarea/heatmap-plotarea.js +139 -167
  106. package/dist/es/chart/plotarea/pie-plotarea.js +15 -25
  107. package/dist/es/chart/plotarea/plotarea-base.js +423 -462
  108. package/dist/es/chart/plotarea/plotarea-factory.js +15 -20
  109. package/dist/es/chart/plotarea/polar-plotarea-base.js +37 -51
  110. package/dist/es/chart/plotarea/polar-plotarea.js +39 -49
  111. package/dist/es/chart/plotarea/radar-plotarea.js +55 -65
  112. package/dist/es/chart/plotarea/xy-plotarea.js +111 -128
  113. package/dist/es/chart/polar-area-chart/polar-area-chart.js +22 -36
  114. package/dist/es/chart/polar-area-chart/polar-area-segment.js +7 -17
  115. package/dist/es/chart/polar-area-chart/spline-polar-area-segment.js +15 -25
  116. package/dist/es/chart/polar-line-chart/polar-line-chart.js +2 -11
  117. package/dist/es/chart/polar-scatter-chart/polar-scatter-chart.js +6 -16
  118. package/dist/es/chart/radar-area-chart/radar-area-chart.js +11 -21
  119. package/dist/es/chart/radar-area-chart/radar-area-segment.js +3 -13
  120. package/dist/es/chart/radar-area-chart/spline-radar-area-segment.js +3 -13
  121. package/dist/es/chart/radar-bar-chart/radar-bar-chart.js +19 -29
  122. package/dist/es/chart/radar-bar-chart/radar-segment.js +6 -12
  123. package/dist/es/chart/radar-line-chart/radar-line-chart.js +26 -35
  124. package/dist/es/chart/range-area-chart/range-area-chart.js +46 -58
  125. package/dist/es/chart/range-area-chart/range-area-point.js +55 -66
  126. package/dist/es/chart/range-area-chart/range-area-segment.js +19 -28
  127. package/dist/es/chart/range-area-chart/range-line-point.js +4 -14
  128. package/dist/es/chart/range-area-chart/spline-range-area-segment.js +11 -18
  129. package/dist/es/chart/range-area-chart/step-range-area-segment.js +7 -16
  130. package/dist/es/chart/range-bar-chart/range-bar-chart.js +18 -29
  131. package/dist/es/chart/range-bar-chart/range-bar.js +10 -23
  132. package/dist/es/chart/register-charts.js +20 -16
  133. package/dist/es/chart/scatter-charts/scatter-chart.js +100 -122
  134. package/dist/es/chart/scatter-charts/scatter-line-chart.js +15 -25
  135. package/dist/es/chart/selection.js +176 -201
  136. package/dist/es/chart/series-binder.js +55 -66
  137. package/dist/es/chart/theme/base-theme.js +75 -79
  138. package/dist/es/chart/theme/load-theme.js +52 -52
  139. package/dist/es/chart/tooltip/base-tooltip.js +17 -24
  140. package/dist/es/chart/tooltip/shared-tooltip.js +25 -31
  141. package/dist/es/chart/tooltip/tooltip.js +10 -20
  142. package/dist/es/chart/trendlines/calculate-moving-average.js +11 -13
  143. package/dist/es/chart/trendlines/calculate-polynomial.js +24 -26
  144. package/dist/es/chart/trendlines/calculate-slope.js +12 -14
  145. package/dist/es/chart/trendlines/check-all-positive.js +2 -5
  146. package/dist/es/chart/trendlines/exponential-trendline.js +15 -24
  147. package/dist/es/chart/trendlines/get-scatter-trendline-data.js +6 -7
  148. package/dist/es/chart/trendlines/get-trendline-data.js +6 -6
  149. package/dist/es/chart/trendlines/linear-trendline.js +12 -21
  150. package/dist/es/chart/trendlines/logarithmic-trendline.js +14 -23
  151. package/dist/es/chart/trendlines/moving-average.js +15 -26
  152. package/dist/es/chart/trendlines/polynomial-trendline.js +13 -21
  153. package/dist/es/chart/trendlines/power-trendline.js +15 -24
  154. package/dist/es/chart/trendlines/scatter-exponential-trendline.js +15 -24
  155. package/dist/es/chart/trendlines/scatter-linear-trendline.js +10 -16
  156. package/dist/es/chart/trendlines/scatter-logarithmic-trendline.js +17 -27
  157. package/dist/es/chart/trendlines/scatter-moving-average.js +7 -10
  158. package/dist/es/chart/trendlines/scatter-polynomial-trendline.js +11 -16
  159. package/dist/es/chart/trendlines/scatter-power-trendline.js +15 -22
  160. package/dist/es/chart/trendlines/scatter-trendline-registry.js +1 -1
  161. package/dist/es/chart/trendlines/scatter-value-getter.js +2 -5
  162. package/dist/es/chart/trendlines/trendline-factory.js +1 -1
  163. package/dist/es/chart/trendlines/trendline-registry.js +1 -1
  164. package/dist/es/chart/trendlines/x-value-limits.js +6 -8
  165. package/dist/es/chart/utils/any-has-z-index.js +1 -1
  166. package/dist/es/chart/utils/bind-segments.js +8 -8
  167. package/dist/es/chart/utils/categories-count.js +3 -3
  168. package/dist/es/chart/utils/count-numbers.js +4 -4
  169. package/dist/es/chart/utils/create-out-of-range-points.js +13 -22
  170. package/dist/es/chart/utils/eval-options.js +7 -10
  171. package/dist/es/chart/utils/filter-series-by-type.js +4 -4
  172. package/dist/es/chart/utils/get-field.js +1 -1
  173. package/dist/es/chart/utils/has-gradient-overlay.js +1 -1
  174. package/dist/es/chart/utils/is-date-axis.js +2 -2
  175. package/dist/es/chart/utils/parse-date-category.js +2 -2
  176. package/dist/es/chart/utils/segment-visible.js +2 -2
  177. package/dist/es/chart/waterfall-chart/waterfall-chart.js +41 -55
  178. package/dist/es/chart/waterfall-chart/waterfall-segment.js +16 -24
  179. package/dist/es/chart-wizard/get-wizard-data-from-data-rows.js +5 -6
  180. package/dist/es/chart-wizard/messages.js +1 -1
  181. package/dist/es/chart-wizard/state.js +145 -137
  182. package/dist/es/chart-wizard.js +12 -12
  183. package/dist/es/common/add-class.js +3 -3
  184. package/dist/es/common/align-path-to-pixel.js +2 -2
  185. package/dist/es/common/auto-text-color.js +1 -1
  186. package/dist/es/common/constants.js +53 -53
  187. package/dist/es/common/create-hash-set.js +59 -65
  188. package/dist/es/common/cycleDown.js +1 -1
  189. package/dist/es/common/deep-extend.js +10 -12
  190. package/dist/es/common/element-scale.js +9 -9
  191. package/dist/es/common/element-styles.js +8 -8
  192. package/dist/es/common/event-map.js +4 -4
  193. package/dist/es/common/event-utils.js +13 -13
  194. package/dist/es/common/find.js +2 -2
  195. package/dist/es/common/font-loader.js +42 -44
  196. package/dist/es/common/get-aria-template.js +2 -4
  197. package/dist/es/common/get-spacing.js +2 -4
  198. package/dist/es/common/get-supported-features.js +7 -7
  199. package/dist/es/common/get-template.js +2 -4
  200. package/dist/es/common/getter.js +5 -5
  201. package/dist/es/common/grep.js +3 -3
  202. package/dist/es/common/has-classes.js +2 -2
  203. package/dist/es/common/hash-map.js +11 -11
  204. package/dist/es/common/instance-observer.js +28 -33
  205. package/dist/es/common/keys.js +1 -1
  206. package/dist/es/common/map.js +4 -4
  207. package/dist/es/common/matrix.js +142 -150
  208. package/dist/es/common/mousewheel-delta.js +2 -2
  209. package/dist/es/common/observable.js +40 -52
  210. package/dist/es/common/remove-class.js +1 -1
  211. package/dist/es/common/render-icon.js +50 -60
  212. package/dist/es/common/set-default-options.js +1 -1
  213. package/dist/es/common/sparse-array-limits.js +4 -4
  214. package/dist/es/common/user-events.js +124 -150
  215. package/dist/es/core/axis-label.js +38 -43
  216. package/dist/es/core/axis.js +293 -345
  217. package/dist/es/core/box-element.js +36 -46
  218. package/dist/es/core/box.js +75 -83
  219. package/dist/es/core/category-axis.js +265 -314
  220. package/dist/es/core/chart-element.js +98 -109
  221. package/dist/es/core/constants.js +3 -3
  222. package/dist/es/core/curve-processor.js +86 -93
  223. package/dist/es/core/date-category-axis.js +381 -413
  224. package/dist/es/core/date-value-axis.js +108 -118
  225. package/dist/es/core/float-element.js +54 -78
  226. package/dist/es/core/gradients.js +3 -3
  227. package/dist/es/core/logarithmic-axis.js +134 -186
  228. package/dist/es/core/mixins/grid-lines-mixin.js +18 -20
  229. package/dist/es/core/mixins/radar-numeric-axis-mixin.js +46 -51
  230. package/dist/es/core/note.js +58 -73
  231. package/dist/es/core/numeric-axis.js +111 -133
  232. package/dist/es/core/pattern.js +4 -8
  233. package/dist/es/core/point.js +25 -34
  234. package/dist/es/core/polar-axis.js +73 -91
  235. package/dist/es/core/radar-category-axis.js +90 -114
  236. package/dist/es/core/radar-logarithmic-axis.js +10 -20
  237. package/dist/es/core/radar-numeric-axis.js +10 -20
  238. package/dist/es/core/ring.js +61 -68
  239. package/dist/es/core/root-element.js +40 -48
  240. package/dist/es/core/sector.js +11 -17
  241. package/dist/es/core/shape-builder.js +13 -23
  242. package/dist/es/core/shape-element.js +27 -37
  243. package/dist/es/core/text-box.js +50 -59
  244. package/dist/es/core/text.js +13 -24
  245. package/dist/es/core/title.js +19 -25
  246. package/dist/es/core/utils/auto-axis-max.js +3 -3
  247. package/dist/es/core/utils/auto-axis-min.js +3 -3
  248. package/dist/es/core/utils/auto-major-unit.js +4 -4
  249. package/dist/es/core/utils/box-diff.js +9 -9
  250. package/dist/es/core/utils/create-axis-grid-line.js +2 -4
  251. package/dist/es/core/utils/create-axis-tick.js +2 -4
  252. package/dist/es/core/utils/guid.js +3 -3
  253. package/dist/es/core/utils/rect-to-box.js +2 -2
  254. package/dist/es/date-utils/absolute-date-diff.js +2 -2
  255. package/dist/es/date-utils/add-duration.js +5 -5
  256. package/dist/es/date-utils/ceil-date.js +1 -1
  257. package/dist/es/date-utils/constants.js +17 -17
  258. package/dist/es/date-utils/date-index.js +3 -3
  259. package/dist/es/date-utils/duration.js +1 -1
  260. package/dist/es/date-utils/lte-date-index.js +4 -4
  261. package/dist/es/date-utils/parse-date.js +1 -1
  262. package/dist/es/date-utils/parse-dates.js +2 -2
  263. package/dist/es/date-utils/start-of-week.js +3 -5
  264. package/dist/es/date-utils/to-date.js +1 -1
  265. package/dist/es/date-utils/to-time.js +2 -2
  266. package/dist/es/drawing-utils.js +18 -17
  267. package/dist/es/gauges/arc/arc-gauge.js +29 -38
  268. package/dist/es/gauges/arc/arc-scale.js +16 -29
  269. package/dist/es/gauges/arc/range-pointer-animation.js +16 -25
  270. package/dist/es/gauges/arc/range-pointer.js +25 -46
  271. package/dist/es/gauges/circular/circular-gauge.js +7 -17
  272. package/dist/es/gauges/constants.js +14 -14
  273. package/dist/es/gauges/gauge.js +84 -96
  274. package/dist/es/gauges/linear/arrow-linear-pointer-animation.js +13 -25
  275. package/dist/es/gauges/linear/arrow-linear-pointer.js +23 -35
  276. package/dist/es/gauges/linear/bar-linear-pointer-animation.js +15 -24
  277. package/dist/es/gauges/linear/bar-linear-pointer.js +38 -51
  278. package/dist/es/gauges/linear/linear-gauge.js +61 -83
  279. package/dist/es/gauges/linear/linear-pointer.js +25 -39
  280. package/dist/es/gauges/linear/linear-scale.js +57 -74
  281. package/dist/es/gauges/pointer.js +11 -21
  282. package/dist/es/gauges/radial/radial-gauge.js +58 -81
  283. package/dist/es/gauges/radial/radial-pointer-animation.js +9 -15
  284. package/dist/es/gauges/radial/radial-pointer.js +33 -48
  285. package/dist/es/gauges/radial/radial-scale.js +154 -186
  286. package/dist/es/gauges/utils/build-label-element.js +10 -12
  287. package/dist/es/gauges/utils/get-range.js +2 -2
  288. package/dist/es/gauges/utils/pad.js +3 -3
  289. package/dist/es/gauges/utils/unpad.js +1 -1
  290. package/dist/es/map/attribution.js +42 -52
  291. package/dist/es/map/constants.js +5 -5
  292. package/dist/es/map/crs.js +68 -112
  293. package/dist/es/map/datums.js +3 -3
  294. package/dist/es/map/extent.js +40 -54
  295. package/dist/es/map/layers/bubble.js +52 -70
  296. package/dist/es/map/layers/layer.js +50 -56
  297. package/dist/es/map/layers/marker.js +109 -129
  298. package/dist/es/map/layers/shape.js +111 -133
  299. package/dist/es/map/layers/tile.js +144 -170
  300. package/dist/es/map/location.js +70 -78
  301. package/dist/es/map/map.js +261 -291
  302. package/dist/es/map/navigator.js +33 -39
  303. package/dist/es/map/scroller/draggable.js +98 -134
  304. package/dist/es/map/scroller/fx.js +39 -46
  305. package/dist/es/map/scroller/scroller.js +144 -174
  306. package/dist/es/map/tooltip/tooltip.js +15 -25
  307. package/dist/es/map/utils.js +25 -26
  308. package/dist/es/map/zoom.js +30 -36
  309. package/dist/es/qrcode/encodings/data-modes/alpha-numeric-data-mode.js +14 -26
  310. package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +15 -25
  311. package/dist/es/qrcode/encodings/data-modes/data-mode-instances.js +8 -7
  312. package/dist/es/qrcode/encodings/data-modes/numeric-data-mode.js +14 -24
  313. package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +15 -21
  314. package/dist/es/qrcode/encodings/encoders/iso-encoder.js +6 -16
  315. package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +28 -36
  316. package/dist/es/qrcode/encodings/encoding-result.js +4 -10
  317. package/dist/es/qrcode/encodings/encoding.js +68 -192
  318. package/dist/es/qrcode/encodings/free-cell-visitor.js +16 -24
  319. package/dist/es/qrcode/encodings/utils/choose-mode.js +44 -0
  320. package/dist/es/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
  321. package/dist/es/qrcode/encodings/utils/get-data-string.js +13 -0
  322. package/dist/es/qrcode/encodings/utils/get-modes.js +35 -0
  323. package/dist/es/qrcode/encodings/utils/get-version.js +23 -0
  324. package/dist/es/qrcode/encodings/utils/index.js +5 -0
  325. package/dist/es/qrcode/encodings/version-codewords.js +1 -1
  326. package/dist/es/qrcode/qrcode-validator.js +3 -5
  327. package/dist/es/qrcode/qrcode.js +104 -114
  328. package/dist/es/qrcode/utils.js +4 -4
  329. package/dist/es/sankey/calculation.js +286 -307
  330. package/dist/es/sankey/element.js +15 -23
  331. package/dist/es/sankey/label.js +29 -44
  332. package/dist/es/sankey/legend.js +15 -29
  333. package/dist/es/sankey/link.js +80 -98
  334. package/dist/es/sankey/node.js +26 -37
  335. package/dist/es/sankey/sankey.js +318 -385
  336. package/dist/es/sankey/title.js +9 -20
  337. package/dist/es/sankey/utils.js +18 -23
  338. package/dist/es/services/chart-service.js +24 -28
  339. package/dist/es/services/dom-events-builder.js +15 -15
  340. package/dist/es/services/format-service.js +30 -35
  341. package/dist/es/services/intl-service.js +14 -18
  342. package/dist/es/services/map-service.js +11 -11
  343. package/dist/es/services/template-service.js +9 -9
  344. package/dist/es/sparkline/shared-tooltip.js +11 -21
  345. package/dist/es/sparkline/sparkline.js +50 -60
  346. package/dist/es/stock/constants.js +3 -3
  347. package/dist/es/stock/fade-out-animation.js +12 -21
  348. package/dist/es/stock/navigator-hint.js +37 -49
  349. package/dist/es/stock/navigator.js +130 -161
  350. package/dist/es/stock/stock-chart.js +58 -67
  351. package/dist/es2015/chart/legend/legend-item.js +1 -1
  352. package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -1
  353. package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -1
  354. package/dist/es2015/qrcode/encodings/encoding.js +3 -127
  355. package/dist/es2015/qrcode/encodings/utils/choose-mode.js +44 -0
  356. package/dist/es2015/qrcode/encodings/utils/get-data-codewords-count.js +13 -0
  357. package/dist/es2015/qrcode/encodings/utils/get-data-string.js +13 -0
  358. package/dist/es2015/qrcode/encodings/utils/get-modes.js +35 -0
  359. package/dist/es2015/qrcode/encodings/utils/get-version.js +23 -0
  360. package/dist/es2015/qrcode/encodings/utils/index.js +5 -0
  361. package/dist/npm/main.js +3222 -3589
  362. package/dist/systemjs/kendo-charts.js +1 -1
  363. package/package.json +19 -57
@@ -1,25 +1,25 @@
1
1
  import { deepExtend } from '../common';
2
2
 
3
- var max = function (array, mapFn) { return Math.max.apply(null, array.map(mapFn)); };
4
- var min = function (array, mapFn) { return Math.min.apply(null, array.map(mapFn)); };
5
- var sum = function (array, mapFn) { return array.map(mapFn).reduce(function (acc, curr) { return (acc + curr); }, 0); };
6
- var sortAsc = function (a, b) { return (a.y0 === b.y0 ? a.index - b.index : a.y0 + a.y1 - b.y0 - b.y1); };
7
- var sortSource = function (a, b) { return sortAsc(a.source, b.source); };
8
- var sortTarget = function (a, b) { return sortAsc(a.target, b.target); };
9
- var value = function (node) { return node.value; };
3
+ const max = (array, mapFn) => Math.max.apply(null, array.map(mapFn));
4
+ const min = (array, mapFn) => Math.min.apply(null, array.map(mapFn));
5
+ const sum = (array, mapFn) => array.map(mapFn).reduce((acc, curr) => (acc + curr), 0);
6
+ const sortAsc = (a, b) => (a.y0 === b.y0 ? a.index - b.index : a.y0 + a.y1 - b.y0 - b.y1);
7
+ const sortSource = (a, b) => sortAsc(a.source, b.source);
8
+ const sortTarget = (a, b) => sortAsc(a.target, b.target);
9
+ const value = (node) => node.value;
10
10
 
11
11
  function sortLinks(nodes) {
12
- nodes.forEach(function (node) {
13
- node.targetLinks.forEach(function (link) {
12
+ nodes.forEach(node => {
13
+ node.targetLinks.forEach(link => {
14
14
  link.source.sourceLinks.sort(sortTarget);
15
15
  });
16
- node.sourceLinks.forEach(function (link) {
16
+ node.sourceLinks.forEach(link => {
17
17
  link.target.targetLinks.sort(sortSource);
18
18
  });
19
19
  });
20
20
  }
21
21
 
22
- var calcLayer = function (node, maxDepth) {
22
+ const calcLayer = (node, maxDepth) => {
23
23
  if (node.align === 'left') {
24
24
  return node.depth;
25
25
  }
@@ -31,351 +31,330 @@ var calcLayer = function (node, maxDepth) {
31
31
  return node.sourceLinks.length ? node.depth : maxDepth;
32
32
  };
33
33
 
34
- var Sankey = function Sankey(options) {
35
- var ref = options.nodesOptions;
36
- var offset = ref.offset; if ( offset === void 0 ) offset = {};
37
- var align = ref.align;
38
- this.data = {
39
- nodes: options.nodes.map(function (node) { return deepExtend({}, { offset: offset, align: align }, node); }),
40
- links: options.links.map(function (link) { return deepExtend({}, link); })
41
- };
42
-
43
- this.width = options.width;
44
- this.height = options.height;
45
- this.offsetX = options.offsetX || 0;
46
- this.offsetY = options.offsetY || 0;
47
- this.nodeWidth = options.nodesOptions.width;
48
- this.nodePadding = options.nodesOptions.padding;
49
- this.reverse = options.reverse;
50
- this.targetColumnIndex = options.targetColumnIndex;
51
- this.loops = options.loops;
52
- this.autoLayout = options.autoLayout;
53
- };
54
-
55
- Sankey.prototype.calculate = function calculate () {
56
- var ref = this.data;
57
- var nodes = ref.nodes;
58
- var links = ref.links;
59
- this.connectLinksToNodes(nodes, links);
60
- this.calculateNodeValues(nodes);
61
-
62
- var circularLinks = this.calculateNodeHeights(nodes);
34
+ class Sankey {
35
+ constructor(options) {
36
+ const { offset = {}, align } = options.nodesOptions;
37
+ this.data = {
38
+ nodes: options.nodes.map((node) => deepExtend({}, { offset, align }, node)),
39
+ links: options.links.map((link) => deepExtend({}, link))
40
+ };
63
41
 
64
- if (circularLinks) {
65
- return { nodes: [], links: [], columns: [], circularLinks: circularLinks };
42
+ this.width = options.width;
43
+ this.height = options.height;
44
+ this.offsetX = options.offsetX || 0;
45
+ this.offsetY = options.offsetY || 0;
46
+ this.nodeWidth = options.nodesOptions.width;
47
+ this.nodePadding = options.nodesOptions.padding;
48
+ this.reverse = options.reverse;
49
+ this.targetColumnIndex = options.targetColumnIndex;
50
+ this.loops = options.loops;
51
+ this.autoLayout = options.autoLayout;
66
52
  }
67
53
 
68
- this.calculateNodeDepths(nodes);
69
- var columns = this.calculateNodeColumns(nodes);
70
- this.calculateNodeBreadths(columns);
71
- this.applyNodesOffset(nodes);
72
- this.calculateLinkBreadths(nodes);
54
+ calculate() {
55
+ const { nodes, links } = this.data;
56
+ this.connectLinksToNodes(nodes, links);
57
+ this.calculateNodeValues(nodes);
73
58
 
74
- return Object.assign({}, this.data, {columns: columns});
75
- };
59
+ const circularLinks = this.calculateNodeHeights(nodes);
76
60
 
77
- Sankey.prototype.connectLinksToNodes = function connectLinksToNodes (nodes, links) {
78
- var nodesMap = new Map();
61
+ if (circularLinks) {
62
+ return { nodes: [], links: [], columns: [], circularLinks };
63
+ }
79
64
 
80
- nodes.forEach(function (node, i) {
81
- node.index = i;
82
- node.sourceLinks = [];
83
- node.targetLinks = [];
84
- node.id = node.id !== undefined ? node.id : node.label.text;
85
- nodesMap.set(node.id, node);
86
- });
65
+ this.calculateNodeDepths(nodes);
66
+ const columns = this.calculateNodeColumns(nodes);
67
+ this.calculateNodeBreadths(columns);
68
+ this.applyNodesOffset(nodes);
69
+ this.calculateLinkBreadths(nodes);
87
70
 
88
- links.forEach(function (link) {
89
- link.source = nodesMap.get(link.sourceId);
90
- link.target = nodesMap.get(link.targetId);
91
- link.source.sourceLinks.push(link);
92
- link.target.targetLinks.push(link);
93
- });
94
- };
71
+ return Object.assign({}, this.data, {columns});
72
+ }
95
73
 
96
- Sankey.prototype.calculateNodeValues = function calculateNodeValues (nodes) {
97
- nodes.forEach(function (node) {
98
- node.value = Math.max(
99
- sum(node.sourceLinks, value),
100
- sum(node.targetLinks, value)
101
- );
102
- });
103
- };
74
+ connectLinksToNodes(nodes, links) {
75
+ const nodesMap = new Map();
104
76
 
105
- Sankey.prototype.calculateNodeDepths = function calculateNodeDepths (nodes) {
106
- var current = new Set(nodes);
107
- var next = new Set();
108
- var currDepth = 0;
109
- while (current.size) {
110
- var currentNodes = Array.from(current);
111
- for (var n = 0; n < currentNodes.length; n++) {
112
- var node = currentNodes[n];
113
- node.depth = currDepth;
114
- for (var l = 0; l < node.sourceLinks.length; l++) {
115
- var link = node.sourceLinks[l];
116
- next.add(link.target);
117
- }
118
- }
119
- currDepth++;
120
- current = next;
121
- next = new Set();
77
+ nodes.forEach((node, i) => {
78
+ node.index = i;
79
+ node.sourceLinks = [];
80
+ node.targetLinks = [];
81
+ node.id = node.id !== undefined ? node.id : node.label.text;
82
+ nodesMap.set(node.id, node);
83
+ });
84
+
85
+ links.forEach((link) => {
86
+ link.source = nodesMap.get(link.sourceId);
87
+ link.target = nodesMap.get(link.targetId);
88
+ link.source.sourceLinks.push(link);
89
+ link.target.targetLinks.push(link);
90
+ });
122
91
  }
123
- };
124
92
 
125
- Sankey.prototype.calculateNodeHeights = function calculateNodeHeights (nodes) {
126
- var nodesLength = nodes.length;
127
- var current = new Set(nodes);
128
- var next = new Set;
129
- var currentHeight = 0;
130
- var eachNode = function (node) {
131
- node.height = currentHeight;
132
- node.targetLinks.forEach(function (link) {
133
- next.add(link.source);
93
+ calculateNodeValues(nodes) {
94
+ nodes.forEach((node) => {
95
+ node.value = Math.max(
96
+ sum(node.sourceLinks, value),
97
+ sum(node.targetLinks, value)
98
+ );
134
99
  });
135
- };
136
- while (current.size) {
137
- current.forEach(eachNode);
138
- currentHeight++;
139
- if (currentHeight > nodesLength) {
140
- return true;
141
- }
142
- current = next;
143
- next = new Set;
144
100
  }
145
- return false;
146
- };
147
101
 
148
- Sankey.prototype.calculateNodeColumns = function calculateNodeColumns (nodes) {
149
- var this$1 = this;
150
-
151
- var maxDepth = max(nodes, function (d) { return d.depth; });
152
- var columnWidth = (this.width - this.offsetX - this.nodeWidth) / maxDepth;
153
- var columns = new Array(maxDepth + 1);
154
- for (var i = 0; i < nodes.length; i++) {
155
- var node = nodes[i];
156
- var layer = Math.max(0, Math.min(maxDepth, calcLayer(node, maxDepth)));
157
- node.x0 = this$1.offsetX + layer * columnWidth;
158
- node.x1 = node.x0 + this$1.nodeWidth;
159
- node.layer = layer;
160
- columns[layer] = columns[layer] || [];
161
- columns[layer].push(node);
102
+ calculateNodeDepths(nodes) {
103
+ let current = new Set(nodes);
104
+ let next = new Set();
105
+ let currDepth = 0;
106
+ while (current.size) {
107
+ const currentNodes = Array.from(current);
108
+ for (let n = 0; n < currentNodes.length; n++) {
109
+ const node = currentNodes[n];
110
+ node.depth = currDepth;
111
+ for (let l = 0; l < node.sourceLinks.length; l++) {
112
+ const link = node.sourceLinks[l];
113
+ next.add(link.target);
114
+ }
115
+ }
116
+ currDepth++;
117
+ current = next;
118
+ next = new Set();
119
+ }
162
120
  }
163
121
 
164
- return columns;
165
- };
122
+ calculateNodeHeights(nodes) {
123
+ const nodesLength = nodes.length;
124
+ let current = new Set(nodes);
125
+ let next = new Set;
126
+ let currentHeight = 0;
127
+ const eachNode = (node) => {
128
+ node.height = currentHeight;
129
+ node.targetLinks.forEach((link) => {
130
+ next.add(link.source);
131
+ });
132
+ };
133
+ while (current.size) {
134
+ current.forEach(eachNode);
135
+ currentHeight++;
136
+ if (currentHeight > nodesLength) {
137
+ return true;
138
+ }
139
+ current = next;
140
+ next = new Set;
141
+ }
142
+ return false;
143
+ }
166
144
 
167
- Sankey.prototype.calculateNodeBreadths = function calculateNodeBreadths (columns) {
168
- var this$1 = this;
145
+ calculateNodeColumns(nodes) {
146
+ const maxDepth = max(nodes, (d) => d.depth);
147
+ const columnWidth = (this.width - this.offsetX - this.nodeWidth) / maxDepth;
148
+ const columns = new Array(maxDepth + 1);
149
+ for (let i = 0; i < nodes.length; i++) {
150
+ const node = nodes[i];
151
+ const layer = Math.max(0, Math.min(maxDepth, calcLayer(node, maxDepth)));
152
+ node.x0 = this.offsetX + layer * columnWidth;
153
+ node.x1 = node.x0 + this.nodeWidth;
154
+ node.layer = layer;
155
+ columns[layer] = columns[layer] || [];
156
+ columns[layer].push(node);
157
+ }
169
158
 
170
- var kSize = min(columns, function (c) { return (this$1.height - this$1.offsetY - (c.length - 1) * this$1.nodePadding) / sum(c, value); });
159
+ return columns;
160
+ }
171
161
 
172
- columns.forEach(function (nodes) {
173
- var y = this$1.offsetY;
174
- nodes.forEach(function (node) {
175
- node.y0 = y;
176
- node.y1 = y + node.value * kSize;
177
- y = node.y1 + this$1.nodePadding;
178
- node.sourceLinks.forEach(function (link) {
179
- link.width = link.value * kSize;
162
+ calculateNodeBreadths(columns) {
163
+ const kSize = min(columns, (c) => (this.height - this.offsetY - (c.length - 1) * this.nodePadding) / sum(c, value));
164
+
165
+ columns.forEach(nodes => {
166
+ let y = this.offsetY;
167
+ nodes.forEach((node) => {
168
+ node.y0 = y;
169
+ node.y1 = y + node.value * kSize;
170
+ y = node.y1 + this.nodePadding;
171
+ node.sourceLinks.forEach((link) => {
172
+ link.width = link.value * kSize;
173
+ });
174
+ });
175
+ y = (this.height - y + this.nodePadding) / (nodes.length + 1);
176
+ nodes.forEach((node, i) => {
177
+ node.y0 += y * (i + 1);
178
+ node.y1 += y * (i + 1);
180
179
  });
181
180
  });
182
- y = (this$1.height - y + this$1.nodePadding) / (nodes.length + 1);
183
- nodes.forEach(function (node, i) {
184
- node.y0 += y * (i + 1);
185
- node.y1 += y * (i + 1);
186
- });
187
- });
188
181
 
189
- if (this.autoLayout !== false) {
190
- var loops = this.loops !== undefined ? this.loops : columns.length - 1;
191
- var targetColumnIndex = this.targetColumnIndex || 1;
192
-
193
- for (var i = 0; i < loops; i++) {
194
- if (!this$1.reverse) {
195
- this$1.uncurlLinksToLeft(columns, targetColumnIndex);
196
- this$1.uncurlLinksToRight(columns, targetColumnIndex);
197
- } else {
198
- this$1.uncurlLinksToRight(columns, targetColumnIndex);
199
- this$1.uncurlLinksToLeft(columns, targetColumnIndex);
182
+ if (this.autoLayout !== false) {
183
+ const loops = this.loops !== undefined ? this.loops : columns.length - 1;
184
+ const targetColumnIndex = this.targetColumnIndex || 1;
185
+
186
+ for (let i = 0; i < loops; i++) {
187
+ if (!this.reverse) {
188
+ this.uncurlLinksToLeft(columns, targetColumnIndex);
189
+ this.uncurlLinksToRight(columns, targetColumnIndex);
190
+ } else {
191
+ this.uncurlLinksToRight(columns, targetColumnIndex);
192
+ this.uncurlLinksToLeft(columns, targetColumnIndex);
193
+ }
200
194
  }
201
195
  }
202
- }
203
-
204
- columns.forEach(sortLinks);
205
- };
206
196
 
207
- Sankey.prototype.applyNodesOffset = function applyNodesOffset (nodes) {
208
- nodes.forEach(function (node) {
209
- var offsetX = (node.offset ? node.offset.left : 0) || 0;
210
- var offsetY = (node.offset ? node.offset.top : 0) || 0;
211
- node.x0 += offsetX;
212
- node.x1 += offsetX;
213
- node.y0 += offsetY;
214
- node.y1 += offsetY;
215
- });
216
- };
197
+ columns.forEach(sortLinks);
198
+ }
217
199
 
218
- Sankey.prototype.calculateLinkBreadths = function calculateLinkBreadths (nodes) {
219
- nodes.forEach(function (node) {
220
- var sourceLinks = node.sourceLinks;
221
- var targetLinks = node.targetLinks;
222
- var y = node.y0;
223
- var y1 = y;
224
- sourceLinks.forEach(function (link) {
225
- link.x0 = link.source.x1;
226
- link.y0 = y + link.width / 2;
227
- y += link.width;
200
+ applyNodesOffset(nodes) {
201
+ nodes.forEach((node) => {
202
+ const offsetX = (node.offset ? node.offset.left : 0) || 0;
203
+ const offsetY = (node.offset ? node.offset.top : 0) || 0;
204
+ node.x0 += offsetX;
205
+ node.x1 += offsetX;
206
+ node.y0 += offsetY;
207
+ node.y1 += offsetY;
228
208
  });
229
- targetLinks.forEach(function (link) {
230
- link.x1 = link.target.x0;
231
- link.y1 = y1 + link.width / 2;
232
- y1 += link.width;
233
- });
234
- });
235
- };
209
+ }
236
210
 
237
- Sankey.prototype.uncurlLinksToRight = function uncurlLinksToRight (columns, targetColumnIndex) {
238
- var this$1 = this;
239
-
240
- var n = columns.length;
241
- for (var i = targetColumnIndex; i < n; i++) {
242
- var column = columns[i];
243
- column.forEach(function (target) {
244
- var y = 0;
245
- var sum = 0;
246
- target.targetLinks.forEach(function (link) {
247
- var kValue = link.value * (target.layer - link.source.layer);
248
- y += this$1.targetTopPos(link.source, target) * kValue;
249
- sum += kValue;
211
+ calculateLinkBreadths(nodes) {
212
+ nodes.forEach((node) => {
213
+ const { sourceLinks, targetLinks } = node;
214
+ let y = node.y0;
215
+ let y1 = y;
216
+ sourceLinks.forEach((link) => {
217
+ link.x0 = link.source.x1;
218
+ link.y0 = y + link.width / 2;
219
+ y += link.width;
220
+ });
221
+ targetLinks.forEach((link) => {
222
+ link.x1 = link.target.x0;
223
+ link.y1 = y1 + link.width / 2;
224
+ y1 += link.width;
250
225
  });
251
-
252
- var dy = y === 0 ? 0 : (y / sum - target.y0);
253
- target.y0 += dy;
254
- target.y1 += dy;
255
- sortLinks([target]);
256
226
  });
257
- column.sort(sortAsc);
258
- this$1.arrangeNodesVertically(column);
259
227
  }
260
- };
261
228
 
262
- Sankey.prototype.uncurlLinksToLeft = function uncurlLinksToLeft (columns, targetColumnIndex) {
263
- var this$1 = this;
264
-
265
- var l = columns.length;
266
- var startIndex = l - 1 - targetColumnIndex;
267
- for (var i = startIndex; i >= 0; i--) {
268
- var column = columns[i];
269
- var loop = function ( j ) {
270
- var source = column[j];
271
- var y = 0;
272
- var sum = 0;
273
- source.sourceLinks.forEach(function (link) {
274
- var kValue = link.value * (link.target.layer - source.layer);
275
- y += this$1.sourceTopPos(source, link.target) * kValue;
276
- sum += kValue;
229
+ uncurlLinksToRight(columns, targetColumnIndex) {
230
+ const n = columns.length;
231
+ for (let i = targetColumnIndex; i < n; i++) {
232
+ const column = columns[i];
233
+ column.forEach((target) => {
234
+ let y = 0;
235
+ let sum = 0;
236
+ target.targetLinks.forEach((link) => {
237
+ let kValue = link.value * (target.layer - link.source.layer);
238
+ y += this.targetTopPos(link.source, target) * kValue;
239
+ sum += kValue;
240
+ });
241
+
242
+ let dy = y === 0 ? 0 : (y / sum - target.y0);
243
+ target.y0 += dy;
244
+ target.y1 += dy;
245
+ sortLinks([target]);
277
246
  });
278
- var dy = y === 0 ? 0 : (y / sum - source.y0);
279
- source.y0 += dy;
280
- source.y1 += dy;
281
- sortLinks([source]);
282
- };
283
-
284
- for (var j = 0; j < column.length; j++) loop( j );
285
-
286
- column.sort(sortAsc);
287
- this$1.arrangeNodesVertically(column);
247
+ column.sort(sortAsc);
248
+ this.arrangeNodesVertically(column);
249
+ }
288
250
  }
289
- };
290
-
291
- Sankey.prototype.arrangeNodesVertically = function arrangeNodesVertically (nodes) {
292
- var startIndex = 0;
293
- var endIndex = nodes.length - 1;
294
-
295
- this.arrangeUp(nodes, this.height, endIndex);
296
- this.arrangeDown(nodes, this.offsetY, startIndex);
297
- };
298
251
 
299
- Sankey.prototype.arrangeDown = function arrangeDown (nodes, yPos, index) {
300
- var this$1 = this;
301
-
302
- var currentY = yPos;
252
+ uncurlLinksToLeft(columns, targetColumnIndex) {
253
+ const l = columns.length;
254
+ const startIndex = l - 1 - targetColumnIndex;
255
+ for (let i = startIndex; i >= 0; i--) {
256
+ const column = columns[i];
257
+ for (let j = 0; j < column.length; j++) {
258
+ const source = column[j];
259
+ let y = 0;
260
+ let sum = 0;
261
+ source.sourceLinks.forEach((link) => {
262
+ let kValue = link.value * (link.target.layer - source.layer);
263
+ y += this.sourceTopPos(source, link.target) * kValue;
264
+ sum += kValue;
265
+ });
266
+ let dy = y === 0 ? 0 : (y / sum - source.y0);
267
+ source.y0 += dy;
268
+ source.y1 += dy;
269
+ sortLinks([source]);
270
+ }
303
271
 
304
- for (var i = index; i < nodes.length; i++) {
305
- var node = nodes[i];
306
- var dy = Math.max(0, currentY - node.y0);
307
- node.y0 += dy;
308
- node.y1 += dy;
309
- currentY = node.y1 + this$1.nodePadding;
272
+ column.sort(sortAsc);
273
+ this.arrangeNodesVertically(column);
274
+ }
310
275
  }
311
- };
312
276
 
313
- Sankey.prototype.arrangeUp = function arrangeUp (nodes, yPos, index) {
314
- var this$1 = this;
277
+ arrangeNodesVertically(nodes) {
278
+ const startIndex = 0;
279
+ const endIndex = nodes.length - 1;
315
280
 
316
- var currentY = yPos;
317
- for (var i = index; i >= 0; --i) {
318
- var node = nodes[i];
319
- var dy = Math.max(0, node.y1 - currentY);
320
- node.y0 -= dy;
321
- node.y1 -= dy;
322
- currentY = node.y0 - this$1.nodePadding;
281
+ this.arrangeUp(nodes, this.height, endIndex);
282
+ this.arrangeDown(nodes, this.offsetY, startIndex);
323
283
  }
324
- };
325
284
 
326
- Sankey.prototype.sourceTopPos = function sourceTopPos (source, target) {
327
- var this$1 = this;
285
+ arrangeDown(nodes, yPos, index) {
286
+ let currentY = yPos;
328
287
 
329
- var y = target.y0 - ((target.targetLinks.length - 1) * this.nodePadding) / 2;
330
- for (var i = 0; i < target.targetLinks.length; i++) {
331
- var link = target.targetLinks[i];
332
- if (link.source === source) {
333
- break;
288
+ for (let i = index; i < nodes.length; i++) {
289
+ const node = nodes[i];
290
+ const dy = Math.max(0, currentY - node.y0);
291
+ node.y0 += dy;
292
+ node.y1 += dy;
293
+ currentY = node.y1 + this.nodePadding;
334
294
  }
335
- y += link.width + this$1.nodePadding;
336
295
  }
337
- for (var i$1 = 0; i$1 < source.sourceLinks.length; i$1++) {
338
- var link$1 = source.sourceLinks[i$1];
339
- if (link$1.target === target) {
340
- break;
296
+
297
+ arrangeUp(nodes, yPos, index) {
298
+ let currentY = yPos;
299
+ for (let i = index; i >= 0; --i) {
300
+ const node = nodes[i];
301
+ const dy = Math.max(0, node.y1 - currentY);
302
+ node.y0 -= dy;
303
+ node.y1 -= dy;
304
+ currentY = node.y0 - this.nodePadding;
341
305
  }
342
- y -= link$1.width;
343
306
  }
344
- return y;
345
- };
346
307
 
347
- Sankey.prototype.targetTopPos = function targetTopPos (source, target) {
348
- var this$1 = this;
349
-
350
- var y = source.y0 - ((source.sourceLinks.length - 1) * this.nodePadding) / 2;
351
- for (var i = 0; i < source.sourceLinks.length; i++) {
352
- var link = source.sourceLinks[i];
353
- if (link.target === target) {
354
- break;
308
+ sourceTopPos(source, target) {
309
+ let y = target.y0 - ((target.targetLinks.length - 1) * this.nodePadding) / 2;
310
+ for (let i = 0; i < target.targetLinks.length; i++) {
311
+ const link = target.targetLinks[i];
312
+ if (link.source === source) {
313
+ break;
314
+ }
315
+ y += link.width + this.nodePadding;
355
316
  }
356
- y += link.width + this$1.nodePadding;
317
+ for (let i = 0; i < source.sourceLinks.length; i++) {
318
+ const link = source.sourceLinks[i];
319
+ if (link.target === target) {
320
+ break;
321
+ }
322
+ y -= link.width;
323
+ }
324
+ return y;
357
325
  }
358
- for (var i$1 = 0; i$1 < target.targetLinks.length; i$1++) {
359
- var link$1 = target.targetLinks[i$1];
360
- if (link$1.source === source) {
361
- break;
326
+
327
+ targetTopPos(source, target) {
328
+ let y = source.y0 - ((source.sourceLinks.length - 1) * this.nodePadding) / 2;
329
+ for (let i = 0; i < source.sourceLinks.length; i++) {
330
+ const link = source.sourceLinks[i];
331
+ if (link.target === target) {
332
+ break;
333
+ }
334
+ y += link.width + this.nodePadding;
362
335
  }
363
- y -= link$1.width;
336
+ for (let i = 0; i < target.targetLinks.length; i++) {
337
+ const link = target.targetLinks[i];
338
+ if (link.source === source) {
339
+ break;
340
+ }
341
+ y -= link.width;
342
+ }
343
+ return y;
364
344
  }
365
- return y;
366
- };
345
+ }
367
346
 
368
- export var calculateSankey = function (options) { return new Sankey(options).calculate(); };
347
+ export const calculateSankey = (options) => new Sankey(options).calculate();
369
348
 
370
- export var crossesValue = function (links) {
371
- var value = 0;
372
- var linksLength = links.length;
349
+ export const crossesValue = (links) => {
350
+ let value = 0;
351
+ const linksLength = links.length;
373
352
 
374
- for (var i = 0; i < linksLength; i++) {
375
- var link = links[i];
353
+ for (let i = 0; i < linksLength; i++) {
354
+ const link = links[i];
376
355
 
377
- for (var lNext = i + 1; lNext < linksLength; lNext++) {
378
- var nextLink = links[lNext];
356
+ for (let lNext = i + 1; lNext < linksLength; lNext++) {
357
+ const nextLink = links[lNext];
379
358
 
380
359
  if (intersect(link, nextLink)) {
381
360
  value += Math.min(link.value, nextLink.value);
@@ -387,8 +366,8 @@ export var crossesValue = function (links) {
387
366
  };
388
367
 
389
368
  function rotationDirection(p1x, p1y, p2x, p2y, p3x, p3y) {
390
- var expression1 = (p3y - p1y) * (p2x - p1x);
391
- var expression2 = (p2y - p1y) * (p3x - p1x);
369
+ const expression1 = (p3y - p1y) * (p2x - p1x);
370
+ const expression2 = (p2y - p1y) * (p3x - p1x);
392
371
 
393
372
  if (expression1 > expression2) {
394
373
  return 1;
@@ -400,10 +379,10 @@ function rotationDirection(p1x, p1y, p2x, p2y, p3x, p3y) {
400
379
  }
401
380
 
402
381
  function intersect(link1, link2) {
403
- var f1 = rotationDirection(link1.x0, link1.y0, link1.x1, link1.y1, link2.x1, link2.y1);
404
- var f2 = rotationDirection(link1.x0, link1.y0, link1.x1, link1.y1, link2.x0, link2.y0);
405
- var f3 = rotationDirection(link1.x0, link1.y0, link2.x0, link2.y0, link2.x1, link2.y1);
406
- var f4 = rotationDirection(link1.x1, link1.y1, link2.x0, link2.y0, link2.x1, link2.y1);
382
+ const f1 = rotationDirection(link1.x0, link1.y0, link1.x1, link1.y1, link2.x1, link2.y1);
383
+ const f2 = rotationDirection(link1.x0, link1.y0, link1.x1, link1.y1, link2.x0, link2.y0);
384
+ const f3 = rotationDirection(link1.x0, link1.y0, link2.x0, link2.y0, link2.x1, link2.y1);
385
+ const f4 = rotationDirection(link1.x1, link1.y1, link2.x0, link2.y0, link2.x1, link2.y1);
407
386
 
408
387
  return f1 !== f2 && f3 !== f4;
409
388
  }