@refinitiv-ui/elements 5.3.3 → 5.3.4

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 (558) hide show
  1. package/lib/accordion/custom-elements.json +49 -0
  2. package/lib/accordion/index.d.ts +76 -0
  3. package/lib/accordion/index.js +139 -0
  4. package/lib/accordion/themes/halo/dark/index.js +3 -0
  5. package/lib/accordion/themes/halo/light/index.js +3 -0
  6. package/lib/accordion/themes/solar/charcoal/index.js +3 -0
  7. package/lib/accordion/themes/solar/pearl/index.js +3 -0
  8. package/lib/appstate-bar/custom-elements.json +49 -0
  9. package/lib/appstate-bar/index.d.ts +65 -0
  10. package/lib/appstate-bar/index.js +103 -0
  11. package/lib/appstate-bar/themes/halo/dark/index.js +3 -0
  12. package/lib/appstate-bar/themes/halo/light/index.js +3 -0
  13. package/lib/appstate-bar/themes/solar/charcoal/index.js +3 -0
  14. package/lib/appstate-bar/themes/solar/pearl/index.js +3 -0
  15. package/lib/autosuggest/custom-elements.json +223 -0
  16. package/lib/autosuggest/helpers/const.d.ts +2 -0
  17. package/lib/autosuggest/helpers/const.js +3 -0
  18. package/lib/autosuggest/helpers/types.d.ts +54 -0
  19. package/lib/autosuggest/helpers/types.js +1 -0
  20. package/lib/autosuggest/helpers/utils.d.ts +39 -0
  21. package/lib/autosuggest/helpers/utils.js +76 -0
  22. package/lib/autosuggest/index.d.ts +533 -0
  23. package/lib/autosuggest/index.js +1248 -0
  24. package/lib/autosuggest/themes/halo/dark/index.js +5 -0
  25. package/lib/autosuggest/themes/halo/light/index.js +5 -0
  26. package/lib/autosuggest/themes/solar/charcoal/index.js +5 -0
  27. package/lib/autosuggest/themes/solar/pearl/index.js +5 -0
  28. package/lib/button/custom-elements.json +119 -0
  29. package/lib/button/index.d.ts +132 -0
  30. package/lib/button/index.js +213 -0
  31. package/lib/button/themes/halo/dark/index.js +3 -0
  32. package/lib/button/themes/halo/light/index.js +3 -0
  33. package/lib/button/themes/solar/charcoal/index.js +3 -0
  34. package/lib/button/themes/solar/pearl/index.js +3 -0
  35. package/lib/button-bar/custom-elements.json +26 -0
  36. package/lib/button-bar/index.d.ts +76 -0
  37. package/lib/button-bar/index.js +157 -0
  38. package/lib/button-bar/themes/halo/dark/index.js +3 -0
  39. package/lib/button-bar/themes/halo/light/index.js +3 -0
  40. package/lib/button-bar/themes/solar/charcoal/index.js +3 -0
  41. package/lib/button-bar/themes/solar/pearl/index.js +3 -0
  42. package/lib/calendar/custom-elements.json +199 -0
  43. package/lib/calendar/index.d.ts +321 -0
  44. package/lib/calendar/index.js +926 -0
  45. package/lib/calendar/locales.d.ts +31 -0
  46. package/lib/calendar/locales.js +144 -0
  47. package/lib/calendar/themes/halo/dark/index.js +3 -0
  48. package/lib/calendar/themes/halo/light/index.js +3 -0
  49. package/lib/calendar/themes/solar/charcoal/index.js +3 -0
  50. package/lib/calendar/themes/solar/pearl/index.js +3 -0
  51. package/lib/calendar/types.d.ts +33 -0
  52. package/lib/calendar/types.js +6 -0
  53. package/lib/calendar/utils.d.ts +12 -0
  54. package/lib/calendar/utils.js +17 -0
  55. package/lib/canvas/custom-elements.json +69 -0
  56. package/lib/canvas/index.d.ts +100 -0
  57. package/lib/canvas/index.js +175 -0
  58. package/lib/canvas/themes/halo/dark/index.js +2 -0
  59. package/lib/canvas/themes/halo/light/index.js +2 -0
  60. package/lib/canvas/themes/solar/charcoal/index.js +2 -0
  61. package/lib/canvas/themes/solar/pearl/index.js +2 -0
  62. package/lib/card/custom-elements.json +59 -0
  63. package/lib/card/helpers/types.d.ts +12 -0
  64. package/lib/card/helpers/types.js +1 -0
  65. package/lib/card/index.d.ts +140 -0
  66. package/lib/card/index.js +247 -0
  67. package/lib/card/themes/halo/dark/index.js +5 -0
  68. package/lib/card/themes/halo/light/index.js +5 -0
  69. package/lib/card/themes/solar/charcoal/index.js +5 -0
  70. package/lib/card/themes/solar/pearl/index.js +5 -0
  71. package/lib/chart/custom-elements.json +42 -0
  72. package/lib/chart/helpers/index.d.ts +2 -0
  73. package/lib/chart/helpers/index.js +2 -0
  74. package/lib/chart/helpers/legend.d.ts +5 -0
  75. package/lib/chart/helpers/legend.js +78 -0
  76. package/lib/chart/helpers/merge.d.ts +15 -0
  77. package/lib/chart/helpers/merge.js +28 -0
  78. package/lib/chart/helpers/types.d.ts +69 -0
  79. package/lib/chart/helpers/types.js +1 -0
  80. package/lib/chart/index.d.ts +187 -0
  81. package/lib/chart/index.js +493 -0
  82. package/lib/chart/plugins/doughnut-center-label.d.ts +3 -0
  83. package/lib/chart/plugins/doughnut-center-label.js +196 -0
  84. package/lib/chart/themes/halo/dark/index.js +4 -0
  85. package/lib/chart/themes/halo/light/index.js +4 -0
  86. package/lib/chart/themes/solar/charcoal/index.js +4 -0
  87. package/lib/chart/themes/solar/pearl/index.js +4 -0
  88. package/lib/checkbox/custom-elements.json +71 -0
  89. package/lib/checkbox/index.d.ts +89 -0
  90. package/lib/checkbox/index.js +170 -0
  91. package/lib/checkbox/themes/halo/dark/index.js +4 -0
  92. package/lib/checkbox/themes/halo/light/index.js +4 -0
  93. package/lib/checkbox/themes/solar/charcoal/index.js +4 -0
  94. package/lib/checkbox/themes/solar/pearl/index.js +4 -0
  95. package/lib/clock/custom-elements.json +108 -0
  96. package/lib/clock/index.d.ts +309 -0
  97. package/lib/clock/index.js +564 -0
  98. package/lib/clock/themes/halo/dark/index.js +2 -0
  99. package/lib/clock/themes/halo/light/index.js +2 -0
  100. package/lib/clock/themes/solar/charcoal/index.js +2 -0
  101. package/lib/clock/themes/solar/pearl/index.js +2 -0
  102. package/lib/clock/utils/TickManager.d.ts +14 -0
  103. package/lib/clock/utils/TickManager.js +66 -0
  104. package/lib/clock/utils/timestamps.d.ts +6 -0
  105. package/lib/clock/utils/timestamps.js +6 -0
  106. package/lib/collapse/custom-elements.json +79 -0
  107. package/lib/collapse/index.d.ts +119 -0
  108. package/lib/collapse/index.js +199 -0
  109. package/lib/collapse/themes/halo/dark/index.js +5 -0
  110. package/lib/collapse/themes/halo/light/index.js +5 -0
  111. package/lib/collapse/themes/solar/charcoal/index.js +5 -0
  112. package/lib/collapse/themes/solar/pearl/index.js +5 -0
  113. package/lib/color-dialog/custom-elements.json +193 -0
  114. package/lib/color-dialog/elements/color-palettes.d.ts +52 -0
  115. package/lib/color-dialog/elements/color-palettes.js +105 -0
  116. package/lib/color-dialog/elements/grayscale-palettes.d.ts +67 -0
  117. package/lib/color-dialog/elements/grayscale-palettes.js +164 -0
  118. package/lib/color-dialog/elements/palettes.d.ts +58 -0
  119. package/lib/color-dialog/elements/palettes.js +119 -0
  120. package/lib/color-dialog/helpers/color-helpers.d.ts +62 -0
  121. package/lib/color-dialog/helpers/color-helpers.js +258 -0
  122. package/lib/color-dialog/helpers/value-model.d.ts +75 -0
  123. package/lib/color-dialog/helpers/value-model.js +139 -0
  124. package/lib/color-dialog/index.d.ts +232 -0
  125. package/lib/color-dialog/index.js +457 -0
  126. package/lib/color-dialog/themes/halo/dark/index.js +7 -0
  127. package/lib/color-dialog/themes/halo/light/index.js +7 -0
  128. package/lib/color-dialog/themes/solar/charcoal/index.js +7 -0
  129. package/lib/color-dialog/themes/solar/pearl/index.js +7 -0
  130. package/lib/combo-box/custom-elements.json +207 -0
  131. package/lib/combo-box/helpers/filter.d.ts +10 -0
  132. package/lib/combo-box/helpers/filter.js +29 -0
  133. package/lib/combo-box/helpers/keyboard-event.d.ts +17 -0
  134. package/lib/combo-box/helpers/keyboard-event.js +19 -0
  135. package/lib/combo-box/helpers/types.d.ts +11 -0
  136. package/lib/combo-box/helpers/types.js +1 -0
  137. package/lib/combo-box/index.d.ts +523 -0
  138. package/lib/combo-box/index.js +1146 -0
  139. package/lib/combo-box/themes/halo/dark/index.js +8 -0
  140. package/lib/combo-box/themes/halo/light/index.js +8 -0
  141. package/lib/combo-box/themes/solar/charcoal/index.js +8 -0
  142. package/lib/combo-box/themes/solar/pearl/index.js +8 -0
  143. package/lib/counter/custom-elements.json +35 -0
  144. package/lib/counter/index.d.ts +89 -0
  145. package/lib/counter/index.js +155 -0
  146. package/lib/counter/themes/halo/dark/index.js +3 -0
  147. package/lib/counter/themes/halo/light/index.js +3 -0
  148. package/lib/counter/themes/solar/charcoal/index.js +3 -0
  149. package/lib/counter/themes/solar/pearl/index.js +3 -0
  150. package/lib/counter/utils.d.ts +13 -0
  151. package/lib/counter/utils.js +52 -0
  152. package/lib/datetime-picker/custom-elements.json +333 -0
  153. package/lib/datetime-picker/index.d.ts +498 -0
  154. package/lib/datetime-picker/index.js +1164 -0
  155. package/lib/datetime-picker/locales.d.ts +8 -0
  156. package/lib/datetime-picker/locales.js +46 -0
  157. package/lib/datetime-picker/themes/halo/dark/index.js +7 -0
  158. package/lib/datetime-picker/themes/halo/light/index.js +7 -0
  159. package/lib/datetime-picker/themes/solar/charcoal/index.js +7 -0
  160. package/lib/datetime-picker/themes/solar/pearl/index.js +7 -0
  161. package/lib/datetime-picker/types.d.ts +3 -0
  162. package/lib/datetime-picker/types.js +1 -0
  163. package/lib/datetime-picker/utils.d.ts +55 -0
  164. package/lib/datetime-picker/utils.js +92 -0
  165. package/lib/dialog/custom-elements.json +136 -0
  166. package/lib/dialog/draggable-element.d.ts +14 -0
  167. package/lib/dialog/draggable-element.js +221 -0
  168. package/lib/dialog/index.d.ts +199 -0
  169. package/lib/dialog/index.js +331 -0
  170. package/lib/dialog/themes/halo/dark/index.js +7 -0
  171. package/lib/dialog/themes/halo/light/index.js +7 -0
  172. package/lib/dialog/themes/solar/charcoal/index.js +7 -0
  173. package/lib/dialog/themes/solar/pearl/index.js +7 -0
  174. package/lib/email-field/custom-elements.json +199 -0
  175. package/lib/email-field/index.d.ts +152 -0
  176. package/lib/email-field/index.js +287 -0
  177. package/lib/email-field/themes/halo/dark/index.js +3 -0
  178. package/lib/email-field/themes/halo/light/index.js +3 -0
  179. package/lib/email-field/themes/solar/charcoal/index.js +3 -0
  180. package/lib/email-field/themes/solar/pearl/index.js +3 -0
  181. package/lib/events.d.ts +121 -0
  182. package/lib/events.js +2 -0
  183. package/lib/flag/custom-elements.json +35 -0
  184. package/lib/flag/index.d.ts +94 -0
  185. package/lib/flag/index.js +168 -0
  186. package/lib/flag/themes/halo/dark/index.js +2 -0
  187. package/lib/flag/themes/halo/light/index.js +2 -0
  188. package/lib/flag/themes/solar/charcoal/index.js +2 -0
  189. package/lib/flag/themes/solar/pearl/index.js +2 -0
  190. package/lib/flag/utils/FlagLoader.d.ts +47 -0
  191. package/lib/flag/utils/FlagLoader.js +86 -0
  192. package/lib/header/custom-elements.json +36 -0
  193. package/lib/header/index.d.ts +46 -0
  194. package/lib/header/index.js +76 -0
  195. package/lib/header/themes/halo/dark/index.js +2 -0
  196. package/lib/header/themes/halo/light/index.js +2 -0
  197. package/lib/header/themes/solar/charcoal/index.js +2 -0
  198. package/lib/header/themes/solar/pearl/index.js +2 -0
  199. package/lib/heatmap/custom-elements.json +151 -0
  200. package/lib/heatmap/helpers/color.d.ts +30 -0
  201. package/lib/heatmap/helpers/color.js +68 -0
  202. package/lib/heatmap/helpers/text.d.ts +26 -0
  203. package/lib/heatmap/helpers/text.js +91 -0
  204. package/lib/heatmap/helpers/track.d.ts +102 -0
  205. package/lib/heatmap/helpers/track.js +160 -0
  206. package/lib/heatmap/helpers/types.d.ts +40 -0
  207. package/lib/heatmap/helpers/types.js +1 -0
  208. package/lib/heatmap/index.d.ts +453 -0
  209. package/lib/heatmap/index.js +1104 -0
  210. package/lib/heatmap/themes/halo/dark/index.js +4 -0
  211. package/lib/heatmap/themes/halo/light/index.js +4 -0
  212. package/lib/heatmap/themes/solar/charcoal/index.js +4 -0
  213. package/lib/heatmap/themes/solar/pearl/index.js +4 -0
  214. package/lib/icon/custom-elements.json +34 -0
  215. package/lib/icon/index.d.ts +87 -0
  216. package/lib/icon/index.js +161 -0
  217. package/lib/icon/themes/halo/dark/index.js +2 -0
  218. package/lib/icon/themes/halo/light/index.js +2 -0
  219. package/lib/icon/themes/solar/charcoal/index.js +2 -0
  220. package/lib/icon/themes/solar/pearl/index.js +2 -0
  221. package/lib/icon/utils/IconLoader.d.ts +47 -0
  222. package/lib/icon/utils/IconLoader.js +86 -0
  223. package/lib/index.d.ts +2 -0
  224. package/lib/index.js +2 -0
  225. package/lib/interactive-chart/custom-elements.json +86 -0
  226. package/lib/interactive-chart/helpers/merge.d.ts +15 -0
  227. package/lib/interactive-chart/helpers/merge.js +28 -0
  228. package/lib/interactive-chart/helpers/types.d.ts +45 -0
  229. package/lib/interactive-chart/helpers/types.js +6 -0
  230. package/lib/interactive-chart/index.d.ts +380 -0
  231. package/lib/interactive-chart/index.js +1093 -0
  232. package/lib/interactive-chart/themes/halo/dark/index.js +3 -0
  233. package/lib/interactive-chart/themes/halo/light/index.js +3 -0
  234. package/lib/interactive-chart/themes/solar/charcoal/index.js +3 -0
  235. package/lib/interactive-chart/themes/solar/pearl/index.js +3 -0
  236. package/lib/item/custom-elements.json +153 -0
  237. package/lib/item/helpers/types.d.ts +57 -0
  238. package/lib/item/helpers/types.js +1 -0
  239. package/lib/item/index.d.ts +149 -0
  240. package/lib/item/index.js +252 -0
  241. package/lib/item/themes/halo/dark/index.js +4 -0
  242. package/lib/item/themes/halo/light/index.js +4 -0
  243. package/lib/item/themes/solar/charcoal/index.js +4 -0
  244. package/lib/item/themes/solar/pearl/index.js +4 -0
  245. package/lib/jsx.d.ts +223 -0
  246. package/lib/label/custom-elements.json +52 -0
  247. package/lib/label/index.d.ts +102 -0
  248. package/lib/label/index.js +252 -0
  249. package/lib/label/themes/halo/dark/index.js +3 -0
  250. package/lib/label/themes/halo/light/index.js +3 -0
  251. package/lib/label/themes/solar/charcoal/index.js +3 -0
  252. package/lib/label/themes/solar/pearl/index.js +3 -0
  253. package/lib/layout/custom-elements.json +163 -0
  254. package/lib/layout/index.d.ts +107 -0
  255. package/lib/layout/index.js +215 -0
  256. package/lib/layout/themes/halo/dark/index.js +2 -0
  257. package/lib/layout/themes/halo/light/index.js +2 -0
  258. package/lib/layout/themes/solar/charcoal/index.js +2 -0
  259. package/lib/layout/themes/solar/pearl/index.js +2 -0
  260. package/lib/led-gauge/custom-elements.json +113 -0
  261. package/lib/led-gauge/index.d.ts +143 -0
  262. package/lib/led-gauge/index.js +440 -0
  263. package/lib/led-gauge/themes/halo/dark/index.js +3 -0
  264. package/lib/led-gauge/themes/halo/light/index.js +3 -0
  265. package/lib/led-gauge/themes/solar/charcoal/index.js +3 -0
  266. package/lib/led-gauge/themes/solar/pearl/index.js +3 -0
  267. package/lib/list/custom-elements.json +111 -0
  268. package/lib/list/extensible-function.d.ts +8 -0
  269. package/lib/list/extensible-function.js +13 -0
  270. package/lib/list/helpers/list-renderer.d.ts +9 -0
  271. package/lib/list/helpers/list-renderer.js +35 -0
  272. package/lib/list/helpers/types.d.ts +3 -0
  273. package/lib/list/helpers/types.js +1 -0
  274. package/lib/list/index.d.ts +292 -0
  275. package/lib/list/index.js +604 -0
  276. package/lib/list/renderer.d.ts +36 -0
  277. package/lib/list/renderer.js +9 -0
  278. package/lib/list/themes/halo/dark/index.js +3 -0
  279. package/lib/list/themes/halo/light/index.js +3 -0
  280. package/lib/list/themes/solar/charcoal/index.js +3 -0
  281. package/lib/list/themes/solar/pearl/index.js +3 -0
  282. package/lib/loader/custom-elements.json +9 -0
  283. package/lib/loader/index.d.ts +41 -0
  284. package/lib/loader/index.js +65 -0
  285. package/lib/loader/themes/halo/dark/index.js +2 -0
  286. package/lib/loader/themes/halo/light/index.js +2 -0
  287. package/lib/loader/themes/solar/charcoal/index.js +2 -0
  288. package/lib/loader/themes/solar/pearl/index.js +2 -0
  289. package/lib/multi-input/custom-elements.json +238 -0
  290. package/lib/multi-input/helpers/types.d.ts +11 -0
  291. package/lib/multi-input/helpers/types.js +1 -0
  292. package/lib/multi-input/index.d.ts +297 -0
  293. package/lib/multi-input/index.js +591 -0
  294. package/lib/multi-input/themes/halo/dark/index.js +4 -0
  295. package/lib/multi-input/themes/halo/light/index.js +4 -0
  296. package/lib/multi-input/themes/solar/charcoal/index.js +4 -0
  297. package/lib/multi-input/themes/solar/pearl/index.js +4 -0
  298. package/lib/notification/custom-elements.json +95 -0
  299. package/lib/notification/elements/notification-tray.d.ts +97 -0
  300. package/lib/notification/elements/notification-tray.js +170 -0
  301. package/lib/notification/elements/notification.d.ts +90 -0
  302. package/lib/notification/elements/notification.js +157 -0
  303. package/lib/notification/helpers/status.d.ts +30 -0
  304. package/lib/notification/helpers/status.js +130 -0
  305. package/lib/notification/helpers/types.d.ts +10 -0
  306. package/lib/notification/helpers/types.js +1 -0
  307. package/lib/notification/index.d.ts +2 -0
  308. package/lib/notification/index.js +2 -0
  309. package/lib/notification/themes/halo/dark/index.js +5 -0
  310. package/lib/notification/themes/halo/light/index.js +5 -0
  311. package/lib/notification/themes/solar/charcoal/index.js +5 -0
  312. package/lib/notification/themes/solar/pearl/index.js +5 -0
  313. package/lib/number-field/custom-elements.json +200 -0
  314. package/lib/number-field/index.d.ts +294 -0
  315. package/lib/number-field/index.js +708 -0
  316. package/lib/number-field/themes/halo/dark/index.js +3 -0
  317. package/lib/number-field/themes/halo/light/index.js +3 -0
  318. package/lib/number-field/themes/solar/charcoal/index.js +3 -0
  319. package/lib/number-field/themes/solar/pearl/index.js +3 -0
  320. package/lib/overlay/custom-elements.json +342 -0
  321. package/lib/overlay/elements/overlay-backdrop.d.ts +46 -0
  322. package/lib/overlay/elements/overlay-backdrop.js +67 -0
  323. package/lib/overlay/elements/overlay-viewport.d.ts +40 -0
  324. package/lib/overlay/elements/overlay-viewport.js +56 -0
  325. package/lib/overlay/elements/overlay.d.ts +403 -0
  326. package/lib/overlay/elements/overlay.js +1427 -0
  327. package/lib/overlay/helpers/functions.d.ts +13 -0
  328. package/lib/overlay/helpers/functions.js +16 -0
  329. package/lib/overlay/helpers/types.d.ts +97 -0
  330. package/lib/overlay/helpers/types.js +16 -0
  331. package/lib/overlay/index.d.ts +2 -0
  332. package/lib/overlay/index.js +1 -0
  333. package/lib/overlay/managers/backdrop-manager.d.ts +45 -0
  334. package/lib/overlay/managers/backdrop-manager.js +96 -0
  335. package/lib/overlay/managers/close-manager.d.ts +54 -0
  336. package/lib/overlay/managers/close-manager.js +138 -0
  337. package/lib/overlay/managers/focus-manager.d.ts +71 -0
  338. package/lib/overlay/managers/focus-manager.js +228 -0
  339. package/lib/overlay/managers/interaction-lock-manager.d.ts +138 -0
  340. package/lib/overlay/managers/interaction-lock-manager.js +375 -0
  341. package/lib/overlay/managers/viewport-manager.d.ts +93 -0
  342. package/lib/overlay/managers/viewport-manager.js +207 -0
  343. package/lib/overlay/managers/zindex-manager.d.ts +80 -0
  344. package/lib/overlay/managers/zindex-manager.js +195 -0
  345. package/lib/overlay/themes/halo/dark/index.js +4 -0
  346. package/lib/overlay/themes/halo/light/index.js +4 -0
  347. package/lib/overlay/themes/solar/charcoal/index.js +4 -0
  348. package/lib/overlay/themes/solar/pearl/index.js +4 -0
  349. package/lib/overlay-menu/custom-elements.json +196 -0
  350. package/lib/overlay-menu/helpers/types.d.ts +8 -0
  351. package/lib/overlay-menu/helpers/types.js +1 -0
  352. package/lib/overlay-menu/helpers/uuid.d.ts +7 -0
  353. package/lib/overlay-menu/helpers/uuid.js +13 -0
  354. package/lib/overlay-menu/index.d.ts +380 -0
  355. package/lib/overlay-menu/index.js +921 -0
  356. package/lib/overlay-menu/managers/menu-manager.d.ts +98 -0
  357. package/lib/overlay-menu/managers/menu-manager.js +240 -0
  358. package/lib/overlay-menu/themes/halo/dark/index.js +5 -0
  359. package/lib/overlay-menu/themes/halo/light/index.js +5 -0
  360. package/lib/overlay-menu/themes/solar/charcoal/index.js +5 -0
  361. package/lib/overlay-menu/themes/solar/pearl/index.js +5 -0
  362. package/lib/pagination/custom-elements.json +93 -0
  363. package/lib/pagination/helpers/types.d.ts +9 -0
  364. package/lib/pagination/helpers/types.js +1 -0
  365. package/lib/pagination/index.d.ts +207 -0
  366. package/lib/pagination/index.js +400 -0
  367. package/lib/pagination/themes/halo/dark/index.js +6 -0
  368. package/lib/pagination/themes/halo/light/index.js +6 -0
  369. package/lib/pagination/themes/solar/charcoal/index.js +6 -0
  370. package/lib/pagination/themes/solar/pearl/index.js +6 -0
  371. package/lib/panel/custom-elements.json +39 -0
  372. package/lib/panel/index.d.ts +48 -0
  373. package/lib/panel/index.js +77 -0
  374. package/lib/panel/themes/halo/dark/index.js +2 -0
  375. package/lib/panel/themes/halo/light/index.js +2 -0
  376. package/lib/panel/themes/solar/charcoal/index.js +2 -0
  377. package/lib/panel/themes/solar/pearl/index.js +2 -0
  378. package/lib/password-field/custom-elements.json +156 -0
  379. package/lib/password-field/index.d.ts +140 -0
  380. package/lib/password-field/index.js +258 -0
  381. package/lib/password-field/themes/halo/dark/index.js +3 -0
  382. package/lib/password-field/themes/halo/light/index.js +3 -0
  383. package/lib/password-field/themes/solar/charcoal/index.js +3 -0
  384. package/lib/password-field/themes/solar/pearl/index.js +3 -0
  385. package/lib/pill/custom-elements.json +95 -0
  386. package/lib/pill/index.d.ts +97 -0
  387. package/lib/pill/index.js +162 -0
  388. package/lib/pill/themes/halo/dark/index.js +3 -0
  389. package/lib/pill/themes/halo/light/index.js +3 -0
  390. package/lib/pill/themes/solar/charcoal/index.js +3 -0
  391. package/lib/pill/themes/solar/pearl/index.js +3 -0
  392. package/lib/progress-bar/custom-elements.json +58 -0
  393. package/lib/progress-bar/index.d.ts +82 -0
  394. package/lib/progress-bar/index.js +159 -0
  395. package/lib/progress-bar/themes/halo/dark/index.js +2 -0
  396. package/lib/progress-bar/themes/halo/light/index.js +2 -0
  397. package/lib/progress-bar/themes/solar/charcoal/index.js +2 -0
  398. package/lib/progress-bar/themes/solar/pearl/index.js +2 -0
  399. package/lib/radio-button/custom-elements.json +84 -0
  400. package/lib/radio-button/index.d.ts +106 -0
  401. package/lib/radio-button/index.js +195 -0
  402. package/lib/radio-button/radio-button-registry.d.ts +21 -0
  403. package/lib/radio-button/radio-button-registry.js +40 -0
  404. package/lib/radio-button/themes/halo/dark/index.js +3 -0
  405. package/lib/radio-button/themes/halo/light/index.js +3 -0
  406. package/lib/radio-button/themes/solar/charcoal/index.js +3 -0
  407. package/lib/radio-button/themes/solar/pearl/index.js +3 -0
  408. package/lib/rating/custom-elements.json +58 -0
  409. package/lib/rating/index.d.ts +91 -0
  410. package/lib/rating/index.js +158 -0
  411. package/lib/rating/themes/halo/dark/index.js +2 -0
  412. package/lib/rating/themes/halo/light/index.js +2 -0
  413. package/lib/rating/themes/solar/charcoal/index.js +2 -0
  414. package/lib/rating/themes/solar/pearl/index.js +2 -0
  415. package/lib/search-field/custom-elements.json +173 -0
  416. package/lib/search-field/index.d.ts +134 -0
  417. package/lib/search-field/index.js +254 -0
  418. package/lib/search-field/themes/halo/dark/index.js +3 -0
  419. package/lib/search-field/themes/halo/light/index.js +3 -0
  420. package/lib/search-field/themes/solar/charcoal/index.js +3 -0
  421. package/lib/search-field/themes/solar/pearl/index.js +3 -0
  422. package/lib/select/custom-elements.json +103 -0
  423. package/lib/select/helpers/types.d.ts +3 -0
  424. package/lib/select/helpers/types.js +1 -0
  425. package/lib/select/index.d.ts +388 -0
  426. package/lib/select/index.js +942 -0
  427. package/lib/select/themes/halo/dark/index.js +5 -0
  428. package/lib/select/themes/halo/light/index.js +5 -0
  429. package/lib/select/themes/solar/charcoal/index.js +5 -0
  430. package/lib/select/themes/solar/pearl/index.js +5 -0
  431. package/lib/sidebar-layout/custom-elements.json +72 -0
  432. package/lib/sidebar-layout/index.d.ts +69 -0
  433. package/lib/sidebar-layout/index.js +135 -0
  434. package/lib/sidebar-layout/themes/halo/dark/index.js +3 -0
  435. package/lib/sidebar-layout/themes/halo/light/index.js +3 -0
  436. package/lib/sidebar-layout/themes/solar/charcoal/index.js +3 -0
  437. package/lib/sidebar-layout/themes/solar/pearl/index.js +3 -0
  438. package/lib/slider/custom-elements.json +181 -0
  439. package/lib/slider/index.d.ts +409 -0
  440. package/lib/slider/index.js +1188 -0
  441. package/lib/slider/themes/halo/dark/index.js +3 -0
  442. package/lib/slider/themes/halo/light/index.js +3 -0
  443. package/lib/slider/themes/solar/charcoal/index.js +3 -0
  444. package/lib/slider/themes/solar/pearl/index.js +3 -0
  445. package/lib/sparkline/custom-elements.json +59 -0
  446. package/lib/sparkline/index.d.ts +107 -0
  447. package/lib/sparkline/index.js +188 -0
  448. package/lib/sparkline/themes/halo/dark/index.js +2 -0
  449. package/lib/sparkline/themes/halo/light/index.js +2 -0
  450. package/lib/sparkline/themes/solar/charcoal/index.js +2 -0
  451. package/lib/sparkline/themes/solar/pearl/index.js +2 -0
  452. package/lib/swing-gauge/const.d.ts +22 -0
  453. package/lib/swing-gauge/const.js +26 -0
  454. package/lib/swing-gauge/custom-elements.json +109 -0
  455. package/lib/swing-gauge/helpers.d.ts +8 -0
  456. package/lib/swing-gauge/helpers.js +105 -0
  457. package/lib/swing-gauge/index.d.ts +294 -0
  458. package/lib/swing-gauge/index.js +762 -0
  459. package/lib/swing-gauge/themes/halo/dark/index.js +3 -0
  460. package/lib/swing-gauge/themes/halo/light/index.js +3 -0
  461. package/lib/swing-gauge/themes/solar/charcoal/index.js +3 -0
  462. package/lib/swing-gauge/themes/solar/pearl/index.js +3 -0
  463. package/lib/swing-gauge/types.d.ts +34 -0
  464. package/lib/swing-gauge/types.js +1 -0
  465. package/lib/tab/custom-elements.json +123 -0
  466. package/lib/tab/index.d.ts +118 -0
  467. package/lib/tab/index.js +211 -0
  468. package/lib/tab/themes/halo/dark/index.js +4 -0
  469. package/lib/tab/themes/halo/light/index.js +4 -0
  470. package/lib/tab/themes/solar/charcoal/index.js +4 -0
  471. package/lib/tab/themes/solar/pearl/index.js +4 -0
  472. package/lib/tab-bar/custom-elements.json +52 -0
  473. package/lib/tab-bar/helpers/animate.d.ts +16 -0
  474. package/lib/tab-bar/helpers/animate.js +53 -0
  475. package/lib/tab-bar/index.d.ts +108 -0
  476. package/lib/tab-bar/index.js +220 -0
  477. package/lib/tab-bar/themes/halo/dark/index.js +4 -0
  478. package/lib/tab-bar/themes/halo/light/index.js +4 -0
  479. package/lib/tab-bar/themes/solar/charcoal/index.js +4 -0
  480. package/lib/tab-bar/themes/solar/pearl/index.js +4 -0
  481. package/lib/text-field/custom-elements.json +210 -0
  482. package/lib/text-field/index.d.ts +171 -0
  483. package/lib/text-field/index.js +319 -0
  484. package/lib/text-field/themes/halo/dark/index.js +3 -0
  485. package/lib/text-field/themes/halo/light/index.js +3 -0
  486. package/lib/text-field/themes/solar/charcoal/index.js +3 -0
  487. package/lib/text-field/themes/solar/pearl/index.js +3 -0
  488. package/lib/time-picker/custom-elements.json +124 -0
  489. package/lib/time-picker/index.d.ts +379 -0
  490. package/lib/time-picker/index.js +777 -0
  491. package/lib/time-picker/themes/halo/dark/index.js +4 -0
  492. package/lib/time-picker/themes/halo/light/index.js +4 -0
  493. package/lib/time-picker/themes/solar/charcoal/index.js +4 -0
  494. package/lib/time-picker/themes/solar/pearl/index.js +4 -0
  495. package/lib/toggle/custom-elements.json +84 -0
  496. package/lib/toggle/index.d.ts +77 -0
  497. package/lib/toggle/index.js +134 -0
  498. package/lib/toggle/themes/halo/dark/index.js +2 -0
  499. package/lib/toggle/themes/halo/light/index.js +2 -0
  500. package/lib/toggle/themes/solar/charcoal/index.js +2 -0
  501. package/lib/toggle/themes/solar/pearl/index.js +2 -0
  502. package/lib/tooltip/custom-elements.json +62 -0
  503. package/lib/tooltip/elements/title-tooltip.d.ts +1 -0
  504. package/lib/tooltip/elements/title-tooltip.js +18 -0
  505. package/lib/tooltip/elements/tooltip-element.d.ts +21 -0
  506. package/lib/tooltip/elements/tooltip-element.js +54 -0
  507. package/lib/tooltip/helpers/overflow-tooltip.d.ts +9 -0
  508. package/lib/tooltip/helpers/overflow-tooltip.js +19 -0
  509. package/lib/tooltip/helpers/renderer.d.ts +8 -0
  510. package/lib/tooltip/helpers/renderer.js +11 -0
  511. package/lib/tooltip/helpers/types.d.ts +23 -0
  512. package/lib/tooltip/helpers/types.js +1 -0
  513. package/lib/tooltip/index.d.ts +232 -0
  514. package/lib/tooltip/index.js +479 -0
  515. package/lib/tooltip/managers/tooltip-manager.d.ts +15 -0
  516. package/lib/tooltip/managers/tooltip-manager.js +144 -0
  517. package/lib/tooltip/themes/halo/dark/index.js +3 -0
  518. package/lib/tooltip/themes/halo/light/index.js +3 -0
  519. package/lib/tooltip/themes/solar/charcoal/index.js +3 -0
  520. package/lib/tooltip/themes/solar/pearl/index.js +3 -0
  521. package/lib/tornado-chart/custom-elements.json +45 -0
  522. package/lib/tornado-chart/elements/tornado-chart.d.ts +78 -0
  523. package/lib/tornado-chart/elements/tornado-chart.js +125 -0
  524. package/lib/tornado-chart/elements/tornado-item.d.ts +110 -0
  525. package/lib/tornado-chart/elements/tornado-item.js +209 -0
  526. package/lib/tornado-chart/index.d.ts +2 -0
  527. package/lib/tornado-chart/index.js +2 -0
  528. package/lib/tornado-chart/themes/halo/dark/index.js +6 -0
  529. package/lib/tornado-chart/themes/halo/light/index.js +6 -0
  530. package/lib/tornado-chart/themes/solar/charcoal/index.js +6 -0
  531. package/lib/tornado-chart/themes/solar/pearl/index.js +6 -0
  532. package/lib/tree/custom-elements.json +100 -0
  533. package/lib/tree/elements/tree-item.d.ts +96 -0
  534. package/lib/tree/elements/tree-item.js +182 -0
  535. package/lib/tree/elements/tree.d.ts +156 -0
  536. package/lib/tree/elements/tree.js +286 -0
  537. package/lib/tree/helpers/renderer.d.ts +5 -0
  538. package/lib/tree/helpers/renderer.js +33 -0
  539. package/lib/tree/helpers/types.d.ts +17 -0
  540. package/lib/tree/helpers/types.js +1 -0
  541. package/lib/tree/index.d.ts +4 -0
  542. package/lib/tree/index.js +3 -0
  543. package/lib/tree/managers/tree-manager.d.ts +236 -0
  544. package/lib/tree/managers/tree-manager.js +379 -0
  545. package/lib/tree/themes/halo/dark/index.js +7 -0
  546. package/lib/tree/themes/halo/light/index.js +7 -0
  547. package/lib/tree/themes/solar/charcoal/index.js +7 -0
  548. package/lib/tree/themes/solar/pearl/index.js +7 -0
  549. package/lib/tree-select/custom-elements.json +107 -0
  550. package/lib/tree-select/helpers/types.d.ts +4 -0
  551. package/lib/tree-select/helpers/types.js +1 -0
  552. package/lib/tree-select/index.d.ts +400 -0
  553. package/lib/tree-select/index.js +881 -0
  554. package/lib/tree-select/themes/halo/dark/index.js +12 -0
  555. package/lib/tree-select/themes/halo/light/index.js +12 -0
  556. package/lib/tree-select/themes/solar/charcoal/index.js +12 -0
  557. package/lib/tree-select/themes/solar/pearl/index.js +12 -0
  558. package/package.json +9 -9
