@watermarkinsights/ripple 5.6.0-8 → 5.6.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 (210) hide show
  1. package/dist/cjs/{chartFunctions-995023b1.js → chartFunctions-6fd43417.js} +1 -1
  2. package/dist/cjs/{functions-e24249e6.js → functions-04149f6d.js} +0 -6
  3. package/dist/cjs/{global-9662b435.js → global-4a315ae6.js} +1 -1
  4. package/dist/cjs/index-e86c28b6.js +0 -12
  5. package/dist/cjs/{intl-5aeba788.js → intl-b1e99809.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/priv-calendar.cjs.entry.js +1 -1
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
  9. package/dist/cjs/ripple.cjs.js +2 -2
  10. package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
  11. package/dist/cjs/wm-button.cjs.entry.js +1 -1
  12. package/dist/cjs/wm-chart.cjs.entry.js +3 -3
  13. package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
  14. package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
  15. package/dist/cjs/wm-file.cjs.entry.js +1 -1
  16. package/dist/cjs/wm-input.cjs.entry.js +2 -2
  17. package/dist/cjs/wm-line-chart.cjs.entry.js +10 -25
  18. package/dist/cjs/wm-modal-header.cjs.entry.js +2 -2
  19. package/dist/cjs/wm-modal.cjs.entry.js +1 -1
  20. package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
  21. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  22. package/dist/cjs/wm-option_2.cjs.entry.js +338 -33
  23. package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
  24. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  25. package/dist/cjs/wm-search.cjs.entry.js +2 -2
  26. package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
  27. package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
  28. package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
  29. package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
  30. package/dist/cjs/wm-textarea.cjs.entry.js +2 -2
  31. package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
  32. package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
  33. package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
  34. package/dist/collection/collection-manifest.json +2 -5
  35. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +7 -22
  36. package/dist/collection/components/wm-option/wm-option.js +9 -35
  37. package/dist/collection/components/wm-option/wm-option.spec.js +1 -1
  38. package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.css +74 -0
  39. package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.js +383 -16
  40. package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.spec.js +62 -62
  41. package/dist/collection/global/functions.js +0 -5
  42. package/dist/esm/{chartFunctions-dfcb1edf.js → chartFunctions-f5eb7f59.js} +1 -1
  43. package/dist/esm/{functions-b791a892.js → functions-cf37f81f.js} +1 -6
  44. package/dist/esm/{global-f1582c2f.js → global-016b76a8.js} +1 -1
  45. package/dist/esm/index-558b5a82.js +0 -12
  46. package/dist/esm/{intl-f2f7ce8b.js → intl-c72b75dc.js} +1 -1
  47. package/dist/esm/loader.js +2 -2
  48. package/dist/esm/priv-calendar.entry.js +1 -1
  49. package/dist/esm/priv-chart-popover.entry.js +1 -1
  50. package/dist/esm/ripple.js +2 -2
  51. package/dist/esm/wm-action-menu_2.entry.js +1 -1
  52. package/dist/esm/wm-button.entry.js +1 -1
  53. package/dist/esm/wm-chart.entry.js +3 -3
  54. package/dist/esm/wm-date-range.entry.js +1 -1
  55. package/dist/esm/wm-datepicker.entry.js +1 -1
  56. package/dist/esm/wm-file.entry.js +1 -1
  57. package/dist/esm/wm-input.entry.js +2 -2
  58. package/dist/esm/wm-line-chart.entry.js +10 -25
  59. package/dist/esm/wm-modal-header.entry.js +2 -2
  60. package/dist/esm/wm-modal.entry.js +1 -1
  61. package/dist/esm/wm-navigation_3.entry.js +2 -2
  62. package/dist/esm/wm-navigator.entry.js +1 -1
  63. package/dist/esm/wm-option_2.entry.js +338 -33
  64. package/dist/esm/wm-pagination.entry.js +1 -1
  65. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  66. package/dist/esm/wm-search.entry.js +2 -2
  67. package/dist/esm/wm-snackbar.entry.js +2 -2
  68. package/dist/esm/wm-tab-item_3.entry.js +1 -1
  69. package/dist/esm/wm-tag-input.entry.js +2 -2
  70. package/dist/esm/wm-tag-option.entry.js +1 -1
  71. package/dist/esm/wm-textarea.entry.js +2 -2
  72. package/dist/esm/wm-timepicker.entry.js +1 -1
  73. package/dist/esm/wm-toggletip.entry.js +1 -1
  74. package/dist/esm/wm-uploader.entry.js +2 -2
  75. package/dist/esm-es5/{chartFunctions-dfcb1edf.js → chartFunctions-f5eb7f59.js} +1 -1
  76. package/dist/esm-es5/{functions-b791a892.js → functions-cf37f81f.js} +1 -1
  77. package/dist/esm-es5/global-016b76a8.js +1 -0
  78. package/dist/esm-es5/index-558b5a82.js +1 -1
  79. package/dist/esm-es5/{intl-f2f7ce8b.js → intl-c72b75dc.js} +1 -1
  80. package/dist/esm-es5/loader.js +1 -1
  81. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  82. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  83. package/dist/esm-es5/ripple.js +1 -1
  84. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  85. package/dist/esm-es5/wm-button.entry.js +1 -1
  86. package/dist/esm-es5/wm-chart.entry.js +1 -1
  87. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  88. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  89. package/dist/esm-es5/wm-file.entry.js +1 -1
  90. package/dist/esm-es5/wm-input.entry.js +1 -1
  91. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  92. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  93. package/dist/esm-es5/wm-modal.entry.js +1 -1
  94. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  95. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  96. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  97. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  98. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  99. package/dist/esm-es5/wm-search.entry.js +1 -1
  100. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  101. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  102. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  103. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  104. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  105. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  106. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  107. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  108. package/dist/ripple/{p-c1e3c2fb.entry.js → p-04f9a60a.entry.js} +1 -1
  109. package/dist/ripple/{p-41550baa.entry.js → p-0b570b66.entry.js} +1 -1
  110. package/dist/ripple/{p-5300b15d.entry.js → p-0d05b4a9.entry.js} +1 -1
  111. package/dist/ripple/p-11aaef56.system.entry.js +1 -0
  112. package/dist/ripple/{p-b01f9998.system.entry.js → p-120dbdc8.system.entry.js} +1 -1
  113. package/dist/ripple/{p-f24572f5.entry.js → p-1aef4b40.entry.js} +1 -1
  114. package/dist/ripple/{p-13f51c06.entry.js → p-20a800a7.entry.js} +1 -1
  115. package/dist/ripple/{p-236af552.entry.js → p-24103be5.entry.js} +1 -1
  116. package/dist/ripple/{p-1389302e.system.entry.js → p-2ccf8450.system.entry.js} +1 -1
  117. package/dist/ripple/{p-6cc07645.system.entry.js → p-2d0bcc88.system.entry.js} +1 -1
  118. package/dist/ripple/{p-0b1c6965.system.entry.js → p-2d0e4020.system.entry.js} +1 -1
  119. package/dist/ripple/{p-215793a4.entry.js → p-31094930.entry.js} +1 -1
  120. package/dist/ripple/{p-1e625a5e.entry.js → p-3ea0e27c.entry.js} +1 -1
  121. package/dist/ripple/{p-db9657eb.system.entry.js → p-446e0b2c.system.entry.js} +1 -1
  122. package/dist/ripple/{p-72165bd2.entry.js → p-451433a6.entry.js} +1 -1
  123. package/dist/ripple/p-481a9e2f.system.js +1 -0
  124. package/dist/ripple/{p-45f9ad09.entry.js → p-508362c5.entry.js} +1 -1
  125. package/dist/ripple/{p-3deaf4d9.system.entry.js → p-53519eed.system.entry.js} +1 -1
  126. package/dist/ripple/p-55668879.system.js +1 -0
  127. package/dist/ripple/p-5967bd2a.system.entry.js +1 -0
  128. package/dist/ripple/{p-5a9e3108.system.entry.js → p-5db92638.system.entry.js} +1 -1
  129. package/dist/ripple/{p-3e415c49.system.entry.js → p-5f793375.system.entry.js} +1 -1
  130. package/dist/ripple/p-6636a40b.system.entry.js +1 -0
  131. package/dist/ripple/{p-f90e4094.entry.js → p-6f4c4231.entry.js} +1 -1
  132. package/dist/ripple/{p-828adbf1.system.js → p-74032162.system.js} +1 -1
  133. package/dist/ripple/{p-5284791c.entry.js → p-762429a8.entry.js} +1 -1
  134. package/dist/ripple/{p-16f65bf4.js → p-76825602.js} +1 -1
  135. package/dist/ripple/{p-c47fab48.entry.js → p-76d53189.entry.js} +1 -1
  136. package/dist/ripple/{p-fa4f1030.system.entry.js → p-7f483c55.system.entry.js} +1 -1
  137. package/dist/ripple/{p-a3c01e10.system.entry.js → p-7fdcce90.system.entry.js} +1 -1
  138. package/dist/ripple/{p-cad0c5f9.system.entry.js → p-8008f0f2.system.entry.js} +1 -1
  139. package/dist/ripple/{p-3d50db36.entry.js → p-86d81e42.entry.js} +1 -1
  140. package/dist/ripple/{p-f2101a0d.entry.js → p-8a11ee6f.entry.js} +1 -1
  141. package/dist/ripple/{p-c2e00d4a.system.entry.js → p-8b272d80.system.entry.js} +1 -1
  142. package/dist/ripple/{p-885c3527.entry.js → p-9603168d.entry.js} +1 -1
  143. package/dist/ripple/{p-f40e1468.system.entry.js → p-97f276aa.system.entry.js} +1 -1
  144. package/dist/ripple/{p-749597da.system.entry.js → p-984287f7.system.entry.js} +1 -1
  145. package/dist/ripple/{p-ff1ed90f.entry.js → p-9b75d56c.entry.js} +1 -1
  146. package/dist/ripple/{p-a0ecb6d7.system.entry.js → p-9df3574d.system.entry.js} +1 -1
  147. package/dist/ripple/p-a40b0af9.system.js +1 -0
  148. package/dist/ripple/p-a895f1ef.entry.js +1 -0
  149. package/dist/ripple/{p-e081fdc2.system.entry.js → p-ae4460f2.system.entry.js} +1 -1
  150. package/dist/ripple/{p-b9dbf1f4.entry.js → p-bd142645.entry.js} +1 -1
  151. package/dist/ripple/{p-aea13873.entry.js → p-c61366fd.entry.js} +1 -1
  152. package/dist/ripple/{p-ca971eac.system.entry.js → p-c9200deb.system.entry.js} +1 -1
  153. package/dist/ripple/{p-6d129ef8.system.entry.js → p-cd51ee87.system.entry.js} +1 -1
  154. package/dist/ripple/{p-465d44f0.system.entry.js → p-ce8c6180.system.entry.js} +1 -1
  155. package/dist/ripple/{p-84ba5b74.entry.js → p-d0387d35.entry.js} +1 -1
  156. package/dist/ripple/{p-ed1f6b8d.system.entry.js → p-d8994408.system.entry.js} +1 -1
  157. package/dist/ripple/{p-eddbcb21.js → p-db190563.js} +1 -1
  158. package/dist/ripple/{p-83be63f6.entry.js → p-db8917e4.entry.js} +1 -1
  159. package/dist/ripple/{p-505eca1c.system.entry.js → p-dc7a6037.system.entry.js} +1 -1
  160. package/dist/ripple/p-dfd1b720.entry.js +1 -0
  161. package/dist/ripple/{p-df157138.entry.js → p-e3899e1f.entry.js} +1 -1
  162. package/dist/ripple/{p-30b905eb.system.entry.js → p-ed1971ff.system.entry.js} +1 -1
  163. package/dist/ripple/{p-2e79fa49.entry.js → p-f177d841.entry.js} +1 -1
  164. package/dist/ripple/{p-149a22bf.entry.js → p-f4b64ded.entry.js} +1 -1
  165. package/dist/ripple/p-f9494a9d.js +1 -0
  166. package/dist/ripple/{p-21d372ed.js → p-fb229776.js} +1 -1
  167. package/dist/ripple/{p-81c2df85.system.js → p-fb751343.system.js} +1 -1
  168. package/dist/ripple/{p-c853e185.system.entry.js → p-ffa15c47.system.entry.js} +1 -1
  169. package/dist/ripple/ripple.esm.js +1 -1
  170. package/dist/ripple/ripple.js +1 -1
  171. package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +1 -1
  172. package/dist/types/components/wm-option/wm-option.d.ts +39 -0
  173. package/dist/types/components/wm-select/wm-select.d.ts +96 -0
  174. package/dist/types/components.d.ts +2 -148
  175. package/dist/types/global/functions.d.ts +0 -1
  176. package/package.json +2 -2
  177. package/dist/cjs/priv-option-list.cjs.entry.js +0 -384
  178. package/dist/cjs/wm-nested-select.cjs.entry.js +0 -295
  179. package/dist/cjs/wm-optgroup.cjs.entry.js +0 -56
  180. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +0 -104
  181. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +0 -714
  182. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +0 -378
  183. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +0 -581
  184. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +0 -77
  185. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +0 -197
  186. package/dist/collection/dev/nested-select.js +0 -62
  187. package/dist/esm/priv-option-list.entry.js +0 -380
  188. package/dist/esm/wm-nested-select.entry.js +0 -291
  189. package/dist/esm/wm-optgroup.entry.js +0 -52
  190. package/dist/esm-es5/global-f1582c2f.js +0 -1
  191. package/dist/esm-es5/priv-option-list.entry.js +0 -1
  192. package/dist/esm-es5/wm-nested-select.entry.js +0 -1
  193. package/dist/esm-es5/wm-optgroup.entry.js +0 -1
  194. package/dist/ripple/p-104c0e9b.system.entry.js +0 -1
  195. package/dist/ripple/p-17c8aac1.system.entry.js +0 -1
  196. package/dist/ripple/p-24ba754f.entry.js +0 -1
  197. package/dist/ripple/p-2fb58947.entry.js +0 -1
  198. package/dist/ripple/p-4564a101.system.entry.js +0 -1
  199. package/dist/ripple/p-4ca5ed96.entry.js +0 -1
  200. package/dist/ripple/p-50388b6f.system.entry.js +0 -1
  201. package/dist/ripple/p-5b9babd9.system.entry.js +0 -1
  202. package/dist/ripple/p-8835adfb.entry.js +0 -1
  203. package/dist/ripple/p-ae82b3d2.system.js +0 -1
  204. package/dist/ripple/p-ba422994.entry.js +0 -1
  205. package/dist/ripple/p-bfeb6ef8.system.js +0 -1
  206. package/dist/ripple/p-cf2121f3.system.entry.js +0 -1
  207. package/dist/ripple/p-cf55659f.js +0 -1
  208. package/dist/ripple/p-f6fd623f.system.js +0 -1
  209. package/dist/types/components/selects/wm-select/wm-select.d.ts +0 -53
  210. /package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.e2e.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, f as forceUpdate } from './index-558b5a82.js';
