@watermarkinsights/ripple 5.6.0-0 → 5.6.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/dist/cjs/{app-globals-89d660d0.js → app-globals-2eb5411e.js} +1 -1
  2. package/dist/cjs/{chartFunctions-878f8139.js → chartFunctions-800ea87d.js} +1 -1
  3. package/dist/cjs/{functions-05e7ad5a.js → functions-c6e27c75.js} +6 -0
  4. package/dist/cjs/index-788526f5.js +12 -0
  5. package/dist/cjs/{intl-2b550151.js → intl-9f836d29.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/priv-calendar.cjs.entry.js +1 -1
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
  9. package/dist/cjs/priv-navigator-button.cjs.entry.js +1 -1
  10. package/dist/cjs/priv-navigator-item.cjs.entry.js +1 -1
  11. package/dist/cjs/priv-option-list.cjs.entry.js +385 -0
  12. package/dist/cjs/ripple.cjs.js +2 -2
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +3 -3
  14. package/dist/cjs/wm-button.cjs.entry.js +2 -2
  15. package/dist/cjs/wm-chart.cjs.entry.js +3 -3
  16. package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
  17. package/dist/cjs/wm-datepicker.cjs.entry.js +10 -12
  18. package/dist/cjs/wm-file-list.cjs.entry.js +1 -1
  19. package/dist/cjs/wm-file.cjs.entry.js +2 -2
  20. package/dist/cjs/wm-input.cjs.entry.js +3 -3
  21. package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
  22. package/dist/cjs/wm-modal-footer.cjs.entry.js +1 -1
  23. package/dist/cjs/wm-modal-header.cjs.entry.js +3 -3
  24. package/dist/cjs/wm-modal.cjs.entry.js +3 -3
  25. package/dist/cjs/wm-navigation_3.cjs.entry.js +6 -6
  26. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  27. package/dist/cjs/wm-nested-select.cjs.entry.js +296 -0
  28. package/dist/cjs/wm-optgroup.cjs.entry.js +57 -0
  29. package/dist/cjs/wm-option_2.cjs.entry.js +34 -339
  30. package/dist/cjs/wm-pagination.cjs.entry.js +2 -2
  31. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  32. package/dist/cjs/wm-search.cjs.entry.js +4 -4
  33. package/dist/cjs/wm-snackbar.cjs.entry.js +4 -4
  34. package/dist/cjs/wm-tab-item_3.cjs.entry.js +4 -4
  35. package/dist/cjs/wm-tag-input.cjs.entry.js +5 -5
  36. package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
  37. package/dist/cjs/wm-textarea.cjs.entry.js +3 -3
  38. package/dist/cjs/wm-timepicker.cjs.entry.js +3 -3
  39. package/dist/cjs/wm-toggletip.cjs.entry.js +3 -3
  40. package/dist/cjs/wm-uploader.cjs.entry.js +4 -4
  41. package/dist/collection/collection-manifest.json +5 -2
  42. package/dist/collection/components/datepickers/wm-datepicker.js +9 -11
  43. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +104 -0
  44. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +717 -0
  45. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +378 -0
  46. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +581 -0
  47. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +77 -0
  48. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +197 -0
  49. package/dist/collection/components/{wm-select → selects/wm-select}/wm-select.css +0 -74
  50. package/dist/collection/components/{wm-select → selects/wm-select}/wm-select.js +17 -384
  51. package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
  52. package/dist/collection/components/wm-button/wm-button.js +1 -1
  53. package/dist/collection/components/wm-file/wm-file.js +1 -1
  54. package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
  55. package/dist/collection/components/wm-input/wm-input.js +1 -1
  56. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  57. package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
  58. package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
  59. package/dist/collection/components/wm-modal/wm-modal.js +2 -2
  60. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
  61. package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
  62. package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
  63. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
  64. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
  65. package/dist/collection/components/wm-option/wm-option.js +35 -9
  66. package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
  67. package/dist/collection/components/wm-search/wm-search.js +2 -2
  68. package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
  69. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
  70. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
  71. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
  72. package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
  73. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  74. package/dist/collection/components/wm-timepicker/wm-timepicker.js +2 -2
  75. package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
  76. package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
  77. package/dist/collection/dev/nested-select.js +62 -0
  78. package/dist/collection/global/functions.js +5 -0
  79. package/dist/esm/{app-globals-9946ecbe.js → app-globals-bbc3f842.js} +1 -1
  80. package/dist/esm/{chartFunctions-00fd6f23.js → chartFunctions-7e5619f6.js} +1 -1
  81. package/dist/esm/{functions-25781571.js → functions-046fc5a3.js} +6 -1
  82. package/dist/esm/index-130e07bb.js +12 -0
  83. package/dist/esm/{intl-df3d34d1.js → intl-0822738a.js} +1 -1
  84. package/dist/esm/loader.js +2 -2
  85. package/dist/esm/priv-calendar.entry.js +1 -1
  86. package/dist/esm/priv-chart-popover.entry.js +1 -1
  87. package/dist/esm/priv-navigator-button.entry.js +1 -1
  88. package/dist/esm/priv-navigator-item.entry.js +1 -1
  89. package/dist/esm/priv-option-list.entry.js +381 -0
  90. package/dist/esm/ripple.js +2 -2
  91. package/dist/esm/wm-action-menu_2.entry.js +3 -3
  92. package/dist/esm/wm-button.entry.js +2 -2
  93. package/dist/esm/wm-chart.entry.js +3 -3
  94. package/dist/esm/wm-date-range.entry.js +1 -1
  95. package/dist/esm/wm-datepicker.entry.js +10 -12
  96. package/dist/esm/wm-file-list.entry.js +1 -1
  97. package/dist/esm/wm-file.entry.js +2 -2
  98. package/dist/esm/wm-input.entry.js +3 -3
  99. package/dist/esm/wm-line-chart.entry.js +3 -3
  100. package/dist/esm/wm-modal-footer.entry.js +1 -1
  101. package/dist/esm/wm-modal-header.entry.js +3 -3
  102. package/dist/esm/wm-modal.entry.js +3 -3
  103. package/dist/esm/wm-navigation_3.entry.js +6 -6
  104. package/dist/esm/wm-navigator.entry.js +1 -1
  105. package/dist/esm/wm-nested-select.entry.js +292 -0
  106. package/dist/esm/wm-optgroup.entry.js +53 -0
  107. package/dist/esm/wm-option_2.entry.js +34 -339
  108. package/dist/esm/wm-pagination.entry.js +2 -2
  109. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  110. package/dist/esm/wm-search.entry.js +4 -4
  111. package/dist/esm/wm-snackbar.entry.js +4 -4
  112. package/dist/esm/wm-tab-item_3.entry.js +4 -4
  113. package/dist/esm/wm-tag-input.entry.js +5 -5
  114. package/dist/esm/wm-tag-option.entry.js +1 -1
  115. package/dist/esm/wm-textarea.entry.js +3 -3
  116. package/dist/esm/wm-timepicker.entry.js +3 -3
  117. package/dist/esm/wm-toggletip.entry.js +3 -3
  118. package/dist/esm/wm-uploader.entry.js +4 -4
  119. package/dist/esm-es5/{app-globals-9946ecbe.js → app-globals-bbc3f842.js} +1 -1
  120. package/dist/esm-es5/{chartFunctions-00fd6f23.js → chartFunctions-7e5619f6.js} +1 -1
  121. package/dist/esm-es5/{functions-25781571.js → functions-046fc5a3.js} +1 -1
  122. package/dist/esm-es5/index-130e07bb.js +1 -1
  123. package/dist/esm-es5/{intl-df3d34d1.js → intl-0822738a.js} +1 -1
  124. package/dist/esm-es5/loader.js +1 -1
  125. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  126. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  127. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  128. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  129. package/dist/esm-es5/priv-option-list.entry.js +1 -0
  130. package/dist/esm-es5/ripple.js +1 -1
  131. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  132. package/dist/esm-es5/wm-button.entry.js +1 -1
  133. package/dist/esm-es5/wm-chart.entry.js +1 -1
  134. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  135. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  136. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  137. package/dist/esm-es5/wm-file.entry.js +1 -1
  138. package/dist/esm-es5/wm-input.entry.js +1 -1
  139. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  140. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  141. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  142. package/dist/esm-es5/wm-modal.entry.js +1 -1
  143. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  144. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  145. package/dist/esm-es5/wm-nested-select.entry.js +1 -0
  146. package/dist/esm-es5/wm-optgroup.entry.js +1 -0
  147. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  148. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  149. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  150. package/dist/esm-es5/wm-search.entry.js +1 -1
  151. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  152. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  153. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  154. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  155. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  156. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  157. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  158. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  159. package/dist/ripple/{p-041e579b.entry.js → p-05f0f2e9.entry.js} +1 -1
  160. package/dist/ripple/{p-a1a2f8c9.system.entry.js → p-06792553.system.entry.js} +1 -1
  161. package/dist/ripple/{p-b80d9402.system.entry.js → p-0b7a64cd.system.entry.js} +1 -1
  162. package/dist/ripple/{p-d5ba9de1.system.entry.js → p-0db47768.system.entry.js} +1 -1
  163. package/dist/ripple/{p-67a7f0b0.entry.js → p-1123b0fd.entry.js} +1 -1
  164. package/dist/ripple/{p-3423a9b6.system.entry.js → p-140d2dad.system.entry.js} +1 -1
  165. package/dist/ripple/{p-56766bb2.entry.js → p-1727c66e.entry.js} +1 -1
  166. package/dist/ripple/{p-2d619f83.entry.js → p-179e4aee.entry.js} +1 -1
  167. package/dist/ripple/{p-6e60631a.entry.js → p-18d3ad51.entry.js} +1 -1
  168. package/dist/ripple/{p-bcff8b3a.entry.js → p-1a474fb3.entry.js} +1 -1
  169. package/dist/ripple/p-1ed0a315.system.entry.js +1 -0
  170. package/dist/ripple/{p-376efca9.entry.js → p-200298b3.entry.js} +1 -1
  171. package/dist/ripple/{p-3b4045f8.system.entry.js → p-22704516.system.entry.js} +1 -1
  172. package/dist/ripple/{p-f54e9ed0.js → p-28169294.js} +1 -1
  173. package/dist/ripple/p-28a88d69.entry.js +1 -0
  174. package/dist/ripple/{p-13fc2164.entry.js → p-28a89430.entry.js} +1 -1
  175. package/dist/ripple/{p-298c2675.entry.js → p-29388a85.entry.js} +1 -1
  176. package/dist/ripple/{p-1f09134c.entry.js → p-2952dc73.entry.js} +1 -1
  177. package/dist/ripple/p-2ec551cc.entry.js +1 -0
  178. package/dist/ripple/{p-e85b1f40.entry.js → p-30aa965a.entry.js} +1 -1
  179. package/dist/ripple/{p-155224a2.system.entry.js → p-341d27c6.system.entry.js} +1 -1
  180. package/dist/ripple/p-354a97f2.entry.js +1 -0
  181. package/dist/ripple/{p-3b5f4364.system.entry.js → p-35f78ec6.system.entry.js} +1 -1
  182. package/dist/ripple/{p-417c8e46.system.entry.js → p-381d004e.system.entry.js} +1 -1
  183. package/dist/ripple/{p-b41ef3db.entry.js → p-39de670a.entry.js} +1 -1
  184. package/dist/ripple/{p-b7307be6.system.entry.js → p-3ad563c4.system.entry.js} +1 -1
  185. package/dist/ripple/{p-0ff41567.system.entry.js → p-3ea3db64.system.entry.js} +1 -1
  186. package/dist/ripple/p-42925871.entry.js +1 -0
  187. package/dist/ripple/p-46f449d2.system.js +1 -0
  188. package/dist/ripple/{p-e2fe86a7.system.entry.js → p-540f74b1.system.entry.js} +1 -1
  189. package/dist/ripple/{p-a88bf1c5.js → p-58a073f2.js} +1 -1
  190. package/dist/ripple/{p-7fb95b89.entry.js → p-61666258.entry.js} +1 -1
  191. package/dist/ripple/p-64449b64.entry.js +1 -0
  192. package/dist/ripple/p-68fc8da3.system.entry.js +1 -0
  193. package/dist/ripple/p-6e95e98c.system.js +1 -0
  194. package/dist/ripple/{p-aab56a37.system.entry.js → p-7135f074.system.entry.js} +1 -1
  195. package/dist/ripple/{p-eca8daaf.system.js → p-71ddeb97.system.js} +1 -1
  196. package/dist/ripple/{p-d93c51dd.system.entry.js → p-772c4fd2.system.entry.js} +1 -1
  197. package/dist/ripple/{p-17ac5779.js → p-7b5be38a.js} +1 -1
  198. package/dist/ripple/{p-eb14b354.entry.js → p-833c05ca.entry.js} +1 -1
  199. package/dist/ripple/{p-88cfd58d.js → p-8789b4c9.js} +1 -1
  200. package/dist/ripple/{p-fc529ba1.system.entry.js → p-8dd54304.system.entry.js} +1 -1
  201. package/dist/ripple/p-9420679d.entry.js +1 -0
  202. package/dist/ripple/{p-8b56f9d8.system.entry.js → p-96697a65.system.entry.js} +1 -1
  203. package/dist/ripple/p-974ca7a4.system.entry.js +1 -0
  204. package/dist/ripple/{p-b8168f35.system.entry.js → p-97e62c9d.system.entry.js} +1 -1
  205. package/dist/ripple/{p-a9d89ac8.system.js → p-98bf2ccb.system.js} +1 -1
  206. package/dist/ripple/{p-6fe35d1e.system.entry.js → p-ac47e6f5.system.entry.js} +1 -1
  207. package/dist/ripple/{p-5051034b.entry.js → p-b116fb2d.entry.js} +1 -1
  208. package/dist/ripple/{p-03708b88.system.js → p-b6df0519.system.js} +1 -1
  209. package/dist/ripple/{p-6d0e5159.system.entry.js → p-bb28c2c7.system.entry.js} +1 -1
  210. package/dist/ripple/{p-672ae2cb.entry.js → p-c171f37b.entry.js} +1 -1
  211. package/dist/ripple/{p-41eb6a2e.system.entry.js → p-c2fc7204.system.entry.js} +1 -1
  212. package/dist/ripple/{p-4ea1e503.entry.js → p-c9dc5cfa.entry.js} +1 -1
  213. package/dist/ripple/{p-17bb1157.system.entry.js → p-ca6bbd68.system.entry.js} +1 -1
  214. package/dist/ripple/{p-f17fd62b.entry.js → p-cb85c4a7.entry.js} +1 -1
  215. package/dist/ripple/{p-6d56676e.system.entry.js → p-cc5b07b1.system.entry.js} +1 -1
  216. package/dist/ripple/{p-f09e2c22.entry.js → p-d6502e2e.entry.js} +1 -1
  217. package/dist/ripple/{p-c2181de0.entry.js → p-d78dad3d.entry.js} +1 -1
  218. package/dist/ripple/{p-a62e7532.entry.js → p-d7b7c350.entry.js} +1 -1
  219. package/dist/ripple/{p-2fd12dd9.entry.js → p-dde32280.entry.js} +1 -1
  220. package/dist/ripple/{p-7eab6bea.system.entry.js → p-dfaa6a61.system.entry.js} +1 -1
  221. package/dist/ripple/{p-5ece78e5.system.entry.js → p-e25e8ed7.system.entry.js} +1 -1
  222. package/dist/ripple/{p-b0c566b5.system.entry.js → p-e2c9204d.system.entry.js} +1 -1
  223. package/dist/ripple/p-e2de8541.system.entry.js +1 -0
  224. package/dist/ripple/{p-ac40417b.system.entry.js → p-e562e32d.system.entry.js} +1 -1
  225. package/dist/ripple/{p-ecb6c756.entry.js → p-ea407923.entry.js} +1 -1
  226. package/dist/ripple/p-ea9c152f.entry.js +1 -0
  227. package/dist/ripple/{p-748f8a97.system.entry.js → p-f02dce0f.system.entry.js} +1 -1
  228. package/dist/ripple/{p-ea0dfadf.system.entry.js → p-f38622dc.system.entry.js} +1 -1
  229. package/dist/ripple/{p-5caaf651.system.entry.js → p-f8c7adab.system.entry.js} +1 -1
  230. package/dist/ripple/{p-298bde1b.entry.js → p-fb3cfb8b.entry.js} +1 -1
  231. package/dist/ripple/{p-48d0ef98.system.entry.js → p-fdb4cf9e.system.entry.js} +1 -1
  232. package/dist/ripple/{p-0af94825.entry.js → p-feb80dd1.entry.js} +1 -1
  233. package/dist/ripple/{p-2ef49c84.entry.js → p-ff0e05e4.entry.js} +1 -1
  234. package/dist/ripple/ripple.esm.js +1 -1
  235. package/dist/ripple/ripple.js +1 -1
  236. package/dist/types/components/{wm-select/wm-select.d.ts → selects/priv-option-list/priv-option-list.d.ts} +37 -65
  237. package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +55 -0
  238. package/dist/types/components/selects/wm-optgroup/wm-optgroup.d.ts +16 -0
  239. package/dist/types/components/selects/wm-select/wm-select.d.ts +53 -0
  240. package/dist/types/components/wm-option/wm-option.d.ts +2 -1
  241. package/dist/types/components.d.ts +148 -2
  242. package/dist/types/global/functions.d.ts +1 -0
  243. package/package.json +3 -3
  244. package/dist/ripple/p-050f17c4.system.js +0 -1
  245. package/dist/ripple/p-418ed08c.system.entry.js +0 -1
  246. package/dist/ripple/p-4670ccb4.system.js +0 -1
  247. package/dist/ripple/p-4baaf026.entry.js +0 -1
  248. package/dist/ripple/p-6e2cd09a.entry.js +0 -1
  249. package/dist/ripple/p-8e72de50.entry.js +0 -1
  250. package/dist/ripple/p-fabe4ca4.entry.js +0 -1
@@ -1,45 +1,14 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { forceUpdate } from "@stencil/core";
3
- import { getTextDir, shouldOpenUp, intl, debounce, toBool, handleDisabledAttribute } from "../../global/functions";
4
- import { globalMessages } from "../../global/intl";
3
+ import { getTextDir, shouldOpenUp, intl, isElOrChild, toBool, handleDisabledAttribute, } from "../../../global/functions";
4
+ import { globalMessages } from "../../../global/intl";
5
5
  export class Select {
6
6
  constructor() {
7
- this.selectAllMessage = intl.formatMessage({
8
- id: "select.selectAll",
9
- defaultMessage: "Select All",
10
- });
11
- this.deselectAllMessage = intl.formatMessage({
12
- id: "select.deselectAll",
13
- defaultMessage: "Deselect All",
14
- });
15
- this.allOptionsSelectedMessage = intl.formatMessage({
16
- id: "select.allOptionsSelected",
17
- defaultMessage: "All options selected",
18
- });
19
- this.allOptionsDeselectedMessage = intl.formatMessage({
20
- id: "select.allOptionsDeselected",
21
- defaultMessage: "All options deselected",
22
- });
23
- this.keysSoFar = "";
24
- this.searchIndex = 0;
25
7
  this.openUp = false;
26
8
  //////////////////////////////////////
27
- //////////////////////////////////////
28
9
  // for multiselect button text
29
10
  this.overflowCount = 0;
30
11
  this.displayedOptions = [];
31
- this.debouncedClearKeysSoFar = debounce(() => {
32
- this.keysSoFar = "";
33
- }, 500);
34
- this.debouncedSearch = debounce(() => {
35
- this.wmSelectSearchChanged.emit({ searchTerm: this.searchTerm });
36
- if (this.filteredOptions.length) {
37
- this.announce(this.resultsFoundMessage);
38
- }
39
- else {
40
- this.announce(this.noResultsFoundMessage);
41
- }
42
- }, 150);
43
12
  this.disabled = false;
44
13
  this.maxHeight = undefined;
45
14
  this.label = undefined;
@@ -70,85 +39,33 @@ export class Select {
70
39
  get childOptions() {
71
40
  return Array.from(this.el.querySelectorAll("wm-option"));
72
41
  }
73
- get cloneOptions() {
74
- return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"));
75
- }
76
- get allOptionEls() {
77
- // this includes both slotted wm-options and internally created wm-options
78
- return this.cloneOptions.concat(this.childOptions);
79
- }
80
- get visibleOptionEls() {
81
- return this.allOptionEls.filter((option) => !option.classList.contains("hidden") && !option.classList.contains("filtered-out"));
82
- }
83
42
  get isDisabled() {
84
43
  // string "false" needs to be treated as bool False because react wrappers convert bool to string.
85
44
  return toBool(this.disabled);
86
45
  }
87
- //////////////////////////////////////
88
- // for search variants
89
- get searchTerm() {
90
- return this.searchFieldEl ? this.searchFieldEl.value : "";
91
- }
92
- get filteredOptions() {
93
- return this.childOptions.filter((option) => { var _a; return (_a = option.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(this.searchTerm.toLowerCase()); });
94
- }
95
46
  get selectedOptions() {
96
47
  return Array.from(this.el.querySelectorAll("wm-option")).filter((x) => x.selected);
97
48
  }
98
49
  get allSelected() {
99
50
  return this.childOptions.every((option) => option.selected);
100
51
  }
101
- get visibleSelectAllButton() {
102
- return this.selectAll && this.multiple && this.searchTerm === "";
103
- }
104
52
  //////////////////////////////////////
105
- get resultsFoundMessage() {
106
- return intl.formatMessage({
107
- id: "select.searchResultsFound",
108
- defaultMessage: "{numResults, plural, one {1 option found} other {# options found}}",
109
- description: "The message read by the screen reader, indicating how many results a search returned",
110
- }, { numResults: this.filteredOptions.length });
111
- }
112
- get noResultsFoundMessage() {
113
- return intl.formatMessage({
114
- id: "select.noSearchResults",
115
- defaultMessage: "No results found. Please try your search again.",
116
- description: "The message displayed when no options pass the search filter",
117
- });
118
- }
119
- handleOptionSelection(ev) {
120
- this.focusOption(ev.detail);
53
+ handleOptionSelection() {
121
54
  if (!this.multiple) {
122
55
  this.close();
123
56
  }
124
57
  }
125
- handleOptionCloneSelection(ev) {
126
- const correspondingOption = this.findCorrespondingOption(ev.detail);
127
- correspondingOption.click();
128
- }
129
58
  handleChildEnter() {
130
59
  // only occurs for multiselects. handle the click, then close
131
60
  this.close();
132
61
  }
133
- handleChildUp(ev) {
134
- this.moveUp(ev.detail);
135
- }
136
- handleChildDown(ev) {
137
- this.moveDown(ev.detail);
138
- }
139
- moveToFirstOption() {
140
- this.focusOption(this.visibleOptionEls[0]);
141
- }
142
- moveToLastOption() {
143
- this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
144
- }
145
62
  closePopupOnEscape() {
146
63
  this.close();
147
64
  }
148
65
  handleOptionBlur(ev) {
149
66
  // if the Option is blurred to something other than the component emit a blur event with the appropriate relatedTarget
150
67
  // keeps our component's blur events accurate, and closes when focusing browser address bar
151
- if (!this.isElOrChild(ev.detail.relatedTarget)) {
68
+ if (!isElOrChild(this.el, ev.detail.relatedTarget)) {
152
69
  const event = new CustomEvent("blur");
153
70
  // @ts-ignore
154
71
  event.relatedTarget = ev.detail.relatedTarget;
@@ -156,34 +73,16 @@ export class Select {
156
73
  }
157
74
  }
158
75
  handleClick(ev) {
159
- if (!this.isElOrChild(ev.target)) {
76
+ if (!isElOrChild(this.el, ev.target)) {
160
77
  this.close();
161
78
  }
162
79
  }
163
- handleSelectAllClick() {
164
- this.allSelected ? this.deselectAllOptions() : this.selectAllOptions();
165
- }
166
- selectAllOptions() {
167
- this.announce(this.allOptionsSelectedMessage);
168
- this.wmSelectAllSelected.emit();
169
- }
170
- deselectAllOptions() {
171
- this.announce(this.allOptionsDeselectedMessage);
172
- this.wmSelectAllDeselected.emit();
173
- }
174
80
  handleButtonBlur(ev) {
175
- if (this.isElOrChild(ev.relatedTarget)) {
81
+ if (isElOrChild(this.el, ev.relatedTarget)) {
176
82
  // do not emit a blur event when opening the dropdown and focusing the Options
177
83
  ev.stopPropagation();
178
84
  }
179
85
  }
180
- handleSearchFieldBlur(ev) {
181
- this.searchFieldWrapperEl.classList.remove("focus");
182
- if (this.isElOrChild(ev.relatedTarget)) {
183
- // do not emit a blur event when moving from searchfield to options
184
- ev.stopPropagation();
185
- }
186
- }
187
86
  handleKey(ev) {
188
87
  switch (ev.key) {
189
88
  case "ArrowDown":
@@ -220,6 +119,7 @@ export class Select {
220
119
  // on update of children or children selected state, reset button text and rerender
221
120
  this.setButtonText();
222
121
  forceUpdate(this.el);
122
+ this.optionListEl.handleChildChange(_);
223
123
  }
224
124
  componentDidLoad() {
225
125
  this.wmSelectDidLoad.emit();
@@ -227,55 +127,11 @@ export class Select {
227
127
  forceUpdate(this.el);
228
128
  // Dev can overwrite the max-height rule set in the Sass file
229
129
  if (this.maxHeight) {
230
- this.listboxEl.style.maxHeight = this.maxHeight;
231
- }
232
- if (this.multiple) {
233
- this.updateOptionVisibility();
130
+ // this.listboxEl.style.maxHeight = this.maxHeight;
131
+ this.dropdownEl.style.maxHeight = this.maxHeight;
234
132
  }
235
133
  this.setButtonText();
236
134
  }
237
- componentWillUpdate() {
238
- if (this.multiple) {
239
- // find last visible clone option and apply .last class
240
- const visibleCloneOptions = this.visibleOptionEls.filter((option) => option.classList.contains("clone"));
241
- // if all options are clones, nothing to separate from
242
- const allClones = visibleCloneOptions.length === this.visibleOptionEls.length;
243
- visibleCloneOptions.forEach((option, idx) => {
244
- if (!allClones && idx === visibleCloneOptions.length - 1) {
245
- option.classList.add("last");
246
- }
247
- else {
248
- option.classList.remove("last");
249
- }
250
- });
251
- }
252
- }
253
- moveUp(el) {
254
- const focusableEls = this.visibleOptionEls;
255
- if (this.selectAllEl) {
256
- focusableEls.unshift(this.selectAllEl);
257
- }
258
- if (this.searchFieldEl) {
259
- focusableEls.unshift(this.searchFieldEl);
260
- }
261
- const prevEl = focusableEls[focusableEls.indexOf(el) - 1] || focusableEls[focusableEls.length - 1];
262
- if (prevEl) {
263
- this.focusOption(prevEl);
264
- }
265
- }
266
- moveDown(el) {
267
- const focusableEls = this.visibleOptionEls;
268
- if (this.selectAllEl) {
269
- focusableEls.unshift(this.selectAllEl);
270
- }
271
- if (this.searchFieldEl) {
272
- focusableEls.unshift(this.searchFieldEl);
273
- }
274
- const nextEl = focusableEls[focusableEls.indexOf(el) + 1] || focusableEls[0];
275
- if (nextEl) {
276
- this.focusOption(nextEl);
277
- }
278
- }
279
135
  open(optionToSelect) {
280
136
  if (!this.isDisabled) {
281
137
  const elHeight = this.el.clientHeight;
@@ -288,60 +144,22 @@ export class Select {
288
144
  this.isExpanded = true;
289
145
  this.dropdownEl.classList.remove("hidden");
290
146
  window.requestAnimationFrame(() => {
291
- switch (optionToSelect) {
292
- case "next":
293
- // search variant focuses search field
294
- // all others focus option "after" last selected option (this can be the first option)
295
- if (this.search) {
296
- this.searchFieldEl.focus();
297
- this.listboxEl.scrollTop = 0;
298
- }
299
- else {
300
- this.moveDown(this.visibleOptionEls.filter((x) => x.selected).slice(-1)[0]);
301
- }
302
- break;
303
- case "previous":
304
- // search variant focuses last option
305
- // all others focus option "above" first selected option (this can be the last option)
306
- if (this.search) {
307
- this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
308
- }
309
- else {
310
- this.moveUp(this.visibleOptionEls.filter((x) => x.selected)[0]);
311
- }
312
- break;
313
- default:
314
- // search variant focuses search field
315
- // all others focus the selected option
316
- // if no option is selected (empty multiselect), focuses first option
317
- if (this.search) {
318
- this.searchFieldEl.focus();
319
- this.listboxEl.scrollTop = 0;
320
- }
321
- else if (this.selectedOptions.length > 0) {
322
- this.focusOption(this.visibleOptionEls.filter((x) => x.selected)[0]);
323
- }
324
- else {
325
- this.focusOption(this.visibleOptionEls[0]);
326
- }
327
- break;
328
- }
147
+ this.optionListEl.handleInitialFocus(optionToSelect);
329
148
  });
330
149
  }
331
150
  }
332
151
  close(returnFocus = true) {
333
152
  if (this.isExpanded) {
334
153
  this.isExpanded = false;
335
- this.allOptionEls.map((i) => (i.focused = false));
154
+ this.optionListEl.unfocusAll();
336
155
  window.setTimeout(() => {
337
156
  this.dropdownEl.classList.add("hidden");
338
- if (this.multiple) {
339
- this.updateOptionVisibility();
157
+ if (this.optionListEl.multiple) {
158
+ this.optionListEl.updateOptionVisibility();
340
159
  }
341
160
  // clear search field, reset filtered / bolded state of wm-options
342
161
  if (this.search) {
343
- this.searchFieldEl.value = "";
344
- this.wmSelectSearchChanged.emit({ searchTerm: this.searchTerm });
162
+ this.optionListEl.clearSearch();
345
163
  }
346
164
  // Returns focus to button after popup closes (no need if user is tabbing)
347
165
  // Delay is necessary for screenreader to get new expanded state before focus
@@ -353,87 +171,6 @@ export class Select {
353
171
  }, 150);
354
172
  }
355
173
  }
356
- updateOptionVisibility() {
357
- // this runs for search multiselects, where selected options are rendered at the top of the dropdown list
358
- // slotted wm-options are hidden if selected, and clone wm-options are made visible if selected
359
- this.childOptions.forEach((option, idx) => {
360
- const cloneOption = this.cloneOptions[idx];
361
- if (option.selected) {
362
- option.classList.add("hidden");
363
- cloneOption.classList.remove("hidden");
364
- }
365
- else {
366
- option.classList.remove("hidden");
367
- cloneOption.classList.add("hidden");
368
- }
369
- });
370
- }
371
- focusOption(option) {
372
- this.allOptionEls.forEach((i) => (i.focused = i === option));
373
- // option must be scrolledIntoView before focused
374
- // if focus is called first the option might be positioned incorrectly (in the center of the dropdown) and scrollIntoView will do nothing as the option will already be in view
375
- option.scrollIntoView({ block: "nearest" });
376
- // scrollIntoView does not work when the container of the element it's called on is not rendered to the page (in our case the dropdown is still closed and has transform: scaleY(0))
377
- // when opening the dropdown, scrollIntoView must be delayed to a point where the browser recognizes content within it as able to be scrolled to
378
- // in Safari in particular, the soonest this seems to happen is 20ms. The longest we can wait before any jumping in the open dropdown is noticeable is 60ms
379
- window.setTimeout(() => option.scrollIntoView({ block: "nearest" }), 60);
380
- option.focus();
381
- }
382
- findAndFocusOption(ev) {
383
- const letterPressed = ev.detail.letter.toLowerCase();
384
- const optionPressed = ev.detail.optionEl;
385
- if (!this.keysSoFar && letterPressed == " ") {
386
- // if the first key entered is space, treat as a click. Otherwise include in
387
- optionPressed.click();
388
- }
389
- else {
390
- if (!this.keysSoFar) {
391
- // if first character entered, set currently focused option as the starting index for the search
392
- this.visibleOptionEls.forEach((option, idx) => {
393
- if (option.focused) {
394
- this.searchIndex = idx;
395
- }
396
- });
397
- }
398
- this.keysSoFar += letterPressed;
399
- let nextMatch = this.findMatchInRange(this.visibleOptionEls, this.searchIndex + 1, this.visibleOptionEls.length);
400
- if (!nextMatch) {
401
- // if match can't be found from starting option downwards, search from top
402
- nextMatch = this.findMatchInRange(this.visibleOptionEls, 0, this.searchIndex);
403
- }
404
- if (nextMatch) {
405
- // findMatchInRange still might have returned null, only focus if match found
406
- this.focusOption(nextMatch);
407
- }
408
- this.debouncedClearKeysSoFar();
409
- }
410
- }
411
- findMatchInRange(list, startIndex, endIndex) {
412
- let match = null;
413
- let optionsInRange = list.slice(startIndex, endIndex);
414
- // Find the first option starting with the keysSoFar substring, searching in
415
- // the specified range of options
416
- optionsInRange.forEach((option) => {
417
- const label = option.textContent;
418
- if (!match && label && label.toLowerCase().startsWith(this.keysSoFar)) {
419
- match = option;
420
- }
421
- });
422
- return match;
423
- }
424
- findCorrespondingOption(el) {
425
- // if clone, returns the child wm-option
426
- // if child wm-option, returns clone
427
- const isClone = el.classList.contains("clone");
428
- return isClone
429
- ? this.childOptions[this.cloneOptions.indexOf(el)]
430
- : this.cloneOptions[this.childOptions.indexOf(el)];
431
- }
432
- isElOrChild(el) {
433
- var _a;
434
- // determines whether or not the element is the component, a child of the component, or exists within the component's shadowroot
435
- return el === this.el || this.el.contains(el) || ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(el));
436
- }
437
174
  announceError() {
438
175
  if (this.errorMessage) {
439
176
  setTimeout(() => this.announce(this.errorMessage), 100);
@@ -449,41 +186,8 @@ export class Select {
449
186
  this.wmSelectBlurred.emit();
450
187
  }
451
188
  }
452
- // on search field or select all. keydown on options is handled via events.
453
- handleKeyDown(ev) {
454
- const el = ev.target;
455
- switch (ev.key) {
456
- case "ArrowDown":
457
- ev.preventDefault();
458
- this.moveDown(ev.target);
459
- break;
460
- case "ArrowUp":
461
- ev.preventDefault();
462
- this.moveUp(ev.target);
463
- break;
464
- case "Escape":
465
- ev.preventDefault();
466
- this.close();
467
- break;
468
- case "Enter":
469
- if (el === this.selectAllEl) {
470
- ev.preventDefault();
471
- this.handleSelectAllClick();
472
- this.close();
473
- }
474
- break;
475
- case " ":
476
- if (el === this.selectAllEl) {
477
- ev.preventDefault();
478
- this.handleSelectAllClick();
479
- }
480
- break;
481
- }
482
- }
483
189
  setButtonText() {
484
- this.displayedOptions = this.childOptions
485
- .filter((x) => x.selected)
486
- .map((y) => (!y.classList.contains("hidden") ? y : this.findCorrespondingOption(y)));
190
+ this.displayedOptions = this.childOptions.filter((x) => x.selected);
487
191
  // handle overflow + counter for multiselect
488
192
  if (this.multiple) {
489
193
  // this is a fixed measurement accounting for the max width of a 3 character overflow counter
@@ -527,21 +231,6 @@ export class Select {
527
231
  return (h("span", null, h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
528
232
  }
529
233
  }
530
- renderSearchField() {
531
- return (h("div", { class: "search" }, h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, h("div", { class: "icon" }), h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list", "aria-expanded": this.isExpanded ? "true" : "false", onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
532
- }
533
- renderSearchFailedMessage() {
534
- return h("div", { class: "search-results-message" }, this.noResultsFoundMessage);
535
- }
536
- renderSelectAllButton() {
537
- return (h("button", { ref: (el) => (this.selectAllEl = el), class: "select-all", onClick: () => this.handleSelectAllClick(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: "-1" }, this.allSelected ? this.deselectAllMessage : this.selectAllMessage));
538
- }
539
- renderCloneOptions() {
540
- return Array.from(this.el.children).map((o) => {
541
- const option = o;
542
- return (h("wm-option", { class: "clone", subinfo: option.subinfo, selected: option.selected }, option.textContent));
543
- });
544
- }
545
234
  render() {
546
235
  const showSubinfo = !this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo;
547
236
  const buttonProps = {
@@ -553,9 +242,9 @@ export class Select {
553
242
  ["aria-expanded"]: this.isExpanded ? "true" : "false",
554
243
  onClick: () => (this.isExpanded ? this.close() : this.open()),
555
244
  };
556
- return (h(Host, { key: 'f099ef79e70921c17419b2ce8a4e917a0579e44f', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: 'e95c845dd404f5518b69145543113e69a40084a6', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '65dfe5aaaa9239efb0553ba1d323f1c5dc93b9fb', class: "label-wrapper" }, h("label", { key: 'ff406b387e0cd09e46e239f1c80477fe2ee80f24', class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
245
+ return (h(Host, { key: '6727670440a80bf148be78994a4267330cf31041', onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { key: '89e88dc3eebb8bb4f05e7c97f4af145ea3b54833', class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { key: '4787f0142908caca775c018f77ad46bdd6a67f3f', class: "label-wrapper" }, h("label", { key: 'cd87e40ecf3ea2b5f992e58fedd355ffdc9f874e', class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
557
246
  // we can't use aria-required or required attributes because it's invalid on the elements we're using (button controlling a listbox)
558
- this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { key: '5537fb10791108ac2bda53d3456ec048bb4cc5c4', class: "button-wrapper" }, h("button", Object.assign({ key: '7d54c69839a302ead990f41e961cce05be49f83d' }, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), h("span", { key: 'dcb786709b87be95c28bfcd37cc8459607939f2f', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: 'b04bbeab1666ebd4538c859356f1a3a33658c1c5', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: 'c5e9911d91f34c9b7c5becaa9e1127e658fd4607', class: "subinfo" }, this.selectedOptions[0].subinfo)), this.renderOverflowCount()), h("div", { key: '24c47d439f6b131880a8bffe94c40539fc13d78f', class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton(), h("div", { key: 'acf189fee5add7d0c6150b44ffd9c0c26e05ade7', id: "list", class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": "label", ref: (el) => (this.listboxEl = el) }, this.search && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.multiple && this.renderCloneOptions(), h("slot", { key: 'ff17ced6e94d7b893c407ea00ab7243176973eb5' }))), h("div", { key: 'a09f44fdf4a100f8eab7b5094fced276023812aa', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '9e55b5fdc2324b77d0a8bcf17650d937760dd941', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
247
+ this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { key: 'df831930e77365c19757b84c0763a25cba2f84de', class: "button-wrapper" }, h("button", Object.assign({ key: 'aa97c1799c33eddc280daa3ca15cb081e50fa6fb' }, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), h("span", { key: 'd65f25aa5c016de5274f97dd74e21de8a2fd186e', class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { key: '357bbce813cc3fb53e7aadfd77e74876702bca79', class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { key: '56c9af814adffc763ae57d9372df278ec3b39514', class: "subinfo" }, this.selectedOptions[0].subinfo)), this.renderOverflowCount()), h("div", { key: '74851e76320c572355e331322ee7b6e0a597168e', class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("priv-option-list", { key: '1a8867c17c997f93c392b2e434062c5e26e1e36a', ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => this.close(), onOptionListAllSelected: () => this.wmSelectAllSelected.emit(), onOptionListAllDeselected: () => this.wmSelectAllDeselected.emit() }, h("slot", { key: '7b7ff193b01aac95bf3d2a8412633bf8331a398d' }))), h("div", { key: 'f7bb2724484488a25c3ca85a6634f1ea4ec00ba9', id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage), h("div", { key: '6170e8ac8a2c63e842cc35057b2da31ec6206f4e', id: "announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
559
248
  }
560
249
  static get is() { return "wm-select"; }
561
250
  static get encapsulation() { return "shadow"; }
@@ -824,26 +513,6 @@ export class Select {
824
513
  "resolved": "void",
825
514
  "references": {}
826
515
  }
827
- }, {
828
- "method": "wmSelectSearchChanged",
829
- "name": "wmSelectSearchChanged",
830
- "bubbles": true,
831
- "cancelable": true,
832
- "composed": true,
833
- "docs": {
834
- "tags": [],
835
- "text": ""
836
- },
837
- "complexType": {
838
- "original": "Object",
839
- "resolved": "Object",
840
- "references": {
841
- "Object": {
842
- "location": "global",
843
- "id": "global::Object"
844
- }
845
- }
846
- }
847
516
  }, {
848
517
  "method": "wmSelectAllSelected",
849
518
  "name": "wmSelectAllSelected",
@@ -893,42 +562,12 @@ export class Select {
893
562
  "target": undefined,
894
563
  "capture": false,
895
564
  "passive": false
896
- }, {
897
- "name": "intCloneClicked",
898
- "method": "handleOptionCloneSelection",
899
- "target": undefined,
900
- "capture": false,
901
- "passive": false
902
565
  }, {
903
566
  "name": "wmEnterKeyPressed",
904
567
  "method": "handleChildEnter",
905
568
  "target": undefined,
906
569
  "capture": false,
907
570
  "passive": false
908
- }, {
909
- "name": "wmKeyUpPressed",
910
- "method": "handleChildUp",
911
- "target": undefined,
912
- "capture": false,
913
- "passive": false
914
- }, {
915
- "name": "wmKeyDownPressed",
916
- "method": "handleChildDown",
917
- "target": undefined,
918
- "capture": false,
919
- "passive": false
920
- }, {
921
- "name": "wmHomeKeyPressed",
922
- "method": "moveToFirstOption",
923
- "target": undefined,
924
- "capture": false,
925
- "passive": false
926
- }, {
927
- "name": "wmEndKeyPressed",
928
- "method": "moveToLastOption",
929
- "target": undefined,
930
- "capture": false,
931
- "passive": false
932
571
  }, {
933
572
  "name": "wmEscKeyPressed",
934
573
  "method": "closePopupOnEscape",
@@ -953,12 +592,6 @@ export class Select {
953
592
  "target": undefined,
954
593
  "capture": false,
955
594
  "passive": false
956
- }, {
957
- "name": "wmLetterPressed",
958
- "method": "findAndFocusOption",
959
- "target": undefined,
960
- "capture": false,
961
- "passive": false
962
595
  }];
963
596
  }
964
597
  }
@@ -190,7 +190,7 @@ export class ActionMenu {
190
190
  return null;
191
191
  }
192
192
  render() {
193
- return (h(Host, { key: 'e6d63a25a3589c42657c7cf0825f9973861e92ae', onBlur: () => this.close(false) }, h("div", { key: '5744b207e0ebec31cb7a70b8c616700b9436d58b', class: getTextDir() }, h("wm-button", { key: '9509bafa8ac5acbb76aafc464d36e4b97b0a8d07', "button-type": this.internalButtonType, tooltip: this.tooltip, "custom-background": this.darkMode ? "dark" : undefined, "label-for-identical-buttons": this.labelForIdenticalButtons, icon: this.actionMenuType === "icon" ? "f1d9" : "", iconSize: this.actionMenuType === "icon" ? "24px" : undefined, id: "menubtn", onClick: () => (this.isExpanded ? this.close() : this.open()), onBlur: (ev) => this.handleButtonBlur(ev), disabled: this.disabled, ref: (el) => (this.wmButtonEl = el), "tooltip-position": this.tooltipPosition || this.horizontalPosition, "aria-haspopup": "true", "aria-expanded": this.isExpanded ? "true" : "false", "aria-controls": "menu" }, this.buttonText), h("div", { key: 'e7846dd17a5b343b506a8c60176bba8ef8e8c2e0', class: `dropdown ${this.openUp ? "open-up" : ""} ${this.horizontalPosition} ${this.isExpanded ? "open" : ""} hidden`, id: "menu", tabindex: -1, role: "menu", ref: (el) => (this.itemsEl = el) }, h("slot", { key: 'e227cd3ea8e2093e64c4b8c335ee098768139fd3' })))));
193
+ return (h(Host, { key: '2a385225e22e0264086f5a5d21b0e5818436b063', onBlur: () => this.close(false) }, h("div", { key: '7ea8e1806988bde77bd5ec763a3552f9fc27493c', class: getTextDir() }, h("wm-button", { key: 'dec5640df072b28e740143f593f6af663e895fbd', "button-type": this.internalButtonType, tooltip: this.tooltip, "custom-background": this.darkMode ? "dark" : undefined, "label-for-identical-buttons": this.labelForIdenticalButtons, icon: this.actionMenuType === "icon" ? "f1d9" : "", iconSize: this.actionMenuType === "icon" ? "24px" : undefined, id: "menubtn", onClick: () => (this.isExpanded ? this.close() : this.open()), onBlur: (ev) => this.handleButtonBlur(ev), disabled: this.disabled, ref: (el) => (this.wmButtonEl = el), "tooltip-position": this.tooltipPosition || this.horizontalPosition, "aria-haspopup": "true", "aria-expanded": this.isExpanded ? "true" : "false", "aria-controls": "menu" }, this.buttonText), h("div", { key: 'de123bc59d9a520f5836d92da233ac768fba3e57', class: `dropdown ${this.openUp ? "open-up" : ""} ${this.horizontalPosition} ${this.isExpanded ? "open" : ""} hidden`, id: "menu", tabindex: -1, role: "menu", ref: (el) => (this.itemsEl = el) }, h("slot", { key: '808b67c91d86c9e85b3cd46e9bd314e1fc5e9002' })))));
194
194
  }
195
195
  static get is() { return "wm-action-menu"; }
196
196
  static get encapsulation() { return "shadow"; }
@@ -166,7 +166,7 @@ export class Button {
166
166
  }
167
167
  }
168
168
  render() {
169
- return (h(Host, { key: 'c0a05cbcd26354a8ec8ce24fc560ec676dc3eedc', class: `${this.isDisabled ? "button-disabled" : ""} -${this.buttonType}` }, h("button", { key: 'f3808a14ca42ea578fe257e7818c2b5be798b61e', id: this.id, class: `${this.buttonClasses}`, disabled: this.isDisabled, ref: (el) => (this.buttonEl = el), "aria-label": this.getAriaLabel(), "aria-hasPopup": this.ariaPopup ? "menu" : null, onMouseEnter: (ev) => this.handleMouseEnter(ev), onMouseLeave: () => hideTooltip(), onFocus: (ev) => this.handleFocus(ev), onBlur: () => hideTooltip(), onClick: () => hideTooltip() }, this.icon && (h("span", { key: '7c247a1febac517d8521a451692536f612657de9', class: "mdi", style: this.iconStyles, "aria-hidden": "true" }, String.fromCodePoint(parseInt(`0x${this.icon}`)))), h("span", { key: 'f4410ed7907af38ab29eb69c90e2bbb3b2e51cb8', class: "button-text" }, h("slot", { key: '2b72eba1f3b0db9ec8a73e37044a3f371264de77' })))));
169
+ return (h(Host, { key: '0060f71ac2e6f369310b3c05657e4c1d671794eb', class: `${this.isDisabled ? "button-disabled" : ""} -${this.buttonType}` }, h("button", { key: '8a2a4a5dc1e6e26c28e96ffb5b84d6a252ba9d9f', id: this.id, class: `${this.buttonClasses}`, disabled: this.isDisabled, ref: (el) => (this.buttonEl = el), "aria-label": this.getAriaLabel(), "aria-hasPopup": this.ariaPopup ? "menu" : null, onMouseEnter: (ev) => this.handleMouseEnter(ev), onMouseLeave: () => hideTooltip(), onFocus: (ev) => this.handleFocus(ev), onBlur: () => hideTooltip(), onClick: () => hideTooltip() }, this.icon && (h("span", { key: '67fc3c5500d8fc4d544bbfbb52e9c8f1c9eacc24', class: "mdi", style: this.iconStyles, "aria-hidden": "true" }, String.fromCodePoint(parseInt(`0x${this.icon}`)))), h("span", { key: '09041f26964d8a4d83134eb2d8f6dba0b944bbbe', class: "button-text" }, h("slot", { key: 'e066946aac4ebd98224f04b27ef498f9b35571b9' })))));
170
170
  }
171
171
  static get is() { return "wm-button"; }
172
172
  static get encapsulation() { return "shadow"; }
@@ -168,7 +168,7 @@ export class File {
168
168
  return (h("div", { class: `file-wrapper ${this.progress === 100 ? "checked" : ""}` }, h("div", { class: `file ${this.errorMessage ? "--error" : ""}` }, this.renderFileName(), !this.errorMessage && (h("div", { class: `right-group ${this.isCondensed ? "condensed" : ""}` }, this.renderFileInfo(), this.fileActions !== "" && this.renderFileControls())), this.errorMessage && (h("wm-button", { "permanently-delete": true, "button-type": "textonly", "label-for-identical-buttons": this.generateClearButtonLabel(this.name), onClick: () => this.wmFileErrorCleared.emit() }, this.clearButtonText))), this.errorMessage && h("div", { class: "error-message" }, this.errorMessage)));
169
169
  }
170
170
  render() {
171
- return h(Host, { key: '0943b20ae9ce90cb1687ff3c092622d2169f9c47', role: "listitem" }, this.isUploading ? this.renderFileInProgress() : this.renderFile());
171
+ return h(Host, { key: '5ad8e488eb44edfd26404408e27b8adc6d01e124', role: "listitem" }, this.isUploading ? this.renderFileInProgress() : this.renderFile());
172
172
  }
173
173
  static get is() { return "wm-file"; }
174
174
  static get encapsulation() { return "shadow"; }
@@ -4,7 +4,7 @@ export class FileList {
4
4
  this.showInfo = "last-updated";
5
5
  }
6
6
  render() {
7
- return (h("div", { key: '7517d9199e320a918e7b87501e2a6841d17e70f5', role: "list", class: "list-wrapper" }, h("slot", { key: 'c90eaf77aa45b5b146ad71cfa3891cbc0a26ab9a' })));
7
+ return (h("div", { key: '398a8905ff498ed10cb7057d3c686f26d8f2a36f', role: "list", class: "list-wrapper" }, h("slot", { key: 'c66ff037e9ee2ced8b3ffef541164fe20ae3e125' })));
8
8
  }
9
9
  static get is() { return "wm-file-list"; }
10
10
  static get encapsulation() { return "shadow"; }
@@ -101,7 +101,7 @@ export class Input {
101
101
  : `info error`;
102
102
  }
103
103
  render() {
104
- return (h("div", { key: '6bff33a353bd632527d8ebd95031db8c8138ae87', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.inputWrapperEl = el) }, h("div", { key: 'c04c1edf83bb49604e4ca504abc51e6647d5487c', class: "label-wrapper" }, h("label", { key: '35d3cf8433a915d548717e7eac14308b1d7a7490', htmlFor: "inputfield", class: "label" }, this.label, this.characterLimit && (h("span", { key: 'a4d9d478d893bde516031f2b0e7097fb17755b28', class: "sr-only" }, " ", globalMessages.getCharacterLimit(this.characterLimit))), this.requiredField && (h("span", { key: '7fa0965a9c325e24aac64c522ef354d9bcf841bd', class: "required", "aria-hidden": "true" }, "*")))), h("div", { key: '4df1efa5078a5d5a6edfd6538923545d3945a34c', class: "inner-wrapper" }, h("div", { key: '0c879dc570054b620eb424e0d660c930e2e580bb', class: "text-after-wrapper" }, h("div", { key: '76886618707f4ca0d5e3ef46ccc7a3561569cb8b', class: `inputfield-wrapper ${this.isDisabled ? "disabled" : ""}`, style: this.getInputWidth() }, this.symbolBefore && (h("span", { key: 'fe346fecf4fa7f0f030354de9d37ac03af8df5d4', class: "symbol", id: "symbol-before" }, this.symbolBefore)), h("input", { key: 'd3ac5033a0aa7e49c2af2a786a3e09d46bec0e51', ref: (el) => (this.inputEl = el), id: "inputfield", disabled: this.isDisabled, "aria-describedby": this.descriptors(), onInput: (ev) => this.handleInput(ev), onKeyDown: (ev) => this.handleKeyDown(ev), onBlur: () => this.handleBlur(), onFocus: () => this.handleFocus(), placeholder: this.placeholder, autocomplete: "off", "aria-required": this.requiredField ? "true" : null, maxLength: this.characterLimit || undefined, type: this.type, step: this.step, max: this.max, min: this.min, value: this.el.value }), this.symbolAfter && (h("span", { key: '948bcf0ca5186a924b7b7e0099fb072ef78658e4', class: "symbol", id: "symbol-after" }, this.symbolAfter)), this.characterLimit && typeof this.characterLimit === "number" ? (h("div", { class: "character-count" }, this.charCount, "/", this.characterLimit)) : ("")), this.textAfter && (h("span", { key: '59ab9c5a6530828b9fbf021de2baa98e0306555b', class: "text-after", id: "text-after" }, this.textAfter))), this.info && (h("div", { key: '981aed3eb22a54accce593c1791f496b4641bc1f', id: "info", class: "info" }, this.info)), h("div", { key: 'cb8fb8d79193f4505204d4bc1bdc62a52675387f', id: "error", class: "error-message" }, this.errorMessage), h("div", { key: 'a319ec8aa8f23c7a51af1de3a65e3778b7cadb67', class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.liveRegionEl = el) }, this.announcement))));
104
+ return (h("div", { key: '7db24a360d7f3378e69aa3c8fb659aa91b8b913f', class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}`, ref: (el) => (this.inputWrapperEl = el) }, h("div", { key: '746b377195a7e93d1ec73f8de6122756d813992d', class: "label-wrapper" }, h("label", { key: '96ca5bc471e4f23aa6138dc377a38e5797b293e6', htmlFor: "inputfield", class: "label" }, this.label, this.characterLimit && (h("span", { key: 'e51d0b811eb04dc446d4140a4adf36a4e85423da', class: "sr-only" }, " ", globalMessages.getCharacterLimit(this.characterLimit))), this.requiredField && (h("span", { key: '244fcf468648e136e5c4a528c070488dccaa7c94', class: "required", "aria-hidden": "true" }, "*")))), h("div", { key: '40d75843b86aa0012a5bb7d277c6d17cd9164ff5', class: "inner-wrapper" }, h("div", { key: '1caa12e9919c11f22071aae6916bbc32d37bebc2', class: "text-after-wrapper" }, h("div", { key: '1e07eb06f59c4c343eb6fd6188440b51046d359c', class: `inputfield-wrapper ${this.isDisabled ? "disabled" : ""}`, style: this.getInputWidth() }, this.symbolBefore && (h("span", { key: '84db811d1334653344e90eecbc687bd23d9ae032', class: "symbol", id: "symbol-before" }, this.symbolBefore)), h("input", { key: '844dca05f01dde484479577e83176aff952727ab', ref: (el) => (this.inputEl = el), id: "inputfield", disabled: this.isDisabled, "aria-describedby": this.descriptors(), onInput: (ev) => this.handleInput(ev), onKeyDown: (ev) => this.handleKeyDown(ev), onBlur: () => this.handleBlur(), onFocus: () => this.handleFocus(), placeholder: this.placeholder, autocomplete: "off", "aria-required": this.requiredField ? "true" : null, maxLength: this.characterLimit || undefined, type: this.type, step: this.step, max: this.max, min: this.min, value: this.el.value }), this.symbolAfter && (h("span", { key: '6e01dbb081603f9c27e39cb8dd33b144657d9654', class: "symbol", id: "symbol-after" }, this.symbolAfter)), this.characterLimit && typeof this.characterLimit === "number" ? (h("div", { class: "character-count" }, this.charCount, "/", this.characterLimit)) : ("")), this.textAfter && (h("span", { key: 'cde565ddedd1355ea1129cf38c3de4335da38631', class: "text-after", id: "text-after" }, this.textAfter))), this.info && (h("div", { key: 'a8d3c096987bd40efa9c5f7416df7cb50c9cc1ff', id: "info", class: "info" }, this.info)), h("div", { key: '48200834cdd3e3f633256afc75b4daacbf4fa0a8', id: "error", class: "error-message" }, this.errorMessage), h("div", { key: '8db2be5cc97bbad09213e40464010285857638f5', class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.liveRegionEl = el) }, this.announcement))));
105
105
  }
106
106
  static get is() { return "wm-input"; }
107
107
  static get encapsulation() { return "shadow"; }
@@ -88,7 +88,7 @@ export class Menuitem {
88
88
  }
89
89
  }
90
90
  render() {
91
- return (h(Host, { key: '1b81b125825133d025c2f138c2e9d89306bd0b93', tabindex: -1, role: "menuitem", "aria-disabled": this.disabled ? "true" : null }, h("div", { key: 'e820464ef57df83441622726b55098c3abdeb6e3', class: "wrapper", "aria-disabled": this.disabled ? "true" : null }, h("span", { key: 'd903355e81bdc504a04cb9489ecd455d6d41a1e1', ref: (el) => (this.iconEl = el) }), this.el.textContent, this.description ? h("div", { class: "description" }, this.description) : "")));
91
+ return (h(Host, { key: '209d7a0e22f05dc500f71a8f8b29e51e4f5da1c2', tabindex: -1, role: "menuitem", "aria-disabled": this.disabled ? "true" : null }, h("div", { key: '3b5a9b5d9571ab224b6cde8a5a01548eb045b159', class: "wrapper", "aria-disabled": this.disabled ? "true" : null }, h("span", { key: 'de7447ebec7218723fec7390b77179bc68ae7823', ref: (el) => (this.iconEl = el) }), this.el.textContent, this.description ? h("div", { class: "description" }, this.description) : "")));
92
92
  }
93
93
  static get is() { return "wm-menuitem"; }
94
94
  static get encapsulation() { return "shadow"; }