@@ -0,0 +1,1146 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { ControlElement, css, customElement, html, property, query, styleMap, WarningNotice, FocusedPropertyKey, eventOptions, ifDefined } from '@refinitiv-ui/core';
8
+ import { translate } from '@refinitiv-ui/translate';
9
+ import { AnimationTaskRunner, CollectionComposer, TimeoutTaskRunner } from '@refinitiv-ui/utils';
10
+ import '@refinitiv-ui/phrasebook/lib/locale/en/combo-box';
11
+ import '../icon';
12
+ import '../overlay';
13
+ import '../list';
14
+ import '../counter';
15
+ import '../text-field';
16
+ import '../tooltip';
17
+ import { ListRenderer as ComboBoxRenderer } from '../list';
18
+ import { defaultFilter } from './helpers/filter';
19
+ import { CustomKeyboardEvent } from './helpers/keyboard-event';
20
+ import { VERSION } from '../';
21
+ export { ComboBoxRenderer };
22
+ const QUERY_DEBOUNCE_RATE = 0;
23
+ // Maximum number of characters to display in multiple mode
24
+ const MULTIPLE_LABEL_MAX_SIZE = 250;
25
+ // Separator for labels in multiple mode
26
+ // Double space is expected
27
+ const MULTIPLE_LABEL_SEPARATOR = '; ';
28
+ const POPUP_POSITION = ['bottom-start', 'top-start'];
29
+ const valueFormatWarning = new WarningNotice('The specified \'values\' format does not conform to the required format.');
30
+ const freeTextMultipleWarning = new WarningNotice('"free-text" mode is not compatible with "multiple" mode');
31
+ /**
32
+ * Combines a popup with a filterable selection list
33
+ *
34
+ * @attr {boolean} readonly - Set readonly state
35
+ * @prop {boolean} [readonly=false] - Set readonly state
36
+ *
37
+ * @attr {boolean} disabled - Set disabled state
38
+ * @prop {boolean} [disabled=false] - Set disabled state
39
+ *
40
+ * @attr {string} name - Set name of the element
41
+ * @prop {string} [name=''] - Set name of the element
42
+ *
43
+ * @fires value-changed - Dispatched when value changes
44
+ * @fires query-changed - Dispatched when query changes
45
+ * @fires opened-changed - Dispatched when opened state changes
46
+ */
47
+ let ComboBox = class ComboBox extends ControlElement {
48
+ constructor() {
49
+ super(...arguments);
50
+ /**
51
+ * Custom filter for static data
52
+ * Set this to null when data is filtered externally, eg XHR
53
+ * @type {ComboBoxFilter<T> | null}
54
+ */
55
+ this.filter = defaultFilter(this);
56
+ /**
57
+ * Renderer used to render list item elements
58
+ * @type {ComboBoxRenderer}
59
+ */
60
+ this.renderer = new ComboBoxRenderer(this);
61
+ this._multiple = false;
62
+ /**
63
+ * Track opened state of popup
64
+ */
65
+ this.opened = false;
66
+ /**
67
+ * Placeholder for input field
68
+ */
69
+ this.placeholder = '';
70
+ /**
71
+ * Show clears button
72
+ */
73
+ this.clears = false;
74
+ this._freeText = false;
75
+ /**
76
+ * Set state to error
77
+ */
78
+ this.error = false;
79
+ /**
80
+ * Set state to warning
81
+ */
82
+ this.warning = false;
83
+ // Internal reference to debounce rate
84
+ this._queryDebounceRate = QUERY_DEBOUNCE_RATE;
85
+ // Debounces the query using queryDebounceRate
86
+ this.queryDebouncer = new TimeoutTaskRunner(this._queryDebounceRate);
87
+ this._data = []; // Local data object set through data setter
88
+ /**
89
+ * `value` always initialised before `data`, so it cannot query and select items when using attribute.
90
+ * This variable is to store value for selecting a data item after data has been initialised.
91
+ */
92
+ this.cachedValue = '';
93
+ this._query = null; // Internally set and store query value
94
+ /**
95
+ * Composer used to query and modify item state.
96
+ */
97
+ this.composer = new CollectionComposer([]);
98
+ /**
99
+ * Initiate one time popup rendering
100
+ */
101
+ this.lazyRendered = false;
102
+ /**
103
+ * Throttle popup resizing
104
+ */
105
+ this.resizeThrottler = new AnimationTaskRunner();
106
+ /**
107
+ * Input text to display in text field while typing
108
+ * Use because of query debouncer to avoid input to be not in sync with query
109
+ */
110
+ this.inputText = '';
111
+ /**
112
+ * Used to store free text value
113
+ * If freeText mode is defined
114
+ */
115
+ this.freeTextValue = '';
116
+ /**
117
+ * Hold popup styling applied on open
118
+ */
119
+ this.popupDynamicStyles = {};
120
+ /**
121
+ * Use to call request update when CC changes its value
122
+ * @returns {void}
123
+ */
124
+ this.modificationHandler = () => this.modificationUpdate();
125
+ this._resolvedData = [];
126
+ this.dataPromiseCounter = 0; // A counter to detect that the promise resolved is the last promise set
127
+ /**
128
+ * Mark combobox with loading flag
129
+ * Used in conjunction with data promise
130
+ */
131
+ this.loading = false;
132
+ this.shouldOpenOnFocus = false;
133
+ }
134
+ /**
135
+ * Element version number
136
+ * @returns version number
137
+ */
138
+ static get version() {
139
+ return VERSION;
140
+ }
141
+ /**
142
+ * A `CSSResult` that will be used
143
+ * to style the host, slotted children
144
+ * and the internal template of the element.
145
+ * @return CSS template
146
+ */
147
+ static get styles() {
148
+ return css `
149
+ :host {
150
+ display: inline-flex;
151
+ flex-flow: row nowrap;
152
+ user-select: none;
153
+ outline: none;
154
+ }
155
+ [part=input-wrapper] {
156
+ cursor: pointer;
157
+ }
158
+ [part=input] {
159
+ cursor: text;
160
+ }
161
+ [part=input]::-ms-clear {
162
+ display: none;
163
+ }
164
+ [hidden] {
165
+ display: none !important;
166
+ }
167
+ `;
168
+ }
169
+ /**
170
+ * Multiple selection mode
171
+ * @param multiple true to set multiple mode
172
+ */
173
+ set multiple(multiple) {
174
+ if (multiple && this.freeText) {
175
+ freeTextMultipleWarning.show();
176
+ multiple = false;
177
+ }
178
+ const oldMultiple = this._multiple;
179
+ this._multiple = multiple;
180
+ void this.requestUpdate('multiple', oldMultiple);
181
+ }
182
+ get multiple() {
183
+ return this._multiple;
184
+ }
185
+ /**
186
+ * Allow to enter any value
187
+ * @param freeText true to set freeText mode
188
+ */
189
+ set freeText(freeText) {
190
+ if (this.multiple && freeText) {
191
+ freeTextMultipleWarning.show();
192
+ freeText = false;
193
+ }
194
+ if (!freeText) {
195
+ this.freeTextValue = '';
196
+ }
197
+ const oldFreeText = this._freeText;
198
+ this._freeText = freeText;
199
+ void this.requestUpdate('freeText', oldFreeText);
200
+ }
201
+ get freeText() {
202
+ return this._freeText;
203
+ }
204
+ /**
205
+ * Control query rate, defaults to 0
206
+ */
207
+ get queryDebounceRate() {
208
+ return this._queryDebounceRate;
209
+ }
210
+ set queryDebounceRate(value) {
211
+ const oldValue = this._queryDebounceRate;
212
+ if (value !== oldValue) {
213
+ this._queryDebounceRate = value;
214
+ this.queryDebouncer = new TimeoutTaskRunner(this._queryDebounceRate);
215
+ // no need to update as this is called for input changes
216
+ }
217
+ }
218
+ /**
219
+ * Data array to be displayed
220
+ * @type {ComboBoxData<T>}
221
+ */
222
+ get data() {
223
+ return this._data;
224
+ }
225
+ set data(value) {
226
+ this._data = value;
227
+ void this.resolveDataPromise(value);
228
+ }
229
+ /**
230
+ * Returns the first selected item value.
231
+ * Use `values` when multiple selection mode is enabled.
232
+ */
233
+ get value() {
234
+ return this.values[0] || '';
235
+ }
236
+ set value(value) {
237
+ /**
238
+ * Set the value if the data is ready,
239
+ * otherwise cache it for later.
240
+ */
241
+ if (this.composer.size) {
242
+ this.values = [value];
243
+ }
244
+ else {
245
+ this.cachedValue = value;
246
+ }
247
+ }
248
+ /**
249
+ * Returns a values collection of the currently
250
+ * selected item values
251
+ * @type {string[]}
252
+ */
253
+ get values() {
254
+ // In free text mode, compare selected to values
255
+ return this.freeTextValue ? [this.freeTextValue] : this.composerValues;
256
+ }
257
+ set values(values) {
258
+ if (!Array.isArray(values)) {
259
+ valueFormatWarning.show();
260
+ this.values = [];
261
+ }
262
+ else {
263
+ // Clone value arrays
264
+ const newValues = values.slice(0, this.multiple ? values.length : 1);
265
+ const oldValues = this.composerValues.slice();
266
+ // Create comparison strings to check for differences
267
+ const newComparison = newValues.sort().toString();
268
+ const oldComparison = oldValues.sort().toString();
269
+ // Should we update the selection state?
270
+ if (newComparison !== oldComparison) {
271
+ this.updateComposerValues(newValues);
272
+ void this.requestUpdate('values', oldValues);
273
+ }
274
+ }
275
+ }
276
+ /**
277
+ * Update composer values.
278
+ * @param newValues new values
279
+ * @returns {void}
280
+ */
281
+ updateComposerValues(newValues) {
282
+ this.queryItems((item, composer) => {
283
+ if (newValues.includes(composer.getItemPropertyValue(item, 'value'))) {
284
+ composer.setItemPropertyValue(item, 'selected', true);
285
+ return true;
286
+ }
287
+ composer.setItemPropertyValue(item, 'selected', false);
288
+ return false;
289
+ });
290
+ }
291
+ /**
292
+ * Query string applied to combo-box
293
+ * Set via internal text-field input
294
+ * @readonly
295
+ */
296
+ get query() {
297
+ return this._query;
298
+ }
299
+ set query(query) {
300
+ const oldVal = this._query;
301
+ this._query = query;
302
+ this.queryDebouncer.cancel();
303
+ if (oldVal !== this._query) {
304
+ this.clearHighlighted();
305
+ this.filterItems();
306
+ void this.requestUpdate('query', oldVal);
307
+ }
308
+ }
309
+ /**
310
+ * Label of selected value
311
+ * @returns Label to use, defaults to empty string
312
+ * @readonly
313
+ */
314
+ get label() {
315
+ const labels = this.selectedLabels;
316
+ if (labels.length <= 1) {
317
+ return labels[0] || '';
318
+ }
319
+ // multiple mode, do according to UX specs
320
+ const output = labels.join(MULTIPLE_LABEL_SEPARATOR);
321
+ return output.length > MULTIPLE_LABEL_MAX_SIZE ? `${output.slice(0, MULTIPLE_LABEL_MAX_SIZE - 3)}...` : output;
322
+ }
323
+ /**
324
+ * Get resolved data (if possible)
325
+ */
326
+ get resolvedData() {
327
+ return this._resolvedData;
328
+ }
329
+ /**
330
+ * Set resolved data
331
+ * @param value resolved data
332
+ */
333
+ set resolvedData(value) {
334
+ const oldValue = this._resolvedData;
335
+ if (value !== oldValue) {
336
+ if (Array.isArray(value)) {
337
+ this.composer = new CollectionComposer(value);
338
+ }
339
+ else {
340
+ this.composer = new CollectionComposer([]);
341
+ }
342
+ this.listenToComposer();
343
+ this._resolvedData = value;
344
+ /**
345
+ * Select using initialised the value once from attribute/property,
346
+ * only when there is no existing selections.
347
+ */
348
+ if (this.cachedValue && this.selection.length === 0) {
349
+ this.value = this.cachedValue;
350
+ this.cachedValue = ''; // Reset as it's only needed for initialisation
351
+ }
352
+ void this.requestUpdate('data', oldValue);
353
+ }
354
+ }
355
+ /**
356
+ * Used to resolve data when set as a promise
357
+ * @param data Data promise
358
+ * @returns Promise<void>
359
+ */
360
+ async resolveDataPromise(data) {
361
+ const dataPromiseCounter = this.dataPromiseCounter += 1;
362
+ let resolvedData;
363
+ if (data instanceof Promise) {
364
+ this.loading = true;
365
+ try {
366
+ resolvedData = await data;
367
+ }
368
+ catch (error) {
369
+ resolvedData = [];
370
+ }
371
+ }
372
+ else {
373
+ resolvedData = data;
374
+ }
375
+ if (dataPromiseCounter === this.dataPromiseCounter) {
376
+ this.resolvedData = resolvedData;
377
+ this.loading = false;
378
+ }
379
+ }
380
+ /**
381
+ * The the values from composer ignoring freeTextValue
382
+ */
383
+ get composerValues() {
384
+ return this.queryItemsByPropertyValue('selected', true)
385
+ .map(item => this.getItemPropertyValue(item, 'value'));
386
+ }
387
+ /**
388
+ * Return currently selected items
389
+ * This is distinct from values as for controls with persistence features
390
+ * it can be used to show current selection count and get the selection labels
391
+ * @returns List of selected items
392
+ */
393
+ get selection() {
394
+ return this.queryItemsByPropertyValue('selected', true).slice();
395
+ }
396
+ /**
397
+ * Count of selected items
398
+ * @returns Has selection
399
+ */
400
+ get selectionCount() {
401
+ return this.selection.length;
402
+ }
403
+ /**
404
+ * Determine if list has visible items
405
+ * @returns List has visible items or not
406
+ */
407
+ get listHasVisibleItems() {
408
+ return this.resolvedData.some(item => !this.getItemPropertyValue(item, 'hidden'));
409
+ }
410
+ /**
411
+ * Selected item
412
+ * @returns Has selection
413
+ */
414
+ get selectedItem() {
415
+ return this.queryItemsByPropertyValue('selected', true)[0];
416
+ }
417
+ /**
418
+ * Get a list of selected item labels
419
+ * @returns Has selection
420
+ */
421
+ get selectedLabels() {
422
+ return this.selection.map(selected => this.getItemPropertyValue(selected, 'label') || '');
423
+ }
424
+ /**
425
+ * Utility method - ensures correct composer is being listened to
426
+ * @returns {void}
427
+ */
428
+ listenToComposer() {
429
+ this.composer.on('modification', // Listen for modifications
430
+ this.modificationHandler // Update the template
431
+ );
432
+ }
433
+ /**
434
+ * Updates the element
435
+ * @param changedProperties Properties that has changed
436
+ * @returns {void}
437
+ */
438
+ update(changedProperties) {
439
+ const focusedChanged = changedProperties.has(FocusedPropertyKey);
440
+ // the opened logic is bound to focus state
441
+ if (focusedChanged) {
442
+ // When focus changes the popup can open only on tapstart
443
+ if (this.focused && this.shouldOpenOnFocus) {
444
+ this.setOpened(true);
445
+ }
446
+ else if (!this.focused) {
447
+ this.setOpened(false);
448
+ }
449
+ this.shouldOpenOnFocus = false;
450
+ }
451
+ /*
452
+ * data can be visible and opened changed = open
453
+ * or, opened is true and data; and contains visible data = open
454
+ * queries local properties first to short circuit querying map iteration
455
+ */
456
+ if (changedProperties.has('opened')) {
457
+ if (this.opened) {
458
+ // fulfil any queries if opened is changed
459
+ // this is the case if keyboard navigation is used
460
+ this.queryDebouncer.fulfil();
461
+ this.opening();
462
+ }
463
+ else {
464
+ this.clearHighlighted();
465
+ }
466
+ }
467
+ // combo-box may be opened programmatically (via opened attribute)
468
+ // make sure that the element correctly reacts on this change
469
+ if ((changedProperties.has('data') && this.opened && !this.focused) || focusedChanged) {
470
+ this.resetInput();
471
+ }
472
+ // If label is defined it means that there is an actual value
473
+ // Select input text to simplify clearing the value
474
+ if (focusedChanged && this.focused && this.label) {
475
+ this.inputEl.focus();
476
+ this.inputEl.select();
477
+ }
478
+ // Make sure that the first item is always highlighted
479
+ if (this.opened && (changedProperties.has('opened') || changedProperties.has('data') || changedProperties.has('query'))) {
480
+ this.highlightFirstItem();
481
+ }
482
+ // If data is set asynchronously while popup is opened
483
+ // list might not trigger popup update
484
+ if (changedProperties.has('data') && this.opened) {
485
+ this.forcePopupLayout();
486
+ }
487
+ super.update(changedProperties);
488
+ }
489
+ /**
490
+ * Called once after the component is first rendered
491
+ * @param changedProperties map of changed properties with old values
492
+ * @returns {void}
493
+ */
494
+ firstUpdated(changedProperties) {
495
+ super.firstUpdated(changedProperties);
496
+ this.addEventListener('keydown', this.onKeyDown);
497
+ this.addEventListener('tapstart', this.onTapStart);
498
+ }
499
+ /**
500
+ * Sets opened state and fires event
501
+ * Use this to set opened state when user interacts to the component
502
+ * @param opened True if opened
503
+ * @returns {void}
504
+ */
505
+ setOpened(opened) {
506
+ if (this.opened !== opened && this.notifyPropertyChange('opened', opened, true)) {
507
+ this.opened = opened;
508
+ }
509
+ }
510
+ /**
511
+ * Requests an update after a composer modification.
512
+ * @returns {void}
513
+ */
514
+ modificationUpdate() {
515
+ void this.requestUpdate();
516
+ }
517
+ /**
518
+ * Queries the composer for data items
519
+ * @param engine Composer query engine
520
+ * @returns Collection of matched items
521
+ */
522
+ queryItems(engine) {
523
+ return this.composer.queryItems(engine);
524
+ }
525
+ /**
526
+ * Queries the composer for data items,
527
+ * matching by property value.
528
+ * @param property Property name to query
529
+ * @param value Property value to match against
530
+ * @returns Collection of matched items
531
+ */
532
+ queryItemsByPropertyValue(property, value) {
533
+ return this.composer.queryItemsByPropertyValue(property, value, 0);
534
+ }
535
+ /**
536
+ * Gets the property value of an item
537
+ * @param item Original data item
538
+ * @param property Property name to get the value of
539
+ * @returns Value of the property
540
+ */
541
+ getItemPropertyValue(item, property) {
542
+ return this.composer.getItemPropertyValue(item, property);
543
+ }
544
+ /**
545
+ * Sets the property value of an item
546
+ * @param item Original data item
547
+ * @param property Property name to set the value of
548
+ * @param value New value of the property
549
+ * @returns {void}
550
+ */
551
+ setItemPropertyValue(item, property, value) {
552
+ this.composer.setItemPropertyValue(item, property, value);
553
+ }
554
+ /**
555
+ * Set width on popup using parent and --list-max-width if set
556
+ * @returns {void}
557
+ */
558
+ opening() {
559
+ this.lazyRendered = true;
560
+ this.restrictPopupWidth();
561
+ }
562
+ /**
563
+ * Scrolls to the currently selected item
564
+ * @returns {void}
565
+ */
566
+ scrollToSelected() {
567
+ var _a;
568
+ const item = this.selectedItem;
569
+ if (item) {
570
+ (_a = this.listEl) === null || _a === void 0 ? void 0 : _a.scrollToItem(item);
571
+ }
572
+ }
573
+ /**
574
+ * Highlights the item
575
+ * @param item data item to highlight
576
+ * @returns {void}
577
+ */
578
+ highlightItem(item) {
579
+ this.clearHighlighted();
580
+ this.setItemPropertyValue(item, 'highlighted', true);
581
+ }
582
+ /**
583
+ * Clears any highlighted items
584
+ * @returns {void}
585
+ */
586
+ clearHighlighted() {
587
+ this.queryItemsByPropertyValue('highlighted', true)
588
+ .forEach(item => this.setItemPropertyValue(item, 'highlighted', false));
589
+ }
590
+ /**
591
+ * Popup has to use max width if --list-max-width specified
592
+ * otherwise, popup should have same width as control or wider
593
+ * @returns {void}
594
+ */
595
+ restrictPopupWidth() {
596
+ /* istanbul ignore next */
597
+ if (this.offsetWidth === 0) {
598
+ // this code might happen only when opened has been set during initialisation
599
+ // or when display is set to none
600
+ this.resizeThrottler.schedule(() => {
601
+ if (this.offsetWidth) { /* must be here to avoid infinitive loop */
602
+ this.restrictPopupWidth();
603
+ void this.requestUpdate();
604
+ }
605
+ });
606
+ return;
607
+ }
608
+ const maxWidth = parseFloat(this.getComputedVariable('--list-max-width', 'none'));
609
+ let minWidth = this.offsetWidth;
610
+ // reset min-width if max-width less than min-width, otherwise browser won't apply max-width
611
+ if (maxWidth < minWidth) {
612
+ minWidth = 0;
613
+ }
614
+ this.popupDynamicStyles.minWidth = `${minWidth}px`;
615
+ }
616
+ /**
617
+ * Set the query string and run `query-change` event
618
+ * @param query query
619
+ * @returns void
620
+ */
621
+ setQuery(query) {
622
+ const oldQuery = this.query;
623
+ this.query = query; // reset debouncer here
624
+ if (oldQuery !== query) {
625
+ this.notifyPropertyChange('query', this.query);
626
+ }
627
+ }
628
+ /**
629
+ * Reset the input text to match label
630
+ * @returns {void}
631
+ */
632
+ resetInput() {
633
+ this.setQuery('');
634
+ this.inputText = this.multiple ? '' : (this.freeTextValue || this.label);
635
+ }
636
+ /**
637
+ * Filter the internal items by query
638
+ * Changes items' hidden state
639
+ * @returns {void}
640
+ */
641
+ filterItems() {
642
+ // if filter is null, it is off and external app is responsible
643
+ if (this.filter) {
644
+ // we do not produce a new list as it will loose all association with this composer
645
+ // unless we spent time re-applying this composer to a new list/composer
646
+ // instead we change the hidden state
647
+ // by list applying a queryItems itself and does not render hidden items
648
+ // filter declared here to avoid the possibility of being null if used directly in the callback
649
+ const filter = this.filter;
650
+ let groupHeaderItem = null;
651
+ this.queryItems((item, composer) => {
652
+ // do not filter hidden items
653
+ if (item.hidden) {
654
+ return false;
655
+ }
656
+ let result = false;
657
+ // support groups
658
+ if (composer.getItemPropertyValue(item, 'type') === 'header') {
659
+ groupHeaderItem = item;
660
+ }
661
+ else {
662
+ result = filter(item);
663
+ }
664
+ composer.setItemPropertyValue(item, 'hidden', !result);
665
+ composer.updateItemTimestamp(item);
666
+ if (result && groupHeaderItem && composer.getItemParent(groupHeaderItem) === composer.getItemParent(item)) {
667
+ composer.setItemPropertyValue(groupHeaderItem, 'hidden', false);
668
+ composer.updateItemTimestamp(groupHeaderItem);
669
+ groupHeaderItem = null;
670
+ }
671
+ return result;
672
+ });
673
+ }
674
+ this.forcePopupLayout();
675
+ }
676
+ /**
677
+ * Highlight the selected item or the first available item
678
+ * @returns {void}
679
+ */
680
+ highlightFirstItem() {
681
+ let selectedItem = null;
682
+ const highlightItem = this.queryItems((item, composer) => {
683
+ if (selectedItem || !this.canHighlightItem(item, composer)) {
684
+ return false;
685
+ }
686
+ if (composer.getItemPropertyValue(item, 'selected') === true) {
687
+ selectedItem = item;
688
+ }
689
+ return true;
690
+ })[0];
691
+ (selectedItem || highlightItem) && this.highlightItem(selectedItem || highlightItem);
692
+ }
693
+ /**
694
+ * Check if an item can be highlighted
695
+ * @param item Collection composer item
696
+ * @param composer Collection composer
697
+ * @returns can highlight
698
+ */
699
+ canHighlightItem(item, composer) {
700
+ let canHighlight = !(composer.getItemPropertyValue(item, 'hidden') === true
701
+ || (composer.getItemPropertyValue(item, 'type') || 'text') !== 'text'
702
+ || composer.getItemPropertyValue(item, 'disabled') === true
703
+ || composer.isItemLocked(item) === true);
704
+ // check ancestors
705
+ if (canHighlight) {
706
+ const parent = composer.getItemParent(item);
707
+ canHighlight = !parent || this.canHighlightItem(parent, composer);
708
+ }
709
+ return canHighlight;
710
+ }
711
+ /**
712
+ * https://github.com/juggle/resize-observer/issues/42
713
+ *
714
+ * This event ensures that ResizeObserver picks up resize events
715
+ * when popup is deeply nested inside shadow root.
716
+ * TODO: remove this workaround once ResizeObserver handles shadow root scenario
717
+ * @returns {void}
718
+ */
719
+ forcePopupLayout() {
720
+ window.dispatchEvent(new Event('animationiteration'));
721
+ }
722
+ /**
723
+ * Shift focus back to input.
724
+ * This method is required to prevent popup from focusing
725
+ * @returns {void}
726
+ */
727
+ shiftFocus() {
728
+ this.focus({
729
+ preventScroll: true
730
+ });
731
+ }
732
+ /**
733
+ * Handle text value change from text-field
734
+ * @param event Custom Event fired from text-field
735
+ * @returns {void}
736
+ */
737
+ onInputValueChanged(event) {
738
+ const inputText = event.detail.value;
739
+ /**
740
+ * Query is used to track if there is a query
741
+ * We always use it so the absence of it can be used to reapply the
742
+ * selected item's label, if applicable
743
+ */
744
+ this.queryDebouncer.schedule(() => {
745
+ this.setQuery(inputText);
746
+ });
747
+ // Reset text when clearing the value
748
+ if (!this.multiple && !inputText) {
749
+ this.setValueAndNotify('');
750
+ }
751
+ // always ensure that internal val matches input val
752
+ this.inputText = inputText;
753
+ // Used for free input. Never set it unless in free text mode
754
+ if (this.freeText) {
755
+ this.value = ''; // make sure that composer does not have selected
756
+ this.freeTextValue = inputText;
757
+ this.notifyPropertyChange('value', inputText);
758
+ }
759
+ this.setOpened(true);
760
+ }
761
+ /**
762
+ * Handle list value changed
763
+ * @returns {void}
764
+ */
765
+ onListValueChanged() {
766
+ // cascade value changed event
767
+ this.notifyPropertyChange('value', this.value);
768
+ this.onListInteraction();
769
+ }
770
+ /**
771
+ * Handle popup opened event
772
+ *
773
+ * Scrolls the current selection into view
774
+ * @returns {void}
775
+ */
776
+ onPopupOpened() {
777
+ this.scrollToSelected();
778
+ }
779
+ /**
780
+ * Handle popup closed event
781
+ *
782
+ * Ensures that popup state equals combo box opened prop
783
+ * @returns {void}
784
+ */
785
+ onPopupClosed() {
786
+ this.setOpened(false);
787
+ }
788
+ /**
789
+ * Run when input-wrapper is tapped
790
+ * @param event Tap event
791
+ * @returns {void}
792
+ */
793
+ onTapStart(event) {
794
+ // do nothing if disabled or readonly
795
+ if (this.readonly || this.disabled) {
796
+ return;
797
+ }
798
+ const path = event.composedPath();
799
+ if (this.clearsButtonEl && path.includes(this.clearsButtonEl)) {
800
+ this.onClearsButtonTap();
801
+ return;
802
+ }
803
+ if (path.includes(this.toggleButtonEl)) {
804
+ this.onToggleButtonTap();
805
+ return;
806
+ }
807
+ this.onInputWrapperTap();
808
+ }
809
+ /**
810
+ * Run when tap event happens on toggle button
811
+ * @returns {void}
812
+ */
813
+ onToggleButtonTap() {
814
+ if (this.opened) {
815
+ this.setOpened(false);
816
+ }
817
+ else {
818
+ this.openOnFocus();
819
+ }
820
+ }
821
+ /**
822
+ * Run when tap event happens on clears button
823
+ * @returns {void}
824
+ */
825
+ onClearsButtonTap() {
826
+ this.freeTextValue = '';
827
+ this.inputText = '';
828
+ this.setQuery('');
829
+ this.setValueAndNotify('');
830
+ this.openOnFocus();
831
+ }
832
+ /**
833
+ * Run when tap event happens on input wrapper
834
+ * excluding clears and toggles buttons
835
+ * @returns {void}
836
+ */
837
+ onInputWrapperTap() {
838
+ this.openOnFocus();
839
+ }
840
+ /**
841
+ * This flag is required to remove the frame gap
842
+ * between tap start and opening the popup
843
+ * @returns {void}
844
+ */
845
+ openOnFocus() {
846
+ if (this.opened) {
847
+ return;
848
+ }
849
+ if (this.focused) {
850
+ this.setOpened(true);
851
+ return;
852
+ }
853
+ this.shouldOpenOnFocus = true;
854
+ }
855
+ /**
856
+ * Handles key input
857
+ * @param event Key down event object
858
+ * @returns {void}
859
+ */
860
+ onKeyDown(event) {
861
+ // Check if the event is already handle by list
862
+ if (event.defaultPrevented) {
863
+ return;
864
+ }
865
+ switch (event.key) {
866
+ case 'Enter':
867
+ this.enter(event);
868
+ break;
869
+ case 'Up':
870
+ case 'ArrowUp':
871
+ this.up(event);
872
+ break;
873
+ case 'Down':
874
+ case 'ArrowDown':
875
+ this.down(event);
876
+ break;
877
+ default:
878
+ return;
879
+ }
880
+ event.preventDefault();
881
+ }
882
+ /**
883
+ * Run when tap event or enter
884
+ * happened on the list
885
+ * @returns {void}
886
+ */
887
+ onListInteraction() {
888
+ this.freeTextValue = ''; // when the item has been selected, reset the freeText
889
+ if (!this.multiple) {
890
+ this.resetInput();
891
+ const label = this.label;
892
+ this.setOpened(false);
893
+ // make sure that focus is kept withing an element
894
+ // and the cursor is positioned at the end of input
895
+ // Wait before the update cycle completes
896
+ void this.updateComplete.then(() => {
897
+ this.inputEl.focus();
898
+ this.inputEl.setSelectionRange(label.length, label.length);
899
+ });
900
+ }
901
+ }
902
+ /**
903
+ * Handles action keys, either opening the list,
904
+ * or, selecting a highlighted item.
905
+ * @param event keyboard event
906
+ * @returns {void}
907
+ */
908
+ enter(event) {
909
+ if (this.opened && this.listEl) {
910
+ this.reTargetEvent(event, this.listEl);
911
+ this.onListInteraction();
912
+ }
913
+ else {
914
+ this.setOpened(true);
915
+ }
916
+ }
917
+ /**
918
+ * Navigates up the list.
919
+ * Opens the list if closed.
920
+ * @param event keyboard event
921
+ * @returns {void}
922
+ */
923
+ up(event) {
924
+ if (this.opened && this.listEl) {
925
+ this.reTargetEvent(event, this.listEl);
926
+ }
927
+ else {
928
+ this.setOpened(true);
929
+ }
930
+ }
931
+ /**
932
+ * Navigates down the list.
933
+ * Opens the list if closed.
934
+ * @param event keyboard event
935
+ * @returns {void}
936
+ */
937
+ down(event) {
938
+ if (this.opened && this.listEl) {
939
+ this.reTargetEvent(event, this.listEl);
940
+ }
941
+ else {
942
+ this.setOpened(true);
943
+ }
944
+ }
945
+ /**
946
+ * Retarget event to target element
947
+ * @param event keyboard event
948
+ * @param target new target element
949
+ * @returns re-targeted event or the passed event if target is invalid
950
+ */
951
+ reTargetEvent(event, target) {
952
+ const path = event.composedPath();
953
+ /* istanbul ignore next */
954
+ if (path[0] === target) {
955
+ // this must not happen, but keep it here to avoid infinitive loop
956
+ return event;
957
+ }
958
+ const keyboardEvent = new CustomKeyboardEvent(event.type, event);
959
+ target.dispatchEvent(keyboardEvent);
960
+ if (keyboardEvent.defaultPrevented) {
961
+ event.preventDefault();
962
+ }
963
+ return keyboardEvent;
964
+ }
965
+ /**
966
+ * Template for clear button
967
+ * Rendered when `clears` attribute is set
968
+ * @returns Popup template or undefined
969
+ */
970
+ get clearButtonTemplate() {
971
+ if (this.clears) {
972
+ return html `
973
+ <div
974
+ id="clears-button"
975
+ part="button button-clear"
976
+ ?hidden=${!this.label && !this.query && !this.freeTextValue && !this.inputText}><ef-icon part="icon icon-clear" icon="cross"></ef-icon>
977
+ </div>
978
+ `;
979
+ }
980
+ }
981
+ /**
982
+ * Template for selection badge in multiple mode
983
+ * @returns Selection badge template or undefined
984
+ */
985
+ get selectionBadgeTemplate() {
986
+ if (this.multiple) {
987
+ const selectionLength = this.selectionCount;
988
+ // TODO Make this a short format number using i18n which has specific support for this +
989
+ // benefit of being localised too
990
+ if (this.focused || selectionLength > 1) {
991
+ return html `
992
+ <ef-counter part="selection-badge" tabindex="-1" .value=${selectionLength} title=${ifDefined(selectionLength > 999 ? selectionLength.toLocaleString() : undefined)} max="999"></ef-counter>
993
+ `;
994
+ }
995
+ }
996
+ }
997
+ /**
998
+ * Returns a list template
999
+ */
1000
+ get listTemplate() {
1001
+ return html `
1002
+ <ef-list
1003
+ id="internal-list"
1004
+ @value-changed="${this.onListValueChanged}"
1005
+ .data="${this.composer}"
1006
+ .multiple="${this.multiple}"
1007
+ .renderer="${this.renderer}"
1008
+ ></ef-list>
1009
+ `;
1010
+ }
1011
+ /**
1012
+ * Returns a template showing no options text
1013
+ * Called when freeText mode is off and all items are filtered out
1014
+ */
1015
+ get noItemsTemplate() {
1016
+ if (!this.freeText) {
1017
+ return html `<ef-item disabled>${this.t('NO_OPTIONS')}</ef-item>`;
1018
+ }
1019
+ }
1020
+ /**
1021
+ * Returns template for popup
1022
+ * Lazy loads the popup
1023
+ * @returns Popup template or undefined
1024
+ */
1025
+ get popupTemplate() {
1026
+ if (this.lazyRendered) {
1027
+ const hasVisibleItems = this.listHasVisibleItems;
1028
+ return html `<ef-overlay
1029
+ part="list"
1030
+ style="${styleMap(this.popupDynamicStyles)}"
1031
+ @opened="${this.onPopupOpened}"
1032
+ @closed="${this.onPopupClosed}"
1033
+ .focusBoundary="${this}"
1034
+ .opened="${this.opened && (hasVisibleItems || !this.freeText)}"
1035
+ .positionTarget="${this}"
1036
+ .position="${POPUP_POSITION}"
1037
+ with-shadow
1038
+ no-overlap
1039
+ no-focus-management
1040
+ no-autofocus
1041
+ @focusin="${this.shiftFocus}"
1042
+ >${hasVisibleItems ? this.listTemplate : this.noItemsTemplate}</ef-overlay>`;
1043
+ }
1044
+ }
1045
+ /**
1046
+ * Returns a template for input field
1047
+ * @returns Input template
1048
+ */
1049
+ get inputTemplate() {
1050
+ const inputValue = this.focused ? this.inputText : this.freeTextValue || this.label;
1051
+ return html `<div part="input-wrapper">
1052
+ <ef-text-field
1053
+ part="input"
1054
+ transparent
1055
+ .placeholder="${this.placeholder}"
1056
+ .readonly="${this.readonly}"
1057
+ .value="${inputValue}"
1058
+ @value-changed="${this.onInputValueChanged}"></ef-text-field>
1059
+ ${this.selectionBadgeTemplate}
1060
+ ${this.clearButtonTemplate}
1061
+ <div id="toggle-button" part="button button-toggle">
1062
+ <ef-icon part="icon icon-toggle" icon="down"></ef-icon>
1063
+ </div>
1064
+ </div>`;
1065
+ }
1066
+ /**
1067
+ * A `TemplateResult` that will be used
1068
+ * to render the updated internal template.
1069
+ * @returns Render template
1070
+ */
1071
+ render() {
1072
+ return html `
1073
+ ${this.inputTemplate}
1074
+ ${this.popupTemplate}
1075
+ `;
1076
+ }
1077
+ };
1078
+ __decorate([
1079
+ property({ type: Function, attribute: false })
1080
+ ], ComboBox.prototype, "filter", void 0);
1081
+ __decorate([
1082
+ property({ type: Function, attribute: false })
1083
+ ], ComboBox.prototype, "renderer", void 0);
1084
+ __decorate([
1085
+ property({ type: Boolean })
1086
+ ], ComboBox.prototype, "multiple", null);
1087
+ __decorate([
1088
+ property({ type: Boolean, reflect: true })
1089
+ ], ComboBox.prototype, "opened", void 0);
1090
+ __decorate([
1091
+ property({ type: String })
1092
+ ], ComboBox.prototype, "placeholder", void 0);
1093
+ __decorate([
1094
+ property({ type: Boolean })
1095
+ ], ComboBox.prototype, "clears", void 0);
1096
+ __decorate([
1097
+ property({ type: Boolean, attribute: 'free-text' })
1098
+ ], ComboBox.prototype, "freeText", null);
1099
+ __decorate([
1100
+ property({ type: Boolean, reflect: true })
1101
+ ], ComboBox.prototype, "error", void 0);
1102
+ __decorate([
1103
+ property({ type: Boolean, reflect: true })
1104
+ ], ComboBox.prototype, "warning", void 0);
1105
+ __decorate([
1106
+ property({ type: Number, attribute: 'query-debounce-rate' })
1107
+ ], ComboBox.prototype, "queryDebounceRate", null);
1108
+ __decorate([
1109
+ property({ attribute: false })
1110
+ ], ComboBox.prototype, "data", null);
1111
+ __decorate([
1112
+ property({ type: String })
1113
+ ], ComboBox.prototype, "value", null);
1114
+ __decorate([
1115
+ property({ type: Array, attribute: false })
1116
+ ], ComboBox.prototype, "values", null);
1117
+ __decorate([
1118
+ property({ type: String, attribute: false })
1119
+ ], ComboBox.prototype, "query", null);
1120
+ __decorate([
1121
+ query('[part=input]')
1122
+ ], ComboBox.prototype, "inputEl", void 0);
1123
+ __decorate([
1124
+ query('#internal-list')
1125
+ ], ComboBox.prototype, "listEl", void 0);
1126
+ __decorate([
1127
+ query('#toggle-button')
1128
+ ], ComboBox.prototype, "toggleButtonEl", void 0);
1129
+ __decorate([
1130
+ query('#clears-button')
1131
+ ], ComboBox.prototype, "clearsButtonEl", void 0);
1132
+ __decorate([
1133
+ property({ type: String, reflect: true })
1134
+ ], ComboBox.prototype, "loading", void 0);
1135
+ __decorate([
1136
+ translate({ scope: 'ef-combo-box' })
1137
+ ], ComboBox.prototype, "t", void 0);
1138
+ __decorate([
1139
+ eventOptions({ capture: true })
1140
+ ], ComboBox.prototype, "shiftFocus", null);
1141
+ ComboBox = __decorate([
1142
+ customElement('ef-combo-box', {
1143
+ alias: 'coral-combo-box'
1144
+ })
1145
+ ], ComboBox);
1146
+ export { ComboBox };