@watermarkinsights/ripple 3.9.0 → 3.10.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 (362) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-dbbea5a8.js → chartFunctions-05b9dcc7.js} +418 -417
  3. package/dist/cjs/{functions-15e21d53.js → functions-71c85bae.js} +506 -532
  4. package/dist/cjs/{global-b0e0eac2.js → global-f98992f4.js} +60 -60
  5. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
  6. package/dist/cjs/{index-acad7ab3.js → index-98c6524c.js} +64 -96
  7. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
  8. package/dist/cjs/loader.cjs.js +3 -3
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +87 -87
  10. package/dist/cjs/priv-datepicker.cjs.entry.js +659 -659
  11. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  12. package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
  13. package/dist/cjs/ripple.cjs.js +3 -3
  14. package/dist/cjs/wm-action-menu_2.cjs.entry.js +342 -342
  15. package/dist/cjs/wm-button.cjs.entry.js +228 -228
  16. package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
  17. package/dist/cjs/wm-chart.cjs.entry.js +117 -117
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +267 -267
  19. package/dist/cjs/wm-input.cjs.entry.js +136 -136
  20. package/dist/cjs/wm-modal-footer.cjs.entry.js +32 -32
  21. package/dist/cjs/wm-modal-header.cjs.entry.js +35 -35
  22. package/dist/cjs/wm-modal.cjs.entry.js +164 -164
  23. package/dist/cjs/wm-navigation_3.cjs.entry.js +222 -222
  24. package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
  25. package/dist/cjs/wm-network-uploader.cjs.entry.js +454 -454
  26. package/dist/cjs/wm-option_2.cjs.entry.js +487 -487
  27. package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
  28. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +136 -136
  29. package/dist/cjs/wm-search.cjs.entry.js +233 -233
  30. package/dist/cjs/wm-snackbar.cjs.entry.js +172 -172
  31. package/dist/cjs/wm-tab-item_3.cjs.entry.js +298 -298
  32. package/dist/cjs/wm-tag-input.cjs.entry.js +581 -581
  33. package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
  34. package/dist/cjs/wm-toggletip.cjs.entry.js +126 -126
  35. package/dist/cjs/wm-uploader.cjs.entry.js +380 -380
  36. package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
  37. package/dist/collection/collection-manifest.json +2 -2
  38. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +0 -1
  39. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
  40. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
  41. package/dist/collection/components/charts/wm-chart/wm-chart.css +6 -15
  42. package/dist/collection/components/charts/wm-chart/wm-chart.js +332 -332
  43. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +6 -15
  44. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +199 -199
  45. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +0 -1
  46. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +88 -88
  47. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
  48. package/dist/collection/components/wm-action-menu/wm-action-menu.css +0 -1
  49. package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
  50. package/dist/collection/components/wm-button/wm-button.css +33 -25
  51. package/dist/collection/components/wm-button/wm-button.js +491 -491
  52. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +4 -4
  53. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
  54. package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -2
  55. package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
  56. package/dist/collection/components/wm-input/wm-input.css +2 -2
  57. package/dist/collection/components/wm-input/wm-input.js +423 -423
  58. package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -1
  59. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  60. package/dist/collection/components/wm-modal/wm-modal-footer.css +0 -1
  61. package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
  62. package/dist/collection/components/wm-modal/wm-modal-header.css +0 -1
  63. package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
  64. package/dist/collection/components/wm-modal/wm-modal.css +0 -1
  65. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  66. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +2 -2
  67. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
  68. package/dist/collection/components/wm-navigation/wm-navigation-item.css +0 -1
  69. package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
  70. package/dist/collection/components/wm-navigation/wm-navigation.css +0 -1
  71. package/dist/collection/components/wm-navigation/wm-navigation.js +211 -211
  72. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -1
  73. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  74. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +0 -1
  75. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  76. package/dist/collection/components/wm-navigator/wm-navigator.css +0 -1
  77. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  78. package/dist/collection/components/wm-option/wm-option.css +3 -3
  79. package/dist/collection/components/wm-option/wm-option.js +414 -414
  80. package/dist/collection/components/wm-pagination/wm-pagination.css +0 -1
  81. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  82. package/dist/collection/components/wm-search/wm-search.css +0 -1
  83. package/dist/collection/components/wm-search/wm-search.js +480 -480
  84. package/dist/collection/components/wm-select/wm-select.css +3 -3
  85. package/dist/collection/components/wm-select/wm-select.js +718 -718
  86. package/dist/collection/components/wm-snackbar/wm-snackbar.css +3 -3
  87. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  88. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -3
  89. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  90. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -1
  91. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  92. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +0 -1
  93. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  94. package/dist/collection/components/wm-tag-input/wm-tag-input.css +3 -3
  95. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  96. package/dist/collection/components/wm-timepicker/wm-timepicker.css +3 -3
  97. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  98. package/dist/collection/components/wm-toggletip/wm-toggletip.css +2 -2
  99. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  100. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +33 -25
  101. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +785 -785
  102. package/dist/collection/components/wm-uploader/wm-uploader.css +33 -25
  103. package/dist/collection/components/wm-uploader/wm-uploader.js +780 -780
  104. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  105. package/dist/collection/dev/scripts.js +20 -20
  106. package/dist/collection/global/__mocks__/functions.js +6 -6
  107. package/dist/collection/global/chartFunctions.js +418 -418
  108. package/dist/collection/global/functions.js +468 -468
  109. package/dist/collection/global/global.js +67 -67
  110. package/dist/collection/global/interfaces.js +49 -49
  111. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  112. package/dist/collection/global/services/http-service.js +50 -50
  113. package/dist/collection/lang/lang.js +5 -5
  114. package/dist/collection/lang/missing.js +43 -43
  115. package/dist/collection/lang/piglatin.js +93 -93
  116. package/dist/esm/{chartFunctions-303e1644.js → chartFunctions-b24ba065.js} +418 -418
  117. package/dist/esm/{functions-e552a8b5.js → functions-117d1a51.js} +506 -532
  118. package/dist/esm/{global-fa341013.js → global-6a9c8257.js} +60 -60
  119. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
  120. package/dist/esm/{index-7603f98e.js → index-d649a861.js} +64 -96
  121. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
  122. package/dist/esm/loader.js +3 -3
  123. package/dist/esm/polyfills/core-js.js +0 -0
  124. package/dist/esm/polyfills/css-shim.js +1 -1
  125. package/dist/esm/polyfills/dom.js +0 -0
  126. package/dist/esm/polyfills/es5-html-element.js +0 -0
  127. package/dist/esm/polyfills/index.js +0 -0
  128. package/dist/esm/polyfills/system.js +0 -0
  129. package/dist/esm/priv-chart-popover.entry.js +87 -87
  130. package/dist/esm/priv-datepicker.entry.js +659 -659
  131. package/dist/esm/priv-navigator-button.entry.js +19 -19
  132. package/dist/esm/priv-navigator-item.entry.js +24 -24
  133. package/dist/esm/ripple.js +3 -3
  134. package/dist/esm/wm-action-menu_2.entry.js +342 -342
  135. package/dist/esm/wm-button.entry.js +228 -228
  136. package/dist/esm/wm-chart-slice.entry.js +14 -14
  137. package/dist/esm/wm-chart.entry.js +117 -117
  138. package/dist/esm/wm-datepicker.entry.js +267 -267
  139. package/dist/esm/wm-input.entry.js +136 -136
  140. package/dist/esm/wm-modal-footer.entry.js +32 -32
  141. package/dist/esm/wm-modal-header.entry.js +35 -35
  142. package/dist/esm/wm-modal.entry.js +164 -164
  143. package/dist/esm/wm-navigation_3.entry.js +222 -222
  144. package/dist/esm/wm-navigator.entry.js +269 -269
  145. package/dist/esm/wm-network-uploader.entry.js +454 -454
  146. package/dist/esm/wm-option_2.entry.js +487 -487
  147. package/dist/esm/wm-pagination.entry.js +168 -168
  148. package/dist/esm/wm-progress-indicator_3.entry.js +136 -136
  149. package/dist/esm/wm-search.entry.js +233 -233
  150. package/dist/esm/wm-snackbar.entry.js +172 -172
  151. package/dist/esm/wm-tab-item_3.entry.js +298 -298
  152. package/dist/esm/wm-tag-input.entry.js +581 -581
  153. package/dist/esm/wm-timepicker.entry.js +385 -385
  154. package/dist/esm/wm-toggletip.entry.js +126 -126
  155. package/dist/esm/wm-uploader.entry.js +380 -380
  156. package/dist/esm/wm-wrapper.entry.js +13 -13
  157. package/dist/esm-es5/chartFunctions-b24ba065.js +1 -0
  158. package/dist/esm-es5/functions-117d1a51.js +15 -0
  159. package/dist/esm-es5/global-6a9c8257.js +1 -0
  160. package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +1 -1
  161. package/dist/esm-es5/index-d649a861.js +1 -0
  162. package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
  163. package/dist/esm-es5/loader.js +1 -1
  164. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  165. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  166. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  167. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  168. package/dist/esm-es5/ripple.js +1 -1
  169. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  170. package/dist/esm-es5/wm-button.entry.js +1 -1
  171. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  172. package/dist/esm-es5/wm-chart.entry.js +1 -1
  173. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  174. package/dist/esm-es5/wm-input.entry.js +1 -1
  175. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  176. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  177. package/dist/esm-es5/wm-modal.entry.js +1 -1
  178. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  179. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  180. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  181. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  182. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  183. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  184. package/dist/esm-es5/wm-search.entry.js +1 -1
  185. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  186. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  187. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  188. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  189. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  190. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  191. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  192. package/dist/loader/index.d.ts +1 -0
  193. package/dist/ripple/{p-aa104594.system.entry.js → p-03d6014a.system.entry.js} +1 -1
  194. package/dist/ripple/{p-90ed3268.system.entry.js → p-099df7b7.system.entry.js} +1 -1
  195. package/dist/ripple/p-0cffec65.entry.js +1 -0
  196. package/dist/ripple/p-0ebed4b8.system.entry.js +1 -0
  197. package/dist/ripple/p-13e2891c.system.js +1 -0
  198. package/dist/ripple/p-18261104.system.entry.js +1 -0
  199. package/dist/ripple/p-1b1e006a.entry.js +1 -0
  200. package/dist/ripple/p-1e7fc028.entry.js +1 -0
  201. package/dist/ripple/{p-32336c78.system.entry.js → p-210039cc.system.entry.js} +1 -1
  202. package/dist/ripple/p-22759dd5.entry.js +1 -0
  203. package/dist/ripple/p-25b81952.entry.js +1 -0
  204. package/dist/ripple/{p-e490e37f.system.entry.js → p-269fa39c.system.entry.js} +1 -1
  205. package/dist/ripple/p-26c9f5af.entry.js +1 -0
  206. package/dist/ripple/p-276ed011.js +16 -0
  207. package/dist/ripple/p-2b6246d9.entry.js +1 -0
  208. package/dist/ripple/{p-3b3e847c.system.entry.js → p-2b63995f.system.entry.js} +1 -1
  209. package/dist/ripple/p-2c8a26f2.js +1 -0
  210. package/dist/ripple/p-38bb7f05.system.entry.js +1 -0
  211. package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
  212. package/dist/ripple/p-4f581ab3.entry.js +1 -0
  213. package/dist/ripple/p-50be3b44.js +1 -0
  214. package/dist/ripple/p-5176b826.system.js +15 -0
  215. package/dist/ripple/p-5627e44d.entry.js +1 -0
  216. package/dist/ripple/p-570fb53b.entry.js +1 -0
  217. package/dist/ripple/p-57f2feb0.entry.js +1 -0
  218. package/dist/ripple/p-5d6cc9da.system.js +1 -0
  219. package/dist/ripple/p-5e164260.system.entry.js +1 -0
  220. package/dist/ripple/{p-64053e24.system.entry.js → p-64e8fb6e.system.entry.js} +1 -1
  221. package/dist/ripple/p-6c295beb.entry.js +1 -0
  222. package/dist/ripple/p-6c751341.entry.js +1 -0
  223. package/dist/ripple/p-6cf47163.entry.js +1 -0
  224. package/dist/ripple/{p-6bc557fa.js → p-6f59ed45.js} +1 -1
  225. package/dist/ripple/p-772576d7.system.entry.js +1 -0
  226. package/dist/ripple/p-7779bfbe.system.entry.js +1 -0
  227. package/dist/ripple/p-7c2b1682.entry.js +1 -0
  228. package/dist/ripple/p-81ddf5a0.entry.js +1 -0
  229. package/dist/ripple/p-83d22032.system.entry.js +1 -0
  230. package/dist/ripple/p-846e9391.entry.js +1 -0
  231. package/dist/ripple/{p-7d26d093.system.entry.js → p-8a96b188.system.entry.js} +1 -1
  232. package/dist/ripple/p-8cf7ce7e.system.entry.js +1 -0
  233. package/dist/ripple/p-969af068.system.entry.js +1 -0
  234. package/dist/ripple/p-9a4aca88.system.entry.js +1 -0
  235. package/dist/ripple/p-9aa6cd9f.entry.js +1 -0
  236. package/dist/ripple/p-9c20bc1f.system.entry.js +1 -0
  237. package/dist/ripple/p-9d02957d.system.js +1 -0
  238. package/dist/ripple/p-9d49f21e.entry.js +1 -0
  239. package/dist/ripple/p-9d8c246d.system.entry.js +1 -0
  240. package/dist/ripple/p-9df8a520.entry.js +1 -0
  241. package/dist/ripple/{p-ae6cfbca.system.entry.js → p-a1511315.system.entry.js} +1 -1
  242. package/dist/ripple/p-a1a2efca.system.entry.js +1 -0
  243. package/dist/ripple/{p-1a7a33e0.system.js → p-a224d536.system.js} +1 -1
  244. package/dist/ripple/p-a5a47a23.entry.js +1 -0
  245. package/dist/ripple/p-b16373b9.system.entry.js +1 -0
  246. package/dist/ripple/p-b547bcf2.entry.js +1 -0
  247. package/dist/ripple/{p-1df2adee.system.entry.js → p-bfc1ab2e.system.entry.js} +1 -1
  248. package/dist/ripple/p-c8bb4b2b.entry.js +1 -0
  249. package/dist/ripple/p-d09fb6b5.entry.js +1 -0
  250. package/dist/ripple/{p-b4efa7d1.system.entry.js → p-ddf157c8.system.entry.js} +1 -1
  251. package/dist/ripple/p-e1b076be.entry.js +1 -0
  252. package/dist/ripple/p-e7a7d732.entry.js +1 -0
  253. package/dist/ripple/p-e8e2228d.system.entry.js +1 -0
  254. package/dist/ripple/p-ebae8cae.system.entry.js +1 -0
  255. package/dist/ripple/p-efe7728e.entry.js +1 -0
  256. package/dist/ripple/p-f54c4b0e.system.js +1 -0
  257. package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
  258. package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
  259. package/dist/ripple/{p-fda5a778.system.entry.js → p-ffb97b6d.system.entry.js} +1 -1
  260. package/dist/ripple/ripple.esm.js +1 -1
  261. package/dist/ripple/ripple.js +1 -1
  262. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  263. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +35 -35
  264. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  265. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
  266. package/dist/types/components/wm-button/wm-button.d.ts +43 -43
  267. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  268. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
  269. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  270. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  271. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
  272. package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
  273. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  274. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  275. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  276. package/dist/types/components/wm-navigation/wm-navigation.d.ts +30 -30
  277. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  278. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  279. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  280. package/dist/types/components/wm-option/wm-option.d.ts +32 -32
  281. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  282. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  283. package/dist/types/components/wm-select/wm-select.d.ts +66 -66
  284. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  285. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  286. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  287. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  288. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  289. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  290. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  291. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  292. package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
  293. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  294. package/dist/types/components.d.ts +24 -24
  295. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  296. package/dist/types/global/chartFunctions.d.ts +29 -28
  297. package/dist/types/global/functions.d.ts +42 -42
  298. package/dist/types/global/global.d.ts +1 -1
  299. package/dist/types/global/interfaces.d.ts +44 -44
  300. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  301. package/dist/types/global/services/http-service.d.ts +4 -4
  302. package/dist/types/lang/lang.d.ts +5 -5
  303. package/dist/types/stencil-public-runtime.d.ts +4 -6
  304. package/package.json +47 -47
  305. package/dist/esm-es5/chartFunctions-303e1644.js +0 -1
  306. package/dist/esm-es5/functions-e552a8b5.js +0 -15
  307. package/dist/esm-es5/global-fa341013.js +0 -1
  308. package/dist/esm-es5/index-7603f98e.js +0 -1
  309. package/dist/ripple/p-01d2c1ab.entry.js +0 -1
  310. package/dist/ripple/p-02a3c14f.entry.js +0 -1
  311. package/dist/ripple/p-1116a297.entry.js +0 -1
  312. package/dist/ripple/p-13a746ea.entry.js +0 -1
  313. package/dist/ripple/p-175eba9d.system.js +0 -15
  314. package/dist/ripple/p-1d0742b0.entry.js +0 -1
  315. package/dist/ripple/p-2409192f.entry.js +0 -1
  316. package/dist/ripple/p-313b6073.system.js +0 -1
  317. package/dist/ripple/p-358bde27.entry.js +0 -1
  318. package/dist/ripple/p-35ce3ff8.entry.js +0 -1
  319. package/dist/ripple/p-3bed42bf.entry.js +0 -1
  320. package/dist/ripple/p-3fa5f0f0.system.entry.js +0 -1
  321. package/dist/ripple/p-431220d3.entry.js +0 -1
  322. package/dist/ripple/p-461f08d4.entry.js +0 -1
  323. package/dist/ripple/p-4d59fe86.entry.js +0 -1
  324. package/dist/ripple/p-4f42da30.system.entry.js +0 -1
  325. package/dist/ripple/p-50db2d6a.system.entry.js +0 -1
  326. package/dist/ripple/p-5c099280.entry.js +0 -1
  327. package/dist/ripple/p-6910f965.entry.js +0 -1
  328. package/dist/ripple/p-69f21f1a.system.entry.js +0 -1
  329. package/dist/ripple/p-6a6408b8.system.js +0 -1
  330. package/dist/ripple/p-7fae0cc2.entry.js +0 -1
  331. package/dist/ripple/p-823380c1.system.entry.js +0 -1
  332. package/dist/ripple/p-83fe767e.entry.js +0 -1
  333. package/dist/ripple/p-89372ba5.system.entry.js +0 -1
  334. package/dist/ripple/p-936fbfff.entry.js +0 -1
  335. package/dist/ripple/p-9d69aa46.system.entry.js +0 -1
  336. package/dist/ripple/p-a0c3ef16.system.js +0 -1
  337. package/dist/ripple/p-a216c161.system.entry.js +0 -1
  338. package/dist/ripple/p-a51453f6.entry.js +0 -1
  339. package/dist/ripple/p-a9e0ce88.entry.js +0 -1
  340. package/dist/ripple/p-b3c71506.js +0 -1
  341. package/dist/ripple/p-b4724251.entry.js +0 -1
  342. package/dist/ripple/p-b6b5c946.entry.js +0 -1
  343. package/dist/ripple/p-b786a5fd.system.entry.js +0 -1
  344. package/dist/ripple/p-ba76563e.system.entry.js +0 -1
  345. package/dist/ripple/p-bd5a6394.entry.js +0 -1
  346. package/dist/ripple/p-c77d79be.entry.js +0 -1
  347. package/dist/ripple/p-c9541d4d.system.entry.js +0 -1
  348. package/dist/ripple/p-ca7c628f.entry.js +0 -1
  349. package/dist/ripple/p-cae4ebf4.system.entry.js +0 -1
  350. package/dist/ripple/p-cf648440.entry.js +0 -1
  351. package/dist/ripple/p-d93d5885.entry.js +0 -1
  352. package/dist/ripple/p-d9d82a0d.js +0 -1
  353. package/dist/ripple/p-e51562cd.system.entry.js +0 -1
  354. package/dist/ripple/p-eaedb11d.system.entry.js +0 -1
  355. package/dist/ripple/p-ed8115b9.system.entry.js +0 -1
  356. package/dist/ripple/p-f24ff348.system.js +0 -1
  357. package/dist/ripple/p-f37b54be.js +0 -16
  358. package/dist/ripple/p-f5f8bb25.system.entry.js +0 -1
  359. package/dist/ripple/p-f9c3a2ce.entry.js +0 -1
  360. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +0 -27
  361. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +0 -26
  362. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +0 -17
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-7603f98e.js";import{i as intl,g as generateId,l as shouldOpenUp,q as getTextDir}from"./functions-e552a8b5.js";var wmOptionCss=':host(:not(:last-child)),wm-option:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host,wm-option{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus,wm-option:focus,wm-option.focus{outline:none;background:#f4f4f4}:host.icon,wm-option.icon{color:#575195}.checkbox:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f131";display:inline;margin-right:0.25rem;color:#575195}:host([aria-selected=true]),wm-option[aria-selected=true]{background:rgba(46, 27, 70, 0.05);font-weight:500}:host([aria-selected=true]) .checkbox:before,wm-option[aria-selected=true] .checkbox:before{content:"\\f132"}:host([aria-disabled=true]),wm-option[aria-disabled=true]{font-style:italic;color:#6b6b6b;cursor:default}:host([aria-disabled=true]) .checkbox:before,wm-option[aria-disabled=true] .checkbox:before{color:#6b6b6b}:host(.multi-option),wm-option.multi-option{background:unset}:host(.hassubinfo),wm-option.hassubinfo{display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper,wm-option.hassubinfo .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo,wm-option.hassubinfo .subinfo{-ms-flex:none;flex:none}.subinfo{font-style:italic}.option-wrapper{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus),wm-option:focus{outline:none;background:#f4f4f4}:host(:hover){background:#f4f4f4;outline:none}';var Option=function(){function e(e){registerInstance(this,e);this.wmOptionSelected=createEvent(this,"wmOptionSelected",7);this.wmKeyUpPressed=createEvent(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=createEvent(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=createEvent(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=createEvent(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=createEvent(this,"wmEndKeyPressed",7);this.wmTabKeyPressed=createEvent(this,"wmTabKeyPressed",7);this.wmEnterKeyPressed=createEvent(this,"wmEnterKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmOptionBlurred=createEvent(this,"wmOptionBlurred",7);this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false}Object.defineProperty(e.prototype,"isMultiChild",{get:function(){var e;return(e=this.el.parentElement)===null||e===void 0?void 0:e.multiple},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit();break;case"ArrowDown":e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":e.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case" ":e.preventDefault();this.el.click();break;case"Escape":e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":e.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":e.preventDefault();this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:this.wmLetterPressed.emit(e.key)}};e.prototype.handleSelection=function(){if(!this.disabled){this.wmOptionSelected.emit()}};e.prototype.handleBlur=function(e){this.wmOptionBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.removeAttribute("aria-selected")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.focusHandler=function(e){if(e)this.el.focus()};e.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.componentWillLoad=function(){this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick()};e.prototype.render=function(){return h(Host,{role:"option",tabindex:this.focused?0:-1,class:"".concat(this.subinfo?"hassubinfo":""," ").concat(this.isMultiChild?"multi-option":"")},h("div",{class:"option-wrapper ".concat(this.isMultiChild?"checkbox":"")},h("slot",null)),h("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"],focused:["focusHandler"]}},enumerable:false,configurable:true});return e}();Option.style=wmOptionCss;var wmSelectCss=':host{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:#c0392b}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:#c0392b}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .dropdown{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:#575195;min-width:8.75rem}.wrapper .dropdown .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:transparent;width:100%;border:solid 1px rgba(35, 35, 35, 0.6);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:#575195;font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .dropdown .displayedoption{height:2.75rem}}.wrapper .dropdown .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none}.wrapper .dropdown .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:transparent;text-decoration:none}.wrapper .dropdown .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .dropdown .displayedoption:focus{outline:none}.wrapper .dropdown .displayedoption::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.wrapper .dropdown .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .dropdown .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .dropdown>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .dropdown>.options{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}.wrapper .dropdown>.options.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .dropdown>.options.hidden{visibility:hidden}.wrapper .dropdown>.options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .dropdown .displayedoption{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}.wrapper .error-message{color:#c0392b;font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;display:block;top:100%;left:0;font-style:italic}.rtl>.options{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.options .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var Select=function(){function e(e){registerInstance(this,e);this.wmSelectDidLoad=createEvent(this,"wmSelectDidLoad",7);this.wmSelectBlurred=createEvent(this,"wmSelectBlurred",7);this.wmComponentBlurred=createEvent(this,"wmComponentBlurred",7);this.disabled=false;this.invalid=false;this.labelPosition="top";this.requiredField=false;this.errorMessage="";this.multiple=false;this.placeholder=intl.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.allSelectedMessage=intl.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.requiredMessage=intl.formatMessage({id:"global.requiredField",defaultMessage:"required field"});this.isTabbing=false;this.isExpanded=false;this.keysSoFar="";this.searchIndex=0;this.keyClear=null;this.openUp=false;this.overflowCount=0;this.displayedItems=[];this.allSelected=false}Object.defineProperty(e.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleOptionSelection=function(e){if(!this.multiple){this.childItems.filter((function(t){return t!=e.target&&!!t.selected})).map((function(e){return e.selected=false}))}this.focusItem(e.target);this.selectItem(e.target);if(!this.multiple){this.close()}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.target)};e.prototype.handleChildDown=function(e){this.moveDown(e.target)};e.prototype.moveToFirstItem=function(){this.focusItem(this.childItems[0])};e.prototype.moveToLastItem=function(){this.focusItem(this.childItems[this.childItems.length-1])};e.prototype.handleTabKey=function(){this.close(false)};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){var t=e.detail.relatedTarget===this.el||this.el.contains(e.detail.relatedTarget);if(!t){var i=new CustomEvent("blur");i.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(i)}};e.prototype.handleClick=function(e){var t=e.target===this.el||this.el.contains(e.target);if(!t&&this.isExpanded){this.close()}};e.prototype.handleButtonBlur=function(e){var t=e.relatedTarget===this.el||this.el.contains(e.relatedTarget);if(t){e.stopPropagation()}};e.prototype.handleKey=function(e){switch(e.key){case"ArrowDown":if(this.isExpanded===false){e.preventDefault();this.open("next")}break;case"ArrowUp":if(this.isExpanded===false){e.preventDefault();this.open("previous")}break}};e.prototype.componentWillLoad=function(){if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("button").focus()}};this.uid=this.el.id?this.el.id:generateId();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.componentDidLoad=function(){var e=this;this.wmSelectDidLoad.emit();if(!this.childItems.length){throw new Error("wm-select should have wm-option elements as children.")}if(this.multiple&&this.childItems.filter((function(e){return e.subinfo})).length>0){throw new Error("wm-select with the multiple prop cannot have subinfo options")}if(this.multiple&&!this.placeholder){throw new Error("wm-select with the multiple prop needs to also use the placeholder prop.")}if(this.selectedItems.length>0){this.selectedItems.forEach((function(t){return e.displayedItems.push(t)}));this.setButtonText()}else if(!this.multiple){this.selectItem(this.childItems[0])}this.optionsEl.classList.add("hidden");forceUpdate(this.el);if(this.maxHeight){this.optionsEl.style.maxHeight=this.maxHeight}};e.prototype.moveUp=function(e){var t=e.previousElementSibling;if(t){if(t.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top){this.optionsEl.scrollTop=t.getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop}this.focusItem(t)}else{this.focusItem(this.childItems[this.childItems.length-1])}};e.prototype.moveDown=function(e){var t=e.nextElementSibling;if(t&&t.tagName!=="INPUT"){if(t.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom){this.optionsEl.scrollTop=t.getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight}this.focusItem(t)}else{this.focusItem(this.childItems[0])}};e.prototype.open=function(e){var t=this;if(!this.disabled){var i=this.el.clientHeight;var o=this.buttonEl.clientHeight;this.openUp=shouldOpenUp(this.el,this.optionsEl,i,o);this.isExpanded=true;this.optionsEl.classList.remove("hidden");window.requestAnimationFrame((function(){if(t.selectedItems.length>0){if(e==="next"){t.moveDown(t.selectedItems[t.selectedItems.length-1])}else if(e==="previous"){t.moveUp(t.selectedItems[0])}else{t.focusItem(t.selectedItems[0])}}else{t.focusItem(t.childItems[0])}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;this.childItems.map((function(e){return e.focused=false}));window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.el.focus()}}),150)};e.prototype.focusItem=function(e){this.childItems.forEach((function(t){return t.focused=t===e}))};e.prototype.selectItem=function(e){if(this.multiple){e.selected=!e.selected}else{this.childItems.forEach((function(t){return t.selected=t===e}))}this.setButtonText()};e.prototype.findAndFocusItem=function(e){var t=e.detail.toUpperCase();if(!this.keysSoFar){for(var i=0;i<this.childItems.length;i++){if(this.childItems[i].focused){this.searchIndex=i}}}this.keysSoFar+=t;this.clearKeysSoFarAfterDelay();var o=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!o){o=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(o){this.focusItem(o)}};e.prototype.clearKeysSoFarAfterDelay=function(){if(this.keyClear){window.clearTimeout(this.keyClear);this.keyClear=null}this.keyClear=window.setTimeout(function(){this.keysSoFar="";this.keyClear=null}.bind(this),500)};e.prototype.findMatchInRange=function(e,t,i){for(var o=t;o<i;o++){var s=e[o].textContent;if(s&&s.toUpperCase().indexOf(this.keysSoFar)===0){return e[o]}}return null};e.prototype.exposeErrors=function(){var e=generateId();this.errorContainer.id="wm-errors-".concat(e);this.buttonEl.setAttribute("aria-describedby","wm-errors-".concat(e))};e.prototype.renderErrorContainer=function(){var e=this;return h("div",{id:"wm-errors",class:this.errorMessage?"error-message":"",ref:function(t){return e.errorContainer=t},"aria-live":"assertive","aria-atomic":"true"},this.errorMessage)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit();this.wmComponentBlurred.emit()}};e.prototype.setButtonText=function(){this.displayedItems=this.childItems.filter((function(e){return e.selected}));this.allSelected=this.displayedItems.length===this.childItems.length;if(this.multiple){var e=38;var t=window.getComputedStyle(this.buttonEl);var i=parseInt(t.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(t.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-i-o-e;var r=this.displayedItems.map((function(e){return e.shadowRoot.querySelector(".option-wrapper").clientWidth}));var n=r.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(n>s&&this.displayedItems.length>1){this.overflowCount++;n-=r[r.length-1];r.pop();this.displayedItems.pop()}}};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedItems.length<1){return h("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedItems.map((function(e,t){return h("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderSubinfo=function(){if(!this.multiple&&this.selectedItems.length>0&&this.selectedItems[0].subinfo){return h("span",{class:"subinfo"},this.selectedItems[0].subinfo)}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return h("span",null,h("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.render=function(){var e;var t=this;var i=(e={id:"selectbtn-".concat(this.uid)},e["disabled"]=this.disabled,e["aria-controls"]="list-".concat(this.uid),e["aria-labelledby"]="label-".concat(this.uid," selectbtn-").concat(this.uid),e["aria-describedby"]="wm-errors",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return h(Host,{onBlur:function(e){return t.handleComponentBlur(e)}},h("div",{class:"wrapper ".concat(getTextDir()," label-").concat(this.labelPosition," ").concat(this.invalid||this.errorMessage?"invalid":"")},h("div",{class:"label-wrapper"},h("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"selectbtn-".concat(this.uid)},this.label,this.requiredField?h("span",{class:"required"},h("span",{class:"sr-only"},this.requiredMessage),h("span",{"aria-hidden":"true"},"*")):"")),h("div",{class:"dropdown"},h("button",Object.assign({},i,{class:"displayedoption ".concat(this.isTabbing?"user-is-tabbing":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)}}),h("span",{class:this.selectedItems.length>0&&this.selectedItems.filter((function(e){return e.subinfo})).length>0?"overflowcontrol hassubinfo":"overflowcontrol"},h("span",{class:"button-text"},this.renderButtonText()),this.renderSubinfo()),this.renderOverflowCount()),h("div",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list-".concat(this.uid),tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label-".concat(this.uid),ref:function(e){return t.optionsEl=e}},h("slot",null)),this.renderErrorContainer())))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["exposeErrors"]}},enumerable:false,configurable:true});return e}();Select.style=wmSelectCss;export{Option as wm_option,Select as wm_select};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-d649a861.js";import{i as intl,g as generateId,l as shouldOpenUp,q as getTextDir}from"./functions-117d1a51.js";var wmOptionCss='@charset "UTF-8";:host(:not(:last-child)),wm-option:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host,wm-option{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus,wm-option:focus,wm-option.focus{outline:none;background:#f4f4f4}:host.icon,wm-option.icon{color:#575195}.checkbox:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"";display:inline;margin-right:0.25rem;color:#575195}:host([aria-selected=true]),wm-option[aria-selected=true]{background:rgba(46, 27, 70, 0.05);font-weight:500}:host([aria-selected=true]) .checkbox:before,wm-option[aria-selected=true] .checkbox:before{content:""}:host([aria-disabled=true]),wm-option[aria-disabled=true]{font-style:italic;color:#6b6b6b;cursor:default}:host([aria-disabled=true]) .checkbox:before,wm-option[aria-disabled=true] .checkbox:before{color:#6b6b6b}:host(.multi-option),wm-option.multi-option{background:unset}:host(.hassubinfo),wm-option.hassubinfo{display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper,wm-option.hassubinfo .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo,wm-option.hassubinfo .subinfo{-ms-flex:none;flex:none}.subinfo{font-style:italic}.option-wrapper{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus),wm-option:focus{outline:none;background:#f4f4f4}:host(:hover){background:#f4f4f4;outline:none}';var Option=function(){function e(e){registerInstance(this,e);this.wmOptionSelected=createEvent(this,"wmOptionSelected",7);this.wmKeyUpPressed=createEvent(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=createEvent(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=createEvent(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=createEvent(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=createEvent(this,"wmEndKeyPressed",7);this.wmTabKeyPressed=createEvent(this,"wmTabKeyPressed",7);this.wmEnterKeyPressed=createEvent(this,"wmEnterKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmOptionBlurred=createEvent(this,"wmOptionBlurred",7);this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false}Object.defineProperty(e.prototype,"isMultiChild",{get:function(){var e;return(e=this.el.parentElement)===null||e===void 0?void 0:e.multiple},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit();break;case"ArrowDown":e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":e.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case" ":e.preventDefault();this.el.click();break;case"Escape":e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":e.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":e.preventDefault();this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:this.wmLetterPressed.emit(e.key)}};e.prototype.handleSelection=function(){if(!this.disabled){this.wmOptionSelected.emit()}};e.prototype.handleBlur=function(e){this.wmOptionBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.removeAttribute("aria-selected")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.focusHandler=function(e){if(e)this.el.focus()};e.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.componentWillLoad=function(){this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick()};e.prototype.render=function(){return h(Host,{role:"option",tabindex:this.focused?0:-1,class:(this.subinfo?"hassubinfo":"")+" "+(this.isMultiChild?"multi-option":"")},h("div",{class:"option-wrapper "+(this.isMultiChild?"checkbox":"")},h("slot",null)),h("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"],focused:["focusHandler"]}},enumerable:false,configurable:true});return e}();Option.style=wmOptionCss;var wmSelectCss='@charset "UTF-8";:host{position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:#c0392b}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:#c0392b}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .dropdown{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:#575195;min-width:8.75rem}.wrapper .dropdown .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:transparent;width:100%;border:solid 1px rgba(35, 35, 35, 0.6);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:#575195;font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .dropdown .displayedoption{height:2.75rem}}.wrapper .dropdown .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"";position:absolute;right:0.5625rem;pointer-events:none}.wrapper .dropdown .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:transparent;text-decoration:none}.wrapper .dropdown .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .dropdown .displayedoption:focus{outline:none}.wrapper .dropdown .displayedoption::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.wrapper .dropdown .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .dropdown .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .dropdown>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .dropdown>.options{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}.wrapper .dropdown>.options.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .dropdown>.options.hidden{visibility:hidden}.wrapper .dropdown>.options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .dropdown .displayedoption{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}.wrapper .error-message{color:#c0392b;font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;display:block;top:100%;left:0;font-style:italic}.rtl>.options{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.options .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var Select=function(){function e(e){registerInstance(this,e);this.wmSelectDidLoad=createEvent(this,"wmSelectDidLoad",7);this.wmSelectBlurred=createEvent(this,"wmSelectBlurred",7);this.wmComponentBlurred=createEvent(this,"wmComponentBlurred",7);this.disabled=false;this.invalid=false;this.labelPosition="top";this.requiredField=false;this.errorMessage="";this.multiple=false;this.placeholder=intl.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.allSelectedMessage=intl.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.requiredMessage=intl.formatMessage({id:"global.requiredField",defaultMessage:"required field"});this.isTabbing=false;this.isExpanded=false;this.keysSoFar="";this.searchIndex=0;this.keyClear=null;this.openUp=false;this.overflowCount=0;this.displayedItems=[];this.allSelected=false}Object.defineProperty(e.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleOptionSelection=function(e){if(!this.multiple){this.childItems.filter((function(t){return t!=e.target&&!!t.selected})).map((function(e){return e.selected=false}))}this.focusItem(e.target);this.selectItem(e.target);if(!this.multiple){this.close()}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.target)};e.prototype.handleChildDown=function(e){this.moveDown(e.target)};e.prototype.moveToFirstItem=function(){this.focusItem(this.childItems[0])};e.prototype.moveToLastItem=function(){this.focusItem(this.childItems[this.childItems.length-1])};e.prototype.handleTabKey=function(){this.close(false)};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){var t=e.detail.relatedTarget===this.el||this.el.contains(e.detail.relatedTarget);if(!t){var i=new CustomEvent("blur");i.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(i)}};e.prototype.handleClick=function(e){var t=e.target===this.el||this.el.contains(e.target);if(!t&&this.isExpanded){this.close()}};e.prototype.handleButtonBlur=function(e){var t=e.relatedTarget===this.el||this.el.contains(e.relatedTarget);if(t){e.stopPropagation()}};e.prototype.handleKey=function(e){switch(e.key){case"ArrowDown":if(this.isExpanded===false){e.preventDefault();this.open("next")}break;case"ArrowUp":if(this.isExpanded===false){e.preventDefault();this.open("previous")}break}};e.prototype.componentWillLoad=function(){if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("button").focus()}};this.uid=this.el.id?this.el.id:generateId();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.componentDidLoad=function(){var e=this;this.wmSelectDidLoad.emit();if(!this.childItems.length){throw new Error("wm-select should have wm-option elements as children.")}if(this.multiple&&this.childItems.filter((function(e){return e.subinfo})).length>0){throw new Error("wm-select with the multiple prop cannot have subinfo options")}if(this.multiple&&!this.placeholder){throw new Error("wm-select with the multiple prop needs to also use the placeholder prop.")}if(this.selectedItems.length>0){this.selectedItems.forEach((function(t){return e.displayedItems.push(t)}));this.setButtonText()}else if(!this.multiple){this.selectItem(this.childItems[0])}this.optionsEl.classList.add("hidden");forceUpdate(this.el);if(this.maxHeight){this.optionsEl.style.maxHeight=this.maxHeight}};e.prototype.moveUp=function(e){var t=e.previousElementSibling;if(t){if(t.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top){this.optionsEl.scrollTop=t.getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop}this.focusItem(t)}else{this.focusItem(this.childItems[this.childItems.length-1])}};e.prototype.moveDown=function(e){var t=e.nextElementSibling;if(t&&t.tagName!=="INPUT"){if(t.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom){this.optionsEl.scrollTop=t.getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight}this.focusItem(t)}else{this.focusItem(this.childItems[0])}};e.prototype.open=function(e){var t=this;if(!this.disabled){var i=this.el.clientHeight;var o=this.buttonEl.clientHeight;this.openUp=shouldOpenUp(this.el,this.optionsEl,i,o);this.isExpanded=true;this.optionsEl.classList.remove("hidden");window.requestAnimationFrame((function(){if(t.selectedItems.length>0){if(e==="next"){t.moveDown(t.selectedItems[t.selectedItems.length-1])}else if(e==="previous"){t.moveUp(t.selectedItems[0])}else{t.focusItem(t.selectedItems[0])}}else{t.focusItem(t.childItems[0])}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;this.childItems.map((function(e){return e.focused=false}));window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.el.focus()}}),150)};e.prototype.focusItem=function(e){this.childItems.forEach((function(t){return t.focused=t===e}))};e.prototype.selectItem=function(e){if(this.multiple){e.selected=!e.selected}else{this.childItems.forEach((function(t){return t.selected=t===e}))}this.setButtonText()};e.prototype.findAndFocusItem=function(e){var t=e.detail.toUpperCase();if(!this.keysSoFar){for(var i=0;i<this.childItems.length;i++){if(this.childItems[i].focused){this.searchIndex=i}}}this.keysSoFar+=t;this.clearKeysSoFarAfterDelay();var o=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!o){o=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(o){this.focusItem(o)}};e.prototype.clearKeysSoFarAfterDelay=function(){if(this.keyClear){window.clearTimeout(this.keyClear);this.keyClear=null}this.keyClear=window.setTimeout(function(){this.keysSoFar="";this.keyClear=null}.bind(this),500)};e.prototype.findMatchInRange=function(e,t,i){for(var o=t;o<i;o++){var s=e[o].textContent;if(s&&s.toUpperCase().indexOf(this.keysSoFar)===0){return e[o]}}return null};e.prototype.exposeErrors=function(){var e=generateId();this.errorContainer.id="wm-errors-"+e;this.buttonEl.setAttribute("aria-describedby","wm-errors-"+e)};e.prototype.renderErrorContainer=function(){var e=this;return h("div",{id:"wm-errors",class:this.errorMessage?"error-message":"",ref:function(t){return e.errorContainer=t},"aria-live":"assertive","aria-atomic":"true"},this.errorMessage)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit();this.wmComponentBlurred.emit()}};e.prototype.setButtonText=function(){this.displayedItems=this.childItems.filter((function(e){return e.selected}));this.allSelected=this.displayedItems.length===this.childItems.length;if(this.multiple){var e=38;var t=window.getComputedStyle(this.buttonEl);var i=parseInt(t.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(t.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-i-o-e;var r=this.displayedItems.map((function(e){return e.shadowRoot.querySelector(".option-wrapper").clientWidth}));var n=r.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(n>s&&this.displayedItems.length>1){this.overflowCount++;n-=r[r.length-1];r.pop();this.displayedItems.pop()}}};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedItems.length<1){return h("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedItems.map((function(e,t){return h("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderSubinfo=function(){if(!this.multiple&&this.selectedItems.length>0&&this.selectedItems[0].subinfo){return h("span",{class:"subinfo"},this.selectedItems[0].subinfo)}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return h("span",null,h("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.render=function(){var e;var t=this;var i=(e={id:"selectbtn-"+this.uid},e["disabled"]=this.disabled,e["aria-controls"]="list-"+this.uid,e["aria-labelledby"]="label-"+this.uid+" selectbtn-"+this.uid,e["aria-describedby"]="wm-errors",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return h(Host,{onBlur:function(e){return t.handleComponentBlur(e)}},h("div",{class:"wrapper "+getTextDir()+" label-"+this.labelPosition+" "+(this.invalid||this.errorMessage?"invalid":"")},h("div",{class:"label-wrapper"},h("label",{class:"label",id:"label-"+this.uid,htmlFor:"selectbtn-"+this.uid},this.label,this.requiredField?h("span",{class:"required"},h("span",{class:"sr-only"},this.requiredMessage),h("span",{"aria-hidden":"true"},"*")):"")),h("div",{class:"dropdown"},h("button",Object.assign({},i,{class:"displayedoption "+(this.isTabbing?"user-is-tabbing":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)}}),h("span",{class:this.selectedItems.length>0&&this.selectedItems.filter((function(e){return e.subinfo})).length>0?"overflowcontrol hassubinfo":"overflowcontrol"},h("span",{class:"button-text"},this.renderButtonText()),this.renderSubinfo()),this.renderOverflowCount()),h("div",{class:"options "+(this.isExpanded?"open":"")+" "+(this.openUp?"upwards":""),id:"list-"+this.uid,tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label-"+this.uid,ref:function(e){return t.optionsEl=e}},h("slot",null)),this.renderErrorContainer())))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["exposeErrors"]}},enumerable:false,configurable:true});return e}();Select.style=wmSelectCss;export{Option as wm_option,Select as wm_select};
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,t,a){if(a||arguments.length===2)for(var n=0,r=t.length,i;n<r;n++){if(i||!(n in t)){if(!i)i=Array.prototype.slice.call(t,0,n);i[n]=t[n]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-7603f98e.js";import{d as debounce}from"./functions-e552a8b5.js";var wmPaginationCss='nav .largescreen,nav .smallscreen{margin-bottom:0.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-ms-flex-pack:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end;font-size:0.875rem}nav .largescreen .pageview,nav .smallscreen .pageview{font-size:0.875rem;margin:0 0.625rem}nav .largescreen .paginationbtn,nav .smallscreen .paginationbtn{position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:#575195;background-color:transparent;margin:0;padding:0;height:2.5rem;width:2.5rem;font-family:inherit;letter-spacing:0.3px;font-size:0.875rem;font-weight:500;cursor:pointer;text-transform:none}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:#565397}nav .largescreen .paginationbtn:hover:not([aria-current=page]):not([disabled]),nav .smallscreen .paginationbtn:hover:not([aria-current=page]):not([disabled]){text-decoration:underline}nav .largescreen .paginationbtn:focus,nav .smallscreen .paginationbtn:focus{outline:none}nav .largescreen .paginationbtn::-moz-focus-inner,nav .smallscreen .paginationbtn::-moz-focus-inner{border:0;outline:none}nav .largescreen .paginationbtn[disabled],nav .smallscreen .paginationbtn[disabled]{color:#9f9f9f;pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:#9f9f9f}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem;width:auto !important}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0;width:auto !important}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none}nav .largescreen .ellipsis,nav .smallscreen .ellipsis{display:inline-block;width:2.5rem;text-align:center}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]),nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before{position:absolute;content:"";height:auto;width:16px;top:0;bottom:0;left:12px;right:0;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 2px;background-position:0 2em;border-radius:0;line-height:normal}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner{border:0}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{width:32px !important}nav .largescreen .paginationbtn[aria-current=page]{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background-color:#575195;color:#fff}nav .largescreen .paginationbtn[aria-current=page]:hover{-webkit-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background:#4e4986}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var Pagination=function(){function e(e){var t=this;registerInstance(this,e);this.wmPaginationPageClicked=createEvent(this,"wmPaginationPageClicked",7);this.pageClicked=createEvent(this,"pageClicked",7);this.focusCurrentPage=createEvent(this,"focusCurrentPage",7);this.currentPage=1;this.totalItems=undefined;this.itemsPerPage=undefined;this.value=1;this.isLargeViewport=window.innerWidth>600;this.isTabbing=false;this.srAnnouncement="";this.totalPages=0;this.debouncedResize=debounce((function(){t.isLargeViewport=window.innerWidth>600}),250);this.getMiddlePageNums=function(){var e;if(t.currentPage<4){e=[2,3,4]}else if(t.currentPage>t.totalPages-3){e=[t.totalPages-3,t.totalPages-2,t.totalPages-1]}else{e=[t.currentPage-1,t.currentPage,t.currentPage+1]}return e}}e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.maintainFocusOnNumberChange=function(e){var t=this;window.requestAnimationFrame((function(){switch(e){case"previous":t.currentPage===1&&t.el.shadowRoot.querySelector("button#wm-1").focus();break;case"next":t.currentPage===t.totalPages&&t.el.shadowRoot.querySelector("button#wm-".concat(t.totalPages)).focus();break;case"prev-arrow":t.currentPage===1&&t.el.shadowRoot.querySelector("#next-arw").focus();break;case"next-arrow":t.currentPage===t.totalPages&&t.el.shadowRoot.querySelector("#previous-arw").focus();break;case"page":t.el.shadowRoot.querySelector("button#wm-".concat(t.currentPage)).focus();default:return}}))};e.prototype.handleResize=function(){this.debouncedResize()};e.prototype.calculateTotalPages=function(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)};e.prototype.componentWillLoad=function(){if(!this.totalItems||!this.itemsPerPage||!this.currentPage){throw new Error("Please check the required attributes")}this.calculateTotalPages();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.updatePageDisplayed=function(e){this.value=e;this.wmPaginationPageClicked.emit();this.pageClicked.emit();this.srAnnouncement="Current page, ".concat(this.currentPage,". ").concat(this.getCurrentPagesInView())};e.prototype.displayShortPagination=function(){var e=[];for(var t=1;t<=this.totalPages;t++){e.push(this.displayPageNumber(t))}return e};e.prototype.displayLongPagination=function(){var e=this;var t=__spreadArray(__spreadArray([this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis()],this.getMiddlePageNums().map((function(t){return e.displayPageNumber(t)})),true),[this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)],false);return t};e.prototype.displayPageNumber=function(e){var t=this;return h("button",{id:"wm-".concat(e),class:"paginationbtn",onClick:function(){t.currentPage=e;t.updatePageDisplayed(e);t.maintainFocusOnNumberChange("page")},value:e,"aria-label":this.currentPage!==e?"Go to page ".concat(e):"","aria-current":this.currentPage===e?"page":undefined},e)};e.prototype.displayEllipsis=function(){return h("span",{class:"ellipsis"},"...")};e.prototype.getCurrentPagesInView=function(){var e=this.itemsPerPage*this.currentPage;var t=e-this.itemsPerPage+1;if(e>this.totalItems){e=this.totalItems}return"Viewing "+(t===e?"".concat(t):"".concat(t,"–").concat(e," of ").concat(this.totalItems))};e.prototype.renderLarge=function(){var e=this;return h("div",{class:"largescreen"},h("div",{class:"pageview"},this.getCurrentPagesInView()),h("div",{class:"pagebtncontainer ".concat(this.isTabbing?"user-is-tabbing":"")},h("button",{id:"previous",class:"paginationbtn previousbtn",onClick:function(){e.currentPage=e.currentPage-1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("previous")},disabled:this.currentPage===1,"aria-label":"Go to previous page","aria-controls":"status"},"Previous"),this.totalPages<6?this.displayShortPagination():this.displayLongPagination(),h("button",{id:"next",class:"paginationbtn nextbtn",onClick:function(){e.currentPage=e.currentPage+1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))};e.prototype.renderSmall=function(){var e=this;return h("div",{class:"smallscreen"},h("div",{class:"pagebtncontainer ".concat(this.isTabbing?"user-is-tabbing":"")},h("button",{id:"wm-1-arw",class:"paginationbtn",onClick:function(){e.currentPage=1;e.updatePageDisplayed(1);e.maintainFocusOnNumberChange("prev-arrow")},value:1,"aria-current":this.currentPage===1?"page":undefined,"aria-label":"Go to page 1","aria-controls":"status",disabled:this.currentPage===1},h("svg",{width:"16",height:"12",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6zM15.41 10.59L10.83 6l4.58-4.59L14 0 8 6l6 6z"}))),h("button",{id:"previous-arw",class:"paginationbtn previousbtn",onClick:function(){e.currentPage-=1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("prev-arrow")},disabled:this.currentPage===1,"aria-label":"Go to previous page"},h("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6z"}))),"Page ",this.currentPage," of ",this.totalPages,h("button",{id:"next-arw",class:"paginationbtn nextbtn",onClick:function(){e.currentPage+=1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("next-arrow")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page"},h("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6z"}))),h("button",{id:"wm-".concat(this.totalPages,"-arw"),class:"paginationbtn",onClick:function(){e.currentPage=e.totalPages;e.updatePageDisplayed(e.totalPages);e.maintainFocusOnNumberChange("next-arrow")},value:this.totalPages,"aria-current":this.currentPage===this.totalPages?"page":undefined,"aria-label":"Go to last page, page ".concat(this.totalPages),"aria-controls":"status",disabled:this.currentPage===this.totalPages},h("svg",{width:"17",height:"12",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6zM9.59 10.59L14.17 6 9.59 1.41 11 0l6 6-6 6z"})))))};e.prototype.render=function(){return this.totalItems>this.itemsPerPage&&h("nav",{"aria-label":"Pagination Navigation. ".concat(this.getCurrentPagesInView(),". Current page, ").concat(this.currentPage,".")},this.isLargeViewport?this.renderLarge():this.renderSmall(),h("div",{id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}},enumerable:false,configurable:true});return e}();Pagination.style=wmPaginationCss;export{Pagination as wm_pagination};
1
+ var __spreadArray=this&&this.__spreadArray||function(e,t){for(var a=0,n=t.length,r=e.length;a<n;a++,r++)e[r]=t[a];return e};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-d649a861.js";import{d as debounce}from"./functions-117d1a51.js";var wmPaginationCss='nav .largescreen,nav .smallscreen{margin-bottom:0.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-ms-flex-pack:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end;font-size:0.875rem}nav .largescreen .pageview,nav .smallscreen .pageview{font-size:0.875rem;margin:0 0.625rem}nav .largescreen .paginationbtn,nav .smallscreen .paginationbtn{position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:#575195;background-color:transparent;margin:0;padding:0;height:2.5rem;width:2.5rem;font-family:inherit;letter-spacing:0.3px;font-size:0.875rem;font-weight:500;cursor:pointer;text-transform:none}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:#565397}nav .largescreen .paginationbtn:hover:not([aria-current=page]):not([disabled]),nav .smallscreen .paginationbtn:hover:not([aria-current=page]):not([disabled]){text-decoration:underline}nav .largescreen .paginationbtn:focus,nav .smallscreen .paginationbtn:focus{outline:none}nav .largescreen .paginationbtn::-moz-focus-inner,nav .smallscreen .paginationbtn::-moz-focus-inner{border:0;outline:none}nav .largescreen .paginationbtn[disabled],nav .smallscreen .paginationbtn[disabled]{color:#9f9f9f;pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:#9f9f9f}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem;width:auto !important}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0;width:auto !important}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none}nav .largescreen .ellipsis,nav .smallscreen .ellipsis{display:inline-block;width:2.5rem;text-align:center}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]),nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before{position:absolute;content:"";height:auto;width:16px;top:0;bottom:0;left:12px;right:0;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 2px;background-position:0 2em;border-radius:0;line-height:normal}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner{border:0}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{width:32px !important}nav .largescreen .paginationbtn[aria-current=page]{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background-color:#575195;color:#fff}nav .largescreen .paginationbtn[aria-current=page]:hover{-webkit-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background:#4e4986}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var Pagination=function(){function e(e){var t=this;registerInstance(this,e);this.wmPaginationPageClicked=createEvent(this,"wmPaginationPageClicked",7);this.pageClicked=createEvent(this,"pageClicked",7);this.focusCurrentPage=createEvent(this,"focusCurrentPage",7);this.currentPage=1;this.totalItems=undefined;this.itemsPerPage=undefined;this.value=1;this.isLargeViewport=window.innerWidth>600;this.isTabbing=false;this.srAnnouncement="";this.totalPages=0;this.debouncedResize=debounce((function(){t.isLargeViewport=window.innerWidth>600}),250);this.getMiddlePageNums=function(){var e;if(t.currentPage<4){e=[2,3,4]}else if(t.currentPage>t.totalPages-3){e=[t.totalPages-3,t.totalPages-2,t.totalPages-1]}else{e=[t.currentPage-1,t.currentPage,t.currentPage+1]}return e}}e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.maintainFocusOnNumberChange=function(e){var t=this;window.requestAnimationFrame((function(){switch(e){case"previous":t.currentPage===1&&t.el.shadowRoot.querySelector("button#wm-1").focus();break;case"next":t.currentPage===t.totalPages&&t.el.shadowRoot.querySelector("button#wm-"+t.totalPages).focus();break;case"prev-arrow":t.currentPage===1&&t.el.shadowRoot.querySelector("#next-arw").focus();break;case"next-arrow":t.currentPage===t.totalPages&&t.el.shadowRoot.querySelector("#previous-arw").focus();break;case"page":t.el.shadowRoot.querySelector("button#wm-"+t.currentPage).focus();default:return}}))};e.prototype.handleResize=function(){this.debouncedResize()};e.prototype.calculateTotalPages=function(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)};e.prototype.componentWillLoad=function(){if(!this.totalItems||!this.itemsPerPage||!this.currentPage){throw new Error("Please check the required attributes")}this.calculateTotalPages();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.updatePageDisplayed=function(e){this.value=e;this.wmPaginationPageClicked.emit();this.pageClicked.emit();this.srAnnouncement="Current page, "+this.currentPage+". "+this.getCurrentPagesInView()};e.prototype.displayShortPagination=function(){var e=[];for(var t=1;t<=this.totalPages;t++){e.push(this.displayPageNumber(t))}return e};e.prototype.displayLongPagination=function(){var e=this;var t=__spreadArray(__spreadArray([this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis()],this.getMiddlePageNums().map((function(t){return e.displayPageNumber(t)}))),[this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)]);return t};e.prototype.displayPageNumber=function(e){var t=this;return h("button",{id:"wm-"+e,class:"paginationbtn",onClick:function(){t.currentPage=e;t.updatePageDisplayed(e);t.maintainFocusOnNumberChange("page")},value:e,"aria-label":this.currentPage!==e?"Go to page "+e:"","aria-current":this.currentPage===e?"page":undefined},e)};e.prototype.displayEllipsis=function(){return h("span",{class:"ellipsis"},"...")};e.prototype.getCurrentPagesInView=function(){var e=this.itemsPerPage*this.currentPage;var t=e-this.itemsPerPage+1;if(e>this.totalItems){e=this.totalItems}return"Viewing "+(t===e?""+t:t+"–"+e+" of "+this.totalItems)};e.prototype.renderLarge=function(){var e=this;return h("div",{class:"largescreen"},h("div",{class:"pageview"},this.getCurrentPagesInView()),h("div",{class:"pagebtncontainer "+(this.isTabbing?"user-is-tabbing":"")},h("button",{id:"previous",class:"paginationbtn previousbtn",onClick:function(){e.currentPage=e.currentPage-1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("previous")},disabled:this.currentPage===1,"aria-label":"Go to previous page","aria-controls":"status"},"Previous"),this.totalPages<6?this.displayShortPagination():this.displayLongPagination(),h("button",{id:"next",class:"paginationbtn nextbtn",onClick:function(){e.currentPage=e.currentPage+1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))};e.prototype.renderSmall=function(){var e=this;return h("div",{class:"smallscreen"},h("div",{class:"pagebtncontainer "+(this.isTabbing?"user-is-tabbing":"")},h("button",{id:"wm-1-arw",class:"paginationbtn",onClick:function(){e.currentPage=1;e.updatePageDisplayed(1);e.maintainFocusOnNumberChange("prev-arrow")},value:1,"aria-current":this.currentPage===1?"page":undefined,"aria-label":"Go to page 1","aria-controls":"status",disabled:this.currentPage===1},h("svg",{width:"16",height:"12",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6zM15.41 10.59L10.83 6l4.58-4.59L14 0 8 6l6 6z"}))),h("button",{id:"previous-arw",class:"paginationbtn previousbtn",onClick:function(){e.currentPage-=1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("prev-arrow")},disabled:this.currentPage===1,"aria-label":"Go to previous page"},h("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6z"}))),"Page ",this.currentPage," of ",this.totalPages,h("button",{id:"next-arw",class:"paginationbtn nextbtn",onClick:function(){e.currentPage+=1;e.updatePageDisplayed(e.currentPage);e.maintainFocusOnNumberChange("next-arrow")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page"},h("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6z"}))),h("button",{id:"wm-"+this.totalPages+"-arw",class:"paginationbtn",onClick:function(){e.currentPage=e.totalPages;e.updatePageDisplayed(e.totalPages);e.maintainFocusOnNumberChange("next-arrow")},value:this.totalPages,"aria-current":this.currentPage===this.totalPages?"page":undefined,"aria-label":"Go to last page, page "+this.totalPages,"aria-controls":"status",disabled:this.currentPage===this.totalPages},h("svg",{width:"17",height:"12",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6zM9.59 10.59L14.17 6 9.59 1.41 11 0l6 6-6 6z"})))))};e.prototype.render=function(){return this.totalItems>this.itemsPerPage&&h("nav",{"aria-label":"Pagination Navigation. "+this.getCurrentPagesInView()+". Current page, "+this.currentPage+"."},this.isLargeViewport?this.renderLarge():this.renderSmall(),h("div",{id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}},enumerable:false,configurable:true});return e}();Pagination.style=wmPaginationCss;export{Pagination as wm_pagination};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,o,t){function n(e){return e instanceof o?e:new o((function(r){r(e)}))}return new(o||(o=Promise))((function(o,p){function a(e){try{i(t.next(e))}catch(e){p(e)}}function s(e){try{i(t["throw"](e))}catch(e){p(e)}}function i(e){e.done?o(e.value):n(e.value).then(a,s)}i((t=t.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var o={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},t,n,p,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return i([e,r])}}function i(a){if(t)throw new TypeError("Generator is already executing.");while(o)try{if(t=1,n&&(p=a[0]&2?n["return"]:a[0]?n["throw"]||((p=n["return"])&&p.call(n),0):n.next)&&!(p=p.call(n,a[1])).done)return p;if(n=0,p)a=[a[0]&2,p.value];switch(a[0]){case 0:case 1:p=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(p=o.trys,p=p.length>0&&p[p.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!p||a[1]>p[0]&&a[1]<p[3])){o.label=a[1];break}if(a[0]===6&&o.label<p[1]){o.label=p[1];p=a;break}if(p&&o.label<p[2]){o.label=p[2];o.ops.push(a);break}if(p[2])o.ops.pop();o.trys.pop();continue}a=r.call(e,o)}catch(e){a=[6,e];n=0}finally{t=p=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement,c as createEvent}from"./index-7603f98e.js";import{g as generateId,i as intl,d as debounce}from"./functions-e552a8b5.js";import{t as types,h as handleChartKeydown,g as getData,a as renderBar,b as renderDoughnut,r as renderLegend,c as renderCompletionMessage}from"./chartFunctions-303e1644.js";var wmProgressIndicatorCss=":host,wm-progress-indicator{}:host .component-wrapper,wm-progress-indicator .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;}:host .component-wrapper .label,wm-progress-indicator .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}:host .component-wrapper .label .subinfo,wm-progress-indicator .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}:host .component-wrapper .legend-wrapper,wm-progress-indicator .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend,wm-progress-indicator .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.--top,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type),wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-text{padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .cluster-warning,wm-progress-indicator .component-wrapper .legend-wrapper .cluster-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .doughnut-svg,wm-progress-indicator .component-wrapper .doughnut-svg,:host .component-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper .inner-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .values,wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment,wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type),wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper,wm-progress-indicator .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment,wm-progress-indicator .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value,wm-progress-indicator .component-wrapper .value{display:inline-block;text-align:center}:host .component-wrapper .value:not(:last-of-type),wm-progress-indicator .component-wrapper .value:not(:last-of-type){margin-right:2px}:host .component-wrapper path:active,wm-progress-indicator .component-wrapper path:active,:host .component-wrapper path:hover,wm-progress-indicator .component-wrapper path:hover,:host .component-wrapper path:focus,wm-progress-indicator .component-wrapper path:focus,:host .component-wrapper .bar-segment:active,wm-progress-indicator .component-wrapper .bar-segment:active,:host .component-wrapper .bar-segment:hover,wm-progress-indicator .component-wrapper .bar-segment:hover,:host .component-wrapper .bar-segment:focus,wm-progress-indicator .component-wrapper .bar-segment:focus{outline:none}:host .component-wrapper .bar-segment:active.bar-segment,wm-progress-indicator .component-wrapper .bar-segment:active.bar-segment,:host .component-wrapper .bar-segment:hover.bar-segment,wm-progress-indicator .component-wrapper .bar-segment:hover.bar-segment,:host .component-wrapper .bar-segment:focus.bar-segment,wm-progress-indicator .component-wrapper .bar-segment:focus.bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,wm-progress-indicator .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,wm-progress-indicator .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,wm-progress-indicator .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .bar-segment:active.doughnut-segment,wm-progress-indicator .component-wrapper .bar-segment:active.doughnut-segment,:host .component-wrapper .bar-segment:hover.doughnut-segment,wm-progress-indicator .component-wrapper .bar-segment:hover.doughnut-segment,:host .component-wrapper .bar-segment:focus.doughnut-segment,wm-progress-indicator .component-wrapper .bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,wm-progress-indicator .component-wrapper path::-moz-focus-inner,:host .component-wrapper .bar-segment::-moz-focus-inner,wm-progress-indicator .component-wrapper .bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut,wm-progress-indicator .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,wm-progress-indicator .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,wm-progress-indicator .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,wm-progress-indicator .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,wm-progress-indicator .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,wm-progress-indicator .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text,wm-progress-indicator .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,wm-progress-indicator .component-wrapper.doughnut0,:host .component-wrapper.doughnut,wm-progress-indicator .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,wm-progress-indicator .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label,wm-progress-indicator .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,wm-progress-indicator .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo,wm-progress-indicator .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .legend,wm-progress-indicator .component-wrapper.doughnut0 .legend,:host .component-wrapper.doughnut .legend,wm-progress-indicator .component-wrapper.doughnut .legend{display:-ms-flexbox;display:flex}:host .component-wrapper.doughnut0 .completion-message,wm-progress-indicator .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message,wm-progress-indicator .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,wm-progress-indicator .component-wrapper.bar1,:host .component-wrapper.bar,wm-progress-indicator .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,wm-progress-indicator .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-progress-indicator .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,wm-progress-indicator .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo,wm-progress-indicator .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .legend,wm-progress-indicator .component-wrapper.bar1 .legend,:host .component-wrapper.bar .legend,wm-progress-indicator .component-wrapper.bar .legend{display:none}:host .component-wrapper.bar1 .chart-wrapper,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper,wm-progress-indicator .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar .chart-wrapper .inner-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message,wm-progress-indicator .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,wm-progress-indicator .component-wrapper.bar1,:host .component-wrapper.bar,wm-progress-indicator .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,wm-progress-indicator .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-progress-indicator .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,wm-progress-indicator .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper,wm-progress-indicator .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,wm-progress-indicator .component-wrapper.bar2,:host .component-wrapper.bar3,wm-progress-indicator .component-wrapper.bar3,:host .component-wrapper.bar4,wm-progress-indicator .component-wrapper.bar4,:host .component-wrapper.bar5,wm-progress-indicator .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar2 .inner-bar-wrapper,:host .component-wrapper.bar4 .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar4 .inner-bar-wrapper,:host .component-wrapper.bar5 .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar5 .inner-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar2 .inner-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar4 .inner-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar5 .inner-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .legend,wm-progress-indicator .component-wrapper.bar3 .legend{padding-bottom:1.25rem}:host .component-wrapper.bar3 .chart-wrapper,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text{fill:#4a4a4a}:host .component-wrapper.bar3 .chart-wrapper .axis,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.left-label,wm-progress-indicator .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label,wm-progress-indicator .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host :host(:focus),wm-progress-indicator :host(:focus){outline:none}:host :host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,wm-progress-indicator :host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,:host :host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper,wm-progress-indicator :host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host :host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,wm-progress-indicator :host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,:host :host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner,wm-progress-indicator :host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";var ProgressIndicator=function(){function e(e){registerInstance(this,e);this.showLegend=true;this.isTabbing=false;this.uid=generateId();this.slicesData=[];this.chartLabelMessage=intl.formatMessage({id:"chart.interactiveChart",defaultMessage:"Interactive chart. Use arrow keys to browse elements, press Tab to exit."})}Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){var e=this.mode==="bar";var r=this.mode==="doughnut";return e?Array.from(this.el.shadowRoot.querySelectorAll(".bar-segment")):r?Array.from(this.el.shadowRoot.querySelectorAll(".doughnut-segment")):undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartData",{get:function(){return this.mode?types[this.mode]:undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label,", ").concat(this.chartLabelMessage);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){handleChartKeydown.call(this,e)};e.prototype.componentWillLoad=function(){var e=this;if(!this.label){console.error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}if(this.el.children.length!==2){console.warn("wm-progress-indicator component must have 2 wm-progress-slice children.")}this.el.parentElement.addEventListener("wmProgressMonitorModeChange",(function(r){return e.mode=r.detail}))};e.prototype.handleSliceUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getData.call(this,this.mode)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))};e.prototype.handleModeUpdate=function(){if(this.mode){getData.call(this,this.mode)}};e.prototype.renderBarOrDoughnut=function(){if(this.total>0&&this.mode==="bar"){return renderBar.call(this,this.mode)}else{return renderDoughnut.call(this,this.mode)}};e.prototype.render=function(){return h(Host,{role:"application","aria-label":this.ariaLabelText,tabindex:"0"},h("div",{class:"component-wrapper ".concat(this.mode," ").concat(this.isTabbing?"user-is-tabbing":"")},h("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"graphic-".concat(this.uid)},h("span",{class:"label-text"},this.label),this.subinfo?h("span",{class:"subinfo"},this.subinfo):""),this.mode==="bar"?renderLegend.call(this):"",this.mode&&this.renderBarOrDoughnut(),this.mode==="doughnut"?renderLegend.call(this):"",h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.mode==="doughnut"?renderCompletionMessage.call(this):""))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mode:["handleModeUpdate"]}},enumerable:false,configurable:true});return e}();ProgressIndicator.style=wmProgressIndicatorCss;var wmProgressMonitorCss=":host,wm-progress-monitor{display:-ms-flexbox;display:flex}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}";var ProgressMonitor=function(){function e(e){var r=this;registerInstance(this,e);this.wmProgressMonitorModeChange=createEvent(this,"wmProgressMonitorModeChange",7);this.doughnutWidth=300;this.modeInitialized=false;this.debouncedUpdate=debounce((function(){return forceUpdate(r.el)}),50)}Object.defineProperty(e.prototype,"parsedBreakpoint",{get:function(){var e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);var r=e>=20?e:e*this.doughnutWidth;return r},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"mode",{get:function(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var r=new ResizeObserver((function(){return e.debouncedUpdate()}));r.observe(this.el)};e.prototype.componentDidLoad=function(){this.wmProgressMonitorModeChange.emit(this.mode);this.modeInitialized=true};e.prototype.componentWillUpdate=function(){if(this.prevMode!==this.mode){this.wmProgressMonitorModeChange.emit(this.mode)}this.prevMode=this.mode};e.prototype.parseToNum=function(e){var r=e.toString();var o=r.replace("px","");return parseInt(o)};e.prototype.render=function(){return h(Host,{class:this.mode==="doughnut"?"row":"column"},this.modeInitialized&&h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ProgressMonitor.style=wmProgressMonitorCss;var ProgressSlice=function(){function e(e){registerInstance(this,e);this.wmProgressSliceUpdated=createEvent(this,"wmProgressSliceUpdated",7)}e.prototype.componentDidUpdate=function(){this.wmProgressSliceUpdated.emit()};return e}();export{ProgressIndicator as wm_progress_indicator,ProgressMonitor as wm_progress_monitor,ProgressSlice as wm_progress_slice};
1
+ var __awaiter=this&&this.__awaiter||function(e,r,o,t){function n(e){return e instanceof o?e:new o((function(r){r(e)}))}return new(o||(o=Promise))((function(o,p){function a(e){try{i(t.next(e))}catch(e){p(e)}}function s(e){try{i(t["throw"](e))}catch(e){p(e)}}function i(e){e.done?o(e.value):n(e.value).then(a,s)}i((t=t.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var o={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},t,n,p,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return i([e,r])}}function i(a){if(t)throw new TypeError("Generator is already executing.");while(o)try{if(t=1,n&&(p=a[0]&2?n["return"]:a[0]?n["throw"]||((p=n["return"])&&p.call(n),0):n.next)&&!(p=p.call(n,a[1])).done)return p;if(n=0,p)a=[a[0]&2,p.value];switch(a[0]){case 0:case 1:p=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;n=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(p=o.trys,p=p.length>0&&p[p.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!p||a[1]>p[0]&&a[1]<p[3])){o.label=a[1];break}if(a[0]===6&&o.label<p[1]){o.label=p[1];p=a;break}if(p&&o.label<p[2]){o.label=p[2];o.ops.push(a);break}if(p[2])o.ops.pop();o.trys.pop();continue}a=r.call(e,o)}catch(e){a=[6,e];n=0}finally{t=p=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement,c as createEvent}from"./index-d649a861.js";import{g as generateId,i as intl,d as debounce}from"./functions-117d1a51.js";import{t as types,h as handleChartKeydown,g as getData,a as renderBar,b as renderDoughnut,r as renderLegend,c as renderCompletionMessage,e as exitChart}from"./chartFunctions-b24ba065.js";var wmProgressIndicatorCss=":host .component-wrapper,wm-progress-indicator .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;}:host .component-wrapper .label,wm-progress-indicator .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}:host .component-wrapper .label .subinfo,wm-progress-indicator .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}:host .component-wrapper .legend-wrapper,wm-progress-indicator .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend,wm-progress-indicator .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.--top,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type),wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-text{padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color,wm-progress-indicator .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .cluster-warning,wm-progress-indicator .component-wrapper .legend-wrapper .cluster-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .doughnut-svg,wm-progress-indicator .component-wrapper .doughnut-svg,:host .component-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper .inner-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .values,wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper,wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment,wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type),wm-progress-indicator .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper,wm-progress-indicator .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment,wm-progress-indicator .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value,wm-progress-indicator .component-wrapper .value{display:inline-block;text-align:center}:host .component-wrapper .value:not(:last-of-type),wm-progress-indicator .component-wrapper .value:not(:last-of-type){margin-right:2px}:host .component-wrapper path:active,wm-progress-indicator .component-wrapper path:active,:host .component-wrapper path:hover,wm-progress-indicator .component-wrapper path:hover,:host .component-wrapper path:focus,wm-progress-indicator .component-wrapper path:focus,:host .component-wrapper .bar-segment:active,wm-progress-indicator .component-wrapper .bar-segment:active,:host .component-wrapper .bar-segment:hover,wm-progress-indicator .component-wrapper .bar-segment:hover,:host .component-wrapper .bar-segment:focus,wm-progress-indicator .component-wrapper .bar-segment:focus{outline:none}:host .component-wrapper .bar-segment:active.bar-segment,wm-progress-indicator .component-wrapper .bar-segment:active.bar-segment,:host .component-wrapper .bar-segment:hover.bar-segment,wm-progress-indicator .component-wrapper .bar-segment:hover.bar-segment,:host .component-wrapper .bar-segment:focus.bar-segment,wm-progress-indicator .component-wrapper .bar-segment:focus.bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,wm-progress-indicator .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,wm-progress-indicator .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,wm-progress-indicator .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .bar-segment:active.doughnut-segment,wm-progress-indicator .component-wrapper .bar-segment:active.doughnut-segment,:host .component-wrapper .bar-segment:hover.doughnut-segment,wm-progress-indicator .component-wrapper .bar-segment:hover.doughnut-segment,:host .component-wrapper .bar-segment:focus.doughnut-segment,wm-progress-indicator .component-wrapper .bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,wm-progress-indicator .component-wrapper path::-moz-focus-inner,:host .component-wrapper .bar-segment::-moz-focus-inner,wm-progress-indicator .component-wrapper .bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut,wm-progress-indicator .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,wm-progress-indicator .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,wm-progress-indicator .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,wm-progress-indicator .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,wm-progress-indicator .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,wm-progress-indicator .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text,wm-progress-indicator .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,wm-progress-indicator .component-wrapper.doughnut0,:host .component-wrapper.doughnut,wm-progress-indicator .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,wm-progress-indicator .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label,wm-progress-indicator .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,wm-progress-indicator .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo,wm-progress-indicator .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .legend,wm-progress-indicator .component-wrapper.doughnut0 .legend,:host .component-wrapper.doughnut .legend,wm-progress-indicator .component-wrapper.doughnut .legend{display:-ms-flexbox;display:flex}:host .component-wrapper.doughnut0 .completion-message,wm-progress-indicator .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message,wm-progress-indicator .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,wm-progress-indicator .component-wrapper.bar1,:host .component-wrapper.bar,wm-progress-indicator .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,wm-progress-indicator .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-progress-indicator .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,wm-progress-indicator .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo,wm-progress-indicator .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .legend,wm-progress-indicator .component-wrapper.bar1 .legend,:host .component-wrapper.bar .legend,wm-progress-indicator .component-wrapper.bar .legend{display:none}:host .component-wrapper.bar1 .chart-wrapper,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper,wm-progress-indicator .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar .chart-wrapper .inner-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,wm-progress-indicator .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message,wm-progress-indicator .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,wm-progress-indicator .component-wrapper.bar1,:host .component-wrapper.bar,wm-progress-indicator .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,wm-progress-indicator .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-progress-indicator .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,wm-progress-indicator .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper,wm-progress-indicator .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc,wm-progress-indicator .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,wm-progress-indicator .component-wrapper.bar2,:host .component-wrapper.bar3,wm-progress-indicator .component-wrapper.bar3,:host .component-wrapper.bar4,wm-progress-indicator .component-wrapper.bar4,:host .component-wrapper.bar5,wm-progress-indicator .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar2 .inner-bar-wrapper,:host .component-wrapper.bar4 .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar4 .inner-bar-wrapper,:host .component-wrapper.bar5 .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar5 .inner-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar2 .inner-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar4 .inner-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-bar-wrapper.show-values,wm-progress-indicator .component-wrapper.bar5 .inner-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .legend,wm-progress-indicator .component-wrapper.bar3 .legend{padding-bottom:1.25rem}:host .component-wrapper.bar3 .chart-wrapper,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text{fill:#4a4a4a}:host .component-wrapper.bar3 .chart-wrapper .axis,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text,wm-progress-indicator .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.left-label,wm-progress-indicator .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label,wm-progress-indicator .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";var ProgressIndicator=function(){function e(e){registerInstance(this,e);this.showLegend=true;this.isTabbing=false;this.uid=generateId();this.slicesData=[];this.chartLabelMessage=intl.formatMessage({id:"chart.interactiveChart",defaultMessage:"Interactive chart. Use arrow keys to browse elements, press Tab to exit."})}Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){var e=this.mode==="bar";var r=this.mode==="doughnut";return e?Array.from(this.el.shadowRoot.querySelectorAll(".bar-segment")):r?Array.from(this.el.shadowRoot.querySelectorAll(".doughnut-segment")):undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartData",{get:function(){return this.mode?types[this.mode]:undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e=this.label+", "+this.chartLabelMessage;if(this.subinfo){e+=" "+this.subinfo}return e},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){handleChartKeydown.call(this,e)};e.prototype.componentWillLoad=function(){var e=this;if(!this.label){console.error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}if(this.el.children.length!==2){console.warn("wm-progress-indicator component must have 2 wm-progress-slice children.")}this.el.parentElement.addEventListener("wmProgressMonitorModeChange",(function(r){return e.mode=r.detail}))};e.prototype.handleSliceUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getData.call(this,this.mode)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))};e.prototype.handleModeUpdate=function(){if(this.mode){getData.call(this,this.mode)}};e.prototype.renderBarOrDoughnut=function(){if(this.total>0&&this.mode==="bar"){return renderBar.call(this,this.mode)}else{return renderDoughnut.call(this,this.mode)}};e.prototype.render=function(){var e=this;return h(Host,{role:"application","aria-label":this.ariaLabelText,tabindex:"0",onBlur:function(){return exitChart.call(e)}},h("div",{class:"component-wrapper "+this.mode+" "+(this.isTabbing?"user-is-tabbing":"")},h("label",{class:"label",id:"label-"+this.uid,htmlFor:"graphic-"+this.uid},h("span",{class:"label-text"},this.label),this.subinfo?h("span",{class:"subinfo"},this.subinfo):""),this.mode==="bar"?renderLegend.call(this):"",this.mode&&this.renderBarOrDoughnut(),this.mode==="doughnut"?renderLegend.call(this):"",h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.mode==="doughnut"?renderCompletionMessage.call(this):""))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mode:["handleModeUpdate"]}},enumerable:false,configurable:true});return e}();ProgressIndicator.style=wmProgressIndicatorCss;var wmProgressMonitorCss=":host,wm-progress-monitor{display:-ms-flexbox;display:flex}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}";var ProgressMonitor=function(){function e(e){var r=this;registerInstance(this,e);this.wmProgressMonitorModeChange=createEvent(this,"wmProgressMonitorModeChange",7);this.doughnutWidth=300;this.modeInitialized=false;this.debouncedUpdate=debounce((function(){return forceUpdate(r.el)}),50)}Object.defineProperty(e.prototype,"parsedBreakpoint",{get:function(){var e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);var r=e>=20?e:e*this.doughnutWidth;return r},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"mode",{get:function(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var r=new ResizeObserver((function(){return e.debouncedUpdate()}));r.observe(this.el)};e.prototype.componentDidLoad=function(){this.wmProgressMonitorModeChange.emit(this.mode);this.modeInitialized=true};e.prototype.componentWillUpdate=function(){if(this.prevMode!==this.mode){this.wmProgressMonitorModeChange.emit(this.mode)}this.prevMode=this.mode};e.prototype.parseToNum=function(e){var r=e.toString();var o=r.replace("px","");return parseInt(o)};e.prototype.render=function(){return h(Host,{class:this.mode==="doughnut"?"row":"column"},this.modeInitialized&&h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ProgressMonitor.style=wmProgressMonitorCss;var ProgressSlice=function(){function e(e){registerInstance(this,e);this.wmProgressSliceUpdated=createEvent(this,"wmProgressSliceUpdated",7)}e.prototype.componentDidUpdate=function(){this.wmProgressSliceUpdated.emit()};return e}();export{ProgressIndicator as wm_progress_indicator,ProgressMonitor as wm_progress_monitor,ProgressSlice as wm_progress_slice};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,s,i){function r(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,n){function o(e){try{l(i.next(e))}catch(e){n(e)}}function a(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?s(e.value):r(e.value).then(o,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var s={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,r,n,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(s)try{if(i=1,r&&(n=o[0]&2?r["return"]:o[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;if(r=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:s.label++;return{value:o[1],done:false};case 5:s.label++;r=o[1];o=[0];continue;case 7:o=s.ops.pop();s.trys.pop();continue;default:if(!(n=s.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){s=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(o[0]===6&&s.label<n[1]){s.label=n[1];n=o;break}if(n&&s.label<n[2]){s.label=n[2];s.ops.push(o);break}if(n[2])s.ops.pop();s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e];r=0}finally{i=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-7603f98e.js";import{i as intl}from"./functions-e552a8b5.js";var wmSearchCss=':host,wm-search{width:100%;font-size:0.875rem}:host *,wm-search *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wm-search-wrapper,wm-search .wm-search-wrapper{border-radius:3px;position:relative;border:1px solid rgba(35, 35, 35, 0.6);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .wm-search-wrapper .search-icon,wm-search .wm-search-wrapper .search-icon{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1.0625rem;position:absolute;left:0.4375rem}:host .wm-search-wrapper input,wm-search .wm-search-wrapper input{border:none;height:40px;padding:0 1.75rem;background:transparent;overflow:visible;width:100%;-ms-flex:1;flex:1;font-family:inherit}:host .wm-search-wrapper input:focus,wm-search .wm-search-wrapper input:focus{outline:none}:host .wm-search-wrapper.focus,wm-search .wm-search-wrapper.focus{-webkit-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;border-color:#20cbd4;border-radius:3px}:host .find,wm-search .find{min-height:3rem}:host .find input,wm-search .find input{padding:16px 8px 16px 28px}:host .find .wm-find-elements,wm-search .find .wm-find-elements{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding-right:16px}:host .find .wm-find-elements wm-button+wm-button,wm-search .find .wm-find-elements wm-button+wm-button{margin-left:0.25rem}:host .find .wm-find-elements .results,wm-search .find .wm-find-elements .results{margin-right:0.5rem;font-style:italic}:host .sr-only,wm-search .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .show-for-tabbers,wm-search .show-for-tabbers{all:unset;color:#575195;text-decoration:none;font-weight:500;font-size:0.875rem;margin:10px 0}:host .show-for-tabbers:hover,wm-search .show-for-tabbers:hover{background:-webkit-gradient(linear, left top, left bottom, from(#575195), to(#575195)) no-repeat;background:linear-gradient(#575195, #575195) no-repeat;background-size:100% 1px;background-position:0 1.2em;padding-bottom:0.2em}:host .show-for-tabbers:focus,wm-search .show-for-tabbers:focus{outline:none;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1.2em;padding-bottom:0.2em}';var Search=function(){function e(e){registerInstance(this,e);this.wmSearchBrowseResults=createEvent(this,"wmSearchBrowseResults",7);this.wmBrowseSearchResults=createEvent(this,"wmBrowseSearchResults",7);this.wmSearchValueChanged=createEvent(this,"wmSearchValueChanged",7);this.searchType="basic";this.disabled=false;this.placeholder="";this.label="";this.numResults=0;this.value="";this.isTabbing=false;this.highlightedId="";this.highlightedName=null;this.highlightedNum=0;this.previousBlurredValue="";this.resultsLiveRegion=null;this.wrapperEl=null;this.linkEl=null}e.prototype.toggleTabbingOn=function(){this.isTabbing=true;this.linkEl&&this.linkEl.classList.remove("sr-only");this.linkEl&&this.linkEl.classList.add("show-for-tabbers")};e.prototype.toggleTabbingOff=function(){this.isTabbing=false;this.linkEl&&this.linkEl.classList.add("sr-only");this.linkEl&&this.linkEl.classList.remove("show-for-tabbers")};e.prototype.componentWillLoad=function(){this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("#wm-search-input").focus();this.shadowRoot.querySelector("#wm-search-wrapper").classList.add("focus")}};if(this.placeholder===""){console.error("You must set the placeholder property for the wm-search component.")}if(this.label===""){console.error("You must set the label property for the wm-search component.")}this.hookToModal()};e.prototype.hookToModal=function(){var e=this;var t=this.el;while(!!t){if(t.tagName==="WM-MODAL"){this.parentModal=t}t=t.parentElement}if(this.parentModal){var s=["wmCloseTriggered","wmPrimaryTriggered","wmSecondaryTriggered"];s.map((function(t){e.parentModal.addEventListener(t,(function(){e.updateValue("")}))}))}};e.prototype.updateValue=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.value=e;this.resetHighlightCountToStart();return[2]}))}))};e.prototype.resetHighlightCountToStart=function(){if(this.searchType==="find"){if(this.numResults){this.highlightedNum=1}else{this.highlightedNum=0}}};e.prototype.componentDidRender=function(){this.announceChanges()};e.prototype.announceChanges=function(){var e=this;var t=this.getResultsMessage();if(this.searchType==="find"&&this.highlightedName){t+=", ".concat(this.highlightedName)}this.resultsLiveRegion&&(this.resultsLiveRegion.innerHTML="");window.requestAnimationFrame((function(){return e.resultsLiveRegion&&(e.resultsLiveRegion.innerHTML=t)}))};e.prototype.getResultsMessage=function(){if(this.value){if(this.searchType==="basic"){return intl.formatMessage({id:"search.resultsFound",defaultMessage:"{numResults, plural, =0 {No results} one {1 result} other {# results}} found"},{numResults:this.numResults})}else{return intl.formatMessage({id:"search.xOfYResults",defaultMessage:"{numResults, plural, =0 {No results found} other {{current} of {numResults} results}}"},{numResults:this.numResults,current:this.highlightedNum})}}else{return""}};e.prototype.changeHighlightedNum=function(e){if(this.numResults){if(e<1){this.highlightedNum=this.numResults}else if(e>this.numResults){this.highlightedNum=1}else{this.highlightedNum=e}this.wmSearchBrowseResults.emit({position:this.highlightedNum});this.wmBrowseSearchResults.emit({position:this.highlightedNum})}};e.prototype.addFocusStyle=function(){if(this.wrapperEl){this.wrapperEl.classList.add("focus")}};e.prototype.removeFocusStyle=function(){if(this.wrapperEl){this.wrapperEl.classList.remove("focus")}};e.prototype.handleBlur=function(){this.removeFocusStyle();if(this.previousBlurredValue!==this.value){this.wmSearchValueChanged.emit({value:this.value})}this.previousBlurredValue=this.value};e.prototype.renderResultsAndBrowseButtons=function(){var e=this;return h("div",{class:"wm-find-elements"},h("div",{id:"results-display",class:"results"},this.getResultsMessage()),h("div",{class:"wm-button-collection"},h("wm-button",{"button-type":"icononly",icon:"f05d",tooltip:intl.formatMessage({id:"global.previous",description:"button text",defaultMessage:"previous"}),"tooltip-position":"bottom",onClick:function(){return e.changeHighlightedNum(e.highlightedNum-1)},disabled:this.disabled||this.numResults<2,"label-for-identical-buttons":intl.formatMessage({id:"search.previousResult",defaultMessage:"Press to hear previous matching result"})}),h("wm-button",{"button-type":"icononly",icon:"f045",tooltip:intl.formatMessage({id:"global.next",description:"button text",defaultMessage:"next"}),"tooltip-position":"bottom",onClick:function(){return e.changeHighlightedNum(e.highlightedNum+1)},disabled:this.disabled||this.numResults<2,"label-for-identical-buttons":intl.formatMessage({id:"search.nextResult",defaultMessage:"Press to hear next matching result"})})))};e.prototype.renderJumpToLink=function(){var e=this;if(this.numResults&&this.highlightedId){return h("a",{ref:function(t){return e.linkEl=t},href:"#".concat(this.highlightedId),class:"sr-only"},intl.formatMessage({id:"search.jumpToResult",defaultMessage:"Jump to search result in list"}))}else{return null}};e.prototype.render=function(){var e=this;return h(Host,null,h("div",{id:"wm-search-wrapper",class:"wm-search-wrapper ".concat(this.searchType),ref:function(t){return e.wrapperEl=t}},h("input",{disabled:this.disabled,id:"wm-search-input",placeholder:this.placeholder,"aria-label":"".concat(this.label?this.label+". ":"").concat(intl.formatMessage({id:"search.typeToFilterResults",defaultMessage:"Type to filter the results"})),onInput:function(t){return e.updateValue(t.target.value)},onFocus:function(){return e.addFocusStyle()},onBlur:function(){return e.handleBlur()},"aria-autocomplete":"none",autocomplete:"off",value:this.value}),h("span",{class:"mdi search-icon"},String.fromCodePoint(parseInt("0xf349"))),this.searchType==="find"&&this.renderResultsAndBrowseButtons(),h("div",{id:"wm-search-live",class:"sr-only","aria-live":"polite","aria-atomic":"true",ref:function(t){return e.resultsLiveRegion=t}})),this.searchType==="find"&&this.renderJumpToLink())};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{numResults:["resetHighlightCountToStart"]}},enumerable:false,configurable:true});return e}();Search.style=wmSearchCss;export{Search as wm_search};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,s,i){function r(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(s,n){function o(e){try{l(i.next(e))}catch(e){n(e)}}function a(e){try{l(i["throw"](e))}catch(e){n(e)}}function l(e){e.done?s(e.value):r(e.value).then(o,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var s={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,r,n,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(i)throw new TypeError("Generator is already executing.");while(s)try{if(i=1,r&&(n=o[0]&2?r["return"]:o[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;if(r=0,n)o=[o[0]&2,n.value];switch(o[0]){case 0:case 1:n=o;break;case 4:s.label++;return{value:o[1],done:false};case 5:s.label++;r=o[1];o=[0];continue;case 7:o=s.ops.pop();s.trys.pop();continue;default:if(!(n=s.trys,n=n.length>0&&n[n.length-1])&&(o[0]===6||o[0]===2)){s=0;continue}if(o[0]===3&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(o[0]===6&&s.label<n[1]){s.label=n[1];n=o;break}if(n&&s.label<n[2]){s.label=n[2];s.ops.push(o);break}if(n[2])s.ops.pop();s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e];r=0}finally{i=n=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-d649a861.js";import{i as intl}from"./functions-117d1a51.js";var wmSearchCss=':host,wm-search{width:100%;font-size:0.875rem}:host *,wm-search *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wm-search-wrapper,wm-search .wm-search-wrapper{border-radius:3px;position:relative;border:1px solid rgba(35, 35, 35, 0.6);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .wm-search-wrapper .search-icon,wm-search .wm-search-wrapper .search-icon{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1.0625rem;position:absolute;left:0.4375rem}:host .wm-search-wrapper input,wm-search .wm-search-wrapper input{border:none;height:40px;padding:0 1.75rem;background:transparent;overflow:visible;width:100%;-ms-flex:1;flex:1;font-family:inherit}:host .wm-search-wrapper input:focus,wm-search .wm-search-wrapper input:focus{outline:none}:host .wm-search-wrapper.focus,wm-search .wm-search-wrapper.focus{-webkit-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;border-color:#20cbd4;border-radius:3px}:host .find,wm-search .find{min-height:3rem}:host .find input,wm-search .find input{padding:16px 8px 16px 28px}:host .find .wm-find-elements,wm-search .find .wm-find-elements{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding-right:16px}:host .find .wm-find-elements wm-button+wm-button,wm-search .find .wm-find-elements wm-button+wm-button{margin-left:0.25rem}:host .find .wm-find-elements .results,wm-search .find .wm-find-elements .results{margin-right:0.5rem;font-style:italic}:host .sr-only,wm-search .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .show-for-tabbers,wm-search .show-for-tabbers{all:unset;color:#575195;text-decoration:none;font-weight:500;font-size:0.875rem;margin:10px 0}:host .show-for-tabbers:hover,wm-search .show-for-tabbers:hover{background:-webkit-gradient(linear, left top, left bottom, from(#575195), to(#575195)) no-repeat;background:linear-gradient(#575195, #575195) no-repeat;background-size:100% 1px;background-position:0 1.2em;padding-bottom:0.2em}:host .show-for-tabbers:focus,wm-search .show-for-tabbers:focus{outline:none;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1.2em;padding-bottom:0.2em}';var Search=function(){function e(e){registerInstance(this,e);this.wmSearchBrowseResults=createEvent(this,"wmSearchBrowseResults",7);this.wmBrowseSearchResults=createEvent(this,"wmBrowseSearchResults",7);this.wmSearchValueChanged=createEvent(this,"wmSearchValueChanged",7);this.searchType="basic";this.disabled=false;this.placeholder="";this.label="";this.numResults=0;this.value="";this.isTabbing=false;this.highlightedId="";this.highlightedName=null;this.highlightedNum=0;this.previousBlurredValue="";this.resultsLiveRegion=null;this.wrapperEl=null;this.linkEl=null}e.prototype.toggleTabbingOn=function(){this.isTabbing=true;this.linkEl&&this.linkEl.classList.remove("sr-only");this.linkEl&&this.linkEl.classList.add("show-for-tabbers")};e.prototype.toggleTabbingOff=function(){this.isTabbing=false;this.linkEl&&this.linkEl.classList.add("sr-only");this.linkEl&&this.linkEl.classList.remove("show-for-tabbers")};e.prototype.componentWillLoad=function(){this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("#wm-search-input").focus();this.shadowRoot.querySelector("#wm-search-wrapper").classList.add("focus")}};if(this.placeholder===""){console.error("You must set the placeholder property for the wm-search component.")}if(this.label===""){console.error("You must set the label property for the wm-search component.")}this.hookToModal()};e.prototype.hookToModal=function(){var e=this;var t=this.el;while(!!t){if(t.tagName==="WM-MODAL"){this.parentModal=t}t=t.parentElement}if(this.parentModal){var s=["wmCloseTriggered","wmPrimaryTriggered","wmSecondaryTriggered"];s.map((function(t){e.parentModal.addEventListener(t,(function(){e.updateValue("")}))}))}};e.prototype.updateValue=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.value=e;this.resetHighlightCountToStart();return[2]}))}))};e.prototype.resetHighlightCountToStart=function(){if(this.searchType==="find"){if(this.numResults){this.highlightedNum=1}else{this.highlightedNum=0}}};e.prototype.componentDidRender=function(){this.announceChanges()};e.prototype.announceChanges=function(){var e=this;var t=this.getResultsMessage();if(this.searchType==="find"&&this.highlightedName){t+=", "+this.highlightedName}this.resultsLiveRegion&&(this.resultsLiveRegion.innerHTML="");window.requestAnimationFrame((function(){return e.resultsLiveRegion&&(e.resultsLiveRegion.innerHTML=t)}))};e.prototype.getResultsMessage=function(){if(this.value){if(this.searchType==="basic"){return intl.formatMessage({id:"search.resultsFound",defaultMessage:"{numResults, plural, =0 {No results} one {1 result} other {# results}} found"},{numResults:this.numResults})}else{return intl.formatMessage({id:"search.xOfYResults",defaultMessage:"{numResults, plural, =0 {No results found} other {{current} of {numResults} results}}"},{numResults:this.numResults,current:this.highlightedNum})}}else{return""}};e.prototype.changeHighlightedNum=function(e){if(this.numResults){if(e<1){this.highlightedNum=this.numResults}else if(e>this.numResults){this.highlightedNum=1}else{this.highlightedNum=e}this.wmSearchBrowseResults.emit({position:this.highlightedNum});this.wmBrowseSearchResults.emit({position:this.highlightedNum})}};e.prototype.addFocusStyle=function(){if(this.wrapperEl){this.wrapperEl.classList.add("focus")}};e.prototype.removeFocusStyle=function(){if(this.wrapperEl){this.wrapperEl.classList.remove("focus")}};e.prototype.handleBlur=function(){this.removeFocusStyle();if(this.previousBlurredValue!==this.value){this.wmSearchValueChanged.emit({value:this.value})}this.previousBlurredValue=this.value};e.prototype.renderResultsAndBrowseButtons=function(){var e=this;return h("div",{class:"wm-find-elements"},h("div",{id:"results-display",class:"results"},this.getResultsMessage()),h("div",{class:"wm-button-collection"},h("wm-button",{"button-type":"icononly",icon:"f05d",tooltip:intl.formatMessage({id:"global.previous",description:"button text",defaultMessage:"previous"}),"tooltip-position":"bottom",onClick:function(){return e.changeHighlightedNum(e.highlightedNum-1)},disabled:this.disabled||this.numResults<2,"label-for-identical-buttons":intl.formatMessage({id:"search.previousResult",defaultMessage:"Press to hear previous matching result"})}),h("wm-button",{"button-type":"icononly",icon:"f045",tooltip:intl.formatMessage({id:"global.next",description:"button text",defaultMessage:"next"}),"tooltip-position":"bottom",onClick:function(){return e.changeHighlightedNum(e.highlightedNum+1)},disabled:this.disabled||this.numResults<2,"label-for-identical-buttons":intl.formatMessage({id:"search.nextResult",defaultMessage:"Press to hear next matching result"})})))};e.prototype.renderJumpToLink=function(){var e=this;if(this.numResults&&this.highlightedId){return h("a",{ref:function(t){return e.linkEl=t},href:"#"+this.highlightedId,class:"sr-only"},intl.formatMessage({id:"search.jumpToResult",defaultMessage:"Jump to search result in list"}))}else{return null}};e.prototype.render=function(){var e=this;return h(Host,null,h("div",{id:"wm-search-wrapper",class:"wm-search-wrapper "+this.searchType,ref:function(t){return e.wrapperEl=t}},h("input",{disabled:this.disabled,id:"wm-search-input",placeholder:this.placeholder,"aria-label":""+(this.label?this.label+". ":"")+intl.formatMessage({id:"search.typeToFilterResults",defaultMessage:"Type to filter the results"}),onInput:function(t){return e.updateValue(t.target.value)},onFocus:function(){return e.addFocusStyle()},onBlur:function(){return e.handleBlur()},"aria-autocomplete":"none",autocomplete:"off",value:this.value}),h("span",{class:"mdi search-icon"},String.fromCodePoint(parseInt("0xf349"))),this.searchType==="find"&&this.renderResultsAndBrowseButtons(),h("div",{id:"wm-search-live",class:"sr-only","aria-live":"polite","aria-atomic":"true",ref:function(t){return e.resultsLiveRegion=t}})),this.searchType==="find"&&this.renderJumpToLink())};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{numResults:["resetHighlightCountToStart"]}},enumerable:false,configurable:true});return e}();Search.style=wmSearchCss;export{Search as wm_search};
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(a,n,s){if(s||arguments.length===2)for(var r=0,t=n.length,i;r<t;r++){if(i||!(r in n)){if(!i)i=Array.prototype.slice.call(n,0,r);i[r]=n[r]}}return a.concat(i||Array.prototype.slice.call(n))};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-7603f98e.js";import{i as intl,g as generateId}from"./functions-e552a8b5.js";var wmSnackbarCss='.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;outline:none}:host *,wm-snackbar *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:unset}:host .wm-snackbars,wm-snackbar .wm-snackbars{position:fixed;bottom:0;left:1.25rem;right:1.25rem;padding:0.25rem 0.625rem 1.875rem;z-index:2001;max-width:35.5rem;max-height:17.5rem;-webkit-overflow-scrolling:touch;overflow:auto}:host .wm-snackbars.empty,wm-snackbar .wm-snackbars.empty{-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);padding-top:0;padding-bottom:0}:host .wm-snackbars .wm-snack-wrapper,wm-snackbar .wm-snackbars .wm-snack-wrapper{width:100%;height:100%}:host .wm-snackbars .wm-snack-wrapper:not(:last-child),wm-snackbar .wm-snackbars .wm-snack-wrapper:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar{-webkit-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);font-size:0.875rem;color:#fff;padding:0.9375rem 1.875rem;background:#4a4a4a;opacity:0;left:0;position:relative;font-family:inherit}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link{letter-spacing:0;text-transform:none;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1;color:#85dadf;margin:0 3.125rem 0 0.625rem;text-decoration:none;font-weight:600;cursor:pointer}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::after,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline;content:"\\f137";margin-left:0.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover{text-decoration:underline}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus{outline:none;border:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child),wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button),wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button){opacity:1}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;padding:0}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext{width:100%}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;background-color:#3b3b3b;color:#ffffff;cursor:pointer;border:none;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{min-width:1.875rem;min-height:1.875rem}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f156"}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover{background-color:#fff;color:#4a4a4a}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus{outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack>.tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);font-size:0.875rem;text-transform:none;font-weight:normal;background:black;color:#fff;padding:0;line-height:normal;z-index:30}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip{top:2.0625rem;left:auto}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .sr-only,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}:host .sr-only,wm-snackbar .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{top:2.0625rem;left:auto}}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .link:focus:not(:active){outline:none;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #85dadf), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #85dadf 66%, transparent 0) repeat-x;background-size:0.375rem 0.1875rem;background-position:0 1em;border-radius:0;line-height:normal}';var Snackbar=function(){function a(a){registerInstance(this,a);this.wmSnackbarSnackFinished=createEvent(this,"wmSnackbarSnackFinished",7);this.userFinishedSnack=createEvent(this,"userFinishedSnack",7);this.wmSnackbarActionTriggered=createEvent(this,"wmSnackbarActionTriggered",7);this.userTriggeredAction=createEvent(this,"userTriggeredAction",7);this.notifications="[]";this.parsedNotifications=[];this.isTabbing=false;this.timers=[];this.newNotification=false;this.newWindowMessage=intl.formatMessage({id:"global.newWindowLink",defaultMessage:"Opens in a new window."})}a.prototype.updateSnacks=function(a){var n=this;var s=JSON.parse(a);var r=s.length;var t=this.parsedNotifications.length;this.parsedNotifications=[];for(var i=0;i<r;i++){var e={id:s[i].id.toString(),message:s[i].message.toString(),link:s[i].link.toString(),newWindow:!!s[i].newWindow};this.parsedNotifications=__spreadArray(__spreadArray([],this.parsedNotifications,true),[e],false)}if(t<this.parsedNotifications.length){var o=window.setTimeout((function(){return n.snackExpired()}),2e4);this.timers=__spreadArray([o],this.timers,true);this.storeElToFocusOnDismiss();this.newNotification=true}else{this.newNotification=false}};a.prototype.componentWillLoad=function(){this.uid=this.el.id?this.el.id:generateId()};a.prototype.componentDidUpdate=function(){this.isTabbing&&this.newNotification&&this.focusLinkAndDisableTimer();this.newNotification=false};a.prototype.checkForTabbing=function(a){if(a.key==="Tab"){this.toggleTabbingOn()}};a.prototype.handleMouse=function(){this.toggleTabbingOff()};a.prototype.focusLinkAndDisableTimer=function(){var a=this.parsedNotifications[0];if(a.link){var n=this.el.shadowRoot.querySelector("#action-".concat(a.id));n.focus();this.stopTimer(a)}};a.prototype.toggleTabbingOn=function(){this.isTabbing=true;this.snackbarEl&&this.snackbarEl.classList.add("user-is-tabbing")};a.prototype.toggleTabbingOff=function(){this.isTabbing=false;this.snackbarEl&&this.snackbarEl.classList.remove("user-is-tabbing")};a.prototype.storeElToFocusOnDismiss=function(){var a=document.activeElement;while(a&&a.shadowRoot){a=a.shadowRoot.activeElement}this.focusOnDismiss=a};a.prototype.snackDismissed=function(a){this.endSnack(a);a.link&&this.isTabbing&&this.focusOnDismiss.focus()};a.prototype.snackExpired=function(){var a=this.parsedNotifications[this.parsedNotifications.length-1];this.endSnack(a)};a.prototype.endSnack=function(a){this.stopTimer(a);this.wmSnackbarSnackFinished.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow});this.userFinishedSnack.emit({id:a.id,message:a.message,link:a.link})};a.prototype.snackLinkClicked=function(a){this.stopTimer(a);this.wmSnackbarActionTriggered.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow});this.userTriggeredAction.emit({id:a.id,message:a.message,link:a.link})};a.prototype.stopTimer=function(a){var n=this;this.parsedNotifications.forEach((function(s,r){if(s.id===a.id){clearTimeout(n.timers[r]);n.timers=n.timers.filter((function(a,n){if(n!==r){return a}}))}}))};a.prototype.renderSnackbars=function(){var a=this;return this.parsedNotifications.map((function(n){return h("div",{class:"wm-snack-wrapper"},h("div",{id:"snack-".concat(a.uid),class:"wm-snackbar active neutral"},h("div",{class:"sr-only",tabindex:n.link?0:-1,onFocus:function(){return n.link&&a.snackDismissed(n)}}),h("div",{class:"wm-snackbarmsg"},h("div",{class:"msgtext"},h("span",null,n.message),n.link&&h("a",{id:"action-".concat(n.id),class:"link ".concat(n.newWindow?"new-window":""),"aria-label":"Click to ".concat(n.link,"...").concat(n.newWindow?" "+a.newWindowMessage:""),tabindex:0,onClick:function(){a.snackLinkClicked(n)},onKeyDown:function(s){return s.key==="Enter"&&a.snackLinkClicked(n)}},h("span",{"aria-hidden":"true"},n.link))),h("button",{id:"close-button-".concat(n.id),"aria-label":"Close this notification",class:"closesnack",tabindex:n.link?0:-1,onClick:function(){return a.snackDismissed(n)}},h("span",{class:"tooltip","aria-hidden":"true"},"Close"))),h("div",{class:"sr-only",tabindex:n.link?0:-1,onFocus:function(){return n.link&&a.snackDismissed(n)}})))}))};a.prototype.renderLiveRegion=function(){var a=this.parsedNotifications[0];var n=this.isTabbing?"":a.link;var s="".concat(a.message," ").concat(n);var r=this.el.shadowRoot.querySelector("#wm-live-region-".concat(this.uid));if(r){r.innerHTML="";var t=document.createElement("span");t.innerHTML=s;r.appendChild(t)}};a.prototype.render=function(){var a=this;this.newNotification&&this.renderLiveRegion();var n=this.renderSnackbars();var s=this.parsedNotifications.length===0?"empty":"";return h("div",{ref:function(n){return a.snackbarEl=n},class:"wm-snackbars ".concat(s)},h("div",{class:"sr-only","aria-live":"polite","aria-atomic":"false",id:"wm-live-region-".concat(this.uid)}),n)};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{notifications:["updateSnacks"]}},enumerable:false,configurable:true});return a}();Snackbar.style=wmSnackbarCss;export{Snackbar as wm_snackbar};
1
+ var __spreadArray=this&&this.__spreadArray||function(a,s){for(var n=0,r=s.length,i=a.length;n<r;n++,i++)a[i]=s[n];return a};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-d649a861.js";import{i as intl,g as generateId}from"./functions-117d1a51.js";var wmSnackbarCss='@charset "UTF-8";.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;outline:none}:host *,wm-snackbar *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:unset}:host .wm-snackbars,wm-snackbar .wm-snackbars{position:fixed;bottom:0;left:1.25rem;right:1.25rem;padding:0.25rem 0.625rem 1.875rem;z-index:2001;max-width:35.5rem;max-height:17.5rem;-webkit-overflow-scrolling:touch;overflow:auto}:host .wm-snackbars.empty,wm-snackbar .wm-snackbars.empty{-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);padding-top:0;padding-bottom:0}:host .wm-snackbars .wm-snack-wrapper,wm-snackbar .wm-snackbars .wm-snack-wrapper{width:100%;height:100%}:host .wm-snackbars .wm-snack-wrapper:not(:last-child),wm-snackbar .wm-snackbars .wm-snack-wrapper:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar{-webkit-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);font-size:0.875rem;color:#fff;padding:0.9375rem 1.875rem;background:#4a4a4a;opacity:0;left:0;position:relative;font-family:inherit}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link{letter-spacing:0;text-transform:none;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1;color:#85dadf;margin:0 3.125rem 0 0.625rem;text-decoration:none;font-weight:600;cursor:pointer}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::after,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline;content:"";margin-left:0.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover{text-decoration:underline}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus{outline:none;border:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child),wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button),wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button){opacity:1}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;padding:0}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext{width:100%}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;background-color:#3b3b3b;color:#ffffff;cursor:pointer;border:none;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{min-width:1.875rem;min-height:1.875rem}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:""}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover{background-color:#fff;color:#4a4a4a}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus{outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack>.tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);font-size:0.875rem;text-transform:none;font-weight:normal;background:black;color:#fff;padding:0;line-height:normal;z-index:30}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip{top:2.0625rem;left:auto}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .sr-only,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}:host .sr-only,wm-snackbar .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{top:2.0625rem;left:auto}}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .link:focus:not(:active){outline:none;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #85dadf), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #85dadf 66%, transparent 0) repeat-x;background-size:0.375rem 0.1875rem;background-position:0 1em;border-radius:0;line-height:normal}';var Snackbar=function(){function a(a){registerInstance(this,a);this.wmSnackbarSnackFinished=createEvent(this,"wmSnackbarSnackFinished",7);this.userFinishedSnack=createEvent(this,"userFinishedSnack",7);this.wmSnackbarActionTriggered=createEvent(this,"wmSnackbarActionTriggered",7);this.userTriggeredAction=createEvent(this,"userTriggeredAction",7);this.notifications="[]";this.parsedNotifications=[];this.isTabbing=false;this.timers=[];this.newNotification=false;this.newWindowMessage=intl.formatMessage({id:"global.newWindowLink",defaultMessage:"Opens in a new window."})}a.prototype.updateSnacks=function(a){var s=this;var n=JSON.parse(a);var r=n.length;var i=this.parsedNotifications.length;this.parsedNotifications=[];for(var e=0;e<r;e++){var t={id:n[e].id.toString(),message:n[e].message.toString(),link:n[e].link.toString(),newWindow:!!n[e].newWindow};this.parsedNotifications=__spreadArray(__spreadArray([],this.parsedNotifications),[t])}if(i<this.parsedNotifications.length){var o=window.setTimeout((function(){return s.snackExpired()}),2e4);this.timers=__spreadArray([o],this.timers);this.storeElToFocusOnDismiss();this.newNotification=true}else{this.newNotification=false}};a.prototype.componentWillLoad=function(){this.uid=this.el.id?this.el.id:generateId()};a.prototype.componentDidUpdate=function(){this.isTabbing&&this.newNotification&&this.focusLinkAndDisableTimer();this.newNotification=false};a.prototype.checkForTabbing=function(a){if(a.key==="Tab"){this.toggleTabbingOn()}};a.prototype.handleMouse=function(){this.toggleTabbingOff()};a.prototype.focusLinkAndDisableTimer=function(){var a=this.parsedNotifications[0];if(a.link){var s=this.el.shadowRoot.querySelector("#action-"+a.id);s.focus();this.stopTimer(a)}};a.prototype.toggleTabbingOn=function(){this.isTabbing=true;this.snackbarEl&&this.snackbarEl.classList.add("user-is-tabbing")};a.prototype.toggleTabbingOff=function(){this.isTabbing=false;this.snackbarEl&&this.snackbarEl.classList.remove("user-is-tabbing")};a.prototype.storeElToFocusOnDismiss=function(){var a=document.activeElement;while(a&&a.shadowRoot){a=a.shadowRoot.activeElement}this.focusOnDismiss=a};a.prototype.snackDismissed=function(a){this.endSnack(a);a.link&&this.isTabbing&&this.focusOnDismiss.focus()};a.prototype.snackExpired=function(){var a=this.parsedNotifications[this.parsedNotifications.length-1];this.endSnack(a)};a.prototype.endSnack=function(a){this.stopTimer(a);this.wmSnackbarSnackFinished.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow});this.userFinishedSnack.emit({id:a.id,message:a.message,link:a.link})};a.prototype.snackLinkClicked=function(a){this.stopTimer(a);this.wmSnackbarActionTriggered.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow});this.userTriggeredAction.emit({id:a.id,message:a.message,link:a.link})};a.prototype.stopTimer=function(a){var s=this;this.parsedNotifications.forEach((function(n,r){if(n.id===a.id){clearTimeout(s.timers[r]);s.timers=s.timers.filter((function(a,s){if(s!==r){return a}}))}}))};a.prototype.renderSnackbars=function(){var a=this;return this.parsedNotifications.map((function(s){return h("div",{class:"wm-snack-wrapper"},h("div",{id:"snack-"+a.uid,class:"wm-snackbar active neutral"},h("div",{class:"sr-only",tabindex:s.link?0:-1,onFocus:function(){return s.link&&a.snackDismissed(s)}}),h("div",{class:"wm-snackbarmsg"},h("div",{class:"msgtext"},h("span",null,s.message),s.link&&h("a",{id:"action-"+s.id,class:"link "+(s.newWindow?"new-window":""),"aria-label":"Click to "+s.link+"..."+(s.newWindow?" "+a.newWindowMessage:""),tabindex:0,onClick:function(){a.snackLinkClicked(s)},onKeyDown:function(n){return n.key==="Enter"&&a.snackLinkClicked(s)}},h("span",{"aria-hidden":"true"},s.link))),h("button",{id:"close-button-"+s.id,"aria-label":"Close this notification",class:"closesnack",tabindex:s.link?0:-1,onClick:function(){return a.snackDismissed(s)}},h("span",{class:"tooltip","aria-hidden":"true"},"Close"))),h("div",{class:"sr-only",tabindex:s.link?0:-1,onFocus:function(){return s.link&&a.snackDismissed(s)}})))}))};a.prototype.renderLiveRegion=function(){var a=this.parsedNotifications[0];var s=this.isTabbing?"":a.link;var n=a.message+" "+s;var r=this.el.shadowRoot.querySelector("#wm-live-region-"+this.uid);if(r){r.innerHTML="";var i=document.createElement("span");i.innerHTML=n;r.appendChild(i)}};a.prototype.render=function(){var a=this;this.newNotification&&this.renderLiveRegion();var s=this.renderSnackbars();var n=this.parsedNotifications.length===0?"empty":"";return h("div",{ref:function(s){return a.snackbarEl=s},class:"wm-snackbars "+n},h("div",{class:"sr-only","aria-live":"polite","aria-atomic":"false",id:"wm-live-region-"+this.uid}),s)};Object.defineProperty(a.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{notifications:["updateSnacks"]}},enumerable:false,configurable:true});return a}();Snackbar.style=wmSnackbarCss;export{Snackbar as wm_snackbar};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-7603f98e.js";import{d as debounce,g as generateId}from"./functions-e552a8b5.js";var wmTabItemCss=":host{font-family:inherit;display:inline-block}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .tab-item{list-style-type:none;height:100%;display:inline-block}:host .tab-item .tab{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;border-radius:0;color:#575195;text-decoration:none;letter-spacing:0.7px;font-size:0.875rem;font-weight:500;opacity:1;position:relative;text-transform:uppercase;display:inline-block;height:3.3333333333em;line-height:3.3333333333em;padding-right:1.5rem;padding-left:1.5rem}:host .tab-item .tab[aria-selected=true]{font-weight:700;opacity:1;background:-webkit-gradient(linear, left top, left bottom, from(currentColor), to(currentColor)) bottom/0 0 no-repeat;background:linear-gradient(currentColor, currentColor) bottom/0 0 no-repeat;background-size:calc(100% - 50px) 3px}:host .tab-item .tab[aria-selected=true].dark{color:#fff}:host .tab-item .tab,:host .tab-item .tab:hover,:host .tab-item .tab:active{outline:none}:host .tab-item .tab:focus{outline:none}:host .tab-item .tab.dark:not([aria-selected=true]){opacity:0.8;color:#fff}:host .tab-item .tab.user-is-tabbing:focus:not(:active){outline:none;-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .tab-item .tab.user-is-tabbing:focus:not(:active)::-moz-focus-inner{border:0}:host.hide{display:none}";var TabItem=function(){function t(t){var e=this;registerInstance(this,t);this.wmTabSelected=createEvent(this,"wmTabSelected",7);this.tabSelected=createEvent(this,"tabSelected",7);this.keydownOnTabItem=createEvent(this,"keydownOnTabItem",7);this.tabItemLoaded=createEvent(this,"tabItemLoaded",7);this.selected=false;this.show=true;this.tabId="";this.tabClicked=function(t){t.preventDefault();e.wmTabSelected.emit({tabId:e.tabId});e.tabSelected.emit({tabId:e.tabId})};this.tabPressed=function(t){var i=t.key;if(i==="Enter"||i===" "){t.preventDefault();e.wmTabSelected.emit({tabId:e.tabId});e.tabSelected.emit({tabId:e.tabId})}else if(i.includes("Arrow")){t.preventDefault();e.keydownOnTabItem.emit({tabItem:e.el,key:t.key})}}}Object.defineProperty(t.prototype,"parentTabList",{get:function(){return this.el.parentElement},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.linkEl&&this.linkEl.classList.add("user-is-tabbing")};t.prototype.toggleTabbingOff=function(){this.linkEl&&this.linkEl.classList.remove("user-is-tabbing")};t.prototype.componentWillLoad=function(){this.el.focus=function(){var t=this.shadowRoot.querySelector("a");t&&t.focus()}};t.prototype.componentDidLoad=function(){this.tabItemLoaded.emit()};t.prototype.render=function(){var t=this;var e=this.show?"":"hide ";e+=this.parentTabList&&this.parentTabList.customBackground=="dark"?"dark":"";var i={};var n=this.parentTabList&&this.parentTabList.customPadding;if(n){var a=parseInt(n,10)*2||0;var r=n.split(/([0-9]+)/).pop();i={"padding-left":this.parentTabList.customPadding,"padding-right":this.parentTabList.customPadding,"background-size":"calc(100% - ".concat(a).concat(r,") 3px")}}return h(Host,{role:"presentation"},h("li",{class:"tab-item",role:"presentation"},h("a",{class:"tab ".concat(e),style:i,role:"tab",ref:function(e){return t.linkEl=e},onClick:this.tabClicked,id:"tab-link-".concat(this.tabId),onKeyDown:function(e){return t.tabPressed(e)},"aria-selected":this.selected?"true":"false",tabindex:this.selected?0:-1},h("slot",null))))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();TabItem.style=wmTabItemCss;var wmTabListCss=":host,wm-tab-list{position:relative;white-space:nowrap;height:100%;display:block}:host *,wm-tab-list *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .tabcontainer,wm-tab-list .tabcontainer{margin:0;margin-left:-24px;width:100%;height:4.0625rem;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0}:host .tabcontainer.dark,wm-tab-list .tabcontainer.dark{background:#353b48;margin:0}:host wm-select,wm-tab-list wm-select{padding:0.375rem 0}";var TabList=function(){function t(t){var e=this;registerInstance(this,t);this.wmTabSelected=createEvent(this,"wmTabSelected",7);this.tabSelected=createEvent(this,"tabSelected",7);this.controllerEnabled=false;this.getSelectedTabItem=function(){return e.tabItems.filter((function(t){return t.selected}))[0]};this.debouncedSetLayout=debounce((function(){if(!e.listWidth){e.setListWidth()}forceUpdate(e.el)}),250)}Object.defineProperty(t.prototype,"menuLayout",{get:function(){if(this.listWidth){return this.el.offsetWidth<this.listWidth-24}else{return false}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tabItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-tab-item"))},enumerable:false,configurable:true});t.prototype.getLinkEl=function(t){return t.shadowRoot.querySelector("a")};Object.defineProperty(t.prototype,"panels",{get:function(){var t=Array.from(document.querySelectorAll("wm-tab-panel"));var e=this.tabItems.map((function(t){return t.tabId}));return t.filter((function(t){return e.includes(t.tabId)}))},enumerable:false,configurable:true});t.prototype.getPanel=function(t){return this.panels.find((function(e){return e.tabId===t}))};t.prototype.setListWidth=function(){var t=this.tabItems.reduce((function(t,e){return t+e.offsetWidth}),0);this.listWidth=t&&t>0?t:this.listWidth};t.prototype.setSelected=function(t){this.tabItems.map((function(e){return e.selected=e.tabId===t}));var e=this.panels.length===1&&this.tabItems.length>1;if(e){var i=this.getSelectedTabItem();this.setAttributesOnPanel(this.panels[0],i);this.panels[0].active=true}else{this.panels.map((function(e){return e.active=e.tabId===t}))}};t.prototype.showItems=function(){this.tabItems.map((function(t){return t.show=true}))};t.prototype.hideItems=function(){this.tabItems.map((function(t){return t.show=false}))};t.prototype.componentWillLoad=function(){this.el.focus=function(){var t=Array.from(this.querySelectorAll("wm-tab-item"));var e=t.filter((function(t){return t.selected}))[0];e&&e.focus()}};t.prototype.componentDidLoad=function(){this.setLayout();var t=this.selectedTab||this.tabItems[0].tabId;this.setSelected(t)};t.prototype.tabItemLoaded=function(t){this.setAriaOnPanelAndTab(t.target)};t.prototype.setAriaOnPanelAndTab=function(t){var e=this.getPanel(t.tabId);if(!e){if(this.panels.length===1){this.setAttributesOnTab(t,this.panels[0])}}else{this.setAttributesOnPanel(e,t);this.setAttributesOnTab(t,e)}};t.prototype.setAttributesOnTab=function(t,e){var i=this.getLinkEl(t);if(i){i.setAttribute("aria-controls",e.id);i.setAttribute("href","#".concat(e.id))}};t.prototype.removeAttributesOnTab=function(t){var e=this.getLinkEl(t);if(e){e.removeAttribute("aria-controls");e.removeAttribute("href")}};t.prototype.setAttributesOnPanel=function(t,e){var i=this.getLinkEl(e);if(i){t.setAttribute("aria-labelledby",i.id);t.setAttribute("tab-id",e.tabId)}};t.prototype.handleTabSelected=function(t){if(this.controllerEnabled){this.setSelected(t.detail.tabId)}};t.prototype.handleKeydown=function(t){var e=t.detail.key;var i=this.tabItems.indexOf(t.detail.tabItem);if(e==="ArrowLeft"||e==="ArrowRight"){this.handleLeftRightArrow(i,e)}if(e==="ArrowDown"||e==="ArrowUp"){this.handleUpDownArrow(e)}};t.prototype.handleLeftRightArrow=function(t,e){if(e){t=e==="ArrowLeft"?t-1:t+1}if(t<0){t=this.tabItems.length-1}else if(t===this.tabItems.length){t=0}var i=this.tabItems[t];this.getLinkEl(i).focus()};t.prototype.handleUpDownArrow=function(t){if(t==="ArrowDown"){if(this.selectedTab){var e=this.getPanel(this.selectedTab);if(e){e.focus()}}}};t.prototype.setLayout=function(){this.debouncedSetLayout()};t.prototype.renderMenuOrTabs=function(){if(this.menuLayout){this.hideItems();return h("wm-select",{label:"Tab Selection","label-position":"none"},this.renderOptions())}else{this.showItems();var t={};if(this.customPadding){t={"margin-left":"-"+this.customPadding}}return h("ul",{class:"tabcontainer ".concat(this.customBackground||""),style:t,role:"tablist"},h("slot",null))}};t.prototype.renderOptions=function(){var t=this;return this.tabItems.map((function(e){return h("wm-option",{id:"tab-link-".concat(e.tabId),selected:e.tabId===t.selectedTab,onClick:function(i){i.preventDefault();t.wmTabSelected.emit({tabId:e.tabId});t.tabSelected.emit({tabId:e.tabId})}},e.textContent)}))};t.prototype.render=function(){return h(Host,{class:this.menuLayout?"menu":""},this.renderMenuOrTabs())};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{selectedTab:["setSelected"]}},enumerable:false,configurable:true});return t}();TabList.style=wmTabListCss;var wmTabPanelCss="wm-tab-panel{visibility:inherit}wm-tab-panel.tab-hidden{display:none}wm-tab-panel:active{outline:none}wm-tab-panel:focus{outline:none}wm-tab-panel.user-is-tabbing:focus{outline:-webkit-focus-ring-color auto 5px}";var TabPanel=function(){function t(t){registerInstance(this,t);this.tabPanelLoaded=createEvent(this,"tabPanelLoaded",7);this.active=false;this.tabId=""}t.prototype.componentWillLoad=function(){!this.el.id&&this.el.setAttribute("id",generateId())};t.prototype.componentDidLoad=function(){this.tabPanelLoaded.emit({tabId:this.tabId})};t.prototype.toggleTabbingOn=function(){this.el.classList.add("user-is-tabbing")};t.prototype.toggleTabbingOff=function(){this.el.classList.remove("user-is-tabbing")};t.prototype.render=function(){var t=this;return h(Host,{role:"tabpanel","aria-hidden":this.active?"false":"true",class:{"tab-hidden":!this.active},onBlur:function(){return t.el.tabIndex=-1},tabIndex:-1})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();TabPanel.style=wmTabPanelCss;export{TabItem as wm_tab_item,TabList as wm_tab_list,TabPanel as wm_tab_panel};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-d649a861.js";import{d as debounce,g as generateId}from"./functions-117d1a51.js";var wmTabItemCss=":host{font-family:inherit;display:inline-block}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .tab-item{list-style-type:none;height:100%;display:inline-block}:host .tab-item .tab{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;border-radius:0;color:#575195;text-decoration:none;letter-spacing:0.7px;font-size:0.875rem;font-weight:500;opacity:1;position:relative;text-transform:uppercase;display:inline-block;height:calc(40 / 12 * 1em);line-height:calc(40 / 12 * 1em);padding-right:1.5rem;padding-left:1.5rem}:host .tab-item .tab[aria-selected=true]{font-weight:700;opacity:1;background:-webkit-gradient(linear, left top, left bottom, from(currentColor), to(currentColor)) bottom/0 0 no-repeat;background:linear-gradient(currentColor, currentColor) bottom/0 0 no-repeat;background-size:calc(100% - 50px) 3px}:host .tab-item .tab[aria-selected=true].dark{color:#fff}:host .tab-item .tab,:host .tab-item .tab:hover,:host .tab-item .tab:active{outline:none}:host .tab-item .tab:focus{outline:none}:host .tab-item .tab.dark:not([aria-selected=true]){opacity:0.8;color:#fff}:host .tab-item .tab.user-is-tabbing:focus:not(:active){outline:none;-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .tab-item .tab.user-is-tabbing:focus:not(:active)::-moz-focus-inner{border:0}:host.hide{display:none}";var TabItem=function(){function t(t){var e=this;registerInstance(this,t);this.wmTabSelected=createEvent(this,"wmTabSelected",7);this.tabSelected=createEvent(this,"tabSelected",7);this.keydownOnTabItem=createEvent(this,"keydownOnTabItem",7);this.tabItemLoaded=createEvent(this,"tabItemLoaded",7);this.selected=false;this.show=true;this.tabId="";this.tabClicked=function(t){t.preventDefault();e.wmTabSelected.emit({tabId:e.tabId});e.tabSelected.emit({tabId:e.tabId})};this.tabPressed=function(t){var i=t.key;if(i==="Enter"||i===" "){t.preventDefault();e.wmTabSelected.emit({tabId:e.tabId});e.tabSelected.emit({tabId:e.tabId})}else if(i.includes("Arrow")){t.preventDefault();e.keydownOnTabItem.emit({tabItem:e.el,key:t.key})}}}Object.defineProperty(t.prototype,"parentTabList",{get:function(){return this.el.parentElement},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.linkEl&&this.linkEl.classList.add("user-is-tabbing")};t.prototype.toggleTabbingOff=function(){this.linkEl&&this.linkEl.classList.remove("user-is-tabbing")};t.prototype.componentWillLoad=function(){this.el.focus=function(){var t=this.shadowRoot.querySelector("a");t&&t.focus()}};t.prototype.componentDidLoad=function(){this.tabItemLoaded.emit()};t.prototype.render=function(){var t=this;var e=this.show?"":"hide ";e+=this.parentTabList&&this.parentTabList.customBackground=="dark"?"dark":"";var i={};var n=this.parentTabList&&this.parentTabList.customPadding;if(n){var a=parseInt(n,10)*2||0;var r=n.split(/([0-9]+)/).pop();i={"padding-left":this.parentTabList.customPadding,"padding-right":this.parentTabList.customPadding,"background-size":"calc(100% - "+a+r+") 3px"}}return h(Host,{role:"presentation"},h("li",{class:"tab-item",role:"presentation"},h("a",{class:"tab "+e,style:i,role:"tab",ref:function(e){return t.linkEl=e},onClick:this.tabClicked,id:"tab-link-"+this.tabId,onKeyDown:function(e){return t.tabPressed(e)},"aria-selected":this.selected?"true":"false",tabindex:this.selected?0:-1},h("slot",null))))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();TabItem.style=wmTabItemCss;var wmTabListCss=":host,wm-tab-list{position:relative;white-space:nowrap;height:100%;display:block}:host *,wm-tab-list *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .tabcontainer,wm-tab-list .tabcontainer{margin:0;margin-left:-24px;width:100%;height:4.0625rem;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0}:host .tabcontainer.dark,wm-tab-list .tabcontainer.dark{background:#353b48;margin:0}:host wm-select,wm-tab-list wm-select{padding:0.375rem 0}";var TabList=function(){function t(t){var e=this;registerInstance(this,t);this.wmTabSelected=createEvent(this,"wmTabSelected",7);this.tabSelected=createEvent(this,"tabSelected",7);this.controllerEnabled=false;this.getSelectedTabItem=function(){return e.tabItems.filter((function(t){return t.selected}))[0]};this.debouncedSetLayout=debounce((function(){if(!e.listWidth){e.setListWidth()}forceUpdate(e.el)}),250)}Object.defineProperty(t.prototype,"menuLayout",{get:function(){if(this.listWidth){return this.el.offsetWidth<this.listWidth-24}else{return false}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tabItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-tab-item"))},enumerable:false,configurable:true});t.prototype.getLinkEl=function(t){return t.shadowRoot.querySelector("a")};Object.defineProperty(t.prototype,"panels",{get:function(){var t=Array.from(document.querySelectorAll("wm-tab-panel"));var e=this.tabItems.map((function(t){return t.tabId}));return t.filter((function(t){return e.includes(t.tabId)}))},enumerable:false,configurable:true});t.prototype.getPanel=function(t){return this.panels.find((function(e){return e.tabId===t}))};t.prototype.setListWidth=function(){var t=this.tabItems.reduce((function(t,e){return t+e.offsetWidth}),0);this.listWidth=t&&t>0?t:this.listWidth};t.prototype.setSelected=function(t){this.tabItems.map((function(e){return e.selected=e.tabId===t}));var e=this.panels.length===1&&this.tabItems.length>1;if(e){var i=this.getSelectedTabItem();this.setAttributesOnPanel(this.panels[0],i);this.panels[0].active=true}else{this.panels.map((function(e){return e.active=e.tabId===t}))}};t.prototype.showItems=function(){this.tabItems.map((function(t){return t.show=true}))};t.prototype.hideItems=function(){this.tabItems.map((function(t){return t.show=false}))};t.prototype.componentWillLoad=function(){this.el.focus=function(){var t=Array.from(this.querySelectorAll("wm-tab-item"));var e=t.filter((function(t){return t.selected}))[0];e&&e.focus()}};t.prototype.componentDidLoad=function(){this.setLayout();var t=this.selectedTab||this.tabItems[0].tabId;this.setSelected(t)};t.prototype.tabItemLoaded=function(t){this.setAriaOnPanelAndTab(t.target)};t.prototype.setAriaOnPanelAndTab=function(t){var e=this.getPanel(t.tabId);if(!e){if(this.panels.length===1){this.setAttributesOnTab(t,this.panels[0])}}else{this.setAttributesOnPanel(e,t);this.setAttributesOnTab(t,e)}};t.prototype.setAttributesOnTab=function(t,e){var i=this.getLinkEl(t);if(i){i.setAttribute("aria-controls",e.id);i.setAttribute("href","#"+e.id)}};t.prototype.removeAttributesOnTab=function(t){var e=this.getLinkEl(t);if(e){e.removeAttribute("aria-controls");e.removeAttribute("href")}};t.prototype.setAttributesOnPanel=function(t,e){var i=this.getLinkEl(e);if(i){t.setAttribute("aria-labelledby",i.id);t.setAttribute("tab-id",e.tabId)}};t.prototype.handleTabSelected=function(t){if(this.controllerEnabled){this.setSelected(t.detail.tabId)}};t.prototype.handleKeydown=function(t){var e=t.detail.key;var i=this.tabItems.indexOf(t.detail.tabItem);if(e==="ArrowLeft"||e==="ArrowRight"){this.handleLeftRightArrow(i,e)}if(e==="ArrowDown"||e==="ArrowUp"){this.handleUpDownArrow(e)}};t.prototype.handleLeftRightArrow=function(t,e){if(e){t=e==="ArrowLeft"?t-1:t+1}if(t<0){t=this.tabItems.length-1}else if(t===this.tabItems.length){t=0}var i=this.tabItems[t];this.getLinkEl(i).focus()};t.prototype.handleUpDownArrow=function(t){if(t==="ArrowDown"){if(this.selectedTab){var e=this.getPanel(this.selectedTab);if(e){e.focus()}}}};t.prototype.setLayout=function(){this.debouncedSetLayout()};t.prototype.renderMenuOrTabs=function(){if(this.menuLayout){this.hideItems();return h("wm-select",{label:"Tab Selection","label-position":"none"},this.renderOptions())}else{this.showItems();var t={};if(this.customPadding){t={"margin-left":"-"+this.customPadding}}return h("ul",{class:"tabcontainer "+(this.customBackground||""),style:t,role:"tablist"},h("slot",null))}};t.prototype.renderOptions=function(){var t=this;return this.tabItems.map((function(e){return h("wm-option",{id:"tab-link-"+e.tabId,selected:e.tabId===t.selectedTab,onClick:function(i){i.preventDefault();t.wmTabSelected.emit({tabId:e.tabId});t.tabSelected.emit({tabId:e.tabId})}},e.textContent)}))};t.prototype.render=function(){return h(Host,{class:this.menuLayout?"menu":""},this.renderMenuOrTabs())};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{selectedTab:["setSelected"]}},enumerable:false,configurable:true});return t}();TabList.style=wmTabListCss;var wmTabPanelCss="wm-tab-panel{visibility:inherit}wm-tab-panel.tab-hidden{display:none}wm-tab-panel:active{outline:none}wm-tab-panel:focus{outline:none}wm-tab-panel.user-is-tabbing:focus{outline:-webkit-focus-ring-color auto 5px}";var TabPanel=function(){function t(t){registerInstance(this,t);this.tabPanelLoaded=createEvent(this,"tabPanelLoaded",7);this.active=false;this.tabId=""}t.prototype.componentWillLoad=function(){!this.el.id&&this.el.setAttribute("id",generateId())};t.prototype.componentDidLoad=function(){this.tabPanelLoaded.emit({tabId:this.tabId})};t.prototype.toggleTabbingOn=function(){this.el.classList.add("user-is-tabbing")};t.prototype.toggleTabbingOff=function(){this.el.classList.remove("user-is-tabbing")};t.prototype.render=function(){var t=this;return h(Host,{role:"tabpanel","aria-hidden":this.active?"false":"true",class:{"tab-hidden":!this.active},onBlur:function(){return t.el.tabIndex=-1},tabIndex:-1})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();TabPanel.style=wmTabPanelCss;export{TabItem as wm_tab_item,TabList as wm_tab_list,TabPanel as wm_tab_panel};