2
- import { i as intl, t as toBool, z as isElOrChild, a as handleDisabledAttribute, k as shouldOpenUp, y as getTextDir } from './functions-b791a892.js';
3
- import { g as globalMessages } from './intl-f2f7ce8b.js';
2
+ import { i as intl, d as debounce, t as toBool, a as handleDisabledAttribute, k as shouldOpenUp, y as getTextDir } from './functions-cf37f81f.js';
3
+ import { g as globalMessages } from './intl-c72b75dc.js';
4
4
 
5
5
  const 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}";
6
6
 
@@ -12,7 +12,6 @@ const Option = class {
12
12
  this.intCloneClicked = createEvent(this, "intCloneClicked", 7);
13
13
  this.wmKeyUpPressed = createEvent(this, "wmKeyUpPressed", 7);
14
14
  this.wmKeyDownPressed = createEvent(this, "wmKeyDownPressed", 7);
15
- this.wmKeyLeftPressed = createEvent(this, "wmKeyLeftPressed", 7);
16
15
  this.wmEscKeyPressed = createEvent(this, "wmEscKeyPressed", 7);
17
16
  this.wmHomeKeyPressed = createEvent(this, "wmHomeKeyPressed", 7);
18
17
  this.wmEndKeyPressed = createEvent(this, "wmEndKeyPressed", 7);
@@ -31,7 +30,7 @@ const Option = class {
31
30
  if (this.subinfo) {
32
31
  classes.push("hassubinfo");
33
32
  }
34
- if (this.parentOptionList.multiple) {
33
+ if (this.parentSelectEl.multiple) {
35
34
  classes.push("multi-option");
36
35
  }
37
36
  if (!this.el.textContent.toLowerCase().includes(this.searchTerm)) {
@@ -39,13 +38,11 @@ const Option = class {
39
38
  }
40
39
  return classes.join(" ");
41
40
  }
42
- get parentOptionList() {
43
- if (this.el.classList.contains("clone")) {
44
- return this.el.closest("priv-option-list");
45
- }
46
- else {
47
- return this.el.assignedSlot.closest("priv-option-list");
48
- }
41
+ get parentSelectEl() {
42
+ var _a;
43
+ return ((_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.nodeName) !== "WM-SELECT"
44
+ ? this.el.getRootNode().host
45
+ : this.el.parentElement;
49
46
  }
50
47
  handleKeydown(ev) {
51
48
  switch (ev.key) {
@@ -77,10 +74,6 @@ const Option = class {
77
74
  ev.preventDefault();
78
75
  this.wmEndKeyPressed.emit();
79
76
  break;
80
- case "ArrowLeft":
81
- ev.preventDefault();
82
- this.wmKeyLeftPressed.emit(this.el);
83
- break;
84
77
  default:
85
78
  if (ev.key.length === 1) {
86
79
  ev.preventDefault();
@@ -96,7 +89,7 @@ const Option = class {
96
89
  this.intCloneClicked.emit(this.el); // used to then emit wmOptionSelected from the "real" wm-option
97
90
  }
98
91
  else {
99
- if (this.parentOptionList.multiple) {
92
+ if (this.parentSelectEl.multiple) {
100
93
  this.selected
101
94
  ? this.wmOptionDeselected.emit(this.el)
102
95
  : this.wmOptionSelected.emit(this.el);
@@ -158,10 +151,10 @@ const Option = class {
158
151
  this.syncAriaSelected();
159
152
  this.syncAriaDisabled();
160
153
  this.updateDisabledOnClick();
161
- this.parentOptionList.addEventListener("optionListSearchChanged", (ev) => this.handleSearch(ev));
154
+ this.parentSelectEl.addEventListener("wmSelectSearchChanged", (ev) => this.handleSearch(ev));
162
155
  }
163
156
  render() {
164
- return (h(Host, { role: "option", tabindex: this.focused ? 0 : -1, class: this.hostClasses }, h("div", { class: `option-wrapper ${this.parentOptionList.multiple ? "checkbox" : ""}` }, h("span", { class: "option-text", "aria-hidden": "true", ref: (el) => (this.textEl = el) }, this.el.textContent), h("span", { class: "sr-only" }, this.el.textContent)), h("div", { class: "subinfo" }, this.subinfo)));
157
+ return (h(Host, { role: "option", tabindex: this.focused ? 0 : -1, class: this.hostClasses }, h("div", { class: `option-wrapper ${this.parentSelectEl.multiple ? "checkbox" : ""}` }, h("span", { class: "option-text", "aria-hidden": "true", ref: (el) => (this.textEl = el) }, this.el.textContent), h("span", { class: "sr-only" }, this.el.textContent)), h("div", { class: "subinfo" }, this.subinfo)));
165
158
  }
166
159
  get el() { return getElement(this); }
167
160
  static get watchers() { return {
@@ -171,20 +164,52 @@ const Option = class {
171
164
  };
172
165
  Option.style = wmOptionCss;
173
166
 
174
- const 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}.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}";
167
+ const 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}";
175
168
 
176
169
  const Select = class {
177
170
  constructor(hostRef) {
178
171
  registerInstance(this, hostRef);
179
172
  this.wmSelectDidLoad = createEvent(this, "wmSelectDidLoad", 7);
180
173
  this.wmSelectBlurred = createEvent(this, "wmSelectBlurred", 7);
174
+ this.wmSelectSearchChanged = createEvent(this, "wmSelectSearchChanged", 7);
181
175
  this.wmSelectAllSelected = createEvent(this, "wmSelectAllSelected", 7);
182
176
  this.wmSelectAllDeselected = createEvent(this, "wmSelectAllDeselected", 7);
177
+ this.selectAllMessage = intl.formatMessage({
178
+ id: "select.selectAll",
179
+ defaultMessage: "Select All",
180
+ });
181
+ this.deselectAllMessage = intl.formatMessage({
182
+ id: "select.deselectAll",
183
+ defaultMessage: "Deselect All",
184
+ });
185
+ this.allOptionsSelectedMessage = intl.formatMessage({
186
+ id: "select.allOptionsSelected",
187
+ defaultMessage: "All options selected",
188
+ });
189
+ this.allOptionsDeselectedMessage = intl.formatMessage({
190
+ id: "select.allOptionsDeselected",
191
+ defaultMessage: "All options deselected",
192
+ });
193
+ this.keysSoFar = "";
194
+ this.searchIndex = 0;
183
195
  this.openUp = false;
184
196
  //////////////////////////////////////
197
+ //////////////////////////////////////
185
198
  // for multiselect button text
186
199
  this.overflowCount = 0;
187
200
  this.displayedOptions = [];
201
+ this.debouncedClearKeysSoFar = debounce(() => {
202
+ this.keysSoFar = "";
203
+ }, 500);
204
+ this.debouncedSearch = debounce(() => {
205
+ this.wmSelectSearchChanged.emit({ searchTerm: this.searchTerm });
206
+ if (this.filteredOptions.length) {
207
+ this.announce(this.resultsFoundMessage);
208
+ }
209
+ else {
210
+ this.announce(this.noResultsFoundMessage);
211
+ }
212
+ }, 150);
188
213
  this.disabled = false;
189
214
  this.maxHeight = undefined;
190
215
  this.label = undefined;
@@ -215,33 +240,85 @@ const Select = class {
215
240
  get childOptions() {
216
241
  return Array.from(this.el.querySelectorAll("wm-option"));
217
242
  }
243
+ get cloneOptions() {
244
+ return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"));
245
+ }
246
+ get allOptionEls() {
247
+ // this includes both slotted wm-options and internally created wm-options
248
+ return this.cloneOptions.concat(this.childOptions);
249
+ }
250
+ get visibleOptionEls() {
251
+ return this.allOptionEls.filter((option) => !option.classList.contains("hidden") && !option.classList.contains("filtered-out"));
252
+ }
218
253
  get isDisabled() {
219
254
  // string "false" needs to be treated as bool False because react wrappers convert bool to string.
220
255
  return toBool(this.disabled);
221
256
  }
257
+ //////////////////////////////////////
258
+ // for search variants
259
+ get searchTerm() {
260
+ return this.searchFieldEl ? this.searchFieldEl.value : "";
261
+ }
262
+ get filteredOptions() {
263
+ return this.childOptions.filter((option) => { var _a; return (_a = option.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(this.searchTerm.toLowerCase()); });
264
+ }
222
265
  get selectedOptions() {
223
266
  return Array.from(this.el.querySelectorAll("wm-option")).filter((x) => x.selected);
224
267
  }
225
268
  get allSelected() {
226
269
  return this.childOptions.every((option) => option.selected);
227
270
  }
271
+ get visibleSelectAllButton() {
272
+ return this.selectAll && this.multiple && this.searchTerm === "";
273
+ }
228
274
  //////////////////////////////////////
229
- handleOptionSelection() {
275
+ get resultsFoundMessage() {
276
+ return intl.formatMessage({
277
+ id: "select.searchResultsFound",
278
+ defaultMessage: "{numResults, plural, one {1 option found} other {# options found}}",
279
+ description: "The message read by the screen reader, indicating how many results a search returned",
280
+ }, { numResults: this.filteredOptions.length });
281
+ }
282
+ get noResultsFoundMessage() {
283
+ return intl.formatMessage({
284
+ id: "select.noSearchResults",
285
+ defaultMessage: "No results found. Please try your search again.",
286
+ description: "The message displayed when no options pass the search filter",
287
+ });
288
+ }
289
+ handleOptionSelection(ev) {
290
+ this.focusOption(ev.detail);
230
291
  if (!this.multiple) {
231
292
  this.close();
232
293
  }
233
294
  }
295
+ handleOptionCloneSelection(ev) {
296
+ const correspondingOption = this.findCorrespondingOption(ev.detail);
297
+ correspondingOption.click();
298
+ }
234
299
  handleChildEnter() {
235
300
  // only occurs for multiselects. handle the click, then close
236
301
  this.close();
237
302
  }
303
+ handleChildUp(ev) {
304
+ this.moveUp(ev.detail);
305
+ }
306
+ handleChildDown(ev) {
307
+ this.moveDown(ev.detail);
308
+ }
309
+ moveToFirstOption() {
310
+ this.focusOption(this.visibleOptionEls[0]);
311
+ }
312
+ moveToLastOption() {
313
+ this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
314
+ }
238
315
  closePopupOnEscape() {
239
316
  this.close();
240
317
  }
241
318
  handleOptionBlur(ev) {
242
319
  // if the Option is blurred to something other than the component emit a blur event with the appropriate relatedTarget
243
320
  // keeps our component's blur events accurate, and closes when focusing browser address bar
244
- if (!isElOrChild(this.el, ev.detail.relatedTarget)) {
321
+ if (!this.isElOrChild(ev.detail.relatedTarget)) {
245
322
  const event = new CustomEvent("blur");
246
323
  // @ts-ignore
247
324
  event.relatedTarget = ev.detail.relatedTarget;
@@ -249,16 +326,34 @@ const Select = class {
249
326
  }
250
327
  }
251
328
  handleClick(ev) {
252
- if (!isElOrChild(this.el, ev.target)) {
329
+ if (!this.isElOrChild(ev.target)) {
253
330
  this.close();
254
331
  }
255
332
  }
333
+ handleSelectAllClick() {
334
+ this.allSelected ? this.deselectAllOptions() : this.selectAllOptions();
335
+ }
336
+ selectAllOptions() {
337
+ this.announce(this.allOptionsSelectedMessage);
338
+ this.wmSelectAllSelected.emit();
339
+ }
340
+ deselectAllOptions() {
341
+ this.announce(this.allOptionsDeselectedMessage);
342
+ this.wmSelectAllDeselected.emit();
343
+ }
256
344
  handleButtonBlur(ev) {
257
- if (isElOrChild(this.el, ev.relatedTarget)) {
345
+ if (this.isElOrChild(ev.relatedTarget)) {
258
346
  // do not emit a blur event when opening the dropdown and focusing the Options
259
347
  ev.stopPropagation();
260
348
  }
261
349
  }
350
+ handleSearchFieldBlur(ev) {
351
+ this.searchFieldWrapperEl.classList.remove("focus");
352
+ if (this.isElOrChild(ev.relatedTarget)) {
353
+ // do not emit a blur event when moving from searchfield to options
354
+ ev.stopPropagation();
355
+ }
356
+ }
262
357
  handleKey(ev) {
263
358
  switch (ev.key) {
264
359
  case "ArrowDown":
@@ -295,7 +390,6 @@ const Select = class {
295
390
  // on update of children or children selected state, reset button text and rerender
296
391
  this.setButtonText();
297
392
  forceUpdate(this.el);
298
- this.optionListEl.handleChildChange(_);
299
393
  }
300
394
  componentDidLoad() {
301
395
  this.wmSelectDidLoad.emit();
@@ -303,11 +397,55 @@ const Select = class {
303
397
  forceUpdate(this.el);
304
398
  // Dev can overwrite the max-height rule set in the Sass file
305
399
  if (this.maxHeight) {
306
- // this.listboxEl.style.maxHeight = this.maxHeight;
307
- this.dropdownEl.style.maxHeight = this.maxHeight;
400
+ this.listboxEl.style.maxHeight = this.maxHeight;
401
+ }
402
+ if (this.multiple) {
403
+ this.updateOptionVisibility();
308
404
  }
309
405
  this.setButtonText();
310
406
  }
407
+ componentWillUpdate() {
408
+ if (this.multiple) {
409
+ // find last visible clone option and apply .last class
410
+ const visibleCloneOptions = this.visibleOptionEls.filter((option) => option.classList.contains("clone"));
411
+ // if all options are clones, nothing to separate from
412
+ const allClones = visibleCloneOptions.length === this.visibleOptionEls.length;
413
+ visibleCloneOptions.forEach((option, idx) => {
414
+ if (!allClones && idx === visibleCloneOptions.length - 1) {
415
+ option.classList.add("last");
416
+ }
417
+ else {
418
+ option.classList.remove("last");
419
+ }
420
+ });
421
+ }
422
+ }
423
+ moveUp(el) {
424
+ const focusableEls = this.visibleOptionEls;
425
+ if (this.selectAllEl) {
426
+ focusableEls.unshift(this.selectAllEl);
427
+ }
428
+ if (this.searchFieldEl) {
429
+ focusableEls.unshift(this.searchFieldEl);
430
+ }
431
+ const prevEl = focusableEls[focusableEls.indexOf(el) - 1] || focusableEls[focusableEls.length - 1];
432
+ if (prevEl) {
433
+ this.focusOption(prevEl);
434
+ }
435
+ }
436
+ moveDown(el) {
437
+ const focusableEls = this.visibleOptionEls;
438
+ if (this.selectAllEl) {
439
+ focusableEls.unshift(this.selectAllEl);
440
+ }
441
+ if (this.searchFieldEl) {
442
+ focusableEls.unshift(this.searchFieldEl);
443
+ }
444
+ const nextEl = focusableEls[focusableEls.indexOf(el) + 1] || focusableEls[0];
445
+ if (nextEl) {
446
+ this.focusOption(nextEl);
447
+ }
448
+ }
311
449
  open(optionToSelect) {
312
450
  if (!this.isDisabled) {
313
451
  const elHeight = this.el.clientHeight;
@@ -320,22 +458,60 @@ const Select = class {
320
458
  this.isExpanded = true;
321
459
  this.dropdownEl.classList.remove("hidden");
322
460
  window.requestAnimationFrame(() => {
323
- this.optionListEl.handleInitialFocus(optionToSelect);
461
+ switch (optionToSelect) {
462
+ case "next":
463
+ // search variant focuses search field
464
+ // all others focus option "after" last selected option (this can be the first option)
465
+ if (this.search) {
466
+ this.searchFieldEl.focus();
467
+ this.listboxEl.scrollTop = 0;
468
+ }
469
+ else {
470
+ this.moveDown(this.visibleOptionEls.filter((x) => x.selected).slice(-1)[0]);
471
+ }
472
+ break;
473
+ case "previous":
474
+ // search variant focuses last option
475
+ // all others focus option "above" first selected option (this can be the last option)
476
+ if (this.search) {
477
+ this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length - 1]);
478
+ }
479
+ else {
480
+ this.moveUp(this.visibleOptionEls.filter((x) => x.selected)[0]);
481
+ }
482
+ break;
483
+ default:
484
+ // search variant focuses search field
485
+ // all others focus the selected option
486
+ // if no option is selected (empty multiselect), focuses first option
487
+ if (this.search) {
488
+ this.searchFieldEl.focus();
489
+ this.listboxEl.scrollTop = 0;
490
+ }
491
+ else if (this.selectedOptions.length > 0) {
492
+ this.focusOption(this.visibleOptionEls.filter((x) => x.selected)[0]);
493
+ }
494
+ else {
495
+ this.focusOption(this.visibleOptionEls[0]);
496
+ }
497
+ break;
498
+ }
324
499
  });
325
500
  }
326
501
  }
327
502
  close(returnFocus = true) {
328
503
  if (this.isExpanded) {
329
504
  this.isExpanded = false;
330
- this.optionListEl.unfocusAll();
505
+ this.allOptionEls.map((i) => (i.focused = false));
331
506
  window.setTimeout(() => {
332
507
  this.dropdownEl.classList.add("hidden");
333
- if (this.optionListEl.multiple) {
334
- this.optionListEl.updateOptionVisibility();
508
+ if (this.multiple) {
509
+ this.updateOptionVisibility();
335
510
  }
336
511
  // clear search field, reset filtered / bolded state of wm-options
337
512
  if (this.search) {
338
- this.optionListEl.clearSearch();
513
+ this.searchFieldEl.value = "";
514
+ this.wmSelectSearchChanged.emit({ searchTerm: this.searchTerm });
339
515
  }
340
516
  // Returns focus to button after popup closes (no need if user is tabbing)
341
517
  // Delay is necessary for screenreader to get new expanded state before focus
@@ -347,6 +523,87 @@ const Select = class {
347
523
  }, 150);
348
524
  }
349
525
  }
526
+ updateOptionVisibility() {
527
+ // this runs for search multiselects, where selected options are rendered at the top of the dropdown list
528
+ // slotted wm-options are hidden if selected, and clone wm-options are made visible if selected
529
+ this.childOptions.forEach((option, idx) => {
530
+ const cloneOption = this.cloneOptions[idx];
531
+ if (option.selected) {
532
+ option.classList.add("hidden");
533
+ cloneOption.classList.remove("hidden");
534
+ }
535
+ else {
536
+ option.classList.remove("hidden");
537
+ cloneOption.classList.add("hidden");
538
+ }
539
+ });
540
+ }
541
+ focusOption(option) {
542
+ this.allOptionEls.forEach((i) => (i.focused = i === option));
543
+ // option must be scrolledIntoView before focused
544
+ // if focus is called first the option might be positioned incorrectly (in the center of the dropdown) and scrollIntoView will do nothing as the option will already be in view
545
+ option.scrollIntoView({ block: "nearest" });
546
+ // scrollIntoView does not work when the container of the element it's called on is not rendered to the page (in our case the dropdown is still closed and has transform: scaleY(0))
547
+ // when opening the dropdown, scrollIntoView must be delayed to a point where the browser recognizes content within it as able to be scrolled to
548
+ // in Safari in particular, the soonest this seems to happen is 20ms. The longest we can wait before any jumping in the open dropdown is noticeable is 60ms
549
+ window.setTimeout(() => option.scrollIntoView({ block: "nearest" }), 60);
550
+ option.focus();
551
+ }
552
+ findAndFocusOption(ev) {
553
+ const letterPressed = ev.detail.letter.toLowerCase();
554
+ const optionPressed = ev.detail.optionEl;
555
+ if (!this.keysSoFar && letterPressed == " ") {
556
+ // if the first key entered is space, treat as a click. Otherwise include in
557
+ optionPressed.click();
558
+ }
559
+ else {
560
+ if (!this.keysSoFar) {
561
+ // if first character entered, set currently focused option as the starting index for the search
562
+ this.visibleOptionEls.forEach((option, idx) => {
563
+ if (option.focused) {
564
+ this.searchIndex = idx;
565
+ }
566
+ });
567
+ }
568
+ this.keysSoFar += letterPressed;
569
+ let nextMatch = this.findMatchInRange(this.visibleOptionEls, this.searchIndex + 1, this.visibleOptionEls.length);
570
+ if (!nextMatch) {
571
+ // if match can't be found from starting option downwards, search from top
572
+ nextMatch = this.findMatchInRange(this.visibleOptionEls, 0, this.searchIndex);
573
+ }
574
+ if (nextMatch) {
575
+ // findMatchInRange still might have returned null, only focus if match found
576
+ this.focusOption(nextMatch);
577
+ }
578
+ this.debouncedClearKeysSoFar();
579
+ }
580
+ }
581
+ findMatchInRange(list, startIndex, endIndex) {
582
+ let match = null;
583
+ let optionsInRange = list.slice(startIndex, endIndex);
584
+ // Find the first option starting with the keysSoFar substring, searching in
585
+ // the specified range of options
586
+ optionsInRange.forEach((option) => {
587
+ const label = option.textContent;
588
+ if (!match && label && label.toLowerCase().startsWith(this.keysSoFar)) {
589
+ match = option;
590
+ }
591
+ });
592
+ return match;
593
+ }
594
+ findCorrespondingOption(el) {
595
+ // if clone, returns the child wm-option
596
+ // if child wm-option, returns clone
597
+ const isClone = el.classList.contains("clone");
598
+ return isClone
599
+ ? this.childOptions[this.cloneOptions.indexOf(el)]
600
+ : this.cloneOptions[this.childOptions.indexOf(el)];
601
+ }
602
+ isElOrChild(el) {
603
+ var _a;
604
+ // determines whether or not the element is the component, a child of the component, or exists within the component's shadowroot
605
+ return el === this.el || this.el.contains(el) || ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(el));
606
+ }
350
607
  announceError() {
351
608
  if (this.errorMessage) {
352
609
  setTimeout(() => this.announce(this.errorMessage), 100);
@@ -362,8 +619,41 @@ const Select = class {
362
619
  this.wmSelectBlurred.emit();
363
620
  }
364
621
  }
622
+ // on search field or select all. keydown on options is handled via events.
623
+ handleKeyDown(ev) {
624
+ const el = ev.target;
625
+ switch (ev.key) {
626
+ case "ArrowDown":
627
+ ev.preventDefault();
628
+ this.moveDown(ev.target);
629
+ break;
630
+ case "ArrowUp":
631
+ ev.preventDefault();
632
+ this.moveUp(ev.target);
633
+ break;
634
+ case "Escape":
635
+ ev.preventDefault();
636
+ this.close();
637
+ break;
638
+ case "Enter":
639
+ if (el === this.selectAllEl) {
640
+ ev.preventDefault();
641
+ this.handleSelectAllClick();
642
+ this.close();
643
+ }
644
+ break;
645
+ case " ":
646
+ if (el === this.selectAllEl) {
647
+ ev.preventDefault();
648
+ this.handleSelectAllClick();
649
+ }
650
+ break;
651
+ }
652
+ }
365
653
  setButtonText() {
366
- this.displayedOptions = this.childOptions.filter((x) => x.selected);
654
+ this.displayedOptions = this.childOptions
655
+ .filter((x) => x.selected)
656
+ .map((y) => (!y.classList.contains("hidden") ? y : this.findCorrespondingOption(y)));
367
657
  // handle overflow + counter for multiselect
368
658
  if (this.multiple) {
369
659
  // this is a fixed measurement accounting for the max width of a 3 character overflow counter
@@ -407,6 +697,21 @@ const Select = class {
407
697
  return (h("span", null, h("span", { class: "overflow-counter" }, "+", this.overflowCount)));
408
698
  }
409
699
  }
700
+ renderSearchField() {
701
+ return (h("div", { class: "search" }, h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, h("div", { class: "icon" }), h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list", "aria-expanded": this.isExpanded ? "true" : "false", onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
702
+ }
703
+ renderSearchFailedMessage() {
704
+ return h("div", { class: "search-results-message" }, this.noResultsFoundMessage);
705
+ }
706
+ renderSelectAllButton() {
707
+ return (h("button", { ref: (el) => (this.selectAllEl = el), class: "select-all", onClick: () => this.handleSelectAllClick(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: "-1" }, this.allSelected ? this.deselectAllMessage : this.selectAllMessage));
708
+ }
709
+ renderCloneOptions() {
710
+ return Array.from(this.el.children).map((o) => {
711
+ const option = o;
712
+ return (h("wm-option", { class: "clone", subinfo: option.subinfo, selected: option.selected }, option.textContent));
713
+ });
714
+ }
410
715
  render() {
411
716
  const showSubinfo = !this.multiple && this.selectedOptions.length > 0 && this.selectedOptions[0].subinfo;
412
717
  const buttonProps = {
@@ -420,7 +725,7 @@ const Select = class {
420
725
  };
421
726
  return (h(Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
422
727
  // we can't use aria-required or required attributes because it's invalid on the elements we're using (button controlling a listbox)
423
- this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { class: "button-wrapper" }, h("button", Object.assign({}, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), h("span", { class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { class: "subinfo" }, this.selectedOptions[0].subinfo)), this.renderOverflowCount()), h("div", { class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("priv-option-list", { ref: (el) => (this.optionListEl = el), multiple: this.multiple, search: this.search, selectAll: this.selectAll, searchPlaceholder: this.searchPlaceholder, onOptionListCloseRequested: () => this.close(), onOptionListAllSelected: () => this.wmSelectAllSelected.emit(), onOptionListAllDeselected: () => this.wmSelectAllDeselected.emit() }, h("slot", 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: (el) => (this.liveRegionEl = el) }, this.announcement)))));
728
+ this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { class: "button-wrapper" }, h("button", Object.assign({}, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev), onFocus: () => this.close() }), h("span", { class: `overflowcontrol ${showSubinfo ? "hassubinfo" : ""}` }, h("span", { class: "button-text" }, this.renderButtonText()), showSubinfo && h("span", { class: "subinfo" }, this.selectedOptions[0].subinfo)), this.renderOverflowCount()), h("div", { class: `dropdown ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton(), h("div", { id: "list", class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": "label", ref: (el) => (this.listboxEl = el) }, this.search && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.multiple && this.renderCloneOptions(), h("slot", null))), 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: (el) => (this.liveRegionEl = el) }, this.announcement)))));
424
729
  }
425
730
  static get delegatesFocus() { return true; }
426
731
  get el() { return getElement(this); }
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-558b5a82.js';
2
- import { d as debounce } from './functions-b791a892.js';
2
+ import { d as debounce } from './functions-cf37f81f.js';
3
3
 
4
4
  const 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}";
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, f as forceUpdate, h, H as Host, g as getElement, c as createEvent } from './index-558b5a82.js';
2
- import { g as generateId, d as debounce, i as intl, x as csvToArray } from './functions-b791a892.js';
3
- 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-dfcb1edf.js';
2
+ import { g as generateId, d as debounce, i as intl, x as csvToArray } from './functions-cf37f81f.js';
3
+ 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-f5eb7f59.js';
4
4
 
5
5
  const 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 .values.none{margin:0}: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.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.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}: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:116px}: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;width:100%;overflow:visible;-webkit-transform:translate(0px, 96px);transform:translate(0px, 96px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar3 .bar3-axis-label{position:absolute;bottom:-4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}: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}";
6
6