@refinitiv-ui/elements 5.12.2 → 6.0.0-next.2

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 (365) hide show
  1. package/README.md +4 -4
  2. package/lib/accordion/index.d.ts +5 -0
  3. package/lib/accordion/index.js +2 -2
  4. package/lib/accordion/themes/halo/dark/index.js +1 -1
  5. package/lib/accordion/themes/halo/light/index.js +1 -1
  6. package/lib/accordion/themes/solar/charcoal/index.js +1 -1
  7. package/lib/accordion/themes/solar/pearl/index.js +1 -1
  8. package/lib/appstate-bar/index.d.ts +11 -0
  9. package/lib/appstate-bar/index.js +8 -3
  10. package/lib/appstate-bar/themes/halo/dark/index.js +1 -1
  11. package/lib/appstate-bar/themes/halo/light/index.js +1 -1
  12. package/lib/appstate-bar/themes/solar/charcoal/index.js +1 -1
  13. package/lib/appstate-bar/themes/solar/pearl/index.js +1 -1
  14. package/lib/autosuggest/index.d.ts +5 -0
  15. package/lib/autosuggest/index.js +22 -12
  16. package/lib/autosuggest/themes/halo/dark/index.js +3 -3
  17. package/lib/autosuggest/themes/halo/light/index.js +3 -3
  18. package/lib/autosuggest/themes/solar/charcoal/index.js +3 -3
  19. package/lib/autosuggest/themes/solar/pearl/index.js +3 -3
  20. package/lib/button/index.d.ts +7 -13
  21. package/lib/button/index.js +8 -43
  22. package/lib/button/themes/halo/dark/index.js +1 -1
  23. package/lib/button/themes/halo/light/index.js +1 -1
  24. package/lib/button/themes/solar/charcoal/index.js +1 -1
  25. package/lib/button/themes/solar/pearl/index.js +1 -1
  26. package/lib/button-bar/index.d.ts +5 -0
  27. package/lib/button-bar/index.js +4 -5
  28. package/lib/button-bar/themes/halo/dark/index.js +1 -1
  29. package/lib/button-bar/themes/halo/light/index.js +1 -1
  30. package/lib/button-bar/themes/solar/charcoal/index.js +1 -1
  31. package/lib/button-bar/themes/solar/pearl/index.js +1 -1
  32. package/lib/calendar/constants.js +1 -1
  33. package/lib/calendar/index.d.ts +6 -1
  34. package/lib/calendar/index.js +39 -15
  35. package/lib/calendar/locales.js +5 -5
  36. package/lib/calendar/themes/halo/dark/index.js +1 -1
  37. package/lib/calendar/themes/halo/light/index.js +1 -1
  38. package/lib/calendar/themes/solar/charcoal/index.js +1 -1
  39. package/lib/calendar/themes/solar/pearl/index.js +1 -1
  40. package/lib/calendar/types.d.ts +1 -1
  41. package/lib/calendar/utils.js +5 -5
  42. package/lib/canvas/index.d.ts +5 -0
  43. package/lib/canvas/index.js +3 -4
  44. package/lib/card/index.d.ts +21 -0
  45. package/lib/card/index.js +37 -15
  46. package/lib/card/themes/halo/dark/index.js +3 -3
  47. package/lib/card/themes/halo/light/index.js +3 -3
  48. package/lib/card/themes/solar/charcoal/index.js +3 -3
  49. package/lib/card/themes/solar/pearl/index.js +3 -3
  50. package/lib/chart/index.d.ts +5 -0
  51. package/lib/chart/index.js +18 -22
  52. package/lib/chart/plugins/doughnut-center-label.js +6 -11
  53. package/lib/chart/themes/halo/dark/index.js +2 -2
  54. package/lib/chart/themes/halo/light/index.js +2 -2
  55. package/lib/chart/themes/solar/charcoal/index.js +2 -2
  56. package/lib/chart/themes/solar/pearl/index.js +2 -2
  57. package/lib/checkbox/index.d.ts +5 -0
  58. package/lib/checkbox/index.js +3 -3
  59. package/lib/checkbox/themes/halo/dark/index.js +2 -2
  60. package/lib/checkbox/themes/halo/light/index.js +2 -2
  61. package/lib/checkbox/themes/solar/charcoal/index.js +2 -2
  62. package/lib/checkbox/themes/solar/pearl/index.js +2 -2
  63. package/lib/clock/index.d.ts +5 -0
  64. package/lib/clock/index.js +6 -6
  65. package/lib/clock/utils/TickManager.js +2 -2
  66. package/lib/collapse/index.d.ts +5 -0
  67. package/lib/collapse/index.js +7 -9
  68. package/lib/collapse/themes/halo/dark/index.js +3 -3
  69. package/lib/collapse/themes/halo/light/index.js +3 -3
  70. package/lib/collapse/themes/solar/charcoal/index.js +3 -3
  71. package/lib/collapse/themes/solar/pearl/index.js +3 -3
  72. package/lib/color-dialog/elements/color-palettes.d.ts +5 -0
  73. package/lib/color-dialog/elements/color-palettes.js +1 -1
  74. package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -0
  75. package/lib/color-dialog/elements/grayscale-palettes.js +2 -2
  76. package/lib/color-dialog/elements/palettes.js +4 -5
  77. package/lib/color-dialog/helpers/value-model.js +1 -1
  78. package/lib/color-dialog/index.d.ts +6 -1
  79. package/lib/color-dialog/index.js +17 -12
  80. package/lib/color-dialog/themes/halo/dark/index.js +5 -5
  81. package/lib/color-dialog/themes/halo/light/index.js +5 -5
  82. package/lib/color-dialog/themes/solar/charcoal/index.js +5 -5
  83. package/lib/color-dialog/themes/solar/pearl/index.js +5 -5
  84. package/lib/combo-box/helpers/filter.d.ts +1 -1
  85. package/lib/combo-box/helpers/types.d.ts +1 -1
  86. package/lib/combo-box/index.d.ts +9 -4
  87. package/lib/combo-box/index.js +31 -14
  88. package/lib/combo-box/themes/halo/dark/index.js +5 -5
  89. package/lib/combo-box/themes/halo/light/index.js +5 -5
  90. package/lib/combo-box/themes/solar/charcoal/index.js +5 -5
  91. package/lib/combo-box/themes/solar/pearl/index.js +5 -5
  92. package/lib/counter/index.d.ts +11 -6
  93. package/lib/counter/index.js +8 -8
  94. package/lib/counter/themes/halo/dark/index.js +1 -1
  95. package/lib/counter/themes/halo/light/index.js +1 -1
  96. package/lib/counter/themes/solar/charcoal/index.js +1 -1
  97. package/lib/counter/themes/solar/pearl/index.js +1 -1
  98. package/lib/datetime-field/constants.d.ts +4 -0
  99. package/lib/datetime-field/constants.js +5 -0
  100. package/lib/datetime-field/custom-elements.json +345 -0
  101. package/lib/datetime-field/custom-elements.md +61 -0
  102. package/lib/datetime-field/index.d.ts +322 -0
  103. package/lib/datetime-field/index.js +660 -0
  104. package/lib/datetime-field/themes/halo/dark/index.js +3 -0
  105. package/lib/datetime-field/themes/halo/light/index.js +3 -0
  106. package/lib/datetime-field/themes/solar/charcoal/index.js +3 -0
  107. package/lib/datetime-field/themes/solar/pearl/index.js +3 -0
  108. package/lib/datetime-field/types.d.ts +10 -0
  109. package/lib/datetime-field/types.js +1 -0
  110. package/lib/datetime-field/utils.d.ts +25 -0
  111. package/lib/datetime-field/utils.js +79 -0
  112. package/lib/datetime-picker/index.d.ts +5 -0
  113. package/lib/datetime-picker/index.js +6 -7
  114. package/lib/datetime-picker/themes/halo/dark/index.js +5 -5
  115. package/lib/datetime-picker/themes/halo/light/index.js +5 -5
  116. package/lib/datetime-picker/themes/solar/charcoal/index.js +5 -5
  117. package/lib/datetime-picker/themes/solar/pearl/index.js +5 -5
  118. package/lib/datetime-picker/utils.js +1 -1
  119. package/lib/dialog/draggable-element.js +1 -2
  120. package/lib/dialog/index.d.ts +6 -1
  121. package/lib/dialog/index.js +5 -5
  122. package/lib/dialog/themes/halo/dark/index.js +5 -5
  123. package/lib/dialog/themes/halo/light/index.js +5 -5
  124. package/lib/dialog/themes/solar/charcoal/index.js +5 -5
  125. package/lib/dialog/themes/solar/pearl/index.js +5 -5
  126. package/lib/email-field/index.d.ts +6 -1
  127. package/lib/email-field/index.js +8 -3
  128. package/lib/email-field/themes/halo/dark/index.js +1 -1
  129. package/lib/email-field/themes/halo/light/index.js +1 -1
  130. package/lib/email-field/themes/solar/charcoal/index.js +1 -1
  131. package/lib/email-field/themes/solar/pearl/index.js +1 -1
  132. package/lib/flag/index.d.ts +5 -0
  133. package/lib/flag/index.js +3 -3
  134. package/lib/flag/utils/FlagLoader.d.ts +1 -1
  135. package/lib/flag/utils/FlagLoader.js +1 -1
  136. package/lib/header/index.d.ts +5 -0
  137. package/lib/header/index.js +2 -2
  138. package/lib/heatmap/helpers/color.d.ts +1 -1
  139. package/lib/heatmap/helpers/color.js +3 -5
  140. package/lib/heatmap/helpers/text.d.ts +1 -7
  141. package/lib/heatmap/helpers/text.js +1 -18
  142. package/lib/heatmap/index.d.ts +5 -0
  143. package/lib/heatmap/index.js +22 -30
  144. package/lib/heatmap/themes/halo/dark/index.js +2 -2
  145. package/lib/heatmap/themes/halo/light/index.js +2 -2
  146. package/lib/heatmap/themes/solar/charcoal/index.js +2 -2
  147. package/lib/heatmap/themes/solar/pearl/index.js +2 -2
  148. package/lib/icon/index.d.ts +5 -0
  149. package/lib/icon/index.js +3 -3
  150. package/lib/icon/utils/IconLoader.d.ts +1 -1
  151. package/lib/icon/utils/IconLoader.js +1 -1
  152. package/lib/interactive-chart/helpers/types.d.ts +1 -1
  153. package/lib/interactive-chart/index.d.ts +5 -12
  154. package/lib/interactive-chart/index.js +20 -36
  155. package/lib/interactive-chart/themes/halo/dark/index.js +1 -1
  156. package/lib/interactive-chart/themes/halo/light/index.js +1 -1
  157. package/lib/interactive-chart/themes/solar/charcoal/index.js +1 -1
  158. package/lib/interactive-chart/themes/solar/pearl/index.js +1 -1
  159. package/lib/item/helpers/types.d.ts +1 -1
  160. package/lib/item/index.d.ts +24 -17
  161. package/lib/item/index.js +45 -48
  162. package/lib/item/themes/halo/dark/index.js +2 -2
  163. package/lib/item/themes/halo/light/index.js +2 -2
  164. package/lib/item/themes/solar/charcoal/index.js +2 -2
  165. package/lib/item/themes/solar/pearl/index.js +2 -2
  166. package/lib/label/index.d.ts +6 -1
  167. package/lib/label/index.js +6 -6
  168. package/lib/label/themes/halo/dark/index.js +1 -1
  169. package/lib/label/themes/halo/light/index.js +1 -1
  170. package/lib/label/themes/solar/charcoal/index.js +1 -1
  171. package/lib/label/themes/solar/pearl/index.js +1 -1
  172. package/lib/layout/index.d.ts +5 -0
  173. package/lib/layout/index.js +2 -2
  174. package/lib/led-gauge/index.d.ts +5 -0
  175. package/lib/led-gauge/index.js +2 -2
  176. package/lib/led-gauge/themes/halo/dark/index.js +1 -1
  177. package/lib/led-gauge/themes/halo/light/index.js +1 -1
  178. package/lib/led-gauge/themes/solar/charcoal/index.js +1 -1
  179. package/lib/led-gauge/themes/solar/pearl/index.js +1 -1
  180. package/lib/list/custom-elements.json +0 -13
  181. package/lib/list/custom-elements.md +9 -10
  182. package/lib/list/helpers/item-id.d.ts +8 -0
  183. package/lib/list/helpers/item-id.js +13 -0
  184. package/lib/list/helpers/{list-renderer.d.ts → renderer.d.ts} +4 -0
  185. package/lib/list/helpers/{list-renderer.js → renderer.js} +8 -0
  186. package/lib/list/helpers/types.d.ts +1 -1
  187. package/lib/list/index.d.ts +18 -12
  188. package/lib/list/index.js +30 -29
  189. package/lib/list/renderer.d.ts +1 -1
  190. package/lib/list/themes/halo/dark/index.js +2 -2
  191. package/lib/list/themes/halo/light/index.js +2 -2
  192. package/lib/list/themes/solar/charcoal/index.js +2 -2
  193. package/lib/list/themes/solar/pearl/index.js +2 -2
  194. package/lib/loader/index.d.ts +6 -0
  195. package/lib/loader/index.js +5 -1
  196. package/lib/multi-input/helpers/types.d.ts +1 -1
  197. package/lib/multi-input/index.d.ts +5 -0
  198. package/lib/multi-input/index.js +6 -7
  199. package/lib/multi-input/themes/halo/dark/index.js +2 -2
  200. package/lib/multi-input/themes/halo/light/index.js +2 -2
  201. package/lib/multi-input/themes/solar/charcoal/index.js +2 -2
  202. package/lib/multi-input/themes/solar/pearl/index.js +2 -2
  203. package/lib/notification/elements/notification-tray.d.ts +5 -0
  204. package/lib/notification/elements/notification-tray.js +4 -4
  205. package/lib/notification/elements/notification.d.ts +15 -0
  206. package/lib/notification/elements/notification.js +12 -3
  207. package/lib/notification/themes/halo/dark/index.js +1 -1
  208. package/lib/notification/themes/halo/light/index.js +1 -1
  209. package/lib/notification/themes/solar/charcoal/index.js +1 -1
  210. package/lib/notification/themes/solar/pearl/index.js +1 -1
  211. package/lib/number-field/index.d.ts +8 -3
  212. package/lib/number-field/index.js +14 -4
  213. package/lib/number-field/themes/halo/dark/index.js +1 -1
  214. package/lib/number-field/themes/halo/light/index.js +1 -1
  215. package/lib/number-field/themes/solar/charcoal/index.js +1 -1
  216. package/lib/number-field/themes/solar/pearl/index.js +1 -1
  217. package/lib/overlay/elements/overlay-backdrop.d.ts +5 -0
  218. package/lib/overlay/elements/overlay-backdrop.js +2 -2
  219. package/lib/overlay/elements/overlay-viewport.d.ts +5 -0
  220. package/lib/overlay/elements/overlay-viewport.js +1 -1
  221. package/lib/overlay/elements/overlay.d.ts +5 -0
  222. package/lib/overlay/elements/overlay.js +7 -5
  223. package/lib/overlay/managers/focus-manager.js +11 -6
  224. package/lib/overlay/managers/interaction-lock-manager.js +1 -1
  225. package/lib/overlay/managers/viewport-manager.js +4 -5
  226. package/lib/overlay/managers/zindex-manager.js +1 -1
  227. package/lib/overlay-menu/helpers/types.d.ts +7 -1
  228. package/lib/overlay-menu/helpers/types.js +7 -1
  229. package/lib/overlay-menu/index.d.ts +14 -4
  230. package/lib/overlay-menu/index.js +57 -29
  231. package/lib/overlay-menu/managers/menu-manager.js +2 -1
  232. package/lib/overlay-menu/themes/halo/dark/index.js +3 -3
  233. package/lib/overlay-menu/themes/halo/light/index.js +3 -3
  234. package/lib/overlay-menu/themes/solar/charcoal/index.js +3 -3
  235. package/lib/overlay-menu/themes/solar/pearl/index.js +3 -3
  236. package/lib/pagination/index.d.ts +79 -91
  237. package/lib/pagination/index.js +205 -239
  238. package/lib/pagination/themes/halo/dark/index.js +4 -5
  239. package/lib/pagination/themes/halo/light/index.js +4 -5
  240. package/lib/pagination/themes/solar/charcoal/index.js +4 -5
  241. package/lib/pagination/themes/solar/pearl/index.js +4 -5
  242. package/lib/panel/index.d.ts +5 -0
  243. package/lib/panel/index.js +2 -2
  244. package/lib/password-field/index.d.ts +7 -2
  245. package/lib/password-field/index.js +7 -4
  246. package/lib/password-field/themes/halo/dark/index.js +1 -1
  247. package/lib/password-field/themes/halo/light/index.js +1 -1
  248. package/lib/password-field/themes/solar/charcoal/index.js +1 -1
  249. package/lib/password-field/themes/solar/pearl/index.js +1 -1
  250. package/lib/pill/index.d.ts +21 -0
  251. package/lib/pill/index.js +36 -5
  252. package/lib/pill/themes/halo/dark/index.js +2 -2
  253. package/lib/pill/themes/halo/light/index.js +2 -2
  254. package/lib/pill/themes/solar/charcoal/index.js +2 -2
  255. package/lib/pill/themes/solar/pearl/index.js +2 -2
  256. package/lib/progress-bar/index.d.ts +5 -0
  257. package/lib/progress-bar/index.js +3 -3
  258. package/lib/radio-button/index.d.ts +5 -0
  259. package/lib/radio-button/index.js +3 -3
  260. package/lib/radio-button/radio-button-registry.d.ts +1 -1
  261. package/lib/radio-button/radio-button-registry.js +4 -2
  262. package/lib/radio-button/themes/halo/dark/index.js +1 -1
  263. package/lib/radio-button/themes/halo/light/index.js +1 -1
  264. package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
  265. package/lib/radio-button/themes/solar/pearl/index.js +1 -1
  266. package/lib/rating/index.d.ts +5 -0
  267. package/lib/rating/index.js +4 -4
  268. package/lib/search-field/index.d.ts +7 -2
  269. package/lib/search-field/index.js +8 -4
  270. package/lib/search-field/themes/halo/dark/index.js +1 -1
  271. package/lib/search-field/themes/halo/light/index.js +1 -1
  272. package/lib/search-field/themes/solar/charcoal/index.js +1 -1
  273. package/lib/search-field/themes/solar/pearl/index.js +1 -1
  274. package/lib/select/index.d.ts +5 -0
  275. package/lib/select/index.js +11 -14
  276. package/lib/select/themes/halo/dark/index.js +3 -3
  277. package/lib/select/themes/halo/light/index.js +3 -3
  278. package/lib/select/themes/solar/charcoal/index.js +3 -3
  279. package/lib/select/themes/solar/pearl/index.js +3 -3
  280. package/lib/sidebar-layout/index.d.ts +5 -0
  281. package/lib/sidebar-layout/index.js +4 -4
  282. package/lib/sidebar-layout/themes/halo/dark/index.js +1 -1
  283. package/lib/sidebar-layout/themes/halo/light/index.js +1 -1
  284. package/lib/sidebar-layout/themes/solar/charcoal/index.js +1 -1
  285. package/lib/sidebar-layout/themes/solar/pearl/index.js +1 -1
  286. package/lib/slider/constants.d.ts +15 -0
  287. package/lib/slider/constants.js +18 -0
  288. package/lib/slider/index.d.ts +55 -80
  289. package/lib/slider/index.js +365 -460
  290. package/lib/slider/themes/halo/dark/index.js +1 -1
  291. package/lib/slider/themes/halo/light/index.js +1 -1
  292. package/lib/slider/themes/solar/charcoal/index.js +1 -1
  293. package/lib/slider/themes/solar/pearl/index.js +1 -1
  294. package/lib/slider/utils.d.ts +35 -0
  295. package/lib/slider/utils.js +54 -0
  296. package/lib/sparkline/index.d.ts +5 -0
  297. package/lib/sparkline/index.js +9 -10
  298. package/lib/swing-gauge/index.d.ts +5 -0
  299. package/lib/swing-gauge/index.js +14 -8
  300. package/lib/swing-gauge/themes/halo/dark/index.js +1 -1
  301. package/lib/swing-gauge/themes/halo/light/index.js +1 -1
  302. package/lib/swing-gauge/themes/solar/charcoal/index.js +1 -1
  303. package/lib/swing-gauge/themes/solar/pearl/index.js +1 -1
  304. package/lib/tab/index.d.ts +5 -0
  305. package/lib/tab/index.js +4 -4
  306. package/lib/tab/themes/halo/dark/index.js +2 -2
  307. package/lib/tab/themes/halo/light/index.js +2 -2
  308. package/lib/tab/themes/solar/charcoal/index.js +2 -2
  309. package/lib/tab/themes/solar/pearl/index.js +2 -2
  310. package/lib/tab-bar/index.d.ts +5 -0
  311. package/lib/tab-bar/index.js +6 -6
  312. package/lib/tab-bar/themes/halo/dark/index.js +2 -2
  313. package/lib/tab-bar/themes/halo/light/index.js +2 -2
  314. package/lib/tab-bar/themes/solar/charcoal/index.js +2 -2
  315. package/lib/tab-bar/themes/solar/pearl/index.js +2 -2
  316. package/lib/text-field/index.d.ts +19 -1
  317. package/lib/text-field/index.js +35 -11
  318. package/lib/text-field/themes/halo/dark/index.js +1 -1
  319. package/lib/text-field/themes/halo/light/index.js +1 -1
  320. package/lib/text-field/themes/solar/charcoal/index.js +1 -1
  321. package/lib/text-field/themes/solar/pearl/index.js +1 -1
  322. package/lib/time-picker/index.d.ts +6 -1
  323. package/lib/time-picker/index.js +11 -11
  324. package/lib/time-picker/themes/halo/dark/index.js +2 -2
  325. package/lib/time-picker/themes/halo/light/index.js +2 -2
  326. package/lib/time-picker/themes/solar/charcoal/index.js +2 -2
  327. package/lib/time-picker/themes/solar/pearl/index.js +2 -2
  328. package/lib/toggle/index.d.ts +5 -0
  329. package/lib/toggle/index.js +2 -2
  330. package/lib/tooltip/elements/tooltip-element.d.ts +1 -2
  331. package/lib/tooltip/index.d.ts +6 -0
  332. package/lib/tooltip/index.js +7 -8
  333. package/lib/tooltip/managers/tooltip-manager.js +2 -2
  334. package/lib/tooltip/themes/halo/dark/index.js +1 -1
  335. package/lib/tooltip/themes/halo/light/index.js +1 -1
  336. package/lib/tooltip/themes/solar/charcoal/index.js +1 -1
  337. package/lib/tooltip/themes/solar/pearl/index.js +1 -1
  338. package/lib/tornado-chart/elements/tornado-chart.d.ts +5 -0
  339. package/lib/tornado-chart/elements/tornado-chart.js +2 -2
  340. package/lib/tornado-chart/elements/tornado-item.d.ts +5 -0
  341. package/lib/tornado-chart/elements/tornado-item.js +3 -3
  342. package/lib/tornado-chart/themes/halo/dark/index.js +2 -2
  343. package/lib/tornado-chart/themes/halo/light/index.js +2 -2
  344. package/lib/tornado-chart/themes/solar/charcoal/index.js +2 -2
  345. package/lib/tornado-chart/themes/solar/pearl/index.js +2 -2
  346. package/lib/tree/elements/tree-item.d.ts +8 -3
  347. package/lib/tree/elements/tree-item.js +5 -6
  348. package/lib/tree/elements/tree.d.ts +7 -3
  349. package/lib/tree/elements/tree.js +6 -7
  350. package/lib/tree/helpers/renderer.d.ts +4 -0
  351. package/lib/tree/helpers/renderer.js +20 -13
  352. package/lib/tree/helpers/types.d.ts +1 -1
  353. package/lib/tree/managers/tree-manager.d.ts +1 -1
  354. package/lib/tree/themes/halo/dark/index.js +4 -4
  355. package/lib/tree/themes/halo/light/index.js +4 -4
  356. package/lib/tree/themes/solar/charcoal/index.js +4 -4
  357. package/lib/tree/themes/solar/pearl/index.js +4 -4
  358. package/lib/tree-select/index.d.ts +8 -7
  359. package/lib/tree-select/index.js +39 -38
  360. package/lib/tree-select/themes/halo/dark/index.js +9 -9
  361. package/lib/tree-select/themes/halo/light/index.js +9 -9
  362. package/lib/tree-select/themes/solar/charcoal/index.js +9 -9
  363. package/lib/tree-select/themes/solar/pearl/index.js +9 -9
  364. package/lib/version.js +1 -1
  365. package/package.json +35 -295
