@watermarkinsights/ripple 4.3.0 → 4.4.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/dist/cjs/chartFunctions-cecf8134.js +600 -0
  2. package/dist/cjs/{functions-91da05e9.js → functions-4208c444.js} +362 -362
  3. package/dist/cjs/{global-20d48c6c.js → global-bd289a67.js} +24 -24
  4. package/dist/cjs/{index-fae02cd7.js → index-f8ef86de.js} +436 -150
  5. package/dist/cjs/interfaces-ad9e80a6.js +38 -0
  6. package/dist/cjs/intl-3fafc6d1.js +179 -0
  7. package/dist/cjs/loader.cjs.js +4 -13
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +85 -85
  9. package/dist/cjs/priv-datepicker.cjs.entry.js +637 -637
  10. package/dist/cjs/priv-navigator-button.cjs.entry.js +18 -18
  11. package/dist/cjs/priv-navigator-item.cjs.entry.js +21 -21
  12. package/dist/cjs/ripple.cjs.js +4 -7
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +314 -314
  14. package/dist/cjs/wm-button.cjs.entry.js +174 -174
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +17 -17
  16. package/dist/cjs/wm-chart.cjs.entry.js +164 -164
  17. package/dist/cjs/wm-datepicker.cjs.entry.js +160 -160
  18. package/dist/cjs/wm-file-list.cjs.entry.js +10 -10
  19. package/dist/cjs/wm-file.cjs.entry.js +178 -178
  20. package/dist/cjs/wm-input.cjs.entry.js +102 -102
  21. package/dist/cjs/wm-line-chart.cjs.entry.js +462 -462
  22. package/dist/cjs/wm-modal-footer.cjs.entry.js +27 -27
  23. package/dist/cjs/wm-modal-header.cjs.entry.js +21 -21
  24. package/dist/cjs/wm-modal.cjs.entry.js +92 -92
  25. package/dist/cjs/wm-navigation_3.cjs.entry.js +179 -179
  26. package/dist/cjs/wm-navigator.cjs.entry.js +255 -251
  27. package/dist/cjs/wm-option_2.cjs.entry.js +710 -710
  28. package/dist/cjs/wm-pagination.cjs.entry.js +169 -169
  29. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +151 -151
  30. package/dist/cjs/wm-search.cjs.entry.js +192 -192
  31. package/dist/cjs/wm-snackbar.cjs.entry.js +114 -114
  32. package/dist/cjs/wm-tab-item_3.cjs.entry.js +247 -247
  33. package/dist/cjs/wm-tag-input.cjs.entry.js +849 -849
  34. package/dist/cjs/wm-tag-option.cjs.entry.js +33 -33
  35. package/dist/cjs/wm-timepicker.cjs.entry.js +270 -270
  36. package/dist/cjs/wm-toggletip.cjs.entry.js +99 -99
  37. package/dist/cjs/wm-uploader.cjs.entry.js +198 -198
  38. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  39. package/dist/collection/collection-manifest.json +41 -41
  40. package/dist/collection/components/charts/chartFunctions.js +456 -456
  41. package/dist/collection/components/charts/chartFunctions.spec.js +13 -13
  42. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +73 -73
  43. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +257 -254
  44. package/dist/collection/components/charts/screenshots.e2e.js +30 -30
  45. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +121 -121
  46. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +160 -160
  47. package/dist/collection/components/charts/wm-chart/wm-chart.js +382 -381
  48. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +26 -26
  49. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1 -2
  50. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +138 -138
  51. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +731 -731
  52. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +106 -106
  53. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +202 -202
  54. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +54 -54
  55. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +136 -136
  56. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +31 -31
  57. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +119 -119
  58. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +187 -187
  59. package/dist/collection/components/wm-action-menu/wm-action-menu.js +435 -435
  60. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +35 -35
  61. package/dist/collection/components/wm-button/wm-button.e2e.js +58 -58
  62. package/dist/collection/components/wm-button/wm-button.js +454 -452
  63. package/dist/collection/components/wm-button/wm-button.spec.js +63 -63
  64. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +943 -939
  65. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.spec.js +71 -71
  66. package/dist/collection/components/wm-datepicker/wm-datepicker.css +1 -2
  67. package/dist/collection/components/wm-datepicker/wm-datepicker.e2e.js +359 -359
  68. package/dist/collection/components/wm-datepicker/wm-datepicker.js +415 -413
  69. package/dist/collection/components/wm-datepicker/wm-datepicker.spec.js +13 -13
  70. package/dist/collection/components/wm-file/wm-file.js +380 -380
  71. package/dist/collection/components/wm-file/wm-file.spec.js +107 -107
  72. package/dist/collection/components/wm-file-list/wm-file-list.js +42 -42
  73. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +47 -47
  74. package/dist/collection/components/wm-input/wm-input.e2e.js +26 -26
  75. package/dist/collection/components/wm-input/wm-input.js +453 -453
  76. package/dist/collection/components/wm-input/wm-input.spec.js +168 -168
  77. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +18 -18
  78. package/dist/collection/components/wm-menuitem/wm-menuitem.js +446 -436
  79. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +46 -46
  80. package/dist/collection/components/wm-modal/wm-modal-footer.js +130 -130
  81. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +8 -8
  82. package/dist/collection/components/wm-modal/wm-modal-header.js +68 -68
  83. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +5 -5
  84. package/dist/collection/components/wm-modal/wm-modal.e2e.js +65 -65
  85. package/dist/collection/components/wm-modal/wm-modal.js +299 -296
  86. package/dist/collection/components/wm-modal/wm-modal.spec.js +22 -22
  87. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +0 -1
  88. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +112 -112
  89. package/dist/collection/components/wm-navigation/wm-navigation-item.js +125 -125
  90. package/dist/collection/components/wm-navigation/wm-navigation.css +0 -2
  91. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +86 -86
  92. package/dist/collection/components/wm-navigation/wm-navigation.js +209 -209
  93. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +79 -79
  94. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +30 -30
  95. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +103 -103
  96. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +119 -118
  97. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +180 -180
  98. package/dist/collection/components/wm-navigator/wm-navigator.js +458 -454
  99. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +153 -153
  100. package/dist/collection/components/wm-option/wm-option.e2e.js +19 -19
  101. package/dist/collection/components/wm-option/wm-option.js +474 -463
  102. package/dist/collection/components/wm-option/wm-option.spec.js +39 -39
  103. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +301 -301
  104. package/dist/collection/components/wm-pagination/wm-pagination.js +327 -327
  105. package/dist/collection/components/wm-search/wm-search.e2e.js +69 -69
  106. package/dist/collection/components/wm-search/wm-search.js +415 -414
  107. package/dist/collection/components/wm-search/wm-search.spec.js +64 -64
  108. package/dist/collection/components/wm-select/wm-select.e2e.js +443 -443
  109. package/dist/collection/components/wm-select/wm-select.js +967 -966
  110. package/dist/collection/components/wm-select/wm-select.spec.js +250 -250
  111. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +114 -114
  112. package/dist/collection/components/wm-snackbar/wm-snackbar.js +209 -207
  113. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +4 -4
  114. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +190 -188
  115. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +261 -261
  116. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  117. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +79 -79
  118. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +6 -6
  119. package/dist/collection/components/wm-tag-input/wm-tag-input.css +2 -4
  120. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +168 -168
  121. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1159 -1159
  122. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +147 -147
  123. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +236 -234
  124. package/dist/collection/components/wm-timepicker/wm-timepicker.css +1 -2
  125. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +147 -147
  126. package/dist/collection/components/wm-timepicker/wm-timepicker.js +531 -527
  127. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +151 -151
  128. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +61 -61
  129. package/dist/collection/components/wm-toggletip/wm-toggletip.js +209 -208
  130. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +16 -16
  131. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +56 -56
  132. package/dist/collection/components/wm-uploader/wm-uploader.js +423 -422
  133. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +149 -149
  134. package/dist/collection/components/wm-wrapper/wm-wrapper.js +26 -26
  135. package/dist/collection/global/__mocks__/functions.js +1 -1
  136. package/dist/collection/global/functions.js +510 -510
  137. package/dist/collection/global/functions.spec.js +123 -123
  138. package/dist/collection/global/global.js +16 -16
  139. package/dist/collection/global/interfaces.js +39 -39
  140. package/dist/collection/global/intl.js +162 -162
  141. package/dist/collection/global/services/__mocks__/http-service.js +112 -112
  142. package/dist/collection/global/services/http-service.js +41 -41
  143. package/dist/collection/global/themes/default.js +4 -4
  144. package/dist/collection/global/themes/neutral.js +4 -4
  145. package/dist/collection/lang/lang.spec.js +13 -13
  146. package/dist/esm/chartFunctions-23173fce.js +584 -0
  147. package/dist/esm/{functions-5afd09f4.js → functions-d0e70094.js} +362 -362
  148. package/dist/esm/{global-d4a9e80e.js → global-4569c7b8.js} +24 -24
  149. package/dist/esm/{index-7e11ea42.js → index-f164fbca.js} +436 -150
  150. package/dist/esm/interfaces-9b75fb61.js +35 -0
  151. package/dist/esm/intl-05c9e0c9.js +174 -0
  152. package/dist/esm/loader.js +5 -14
  153. package/dist/esm/priv-chart-popover.entry.js +85 -85
  154. package/dist/esm/priv-datepicker.entry.js +637 -637
  155. package/dist/esm/priv-navigator-button.entry.js +18 -18
  156. package/dist/esm/priv-navigator-item.entry.js +21 -21
  157. package/dist/esm/ripple.js +5 -8
  158. package/dist/esm/wm-action-menu_2.entry.js +314 -314
  159. package/dist/esm/wm-button.entry.js +174 -174
  160. package/dist/esm/wm-chart-slice.entry.js +17 -17
  161. package/dist/esm/wm-chart.entry.js +164 -164
  162. package/dist/esm/wm-datepicker.entry.js +160 -160
  163. package/dist/esm/wm-file-list.entry.js +10 -10
  164. package/dist/esm/wm-file.entry.js +178 -178
  165. package/dist/esm/wm-input.entry.js +102 -102
  166. package/dist/esm/wm-line-chart.entry.js +462 -462
  167. package/dist/esm/wm-modal-footer.entry.js +27 -27
  168. package/dist/esm/wm-modal-header.entry.js +21 -21
  169. package/dist/esm/wm-modal.entry.js +92 -92
  170. package/dist/esm/wm-navigation_3.entry.js +179 -179
  171. package/dist/esm/wm-navigator.entry.js +255 -251
  172. package/dist/esm/wm-option_2.entry.js +710 -710
  173. package/dist/esm/wm-pagination.entry.js +169 -169
  174. package/dist/esm/wm-progress-indicator_3.entry.js +151 -151
  175. package/dist/esm/wm-search.entry.js +192 -192
  176. package/dist/esm/wm-snackbar.entry.js +114 -114
  177. package/dist/esm/wm-tab-item_3.entry.js +247 -247
  178. package/dist/esm/wm-tag-input.entry.js +849 -849
  179. package/dist/esm/wm-tag-option.entry.js +33 -33
  180. package/dist/esm/wm-timepicker.entry.js +270 -270
  181. package/dist/esm/wm-toggletip.entry.js +99 -99
  182. package/dist/esm/wm-uploader.entry.js +198 -198
  183. package/dist/esm/wm-wrapper.entry.js +12 -12
  184. package/dist/esm-es5/chartFunctions-23173fce.js +1 -0
  185. package/dist/esm-es5/functions-d0e70094.js +1 -0
  186. package/dist/esm-es5/global-4569c7b8.js +1 -0
  187. package/dist/esm-es5/index-f164fbca.js +2 -0
  188. package/dist/esm-es5/{intl-e2da750a.js → intl-05c9e0c9.js} +1 -1
  189. package/dist/esm-es5/loader.js +1 -1
  190. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  191. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  192. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  193. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  194. package/dist/esm-es5/ripple.js +1 -1
  195. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  196. package/dist/esm-es5/wm-button.entry.js +1 -1
  197. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  198. package/dist/esm-es5/wm-chart.entry.js +1 -1
  199. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  200. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  201. package/dist/esm-es5/wm-file.entry.js +1 -1
  202. package/dist/esm-es5/wm-input.entry.js +1 -1
  203. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  204. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  205. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  206. package/dist/esm-es5/wm-modal.entry.js +1 -1
  207. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  208. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  209. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  210. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  211. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  212. package/dist/esm-es5/wm-search.entry.js +1 -1
  213. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  214. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  215. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  216. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  217. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  218. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  219. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  220. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  221. package/dist/loader/index.d.ts +1 -1
  222. package/dist/ripple/p-028ef6db.system.entry.js +1 -0
  223. package/dist/ripple/{p-863e737a.js → p-05d4e49b.js} +1 -1
  224. package/dist/ripple/{p-a1e95b05.system.entry.js → p-06776596.system.entry.js} +1 -1
  225. package/dist/ripple/{p-622a7791.system.entry.js → p-067d7922.system.entry.js} +1 -1
  226. package/dist/ripple/p-09d62ddd.entry.js +1 -0
  227. package/dist/ripple/{p-f30839a1.system.entry.js → p-0ecbf569.system.entry.js} +1 -1
  228. package/dist/ripple/p-0fe97e85.system.js +2 -0
  229. package/dist/ripple/{p-24b08e1f.js → p-13ca30d8.js} +1 -1
  230. package/dist/ripple/{p-8f3f903f.system.js → p-1402cfa2.system.js} +1 -1
  231. package/dist/ripple/p-1453ea51.system.entry.js +1 -0
  232. package/dist/ripple/{p-6abb903c.entry.js → p-153701f9.entry.js} +1 -1
  233. package/dist/ripple/p-1cc91907.system.js +1 -0
  234. package/dist/ripple/{p-ad37cdfd.entry.js → p-1d8b0039.entry.js} +1 -1
  235. package/dist/ripple/{p-d0f1b8c4.system.entry.js → p-1fa2a756.system.entry.js} +1 -1
  236. package/dist/ripple/{p-a52c5a1c.entry.js → p-25446670.entry.js} +1 -1
  237. package/dist/ripple/{p-1283e85d.entry.js → p-27f47edc.entry.js} +1 -1
  238. package/dist/ripple/{p-32b1126c.system.entry.js → p-28e4583c.system.entry.js} +1 -1
  239. package/dist/ripple/{p-a5b23781.system.entry.js → p-2c4f312d.system.entry.js} +1 -1
  240. package/dist/ripple/p-30b17818.system.entry.js +1 -0
  241. package/dist/ripple/{p-0631be01.system.entry.js → p-3446852f.system.entry.js} +1 -1
  242. package/dist/ripple/{p-ae674a54.entry.js → p-350fe5da.entry.js} +1 -1
  243. package/dist/ripple/{p-d04ba5f8.system.entry.js → p-3583d113.system.entry.js} +1 -1
  244. package/dist/ripple/{p-cbd8a60b.system.entry.js → p-361cc8fc.system.entry.js} +1 -1
  245. package/dist/ripple/{p-7529706d.entry.js → p-372faf33.entry.js} +1 -1
  246. package/dist/ripple/{p-19773c40.entry.js → p-3a070f35.entry.js} +1 -1
  247. package/dist/ripple/{p-c7b5ac39.js → p-3af72848.js} +1 -1
  248. package/dist/ripple/{p-c41603e6.entry.js → p-42ebfcfa.entry.js} +1 -1
  249. package/dist/ripple/{p-13594c2e.entry.js → p-43e2a49a.entry.js} +1 -1
  250. package/dist/ripple/{p-ed942b42.entry.js → p-49118468.entry.js} +1 -1
  251. package/dist/ripple/p-49c85d1a.system.js +1 -0
  252. package/dist/ripple/p-4de51706.js +2 -0
  253. package/dist/ripple/{p-3c80bf67.entry.js → p-58174f4e.entry.js} +1 -1
  254. package/dist/ripple/{p-c5e8f8a5.system.entry.js → p-5a4d9897.system.entry.js} +1 -1
  255. package/dist/ripple/{p-e3f0b57f.system.entry.js → p-5ac980e2.system.entry.js} +1 -1
  256. package/dist/ripple/{p-3becce62.system.entry.js → p-633cd89a.system.entry.js} +1 -1
  257. package/dist/ripple/{p-1205fdc1.entry.js → p-63f75d43.entry.js} +1 -1
  258. package/dist/ripple/{p-90ea7e3a.system.entry.js → p-67d48c33.system.entry.js} +1 -1
  259. package/dist/ripple/{p-8ef87907.entry.js → p-6caaf85f.entry.js} +1 -1
  260. package/dist/ripple/{p-935513f8.entry.js → p-6cf7a34a.entry.js} +1 -1
  261. package/dist/ripple/p-73289c2c.system.js +1 -0
  262. package/dist/ripple/{p-c76bbedf.system.entry.js → p-7a8816d9.system.entry.js} +1 -1
  263. package/dist/ripple/{p-8ea68cb3.system.entry.js → p-7e56da2e.system.entry.js} +1 -1
  264. package/dist/ripple/{p-deb4f5a2.entry.js → p-7e8daaac.entry.js} +1 -1
  265. package/dist/ripple/p-88406560.system.entry.js +1 -0
  266. package/dist/ripple/{p-84a7e757.entry.js → p-8cace32f.entry.js} +1 -1
  267. package/dist/ripple/{p-80aef387.entry.js → p-8d4734ad.entry.js} +1 -1
  268. package/dist/ripple/p-8f76a838.system.entry.js +1 -0
  269. package/dist/ripple/p-934c1b6b.js +1 -0
  270. package/dist/ripple/{p-85f744ed.system.js → p-9fecbc8a.system.js} +1 -1
  271. package/dist/ripple/{p-b71a83e3.entry.js → p-a69c37e0.entry.js} +1 -1
  272. package/dist/ripple/{p-9288659b.entry.js → p-a82a8931.entry.js} +1 -1
  273. package/dist/ripple/p-a99b05de.system.entry.js +1 -0
  274. package/dist/ripple/{p-36049d2f.entry.js → p-aadf8c59.entry.js} +1 -1
  275. package/dist/ripple/{p-676c1089.system.entry.js → p-aba5a00e.system.entry.js} +1 -1
  276. package/dist/ripple/{p-0aecac86.entry.js → p-ad6dc751.entry.js} +1 -1
  277. package/dist/ripple/{p-0f1ff645.entry.js → p-b253d2fc.entry.js} +1 -1
  278. package/dist/ripple/p-b2ff4723.system.entry.js +1 -0
  279. package/dist/ripple/{p-a0bf5eef.entry.js → p-b452d1d7.entry.js} +1 -1
  280. package/dist/ripple/{p-1cde16a7.system.entry.js → p-b4d862e1.system.entry.js} +1 -1
  281. package/dist/ripple/{p-d496bc44.system.entry.js → p-bdd4f919.system.entry.js} +1 -1
  282. package/dist/ripple/p-c18b398c.system.js +1 -0
  283. package/dist/ripple/{p-8f8c3705.entry.js → p-c249063c.entry.js} +1 -1
  284. package/dist/ripple/p-c344a69c.entry.js +1 -0
  285. package/dist/ripple/{p-0d9f70ab.entry.js → p-c717d895.entry.js} +1 -1
  286. package/dist/ripple/{p-2e773564.system.entry.js → p-c96a5c94.system.entry.js} +1 -1
  287. package/dist/ripple/{p-15497721.system.entry.js → p-ceced3d9.system.entry.js} +1 -1
  288. package/dist/ripple/{p-d428e9bb.system.entry.js → p-d16f91e9.system.entry.js} +1 -1
  289. package/dist/ripple/{p-ff14e4ec.system.entry.js → p-d3f9d028.system.entry.js} +1 -1
  290. package/dist/ripple/{p-7962f562.entry.js → p-de349bee.entry.js} +1 -1
  291. package/dist/ripple/{p-b3c73bc9.entry.js → p-e24ddae1.entry.js} +1 -1
  292. package/dist/ripple/{p-b3e08b14.system.entry.js → p-e8b58666.system.entry.js} +1 -1
  293. package/dist/ripple/{p-a9c096b5.entry.js → p-fa87bce3.entry.js} +1 -1
  294. package/dist/ripple/ripple.esm.js +1 -1
  295. package/dist/ripple/ripple.js +16 -20
  296. package/dist/types/components/charts/chartFunctions.d.ts +13 -13
  297. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +24 -24
  298. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +8 -8
  299. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +39 -39
  300. package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +74 -74
  301. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +26 -26
  302. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
  303. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +7 -7
  304. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +43 -43
  305. package/dist/types/components/wm-button/wm-button.d.ts +40 -40
  306. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +76 -76
  307. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +31 -31
  308. package/dist/types/components/wm-file/wm-file.d.ts +40 -40
  309. package/dist/types/components/wm-file-list/wm-file-list.d.ts +3 -3
  310. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  311. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +31 -31
  312. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +11 -11
  313. package/dist/types/components/wm-modal/wm-modal-header.d.ts +7 -7
  314. package/dist/types/components/wm-modal/wm-modal.d.ts +24 -24
  315. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +13 -13
  316. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +10 -10
  317. package/dist/types/components/wm-navigation/wm-navigation.d.ts +23 -23
  318. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +7 -7
  319. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +10 -10
  320. package/dist/types/components/wm-navigator/wm-navigator.d.ts +57 -57
  321. package/dist/types/components/wm-option/wm-option.d.ts +36 -36
  322. package/dist/types/components/wm-pagination/wm-pagination.d.ts +27 -27
  323. package/dist/types/components/wm-search/wm-search.d.ts +73 -73
  324. package/dist/types/components/wm-select/wm-select.d.ts +99 -99
  325. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +24 -24
  326. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +30 -30
  327. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +41 -41
  328. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +16 -16
  329. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +114 -114
  330. package/dist/types/components/wm-tag-input/wm-tag-option/wm-tag-option.d.ts +15 -15
  331. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +48 -48
  332. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +20 -20
  333. package/dist/types/components/wm-uploader/wm-uploader.d.ts +47 -47
  334. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +4 -4
  335. package/dist/types/components.d.ts +382 -0
  336. package/dist/types/global/__mocks__/functions.d.ts +1 -1
  337. package/dist/types/global/functions.d.ts +4 -4
  338. package/dist/types/global/interfaces.d.ts +49 -49
  339. package/dist/types/global/intl.d.ts +31 -31
  340. package/dist/types/global/services/__mocks__/http-service.d.ts +1 -1
  341. package/dist/types/stencil-public-runtime.d.ts +46 -5
  342. package/package.json +1 -1
  343. package/dist/cjs/chartFunctions-2c3e010e.js +0 -600
  344. package/dist/cjs/interfaces-245d7bff.js +0 -38
  345. package/dist/cjs/intl-fa3bb4ae.js +0 -179
  346. package/dist/esm/chartFunctions-36634c04.js +0 -584
  347. package/dist/esm/interfaces-89cad2fc.js +0 -35
  348. package/dist/esm/intl-e2da750a.js +0 -174
  349. package/dist/esm/polyfills/css-shim.js +0 -1
  350. package/dist/esm-es5/chartFunctions-36634c04.js +0 -1
  351. package/dist/esm-es5/functions-5afd09f4.js +0 -1
  352. package/dist/esm-es5/global-d4a9e80e.js +0 -1
  353. package/dist/esm-es5/index-7e11ea42.js +0 -2
  354. package/dist/ripple/p-00acacbe.system.entry.js +0 -1
  355. package/dist/ripple/p-0f889b84.system.js +0 -1
  356. package/dist/ripple/p-13af8346.entry.js +0 -1
  357. package/dist/ripple/p-16363e1c.system.entry.js +0 -1
  358. package/dist/ripple/p-2a95b63f.system.entry.js +0 -1
  359. package/dist/ripple/p-30bf24f8.system.js +0 -2
  360. package/dist/ripple/p-3248c0fa.system.entry.js +0 -1
  361. package/dist/ripple/p-47c20b05.entry.js +0 -1
  362. package/dist/ripple/p-56d64283.system.entry.js +0 -1
  363. package/dist/ripple/p-5e85967a.system.js +0 -1
  364. package/dist/ripple/p-9b2034f6.js +0 -1
  365. package/dist/ripple/p-a3d07be5.system.js +0 -1
  366. package/dist/ripple/p-a6be3cca.system.entry.js +0 -1
  367. package/dist/ripple/p-aafa111a.system.js +0 -1
  368. package/dist/ripple/p-b5bedd63.js +0 -2
  369. package/dist/ripple/p-bd537299.system.entry.js +0 -1
  370. /package/dist/esm-es5/{interfaces-89cad2fc.js → interfaces-9b75fb61.js} +0 -0
  371. /package/dist/ripple/{p-c0c111fd.js → p-196eb2f3.js} +0 -0
