@refinitiv-ui/elements 5.10.1 → 5.12.0-alpha.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 (507) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +4 -4
  3. package/lib/list/custom-elements.json +13 -0
  4. package/lib/list/custom-elements.md +10 -9
  5. package/package.json +25 -293
  6. package/lib/accordion/index.d.ts +0 -76
  7. package/lib/accordion/index.js +0 -136
  8. package/lib/accordion/themes/halo/dark/index.js +0 -3
  9. package/lib/accordion/themes/halo/light/index.js +0 -3
  10. package/lib/accordion/themes/solar/charcoal/index.js +0 -3
  11. package/lib/accordion/themes/solar/pearl/index.js +0 -3
  12. package/lib/appstate-bar/index.d.ts +0 -65
  13. package/lib/appstate-bar/index.js +0 -100
  14. package/lib/appstate-bar/themes/halo/dark/index.js +0 -3
  15. package/lib/appstate-bar/themes/halo/light/index.js +0 -3
  16. package/lib/appstate-bar/themes/solar/charcoal/index.js +0 -3
  17. package/lib/appstate-bar/themes/solar/pearl/index.js +0 -3
  18. package/lib/autosuggest/helpers/types.d.ts +0 -54
  19. package/lib/autosuggest/helpers/types.js +0 -1
  20. package/lib/autosuggest/helpers/utils.d.ts +0 -39
  21. package/lib/autosuggest/helpers/utils.js +0 -75
  22. package/lib/autosuggest/index.d.ts +0 -538
  23. package/lib/autosuggest/index.js +0 -1255
  24. package/lib/autosuggest/themes/halo/dark/index.js +0 -5
  25. package/lib/autosuggest/themes/halo/light/index.js +0 -5
  26. package/lib/autosuggest/themes/solar/charcoal/index.js +0 -5
  27. package/lib/autosuggest/themes/solar/pearl/index.js +0 -5
  28. package/lib/button/index.d.ts +0 -132
  29. package/lib/button/index.js +0 -223
  30. package/lib/button/themes/halo/dark/index.js +0 -3
  31. package/lib/button/themes/halo/light/index.js +0 -3
  32. package/lib/button/themes/solar/charcoal/index.js +0 -3
  33. package/lib/button/themes/solar/pearl/index.js +0 -3
  34. package/lib/button-bar/index.d.ts +0 -76
  35. package/lib/button-bar/index.js +0 -155
  36. package/lib/button-bar/themes/halo/dark/index.js +0 -3
  37. package/lib/button-bar/themes/halo/light/index.js +0 -3
  38. package/lib/button-bar/themes/solar/charcoal/index.js +0 -3
  39. package/lib/button-bar/themes/solar/pearl/index.js +0 -3
  40. package/lib/calendar/constants.d.ts +0 -26
  41. package/lib/calendar/constants.js +0 -28
  42. package/lib/calendar/index.d.ts +0 -412
  43. package/lib/calendar/index.js +0 -1274
  44. package/lib/calendar/locales.d.ts +0 -1
  45. package/lib/calendar/locales.js +0 -41
  46. package/lib/calendar/themes/halo/dark/index.js +0 -3
  47. package/lib/calendar/themes/halo/light/index.js +0 -3
  48. package/lib/calendar/themes/solar/charcoal/index.js +0 -3
  49. package/lib/calendar/themes/solar/pearl/index.js +0 -3
  50. package/lib/calendar/types.d.ts +0 -32
  51. package/lib/calendar/types.js +0 -1
  52. package/lib/calendar/utils.d.ts +0 -42
  53. package/lib/calendar/utils.js +0 -120
  54. package/lib/canvas/index.d.ts +0 -101
  55. package/lib/canvas/index.js +0 -173
  56. package/lib/canvas/themes/halo/dark/index.js +0 -2
  57. package/lib/canvas/themes/halo/light/index.js +0 -2
  58. package/lib/canvas/themes/solar/charcoal/index.js +0 -2
  59. package/lib/canvas/themes/solar/pearl/index.js +0 -2
  60. package/lib/card/helpers/types.d.ts +0 -12
  61. package/lib/card/helpers/types.js +0 -1
  62. package/lib/card/index.d.ts +0 -142
  63. package/lib/card/index.js +0 -248
  64. package/lib/card/themes/halo/dark/index.js +0 -5
  65. package/lib/card/themes/halo/light/index.js +0 -5
  66. package/lib/card/themes/solar/charcoal/index.js +0 -5
  67. package/lib/card/themes/solar/pearl/index.js +0 -5
  68. package/lib/chart/helpers/index.d.ts +0 -2
  69. package/lib/chart/helpers/index.js +0 -2
  70. package/lib/chart/helpers/legend.d.ts +0 -5
  71. package/lib/chart/helpers/legend.js +0 -78
  72. package/lib/chart/helpers/merge.d.ts +0 -15
  73. package/lib/chart/helpers/merge.js +0 -28
  74. package/lib/chart/helpers/types.d.ts +0 -69
  75. package/lib/chart/helpers/types.js +0 -1
  76. package/lib/chart/index.d.ts +0 -187
  77. package/lib/chart/index.js +0 -491
  78. package/lib/chart/plugins/doughnut-center-label.d.ts +0 -3
  79. package/lib/chart/plugins/doughnut-center-label.js +0 -196
  80. package/lib/chart/themes/halo/dark/index.js +0 -4
  81. package/lib/chart/themes/halo/light/index.js +0 -4
  82. package/lib/chart/themes/solar/charcoal/index.js +0 -4
  83. package/lib/chart/themes/solar/pearl/index.js +0 -4
  84. package/lib/checkbox/index.d.ts +0 -97
  85. package/lib/checkbox/index.js +0 -194
  86. package/lib/checkbox/themes/halo/dark/index.js +0 -4
  87. package/lib/checkbox/themes/halo/light/index.js +0 -4
  88. package/lib/checkbox/themes/solar/charcoal/index.js +0 -4
  89. package/lib/checkbox/themes/solar/pearl/index.js +0 -4
  90. package/lib/clock/index.d.ts +0 -321
  91. package/lib/clock/index.js +0 -583
  92. package/lib/clock/themes/halo/dark/index.js +0 -2
  93. package/lib/clock/themes/halo/light/index.js +0 -2
  94. package/lib/clock/themes/solar/charcoal/index.js +0 -2
  95. package/lib/clock/themes/solar/pearl/index.js +0 -2
  96. package/lib/clock/utils/TickManager.d.ts +0 -14
  97. package/lib/clock/utils/TickManager.js +0 -66
  98. package/lib/clock/utils/timestamps.d.ts +0 -6
  99. package/lib/clock/utils/timestamps.js +0 -6
  100. package/lib/collapse/index.d.ts +0 -119
  101. package/lib/collapse/index.js +0 -197
  102. package/lib/collapse/themes/halo/dark/index.js +0 -5
  103. package/lib/collapse/themes/halo/light/index.js +0 -5
  104. package/lib/collapse/themes/solar/charcoal/index.js +0 -5
  105. package/lib/collapse/themes/solar/pearl/index.js +0 -5
  106. package/lib/color-dialog/elements/color-palettes.d.ts +0 -52
  107. package/lib/color-dialog/elements/color-palettes.js +0 -101
  108. package/lib/color-dialog/elements/grayscale-palettes.d.ts +0 -67
  109. package/lib/color-dialog/elements/grayscale-palettes.js +0 -161
  110. package/lib/color-dialog/elements/palettes.d.ts +0 -65
  111. package/lib/color-dialog/elements/palettes.js +0 -132
  112. package/lib/color-dialog/helpers/color-helpers.d.ts +0 -16
  113. package/lib/color-dialog/helpers/color-helpers.js +0 -161
  114. package/lib/color-dialog/helpers/value-model.d.ts +0 -75
  115. package/lib/color-dialog/helpers/value-model.js +0 -141
  116. package/lib/color-dialog/index.d.ts +0 -232
  117. package/lib/color-dialog/index.js +0 -459
  118. package/lib/color-dialog/themes/halo/dark/index.js +0 -7
  119. package/lib/color-dialog/themes/halo/light/index.js +0 -7
  120. package/lib/color-dialog/themes/solar/charcoal/index.js +0 -7
  121. package/lib/color-dialog/themes/solar/pearl/index.js +0 -7
  122. package/lib/combo-box/helpers/filter.d.ts +0 -10
  123. package/lib/combo-box/helpers/filter.js +0 -29
  124. package/lib/combo-box/helpers/keyboard-event.d.ts +0 -17
  125. package/lib/combo-box/helpers/keyboard-event.js +0 -19
  126. package/lib/combo-box/helpers/renderer.d.ts +0 -8
  127. package/lib/combo-box/helpers/renderer.js +0 -24
  128. package/lib/combo-box/helpers/types.d.ts +0 -11
  129. package/lib/combo-box/helpers/types.js +0 -1
  130. package/lib/combo-box/index.d.ts +0 -551
  131. package/lib/combo-box/index.js +0 -1183
  132. package/lib/combo-box/themes/halo/dark/index.js +0 -7
  133. package/lib/combo-box/themes/halo/light/index.js +0 -7
  134. package/lib/combo-box/themes/solar/charcoal/index.js +0 -7
  135. package/lib/combo-box/themes/solar/pearl/index.js +0 -7
  136. package/lib/counter/index.d.ts +0 -91
  137. package/lib/counter/index.js +0 -154
  138. package/lib/counter/themes/halo/dark/index.js +0 -3
  139. package/lib/counter/themes/halo/light/index.js +0 -3
  140. package/lib/counter/themes/solar/charcoal/index.js +0 -3
  141. package/lib/counter/themes/solar/pearl/index.js +0 -3
  142. package/lib/counter/utils.d.ts +0 -13
  143. package/lib/counter/utils.js +0 -52
  144. package/lib/datetime-picker/index.d.ts +0 -509
  145. package/lib/datetime-picker/index.js +0 -1175
  146. package/lib/datetime-picker/locales.d.ts +0 -8
  147. package/lib/datetime-picker/locales.js +0 -57
  148. package/lib/datetime-picker/themes/halo/dark/index.js +0 -7
  149. package/lib/datetime-picker/themes/halo/light/index.js +0 -7
  150. package/lib/datetime-picker/themes/solar/charcoal/index.js +0 -7
  151. package/lib/datetime-picker/themes/solar/pearl/index.js +0 -7
  152. package/lib/datetime-picker/types.d.ts +0 -3
  153. package/lib/datetime-picker/types.js +0 -1
  154. package/lib/datetime-picker/utils.d.ts +0 -55
  155. package/lib/datetime-picker/utils.js +0 -92
  156. package/lib/dialog/draggable-element.d.ts +0 -14
  157. package/lib/dialog/draggable-element.js +0 -221
  158. package/lib/dialog/index.d.ts +0 -196
  159. package/lib/dialog/index.js +0 -328
  160. package/lib/dialog/themes/halo/dark/index.js +0 -7
  161. package/lib/dialog/themes/halo/light/index.js +0 -7
  162. package/lib/dialog/themes/solar/charcoal/index.js +0 -7
  163. package/lib/dialog/themes/solar/pearl/index.js +0 -7
  164. package/lib/email-field/index.d.ts +0 -80
  165. package/lib/email-field/index.js +0 -86
  166. package/lib/email-field/themes/halo/dark/index.js +0 -3
  167. package/lib/email-field/themes/halo/light/index.js +0 -3
  168. package/lib/email-field/themes/solar/charcoal/index.js +0 -3
  169. package/lib/email-field/themes/solar/pearl/index.js +0 -3
  170. package/lib/events.d.ts +0 -121
  171. package/lib/events.js +0 -1
  172. package/lib/flag/index.d.ts +0 -96
  173. package/lib/flag/index.js +0 -168
  174. package/lib/flag/themes/halo/dark/index.js +0 -2
  175. package/lib/flag/themes/halo/light/index.js +0 -2
  176. package/lib/flag/themes/solar/charcoal/index.js +0 -2
  177. package/lib/flag/themes/solar/pearl/index.js +0 -2
  178. package/lib/flag/utils/FlagLoader.d.ts +0 -47
  179. package/lib/flag/utils/FlagLoader.js +0 -86
  180. package/lib/header/index.d.ts +0 -46
  181. package/lib/header/index.js +0 -73
  182. package/lib/header/themes/halo/dark/index.js +0 -2
  183. package/lib/header/themes/halo/light/index.js +0 -2
  184. package/lib/header/themes/solar/charcoal/index.js +0 -2
  185. package/lib/header/themes/solar/pearl/index.js +0 -2
  186. package/lib/heatmap/helpers/color.d.ts +0 -30
  187. package/lib/heatmap/helpers/color.js +0 -68
  188. package/lib/heatmap/helpers/text.d.ts +0 -26
  189. package/lib/heatmap/helpers/text.js +0 -91
  190. package/lib/heatmap/helpers/track.d.ts +0 -102
  191. package/lib/heatmap/helpers/track.js +0 -160
  192. package/lib/heatmap/helpers/types.d.ts +0 -40
  193. package/lib/heatmap/helpers/types.js +0 -1
  194. package/lib/heatmap/index.d.ts +0 -453
  195. package/lib/heatmap/index.js +0 -1103
  196. package/lib/heatmap/themes/halo/dark/index.js +0 -4
  197. package/lib/heatmap/themes/halo/light/index.js +0 -4
  198. package/lib/heatmap/themes/solar/charcoal/index.js +0 -4
  199. package/lib/heatmap/themes/solar/pearl/index.js +0 -4
  200. package/lib/icon/index.d.ts +0 -90
  201. package/lib/icon/index.js +0 -171
  202. package/lib/icon/themes/halo/dark/index.js +0 -2
  203. package/lib/icon/themes/halo/light/index.js +0 -2
  204. package/lib/icon/themes/solar/charcoal/index.js +0 -2
  205. package/lib/icon/themes/solar/pearl/index.js +0 -2
  206. package/lib/icon/utils/IconLoader.d.ts +0 -52
  207. package/lib/icon/utils/IconLoader.js +0 -93
  208. package/lib/index.d.ts +0 -3
  209. package/lib/index.js +0 -3
  210. package/lib/interactive-chart/helpers/merge.d.ts +0 -15
  211. package/lib/interactive-chart/helpers/merge.js +0 -28
  212. package/lib/interactive-chart/helpers/types.d.ts +0 -45
  213. package/lib/interactive-chart/helpers/types.js +0 -6
  214. package/lib/interactive-chart/index.d.ts +0 -383
  215. package/lib/interactive-chart/index.js +0 -1093
  216. package/lib/interactive-chart/themes/halo/dark/index.js +0 -3
  217. package/lib/interactive-chart/themes/halo/light/index.js +0 -3
  218. package/lib/interactive-chart/themes/solar/charcoal/index.js +0 -3
  219. package/lib/interactive-chart/themes/solar/pearl/index.js +0 -3
  220. package/lib/item/helpers/types.d.ts +0 -57
  221. package/lib/item/helpers/types.js +0 -1
  222. package/lib/item/index.d.ts +0 -159
  223. package/lib/item/index.js +0 -272
  224. package/lib/item/themes/halo/dark/index.js +0 -4
  225. package/lib/item/themes/halo/light/index.js +0 -4
  226. package/lib/item/themes/solar/charcoal/index.js +0 -4
  227. package/lib/item/themes/solar/pearl/index.js +0 -4
  228. package/lib/label/index.d.ts +0 -102
  229. package/lib/label/index.js +0 -245
  230. package/lib/label/themes/halo/dark/index.js +0 -3
  231. package/lib/label/themes/halo/light/index.js +0 -3
  232. package/lib/label/themes/solar/charcoal/index.js +0 -3
  233. package/lib/label/themes/solar/pearl/index.js +0 -3
  234. package/lib/layout/index.d.ts +0 -107
  235. package/lib/layout/index.js +0 -212
  236. package/lib/layout/themes/halo/dark/index.js +0 -2
  237. package/lib/layout/themes/halo/light/index.js +0 -2
  238. package/lib/layout/themes/solar/charcoal/index.js +0 -2
  239. package/lib/layout/themes/solar/pearl/index.js +0 -2
  240. package/lib/led-gauge/index.d.ts +0 -144
  241. package/lib/led-gauge/index.js +0 -438
  242. package/lib/led-gauge/themes/halo/dark/index.js +0 -3
  243. package/lib/led-gauge/themes/halo/light/index.js +0 -3
  244. package/lib/led-gauge/themes/solar/charcoal/index.js +0 -3
  245. package/lib/led-gauge/themes/solar/pearl/index.js +0 -3
  246. package/lib/list/extensible-function.d.ts +0 -8
  247. package/lib/list/extensible-function.js +0 -13
  248. package/lib/list/helpers/list-renderer.d.ts +0 -9
  249. package/lib/list/helpers/list-renderer.js +0 -37
  250. package/lib/list/helpers/types.d.ts +0 -3
  251. package/lib/list/helpers/types.js +0 -1
  252. package/lib/list/index.d.ts +0 -309
  253. package/lib/list/index.js +0 -633
  254. package/lib/list/renderer.d.ts +0 -36
  255. package/lib/list/renderer.js +0 -9
  256. package/lib/list/themes/halo/dark/index.js +0 -3
  257. package/lib/list/themes/halo/light/index.js +0 -3
  258. package/lib/list/themes/solar/charcoal/index.js +0 -3
  259. package/lib/list/themes/solar/pearl/index.js +0 -3
  260. package/lib/loader/index.d.ts +0 -41
  261. package/lib/loader/index.js +0 -61
  262. package/lib/loader/themes/halo/dark/index.js +0 -2
  263. package/lib/loader/themes/halo/light/index.js +0 -2
  264. package/lib/loader/themes/solar/charcoal/index.js +0 -2
  265. package/lib/loader/themes/solar/pearl/index.js +0 -2
  266. package/lib/multi-input/helpers/types.d.ts +0 -11
  267. package/lib/multi-input/helpers/types.js +0 -1
  268. package/lib/multi-input/index.d.ts +0 -301
  269. package/lib/multi-input/index.js +0 -594
  270. package/lib/multi-input/themes/halo/dark/index.js +0 -4
  271. package/lib/multi-input/themes/halo/light/index.js +0 -4
  272. package/lib/multi-input/themes/solar/charcoal/index.js +0 -4
  273. package/lib/multi-input/themes/solar/pearl/index.js +0 -4
  274. package/lib/notification/elements/notification-tray.d.ts +0 -97
  275. package/lib/notification/elements/notification-tray.js +0 -167
  276. package/lib/notification/elements/notification.d.ts +0 -90
  277. package/lib/notification/elements/notification.js +0 -154
  278. package/lib/notification/helpers/status.d.ts +0 -30
  279. package/lib/notification/helpers/status.js +0 -130
  280. package/lib/notification/helpers/types.d.ts +0 -10
  281. package/lib/notification/helpers/types.js +0 -1
  282. package/lib/notification/index.d.ts +0 -2
  283. package/lib/notification/index.js +0 -2
  284. package/lib/notification/themes/halo/dark/index.js +0 -5
  285. package/lib/notification/themes/halo/light/index.js +0 -5
  286. package/lib/notification/themes/solar/charcoal/index.js +0 -5
  287. package/lib/notification/themes/solar/pearl/index.js +0 -5
  288. package/lib/number-field/index.d.ts +0 -339
  289. package/lib/number-field/index.js +0 -740
  290. package/lib/number-field/themes/halo/dark/index.js +0 -3
  291. package/lib/number-field/themes/halo/light/index.js +0 -3
  292. package/lib/number-field/themes/solar/charcoal/index.js +0 -3
  293. package/lib/number-field/themes/solar/pearl/index.js +0 -3
  294. package/lib/overlay/elements/overlay-backdrop.d.ts +0 -46
  295. package/lib/overlay/elements/overlay-backdrop.js +0 -64
  296. package/lib/overlay/elements/overlay-viewport.d.ts +0 -40
  297. package/lib/overlay/elements/overlay-viewport.js +0 -52
  298. package/lib/overlay/elements/overlay.d.ts +0 -408
  299. package/lib/overlay/elements/overlay.js +0 -1426
  300. package/lib/overlay/helpers/functions.d.ts +0 -13
  301. package/lib/overlay/helpers/functions.js +0 -16
  302. package/lib/overlay/helpers/types.d.ts +0 -97
  303. package/lib/overlay/helpers/types.js +0 -16
  304. package/lib/overlay/index.d.ts +0 -2
  305. package/lib/overlay/index.js +0 -1
  306. package/lib/overlay/managers/backdrop-manager.d.ts +0 -45
  307. package/lib/overlay/managers/backdrop-manager.js +0 -96
  308. package/lib/overlay/managers/close-manager.d.ts +0 -54
  309. package/lib/overlay/managers/close-manager.js +0 -138
  310. package/lib/overlay/managers/focus-manager.d.ts +0 -71
  311. package/lib/overlay/managers/focus-manager.js +0 -228
  312. package/lib/overlay/managers/interaction-lock-manager.d.ts +0 -138
  313. package/lib/overlay/managers/interaction-lock-manager.js +0 -375
  314. package/lib/overlay/managers/viewport-manager.d.ts +0 -93
  315. package/lib/overlay/managers/viewport-manager.js +0 -211
  316. package/lib/overlay/managers/zindex-manager.d.ts +0 -80
  317. package/lib/overlay/managers/zindex-manager.js +0 -195
  318. package/lib/overlay/themes/halo/dark/index.js +0 -4
  319. package/lib/overlay/themes/halo/light/index.js +0 -4
  320. package/lib/overlay/themes/solar/charcoal/index.js +0 -4
  321. package/lib/overlay/themes/solar/pearl/index.js +0 -4
  322. package/lib/overlay-menu/helpers/types.d.ts +0 -8
  323. package/lib/overlay-menu/helpers/types.js +0 -1
  324. package/lib/overlay-menu/index.d.ts +0 -387
  325. package/lib/overlay-menu/index.js +0 -935
  326. package/lib/overlay-menu/managers/menu-manager.d.ts +0 -98
  327. package/lib/overlay-menu/managers/menu-manager.js +0 -240
  328. package/lib/overlay-menu/themes/halo/dark/index.js +0 -5
  329. package/lib/overlay-menu/themes/halo/light/index.js +0 -5
  330. package/lib/overlay-menu/themes/solar/charcoal/index.js +0 -5
  331. package/lib/overlay-menu/themes/solar/pearl/index.js +0 -5
  332. package/lib/pagination/index.d.ts +0 -275
  333. package/lib/pagination/index.js +0 -552
  334. package/lib/pagination/themes/halo/dark/index.js +0 -6
  335. package/lib/pagination/themes/halo/light/index.js +0 -6
  336. package/lib/pagination/themes/solar/charcoal/index.js +0 -6
  337. package/lib/pagination/themes/solar/pearl/index.js +0 -6
  338. package/lib/panel/index.d.ts +0 -48
  339. package/lib/panel/index.js +0 -74
  340. package/lib/panel/themes/halo/dark/index.js +0 -2
  341. package/lib/panel/themes/halo/light/index.js +0 -2
  342. package/lib/panel/themes/solar/charcoal/index.js +0 -2
  343. package/lib/panel/themes/solar/pearl/index.js +0 -2
  344. package/lib/password-field/index.d.ts +0 -89
  345. package/lib/password-field/index.js +0 -112
  346. package/lib/password-field/themes/halo/dark/index.js +0 -3
  347. package/lib/password-field/themes/halo/light/index.js +0 -3
  348. package/lib/password-field/themes/solar/charcoal/index.js +0 -3
  349. package/lib/password-field/themes/solar/pearl/index.js +0 -3
  350. package/lib/pill/index.d.ts +0 -97
  351. package/lib/pill/index.js +0 -160
  352. package/lib/pill/themes/halo/dark/index.js +0 -3
  353. package/lib/pill/themes/halo/light/index.js +0 -3
  354. package/lib/pill/themes/solar/charcoal/index.js +0 -3
  355. package/lib/pill/themes/solar/pearl/index.js +0 -3
  356. package/lib/progress-bar/index.d.ts +0 -82
  357. package/lib/progress-bar/index.js +0 -157
  358. package/lib/progress-bar/themes/halo/dark/index.js +0 -2
  359. package/lib/progress-bar/themes/halo/light/index.js +0 -2
  360. package/lib/progress-bar/themes/solar/charcoal/index.js +0 -2
  361. package/lib/progress-bar/themes/solar/pearl/index.js +0 -2
  362. package/lib/radio-button/index.d.ts +0 -123
  363. package/lib/radio-button/index.js +0 -261
  364. package/lib/radio-button/radio-button-registry.d.ts +0 -22
  365. package/lib/radio-button/radio-button-registry.js +0 -93
  366. package/lib/radio-button/themes/halo/dark/index.js +0 -3
  367. package/lib/radio-button/themes/halo/light/index.js +0 -3
  368. package/lib/radio-button/themes/solar/charcoal/index.js +0 -3
  369. package/lib/radio-button/themes/solar/pearl/index.js +0 -3
  370. package/lib/rating/index.d.ts +0 -91
  371. package/lib/rating/index.js +0 -157
  372. package/lib/rating/themes/halo/dark/index.js +0 -2
  373. package/lib/rating/themes/halo/light/index.js +0 -2
  374. package/lib/rating/themes/solar/charcoal/index.js +0 -2
  375. package/lib/rating/themes/solar/pearl/index.js +0 -2
  376. package/lib/search-field/index.d.ts +0 -77
  377. package/lib/search-field/index.js +0 -84
  378. package/lib/search-field/themes/halo/dark/index.js +0 -3
  379. package/lib/search-field/themes/halo/light/index.js +0 -3
  380. package/lib/search-field/themes/solar/charcoal/index.js +0 -3
  381. package/lib/search-field/themes/solar/pearl/index.js +0 -3
  382. package/lib/select/helpers/types.d.ts +0 -3
  383. package/lib/select/helpers/types.js +0 -1
  384. package/lib/select/index.d.ts +0 -396
  385. package/lib/select/index.js +0 -981
  386. package/lib/select/themes/halo/dark/index.js +0 -5
  387. package/lib/select/themes/halo/light/index.js +0 -5
  388. package/lib/select/themes/solar/charcoal/index.js +0 -5
  389. package/lib/select/themes/solar/pearl/index.js +0 -5
  390. package/lib/sidebar-layout/index.d.ts +0 -70
  391. package/lib/sidebar-layout/index.js +0 -134
  392. package/lib/sidebar-layout/themes/halo/dark/index.js +0 -3
  393. package/lib/sidebar-layout/themes/halo/light/index.js +0 -3
  394. package/lib/sidebar-layout/themes/solar/charcoal/index.js +0 -3
  395. package/lib/sidebar-layout/themes/solar/pearl/index.js +0 -3
  396. package/lib/slider/index.d.ts +0 -409
  397. package/lib/slider/index.js +0 -1187
  398. package/lib/slider/themes/halo/dark/index.js +0 -3
  399. package/lib/slider/themes/halo/light/index.js +0 -3
  400. package/lib/slider/themes/solar/charcoal/index.js +0 -3
  401. package/lib/slider/themes/solar/pearl/index.js +0 -3
  402. package/lib/sparkline/index.d.ts +0 -109
  403. package/lib/sparkline/index.js +0 -188
  404. package/lib/sparkline/themes/halo/dark/index.js +0 -2
  405. package/lib/sparkline/themes/halo/light/index.js +0 -2
  406. package/lib/sparkline/themes/solar/charcoal/index.js +0 -2
  407. package/lib/sparkline/themes/solar/pearl/index.js +0 -2
  408. package/lib/swing-gauge/const.d.ts +0 -22
  409. package/lib/swing-gauge/const.js +0 -26
  410. package/lib/swing-gauge/helpers.d.ts +0 -8
  411. package/lib/swing-gauge/helpers.js +0 -105
  412. package/lib/swing-gauge/index.d.ts +0 -296
  413. package/lib/swing-gauge/index.js +0 -764
  414. package/lib/swing-gauge/themes/halo/dark/index.js +0 -3
  415. package/lib/swing-gauge/themes/halo/light/index.js +0 -3
  416. package/lib/swing-gauge/themes/solar/charcoal/index.js +0 -3
  417. package/lib/swing-gauge/themes/solar/pearl/index.js +0 -3
  418. package/lib/swing-gauge/types.d.ts +0 -34
  419. package/lib/swing-gauge/types.js +0 -1
  420. package/lib/tab/index.d.ts +0 -118
  421. package/lib/tab/index.js +0 -208
  422. package/lib/tab/themes/halo/dark/index.js +0 -4
  423. package/lib/tab/themes/halo/light/index.js +0 -4
  424. package/lib/tab/themes/solar/charcoal/index.js +0 -4
  425. package/lib/tab/themes/solar/pearl/index.js +0 -4
  426. package/lib/tab-bar/helpers/animate.d.ts +0 -16
  427. package/lib/tab-bar/helpers/animate.js +0 -53
  428. package/lib/tab-bar/index.d.ts +0 -108
  429. package/lib/tab-bar/index.js +0 -218
  430. package/lib/tab-bar/themes/halo/dark/index.js +0 -4
  431. package/lib/tab-bar/themes/halo/light/index.js +0 -4
  432. package/lib/tab-bar/themes/solar/charcoal/index.js +0 -4
  433. package/lib/tab-bar/themes/solar/pearl/index.js +0 -4
  434. package/lib/text-field/index.d.ts +0 -151
  435. package/lib/text-field/index.js +0 -260
  436. package/lib/text-field/themes/halo/dark/index.js +0 -3
  437. package/lib/text-field/themes/halo/light/index.js +0 -3
  438. package/lib/text-field/themes/solar/charcoal/index.js +0 -3
  439. package/lib/text-field/themes/solar/pearl/index.js +0 -3
  440. package/lib/time-picker/index.d.ts +0 -412
  441. package/lib/time-picker/index.js +0 -898
  442. package/lib/time-picker/themes/halo/dark/index.js +0 -4
  443. package/lib/time-picker/themes/halo/light/index.js +0 -4
  444. package/lib/time-picker/themes/solar/charcoal/index.js +0 -4
  445. package/lib/time-picker/themes/solar/pearl/index.js +0 -4
  446. package/lib/toggle/index.d.ts +0 -87
  447. package/lib/toggle/index.js +0 -153
  448. package/lib/toggle/themes/halo/dark/index.js +0 -2
  449. package/lib/toggle/themes/halo/light/index.js +0 -2
  450. package/lib/toggle/themes/solar/charcoal/index.js +0 -2
  451. package/lib/toggle/themes/solar/pearl/index.js +0 -2
  452. package/lib/tooltip/elements/title-tooltip.d.ts +0 -1
  453. package/lib/tooltip/elements/title-tooltip.js +0 -18
  454. package/lib/tooltip/elements/tooltip-element.d.ts +0 -21
  455. package/lib/tooltip/elements/tooltip-element.js +0 -54
  456. package/lib/tooltip/helpers/overflow-tooltip.d.ts +0 -9
  457. package/lib/tooltip/helpers/overflow-tooltip.js +0 -19
  458. package/lib/tooltip/helpers/renderer.d.ts +0 -8
  459. package/lib/tooltip/helpers/renderer.js +0 -11
  460. package/lib/tooltip/helpers/types.d.ts +0 -23
  461. package/lib/tooltip/helpers/types.js +0 -1
  462. package/lib/tooltip/index.d.ts +0 -232
  463. package/lib/tooltip/index.js +0 -477
  464. package/lib/tooltip/managers/tooltip-manager.d.ts +0 -15
  465. package/lib/tooltip/managers/tooltip-manager.js +0 -140
  466. package/lib/tooltip/themes/halo/dark/index.js +0 -3
  467. package/lib/tooltip/themes/halo/light/index.js +0 -3
  468. package/lib/tooltip/themes/solar/charcoal/index.js +0 -3
  469. package/lib/tooltip/themes/solar/pearl/index.js +0 -3
  470. package/lib/tornado-chart/elements/tornado-chart.d.ts +0 -78
  471. package/lib/tornado-chart/elements/tornado-chart.js +0 -122
  472. package/lib/tornado-chart/elements/tornado-item.d.ts +0 -110
  473. package/lib/tornado-chart/elements/tornado-item.js +0 -207
  474. package/lib/tornado-chart/index.d.ts +0 -2
  475. package/lib/tornado-chart/index.js +0 -2
  476. package/lib/tornado-chart/themes/halo/dark/index.js +0 -6
  477. package/lib/tornado-chart/themes/halo/light/index.js +0 -6
  478. package/lib/tornado-chart/themes/solar/charcoal/index.js +0 -6
  479. package/lib/tornado-chart/themes/solar/pearl/index.js +0 -6
  480. package/lib/tree/elements/tree-item.d.ts +0 -96
  481. package/lib/tree/elements/tree-item.js +0 -179
  482. package/lib/tree/elements/tree.d.ts +0 -202
  483. package/lib/tree/elements/tree.js +0 -413
  484. package/lib/tree/helpers/filter.d.ts +0 -8
  485. package/lib/tree/helpers/filter.js +0 -33
  486. package/lib/tree/helpers/renderer.d.ts +0 -5
  487. package/lib/tree/helpers/renderer.js +0 -33
  488. package/lib/tree/helpers/types.d.ts +0 -25
  489. package/lib/tree/helpers/types.js +0 -1
  490. package/lib/tree/index.d.ts +0 -4
  491. package/lib/tree/index.js +0 -3
  492. package/lib/tree/managers/tree-manager.d.ts +0 -248
  493. package/lib/tree/managers/tree-manager.js +0 -395
  494. package/lib/tree/themes/halo/dark/index.js +0 -7
  495. package/lib/tree/themes/halo/light/index.js +0 -7
  496. package/lib/tree/themes/solar/charcoal/index.js +0 -7
  497. package/lib/tree/themes/solar/pearl/index.js +0 -7
  498. package/lib/tree-select/helpers/types.d.ts +0 -4
  499. package/lib/tree-select/helpers/types.js +0 -1
  500. package/lib/tree-select/index.d.ts +0 -404
  501. package/lib/tree-select/index.js +0 -891
  502. package/lib/tree-select/themes/halo/dark/index.js +0 -11
  503. package/lib/tree-select/themes/halo/light/index.js +0 -11
  504. package/lib/tree-select/themes/solar/charcoal/index.js +0 -11
  505. package/lib/tree-select/themes/solar/pearl/index.js +0 -11
  506. package/lib/version.d.ts +0 -1
  507. package/lib/version.js +0 -1
