@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,8 +1,8 @@
1
1
  import { Class } from '../../common';
2
2
 
3
- export var FreeCellVisitor = (function (Class) {
4
- function FreeCellVisitor(matrix) {
5
- Class.call(this);
3
+ export class FreeCellVisitor extends Class {
4
+ constructor(matrix) {
5
+ super();
6
6
 
7
7
  this.matrix = matrix;
8
8
  this.row = matrix.length - 1;
@@ -12,27 +12,21 @@ export var FreeCellVisitor = (function (Class) {
12
12
  this.c = 0;
13
13
  }
14
14
 
15
- if ( Class ) FreeCellVisitor.__proto__ = Class;
16
- FreeCellVisitor.prototype = Object.create( Class && Class.prototype );
17
- FreeCellVisitor.prototype.constructor = FreeCellVisitor;
18
-
19
- FreeCellVisitor.prototype.move = function move () {
15
+ move() {
20
16
  this.row += this.dir * this.c;
21
17
  this.c ^= 1;
22
18
  this.column = this.startColumn - this.c;
23
- };
24
-
25
- FreeCellVisitor.prototype.getNextCell = function getNextCell () {
26
- var this$1 = this;
19
+ }
27
20
 
21
+ getNextCell() {
28
22
  while (this.matrix[this.row][this.column] !== undefined) {
29
- this$1.move();
23
+ this.move();
30
24
 
31
- if (this$1.row < 0 || this$1.row >= this$1.matrix.length) {
32
- this$1.dir = -this$1.dir;
33
- this$1.startColumn -= this$1.startColumn !== 8 ? 2 : 3;
34
- this$1.column = this$1.startColumn;
35
- this$1.row = this$1.dir < 0 ? this$1.matrix.length - 1 : 0;
25
+ if (this.row < 0 || this.row >= this.matrix.length) {
26
+ this.dir = -this.dir;
27
+ this.startColumn -= this.startColumn !== 8 ? 2 : 3;
28
+ this.column = this.startColumn;
29
+ this.row = this.dir < 0 ? this.matrix.length - 1 : 0;
36
30
  }
37
31
  }
38
32
 
@@ -40,9 +34,9 @@ export var FreeCellVisitor = (function (Class) {
40
34
  row: this.row,
41
35
  column: this.column
42
36
  };
43
- };
37
+ }
44
38
 
45
- FreeCellVisitor.prototype.getNextRemainderCell = function getNextRemainderCell () {
39
+ getNextRemainderCell() {
46
40
  this.move();
47
41
 
48
42
  if (this.matrix[this.row][this.column] === undefined) {
@@ -51,7 +45,5 @@ export var FreeCellVisitor = (function (Class) {
51
45
  column: this.column
52
46
  };
53
47
  }
54
- };
55
-
56
- return FreeCellVisitor;
57
- }(Class));
48
+ }
49
+ }
@@ -0,0 +1,44 @@
1
+ const NUMERIC = "numeric";
2
+ const ALPHA_NUMERIC = "alphanumeric";
3
+ const BYTE = "byte";
4
+ const numberRegex = /^\d+/;
5
+ const alphaPattern = "A-Z0-9 $%*+./:-";
6
+ const alphaExclusiveSet = "A-Z $%*+./:-";
7
+ const alphaRegex = new RegExp("^[" + alphaExclusiveSet + "]+");
8
+ const alphaNumericRegex = new RegExp("^[" + alphaPattern + "]+");
9
+ const byteRegex = new RegExp("^[^" + alphaPattern + "]+");
10
+
11
+ export function chooseMode(str, minNumericBeforeAlpha, minNumericBeforeByte, minAlphaBeforeByte, previousMode) {
12
+ let numeric = numberRegex.exec(str),
13
+ numericMatch = numeric ? numeric[0] : "",
14
+ alpha = alphaRegex.exec(str),
15
+ alphaMatch = alpha ? alpha[0] : "",
16
+ alphaNumeric = alphaNumericRegex.exec(str),
17
+ alphaNumericMatch = alphaNumeric ? alphaNumeric[0] : "",
18
+ mode,
19
+ modeString;
20
+
21
+ if (numericMatch &&
22
+ (numericMatch.length >= minNumericBeforeAlpha || str.length === numericMatch.length ||
23
+ (numericMatch.length >= minNumericBeforeByte && !alphaNumericRegex.test(str.charAt(numericMatch.length))))) {
24
+ mode = NUMERIC;
25
+ modeString = numericMatch;
26
+ } else if (alphaNumericMatch && (str.length === alphaNumericMatch.length ||
27
+ alphaNumericMatch.length >= minAlphaBeforeByte || previousMode === ALPHA_NUMERIC)) {
28
+ mode = ALPHA_NUMERIC;
29
+ modeString = numericMatch || alphaMatch;
30
+ } else {
31
+ mode = BYTE;
32
+
33
+ if (alphaNumericMatch) {
34
+ modeString = alphaNumericMatch + byteRegex.exec(str.substring(alphaNumericMatch.length))[0];
35
+ } else {
36
+ modeString = byteRegex.exec(str)[0];
37
+ }
38
+ }
39
+
40
+ return {
41
+ mode: mode,
42
+ modeString: modeString
43
+ };
44
+ }
@@ -0,0 +1,13 @@
1
+ import { DataModeInstances } from '../data-modes/data-mode-instances';
2
+
3
+ export function getDataCodewordsCount(modes) {
4
+ let length = 0,
5
+ mode;
6
+
7
+ for (let i = 0; i < modes.length; i++) {
8
+ mode = DataModeInstances[modes[i].mode];
9
+ length += mode.getStringBitsLength(modes[i].modeString.length);
10
+ }
11
+
12
+ return Math.ceil(length / 8);
13
+ }
@@ -0,0 +1,13 @@
1
+ import { DataModeInstances } from '../data-modes/data-mode-instances';
2
+
3
+ export function getDataString(modes, version) {
4
+ let dataString = "",
5
+ mode;
6
+
7
+ for (let i = 0; i < modes.length; i++) {
8
+ mode = DataModeInstances[modes[i].mode];
9
+ dataString += mode.encode(modes[i].modeString, version);
10
+ }
11
+
12
+ return dataString;
13
+ }
@@ -0,0 +1,35 @@
1
+ import { chooseMode } from './choose-mode';
2
+
3
+ const initMinNumericBeforeAlpha = 8;
4
+ const initMinNumericBeforeByte = 5;
5
+ const initMinAlphaBeforeByte = 8;
6
+ const minNumericBeforeAlpha = 17;
7
+ const minNumericBeforeByte = 9;
8
+ const minAlphaBeforeByte = 16;
9
+
10
+ export function getModes(inputString) {
11
+ let modes = [],
12
+ previousMode,
13
+ idx = 0;
14
+ let str = inputString;
15
+
16
+ modes.push(chooseMode(str, initMinNumericBeforeAlpha, initMinNumericBeforeByte, initMinAlphaBeforeByte, previousMode));
17
+ previousMode = modes[0].mode;
18
+ str = str.substr(modes[0].modeString.length);
19
+
20
+ while (str.length > 0) {
21
+ let nextMode = chooseMode(str, minNumericBeforeAlpha, minNumericBeforeByte, minAlphaBeforeByte, previousMode);
22
+
23
+ if (nextMode.mode !== previousMode) {
24
+ previousMode = nextMode.mode;
25
+ modes.push(nextMode);
26
+ idx++;
27
+ } else {
28
+ modes[idx].modeString += nextMode.modeString;
29
+ }
30
+
31
+ str = str.substr(nextMode.modeString.length);
32
+ }
33
+
34
+ return modes;
35
+ }
@@ -0,0 +1,23 @@
1
+ import { VersionsCodewordsInformation } from '../version-codewords';
2
+
3
+ export function getVersion(dataCodewordsCount, errorCorrectionLevel) {
4
+ let x = 0,
5
+ y = VersionsCodewordsInformation.length - 1,
6
+ version = Math.floor(VersionsCodewordsInformation.length / 2);
7
+
8
+ do {
9
+ if (dataCodewordsCount < VersionsCodewordsInformation[version][errorCorrectionLevel].totalDataCodewords) {
10
+ y = version;
11
+ } else {
12
+ x = version;
13
+ }
14
+
15
+ version = x + Math.floor((y - x) / 2);
16
+ } while (y - x > 1);
17
+
18
+ if (dataCodewordsCount <= VersionsCodewordsInformation[x][errorCorrectionLevel].totalDataCodewords) {
19
+ return version + 1;
20
+ }
21
+
22
+ return y + 1;
23
+ }
@@ -0,0 +1,5 @@
1
+ export * from './choose-mode';
2
+ export * from './get-data-codewords-count';
3
+ export * from './get-data-string';
4
+ export * from './get-modes';
5
+ export * from './get-version';
@@ -1,4 +1,4 @@
1
- export var VersionsCodewordsInformation = [{
1
+ export const VersionsCodewordsInformation = [{
2
2
  L: {
3
3
  groups: [
4
4
  [1, 19]
@@ -1,17 +1,15 @@
1
1
  import { encodeData } from './encodings/encoding';
2
2
 
3
- var ISO = 'ISO_8859_1';
4
-
5
- function qrcodeValidator(encoding) {
6
- if ( encoding === void 0 ) encoding = ISO;
3
+ const ISO = 'ISO_8859_1';
7
4
 
5
+ function qrcodeValidator(encoding = ISO) {
8
6
  return function(value) {
9
7
  try {
10
8
  encodeData(value, 'L', encoding);
11
9
  } catch (error) {
12
10
  return {
13
11
  valid: false,
14
- error: error
12
+ error
15
13
  };
16
14
  }
17
15
 
@@ -17,11 +17,11 @@ import { extend } from './utils';
17
17
 
18
18
  import { surfaceSize } from '../barcode/surface-size';
19
19
 
20
- var round = Math.round;
21
- var crossPattern = [[0, 1], [1, 1], [1, 2], [2, 2], [2, 1], [3, 1], [3, 0], [2, 0], [2, -1], [1, -1], [1, 0]];
22
- var squarePattern = [[0, 1], [1, 1], [1, 0]];
20
+ const round = Math.round;
21
+ const crossPattern = [[0, 1], [1, 1], [1, 2], [2, 2], [2, 1], [3, 1], [3, 0], [2, 0], [2, -1], [1, -1], [1, 0]];
22
+ const squarePattern = [[0, 1], [1, 1], [1, 0]];
23
23
 
24
- var QRCodeDefaults = {
24
+ const QRCodeDefaults = {
25
25
  DEFAULT_SIZE: 200,
26
26
  QUIET_ZONE_LENGTH: 4,
27
27
  DEFAULT_ERROR_CORRECTION_LEVEL: "L",
@@ -31,11 +31,9 @@ var QRCodeDefaults = {
31
31
  DEFAULT_LOGO_SIZE: 7
32
32
  };
33
33
 
34
- var QRCode = (function (Class) {
35
- function QRCode(element, options, errorHandler) {
36
- if ( errorHandler === void 0 ) errorHandler = defaultErrorHandler;
37
-
38
- Class.call(this);
34
+ class QRCode extends Class {
35
+ constructor(element, options, errorHandler = defaultErrorHandler) {
36
+ super();
39
37
 
40
38
  this.options = deepExtend({}, this.options, options);
41
39
  this.element = element;
@@ -48,61 +46,55 @@ var QRCode = (function (Class) {
48
46
  this.setOptions(options);
49
47
  }
50
48
 
51
- if ( Class ) QRCode.__proto__ = Class;
52
- QRCode.prototype = Object.create( Class && Class.prototype );
53
- QRCode.prototype.constructor = QRCode;
54
-
55
- QRCode.prototype.destroy = function destroy () {
49
+ destroy() {
56
50
  this._destroySurface();
57
- };
51
+ }
58
52
 
59
- QRCode.prototype._initElement = function _initElement () {
53
+ _initElement() {
60
54
  addClass(this.element, "k-qrcode");
61
- };
55
+ }
62
56
 
63
- QRCode.prototype._initSurface = function _initSurface () {
64
- var ref = this;
65
- var options = ref.options;
66
- var surface = ref.surface;
57
+ _initSurface() {
58
+ const { options, surface } = this;
67
59
 
68
60
  if (!surface || surface.options.type !== options.renderAs) {
69
61
  this._destroySurface();
70
62
  this._initSurfaceElement();
71
63
  this.surface = this._createSurface();
72
64
  }
73
- };
65
+ }
74
66
 
75
- QRCode.prototype._createSurface = function _createSurface () {
67
+ _createSurface() {
76
68
  return draw.Surface.create(this.surfaceElement, {
77
69
  type: this.options.renderAs
78
70
  });
79
- };
71
+ }
80
72
 
81
- QRCode.prototype._destroySurface = function _destroySurface () {
73
+ _destroySurface() {
82
74
  if (this.surface) {
83
75
  this.surface.destroy();
84
76
  this.surface = null;
85
77
  this._destroySurfaceElement();
86
78
  }
87
- };
79
+ }
88
80
 
89
- QRCode.prototype._initSurfaceElement = function _initSurfaceElement () {
81
+ _initSurfaceElement() {
90
82
  if (!this.surfaceElement) {
91
83
  this.surfaceElement = document.createElement('div');
92
84
  this.surfaceElement.style.position = "relative";
93
85
  this.element.appendChild(this.surfaceElement);
94
86
  }
95
- };
87
+ }
96
88
 
97
- QRCode.prototype._destroySurfaceElement = function _destroySurfaceElement () {
89
+ _destroySurfaceElement() {
98
90
  if (this.surfaceElement && this.surfaceElement.parentNode) {
99
91
  this.surfaceElement.parentNode.removeChild(this.surfaceElement);
100
92
  this.surfaceElement = null;
101
93
  }
102
- };
94
+ }
103
95
 
104
- QRCode.prototype.redraw = function redraw () {
105
- var size = this._getSize();
96
+ redraw() {
97
+ let size = this._getSize();
106
98
 
107
99
  this.surface.clear();
108
100
 
@@ -114,13 +106,13 @@ var QRCode = (function (Class) {
114
106
  this.createVisual();
115
107
 
116
108
  this.surface.draw(this.visual);
117
- };
109
+ }
118
110
 
119
- QRCode.prototype.getSize = function getSize () {
120
- var element = this.element;
121
- var elementWidth = element.clientWidth;
122
- var elementHeight = element.clientHeight;
123
- var size = { width: 0, height: 0 };
111
+ getSize() {
112
+ const element = this.element;
113
+ const elementWidth = element.clientWidth;
114
+ const elementHeight = element.clientHeight;
115
+ const size = { width: 0, height: 0 };
124
116
 
125
117
  if (elementWidth > 0) {
126
118
  size.width = elementWidth;
@@ -131,22 +123,22 @@ var QRCode = (function (Class) {
131
123
  }
132
124
 
133
125
  return size;
134
- };
126
+ }
135
127
 
136
- QRCode.prototype._resize = function _resize () {
128
+ _resize() {
137
129
  this.redraw();
138
- };
130
+ }
139
131
 
140
- QRCode.prototype.createVisual = function createVisual () {
132
+ createVisual() {
141
133
  this.visual = this._render();
142
- };
134
+ }
143
135
 
144
- QRCode.prototype.exportVisual = function exportVisual () {
136
+ exportVisual() {
145
137
  return this._render();
146
- };
138
+ }
147
139
 
148
- QRCode.prototype._render = function _render () {
149
- var value = this._value,
140
+ _render() {
141
+ let value = this._value,
150
142
  baseUnit,
151
143
  border = this.options.border || {},
152
144
  padding = this.options.padding || 0,
@@ -159,7 +151,7 @@ var QRCode = (function (Class) {
159
151
 
160
152
  border.width = borderWidth;
161
153
 
162
- var visual = new draw.Group();
154
+ let visual = new draw.Group();
163
155
 
164
156
  try {
165
157
  if (value) {
@@ -184,15 +176,15 @@ var QRCode = (function (Class) {
184
176
  }
185
177
 
186
178
  return visual;
187
- };
188
-
189
- QRCode.prototype._renderLogo = function _renderLogo (qrSize, baseUnit) {
190
- var image;
191
- var imageRect;
192
- var center = round(qrSize / 2);
193
- var logoSize = this._getLogoSize(baseUnit * QRCodeDefaults.DEFAULT_LOGO_SIZE);
194
- var logoUrl = this.options.overlay.imageUrl;
195
- var position = {
179
+ }
180
+
181
+ _renderLogo(qrSize, baseUnit) {
182
+ let image;
183
+ let imageRect;
184
+ let center = round(qrSize / 2);
185
+ let logoSize = this._getLogoSize(baseUnit * QRCodeDefaults.DEFAULT_LOGO_SIZE);
186
+ let logoUrl = this.options.overlay.imageUrl;
187
+ let position = {
196
188
  x: center - logoSize.width / 2,
197
189
  y: center - logoSize.height / 2
198
190
  };
@@ -205,16 +197,16 @@ var QRCode = (function (Class) {
205
197
  image = new draw.Image(logoUrl, imageRect);
206
198
 
207
199
  return image;
208
- };
200
+ }
209
201
 
210
- QRCode.prototype._renderSwissCode = function _renderSwissCode (qrSize, baseUnit) {
211
- var logoSize = this._getLogoSize(baseUnit * QRCodeDefaults.DEFAULT_LOGO_SIZE);
202
+ _renderSwissCode(qrSize, baseUnit) {
203
+ let logoSize = this._getLogoSize(baseUnit * QRCodeDefaults.DEFAULT_LOGO_SIZE);
212
204
  logoSize = Math.max(logoSize.width, logoSize.height);
213
- var crossSize = logoSize / 4;
214
- var crossOffset = crossSize / 2;
215
- var center = qrSize / 2;
216
- var start = {};
217
- var visual = new draw.Group();
205
+ let crossSize = logoSize / 4;
206
+ let crossOffset = crossSize / 2;
207
+ let center = qrSize / 2;
208
+ let start = {};
209
+ let visual = new draw.Group();
218
210
 
219
211
  start.x = start.y = Math.ceil(center - baseUnit - logoSize / 2);
220
212
  visual.append(this._renderShape(start, Math.ceil(logoSize + baseUnit * 2), squarePattern, "#fff"));
@@ -227,10 +219,10 @@ var QRCode = (function (Class) {
227
219
  visual.append(this._renderShape(start, crossSize, crossPattern, "#fff"));
228
220
 
229
221
  return visual;
230
- };
222
+ }
231
223
 
232
- QRCode.prototype._renderShape = function _renderShape (start, step, pattern, color) {
233
- var path = new draw.MultiPath({
224
+ _renderShape(start, step, pattern, color) {
225
+ let path = new draw.MultiPath({
234
226
  fill: {
235
227
  color: color
236
228
  },
@@ -239,24 +231,24 @@ var QRCode = (function (Class) {
239
231
 
240
232
  path.moveTo(start.x, start.y);
241
233
 
242
- for (var i = 0; i < pattern.length; i++) {
234
+ for (let i = 0; i < pattern.length; i++) {
243
235
  path.lineTo(start.x + step * pattern[i][0], start.y + step * pattern[i][1]);
244
236
  }
245
237
 
246
238
  path.close();
247
239
 
248
240
  return path;
249
- };
241
+ }
250
242
 
251
- QRCode.prototype._getSize = function _getSize () {
252
- var size;
243
+ _getSize() {
244
+ let size;
253
245
 
254
246
  if (this.options.size) {
255
247
  size = parseInt(this.options.size, 10);
256
248
  } else {
257
- var element = this.element;
258
- var elementSize = surfaceSize(element, this.options.renderAs);
259
- var min = Math.min(elementSize.width, elementSize.height);
249
+ const element = this.element;
250
+ const elementSize = surfaceSize(element, this.options.renderAs);
251
+ const min = Math.min(elementSize.width, elementSize.height);
260
252
 
261
253
  if (min > 0) {
262
254
  size = min;
@@ -266,15 +258,15 @@ var QRCode = (function (Class) {
266
258
  }
267
259
 
268
260
  return size;
269
- };
261
+ }
270
262
 
271
- QRCode.prototype._calculateBaseUnit = function _calculateBaseUnit (size, matrixSize) {
272
- var baseUnit = Math.floor(size / matrixSize);
263
+ _calculateBaseUnit(size, matrixSize) {
264
+ let baseUnit = Math.floor(size / matrixSize);
273
265
 
274
266
  if (baseUnit < QRCodeDefaults.MIN_BASE_UNIT_SIZE) {
275
- var minSize = Math.ceil(matrixSize * QRCodeDefaults.MIN_BASE_UNIT_SIZE);
267
+ const minSize = Math.ceil(matrixSize * QRCodeDefaults.MIN_BASE_UNIT_SIZE);
276
268
  this.onError(new Error(
277
- ("Insufficient size for QR Code: the current size is " + size + "px and the minimum size is " + minSize + "px.")
269
+ `Insufficient size for QR Code: the current size is ${size}px and the minimum size is ${minSize}px.`
278
270
  ));
279
271
  } else if (baseUnit * matrixSize >= size &&
280
272
  baseUnit - 1 >= QRCodeDefaults.MIN_BASE_UNIT_SIZE) {
@@ -282,19 +274,19 @@ var QRCode = (function (Class) {
282
274
  }
283
275
 
284
276
  return baseUnit;
285
- };
277
+ }
286
278
 
287
- QRCode.prototype._renderMatrix = function _renderMatrix (matrix, baseUnit, quietZoneSize) {
288
- var path = new draw.MultiPath({
279
+ _renderMatrix(matrix, baseUnit, quietZoneSize) {
280
+ let path = new draw.MultiPath({
289
281
  fill: {
290
282
  color: this.options.color
291
283
  },
292
284
  stroke: null
293
285
  });
294
286
 
295
- for (var row = 0; row < matrix.length; row++) {
296
- var y = quietZoneSize + row * baseUnit;
297
- var column = 0;
287
+ for (let row = 0; row < matrix.length; row++) {
288
+ let y = quietZoneSize + row * baseUnit;
289
+ let column = 0;
298
290
 
299
291
  while (column < matrix.length) {
300
292
  while (matrix[row][column] === 0 && column < matrix.length) {
@@ -302,15 +294,15 @@ var QRCode = (function (Class) {
302
294
  }
303
295
 
304
296
  if (column < matrix.length) {
305
- var x = column;
297
+ let x = column;
306
298
  while (matrix[row][column] === 1) {
307
299
  column++;
308
300
  }
309
301
 
310
- var x1 = round(quietZoneSize + x * baseUnit);
311
- var y1 = round(y);
312
- var x2 = round(quietZoneSize + column * baseUnit);
313
- var y2 = round(y + baseUnit);
302
+ let x1 = round(quietZoneSize + x * baseUnit);
303
+ let y1 = round(y);
304
+ let x2 = round(quietZoneSize + column * baseUnit);
305
+ let y2 = round(y + baseUnit);
314
306
 
315
307
  path.moveTo(x1, y1)
316
308
  .lineTo(x1, y2)
@@ -322,11 +314,11 @@ var QRCode = (function (Class) {
322
314
  }
323
315
 
324
316
  return path;
325
- };
317
+ }
326
318
 
327
- QRCode.prototype._renderBackground = function _renderBackground (size, border) {
328
- var box = new Box(0, 0, size, size).unpad(border.width / 2);
329
- var background = draw.Path.fromRect(box.toRect(), {
319
+ _renderBackground(size, border) {
320
+ const box = new Box(0, 0, size, size).unpad(border.width / 2);
321
+ const background = draw.Path.fromRect(box.toRect(), {
330
322
  fill: {
331
323
  color: this.options.background
332
324
  },
@@ -337,10 +329,10 @@ var QRCode = (function (Class) {
337
329
  });
338
330
 
339
331
  return background;
340
- };
332
+ }
341
333
 
342
- QRCode.prototype.setOptions = function setOptions (options) {
343
- var newOptions = options || {};
334
+ setOptions(options) {
335
+ let newOptions = options || {};
344
336
  this.options = extend(this.options, newOptions);
345
337
 
346
338
  if (options.value !== undefined) {
@@ -349,29 +341,29 @@ var QRCode = (function (Class) {
349
341
 
350
342
  this._initSurface();
351
343
  this.redraw();
352
- };
344
+ }
353
345
 
354
- QRCode.prototype.value = function value (value$1) {
355
- if (value$1 === undefined) {
346
+ value(value) {
347
+ if (value === undefined) {
356
348
  return this._value;
357
349
  }
358
350
 
359
- this._value = String(value$1);
351
+ this._value = String(value);
360
352
 
361
353
  this.redraw();
362
- };
354
+ }
363
355
 
364
- QRCode.prototype._hasCustomLogo = function _hasCustomLogo () {
356
+ _hasCustomLogo() {
365
357
  return Boolean(this.options.overlay.imageUrl);
366
- };
358
+ }
367
359
 
368
- QRCode.prototype._isSwiss = function _isSwiss () {
360
+ _isSwiss() {
369
361
  return this.options.overlay.type === "swiss";
370
- };
362
+ }
371
363
 
372
- QRCode.prototype._getLogoSize = function _getLogoSize (defautLogoSize) {
373
- var width = this.options.overlay.width;
374
- var height = this.options.overlay.height;
364
+ _getLogoSize(defautLogoSize) {
365
+ let width = this.options.overlay.width;
366
+ let height = this.options.overlay.height;
375
367
 
376
368
  if (!width && !height) {
377
369
  width = height = defautLogoSize;
@@ -385,10 +377,8 @@ var QRCode = (function (Class) {
385
377
  width: width,
386
378
  height: height
387
379
  };
388
- };
389
-
390
- return QRCode;
391
- }(Class));
380
+ }
381
+ }
392
382
 
393
383
  setDefaultOptions(QRCode, {
394
384
  name: "QRCode",
@@ -1,8 +1,8 @@
1
- export var extend = Object.assign;
1
+ export const extend = Object.assign;
2
2
 
3
3
  export function splitInto(str, chunkLength) {
4
- var result = [];
5
- var idx = 0;
4
+ let result = [];
5
+ let idx = 0;
6
6
 
7
7
  while (idx < str.length) {
8
8
  result.push(str.substring(idx, idx + chunkLength));
@@ -13,7 +13,7 @@ export function splitInto(str, chunkLength) {
13
13
  }
14
14
 
15
15
  export function toBitsString(value, length) {
16
- var bitString = Number(value).toString(2);
16
+ let bitString = Number(value).toString(2);
17
17
 
18
18
  if (bitString.length < length) {
19
19
  bitString = new Array(length - bitString.length + 1).join(0) + bitString;