@hybridcore/ui 1.5.90 → 1.6.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 (267) hide show
  1. package/dist/{AccordionDetails-DhriPVPP.js → AccordionSummary-DgAwVTk8.js} +81 -82
  2. package/dist/{Add-CMz4N2zT.js → Add-DJLrrVHm.js} +52 -51
  3. package/dist/AnimatedTheme-jnasw6rT.js +11305 -0
  4. package/dist/AxisRenderer-DTyLLA6c.js +3579 -0
  5. package/dist/AxisRendererY-C_ItLPNV.js +445 -0
  6. package/dist/Box-p6OtTUEo.js +30 -0
  7. package/dist/Bullet-DVczI2TD.js +41 -0
  8. package/dist/Button-CcsPEIDh.js +35 -0
  9. package/dist/{Button-eqWvpDuh.js → Button-CvE2gnly.js} +138 -124
  10. package/dist/{ButtonBase-DsX-jMQJ.js → ButtonBase-2bPw77UP.js} +5 -5
  11. package/dist/{CardContent-DsYqqPeJ.js → CardContent-CSHh-ZlM.js} +4 -4
  12. package/dist/CategoryAxis-CwnfaGc8.js +458 -0
  13. package/dist/{Checkbox-CrU2hpWB.js → Checkbox-CWRMFTBp.js} +12 -11
  14. package/dist/Circle-Cy5s-pVc.js +27 -0
  15. package/dist/ColorSet-C7vpNXhM.js +2957 -0
  16. package/dist/{ColumnSeries-BTcqshjB.js → ColumnSeries-CjgdJ2QL.js} +129 -126
  17. package/dist/DataProcessor-CHDO51q4.js +83 -0
  18. package/dist/DateAxis-YX3QNIB-.js +569 -0
  19. package/dist/{Delete-86TO0fMo.js → Delete-CW0UZv1m.js} +1 -1
  20. package/dist/{DialogContent-CqTojymQ.js → DialogContent-B3nbEbuv.js} +10 -11
  21. package/dist/FormControl-BLbrq4C7.js +1636 -0
  22. package/dist/{FormControlLabel-BrdX4R71.js → FormControlLabel-C8SPv14J.js} +8 -8
  23. package/dist/Hierarchy-Bihj0S61.js +925 -0
  24. package/dist/{IconButton-DJ-31-Fd.js → IconButton-CHwRQF-g.js} +20 -19
  25. package/dist/IconPlus-yPkff_Vj.js +19 -0
  26. package/dist/{InputAdornment-B7qEA4kN.js → InputAdornment-DLxWUE6H.js} +6 -6
  27. package/dist/Legend-Dp_MKfS4.js +178 -0
  28. package/dist/LineSeries-Uiv5o56b.js +472 -0
  29. package/dist/{List-DOD5kSk3.js → List-tqElle9C.js} +4 -4
  30. package/dist/{ListItem-r8PbsvCz.js → ListItem-CfjsIg4B.js} +9 -8
  31. package/dist/{MenuItem-C6qlUyV3.js → MenuItem-xZx_w7zA.js} +14 -13
  32. package/dist/{Modal-CkcFEpHa.js → Modal-DhPpOoGB.js} +292 -277
  33. package/dist/{Paper-CjqLScHA.js → Paper-2B03OBmZ.js} +47 -41
  34. package/dist/PieSeries-B2fW3z0s.js +693 -0
  35. package/dist/RoundedRectangle-CWLi2PXn.js +34 -0
  36. package/dist/Scrollbar-D86MJyr2.js +171 -0
  37. package/dist/{Select-t3ewnSdf.js → Select-BgYwkZgI.js} +2066 -1633
  38. package/dist/Slice-B19rbYDZ.js +261 -0
  39. package/dist/{Source-BESIjd9X.js → Source-BSZST_GH.js} +2472 -2445
  40. package/dist/{Text-Cl1H4b0h.js → Text-ChJRuaD8.js} +398 -397
  41. package/dist/{TextField-BQ8a50fA.js → TextField-1yCesIbH.js} +23 -25
  42. package/dist/Tick-2bcLyHpF.js +162 -0
  43. package/dist/{Typography-D1t7XuLN.js → Typography-CxbneZy_.js} +11 -11
  44. package/dist/Vector-BmuhQO4p.js +3606 -0
  45. package/dist/Vector-DfTqQEln.js +1735 -0
  46. package/dist/WKT-2wsDT-nq.js +2310 -0
  47. package/dist/XYCursor-C8WktvKM.js +362 -0
  48. package/dist/ZoomableContainer-DYyqwaMb.js +220 -0
  49. package/dist/_commonjsHelpers-BVfed4GL.js +28 -0
  50. package/dist/capitalize-ciszXJ7R.js +9 -0
  51. package/dist/components/access/helpers.js +1 -1
  52. package/dist/components/access/index.js +1 -1
  53. package/dist/components/card/index.js +6 -6
  54. package/dist/components/card/styled.js +1 -1
  55. package/dist/components/charts/_common/utils.js +20 -0
  56. package/dist/components/charts/candlestick/logic.js +170 -140
  57. package/dist/components/charts/chart-wrapper/helpers.js +27 -0
  58. package/dist/components/charts/chart-wrapper/index.js +44 -0
  59. package/dist/components/charts/chart-wrapper/logic.js +47 -0
  60. package/dist/components/charts/chart-wrapper/styled.js +44 -0
  61. package/dist/components/charts/column-line-mix/index.js +10 -0
  62. package/dist/components/charts/column-line-mix/logic.js +162 -0
  63. package/dist/components/charts/column-line-mix/styled.js +12 -0
  64. package/dist/components/charts/drill-down-treemap/index.js +10 -0
  65. package/dist/components/charts/drill-down-treemap/logic.js +391 -0
  66. package/dist/components/charts/drill-down-treemap/styled.js +12 -0
  67. package/dist/components/charts/drill-down-voronoi-treemap/index.js +10 -0
  68. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +1527 -0
  69. package/dist/components/charts/drill-down-voronoi-treemap/styled.js +12 -0
  70. package/dist/components/charts/heatmap/index.js +10 -0
  71. package/dist/components/charts/heatmap/logic.js +361 -0
  72. package/dist/components/charts/heatmap/styled.js +12 -0
  73. package/dist/components/charts/highlighting-line-data/logic.js +89 -256
  74. package/dist/components/charts/line/index.js +10 -0
  75. package/dist/components/charts/line/logic.js +148 -0
  76. package/dist/components/charts/line/styled.js +12 -0
  77. package/dist/components/charts/logaritmic-scale/index.js +10 -0
  78. package/dist/components/charts/logaritmic-scale/logic.js +119 -0
  79. package/dist/components/charts/logaritmic-scale/styled.js +12 -0
  80. package/dist/components/charts/multiple-value-axes/index.js +10 -0
  81. package/dist/components/charts/multiple-value-axes/logic.js +191 -0
  82. package/dist/components/charts/multiple-value-axes/styled.js +12 -0
  83. package/dist/components/charts/nested-pie/index.js +10 -0
  84. package/dist/components/charts/nested-pie/logic.js +110 -0
  85. package/dist/components/charts/nested-pie/styled.js +12 -0
  86. package/dist/components/charts/packed-circles/index.js +10 -0
  87. package/dist/components/charts/packed-circles/logic.js +423 -0
  88. package/dist/components/charts/packed-circles/styled.js +12 -0
  89. package/dist/components/charts/pie-chart/index.js +10 -0
  90. package/dist/components/charts/pie-chart/logic.js +70 -0
  91. package/dist/components/charts/pie-chart/styled.js +12 -0
  92. package/dist/components/charts/stacked-area-radar/index.js +10 -0
  93. package/dist/components/charts/stacked-area-radar/logic.js +868 -0
  94. package/dist/components/charts/stacked-area-radar/styled.js +12 -0
  95. package/dist/components/charts/stacked-column-chart/index.js +10 -0
  96. package/dist/components/charts/stacked-column-chart/logic.js +148 -0
  97. package/dist/components/charts/stacked-column-chart/styled.js +12 -0
  98. package/dist/components/charts/xy-chart/index.js +10 -0
  99. package/dist/components/charts/xy-chart/logic.js +170 -0
  100. package/dist/components/charts/xy-chart/styled.js +12 -0
  101. package/dist/components/collapsible-card/index.js +58 -32
  102. package/dist/components/collapsible-card/logic.js +20 -0
  103. package/dist/components/collapsible-card/styled.js +52 -0
  104. package/dist/components/confirm/dialog.js +3 -3
  105. package/dist/components/confirm/index.js +1 -1
  106. package/dist/components/container/index.js +7 -7
  107. package/dist/components/context-menu/index.js +153 -253
  108. package/dist/components/data-map/components/controls/index.js +12 -0
  109. package/dist/components/data-map/components/controls/styled.js +34 -0
  110. package/dist/components/data-map/index.js +51 -0
  111. package/dist/components/data-map/logic.js +108 -0
  112. package/dist/components/data-map/styled.js +32 -0
  113. package/dist/components/data-security-selectors/security-level/index.js +5 -5
  114. package/dist/components/date-picker-with-custom-range/index.js +9 -0
  115. package/dist/components/date-picker-with-custom-range/logic.js +66 -0
  116. package/dist/components/date-picker-with-custom-range/styled.js +43 -0
  117. package/dist/components/divider/index.js +18 -0
  118. package/dist/components/divider/logic.js +13 -0
  119. package/dist/components/divider/styled.js +14 -0
  120. package/dist/components/geometry-picker/coordinate/index.js +1 -1
  121. package/dist/components/geometry-picker/edit/index.js +1 -1
  122. package/dist/components/geometry-picker/geometry/index.js +1 -1
  123. package/dist/components/geometry-picker/index.js +7 -8
  124. package/dist/components/geometry-picker/kml/index.js +1 -1
  125. package/dist/components/geometry-picker/map/index.js +1 -1
  126. package/dist/components/geometry-picker/map/logic.js +65 -62
  127. package/dist/components/geometry-picker/map/style.js +1 -1
  128. package/dist/components/heat-map/components/controls/index.js +12 -0
  129. package/dist/components/heat-map/components/controls/styled.js +34 -0
  130. package/dist/components/heat-map/components/legend/index.js +26 -0
  131. package/dist/components/heat-map/components/legend/styled.js +14 -0
  132. package/dist/components/heat-map/index.js +37 -0
  133. package/dist/components/heat-map/logic.js +1945 -0
  134. package/dist/components/heat-map/styled.js +32 -0
  135. package/dist/components/icon-button/index.js +22 -15
  136. package/dist/components/icon-button/logic.js +15 -0
  137. package/dist/components/icon-button/styled.js +22 -10
  138. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  139. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +8 -7
  140. package/dist/components/instance-form/components/variable/index.js +8 -8
  141. package/dist/components/instance-form/components/variables/index.js +1 -1
  142. package/dist/components/instance-hierarchy-table/styled.js +1 -1
  143. package/dist/components/instance-variable-list/index.js +34 -29
  144. package/dist/components/instance-variable-list/styled.js +21 -21
  145. package/dist/components/instance-variable-list/variable.js +44 -74
  146. package/dist/components/linear-indicator/index.js +10 -67
  147. package/dist/components/linear-indicator/logic.js +47 -0
  148. package/dist/components/linear-indicator/styled.js +39 -40
  149. package/dist/components/map/helpers/kml.js +1 -1
  150. package/dist/components/map/helpers/mapbox.js +14 -14
  151. package/dist/components/map/helpers/ol.js +23 -19
  152. package/dist/components/map/helpers/wkt.js +26 -1314
  153. package/dist/components/map/index.js +1 -1
  154. package/dist/components/map/logic.js +113 -101
  155. package/dist/components/map/styled.js +39 -31
  156. package/dist/components/metric-card/MetricChart.js +50 -498
  157. package/dist/components/metric-card/index.js +94 -115
  158. package/dist/components/metric-card/logic.js +70 -131
  159. package/dist/components/object-profile-card/components/avatar/index.js +44 -0
  160. package/dist/components/object-profile-card/components/avatar/logic.js +19 -0
  161. package/dist/components/object-profile-card/components/avatar/styled.js +41 -0
  162. package/dist/components/object-profile-card/index.js +90 -0
  163. package/dist/components/object-profile-card/logic.js +33 -0
  164. package/dist/components/object-profile-card/styled.js +48 -0
  165. package/dist/components/paginated-list/index.js +93 -89
  166. package/dist/components/paginated-list/logic.js +51 -40
  167. package/dist/components/paginated-list/styled.js +25 -21
  168. package/dist/components/property-mapping/index.js +2 -2
  169. package/dist/components/prr-map/components/controls/index.js +12 -0
  170. package/dist/components/prr-map/components/controls/styled.js +34 -0
  171. package/dist/components/prr-map/components/legend/index.js +36 -0
  172. package/dist/components/prr-map/components/legend/styled.js +21 -0
  173. package/dist/components/prr-map/index.js +38 -0
  174. package/dist/components/prr-map/logic.js +104 -0
  175. package/dist/components/prr-map/styled.js +32 -0
  176. package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
  177. package/dist/components/range-selector/components/date-range/index.js +4282 -7
  178. package/dist/components/range-selector/index.js +1 -1
  179. package/dist/components/raster-grid-map/components/controls/index.js +12 -0
  180. package/dist/components/raster-grid-map/components/controls/styled.js +34 -0
  181. package/dist/components/raster-grid-map/components/legend/index.js +14 -0
  182. package/dist/components/raster-grid-map/components/legend/styled.js +21 -0
  183. package/dist/components/raster-grid-map/helpers.js +190 -0
  184. package/dist/components/raster-grid-map/index.js +38 -0
  185. package/dist/components/raster-grid-map/logic.js +172 -0
  186. package/dist/components/raster-grid-map/styled.js +32 -0
  187. package/dist/components/search-input/index.js +62 -140
  188. package/dist/components/search-input/logic.js +43 -0
  189. package/dist/components/search-input/styled.js +33 -0
  190. package/dist/components/simple-pivot-table/index.js +66 -0
  191. package/dist/components/simple-pivot-table/logic.js +51 -0
  192. package/dist/components/simple-pivot-table/styled.js +45 -0
  193. package/dist/components/static-text/index.js +18 -0
  194. package/dist/components/static-text/logic.js +13 -0
  195. package/dist/components/static-text/styled.js +45 -0
  196. package/dist/components/tabs/index.js +56 -2160
  197. package/dist/components/tabs/logic.js +36 -0
  198. package/dist/components/tabs/styled.js +94 -16
  199. package/dist/components/tabs/tab-panel.js +11 -10
  200. package/dist/components/template-filters/components/tab-panel/index.js +1 -1
  201. package/dist/components/template-form/components/property-list/index.js +7 -7
  202. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  203. package/dist/components/template-form/components/property-list/property-list-form.js +9 -9
  204. package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
  205. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  206. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +7 -7
  207. package/dist/components/template-form/index.js +5 -5
  208. package/dist/components/template-property-filters/property.js +5 -5
  209. package/dist/components/timeline/index.js +61 -0
  210. package/dist/components/timeline/logic.js +40 -0
  211. package/dist/components/timeline/styled.js +48 -0
  212. package/dist/components/tree-select/index.js +5 -5
  213. package/dist/components/treeview-filter/item-label/index.js +3 -3
  214. package/dist/constant-BiOGvlZc.js +21 -0
  215. package/dist/createReactComponent-C7L-DMHj.js +60 -0
  216. package/dist/{createSvgIcon-DLPYMuH1.js → createSvgIcon-BjpIhJ30.js} +30 -32
  217. package/dist/{createSvgIcon-OuwzpcaC.js → createSvgIcon-DrtgaibK.js} +5 -5
  218. package/dist/{createTheme-CNnKNxwL.js → createTheme-DYxDnE9u.js} +226 -285
  219. package/dist/{dialog-BE4D6swf.js → dialog-DcwXug9J.js} +6 -6
  220. package/dist/{helpers-DaCoWmi2.js → helpers-B4UL9NMD.js} +3 -3
  221. package/dist/index-BMS1Otro.js +183 -0
  222. package/dist/index-C__OZmYy.js +663 -0
  223. package/dist/{index-CGNxsLVm.js → index-CcdvNlgr.js} +7 -7
  224. package/dist/{index-JrtqxUdI.js → index-kCJ_Zvl8.js} +5 -5
  225. package/dist/index-syTc6m_V.js +1934 -0
  226. package/dist/index.es-CHNMhaMi.js +2067 -0
  227. package/dist/index.esm-BLLrbTzY.js +318 -0
  228. package/dist/{listItemTextClasses-CNjn41Of.js → listItemTextClasses-C3lndiXO.js} +2 -2
  229. package/dist/main.d.ts +1226 -358
  230. package/dist/main.js +141 -443
  231. package/dist/{has-DNclCIDV.js → math-Bvt2Ubuz.js} +220 -222
  232. package/dist/ol-yOE-NV0X.js +7465 -0
  233. package/dist/path-CNVruS--.js +84 -0
  234. package/dist/{property-list-form-C5hcK2y2.js → property-list-form-zZQfpR0X.js} +13 -13
  235. package/dist/styled-eZwjUruw.js +12 -0
  236. package/dist/useId-B4-oF9Mq.js +34 -0
  237. package/dist/useMobilePicker-BLg3Blg8.js +7589 -0
  238. package/dist/useThemeProps-BzzHcQyd.js +58 -0
  239. package/dist/{utils-CsOZUsQj.js → utils-BDNynJcd.js} +2 -2
  240. package/package.json +11 -2
  241. package/dist/AxisRendererY-kADUad00.js +0 -18370
  242. package/dist/Box-B1AVyJ_s.js +0 -71
  243. package/dist/DateAxis-CMum47iz.js +0 -924
  244. package/dist/Input-CoIrGZAh.js +0 -326
  245. package/dist/InputLabel-CBuAYyuT.js +0 -1367
  246. package/dist/LineSeries-CfcpoYla.js +0 -549
  247. package/dist/OutlinedInput-B-iZoc9l.js +0 -450
  248. package/dist/Tabs-Cn42Z5QI.js +0 -789
  249. package/dist/components/collapsible-card/style.js +0 -49
  250. package/dist/components/profile-card/index.js +0 -80
  251. package/dist/components/profile-card/logic.js +0 -33
  252. package/dist/components/profile-card/styled.js +0 -43
  253. package/dist/components/tabs/appleTabs.style.js +0 -55
  254. package/dist/createStyled-BGx1I94c.js +0 -352
  255. package/dist/createTheme-CyC5HawC.js +0 -879
  256. package/dist/exactProp-cjT0t_Pt.js +0 -36
  257. package/dist/extendSxProp-FEpqY5_S.js +0 -30
  258. package/dist/index-DMSHuq6l.js +0 -688
  259. package/dist/index-SpeaLUQD.js +0 -10963
  260. package/dist/ol-lGwSyEIV.js +0 -15050
  261. package/dist/ownerDocument-CUrv0DIK.js +0 -6
  262. package/dist/ownerWindow-niciwP7I.js +0 -7
  263. package/dist/styled-B8ugzvji.js +0 -12
  264. package/dist/useId-BHG98T5I.js +0 -26
  265. package/dist/useTheme-C15Eq8KG.js +0 -18
  266. package/dist/useTheme-D-uii9iX.js +0 -10
  267. package/dist/useThemeProps-DRP1dikX.js +0 -95