@@ -1,891 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { 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';
6
- import { styleMap } from '@refinitiv-ui/core/lib/directives/style-map.js';
7
- import { repeat } from '@refinitiv-ui/core/lib/directives/repeat.js';
8
- import { ifDefined } from '@refinitiv-ui/core/lib/directives/if-defined.js';
9
- import { VERSION } from '../version.js';
10
- import { CollectionComposer } from '@refinitiv-ui/utils/lib/collection.js';
11
- import { TimeoutTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
12
- import '../icon/index.js';
13
- import '../text-field/index.js';
14
- import '../pill/index.js';
15
- import '../button/index.js';
16
- import '../checkbox/index.js';
17
- import '../tree/index.js';
18
- import { ComboBox } from '../combo-box/index.js';
19
- import { TreeRenderer as TreeSelectRenderer } from '../tree/index.js';
20
- import { CheckedState, TreeManager, TreeManagerMode } from '../tree/managers/tree-manager.js';
21
- import { translate } from '@refinitiv-ui/translate';
22
- import '@refinitiv-ui/phrasebook/lib/locale/en/tree-select.js';
23
- export { TreeSelectRenderer };
24
- const MEMO_THROTTLE = 16;
25
- const POPUP_POSITION = ['bottom-start', 'top-start'];
26
- /**
27
- * Dropdown control that allows selection from the tree list
28
- *
29
- * @attr {boolean} [opened=false] - Set dropdown to open
30
- * @prop {boolean} [opened=false] - Set dropdown to open
31
- * @attr {string} placeholder - Set placeholder text
32
- * @prop {string} [placeholder=""] - Set placeholder text
33
- * @prop {TreeSelectData[]} [data=[]] - Data object to be used for creating tree
34
- * @fires confirm - Fired when selection is confirmed
35
- * @fires cancel - Fired when selection is cancelled
36
- * @fires query-changed - Fired when query in input box changed
37
- * @fires value-changed - Fired when value of control changed
38
- * @fires opened-changed - Fires when opened state changes
39
- */
40
- let TreeSelect = class TreeSelect extends ComboBox {
41
- constructor() {
42
- super();
43
- /**
44
- * Tracks the number of filter matches
45
- *
46
- * Only needed if internal filtering is unused
47
- */
48
- this.filterCount = 0;
49
- /**
50
- * Memoized selection and expansion stats
51
- * Used for displaying counts and calculating control visibility/content
52
- */
53
- this.memo = {
54
- selected: 0,
55
- selectable: 0,
56
- expanded: 0,
57
- expandable: 0
58
- };
59
- /**
60
- * Extracted values from {@link this.checkedGroupedItems}
61
- */
62
- this.pillsData = [];
63
- /**
64
- * Are there pills visible
65
- */
66
- this.hasPills = false;
67
- /**
68
- * Store references to items selected and visible at point of selection filter being applied
69
- * Allow for items to be removed from the selection, but still be visible
70
- */
71
- this.editSelectionItems = new Set();
72
- /**
73
- * Composer used for live changes
74
- */
75
- this.composer = new CollectionComposer([]);
76
- /**
77
- * Provide access to tree interface
78
- */
79
- this.treeManager = new TreeManager(this.composer);
80
- /**
81
- * Modification updates are called a lot
82
- *
83
- * This throttles the memo updates to reduce lookups
84
- */
85
- this.memoUpdateThrottle = new TimeoutTaskRunner(MEMO_THROTTLE);
86
- /**
87
- * Breaks the relationship when multiple
88
- * selection mode is enabled
89
- */
90
- this.noRelation = false;
91
- /**
92
- * Should the control show pills
93
- */
94
- this.showPills = false;
95
- this._values = [];
96
- /**
97
- * Renderer used to render tree item elements
98
- * @type {TreeSelectRenderer}
99
- */
100
- this.renderer = new TreeSelectRenderer(this);
101
- /**
102
- * TODO:
103
- * @ignore
104
- */
105
- this.multiple = true;
106
- }
107
- /**
108
- * Element version number
109
- * @returns version number
110
- */
111
- static get version() {
112
- return VERSION;
113
- }
114
- static get styles() {
115
- return css `
116
- [part=list] {
117
- display: flex;
118
- flex-direction: row;
119
- box-sizing: content-box;
120
- cursor: default;
121
- }
122
-
123
- [part=section] {
124
- display: flex;
125
- flex-direction: column;
126
- width: inherit;
127
- height: inherit;
128
- max-height: inherit;
129
- min-height: inherit;
130
- max-width: inherit;
131
- min-width: inherit;
132
- overflow: hidden;
133
- }
134
-
135
- [part=selection-area] {
136
- min-height: 0;
137
- flex-grow: 1;
138
- flex-shrink: 1;
139
- flex-basis: auto;
140
- display: flex;
141
- flex-direction: column;
142
- overflow: hidden;
143
- outline: none;
144
- }
145
-
146
- [part~=control-container] {
147
- box-sizing: border-box;
148
- display: flex;
149
- flex-shrink: 0;
150
- flex-basis: auto;
151
- flex-grow: 0;
152
- align-items: center;
153
- }
154
-
155
- [part=pills] {
156
- flex: none;
157
- }
158
- `;
159
- }
160
- /**
161
- * Returns a values collection of the currently
162
- * selected item values
163
- * @type {string[]}
164
- * @default []
165
- */
166
- get values() {
167
- return this._values;
168
- }
169
- set values(values) {
170
- super.values = values;
171
- this._values = values;
172
- }
173
- /**
174
- * Set resolved data
175
- * @param value resolved data
176
- */
177
- set resolvedData(value) {
178
- const oldValue = this.resolvedData;
179
- if (value !== oldValue) {
180
- super.resolvedData = value;
181
- this.treeManager = new TreeManager(this.composer, this.mode);
182
- // keep the original values
183
- // do not use values setter to avoid unnecessary calls
184
- this._values = this.composerValues;
185
- this.listenToComposer();
186
- this.updateMemo();
187
- this.updatePills();
188
- this.requestUpdate('data', oldValue);
189
- }
190
- }
191
- get resolvedData() {
192
- return super.resolvedData;
193
- }
194
- /**
195
- * The the values from composer ignoring freeTextValue
196
- * @override
197
- */
198
- get composerValues() {
199
- return this.treeManager.checkedItems.map(item => item.value || '').slice();
200
- }
201
- /**
202
- * Provide list of currently selected items
203
- */
204
- get selection() {
205
- return this.treeManager.checkedItems.slice();
206
- }
207
- /**
208
- * Get a list of selected item labels
209
- * @returns Has selection
210
- * @override
211
- */
212
- get selectedLabels() {
213
- return this.checkedGroupedItems.map(selected => this.getItemPropertyValue(selected, 'label') || '');
214
- }
215
- /**
216
- * Returns memoized selected state
217
- * @returns Has selection
218
- */
219
- get hasActiveSelection() {
220
- return this.memo.selected > 0;
221
- }
222
- /**
223
- * Returns memoized selectable state
224
- * @returns Has selectable
225
- */
226
- get hasSelectable() {
227
- return this.memo.selectable > 0;
228
- }
229
- /**
230
- * Returns memoized all selected count
231
- * @returns Is all selected
232
- */
233
- get isAllSelected() {
234
- return this.hasSelectable && this.memo.selected === this.memo.selectable;
235
- }
236
- /**
237
- * Returns memoized expansion state
238
- * @returns Are all expanded
239
- */
240
- get hasExpansion() {
241
- return this.memo.expanded > 0;
242
- }
243
- /**
244
- * Determines if the expansion controls should be displayed
245
- *
246
- * @returns Control visible state
247
- */
248
- get expansionControlVisible() {
249
- // could be a static prop and updated via CC
250
- return this.memo.expandable > 0;
251
- }
252
- /**
253
- * Determine if the selection filter is active
254
- * @returns Selection filter on/off
255
- */
256
- get selectionFilterState() {
257
- return this.editSelectionItems.size > 0;
258
- }
259
- /**
260
- * Mode to use in the tree manager
261
- */
262
- get mode() {
263
- return !this.noRelation ? TreeManagerMode.RELATIONAL : TreeManagerMode.INDEPENDENT;
264
- }
265
- /**
266
- * Get a list of selected items.
267
- * If all leaves are selected, a parent becomes selected
268
- * If mode is INDEPENDENT, grouping is not applied
269
- */
270
- get checkedGroupedItems() {
271
- const treeManager = this.treeManager;
272
- const checkedItems = treeManager.checkedItems;
273
- if (this.mode === TreeManagerMode.INDEPENDENT) {
274
- return checkedItems;
275
- }
276
- const checkedGroupItems = [];
277
- const unchecked = []; // need for performance to not double check same ancestors
278
- checkedItems.forEach(item => {
279
- const ancestors = treeManager.getItemAncestors(item);
280
- for (let i = 0; i < ancestors.length; i += 1) {
281
- const ancestor = ancestors[i];
282
- // An ancestor is already included. No need to continue
283
- if (checkedGroupItems.includes(ancestor)) {
284
- return;
285
- }
286
- // An ancestor has been already checked. Do not check again
287
- if (unchecked.includes(ancestor)) {
288
- continue;
289
- }
290
- // Ancestor is checked. No need to check any other ancestors
291
- if (treeManager.getItemCheckedState(ancestor) === CheckedState.CHECKED) {
292
- checkedGroupItems.push(ancestor);
293
- return;
294
- }
295
- // Do not check again this ancestor for performance
296
- unchecked.push(ancestor);
297
- }
298
- checkedGroupItems.push(item);
299
- });
300
- return checkedGroupItems;
301
- }
302
- /**
303
- * Persist the current selection
304
- * Takes the current selection and uses it for {@link TreeSelect.values}
305
- * Also uses current selection as a revert position for future changes
306
- * @returns {void}
307
- */
308
- persistSelection() {
309
- const oldValues = this.values.slice();
310
- const newValues = this.composerValues;
311
- const oldComparison = oldValues.sort().toString();
312
- const newComparison = newValues.sort().toString();
313
- if (oldComparison !== newComparison) {
314
- this.values = newValues;
315
- this.notifyPropertyChange('value', this.value);
316
- }
317
- }
318
- /**
319
- * Reverse selection. Run on Esc or Cancel
320
- * @returns {void}
321
- */
322
- cancelSelection() {
323
- // values setter updates the collection composer if required
324
- this.values = this._values;
325
- }
326
- /**
327
- * Update memoized track
328
- *
329
- * Update states for expansion and selection
330
- *
331
- * @returns {void}
332
- */
333
- updateMemo() {
334
- this.memo = {
335
- expanded: 0,
336
- expandable: 0,
337
- selected: 0,
338
- selectable: 0
339
- };
340
- this.queryItems((item, composer) => {
341
- const hasChildren = composer.getItemChildren(item);
342
- if (hasChildren.length) {
343
- this.memo.expandable += 1;
344
- if (this.treeManager.isItemExpanded(item) && this.treeManager.isItemCheckable(item)) {
345
- this.memo.expanded += 1;
346
- }
347
- }
348
- else if (this.treeManager.isItemCheckable(item)) {
349
- this.memo.selectable += 1;
350
- if (this.getItemPropertyValue(item, 'selected') === true) {
351
- this.memo.selected += 1;
352
- }
353
- }
354
- return false;
355
- });
356
- this.requestUpdate();
357
- }
358
- /**
359
- * Utility method - closes and resets changes such as query
360
- * @returns {void}
361
- */
362
- closeAndReset() {
363
- this.resetInput();
364
- this.setOpened(false);
365
- }
366
- /**
367
- * Save the current selection
368
- * @returns {void}
369
- */
370
- save() {
371
- const event = new CustomEvent('confirm');
372
- this.dispatchEvent(event);
373
- if (!event.defaultPrevented) {
374
- this.persistSelection();
375
- this.closeAndReset();
376
- }
377
- }
378
- /**
379
- * Discard the current selection
380
- * @returns {void}
381
- */
382
- cancel() {
383
- const event = new CustomEvent('cancel');
384
- this.dispatchEvent(event);
385
- if (!event.defaultPrevented) {
386
- this.closeAndReset();
387
- // reset always happens on popup close action
388
- }
389
- }
390
- /**
391
- * Toggle tree level expansion action
392
- * @returns {void}
393
- */
394
- expansionToggleClickHandler() {
395
- if (this.hasExpansion) {
396
- this.treeManager.collapseAllItems();
397
- }
398
- else {
399
- this.treeManager.expandAllItems();
400
- }
401
- }
402
- /**
403
- * Toggle Selection of all tree items
404
- * @param event checked-change event
405
- * @returns {void}
406
- */
407
- selectionToggleHandler(event) {
408
- if (event.detail.value) {
409
- this.treeManager.checkAllItems();
410
- }
411
- else {
412
- this.treeManager.uncheckAllItems();
413
- }
414
- }
415
- /**
416
- * Remove selection filter
417
- * @returns {void}
418
- */
419
- fullClickHandler() {
420
- this.exitEditSelection();
421
- }
422
- /**
423
- * Apply selection filter
424
- * @returns {void}
425
- */
426
- selectedClickHandler() {
427
- if (this.hasActiveSelection) {
428
- this.enterEditSelection();
429
- }
430
- }
431
- /**
432
- * Apply the selection filter by entering edit selection mode
433
- * @returns {void}
434
- */
435
- enterEditSelection() {
436
- this.editSelectionItems = new Set(this.treeManager.checkedItems);
437
- this.filterItems();
438
- }
439
- /**
440
- * Remove selection filtering by exiting edit selection mode
441
- * @returns {void}
442
- */
443
- exitEditSelection() {
444
- this.clearSelectionFilter();
445
- this.filterItems();
446
- }
447
- /**
448
- * Executed when the popup is fully opened
449
- * @returns {void}
450
- */
451
- onPopupOpened() {
452
- super.onPopupOpened();
453
- this.clearSelectionFilter();
454
- this.updatePills();
455
- this.updateMemo();
456
- }
457
- /**
458
- * Clear selection filter
459
- * @returns {void}
460
- */
461
- clearSelectionFilter() {
462
- this.editSelectionItems.clear();
463
- }
464
- /**
465
- * Executed when the popup is fully closed
466
- * @returns {void}
467
- */
468
- onPopupClosed() {
469
- super.onPopupClosed();
470
- this.updateMemo();
471
- this.cancelSelection();
472
- this.exitEditSelection();
473
- }
474
- /**
475
- * Filter the internal items by query. Changes items' hidden state.
476
- * @returns {void}
477
- */
478
- filterItems() {
479
- // if filter is null, it is off and external app is responsible
480
- if (this.filter) {
481
- const filter = this.filter;
482
- const items = this.queryItems((item) => {
483
- // do not filter hidden items
484
- if (item.hidden) {
485
- return false;
486
- }
487
- // does item match the selection filter
488
- let result = true;
489
- if (this.editSelectionItems.size && !this.editSelectionItems.has(item)) {
490
- result = false;
491
- }
492
- // item matches selection, can have conventional filter applied
493
- if (result) {
494
- result = filter(item);
495
- }
496
- if (result) {
497
- this.treeManager.includeItem(item);
498
- }
499
- else {
500
- this.treeManager.excludeItem(item);
501
- }
502
- return result;
503
- }).slice();
504
- // do not expand EMS if there is no filter applied
505
- if (this.query || this.editSelectionItems.size) {
506
- this.addItemDescendantsToRender(items);
507
- this.addExpandedAncestorsToRender(items);
508
- }
509
- this.filterCount = items.length;
510
- // unlike CCB, we do not close EMS when there is no matches for filter
511
- }
512
- this.forcePopupLayout();
513
- }
514
- /**
515
- * Utility method
516
- * Adds descendants for each item passed
517
- * @param items List of child items
518
- * @returns {void}
519
- */
520
- addItemDescendantsToRender(items) {
521
- items.forEach((item) => {
522
- /**
523
- * Collapse an item to prevent tree show too many nested expanded
524
- */
525
- if (this.treeManager.isItemExpanded(item)) {
526
- this.treeManager.collapseItem(item);
527
- }
528
- /**
529
- * show all descendants of items to make them all are selectable
530
- * and user can navigate into nested data
531
- */
532
- const children = this.treeManager.getItemChildren(item);
533
- if (children.length) {
534
- this.addNestedItemsToRender(children, items);
535
- }
536
- });
537
- }
538
- /**
539
- * Utility method
540
- * Add nested children of item list
541
- * @param items List of items
542
- * @param excludeItems List of exclude items
543
- * @returns {void}
544
- */
545
- addNestedItemsToRender(items, excludeItems) {
546
- items.forEach(item => {
547
- // Skip hidden and exclude item
548
- if (!item.hidden && !excludeItems.includes(item)) {
549
- // Add item and nested children
550
- this.treeManager.includeItem(item);
551
- const children = this.treeManager.getItemChildren(item);
552
- if (children.length) {
553
- this.addNestedItemsToRender(children, excludeItems);
554
- }
555
- }
556
- });
557
- }
558
- /**
559
- * Utility method
560
- * Adds ancestors for each item passed and expand
561
- * @param items List of child items
562
- * @returns {void}
563
- */
564
- addExpandedAncestorsToRender(items) {
565
- // establish unique ancestors set
566
- const ancestors = new Set();
567
- // we iterate each item match so as to find ancestors
568
- items.forEach((item) => {
569
- // get the ancestors
570
- const parent = this.treeManager.getItemParent(item);
571
- if (parent && !ancestors.has(parent)) {
572
- this.treeManager.getItemAncestors(item).forEach((ancestor) => {
573
- ancestors.add(ancestor); // track ancestors
574
- this.addExpandedAncestorToRender(ancestor);
575
- });
576
- }
577
- });
578
- }
579
- /**
580
- * Utility method
581
- * Adds parent and expands
582
- * @param ancestor parent item
583
- * @returns {void}
584
- */
585
- addExpandedAncestorToRender(ancestor) {
586
- this.treeManager.includeItem(ancestor);
587
- this.treeManager.expandItem(ancestor);
588
- }
589
- /**
590
- * Reacts to pill removal by de-selecting the related item
591
- * @param event Event containing the pill item
592
- *
593
- * @returns {void}
594
- */
595
- onPillRemoved(event) {
596
- const pill = event.target;
597
- const item = this.queryItemsByPropertyValue('value', pill.value)[0];
598
- if (item) {
599
- this.treeManager.uncheckItem(item);
600
- // Focus must be shifted as otherwise focus is shifted to body once the item is removed and popup gets closed
601
- this.shiftFocus();
602
- }
603
- }
604
- /**
605
- * Handles key input
606
- * @param event Key down event object
607
- * @returns {void}
608
- */
609
- /* istanbul ignore next */
610
- onKeyDown(event) {
611
- var _a, _b;
612
- // There are three areas, which have different reaction on key press:
613
- // 1) search field
614
- // 2) tree selection
615
- // 3) popup panel
616
- if (((_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) === this.selectionAreaEl && this.listEl) {
617
- // Focus within selection area. Propagate all events
618
- this.reTargetEvent(event, this.listEl);
619
- }
620
- else if (!((_b = this.popupEl) === null || _b === void 0 ? void 0 : _b.focused)) {
621
- // search field is in focus
622
- // combo box logic should take care
623
- super.onKeyDown(event);
624
- }
625
- else {
626
- // up/down to selection area
627
- switch (event.key) {
628
- case 'Up':
629
- case 'ArrowUp':
630
- case 'Down':
631
- case 'ArrowDown':
632
- super.onKeyDown(event);
633
- break;
634
- // no default
635
- }
636
- }
637
- }
638
- /**
639
- * Navigates up the list.
640
- * Opens the list if closed.
641
- * @param event keyboard event
642
- * @returns {void}
643
- */
644
- /* istanbul ignore next */
645
- up(event) {
646
- super.up(event);
647
- this.focusOnSelectionArea();
648
- }
649
- /**
650
- * Navigates down the list.
651
- * Opens the list if closed.
652
- * @param event keyboard event
653
- * @returns {void}
654
- */
655
- /* istanbul ignore next */
656
- down(event) {
657
- super.down(event);
658
- this.focusOnSelectionArea();
659
- }
660
- /**
661
- * Make sure that after up/down keys the focus gracefully moves to selection area
662
- * so the user can then use left/right/Enter keys for keyboard navigation
663
- * @returns {void}
664
- */
665
- /* istanbul ignore next */
666
- focusOnSelectionArea() {
667
- // The logic needs to happen after the update cycle
668
- // as otherwise focus logic may contradict with other components
669
- // and the focus is not moved
670
- void this.updateComplete.then(() => {
671
- var _a;
672
- (_a = this.selectionAreaEl) === null || _a === void 0 ? void 0 : _a.focus();
673
- });
674
- }
675
- /**
676
- * Adds a throttled update for pills and memo
677
- * @returns {void}
678
- */
679
- modificationUpdate() {
680
- super.modificationUpdate();
681
- this.memoUpdateThrottle.schedule(() => {
682
- this.updatePills();
683
- this.updateMemo();
684
- });
685
- }
686
- /**
687
- * Update pills if {@link TreeSelect.showPills} showPills is applied
688
- *
689
- * @returns {void}
690
- */
691
- updatePills() {
692
- if (this.showPills) {
693
- this.pillsData = this.checkedGroupedItems.slice();
694
- this.hasPills = !!this.pillsData.length;
695
- }
696
- }
697
- /**
698
- * Queries the composer for data items. Uses Infinity depth
699
- * @param engine Composer query engine
700
- * @returns Collection of matched items
701
- * @override
702
- */
703
- queryItems(engine) {
704
- return this.composer.queryItems(engine, Infinity);
705
- }
706
- /**
707
- * Queries the composer for data items,
708
- * matching by property value. Uses Infinity depth
709
- * @param property Property name to query
710
- * @param value Property value to match against
711
- * @returns Collection of matched items
712
- * @override
713
- */
714
- queryItemsByPropertyValue(property, value) {
715
- return this.composer.queryItemsByPropertyValue(property, value, Infinity);
716
- }
717
- /**
718
- * Filter template
719
- * @returns Render template
720
- */
721
- get filtersTemplate() {
722
- return html `
723
- <div part="control-container filter-control">
724
- <div part="match-count-wrapper">
725
- ${this.matchCountTemplate}
726
- </div>
727
- ${this.hasSelectable ? html `<div part="filter-wrapper">
728
- <div
729
- role="button"
730
- tabindex="0"
731
- active
732
- part="control full-filter${!this.selectionFilterState ? ' active' : ''}"
733
- @tap="${this.fullClickHandler}">${this.t('FULL_LIST')}</div>
734
- <div
735
- role="button"
736
- tabindex="${ifDefined(this.hasActiveSelection ? 0 : undefined)}"
737
- part="control selected-filter${this.selectionFilterState ? ' active' : ''}${!this.hasActiveSelection ? ' disabled' : ''}"
738
- @tap="${this.selectedClickHandler}">${this.t('SELECTED')}</div>
739
- </div>` : html ``}
740
- </div>
741
- `;
742
- }
743
- /**
744
- * Tree control template
745
- * @returns Render template
746
- */
747
- get treeControlsTemplate() {
748
- if (!this.hasSelectable) {
749
- return html ``;
750
- }
751
- let expansionControl = html ``;
752
- if (this.expansionControlVisible) {
753
- expansionControl = html `
754
- <div part="filter-wrapper">
755
- <div
756
- role="button"
757
- tabindex="0"
758
- part="control expand-toggle"
759
- @tap="${this.expansionToggleClickHandler}">${this.t('EXPAND_COLLAPSE', { expansion: this.hasExpansion })}</div>
760
- </div>
761
- `;
762
- }
763
- return html `
764
- <div part="control-container tree-control">
765
- <ef-checkbox
766
- part="selection-toggle"
767
- .checked="${this.isAllSelected}"
768
- .indeterminate="${this.hasActiveSelection && !this.isAllSelected}"
769
- @checked-changed="${this.selectionToggleHandler}">${this.t('SELECT_CONTROL', { selected: this.isAllSelected })}</ef-checkbox>
770
- ${expansionControl}
771
- </div>
772
- `;
773
- }
774
- /**
775
- * Conditional filter matches template
776
- * @returns Render template
777
- */
778
- get matchCountTemplate() {
779
- return this.query ? html `
780
- <span part="match-count">${this.t('MATCHES_NUM', { numMatched: this.filterCount })}</span>
781
- ` : html ``;
782
- }
783
- /**
784
- * Commit controls template
785
- * @returns Render template
786
- */
787
- get commitControlsTemplate() {
788
- return html `
789
- <ef-button
790
- id="done"
791
- part="done-button"
792
- cta
793
- @tap="${this.save}">${this.t('DONE')}</ef-button>
794
- <ef-button
795
- id="cancel"
796
- part="cancel-button"
797
- @tap="${this.cancel}">${this.t('CANCEL')}</ef-button>
798
- `;
799
- }
800
- /**
801
- * Pills template
802
- * @returns Render template
803
- */
804
- get pillsTemplate() {
805
- // always injected when we have show pills vs injecting and re-injecting partial
806
- // visibility will typically be controlled by styling: display: none / block or similar
807
- if (this.showPills && this.hasPills && this.hasSelectable) {
808
- return html `<div part="pills">
809
- ${repeat(this.pillsData, pill => pill.value, pill => html `
810
- <ef-pill
811
- tabindex="-1"
812
- clears
813
- .readonly="${pill.readonly || this.readonly}"
814
- .disabled="${pill.disabled || this.disabled}"
815
- .value="${pill.value}"
816
- @clear="${this.onPillRemoved}">${pill.label}</ef-pill>`)}
817
- </div>`;
818
- }
819
- }
820
- /**
821
- * Returns template for popup
822
- * Lazy loads the popup
823
- * @returns Popup template or undefined
824
- */
825
- get popupTemplate() {
826
- if (this.lazyRendered) {
827
- return html `
828
- <ef-overlay
829
- part="list"
830
- style=${styleMap(this.popupDynamicStyles)}
831
- @opened="${this.onPopupOpened}"
832
- @closed="${this.onPopupClosed}"
833
- .focusBoundary="${this}"
834
- .opened="${this.opened}"
835
- .positionTarget="${this}"
836
- .position="${POPUP_POSITION}"
837
- .delegatesFocus=${true}
838
- no-cancel-on-outside-click
839
- tabindex="0"
840
- with-shadow
841
- no-overlap
842
- no-autofocus>
843
- <div part="section">
844
- ${this.filtersTemplate}
845
- ${this.treeControlsTemplate}
846
- <div part="selection-area" tabindex="-1">
847
- <ef-tree
848
- id="internal-list"
849
- @focusin="${this.shiftFocus}"
850
- tabindex="-1"
851
- part="tree"
852
- .noRelation=${this.noRelation}
853
- .renderer=${this.renderer}
854
- .data="${this.composer}"
855
- .multiple="${this.multiple}"></ef-tree>
856
- ${this.pillsTemplate}
857
- </div>
858
- <div part="control-container footer" id="footer">${this.commitControlsTemplate}</div>
859
- </div>
860
- </ef-overlay>
861
- `;
862
- }
863
- }
864
- };
865
- __decorate([
866
- translate()
867
- ], TreeSelect.prototype, "t", void 0);
868
- __decorate([
869
- property({ attribute: 'no-relation', type: Boolean })
870
- ], TreeSelect.prototype, "noRelation", void 0);
871
- __decorate([
872
- property({ type: Boolean, attribute: 'show-pills' })
873
- ], TreeSelect.prototype, "showPills", void 0);
874
- __decorate([
875
- property({ type: Array, attribute: false })
876
- ], TreeSelect.prototype, "values", null);
877
- __decorate([
878
- property({ type: Function, attribute: false })
879
- ], TreeSelect.prototype, "renderer", void 0);
880
- __decorate([
881
- query('[part=selection-area]')
882
- ], TreeSelect.prototype, "selectionAreaEl", void 0);
883
- __decorate([
884
- query('[part=list]')
885
- ], TreeSelect.prototype, "popupEl", void 0);
886
- TreeSelect = __decorate([
887
- customElement('ef-tree-select', {
888
- alias: 'emerald-multi-select'
889
- })
890
- ], TreeSelect);
891
- export { TreeSelect };