@watermarkinsights/ripple 5.3.0-0 → 5.3.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/dist/cjs/{chartFunctions-9075d687.js → chartFunctions-246529c5.js} +3 -3
  2. package/dist/cjs/{functions-b73604c3.js → functions-be4156cf.js} +7 -104
  3. package/dist/{esm/app-globals-0c592c57.js → cjs/global-6b1a23e9.js} +2 -7
  4. package/dist/cjs/index-f8ef86de.js +2582 -0
  5. package/dist/cjs/{intl-b20d5420.js → intl-a13884e8.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 +14 -15
  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 +10 -13
  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 +69 -35
  32. package/dist/cjs/wm-tab-item_3.cjs.entry.js +8 -11
  33. package/dist/cjs/wm-tag-input.cjs.entry.js +7 -8
  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.e2e.js +176 -0
  50. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
  51. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +163 -0
  52. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
  53. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +69 -0
  54. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
  55. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +79 -0
  56. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
  57. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +89 -0
  58. package/dist/collection/components/datepickers/wm-date-range.e2e.js +443 -0
  59. package/dist/collection/components/datepickers/wm-date-range.js +12 -16
  60. package/dist/collection/components/datepickers/wm-date-range.spec.js +22 -0
  61. package/dist/collection/components/datepickers/wm-datepicker.e2e.js +382 -0
  62. package/dist/collection/components/datepickers/wm-datepicker.js +12 -16
  63. package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
  64. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +200 -0
  65. package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
  66. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +48 -0
  67. package/dist/collection/components/wm-button/wm-button.e2e.js +55 -0
  68. package/dist/collection/components/wm-button/wm-button.js +1 -1
  69. package/dist/collection/components/wm-button/wm-button.spec.js +74 -0
  70. package/dist/collection/components/wm-file/wm-file.js +1 -1
  71. package/dist/collection/components/wm-file/wm-file.spec.js +194 -0
  72. package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
  73. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +69 -0
  74. package/dist/collection/components/wm-input/wm-input.e2e.js +32 -0
  75. package/dist/collection/components/wm-input/wm-input.js +1 -1
  76. package/dist/collection/components/wm-input/wm-input.spec.js +173 -0
  77. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +23 -0
  78. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  79. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +54 -0
  80. package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
  81. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +11 -0
  82. package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
  83. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +8 -0
  84. package/dist/collection/components/wm-modal/wm-modal.e2e.js +104 -0
  85. package/dist/collection/components/wm-modal/wm-modal.js +2 -2
  86. package/dist/collection/components/wm-modal/wm-modal.spec.js +30 -0
  87. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
  88. package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
  89. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +102 -0
  90. package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
  91. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +91 -0
  92. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +50 -0
  93. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
  94. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
  95. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +209 -0
  96. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +177 -0
  97. package/dist/collection/components/wm-option/wm-option.e2e.js +22 -0
  98. package/dist/collection/components/wm-option/wm-option.js +1 -1
  99. package/dist/collection/components/wm-option/wm-option.spec.js +63 -0
  100. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +312 -0
  101. package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
  102. package/dist/collection/components/wm-search/wm-search.e2e.js +76 -0
  103. package/dist/collection/components/wm-search/wm-search.js +4 -5
  104. package/dist/collection/components/wm-search/wm-search.spec.js +71 -0
  105. package/dist/collection/components/wm-select/wm-select.e2e.js +521 -0
  106. package/dist/collection/components/wm-select/wm-select.js +2 -2
  107. package/dist/collection/components/wm-select/wm-select.spec.js +271 -0
  108. package/dist/collection/components/wm-snackbar/wm-snackbar.css +69 -46
  109. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +112 -0
  110. package/dist/collection/components/wm-snackbar/wm-snackbar.js +66 -31
  111. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +9 -0
  112. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
  113. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
  114. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
  115. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +91 -0
  116. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +12 -0
  117. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +204 -0
  118. package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
  119. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +195 -0
  120. package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +41 -0
  121. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  122. package/dist/collection/components/wm-textarea/wm-textarea.spec.js +79 -0
  123. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +163 -0
  124. package/dist/collection/components/wm-timepicker/wm-timepicker.js +8 -11
  125. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +147 -0
  126. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +69 -0
  127. package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
  128. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +21 -0
  129. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +70 -0
  130. package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
  131. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +234 -0
  132. package/dist/collection/dev/snackbar.js +48 -32
  133. package/dist/collection/global/functions.spec.js +126 -0
  134. package/dist/collection/lang/lang.spec.js +20 -0
  135. package/dist/esm/{chartFunctions-730742b7.js → chartFunctions-e2554a36.js} +3 -3
  136. package/dist/esm/{functions-eda88c5f.js → functions-f65dbb96.js} +8 -105
  137. package/dist/{cjs/app-globals-7025eb63.js → esm/global-b3bbb95e.js} +1 -10
  138. package/dist/esm/index-f164fbca.js +2552 -0
  139. package/dist/esm/{intl-de8432e2.js → intl-f7f77de7.js} +1 -1
  140. package/dist/esm/loader.js +4 -5
  141. package/dist/esm/polyfills/core-js.js +0 -0
  142. package/dist/esm/polyfills/dom.js +0 -0
  143. package/dist/esm/polyfills/es5-html-element.js +0 -0
  144. package/dist/esm/polyfills/index.js +0 -0
  145. package/dist/esm/polyfills/system.js +0 -0
  146. package/dist/esm/priv-calendar.entry.js +5 -6
  147. package/dist/esm/priv-chart-popover.entry.js +5 -6
  148. package/dist/esm/priv-navigator-button.entry.js +3 -4
  149. package/dist/esm/priv-navigator-item.entry.js +3 -4
  150. package/dist/esm/ripple.js +12 -13
  151. package/dist/esm/wm-action-menu_2.entry.js +6 -8
  152. package/dist/esm/wm-button.entry.js +4 -5
  153. package/dist/esm/wm-chart-slice.entry.js +1 -1
  154. package/dist/esm/wm-chart.entry.js +6 -7
  155. package/dist/esm/wm-date-range.entry.js +7 -8
  156. package/dist/esm/wm-datepicker.entry.js +7 -8
  157. package/dist/esm/wm-file-list.entry.js +3 -4
  158. package/dist/esm/wm-file.entry.js +4 -5
  159. package/dist/esm/wm-input.entry.js +5 -6
  160. package/dist/esm/wm-line-chart.entry.js +14 -15
  161. package/dist/esm/wm-modal-footer.entry.js +3 -4
  162. package/dist/esm/wm-modal-header.entry.js +5 -6
  163. package/dist/esm/wm-modal.entry.js +5 -6
  164. package/dist/esm/wm-navigation_3.entry.js +10 -13
  165. package/dist/esm/wm-navigator.entry.js +3 -4
  166. package/dist/esm/wm-option_2.entry.js +8 -10
  167. package/dist/esm/wm-pagination.entry.js +4 -5
  168. package/dist/esm/wm-progress-indicator_3.entry.js +7 -9
  169. package/dist/esm/wm-search.entry.js +6 -7
  170. package/dist/esm/wm-snackbar.entry.js +69 -35
  171. package/dist/esm/wm-tab-item_3.entry.js +8 -11
  172. package/dist/esm/wm-tag-input.entry.js +7 -8
  173. package/dist/esm/wm-tag-option.entry.js +2 -2
  174. package/dist/esm/wm-textarea.entry.js +5 -6
  175. package/dist/esm/wm-timepicker.entry.js +5 -6
  176. package/dist/esm/wm-toggletip.entry.js +5 -6
  177. package/dist/esm/wm-uploader.entry.js +6 -7
  178. package/dist/esm/wm-wrapper.entry.js +1 -1
  179. package/dist/esm-es5/{chartFunctions-730742b7.js → chartFunctions-e2554a36.js} +1 -1
  180. package/dist/esm-es5/functions-f65dbb96.js +1 -0
  181. package/dist/esm-es5/global-b3bbb95e.js +1 -0
  182. package/dist/esm-es5/index-f164fbca.js +1 -0
  183. package/dist/esm-es5/{intl-de8432e2.js → intl-f7f77de7.js} +1 -1
  184. package/dist/esm-es5/loader.js +1 -1
  185. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  186. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  187. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  188. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  189. package/dist/esm-es5/ripple.js +1 -1
  190. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  191. package/dist/esm-es5/wm-button.entry.js +1 -1
  192. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  193. package/dist/esm-es5/wm-chart.entry.js +1 -1
  194. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  195. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  196. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  197. package/dist/esm-es5/wm-file.entry.js +1 -1
  198. package/dist/esm-es5/wm-input.entry.js +1 -1
  199. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  200. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  201. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  202. package/dist/esm-es5/wm-modal.entry.js +1 -1
  203. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  204. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  205. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  206. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  207. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  208. package/dist/esm-es5/wm-search.entry.js +1 -1
  209. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  210. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  211. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  212. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  213. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  214. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  215. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  216. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  217. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  218. package/dist/loader/cdn.js +2 -1
  219. package/dist/loader/index.cjs.js +2 -1
  220. package/dist/loader/index.d.ts +0 -3
  221. package/dist/loader/index.es2017.js +2 -1
  222. package/dist/loader/index.js +2 -1
  223. package/dist/ripple/p-04bf6c89.entry.js +1 -0
  224. package/dist/ripple/{p-98e77431.entry.js → p-0b77b2a1.entry.js} +1 -1
  225. package/dist/ripple/p-0fe97e85.system.js +2 -0
  226. package/dist/ripple/p-109684b1.entry.js +1 -0
  227. package/dist/ripple/p-11383396.system.entry.js +1 -0
  228. package/dist/ripple/{p-7b5ac088.entry.js → p-19dec591.entry.js} +1 -1
  229. package/dist/ripple/p-1cb6b37e.entry.js +1 -0
  230. package/dist/ripple/p-2197287c.entry.js +1 -0
  231. package/dist/ripple/{p-5ab8174c.entry.js → p-22e6104e.entry.js} +1 -1
  232. package/dist/ripple/p-24d88d8d.system.entry.js +1 -0
  233. package/dist/ripple/{p-ff095cec.entry.js → p-25446670.entry.js} +1 -1
  234. package/dist/ripple/p-2bac4b4e.system.entry.js +1 -0
  235. package/dist/ripple/p-30a9ba6e.entry.js +1 -0
  236. package/dist/ripple/p-32cf6907.system.entry.js +1 -0
  237. package/dist/ripple/p-379fe53e.entry.js +1 -0
  238. package/dist/ripple/{p-4aae5688.entry.js → p-3a070f35.entry.js} +1 -1
  239. package/dist/ripple/{p-181068af.system.entry.js → p-3db9e0d8.system.entry.js} +1 -1
  240. package/dist/ripple/p-41e8a079.entry.js +1 -0
  241. package/dist/ripple/p-4272aa37.system.js +1 -0
  242. package/dist/ripple/p-45126063.system.entry.js +1 -0
  243. package/dist/ripple/{p-fd34619f.system.entry.js → p-48a6acfa.system.entry.js} +1 -1
  244. package/dist/ripple/p-4de51706.js +2 -0
  245. package/dist/ripple/{p-245f0080.entry.js → p-4e616347.entry.js} +1 -1
  246. package/dist/ripple/p-577ea283.system.entry.js +1 -0
  247. package/dist/ripple/p-5a04c222.entry.js +1 -0
  248. package/dist/ripple/{p-3036a712.js → p-5b2c1bd1.js} +1 -1
  249. package/dist/ripple/{p-e0929c38.system.js → p-5bbf7fdc.system.js} +1 -1
  250. package/dist/ripple/p-5dbad2ff.entry.js +1 -0
  251. package/dist/ripple/p-625aeeec.system.entry.js +1 -0
  252. package/dist/ripple/p-635f40b1.entry.js +1 -0
  253. package/dist/ripple/p-63fabfed.entry.js +1 -0
  254. package/dist/ripple/p-6dc3ee86.system.js +1 -0
  255. package/dist/ripple/p-7144d185.system.entry.js +1 -0
  256. package/dist/ripple/p-720b6ab0.entry.js +1 -0
  257. package/dist/ripple/p-7573a2fa.entry.js +1 -0
  258. package/dist/ripple/p-76d2dada.entry.js +1 -0
  259. package/dist/ripple/{p-0f117524.system.entry.js → p-780d4673.system.entry.js} +1 -1
  260. package/dist/ripple/p-79af9baf.entry.js +1 -0
  261. package/dist/ripple/{p-b6dcc6d8.system.entry.js → p-7a9ffbcb.system.entry.js} +1 -1
  262. package/dist/ripple/{p-f170963b.system.entry.js → p-7e56da2e.system.entry.js} +1 -1
  263. package/dist/ripple/p-7f4b4071.system.entry.js +1 -0
  264. package/dist/ripple/{p-a36f5e7d.system.entry.js → p-8081f931.system.entry.js} +1 -1
  265. package/dist/ripple/p-84926b89.system.entry.js +1 -0
  266. package/dist/ripple/p-88406560.system.entry.js +1 -0
  267. package/dist/ripple/{p-f95bc54b.entry.js → p-8f38dc86.entry.js} +1 -1
  268. package/dist/ripple/p-92c1ff36.system.entry.js +1 -0
  269. package/dist/ripple/{p-0e1523db.entry.js → p-98120733.entry.js} +1 -1
  270. package/dist/ripple/p-9c6d6b26.system.entry.js +1 -0
  271. package/dist/ripple/{p-e3a15de3.system.entry.js → p-9d8c2a52.system.entry.js} +1 -1
  272. package/dist/ripple/{p-47d993b9.system.entry.js → p-a99b05de.system.entry.js} +1 -1
  273. package/dist/ripple/{p-ce028b38.system.js → p-ae32eb8d.system.js} +1 -1
  274. package/dist/ripple/p-ae8ad491.entry.js +1 -0
  275. package/dist/ripple/p-b0579a2a.system.entry.js +1 -0
  276. package/dist/ripple/p-b0f14557.system.entry.js +1 -0
  277. package/dist/ripple/p-ba751ca4.js +1 -0
  278. package/dist/ripple/{p-39f4fca0.system.entry.js → p-bd27ded2.system.entry.js} +1 -1
  279. package/dist/ripple/p-c38f2a00.system.entry.js +1 -0
  280. package/dist/ripple/p-c51293e2.entry.js +1 -0
  281. package/dist/ripple/p-c717d895.entry.js +1 -0
  282. package/dist/ripple/p-c8873e0c.system.entry.js +1 -0
  283. package/dist/ripple/p-ca9d9447.system.entry.js +1 -0
  284. package/dist/ripple/p-cda6c77e.entry.js +1 -0
  285. package/dist/ripple/{p-ecd26b33.system.entry.js → p-ce5455a3.system.entry.js} +1 -1
  286. package/dist/ripple/p-d265a41e.entry.js +1 -0
  287. package/dist/ripple/p-d325a37b.entry.js +1 -0
  288. package/dist/ripple/p-d7c47dc0.system.entry.js +1 -0
  289. package/dist/ripple/p-d88d806e.js +1 -0
  290. package/dist/ripple/p-dcfdbd30.entry.js +1 -0
  291. package/dist/ripple/p-eb649319.system.js +1 -0
  292. package/dist/ripple/p-ef3fe609.system.entry.js +1 -0
  293. package/dist/ripple/p-f6f29a56.entry.js +1 -0
  294. package/dist/ripple/{p-96cc3c63.js → p-f79a6e32.js} +1 -1
  295. package/dist/ripple/p-f93858ad.system.entry.js +1 -0
  296. package/dist/ripple/p-fc7e5296.entry.js +1 -0
  297. package/dist/ripple/p-ff80aadd.system.entry.js +1 -0
  298. package/dist/ripple/ripple.esm.js +1 -1
  299. package/dist/ripple/ripple.js +1 -1
  300. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +6 -3
  301. package/dist/types/global/interfaces.d.ts +3 -0
  302. package/dist/types/stencil-public-runtime.d.ts +10 -3
  303. package/package.json +1 -1
  304. package/dist/cjs/index-3c3d6c9f.js +0 -1810
  305. package/dist/esm/index-0ed3ed7d.js +0 -1780
  306. package/dist/esm-es5/app-globals-0c592c57.js +0 -1
  307. package/dist/esm-es5/functions-eda88c5f.js +0 -1
  308. package/dist/esm-es5/index-0ed3ed7d.js +0 -1
  309. package/dist/ripple/p-0096e233.system.entry.js +0 -1
  310. package/dist/ripple/p-0ad27de3.system.entry.js +0 -1
  311. package/dist/ripple/p-0ccf9f96.entry.js +0 -1
  312. package/dist/ripple/p-0f7a85f4.entry.js +0 -1
  313. package/dist/ripple/p-13760c2c.entry.js +0 -1
  314. package/dist/ripple/p-14bab3fa.system.entry.js +0 -1
  315. package/dist/ripple/p-1e536698.js +0 -1
  316. package/dist/ripple/p-2c18b6d1.system.entry.js +0 -1
  317. package/dist/ripple/p-340b18ea.entry.js +0 -1
  318. package/dist/ripple/p-37c39a40.system.entry.js +0 -1
  319. package/dist/ripple/p-3f5e94e3.system.js +0 -1
  320. package/dist/ripple/p-48beea19.system.js +0 -1
  321. package/dist/ripple/p-4ea963f3.system.entry.js +0 -1
  322. package/dist/ripple/p-501d3115.entry.js +0 -1
  323. package/dist/ripple/p-527581c5.entry.js +0 -1
  324. package/dist/ripple/p-563b5820.entry.js +0 -1
  325. package/dist/ripple/p-57695dba.js +0 -2
  326. package/dist/ripple/p-5c6c325e.system.entry.js +0 -1
  327. package/dist/ripple/p-5f4c8d63.system.entry.js +0 -1
  328. package/dist/ripple/p-68e3e7c0.entry.js +0 -1
  329. package/dist/ripple/p-68fec757.system.entry.js +0 -1
  330. package/dist/ripple/p-6982bc34.entry.js +0 -1
  331. package/dist/ripple/p-6a793c40.system.entry.js +0 -1
  332. package/dist/ripple/p-6c31f0ad.system.entry.js +0 -1
  333. package/dist/ripple/p-6daf1bd3.system.entry.js +0 -1
  334. package/dist/ripple/p-6e406e8b.entry.js +0 -1
  335. package/dist/ripple/p-77210f26.entry.js +0 -1
  336. package/dist/ripple/p-7a844f5d.system.js +0 -2
  337. package/dist/ripple/p-7d5aaa73.system.entry.js +0 -1
  338. package/dist/ripple/p-80c92919.system.entry.js +0 -1
  339. package/dist/ripple/p-81fd2ed5.system.entry.js +0 -1
  340. package/dist/ripple/p-84d294d1.system.js +0 -1
  341. package/dist/ripple/p-85178a0d.entry.js +0 -1
  342. package/dist/ripple/p-8768ba4d.system.entry.js +0 -1
  343. package/dist/ripple/p-8af21b69.entry.js +0 -1
  344. package/dist/ripple/p-a30eef53.entry.js +0 -1
  345. package/dist/ripple/p-ad6c979f.entry.js +0 -1
  346. package/dist/ripple/p-af8c1cfa.entry.js +0 -1
  347. package/dist/ripple/p-b19be746.entry.js +0 -1
  348. package/dist/ripple/p-b483ec14.entry.js +0 -1
  349. package/dist/ripple/p-b4a34241.entry.js +0 -1
  350. package/dist/ripple/p-be28a95e.system.entry.js +0 -1
  351. package/dist/ripple/p-c6d970a4.entry.js +0 -1
  352. package/dist/ripple/p-dba63006.system.entry.js +0 -1
  353. package/dist/ripple/p-dbb37269.system.entry.js +0 -1
  354. package/dist/ripple/p-e19f8c43.js +0 -1
  355. package/dist/ripple/p-e3d66797.entry.js +0 -1
  356. package/dist/ripple/p-e64276f2.entry.js +0 -1
  357. package/dist/ripple/p-e9978b2f.entry.js +0 -1
  358. package/dist/ripple/p-ecbd3ea9.system.entry.js +0 -1
  359. package/dist/ripple/p-ee49cb03.entry.js +0 -1
  360. package/dist/ripple/p-f0fbb86b.system.entry.js +0 -1
  361. package/dist/ripple/p-f4f3bf9f.system.entry.js +0 -1
  362. package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +0 -72
  363. package/dist/types/components/datepickers/wm-date-range.d.ts +0 -68
@@ -1 +1 @@
1
- import{r as t,f as i,h as e,H as o,g as s}from"./p-57695dba.js";import{d as r,C as n,x as a,D as l,E as h,F as c}from"./p-1e536698.js";import{n as p,o as d}from"./p-96cc3c63.js";import{l as g,c as v,g as b}from"./p-3036a712.js";const f=class{constructor(i){t(this,i),this.minTickWidth=120,this.popoverData=[],this.focusedDataPoint=[0,0],this.dataPointMatrix=[],this.xIntervals=[],this.displayedXIntervals=[],this.yIntervals=[],this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}],this.debouncedResize=r((async()=>{this.displayedXIntervals=this.determineDisplayedXIntervals()}),100),this.label=void 0,this.description="",this.xAxisLabel=void 0,this.yAxisLabel=void 0,this.lineData=void 0,this.units="null,null",this.labelWidth="120px",this.highlightQualifier="highlighted",this.highlightStart=void 0,this.highlightEnd=void 0,this.visibilityToggles=!1,this.showDeltas=!1,this.yRange=void 0,this.parsedLineData={},this.popoverIndex=-1,this.focusedLine=-1,this.hiddenLines=[],this.isTabbing=!1,this.intervalSkip=0,this.announcement=""}parseData(){this.parsedLineData=JSON.parse(this.lineData),this.yIntervals=this.calcYIntervals().reverse(),this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]),this.displayedXIntervals=this.determineDisplayedXIntervals(),this.dataPointMatrix=Object.entries(this.parsedLineData).map((t=>this.buildLineDataPointDetails(t[0],t[1]))),this.popoverData=n(this.dataPointMatrix)}handleIntervalSkip(){this.parseData()}get hasPartialInterval(){return this.intervalSkip>0&&this.xIntervals.length%2==0}get parsedUnits(){return a(this.units).map((t=>"null"===t?null:t))}get visibilityToggleEls(){return this.legendEl.querySelectorAll("wm-button")}get lineEls(){return this.plotAreaEl.querySelectorAll(".line")}get firstVisibleLineIdx(){let t=0;for(;this.hiddenLines.includes(t);)t++;return t<this.dataPointMatrix.length?t:-1}get pointEls(){return this.plotAreaEl.querySelectorAll(".point")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.parseData()}componentDidLoad(){new ResizeObserver((()=>this.debouncedResize())).observe(this.el)}handleVisibilityToggleKeydown(t,i){switch(t.key){case"Tab":t.shiftKey||-1===this.firstVisibleLineIdx||(t.preventDefault(),this.announce(this.lineFocusMessage(this.firstVisibleLineIdx)),this.focusDataPoint(this.firstVisibleLineIdx,0));break;case"ArrowUp":case"ArrowLeft":t.preventDefault();const e=l(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();const o=l(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[o].focus()}}handleDataPointKeydown(t){const[i,e]=this.focusedDataPoint,o=this.lineEls[i].querySelectorAll(".point").length,s=this.dataPointMatrix.length;switch(t.key){case"Tab":t.shiftKey&&this.visibilityToggles&&(t.preventDefault(),this.visibilityToggleEls[0].focus());break;case"ArrowUp":t.preventDefault();let r=i;do{r=l(r,-1,s-1)}while(this.hiddenLines.includes(r));this.announce(this.lineFocusMessage(r)),this.focusDataPoint(r,e);break;case"ArrowDown":t.preventDefault();let n=i;do{n=l(n,1,s-1)}while(this.hiddenLines.includes(n));this.announce(this.lineFocusMessage(n)),this.focusDataPoint(n,e);break;case"ArrowLeft":t.preventDefault();const a=l(e,-1,o-1);this.focusDataPoint(i,a);break;case"ArrowRight":t.preventDefault();const h=l(e,1,o-1);this.focusDataPoint(i,h)}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}lineFocusMessage(t){const i=this.dataPointMatrix[t][0].lineLabel,e=this.dataPointMatrix[t].filter((t=>null!==t.yValue)).length;return`${i}, line ${t+1} of ${this.dataPointMatrix.length} with ${e} data points`}focusDataPoint(t,i){const e=this.lineEls[t].querySelectorAll(".point")[i];this.pointEls.forEach((t=>t.tabIndex=-1)),e.tabIndex=0,e.focus(),this.focusedDataPoint=[t,i]}focusDataPointByEl(t){const i=parseInt(t.dataset.lineidx),e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.pointEls.forEach((t=>t.tabIndex=-1)),t.tabIndex=0,t.focus(),this.focusedDataPoint=[i,e]}calcYIntervals(){let t=[];if(this.yRange)t=a(this.yRange).map((t=>parseInt(t)));else{let i=[];Object.values(this.parsedLineData).flat().forEach((t=>i.push(...Object.values(t))));const e=i.filter((t=>null!==t));let o=Math.min(...e);const s=Math.max(...e);let r=d(s-o,4),n=r;for(;o%r!=0&&n>0;)o--,n--;r=d(s-o,4);let a=o;for(;a<=s+r;)t.push(a),a+=r}return t}determineDisplayedXIntervals(){const t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length,{skipInterval:i,skippedList:e}=h(this.xIntervals,t);return this.intervalSkip=i,e}buildLineDataPointDetails(t,i){let e=[];const o=Object.entries(i);let s;return o.forEach(((i,r)=>{const[n,a]=i;let l=100/(o.length-1)*r;const h=null===a?null:100-c(a,this.yIntervals[this.yIntervals.length-1],this.yIntervals[0]);0===r&&(l+=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?8/this.plotAreaEl.clientWidth*100:1),n!==this.highlightStart||s||(s=!0),e.push({lineLabel:t,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:s}),n===this.highlightEnd&&s&&(s=!1)})),e}toggleLineVisibility(t){this.hiddenLines.includes(t)?this.hiddenLines=this.hiddenLines.filter((i=>i!==t)):this.hiddenLines.push(t),i(this.el)}resetDataPointFocus(){this.popoverIndex=-1,this.pointEls.forEach((t=>t.tabIndex=-1)),-1!==this.firstVisibleLineIdx&&(this.lineEls[this.firstVisibleLineIdx].querySelectorAll(".point")[0].tabIndex=0,this.focusedDataPoint=[this.firstVisibleLineIdx,0])}calcDelta(t,i){let e;if(null===t.yValue||null===i.yValue)e=g.noData;else if(t.yValue==i.yValue)e="0%";else if(0==i.yValue)e="-";else{const o=Math.round((t.yValue-i.yValue)/i.yValue*100*100)/100;e=`${o>0?"+":""}${o}%`}return e}renderLegend(){const t=Object.keys(this.parsedLineData);return e("div",{ref:t=>this.legendEl=t,class:"legend"},t.map(((t,i)=>{const o=this.hiddenLines.includes(i);return e("div",{id:`legend-label-${i}`,class:"legend-label "+(-1!==this.focusedLine&&this.focusedLine!==i?"faded":""),onMouseEnter:()=>this.focusedLine=o?-1:i,onMouseLeave:()=>this.focusedLine=-1},this.renderIcon(i),t,this.visibilityToggles&&this.renderVisibilityToggle(t,i,o))})))}renderVisibilityToggle(t,i,o){return e("wm-button",{id:`visibility-button-${i}`,class:"visibility-toggle","label-for-identical-buttons":`${0===i?`Toggle line visibility list with ${this.dataPointMatrix.length} items`:""} ${o?b.show:b.hide} ${t} toggle ${o?"pressed":""}`,"button-type":"navigational",tooltip:o?b.show:b.hide,tooltipPosition:"bottom",icon:o?"f209":"f208",onClick:()=>this.toggleLineVisibility(i),onKeyDown:t=>this.handleVisibilityToggleKeydown(t,i),onFocus:()=>this.popoverIndex=-1})}renderIcon(t){const{color:i,icon:o}=this.lineStyles[t];return e("span",{class:"icon",style:{"--iconColor":i,"--icon":`"\\${o}"`,"--translation":5===t?"rotate(180deg)":"unset"}})}renderXIntervals(){return e("div",{class:"x-intervals",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`}},this.xIntervals.map((t=>e("span",{class:"x-interval "+(this.displayedXIntervals.includes(t)?"":"hidden")},t))))}renderYIntervals(){return e("div",{ref:t=>this.yIntervalsEl=t,class:"y-intervals"},this.yIntervals.map((t=>e("span",{class:"y-interval"},p(t)))))}renderData(){return this.dataPointMatrix.map(((t,i)=>{let o=this.focusedLine===i?"focused":"faded";const s=this.hiddenLines.includes(i);return e("div",{class:`line ${-1!==this.focusedLine?o:""} ${s?"hidden":""}`},this.renderLines(i),this.renderPoints(i))}))}renderPoints(t){const i=this.dataPointMatrix[t];return e("div",{class:"line-icons"},i.map(((o,s)=>{const{lineLabel:r,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:c}=o;if(null!==a){const{color:p,icon:d}=this.lineStyles[t],v=0===t&&0===s?0:void 0,b={"--icon":`"\\${d}"`,"--iconColor":p,"--xPosition":l+"%","--yPosition":h+"%","--translation":5===t?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};let f=`${r} ${c?this.highlightQualifier:""} ${this.xAxisLabel} ${n+(this.parsedUnits[0]?this.parsedUnits[0]:"")}, ${this.yAxisLabel}: ${a+(this.parsedUnits[1]?this.parsedUnits[1]:"")}`;if(this.showDeltas&&s>0){const t=i[s-1];f+=`, ${g.getChangeSince(t.xValue)} ${this.calcDelta(o,t)}`}return e("span",{id:`${r}-${s}`,role:"img","aria-label":f,tabIndex:v,class:"point icon",style:b,"data-lineidx":t,"data-xvalue":n,onKeyDown:t=>this.handleDataPointKeydown(t),onFocus:()=>this.popoverIndex=s,onClick:t=>this.focusDataPointByEl(t.target),onMouseEnter:()=>this.popoverIndex=s})}})))}renderLines(t){const i=this.dataPointMatrix[t];return e("svg",{class:"line-svg"},i.map(((o,s)=>{if(null!==o.yValue&&s!==i.length-1&&null!==i[s+1].yValue){const{color:r}=this.lineStyles[t],{xPositionPercent:n,yPositionPercent:a}=o,{xPositionPercent:l,yPositionPercent:h}=i[s+1];return e("line",{x1:n+"%",y1:a+"%",x2:l+"%",y2:h+"%",stroke:r,"stroke-width":"2px"})}})))}renderHoverAreas(){return e("div",{class:"hover-area-wrapper",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`},onMouseLeave:()=>this.popoverIndex=-1},this.xIntervals.map(((t,i)=>e("div",{onMouseEnter:()=>this.popoverIndex=i}))))}renderPopover(){if(!(this.popoverData&&this.popoverData[this.popoverIndex]&&this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`)))return"";const t=this.popoverData[this.popoverIndex],i=t[0].xPositionPercent,o=t.map((t=>t.yPositionPercent)).filter((t=>null!==t)),s=o.reduce(((t,i)=>t+i),0)/o.length,r=this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`),n=this.el.getBoundingClientRect(),a=r.getBoundingClientRect(),l=a.left-n.left,h=n.right-a.right>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),c=l>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),p=8/this.plotAreaEl.clientWidth*100;let d={"--leftPosition":h?i+p+"%":"unset","--rightPosition":c?100-i+p+"%":"unset","--topPosition":s+"%",transform:"translateY(-50%)"};if(!c&&!h){const t=`0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth+"px"} + ${this.el.scrollLeft+"px"} + 2px`;d={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:`translateX(calc(${t}))`}}return e("div",{ref:t=>this.popoverEl=t,class:"popover",style:d},e("div",{class:"title"},t[0].xValue,this.parsedUnits[0]&&e("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.popoverIndex>0&&e("div",{class:"comparison-title"},g.getChangeSince(this.popoverData[this.popoverIndex-1][0].xValue)),this.renderPopoverTable())}renderPopoverTable(){return e("table",{class:"popover-table"},this.popoverData[this.popoverIndex].map(((t,i)=>{if(!this.hiddenLines.includes(i)){const{lineLabel:o,yValue:s}=t,r=this.popoverIndex>0?this.popoverData[this.popoverIndex-1][i]:null,n=null!==s?(new Intl.NumberFormat).format(s):null;return e("tr",{class:"popover-row"},e("td",null,this.renderIcon(i)),e("td",{class:"row-label"},o),e("td",{class:"row-value"},null===s?g.noData:n,null!==s&&this.parsedUnits[1]&&e("span",{class:"unit --y"},this.parsedUnits[1])),this.showDeltas&&r&&this.renderDeltas(t,r))}})))}renderDeltas(t,i){const o=this.calcDelta(t,i),s="+"==o.toString()[0]||"-"==o?"positive":"-"==o.toString()[0]?"negative":"";return i&&e("td",{class:`delta --${s}`},o)}renderHoverIndicator(){return this.dataPointMatrix.length>0&&this.dataPointMatrix[0][this.popoverIndex]?e("div",{class:"hover-indicator",style:{"--xPosition":this.dataPointMatrix[0][this.popoverIndex].xPositionPercent+"%"}}):""}renderHighlight(){const t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent,i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;return e("div",{class:"highlight",style:{"--startPercentage":t+"%","--endPercentage":i+"%"}})}render(){return e(o,{key:"9817eea8765cce513a0848cd222a6409c8f1f912",onBlur:()=>this.resetDataPointFocus(),onMouseLeave:()=>this.popoverIndex=-1},e("div",{key:"60de41437bb425483be4b5a24fc2468c8e8f8d4e",class:"component-wrapper",role:"application","aria-roledescription":v.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),e("div",{key:"2029ed03f09b8c133ee430f7b1d70c9dded326f3",class:"chart-wrapper"},e("div",{key:"4e9123177b8c02cf1fef010d370b2b1a23b2015c",class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&` (${this.parsedUnits[1]})`),this.renderYIntervals(),e("div",{key:"3cbe51169818095cd830e7b8099d3a10980e3cf2",ref:t=>this.plotAreaEl=t,class:"plot-area "+(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":`${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),-1!==this.popoverIndex&&this.renderHoverIndicator(),-1!==this.popoverIndex&&this.renderPopover(),this.renderXIntervals(),e("div",{key:"dad130dfb9063769dd36316cb060c90a8f1c8cb8",class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&` (${this.parsedUnits[0]})`)),e("div",{key:"bb4ffc7fbae6ab63e6f3e16c1d7e8a98c382e243",id:"chart-description",class:"sr-only"},`${g.instructions} ${this.description}`),e("div",{key:"de40d0eecd0db387912b45fb2b4576b37e3876aa",ref:t=>this.liveRegionEl=t,"aria-live":"polite",class:"sr-only"},this.announcement)))}get el(){return s(this)}static get watchers(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}}};f.style=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .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:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);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:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0;border-radius:3px}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}: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}';export{f as wm_line_chart}
1
+ import{r as t,f as i,h as e,H as o,g as s}from"./p-4de51706.js";import{d as r,C as n,x as a,D as l,E as h,F as c}from"./p-ba751ca4.js";import{n as p,o as d}from"./p-f79a6e32.js";import{l as g,c as v,g as x}from"./p-5b2c1bd1.js";const u=class{constructor(i){t(this,i),this.minTickWidth=120,this.popoverData=[],this.focusedDataPoint=[0,0],this.dataPointMatrix=[],this.xIntervals=[],this.displayedXIntervals=[],this.yIntervals=[],this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}],this.debouncedResize=r((async()=>{this.displayedXIntervals=this.determineDisplayedXIntervals()}),100),this.label=void 0,this.description="",this.xAxisLabel=void 0,this.yAxisLabel=void 0,this.lineData=void 0,this.units="null,null",this.labelWidth="120px",this.highlightQualifier="highlighted",this.highlightStart=void 0,this.highlightEnd=void 0,this.visibilityToggles=!1,this.showDeltas=!1,this.yRange=void 0,this.parsedLineData={},this.popoverIndex=-1,this.focusedLine=-1,this.hiddenLines=[],this.isTabbing=!1,this.intervalSkip=0,this.announcement=""}parseData(){this.parsedLineData=JSON.parse(this.lineData),this.yIntervals=this.calcYIntervals().reverse(),this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]),this.displayedXIntervals=this.determineDisplayedXIntervals(),this.dataPointMatrix=Object.entries(this.parsedLineData).map((t=>this.buildLineDataPointDetails(t[0],t[1]))),this.popoverData=n(this.dataPointMatrix)}handleIntervalSkip(){this.parseData()}get hasPartialInterval(){return this.intervalSkip>0&&this.xIntervals.length%2==0}get parsedUnits(){return a(this.units).map((t=>"null"===t?null:t))}get visibilityToggleEls(){return this.legendEl.querySelectorAll("wm-button")}get lineEls(){return this.plotAreaEl.querySelectorAll(".line")}get firstVisibleLineIdx(){let t=0;for(;this.hiddenLines.includes(t);)t++;return t<this.dataPointMatrix.length?t:-1}get pointEls(){return this.plotAreaEl.querySelectorAll(".point")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.parseData()}componentDidLoad(){new ResizeObserver((()=>this.debouncedResize())).observe(this.el)}handleVisibilityToggleKeydown(t,i){switch(t.key){case"Tab":t.shiftKey||-1===this.firstVisibleLineIdx||(t.preventDefault(),this.announce(this.lineFocusMessage(this.firstVisibleLineIdx)),this.focusDataPoint(this.firstVisibleLineIdx,0));break;case"ArrowUp":case"ArrowLeft":t.preventDefault();const e=l(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();const o=l(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[o].focus()}}handleDataPointKeydown(t){const[i,e]=this.focusedDataPoint,o=this.lineEls[i].querySelectorAll(".point").length,s=this.dataPointMatrix.length;switch(t.key){case"Tab":t.shiftKey&&this.visibilityToggles&&(t.preventDefault(),this.visibilityToggleEls[0].focus());break;case"ArrowUp":t.preventDefault();let r=i;do{r=l(r,-1,s-1)}while(this.hiddenLines.includes(r));this.announce(this.lineFocusMessage(r)),this.focusDataPoint(r,e);break;case"ArrowDown":t.preventDefault();let n=i;do{n=l(n,1,s-1)}while(this.hiddenLines.includes(n));this.announce(this.lineFocusMessage(n)),this.focusDataPoint(n,e);break;case"ArrowLeft":t.preventDefault();const a=l(e,-1,o-1);this.focusDataPoint(i,a);break;case"ArrowRight":t.preventDefault();const h=l(e,1,o-1);this.focusDataPoint(i,h)}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}lineFocusMessage(t){const i=this.dataPointMatrix[t][0].lineLabel,e=this.dataPointMatrix[t].filter((t=>null!==t.yValue)).length;return`${i}, line ${t+1} of ${this.dataPointMatrix.length} with ${e} data points`}focusDataPoint(t,i){const e=this.lineEls[t].querySelectorAll(".point")[i];this.pointEls.forEach((t=>t.tabIndex=-1)),e.tabIndex=0,e.focus(),this.focusedDataPoint=[t,i]}focusDataPointByEl(t){const i=parseInt(t.dataset.lineidx),e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.pointEls.forEach((t=>t.tabIndex=-1)),t.tabIndex=0,t.focus(),this.focusedDataPoint=[i,e]}calcYIntervals(){let t=[];if(this.yRange)t=a(this.yRange).map((t=>parseInt(t)));else{let i=[];Object.values(this.parsedLineData).flat().forEach((t=>i.push(...Object.values(t))));const e=i.filter((t=>null!==t));let o=Math.min(...e);const s=Math.max(...e);let r=d(s-o,4),n=r;for(;o%r!=0&&n>0;)o--,n--;r=d(s-o,4);let a=o;for(;a<=s+r;)t.push(a),a+=r}return t}determineDisplayedXIntervals(){const t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length,{skipInterval:i,skippedList:e}=h(this.xIntervals,t);return this.intervalSkip=i,e}buildLineDataPointDetails(t,i){let e=[];const o=Object.entries(i);let s;return o.forEach(((i,r)=>{const[n,a]=i;let l=100/(o.length-1)*r;const h=null===a?null:100-c(a,this.yIntervals[this.yIntervals.length-1],this.yIntervals[0]);0===r&&(l+=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?8/this.plotAreaEl.clientWidth*100:1),n!==this.highlightStart||s||(s=!0),e.push({lineLabel:t,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:s}),n===this.highlightEnd&&s&&(s=!1)})),e}toggleLineVisibility(t){this.hiddenLines.includes(t)?this.hiddenLines=this.hiddenLines.filter((i=>i!==t)):this.hiddenLines.push(t),i(this.el)}resetDataPointFocus(){this.popoverIndex=-1,this.pointEls.forEach((t=>t.tabIndex=-1)),-1!==this.firstVisibleLineIdx&&(this.lineEls[this.firstVisibleLineIdx].querySelectorAll(".point")[0].tabIndex=0,this.focusedDataPoint=[this.firstVisibleLineIdx,0])}calcDelta(t,i){let e;if(null===t.yValue||null===i.yValue)e=g.noData;else if(t.yValue==i.yValue)e="0%";else if(0==i.yValue)e="-";else{const o=Math.round((t.yValue-i.yValue)/i.yValue*100*100)/100;e=`${o>0?"+":""}${o}%`}return e}renderLegend(){const t=Object.keys(this.parsedLineData);return e("div",{ref:t=>this.legendEl=t,class:"legend"},t.map(((t,i)=>{const o=this.hiddenLines.includes(i);return e("div",{id:`legend-label-${i}`,class:"legend-label "+(-1!==this.focusedLine&&this.focusedLine!==i?"faded":""),onMouseEnter:()=>this.focusedLine=o?-1:i,onMouseLeave:()=>this.focusedLine=-1},this.renderIcon(i),t,this.visibilityToggles&&this.renderVisibilityToggle(t,i,o))})))}renderVisibilityToggle(t,i,o){return e("wm-button",{id:`visibility-button-${i}`,class:"visibility-toggle","label-for-identical-buttons":`${0===i?`Toggle line visibility list with ${this.dataPointMatrix.length} items`:""} ${o?x.show:x.hide} ${t} toggle ${o?"pressed":""}`,"button-type":"navigational",tooltip:o?x.show:x.hide,tooltipPosition:"bottom",icon:o?"f209":"f208",onClick:()=>this.toggleLineVisibility(i),onKeyDown:t=>this.handleVisibilityToggleKeydown(t,i),onFocus:()=>this.popoverIndex=-1})}renderIcon(t){const{color:i,icon:o}=this.lineStyles[t];return e("span",{class:"icon",style:{"--iconColor":i,"--icon":`"\\${o}"`,"--translation":5===t?"rotate(180deg)":"unset"}})}renderXIntervals(){return e("div",{class:"x-intervals",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`}},this.xIntervals.map((t=>e("span",{class:"x-interval "+(this.displayedXIntervals.includes(t)?"":"hidden")},t))))}renderYIntervals(){return e("div",{ref:t=>this.yIntervalsEl=t,class:"y-intervals"},this.yIntervals.map((t=>e("span",{class:"y-interval"},p(t)))))}renderData(){return this.dataPointMatrix.map(((t,i)=>{let o=this.focusedLine===i?"focused":"faded";const s=this.hiddenLines.includes(i);return e("div",{class:`line ${-1!==this.focusedLine?o:""} ${s?"hidden":""}`},this.renderLines(i),this.renderPoints(i))}))}renderPoints(t){const i=this.dataPointMatrix[t];return e("div",{class:"line-icons"},i.map(((o,s)=>{const{lineLabel:r,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:c}=o;if(null!==a){const{color:p,icon:d}=this.lineStyles[t],v=0===t&&0===s?0:void 0,x={"--icon":`"\\${d}"`,"--iconColor":p,"--xPosition":l+"%","--yPosition":h+"%","--translation":5===t?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};let u=`${r} ${c?this.highlightQualifier:""} ${this.xAxisLabel} ${n+(this.parsedUnits[0]?this.parsedUnits[0]:"")}, ${this.yAxisLabel}: ${a+(this.parsedUnits[1]?this.parsedUnits[1]:"")}`;if(this.showDeltas&&s>0){const t=i[s-1];u+=`, ${g.getChangeSince(t.xValue)} ${this.calcDelta(o,t)}`}return e("span",{id:`${r}-${s}`,role:"img","aria-label":u,tabIndex:v,class:"point icon",style:x,"data-lineidx":t,"data-xvalue":n,onKeyDown:t=>this.handleDataPointKeydown(t),onFocus:()=>this.popoverIndex=s,onClick:t=>this.focusDataPointByEl(t.target),onMouseEnter:()=>this.popoverIndex=s})}})))}renderLines(t){const i=this.dataPointMatrix[t];return e("svg",{class:"line-svg"},i.map(((o,s)=>{if(null!==o.yValue&&s!==i.length-1&&null!==i[s+1].yValue){const{color:r}=this.lineStyles[t],{xPositionPercent:n,yPositionPercent:a}=o,{xPositionPercent:l,yPositionPercent:h}=i[s+1];return e("line",{x1:n+"%",y1:a+"%",x2:l+"%",y2:h+"%",stroke:r,"stroke-width":"2px"})}})))}renderHoverAreas(){return e("div",{class:"hover-area-wrapper",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`},onMouseLeave:()=>this.popoverIndex=-1},this.xIntervals.map(((t,i)=>e("div",{onMouseEnter:()=>this.popoverIndex=i}))))}renderPopover(){if(!(this.popoverData&&this.popoverData[this.popoverIndex]&&this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`)))return"";const t=this.popoverData[this.popoverIndex],i=t[0].xPositionPercent,o=t.map((t=>t.yPositionPercent)).filter((t=>null!==t)),s=o.reduce(((t,i)=>t+i),0)/o.length,r=this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`),n=this.el.getBoundingClientRect(),a=r.getBoundingClientRect(),l=a.left-n.left,h=n.right-a.right>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),c=l>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),p=8/this.plotAreaEl.clientWidth*100;let d={"--leftPosition":h?i+p+"%":"unset","--rightPosition":c?100-i+p+"%":"unset","--topPosition":s+"%",transform:"translateY(-50%)"};if(!c&&!h){const t=`0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth+"px"} + ${this.el.scrollLeft+"px"} + 2px`;d={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:`translateX(calc(${t}))`}}return e("div",{ref:t=>this.popoverEl=t,class:"popover",style:d},e("div",{class:"title"},t[0].xValue,this.parsedUnits[0]&&e("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.popoverIndex>0&&e("div",{class:"comparison-title"},g.getChangeSince(this.popoverData[this.popoverIndex-1][0].xValue)),this.renderPopoverTable())}renderPopoverTable(){return e("table",{class:"popover-table"},this.popoverData[this.popoverIndex].map(((t,i)=>{if(!this.hiddenLines.includes(i)){const{lineLabel:o,yValue:s}=t,r=this.popoverIndex>0?this.popoverData[this.popoverIndex-1][i]:null,n=null!==s?(new Intl.NumberFormat).format(s):null;return e("tr",{class:"popover-row"},e("td",null,this.renderIcon(i)),e("td",{class:"row-label"},o),e("td",{class:"row-value"},null===s?g.noData:n,null!==s&&this.parsedUnits[1]&&e("span",{class:"unit --y"},this.parsedUnits[1])),this.showDeltas&&r&&this.renderDeltas(t,r))}})))}renderDeltas(t,i){const o=this.calcDelta(t,i),s="+"==o.toString()[0]||"-"==o?"positive":"-"==o.toString()[0]?"negative":"";return i&&e("td",{class:`delta --${s}`},o)}renderHoverIndicator(){return this.dataPointMatrix.length>0&&this.dataPointMatrix[0][this.popoverIndex]?e("div",{class:"hover-indicator",style:{"--xPosition":this.dataPointMatrix[0][this.popoverIndex].xPositionPercent+"%"}}):""}renderHighlight(){const t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent,i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;return e("div",{class:"highlight",style:{"--startPercentage":t+"%","--endPercentage":i+"%"}})}render(){return e(o,{onBlur:()=>this.resetDataPointFocus(),onMouseLeave:()=>this.popoverIndex=-1},e("div",{class:"component-wrapper",role:"application","aria-roledescription":v.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),e("div",{class:"chart-wrapper"},e("div",{class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&` (${this.parsedUnits[1]})`),this.renderYIntervals(),e("div",{ref:t=>this.plotAreaEl=t,class:"plot-area "+(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":`${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),-1!==this.popoverIndex&&this.renderHoverIndicator(),-1!==this.popoverIndex&&this.renderPopover(),this.renderXIntervals(),e("div",{class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&` (${this.parsedUnits[0]})`)),e("div",{id:"chart-description",class:"sr-only"},`${g.instructions} ${this.description}`),e("div",{ref:t=>this.liveRegionEl=t,"aria-live":"polite",class:"sr-only"},this.announcement)))}get el(){return s(this)}static get watchers(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}}};u.style=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .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:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);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:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0;border-radius:3px}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}: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}';export{u as wm_line_chart}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as o,H as e,g as s}from"./p-4de51706.js";import{d as n,q as r,k as a,y as h}from"./p-ba751ca4.js";import{g as m}from"./p-2732bddd.js";const c=class{constructor(o){t(this,o),this.wmActionMenuLoaded=i(this,"wmActionMenuLoaded",7),this.menuLoaded=i(this,"menuLoaded",7),this.openUp=!1,this.keysSoFar="",this.searchIndex=0,this.debouncedClearKeysSoFar=n((()=>{this.keysSoFar=""}),500),this.isExpanded=!1,this.tooltipPosition=void 0,this.actionMenuType="icon",this.buttonText=void 0,this.disabled=!1,this.tooltip=void 0,this.labelForIdenticalButtons=void 0,this.darkMode=void 0}get horizontalPosition(){return this.el&&this.itemsEl&&r(this.el,this.itemsEl.clientWidth)?"right":"left"}get childItems(){return Array.from(this.el.querySelectorAll("wm-menuitem"))}get internalButtonType(){return"icon"===this.actionMenuType||"text"===this.actionMenuType?this.actionMenuType+"only":this.actionMenuType}handleClickedItem(){this.close()}handleKeyUp(t){this.moveUp(t.target)}handleKeyDown(t){this.moveDown(t.detail)}handleHomeKey(){this.focusFirstItem()}handleEndKey(){this.focusLastItem()}handleTabKey(){this.isExpanded&&this.close()}handleEscKey(){this.close(),this.wmButtonEl.focus()}handleKey(t){switch(t.key){case"ArrowDown":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusFirstItem())));break;case"ArrowUp":this.isExpanded||(t.preventDefault(),this.open(),window.requestAnimationFrame((()=>this.focusLastItem())))}}handleMenuitemBlur(t){if(t.detail.relatedTarget!==this.el&&!this.el.contains(t.detail.relatedTarget)){const i=new CustomEvent("blur");i.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(i)}}handleButtonBlur(t){(t.relatedTarget===this.el||this.el.contains(t.relatedTarget))&&t.stopPropagation()}componentDidLoad(){"icon"===this.actionMenuType||this.buttonText||console.error("wm-action-menu should have a valid button-text property when action-menu-type is set to 'text' or 'selector'"),"icon"!==this.actionMenuType||this.tooltip||console.error("wm-action-menu should have a valid tooltip when action-menu-type is set to 'icon'"),this.wmActionMenuLoaded.emit(),this.menuLoaded.emit()}moveUp(t){const i=this.childItems.indexOf(t);0===i?this.focusLastItem():this.childItems[i-1].focus()}moveDown(t){const i=this.childItems.indexOf(t);i===this.childItems.length-1?this.focusFirstItem():this.childItems[i+1].focus()}open(){this.disabled||(this.openUp=a(this.el,this.itemsEl.clientHeight),this.isExpanded=!0,this.itemsEl.classList.remove("hidden"),window.requestAnimationFrame((()=>this.focusFirstItem())))}close(t=!0){this.isExpanded=!1,window.setTimeout((()=>{this.itemsEl.classList.add("hidden")}),150),window.setTimeout((()=>{!t||"BODY"!==document.activeElement.tagName&&"WM-MENUITEM"!==document.activeElement.tagName||this.wmButtonEl.focus()}),250)}focusFirstItem(){this.childItems[0].focus()}focusLastItem(){this.childItems[this.childItems.length-1].focus()}findAndFocusItem(t){if(this.keysSoFar||" "!=t.detail){const i=t.detail.toLowerCase();this.focusFirstItem(),this.keysSoFar||this.childItems.forEach(((t,i)=>{t===document.activeElement&&(this.searchIndex=i)})),this.keysSoFar+=i;let o=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);o||(o=this.findMatchInRange(this.childItems,0,this.searchIndex)),o&&o.focus(),this.debouncedClearKeysSoFar()}else t.target.click()}findMatchInRange(t,i,o){for(var e=i;e<o;e++){var s=t[e].textContent;if(s&&0===s.toLowerCase().indexOf(this.keysSoFar))return t[e]}return null}render(){return o(e,{onBlur:()=>this.close(!1)},o("div",{class:h()},o("wm-button",{"button-type":this.internalButtonType,tooltip:this.tooltip,"custom-background":this.darkMode?"dark":void 0,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:"icon"===this.actionMenuType?"f1d9":"",iconSize:"icon"===this.actionMenuType?"24px":void 0,id:"menubtn",onClick:()=>this.isExpanded?this.close():this.open(),onBlur:t=>this.handleButtonBlur(t),disabled:this.disabled,ref:t=>this.wmButtonEl=t,"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":"menu"},this.buttonText),o("div",{class:`dropdown ${this.openUp?"open-up":""} ${this.horizontalPosition} ${this.isExpanded?"open":""} hidden`,id:"menu",tabindex:-1,role:"menu",ref:t=>this.itemsEl=t},o("slot",null))))}static get delegatesFocus(){return!0}get el(){return s(this)}};c.style=":host{--wmcolor-actionmenu-background:var(--wmcolor-background);--wmcolor-actionmenu-text:var(--wmcolor-interactive);--wmcolor-actionmenu-text-disabled:var(--wmcolor-option-text-disabled);position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:var(--wmcolor-actionmenu-text);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}:host(:focus){outline:none}wm-action-menu:focus{outline:none}.dropdown{position:absolute;padding:0;margin:0.25rem 0;border-radius:3px 3px 3px 3px;min-width:11.4375rem;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-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;visibility:hidden;-webkit-box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);background:var(--wmcolor-actionmenu-background);z-index:10;text-align:left;white-space:nowrap}.dropdown:focus{outline:none}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1);visibility:visible}.dropdown.open-up{bottom:2.5rem;top:auto;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.right{left:0}.dropdown.left{right:0}";const d=class{constructor(o){t(this,o),this.wmMenuitemClicked=i(this,"wmMenuitemClicked",7),this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7),this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7),this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7),this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7),this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7),this.wmPageDownItems=i(this,"wmPageDownItems",7),this.wmPageUpItems=i(this,"wmPageUpItems",7),this.wmTabKeyPressed=i(this,"wmTabKeyPressed",7),this.wmLetterPressed=i(this,"wmLetterPressed",7),this.wmMenuitemBlurred=i(this,"wmMenuitemBlurred",7),this.descriptionCharLimit=100,this.disabled=!1,this.icon=void 0,this.description=void 0}handleKeydown(t){const i=t.altKey||t.ctrlKey||t.metaKey,o=/^.$/.test(t.key)&&!i;switch(t.key){case"ArrowUp":t.preventDefault(),this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":t.preventDefault(),this.wmKeyDownPressed.emit(this.el);break;case"Enter":t.preventDefault(),this.disabled||this.el.click();break;case"Escape":t.preventDefault(),t.stopPropagation(),this.wmEscKeyPressed.emit();break;case"Home":t.preventDefault(),this.wmHomeKeyPressed.emit();break;case"End":t.preventDefault(),this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:o&&(t.preventDefault(),this.wmLetterPressed.emit(t.key))}}handleClick(){this.disabled||this.wmMenuitemClicked.emit()}handleBlur(t){this.wmMenuitemBlurred.emit({relatedTarget:t.relatedTarget})}setOnClick(){this.disabled&&this.el.onclick?(this.onClickFunc=this.el.onclick,this.el.onclick=null):!this.disabled&&this.onClickFunc&&(this.el.onclick=this.onClickFunc)}componentWillLoad(){this.icon&&(this.icon=m(this.icon)),this.description&&(this.description.length>this.descriptionCharLimit&&console.error(`wm-menuitem description is above the character limit of ${this.descriptionCharLimit}`),this.icon&&console.error("wm-menuitems with descriptions do not support the use of icons")),this.setOnClick()}componentDidLoad(){this.icon&&(this.iconEl.classList.add("mdi"),this.iconEl.innerHTML=`&#x${this.icon};`)}render(){return o(e,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},o("div",{class:"wrapper","aria-disabled":this.disabled?"true":null},o("span",{ref:t=>this.iconEl=t}),this.el.textContent,this.description?o("div",{class:"description"},this.description):""))}get el(){return s(this)}static get watchers(){return{disabled:["setOnClick"]}}};d.style=':host{--wmcolor-actionmenu-item-background-hover:var(--wmcolor-option-background-hover);--wmcolor-actionmenu-item-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-actionmenu-item-background:var(--wmcolor-option-background);--wmcolor-actionmenu-item-border:var(--wmcolor-option-border);--wmcolor-actionmenu-item-text-description:var(--wmcolor-option-text);--wmcolor-actionmenu-item-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-actionmenu-item-text:var(--wmcolor-interactive);contain:content;font-family:inherit}:host .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:var(--wmcolor-actionmenu-item-background);font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid var(--wmcolor-actionmenu-item-border);color:var(--wmcolor-actionmenu-item-text);font-weight:700}:host .wrapper:hover{background:var(--wmcolor-actionmenu-item-background-hover);outline:none}:host .wrapper .description{color:var(--wmcolor-actionmenu-item-text-description);font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper:not(:last-child){border-bottom:2px solid var(--wmcolor-actionmenu-item-border)}:host ::slotted{font-family:inherit}:host .mdi{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;font-size:1.12rem}:host(:focus-visible){outline:none}:host(:focus-visible) .wrapper{outline:none;background:var(--wmcolor-actionmenu-item-background-hover)}:host([aria-disabled=true]){pointer-events:none}:host([aria-disabled=true]) .wrapper{background:var(--wmcolor-actionmenu-item-background-disabled);color:var(--wmcolor-actionmenu-text-disabled)}:host([aria-disabled=true]) .description{color:var(--wmcolor-actionmenu-text-disabled)}';export{c as wm_action_menu,d as wm_menuitem}
@@ -0,0 +1 @@
1
+ import{r as t,h as o,H as e,g as r}from"./p-4de51706.js";import{i,h as n,k as s,p as a,q as l,r as p,s as h}from"./p-ba751ca4.js";const m=class{constructor(o){t(this,o),this.tooltipMessage=i.formatMessage({id:"toggletip.moreInformation",defaultMessage:"More information"}),this.label=void 0,this.tooltip=void 0,this.tooltipPosition="bottom-right",this.targetSize="small",this.isOpen=!1}componentWillLoad(){const t=["top","right","bottom","left","top-right","top-left","bottom-right","bottom-left"];this.label||console.error("wm-toggletip must have a label property"),this.tooltip||console.error("wm-toggletip must have a tooltip property"),t.includes(this.tooltipPosition)||console.error(`wm-toggletip: tooltip-position has an invalid value of "${this.tooltipPosition}", make sure to use one of the following values: ${t}`)}handleKeydown(t){switch(t.key){case"Escape":t.preventDefault(),this.isOpen&&(t.stopPropagation(),this.close());break;case"Tab":this.isOpen&&this.close()}}handleClick(t){this.isOpen&&(t.target===this.el||this.el.contains(t.target)?this.announceToggletip():this.close())}open(){n(),this.setToggletipPosition(this.tooltipPosition,this.el,this.toggletipEl.clientHeight,this.toggletipEl.clientWidth),this.isOpen=!0,this.announceToggletip()}close(){this.isOpen=!1,n()}handleBlur(){n(),this.liveRegionEl.innerHTML=""}announceToggletip(){this.liveRegionEl.innerHTML="",setTimeout((()=>{this.liveRegionEl.innerHTML=this.tooltip}),10)}setToggletipPosition(t,o,e,r){t.includes("bottom")&&s(o,e)?t=t.replace("bottom","top"):t.includes("top")&&a(o,e)&&(t=t.replace("top","bottom")),t.includes("left")&&l(o,r)?t=t.replace("left","right"):t.includes("right")&&p(o,r)&&(t=t.replace("right","left"))}render(){return o(e,{class:`size-${this.targetSize}`},o("button",{class:"button",type:"button","aria-label":this.label,onClick:()=>this.open(),onMouseEnter:()=>h(this.tooltipPosition,this.el,this.tooltipMessage),onMouseLeave:()=>n(),onFocus:()=>h(this.tooltipPosition,this.el,this.tooltipMessage),onBlur:()=>this.handleBlur()}),o("div",{ref:t=>this.toggletipEl=t,class:`toggletip ${this.isOpen?"":"hidden"} ${this.tooltipPosition}`},this.tooltip),o("div",{ref:t=>this.liveRegionEl=t,class:"live-region sr-only",role:"status","aria-live":"polite","aria-atomic":"true"}))}static get delegatesFocus(){return!0}get el(){return r(this)}};m.style=':host{--button-size:16px}:host(.size-small){--button-size:16px}:host(.size-small) .button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host(.size-large){--button-size:40px}:host(.size-large) .button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-3px}:host{--wmcolor-toggletip-background:var(--wmcolor-background-dark);--wmcolor-toggletip-icon-background:var(--wmcolor-background-dark);--wmcolor-toggletip-icon-text:var(--wmcolor-icon-ondark);--wmcolor-toggletip-text:var(--wmcolor-text-ondark);display:inline-block;position:relative;height:var(--button-size);width:var(--button-size);text-transform:none;font-weight:normal}:host .button{display:-ms-flexbox;display:flex;background:none;border:none;padding:0;width:inherit;height:inherit;border-radius:50%;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:relative;cursor:pointer}:host .button: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:"\\f2fc";font-size:16px;color:var(--wmcolor-toggletip-icon-background);background:radial-gradient(var(--wmcolor-toggletip-icon-text) 40%, transparent 0%)}:host .button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-3px}:host .tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);pointer-events:none;font-family:inherit;font-size:0.875rem;text-transform:none;font-weight:normal;background:var(--wmcolor-tooltip-background);color:var(--wmcolor-tooltip-text);padding:0.375rem;line-height:normal;z-index:30;white-space:nowrap}:host .tooltip.hover{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;white-space:nowrap}:host .toggletip{position:absolute;max-width:13.75rem;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5rem 0.75rem;border-radius:0.1875rem;background:var(--wmcolor-toggletip-background);color:var(--wmcolor-toggletip-text);font-size:14px;z-index:30}:host .toggletip.top:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.bottom:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-right-color:var(--wmcolor-toggletip-background);border-right-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-left-width:0px;top:calc(50% - 6px);left:-0.1875rem}:host .toggletip.left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-left-color:var(--wmcolor-toggletip-background);border-left-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-right-width:0px;top:calc(50% - 6px);right:-0.1875rem}:host .toggletip.bottom-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.bottom-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.top-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.top-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.hidden{-webkit-transform:scale(0, 0) !important;transform:scale(0, 0) !important;visibility:hidden}:host .toggletip{top:calc(var(--button-size) / 2);left:calc(var(--button-size) / 2)}:host .toggletip.top{-webkit-transform:translate(-50%, calc(-100% - 18px));transform:translate(-50%, calc(-100% - 18px))}:host .toggletip.bottom{-webkit-transform:translate(-50%, 18px);transform:translate(-50%, 18px)}:host .toggletip.right{-webkit-transform:translate(18px, -50%);transform:translate(18px, -50%)}:host .toggletip.left{-webkit-transform:translate(calc(-100% - 18px), -50%);transform:translate(calc(-100% - 18px), -50%)}:host .toggletip.bottom-right{-webkit-transform:translate(-20px, 18px);transform:translate(-20px, 18px)}:host .toggletip.bottom-left{-webkit-transform:translate(calc(-100% + 20px), 18px);transform:translate(calc(-100% + 20px), 18px)}:host .toggletip.top-right{-webkit-transform:translate(-20px, calc(-100% - 18px));transform:translate(-20px, calc(-100% - 18px))}:host .toggletip.top-left{-webkit-transform:translate(calc(-100% + 20px), calc(-100% - 18px));transform:translate(calc(-100% + 20px), calc(-100% - 18px))}: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}';export{m as wm_toggletip}
@@ -1 +1 @@
1
- import{r as t,c as r,h as i,H as s,g as a}from"./p-57695dba.js";import{a as o}from"./p-2732bddd.js";import{n as e,o as n,i as h}from"./p-1e536698.js";const c=class{constructor(i){t(this,i),this.wmNavigatorLogout=r(this,"wmNavigatorLogout",7),this.retrievedInfo=!this.loadFromUserinfo,this.parsedProducts=[],this.openRight=!1,this.userName=void 0,this.email=void 0,this.authType=1,this.connectionName=void 0,this.logoutUrl=void 0,this.products=void 0,this.loadFromUserinfo=!1,this.isOpen=!1,this.itemIndexToFocus=0}isSafeUrl(t){let r=!1;return["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"].forEach((i=>{t&&t.match(`^https://(.*.)?${i}(/.*)?$`)&&(r=!0)})),r}async componentWillLoad(){this.userName||console.error("wm-navigator: user-name is a required property."),await this.parseData(),this.setFocusIndex()}async parseData(){this.loadFromUserinfo?await(async()=>{const t=await fetch("/platform/navigator/userinfo");if(t&&t.ok)return await t.json();throw new Error(t.statusText)})().then((t=>{this.email=t.email,this.currentProductId=t.current_product_id,this.parsedProducts=this.productKeysToCamelCase(t.products),this.logoutUrl=this.logoutUrl?this.logoutUrl:t.logout_url,this.connectionName=this.connectionName?this.connectionName:t.connection_name,this.email&&this.currentProductId&&(this.retrievedInfo=!0)})).catch((t=>{console.error(t)})):(this.currentProductId=o(this.el),this.products&&(this.parsedProducts="string"==typeof this.products?JSON.parse(this.products):this.products,this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts))),this.parsedProducts.sort(((t,r)=>t.name<r.name?-1:1))}productKeysToCamelCase(t){return t.map((t=>{const r=Object.keys(t);let i={};return r.forEach((r=>{i[e(r)]=t[r]})),i}))}setFocusIndex(){if(this.parsedProducts.length>1){const t=this.getProduct(this.currentProductId);t&&(this.itemIndexToFocus=this.parsedProducts.indexOf(t))}}handleKeys(t){switch(t.key){case"Escape":t.preventDefault(),this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault(),this.isOpen||(this.itemIndexToFocus=n(this.itemIndexToFocus,t.key,this.navigatorItems.length),this.openMenu())}}handleKeydown(t){const r=t.detail.key,i=t.detail.navItem;switch(r){case"Tab":this.closeMenu(!1);break;case"Enter":case" ":i.click();break;case"ArrowDown":case"ArrowUp":const t=this.itemIndexToFocus;this.itemIndexToFocus=n(this.itemIndexToFocus,r,this.navigatorItems.length),this.focusItem(),this.unfocusItem(t)}}handleClick(t){t.target!==this.el&&!this.el.contains(t.target)&&this.isOpen&&this.closeMenu(!1)}handleButtonClick(){this.isOpen?this.closeMenu():this.openMenu()}openMenu(){if(this.wrapperEl){const t=this.wrapperEl.clientWidth,r=this.el.getBoundingClientRect().left,i=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>r&&i>r}this.isOpen=!0,this.focusItem()}closeMenu(t=!0){this.isOpen=!1,window.requestAnimationFrame((()=>{this.unfocusItem(this.itemIndexToFocus),this.setFocusIndex(),t&&this.buttonFocusHandler()}))}focusItem(){const t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0,t.focused=!0,window.requestAnimationFrame((()=>t.focus()))}unfocusItem(t){const r=this.navigatorItems[t];r.tabIndex=-1,r.focused=!1}buttonFocusHandler(){this.el.shadowRoot.querySelector("priv-navigator-button").shadowRoot.querySelector("button").focus()}renderUserInfo(){return i("div",{class:"user",id:"wm-nav-user","aria-label":h.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},i("p",null,this.userName),i("p",null,this.email))}setAltText(){return h.formatMessage(this.parsedProducts.length>1?{id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"}:{id:"navigator.userinfo",defaultMessage:"User information"})}renderHeading(){return i("h2",null,h.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))}renderList(){return i("ul",{role:"listbox","aria-label":`${h.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())}renderProductOptions(){return this.parsedProducts.map((t=>{let r,s,a,o;if(r=t.name,s=t.iconUrl,o=this.setProductOnClick(t.id),r&&s)return a=this.currentProductId===t.id,i("priv-navigator-item",{selected:a,id:t.id,onClick:o,role:"option","aria-label":r},i("img",{src:s,alt:r}))}))}setProductOnClick(t){const r=this.getProduct(t);if(this.currentProductId===t)return()=>{};if(r){if(this.loadFromUserinfo||2===this.authType){const t=r.linkUrl;return this.isSafeUrl(t)?()=>window.location.href=t:void console.error(`"${t}" is not a safe url`)}if(3===this.authType){const t=this.connectionName?`/?connection_name=${this.connectionName}`:"",i=r.samlLinkUrl;return this.isSafeUrl(i)?()=>window.location.href=i+t:void console.error(`"${i}" is not a safe url`)}}}renderLogoutOption(){return i("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},i("span",{class:"logout"},h.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))}setLogoutOnclick(){return()=>{this.wmNavigatorLogout.emit();const t=this.logoutUrl;this.isSafeUrl(t)?window.location.href=t:console.error(`"${t}" is not a safe url`)}}get navigatorItems(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))}getProduct(t){return this.parsedProducts.find((r=>r.id===t))}render(){return this.retrievedInfo?i(s,null,i("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText()}),i("div",{class:`wrapper ${this.isOpen?"":"hide"} ${this.openRight?"right":""}`,ref:t=>this.wrapperEl=t},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""}static get delegatesFocus(){return!0}get el(){return a(this)}static get watchers(){return{products:["parseData"]}}};c.style=":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}";export{c as wm_navigator}
1
+ import{r as t,c as r,h as i,H as s,g as a}from"./p-4de51706.js";import{a as o}from"./p-2732bddd.js";import{n as e,o as n,i as h}from"./p-ba751ca4.js";const c=class{constructor(i){t(this,i),this.wmNavigatorLogout=r(this,"wmNavigatorLogout",7),this.retrievedInfo=!this.loadFromUserinfo,this.parsedProducts=[],this.openRight=!1,this.userName=void 0,this.email=void 0,this.authType=1,this.connectionName=void 0,this.logoutUrl=void 0,this.products=void 0,this.loadFromUserinfo=!1,this.isOpen=!1,this.itemIndexToFocus=0}isSafeUrl(t){let r=!1;return["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"].forEach((i=>{t&&t.match(`^https://(.*.)?${i}(/.*)?$`)&&(r=!0)})),r}async componentWillLoad(){this.userName||console.error("wm-navigator: user-name is a required property."),await this.parseData(),this.setFocusIndex()}async parseData(){this.loadFromUserinfo?await(async()=>{const t=await fetch("/platform/navigator/userinfo");if(t&&t.ok)return await t.json();throw new Error(t.statusText)})().then((t=>{this.email=t.email,this.currentProductId=t.current_product_id,this.parsedProducts=this.productKeysToCamelCase(t.products),this.logoutUrl=this.logoutUrl?this.logoutUrl:t.logout_url,this.connectionName=this.connectionName?this.connectionName:t.connection_name,this.email&&this.currentProductId&&(this.retrievedInfo=!0)})).catch((t=>{console.error(t)})):(this.currentProductId=o(this.el),this.products&&(this.parsedProducts="string"==typeof this.products?JSON.parse(this.products):this.products,this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts))),this.parsedProducts.sort(((t,r)=>t.name<r.name?-1:1))}productKeysToCamelCase(t){return t.map((t=>{const r=Object.keys(t);let i={};return r.forEach((r=>{i[e(r)]=t[r]})),i}))}setFocusIndex(){if(this.parsedProducts.length>1){const t=this.getProduct(this.currentProductId);t&&(this.itemIndexToFocus=this.parsedProducts.indexOf(t))}}handleKeys(t){switch(t.key){case"Escape":t.preventDefault(),this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault(),this.isOpen||(this.itemIndexToFocus=n(this.itemIndexToFocus,t.key,this.navigatorItems.length),this.openMenu())}}handleKeydown(t){const r=t.detail.key,i=t.detail.navItem;switch(r){case"Tab":this.closeMenu(!1);break;case"Enter":case" ":i.click();break;case"ArrowDown":case"ArrowUp":const t=this.itemIndexToFocus;this.itemIndexToFocus=n(this.itemIndexToFocus,r,this.navigatorItems.length),this.focusItem(),this.unfocusItem(t)}}handleClick(t){t.target!==this.el&&!this.el.contains(t.target)&&this.isOpen&&this.closeMenu(!1)}handleButtonClick(){this.isOpen?this.closeMenu():this.openMenu()}openMenu(){if(this.wrapperEl){const t=this.wrapperEl.clientWidth,r=this.el.getBoundingClientRect().left,i=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>r&&i>r}this.isOpen=!0,this.focusItem()}closeMenu(t=!0){this.isOpen=!1,window.requestAnimationFrame((()=>{this.unfocusItem(this.itemIndexToFocus),this.setFocusIndex(),t&&this.buttonFocusHandler()}))}focusItem(){const t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0,t.focused=!0,window.requestAnimationFrame((()=>t.focus()))}unfocusItem(t){const r=this.navigatorItems[t];r.tabIndex=-1,r.focused=!1}buttonFocusHandler(){this.el.shadowRoot.querySelector("priv-navigator-button").shadowRoot.querySelector("button").focus()}renderUserInfo(){return i("div",{class:"user",id:"wm-nav-user","aria-label":h.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},i("p",null,this.userName),i("p",null,this.email))}setAltText(){return h.formatMessage(this.parsedProducts.length>1?{id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"}:{id:"navigator.userinfo",defaultMessage:"User information"})}renderHeading(){return i("h2",null,h.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))}renderList(){return i("ul",{role:"listbox","aria-label":`${h.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())}renderProductOptions(){return this.parsedProducts.map((t=>{let r,s,a,o;if(r=t.name,s=t.iconUrl,o=this.setProductOnClick(t.id),r&&s)return a=this.currentProductId===t.id,i("priv-navigator-item",{selected:a,id:t.id,onClick:o,role:"option","aria-label":r},i("img",{src:s,alt:r}))}))}setProductOnClick(t){const r=this.getProduct(t);if(this.currentProductId===t)return()=>{};if(r){if(this.loadFromUserinfo||2===this.authType){const t=r.linkUrl;return this.isSafeUrl(t)?()=>window.location.href=t:void console.error(`"${t}" is not a safe url`)}if(3===this.authType){const t=this.connectionName?`/?connection_name=${this.connectionName}`:"",i=r.samlLinkUrl;return this.isSafeUrl(i)?()=>window.location.href=i+t:void console.error(`"${i}" is not a safe url`)}}}renderLogoutOption(){return i("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},i("span",{class:"logout"},h.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))}setLogoutOnclick(){return()=>{this.wmNavigatorLogout.emit();const t=this.logoutUrl;this.isSafeUrl(t)?window.location.href=t:console.error(`"${t}" is not a safe url`)}}get navigatorItems(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))}getProduct(t){return this.parsedProducts.find((r=>r.id===t))}render(){return this.retrievedInfo?i(s,null,i("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText()}),i("div",{class:`wrapper ${this.isOpen?"":"hide"} ${this.openRight?"right":""}`,ref:t=>this.wrapperEl=t},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""}static get delegatesFocus(){return!0}get el(){return a(this)}static get watchers(){return{products:["parseData"]}}};c.style=":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}";export{c as wm_navigator}
@@ -0,0 +1 @@
1
+ System.register(["./p-0fe97e85.system.js","./p-ae32eb8d.system.js","./p-4272aa37.system.js"],(function(e){"use strict";var t,i,n,a,r;return{setters:[function(e){t=e.r;i=e.h;n=e.H;a=e.g},function(e){r=e.g},function(){}],execute:function(){var s="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 o=e("wm_modal_header",function(){function e(e){t(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 i(n,null,i("div",{class:"wm-wrapper"},i("div",null,i("h2",{class:"title",id:"wm-modal-heading-text-".concat(this.uid)},this.heading,i("span",{class:"subtitle"},this.subheading))),i("wm-button",{"button-type":"navigational",icon:"f156",tooltip:r.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 a(this)},enumerable:false,configurable:true});return e}());o.style=s}}}));
@@ -1 +1 @@
1
- import{r,c as s,g as t}from"./p-57695dba.js";const a=class{constructor(t){r(this,t),this.wmWrapperLoaded=s(this,"wmWrapperLoaded",7)}componentDidLoad(){this.wmWrapperLoaded.emit()}render(){}get el(){return t(this)}};export{a as wm_wrapper}
1
+ import{r,c as s,g as t}from"./p-4de51706.js";const e=class{constructor(t){r(this,t),this.wmWrapperLoaded=s(this,"wmWrapperLoaded",7)}componentDidLoad(){this.wmWrapperLoaded.emit()}render(){}get el(){return t(this)}};export{e as wm_wrapper}
@@ -0,0 +1 @@
1
+ System.register(["./p-0fe97e85.system.js","./p-4272aa37.system.js"],(function(t){"use strict";var e,i,n,r,a,s,o,u;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;a=t.g;s=t.f},function(t){o=t.d;u=t.g}],execute:function(){var l=":host{display:-ms-flexbox;display:flex;font-family:inherit;-ms-flex-item-align:stretch;align-self:stretch}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host.hide{display:none}.tab-item{display:-ms-flexbox;display:flex;-ms-flex-item-align:stretch;align-self:stretch;list-style-type:none}.tab-item .tab{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;border-radius:0;color:var(--wmcolor-tab-text);text-decoration:none;letter-spacing:0.7px;font-size:0.875rem;font-weight:500;opacity:1;position:relative;text-transform:uppercase;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-inline:1.5rem}.tab-item .tab[aria-selected=true]{font-weight:700;opacity:1;text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:16px}.tab-item .tab[aria-selected=true].dark{color:var(--wmcolor-tab-text-ondark)}.tab-item .tab,.tab-item .tab:hover,.tab-item .tab:active{outline:none}.tab-item .tab:focus{outline:none}.tab-item .tab.dark:not([aria-selected=true]){opacity:0.8;color:var(--wmcolor-tab-text-ondark)}.tab-item .tab:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-3px}";var c=t("wm_tab_item",function(){function t(t){var n=this;e(this,t);this.wmTabSelected=i(this,"wmTabSelected",7);this.keydownOnTabItem=i(this,"keydownOnTabItem",7);this.tabItemLoaded=i(this,"tabItemLoaded",7);this.tabClicked=function(t){t.preventDefault();n.wmTabSelected.emit({tabId:n.tabId})};this.tabPressed=function(t){var e=t.key;if(e==="Enter"||e===" "){t.preventDefault();n.wmTabSelected.emit({tabId:n.tabId})}else if(e.includes("Arrow")){t.preventDefault();n.keydownOnTabItem.emit({tabItem:n.el,key:t.key})}};this.selected=false;this.show=true;this.tabId=""}Object.defineProperty(t.prototype,"parentTabList",{get:function(){return this.el.parentElement},enumerable:false,configurable:true});t.prototype.componentDidLoad=function(){this.tabItemLoaded.emit()};t.prototype.render=function(){var t=this;var e=this.show?"":"hide ";e+=this.parentTabList&&this.parentTabList.customBackground=="dark"?"dark":"";var i={};var a=this.parentTabList&&this.parentTabList.customPadding;if(a){var s=parseInt(a,10)*2||0;var o=a.split(/([0-9]+)/).pop();i={"padding-left":this.parentTabList.customPadding,"padding-right":this.parentTabList.customPadding,"background-size":"calc(100% - ".concat(s).concat(o,") 3px")}}return n(r,{role:"presentation"},n("li",{class:"tab-item",role:"presentation"},n("a",{class:"tab ".concat(e),style:i,role:"tab",ref:function(e){return t.linkEl=e},onClick:this.tabClicked,id:"tab-link-".concat(this.tabId),onKeyDown:function(e){return t.tabPressed(e)},"aria-selected":this.selected?"true":"false",tabindex:this.selected?0:-1},n("slot",null))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());c.style=l;var f=":host{--wmcolor-tab-background:var(--wmcolor-background-transparent);--wmcolor-tab-background-dark:var(--wmcolor-background-dark);--wmcolor-tab-text-ondark:var(--wmcolor-interactive-ondark);--wmcolor-tab-text:var(--wmcolor-interactive);position:relative;white-space:nowrap;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:block}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .tabcontainer{background:var(--wmcolor-tab-background);margin:0;width:100%;height:4.0625rem;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0}:host .tabcontainer.dark{background:var(--wmcolor-tab-background-dark);margin:0}:host wm-select{padding:0.375rem 0}";var b=t("wm_tab_list",function(){function t(t){var n=this;e(this,t);this.wmTabSelected=i(this,"wmTabSelected",7);this.debouncedSetLayout=o((function(){if(!n.listWidth){n.setListWidth()}s(n.el)}),10);this.customBackground=undefined;this.customPadding=undefined;this.selectedTab=undefined}Object.defineProperty(t.prototype,"menuLayout",{get:function(){if(this.listWidth){return this.el.offsetWidth<this.listWidth-24}else{return false}},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tabItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-tab-item"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"selectedTabItem",{get:function(){return this.tabItems.filter((function(t){return t.selected}))[0]},enumerable:false,configurable:true});t.prototype.getLinkEl=function(t){return t.shadowRoot.querySelector("a")};Object.defineProperty(t.prototype,"panels",{get:function(){var t=Array.from(document.querySelectorAll("wm-tab-panel"));var e=this.tabItems.map((function(t){return t.tabId}));return t.filter((function(t){return e.includes(t.tabId)}))},enumerable:false,configurable:true});t.prototype.getPanel=function(t){return this.panels.find((function(e){return e.tabId===t}))};t.prototype.setListWidth=function(){var t=this.tabItems.reduce((function(t,e){return t+e.offsetWidth}),0);this.listWidth=t&&t>0?t:this.listWidth};t.prototype.setSelected=function(t){this.tabItems.map((function(e){return e.selected=e.tabId===t}));var e=this.panels.length===1&&this.tabItems.length>1;if(e){this.setAttributesOnPanel(this.panels[0],this.selectedTabItem);this.panels[0].active=true}else{this.panels.map((function(e){return e.active=e.tabId===t}))}};t.prototype.showItems=function(){this.tabItems.map((function(t){return t.show=true}))};t.prototype.hideItems=function(){this.tabItems.map((function(t){return t.show=false}))};t.prototype.componentWillLoad=function(){var t=this;this.el.focus=function(){t.selectedTabItem&&t.selectedTabItem.focus()};var e=new ResizeObserver((function(){return t.debouncedSetLayout()}));e.observe(this.el)};t.prototype.componentDidLoad=function(){var t=this.selectedTab||this.tabItems[0].tabId;this.setSelected(t)};t.prototype.tabItemLoaded=function(t){this.setAriaOnPanelAndTab(t.target)};t.prototype.setAriaOnPanelAndTab=function(t){var e=this.getPanel(t.tabId);if(!e){if(this.panels.length===1){this.setAttributesOnTab(t,this.panels[0])}}else{this.setAttributesOnPanel(e,t);this.setAttributesOnTab(t,e)}};t.prototype.setAttributesOnTab=function(t,e){var i=this.getLinkEl(t);if(i){i.setAttribute("href","#".concat(e.id))}};t.prototype.removeAttributesOnTab=function(t){var e=this.getLinkEl(t);if(e){e.removeAttribute("href")}};t.prototype.setAttributesOnPanel=function(t,e){var i=this.getLinkEl(e);if(i){t.setAttribute("aria-labelledby",i.id);t.setAttribute("tab-id",e.tabId)}};t.prototype.handleKeydown=function(t){var e=t.detail.key;var i=this.tabItems.indexOf(t.detail.tabItem);if(e==="ArrowLeft"||e==="ArrowRight"){this.handleLeftRightArrow(i,e)}};t.prototype.handleLeftRightArrow=function(t,e){if(e){t=e==="ArrowLeft"?t-1:t+1}if(t<0){t=this.tabItems.length-1}else if(t===this.tabItems.length){t=0}var i=this.tabItems[t];this.getLinkEl(i).focus()};t.prototype.renderMenuOrTabs=function(){if(this.menuLayout){this.hideItems();return n("wm-select",{label:"Choose a tab","label-position":"none"},this.renderOptions())}else{this.showItems();var t={};if(this.customPadding){t={"margin-left":"-"+this.customPadding}}return n("ul",{class:"tabcontainer ".concat(this.customBackground||""),style:t,role:"tablist"},n("slot",null))}};t.prototype.renderOptions=function(){var t=this;return this.tabItems.map((function(e){return n("wm-option",{id:"tab-link-".concat(e.tabId),selected:e.tabId===t.selectedTab,onClick:function(i){i.preventDefault();t.wmTabSelected.emit({tabId:e.tabId})}},e.textContent)}))};t.prototype.render=function(){return n(r,{class:this.menuLayout?"menu":""},this.renderMenuOrTabs())};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{selectedTab:["setSelected"]}},enumerable:false,configurable:true});return t}());b.style=f;var h="wm-tab-panel{visibility:inherit}wm-tab-panel.tab-hidden{display:none}wm-tab-panel:active{outline:none}wm-tab-panel:focus{outline:none}wm-tab-panel.user-is-tabbing:focus{outline:-webkit-focus-ring-color auto 5px}";var d=t("wm_tab_panel",function(){function t(t){e(this,t);this.tabPanelLoaded=i(this,"tabPanelLoaded",7);this.active=false;this.tabId=""}t.prototype.componentWillLoad=function(){!this.el.id&&this.el.setAttribute("id",u())};t.prototype.componentDidLoad=function(){this.tabPanelLoaded.emit({tabId:this.tabId})};t.prototype.render=function(){return n(r,{role:"tabpanel",class:{"tab-hidden":!this.active}})};Object.defineProperty(t.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());d.style=h}}}));
@@ -0,0 +1 @@
1
+ import{r as t,h as e,g as i}from"./p-4de51706.js";const o=class{constructor(e){t(this,e),this.secondaryText="",this.primaryText="",this.infoText="",this.primaryActionDisabled=!1,this.deleteStyle=!1}componentWillLoad(){const t=this.el.closest("wm-modal");this.uid=t.uid,t.addEventListener("focusLastElement",(()=>{this.lastElement.focus()}))}emitParentPrimaryEvent(){const t=this.el.closest("wm-modal");t&&t.emitPrimaryEvent()}emitParentSecondaryEvent(){const t=this.el.closest("wm-modal");t&&t.emitSecondaryEvent()}render(){return e("div",{class:"wm-wrapper "+(this.infoText?" footer-text":"")},e("div",{class:"wm-info","aria-live":"polite"},this.infoText),e("div",{class:"wm-button-collection"},this.secondaryText&&e("wm-button",{onClick:()=>this.emitParentSecondaryEvent(),id:`wm-secondary-${this.uid}`,ref:t=>this.primaryActionDisabled?this.lastElement=t:void 0},this.secondaryText),e("wm-button",{"button-type":this.deleteStyle?"secondary":"primary","permanently-delete":this.deleteStyle,onClick:()=>this.emitParentPrimaryEvent(),disabled:this.primaryActionDisabled,id:`wm-primary-${this.uid}`,ref:t=>this.primaryActionDisabled?void 0:this.lastElement=t},this.primaryText)))}get el(){return i(this)}};o.style="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}";export{o as wm_modal_footer}
@@ -0,0 +1 @@
1
+ System.register(["./p-0fe97e85.system.js","./p-4272aa37.system.js"],(function(e){"use strict";var t,i,o,r,n,l,s,a,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;n=e.g},function(e){l=e.i;s=e.m;a=e.s;f=e.h}],execute:function(){var u=':host{--wmcolor-file-background-error:var(--wmcolor-background-error);--wmcolor-file-background:var(--wmcolor-background-readonly);--wmcolor-file-border-error:var(--wmcolor-border-error);--wmcolor-file-border:var(--wmcolor-border);--wmcolor-file-checkmark-icon:var(--wmcolor-positive);--wmcolor-file-progress:var(--wmcolor-progress);display:block;width:100%}.file-wrapper{font-size:0.875rem;position:relative;list-style:none}.file-wrapper .file{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;min-height:3.5rem;padding:0.5rem 1.25rem;position:relative;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.file-wrapper .file .filename{display:inline-block;white-space:nowrap}.file-wrapper .file .left-group{overflow:hidden;min-width:5.3125rem;-ms-flex-positive:1;flex-grow:1}.file-wrapper .file .right-group{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;-ms-flex-align:center;align-items:center;gap:1rem;min-width:0;padding-left:5rem}.file-wrapper .file .right-group.condensed{padding-left:2.5rem}.file-wrapper .file .right-group .file-controls{display:-ms-flexbox;display:flex;gap:1rem}.file-wrapper .file .right-group .file-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:end;gap:0.25rem;text-align:right;min-width:8.5rem;max-width:450px;-ms-flex:1;flex:1}.file-wrapper .file .right-group .file-info .uploader-name{max-width:100%;overflow-wrap:break-word}.file-wrapper .file.--error{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}.file-wrapper.checked .file: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:"\\f133";position:absolute;right:-44px;color:var(--wmcolor-file-checkmark-icon);font-size:28px;line-height:1}.name-wrapper{overflow:hidden}.progress{position:absolute;left:0;top:0;right:0;height:8px}.error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem}.error-message:not(:empty){margin-top:0.25rem}.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 c=e("wm_file",function(){function e(e){t(this,e);this.wmFilePreview=i(this,"wmFilePreview",7);this.wmFileDownload=i(this,"wmFileDownload",7);this.wmFileDelete=i(this,"wmFileDelete",7);this.wmFileErrorCleared=i(this,"wmFileErrorCleared",7);this.fullFilename="".concat(this.name,".").concat(this.type);this.name=undefined;this.type=undefined;this.fileActions="download delete";this.lastUpdated=undefined;this.progress=undefined;this.size=undefined;this.uploadedBy=undefined;this.errorMessage=undefined;this.showInfo="last-updated"}Object.defineProperty(e.prototype,"isCondensed",{get:function(){return this.el.clientWidth<500},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUploading",{get:function(){return this.progress!==undefined&&this.progress<100},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewButtonTooltip",{get:function(){return l.formatMessage({id:"file.previewButtonTooltip",defaultMessage:"Preview",description:"Tooltip of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadButtonTooltip",{get:function(){return l.formatMessage({id:"file.downloadButtonTooltip",defaultMessage:"Download",description:"Tooltip of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteButtonTooltip",{get:function(){return l.formatMessage({id:"file.deleteButtonTooltip",defaultMessage:"Delete",description:"Tooltip of a button that triggers a file to be deleted"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewActionMessage",{get:function(){return l.formatMessage({id:"file.previewAction",defaultMessage:"Preview File",description:"Label of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadActionMessage",{get:function(){return l.formatMessage({id:"file.downloadAction",defaultMessage:"Download File",description:"Label of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteActionMessage",{get:function(){return l.formatMessage({id:"file.deleteAction",defaultMessage:"Delete File",description:"Label of a button that triggers a file to be delete"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"actionMenuLabel",{get:function(){return l.formatMessage({id:"file.actionMenuLabel",defaultMessage:"Actions",description:"Label of a button that opens a menu of file actions"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clearButtonText",{get:function(){return l.formatMessage({id:"file.clearErrorText",defaultMessage:"Clear",description:"Text for a button used to clear an error"})},enumerable:false,configurable:true});e.prototype.generateClearButtonLabel=function(e){return l.formatMessage({id:"file.clearErrorLabel",defaultMessage:"Clear {fileName} error",description:"Label for a button used to clear an error, including filename"},{fileName:e})};e.prototype.componentWillLoad=function(){var e=this;if(!this.el.id){console.error("wm-file: a file id is required")}if(!this.name){console.error('wm-file: "name" is a required property')}if(!this.type){console.error('wm-file: "type" is a required property')}if(this.el.parentElement&&this.el.parentElement.showInfo){this.showInfo=this.el.parentElement.showInfo}if(this.showInfo==="time"){console.warn("wm-file: show-info='time' is deprecated, use show-info='last-updated'");this.showInfo="last-updated"}var t=new ResizeObserver((function(){e.setFilename()}));t.observe(this.el)};e.prototype.setFilename=function(){var e=this;requestAnimationFrame((function(){var t=e.el.shadowRoot.querySelector(".filename");var i=e.el.shadowRoot.querySelector(".left-group").getBoundingClientRect().left;var o=e.el.shadowRoot.querySelector(".right-group");var r=o?o.getBoundingClientRect().left:e.el.shadowRoot.querySelector(".file-wrapper").getBoundingClientRect().right-20;t.textContent=s(t,e.fullFilename,r-i,7)}))};e.prototype.componentDidRender=function(){this.setFilename()};e.prototype.previewFile=function(){this.wmFilePreview.emit()};e.prototype.downloadFile=function(){this.wmFileDownload.emit()};e.prototype.deleteFile=function(){this.wmFileDelete.emit()};e.prototype.handleFilenameMouseEnter=function(e){if(e.target.textContent!==this.fullFilename){a("bottom",e.target,this.fullFilename)}};e.prototype.renderFileName=function(){var e=this;return o("div",{class:"left-group"},o("div",{class:"name-wrapper"},o("span",{class:"sr-only"},this.fullFilename),o("span",{"aria-hidden":"true",class:"filename",onMouseEnter:function(t){return e.handleFilenameMouseEnter(t)},onMouseLeave:function(){return f()}}),this.isUploading&&o("span",{class:"sr-only"},"uploading")))};e.prototype.renderFileInfo=function(){return o("div",{class:"file-info"},(this.showInfo==="uploaded-by"||this.showInfo==="all")&&o("div",{class:"details uploader-name"},this.uploadedBy),(this.showInfo==="last-updated"||this.showInfo==="all")&&o("div",{class:"details"},this.lastUpdated),(this.showInfo==="size"||this.showInfo==="all")&&o("div",{class:"details"},this.size))};e.prototype.renderActionMenu=function(){var e=this;var t=o("wm-menuitem",{icon:"f208",onClick:function(){return e.previewFile()}},this.previewActionMessage);var i=o("wm-menuitem",{icon:"f1da",onClick:function(){return e.downloadFile()}},this.downloadActionMessage);var r=o("wm-menuitem",{icon:"f1c0",onClick:function(){return e.deleteFile()}},this.deleteActionMessage);return o("wm-action-menu",{"action-menu-type":"icon",tooltip:this.actionMenuLabel,"tooltip-position":"bottom","label-for-identical-buttons":"".concat(this.name," ").concat(this.actionMenuLabel)},this.fileActions.includes("preview")&&t,this.fileActions.includes("download")&&i,this.fileActions.includes("delete")&&r)};e.prototype.renderFileActionButtons=function(){var e=this;var t=o("wm-button",{class:"preview-button","button-type":"icononly",tooltip:this.previewButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"preview ".concat(this.name),icon:"f208",onClick:function(){return e.previewFile()}});var i=o("wm-button",{class:"download-button","button-type":"icononly",tooltip:this.downloadButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"download ".concat(this.name),icon:"f1da",onClick:function(){return e.downloadFile()}});var r=o("wm-button",{class:"delete-button","button-type":"icononly",tooltip:this.deleteButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"delete ".concat(this.name),icon:"f1c0",onClick:function(){return e.deleteFile()}});return o("div",{class:"file-controls"},this.fileActions.includes("preview")&&t,this.fileActions.includes("download")&&i,this.fileActions.includes("delete")&&r)};e.prototype.renderFileInProgress=function(){return o("div",{class:"file-wrapper"},o("div",{class:"file --progress"},o("div",{class:"progress",style:{background:"linear-gradient(to right, var(--wmcolor-file-progress) ".concat(this.progress,"%, transparent ").concat(this.progress,"%)")}}),this.renderFileName()))};e.prototype.renderFileControls=function(){var e=this.fileActions.split(" ").length===1;var t=this.isCondensed&&!e;return t?this.renderActionMenu():this.renderFileActionButtons()};e.prototype.renderFile=function(){var e=this;return o("div",{class:"file-wrapper ".concat(this.progress===100?"checked":"")},o("div",{class:"file ".concat(this.errorMessage?"--error":"")},this.renderFileName(),!this.errorMessage&&o("div",{class:"right-group ".concat(this.isCondensed?"condensed":"")},this.renderFileInfo(),this.fileActions!==""&&this.renderFileControls()),this.errorMessage&&o("wm-button",{"permanently-delete":true,"button-type":"textonly","label-for-identical-buttons":this.generateClearButtonLabel(this.name),onClick:function(){return e.wmFileErrorCleared.emit()}},this.clearButtonText)),this.errorMessage&&o("div",{class:"error-message"},this.errorMessage))};e.prototype.render=function(){return o(r,{role:"listitem"},this.isUploading?this.renderFileInProgress():this.renderFile())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());c.style=u}}}));
@@ -0,0 +1 @@
1
+ import{r as s,h as t,g as e}from"./p-4de51706.js";const l=class{constructor(t){s(this,t),this.showInfo="last-updated"}render(){return t("div",{role:"list",class:"list-wrapper"},t("slot",null))}static get delegatesFocus(){return!0}get el(){return e(this)}};l.style=":host{display:block}.list-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0.5rem}";export{l as wm_file_list}
@@ -1 +1 @@
1
- import{r as t,c as i}from"./p-57695dba.js";const s=class{constructor(s){t(this,s),this.wmChartSliceUpdated=i(this,"wmChartSliceUpdated",7),this.legend=void 0,this.amount=void 0,this.popoverTitle=void 0,this.popoverText=void 0,this.popoverButtonText=void 0}componentDidLoad(){if(parseInt(this.amount)>0&&!this.legend)throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart")}componentDidUpdate(){this.wmChartSliceUpdated.emit()}};export{s as wm_chart_slice}
1
+ import{r as t,c as i}from"./p-4de51706.js";const s=class{constructor(s){t(this,s),this.wmChartSliceUpdated=i(this,"wmChartSliceUpdated",7),this.legend=void 0,this.amount=void 0,this.popoverTitle=void 0,this.popoverText=void 0,this.popoverButtonText=void 0}componentDidLoad(){if(parseInt(this.amount)>0&&!this.legend)throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart")}componentDidUpdate(){this.wmChartSliceUpdated.emit()}};export{s as wm_chart_slice}
@@ -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 p(e){try{s(o.next(e))}catch(e){a(e)}}function i(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(p,i)}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,p;return p={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function i(e){return function(t){return s([e,t])}}function s(i){if(o)throw new TypeError("Generator is already executing.");while(p&&(p=0,i[0]&&(r=0)),r)try{if(o=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(i[0]===6&&r.label<a[1]){r.label=a[1];a=i;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(i);break}if(a[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];n=0}finally{o=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-7a844f5d.system.js","./p-84d294d1.system.js","./p-e0929c38.system.js","./p-ce028b38.system.js"],(function(e){"use strict";var t,r,o,n,a,p,i,s,l,c,h,m,d,b,w,u,f,g,x,v;return{setters:[function(e){t=e.r;r=e.f;o=e.h;n=e.H;a=e.g},function(e){p=e.g;i=e.d},function(e){s=e.a;l=e.h;c=e.g;h=e.r;m=e.b;d=e.c;b=e.d;w=e.e;u=e.f;f=e.i;g=e.j;x=e.k},function(e){v=e.c}],execute:function(){var k=":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 y=k;var j=e("wm_chart",function(){function e(e){var o=this;t(this,e);this.uid=p();this.slicesDetails=[];this.debouncedSliceUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,c.call(this,this.currentChartType)];case 1:e.sent();r(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.valueFormat="none";this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.printMode=false;this.printModeFormat="amount";this.labelPosition="top";this.isTabbing=false;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,"currentChartType",{get:function(){var e=this.chartType;if(this.chartType==="doughnut2"&&this.el.children.length>3){e="doughnut2b"}else if(this.chartType==="bar2"&&this.el.children.length>4){e="bar2b"}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return s[this.currentChartType]},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,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){l.call(this,e)};e.prototype.showHiddenValuesMessage=function(e){var t=this;var r=this.el.shadowRoot.querySelector(".hidden-values-warning");if(r){e?r.classList.remove("hidden"):r.classList.add("hidden")}else{requestAnimationFrame((function(){return t.showHiddenValuesMessage(e)}))}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(o){switch(o.label){case 0:if(!this.label){throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}return[4,c.call(this,this.currentChartType)];case 1:o.sent();if(!this.isDoughnut){e=new ResizeObserver((function(){r(t.el)}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));h(r)}};e.prototype.renderBarText=function(e,t){var r;if(this.valueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.valueFormat==="amount"){r=e.amount}var n=x(e.amount,this.total,false);var a=this.el.offsetWidth;var p=n/100*a>=t;var i=p||e.amount==0?"".concat(n,"%"):"".concat(t,"px");return o("div",{class:"value-wrapper ".concat(p?"":"fixed-width"),style:{width:i}},o("span",{class:"value","data-value":e.amount,"data-segmentindex":e.index},e.amount>0&&r))};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return o("svg",{class:"axis"},o("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),o("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),o("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),o("text",{x:"0.5",y:"-6"},"0%"),o("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),o("text",{x:"100%",y:"-6"},"100%"))}};e.prototype.renderChart=function(){if(this.isSimpleBar){return m.call(this,this.currentChartType)}else if(this.isStackedBar&&this.total>0){return d.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return b.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return o(n,{key:"5658836a6dc6d82e1ad8a4b50b9a138d51610a80",onBlur:function(){return g.call(e)}},o("div",{key:"2105ff07fcad69e0175a2bde4f8fdfe08001174d",ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":v.interactiveChart,"aria-describedby":"chart-instructions"},o("label",{key:"e74a5954793ec614b54330fe630d3b27abfd269a",id:"label-".concat(this.uid),class:"label --".concat(this.labelPosition),htmlFor:"graphic-".concat(this.uid)},o("span",{key:"a93567158427b56fbdc1bf23142bda5805739a4c",class:"label-text"},this.label),this.subinfo?o("span",{class:"subinfo"},this.subinfo):""),this.isBar&&u.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&u.call(this,this.currentChartType),o("priv-chart-popover",{key:"fb213ab70496d4c9655bb51211ab4f8df7d4ab68",class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.isBar&&!this.printMode&&f()),w())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());j.style=y}}}));
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 p(e){try{s(o.next(e))}catch(e){a(e)}}function i(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(p,i)}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,p;return p={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function i(e){return function(t){return s([e,t])}}function s(i){if(o)throw new TypeError("Generator is already executing.");while(p&&(p=0,i[0]&&(r=0)),r)try{if(o=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(i[0]===6&&r.label<a[1]){r.label=a[1];a=i;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(i);break}if(a[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];n=0}finally{o=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-0fe97e85.system.js","./p-4272aa37.system.js","./p-5bbf7fdc.system.js","./p-ae32eb8d.system.js"],(function(e){"use strict";var t,r,o,n,a,p,i,s,l,c,h,m,d,b,w,u,f,g,x,v;return{setters:[function(e){t=e.r;r=e.f;o=e.h;n=e.H;a=e.g},function(e){p=e.g;i=e.d},function(e){s=e.a;l=e.h;c=e.g;h=e.r;m=e.b;d=e.c;b=e.d;w=e.e;u=e.f;f=e.i;g=e.j;x=e.k},function(e){v=e.c}],execute:function(){var k=":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 y=e("wm_chart",function(){function e(e){var o=this;t(this,e);this.uid=p();this.slicesDetails=[];this.debouncedSliceUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,c.call(this,this.currentChartType)];case 1:e.sent();r(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.valueFormat="none";this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.printMode=false;this.printModeFormat="amount";this.labelPosition="top";this.isTabbing=false;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,"currentChartType",{get:function(){var e=this.chartType;if(this.chartType==="doughnut2"&&this.el.children.length>3){e="doughnut2b"}else if(this.chartType==="bar2"&&this.el.children.length>4){e="bar2b"}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return s[this.currentChartType]},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,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){l.call(this,e)};e.prototype.showHiddenValuesMessage=function(e){var t=this;var r=this.el.shadowRoot.querySelector(".hidden-values-warning");if(r){e?r.classList.remove("hidden"):r.classList.add("hidden")}else{requestAnimationFrame((function(){return t.showHiddenValuesMessage(e)}))}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(o){switch(o.label){case 0:if(!this.label){throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}return[4,c.call(this,this.currentChartType)];case 1:o.sent();if(!this.isDoughnut){e=new ResizeObserver((function(){r(t.el)}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));h(r)}};e.prototype.renderBarText=function(e,t){var r;if(this.valueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.valueFormat==="amount"){r=e.amount}var n=x(e.amount,this.total,false);var a=this.el.offsetWidth;var p=n/100*a>=t;var i=p||e.amount==0?"".concat(n,"%"):"".concat(t,"px");return o("div",{class:"value-wrapper ".concat(p?"":"fixed-width"),style:{width:i}},o("span",{class:"value","data-value":e.amount,"data-segmentindex":e.index},e.amount>0&&r))};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return o("svg",{class:"axis"},o("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),o("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),o("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),o("text",{x:"0.5",y:"-6"},"0%"),o("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),o("text",{x:"100%",y:"-6"},"100%"))}};e.prototype.renderChart=function(){if(this.isSimpleBar){return m.call(this,this.currentChartType)}else if(this.isStackedBar&&this.total>0){return d.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return b.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return o(n,{onBlur:function(){return g.call(e)}},o("div",{ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":v.interactiveChart,"aria-describedby":"chart-instructions"},o("label",{id:"label-".concat(this.uid),class:"label --".concat(this.labelPosition),htmlFor:"graphic-".concat(this.uid)},o("span",{class:"label-text"},this.label),this.subinfo?o("span",{class:"subinfo"},this.subinfo):""),this.isBar&&u.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&u.call(this,this.currentChartType),o("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.isBar&&!this.printMode&&f()),w())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());y.style=k}}}));
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as r,g as o}from"./p-4de51706.js";import{t as a,j as s,a as n,k as d,l,A as h,B as c,i as p}from"./p-ba751ca4.js";const u=class{constructor(i){t(this,i),this.wmRangeSelection=e(this,"wmRangeSelection",7),this.wmStartInputBlur=e(this,"wmStartInputBlur",7),this.wmEndInputBlur=e(this,"wmEndInputBlur",7),this.openUp=!1,this.popupClicked=!1,this.toggleButtonClicked=!1,this.formats={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"},this.dateFormat="mm/dd/yyyy",this.disabled=!1,this.errorMessage=void 0,this.invalidStart=!1,this.invalidEnd=!1,this.label="",this.labelPosition="top",this.preselected=void 0,this.requiredField=!1,this.valueStart="",this.valueEnd="",this.isExpanded=!1}get _disabled(){return a(this.disabled)}get focusDates(){const t=this.toISO(this.valueStart);let e=s(new Date);this._isValidISO(t)?e=t:this.preselected&&this._isValidISO(this.preselected)&&(e=this.preselected);let i=this.toJSDate(e);11==i.getUTCMonth()&&i.setYear(i.getUTCFullYear()+1),i.setMonth((i.getUTCMonth()+1)%12,1);let r=s(i);const o=this.toISO(this.valueEnd);if(this._isValidISO(o)&&!this.isSameMonth(e,o)&&(r=o,!t)){let t=this.toJSDate(r),i=t.getUTCMonth()-1;-1==i&&(i=11,t.setYear(t.getUTCFullYear()-1)),t.setMonth(i,1),e=s(t)}return[e,r]}isSameMonth(t,e){return!(!t||!e)&&parseInt(t.split("-")[1])==parseInt(e.split("-")[1])}toJSDate(t){if(t&&this._isValidISO(t)){let e=new Date;return e.setUTCFullYear(parseInt(t.split("-")[0]),parseInt(t.split("-")[1])-1,parseInt(t.split("-")[2])),e}}toISO(t){return this._reformatDate(this.formats[this.dateFormat],"ISO",t)}handleDisabled(){n(this.el,this._disabled)}updateValueStart(){this.startInputEl.value=this.valueStart?this.valueStart:""}updateValueEnd(){this.endInputEl.value=this.valueEnd?this.valueEnd:""}handleErrorMessage(){this.errorMessage&&setTimeout((()=>this.announce(this.errorMessage)),100)}togglePopup(){this.isExpanded?this.closePopup():this.openPopup(),this.toggleButtonClicked=!0}closePopup(t=!1){this.date1=void 0,this.date2=void 0,this.startCalEl.startDate=void 0,this.startCalEl.endDate=void 0,this.startCalEl.hoverDate=void 0,this.endCalEl.startDate=void 0,this.endCalEl.endDate=void 0,this.endCalEl.hoverDate=void 0,this.isExpanded=!1,this.startCalEl.view="day",this.endCalEl.view="day",this.popupEl.classList.remove("open"),window.setTimeout((()=>{this.popupEl.style.visibility="hidden"}),250),t&&this.toggleEl.focus()}openPopup(){if(this.openUp=d(this.el,this.popupEl.clientHeight,this.labelWrapperEl.clientHeight),l(this.el,336)?(this.popupEl.style.left="0",this.popupEl.style.right="auto"):(this.popupEl.style.right="0",this.popupEl.style.left="auto"),this.popupEl.style.visibility="visible",window.requestAnimationFrame((()=>{this.popupEl.classList.add("open")})),this.isExpanded=!0,this.startCalEl.focusDate=this.focusDates[0],this.endCalEl.focusDate=this.focusDates[1],this.startCalEl.focusCell(),this.valueStart){const t=this.toISO(this.valueStart);if(this._isValidISO(t)&&(this.startCalEl.startDate=t),this.valueEnd){const e=this.toISO(this.valueEnd);this._isValidISO(e)&&(this.isSameMonth(t,e)?this.startCalEl.endDate=e:this.endCalEl.endDate=e)}}}handleFocus(){this.wrapperEl.classList.add("focus")}handleBlur(){this.wrapperEl.classList.remove("focus")}handleStartInputBlur(){this.wmStartInputBlur.emit()}handleEndInputBlur(){this.wmEndInputBlur.emit()}handleStartInput(t){this.valueStart=t.target.value}handleEndInput(t){this.valueEnd=t.target.value}handleKey(t){"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.closePopup(!0))}blurHandler(){this.popupClicked||this.toggleButtonClicked||!this.isExpanded||this.closePopup(),this.popupClicked=!1,this.toggleButtonClicked=!1}handleBlurOnWindow(){this.isExpanded&&this.closePopup()}handleDateFocus(t){const e=t.target,i=e.focusDate,r=this.startCalEl.focusDate.slice(0,-3),o=this.endCalEl.focusDate.slice(0,-3);if(e==this.startCalEl?r>=o&&(this.endCalEl.focusDate=h.month.increase(this.startCalEl.focusDate,1)):e==this.endCalEl&&o<=r&&(this.startCalEl.focusDate=h.month.decrease(this.endCalEl.focusDate,1)),this.oldFocusVal){const t=h.year.asInt(i),r=h.year.asInt(this.oldFocusVal),o=h.month.asInt(i),a=h.month.asInt(this.oldFocusVal);"day"===e.view?t==r&&o==a||(this.liveRegionEl.innerHTML=`Viewing ${c[o-1]}, ${t}`):t!=r?this.liveRegionEl.innerHTML=`${t} selected.`:o!=a&&(this.liveRegionEl.innerHTML=`${c[o-1]}, ${t}`)}this.oldFocusVal=e.focusDate}handlePopupBlurred(t){if(t.detail.relatedTarget!==this.el){const e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(e)}}handleCellTriggered(t){const e=t.detail.cal,i=t.detail.cell,r=i.getAttribute("data-year")+"-"+i.getAttribute("data-month")+"-"+i.textContent.padStart(2,"0");if(this.startCalEl.endDate||this.endCalEl.endDate)this.startCalEl.startDate=void 0,this.startCalEl.endDate=void 0,this.endCalEl.startDate=void 0,this.endCalEl.endDate=void 0,e.startDate=r,this.date1=r,this.date2=void 0;else if(this.date1&&r!==this.date1){this.date1>r?(this.date2=this.date1,this.date1=r):this.date2=r;const t={startDate:{iso:this.date1,us:this._reformatDate("ISO","US",this.date1),int:this._reformatDate("ISO","INT",this.date1)},endDate:{iso:this.date2,us:this._reformatDate("ISO","US",this.date2),int:this._reformatDate("ISO","INT",this.date2)}};this.wmRangeSelection.emit(t),this.closePopup(!0),this.date1=void 0,this.date2=void 0}else e.startDate=r,this.date1=r;const o=new CustomEvent("input");this.el.dispatchEvent(o);const a=new CustomEvent("change");this.el.dispatchEvent(a)}handleOutOfCal(){this.startCalEl.hoverDate=void 0,this.endCalEl.hoverDate=void 0}handleCellHovered(t){this.startCalEl.hoverDate=this.startCalEl.startDate===t.detail?void 0:t.detail,this.endCalEl.hoverDate=this.endCalEl.startDate===t.detail?void 0:t.detail}async reformatDate(t,e,i){return this._reformatDate(t,e,i)}_reformatDate(t,e,i){if("ISO"!==t&&"ISO"!==e)return"";if(!t||!e||!i)return"";if(!/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/.test(i))return i;{const r=i.replace(/[\-\.]/gi,"/").split("/");switch(e){case"US":return r[1].padStart(2,"0")+"/"+r[2].padStart(2,"0")+"/"+r[0].padStart(4,"20");case"INT":return r[2].padStart(2,"0")+"/"+r[1].padStart(2,"0")+"/"+r[0].padStart(4,"20");case"ISO":if("US"===t)return r[2].padStart(4,"20")+"-"+r[0].padStart(2,"0")+"-"+r[1].padStart(2,"0");if("INT"===t)return r[2].padStart(4,"20")+"-"+r[1].padStart(2,"0")+"-"+r[0].padStart(2,"0");if("ISO"===t)return r[0].padStart(4,"20")+"-"+r[1].padStart(2,"0")+"-"+r[2].padStart(2,"0");default:return r.join("/")}}}async isValidISO(t){return this._isValidISO(t)}_isValidISO(t){if(t&&/^\d\d\d\d[-]\d\d[-]\d\d$/.test(t)){const e=t.split("-"),i=parseInt(e[2],10),r=parseInt(e[1],10),o=parseInt(e[0],10);if(o<1e3||o>3e3||0==r||r>12)return!1;let a=[31,28,31,30,31,30,31,31,30,31,30,31];return(o%400==0||o%100!=0&&o%4==0)&&(a[1]=29),i>0&&i<=a[r-1]}return!1}componentWillLoad(){""===this.label&&console.error("You must include a label prop for the datepicker input (for accessibility reasons), even if the label position is none."),n(this.el,this._disabled)}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionEl.textContent=t}render(){return i(r,{"aria-busy":"false"},i("div",{ref:t=>this.wrapperEl=t,class:`wrapper label-${this.labelPosition}`},i("div",{class:"label-wrapper",ref:t=>this.labelWrapperEl=t},"none"!==this.labelPosition&&i("label",{id:"dateRangeLabel",htmlFor:"date-input",class:"label",title:`${this.label} (${this.dateFormat})`},this.label,this.requiredField&&i("span",{"aria-hidden":"true",class:"required"},"*"))),i("div",null,i("div",{class:"range-wrapper"},i("input",{disabled:this._disabled,type:"text",id:"start-date-input",class:"date-input input "+(this.invalidStart?"invalid":""),name:"start-date",placeholder:this.dateFormat,value:this.valueStart,onFocus:()=>this.handleFocus(),onInput:t=>this.handleStartInput(t),onBlur:()=>this.handleStartInputBlur(),ref:t=>this.startInputEl=t,"aria-describedby":"error","aria-label":this.label,"aria-required":this.requiredField?"true":null})," - ",i("input",{disabled:this._disabled,type:"text",id:"end-date-input",class:"date-input input "+(this.invalidEnd?"invalid":""),name:"end-date",placeholder:this.dateFormat,value:this.valueEnd,onFocus:()=>this.handleFocus(),onInput:t=>this.handleEndInput(t),onBlur:()=>this.handleEndInputBlur(),ref:t=>this.endInputEl=t,"aria-describedby":"error","aria-label":this.label,"aria-required":this.requiredField?"true":null}),i("div",{class:"container",id:"wm-container"},i("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input",ref:t=>this.toggleEl=t,"aria-expanded":`${this.isExpanded}`,class:"toggle",id:"toggle"},i("span",{class:"calendar",title:p.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),i("div",{class:`popup-wrapper ${this.startCalEl&&this.startCalEl.view}-view ${this.openUp?"expand-upwards":""}`,id:"popup-wrapper",ref:t=>this.popupEl=t,onClick:()=>this.popupClicked=!0,style:{display:"flex"}},i("div",{class:"trapfocus",tabIndex:this.isExpanded?0:void 0,onFocus:()=>this.endCalEl.focusLastFocusable()}),i("priv-calendar",{ref:t=>this.startCalEl=t,onClick:()=>this.popupClicked=!0,onDateFocus:t=>this.handleDateFocus(t)}),i("priv-calendar",{ref:t=>this.endCalEl=t,onClick:()=>this.popupClicked=!0,onDateFocus:t=>this.handleDateFocus(t)}),i("div",{class:"trapfocus",tabIndex:this.isExpanded?0:void 0,onFocus:()=>this.startCalEl.focusFirstFocusable()})),i("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),i("div",{id:"month-title",class:"sr-only"},p.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),i("div",{id:"year-title",class:"sr-only"},p.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})))),i("div",{id:"error",class:"error"},this.errorMessage),i("div",{ref:t=>this.liveRegionEl=t,class:"sr-only","aria-live":"polite","aria-atomic":"true"}))))}static get delegatesFocus(){return!0}get el(){return o(this)}static get watchers(){return{disabled:["handleDisabled"],valueStart:["updateValueStart"],valueEnd:["updateValueEnd"],errorMessage:["handleErrorMessage"]}}};u.style=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .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}:host .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}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .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] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-top-right-radius:0;border-bottom-right-radius:0;border-start-end-radius:0;border-end-end-radius:0}:host .wrapper .range-wrapper{width:303px}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-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)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}';export{u as wm_date_range}