@@ -1,924 +0,0 @@
1
- import { C as it, G as Z, n as rt, m as st, o as K, s as q, q as lt, i as y, r as J, t as ht, u as Q, v as ut, j as b, V as at, w as C, x as $, y as ct, z as f, D as G, B as S, E as gt, F as dt, H as z, I as tt, J as et, K as vt, M as N, k as ft } from "./AxisRendererY-kADUad00.js";
2
- class H extends it {
3
- constructor() {
4
- super(...arguments), Object.defineProperty(this, "_alwaysShow", {
5
- enumerable: !0,
6
- configurable: !0,
7
- writable: !0,
8
- value: !1
9
- }), Object.defineProperty(this, "lineX", {
10
- enumerable: !0,
11
- configurable: !0,
12
- writable: !0,
13
- value: this.children.push(Z.new(this._root, {
14
- themeTags: ["x"]
15
- }))
16
- }), Object.defineProperty(this, "lineY", {
17
- enumerable: !0,
18
- configurable: !0,
19
- writable: !0,
20
- value: this.children.push(Z.new(this._root, {
21
- themeTags: ["y"]
22
- }))
23
- }), Object.defineProperty(this, "selection", {
24
- enumerable: !0,
25
- configurable: !0,
26
- writable: !0,
27
- value: this.children.push(rt.new(this._root, {
28
- themeTags: ["selection", "cursor"],
29
- layer: 30
30
- }))
31
- }), Object.defineProperty(this, "_movePoint", {
32
- enumerable: !0,
33
- configurable: !0,
34
- writable: !0,
35
- value: void 0
36
- }), Object.defineProperty(this, "_lastPoint", {
37
- enumerable: !0,
38
- configurable: !0,
39
- writable: !0,
40
- value: { x: 0, y: 0 }
41
- }), Object.defineProperty(this, "_lastPoint2", {
42
- enumerable: !0,
43
- configurable: !0,
44
- writable: !0,
45
- value: { x: 0, y: 0 }
46
- }), Object.defineProperty(this, "_tooltipX", {
47
- enumerable: !0,
48
- configurable: !0,
49
- writable: !0,
50
- value: !1
51
- }), Object.defineProperty(this, "_tooltipY", {
52
- enumerable: !0,
53
- configurable: !0,
54
- writable: !0,
55
- value: !1
56
- }), Object.defineProperty(this, "chart", {
57
- enumerable: !0,
58
- configurable: !0,
59
- writable: !0,
60
- value: void 0
61
- }), Object.defineProperty(this, "_toX", {
62
- enumerable: !0,
63
- configurable: !0,
64
- writable: !0,
65
- value: void 0
66
- }), Object.defineProperty(this, "_toY", {
67
- enumerable: !0,
68
- configurable: !0,
69
- writable: !0,
70
- value: void 0
71
- });
72
- }
73
- _afterNew() {
74
- this._settings.themeTags = st(this._settings.themeTags, ["xy", "cursor"]), super._afterNew(), this.setAll({ width: K, height: K, isMeasured: !0, position: "absolute" }), this.states.create("hidden", { visible: !0, opacity: 0 }), this._drawLines(), this.setPrivateRaw("visible", !1), this._disposers.push(this.setTimeout(() => {
75
- this.setPrivate("visible", !0);
76
- }, 500)), this._disposers.push(this.lineX.events.on("positionchanged", () => {
77
- this._handleXLine();
78
- })), this._disposers.push(this.lineY.events.on("positionchanged", () => {
79
- this._handleYLine();
80
- })), this._disposers.push(this.lineX.events.on("focus", () => this._handleLineFocus())), this._disposers.push(this.lineX.events.on("blur", () => this._handleLineBlur())), this._disposers.push(this.lineY.events.on("focus", () => this._handleLineFocus())), this._disposers.push(this.lineY.events.on("blur", () => this._handleLineBlur())), q("keyboardevents") && this._disposers.push(lt(document, "keydown", (t) => {
81
- this._handleLineMove(ut(t), t.ctrlKey);
82
- }));
83
- }
84
- _setUpTouch() {
85
- const t = this.chart;
86
- t && (t.plotContainer._display.cancelTouch = this.get("behavior") != "none");
87
- }
88
- _handleXLine() {
89
- let t = this.lineX.x(), e = !0;
90
- (t < 0 || t > this.width()) && (e = !1), this.lineX.setPrivate("visible", e);
91
- }
92
- _handleYLine() {
93
- let t = this.lineY.y(), e = !0;
94
- (t < 0 || t > this.height()) && (e = !1), this.lineY.setPrivate("visible", e);
95
- }
96
- _handleLineMove(t, e) {
97
- let i = "";
98
- const s = this.chart;
99
- let n;
100
- if (s && s.xAxes.length) {
101
- this._root.focused(this.lineX) ? (i = "positionX", n = s.xAxes.getIndex(0)) : this._root.focused(this.lineY) && (n = s.yAxes.getIndex(0), i = "positionY");
102
- let a = 1;
103
- if (e && (a = 5), n) {
104
- let r = n.get("renderer").get("inversed", !1), o;
105
- t == "ArrowRight" || t == "ArrowDown" ? o = 1 : t == "ArrowLeft" || t == "ArrowUp" ? o = -1 : t == "Tab" && (o = 0), o != null && (r && (o *= -1), this.set(i, n.nextPosition(o * a)));
106
- }
107
- }
108
- }
109
- _handleLineFocus() {
110
- this._alwaysShow = this.get("alwaysShow", !1), this.setAll({
111
- positionX: this.getPrivate("positionX", 0),
112
- positionY: this.getPrivate("positionY", 0),
113
- alwaysShow: !0
114
- }), this._handleLineMove("Tab");
115
- }
116
- _handleLineBlur() {
117
- (this.lineX.isFocus() || this.lineY.isFocus()) && this.setAll({
118
- positionX: void 0,
119
- positionY: void 0,
120
- alwaysShow: this._alwaysShow
121
- });
122
- }
123
- _prepareChildren() {
124
- if (super._prepareChildren(), this.isDirty("xAxis")) {
125
- this._tooltipX = !1;
126
- const t = this.get("xAxis");
127
- if (t) {
128
- const e = t.get("tooltip");
129
- e && (this._tooltipX = !0, this._disposers.push(e.on("pointTo", () => {
130
- this._updateXLine(e);
131
- })));
132
- }
133
- }
134
- if (this.isDirty("yAxis")) {
135
- this._tooltipY = !1;
136
- const t = this.get("yAxis");
137
- if (t) {
138
- const e = t.get("tooltip");
139
- e && (this._tooltipY = !0, this._disposers.push(e.on("pointTo", () => {
140
- this._updateYLine(e);
141
- })));
142
- }
143
- }
144
- }
145
- _handleSyncWith() {
146
- const t = this.chart;
147
- if (t) {
148
- const e = this.get("syncWith"), i = [];
149
- e && y(e, (s) => {
150
- const n = s.chart;
151
- n && i.push(n);
152
- }), t._otherCharts = i;
153
- }
154
- }
155
- _updateChildren() {
156
- if (super._updateChildren(), this._handleSyncWith(), this.isDirty("positionX") || this.isDirty("positionY")) {
157
- const t = this.get("positionX"), e = this.get("positionY");
158
- t == null && e == null ? this.hide(0) : (this._movePoint = this.toGlobal(this._getPoint(this.get("positionX", 0), this.get("positionY", 0))), this.handleMove());
159
- }
160
- }
161
- _updateXLine(t) {
162
- let e = J(this._display.toLocal(t.get("pointTo", { x: 0, y: 0 })).x, 3);
163
- this._toX != e && (this.lineX.animate({ key: "x", to: e, duration: t.get("animationDuration", 0), easing: t.get("animationEasing") }), this._toX = e);
164
- }
165
- _updateYLine(t) {
166
- let e = J(this._display.toLocal(t.get("pointTo", { x: 0, y: 0 })).y, 3);
167
- this._toY != e && (this.lineY.animate({ key: "y", to: e, duration: t.get("animationDuration", 0), easing: t.get("animationEasing") }), this._toY = e);
168
- }
169
- _drawLines() {
170
- this.lineX.set("draw", (t) => {
171
- t.moveTo(0, 0), t.lineTo(0, this.height());
172
- }), this.lineY.set("draw", (t) => {
173
- t.moveTo(0, 0), t.lineTo(this.width(), 0);
174
- });
175
- }
176
- updateCursor() {
177
- this.get("alwaysShow") && (this._movePoint = this.toGlobal(this._getPoint(this.get("positionX", 0), this.get("positionY", 0)))), this.handleMove();
178
- }
179
- _setChart(t) {
180
- this.chart = t, this._handleSyncWith();
181
- const e = t.plotContainer;
182
- this.events.on("boundschanged", () => {
183
- this._disposers.push(this.setTimeout(() => {
184
- this.updateCursor();
185
- }, 50));
186
- }), q("touchevents") && (this._disposers.push(e.events.on("click", (s) => {
187
- ht(s.originalEvent) && this._handleMove(s);
188
- })), this._setUpTouch()), this._disposers.push(e.events.on("pointerdown", (s) => {
189
- this._handleCursorDown(s);
190
- })), this._disposers.push(e.events.on("globalpointerup", (s) => {
191
- this._handleCursorUp(s), !s.native && !this.isHidden() && this._handleMove(s);
192
- })), this._disposers.push(e.events.on("globalpointermove", (s) => {
193
- !this.get("syncWith") && Q(e._downPoints).length == 0 && !s.native && this.isHidden() || (this._handleMove(s), Math.hypot(this._lastPoint2.x - s.point.x, this._lastPoint2.y - s.point.y) > 1 && (this._handleLineBlur(), this._lastPoint2 = s.point));
194
- }));
195
- const i = this.parent;
196
- i && i.children.moveValue(this.selection);
197
- }
198
- _inPlot(t) {
199
- const e = this.chart;
200
- return e ? e.inPlot(t) : !1;
201
- }
202
- _handleCursorDown(t) {
203
- if (t.originalEvent.button == 2)
204
- return;
205
- const e = t.point;
206
- let i = this._display.toLocal(e);
207
- const s = this.chart;
208
- if (this.selection.set("draw", () => {
209
- }), s && this._inPlot(i)) {
210
- if (this._downPoint = i, this.get("behavior") != "none") {
211
- this.selection.show();
212
- const r = "selectstarted";
213
- this.events.isEnabled(r) && this.events.dispatch(r, { type: r, target: this, originalEvent: t.originalEvent });
214
- }
215
- let n = this._getPosition(i).x, a = this._getPosition(i).y;
216
- this.setPrivate("downPositionX", n), this.setPrivate("downPositionY", a);
217
- }
218
- }
219
- _handleCursorUp(t) {
220
- if (this._downPoint) {
221
- const e = this.get("behavior", "none");
222
- if (e != "none") {
223
- e.charAt(0) === "z" && this.selection.hide();
224
- const i = t.point;
225
- let s = this._display.toLocal(i);
226
- const n = this._downPoint, a = this.get("moveThreshold", 1);
227
- if (s && n) {
228
- let r = !1;
229
- if ((e === "zoomX" || e === "zoomXY" || e === "selectX" || e === "selectXY") && Math.abs(s.x - n.x) > a && (r = !0), (e === "zoomY" || e === "zoomXY" || e === "selectY" || e === "selectXY") && Math.abs(s.y - n.y) > a && (r = !0), r) {
230
- const o = "selectended";
231
- this.events.isEnabled(o) && this.events.dispatch(o, { type: o, target: this, originalEvent: t.originalEvent });
232
- } else {
233
- const o = "selectcancelled";
234
- this.events.isEnabled(o) && this.events.dispatch(o, { type: o, target: this, originalEvent: t.originalEvent });
235
- }
236
- }
237
- }
238
- }
239
- this._downPoint = void 0;
240
- }
241
- _handleMove(t) {
242
- if (this.getPrivate("visible")) {
243
- const e = this.chart;
244
- if (e && Q(e.plotContainer._downPoints).length > 1) {
245
- this.set("forceHidden", !0);
246
- return;
247
- } else
248
- this.set("forceHidden", !1);
249
- const i = t.point, s = this._lastPoint;
250
- if (Math.round(s.x) === Math.round(i.x) && Math.round(s.y) === Math.round(i.y))
251
- return;
252
- this._lastPoint = i, this.setPrivate("lastPoint", i), this.handleMove({ x: i.x, y: i.y }, !1, t.originalEvent);
253
- }
254
- }
255
- _getPosition(t) {
256
- return { x: t.x / this.width(), y: t.y / this.height() };
257
- }
258
- /**
259
- * Moves the cursor to X/Y coordinates within chart container (`point`).
260
- *
261
- * If `skipEvent` parameter is set to `true`, the move will not invoke
262
- * the `"cursormoved"` event.
263
- *
264
- * @param point X/Y to move cursor to
265
- * @param skipEvent Do not fire "cursormoved" event
266
- */
267
- handleMove(t, e, i) {
268
- t || (t = this._movePoint);
269
- const s = this.get("alwaysShow");
270
- if (!t) {
271
- this.hide(0);
272
- return;
273
- }
274
- this._movePoint = t;
275
- let n = this._display.toLocal(t), a = this.chart;
276
- if (a && (this._inPlot(n) || this._downPoint)) {
277
- a._movePoint = t, this.isHidden() && (this.show(), this.get("behavior", "").charAt(0) == "z" && this.selection.set("draw", () => {
278
- }));
279
- let r = n.x, o = n.y, l = this._getPosition(n);
280
- this.setPrivate("point", n);
281
- let d = this.get("snapToSeries");
282
- this._downPoint && (d = void 0);
283
- let u = this.get("positionX"), m = l.x;
284
- b(u) && (m = u);
285
- let v = this.get("positionY"), P = l.y;
286
- b(v) && (P = v), this.setPrivate("positionX", m), this.setPrivate("positionY", P);
287
- const T = this._getPoint(m, P);
288
- if (r = T.x, o = T.y, a.xAxes.each((h) => {
289
- h._handleCursorPosition(m, d), s && h.handleCursorShow();
290
- }), a.yAxes.each((h) => {
291
- h._handleCursorPosition(P, d), s && h.handleCursorShow();
292
- }), !e) {
293
- a._handleCursorPosition();
294
- const h = "cursormoved";
295
- this.events.isEnabled(h) && this.events.dispatch(h, { type: h, target: this, point: t, originalEvent: i });
296
- }
297
- this._updateLines(r, o), a.arrangeTooltips();
298
- } else if (!this._downPoint && !s) {
299
- this.hide(0);
300
- const r = "cursorhidden";
301
- this.events.isEnabled(r) && this.events.dispatch(r, { type: r, target: this });
302
- }
303
- this._downPoint && this.get("behavior") != "none" && this._updateSelection(n);
304
- }
305
- _getPoint(t, e) {
306
- return { x: this.width() * t, y: this.height() * e };
307
- }
308
- _updateLines(t, e) {
309
- this._tooltipX || this.lineX.set("x", t), this._tooltipY || this.lineY.set("y", e), this._drawLines();
310
- }
311
- _updateSelection(t) {
312
- const e = this.selection, i = this.get("behavior"), s = this.width(), n = this.height();
313
- t.x < 0 && (t.x = 0), t.x > s && (t.x = s), t.y < 0 && (t.y = 0), t.y > n && (t.y = n), e.set("draw", (a) => {
314
- const r = this._downPoint;
315
- r && (i === "zoomXY" || i === "selectXY" ? (a.moveTo(r.x, r.y), a.lineTo(r.x, t.y), a.lineTo(t.x, t.y), a.lineTo(t.x, r.y), a.lineTo(r.x, r.y)) : i === "zoomX" || i === "selectX" ? (a.moveTo(r.x, 0), a.lineTo(r.x, n), a.lineTo(t.x, n), a.lineTo(t.x, 0), a.lineTo(r.x, 0)) : (i === "zoomY" || i === "selectY") && (a.moveTo(0, r.y), a.lineTo(s, r.y), a.lineTo(s, t.y), a.lineTo(0, t.y), a.lineTo(0, r.y)));
316
- });
317
- }
318
- _onHide() {
319
- if (this.isHidden()) {
320
- let t = this.chart;
321
- t && (t.xAxes.each((e) => {
322
- e.handleCursorHide();
323
- }), t.yAxes.each((e) => {
324
- e.handleCursorHide();
325
- }), t.series.each((e) => {
326
- e.handleCursorHide();
327
- }));
328
- }
329
- super._onHide();
330
- }
331
- _onShow() {
332
- if (!this.isHidden()) {
333
- let t = this.chart;
334
- t && (t.xAxes.each((e) => {
335
- e.handleCursorShow();
336
- }), t.yAxes.each((e) => {
337
- e.handleCursorShow();
338
- }));
339
- }
340
- super._onShow();
341
- }
342
- _dispose() {
343
- super._dispose(), this.selection.dispose();
344
- }
345
- }
346
- Object.defineProperty(H, "className", {
347
- enumerable: !0,
348
- configurable: !0,
349
- writable: !0,
350
- value: "XYCursor"
351
- });
352
- Object.defineProperty(H, "classNames", {
353
- enumerable: !0,
354
- configurable: !0,
355
- writable: !0,
356
- value: it.classNames.concat([H.className])
357
- });
358
- class B extends at {
359
- constructor() {
360
- super(...arguments), Object.defineProperty(this, "_dataGrouped", {
361
- enumerable: !0,
362
- configurable: !0,
363
- writable: !0,
364
- value: !1
365
- }), Object.defineProperty(this, "_seriesDataGrouped", {
366
- enumerable: !0,
367
- configurable: !0,
368
- writable: !0,
369
- value: !1
370
- }), Object.defineProperty(this, "_groupingCalculated", {
371
- enumerable: !0,
372
- configurable: !0,
373
- writable: !0,
374
- value: !1
375
- }), Object.defineProperty(this, "_intervalDuration", {
376
- enumerable: !0,
377
- configurable: !0,
378
- writable: !0,
379
- value: 1
380
- }), Object.defineProperty(this, "_baseDuration", {
381
- enumerable: !0,
382
- configurable: !0,
383
- writable: !0,
384
- value: 1
385
- }), Object.defineProperty(this, "_intervalMax", {
386
- enumerable: !0,
387
- configurable: !0,
388
- writable: !0,
389
- value: {}
390
- }), Object.defineProperty(this, "_intervalMin", {
391
- enumerable: !0,
392
- configurable: !0,
393
- writable: !0,
394
- value: {}
395
- });
396
- }
397
- _afterNew() {
398
- this._settings.themeTags = st(this._settings.themeTags, ["axis"]), super._afterNew(), this.addTag("date"), this._setBaseInterval(this.get("baseInterval")), this.on("baseInterval", () => {
399
- this._setBaseInterval(this.get("baseInterval"));
400
- });
401
- }
402
- _setBaseInterval(t) {
403
- this.setPrivateRaw("baseInterval", t), this._baseDuration = C(t);
404
- }
405
- _fixZoomFactor() {
406
- const t = this.get("maxZoomFactor");
407
- t != null && t != 1 / 0 ? this.setPrivateRaw("maxZoomFactor", t) : this.setPrivateRaw("maxZoomFactor", Math.round((this.getPrivate("max", 0) - this.getPrivate("min", 0)) / this.baseMainDuration()));
408
- }
409
- _groupData() {
410
- const t = this.getPrivate("min"), e = this.getPrivate("max");
411
- if (b(t) && b(e)) {
412
- this._fixZoomFactor();
413
- const i = this.getPrivate("groupInterval");
414
- if (i ? this._setBaseInterval(i) : this._setBaseInterval(this.get("baseInterval")), this.isDirty("groupInterval")) {
415
- let s = this.get("groupInterval");
416
- s && (this.setRaw("groupIntervals", [s]), this._handleRangeChange());
417
- }
418
- if (this.isDirty("groupData") && !this._dataGrouped) {
419
- if (this.get("groupData"))
420
- y(this.series, (s) => {
421
- this._groupSeriesData(s);
422
- }), this._handleRangeChange();
423
- else {
424
- let s = this.get("baseInterval"), n = s.timeUnit + s.count;
425
- y(this.series, (a) => {
426
- a.setDataSet(n), a.resetGrouping();
427
- }), this._setBaseInterval(s), this.setPrivateRaw("groupInterval", void 0), this.markDirtyExtremes();
428
- }
429
- this._dataGrouped = !0;
430
- }
431
- }
432
- }
433
- _groupSeriesData(t) {
434
- if (this.get("groupData") && !t.get("groupDataDisabled")) {
435
- this._dataGrouped = !0, this._seriesDataGrouped = !0;
436
- let e = [], i = this.baseMainDuration(), s = this.get("groupIntervals");
437
- y(s, (v) => {
438
- C(v) > i && e.push(v);
439
- }), t._dataSets = {};
440
- const n = this.getPrivate("name") + this.get("renderer").getPrivate("letter");
441
- let a;
442
- const r = t.get("baseAxis");
443
- t.get("xAxis") === r ? a = t._valueYFields : t.get("yAxis") === r && (a = t._valueXFields);
444
- let o = t._mainDataItems, l = this.get("baseInterval"), d = l.timeUnit + l.count;
445
- t._dataSets[d] = o;
446
- const u = t.get("groupDataCallback");
447
- let m = t.get("groupDataWithOriginals", !1);
448
- u && (m = !0), y(e, (v) => {
449
- let P = -1 / 0, T = v.timeUnit + v.count;
450
- t._dataSets[T] = [];
451
- let h, M = {}, U = {}, R = {}, L = {};
452
- y(a, (p) => {
453
- M[p] = 0, U[p] = 0, R[p] = t.get(p + "Grouped"), L[p] = p + "Working";
454
- });
455
- let X = S(v.timeUnit), A = o[0], Y;
456
- A && (Y = o[0].get(n));
457
- let g;
458
- y(o, (p) => {
459
- let V = p.get(n), x = f(V, v.timeUnit, v.count, this._root, Y), k;
460
- P < x - X / 24 ? (k = et(p.dataContext), h = new G(t, k, t._makeDataItem(k)), h.setRaw(n, x), t._dataSets[T].push(h), y(a, (c) => {
461
- let w = p.get(c);
462
- b(w) ? (h.setRaw(c, w), h.setRaw(L[c], w), U[c] = 1, M[c] = w) : (M[c] = 0, U[c] = 0);
463
- }), m && h.set("originals", [p]), u && g && u(g, v), g = h) : (y(a, (c) => {
464
- let w = R[c], _ = p.get(c);
465
- if (_ != null) {
466
- let D = h.get(c);
467
- switch (w) {
468
- case "close":
469
- h.setRaw(c, _);
470
- break;
471
- case "sum":
472
- h.setRaw(c, D + _);
473
- break;
474
- case "open":
475
- break;
476
- case "low":
477
- _ < D && h.setRaw(c, _);
478
- break;
479
- case "high":
480
- _ > D && h.setRaw(c, _);
481
- break;
482
- case "average":
483
- U[c]++, M[c] += _;
484
- let E = M[c] / U[c];
485
- h.setRaw(c, E);
486
- break;
487
- case "extreme":
488
- Math.abs(_) > Math.abs(D) && h.setRaw(c, _);
489
- break;
490
- }
491
- h.setRaw(L[c], h.get(c));
492
- let F = et(p.dataContext);
493
- F[n] = x, h.dataContext = F;
494
- }
495
- }), m && h.get("originals").push(p)), P = x;
496
- }), u && g && u(g, v);
497
- }), t._dataSetId && t.setDataSet(t._dataSetId), this.markDirtySize(), this._seriesAdded && this._root.events.once("frameended", () => {
498
- this.markDirtySize();
499
- });
500
- }
501
- }
502
- _clearDirty() {
503
- super._clearDirty(), this._groupingCalculated = !1, this._dataGrouped = !1;
504
- }
505
- /**
506
- * Returns a time interval axis would group data to for a specified duration.
507
- *
508
- * @since 5.2.1
509
- */
510
- getGroupInterval(t) {
511
- let e = this.get("baseInterval"), i = $(0, t, this.get("groupCount", 1 / 0), this.get("groupIntervals"));
512
- return C(i) < C(e) && (i = Object.assign({}, e)), i;
513
- }
514
- /**
515
- * Return `max` of a specified time interval.
516
- *
517
- * Will work only if the axis was grouped to this interval at least once.
518
- *
519
- * @since 5.2.1
520
- * @param interval Interval
521
- * @return Max
522
- */
523
- getIntervalMax(t) {
524
- return this._intervalMax[t.timeUnit + t.count];
525
- }
526
- /**
527
- * Return `min` of a specified time interval.
528
- *
529
- * Will work only if the axis was grouped to this interval at least once.
530
- *
531
- * @since 5.2.1
532
- * @param interval Interval
533
- * @return Min
534
- */
535
- getIntervalMin(t) {
536
- return this._intervalMin[t.timeUnit + t.count];
537
- }
538
- _handleRangeChange() {
539
- super._handleRangeChange();
540
- let t = Math.round(this.getPrivate("selectionMin")), e = Math.round(this.getPrivate("selectionMax"));
541
- if (b(t) && b(e)) {
542
- if (this.get("endLocation") == 0 && (e += 1), this.get("groupData") && !this._groupingCalculated) {
543
- this._groupingCalculated = !0;
544
- let i = this.get("groupInterval"), s = this.getPrivate("groupInterval"), n = e - t + (this.get("startLocation", 0) + (1 - this.get("endLocation", 1)) * this.baseDuration());
545
- if (s) {
546
- let a = C(s);
547
- n = Math.ceil(n / a) * a;
548
- }
549
- if (i || (i = this.getGroupInterval(n)), i && (!s || s.timeUnit !== i.timeUnit || s.count !== i.count || this._seriesDataGrouped)) {
550
- this._seriesDataGrouped = !1, this.setPrivateRaw("groupInterval", i), this._setBaseInterval(i);
551
- let a = i.timeUnit + i.count;
552
- y(this.series, (r) => {
553
- r.get("baseAxis") === this && r.setDataSet(a);
554
- }), this.markDirtyExtremes(), this._root.events.once("frameended", () => {
555
- this._root.events.once("frameended", () => {
556
- const r = "groupintervalchanged";
557
- this.events.isEnabled(r) && this.events.dispatch(r, { type: r, target: this });
558
- });
559
- });
560
- }
561
- }
562
- y(this.series, (i) => {
563
- if (i.get("baseAxis") === this) {
564
- let s = this.getPrivate("name") + this.get("renderer").getPrivate("letter"), a = vt(i.dataItems, (h) => N(h.get(s), t)).index;
565
- a > 0 && (a -= 1), e += this.baseDuration() * (1 - this.get("endLocation", 1));
566
- let o = tt(i.dataItems, (h) => N(h.get(s), e)).index, l = o;
567
- l > 1 && l--;
568
- const d = i.dataItems[a], u = i.dataItems[l];
569
- let m, v;
570
- d && (v = d.get(s)), u && (m = u.get(s));
571
- let P = !1;
572
- m != null && v != null && (m < t || v > e) && (P = !0), i.setPrivate("outOfSelection", P), i.setPrivate("startIndex", a);
573
- let T = i._adjustStartIndex(a);
574
- i.getPrivate("adjustedStartIndex") !== T && (i.setPrivate("adjustedStartIndex", T), this.root.events.once("frameended", () => {
575
- i._markDirtyPrivateKey("adjustedStartIndex");
576
- })), i.setPrivate("endIndex", o);
577
- }
578
- });
579
- }
580
- }
581
- _adjustMinMax(t, e, i, s) {
582
- return { min: t, max: e, step: (e - t) / i };
583
- }
584
- /**
585
- * @ignore
586
- */
587
- intervalDuration() {
588
- return this._intervalDuration;
589
- }
590
- _saveMinMax(t, e) {
591
- let i = this.getPrivate("groupInterval");
592
- i || (i = this.get("baseInterval"));
593
- let s = i.timeUnit + i.count;
594
- this._intervalMin[s] = t, this._intervalMax[s] = e;
595
- }
596
- _getM(t) {
597
- return t == "day" || t == "month" || t == "year" ? 1.05 : 1.01;
598
- }
599
- _getMinorInterval(t) {
600
- var e;
601
- let i, s = t.count, n = t.timeUnit;
602
- return s > 1 && (s == 10 || s == 15 ? s = 5 : s == 12 ? s = 2 : s == 6 ? s = 1 : s == 30 ? s = 10 : s < 10 && (s = 1), i = { timeUnit: n, count: s }), n == "week" && (((e = this.getPrivate("baseInterval")) === null || e === void 0 ? void 0 : e.timeUnit) != "week" ? i = { timeUnit: "day", count: 1 } : i = { timeUnit: "week", count: 1 }), n == "year" && s == 1 && this.getPrivate("selectionMax", 0) - this.getPrivate("selectionMin", 0) < 4 * 366 * 24 * 60 * 60 * 1e3 && (i = { timeUnit: "month", count: 1 }), i;
603
- }
604
- _prepareAxisItems() {
605
- const t = this.getPrivate("min"), e = this.getPrivate("max");
606
- if (b(t) && b(e)) {
607
- const i = this._root, s = Math.round(this.getPrivate("selectionMin")), n = Math.round(this.getPrivate("selectionMax")), a = this.get("renderer"), r = this.getPrivate("baseInterval");
608
- let o = s, l = 0;
609
- const d = this.get("gridIntervals");
610
- let u = $(0, n - s, a.gridCount(), d);
611
- C(u) < this.baseDuration() && (u = Object.assign({}, r));
612
- const m = C(u);
613
- this._intervalDuration = m;
614
- const v = ct(u.timeUnit), P = i.utc, T = i.timezone;
615
- o = f(s - m, u.timeUnit, u.count, i, t);
616
- let h = o - m, M;
617
- const U = this.get("dateFormats");
618
- this.setPrivateRaw("gridInterval", u);
619
- const R = a.get("minorLabelsEnabled"), L = a.get("minorGridEnabled", R);
620
- let X, A = 0;
621
- L && (X = this._getMinorInterval(u), A = C(X));
622
- let Y = 0;
623
- for (; o < n + m; ) {
624
- let g;
625
- this.dataItems.length < l + 1 ? (g = new G(this, void 0, {}), this._dataItems.push(g), this.processDataItem(g)) : g = this.dataItems[l], this._createAssets(g, []), this._toggleDataItem(g, !0), g.setRaw("value", o), g.setRaw("labelEndValue", void 0);
626
- let p = o + S(u.timeUnit, u.count * this._getM(u.timeUnit));
627
- p = f(p, u.timeUnit, 1, i), g.setRaw("endValue", p);
628
- let V = new Date(o);
629
- M = U[u.timeUnit], v && this.get("markUnitChange") && b(h) && u.timeUnit != "year" && gt(o, h, v, P, T) && (M = this.get("periodChangeDateFormats")[u.timeUnit]);
630
- const x = g.get("label");
631
- x && x.set("text", i.dateFormatter.format(V, M));
632
- let k = u.count;
633
- if (u.timeUnit == "week" ? x == null || x.set("location", this.get("weekLabelLocation", 0)) : x == null || x.set("location", a.labels.template.get("location")), L) {
634
- k = 1;
635
- let c = u.timeUnit;
636
- c == "week" && this.get("skipFirstMinor") && (c = "day");
637
- let w = o + S(c, this._getM(c));
638
- w = f(w, c, 1, i), g.setRaw("labelEndValue", w);
639
- }
640
- if (this._prepareDataItem(g, k), h = o, o = p, X) {
641
- const c = X.timeUnit, w = X.count, _ = this._getM(c);
642
- this.get("skipFirstMinor") || (h -= A * _);
643
- let D = f(h + A * _, c, w, i, h), F, E = this.get("minorDateFormats", this.get("dateFormats"));
644
- for (; D < o - 0.01 * A; ) {
645
- let I;
646
- this.minorDataItems.length < Y + 1 ? (I = new G(this, void 0, {}), this.minorDataItems.push(I), this.processDataItem(I)) : I = this.minorDataItems[Y], this._createAssets(I, ["minor"], !0), this._toggleDataItem(I, !0), I.setRaw("value", D);
647
- let j = D + S(c, w * _);
648
- j = f(j, c, 1, i), I.setRaw("endValue", j);
649
- let ot = new Date(D);
650
- M = E[c];
651
- const O = I.get("label");
652
- if (O && (R ? O.set("text", i.dateFormatter.format(ot, M)) : O.setPrivate("visible", !1)), this._prepareDataItem(I, 1), D == F)
653
- break;
654
- if (!I.get("isRange")) {
655
- const W = this.get("fillRule");
656
- W && W(I);
657
- }
658
- F = D, D = j, Y++;
659
- }
660
- }
661
- if (o == h)
662
- break;
663
- l++;
664
- }
665
- for (let g = l; g < this.dataItems.length; g++)
666
- this._toggleDataItem(this.dataItems[g], !1);
667
- for (let g = Y; g < this.minorDataItems.length; g++)
668
- this._toggleDataItem(this.minorDataItems[g], !1);
669
- y(this.series, (g) => {
670
- g.inited && g._markDirtyAxes();
671
- });
672
- }
673
- this._updateGhost();
674
- }
675
- _updateFinals(t, e) {
676
- this.setPrivateRaw("selectionMinFinal", this.positionToValue(t)), this.setPrivateRaw("selectionMaxFinal", this.positionToValue(e));
677
- }
678
- _getDelta() {
679
- this._deltaMinMax = this.baseDuration() / 2;
680
- }
681
- _fixMin(t) {
682
- const e = this.getPrivate("baseInterval"), i = e.timeUnit;
683
- let s = f(t, i, e.count, this._root), n = s + S(i, e.count * this._getM(i));
684
- return n = f(n, i, 1, this._root), s + (n - s) * this.get("startLocation", 0);
685
- }
686
- _fixMax(t) {
687
- const e = this.getPrivate("baseInterval"), i = e.timeUnit;
688
- let s = f(t, i, e.count, this._root), n = s + S(i, e.count * this._getM(i));
689
- return n = f(n, i, 1, this._root), s + (n - s) * this.get("endLocation", 1);
690
- }
691
- _updateDates(t, e) {
692
- }
693
- _handleSeriesRemoved() {
694
- this.setPrivate("baseInterval", this.get("baseInterval")), this.setPrivate("min", void 0), this.setPrivate("minFinal", void 0);
695
- }
696
- /**
697
- * Returns a duration of currently active `baseInterval` in milliseconds.
698
- *
699
- * @return Duration
700
- */
701
- baseDuration() {
702
- return this._baseDuration;
703
- }
704
- /**
705
- * Returns a duration of user-defined `baseInterval` in milliseconds.
706
- *
707
- * @return Duration
708
- */
709
- baseMainDuration() {
710
- return C(this.get("baseInterval"));
711
- }
712
- /**
713
- * @ignore
714
- */
715
- processSeriesDataItem(t, e) {
716
- const i = this.getPrivate("baseInterval");
717
- t.open || (t.open = {}), t.close || (t.close = {}), y(e, (s) => {
718
- let n = t.get(s);
719
- if (b(n)) {
720
- let a = t.open[s], r = t.close[s];
721
- if (!(n >= a && n <= r)) {
722
- const o = i.timeUnit, l = i.count;
723
- a = f(n, o, l, this._root), r = a + S(o, l * this._getM(o)), r = f(r, o, 1, this._root), t.open[s] = a, t.close[s] = r;
724
- }
725
- this._updateDates(a, t.component);
726
- }
727
- });
728
- }
729
- _handleSizeDirty() {
730
- }
731
- /**
732
- * @ignore
733
- */
734
- getDataItemPositionX(t, e, i, s, n) {
735
- let a, r, o;
736
- return n ? o = t.get(e) : (t.open && t.close ? (a = t.open[e], r = t.close[e]) : (a = t.get(e), r = a), o = a + (r - a) * i, o = this._baseValue + (o - this._baseValue) * s), this.valueToPosition(o);
737
- }
738
- /**
739
- * @ignore
740
- */
741
- getDataItemCoordinateX(t, e, i, s) {
742
- return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t, e, i, s));
743
- }
744
- /**
745
- * @ignore
746
- */
747
- getDataItemPositionY(t, e, i, s, n) {
748
- let a, r, o;
749
- return n ? o = t.get(e) : (t.open && t.close ? (a = t.open[e], r = t.close[e]) : (a = t.get(e), r = a), o = a + (r - a) * i, o = this._baseValue + (o - this._baseValue) * s), this.valueToPosition(o);
750
- }
751
- /**
752
- * @ignore
753
- */
754
- getDataItemCoordinateY(t, e, i, s) {
755
- return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t, e, i, s));
756
- }
757
- /**
758
- * @ignore
759
- */
760
- roundAxisPosition(t, e) {
761
- let i = this.positionToValue(t);
762
- i = i - (e - 0.5) * this.baseDuration();
763
- let s = this.getPrivate("baseInterval");
764
- if (!dt(i)) {
765
- const n = this._root.locale.firstDayOfWeek, a = s.timeUnit, r = this._root.utc, o = this._root.timezone, l = s.count;
766
- i = f(i, a, l, this._root, this.getPrivate("min", 0));
767
- let d = z(s, new Date(i), n, r, o);
768
- return o && (i = f(i + this.baseDuration() * 0.05, a, l, this._root, this.getPrivate("min", 0)), d = z(s, new Date(i + d * e), n, r, o)), this.valueToPosition(i + d * e);
769
- }
770
- return NaN;
771
- }
772
- /**
773
- * Returns text to be used in an axis tooltip for specific relative position.
774
- *
775
- * NOTE: Unless `adjustPosition` (2nd parameter) is set to `false`, the method
776
- * will adjust position by `tooltipIntervalOffset`.
777
- *
778
- * @param position Position
779
- * @param adjustPosition Adjust position
780
- * @return Tooltip text
781
- */
782
- getTooltipText(t, e) {
783
- if (this.getPrivate("min") != null) {
784
- let i = this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit], s = this.positionToValue(t);
785
- if (b(s)) {
786
- let n = new Date(s), a = this.getPrivate("baseInterval"), r = z(a, n, this._root.locale.firstDayOfWeek, this._root.utc, this._root.timezone);
787
- return e !== !1 && (n = new Date(s + this.get("tooltipIntervalOffset", -this.get("tooltipLocation", 0.5)) * r)), this._root.dateFormatter.format(n, this.get("tooltipDateFormat", i));
788
- }
789
- }
790
- return "";
791
- }
792
- /**
793
- * Returns a data item from series that is closest to the `position`.
794
- *
795
- * @param series Series
796
- * @param position Relative position
797
- * @return Data item
798
- */
799
- getSeriesItem(t, e, i, s) {
800
- let n = this.getPrivate("name") + this.get("renderer").getPrivate("letter"), a = this.positionToValue(e);
801
- i == null && (i = 0.5), a = a - (i - 0.5) * this.baseDuration();
802
- const r = tt(t.dataItems, (o) => {
803
- let l = 0;
804
- return o.open && (l = o.open[n]), N(l, a);
805
- });
806
- if (s || t.get("snapTooltip")) {
807
- let o = t.dataItems[r.index - 1], l = t.dataItems[r.index];
808
- if (o && l && o.open && l.close) {
809
- let d = o.open[n], u = l.close[n];
810
- if (Math.abs(a - d) > Math.abs(a - u))
811
- return l;
812
- }
813
- if (o)
814
- return o;
815
- if (l)
816
- return l;
817
- } else {
818
- const o = t.dataItems[r.index - 1];
819
- if (o && o.open && o.close) {
820
- let l = o.open[n], d = o.close[n];
821
- if (a >= l && a <= d)
822
- return o;
823
- }
824
- }
825
- }
826
- /**
827
- * @ignore
828
- */
829
- shouldGap(t, e, i, s) {
830
- const n = t.get(s);
831
- return e.get(s) - n > this.baseDuration() * i;
832
- }
833
- /**
834
- * Zooms the axis to specific `start` and `end` dates.
835
- *
836
- * Optional `duration` specifies duration of zoom animation in milliseconds.
837
- *
838
- * @param start Start Date
839
- * @param end End Date
840
- * @param duration Duration in milliseconds
841
- */
842
- zoomToDates(t, e, i) {
843
- this.zoomToValues(t.getTime(), e.getTime(), i);
844
- }
845
- /**
846
- * Zooms the axis to specific `start` and `end` values.
847
- *
848
- * Optional `duration` specifies duration of zoom animation in milliseconds.
849
- *
850
- * @param start Start value
851
- * @param end End value
852
- * @param duration Duration in milliseconds
853
- */
854
- zoomToValues(t, e, i) {
855
- const s = this.getPrivate("minFinal", this.getPrivate("min", 0)), n = this.getPrivate("maxFinal", this.getPrivate("max", 0));
856
- if (this.getPrivate("min") != null && this.getPrivate("max") != null)
857
- if (this.get("groupData")) {
858
- const a = this.getGroupInterval(e - t), r = this.get("baseInterval");
859
- let o = this.getIntervalMin(r), l = this.getIntervalMax(r) - 1;
860
- l = f(l, a.timeUnit, a.count, this.root), l += this._getM(a.timeUnit) * C(a), l = f(l, a.timeUnit, a.count, this.root);
861
- let d = f(o, a.timeUnit, a.count, this.root), u = f(l, a.timeUnit, a.count, this.root), m = (t - d) / (u - d), v = (e - d) / (u - d);
862
- this.zoom(m, v, i);
863
- } else
864
- this.zoom((t - s) / (n - s), (e - s) / (n - s), i);
865
- }
866
- /**
867
- * Returns a `Date` object corresponding to specific position within plot
868
- * area.
869
- *
870
- * @param position Pposition
871
- * @return Date
872
- */
873
- positionToDate(t) {
874
- return new Date(this.positionToValue(t));
875
- }
876
- /**
877
- * Returns a relative position within plot area that corresponds to specific
878
- * date.
879
- *
880
- * @param date Date
881
- * @return Position
882
- */
883
- dateToPosition(t) {
884
- return this.valueToPosition(t.getTime());
885
- }
886
- /**
887
- * Returns relative position between two grid lines of the axis.
888
- *
889
- * @since 5.2.30
890
- * @return Position
891
- */
892
- getCellWidthPosition() {
893
- let t = this.getPrivate("selectionMax", this.getPrivate("max")), e = this.getPrivate("selectionMin", this.getPrivate("min"));
894
- return b(t) && b(e) ? this._intervalDuration / (t - e) : 0.05;
895
- }
896
- nextPosition(t) {
897
- t == null && (t = 1);
898
- let e = this.get("tooltipLocation", 0.5) * this.baseDuration();
899
- this.get("renderer").getPrivate("letter") == "Y" && (t *= -1);
900
- let i = this.positionToValue(this.getPrivate("tooltipPosition", 0));
901
- const s = this.getPrivate("baseInterval");
902
- let n = this._nextTime(i, t, s), a = this.getPrivate("selectionMin", 0), r = this.getPrivate("selectionMax", 0), o = f(a, s.timeUnit, s.count, this._root), l = f(r, s.timeUnit, s.count, this._root);
903
- return n += e, n = ft(n, o + e, l - e), this.toGlobalPosition(this.valueToPosition(n));
904
- }
905
- _nextTime(t, e, i) {
906
- return f(t + e * this.baseDuration(), i.timeUnit, i.count, this._root);
907
- }
908
- }
909
- Object.defineProperty(B, "className", {
910
- enumerable: !0,
911
- configurable: !0,
912
- writable: !0,
913
- value: "DateAxis"
914
- });
915
- Object.defineProperty(B, "classNames", {
916
- enumerable: !0,
917
- configurable: !0,
918
- writable: !0,
919
- value: at.classNames.concat([B.className])
920
- });
921
- export {
922
- B as D,
923
- H as X
924
- };