@@ -3,993 +3,994 @@ import { forceUpdate } from "@stencil/core";
3
3
  import { generateId, getTextDir, shouldOpenUp, intl, debounce, toBool, handleDisabledAttribute, } from "../../global/functions";
4
4
  import { globalMessages } from "../../global/intl";
5
5
  export class Select {
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
- this.openUp = false;
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
+ this.openUp = false;
26
+ //////////////////////////////////////
27
+ //////////////////////////////////////
28
+ // for multiselect button text
29
+ this.overflowCount = 0;
30
+ 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
+ this.disabled = false;
44
+ this.maxHeight = undefined;
45
+ this.label = undefined;
46
+ this.labelPosition = "top";
47
+ this.requiredField = false;
48
+ this.errorMessage = "";
49
+ this.multiple = false;
50
+ this.search = false;
51
+ this.selectAll = false;
52
+ this.placeholder = intl.formatMessage({
53
+ id: "select.multiPlaceholder",
54
+ defaultMessage: "Make a selection",
55
+ description: "Placeholder text. Use imperative",
56
+ });
57
+ this.searchPlaceholder = intl.formatMessage({
58
+ id: "select.searchPlaceholder",
59
+ defaultMessage: "Search",
60
+ description: "Placeholder text. Use imperative",
61
+ });
62
+ this.allSelectedMessage = intl.formatMessage({
63
+ id: "select.allSelected",
64
+ defaultMessage: "All selected",
65
+ description: "Text displayed when all options are selected",
66
+ });
67
+ this.isTabbing = false;
68
+ this.isExpanded = false;
69
+ this.announcement = "";
70
+ }
71
+ get childOptions() {
72
+ return Array.from(this.el.querySelectorAll("wm-option"));
73
+ }
74
+ get cloneOptions() {
75
+ return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"));
76
+ }
77
+ get allOptionEls() {
78
+ // this includes both slotted wm-options and internally created wm-options
79
+ return this.cloneOptions.concat(this.childOptions);
80
+ }
81
+ get visibleOptionEls() {
82
+ return this.allOptionEls.filter((option) => !option.classList.contains("hidden") && !option.classList.contains("filtered-out"));
83
+ }
84
+ get isDisabled() {
85
+ // string "false" needs to be treated as bool False because react wrappers convert bool to string.
86
+ return toBool(this.disabled);
87
+ }
26
88
  //////////////////////////////////////
