@watermarkinsights/ripple 5.4.0-0 → 5.4.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 (358) hide show
  1. package/dist/cjs/{chartFunctions-9c8c61ef.js → chartFunctions-ef57119f.js} +3 -3
  2. package/dist/cjs/{functions-05e7ad5a.js → functions-3be85c6d.js} +7 -104
  3. package/dist/{esm/app-globals-5fa0b568.js → cjs/global-4ff34a0e.js} +2 -7
  4. package/dist/cjs/index-e86c28b6.js +2641 -0
  5. package/dist/cjs/{intl-2b550151.js → intl-567eb9d8.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +3 -4
  7. package/dist/cjs/priv-calendar.cjs.entry.js +5 -6
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +5 -6
  9. package/dist/cjs/priv-navigator-button.cjs.entry.js +3 -4
  10. package/dist/cjs/priv-navigator-item.cjs.entry.js +3 -4
  11. package/dist/cjs/ripple.cjs.js +11 -12
  12. package/dist/cjs/wm-action-menu_2.cjs.entry.js +6 -8
  13. package/dist/cjs/wm-button.cjs.entry.js +4 -5
  14. package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
  15. package/dist/cjs/wm-chart.cjs.entry.js +6 -7
  16. package/dist/cjs/wm-date-range.cjs.entry.js +7 -8
  17. package/dist/cjs/wm-datepicker.cjs.entry.js +7 -8
  18. package/dist/cjs/wm-file-list.cjs.entry.js +3 -4
  19. package/dist/cjs/wm-file.cjs.entry.js +4 -5
  20. package/dist/cjs/wm-input.cjs.entry.js +5 -6
  21. package/dist/cjs/wm-line-chart.cjs.entry.js +15 -16
  22. package/dist/cjs/wm-modal-footer.cjs.entry.js +3 -4
  23. package/dist/cjs/wm-modal-header.cjs.entry.js +5 -6
  24. package/dist/cjs/wm-modal.cjs.entry.js +5 -6
  25. package/dist/cjs/wm-navigation_3.cjs.entry.js +11 -14
  26. package/dist/cjs/wm-navigator.cjs.entry.js +3 -4
  27. package/dist/cjs/wm-option_2.cjs.entry.js +8 -10
  28. package/dist/cjs/wm-pagination.cjs.entry.js +4 -5
  29. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +7 -9
  30. package/dist/cjs/wm-search.cjs.entry.js +6 -7
  31. package/dist/cjs/wm-snackbar.cjs.entry.js +6 -7
  32. package/dist/cjs/wm-tab-item_3.cjs.entry.js +8 -11
  33. package/dist/cjs/wm-tag-input.cjs.entry.js +8 -9
  34. package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
  35. package/dist/cjs/wm-textarea.cjs.entry.js +5 -6
  36. package/dist/cjs/wm-timepicker.cjs.entry.js +5 -6
  37. package/dist/cjs/wm-toggletip.cjs.entry.js +5 -6
  38. package/dist/cjs/wm-uploader.cjs.entry.js +6 -7
  39. package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
  40. package/dist/collection/collection-manifest.json +2 -2
  41. package/dist/collection/components/charts/chartFunctions.js +1 -1
  42. package/dist/collection/components/charts/chartFunctions.spec.js +16 -0
  43. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +81 -0
  44. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
  45. package/dist/collection/components/charts/screenshots.e2e.js +96 -0
  46. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +213 -0
  47. package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
  48. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +37 -0
  49. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1 -1
  50. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +176 -0
  51. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
  52. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +163 -0
  53. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
  54. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +69 -0
  55. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
  56. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +79 -0
  57. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
  58. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +89 -0
  59. package/dist/collection/components/datepickers/wm-date-range.e2e.js +443 -0
  60. package/dist/collection/components/datepickers/wm-date-range.js +12 -16
  61. package/dist/collection/components/datepickers/wm-date-range.spec.js +22 -0
  62. package/dist/collection/components/datepickers/wm-datepicker.e2e.js +382 -0
  63. package/dist/collection/components/datepickers/wm-datepicker.js +12 -16
  64. package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
  65. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +200 -0
  66. package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
  67. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +48 -0
  68. package/dist/collection/components/wm-button/wm-button.e2e.js +55 -0
  69. package/dist/collection/components/wm-button/wm-button.js +1 -1
  70. package/dist/collection/components/wm-button/wm-button.spec.js +74 -0
  71. package/dist/collection/components/wm-file/wm-file.js +1 -1
  72. package/dist/collection/components/wm-file/wm-file.spec.js +194 -0
  73. package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
  74. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +69 -0
  75. package/dist/collection/components/wm-input/wm-input.e2e.js +32 -0
  76. package/dist/collection/components/wm-input/wm-input.js +1 -1
  77. package/dist/collection/components/wm-input/wm-input.spec.js +173 -0
  78. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +23 -0
  79. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  80. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +54 -0
  81. package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
  82. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +11 -0
  83. package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
  84. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +8 -0
  85. package/dist/collection/components/wm-modal/wm-modal.e2e.js +104 -0
  86. package/dist/collection/components/wm-modal/wm-modal.js +2 -2
  87. package/dist/collection/components/wm-modal/wm-modal.spec.js +30 -0
  88. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
  89. package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
  90. package/dist/collection/components/wm-navigation/wm-navigation.css +1 -1
  91. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +102 -0
  92. package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
  93. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +91 -0
  94. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +50 -0
  95. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
  96. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
  97. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +209 -0
  98. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +177 -0
  99. package/dist/collection/components/wm-option/wm-option.e2e.js +22 -0
  100. package/dist/collection/components/wm-option/wm-option.js +1 -1
  101. package/dist/collection/components/wm-option/wm-option.spec.js +63 -0
  102. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +312 -0
  103. package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
  104. package/dist/collection/components/wm-search/wm-search.e2e.js +76 -0
  105. package/dist/collection/components/wm-search/wm-search.js +4 -5
  106. package/dist/collection/components/wm-search/wm-search.spec.js +71 -0
  107. package/dist/collection/components/wm-select/wm-select.e2e.js +521 -0
  108. package/dist/collection/components/wm-select/wm-select.js +2 -2
  109. package/dist/collection/components/wm-select/wm-select.spec.js +271 -0
  110. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +112 -0
  111. package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
  112. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +9 -0
  113. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
  114. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
  115. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
  116. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +91 -0
  117. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +12 -0
  118. package/dist/collection/components/wm-tag-input/wm-tag-input.css +1 -1
  119. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +204 -0
  120. package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
  121. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +195 -0
  122. package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +41 -0
  123. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  124. package/dist/collection/components/wm-textarea/wm-textarea.spec.js +79 -0
  125. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +163 -0
  126. package/dist/collection/components/wm-timepicker/wm-timepicker.js +8 -11
  127. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +147 -0
  128. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +69 -0
  129. package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
  130. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +21 -0
  131. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +70 -0
  132. package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
  133. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +234 -0
  134. package/dist/collection/global/functions.spec.js +126 -0
  135. package/dist/collection/lang/lang.spec.js +20 -0
  136. package/dist/esm/{chartFunctions-a4c41273.js → chartFunctions-d3fd6e7c.js} +3 -3
  137. package/dist/esm/{functions-25781571.js → functions-46843ea0.js} +8 -105
  138. package/dist/{cjs/app-globals-338dc72a.js → esm/global-588c6343.js} +1 -10
  139. package/dist/esm/index-558b5a82.js +2610 -0
  140. package/dist/esm/{intl-df3d34d1.js → intl-8b8740b9.js} +1 -1
  141. package/dist/esm/loader.js +4 -5
  142. package/dist/esm/polyfills/core-js.js +0 -0
  143. package/dist/esm/polyfills/dom.js +0 -0
  144. package/dist/esm/polyfills/es5-html-element.js +0 -0
  145. package/dist/esm/polyfills/index.js +0 -0
  146. package/dist/esm/polyfills/system.js +0 -0
  147. package/dist/esm/priv-calendar.entry.js +5 -6
  148. package/dist/esm/priv-chart-popover.entry.js +5 -6
  149. package/dist/esm/priv-navigator-button.entry.js +3 -4
  150. package/dist/esm/priv-navigator-item.entry.js +3 -4
  151. package/dist/esm/ripple.js +12 -13
  152. package/dist/esm/wm-action-menu_2.entry.js +6 -8
  153. package/dist/esm/wm-button.entry.js +4 -5
  154. package/dist/esm/wm-chart-slice.entry.js +1 -1
  155. package/dist/esm/wm-chart.entry.js +6 -7
  156. package/dist/esm/wm-date-range.entry.js +7 -8
  157. package/dist/esm/wm-datepicker.entry.js +7 -8
  158. package/dist/esm/wm-file-list.entry.js +3 -4
  159. package/dist/esm/wm-file.entry.js +4 -5
  160. package/dist/esm/wm-input.entry.js +5 -6
  161. package/dist/esm/wm-line-chart.entry.js +15 -16
  162. package/dist/esm/wm-modal-footer.entry.js +3 -4
  163. package/dist/esm/wm-modal-header.entry.js +5 -6
  164. package/dist/esm/wm-modal.entry.js +5 -6
  165. package/dist/esm/wm-navigation_3.entry.js +11 -14
  166. package/dist/esm/wm-navigator.entry.js +3 -4
  167. package/dist/esm/wm-option_2.entry.js +8 -10
  168. package/dist/esm/wm-pagination.entry.js +4 -5
  169. package/dist/esm/wm-progress-indicator_3.entry.js +7 -9
  170. package/dist/esm/wm-search.entry.js +6 -7
  171. package/dist/esm/wm-snackbar.entry.js +6 -7
  172. package/dist/esm/wm-tab-item_3.entry.js +8 -11
  173. package/dist/esm/wm-tag-input.entry.js +8 -9
  174. package/dist/esm/wm-tag-option.entry.js +2 -2
  175. package/dist/esm/wm-textarea.entry.js +5 -6
  176. package/dist/esm/wm-timepicker.entry.js +5 -6
  177. package/dist/esm/wm-toggletip.entry.js +5 -6
  178. package/dist/esm/wm-uploader.entry.js +6 -7
  179. package/dist/esm/wm-wrapper.entry.js +1 -1
  180. package/dist/esm-es5/{chartFunctions-a4c41273.js → chartFunctions-d3fd6e7c.js} +1 -1
  181. package/dist/esm-es5/functions-46843ea0.js +1 -0
  182. package/dist/esm-es5/global-588c6343.js +1 -0
  183. package/dist/esm-es5/index-558b5a82.js +1 -0
  184. package/dist/esm-es5/{intl-df3d34d1.js → intl-8b8740b9.js} +1 -1
  185. package/dist/esm-es5/loader.js +1 -1
  186. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  187. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  188. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  189. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  190. package/dist/esm-es5/ripple.js +1 -1
  191. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  192. package/dist/esm-es5/wm-button.entry.js +1 -1
  193. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  194. package/dist/esm-es5/wm-chart.entry.js +1 -1
  195. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  196. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  197. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  198. package/dist/esm-es5/wm-file.entry.js +1 -1
  199. package/dist/esm-es5/wm-input.entry.js +1 -1
  200. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  201. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  202. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  203. package/dist/esm-es5/wm-modal.entry.js +1 -1
  204. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  205. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  206. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  207. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  208. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  209. package/dist/esm-es5/wm-search.entry.js +1 -1
  210. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  211. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  212. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  213. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  214. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  215. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  216. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  217. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  218. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  219. package/dist/loader/cdn.js +2 -1
  220. package/dist/loader/index.cjs.js +2 -1
  221. package/dist/loader/index.d.ts +0 -3
  222. package/dist/loader/index.es2017.js +2 -1
  223. package/dist/loader/index.js +2 -1
  224. package/dist/ripple/p-09a31f0c.entry.js +1 -0
  225. package/dist/ripple/p-0aa17cac.entry.js +1 -0
  226. package/dist/ripple/p-0ea8609b.system.entry.js +1 -0
  227. package/dist/ripple/{p-1a9e55ae.js → p-0f0466c6.js} +1 -1
  228. package/dist/ripple/{p-a9d89ac8.system.js → p-1ac66a15.system.js} +1 -1
  229. package/dist/ripple/p-240124b0.system.entry.js +1 -0
  230. package/dist/ripple/p-26fbc7f5.system.entry.js +1 -0
  231. package/dist/ripple/p-294b38ca.system.entry.js +1 -0
  232. package/dist/ripple/p-2b05bf05.entry.js +1 -0
  233. package/dist/ripple/p-2be33eb4.system.js +1 -0
  234. package/dist/ripple/p-311923b2.system.entry.js +1 -0
  235. package/dist/ripple/p-3183bba8.entry.js +1 -0
  236. package/dist/ripple/p-31976813.entry.js +1 -0
  237. package/dist/ripple/{p-823d7b4e.system.entry.js → p-32bf3f5b.system.entry.js} +1 -1
  238. package/dist/ripple/p-33679b9d.entry.js +1 -0
  239. package/dist/ripple/p-34b5830f.system.js +1 -0
  240. package/dist/ripple/p-3568472c.entry.js +1 -0
  241. package/dist/ripple/{p-67a7f0b0.entry.js → p-3a44e1c8.entry.js} +1 -1
  242. package/dist/ripple/{p-672ae2cb.entry.js → p-42d1c301.entry.js} +1 -1
  243. package/dist/ripple/{p-041e579b.entry.js → p-45abd8fe.entry.js} +1 -1
  244. package/dist/ripple/{p-13b1d775.entry.js → p-48e09589.entry.js} +1 -1
  245. package/dist/ripple/p-49b7970e.system.entry.js +1 -0
  246. package/dist/ripple/{p-7c51092b.system.entry.js → p-4bacf5a7.system.entry.js} +1 -1
  247. package/dist/ripple/{p-a1a2f8c9.system.entry.js → p-510679f8.system.entry.js} +1 -1
  248. package/dist/ripple/p-568c595f.js +2 -0
  249. package/dist/ripple/p-591918a4.entry.js +1 -0
  250. package/dist/ripple/p-5c10e2ae.entry.js +1 -0
  251. package/dist/ripple/p-62a8f09c.entry.js +1 -0
  252. package/dist/ripple/{p-043901ab.system.entry.js → p-65d26233.system.entry.js} +1 -1
  253. package/dist/ripple/{p-bee8ab6e.entry.js → p-7326b62a.entry.js} +1 -1
  254. package/dist/ripple/p-75ba63ba.entry.js +1 -0
  255. package/dist/ripple/p-763a01bc.system.js +1 -0
  256. package/dist/ripple/{p-ac40417b.system.entry.js → p-79106e23.system.entry.js} +1 -1
  257. package/dist/ripple/p-7e6f5a1e.system.entry.js +1 -0
  258. package/dist/ripple/{p-8e72de50.entry.js → p-8159cdf5.entry.js} +1 -1
  259. package/dist/ripple/p-822618d7.entry.js +1 -0
  260. package/dist/ripple/p-884294c6.entry.js +1 -0
  261. package/dist/ripple/{p-cd0cc88d.entry.js → p-88ebddd7.entry.js} +1 -1
  262. package/dist/ripple/p-8fbddb6c.system.entry.js +1 -0
  263. package/dist/ripple/p-902a54c5.entry.js +1 -0
  264. package/dist/ripple/p-905dd4da.system.entry.js +1 -0
  265. package/dist/ripple/{p-c9141443.system.js → p-97aaa344.system.js} +1 -1
  266. package/dist/ripple/p-99c24568.system.entry.js +1 -0
  267. package/dist/ripple/{p-ff69270a.entry.js → p-9a3e656a.entry.js} +1 -1
  268. package/dist/ripple/p-a03f7141.entry.js +1 -0
  269. package/dist/ripple/{p-aab56a37.system.entry.js → p-a152cf3a.system.entry.js} +1 -1
  270. package/dist/ripple/p-a8524a48.entry.js +1 -0
  271. package/dist/ripple/p-ab8d78cc.system.js +2 -0
  272. package/dist/ripple/p-b2dac998.system.entry.js +1 -0
  273. package/dist/ripple/{p-6fe35d1e.system.entry.js → p-b7ead395.system.entry.js} +1 -1
  274. package/dist/ripple/p-bc5e9d24.entry.js +1 -0
  275. package/dist/ripple/p-bee9a5dc.js +1 -0
  276. package/dist/ripple/p-bf636261.entry.js +1 -0
  277. package/dist/ripple/p-c4b9d46d.entry.js +1 -0
  278. package/dist/ripple/p-c885c7f9.entry.js +1 -0
  279. package/dist/ripple/p-c91b10f3.system.entry.js +1 -0
  280. package/dist/ripple/p-c9543950.system.entry.js +1 -0
  281. package/dist/ripple/p-cacfbaf1.system.entry.js +1 -0
  282. package/dist/ripple/{p-2e3728f1.entry.js → p-cc4a429b.entry.js} +1 -1
  283. package/dist/ripple/p-d24882a7.system.entry.js +1 -0
  284. package/dist/ripple/p-d33d6e96.system.entry.js +1 -0
  285. package/dist/ripple/{p-f54e9ed0.js → p-d79fdf0b.js} +1 -1
  286. package/dist/ripple/p-d86bd773.entry.js +1 -0
  287. package/dist/ripple/{p-d93c51dd.system.entry.js → p-df1a11f1.system.entry.js} +1 -1
  288. package/dist/ripple/p-df2560f3.system.entry.js +1 -0
  289. package/dist/ripple/p-e3bcdde8.system.entry.js +1 -0
  290. package/dist/ripple/p-e3de5bbd.system.entry.js +1 -0
  291. package/dist/ripple/{p-ca35a8b7.system.entry.js → p-e7a64841.system.entry.js} +1 -1
  292. package/dist/ripple/p-e83a98d3.entry.js +1 -0
  293. package/dist/ripple/p-e995f7f0.js +1 -0
  294. package/dist/ripple/p-eaac6bcd.entry.js +1 -0
  295. package/dist/ripple/{p-00515e48.system.entry.js → p-f4210450.system.entry.js} +1 -1
  296. package/dist/ripple/p-f67fd802.system.entry.js +1 -0
  297. package/dist/ripple/p-fe8d02c3.system.entry.js +1 -0
  298. package/dist/ripple/{p-b0c566b5.system.entry.js → p-ffb31979.system.entry.js} +1 -1
  299. package/dist/ripple/ripple.esm.js +1 -1
  300. package/dist/ripple/ripple.js +1 -1
  301. package/dist/types/stencil-public-runtime.d.ts +10 -3
  302. package/package.json +1 -1
  303. package/dist/cjs/index-788526f5.js +0 -1851
  304. package/dist/esm/index-130e07bb.js +0 -1820
  305. package/dist/esm-es5/app-globals-5fa0b568.js +0 -1
  306. package/dist/esm-es5/functions-25781571.js +0 -1
  307. package/dist/esm-es5/index-130e07bb.js +0 -1
  308. package/dist/ripple/p-0af94825.entry.js +0 -1
  309. package/dist/ripple/p-0ff41567.system.entry.js +0 -1
  310. package/dist/ripple/p-13fc2164.entry.js +0 -1
  311. package/dist/ripple/p-155224a2.system.entry.js +0 -1
  312. package/dist/ripple/p-1f09134c.entry.js +0 -1
  313. package/dist/ripple/p-298c2675.entry.js +0 -1
  314. package/dist/ripple/p-2d619f83.entry.js +0 -1
  315. package/dist/ripple/p-31781d88.system.entry.js +0 -1
  316. package/dist/ripple/p-31d7ecf9.system.entry.js +0 -1
  317. package/dist/ripple/p-341ebafa.entry.js +0 -1
  318. package/dist/ripple/p-3423a9b6.system.entry.js +0 -1
  319. package/dist/ripple/p-376efca9.entry.js +0 -1
  320. package/dist/ripple/p-3b5f4364.system.entry.js +0 -1
  321. package/dist/ripple/p-418ed08c.system.entry.js +0 -1
  322. package/dist/ripple/p-4520ba7b.entry.js +0 -1
  323. package/dist/ripple/p-45f53a78.system.js +0 -1
  324. package/dist/ripple/p-4670ccb4.system.js +0 -1
  325. package/dist/ripple/p-488e1690.entry.js +0 -1
  326. package/dist/ripple/p-4baaf026.entry.js +0 -1
  327. package/dist/ripple/p-5051034b.entry.js +0 -1
  328. package/dist/ripple/p-56766bb2.entry.js +0 -1
  329. package/dist/ripple/p-576f8e7c.js +0 -1
  330. package/dist/ripple/p-5caaf651.system.entry.js +0 -1
  331. package/dist/ripple/p-5ece78e5.system.entry.js +0 -1
  332. package/dist/ripple/p-6d0e5159.system.entry.js +0 -1
  333. package/dist/ripple/p-6d56676e.system.entry.js +0 -1
  334. package/dist/ripple/p-7d32497f.system.js +0 -1
  335. package/dist/ripple/p-7eab6bea.system.entry.js +0 -1
  336. package/dist/ripple/p-7fb95b89.entry.js +0 -1
  337. package/dist/ripple/p-85cbeb7d.system.entry.js +0 -1
  338. package/dist/ripple/p-88cfd58d.js +0 -1
  339. package/dist/ripple/p-8d075bcf.system.entry.js +0 -1
  340. package/dist/ripple/p-9c723924.system.entry.js +0 -1
  341. package/dist/ripple/p-a62e7532.entry.js +0 -1
  342. package/dist/ripple/p-ad4529d2.entry.js +0 -1
  343. package/dist/ripple/p-b7307be6.system.entry.js +0 -1
  344. package/dist/ripple/p-c2181de0.entry.js +0 -1
  345. package/dist/ripple/p-cef8a45b.system.js +0 -2
  346. package/dist/ripple/p-d5ba9de1.system.entry.js +0 -1
  347. package/dist/ripple/p-d9da0502.js +0 -2
  348. package/dist/ripple/p-db10990a.entry.js +0 -1
  349. package/dist/ripple/p-de0e138f.system.entry.js +0 -1
  350. package/dist/ripple/p-e2fe86a7.system.entry.js +0 -1
  351. package/dist/ripple/p-e85b1f40.entry.js +0 -1
  352. package/dist/ripple/p-ea0dfadf.system.entry.js +0 -1
  353. package/dist/ripple/p-eb14b354.entry.js +0 -1
  354. package/dist/ripple/p-f17fd62b.entry.js +0 -1
  355. package/dist/ripple/p-f20e8a69.entry.js +0 -1
  356. package/dist/ripple/p-f836a5e8.entry.js +0 -1
  357. package/dist/ripple/p-fabe4ca4.entry.js +0 -1
  358. package/dist/ripple/p-fbaae34d.system.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as registerInstance,h,g as getElement}from"./index-130e07bb.js";var wmModalFooterCss="wm-modal-footer{display:block;-webkit-border-radius:0px 0px 5px 5px;-moz-border-radius:0px 0px 5px 5px;-ms-border-radius:0px 0px 5px 5px;border-radius:0px 0px 5px 5px}wm-modal-footer .wm-wrapper{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}@media only screen and (max-width: 650px){wm-modal-footer .wm-wrapper.footer-text{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}wm-modal-footer .wm-wrapper wm-button+wm-button{margin-left:1rem}wm-modal-footer .wm-wrapper .wm-info{font-size:0.875rem;font-style:italic}@media only screen and (max-width: 650px){wm-modal-footer .wm-wrapper .wm-info{padding-bottom:0.625rem}}wm-modal-footer .wm-wrapper .wm-info:focus{outline:none}";var WmModalFooterStyle0=wmModalFooterCss;var ModalFooter=function(){function e(e){registerInstance(this,e);this.secondaryText="";this.primaryText="";this.infoText="";this.primaryActionDisabled=false;this.deleteStyle=false}e.prototype.componentWillLoad=function(){var e=this;var t=this.el.closest("wm-modal");this.uid=t.uid;t.addEventListener("focusLastElement",(function(){e.lastElement.focus()}))};e.prototype.emitParentPrimaryEvent=function(){var e=this.el.closest("wm-modal");if(e){e.emitPrimaryEvent()}};e.prototype.emitParentSecondaryEvent=function(){var e=this.el.closest("wm-modal");if(e){e.emitSecondaryEvent()}};e.prototype.render=function(){var e=this;return h("div",{key:"09b1182d96ad0f65ad6e2d865901ca600ef6bdc6",class:"wm-wrapper ".concat(this.infoText?" footer-text":"")},h("div",{key:"1e8d2e33fb67996cf2e6d3827ad566da2af0121f",class:"wm-info","aria-live":"polite"},this.infoText),h("div",{key:"3ef4184bbfe126af97339c495c21f78b82f96fbc",class:"wm-button-collection"},this.secondaryText&&h("wm-button",{key:"3eb4cb51d51cf7d7e4d61d16399b036cccfb5825",onClick:function(){return e.emitParentSecondaryEvent()},id:"wm-secondary-".concat(this.uid),ref:function(t){return e.primaryActionDisabled?e.lastElement=t:undefined}},this.secondaryText),h("wm-button",{key:"449c91c2c7af5810a8f8e3ab64c63a212a2df541","button-type":this.deleteStyle?"secondary":"primary","permanently-delete":this.deleteStyle,onClick:function(){return e.emitParentPrimaryEvent()},disabled:this.primaryActionDisabled,id:"wm-primary-".concat(this.uid),ref:function(t){return!e.primaryActionDisabled?e.lastElement=t:undefined}},this.primaryText)))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ModalFooter.style=WmModalFooterStyle0;export{ModalFooter as wm_modal_footer};
1
+ import{r as registerInstance,h,g as getElement}from"./index-558b5a82.js";var wmModalFooterCss="wm-modal-footer{display:block;-webkit-border-radius:0px 0px 5px 5px;-moz-border-radius:0px 0px 5px 5px;-ms-border-radius:0px 0px 5px 5px;border-radius:0px 0px 5px 5px}wm-modal-footer .wm-wrapper{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}@media only screen and (max-width: 650px){wm-modal-footer .wm-wrapper.footer-text{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}wm-modal-footer .wm-wrapper wm-button+wm-button{margin-left:1rem}wm-modal-footer .wm-wrapper .wm-info{font-size:0.875rem;font-style:italic}@media only screen and (max-width: 650px){wm-modal-footer .wm-wrapper .wm-info{padding-bottom:0.625rem}}wm-modal-footer .wm-wrapper .wm-info:focus{outline:none}";var ModalFooter=function(){function e(e){registerInstance(this,e);this.secondaryText="";this.primaryText="";this.infoText="";this.primaryActionDisabled=false;this.deleteStyle=false}e.prototype.componentWillLoad=function(){var e=this;var t=this.el.closest("wm-modal");this.uid=t.uid;t.addEventListener("focusLastElement",(function(){e.lastElement.focus()}))};e.prototype.emitParentPrimaryEvent=function(){var e=this.el.closest("wm-modal");if(e){e.emitPrimaryEvent()}};e.prototype.emitParentSecondaryEvent=function(){var e=this.el.closest("wm-modal");if(e){e.emitSecondaryEvent()}};e.prototype.render=function(){var e=this;return h("div",{class:"wm-wrapper ".concat(this.infoText?" footer-text":"")},h("div",{class:"wm-info","aria-live":"polite"},this.infoText),h("div",{class:"wm-button-collection"},this.secondaryText&&h("wm-button",{onClick:function(){return e.emitParentSecondaryEvent()},id:"wm-secondary-".concat(this.uid),ref:function(t){return e.primaryActionDisabled?e.lastElement=t:undefined}},this.secondaryText),h("wm-button",{"button-type":this.deleteStyle?"secondary":"primary","permanently-delete":this.deleteStyle,onClick:function(){return e.emitParentPrimaryEvent()},disabled:this.primaryActionDisabled,id:"wm-primary-".concat(this.uid),ref:function(t){return!e.primaryActionDisabled?e.lastElement=t:undefined}},this.primaryText)))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ModalFooter.style=wmModalFooterCss;export{ModalFooter as wm_modal_footer};
@@ -1 +1 @@
1
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-130e07bb.js";import{g as globalMessages}from"./intl-df3d34d1.js";import"./functions-25781571.js";var wmModalHeaderCss="wm-modal-header{display:block;-webkit-border-radius:5px 5px 0 0px;-moz-border-radius:5px 5px 0 0px;-ms-border-radius:5px 5px 0 0px;border-radius:5px 5px 0 0px}wm-modal-header .wm-wrapper{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}wm-modal-header .wm-wrapper .title{margin:0;font-weight:600;font-size:1.125rem;color:var(--wmcolor-modal-heading);line-height:normal}wm-modal-header .wm-wrapper .title .subtitle{display:block;font-size:0.875rem;font-weight:normal}wm-modal-header .wm-wrapper .title:focus{outline:none}";var WmModalHeaderStyle0=wmModalHeaderCss;var ModalHeader=function(){function e(e){registerInstance(this,e);this.heading="";this.subheading=""}e.prototype.componentWillLoad=function(){var e=this;var t=this.el.closest("wm-modal");this.uid=t.uid;t.addEventListener("focusFirstElement",(function(){e.closeButtonEl.focus()}))};e.prototype.emitParentCloseEvent=function(){var e=this.el.closest("wm-modal");e.emitCloseEvent()};e.prototype.render=function(){var e=this;return h(Host,{key:"5f19057a411235360621a94b35d8bbd0cafeb756"},h("div",{key:"cd92ce876d1c46693afde4216b07c975505943a0",class:"wm-wrapper"},h("div",{key:"288de703687da76c9c19cb7c9d585291511858af"},h("h2",{key:"e4336d48cd65b5d2edce772ecede4d55d8742490",class:"title",id:"wm-modal-heading-text-".concat(this.uid)},this.heading,h("span",{key:"4039bf3b3193af1c15c4fa0d4127965bb4af0fdc",class:"subtitle"},this.subheading))),h("wm-button",{key:"b745264b5bc4d84ce93d8f71fd6fbea9951481c5","button-type":"navigational",icon:"f156",tooltip:globalMessages.close,"tooltip-position":"left",id:"wm-modal-close-".concat(this.uid),ref:function(t){return e.closeButtonEl=t},onClick:function(){return e.emitParentCloseEvent()}})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ModalHeader.style=WmModalHeaderStyle0;export{ModalHeader as wm_modal_header};
1
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-558b5a82.js";import{g as globalMessages}from"./intl-8b8740b9.js";import"./functions-46843ea0.js";var wmModalHeaderCss="wm-modal-header{display:block;-webkit-border-radius:5px 5px 0 0px;-moz-border-radius:5px 5px 0 0px;-ms-border-radius:5px 5px 0 0px;border-radius:5px 5px 0 0px}wm-modal-header .wm-wrapper{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}wm-modal-header .wm-wrapper .title{margin:0;font-weight:600;font-size:1.125rem;color:var(--wmcolor-modal-heading);line-height:normal}wm-modal-header .wm-wrapper .title .subtitle{display:block;font-size:0.875rem;font-weight:normal}wm-modal-header .wm-wrapper .title:focus{outline:none}";var ModalHeader=function(){function e(e){registerInstance(this,e);this.heading="";this.subheading=""}e.prototype.componentWillLoad=function(){var e=this;var t=this.el.closest("wm-modal");this.uid=t.uid;t.addEventListener("focusFirstElement",(function(){e.closeButtonEl.focus()}))};e.prototype.emitParentCloseEvent=function(){var e=this.el.closest("wm-modal");e.emitCloseEvent()};e.prototype.render=function(){var e=this;return h(Host,null,h("div",{class:"wm-wrapper"},h("div",null,h("h2",{class:"title",id:"wm-modal-heading-text-".concat(this.uid)},this.heading,h("span",{class:"subtitle"},this.subheading))),h("wm-button",{"button-type":"navigational",icon:"f156",tooltip:globalMessages.close,"tooltip-position":"left",id:"wm-modal-close-".concat(this.uid),ref:function(t){return e.closeButtonEl=t},onClick:function(){return e.emitParentCloseEvent()}})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ModalHeader.style=wmModalHeaderCss;export{ModalHeader as wm_modal_header};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,o,n){function i(t){return t instanceof o?t:new o((function(e){e(t)}))}return new(o||(o=Promise))((function(o,r){function a(t){try{s(n.next(t))}catch(t){r(t)}}function d(t){try{s(n["throw"](t))}catch(t){r(t)}}function s(t){t.done?o(t.value):i(t.value).then(a,d)}s((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(t){return function(e){return s([t,e])}}function s(d){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(o=0)),o)try{if(n=1,i&&(r=d[0]&2?i["return"]:d[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,d[1])).done)return r;if(i=0,r)d=[d[0]&2,r.value];switch(d[0]){case 0:case 1:r=d;break;case 4:o.label++;return{value:d[1],done:false};case 5:o.label++;i=d[1];d=[0];continue;case 7:d=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(d[0]===6||d[0]===2)){o=0;continue}if(d[0]===3&&(!r||d[1]>r[0]&&d[1]<r[3])){o.label=d[1];break}if(d[0]===6&&o.label<r[1]){o.label=r[1];r=d;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(d);break}if(r[2])o.ops.pop();o.trys.pop();continue}d=e.call(t,o)}catch(t){d=[6,t];i=0}finally{n=r=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-130e07bb.js";import{g as generateId}from"./functions-25781571.js";var wmModalCss="wm-modal{--wmcolor-modal-background:var(--wmcolor-background);--wmcolor-modal-border:var(--wmcolor-border);--wmcolor-modal-heading:var(--wmcolor-text);--wmcolor-modal-overlay:var(--wmcolor-overlay)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal dialog{color:inherit;padding:0;width:80vw;max-width:750px;max-height:80vh;-webkit-border-radius:5px 5px 5px 5px;-moz-border-radius:5px 5px 5px 5px;-ms-border-radius:5px 5px 5px 5px;border-radius:5px 5px 5px 5px;border:none;background:var(--wmcolor-modal-background)}wm-modal dialog>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px)}wm-modal dialog::-webkit-backdrop{background:rgba(25, 25, 25, 0.4)}wm-modal dialog::-ms-backdrop{background:rgba(25, 25, 25, 0.4)}wm-modal dialog::backdrop{background:rgba(25, 25, 25, 0.4)}wm-modal dialog[open]{-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal dialog.wm-modal>wm-modal-header{border-bottom:1px solid var(--wmcolor-modal-border)}wm-modal dialog.wm-modal>wm-modal-footer{border-top:1px solid var(--wmcolor-modal-border)}@media only screen and (max-width: 768px){wm-modal dialog.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal dialog.wm-modal>*{max-width:none;width:100vw}wm-modal dialog.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal dialog.wm-dialog>:not(wm-modal-header):not(wm-modal-footer):not(.wm-tooltip){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem;width:100%}wm-modal .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}";var WmModalStyle0=wmModalCss;var Modal=function(){function t(t){registerInstance(this,t);this.focusLastElement=createEvent(this,"focusLastElement",3);this.focusFirstElement=createEvent(this,"focusFirstElement",3);this.wmModalCloseTriggered=createEvent(this,"wmModalCloseTriggered",3);this.wmModalPrimaryTriggered=createEvent(this,"wmModalPrimaryTriggered",7);this.wmModalSecondaryTriggered=createEvent(this,"wmModalSecondaryTriggered",7);this.open=false;this.elementToFocus="";this.modalType="modal";this.uid=undefined;this.returnFocusEl=undefined}Object.defineProperty(t.prototype,"closeButtonEl",{get:function(){return this.el.querySelector("#wm-modal-close-".concat(this.uid))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focusOnOpenEl",{get:function(){var t=null;if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){t=this.el.querySelector("#wm-".concat(this.elementToFocus,"-").concat(this.uid))}else if(this.elementToFocus){t=this.el.querySelector("#"+this.elementToFocus);!t&&console.warn("Ripple Component Library: The modal component couldn't find an element matching the id you passed for 'elementToFocus' (".concat(this.elementToFocus,"). It will fall back to the default and focus the close button when the modal opens."))}return t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"hasBrowserPopoverSupport",{get:function(){var t=document.getElementById("wm-tooltip");return t?!!t.showPopover:false},enumerable:false,configurable:true});t.prototype.toggleModal=function(){this.open?this.showModal():this.hideModal()};t.prototype.handleDialogClose=function(){if(this.open){this.wmModalCloseTriggered.emit()}this.open=false};t.prototype.showModal=function(){this.returnFocusEl=document.activeElement;this.setAriaDescribedbyOnModal();document.body.style.overflow="hidden";this.dialogEl.showModal();if(this.focusOnOpenEl){this.focusOnOpenEl.focus()}};t.prototype.hideModal=function(){var t=this;document.body.style.overflow="visible";this.dialogEl.close();setTimeout((function(){if(t.returnFocusEl&&document.activeElement===document.body){if(t.returnFocusEl.tagName==="WM-MENUITEM"){t.returnFocusEl=t.returnFocusEl.parentElement}t.returnFocusEl.focus()}}),20)};t.prototype.componentWillLoad=function(){var t=this;if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){if(!this.el.id){console.error("For accessibility purposes you need to set the modal content wrapper's id to 'content-[id of wm-modal].")}}this.el.focus=function(){if(t.focusOnOpenEl){t.focusOnOpenEl.focus()}else{t.closeButtonEl.focus()}};this.uid=this.el.id?this.el.id:generateId()};t.prototype.componentDidLoad=function(){var t=this;if(this.open){this.showModal()}this.dialogEl.addEventListener("close",(function(){return t.handleDialogClose()}))};t.prototype.emitCloseEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.wmModalCloseTriggered.emit();return[2]}))}))};t.prototype.emitPrimaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.wmModalPrimaryTriggered.emit();return[2]}))}))};t.prototype.emitSecondaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.wmModalSecondaryTriggered.emit();return[2]}))}))};t.prototype.handleKeyDown=function(t){if(t.key=="Escape"){t.stopPropagation()}};t.prototype.setAriaDescribedbyOnModal=function(){var t=document.getElementById("content-".concat(this.uid));if(!t){console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}else{this.el.setAttribute("aria-describedby","wm-modal-heading-text-".concat(this.uid," content-").concat(this.uid))}};t.prototype.render=function(){var t=this;return h("dialog",{key:"f9804007b3075d04567628d467538b268f2005cc",class:"".concat("wm-"+this.modalType),ref:function(e){return t.dialogEl=e},onKeyDown:function(e){return t.handleKeyDown(e)}},h("div",{key:"40c848ef5e791eeaf3fc116764f0007f3e14132d",class:"tabtrap sr-only",tabindex:"0",onFocus:function(e){var o=e.relatedTarget&&e.relatedTarget==t.closeButtonEl;o?t.focusLastElement.emit():t.focusFirstElement.emit()}}),!this.hasBrowserPopoverSupport&&h("div",{key:"8bec0c492699e1544dde7219ec704a5ef3a3b6ee",class:"wm-tooltip"}),h("slot",{key:"2646b7ab94b1426e9166fd589680f6e1e401643f"}),h("div",{key:"fddae069851ee02bdda40853a46e9b70bc311c99",class:"tabtrap sr-only",tabindex:"0",onFocus:function(){t.focusFirstElement.emit()}}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{open:["toggleModal"]}},enumerable:false,configurable:true});return t}();Modal.style=WmModalStyle0;export{Modal as wm_modal};
1
+ var __awaiter=this&&this.__awaiter||function(t,o,e,n){function i(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,r){function a(t){try{s(n.next(t))}catch(t){r(t)}}function d(t){try{s(n["throw"](t))}catch(t){r(t)}}function s(t){t.done?e(t.value):i(t.value).then(a,d)}s((n=n.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,a;return a={next:d(0),throw:d(1),return:d(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function d(t){return function(o){return s([t,o])}}function s(d){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,d[0]&&(e=0)),e)try{if(n=1,i&&(r=d[0]&2?i["return"]:d[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,d[1])).done)return r;if(i=0,r)d=[d[0]&2,r.value];switch(d[0]){case 0:case 1:r=d;break;case 4:e.label++;return{value:d[1],done:false};case 5:e.label++;i=d[1];d=[0];continue;case 7:d=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(d[0]===6||d[0]===2)){e=0;continue}if(d[0]===3&&(!r||d[1]>r[0]&&d[1]<r[3])){e.label=d[1];break}if(d[0]===6&&e.label<r[1]){e.label=r[1];r=d;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(d);break}if(r[2])e.ops.pop();e.trys.pop();continue}d=o.call(t,e)}catch(t){d=[6,t];i=0}finally{n=r=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-558b5a82.js";import{g as generateId}from"./functions-46843ea0.js";var wmModalCss="wm-modal{--wmcolor-modal-background:var(--wmcolor-background);--wmcolor-modal-border:var(--wmcolor-border);--wmcolor-modal-heading:var(--wmcolor-text);--wmcolor-modal-overlay:var(--wmcolor-overlay)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal dialog{color:inherit;padding:0;width:80vw;max-width:750px;max-height:80vh;-webkit-border-radius:5px 5px 5px 5px;-moz-border-radius:5px 5px 5px 5px;-ms-border-radius:5px 5px 5px 5px;border-radius:5px 5px 5px 5px;border:none;background:var(--wmcolor-modal-background)}wm-modal dialog>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px)}wm-modal dialog::-webkit-backdrop{background:rgba(25, 25, 25, 0.4)}wm-modal dialog::-ms-backdrop{background:rgba(25, 25, 25, 0.4)}wm-modal dialog::backdrop{background:rgba(25, 25, 25, 0.4)}wm-modal dialog[open]{-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal dialog.wm-modal>wm-modal-header{border-bottom:1px solid var(--wmcolor-modal-border)}wm-modal dialog.wm-modal>wm-modal-footer{border-top:1px solid var(--wmcolor-modal-border)}@media only screen and (max-width: 768px){wm-modal dialog.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal dialog.wm-modal>*{max-width:none;width:100vw}wm-modal dialog.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal dialog.wm-dialog>:not(wm-modal-header):not(wm-modal-footer):not(.wm-tooltip){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem;width:100%}wm-modal .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}";var Modal=function(){function t(t){registerInstance(this,t);this.focusLastElement=createEvent(this,"focusLastElement",3);this.focusFirstElement=createEvent(this,"focusFirstElement",3);this.wmModalCloseTriggered=createEvent(this,"wmModalCloseTriggered",3);this.wmModalPrimaryTriggered=createEvent(this,"wmModalPrimaryTriggered",7);this.wmModalSecondaryTriggered=createEvent(this,"wmModalSecondaryTriggered",7);this.open=false;this.elementToFocus="";this.modalType="modal";this.uid=undefined;this.returnFocusEl=undefined}Object.defineProperty(t.prototype,"closeButtonEl",{get:function(){return this.el.querySelector("#wm-modal-close-".concat(this.uid))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"focusOnOpenEl",{get:function(){var t=null;if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){t=this.el.querySelector("#wm-".concat(this.elementToFocus,"-").concat(this.uid))}else if(this.elementToFocus){t=this.el.querySelector("#"+this.elementToFocus);!t&&console.warn("Ripple Component Library: The modal component couldn't find an element matching the id you passed for 'elementToFocus' (".concat(this.elementToFocus,"). It will fall back to the default and focus the close button when the modal opens."))}return t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"hasBrowserPopoverSupport",{get:function(){var t=document.getElementById("wm-tooltip");return t?!!t.showPopover:false},enumerable:false,configurable:true});t.prototype.toggleModal=function(){this.open?this.showModal():this.hideModal()};t.prototype.handleDialogClose=function(){if(this.open){this.wmModalCloseTriggered.emit()}this.open=false};t.prototype.showModal=function(){this.returnFocusEl=document.activeElement;this.setAriaDescribedbyOnModal();document.body.style.overflow="hidden";this.dialogEl.showModal();if(this.focusOnOpenEl){this.focusOnOpenEl.focus()}};t.prototype.hideModal=function(){var t=this;document.body.style.overflow="visible";this.dialogEl.close();setTimeout((function(){if(t.returnFocusEl&&document.activeElement===document.body){if(t.returnFocusEl.tagName==="WM-MENUITEM"){t.returnFocusEl=t.returnFocusEl.parentElement}t.returnFocusEl.focus()}}),20)};t.prototype.componentWillLoad=function(){var t=this;if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){if(!this.el.id){console.error("For accessibility purposes you need to set the modal content wrapper's id to 'content-[id of wm-modal].")}}this.el.focus=function(){if(t.focusOnOpenEl){t.focusOnOpenEl.focus()}else{t.closeButtonEl.focus()}};this.uid=this.el.id?this.el.id:generateId()};t.prototype.componentDidLoad=function(){var t=this;if(this.open){this.showModal()}this.dialogEl.addEventListener("close",(function(){return t.handleDialogClose()}))};t.prototype.emitCloseEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.wmModalCloseTriggered.emit();return[2]}))}))};t.prototype.emitPrimaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.wmModalPrimaryTriggered.emit();return[2]}))}))};t.prototype.emitSecondaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.wmModalSecondaryTriggered.emit();return[2]}))}))};t.prototype.handleKeyDown=function(t){if(t.key=="Escape"){t.stopPropagation()}};t.prototype.setAriaDescribedbyOnModal=function(){var t=document.getElementById("content-".concat(this.uid));if(!t){console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}else{this.el.setAttribute("aria-describedby","wm-modal-heading-text-".concat(this.uid," content-").concat(this.uid))}};t.prototype.render=function(){var t=this;return h("dialog",{class:"".concat("wm-"+this.modalType),ref:function(o){return t.dialogEl=o},onKeyDown:function(o){return t.handleKeyDown(o)}},h("div",{class:"tabtrap sr-only",tabindex:"0",onFocus:function(o){var e=o.relatedTarget&&o.relatedTarget==t.closeButtonEl;e?t.focusLastElement.emit():t.focusFirstElement.emit()}}),!this.hasBrowserPopoverSupport&&h("div",{class:"wm-tooltip"}),h("slot",null),h("div",{class:"tabtrap sr-only",tabindex:"0",onFocus:function(){t.focusFirstElement.emit()}}))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{open:["toggleModal"]}},enumerable:false,configurable:true});return t}();Modal.style=wmModalCss;export{Modal as wm_modal};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-130e07bb.js";import{i as intl,z as throttle,h as hideTooltip,s as showTooltip}from"./functions-25781571.js";import{g as globalMessages}from"./intl-df3d34d1.js";var wmNavigationCss=":host{--wmcolor-navigation-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigation-background-selected:var(--wmcolor-background-selected);--wmcolor-navigation-background:var(--wmcolor-background);--wmcolor-navigation-border-selected:var(--wmcolor-interactive);--wmcolor-navigation-focus:var(--wmcolor-interactive-focus);--wmcolor-navigation-icon-selected:var(--wmcolor-interactive);--wmcolor-navigation-icon:var(--wmcolor-icon);--wmcolor-navigation-text-selected:var(--wmcolor-interactive);z-index:10}:host([aria-expanded=true]){z-index:5000}.tray{-webkit-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);-moz-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:7.5625rem;background-color:var(--wmcolor-navigation-background);overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;font-size:0.875rem;height:100%}.navlist{margin:0;padding:0}.toggle-wrapper{display:none}@media screen and (max-width: 1023px){.tray{-ms-transition:transform 0.33s ease;-webkit-transition:transform 0.33s ease;-moz-transition:transform 0.33s ease;-webkit-transition:-webkit-transform 0.33s ease;transition:-webkit-transform 0.33s ease;transition:transform 0.33s ease;transition:transform 0.33s ease, -webkit-transform 0.33s ease;position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.tray ul{visibility:hidden}.tray .toggle-wrapper{display:inline-block;min-height:5rem;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([aria-expanded=true]) .tray{-webkit-transform:translateX(0);transform:translateX(0)}:host([aria-expanded=true]) .tray ul{visibility:visible}.overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:0;bottom:0;left:0;right:0;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out}}";var WmNavigationStyle0=wmNavigationCss;var Navigation=function(){function e(e){var t=this;registerInstance(this,e);this.wmNavigationStateChanged=createEvent(this,"wmNavigationStateChanged",7);this.mainNavigationMessage=intl.formatMessage({id:"navigation.mainNavigation",defaultMessage:"Main",description:"Label describing the site navigation, for screen reader users"});this.throttledRerender=throttle((function(){return forceUpdate(t.el)}),50);this.open=false}Object.defineProperty(e.prototype,"isCollapsible",{get:function(){return window.innerWidth<1024},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaExpanded",{get:function(){return this.isCollapsible?this.open.toString():undefined},enumerable:false,configurable:true});e.prototype.closeOnEscape=function(e){if(e.key==="Escape"){this.open=false}};e.prototype.handleWindowResize=function(){this.throttledRerender()};e.prototype.handleHamburgerClicked=function(){this.open=!this.open};e.prototype.handleClickOnItem=function(){this.open=false};e.prototype.handleStateChange=function(){if(this.isCollapsible){this.wmNavigationStateChanged.emit();this.open?this.expand():this.collapse()}};e.prototype.componentWillLoad=function(){var e=this;this.el.focus=function(){var t=e.open?e.el.shadowRoot.querySelector(".toggle"):document.querySelector("wm-navigation-hamburger");var i=e.el.querySelector("wm-navigation-item");e.isCollapsible?t.focus():i.focus()};if(this.isCollapsible&&this.open){this.wmNavigationStateChanged.emit();this.expand()}};e.prototype.redirectFocusFromBody=function(e){if(document.activeElement.tagName==="BODY"&&!e.relatedTarget){this.el.focus()}};e.prototype.expand=function(){var e=this;document.body.tabIndex=0;document.body.addEventListener("focus",this.redirectFocusFromBody.bind(this),true);setTimeout((function(){return e.toggleEl.focus()}),250)};e.prototype.collapse=function(){document.body.tabIndex=-1;document.body.removeEventListener("focus",this.redirectFocusFromBody.bind(this));var e=document.querySelector("wm-navigation-hamburger");if(e)e.focus()};e.prototype.focusLastItem=function(){var e=this.el.querySelectorAll("wm-navigation-item");var t=Array.from(e).pop();t.focus()};e.prototype.renderOverlay=function(){var e=this;return h("div",{class:"overlay",onClick:function(){e.open=false}})};e.prototype.render=function(){var e=this;return h(Host,{key:"07253bd6d752aa41a1715cf2d28e600b7aae4355",role:"navigation","aria-expanded":this.ariaExpanded,"aria-label":this.mainNavigationMessage},this.open?this.renderOverlay():"",this.isCollapsible&&h("div",{key:"dbb1d92bad6c1f59f159f63758cc0110e1d6b94b",class:"trapfocus",tabindex:this.open?0:undefined,onFocus:function(){return e.focusLastItem()}}),h("div",{key:"93b63fb63bb94b32f25d250836c1d8b98cc20d08",class:"tray"},h("div",{key:"89a4323868c66a84bb4f12921103b150068906bc",class:"toggle-wrapper"},h("wm-button",{key:"0de023f3c6dd6e396adf0a248ca8333095a43359",ref:function(t){return e.toggleEl=t},class:"toggle","button-type":"navigational",icon:this.open?"f156":"f35c","icon-size":"2rem",tooltip:this.open?globalMessages.close:globalMessages.open,"tooltip-position":"right",tabIndex:this.open?undefined:-1,onClick:function(){e.open=!e.open}})),h("ul",{key:"1d7b6fc3268583b27b2a0dc46859b6ca1c6d8e52",class:"navlist"},h("slot",{key:"870cf6f8c01dba37611097c836880792ddddefd6"}))),this.isCollapsible&&h("div",{key:"2d89c522803c67ea290e054ac2a8040f3f257282",class:"trapfocus",tabindex:this.open?0:undefined,onFocus:function(){return e.toggleEl.focus()}}))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["handleStateChange"]}},enumerable:false,configurable:true});return e}();Navigation.style=WmNavigationStyle0;var wmNavigationHamburgerCss='button{--wmcolor-navigation-hamburger-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigation-hamburger-icon:var(--wmcolor-interactive);display:none;width:100%;height:100%;border:none;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);background-color:transparent;outline:none;padding:0}button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0}button:hover{background-color:var(--wmcolor-navigation-hamburger-background-hover)}.icon: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:"\\f35c";font-size:1.5rem;color:var(--wmcolor-navigation-hamburger-icon)}@media screen and (max-width: 1023px){:host{width:3.75rem;height:3.75rem}button{display:initial}}';var WmNavigationHamburgerStyle0=wmNavigationHamburgerCss;var NavigationHamburger=function(){function e(e){registerInstance(this,e);this.wmNavigationHamburgerClicked=createEvent(this,"wmNavigationHamburgerClicked",7);this.showNavMessage=intl.formatMessage({id:"navigation.showNavigation",defaultMessage:"Show navigation",description:"For user interface element opening a navigation menu"});this.navId=undefined;this.isTabbing=false;this.open=false}e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleNavigationStateChanged=function(e){this.open=e.target.open};e.prototype.componentWillLoad=function(){if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}if(!this.navId){console.error("wm-navigation-hamburger: nav-id is a required prop")}};e.prototype.handleClick=function(){hideTooltip();this.wmNavigationHamburgerClicked.emit()};e.prototype.render=function(){var e=this;return h(Host,{key:"b813a9264454c413f65eef5389e394ef1b291317",class:"hamburger ".concat(this.open?"nav-open":"nav-closed")},h("button",{key:"4e623dd65471a455bc352940ea99a2ed1e10ff63","aria-expanded":this.open,"aria-label":this.showNavMessage,onMouseEnter:function(){return showTooltip("right",e.el,e.showNavMessage)},onMouseLeave:function(){return hideTooltip()},onFocus:function(){return e.isTabbing&&showTooltip("right",e.el,e.showNavMessage)},onBlur:function(){return hideTooltip()},onClick:function(){return e.handleClick()}},h("span",{key:"6754b962ff1a87cabe636bad94e953c7bbdde09e",class:"icon"})))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();NavigationHamburger.style=WmNavigationHamburgerStyle0;var wmNavigationItemCss='.link{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:inherit;text-decoration:none;min-height:4.5rem;text-align:center;padding:1.25rem 0.5rem;font-weight:500;outline:none;position:relative;background:var(--wmcolor-navigation-background)}.link:hover{background-color:var(--wmcolor-navigation-background-hover)}.link .icon{font-size:1.375rem;color:var(--wmcolor-navigation-icon)}.link .text{font-size:0.875rem}.link:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-3px}.link.active{background-color:var(--wmcolor-navigation-background-selected)}.link.active:before{content:"";background-color:var(--wmcolor-navigation-border-selected);position:absolute;height:100%;width:5px;left:0}.link.active .text{color:var(--wmcolor-navigation-text-selected)}.link.active .icon{color:var(--wmcolor-navigation-icon-selected)}';var WmNavigationItemStyle0=wmNavigationItemCss;var NavigationItem=function(){function e(e){registerInstance(this,e);this.wmNavigationItemClicked=createEvent(this,"wmNavigationItemClicked",7);this.href=undefined;this.text=undefined;this.active=undefined}e.prototype.render=function(){var e=this;return h(Host,{key:"59d24293849944df41c1d904458413e8f201e348",role:"listitem"},h("a",{key:"4e0e4717b961c7020ab19a5564ed8328789c5f34",class:"link ".concat(this.active?"active":""),href:this.href,onClick:function(){return e.wmNavigationItemClicked.emit()}},h("div",{key:"8ce442d2d492faba715138bbc7a0e2c2d2bc1a75",class:"icon","aria-hidden":"true"},h("slot",{key:"898d3ec6a650f7a2e2d59f2c01d777b7d061420c"})),h("div",{key:"e1858a03da5dbb807adbaed86e50cac95f59edc3",class:"text"},this.text)))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();NavigationItem.style=WmNavigationItemStyle0;export{Navigation as wm_navigation,NavigationHamburger as wm_navigation_hamburger,NavigationItem as wm_navigation_item};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-558b5a82.js";import{i as intl,z as throttle,h as hideTooltip,s as showTooltip}from"./functions-46843ea0.js";import{g as globalMessages}from"./intl-8b8740b9.js";var wmNavigationCss=":host{--wmcolor-navigation-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigation-background-selected:var(--wmcolor-interactive-background-selected);--wmcolor-navigation-background:var(--wmcolor-background);--wmcolor-navigation-border-selected:var(--wmcolor-interactive);--wmcolor-navigation-focus:var(--wmcolor-interactive-focus);--wmcolor-navigation-icon-selected:var(--wmcolor-interactive);--wmcolor-navigation-icon:var(--wmcolor-icon);--wmcolor-navigation-text-selected:var(--wmcolor-interactive);z-index:10}:host([aria-expanded=true]){z-index:5000}.tray{-webkit-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);-moz-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:7.5625rem;background-color:var(--wmcolor-navigation-background);overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;font-size:0.875rem;height:100%}.navlist{margin:0;padding:0}.toggle-wrapper{display:none}@media screen and (max-width: 1023px){.tray{-ms-transition:transform 0.33s ease;-webkit-transition:transform 0.33s ease;-moz-transition:transform 0.33s ease;-webkit-transition:-webkit-transform 0.33s ease;transition:-webkit-transform 0.33s ease;transition:transform 0.33s ease;transition:transform 0.33s ease, -webkit-transform 0.33s ease;position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.tray ul{visibility:hidden}.tray .toggle-wrapper{display:inline-block;min-height:5rem;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([aria-expanded=true]) .tray{-webkit-transform:translateX(0);transform:translateX(0)}:host([aria-expanded=true]) .tray ul{visibility:visible}.overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:0;bottom:0;left:0;right:0;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out}}";var Navigation=function(){function t(t){var i=this;registerInstance(this,t);this.wmNavigationStateChanged=createEvent(this,"wmNavigationStateChanged",7);this.mainNavigationMessage=intl.formatMessage({id:"navigation.mainNavigation",defaultMessage:"Main",description:"Label describing the site navigation, for screen reader users"});this.throttledRerender=throttle((function(){return forceUpdate(i.el)}),50);this.open=false}Object.defineProperty(t.prototype,"isCollapsible",{get:function(){return window.innerWidth<1024},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"ariaExpanded",{get:function(){return this.isCollapsible?this.open.toString():undefined},enumerable:false,configurable:true});t.prototype.closeOnEscape=function(t){if(t.key==="Escape"){this.open=false}};t.prototype.handleWindowResize=function(){this.throttledRerender()};t.prototype.handleHamburgerClicked=function(){this.open=!this.open};t.prototype.handleClickOnItem=function(){this.open=false};t.prototype.handleStateChange=function(){if(this.isCollapsible){this.wmNavigationStateChanged.emit();this.open?this.expand():this.collapse()}};t.prototype.componentWillLoad=function(){var t=this;this.el.focus=function(){var i=t.open?t.el.shadowRoot.querySelector(".toggle"):document.querySelector("wm-navigation-hamburger");var e=t.el.querySelector("wm-navigation-item");t.isCollapsible?i.focus():e.focus()};if(this.isCollapsible&&this.open){this.wmNavigationStateChanged.emit();this.expand()}};t.prototype.redirectFocusFromBody=function(t){if(document.activeElement.tagName==="BODY"&&!t.relatedTarget){this.el.focus()}};t.prototype.expand=function(){var t=this;document.body.tabIndex=0;document.body.addEventListener("focus",this.redirectFocusFromBody.bind(this),true);setTimeout((function(){return t.toggleEl.focus()}),250)};t.prototype.collapse=function(){document.body.tabIndex=-1;document.body.removeEventListener("focus",this.redirectFocusFromBody.bind(this));var t=document.querySelector("wm-navigation-hamburger");if(t)t.focus()};t.prototype.focusLastItem=function(){var t=this.el.querySelectorAll("wm-navigation-item");var i=Array.from(t).pop();i.focus()};t.prototype.renderOverlay=function(){var t=this;return h("div",{class:"overlay",onClick:function(){t.open=false}})};t.prototype.render=function(){var t=this;return h(Host,{role:"navigation","aria-expanded":this.ariaExpanded,"aria-label":this.mainNavigationMessage},this.open?this.renderOverlay():"",this.isCollapsible&&h("div",{class:"trapfocus",tabindex:this.open?0:undefined,onFocus:function(){return t.focusLastItem()}}),h("div",{class:"tray"},h("div",{class:"toggle-wrapper"},h("wm-button",{ref:function(i){return t.toggleEl=i},class:"toggle","button-type":"navigational",icon:this.open?"f156":"f35c","icon-size":"2rem",tooltip:this.open?globalMessages.close:globalMessages.open,"tooltip-position":"right",tabIndex:this.open?undefined:-1,onClick:function(){t.open=!t.open}})),h("ul",{class:"navlist"},h("slot",null))),this.isCollapsible&&h("div",{class:"trapfocus",tabindex:this.open?0:undefined,onFocus:function(){return t.toggleEl.focus()}}))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{open:["handleStateChange"]}},enumerable:false,configurable:true});return t}();Navigation.style=wmNavigationCss;var wmNavigationHamburgerCss='button{--wmcolor-navigation-hamburger-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigation-hamburger-icon:var(--wmcolor-interactive);display:none;width:100%;height:100%;border:none;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);background-color:transparent;outline:none;padding:0}button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0}button:hover{background-color:var(--wmcolor-navigation-hamburger-background-hover)}.icon: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:"\\f35c";font-size:1.5rem;color:var(--wmcolor-navigation-hamburger-icon)}@media screen and (max-width: 1023px){:host{width:3.75rem;height:3.75rem}button{display:initial}}';var NavigationHamburger=function(){function t(t){registerInstance(this,t);this.wmNavigationHamburgerClicked=createEvent(this,"wmNavigationHamburgerClicked",7);this.showNavMessage=intl.formatMessage({id:"navigation.showNavigation",defaultMessage:"Show navigation",description:"For user interface element opening a navigation menu"});this.navId=undefined;this.isTabbing=false;this.open=false}t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleNavigationStateChanged=function(t){this.open=t.target.open};t.prototype.componentWillLoad=function(){if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}if(!this.navId){console.error("wm-navigation-hamburger: nav-id is a required prop")}};t.prototype.handleClick=function(){hideTooltip();this.wmNavigationHamburgerClicked.emit()};t.prototype.render=function(){var t=this;return h(Host,{class:"hamburger ".concat(this.open?"nav-open":"nav-closed")},h("button",{"aria-expanded":this.open,"aria-label":this.showNavMessage,onMouseEnter:function(){return showTooltip("right",t.el,t.showNavMessage)},onMouseLeave:function(){return hideTooltip()},onFocus:function(){return t.isTabbing&&showTooltip("right",t.el,t.showNavMessage)},onBlur:function(){return hideTooltip()},onClick:function(){return t.handleClick()}},h("span",{class:"icon"})))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();NavigationHamburger.style=wmNavigationHamburgerCss;var wmNavigationItemCss='.link{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:inherit;text-decoration:none;min-height:4.5rem;text-align:center;padding:1.25rem 0.5rem;font-weight:500;outline:none;position:relative;background:var(--wmcolor-navigation-background)}.link:hover{background-color:var(--wmcolor-navigation-background-hover)}.link .icon{font-size:1.375rem;color:var(--wmcolor-navigation-icon)}.link .text{font-size:0.875rem}.link:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-3px}.link.active{background-color:var(--wmcolor-navigation-background-selected)}.link.active:before{content:"";background-color:var(--wmcolor-navigation-border-selected);position:absolute;height:100%;width:5px;left:0}.link.active .text{color:var(--wmcolor-navigation-text-selected)}.link.active .icon{color:var(--wmcolor-navigation-icon-selected)}';var NavigationItem=function(){function t(t){registerInstance(this,t);this.wmNavigationItemClicked=createEvent(this,"wmNavigationItemClicked",7);this.href=undefined;this.text=undefined;this.active=undefined}t.prototype.render=function(){var t=this;return h(Host,{role:"listitem"},h("a",{class:"link ".concat(this.active?"active":""),href:this.href,onClick:function(){return t.wmNavigationItemClicked.emit()}},h("div",{class:"icon","aria-hidden":"true"},h("slot",null)),h("div",{class:"text"},this.text)))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();NavigationItem.style=wmNavigationItemCss;export{Navigation as wm_navigation,NavigationHamburger as wm_navigation_hamburger,NavigationItem as wm_navigation_item};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,r,e,i){function n(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function o(t){try{c(i.next(t))}catch(t){a(t)}}function s(t){try{c(i["throw"](t))}catch(t){a(t)}}function c(t){t.done?e(t.value):n(t.value).then(o,s)}c((i=i.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(r){return c([t,r])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(e=0)),e)try{if(i=1,n&&(a=s[0]&2?n["return"]:s[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;if(n=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;n=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){e.label=s[1];break}if(s[0]===6&&e.label<a[1]){e.label=a[1];a=s;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(s);break}if(a[2])e.ops.pop();e.trys.pop();continue}s=r.call(t,e)}catch(t){s=[6,t];n=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-130e07bb.js";import{a as getWmMode}from"./interfaces-cc5b177f.js";import{n as snakeCaseToCamelCase,o as getNewIndexToFocus,i as intl}from"./functions-25781571.js";var getRequest=function(t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:r=e.sent();if(!(!!r&&!!r.ok))return[3,3];return[4,r.json()];case 2:return[2,e.sent()];case 3:throw new Error(r.statusText)}}))}))};var wmNavigatorCss=":host{--wmcolor-navigator-background:var(--wmcolor-background);--wmcolor-navigator-header-background:var(--wmcolor-brand-dark);--wmcolor-navigator-header-text:var(--wmcolor-text-ondark);--wmcolor-navigator-item-background-focus:var(--wmcolor-interactive-background-focus);--wmcolor-navigator-item-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigator-item-background:var(--wmcolor-background);--wmcolor-navigator-item-border:var(--wmcolor-border);--wmcolor-navigator-item-text:var(--wmcolor-text);--wmcolor-navigator-user-background:var(--wmcolor-background-readonly);min-width:0;position:relative;display:inline-block}:host .wrapper{overflow:auto;font-size:1.125rem;min-width:13.125rem;width:auto;max-height:80vh;text-align:left;position:absolute;z-index:50;top:100%;right:20px;left:auto;background:var(--wmcolor-navigator-background);letter-spacing:normal;-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-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper .user{background:var(--wmcolor-navigator-user-background);padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper .user p{margin:0}:host .wrapper .user p:first-child{font-weight:700;text-transform:capitalize}:host .wrapper h2{background:var(--wmcolor-navigator-header-background);color:var(--wmcolor-navigator-header-text);font-weight:700;margin:0;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper [role=listbox]{list-style:none;margin:0;padding-left:0}:host .wrapper.hide{-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0)}:host .wrapper.right{right:auto;left:20px}:host img{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:left center;transform-origin:left center;display:block}:host .logout{text-align:center;text-transform:capitalize}priv-navigator-item:focus{outline:none}";var WmNavigatorStyle0=wmNavigatorCss;var Navigator=function(){function t(t){registerInstance(this,t);this.wmNavigatorLogout=createEvent(this,"wmNavigatorLogout",7);this.retrievedInfo=!this.loadFromUserinfo;this.parsedProducts=[];this.openRight=false;this.userName=undefined;this.email=undefined;this.authType=1;this.connectionName=undefined;this.logoutUrl=undefined;this.products=undefined;this.loadFromUserinfo=false;this.isOpen=false;this.itemIndexToFocus=0}t.prototype.isSafeUrl=function(t){var r=false;var e=["digitalmeasures\\.com","evalkit\\.info","evaluationkit\\.com","evaluationkit\\.info","lat_ams\\.com","livetext\\.com","smartcatalogiq\\.com","smartcatalogiq\\.net","smartcatalogiq\\.us","taskstream\\.com","vialivetext\\.com","watermarkinsights\\.com"];e.forEach((function(e){var i="^https://(.*.)?".concat(e,"(/.*)?$");if(!!t&&t.match(i)){r=true}}));return r};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.userName){console.error("wm-navigator: user-name is a required property.")}return[4,this.parseData()];case 1:t.sent();this.setFocusIndex();return[2]}}))}))};t.prototype.parseData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){switch(r.label){case 0:if(!!!this.loadFromUserinfo)return[3,2];return[4,getRequest("/platform/navigator/userinfo").then((function(r){t.email=r.email;t.currentProductId=r.current_product_id;t.parsedProducts=t.productKeysToCamelCase(r.products);t.logoutUrl=t.logoutUrl?t.logoutUrl:r.logout_url;t.connectionName=t.connectionName?t.connectionName:r.connection_name;if(!!t.email&&!!t.currentProductId){t.retrievedInfo=true}})).catch((function(t){console.error(t)}))];case 1:r.sent();return[3,3];case 2:this.currentProductId=getWmMode(this.el);if(!!this.products){if(typeof this.products==="string"){this.parsedProducts=JSON.parse(this.products)}else{this.parsedProducts=this.products}this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts)}r.label=3;case 3:this.parsedProducts.sort((function(t,r){return t.name<r.name?-1:1}));return[2]}}))}))};t.prototype.productKeysToCamelCase=function(t){t=t.map((function(t){var r=Object.keys(t);var e={};r.forEach((function(r){e[snakeCaseToCamelCase(r)]=t[r]}));return e}));return t};t.prototype.setFocusIndex=function(){if(this.parsedProducts.length>1){var t=this.getProduct(this.currentProductId);if(t){this.itemIndexToFocus=this.parsedProducts.indexOf(t)}}};t.prototype.handleKeys=function(t){switch(t.key){case"Escape":t.preventDefault();this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault();if(!this.isOpen){this.itemIndexToFocus=getNewIndexToFocus(this.itemIndexToFocus,t.key,this.navigatorItems.length);this.openMenu()}break}};t.prototype.handleKeydown=function(t){var r=t.detail.key;var e=t.detail.navItem;switch(r){case"Tab":this.closeMenu(false);break;case"Enter":case" ":e.click();break;case"ArrowDown":case"ArrowUp":var i=this.itemIndexToFocus;this.itemIndexToFocus=getNewIndexToFocus(this.itemIndexToFocus,r,this.navigatorItems.length);this.focusItem();this.unfocusItem(i);break}};t.prototype.handleClick=function(t){var r=t.target===this.el||this.el.contains(t.target);if(!r&&this.isOpen){this.closeMenu(false)}};t.prototype.handleButtonClick=function(){this.isOpen?this.closeMenu():this.openMenu()};t.prototype.openMenu=function(){if(this.wrapperEl){var t=this.wrapperEl.clientWidth;var r=this.el.getBoundingClientRect().left;var e=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>r&&e>r}this.isOpen=true;this.focusItem()};t.prototype.closeMenu=function(t){var r=this;if(t===void 0){t=true}this.isOpen=false;window.requestAnimationFrame((function(){r.unfocusItem(r.itemIndexToFocus);r.setFocusIndex();if(t){r.buttonFocusHandler()}}))};t.prototype.focusItem=function(){var t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0;t.focused=true;window.requestAnimationFrame((function(){return t.focus()}))};t.prototype.unfocusItem=function(t){var r=this.navigatorItems[t];r.tabIndex=-1;r.focused=false};t.prototype.buttonFocusHandler=function(){var t=this.el.shadowRoot.querySelector("priv-navigator-button");var r=t.shadowRoot.querySelector("button");r.focus()};t.prototype.renderUserInfo=function(){return h("div",{class:"user",id:"wm-nav-user","aria-label":intl.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},h("p",null,this.userName),h("p",null,this.email))};t.prototype.setAltText=function(){if(this.parsedProducts.length>1){return intl.formatMessage({id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"})}else{return intl.formatMessage({id:"navigator.userinfo",defaultMessage:"User information"})}};t.prototype.renderHeading=function(){return h("h2",null,intl.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))};t.prototype.renderList=function(){return h("ul",{role:"listbox","aria-label":"".concat(intl.formatMessage({id:"navigator.WatermarkAppNavigation",defaultMessage:"Watermark App Navigation",description:"list of applications by Watermark Insights"})),"aria-describedby":"wm-nav-user"},this.parsedProducts.length>1&&this.renderProductOptions(),this.renderLogoutOption())};t.prototype.renderProductOptions=function(){var t=this;return this.parsedProducts.map((function(r){var e,i,n,a;e=r.name;i=r.iconUrl;a=t.setProductOnClick(r.id);if(!!e&&!!i){n=t.currentProductId===r.id;return h("priv-navigator-item",{selected:n,id:r.id,onClick:a,role:"option","aria-label":e},h("img",{src:i,alt:e}))}}))};t.prototype.setProductOnClick=function(t){var r=this.getProduct(t);if(this.currentProductId===t){return function(){}}else if(r){if(!!this.loadFromUserinfo||this.authType===2){var e=r.linkUrl;if(this.isSafeUrl(e)){return function(){return window.location.href=e}}else{console.error('"'.concat(e,'" is not a safe url'));return}}else if(this.authType===3){var i=this.connectionName?"/?connection_name=".concat(this.connectionName):"";var n=r.samlLinkUrl;if(this.isSafeUrl(n)){return function(){return window.location.href=n+i}}else{console.error('"'.concat(n,'" is not a safe url'));return}}}};t.prototype.renderLogoutOption=function(){return h("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},h("span",{class:"logout"},intl.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))};t.prototype.setLogoutOnclick=function(){var t=this;return function(){t.wmNavigatorLogout.emit();var r=t.logoutUrl;if(t.isSafeUrl(r)){window.location.href=r}else{console.error('"'.concat(r,'" is not a safe url'))}}};Object.defineProperty(t.prototype,"navigatorItems",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))},enumerable:false,configurable:true});t.prototype.getProduct=function(t){return this.parsedProducts.find((function(r){return r.id===t}))};t.prototype.render=function(){var t=this;return this.retrievedInfo?h(Host,null,h("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText()}),h("div",{class:"wrapper ".concat(this.isOpen?"":"hide"," ").concat(this.openRight?"right":""),ref:function(r){return t.wrapperEl=r}},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{products:["parseData"]}},enumerable:false,configurable:true});return t}();Navigator.style=WmNavigatorStyle0;export{Navigator as wm_navigator};
1
+ var __awaiter=this&&this.__awaiter||function(t,r,e,i){function n(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function o(t){try{c(i.next(t))}catch(t){a(t)}}function s(t){try{c(i["throw"](t))}catch(t){a(t)}}function c(t){t.done?e(t.value):n(t.value).then(o,s)}c((i=i.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(r){return c([t,r])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(e=0)),e)try{if(i=1,n&&(a=s[0]&2?n["return"]:s[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;if(n=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;n=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){e.label=s[1];break}if(s[0]===6&&e.label<a[1]){e.label=a[1];a=s;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(s);break}if(a[2])e.ops.pop();e.trys.pop();continue}s=r.call(t,e)}catch(t){s=[6,t];n=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-558b5a82.js";import{a as getWmMode}from"./interfaces-cc5b177f.js";import{n as snakeCaseToCamelCase,o as getNewIndexToFocus,i as intl}from"./functions-46843ea0.js";var getRequest=function(t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:r=e.sent();if(!(!!r&&!!r.ok))return[3,3];return[4,r.json()];case 2:return[2,e.sent()];case 3:throw new Error(r.statusText)}}))}))};var wmNavigatorCss=":host{--wmcolor-navigator-background:var(--wmcolor-background);--wmcolor-navigator-header-background:var(--wmcolor-brand-dark);--wmcolor-navigator-header-text:var(--wmcolor-text-ondark);--wmcolor-navigator-item-background-focus:var(--wmcolor-interactive-background-focus);--wmcolor-navigator-item-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigator-item-background:var(--wmcolor-background);--wmcolor-navigator-item-border:var(--wmcolor-border);--wmcolor-navigator-item-text:var(--wmcolor-text);--wmcolor-navigator-user-background:var(--wmcolor-background-readonly);min-width:0;position:relative;display:inline-block}:host .wrapper{overflow:auto;font-size:1.125rem;min-width:13.125rem;width:auto;max-height:80vh;text-align:left;position:absolute;z-index:50;top:100%;right:20px;left:auto;background:var(--wmcolor-navigator-background);letter-spacing:normal;-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-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper .user{background:var(--wmcolor-navigator-user-background);padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper .user p{margin:0}:host .wrapper .user p:first-child{font-weight:700;text-transform:capitalize}:host .wrapper h2{background:var(--wmcolor-navigator-header-background);color:var(--wmcolor-navigator-header-text);font-weight:700;margin:0;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper [role=listbox]{list-style:none;margin:0;padding-left:0}:host .wrapper.hide{-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0)}:host .wrapper.right{right:auto;left:20px}:host img{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:left center;transform-origin:left center;display:block}:host .logout{text-align:center;text-transform:capitalize}priv-navigator-item:focus{outline:none}";var Navigator=function(){function t(t){registerInstance(this,t);this.wmNavigatorLogout=createEvent(this,"wmNavigatorLogout",7);this.retrievedInfo=!this.loadFromUserinfo;this.parsedProducts=[];this.openRight=false;this.userName=undefined;this.email=undefined;this.authType=1;this.connectionName=undefined;this.logoutUrl=undefined;this.products=undefined;this.loadFromUserinfo=false;this.isOpen=false;this.itemIndexToFocus=0}t.prototype.isSafeUrl=function(t){var r=false;var e=["digitalmeasures\\.com","evalkit\\.info","evaluationkit\\.com","evaluationkit\\.info","lat_ams\\.com","livetext\\.com","smartcatalogiq\\.com","smartcatalogiq\\.net","smartcatalogiq\\.us","taskstream\\.com","vialivetext\\.com","watermarkinsights\\.com"];e.forEach((function(e){var i="^https://(.*.)?".concat(e,"(/.*)?$");if(!!t&&t.match(i)){r=true}}));return r};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.userName){console.error("wm-navigator: user-name is a required property.")}return[4,this.parseData()];case 1:t.sent();this.setFocusIndex();return[2]}}))}))};t.prototype.parseData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){switch(r.label){case 0:if(!!!this.loadFromUserinfo)return[3,2];return[4,getRequest("/platform/navigator/userinfo").then((function(r){t.email=r.email;t.currentProductId=r.current_product_id;t.parsedProducts=t.productKeysToCamelCase(r.products);t.logoutUrl=t.logoutUrl?t.logoutUrl:r.logout_url;t.connectionName=t.connectionName?t.connectionName:r.connection_name;if(!!t.email&&!!t.currentProductId){t.retrievedInfo=true}})).catch((function(t){console.error(t)}))];case 1:r.sent();return[3,3];case 2:this.currentProductId=getWmMode(this.el);if(!!this.products){if(typeof this.products==="string"){this.parsedProducts=JSON.parse(this.products)}else{this.parsedProducts=this.products}this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts)}r.label=3;case 3:this.parsedProducts.sort((function(t,r){return t.name<r.name?-1:1}));return[2]}}))}))};t.prototype.productKeysToCamelCase=function(t){t=t.map((function(t){var r=Object.keys(t);var e={};r.forEach((function(r){e[snakeCaseToCamelCase(r)]=t[r]}));return e}));return t};t.prototype.setFocusIndex=function(){if(this.parsedProducts.length>1){var t=this.getProduct(this.currentProductId);if(t){this.itemIndexToFocus=this.parsedProducts.indexOf(t)}}};t.prototype.handleKeys=function(t){switch(t.key){case"Escape":t.preventDefault();this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault();if(!this.isOpen){this.itemIndexToFocus=getNewIndexToFocus(this.itemIndexToFocus,t.key,this.navigatorItems.length);this.openMenu()}break}};t.prototype.handleKeydown=function(t){var r=t.detail.key;var e=t.detail.navItem;switch(r){case"Tab":this.closeMenu(false);break;case"Enter":case" ":e.click();break;case"ArrowDown":case"ArrowUp":var i=this.itemIndexToFocus;this.itemIndexToFocus=getNewIndexToFocus(this.itemIndexToFocus,r,this.navigatorItems.length);this.focusItem();this.unfocusItem(i);break}};t.prototype.handleClick=function(t){var r=t.target===this.el||this.el.contains(t.target);if(!r&&this.isOpen){this.closeMenu(false)}};t.prototype.handleButtonClick=function(){this.isOpen?this.closeMenu():this.openMenu()};t.prototype.openMenu=function(){if(this.wrapperEl){var t=this.wrapperEl.clientWidth;var r=this.el.getBoundingClientRect().left;var e=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>r&&e>r}this.isOpen=true;this.focusItem()};t.prototype.closeMenu=function(t){var r=this;if(t===void 0){t=true}this.isOpen=false;window.requestAnimationFrame((function(){r.unfocusItem(r.itemIndexToFocus);r.setFocusIndex();if(t){r.buttonFocusHandler()}}))};t.prototype.focusItem=function(){var t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0;t.focused=true;window.requestAnimationFrame((function(){return t.focus()}))};t.prototype.unfocusItem=function(t){var r=this.navigatorItems[t];r.tabIndex=-1;r.focused=false};t.prototype.buttonFocusHandler=function(){var t=this.el.shadowRoot.querySelector("priv-navigator-button");var r=t.shadowRoot.querySelector("button");r.focus()};t.prototype.renderUserInfo=function(){return h("div",{class:"user",id:"wm-nav-user","aria-label":intl.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},h("p",null,this.userName),h("p",null,this.email))};t.prototype.setAltText=function(){if(this.parsedProducts.length>1){return intl.formatMessage({id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"})}else{return intl.formatMessage({id:"navigator.userinfo",defaultMessage:"User information"})}};t.prototype.renderHeading=function(){return h("h2",null,intl.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))};t.prototype.renderList=function(){return h("ul",{role:"listbox","aria-label":"".concat(intl.formatMessage({id:"navigator.WatermarkAppNavigation",defaultMessage:"Watermark App Navigation",description:"list of applications by Watermark Insights"})),"aria-describedby":"wm-nav-user"},this.parsedProducts.length>1&&this.renderProductOptions(),this.renderLogoutOption())};t.prototype.renderProductOptions=function(){var t=this;return this.parsedProducts.map((function(r){var e,i,n,a;e=r.name;i=r.iconUrl;a=t.setProductOnClick(r.id);if(!!e&&!!i){n=t.currentProductId===r.id;return h("priv-navigator-item",{selected:n,id:r.id,onClick:a,role:"option","aria-label":e},h("img",{src:i,alt:e}))}}))};t.prototype.setProductOnClick=function(t){var r=this.getProduct(t);if(this.currentProductId===t){return function(){}}else if(r){if(!!this.loadFromUserinfo||this.authType===2){var e=r.linkUrl;if(this.isSafeUrl(e)){return function(){return window.location.href=e}}else{console.error('"'.concat(e,'" is not a safe url'));return}}else if(this.authType===3){var i=this.connectionName?"/?connection_name=".concat(this.connectionName):"";var n=r.samlLinkUrl;if(this.isSafeUrl(n)){return function(){return window.location.href=n+i}}else{console.error('"'.concat(n,'" is not a safe url'));return}}}};t.prototype.renderLogoutOption=function(){return h("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},h("span",{class:"logout"},intl.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))};t.prototype.setLogoutOnclick=function(){var t=this;return function(){t.wmNavigatorLogout.emit();var r=t.logoutUrl;if(t.isSafeUrl(r)){window.location.href=r}else{console.error('"'.concat(r,'" is not a safe url'))}}};Object.defineProperty(t.prototype,"navigatorItems",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))},enumerable:false,configurable:true});t.prototype.getProduct=function(t){return this.parsedProducts.find((function(r){return r.id===t}))};t.prototype.render=function(){var t=this;return this.retrievedInfo?h(Host,null,h("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText()}),h("div",{class:"wrapper ".concat(this.isOpen?"":"hide"," ").concat(this.openRight?"right":""),ref:function(r){return t.wrapperEl=r}},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{products:["parseData"]}},enumerable:false,configurable:true});return t}();Navigator.style=wmNavigatorCss;export{Navigator as wm_navigator};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-130e07bb.js";import{i as intl,d as debounce,t as toBool,a as handleDisabledAttribute,k as shouldOpenUp,y as getTextDir}from"./functions-25781571.js";import{g as globalMessages}from"./intl-df3d34d1.js";var wmOptionCss=':host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}: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}.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-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background-selected);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){color:var(--wmcolor-select-option-text-disabled);background:var(--wmcolor-select-option-background-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host([aria-disabled=true]) .subinfo{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.clone.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;gap:16px}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:-ms-flexbox;display:flex}.option-text{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){outline:none;background:var(--wmcolor-select-option-background-hover)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}';var WmOptionStyle0=wmOptionCss;var Option=function(){function e(e){registerInstance(this,e);this.wmOptionSelected=createEvent(this,"wmOptionSelected",7);this.wmOptionDeselected=createEvent(this,"wmOptionDeselected",7);this.intCloneClicked=createEvent(this,"intCloneClicked",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.wmEnterKeyPressed=createEvent(this,"wmEnterKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmOptionBlurred=createEvent(this,"wmOptionBlurred",7);this.value=undefined;this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false;this.searchTerm=""}Object.defineProperty(e.prototype,"hostClasses",{get:function(){var e=[];if(this.subinfo){e.push("hassubinfo")}if(this.parentSelectEl.multiple){e.push("multi-option")}if(!this.el.textContent.toLowerCase().includes(this.searchTerm)){e.push("filtered-out")}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"parentSelectEl",{get:function(){var e;return((e=this.el.parentElement)===null||e===void 0?void 0:e.nodeName)!=="WM-SELECT"?this.el.getRootNode().host:this.el.parentElement},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit(this.el);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"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;default:if(e.key.length===1){e.preventDefault();this.wmLetterPressed.emit({letter:e.key,optionEl:this.el})}}};e.prototype.handleSelection=function(){if(!this.disabled){if(this.el.classList.contains("clone")){this.intCloneClicked.emit(this.el)}else{if(this.parentSelectEl.multiple){this.selected?this.wmOptionDeselected.emit(this.el):this.wmOptionSelected.emit(this.el)}else{this.wmOptionSelected.emit(this.el)}}}};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.setAttribute("aria-selected","false")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};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.handleSearch=function(e){this.searchTerm=e.detail.searchTerm.toLowerCase();if(this.searchTerm&&this.el.textContent.toLowerCase().includes(this.searchTerm)){var t=this.el.textContent.toLowerCase().indexOf(this.searchTerm);var i=this.el.textContent.slice(0,t);var r=this.el.textContent.slice(t,t+this.searchTerm.length);var o=this.el.textContent.slice(t+this.searchTerm.length);var n=document.createElement("span");n.textContent=i;var s=document.createElement("strong");s.textContent=r;var a=document.createElement("span");a.textContent=o;this.textEl.innerHTML="";this.textEl.appendChild(n);this.textEl.appendChild(s);this.textEl.appendChild(a)}else{this.textEl.textContent=this.el.textContent}};e.prototype.componentWillLoad=function(){var e=this;this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick();this.parentSelectEl.addEventListener("wmSelectSearchChanged",(function(t){return e.handleSearch(t)}))};e.prototype.render=function(){var e=this;return h(Host,{key:"6d7f92d3b13121ae8ddffb4d8e6028db2171116a",role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},h("div",{key:"d0dccae3c763686b420b0bf16d7bf2880b1cdc67",class:"option-wrapper ".concat(this.parentSelectEl.multiple?"checkbox":"")},h("span",{key:"6e1fbd0d49be13883048634cd54d19f19256226d",class:"option-text","aria-hidden":"true",ref:function(t){return e.textEl=t}},this.el.textContent),h("span",{key:"f57f7c21e833a1c03f8407eaccb0883ef6b3a79a",class:"sr-only"},this.el.textContent)),h("div",{key:"1256826e0ddc1e3c48141e8c0f6864b3401cacf7",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"]}},enumerable:false,configurable:true});return e}();Option.style=WmOptionStyle0;var wmSelectCss=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);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:var(--wmcolor-text-required)}.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:var(--wmcolor-text-error)}.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 .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .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:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .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;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-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:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.wrapper .button-wrapper>.dropdown.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 .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.options-wrapper{max-height:12.5rem;overflow:auto}.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-selectall-border);background:var(--wmcolor-select-selectall-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-selectall-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-all:hover,.select-all:focus{outline:none;background:#f4f4f4}.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon: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:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .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 WmSelectStyle0=wmSelectCss;var Select=function(){function e(e){var t=this;registerInstance(this,e);this.wmSelectDidLoad=createEvent(this,"wmSelectDidLoad",7);this.wmSelectBlurred=createEvent(this,"wmSelectBlurred",7);this.wmSelectSearchChanged=createEvent(this,"wmSelectSearchChanged",7);this.wmSelectAllSelected=createEvent(this,"wmSelectAllSelected",7);this.wmSelectAllDeselected=createEvent(this,"wmSelectAllDeselected",7);this.selectAllMessage=intl.formatMessage({id:"select.selectAll",defaultMessage:"Select All"});this.deselectAllMessage=intl.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"});this.allOptionsSelectedMessage=intl.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"});this.allOptionsDeselectedMessage=intl.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"});this.keysSoFar="";this.searchIndex=0;this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.debouncedClearKeysSoFar=debounce((function(){t.keysSoFar=""}),500);this.debouncedSearch=debounce((function(){t.wmSelectSearchChanged.emit({searchTerm:t.searchTerm});if(t.filteredOptions.length){t.announce(t.resultsFoundMessage)}else{t.announce(t.noResultsFoundMessage)}}),150);this.disabled=false;this.maxHeight=undefined;this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage=undefined;this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=intl.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.searchPlaceholder=intl.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=intl.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isExpanded=false;this.announcement=""}Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"cloneOptions",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptionEls",{get:function(){return this.cloneOptions.concat(this.childOptions)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"visibleOptionEls",{get:function(){return this.allOptionEls.filter((function(e){return!e.classList.contains("hidden")&&!e.classList.contains("filtered-out")}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"searchTerm",{get:function(){return this.searchFieldEl?this.searchFieldEl.value:""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"filteredOptions",{get:function(){var e=this;return this.childOptions.filter((function(t){var i;return(i=t.textContent)===null||i===void 0?void 0:i.toLowerCase().includes(e.searchTerm.toLowerCase())}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allSelected",{get:function(){return this.childOptions.every((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"visibleSelectAllButton",{get:function(){return this.selectAll&&this.multiple&&this.searchTerm===""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"resultsFoundMessage",{get:function(){return intl.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"noResultsFoundMessage",{get:function(){return intl.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})},enumerable:false,configurable:true});e.prototype.handleOptionSelection=function(e){this.focusOption(e.detail);if(!this.multiple){this.close()}};e.prototype.handleOptionCloneSelection=function(e){var t=this.findCorrespondingOption(e.detail);t.click()};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.detail)};e.prototype.handleChildDown=function(e){this.moveDown(e.detail)};e.prototype.moveToFirstOption=function(){this.focusOption(this.visibleOptionEls[0])};e.prototype.moveToLastOption=function(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){if(!this.isElOrChild(e.detail.relatedTarget)){var t=new CustomEvent("blur");t.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(t)}};e.prototype.handleClick=function(e){if(!this.isElOrChild(e.target)){this.close()}};e.prototype.handleSelectAllClick=function(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()};e.prototype.selectAllOptions=function(){this.announce(this.allOptionsSelectedMessage);this.wmSelectAllSelected.emit()};e.prototype.deselectAllOptions=function(){this.announce(this.allOptionsDeselectedMessage);this.wmSelectAllDeselected.emit()};e.prototype.handleButtonBlur=function(e){if(this.isElOrChild(e.relatedTarget)){e.stopPropagation()}};e.prototype.handleSearchFieldBlur=function(e){this.searchFieldWrapperEl.classList.remove("focus");if(this.isElOrChild(e.relatedTarget)){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(){var e=this;if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}if(!this.multiple&&this.selectedOptions.length===0){console.error("wm-select should have one initial option selected")}handleDisabledAttribute(this.el,this.isDisabled);var t=new MutationObserver((function(t){return t.forEach((function(t){return e.handleChildChange(t)}))}));t.observe(this.el,{childList:true,attributes:true,subtree:true,attributeFilter:["selected"]})};e.prototype.handleChildChange=function(e){this.setButtonText();forceUpdate(this.el)};e.prototype.componentDidLoad=function(){this.wmSelectDidLoad.emit();this.dropdownEl.classList.add("hidden");forceUpdate(this.el);if(this.maxHeight){this.listboxEl.style.maxHeight=this.maxHeight}if(this.multiple){this.updateOptionVisibility()}this.setButtonText()};e.prototype.componentWillUpdate=function(){if(this.multiple){var e=this.visibleOptionEls.filter((function(e){return e.classList.contains("clone")}));var t=e.length===this.visibleOptionEls.length;e.forEach((function(i,r){if(!t&&r===e.length-1){i.classList.add("last")}else{i.classList.remove("last")}}))}};e.prototype.moveUp=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var i=t[t.indexOf(e)-1]||t[t.length-1];if(i){this.focusOption(i)}};e.prototype.moveDown=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var i=t[t.indexOf(e)+1]||t[0];if(i){this.focusOption(i)}};e.prototype.open=function(e){var t=this;if(!this.isDisabled){var i=this.el.clientHeight;var r=this.buttonEl.clientHeight;this.openUp=shouldOpenUp(this.el,this.dropdownEl.clientHeight,i,r);this.isExpanded=true;this.dropdownEl.classList.remove("hidden");window.requestAnimationFrame((function(){switch(e){case"next":if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else{t.moveDown(t.visibleOptionEls.filter((function(e){return e.selected})).slice(-1)[0])}break;case"previous":if(t.search){t.focusOption(t.visibleOptionEls[t.visibleOptionEls.length-1])}else{t.moveUp(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}break;default:if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else if(t.selectedOptions.length>0){t.focusOption(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}else{t.focusOption(t.visibleOptionEls[0])}break}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}if(this.isExpanded){this.isExpanded=false;this.allOptionEls.map((function(e){return e.focused=false}));window.setTimeout((function(){t.dropdownEl.classList.add("hidden");if(t.multiple){t.updateOptionVisibility()}if(t.search){t.searchFieldEl.value="";t.wmSelectSearchChanged.emit({searchTerm:t.searchTerm})}if(e){t.buttonEl.focus()}}),150)}};e.prototype.updateOptionVisibility=function(){var e=this;this.childOptions.forEach((function(t,i){var r=e.cloneOptions[i];if(t.selected){t.classList.add("hidden");r.classList.remove("hidden")}else{t.classList.remove("hidden");r.classList.add("hidden")}}))};e.prototype.focusOption=function(e){this.allOptionEls.forEach((function(t){return t.focused=t===e}));e.scrollIntoView({block:"nearest"});window.setTimeout((function(){return e.scrollIntoView({block:"nearest"})}),60);e.focus()};e.prototype.findAndFocusOption=function(e){var t=this;var i=e.detail.letter.toLowerCase();var r=e.detail.optionEl;if(!this.keysSoFar&&i==" "){r.click()}else{if(!this.keysSoFar){this.visibleOptionEls.forEach((function(e,i){if(e.focused){t.searchIndex=i}}))}this.keysSoFar+=i;var o=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);if(!o){o=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)}if(o){this.focusOption(o)}this.debouncedClearKeysSoFar()}};e.prototype.findMatchInRange=function(e,t,i){var r=this;var o=null;var n=e.slice(t,i);n.forEach((function(e){var t=e.textContent;if(!o&&t&&t.toLowerCase().startsWith(r.keysSoFar)){o=e}}));return o};e.prototype.findCorrespondingOption=function(e){var t=e.classList.contains("clone");return t?this.childOptions[this.cloneOptions.indexOf(e)]:this.cloneOptions[this.childOptions.indexOf(e)]};e.prototype.isElOrChild=function(e){var t;return e===this.el||this.el.contains(e)||((t=this.el.shadowRoot)===null||t===void 0?void 0:t.contains(e))};e.prototype.announceError=function(){var e=this;if(this.errorMessage){setTimeout((function(){return e.announce(e.errorMessage)}),100)}};e.prototype.handleDisabledChange=function(){handleDisabledAttribute(this.el,this.isDisabled)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit()}};e.prototype.handleKeyDown=function(e){var t=e.target;switch(e.key){case"ArrowDown":e.preventDefault();this.moveDown(e.target);break;case"ArrowUp":e.preventDefault();this.moveUp(e.target);break;case"Escape":e.preventDefault();this.close();break;case"Enter":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick();this.close()}break;case" ":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick()}break}};e.prototype.setButtonText=function(){var e=this;this.displayedOptions=this.childOptions.filter((function(e){return e.selected})).map((function(t){return!t.classList.contains("hidden")?t:e.findCorrespondingOption(t)}));if(this.multiple){var t=38;var i=window.getComputedStyle(this.buttonEl);var r=parseInt(i.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(i.getPropertyValue("padding-right").slice(0,-2));var n=this.buttonEl.clientWidth-r-o-t;var s=this.displayedOptions.map((function(e){return e.shadowRoot.querySelector(".option-text").clientWidth}));var a=s.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(a>n&&this.displayedOptions.length>1){this.overflowCount++;a-=s[s.length-1];s.pop();this.displayedOptions.pop()}}};e.prototype.announce=function(e){if(this.liveRegionEl.textContent===e){e+=" "}this.announcement=e};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedOptions.length<1){return h("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(e,t){return h("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return h("span",null,h("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.renderSearchField=function(){var e=this;return h("div",{class:"search"},h("div",{class:"searchfield-wrapper",ref:function(t){return e.searchFieldWrapperEl=t}},h("div",{class:"icon"}),h("input",{ref:function(t){return e.searchFieldEl=t},class:"searchfield",role:"combobox","aria-controls":"list","aria-expanded":this.isExpanded?"true":"false",onKeyDown:function(t){return e.handleKeyDown(t)},onFocus:function(){return e.searchFieldWrapperEl.classList.add("focus")},onBlur:function(t){return e.handleSearchFieldBlur(t)},onInput:function(){return e.debouncedSearch()},placeholder:this.searchPlaceholder})))};e.prototype.renderSearchFailedMessage=function(){return h("div",{class:"search-results-message"},this.noResultsFoundMessage)};e.prototype.renderSelectAllButton=function(){var e=this;return h("button",{ref:function(t){return e.selectAllEl=t},class:"select-all",onClick:function(){return e.handleSelectAllClick()},onKeyDown:function(t){return e.handleKeyDown(t)},tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)};e.prototype.renderCloneOptions=function(){return Array.from(this.el.children).map((function(e){var t=e;return h("wm-option",{class:"clone",subinfo:t.subinfo,selected:t.selected},t.textContent)}))};e.prototype.render=function(){var e;var t=this;var i=!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo;var r=(e={id:"selectbtn"},e["disabled"]=this.isDisabled,e["aria-controls"]="list",e["aria-labelledby"]="label selectbtn",e["aria-describedby"]="error",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return h(Host,{key:"f099ef79e70921c17419b2ce8a4e917a0579e44f",onBlur:function(e){return t.handleComponentBlur(e)}},h("div",{key:"e95c845dd404f5518b69145543113e69a40084a6",class:"wrapper ".concat(getTextDir()," label-").concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},h("div",{key:"65dfe5aaaa9239efb0553ba1d323f1c5dc93b9fb",class:"label-wrapper"},h("label",{key:"ff406b387e0cd09e46e239f1c80477fe2ee80f24",class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?h("span",{class:"required"},h("span",{class:"sr-only"},globalMessages.requiredField),h("span",{"aria-hidden":"true"},"*")):"")),h("div",{key:"5537fb10791108ac2bda53d3456ec048bb4cc5c4",class:"button-wrapper"},h("button",Object.assign({key:"7d54c69839a302ead990f41e961cce05be49f83d"},r,{class:"displayedoption",ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)},onFocus:function(){return t.close()}}),h("span",{key:"dcb786709b87be95c28bfcd37cc8459607939f2f",class:"overflowcontrol ".concat(i?"hassubinfo":"")},h("span",{key:"b04bbeab1666ebd4538c859356f1a3a33658c1c5",class:"button-text"},this.renderButtonText()),i&&h("span",{key:"c5e9911d91f34c9b7c5becaa9e1127e658fd4607",class:"subinfo"},this.selectedOptions[0].subinfo)),this.renderOverflowCount()),h("div",{key:"24c47d439f6b131880a8bffe94c40539fc13d78f",class:"dropdown ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},this.search&&this.renderSearchField(),this.visibleSelectAllButton&&this.renderSelectAllButton(),h("div",{key:"acf189fee5add7d0c6150b44ffd9c0c26e05ade7",id:"list",class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label",ref:function(e){return t.listboxEl=e}},this.search&&this.filteredOptions.length===0&&this.renderSearchFailedMessage(),this.multiple&&this.renderCloneOptions(),h("slot",{key:"ff17ced6e94d7b893c407ea00ab7243176973eb5"}))),h("div",{key:"a09f44fdf4a100f8eab7b5094fced276023812aa",id:"error",class:this.errorMessage?"error-message":""},this.errorMessage),h("div",{key:"9e55b5fdc2324b77d0a8bcf17650d937760dd941",id:"announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:function(e){return t.liveRegionEl=e}},this.announcement))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["announceError"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return e}();Select.style=WmSelectStyle0;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-558b5a82.js";import{i as intl,d as debounce,t as toBool,a as handleDisabledAttribute,k as shouldOpenUp,y as getTextDir}from"./functions-46843ea0.js";import{g as globalMessages}from"./intl-8b8740b9.js";var wmOptionCss=':host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}: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}.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-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background-selected);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){color:var(--wmcolor-select-option-text-disabled);background:var(--wmcolor-select-option-background-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host([aria-disabled=true]) .subinfo{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.clone.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;gap:16px}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:-ms-flexbox;display:flex}.option-text{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){outline:none;background:var(--wmcolor-select-option-background-hover)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}';var Option=function(){function e(e){registerInstance(this,e);this.wmOptionSelected=createEvent(this,"wmOptionSelected",7);this.wmOptionDeselected=createEvent(this,"wmOptionDeselected",7);this.intCloneClicked=createEvent(this,"intCloneClicked",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.wmEnterKeyPressed=createEvent(this,"wmEnterKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmOptionBlurred=createEvent(this,"wmOptionBlurred",7);this.value=undefined;this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false;this.searchTerm=""}Object.defineProperty(e.prototype,"hostClasses",{get:function(){var e=[];if(this.subinfo){e.push("hassubinfo")}if(this.parentSelectEl.multiple){e.push("multi-option")}if(!this.el.textContent.toLowerCase().includes(this.searchTerm)){e.push("filtered-out")}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"parentSelectEl",{get:function(){var e;return((e=this.el.parentElement)===null||e===void 0?void 0:e.nodeName)!=="WM-SELECT"?this.el.getRootNode().host:this.el.parentElement},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit(this.el);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"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;default:if(e.key.length===1){e.preventDefault();this.wmLetterPressed.emit({letter:e.key,optionEl:this.el})}}};e.prototype.handleSelection=function(){if(!this.disabled){if(this.el.classList.contains("clone")){this.intCloneClicked.emit(this.el)}else{if(this.parentSelectEl.multiple){this.selected?this.wmOptionDeselected.emit(this.el):this.wmOptionSelected.emit(this.el)}else{this.wmOptionSelected.emit(this.el)}}}};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.setAttribute("aria-selected","false")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};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.handleSearch=function(e){this.searchTerm=e.detail.searchTerm.toLowerCase();if(this.searchTerm&&this.el.textContent.toLowerCase().includes(this.searchTerm)){var t=this.el.textContent.toLowerCase().indexOf(this.searchTerm);var i=this.el.textContent.slice(0,t);var r=this.el.textContent.slice(t,t+this.searchTerm.length);var o=this.el.textContent.slice(t+this.searchTerm.length);var n=document.createElement("span");n.textContent=i;var s=document.createElement("strong");s.textContent=r;var a=document.createElement("span");a.textContent=o;this.textEl.innerHTML="";this.textEl.appendChild(n);this.textEl.appendChild(s);this.textEl.appendChild(a)}else{this.textEl.textContent=this.el.textContent}};e.prototype.componentWillLoad=function(){var e=this;this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick();this.parentSelectEl.addEventListener("wmSelectSearchChanged",(function(t){return e.handleSearch(t)}))};e.prototype.render=function(){var e=this;return h(Host,{role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},h("div",{class:"option-wrapper ".concat(this.parentSelectEl.multiple?"checkbox":"")},h("span",{class:"option-text","aria-hidden":"true",ref:function(t){return e.textEl=t}},this.el.textContent),h("span",{class:"sr-only"},this.el.textContent)),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"]}},enumerable:false,configurable:true});return e}();Option.style=wmOptionCss;var wmSelectCss=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);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:var(--wmcolor-text-required)}.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:var(--wmcolor-text-error)}.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 .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .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:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .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;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-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:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.wrapper .button-wrapper>.dropdown.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 .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.options-wrapper{max-height:12.5rem;overflow:auto}.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-selectall-border);background:var(--wmcolor-select-selectall-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-selectall-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-all:hover,.select-all:focus{outline:none;background:#f4f4f4}.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon: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:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .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){var t=this;registerInstance(this,e);this.wmSelectDidLoad=createEvent(this,"wmSelectDidLoad",7);this.wmSelectBlurred=createEvent(this,"wmSelectBlurred",7);this.wmSelectSearchChanged=createEvent(this,"wmSelectSearchChanged",7);this.wmSelectAllSelected=createEvent(this,"wmSelectAllSelected",7);this.wmSelectAllDeselected=createEvent(this,"wmSelectAllDeselected",7);this.selectAllMessage=intl.formatMessage({id:"select.selectAll",defaultMessage:"Select All"});this.deselectAllMessage=intl.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"});this.allOptionsSelectedMessage=intl.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"});this.allOptionsDeselectedMessage=intl.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"});this.keysSoFar="";this.searchIndex=0;this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.debouncedClearKeysSoFar=debounce((function(){t.keysSoFar=""}),500);this.debouncedSearch=debounce((function(){t.wmSelectSearchChanged.emit({searchTerm:t.searchTerm});if(t.filteredOptions.length){t.announce(t.resultsFoundMessage)}else{t.announce(t.noResultsFoundMessage)}}),150);this.disabled=false;this.maxHeight=undefined;this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage=undefined;this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=intl.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.searchPlaceholder=intl.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=intl.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isExpanded=false;this.announcement=""}Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"cloneOptions",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptionEls",{get:function(){return this.cloneOptions.concat(this.childOptions)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"visibleOptionEls",{get:function(){return this.allOptionEls.filter((function(e){return!e.classList.contains("hidden")&&!e.classList.contains("filtered-out")}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"searchTerm",{get:function(){return this.searchFieldEl?this.searchFieldEl.value:""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"filteredOptions",{get:function(){var e=this;return this.childOptions.filter((function(t){var i;return(i=t.textContent)===null||i===void 0?void 0:i.toLowerCase().includes(e.searchTerm.toLowerCase())}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allSelected",{get:function(){return this.childOptions.every((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"visibleSelectAllButton",{get:function(){return this.selectAll&&this.multiple&&this.searchTerm===""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"resultsFoundMessage",{get:function(){return intl.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"noResultsFoundMessage",{get:function(){return intl.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})},enumerable:false,configurable:true});e.prototype.handleOptionSelection=function(e){this.focusOption(e.detail);if(!this.multiple){this.close()}};e.prototype.handleOptionCloneSelection=function(e){var t=this.findCorrespondingOption(e.detail);t.click()};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.detail)};e.prototype.handleChildDown=function(e){this.moveDown(e.detail)};e.prototype.moveToFirstOption=function(){this.focusOption(this.visibleOptionEls[0])};e.prototype.moveToLastOption=function(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){if(!this.isElOrChild(e.detail.relatedTarget)){var t=new CustomEvent("blur");t.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(t)}};e.prototype.handleClick=function(e){if(!this.isElOrChild(e.target)){this.close()}};e.prototype.handleSelectAllClick=function(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()};e.prototype.selectAllOptions=function(){this.announce(this.allOptionsSelectedMessage);this.wmSelectAllSelected.emit()};e.prototype.deselectAllOptions=function(){this.announce(this.allOptionsDeselectedMessage);this.wmSelectAllDeselected.emit()};e.prototype.handleButtonBlur=function(e){if(this.isElOrChild(e.relatedTarget)){e.stopPropagation()}};e.prototype.handleSearchFieldBlur=function(e){this.searchFieldWrapperEl.classList.remove("focus");if(this.isElOrChild(e.relatedTarget)){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(){var e=this;if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}if(!this.multiple&&this.selectedOptions.length===0){console.error("wm-select should have one initial option selected")}handleDisabledAttribute(this.el,this.isDisabled);var t=new MutationObserver((function(t){return t.forEach((function(t){return e.handleChildChange(t)}))}));t.observe(this.el,{childList:true,attributes:true,subtree:true,attributeFilter:["selected"]})};e.prototype.handleChildChange=function(e){this.setButtonText();forceUpdate(this.el)};e.prototype.componentDidLoad=function(){this.wmSelectDidLoad.emit();this.dropdownEl.classList.add("hidden");forceUpdate(this.el);if(this.maxHeight){this.listboxEl.style.maxHeight=this.maxHeight}if(this.multiple){this.updateOptionVisibility()}this.setButtonText()};e.prototype.componentWillUpdate=function(){if(this.multiple){var e=this.visibleOptionEls.filter((function(e){return e.classList.contains("clone")}));var t=e.length===this.visibleOptionEls.length;e.forEach((function(i,r){if(!t&&r===e.length-1){i.classList.add("last")}else{i.classList.remove("last")}}))}};e.prototype.moveUp=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var i=t[t.indexOf(e)-1]||t[t.length-1];if(i){this.focusOption(i)}};e.prototype.moveDown=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var i=t[t.indexOf(e)+1]||t[0];if(i){this.focusOption(i)}};e.prototype.open=function(e){var t=this;if(!this.isDisabled){var i=this.el.clientHeight;var r=this.buttonEl.clientHeight;this.openUp=shouldOpenUp(this.el,this.dropdownEl.clientHeight,i,r);this.isExpanded=true;this.dropdownEl.classList.remove("hidden");window.requestAnimationFrame((function(){switch(e){case"next":if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else{t.moveDown(t.visibleOptionEls.filter((function(e){return e.selected})).slice(-1)[0])}break;case"previous":if(t.search){t.focusOption(t.visibleOptionEls[t.visibleOptionEls.length-1])}else{t.moveUp(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}break;default:if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else if(t.selectedOptions.length>0){t.focusOption(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}else{t.focusOption(t.visibleOptionEls[0])}break}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}if(this.isExpanded){this.isExpanded=false;this.allOptionEls.map((function(e){return e.focused=false}));window.setTimeout((function(){t.dropdownEl.classList.add("hidden");if(t.multiple){t.updateOptionVisibility()}if(t.search){t.searchFieldEl.value="";t.wmSelectSearchChanged.emit({searchTerm:t.searchTerm})}if(e){t.buttonEl.focus()}}),150)}};e.prototype.updateOptionVisibility=function(){var e=this;this.childOptions.forEach((function(t,i){var r=e.cloneOptions[i];if(t.selected){t.classList.add("hidden");r.classList.remove("hidden")}else{t.classList.remove("hidden");r.classList.add("hidden")}}))};e.prototype.focusOption=function(e){this.allOptionEls.forEach((function(t){return t.focused=t===e}));e.scrollIntoView({block:"nearest"});window.setTimeout((function(){return e.scrollIntoView({block:"nearest"})}),60);e.focus()};e.prototype.findAndFocusOption=function(e){var t=this;var i=e.detail.letter.toLowerCase();var r=e.detail.optionEl;if(!this.keysSoFar&&i==" "){r.click()}else{if(!this.keysSoFar){this.visibleOptionEls.forEach((function(e,i){if(e.focused){t.searchIndex=i}}))}this.keysSoFar+=i;var o=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);if(!o){o=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)}if(o){this.focusOption(o)}this.debouncedClearKeysSoFar()}};e.prototype.findMatchInRange=function(e,t,i){var r=this;var o=null;var n=e.slice(t,i);n.forEach((function(e){var t=e.textContent;if(!o&&t&&t.toLowerCase().startsWith(r.keysSoFar)){o=e}}));return o};e.prototype.findCorrespondingOption=function(e){var t=e.classList.contains("clone");return t?this.childOptions[this.cloneOptions.indexOf(e)]:this.cloneOptions[this.childOptions.indexOf(e)]};e.prototype.isElOrChild=function(e){var t;return e===this.el||this.el.contains(e)||((t=this.el.shadowRoot)===null||t===void 0?void 0:t.contains(e))};e.prototype.announceError=function(){var e=this;if(this.errorMessage){setTimeout((function(){return e.announce(e.errorMessage)}),100)}};e.prototype.handleDisabledChange=function(){handleDisabledAttribute(this.el,this.isDisabled)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit()}};e.prototype.handleKeyDown=function(e){var t=e.target;switch(e.key){case"ArrowDown":e.preventDefault();this.moveDown(e.target);break;case"ArrowUp":e.preventDefault();this.moveUp(e.target);break;case"Escape":e.preventDefault();this.close();break;case"Enter":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick();this.close()}break;case" ":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick()}break}};e.prototype.setButtonText=function(){var e=this;this.displayedOptions=this.childOptions.filter((function(e){return e.selected})).map((function(t){return!t.classList.contains("hidden")?t:e.findCorrespondingOption(t)}));if(this.multiple){var t=38;var i=window.getComputedStyle(this.buttonEl);var r=parseInt(i.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(i.getPropertyValue("padding-right").slice(0,-2));var n=this.buttonEl.clientWidth-r-o-t;var s=this.displayedOptions.map((function(e){return e.shadowRoot.querySelector(".option-text").clientWidth}));var a=s.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(a>n&&this.displayedOptions.length>1){this.overflowCount++;a-=s[s.length-1];s.pop();this.displayedOptions.pop()}}};e.prototype.announce=function(e){if(this.liveRegionEl.textContent===e){e+=" "}this.announcement=e};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedOptions.length<1){return h("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(e,t){return h("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return h("span",null,h("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.renderSearchField=function(){var e=this;return h("div",{class:"search"},h("div",{class:"searchfield-wrapper",ref:function(t){return e.searchFieldWrapperEl=t}},h("div",{class:"icon"}),h("input",{ref:function(t){return e.searchFieldEl=t},class:"searchfield",role:"combobox","aria-controls":"list","aria-expanded":this.isExpanded?"true":"false",onKeyDown:function(t){return e.handleKeyDown(t)},onFocus:function(){return e.searchFieldWrapperEl.classList.add("focus")},onBlur:function(t){return e.handleSearchFieldBlur(t)},onInput:function(){return e.debouncedSearch()},placeholder:this.searchPlaceholder})))};e.prototype.renderSearchFailedMessage=function(){return h("div",{class:"search-results-message"},this.noResultsFoundMessage)};e.prototype.renderSelectAllButton=function(){var e=this;return h("button",{ref:function(t){return e.selectAllEl=t},class:"select-all",onClick:function(){return e.handleSelectAllClick()},onKeyDown:function(t){return e.handleKeyDown(t)},tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)};e.prototype.renderCloneOptions=function(){return Array.from(this.el.children).map((function(e){var t=e;return h("wm-option",{class:"clone",subinfo:t.subinfo,selected:t.selected},t.textContent)}))};e.prototype.render=function(){var e;var t=this;var i=!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo;var r=(e={id:"selectbtn"},e["disabled"]=this.isDisabled,e["aria-controls"]="list",e["aria-labelledby"]="label selectbtn",e["aria-describedby"]="error",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.errorMessage?"invalid":"")},h("div",{class:"label-wrapper"},h("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?h("span",{class:"required"},h("span",{class:"sr-only"},globalMessages.requiredField),h("span",{"aria-hidden":"true"},"*")):"")),h("div",{class:"button-wrapper"},h("button",Object.assign({},r,{class:"displayedoption",ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)},onFocus:function(){return t.close()}}),h("span",{class:"overflowcontrol ".concat(i?"hassubinfo":"")},h("span",{class:"button-text"},this.renderButtonText()),i&&h("span",{class:"subinfo"},this.selectedOptions[0].subinfo)),this.renderOverflowCount()),h("div",{class:"dropdown ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},this.search&&this.renderSearchField(),this.visibleSelectAllButton&&this.renderSelectAllButton(),h("div",{id:"list",class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label",ref:function(e){return t.listboxEl=e}},this.search&&this.filteredOptions.length===0&&this.renderSearchFailedMessage(),this.multiple&&this.renderCloneOptions(),h("slot",null))),h("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage),h("div",{id:"announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:function(e){return t.liveRegionEl=e}},this.announcement))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["announceError"],disabled:["handleDisabledChange"]}},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(n,t,e){if(e||arguments.length===2)for(var a=0,i=t.length,r;a<i;a++){if(r||!(a in t)){if(!r)r=Array.prototype.slice.call(t,0,a);r[a]=t[a]}}return n.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-130e07bb.js";import{d as debounce}from"./functions-25781571.js";var wmPaginationCss=":host,wm-pagination{--wmcolor-pagination-arrow-disabled:var(--wmcolor-interactive-disabled);--wmcolor-pagination-arrow:var(--wmcolor-interactive);--wmcolor-pagination-arrow:var(--wmcolor-interactive);--wmcolor-pagination-button-text-disabled:var(--wmcolor-interactive-disabled);--wmcolor-pagination-button-text:var(--wmcolor-interactive);--wmcolor-pagination-current-background-hover:var(--wmcolor-interactive-hover);--wmcolor-pagination-current-background:var(--wmcolor-interactive);--wmcolor-pagination-current-text:var(--wmcolor-interactive-text);--wmcolor-pagination-focus:var(--wmcolor-interactive-focus);display:block}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;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:var(--wmcolor-pagination-button-text);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;border-radius:50%}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:var(--wmcolor-pagination-arrow)}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:var(--wmcolor-pagination-button-text-disabled);pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:var(--wmcolor-pagination-arrow-disabled)}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{width:auto !important;border-radius:unset;-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 .paginationbtn:focus-visible,nav .smallscreen .paginationbtn:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-2px}nav .largescreen .paginationbtn:focus-visible.previousbtn:before,nav .smallscreen .paginationbtn:focus-visible.previousbtn:before{left:0 !important}nav .largescreen .paginationbtn:focus-visible.nextbtn:before,nav .smallscreen .paginationbtn:focus-visible.nextbtn:before{left:0 !important}nav .largescreen .paginationbtn:focus-visible[aria-current=page],nav .largescreen .paginationbtn:focus-visible.previousbtn,nav .largescreen .paginationbtn:focus-visible.nextbtn,nav .smallscreen .paginationbtn:focus-visible[aria-current=page],nav .smallscreen .paginationbtn:focus-visible.previousbtn,nav .smallscreen .paginationbtn:focus-visible.nextbtn{outline-offset:2px}nav .largescreen :focus-visible:not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen :focus-visible: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 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);background:var(--wmcolor-pagination-current-background);color:var(--wmcolor-pagination-current-text)}nav .largescreen .paginationbtn[aria-current=page]:hover{background:var(--wmcolor-pagination-current-background-hover)}.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 WmPaginationStyle0=wmPaginationCss;var Pagination=function(){function n(n){var t=this;registerInstance(this,n);this.wmPaginationPageClicked=createEvent(this,"wmPaginationPageClicked",7);this.focusCurrentPage=createEvent(this,"focusCurrentPage",7);this.totalPages=0;this.debouncedResize=debounce((function(){return t.isLargeSize=t.el.clientWidth>500}),100);this.getMiddlePageNums=function(){var n;if(t.currentPage<4){n=[2,3,4]}else if(t.currentPage>t.totalPages-3){n=[t.totalPages-3,t.totalPages-2,t.totalPages-1]}else{n=[t.currentPage-1,t.currentPage,t.currentPage+1]}return n};this.currentPage=1;this.totalItems=undefined;this.itemsPerPage=undefined;this.value=1;this.isLargeSize=window.innerWidth>600;this.srAnnouncement=""}n.prototype.maintainFocusOnNumberChange=function(n){var t=this;window.requestAnimationFrame((function(){switch(n){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}}))};n.prototype.calculateTotalPages=function(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)};n.prototype.componentWillLoad=function(){var n=this;if(!this.totalItems||!this.itemsPerPage||!this.currentPage){throw new Error("Please check the required attributes")}this.calculateTotalPages();this.el.focus=function(){if(n.isLargeSize){n.el.shadowRoot.getElementById("wm-".concat(n.currentPage)).focus()}else{n.currentPage===1?n.el.shadowRoot.getElementById("next-arw").focus():n.el.shadowRoot.getElementById("wm-1-arw").focus()}};var t=new ResizeObserver((function(){return n.debouncedResize()}));t.observe(this.el)};n.prototype.updatePageDisplayed=function(n){this.value=n;this.wmPaginationPageClicked.emit();this.srAnnouncement="Current page, ".concat(this.currentPage,". ").concat(this.getCurrentPagesInView())};n.prototype.displayShortPagination=function(){var n=[];for(var t=1;t<=this.totalPages;t++){n.push(this.displayPageNumber(t))}return n};n.prototype.displayLongPagination=function(){var n=this;var t=__spreadArray(__spreadArray([this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis()],this.getMiddlePageNums().map((function(t){return n.displayPageNumber(t)})),true),[this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)],false);return t};n.prototype.displayPageNumber=function(n){var t=this;return h("button",{id:"wm-".concat(n),class:"paginationbtn",onClick:function(){t.currentPage=n;t.updatePageDisplayed(n);t.maintainFocusOnNumberChange("page")},value:n,"aria-label":this.currentPage!==n?"Go to page ".concat(n):"","aria-current":this.currentPage===n?"page":undefined},n)};n.prototype.displayEllipsis=function(){return h("span",{class:"ellipsis"},"...")};n.prototype.getCurrentPagesInView=function(){var n=this.itemsPerPage*this.currentPage;var t=n-this.itemsPerPage+1;if(n>this.totalItems){n=this.totalItems}return"Viewing "+(t===n?"".concat(t):"".concat(t,"–").concat(n," of ").concat(this.totalItems))};n.prototype.renderLarge=function(){var n=this;return h("div",{class:"largescreen"},h("div",{class:"pageview"},this.getCurrentPagesInView()),h("div",{class:"pagebtncontainer"},h("button",{id:"previous",class:"paginationbtn previousbtn",onClick:function(){n.currentPage=n.currentPage-1;n.updatePageDisplayed(n.currentPage);n.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(){n.currentPage=n.currentPage+1;n.updatePageDisplayed(n.currentPage);n.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))};n.prototype.renderSmall=function(){var n=this;return h("div",{class:"smallscreen"},h("div",{class:"pagebtncontainer"},h("button",{id:"wm-1-arw",class:"paginationbtn",onClick:function(){n.currentPage=1;n.updatePageDisplayed(1);n.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(){n.currentPage-=1;n.updatePageDisplayed(n.currentPage);n.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(){n.currentPage+=1;n.updatePageDisplayed(n.currentPage);n.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(){n.currentPage=n.totalPages;n.updatePageDisplayed(n.totalPages);n.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"})))))};n.prototype.render=function(){return this.totalItems>this.itemsPerPage&&h("nav",{key:"5c750d2aa90adcbb709fb5007862401e11e8d23d","aria-label":"Pagination Navigation. ".concat(this.getCurrentPagesInView(),". Current page, ").concat(this.currentPage,".")},this.isLargeSize?this.renderLarge():this.renderSmall(),h("div",{key:"be58da3d786e0ed7455b762f4273bbad08755196",id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))};Object.defineProperty(n,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}},enumerable:false,configurable:true});return n}();Pagination.style=WmPaginationStyle0;export{Pagination as wm_pagination};
1
+ var __spreadArray=this&&this.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var a=0,i=t.length,r;a<i;a++){if(r||!(a in t)){if(!r)r=Array.prototype.slice.call(t,0,a);r[a]=t[a]}}return n.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-558b5a82.js";import{d as debounce}from"./functions-46843ea0.js";var wmPaginationCss=":host,wm-pagination{--wmcolor-pagination-arrow-disabled:var(--wmcolor-interactive-disabled);--wmcolor-pagination-arrow:var(--wmcolor-interactive);--wmcolor-pagination-arrow:var(--wmcolor-interactive);--wmcolor-pagination-button-text-disabled:var(--wmcolor-interactive-disabled);--wmcolor-pagination-button-text:var(--wmcolor-interactive);--wmcolor-pagination-current-background-hover:var(--wmcolor-interactive-hover);--wmcolor-pagination-current-background:var(--wmcolor-interactive);--wmcolor-pagination-current-text:var(--wmcolor-interactive-text);--wmcolor-pagination-focus:var(--wmcolor-interactive-focus);display:block}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;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:var(--wmcolor-pagination-button-text);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;border-radius:50%}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:var(--wmcolor-pagination-arrow)}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:var(--wmcolor-pagination-button-text-disabled);pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:var(--wmcolor-pagination-arrow-disabled)}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{width:auto !important;border-radius:unset;-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 .paginationbtn:focus-visible,nav .smallscreen .paginationbtn:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-2px}nav .largescreen .paginationbtn:focus-visible.previousbtn:before,nav .smallscreen .paginationbtn:focus-visible.previousbtn:before{left:0 !important}nav .largescreen .paginationbtn:focus-visible.nextbtn:before,nav .smallscreen .paginationbtn:focus-visible.nextbtn:before{left:0 !important}nav .largescreen .paginationbtn:focus-visible[aria-current=page],nav .largescreen .paginationbtn:focus-visible.previousbtn,nav .largescreen .paginationbtn:focus-visible.nextbtn,nav .smallscreen .paginationbtn:focus-visible[aria-current=page],nav .smallscreen .paginationbtn:focus-visible.previousbtn,nav .smallscreen .paginationbtn:focus-visible.nextbtn{outline-offset:2px}nav .largescreen :focus-visible:not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen :focus-visible: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 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);background:var(--wmcolor-pagination-current-background);color:var(--wmcolor-pagination-current-text)}nav .largescreen .paginationbtn[aria-current=page]:hover{background:var(--wmcolor-pagination-current-background-hover)}.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 n(n){var t=this;registerInstance(this,n);this.wmPaginationPageClicked=createEvent(this,"wmPaginationPageClicked",7);this.focusCurrentPage=createEvent(this,"focusCurrentPage",7);this.totalPages=0;this.debouncedResize=debounce((function(){return t.isLargeSize=t.el.clientWidth>500}),100);this.getMiddlePageNums=function(){var n;if(t.currentPage<4){n=[2,3,4]}else if(t.currentPage>t.totalPages-3){n=[t.totalPages-3,t.totalPages-2,t.totalPages-1]}else{n=[t.currentPage-1,t.currentPage,t.currentPage+1]}return n};this.currentPage=1;this.totalItems=undefined;this.itemsPerPage=undefined;this.value=1;this.isLargeSize=window.innerWidth>600;this.srAnnouncement=""}n.prototype.maintainFocusOnNumberChange=function(n){var t=this;window.requestAnimationFrame((function(){switch(n){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}}))};n.prototype.calculateTotalPages=function(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)};n.prototype.componentWillLoad=function(){var n=this;if(!this.totalItems||!this.itemsPerPage||!this.currentPage){throw new Error("Please check the required attributes")}this.calculateTotalPages();this.el.focus=function(){if(n.isLargeSize){n.el.shadowRoot.getElementById("wm-".concat(n.currentPage)).focus()}else{n.currentPage===1?n.el.shadowRoot.getElementById("next-arw").focus():n.el.shadowRoot.getElementById("wm-1-arw").focus()}};var t=new ResizeObserver((function(){return n.debouncedResize()}));t.observe(this.el)};n.prototype.updatePageDisplayed=function(n){this.value=n;this.wmPaginationPageClicked.emit();this.srAnnouncement="Current page, ".concat(this.currentPage,". ").concat(this.getCurrentPagesInView())};n.prototype.displayShortPagination=function(){var n=[];for(var t=1;t<=this.totalPages;t++){n.push(this.displayPageNumber(t))}return n};n.prototype.displayLongPagination=function(){var n=this;var t=__spreadArray(__spreadArray([this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis()],this.getMiddlePageNums().map((function(t){return n.displayPageNumber(t)})),true),[this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)],false);return t};n.prototype.displayPageNumber=function(n){var t=this;return h("button",{id:"wm-".concat(n),class:"paginationbtn",onClick:function(){t.currentPage=n;t.updatePageDisplayed(n);t.maintainFocusOnNumberChange("page")},value:n,"aria-label":this.currentPage!==n?"Go to page ".concat(n):"","aria-current":this.currentPage===n?"page":undefined},n)};n.prototype.displayEllipsis=function(){return h("span",{class:"ellipsis"},"...")};n.prototype.getCurrentPagesInView=function(){var n=this.itemsPerPage*this.currentPage;var t=n-this.itemsPerPage+1;if(n>this.totalItems){n=this.totalItems}return"Viewing "+(t===n?"".concat(t):"".concat(t,"–").concat(n," of ").concat(this.totalItems))};n.prototype.renderLarge=function(){var n=this;return h("div",{class:"largescreen"},h("div",{class:"pageview"},this.getCurrentPagesInView()),h("div",{class:"pagebtncontainer"},h("button",{id:"previous",class:"paginationbtn previousbtn",onClick:function(){n.currentPage=n.currentPage-1;n.updatePageDisplayed(n.currentPage);n.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(){n.currentPage=n.currentPage+1;n.updatePageDisplayed(n.currentPage);n.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))};n.prototype.renderSmall=function(){var n=this;return h("div",{class:"smallscreen"},h("div",{class:"pagebtncontainer"},h("button",{id:"wm-1-arw",class:"paginationbtn",onClick:function(){n.currentPage=1;n.updatePageDisplayed(1);n.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(){n.currentPage-=1;n.updatePageDisplayed(n.currentPage);n.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(){n.currentPage+=1;n.updatePageDisplayed(n.currentPage);n.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(){n.currentPage=n.totalPages;n.updatePageDisplayed(n.totalPages);n.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"})))))};n.prototype.render=function(){return this.totalItems>this.itemsPerPage&&h("nav",{"aria-label":"Pagination Navigation. ".concat(this.getCurrentPagesInView(),". Current page, ").concat(this.currentPage,".")},this.isLargeSize?this.renderLarge():this.renderSmall(),h("div",{id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))};Object.defineProperty(n,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}},enumerable:false,configurable:true});return n}();Pagination.style=wmPaginationCss;export{Pagination as wm_pagination};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function i(e){try{p(o.next(e))}catch(e){a(e)}}function s(e){try{p(o["throw"](e))}catch(e){a(e)}}function p(e){e.done?r(e.value):n(e.value).then(i,s)}p((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return p([e,t])}}function p(s){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,s[0]&&(r=0)),r)try{if(o=1,n&&(a=s[0]&2?n["return"]:s[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;if(n=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1];a=s;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(s);break}if(a[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement,c as createEvent}from"./index-130e07bb.js";import{g as generateId,d as debounce,i as intl,x as csvToArray}from"./functions-25781571.js";import{a as allChartsDetails,h as handleChartKeydown,g as getDetails,r as removeSegmentInfoHighlight,c as renderStackedBar,d as renderDoughnut,e as renderInstructionsText,f as renderLegend,l as renderCompletionMessage,j as exitChart,m as renderLegendItem}from"./chartFunctions-a4c41273.js";var wmProgressIndicatorCss=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .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;outline:none;}:host .component-wrapper:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .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{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-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:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut2b label,:host .component-wrapper.doughnut2b .label-text,:host .component-wrapper.doughnut3 label,:host .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.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .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.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .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.bar{-ms-flex-direction:row;flex-direction:row}:host .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.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .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,:host .component-wrapper.bar2b,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2b .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2b .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .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{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .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 .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}:host #chart-instructions{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 .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{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.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}";var WmProgressIndicatorStyle0=wmProgressIndicatorCss;var ProgressIndicator=function(){function e(e){var t=this;registerInstance(this,e);this.uid=generateId();this.slicesDetails=[];this.barLabelsWidth=this.el.parentElement.barLabelsWidth;this.debouncedUpdate=debounce((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){forceUpdate(this.el);return[2]}))}))}),10);this.label=undefined;this.subinfo=undefined;this.completionMessage=undefined;this.showLegend=true;this.printMode=false;this.printModeFormat="amount";this.isTabbing=false;this.mode=undefined;this.userIsNavigating=false;this.focusedSliceId=undefined}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(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return this.mode?allChartsDetails[this.mode]:undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartRoleDescription",{get:function(){return intl.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})},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(t){return e.mode=t.detail}));var t=new ResizeObserver((function(){return e.debouncedUpdate()}));t.observe(this.el)};e.prototype.handleSliceUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getDetails.call(this,this.mode)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))};e.prototype.handleModeUpdate=function(){if(this.mode){getDetails.call(this,this.mode)}};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));removeSegmentInfoHighlight(r)}};e.prototype.renderBarOrDoughnut=function(){if(this.total>0&&this.mode==="bar"){return renderStackedBar.call(this,this.mode)}else{return renderDoughnut.call(this,this.mode)}};e.prototype.render=function(){var e=this;return h(Host,{key:"16620db2087213bc753d2d757c7790a41670b1ab",onBlur:function(){return exitChart.call(e)}},h("div",{key:"c676d6afdd78059bff7ae59f8ee275886e5bf22a",ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.mode," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""),role:"application","aria-label":this.ariaLabelText,tabindex:"0","aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},h("label",{key:"1b863341957baf0839d36be915d0aa632d03873f",id:"label-".concat(this.uid),class:"label ".concat(this.barLabelsWidth&&this.mode==="bar"?"custom-width":""),style:{"--custom-label-width":this.barLabelsWidth},htmlFor:"graphic-".concat(this.uid)},h("span",{key:"be37ff1bc3863b7603944139fd78a0d7a6884e46",class:"label-text"},this.label),this.subinfo?h("span",{class:"subinfo"},this.subinfo):""),this.mode&&this.renderBarOrDoughnut(),this.mode==="doughnut"?renderLegend.call(this,this.mode):"",h("priv-chart-popover",{key:"8541969e643c69fd8e0090f69efd7c038ea1e2ea",class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.mode==="doughnut"?renderCompletionMessage.call(this):""),renderInstructionsText())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});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=WmProgressIndicatorStyle0;var wmProgressMonitorCss=":host .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 .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 .legend-wrapper .legend.bar6{display:none}:host .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .legend-wrapper .legend .legend-item{position:relative}:host .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .legend-wrapper .legend .print-value{display:none}:host .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .legend-wrapper .legend .print-value{display:unset}}:host .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host{display:-ms-flexbox;display:flex}:host .legend-wrapper{-ms-flex-align:start;align-items:flex-start}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}:host(.column) .legend-wrapper{margin-bottom:2rem}:host(.column) .legend-wrapper .legend{padding-bottom:0}:host(.column) ::slotted(wm-progress-indicator:not(:last-of-type)){margin-bottom:2.5rem}";var WmProgressMonitorStyle0=wmProgressMonitorCss;var ProgressMonitor=function(){function e(e){var t=this;registerInstance(this,e);this.wmProgressMonitorModeChange=createEvent(this,"wmProgressMonitorModeChange",7);this.doughnutWidth=300;this.modeInitialized=false;this.debouncedUpdate=debounce((function(){return forceUpdate(t.el)}),50);this.breakpoint=undefined;this.groupLegend=undefined;this.barLabelsWidth=undefined}Object.defineProperty(e.prototype,"parsedBreakpoint",{get:function(){var e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);var t=e>=20?e:e*this.doughnutWidth;return t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"mode",{get:function(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return false},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDoughnut",{get:function(){return false},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var t=new ResizeObserver((function(){return e.debouncedUpdate()}));t.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 t=e.toString();var r=t.replace("px","");return parseInt(r)};e.prototype.renderLegend=function(){var e=this;var t=csvToArray(this.groupLegend);var r=allChartsDetails.bar.colors;return h("div",{class:"legend-wrapper"},h("div",{class:"legend"},t.map((function(t,o){var n={key:t,color:r[o]};return renderLegendItem.call(e,n)}))))};e.prototype.render=function(){return h(Host,{key:"6b654a2da62f9ca402ba16163e1d1497c5c99be8",class:this.mode==="doughnut"?"row":"column"},this.modeInitialized&&this.groupLegend&&this.mode==="bar"&&this.renderLegend(),this.modeInitialized&&h("slot",{key:"d3b70aa0e0c409bc0bcf2d6b20ad2b9c44c8eb11"}))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ProgressMonitor.style=WmProgressMonitorStyle0;var ProgressSlice=function(){function e(e){registerInstance(this,e);this.wmProgressSliceUpdated=createEvent(this,"wmProgressSliceUpdated",7);this.legend=undefined;this.amount=undefined;this.popoverTitle=undefined;this.popoverText=undefined;this.popoverButtonText=undefined}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,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function i(e){try{s(o.next(e))}catch(e){a(e)}}function p(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(i,p)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:p(0),throw:p(1),return:p(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function p(e){return function(t){return s([e,t])}}function s(p){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,p[0]&&(r=0)),r)try{if(o=1,n&&(a=p[0]&2?n["return"]:p[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,p[1])).done)return a;if(n=0,a)p=[p[0]&2,a.value];switch(p[0]){case 0:case 1:a=p;break;case 4:r.label++;return{value:p[1],done:false};case 5:r.label++;n=p[1];p=[0];continue;case 7:p=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){r.label=p[1];break}if(p[0]===6&&r.label<a[1]){r.label=a[1];a=p;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(p);break}if(a[2])r.ops.pop();r.trys.pop();continue}p=t.call(e,r)}catch(e){p=[6,e];n=0}finally{o=a=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement,c as createEvent}from"./index-558b5a82.js";import{g as generateId,d as debounce,i as intl,x as csvToArray}from"./functions-46843ea0.js";import{a as allChartsDetails,h as handleChartKeydown,g as getDetails,r as removeSegmentInfoHighlight,c as renderStackedBar,d as renderDoughnut,e as renderInstructionsText,f as renderLegend,l as renderCompletionMessage,j as exitChart,m as renderLegendItem}from"./chartFunctions-d3fd6e7c.js";var wmProgressIndicatorCss=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .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;outline:none;}:host .component-wrapper:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .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{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-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:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut2b label,:host .component-wrapper.doughnut2b .label-text,:host .component-wrapper.doughnut3 label,:host .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.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .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.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .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.bar{-ms-flex-direction:row;flex-direction:row}:host .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.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .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,:host .component-wrapper.bar2b,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2b .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2b .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .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{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .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 .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}:host #chart-instructions{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 .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{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.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}";var ProgressIndicator=function(){function e(e){var t=this;registerInstance(this,e);this.uid=generateId();this.slicesDetails=[];this.barLabelsWidth=this.el.parentElement.barLabelsWidth;this.debouncedUpdate=debounce((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){forceUpdate(this.el);return[2]}))}))}),10);this.label=undefined;this.subinfo=undefined;this.completionMessage=undefined;this.showLegend=true;this.printMode=false;this.printModeFormat="amount";this.isTabbing=false;this.mode=undefined;this.userIsNavigating=false;this.focusedSliceId=undefined}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(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return this.mode?allChartsDetails[this.mode]:undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartRoleDescription",{get:function(){return intl.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})},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(t){return e.mode=t.detail}));var t=new ResizeObserver((function(){return e.debouncedUpdate()}));t.observe(this.el)};e.prototype.handleSliceUpdate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getDetails.call(this,this.mode)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))};e.prototype.handleModeUpdate=function(){if(this.mode){getDetails.call(this,this.mode)}};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));removeSegmentInfoHighlight(r)}};e.prototype.renderBarOrDoughnut=function(){if(this.total>0&&this.mode==="bar"){return renderStackedBar.call(this,this.mode)}else{return renderDoughnut.call(this,this.mode)}};e.prototype.render=function(){var e=this;return h(Host,{onBlur:function(){return exitChart.call(e)}},h("div",{ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.mode," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""),role:"application","aria-label":this.ariaLabelText,tabindex:"0","aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},h("label",{id:"label-".concat(this.uid),class:"label ".concat(this.barLabelsWidth&&this.mode==="bar"?"custom-width":""),style:{"--custom-label-width":this.barLabelsWidth},htmlFor:"graphic-".concat(this.uid)},h("span",{class:"label-text"},this.label),this.subinfo?h("span",{class:"subinfo"},this.subinfo):""),this.mode&&this.renderBarOrDoughnut(),this.mode==="doughnut"?renderLegend.call(this,this.mode):"",h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.mode==="doughnut"?renderCompletionMessage.call(this):""),renderInstructionsText())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});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 .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 .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 .legend-wrapper .legend.bar6{display:none}:host .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .legend-wrapper .legend .legend-item{position:relative}:host .legend-wrapper .legend .legend-item.faded{opacity:0.3}:host .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .legend-wrapper .legend .print-value{display:none}:host .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .legend-wrapper .legend .print-value{display:unset}}:host .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host{display:-ms-flexbox;display:flex}:host .legend-wrapper{-ms-flex-align:start;align-items:flex-start}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}:host(.column) .legend-wrapper{margin-bottom:2rem}:host(.column) .legend-wrapper .legend{padding-bottom:0}:host(.column) ::slotted(wm-progress-indicator:not(:last-of-type)){margin-bottom:2.5rem}";var ProgressMonitor=function(){function e(e){var t=this;registerInstance(this,e);this.wmProgressMonitorModeChange=createEvent(this,"wmProgressMonitorModeChange",7);this.doughnutWidth=300;this.modeInitialized=false;this.debouncedUpdate=debounce((function(){return forceUpdate(t.el)}),50);this.breakpoint=undefined;this.groupLegend=undefined;this.barLabelsWidth=undefined}Object.defineProperty(e.prototype,"parsedBreakpoint",{get:function(){var e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);var t=e>=20?e:e*this.doughnutWidth;return t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"mode",{get:function(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return false},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDoughnut",{get:function(){return false},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var t=new ResizeObserver((function(){return e.debouncedUpdate()}));t.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 t=e.toString();var r=t.replace("px","");return parseInt(r)};e.prototype.renderLegend=function(){var e=this;var t=csvToArray(this.groupLegend);var r=allChartsDetails.bar.colors;return h("div",{class:"legend-wrapper"},h("div",{class:"legend"},t.map((function(t,o){var n={key:t,color:r[o]};return renderLegendItem.call(e,n)}))))};e.prototype.render=function(){return h(Host,{class:this.mode==="doughnut"?"row":"column"},this.modeInitialized&&this.groupLegend&&this.mode==="bar"&&this.renderLegend(),this.modeInitialized&&h("slot",null))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});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);this.legend=undefined;this.amount=undefined;this.popoverTitle=undefined;this.popoverText=undefined;this.popoverButtonText=undefined}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};