@@ -1,5 +1,5 @@
1
1
  /* istanbul ignore file */
2
- import { color, rgb, hsl } from '@refinitiv-ui/utils/lib/color.js';
2
+ import { color, rgb, hsl } from '@refinitiv-ui/utils/color.js';
3
3
  import { interpolate } from 'd3-interpolate';
4
4
  /**
5
5
  * Check if the color is a light color
@@ -16,8 +16,7 @@ const isLight = (col) => {
16
16
  * @return a color brighter than original color
17
17
  */
18
18
  const brighten = (colorString) => {
19
- var _a;
20
- return ((_a = color(colorString)) === null || _a === void 0 ? void 0 : _a.brighter(0.8).toString()) || '';
19
+ return color(colorString)?.brighter(0.8).toString() || '';
21
20
  };
22
21
  /**
23
22
  * Darkens a color
@@ -38,7 +37,6 @@ const darken = (colorString) => {
38
37
  * @returns a new blended color
39
38
  */
40
39
  const blend = (color1, color2, backgroundColor, amount) => {
41
- var _a;
42
40
  let primaryColor;
43
41
  let secondaryColor;
44
42
  if (amount >= 0) {
@@ -63,6 +61,6 @@ const blend = (color1, color2, backgroundColor, amount) => {
63
61
  const red = mixRedComponent ? Math.round(interpolate(primaryColor.r, secondaryColor.r)(factor)) : primaryColor.r;
64
62
  const green = mixGreenComponent ? Math.round(interpolate(primaryColor.g, secondaryColor.g)(factor)) : primaryColor.g;
65
63
  const blue = mixBlueComponent ? Math.round(interpolate(primaryColor.b, secondaryColor.b)(factor)) : primaryColor.b;
66
- return ((_a = color(`rgb(${red}, ${green}, ${blue})`)) === null || _a === void 0 ? void 0 : _a.toString()) || '';
64
+ return color(`rgb(${red}, ${green}, ${blue})`)?.toString() || '';
67
65
  };
68
66
  export { blend, brighten, darken, isLight, interpolate };
@@ -17,10 +17,4 @@ declare const getResponsiveFontSize: (ratio: number, cellHeight: number, cellWid
17
17
  * @returns label width measured in canvas
18
18
  */
19
19
  declare const getMaximumTextWidth: (ctx: CanvasRenderingContext2D, cells: HeatmapCell[], hasCellHeader: boolean) => number;
20
- /**
21
- * Calculate max length text for render Axis size
22
- * @param labels array string text for calculate
23
- * @returns max length text
24
- */
25
- declare const getMaximumLabelTextWidth: (labels: string[]) => string;
26
- export { getResponsiveFontSize, getMaximumTextWidth, getMaximumLabelTextWidth, MIN_FONT_SIZE, MAX_FONT_SIZE };
20
+ export { getResponsiveFontSize, getMaximumTextWidth, MIN_FONT_SIZE, MAX_FONT_SIZE };
@@ -71,21 +71,4 @@ const getMaximumTextWidth = (ctx, cells, hasCellHeader) => {
71
71
  }
72
72
  return maxTextWidth;
73
73
  };
74
- /**
75
- * Calculate max length text for render Axis size
76
- * @param labels array string text for calculate
77
- * @returns max length text
78
- */
79
- const getMaximumLabelTextWidth = (labels) => {
80
- let maxLengthText = '';
81
- for (let i = 0; i < labels.length; i++) {
82
- if (maxLengthText.length >= labels[i].length) {
83
- maxLengthText = maxLengthText;
84
- }
85
- else {
86
- maxLengthText = labels[i];
87
- }
88
- }
89
- return maxLengthText;
90
- };
91
- export { getResponsiveFontSize, getMaximumTextWidth, getMaximumLabelTextWidth, MIN_FONT_SIZE, MAX_FONT_SIZE };
74
+ export { getResponsiveFontSize, getMaximumTextWidth, MIN_FONT_SIZE, MAX_FONT_SIZE };
@@ -437,6 +437,11 @@ export declare class Heatmap extends ResponsiveElement {
437
437
  */
438
438
  protected render(): TemplateResult;
439
439
  }
440
+ declare global {
441
+ interface HTMLElementTagNameMap {
442
+ 'ef-heatmap': Heatmap;
443
+ }
444
+ }
440
445
 
441
446
  declare global {
442
447
  interface HTMLElementTagNameMap {
@@ -1,16 +1,16 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { ResponsiveElement, html, css } from '@refinitiv-ui/core';
3
- import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
- import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
5
- import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
3
+ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
5
+ import { query } from '@refinitiv-ui/core/decorators/query.js';
6
6
  import { VERSION } from '../version.js';
7
- import { MicroTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
8
- import { color } from '@refinitiv-ui/utils/lib/color.js';
7
+ import { MicroTaskRunner } from '@refinitiv-ui/utils/async.js';
8
+ import { color } from '@refinitiv-ui/utils/color.js';
9
9
  import '../canvas/index.js';
10
10
  import '../tooltip/index.js';
11
11
  import { Track } from './helpers/track.js';
12
12
  import { blend, brighten, darken, isLight, interpolate } from './helpers/color.js';
13
- import { getResponsiveFontSize, getMaximumTextWidth, getMaximumLabelTextWidth, MIN_FONT_SIZE } from './helpers/text.js';
13
+ import { getResponsiveFontSize, getMaximumTextWidth, MIN_FONT_SIZE } from './helpers/text.js';
14
14
  const MAX_CELL_WIDTH_RATIO = 0.85;
15
15
  const DEFAULT_CANVAS_RATIO = 0.75; // ratio — 4:3
16
16
  /**
@@ -235,8 +235,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
235
235
  * @returns array of row data
236
236
  */
237
237
  get rows() {
238
- var _a;
239
- return this.config && Array.isArray((_a = this.config) === null || _a === void 0 ? void 0 : _a.data) ? this.config.data : [];
238
+ return this.config && Array.isArray(this.config?.data) ? this.config.data : [];
240
239
  }
241
240
  /**
242
241
  * Get row count
@@ -250,9 +249,8 @@ let Heatmap = class Heatmap extends ResponsiveElement {
250
249
  * @returns count of columns
251
250
  */
252
251
  get columnCount() {
253
- var _a;
254
252
  let result = 0;
255
- (_a = this.rows) === null || _a === void 0 ? void 0 : _a.forEach(columns => {
253
+ this.rows?.forEach(columns => {
256
254
  if (columns.length > result) {
257
255
  result = columns.length;
258
256
  }
@@ -393,11 +391,10 @@ let Heatmap = class Heatmap extends ResponsiveElement {
393
391
  */
394
392
  /* istanbul ignore next */
395
393
  updateTooltipOverlayPosition(cell) {
396
- var _a, _b, _c;
397
394
  // Compensate x-axis height for overlay when x-axis is at top position
398
395
  let marginOverlayTop = 0;
399
- if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.xAxis) && ((_b = this.xAxis) === null || _b === void 0 ? void 0 : _b.offsetHeight)) {
400
- marginOverlayTop = this.config.xAxis.position === 'bottom' ? 0 : (_c = this.xAxis) === null || _c === void 0 ? void 0 : _c.offsetHeight;
396
+ if (this.config?.xAxis && this.xAxis?.offsetHeight) {
397
+ marginOverlayTop = this.config.xAxis.position === 'bottom' ? 0 : this.xAxis?.offsetHeight;
401
398
  }
402
399
  // Update overlay position
403
400
  this.tooltipOverlay.style.left = `${cell.x}px`;
@@ -481,8 +478,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
481
478
  */
482
479
  /* istanbul ignore next */
483
480
  resetCell(cell) {
484
- var _a;
485
- (_a = this.canvasContext) === null || _a === void 0 ? void 0 : _a.clearRect(cell.x, cell.y, cell.width, cell.height);
481
+ this.canvasContext?.clearRect(cell.x, cell.y, cell.width, cell.height);
486
482
  }
487
483
  /**
488
484
  * Fades a cell's background from one color to another
@@ -525,14 +521,13 @@ let Heatmap = class Heatmap extends ResponsiveElement {
525
521
  * @returns {void}
526
522
  */
527
523
  calculateCellData() {
528
- var _a, _b, _c;
529
524
  // Reset cell
530
525
  this.cells = [];
531
526
  if (!this.axisHidden) {
532
- if (this.yAxis && ((_a = this.config) === null || _a === void 0 ? void 0 : _a.yAxis)) {
527
+ if (this.yAxis && this.config?.yAxis) {
533
528
  this.rowTrack.init(this.yAxis.offsetHeight, this.rowCount);
534
529
  }
535
- if (this.xAxis && ((_b = this.config) === null || _b === void 0 ? void 0 : _b.xAxis)) {
530
+ if (this.xAxis && this.config?.xAxis) {
536
531
  this.colTrack.init(this.xAxis.offsetWidth, this.columnCount);
537
532
  }
538
533
  }
@@ -545,7 +540,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
545
540
  const cellHeader = cell && cell.header ? cell.header : '';
546
541
  const cellIndex = rowIndex * this.colTrack.laneCount + columnIndex;
547
542
  const foregroundColor = this.foregroundColor;
548
- const backgroundColor = ((_c = this.getBackgroundColor(cellValue)) === null || _c === void 0 ? void 0 : _c.toString()) || '';
543
+ const backgroundColor = this.getBackgroundColor(cellValue)?.toString() || '';
549
544
  if (cellHeader) {
550
545
  this.hasCellHeader = true;
551
546
  }
@@ -821,8 +816,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
821
816
  * @returns {void}
822
817
  */
823
818
  paintAllCellBackground() {
824
- var _a;
825
- (_a = this.canvasContext) === null || _a === void 0 ? void 0 : _a.clearRect(0, 0, this.canvas.width, this.canvas.height);
819
+ this.canvasContext?.clearRect(0, 0, this.canvas.width, this.canvas.height);
826
820
  for (let index = 0; index < this.cells.length; index++) {
827
821
  this.paintCellBackground(this.cells[index]);
828
822
  }
@@ -843,11 +837,10 @@ let Heatmap = class Heatmap extends ResponsiveElement {
843
837
  * @returns {void}
844
838
  */
845
839
  renderAxisX() {
846
- var _a;
847
840
  if (!this.isSizeCalculated) {
848
841
  return;
849
842
  }
850
- const axisConfig = (_a = this.config) === null || _a === void 0 ? void 0 : _a.xAxis;
843
+ const axisConfig = this.config?.xAxis;
851
844
  if (!this.xAxis || !this.yAxisBox || !axisConfig) {
852
845
  return;
853
846
  }
@@ -909,11 +902,10 @@ let Heatmap = class Heatmap extends ResponsiveElement {
909
902
  * @returns {void}
910
903
  */
911
904
  renderAxisY() {
912
- var _a, _b;
913
905
  if (!this.isSizeCalculated) {
914
906
  return;
915
907
  }
916
- const axisConfig = (_a = this.config) === null || _a === void 0 ? void 0 : _a.yAxis;
908
+ const axisConfig = this.config?.yAxis;
917
909
  if (!this.yAxis || !axisConfig) {
918
910
  return;
919
911
  }
@@ -933,7 +925,8 @@ let Heatmap = class Heatmap extends ResponsiveElement {
933
925
  const element = document.createElement('div');
934
926
  element.className = 'y-axis-item';
935
927
  const span = document.createElement('span');
936
- span.textContent = getMaximumLabelTextWidth(labels);
928
+ // Choose the longest label
929
+ span.textContent = labels.reduce((previousLabel, currentLabel) => previousLabel.length > currentLabel.length ? previousLabel : currentLabel);
937
930
  element.appendChild(span);
938
931
  element.style.margin = `${cellMargin}px`;
939
932
  const cellHeight = this.rowTrack.getContentSize(1);
@@ -979,7 +972,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
979
972
  }
980
973
  element.textContent = labels[i] || nbsp;
981
974
  }
982
- if (this.xAxis && ((_b = this.config) === null || _b === void 0 ? void 0 : _b.xAxis)) {
975
+ if (this.xAxis && this.config?.xAxis) {
983
976
  // TODO: Wrong crossBox margin calculation when margin = 0.5px
984
977
  this.crossBox.style.margin = `${this.cellMargin}px`;
985
978
  this.crossBox.style.height = `${this.xAxis.children[0].offsetHeight}px`;
@@ -1015,16 +1008,15 @@ let Heatmap = class Heatmap extends ResponsiveElement {
1015
1008
  * @return Render template
1016
1009
  */
1017
1010
  render() {
1018
- var _a, _b;
1019
1011
  return html `
1020
1012
  <div id="container" @mousemove=${this.onMouseMove} @mouseleave=${this.onMouseLeave}>
1021
- ${((_a = this.config) === null || _a === void 0 ? void 0 : _a.yAxis) && !this.axisHidden ? html `
1013
+ ${this.config?.yAxis && !this.axisHidden ? html `
1022
1014
  <div id="y-axis-container">
1023
1015
  <div part="cross-box"></div>
1024
1016
  <div part="y-axis"></div>
1025
1017
  </div>` : null}
1026
1018
  <div id="canvas-container">
1027
- ${((_b = this.config) === null || _b === void 0 ? void 0 : _b.xAxis) && !this.axisHidden ? html `<div part="x-axis"></div>` : null}
1019
+ ${this.config?.xAxis && !this.axisHidden ? html `<div part="x-axis"></div>` : null}
1028
1020
  <ef-canvas part="canvas" @resize=${this.onCanvasResize}></ef-canvas>
1029
1021
  ${this.tooltipCallback ? html `<div id="tooltip-overlay"></div>` : null}
1030
1022
  </div>
@@ -1,4 +1,4 @@
1
- import '@refinitiv-ui/elements/lib/canvas/themes/halo/dark';
2
- import '@refinitiv-ui/elements/lib/tooltip/themes/halo/dark';
1
+ import '@refinitiv-ui/elements/canvas/themes/halo/dark';
2
+ import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
3
3
 
4
4
  elf.customStyles.define('ef-heatmap', ':host{--spacing:2;--below-point-color:#F5475B;--mid-point-color:#1A1A1A;--above-point-color:#39C46E;background-color:#1a1a1a;--below-point-color:#F5475B;--mid-point-color:#FFFFFF;--above-point-color:#39C46E}:host .x-axis-item{padding:4px 0}:host .y-axis-item{padding:0 4px}:host .x-axis-item,:host .y-axis-item,:host [part=cross-box]{color:#ccc;background-color:#262626}:host [part=canvas]{color:#000}');
@@ -1,4 +1,4 @@
1
- import '@refinitiv-ui/elements/lib/canvas/themes/halo/light';
2
- import '@refinitiv-ui/elements/lib/tooltip/themes/halo/light';
1
+ import '@refinitiv-ui/elements/canvas/themes/halo/light';
2
+ import '@refinitiv-ui/elements/tooltip/themes/halo/light';
3
3
 
4
4
  elf.customStyles.define('ef-heatmap', ':host{--spacing:2;--below-point-color:#B63243;--mid-point-color:#FAFAFA;--above-point-color:#246B3E;background-color:#fafafa;--below-point-color:#D94255;--mid-point-color:#FFFFFF;--above-point-color:#309054}:host .x-axis-item{padding:4px 0}:host .y-axis-item{padding:0 4px}:host .x-axis-item,:host .y-axis-item,:host [part=cross-box]{color:#404040;background-color:#f2f2f2}:host [part=canvas]{color:#fff}');
@@ -1,4 +1,4 @@
1
- import '@refinitiv-ui/elements/lib/canvas/themes/solar/charcoal';
2
- import '@refinitiv-ui/elements/lib/tooltip/themes/solar/charcoal';
1
+ import '@refinitiv-ui/elements/canvas/themes/solar/charcoal';
2
+ import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
3
3
 
4
4
  elf.customStyles.define('ef-heatmap', ':host{--spacing:2;--below-point-color:#F5475B;--mid-point-color:#1A1A1C;--above-point-color:#39C46E;background-color:#1a1a1c}:host [part=canvas]{color:rgba(255,255,255,.8)}:host .x-axis-item{padding:4px 0}:host .y-axis-item{padding:0 4px}:host .x-axis-item,:host .y-axis-item,:host [part=cross-box]{background-color:#212124;color:#c2c2c2}');
@@ -1,4 +1,4 @@
1
- import '@refinitiv-ui/elements/lib/canvas/themes/solar/pearl';
2
- import '@refinitiv-ui/elements/lib/tooltip/themes/solar/pearl';
1
+ import '@refinitiv-ui/elements/canvas/themes/solar/pearl';
2
+ import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
3
3
 
4
4
  elf.customStyles.define('ef-heatmap', ':host{--spacing:2;--below-point-color:#D94255;--mid-point-color:#FFFFFF;--above-point-color:#309054;background-color:#fff}:host [part=canvas]{color:rgba(0,0,0,.8)}:host .x-axis-item{padding:4px 0}:host .y-axis-item{padding:0 4px}:host .x-axis-item,:host .y-axis-item,:host [part=cross-box]{background-color:#e4e8ed;color:#484848}');
@@ -74,6 +74,11 @@ export declare class Icon extends BasicElement {
74
74
  */
75
75
  protected render(): TemplateResult;
76
76
  }
77
+ declare global {
78
+ interface HTMLElementTagNameMap {
79
+ 'ef-icon': Icon;
80
+ }
81
+ }
77
82
 
78
83
  declare global {
79
84
  interface HTMLElementTagNameMap {
package/lib/icon/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { BasicElement, svg, css } from '@refinitiv-ui/core';
3
- import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
4
- import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
5
- import { unsafeSVG } from '@refinitiv-ui/core/lib/directives/unsafe-svg.js';
3
+ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
5
+ import { unsafeSVG } from '@refinitiv-ui/core/directives/unsafe-svg.js';
6
6
  import { VERSION } from '../version.js';
7
7
  import { IconLoader } from './utils/IconLoader.js';
8
8
  export { preload } from './utils/IconLoader.js';
@@ -1,4 +1,4 @@
1
- import { CdnLoader } from '@refinitiv-ui/utils/lib/loader.js';
1
+ import { CdnLoader } from '@refinitiv-ui/utils/loader.js';
2
2
  /**
3
3
  * Caches and provides icon SVGs, Loaded either by name from CDN or directly by URL.
4
4
  * Uses singleton pattern
@@ -1,4 +1,4 @@
1
- import { CdnLoader, Deferred } from '@refinitiv-ui/utils/lib/loader.js';
1
+ import { CdnLoader, Deferred } from '@refinitiv-ui/utils/loader.js';
2
2
  const isUrl = (str) => (/^(https?:\/{2}|\.?\/)/i).test(str);
3
3
  /**
4
4
  * Caches and provides icon SVGs, Loaded either by name from CDN or directly by URL.
@@ -1,5 +1,5 @@
1
1
  import type { LineData, BarData, HistogramData, DeepPartial, ChartOptions, SeriesPartialOptions, LineSeriesPartialOptions, AreaSeriesPartialOptions, BarSeriesPartialOptions, CandlestickSeriesPartialOptions, HistogramSeriesPartialOptions, LineStyleOptions, AreaStyleOptions, BarStyleOptions, CandlestickStyleOptions, HistogramStyleOptions, ISeriesApi, SeriesType } from 'lightweight-charts';
2
- import type { RGBColor, HSLColor } from '@refinitiv-ui/utils/lib/color.js';
2
+ import type { RGBColor, HSLColor } from '@refinitiv-ui/utils/color.js';
3
3
  declare type SeriesOptions = AreaSeriesPartialOptions | BarSeriesPartialOptions | CandlestickSeriesPartialOptions | HistogramSeriesPartialOptions | LineSeriesPartialOptions;
4
4
  declare type SeriesStyleOptions = LineStyleOptions & AreaStyleOptions & BarStyleOptions & CandlestickStyleOptions & HistogramStyleOptions;
5
5
  declare type SeriesData = LineData[] | BarData[] | HistogramData[];
@@ -251,18 +251,6 @@ export declare class InteractiveChart extends ResponsiveElement {
251
251
  * @returns {void}
252
252
  */
253
253
  protected renderTextLegend(chartType: string, rowLegendElem: RowLegend, value: SeriesDataItem | number | string, priceColor: string, index: number): void;
254
- /**
255
- * Check `node` inside row legend and case type to HTMLElement
256
- * @param rowLegend Legend element
257
- * @returns true if not have `node` inside row legend
258
- */
259
- private isHTMLElement;
260
- /**
261
- * Check `node` inside row legend and case type to NodeListOf<Element>
262
- * @param rowLegend Legend element
263
- * @returns true if have `node` inside row legend
264
- */
265
- private isNodeListElement;
266
254
  /**
267
255
  * Create span OHLC in row legend used by several series types such as bars or candlesticks
268
256
  * @param rowLegend Legend element
@@ -367,6 +355,11 @@ export declare class InteractiveChart extends ResponsiveElement {
367
355
  */
368
356
  protected render(): TemplateResult;
369
357
  }
358
+ declare global {
359
+ interface HTMLElementTagNameMap {
360
+ 'ef-interactive-chart': InteractiveChart;
361
+ }
362
+ }
370
363
 
371
364
  declare global {
372
365
  interface HTMLElementTagNameMap {
@@ -1,11 +1,11 @@
1
1
  var InteractiveChart_1;
2
2
  import { __decorate } from "tslib";
3
3
  import { ResponsiveElement, html, css, DeprecationNotice } from '@refinitiv-ui/core';
4
- import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
5
- import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
6
- import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
4
+ import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
5
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
6
+ import { query } from '@refinitiv-ui/core/decorators/query.js';
7
7
  import { VERSION } from '../version.js';
8
- import { color as parseColor } from '@refinitiv-ui/utils/lib/color.js';
8
+ import { color as parseColor } from '@refinitiv-ui/utils/color.js';
9
9
  import { createChart as chart } from 'lightweight-charts';
10
10
  import '../tooltip/index.js';
11
11
  import { LegendStyle } from './helpers/types.js';
@@ -592,8 +592,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
592
592
  * @return position
593
593
  */
594
594
  getPriceScalePosition() {
595
- var _a;
596
- const priceScale = (_a = this.chart) === null || _a === void 0 ? void 0 : _a.options();
595
+ const priceScale = this.chart?.options();
597
596
  if (priceScale.leftPriceScale.visible && priceScale.rightPriceScale.visible) {
598
597
  return 'two-price';
599
598
  }
@@ -661,14 +660,14 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
661
660
  let value;
662
661
  let priceColor = '';
663
662
  // When have price on event moved on the crosshair
664
- if ((eventMove === null || eventMove === void 0 ? void 0 : eventMove.seriesPrices.get(this.seriesList[idx])) && eventMove.time) {
663
+ if (eventMove?.seriesPrices.get(this.seriesList[idx]) && eventMove.time) {
665
664
  value = eventMove.seriesPrices.get(this.seriesList[idx]);
666
665
  priceColor = this.getColorInSeries(eventMove, chartType, idx);
667
666
  this.isCrosshairVisible = true;
668
667
  this.hasDataPoint = true;
669
668
  }
670
669
  // when there's no data point in the series object.
671
- else if (!(eventMove === null || eventMove === void 0 ? void 0 : eventMove.seriesPrices.get(this.seriesList[idx])) && (eventMove === null || eventMove === void 0 ? void 0 : eventMove.time)) {
670
+ else if (!eventMove?.seriesPrices.get(this.seriesList[idx]) && eventMove?.time) {
672
671
  value = NO_DATA_POINT;
673
672
  this.isCrosshairVisible = true;
674
673
  this.hasDataPoint = false;
@@ -698,8 +697,12 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
698
697
  * @returns {void}
699
698
  */
700
699
  renderTextLegend(chartType, rowLegendElem, value, priceColor, index) {
700
+ // No need to render if disable legend
701
+ if (this.disabledLegend) {
702
+ return;
703
+ }
701
704
  if (chartType === 'bar' || chartType === 'candlestick') {
702
- if (!this.hasDataPoint && this.isNodeListElement(rowLegendElem)) {
705
+ if (!this.hasDataPoint && rowLegendElem instanceof NodeList) {
703
706
  const spanElem = rowLegendElem[index].querySelectorAll('span.price,span.ohlc');
704
707
  spanElem.forEach(span => rowLegendElem[index].removeChild(span));
705
708
  const span = document.createElement('span');
@@ -715,22 +718,6 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
715
718
  this.createTextPrice(rowLegendElem, value, priceColor, index);
716
719
  }
717
720
  }
718
- /**
719
- * Check `node` inside row legend and case type to HTMLElement
720
- * @param rowLegend Legend element
721
- * @returns true if not have `node` inside row legend
722
- */
723
- isHTMLElement(rowLegend) {
724
- return rowLegend.length === undefined;
725
- }
726
- /**
727
- * Check `node` inside row legend and case type to NodeListOf<Element>
728
- * @param rowLegend Legend element
729
- * @returns true if have `node` inside row legend
730
- */
731
- isNodeListElement(rowLegend) {
732
- return rowLegend !== undefined;
733
- }
734
721
  /**
735
722
  * Create span OHLC in row legend used by several series types such as bars or candlesticks
736
723
  * @param rowLegend Legend element
@@ -739,7 +726,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
739
726
  * @returns {void}
740
727
  */
741
728
  createSpanOHLC(rowLegend, rowData, priceColor) {
742
- if (this.isHTMLElement(rowLegend)) {
729
+ if (rowLegend instanceof HTMLElement) {
743
730
  rowLegend.setAttribute('data-color', priceColor);
744
731
  this.createSpan(rowLegend, 'O', rowData.open, 'H', rowData.high, 'L', rowData.low, 'C', rowData.close);
745
732
  }
@@ -764,11 +751,11 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
764
751
  };
765
752
  }
766
753
  // Create text price after chart has rendered
767
- if (this.isHTMLElement(rowLegend)) {
754
+ if (rowLegend instanceof HTMLElement) {
768
755
  this.createSpanOHLC(rowLegend, rowData, priceColor);
769
756
  }
770
757
  // Handle update text price when mouse crosshairMove in chart
771
- else if (this.isNodeListElement(rowLegend)) {
758
+ else if (rowLegend instanceof NodeList) {
772
759
  const rowSpanLength = rowLegend[index].children.length;
773
760
  let countElmPrice = 0;
774
761
  for (let spanIndex = 0; spanIndex < rowSpanLength; spanIndex++) {
@@ -811,19 +798,18 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
811
798
  * @returns {void}
812
799
  */
813
800
  createTextPrice(rowLegend, price, priceColor, index) {
814
- var _a;
815
801
  const formatter = this.internalConfig.series[index].legendPriceFormatter;
816
802
  // Formats legend only when formatter and data point are provided
817
803
  const formattedPrice = !!formatter && price !== NO_DATA_POINT ? formatter(price) : price;
818
804
  // Create text price after chart has rendered
819
- if (this.isHTMLElement(rowLegend)) {
805
+ if (rowLegend instanceof HTMLElement) {
820
806
  rowLegend.setAttribute('data-color', priceColor);
821
807
  this.createSpan(rowLegend, formattedPrice);
822
808
  }
823
809
  // Handle update text price when mouse crosshairMove in chart
824
- else if (this.isNodeListElement(rowLegend)) {
810
+ else if (rowLegend instanceof NodeList) {
825
811
  const symbolElem = rowLegend[index].children[0];
826
- const spanIndex = ((_a = symbolElem.getAttribute('class')) === null || _a === void 0 ? void 0 : _a.indexOf('symbol')) === 0 ? 1 : 0;
812
+ const spanIndex = symbolElem.getAttribute('class')?.indexOf('symbol') === 0 ? 1 : 0;
827
813
  const rowLegendElem = rowLegend[index];
828
814
  rowLegendElem.children[spanIndex].textContent = `${formattedPrice}`;
829
815
  rowLegendElem.children[spanIndex].style.color = `${priceColor}`;
@@ -889,12 +875,11 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
889
875
  * @returns color value
890
876
  */
891
877
  getColorInSeries(seriesData, chartType, index) {
892
- var _a;
893
878
  if (chartType === 'line') {
894
879
  return this.getLegendPriceColor(this.seriesList[index].options().color);
895
880
  }
896
881
  else if (chartType === 'candlestick') {
897
- const value = seriesData.hasOwnProperty('seriesPrices') ? (_a = seriesData) === null || _a === void 0 ? void 0 : _a.seriesPrices.get(this.seriesList[index]) : seriesData;
882
+ const value = seriesData.hasOwnProperty('seriesPrices') ? seriesData?.seriesPrices.get(this.seriesList[index]) : seriesData;
898
883
  const barStyle = this.seriesList[index].options();
899
884
  const colorBar = value.close > value.open ? barStyle.borderUpColor : barStyle.borderDownColor;
900
885
  return colorBar;
@@ -967,8 +952,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
967
952
  * @returns {void}
968
953
  */
969
954
  updateLegendWithLatestData() {
970
- var _a;
971
- if (this.rowLegend && !this.isCrosshairVisible && ((_a = this.config) === null || _a === void 0 ? void 0 : _a.hasOwnProperty('series'))) {
955
+ if (this.rowLegend && !this.isCrosshairVisible && this.config?.hasOwnProperty('series')) {
972
956
  for (let idx = 0; idx < this.internalConfig.series.length; idx++) {
973
957
  const chartType = this.internalConfig.series[idx].type;
974
958
  const series = this.internalConfig.series[idx];
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/tooltip/themes/halo/dark';
1
+ import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
2
2
 
3
3
  elf.customStyles.define('ef-interactive-chart', ':host{--chart-color-1:#6678FF;--chart-color-2:#FFFFFF;--chart-color-3:#FFC800;--chart-color-4:#9064CD;--chart-color-5:#00D0D4;--chart-color-6:#FF5000;--chart-color-7:#00C389;--chart-color-8:#EA2E6C;--chart-color-9:#999999;--chart-color-10:#3BBAFF;--line-width:2;--fill-opacity:0.4;--text-color:rgba(204, 204, 204, 0.8);--background-color:#1A1A1A;--chart-up-color:#39C46E;--chart-down-color:#F5475B;--cross-hair-color:#CCCCCC;--grid-vert-line-color:rgba(51, 51, 51, 0.5);--grid-horz-line-color:rgba(51, 51, 51, 0.5);--scale-price-border-color:rgba(51, 51, 51, 0.5);--scale-times-border-color:rgba(51, 51, 51, 0.5)}:host [part=legend]{position:absolute;left:15px;top:15px;z-index:1000;color:var(--text-color);font-size:90%}:host [part=legend] .row{margin:1px 5px}:host [part=legend] .price{margin-right:5px}:host [part=legend] .ohlc{margin-right:2px}:host [part=legend].yaxis-left{left:70px}:host [part=legend].yaxis-right{left:15px}:host [part=legend].horizontal{display:flex;max-width:calc(100% - 75px);flex-wrap:wrap}:host [part=jump-button-container]{display:none;position:absolute;transition:background-color .1s;width:23px;height:23px;color:#ccc;border:1px solid #0d0d0d;box-shadow:0 0 0 0 rgba(0,0,0,.5);border-radius:100%;z-index:1000;cursor:pointer;background-color:#1a1a1a}:host [part=jump-button-container]:hover{color:#fff;border-color:#334bff;box-shadow:0 0 0 0 rgba(0,0,0,.8);background-color:#343434}:host [part=jump-button-container]:active{color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.5);background-color:#1a1a1a}:host [part=jump-button]{position:relative;display:inline-block;width:5px;height:5px;border-top:2px solid #ccc;border-right:2px solid #ccc;transform:rotate(45deg) skew(0);margin-top:8px;margin-left:7px}:host [part=branding-container]{position:absolute;opacity:.6;bottom:3px;z-index:1000}:host [part=branding-container].left{left:10px}:host [part=branding-container].right{right:10px}:host [part=branding-container].none{top:13px;right:13px}:host [part=branding]{height:22px;width:22px;fill:rgba(204,204,204,.8)}:host [part=jump-button-container],:host [part=jump-button-container]:hover,:host [part=jump-button]{border-color:grey}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/tooltip/themes/halo/light';
1
+ import '@refinitiv-ui/elements/tooltip/themes/halo/light';
2
2
 
3
3
  elf.customStyles.define('ef-interactive-chart', ':host{--chart-color-1:#334BFF;--chart-color-2:#000000;--chart-color-3:#7F6400;--chart-color-4:#71549F;--chart-color-5:#007678;--chart-color-6:#CC4000;--chart-color-7:#007653;--chart-color-8:#D22962;--chart-color-9:#595959;--chart-color-10:#236F99;--line-width:2;--fill-opacity:0.4;--text-color:rgba(13, 13, 13, 0.8);--background-color:#FAFAFA;--chart-up-color:#246B3E;--chart-down-color:#B63243;--cross-hair-color:#404040;--grid-vert-line-color:rgba(224, 224, 224, 0.5);--grid-horz-line-color:rgba(224, 224, 224, 0.5);--scale-price-border-color:rgba(224, 224, 224, 0.5);--scale-times-border-color:rgba(224, 224, 224, 0.5)}:host [part=legend]{position:absolute;left:15px;top:15px;z-index:1000;color:var(--text-color);font-size:90%}:host [part=legend] .row{margin:1px 5px}:host [part=legend] .price{margin-right:5px}:host [part=legend] .ohlc{margin-right:2px}:host [part=legend].yaxis-left{left:70px}:host [part=legend].yaxis-right{left:15px}:host [part=legend].horizontal{display:flex;max-width:calc(100% - 75px);flex-wrap:wrap}:host [part=jump-button-container]{display:none;position:absolute;transition:background-color .1s;width:23px;height:23px;color:#0d0d0d;border:1px solid #ccc;box-shadow:0 0 0 0 rgba(0,0,0,.25);border-radius:100%;z-index:1000;cursor:pointer;background-color:#fafafa}:host [part=jump-button-container]:hover{color:#fff;border-color:#334bff;box-shadow:0 0 0 0 rgba(0,0,0,.55);background-color:#fff}:host [part=jump-button-container]:active{color:#fff;box-shadow:0 0 0 0 rgba(0,0,0,.25);background-color:#fafafa}:host [part=jump-button]{position:relative;display:inline-block;width:5px;height:5px;border-top:2px solid #0d0d0d;border-right:2px solid #0d0d0d;transform:rotate(45deg) skew(0);margin-top:8px;margin-left:7px}:host [part=branding-container]{position:absolute;opacity:.6;bottom:3px;z-index:1000}:host [part=branding-container].left{left:10px}:host [part=branding-container].right{right:10px}:host [part=branding-container].none{top:13px;right:13px}:host [part=branding]{height:22px;width:22px;fill:rgba(13,13,13,.8)}:host [part=jump-button-container],:host [part=jump-button-container]:hover,:host [part=jump-button]{border-color:#8d8d8d}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/tooltip/themes/solar/charcoal';
1
+ import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
2
2
 
3
3
  elf.customStyles.define('ef-interactive-chart', ':host{--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--line-width:2;--fill-opacity:0.4;--text-color:rgba(194, 194, 194, 0.8);--background-color:#1A1A1C;--chart-up-color:#39C46E;--chart-down-color:#F5475B;--cross-hair-color:#E2E2E2;--grid-vert-line-color:rgba(10, 10, 10, 0.5);--grid-horz-line-color:rgba(10, 10, 10, 0.5);--scale-price-border-color:rgba(10, 10, 10, 0.5);--scale-times-border-color:rgba(10, 10, 10, 0.5);--chart-color-1:#FF9933;--chart-color-2:#B10CF2;--chart-color-3:#7DE442;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#FFE433;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#48CBF7;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#EFF748;--chart-color-15:#FF4043;--chart-color-16:#A7DB0B;--chart-color-17:#C2C2C2;--chart-color-18:#1578AD;--chart-color-19:#F2B530;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#60E65C;--chart-color-25:#2960A3;--grid-vert-line-color:rgba(194, 194, 194, 0.1);--grid-horz-line-color:rgba(194, 194, 194, 0.1);--scale-price-border-color:rgba(194, 194, 194, 0.1);--scale-times-border-color:rgba(194, 194, 194, 0.1)}:host [part=legend]{position:absolute;left:15px;top:15px;z-index:1000;color:var(--text-color);font-size:90%}:host [part=legend] .row{margin:1px 5px}:host [part=legend] .price{margin-right:5px}:host [part=legend] .ohlc{margin-right:2px}:host [part=legend].yaxis-left{left:70px}:host [part=legend].yaxis-right{left:15px}:host [part=legend].horizontal{display:flex;max-width:calc(100% - 75px);flex-wrap:wrap}:host [part=jump-button-container]{display:none;position:absolute;transition:background-color .1s;width:23px;height:23px;color:#c2c2c2;background-color:#3c3c42;border:1px solid #000;box-shadow:0 0 0 0 rgba(0,0,0,.6);border-radius:100%;z-index:1000;cursor:pointer;background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host [part=jump-button-container]:hover{color:#e2e2e2;background-color:#4d4d55;border-color:#000;box-shadow:0 0 0 0 rgba(0,0,0,.9)}:host [part=jump-button-container]:active{background-color:#38383d;color:#c2c2c2;box-shadow:0 0 0 0 rgba(0,0,0,.6);background-image:linear-gradient(rgba(255,255,255,.1) 10%,rgba(255,255,255,0) 100%)}:host [part=jump-button]{position:relative;display:inline-block;width:5px;height:5px;border-top:2px solid #c2c2c2;border-right:2px solid #c2c2c2;transform:rotate(45deg) skew(0);margin-top:8px;margin-left:7px}:host [part=branding-container]{position:absolute;opacity:.6;bottom:3px;z-index:1000}:host [part=branding-container].left{left:10px}:host [part=branding-container].right{right:10px}:host [part=branding-container].none{top:13px;right:13px}:host [part=branding]{height:22px;width:22px;fill:rgba(194,194,194,.8)}:host [part=jump-button-container]:hover [part=jump-button]{border-color:#e2e2e2}');
@@ -1,3 +1,3 @@
1
- import '@refinitiv-ui/elements/lib/tooltip/themes/solar/pearl';
1
+ import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
2
2
 
3
3
  elf.customStyles.define('ef-interactive-chart', ':host{--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--line-width:2;--fill-opacity:0.4;--text-color:rgba(72, 72, 72, 0.8);--background-color:#FFFFFF;--chart-up-color:#309054;--chart-down-color:#D94255;--cross-hair-color:#ACAFB5;--grid-vert-line-color:rgba(213, 216, 219, 0.5);--grid-horz-line-color:rgba(213, 216, 219, 0.5);--scale-price-border-color:rgba(213, 216, 219, 0.5);--scale-times-border-color:rgba(213, 216, 219, 0.5);--chart-color-1:#EE7600;--chart-color-2:#B10CF2;--chart-color-3:#309054;--chart-color-4:#3780BF;--chart-color-5:#FA4C11;--chart-color-6:#D9B500;--chart-color-7:#8C8C8C;--chart-color-8:#5A54FF;--chart-color-9:#E53766;--chart-color-10:#648608;--chart-color-11:#40B6DE;--chart-color-12:#F3478E;--chart-color-13:#508BF7;--chart-color-14:#AAB218;--chart-color-15:#FF4043;--chart-color-16:#80A808;--chart-color-17:#707070;--chart-color-18:#1578AC;--chart-color-19:#D9A22B;--chart-color-20:#297835;--chart-color-21:#7045FF;--chart-color-22:#DD48F7;--chart-color-23:#09A8C0;--chart-color-24:#4BB347;--chart-color-25:#2960A3;--grid-vert-line-color:rgba(72, 72, 72, 0.1);--grid-horz-line-color:rgba(72, 72, 72, 0.1);--scale-price-border-color:rgba(72, 72, 72, 0.1);--scale-times-border-color:rgba(72, 72, 72, 0.1)}:host [part=legend]{position:absolute;left:15px;top:15px;z-index:1000;color:var(--text-color);font-size:90%}:host [part=legend] .row{margin:1px 5px}:host [part=legend] .price{margin-right:5px}:host [part=legend] .ohlc{margin-right:2px}:host [part=legend].yaxis-left{left:70px}:host [part=legend].yaxis-right{left:15px}:host [part=legend].horizontal{display:flex;max-width:calc(100% - 75px);flex-wrap:wrap}:host [part=jump-button-container]{display:none;position:absolute;transition:background-color .1s;width:23px;height:23px;color:#505050;background-color:#fafbfc;border:1px solid #a9afba;box-shadow:0 0 0 0 rgba(0,0,0,.3);border-radius:100%;z-index:1000;cursor:pointer;background-image:linear-gradient(rgba(0,0,0,0) 0,rgba(0,0,0,.1) 100%)}:host [part=jump-button-container]:hover{color:#1d1d1d;background-color:#fff;border-color:#a9afba;box-shadow:0 0 0 0 rgba(0,0,0,.6)}:host [part=jump-button-container]:active{background-color:#fff;color:#1d1d1d;box-shadow:0 0 0 0 rgba(0,0,0,.3);background-image:none}:host [part=jump-button]{position:relative;display:inline-block;width:5px;height:5px;border-top:2px solid #505050;border-right:2px solid #505050;transform:rotate(45deg) skew(0);margin-top:8px;margin-left:7px}:host [part=branding-container]{position:absolute;opacity:.6;bottom:3px;z-index:1000}:host [part=branding-container].left{left:10px}:host [part=branding-container].right{right:10px}:host [part=branding-container].none{top:13px;right:13px}:host [part=branding]{height:22px;width:22px;fill:rgba(72,72,72,.8)}:host [part=jump-button-container]:hover [part=jump-button]{border-color:#1d1d1d}');
@@ -1,4 +1,4 @@
1
- import type { DataItem } from '@refinitiv-ui/utils/lib/collection.js';
1
+ import type { DataItem } from '@refinitiv-ui/utils/collection.js';
2
2
  export declare type ItemType = 'text' | 'header' | 'divider';
3
3
  interface CommonItem extends DataItem {
4
4
  /**
@@ -44,19 +44,10 @@ export declare class Item extends ControlElement {
44
44
  * Set the icon name from the ef-icon list
45
45
  */
46
46
  icon: string | null;
47
- private _selected;
48
47
  /**
49
48
  * Indicates that the item is selected
50
- * @param value selected value
51
- * @default false
52
49
  */
53
- set selected(value: boolean);
54
- get selected(): boolean;
55
- /**
56
- * Aria indicating current select state
57
- * @ignore
58
- */
59
- ariaSelected: string;
50
+ selected: boolean;
60
51
  /**
61
52
  * Is the item part of a multiple selection
62
53
  */
@@ -93,10 +84,26 @@ export declare class Item extends ControlElement {
93
84
  */
94
85
  private checkSlotChildren;
95
86
  /**
96
- * @override
87
+ * Handles aria-selected or aria-checked when toggle between single and multiple selection mode
88
+ * @returns {void}
89
+ **/
90
+ private multipleChanged;
91
+ /**
92
+ * Handles aria when selected state changes
93
+ * @returns {void}
94
+ */
95
+ private selectedChanged;
96
+ /**
97
+ * Control State behaviour will update tabindex based on the property
98
+ * @returns {void}
99
+ */
100
+ private typeChanged;
101
+ /**
102
+ * Invoked before update() to compute values needed during the update.
103
+ * @param changedProperties changed properties
97
104
  * @returns {void}
98
105
  */
99
- protected update(changedProperties: PropertyValues): void;
106
+ protected willUpdate(changedProperties: PropertyValues): void;
100
107
  /**
101
108
  * Get icon template if icon attribute is defined
102
109
  */
@@ -131,11 +138,6 @@ export declare class Item extends ControlElement {
131
138
  * @returns whether element is truncated or not
132
139
  */
133
140
  get isTruncated(): boolean;
134
- /**
135
- * Control State behaviour will update tabindex based on the property
136
- * @returns {void}
137
- */
138
- private typeChanged;
139
141
  /**
140
142
  * A `TemplateResult` that will be used
141
143
  * to render the updated internal template.
@@ -143,6 +145,11 @@ export declare class Item extends ControlElement {
143
145
  */
144
146
  protected render(): TemplateResult;
145
147
  }
148
+ declare global {
149
+ interface HTMLElementTagNameMap {
150
+ 'ef-item': Item;
151
+ }
152
+ }
146
153
 
147
154
  declare global {
148
155
  interface HTMLElementTagNameMap {