89
+ // for search variants
90
+ get searchTerm() {
91
+ return this.searchFieldEl ? this.searchFieldEl.value : "";
92
+ }
93
+ get filteredOptions() {
94
+ return this.childOptions.filter((option) => { var _a; return (_a = option.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(this.searchTerm.toLowerCase()); });
95
+ }
96
+ get selectedOptions() {
97
+ return Array.from(this.el.querySelectorAll("wm-option")).filter((x) => x.selected);
98
+ }
99
+ get allSelected() {
100
+ return this.childOptions.every((option) => option.selected);
101
+ }
102
+ get visibleSelectAllButton() {
103
+ return this.selectAll && this.multiple && this.searchTerm === "";
104
+ }
27
105
  //////////////////////////////////////
28
- // for multiselect button text
29
- this.overflowCount = 0;
30
- 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
- this.disabled = false;
44
- this.maxHeight = undefined;
45
- this.label = undefined;
46
- this.labelPosition = "top";
47
- this.requiredField = false;
48
- this.errorMessage = "";
49
- this.multiple = false;
50
- this.search = false;
51
- this.selectAll = false;
52
- this.placeholder = intl.formatMessage({
53
- id: "select.multiPlaceholder",
54
- defaultMessage: "Make a selection",
55
- description: "Placeholder text. Use imperative",
56
- });
57
- this.searchPlaceholder = intl.formatMessage({
58
- id: "select.searchPlaceholder",
59
- defaultMessage: "Search",
60
- description: "Placeholder text. Use imperative",
61
- });
62
- this.allSelectedMessage = intl.formatMessage({
63
- id: "select.allSelected",
64
- defaultMessage: "All selected",
65
- description: "Text displayed when all options are selected",
66
- });
67
- this.isTabbing = false;
68
- this.isExpanded = false;
69
- this.announcement = "";
70
- }
71
- get childOptions() {
72
- return Array.from(this.el.querySelectorAll("wm-option"));
73
- }
74
- get cloneOptions() {
75
- return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"));
76
- }
77
- get allOptionEls() {
78
- // this includes both slotted wm-options and internally created wm-options
79
- return this.cloneOptions.concat(this.childOptions);
80
- }
81
- get visibleOptionEls() {
82
- return this.allOptionEls.filter((option) => !option.classList.contains("hidden") && !option.classList.contains("filtered-out"));
83
- }
84
- get isDisabled() {
85
- // string "false" needs to be treated as bool False because react wrappers convert bool to string.
86
- return toBool(this.disabled);
87
- }
88
- //////////////////////////////////////
89
- // for search variants
90
- get searchTerm() {
91
- return this.searchFieldEl ? this.searchFieldEl.value : "";
92
- }
93
- get filteredOptions() {
94
- return this.childOptions.filter((option) => { var _a; return (_a = option.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(this.searchTerm.toLowerCase()); });
95
- }
96
- get selectedOptions() {
97
- return Array.from(this.el.querySelectorAll("wm-option")).filter((x) => x.selected);
98
- }
99
- get allSelected() {
100
- return this.childOptions.every((option) => option.selected);
101
- }
102
- get visibleSelectAllButton() {
103
- return this.selectAll && this.multiple && this.searchTerm === "";
104
- }
105
- //////////////////////////////////////
106
- get resultsFoundMessage() {
107
- return intl.formatMessage({
108
- id: "select.searchResultsFound",
109
- defaultMessage: "{numResults, plural, one {1 option found} other {# options found}}",
110
- description: "The message read by the screen reader, indicating how many results a search returned",
111
- }, { numResults: this.filteredOptions.length });
112
- }
113
- get noResultsFoundMessage() {
114
- return intl.formatMessage({
115
- id: "select.noSearchResults",
116
- defaultMessage: "No results found. Please try your search again.",
117
- description: "The message displayed when no options pass the search filter",
118
- });
119
- }
120
- toggleTabbingOn() {
121
- this.isTabbing = true;
122
- }
123
- toggleTabbingOff() {
124
- this.isTabbing = false;
125
- }
126
- handleOptionSelection(ev) {
127
- this.focusOption(ev.detail);
128
- if (!this.multiple) {
129
- this.close();
130
- }
131
- }
132
- handleOptionCloneSelection(ev) {
133
- const correspondingOption = this.findCorrespondingOption(ev.detail);
134
- correspondingOption.click();
135
- }
136
- handleChildEnter() {
137
- // only occurs for multiselects. handle the click, then close
138
- this.close();
139
- }
140
- handleChildUp(ev) {
141
- this.moveUp(ev.detail);
142
- }
143
- handleChildDown(ev) {
144
- this.moveDown(ev.detail);
145
- }
146
- moveToFirstOption() {
147
- this.focusOption(this.visibleOptionEls[0]);
148
- }
149
- moveToLastOption() {
150
- this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
151
- }
152
- closePopupOnEscape() {
153
- this.close();
154
- }
155
- handleOptionBlur(ev) {
156
- // if the Option is blurred to something other than the component emit a blur event with the appropriate relatedTarget
157
- // keeps our component's blur events accurate, and closes when focusing browser address bar
158
- if (!this.isElOrChild(ev.detail.relatedTarget)) {
159
- const event = new CustomEvent("blur");
160
- // @ts-ignore
161
- event.relatedTarget = ev.detail.relatedTarget;
162
- this.el.dispatchEvent(event);
163
- }
164
- }
165
- handleClick(ev) {
166
- if (!this.isElOrChild(ev.target)) {
167
- this.close();
168
- }
169
- }
170
- handleSelectAllClick() {
171
- this.allSelected ? this.deselectAllOptions() : this.selectAllOptions();
172
- }
173
- selectAllOptions() {
174
- this.announce(this.allOptionsSelectedMessage);
175
- this.wmSelectAllSelected.emit();
176
- }
177
- deselectAllOptions() {
178
- this.announce(this.allOptionsDeselectedMessage);
179
- this.wmSelectAllDeselected.emit();
180
- }
181
- handleButtonBlur(ev) {
182
- if (this.isElOrChild(ev.relatedTarget)) {
183
- // do not emit a blur event when opening the dropdown and focusing the Options
184
- ev.stopPropagation();
185
- }
186
- }
187
- handleSearchFieldBlur(ev) {
188
- this.searchFieldWrapperEl.classList.remove("focus");
189
- if (this.isElOrChild(ev.relatedTarget)) {
190
- // do not emit a blur event when moving from searchfield to options
191
- ev.stopPropagation();
192
- }
193
- }
194
- handleKey(ev) {
195
- switch (ev.key) {
196
- case "ArrowDown":
197
- if (this.isExpanded === false) {
198
- ev.preventDefault();
199
- this.open("next");
106
+ get resultsFoundMessage() {
107
+ return intl.formatMessage({
108
+ id: "select.searchResultsFound",
109
+ defaultMessage: "{numResults, plural, one {1 option found} other {# options found}}",
110
+ description: "The message read by the screen reader, indicating how many results a search returned",
111
+ }, { numResults: this.filteredOptions.length });
112
+ }
113
+ get noResultsFoundMessage() {
114
+ return intl.formatMessage({
115
+ id: "select.noSearchResults",
116
+ defaultMessage: "No results found. Please try your search again.",
117
+ description: "The message displayed when no options pass the search filter",
118
+ });
119
+ }
120
+ toggleTabbingOn() {
121
+ this.isTabbing = true;
122
+ }
123
+ toggleTabbingOff() {
124
+ this.isTabbing = false;
125
+ }
126
+ handleOptionSelection(ev) {
127
+ this.focusOption(ev.detail);
128
+ if (!this.multiple) {
129
+ this.close();
130
+ }
131
+ }
132
+ handleOptionCloneSelection(ev) {
133
+ const correspondingOption = this.findCorrespondingOption(ev.detail);
134
+ correspondingOption.click();
135
+ }
136
+ handleChildEnter() {
137
+ // only occurs for multiselects. handle the click, then close
138
+ this.close();
139
+ }
140
+ handleChildUp(ev) {
141
+ this.moveUp(ev.detail);
142
+ }
143
+ handleChildDown(ev) {
144
+ this.moveDown(ev.detail);
145
+ }
146
+ moveToFirstOption() {
147
+ this.focusOption(this.visibleOptionEls[0]);
148
+ }
149
+ moveToLastOption() {
150
+ this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
151
+ }
152
+ closePopupOnEscape() {
153
+ this.close();
154
+ }
155
+ handleOptionBlur(ev) {
156
+ // if the Option is blurred to something other than the component emit a blur event with the appropriate relatedTarget
157
+ // keeps our component's blur events accurate, and closes when focusing browser address bar
158
+ if (!this.isElOrChild(ev.detail.relatedTarget)) {
159
+ const event = new CustomEvent("blur");
160
+ // @ts-ignore
161
+ event.relatedTarget = ev.detail.relatedTarget;
162
+ this.el.dispatchEvent(event);
200
163
  }
201
- break;
202
- case "ArrowUp":
203
- if (this.isExpanded === false) {
204
- ev.preventDefault();
205
- this.open("previous");
164
+ }
165
+ handleClick(ev) {
166
+ if (!this.isElOrChild(ev.target)) {
167
+ this.close();
206
168
  }
207
- break;
208
- }
209
- }
210
- componentWillLoad() {
211
- if (!this.label) {
212
- console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).");
213
- }
214
- if (!this.multiple && this.selectedOptions.length === 0) {
215
- console.error("wm-select should have one initial option selected");
216
- }
217
- if (document.body.classList.contains("wmcl-user-is-tabbing")) {
218
- this.toggleTabbingOn();
219
- }
220
- handleDisabledAttribute(this.el, this.isDisabled);
221
- const mutationObserver = new MutationObserver((mutationRecordList) => mutationRecordList.forEach((mutationRecord) => this.handleChildChange(mutationRecord)));
222
- mutationObserver.observe(this.el, {
223
- childList: true,
224
- attributes: true,
225
- subtree: true,
226
- attributeFilter: ["selected"],
227
- });
228
- }
229
- handleChildChange(_) {
230
- // on update of children or children selected state, reset button text and rerender
231
- this.setButtonText();
232
- forceUpdate(this.el);
233
- }
234
- componentDidLoad() {
235
- this.wmSelectDidLoad.emit();
236
- this.dropdownEl.classList.add("hidden");
237
- forceUpdate(this.el);
238
- // Dev can overwrite the max-height rule set in the Sass file
239
- if (this.maxHeight) {
240
- this.listboxEl.style.maxHeight = this.maxHeight;
241
- }
242
- if (this.multiple) {
243
- this.updateOptionVisibility();
244
- }
245
- this.setButtonText();
246
- }
247
- componentWillUpdate() {
248
- if (this.multiple) {
249
- // find last visible clone option and apply .last class
250
- const visibleCloneOptions = this.visibleOptionEls.filter((option) => option.classList.contains("clone"));
251
- visibleCloneOptions.forEach((option, idx) => {
252
- if (idx === visibleCloneOptions.length - 1) {
253
- option.classList.add("last");
169
+ }
170
+ handleSelectAllClick() {
171
+ this.allSelected ? this.deselectAllOptions() : this.selectAllOptions();
172
+ }
173
+ selectAllOptions() {
174
+ this.announce(this.allOptionsSelectedMessage);
175
+ this.wmSelectAllSelected.emit();
176
+ }
177
+ deselectAllOptions() {
178
+ this.announce(this.allOptionsDeselectedMessage);
179
+ this.wmSelectAllDeselected.emit();
180
+ }
181
+ handleButtonBlur(ev) {
182
+ if (this.isElOrChild(ev.relatedTarget)) {
183
+ // do not emit a blur event when opening the dropdown and focusing the Options
184
+ ev.stopPropagation();
254
185
  }
255
- else {
256
- option.classList.remove("last");
186
+ }
187
+ handleSearchFieldBlur(ev) {
188
+ this.searchFieldWrapperEl.classList.remove("focus");
189
+ if (this.isElOrChild(ev.relatedTarget)) {
190
+ // do not emit a blur event when moving from searchfield to options
191
+ ev.stopPropagation();
192
+ }
193
+ }
194
+ handleKey(ev) {
195
+ switch (ev.key) {
196
+ case "ArrowDown":
197
+ if (this.isExpanded === false) {
198
+ ev.preventDefault();
199
+ this.open("next");
200
+ }
201
+ break;
202
+ case "ArrowUp":
203
+ if (this.isExpanded === false) {
204
+ ev.preventDefault();
205
+ this.open("previous");
206
+ }
207
+ break;
208
+ }
209
+ }
210
+ componentWillLoad() {
211
+ if (!this.label) {
212
+ console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).");
213
+ }
214
+ if (!this.multiple && this.selectedOptions.length === 0) {
215
+ console.error("wm-select should have one initial option selected");
216
+ }
217
+ if (document.body.classList.contains("wmcl-user-is-tabbing")) {
218
+ this.toggleTabbingOn();
219
+ }
220
+ handleDisabledAttribute(this.el, this.isDisabled);
221
+ const mutationObserver = new MutationObserver((mutationRecordList) => mutationRecordList.forEach((mutationRecord) => this.handleChildChange(mutationRecord)));
222
+ mutationObserver.observe(this.el, {
223
+ childList: true,
224
+ attributes: true,
225
+ subtree: true,
226
+ attributeFilter: ["selected"],
227
+ });
228
+ }
229
+ handleChildChange(_) {
230
+ // on update of children or children selected state, reset button text and rerender
231
+ this.setButtonText();
232
+ forceUpdate(this.el);
233
+ }
234
+ componentDidLoad() {
235
+ this.wmSelectDidLoad.emit();
236
+ this.dropdownEl.classList.add("hidden");
237
+ forceUpdate(this.el);
238
+ // Dev can overwrite the max-height rule set in the Sass file
239
+ if (this.maxHeight) {
240
+ this.listboxEl.style.maxHeight = this.maxHeight;
241
+ }
242
+ if (this.multiple) {
243
+ this.updateOptionVisibility();
244
+ }
245
+ this.setButtonText();
246
+ }
247
+ componentWillUpdate() {
248
+ if (this.multiple) {
249
+ // find last visible clone option and apply .last class
250
+ const visibleCloneOptions = this.visibleOptionEls.filter((option) => option.classList.contains("clone"));
251
+ visibleCloneOptions.forEach((option, idx) => {
252
+ if (idx === visibleCloneOptions.length - 1) {
253
+ option.classList.add("last");
254
+ }
255
+ else {
256
+ option.classList.remove("last");
257
+ }
258
+ });
257
259
  }
258
- });
259
- }
260
- }
261
- moveUp(el) {
262
- const focusableEls = this.visibleOptionEls;
263
- if (this.selectAllEl) {
264
- focusableEls.unshift(this.selectAllEl);
265
- }
266
- if (this.searchFieldEl) {
267
- focusableEls.unshift(this.searchFieldEl);
268
- }
269
- const prevEl = focusableEls[focusableEls.indexOf(el) - 1] || focusableEls[focusableEls.length - 1];
270
- if (prevEl) {
271
- this.focusOption(prevEl);
272
- }
273
- }
274
- moveDown(el) {
275
- const focusableEls = this.visibleOptionEls;
276
- if (this.selectAllEl) {
277
- focusableEls.unshift(this.selectAllEl);
278
- }
279
- if (this.searchFieldEl) {
280
- focusableEls.unshift(this.searchFieldEl);
281
- }
282
- const nextEl = focusableEls[focusableEls.indexOf(el) + 1] || focusableEls[0];
283
- if (nextEl) {
284
- this.focusOption(nextEl);
285
- }
286
- }
287
- open(optionToSelect) {
288
- if (!this.isDisabled) {
289
- const elHeight = this.el.clientHeight;
290
- const buttonHeight = this.buttonEl.clientHeight;
291
- this.openUp = shouldOpenUp(this.el, this.dropdownEl.clientHeight,
292
- // when opening up, dropdown covers both label and button
293
- elHeight,
294
- // when opening down, dropdown covers only the button
295
- buttonHeight);
296
- this.isExpanded = true;
297
- this.dropdownEl.classList.remove("hidden");
298
- window.requestAnimationFrame(() => {
299
- switch (optionToSelect) {
300
- case "next":
301
- // search variant focuses search field
302
- // all others focus option "after" last selected option (this can be the first option)
303
- if (this.search) {
304
- this.searchFieldEl.focus();
305
- this.listboxEl.scrollTop = 0;
260
+ }
261
+ moveUp(el) {
262
+ const focusableEls = this.visibleOptionEls;
263
+ if (this.selectAllEl) {
264
+ focusableEls.unshift(this.selectAllEl);
265
+ }
266
+ if (this.searchFieldEl) {
267
+ focusableEls.unshift(this.searchFieldEl);
268
+ }
269
+ const prevEl = focusableEls[focusableEls.indexOf(el) - 1] || focusableEls[focusableEls.length - 1];
270
+ if (prevEl) {
271
+ this.focusOption(prevEl);
272
+ }
273
+ }
274
+ moveDown(el) {
275
+ const focusableEls = this.visibleOptionEls;
276
+ if (this.selectAllEl) {
277
+ focusableEls.unshift(this.selectAllEl);
278
+ }
279
+ if (this.searchFieldEl) {
280
+ focusableEls.unshift(this.searchFieldEl);
281
+ }
282
+ const nextEl = focusableEls[focusableEls.indexOf(el) + 1] || focusableEls[0];
283
+ if (nextEl) {
284
+ this.focusOption(nextEl);
285
+ }
286
+ }
287
+ open(optionToSelect) {
288
+ if (!this.isDisabled) {
289
+ const elHeight = this.el.clientHeight;
290
+ const buttonHeight = this.buttonEl.clientHeight;
291
+ this.openUp = shouldOpenUp(this.el, this.dropdownEl.clientHeight,
292
+ // when opening up, dropdown covers both label and button
293
+ elHeight,
294
+ // when opening down, dropdown covers only the button
295
+ buttonHeight);
296
+ this.isExpanded = true;
297
+ this.dropdownEl.classList.remove("hidden");
298
+ window.requestAnimationFrame(() => {
299
+ switch (optionToSelect) {
300
+ case "next":
301
+ // search variant focuses search field
302
+ // all others focus option "after" last selected option (this can be the first option)
303
+ if (this.search) {
304
+ this.searchFieldEl.focus();
305
+ this.listboxEl.scrollTop = 0;
306
+ }
307
+ else {
308
+ this.moveDown(this.visibleOptionEls.filter((x) => x.selected).slice(-1)[0]);
309
+ }
310
+ break;
311
+ case "previous":
312
+ // search variant focuses last option
313
+ // all others focus option "above" first selected option (this can be the last option)
314
+ if (this.search) {
315
+ this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
316
+ }
317
+ else {
318
+ this.moveUp(this.visibleOptionEls.filter((x) => x.selected)[0]);
319
+ }
320
+ break;
321
+ default:
322
+ // search variant focuses search field
323
+ // all others focus the selected option
324
+ // if no option is selected (empty multiselect), focuses first option
325
+ if (this.search) {
326
+ this.searchFieldEl.focus();
327
+ this.listboxEl.scrollTop = 0;
328
+ }
329
+ else if (this.selectedOptions.length > 0) {
330
+ this.focusOption(this.visibleOptionEls.filter((x) => x.selected)[0]);
331
+ }
332
+ else {
333
+ this.focusOption(this.visibleOptionEls[0]);
334
+ }
335
+ break;
336
+ }
337
+ });
338
+ }
339
+ }
340
+ close(returnFocus = true) {
341
+ if (this.isExpanded) {
342
+ this.isExpanded = false;
343
+ this.allOptionEls.map((i) => (i.focused = false));
344
+ window.setTimeout(() => {
345
+ this.dropdownEl.classList.add("hidden");
346
+ if (this.multiple) {
347
+ this.updateOptionVisibility();
348
+ }
349
+ // clear search field, reset filtered / bolded state of wm-options
350
+ if (this.search) {
351
+ this.searchFieldEl.value = "";
352
+ this.wmSelectSearchChanged.emit({ searchTerm: this.searchTerm });
353
+ }
354
+ // Returns focus to button after popup closes (no need if user is tabbing)
355
+ // Delay is necessary for screenreader to get new expanded state before focus
356
+ // window.requestAnimationFrame is probably enough, but since we are already using setTimeout it may as well be here
357
+ // also UX wise, it makes sense for the button to only be focused after the animation is complete
358
+ if (returnFocus) {
359
+ this.buttonEl.focus();
360
+ }
361
+ }, 150);
362
+ }
363
+ }
364
+ updateOptionVisibility() {
365
+ // this runs for search multiselects, where selected options are rendered at the top of the dropdown list
366
+ // slotted wm-options are hidden if selected, and clone wm-options are made visible if selected
367
+ this.childOptions.forEach((option, idx) => {
368
+ const cloneOption = this.cloneOptions[idx];
369
+ if (option.selected) {
370
+ option.classList.add("hidden");
371
+ cloneOption.classList.remove("hidden");
306
372
  }
307
373
  else {
308
- this.moveDown(this.visibleOptionEls.filter((x) => x.selected).slice(-1)[0]);
309
- }
310
- break;
311
- case "previous":
312
- // search variant focuses last option
313
- // all others focus option "above" first selected option (this can be the last option)
314
- if (this.search) {
315
- this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
374
+ option.classList.remove("hidden");
375
+ cloneOption.classList.add("hidden");
316
376
  }
317
- else {
318
- this.moveUp(this.visibleOptionEls.filter((x) => x.selected)[0]);
377
+ });
378
+ }
379
+ focusOption(option) {
380
+ this.allOptionEls.forEach((i) => (i.focused = i === option));
381
+ // option must be scrolledIntoView before focused
382
+ // 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
383
+ option.scrollIntoView({ block: "nearest" });
384
+ // 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))
385
+ // when opening the dropdown, scrollIntoView must be delayed to a point where the browser recognizes content within it as able to be scrolled to
386
+ // 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
387
+ window.setTimeout(() => option.scrollIntoView({ block: "nearest" }), 60);
388
+ option.focus();
389
+ }
390
+ findAndFocusOption(ev) {
391
+ const letterPressed = ev.detail.letter.toLowerCase();
392
+ const optionPressed = ev.detail.optionEl;
393
+ if (!this.keysSoFar && letterPressed == " ") {
394
+ // if the first key entered is space, treat as a click. Otherwise include in
395
+ optionPressed.click();
396
+ }
397
+ else {
398
+ if (!this.keysSoFar) {
399
+ // if first character entered, set currently focused option as the starting index for the search
400
+ this.visibleOptionEls.forEach((option, idx) => {
401
+ if (option.focused) {
402
+ this.searchIndex = idx;
403
+ }
404
+ });
319
405
  }
320
- break;
321
- default:
322
- // search variant focuses search field
323
- // all others focus the selected option
324
- // if no option is selected (empty multiselect), focuses first option
325
- if (this.search) {
326
- this.searchFieldEl.focus();
327
- this.listboxEl.scrollTop = 0;
406
+ this.keysSoFar += letterPressed;
407
+ let nextMatch = this.findMatchInRange(this.visibleOptionEls, this.searchIndex + 1, this.visibleOptionEls.length);
408
+ if (!nextMatch) {
409
+ // if match can't be found from starting option downwards, search from top
410
+ nextMatch = this.findMatchInRange(this.visibleOptionEls, 0, this.searchIndex);
328
411
  }
329
- else if (this.selectedOptions.length > 0) {
330
- this.focusOption(this.visibleOptionEls.filter((x) => x.selected)[0]);
412
+ if (nextMatch) {
413
+ // findMatchInRange still might have returned null, only focus if match found
414
+ this.focusOption(nextMatch);
331
415
  }
332
- else {
333
- this.focusOption(this.visibleOptionEls[0]);
416
+ this.debouncedClearKeysSoFar();
417
+ }
418
+ }
419
+ findMatchInRange(list, startIndex, endIndex) {
420
+ let match = null;
421
+ let optionsInRange = list.slice(startIndex, endIndex);
422
+ // Find the first option starting with the keysSoFar substring, searching in
423
+ // the specified range of options
424
+ optionsInRange.forEach((option) => {
425
+ const label = option.textContent;
426
+ if (!match && label && label.toLowerCase().startsWith(this.keysSoFar)) {
427
+ match = option;
334
428
  }
335
- break;
429
+ });
430
+ return match;
431
+ }
432
+ findCorrespondingOption(el) {
433
+ // if clone, returns the child wm-option
434
+ // if child wm-option, returns clone
435
+ const isClone = el.classList.contains("clone");
436
+ return isClone
437
+ ? this.childOptions[this.cloneOptions.indexOf(el)]
438
+ : this.cloneOptions[this.childOptions.indexOf(el)];
439
+ }
440
+ isElOrChild(el) {
441
+ var _a;
442
+ // determines whether or not the element is the component, a child of the component, or exists within the component's shadowroot
443
+ return el === this.el || this.el.contains(el) || ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(el));
444
+ }
445
+ exposeErrors() {
446
+ // When the error changes, a new id is set for the error container and the button's aria-describedby attribute is updated accordingly. This is to make sure the screen reader announces teh updated errors in Firefox. See this longstanding bug: https://bugzilla.mozilla.org/show_bug.cgi?id=493683
447
+ const newId = generateId();
448
+ this.errorContainer.id = `wm-errors-${newId}`;
449
+ this.buttonEl.setAttribute("aria-describedby", `wm-errors-${newId}`);
450
+ }
451
+ handleDisabledChange() {
452
+ handleDisabledAttribute(this.el, this.isDisabled);
453
+ }
454
+ renderErrorContainer() {
455
+ return (h("div", { id: "wm-errors", class: this.errorMessage ? "error-message" : "", ref: (el) => (this.errorContainer = el), "aria-live": "assertive", "aria-atomic": "true" }, this.errorMessage));
456
+ }
457
+ handleComponentBlur(ev) {
458
+ // Do not close or emit custom blur event when blurring to an element inside (wm-option)
459
+ if (!this.el.contains(ev.relatedTarget)) {
460
+ this.close(false);
461
+ this.wmSelectBlurred.emit();
336
462
  }
337
- });
338
- }
339
- }
340
- close(returnFocus = true) {
341
- if (this.isExpanded) {
342
- this.isExpanded = false;
343
- this.allOptionEls.map((i) => (i.focused = false));
344
- window.setTimeout(() => {
345
- this.dropdownEl.classList.add("hidden");
463
+ }
464
+ // on search field or select all. keydown on options is handled via events.
465
+ handleKeyDown(ev) {
466
+ const el = ev.target;
467
+ switch (ev.key) {
468
+ case "ArrowDown":
469
+ ev.preventDefault();
470
+ this.moveDown(ev.target);
471
+ break;
472
+ case "ArrowUp":
473
+ ev.preventDefault();
474
+ this.moveUp(ev.target);
475
+ break;
476
+ case "Escape":
477
+ ev.preventDefault();
478
+ this.close();
479
+ break;
480
+ case "Enter":
481
+ if (el === this.selectAllEl) {
482
+ ev.preventDefault();
483
+ this.handleSelectAllClick();
484
+ this.close();
485
+ }
486
+ break;
487
+ case " ":
488
+ if (el === this.selectAllEl) {
489
+ ev.preventDefault();
490
+ this.handleSelectAllClick();
491
+ }
492
+ break;
493
+ }
494
+ }
495
+ setButtonText() {
496
+ this.displayedOptions = this.childOptions
497
+ .filter((x) => x.selected)
498
+ .map((y) => (!y.classList.contains("hidden") ? y : this.findCorrespondingOption(y)));
499
+ // handle overflow + counter for multiselect
346
500
  if (this.multiple) {
347
- this.updateOptionVisibility();
501
+ // this is a fixed measurement accounting for the max width of a 3 character overflow counter
502
+ const overflowCounterWidth = 38;
503
+ const computedStyle = window.getComputedStyle(this.buttonEl);
504
+ // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
505
+ const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
506
+ const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
507
+ const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
508
+ let optionsWidths = this.displayedOptions.map((x) => x.shadowRoot.querySelector(".option-wrapper").clientWidth);
509
+ let optionsTotalWidth = optionsWidths.reduce((acc, x) => acc + x, 0);
510
+ this.overflowCount = 0;
511
+ while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
512
+ this.overflowCount++;
513
+ optionsTotalWidth -= optionsWidths[optionsWidths.length - 1];
514
+ optionsWidths.pop();
515
+ this.displayedOptions.pop();
516
+ }
348
517
  }
349
- // clear search field, reset filtered / bolded state of wm-options
350
- if (this.search) {
351
- this.searchFieldEl.value = "";
352
- this.wmSelectSearchChanged.emit({ searchTerm: this.searchTerm });
518
+ }
519
+ announce(message) {
520
+ // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
521
+ if (this.liveRegionEl.textContent === message) {
522
+ message += "\u00A0";
353
523
  }
354
- // Returns focus to button after popup closes (no need if user is tabbing)
355
- // Delay is necessary for screenreader to get new expanded state before focus
356
- // window.requestAnimationFrame is probably enough, but since we are already using setTimeout it may as well be here
357
- // also UX wise, it makes sense for the button to only be focused after the animation is complete
358
- if (returnFocus) {
359
- this.buttonEl.focus();
524
+ this.announcement = message;
525
+ }
526
+ renderButtonText() {
527
+ if (this.multiple && this.displayedOptions.length < 1) {
528
+ return h("span", null, this.placeholder);
360
529
  }
361
- }, 150);
362
- }
363
- }
364
- updateOptionVisibility() {
365
- // this runs for search multiselects, where selected options are rendered at the top of the dropdown list
366
- // slotted wm-options are hidden if selected, and clone wm-options are made visible if selected
367
- this.childOptions.forEach((option, idx) => {
368
- const cloneOption = this.cloneOptions[idx];
369
- if (option.selected) {
370
- option.classList.add("hidden");
371
- cloneOption.classList.remove("hidden");
372
- }
373
- else {
374
- option.classList.remove("hidden");
375
- cloneOption.classList.add("hidden");
376
- }
377
- });
378
- }
379
- focusOption(option) {
380
- this.allOptionEls.forEach((i) => (i.focused = i === option));
381
- // option must be scrolledIntoView before focused
382
- // 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
383
- option.scrollIntoView({ block: "nearest" });
384
- // 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))
385
- // when opening the dropdown, scrollIntoView must be delayed to a point where the browser recognizes content within it as able to be scrolled to
386
- // 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
387
- window.setTimeout(() => option.scrollIntoView({ block: "nearest" }), 60);
388
- option.focus();
389
- }
390
- findAndFocusOption(ev) {
391
- const letterPressed = ev.detail.letter.toLowerCase();
392
- const optionPressed = ev.detail.optionEl;
393
- if (!this.keysSoFar && letterPressed == " ") {
394
- // if the first key entered is space, treat as a click. Otherwise include in
395
- optionPressed.click();
396
- }
397
- else {
398
- if (!this.keysSoFar) {
399
- // if first character entered, set currently focused option as the starting index for the search
400
- this.visibleOptionEls.forEach((option, idx) => {
401
- if (option.focused) {
402
- this.searchIndex = idx;
403
- }
404
- });
405
- }
406
- this.keysSoFar += letterPressed;
407
- let nextMatch = this.findMatchInRange(this.visibleOptionEls, this.searchIndex + 1, this.visibleOptionEls.length);
408
- if (!nextMatch) {
409
- // if match can't be found from starting option downwards, search from top
410
- nextMatch = this.findMatchInRange(this.visibleOptionEls, 0, this.searchIndex);
411
- }
412
- if (nextMatch) {
413
- // findMatchInRange still might have returned null, only focus if match found
414
- this.focusOption(nextMatch);
415
- }
416
- this.debouncedClearKeysSoFar();
417
- }
418
- }
419
- findMatchInRange(list, startIndex, endIndex) {
420
- let match = null;
421
- let optionsInRange = list.slice(startIndex, endIndex);
422
- // Find the first option starting with the keysSoFar substring, searching in
423
- // the specified range of options
424
- optionsInRange.forEach((option) => {
425
- const label = option.textContent;
426
- if (!match && label && label.toLowerCase().startsWith(this.keysSoFar)) {
427
- match = option;
428
- }
429
- });
430
- return match;
431
- }
432
- findCorrespondingOption(el) {
433
- // if clone, returns the child wm-option
434
- // if child wm-option, returns clone
435
- const isClone = el.classList.contains("clone");
436
- return isClone
437
- ? this.childOptions[this.cloneOptions.indexOf(el)]
438
- : this.cloneOptions[this.childOptions.indexOf(el)];
439
- }
440
- isElOrChild(el) {
441
- var _a;
442
- // determines whether or not the element is the component, a child of the component, or exists within the component's shadowroot
443
- return el === this.el || this.el.contains(el) || ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(el));
444
- }
445
- exposeErrors() {
446
- // When the error changes, a new id is set for the error container and the button's aria-describedby attribute is updated accordingly. This is to make sure the screen reader announces teh updated errors in Firefox. See this longstanding bug: https://bugzilla.mozilla.org/show_bug.cgi?id=493683
447
- const newId = generateId();
448
- this.errorContainer.id = `wm-errors-${newId}`;
449
- this.buttonEl.setAttribute("aria-describedby", `wm-errors-${newId}`);
450
- }
451
- handleDisabledChange() {
452
- handleDisabledAttribute(this.el, this.isDisabled);
453
- }
454
- renderErrorContainer() {
455
- return (h("div", { id: "wm-errors", class: this.errorMessage ? "error-message" : "", ref: (el) => (this.errorContainer = el), "aria-live": "assertive", "aria-atomic": "true" }, this.errorMessage));
456
- }
457
- handleComponentBlur(ev) {
458
- // Do not close or emit custom blur event when blurring to an element inside (wm-option)
459
- if (!this.el.contains(ev.relatedTarget)) {
460
- this.close(false);
461
- this.wmSelectBlurred.emit();
462
- }
463
- }
464
- // on search field or select all. keydown on options is handled via events.
465
- handleKeyDown(ev) {
466
- const el = ev.target;
467
- switch (ev.key) {
468
- case "ArrowDown":
469
- ev.preventDefault();
470
- this.moveDown(ev.target);
471
- break;
472
- case "ArrowUp":
473
- ev.preventDefault();
474
- this.moveUp(ev.target);
475
- break;
476
- case "Escape":
477
- ev.preventDefault();
478
- this.close();
479
- break;
480
- case "Enter":
481
- if (el === this.selectAllEl) {
482
- ev.preventDefault();
483
- this.handleSelectAllClick();
484
- this.close();
530
+ else if (this.multiple && this.allSelected && this.overflowCount > 0) {
531
+ return this.allSelectedMessage;
485
532
  }
486
- break;
487
- case " ":
488
- if (el === this.selectAllEl) {
489
- ev.preventDefault();
490
- this.handleSelectAllClick();
533
+ else {
534
+ return this.displayedOptions.map((x, idx) => (h("span", null, idx > 0 ? ", " : "", x.textContent)));
491
535
  }
492
- break;
493
- }
494
- }
495
- setButtonText() {
496
- this.displayedOptions = this.childOptions
497
- .filter((x) => x.selected)
498
- .map((y) => (!y.classList.contains("hidden") ? y : this.findCorrespondingOption(y)));
499
- // handle overflow + counter for multiselect
500
- if (this.multiple) {
501
- // this is a fixed measurement accounting for the max width of a 3 character overflow counter
502
- const overflowCounterWidth = 38;
503
- const computedStyle = window.getComputedStyle(this.buttonEl);
504
- // there seems to be no quick way to get an elements width without padding, except for subtracting padding manually
505
- const paddingLeft = parseInt(computedStyle.getPropertyValue("padding-left").slice(0, -2));
506
- const paddingRight = parseInt(computedStyle.getPropertyValue("padding-right").slice(0, -2));
507
- const availableSpace = this.buttonEl.clientWidth - paddingLeft - paddingRight - overflowCounterWidth;
508
- let optionsWidths = this.displayedOptions.map((x) => x.shadowRoot.querySelector(".option-wrapper").clientWidth);
509
- let optionsTotalWidth = optionsWidths.reduce((acc, x) => acc + x, 0);
510
- this.overflowCount = 0;
511
- while (optionsTotalWidth > availableSpace && this.displayedOptions.length > 1) {
512
- this.overflowCount++;
513
- optionsTotalWidth -= optionsWidths[optionsWidths.length - 1];
514
- optionsWidths.pop();
515
- this.displayedOptions.pop();
516
- }
517
- }
518
- }
519
- announce(message) {
520
- // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
521
- if (this.liveRegionEl.textContent === message) {
522
- message += "\u00A0";
523
- }
524
- this.announcement = message;
525
- }
526
- renderButtonText() {
527
- if (this.multiple && this.displayedOptions.length < 1) {
528
- return h("span", null, this.placeholder);
529
- }
530
- else if (this.multiple && this.allSelected && this.overflowCount > 0) {
531
- return this.allSelectedMessage;
532
- }
533
- else {
534
- return this.displayedOptions.map((x, idx) => (h("span", null, idx > 0 ? ", " : "", x.textContent)));
535
- }
536
- }
537
- renderSubinfo() {
538
- // multiselects cannot have subinfo for options
539
- if (!this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo) {
540
- return h("span", { class: "subinfo" }, this.selectedOptions[0].subinfo);
541
- }
542
- }
543
- renderOverflowCount() {
544
- if (this.overflowCount > 0 && !this.allSelected) {
545
- return (h("span", null, h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
546
- }
547
- }
548
- renderSearchField() {
549
- 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 }))));
550
- }
551
- renderSearchFailedMessage() {
552
- return h("div", { class: "search-results-message" }, this.noResultsFoundMessage);
553
- }
554
- renderSelectAllButton() {
555
- 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));
556
- }
557
- renderCloneOptions() {
558
- return Array.from(this.el.children).map((option) => {
559
- return (h("wm-option", { class: "clone", selected: option.selected }, option.textContent));
560
- });
561
- }
562
- render() {
563
- const buttonProps = {
564
- id: "selectbtn",
565
- ["disabled"]: this.isDisabled,
566
- ["aria-controls"]: "list",
567
- ["aria-labelledby"]: "label selectbtn",
568
- ["aria-describedby"]: "wm-errors",
569
- ["aria-expanded"]: this.isExpanded ? "true" : "false",
570
- onClick: () => (this.isExpanded ? this.close() : this.open()),
571
- };
572
- return (h(Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
573
- // we can't use aria-required or required attributes because it's invalid on the elements we're using (button controlling a listbox)
574
- this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { class: "button-wrapper" }, h("button", Object.assign({}, buttonProps, { class: `displayedoption ${this.isTabbing ? "user-is-tabbing" : ""}`, ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), h("span", { class: this.selectedOptions.length > 0 && this.selectedOptions.filter((x) => x.subinfo).length > 0
575
- ? "overflowcontrol hassubinfo"
576
- : "overflowcontrol" }, h("span", { class: "button-text" }, this.renderButtonText()), this.renderSubinfo()), this.renderOverflowCount()), h("div", { class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton(), h("div", { 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", null))), this.renderErrorContainer(), h("div", { id: "announcement", "aria-live": "polite", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
577
- }
578
- static get is() { return "wm-select"; }
579
- static get encapsulation() { return "shadow"; }
580
- static get delegatesFocus() { return true; }
581
- static get originalStyleUrls() {
582
- return {
583
- "$": ["wm-select.scss"]
584
- };
585
- }
586
- static get styleUrls() {
587
- return {
588
- "$": ["wm-select.css"]
589
- };
590
- }
591
- static get properties() {
592
- return {
593
- "disabled": {
594
- "type": "boolean",
595
- "mutable": false,
596
- "complexType": {
597
- "original": "boolean",
598
- "resolved": "boolean",
599
- "references": {}
600
- },
601
- "required": false,
602
- "optional": false,
603
- "docs": {
604
- "tags": [],
605
- "text": ""
606
- },
607
- "attribute": "disabled",
608
- "reflect": true,
609
- "defaultValue": "false"
610
- },
611
- "maxHeight": {
612
- "type": "string",
613
- "mutable": false,
614
- "complexType": {
615
- "original": "string",
616
- "resolved": "string | undefined",
617
- "references": {}
618
- },
619
- "required": false,
620
- "optional": true,
621
- "docs": {
622
- "tags": [],
623
- "text": ""
624
- },
625
- "attribute": "max-height",
626
- "reflect": false
627
- },
628
- "label": {
629
- "type": "string",
630
- "mutable": true,
631
- "complexType": {
632
- "original": "string",
633
- "resolved": "string | undefined",
634
- "references": {}
635
- },
636
- "required": false,
637
- "optional": true,
638
- "docs": {
639
- "tags": [],
640
- "text": ""
641
- },
642
- "attribute": "label",
643
- "reflect": false
644
- },
645
- "labelPosition": {
646
- "type": "string",
647
- "mutable": false,
648
- "complexType": {
649
- "original": "\"top\" | \"left\" | \"none\"",
650
- "resolved": "\"left\" | \"none\" | \"top\"",
651
- "references": {}
652
- },
653
- "required": false,
654
- "optional": false,
655
- "docs": {
656
- "tags": [],
657
- "text": ""
658
- },
659
- "attribute": "label-position",
660
- "reflect": false,
661
- "defaultValue": "\"top\""
662
- },
663
- "requiredField": {
664
- "type": "boolean",
665
- "mutable": false,
666
- "complexType": {
667
- "original": "boolean",
668
- "resolved": "boolean",
669
- "references": {}
670
- },
671
- "required": false,
672
- "optional": false,
673
- "docs": {
674
- "tags": [],
675
- "text": ""
676
- },
677
- "attribute": "required-field",
678
- "reflect": false,
679
- "defaultValue": "false"
680
- },
681
- "errorMessage": {
682
- "type": "string",
683
- "mutable": true,
684
- "complexType": {
685
- "original": "string",
686
- "resolved": "string",
687
- "references": {}
688
- },
689
- "required": false,
690
- "optional": false,
691
- "docs": {
692
- "tags": [],
693
- "text": ""
694
- },
695
- "attribute": "error-message",
696
- "reflect": false,
697
- "defaultValue": "\"\""
698
- },
699
- "multiple": {
700
- "type": "boolean",
701
- "mutable": false,
702
- "complexType": {
703
- "original": "boolean",
704
- "resolved": "boolean",
705
- "references": {}
706
- },
707
- "required": false,
708
- "optional": false,
709
- "docs": {
710
- "tags": [],
711
- "text": ""
712
- },
713
- "attribute": "multiple",
714
- "reflect": false,
715
- "defaultValue": "false"
716
- },
717
- "search": {
718
- "type": "boolean",
719
- "mutable": false,
720
- "complexType": {
721
- "original": "boolean",
722
- "resolved": "boolean",
723
- "references": {}
724
- },
725
- "required": false,
726
- "optional": false,
727
- "docs": {
728
- "tags": [],
729
- "text": ""
730
- },
731
- "attribute": "search",
732
- "reflect": false,
733
- "defaultValue": "false"
734
- },
735
- "selectAll": {
736
- "type": "boolean",
737
- "mutable": false,
738
- "complexType": {
739
- "original": "boolean",
740
- "resolved": "boolean",
741
- "references": {}
742
- },
743
- "required": false,
744
- "optional": false,
745
- "docs": {
746
- "tags": [],
747
- "text": ""
748
- },
749
- "attribute": "select-all",
750
- "reflect": false,
751
- "defaultValue": "false"
752
- },
753
- "placeholder": {
754
- "type": "string",
755
- "mutable": false,
756
- "complexType": {
757
- "original": "string",
758
- "resolved": "string",
759
- "references": {}
760
- },
761
- "required": false,
762
- "optional": false,
763
- "docs": {
764
- "tags": [],
765
- "text": ""
766
- },
767
- "attribute": "placeholder",
768
- "reflect": false,
769
- "defaultValue": "intl.formatMessage({\n id: \"select.multiPlaceholder\",\n defaultMessage: \"Make a selection\",\n description: \"Placeholder text. Use imperative\",\n })"
770
- },
771
- "searchPlaceholder": {
772
- "type": "string",
773
- "mutable": false,
774
- "complexType": {
775
- "original": "string",
776
- "resolved": "string",
777
- "references": {}
778
- },
779
- "required": false,
780
- "optional": false,
781
- "docs": {
782
- "tags": [],
783
- "text": ""
784
- },
785
- "attribute": "search-placeholder",
786
- "reflect": false,
787
- "defaultValue": "intl.formatMessage({\n id: \"select.searchPlaceholder\",\n defaultMessage: \"Search\",\n description: \"Placeholder text. Use imperative\",\n })"
788
- },
789
- "allSelectedMessage": {
790
- "type": "string",
791
- "mutable": false,
792
- "complexType": {
793
- "original": "string",
794
- "resolved": "string",
795
- "references": {}
796
- },
797
- "required": false,
798
- "optional": false,
799
- "docs": {
800
- "tags": [],
801
- "text": ""
802
- },
803
- "attribute": "all-selected-message",
804
- "reflect": false,
805
- "defaultValue": "intl.formatMessage({\n id: \"select.allSelected\",\n defaultMessage: \"All selected\",\n description: \"Text displayed when all options are selected\",\n })"
806
- }
807
- };
808
- }
809
- static get states() {
810
- return {
811
- "isTabbing": {},
812
- "isExpanded": {},
813
- "announcement": {}
814
- };
815
- }
816
- static get events() {
817
- return [{
818
- "method": "wmSelectDidLoad",
819
- "name": "wmSelectDidLoad",
820
- "bubbles": true,
821
- "cancelable": true,
822
- "composed": true,
823
- "docs": {
824
- "tags": [],
825
- "text": ""
826
- },
827
- "complexType": {
828
- "original": "void",
829
- "resolved": "void",
830
- "references": {}
536
+ }
537
+ renderSubinfo() {
538
+ // multiselects cannot have subinfo for options
539
+ if (!this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo) {
540
+ return h("span", { class: "subinfo" }, this.selectedOptions[0].subinfo);
831
541
  }
832
- }, {
833
- "method": "wmSelectBlurred",
834
- "name": "wmSelectBlurred",
835
- "bubbles": true,
836
- "cancelable": true,
837
- "composed": true,
838
- "docs": {
839
- "tags": [],
840
- "text": ""
841
- },
842
- "complexType": {
843
- "original": "void",
844
- "resolved": "void",
845
- "references": {}
542
+ }
543
+ renderOverflowCount() {
544
+ if (this.overflowCount > 0 && !this.allSelected) {
545
+ return (h("span", null, h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
846
546
  }
847
- }, {
848
- "method": "wmSelectSearchChanged",
849
- "name": "wmSelectSearchChanged",
850
- "bubbles": true,
851
- "cancelable": true,
852
- "composed": true,
853
- "docs": {
854
- "tags": [],
855
- "text": ""
856
- },
857
- "complexType": {
858
- "original": "Object",
859
- "resolved": "Object",
860
- "references": {
861
- "Object": {
862
- "location": "global"
547
+ }
548
+ renderSearchField() {
549
+ 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 }))));
550
+ }
551
+ renderSearchFailedMessage() {
552
+ return h("div", { class: "search-results-message" }, this.noResultsFoundMessage);
553
+ }
554
+ renderSelectAllButton() {
555
+ 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));
556
+ }
557
+ renderCloneOptions() {
558
+ return Array.from(this.el.children).map((option) => {
559
+ return (h("wm-option", { class: "clone", selected: option.selected }, option.textContent));
560
+ });
561
+ }
562
+ render() {
563
+ const buttonProps = {
564
+ id: "selectbtn",
565
+ ["disabled"]: this.isDisabled,
566
+ ["aria-controls"]: "list",
567
+ ["aria-labelledby"]: "label selectbtn",
568
+ ["aria-describedby"]: "wm-errors",
569
+ ["aria-expanded"]: this.isExpanded ? "true" : "false",
570
+ onClick: () => (this.isExpanded ? this.close() : this.open()),
571
+ };
572
+ return (h(Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
573
+ // we can't use aria-required or required attributes because it's invalid on the elements we're using (button controlling a listbox)
574
+ this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { class: "button-wrapper" }, h("button", Object.assign({}, buttonProps, { class: `displayedoption ${this.isTabbing ? "user-is-tabbing" : ""}`, ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), h("span", { class: this.selectedOptions.length > 0 && this.selectedOptions.filter((x) => x.subinfo).length > 0
575
+ ? "overflowcontrol hassubinfo"
576
+ : "overflowcontrol" }, h("span", { class: "button-text" }, this.renderButtonText()), this.renderSubinfo()), this.renderOverflowCount()), h("div", { class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton(), h("div", { 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", null))), this.renderErrorContainer(), h("div", { id: "announcement", "aria-live": "polite", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)))));
577
+ }
578
+ static get is() { return "wm-select"; }
579
+ static get encapsulation() { return "shadow"; }
580
+ static get delegatesFocus() { return true; }
581
+ static get originalStyleUrls() {
582
+ return {
583
+ "$": ["wm-select.scss"]
584
+ };
585
+ }
586
+ static get styleUrls() {
587
+ return {
588
+ "$": ["wm-select.css"]
589
+ };
590
+ }
591
+ static get properties() {
592
+ return {
593
+ "disabled": {
594
+ "type": "boolean",
595
+ "mutable": false,
596
+ "complexType": {
597
+ "original": "boolean",
598
+ "resolved": "boolean",
599
+ "references": {}
600
+ },
601
+ "required": false,
602
+ "optional": false,
603
+ "docs": {
604
+ "tags": [],
605
+ "text": ""
606
+ },
607
+ "attribute": "disabled",
608
+ "reflect": true,
609
+ "defaultValue": "false"
610
+ },
611
+ "maxHeight": {
612
+ "type": "string",
613
+ "mutable": false,
614
+ "complexType": {
615
+ "original": "string",
616
+ "resolved": "string | undefined",
617
+ "references": {}
618
+ },
619
+ "required": false,
620
+ "optional": true,
621
+ "docs": {
622
+ "tags": [],
623
+ "text": ""
624
+ },
625
+ "attribute": "max-height",
626
+ "reflect": false
627
+ },
628
+ "label": {
629
+ "type": "string",
630
+ "mutable": true,
631
+ "complexType": {
632
+ "original": "string",
633
+ "resolved": "string | undefined",
634
+ "references": {}
635
+ },
636
+ "required": false,
637
+ "optional": true,
638
+ "docs": {
639
+ "tags": [],
640
+ "text": ""
641
+ },
642
+ "attribute": "label",
643
+ "reflect": false
644
+ },
645
+ "labelPosition": {
646
+ "type": "string",
647
+ "mutable": false,
648
+ "complexType": {
649
+ "original": "\"top\" | \"left\" | \"none\"",
650
+ "resolved": "\"left\" | \"none\" | \"top\"",
651
+ "references": {}
652
+ },
653
+ "required": false,
654
+ "optional": false,
655
+ "docs": {
656
+ "tags": [],
657
+ "text": ""
658
+ },
659
+ "attribute": "label-position",
660
+ "reflect": false,
661
+ "defaultValue": "\"top\""
662
+ },
663
+ "requiredField": {
664
+ "type": "boolean",
665
+ "mutable": false,
666
+ "complexType": {
667
+ "original": "boolean",
668
+ "resolved": "boolean",
669
+ "references": {}
670
+ },
671
+ "required": false,
672
+ "optional": false,
673
+ "docs": {
674
+ "tags": [],
675
+ "text": ""
676
+ },
677
+ "attribute": "required-field",
678
+ "reflect": false,
679
+ "defaultValue": "false"
680
+ },
681
+ "errorMessage": {
682
+ "type": "string",
683
+ "mutable": true,
684
+ "complexType": {
685
+ "original": "string",
686
+ "resolved": "string",
687
+ "references": {}
688
+ },
689
+ "required": false,
690
+ "optional": false,
691
+ "docs": {
692
+ "tags": [],
693
+ "text": ""
694
+ },
695
+ "attribute": "error-message",
696
+ "reflect": false,
697
+ "defaultValue": "\"\""
698
+ },
699
+ "multiple": {
700
+ "type": "boolean",
701
+ "mutable": false,
702
+ "complexType": {
703
+ "original": "boolean",
704
+ "resolved": "boolean",
705
+ "references": {}
706
+ },
707
+ "required": false,
708
+ "optional": false,
709
+ "docs": {
710
+ "tags": [],
711
+ "text": ""
712
+ },
713
+ "attribute": "multiple",
714
+ "reflect": false,
715
+ "defaultValue": "false"
716
+ },
717
+ "search": {
718
+ "type": "boolean",
719
+ "mutable": false,
720
+ "complexType": {
721
+ "original": "boolean",
722
+ "resolved": "boolean",
723
+ "references": {}
724
+ },
725
+ "required": false,
726
+ "optional": false,
727
+ "docs": {
728
+ "tags": [],
729
+ "text": ""
730
+ },
731
+ "attribute": "search",
732
+ "reflect": false,
733
+ "defaultValue": "false"
734
+ },
735
+ "selectAll": {
736
+ "type": "boolean",
737
+ "mutable": false,
738
+ "complexType": {
739
+ "original": "boolean",
740
+ "resolved": "boolean",
741
+ "references": {}
742
+ },
743
+ "required": false,
744
+ "optional": false,
745
+ "docs": {
746
+ "tags": [],
747
+ "text": ""
748
+ },
749
+ "attribute": "select-all",
750
+ "reflect": false,
751
+ "defaultValue": "false"
752
+ },
753
+ "placeholder": {
754
+ "type": "string",
755
+ "mutable": false,
756
+ "complexType": {
757
+ "original": "string",
758
+ "resolved": "string",
759
+ "references": {}
760
+ },
761
+ "required": false,
762
+ "optional": false,
763
+ "docs": {
764
+ "tags": [],
765
+ "text": ""
766
+ },
767
+ "attribute": "placeholder",
768
+ "reflect": false,
769
+ "defaultValue": "intl.formatMessage({\n id: \"select.multiPlaceholder\",\n defaultMessage: \"Make a selection\",\n description: \"Placeholder text. Use imperative\",\n })"
770
+ },
771
+ "searchPlaceholder": {
772
+ "type": "string",
773
+ "mutable": false,
774
+ "complexType": {
775
+ "original": "string",
776
+ "resolved": "string",
777
+ "references": {}
778
+ },
779
+ "required": false,
780
+ "optional": false,
781
+ "docs": {
782
+ "tags": [],
783
+ "text": ""
784
+ },
785
+ "attribute": "search-placeholder",
786
+ "reflect": false,
787
+ "defaultValue": "intl.formatMessage({\n id: \"select.searchPlaceholder\",\n defaultMessage: \"Search\",\n description: \"Placeholder text. Use imperative\",\n })"
788
+ },
789
+ "allSelectedMessage": {
790
+ "type": "string",
791
+ "mutable": false,
792
+ "complexType": {
793
+ "original": "string",
794
+ "resolved": "string",
795
+ "references": {}
796
+ },
797
+ "required": false,
798
+ "optional": false,
799
+ "docs": {
800
+ "tags": [],
801
+ "text": ""
802
+ },
803
+ "attribute": "all-selected-message",
804
+ "reflect": false,
805
+ "defaultValue": "intl.formatMessage({\n id: \"select.allSelected\",\n defaultMessage: \"All selected\",\n description: \"Text displayed when all options are selected\",\n })"
863
806
  }
864
- }
865
- }
866
- }, {
867
- "method": "wmSelectAllSelected",
868
- "name": "wmSelectAllSelected",
869
- "bubbles": true,
870
- "cancelable": true,
871
- "composed": true,
872
- "docs": {
873
- "tags": [],
874
- "text": ""
875
- },
876
- "complexType": {
877
- "original": "any",
878
- "resolved": "any",
879
- "references": {}
880
- }
881
- }, {
882
- "method": "wmSelectAllDeselected",
883
- "name": "wmSelectAllDeselected",
884
- "bubbles": true,
885
- "cancelable": true,
886
- "composed": true,
887
- "docs": {
888
- "tags": [],
889
- "text": ""
890
- },
891
- "complexType": {
892
- "original": "any",
893
- "resolved": "any",
894
- "references": {}
895
- }
896
- }];
897
- }
898
- static get elementRef() { return "el"; }
899
- static get watchers() {
900
- return [{
901
- "propName": "errorMessage",
902
- "methodName": "exposeErrors"
903
- }, {
904
- "propName": "disabled",
905
- "methodName": "handleDisabledChange"
906
- }];
907
- }
908
- static get listeners() {
909
- return [{
910
- "name": "wmUserIsTabbing",
911
- "method": "toggleTabbingOn",
912
- "target": "window",
913
- "capture": false,
914
- "passive": false
915
- }, {
916
- "name": "wmUserIsNotTabbing",
917
- "method": "toggleTabbingOff",
918
- "target": "window",
919
- "capture": false,
920
- "passive": false
921
- }, {
922
- "name": "wmOptionSelected",
923
- "method": "handleOptionSelection",
924
- "target": undefined,
925
- "capture": false,
926
- "passive": false
927
- }, {
928
- "name": "intCloneClicked",
929
- "method": "handleOptionCloneSelection",
930
- "target": undefined,
931
- "capture": false,
932
- "passive": false
933
- }, {
934
- "name": "wmEnterKeyPressed",
935
- "method": "handleChildEnter",
936
- "target": undefined,
937
- "capture": false,
938
- "passive": false
939
- }, {
940
- "name": "wmKeyUpPressed",
941
- "method": "handleChildUp",
942
- "target": undefined,
943
- "capture": false,
944
- "passive": false
945
- }, {
946
- "name": "wmKeyDownPressed",
947
- "method": "handleChildDown",
948
- "target": undefined,
949
- "capture": false,
950
- "passive": false
951
- }, {
952
- "name": "wmHomeKeyPressed",
953
- "method": "moveToFirstOption",
954
- "target": undefined,
955
- "capture": false,
956
- "passive": false
957
- }, {
958
- "name": "wmEndKeyPressed",
959
- "method": "moveToLastOption",
960
- "target": undefined,
961
- "capture": false,
962
- "passive": false
963
- }, {
964
- "name": "wmEscKeyPressed",
965
- "method": "closePopupOnEscape",
966
- "target": undefined,
967
- "capture": false,
968
- "passive": false
969
- }, {
970
- "name": "wmOptionBlurred",
971
- "method": "handleOptionBlur",
972
- "target": undefined,
973
- "capture": false,
974
- "passive": false
975
- }, {
976
- "name": "click",
977
- "method": "handleClick",
978
- "target": "document",
979
- "capture": true,
980
- "passive": false
981
- }, {
982
- "name": "keydown",
983
- "method": "handleKey",
984
- "target": undefined,
985
- "capture": false,
986
- "passive": false
987
- }, {
988
- "name": "wmLetterPressed",
989
- "method": "findAndFocusOption",
990
- "target": undefined,
991
- "capture": false,
992
- "passive": false
993
- }];
994
- }
807
+ };
808
+ }
809
+ static get states() {
810
+ return {
811
+ "isTabbing": {},
812
+ "isExpanded": {},
813
+ "announcement": {}
814
+ };
815
+ }
816
+ static get events() {
817
+ return [{
818
+ "method": "wmSelectDidLoad",
819
+ "name": "wmSelectDidLoad",
820
+ "bubbles": true,
821
+ "cancelable": true,
822
+ "composed": true,
823
+ "docs": {
824
+ "tags": [],
825
+ "text": ""
826
+ },
827
+ "complexType": {
828
+ "original": "void",
829
+ "resolved": "void",
830
+ "references": {}
831
+ }
832
+ }, {
833
+ "method": "wmSelectBlurred",
834
+ "name": "wmSelectBlurred",
835
+ "bubbles": true,
836
+ "cancelable": true,
837
+ "composed": true,
838
+ "docs": {
839
+ "tags": [],
840
+ "text": ""
841
+ },
842
+ "complexType": {
843
+ "original": "void",
844
+ "resolved": "void",
845
+ "references": {}
846
+ }
847
+ }, {
848
+ "method": "wmSelectSearchChanged",
849
+ "name": "wmSelectSearchChanged",
850
+ "bubbles": true,
851
+ "cancelable": true,
852
+ "composed": true,
853
+ "docs": {
854
+ "tags": [],
855
+ "text": ""
856
+ },
857
+ "complexType": {
858
+ "original": "Object",
859
+ "resolved": "Object",
860
+ "references": {
861
+ "Object": {
862
+ "location": "global",
863
+ "id": "global::Object"
864
+ }
865
+ }
866
+ }
867
+ }, {
868
+ "method": "wmSelectAllSelected",
869
+ "name": "wmSelectAllSelected",
870
+ "bubbles": true,
871
+ "cancelable": true,
872
+ "composed": true,
873
+ "docs": {
874
+ "tags": [],
875
+ "text": ""
876
+ },
877
+ "complexType": {
878
+ "original": "any",
879
+ "resolved": "any",
880
+ "references": {}
881
+ }
882
+ }, {
883
+ "method": "wmSelectAllDeselected",
884
+ "name": "wmSelectAllDeselected",
885
+ "bubbles": true,
886
+ "cancelable": true,
887
+ "composed": true,
888
+ "docs": {
889
+ "tags": [],
890
+ "text": ""
891
+ },
892
+ "complexType": {
893
+ "original": "any",
894
+ "resolved": "any",
895
+ "references": {}
896
+ }
897
+ }];
898
+ }
899
+ static get elementRef() { return "el"; }
900
+ static get watchers() {
901
+ return [{
902
+ "propName": "errorMessage",
903
+ "methodName": "exposeErrors"
904
+ }, {
905
+ "propName": "disabled",
906
+ "methodName": "handleDisabledChange"
907
+ }];
908
+ }
909
+ static get listeners() {
910
+ return [{
911
+ "name": "wmUserIsTabbing",
912
+ "method": "toggleTabbingOn",
913
+ "target": "window",
914
+ "capture": false,
915
+ "passive": false
916
+ }, {
917
+ "name": "wmUserIsNotTabbing",
918
+ "method": "toggleTabbingOff",
919
+ "target": "window",
920
+ "capture": false,
921
+ "passive": false
922
+ }, {
923
+ "name": "wmOptionSelected",
924
+ "method": "handleOptionSelection",
925
+ "target": undefined,
926
+ "capture": false,
927
+ "passive": false
928
+ }, {
929
+ "name": "intCloneClicked",
930
+ "method": "handleOptionCloneSelection",
931
+ "target": undefined,
932
+ "capture": false,
933
+ "passive": false
934
+ }, {
935
+ "name": "wmEnterKeyPressed",
936
+ "method": "handleChildEnter",
937
+ "target": undefined,
938
+ "capture": false,
939
+ "passive": false
940
+ }, {
941
+ "name": "wmKeyUpPressed",
942
+ "method": "handleChildUp",
943
+ "target": undefined,
944
+ "capture": false,
945
+ "passive": false
946
+ }, {
947
+ "name": "wmKeyDownPressed",
948
+ "method": "handleChildDown",
949
+ "target": undefined,
950
+ "capture": false,
951
+ "passive": false
952
+ }, {
953
+ "name": "wmHomeKeyPressed",
954
+ "method": "moveToFirstOption",
955
+ "target": undefined,
956
+ "capture": false,
957
+ "passive": false
958
+ }, {
959
+ "name": "wmEndKeyPressed",
960
+ "method": "moveToLastOption",
961
+ "target": undefined,
962
+ "capture": false,
963
+ "passive": false
964
+ }, {
965
+ "name": "wmEscKeyPressed",
966
+ "method": "closePopupOnEscape",
967
+ "target": undefined,
968
+ "capture": false,
969
+ "passive": false
970
+ }, {
971
+ "name": "wmOptionBlurred",
972
+ "method": "handleOptionBlur",
973
+ "target": undefined,
974
+ "capture": false,
975
+ "passive": false
976
+ }, {
977
+ "name": "click",
978
+ "method": "handleClick",
979
+ "target": "document",
980
+ "capture": true,
981
+ "passive": false
982
+ }, {
983
+ "name": "keydown",
984
+ "method": "handleKey",
985
+ "target": undefined,
986
+ "capture": false,
987
+ "passive": false
988
+ }, {
989
+ "name": "wmLetterPressed",
990
+ "method": "findAndFocusOption",
991
+ "target": undefined,
992
+ "capture": false,
993
+ "passive": false
994
+ }];
995
+ }
995
996
  }