@watermarkinsights/ripple 3.9.0 → 3.10.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-dbbea5a8.js → chartFunctions-05b9dcc7.js} +418 -417
  3. package/dist/cjs/{functions-15e21d53.js → functions-71c85bae.js} +506 -532
  4. package/dist/cjs/{global-b0e0eac2.js → global-f98992f4.js} +60 -60
  5. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
  6. package/dist/cjs/{index-acad7ab3.js → index-98c6524c.js} +64 -96
  7. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
  8. package/dist/cjs/loader.cjs.js +3 -3
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +87 -87
  10. package/dist/cjs/priv-datepicker.cjs.entry.js +659 -659
  11. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  12. package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
  13. package/dist/cjs/ripple.cjs.js +3 -3
  14. package/dist/cjs/wm-action-menu_2.cjs.entry.js +342 -342
  15. package/dist/cjs/wm-button.cjs.entry.js +228 -228
  16. package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
  17. package/dist/cjs/wm-chart.cjs.entry.js +117 -117
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +267 -267
  19. package/dist/cjs/wm-input.cjs.entry.js +136 -136
  20. package/dist/cjs/wm-modal-footer.cjs.entry.js +32 -32
  21. package/dist/cjs/wm-modal-header.cjs.entry.js +35 -35
  22. package/dist/cjs/wm-modal.cjs.entry.js +164 -164
  23. package/dist/cjs/wm-navigation_3.cjs.entry.js +222 -222
  24. package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
  25. package/dist/cjs/wm-network-uploader.cjs.entry.js +454 -454
  26. package/dist/cjs/wm-option_2.cjs.entry.js +487 -487
  27. package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
  28. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +136 -136
  29. package/dist/cjs/wm-search.cjs.entry.js +233 -233
  30. package/dist/cjs/wm-snackbar.cjs.entry.js +172 -172
  31. package/dist/cjs/wm-tab-item_3.cjs.entry.js +298 -298
  32. package/dist/cjs/wm-tag-input.cjs.entry.js +581 -581
  33. package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
  34. package/dist/cjs/wm-toggletip.cjs.entry.js +126 -126
  35. package/dist/cjs/wm-uploader.cjs.entry.js +380 -380
  36. package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
  37. package/dist/collection/collection-manifest.json +2 -2
  38. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +0 -1
  39. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
  40. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
  41. package/dist/collection/components/charts/wm-chart/wm-chart.css +6 -15
  42. package/dist/collection/components/charts/wm-chart/wm-chart.js +332 -332
  43. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +6 -15
  44. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +199 -199
  45. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +0 -1
  46. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +88 -88
  47. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
  48. package/dist/collection/components/wm-action-menu/wm-action-menu.css +0 -1
  49. package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
  50. package/dist/collection/components/wm-button/wm-button.css +33 -25
  51. package/dist/collection/components/wm-button/wm-button.js +491 -491
  52. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.css +4 -4
  53. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
  54. package/dist/collection/components/wm-datepicker/wm-datepicker.css +2 -2
  55. package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
  56. package/dist/collection/components/wm-input/wm-input.css +2 -2
  57. package/dist/collection/components/wm-input/wm-input.js +423 -423
  58. package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -1
  59. package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
  60. package/dist/collection/components/wm-modal/wm-modal-footer.css +0 -1
  61. package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
  62. package/dist/collection/components/wm-modal/wm-modal-header.css +0 -1
  63. package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
  64. package/dist/collection/components/wm-modal/wm-modal.css +0 -1
  65. package/dist/collection/components/wm-modal/wm-modal.js +461 -461
  66. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +2 -2
  67. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
  68. package/dist/collection/components/wm-navigation/wm-navigation-item.css +0 -1
  69. package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
  70. package/dist/collection/components/wm-navigation/wm-navigation.css +0 -1
  71. package/dist/collection/components/wm-navigation/wm-navigation.js +211 -211
  72. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -1
  73. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
  74. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +0 -1
  75. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
  76. package/dist/collection/components/wm-navigator/wm-navigator.css +0 -1
  77. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  78. package/dist/collection/components/wm-option/wm-option.css +3 -3
  79. package/dist/collection/components/wm-option/wm-option.js +414 -414
  80. package/dist/collection/components/wm-pagination/wm-pagination.css +0 -1
  81. package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
  82. package/dist/collection/components/wm-search/wm-search.css +0 -1
  83. package/dist/collection/components/wm-search/wm-search.js +480 -480
  84. package/dist/collection/components/wm-select/wm-select.css +3 -3
  85. package/dist/collection/components/wm-select/wm-select.js +718 -718
  86. package/dist/collection/components/wm-snackbar/wm-snackbar.css +3 -3
  87. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  88. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +2 -3
  89. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
  90. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -1
  91. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
  92. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +0 -1
  93. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  94. package/dist/collection/components/wm-tag-input/wm-tag-input.css +3 -3
  95. package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
  96. package/dist/collection/components/wm-timepicker/wm-timepicker.css +3 -3
  97. package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
  98. package/dist/collection/components/wm-toggletip/wm-toggletip.css +2 -2
  99. package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
  100. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +33 -25
  101. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +785 -785
  102. package/dist/collection/components/wm-uploader/wm-uploader.css +33 -25
  103. package/dist/collection/components/wm-uploader/wm-uploader.js +780 -780
  104. package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
  105. package/dist/collection/dev/scripts.js +20 -20
  106. package/dist/collection/global/__mocks__/functions.js +6 -6
  107. package/dist/collection/global/chartFunctions.js +418 -418
  108. package/dist/collection/global/functions.js +468 -468
  109. package/dist/collection/global/global.js +67 -67
  110. package/dist/collection/global/interfaces.js +49 -49
  111. package/dist/collection/global/services/__mocks__/http-service.js +130 -130
  112. package/dist/collection/global/services/http-service.js +50 -50
  113. package/dist/collection/lang/lang.js +5 -5
  114. package/dist/collection/lang/missing.js +43 -43
  115. package/dist/collection/lang/piglatin.js +93 -93
  116. package/dist/esm/{chartFunctions-303e1644.js → chartFunctions-b24ba065.js} +418 -418
  117. package/dist/esm/{functions-e552a8b5.js → functions-117d1a51.js} +506 -532
  118. package/dist/esm/{global-fa341013.js → global-6a9c8257.js} +60 -60
  119. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
  120. package/dist/esm/{index-7603f98e.js → index-d649a861.js} +64 -96
  121. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
  122. package/dist/esm/loader.js +3 -3
  123. package/dist/esm/polyfills/core-js.js +0 -0
  124. package/dist/esm/polyfills/css-shim.js +1 -1
  125. package/dist/esm/polyfills/dom.js +0 -0
  126. package/dist/esm/polyfills/es5-html-element.js +0 -0
  127. package/dist/esm/polyfills/index.js +0 -0
  128. package/dist/esm/polyfills/system.js +0 -0
  129. package/dist/esm/priv-chart-popover.entry.js +87 -87
  130. package/dist/esm/priv-datepicker.entry.js +659 -659
  131. package/dist/esm/priv-navigator-button.entry.js +19 -19
  132. package/dist/esm/priv-navigator-item.entry.js +24 -24
  133. package/dist/esm/ripple.js +3 -3
  134. package/dist/esm/wm-action-menu_2.entry.js +342 -342
  135. package/dist/esm/wm-button.entry.js +228 -228
  136. package/dist/esm/wm-chart-slice.entry.js +14 -14
  137. package/dist/esm/wm-chart.entry.js +117 -117
  138. package/dist/esm/wm-datepicker.entry.js +267 -267
  139. package/dist/esm/wm-input.entry.js +136 -136
  140. package/dist/esm/wm-modal-footer.entry.js +32 -32
  141. package/dist/esm/wm-modal-header.entry.js +35 -35
  142. package/dist/esm/wm-modal.entry.js +164 -164
  143. package/dist/esm/wm-navigation_3.entry.js +222 -222
  144. package/dist/esm/wm-navigator.entry.js +269 -269
  145. package/dist/esm/wm-network-uploader.entry.js +454 -454
  146. package/dist/esm/wm-option_2.entry.js +487 -487
  147. package/dist/esm/wm-pagination.entry.js +168 -168
  148. package/dist/esm/wm-progress-indicator_3.entry.js +136 -136
  149. package/dist/esm/wm-search.entry.js +233 -233
  150. package/dist/esm/wm-snackbar.entry.js +172 -172
  151. package/dist/esm/wm-tab-item_3.entry.js +298 -298
  152. package/dist/esm/wm-tag-input.entry.js +581 -581
  153. package/dist/esm/wm-timepicker.entry.js +385 -385
  154. package/dist/esm/wm-toggletip.entry.js +126 -126
  155. package/dist/esm/wm-uploader.entry.js +380 -380
  156. package/dist/esm/wm-wrapper.entry.js +13 -13
  157. package/dist/esm-es5/chartFunctions-b24ba065.js +1 -0
  158. package/dist/esm-es5/functions-117d1a51.js +15 -0
  159. package/dist/esm-es5/global-6a9c8257.js +1 -0
  160. package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +1 -1
  161. package/dist/esm-es5/index-d649a861.js +1 -0
  162. package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +0 -0
  163. package/dist/esm-es5/loader.js +1 -1
  164. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  165. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  166. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  167. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  168. package/dist/esm-es5/ripple.js +1 -1
  169. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  170. package/dist/esm-es5/wm-button.entry.js +1 -1
  171. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  172. package/dist/esm-es5/wm-chart.entry.js +1 -1
  173. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  174. package/dist/esm-es5/wm-input.entry.js +1 -1
  175. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  176. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  177. package/dist/esm-es5/wm-modal.entry.js +1 -1
  178. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  179. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  180. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  181. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  182. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  183. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  184. package/dist/esm-es5/wm-search.entry.js +1 -1
  185. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  186. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  187. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  188. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  189. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  190. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  191. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  192. package/dist/loader/index.d.ts +1 -0
  193. package/dist/ripple/{p-aa104594.system.entry.js → p-03d6014a.system.entry.js} +1 -1
  194. package/dist/ripple/{p-90ed3268.system.entry.js → p-099df7b7.system.entry.js} +1 -1
  195. package/dist/ripple/p-0cffec65.entry.js +1 -0
  196. package/dist/ripple/p-0ebed4b8.system.entry.js +1 -0
  197. package/dist/ripple/p-13e2891c.system.js +1 -0
  198. package/dist/ripple/p-18261104.system.entry.js +1 -0
  199. package/dist/ripple/p-1b1e006a.entry.js +1 -0
  200. package/dist/ripple/p-1e7fc028.entry.js +1 -0
  201. package/dist/ripple/{p-32336c78.system.entry.js → p-210039cc.system.entry.js} +1 -1
  202. package/dist/ripple/p-22759dd5.entry.js +1 -0
  203. package/dist/ripple/p-25b81952.entry.js +1 -0
  204. package/dist/ripple/{p-e490e37f.system.entry.js → p-269fa39c.system.entry.js} +1 -1
  205. package/dist/ripple/p-26c9f5af.entry.js +1 -0
  206. package/dist/ripple/p-276ed011.js +16 -0
  207. package/dist/ripple/p-2b6246d9.entry.js +1 -0
  208. package/dist/ripple/{p-3b3e847c.system.entry.js → p-2b63995f.system.entry.js} +1 -1
  209. package/dist/ripple/p-2c8a26f2.js +1 -0
  210. package/dist/ripple/p-38bb7f05.system.entry.js +1 -0
  211. package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
  212. package/dist/ripple/p-4f581ab3.entry.js +1 -0
  213. package/dist/ripple/p-50be3b44.js +1 -0
  214. package/dist/ripple/p-5176b826.system.js +15 -0
  215. package/dist/ripple/p-5627e44d.entry.js +1 -0
  216. package/dist/ripple/p-570fb53b.entry.js +1 -0
  217. package/dist/ripple/p-57f2feb0.entry.js +1 -0
  218. package/dist/ripple/p-5d6cc9da.system.js +1 -0
  219. package/dist/ripple/p-5e164260.system.entry.js +1 -0
  220. package/dist/ripple/{p-64053e24.system.entry.js → p-64e8fb6e.system.entry.js} +1 -1
  221. package/dist/ripple/p-6c295beb.entry.js +1 -0
  222. package/dist/ripple/p-6c751341.entry.js +1 -0
  223. package/dist/ripple/p-6cf47163.entry.js +1 -0
  224. package/dist/ripple/{p-6bc557fa.js → p-6f59ed45.js} +1 -1
  225. package/dist/ripple/p-772576d7.system.entry.js +1 -0
  226. package/dist/ripple/p-7779bfbe.system.entry.js +1 -0
  227. package/dist/ripple/p-7c2b1682.entry.js +1 -0
  228. package/dist/ripple/p-81ddf5a0.entry.js +1 -0
  229. package/dist/ripple/p-83d22032.system.entry.js +1 -0
  230. package/dist/ripple/p-846e9391.entry.js +1 -0
  231. package/dist/ripple/{p-7d26d093.system.entry.js → p-8a96b188.system.entry.js} +1 -1
  232. package/dist/ripple/p-8cf7ce7e.system.entry.js +1 -0
  233. package/dist/ripple/p-969af068.system.entry.js +1 -0
  234. package/dist/ripple/p-9a4aca88.system.entry.js +1 -0
  235. package/dist/ripple/p-9aa6cd9f.entry.js +1 -0
  236. package/dist/ripple/p-9c20bc1f.system.entry.js +1 -0
  237. package/dist/ripple/p-9d02957d.system.js +1 -0
  238. package/dist/ripple/p-9d49f21e.entry.js +1 -0
  239. package/dist/ripple/p-9d8c246d.system.entry.js +1 -0
  240. package/dist/ripple/p-9df8a520.entry.js +1 -0
  241. package/dist/ripple/{p-ae6cfbca.system.entry.js → p-a1511315.system.entry.js} +1 -1
  242. package/dist/ripple/p-a1a2efca.system.entry.js +1 -0
  243. package/dist/ripple/{p-1a7a33e0.system.js → p-a224d536.system.js} +1 -1
  244. package/dist/ripple/p-a5a47a23.entry.js +1 -0
  245. package/dist/ripple/p-b16373b9.system.entry.js +1 -0
  246. package/dist/ripple/p-b547bcf2.entry.js +1 -0
  247. package/dist/ripple/{p-1df2adee.system.entry.js → p-bfc1ab2e.system.entry.js} +1 -1
  248. package/dist/ripple/p-c8bb4b2b.entry.js +1 -0
  249. package/dist/ripple/p-d09fb6b5.entry.js +1 -0
  250. package/dist/ripple/{p-b4efa7d1.system.entry.js → p-ddf157c8.system.entry.js} +1 -1
  251. package/dist/ripple/p-e1b076be.entry.js +1 -0
  252. package/dist/ripple/p-e7a7d732.entry.js +1 -0
  253. package/dist/ripple/p-e8e2228d.system.entry.js +1 -0
  254. package/dist/ripple/p-ebae8cae.system.entry.js +1 -0
  255. package/dist/ripple/p-efe7728e.entry.js +1 -0
  256. package/dist/ripple/p-f54c4b0e.system.js +1 -0
  257. package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +0 -0
  258. package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
  259. package/dist/ripple/{p-fda5a778.system.entry.js → p-ffb97b6d.system.entry.js} +1 -1
  260. package/dist/ripple/ripple.esm.js +1 -1
  261. package/dist/ripple/ripple.js +1 -1
  262. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  263. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +35 -35
  264. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  265. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
  266. package/dist/types/components/wm-button/wm-button.d.ts +43 -43
  267. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  268. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
  269. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  270. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  271. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
  272. package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
  273. package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
  274. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  275. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  276. package/dist/types/components/wm-navigation/wm-navigation.d.ts +30 -30
  277. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  278. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  279. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  280. package/dist/types/components/wm-option/wm-option.d.ts +32 -32
  281. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  282. package/dist/types/components/wm-search/wm-search.d.ts +86 -86
  283. package/dist/types/components/wm-select/wm-select.d.ts +66 -66
  284. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  285. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
  286. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
  287. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  288. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
  289. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
  290. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
  291. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  292. package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
  293. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  294. package/dist/types/components.d.ts +24 -24
  295. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  296. package/dist/types/global/chartFunctions.d.ts +29 -28
  297. package/dist/types/global/functions.d.ts +42 -42
  298. package/dist/types/global/global.d.ts +1 -1
  299. package/dist/types/global/interfaces.d.ts +44 -44
  300. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  301. package/dist/types/global/services/http-service.d.ts +4 -4
  302. package/dist/types/lang/lang.d.ts +5 -5
  303. package/dist/types/stencil-public-runtime.d.ts +4 -6
  304. package/package.json +47 -47
  305. package/dist/esm-es5/chartFunctions-303e1644.js +0 -1
  306. package/dist/esm-es5/functions-e552a8b5.js +0 -15
  307. package/dist/esm-es5/global-fa341013.js +0 -1
  308. package/dist/esm-es5/index-7603f98e.js +0 -1
  309. package/dist/ripple/p-01d2c1ab.entry.js +0 -1
  310. package/dist/ripple/p-02a3c14f.entry.js +0 -1
  311. package/dist/ripple/p-1116a297.entry.js +0 -1
  312. package/dist/ripple/p-13a746ea.entry.js +0 -1
  313. package/dist/ripple/p-175eba9d.system.js +0 -15
  314. package/dist/ripple/p-1d0742b0.entry.js +0 -1
  315. package/dist/ripple/p-2409192f.entry.js +0 -1
  316. package/dist/ripple/p-313b6073.system.js +0 -1
  317. package/dist/ripple/p-358bde27.entry.js +0 -1
  318. package/dist/ripple/p-35ce3ff8.entry.js +0 -1
  319. package/dist/ripple/p-3bed42bf.entry.js +0 -1
  320. package/dist/ripple/p-3fa5f0f0.system.entry.js +0 -1
  321. package/dist/ripple/p-431220d3.entry.js +0 -1
  322. package/dist/ripple/p-461f08d4.entry.js +0 -1
  323. package/dist/ripple/p-4d59fe86.entry.js +0 -1
  324. package/dist/ripple/p-4f42da30.system.entry.js +0 -1
  325. package/dist/ripple/p-50db2d6a.system.entry.js +0 -1
  326. package/dist/ripple/p-5c099280.entry.js +0 -1
  327. package/dist/ripple/p-6910f965.entry.js +0 -1
  328. package/dist/ripple/p-69f21f1a.system.entry.js +0 -1
  329. package/dist/ripple/p-6a6408b8.system.js +0 -1
  330. package/dist/ripple/p-7fae0cc2.entry.js +0 -1
  331. package/dist/ripple/p-823380c1.system.entry.js +0 -1
  332. package/dist/ripple/p-83fe767e.entry.js +0 -1
  333. package/dist/ripple/p-89372ba5.system.entry.js +0 -1
  334. package/dist/ripple/p-936fbfff.entry.js +0 -1
  335. package/dist/ripple/p-9d69aa46.system.entry.js +0 -1
  336. package/dist/ripple/p-a0c3ef16.system.js +0 -1
  337. package/dist/ripple/p-a216c161.system.entry.js +0 -1
  338. package/dist/ripple/p-a51453f6.entry.js +0 -1
  339. package/dist/ripple/p-a9e0ce88.entry.js +0 -1
  340. package/dist/ripple/p-b3c71506.js +0 -1
  341. package/dist/ripple/p-b4724251.entry.js +0 -1
  342. package/dist/ripple/p-b6b5c946.entry.js +0 -1
  343. package/dist/ripple/p-b786a5fd.system.entry.js +0 -1
  344. package/dist/ripple/p-ba76563e.system.entry.js +0 -1
  345. package/dist/ripple/p-bd5a6394.entry.js +0 -1
  346. package/dist/ripple/p-c77d79be.entry.js +0 -1
  347. package/dist/ripple/p-c9541d4d.system.entry.js +0 -1
  348. package/dist/ripple/p-ca7c628f.entry.js +0 -1
  349. package/dist/ripple/p-cae4ebf4.system.entry.js +0 -1
  350. package/dist/ripple/p-cf648440.entry.js +0 -1
  351. package/dist/ripple/p-d93d5885.entry.js +0 -1
  352. package/dist/ripple/p-d9d82a0d.js +0 -1
  353. package/dist/ripple/p-e51562cd.system.entry.js +0 -1
  354. package/dist/ripple/p-eaedb11d.system.entry.js +0 -1
  355. package/dist/ripple/p-ed8115b9.system.entry.js +0 -1
  356. package/dist/ripple/p-f24ff348.system.js +0 -1
  357. package/dist/ripple/p-f37b54be.js +0 -16
  358. package/dist/ripple/p-f5f8bb25.system.entry.js +0 -1
  359. package/dist/ripple/p-f9c3a2ce.entry.js +0 -1
  360. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +0 -27
  361. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +0 -26
  362. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +0 -17
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var a=0,n=t.length,i;a<n;a++){if(i||!(a in t)){if(!i)i=Array.prototype.slice.call(t,0,a);i[a]=t[a]}}return e.concat(i||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,f as forceUpdate,g as getElement}from"./index-7603f98e.js";import{i as intl,l as shouldOpenUp,u as hasRoomRight}from"./functions-e552a8b5.js";var privDatepickerCss='.toggle{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#fff}.toggle:disabled{pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:rgba(74, 74, 74, 0.05)}.toggle:disabled .calendar::after{color:#7b7b7b}.toggle:hover{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#e6e6e6}.toggle:hover .calendar::after{color:#575195}[dir=RTL] .toggle{right:auto;left:0}.toggle span::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:"\\f0ed";font-size:1.5rem;color:#575195;padding:0;line-height:2.5rem}.toggle:focus{outline:none}.toggle::-moz-focus-inner{border:0}.user-is-tabbing .toggle:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.user-is-tabbing .toggle:focus::-moz-focus-inner{border:0}.popup{visibility:hidden;font-family:inherit;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);-moz-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);width:21rem;z-index:10;position:absolute;left:0;top:40px;min-height:21.0625rem;-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;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(1, 0);transform:scale(1, 0);background-color:#fff}.popup.open{-webkit-transform:scale(1, 1);transform:scale(1, 1)}.popup.expand-upwards{top:auto;bottom:2.375rem;-webkit-transform-origin:center bottom;transform-origin:center bottom}.popup .calendar-header{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;position:relative;padding:0.9375rem 0.25rem}.popup .calendar-header .title-box{height:2.625rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;font-weight:500;font-size:0.875rem;background:transparent;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 0.375rem 0 0.75rem;border-color:#575195;color:#575195}.popup .calendar-header .title-box: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:"\\f140";padding-left:0.75rem}.popup .calendar-header .title-box.year:after{content:"\\f143"}.popup .calendar-header .title-box::-moz-focus-inner{border:0}.popup .calendar-header .title-box:focus{outline:none}.popup .calendar-header .arw-btn{cursor:pointer;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;width:2.75rem;height:2.75rem;border:none;color:#575195;background:transparent;padding:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;line-height:2.75rem}.popup .calendar-header .arw-btn .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;font-size:1.5rem;font-weight:normal;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi:hover{background-color:#efeef1}.popup .calendar-header .arw-btn:focus{outline:none}.popup .calendar-header .arw-btn:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9);background-color:#d7d6d9}.popup .day-view{min-width:100%}.popup .day-view .date-grid{width:100%;text-align:center;border-collapse:collapse;margin-bottom:0.4375rem;color:#757575}.popup .day-view .date-grid .date-row:first-child .date-cell{margin-top:0.125rem}.popup .day-view .date-grid .date-header{background-color:#eeedf4}.popup .day-view .date-grid .header-cell{height:2.0625rem;line-height:2.0625rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);padding:0;display:inline-block;font-size:0.8125rem;font-weight:bold;color:#4a4a4a;border:none}.popup .day-view .date-grid .date-cell{cursor:pointer;display:inline-block;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;height:2.75rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);font-size:0.875rem;font-weight:500;line-height:2.75rem}.popup .day-view .date-grid .date-cell:focus{outline:none}.popup .day-view .date-grid .date-cell:hover{background-color:#efeef1}.popup .day-view .date-grid .date-cell:active{background-color:#575195;color:#ffffff}.popup .day-view .date-grid .date-cell.current-month{color:#4a4a4a}.popup .day-view .date-grid .date-cell.current-month[aria-selected=true]{background-color:#575195;color:#ffffff}.popup .month-view .months{border-top:2px solid;border-top-color:#eeedf4;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.popup .month-view .month-row{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;width:100%;border-bottom:2px solid;border-bottom-color:#eeedf4}.popup .month-view .month{cursor:pointer;text-align:center;width:100%;height:4rem;line-height:4rem;font-weight:500;color:#575195}.popup .month-view .month:not(:last-child){border-right:2px solid;border-right-color:#eeedf4}.popup .month-view .month:focus{outline:none}.popup .month-view .month:hover{background-color:#efeef1}.popup .month-view .month:active,.popup .month-view .month.selected{background-color:#575195;color:#ffffff}.popup.user-is-tabbing button:focus,.popup.user-is-tabbing .title-box:focus,.popup.user-is-tabbing .date-cell:focus,.popup.user-is-tabbing .month:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;border:none;z-index:11}.popup.user-is-tabbing button:focus::-moz-focus-inner,.popup.user-is-tabbing .title-box:focus::-moz-focus-inner,.popup.user-is-tabbing .date-cell:focus::-moz-focus-inner,.popup.user-is-tabbing .month:focus::-moz-focus-inner{border:0}.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 PrivDatepicker=function(){function e(e){var t=this;registerInstance(this,e);this.cellTriggered=createEvent(this,"cellTriggered",7);this.toggleButtonClicked=createEvent(this,"toggleButtonClicked",7);this.popupClosed=createEvent(this,"popupClosed",7);this.popupBlurred=createEvent(this,"popupBlurred",7);this.disabled=false;this.isExpanded=false;this.view="day";this.date=new Date;this.selectedYear=this.date.getUTCFullYear();this.selectedMonth=this.date.getUTCMonth()+1;this.selectedDay=this.date.getUTCDate();this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.monthNumInFocus=this.selectedMonth;this.parentId="";this.isTabbing=false;this.popupClicked=true;this.buttonClicked=true;this.prevClicked=true;this.nextClicked=true;this.openUp=false;this.calendar_months=[intl.formatMessage({id:"date.january",defaultMessage:"January",description:"Month of the year"}),intl.formatMessage({id:"date.february",defaultMessage:"February",description:"Month of the year"}),intl.formatMessage({id:"date.march",defaultMessage:"March",description:"Month of the year"}),intl.formatMessage({id:"date.april",defaultMessage:"April",description:"Month of the year"}),intl.formatMessage({id:"date.may",defaultMessage:"May",description:"Month of the year"}),intl.formatMessage({id:"date.june",defaultMessage:"June",description:"Month of the year"}),intl.formatMessage({id:"date.july",defaultMessage:"July",description:"Month of the year"}),intl.formatMessage({id:"date.august",defaultMessage:"August",description:"Month of the year"}),intl.formatMessage({id:"date.september",defaultMessage:"September",description:"Month of the year"}),intl.formatMessage({id:"date.october",defaultMessage:"October",description:"Month of the year"}),intl.formatMessage({id:"date.november",defaultMessage:"November",description:"Month of the year"}),intl.formatMessage({id:"date.december",defaultMessage:"December",description:"Month of the year"})];this.weekdays=[intl.formatMessage({id:"date.sunday",defaultMessage:"Sunday"}),intl.formatMessage({id:"date.monday",defaultMessage:"Monday"}),intl.formatMessage({id:"date.tuesday",defaultMessage:"Tuesday"}),intl.formatMessage({id:"date.wednesday",defaultMessage:"Wednesday"}),intl.formatMessage({id:"date.thursday",defaultMessage:"Thursday"}),intl.formatMessage({id:"date.friday",defaultMessage:"Friday"}),intl.formatMessage({id:"date.saturday",defaultMessage:"Saturday"})];this.renderCalendarDate=function(e,o){var a=t.removeZeroes(String(e[1]));var n=t.removeZeroes(String(e[2]));var i=a===t.monthInFocus?"current-month":"";var s=e[0]+e[1]+e[2];var r=t.isDateToday(e);return h("div",{role:"gridcell",id:"cell-".concat(s,"-").concat(t.parentId),class:"date-cell ".concat(i),"aria-selected":false,"aria-label":"".concat(r?"".concat(intl.formatMessage({id:"date.today",defaultMessage:"today",description:"calendar button"}),", "):"").concat(t.weekdays[o],", ").concat(t.calendar_months[a-1]," ").concat(n,", ").concat(e[0]),onClick:function(e){t.handleTriggeredDate(e.target)},onKeyDown:function(e){return t.trapFocusEnd(e)},"data-month":e[1],"data-year":e[0],onBlur:function(e){return e.stopPropagation()}},n)}}e.prototype.handleKey=function(e){this.prevClicked=false;this.nextClicked=false;switch(e.key){case"Enter":e.preventDefault();!e.target.id.includes("popup-title")&&e.target.click();break;case"Escape":e.preventDefault();if(this.isExpanded){e.stopPropagation();this.closePopup(true)}break;case"PageUp":e.preventDefault();this.backOneMonth();break;case"PageDown":e.preventDefault();this.forwardOneMonth();break;case"Home":e.preventDefault();this.unfocusCell();this.dayInFocus=1;forceUpdate(this.el);break;case"End":e.preventDefault();this.unfocusCell();this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus);forceUpdate(this.el);break;case"ArrowLeft":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus===1){var t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)}else{this.dayInFocus-=1}}else{this.unfocusMonth();if(this.monthNumInFocus===0){this.monthNumInFocus=11}else{this.monthNumInFocus-=1}}break;case"ArrowRight":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus===this.getMonthDays(this.monthInFocus,this.yearInFocus)){var t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=1}else{this.dayInFocus+=1}}else{this.unfocusMonth();if(this.monthNumInFocus===11){this.monthNumInFocus=0}else{this.monthNumInFocus+=1}}break;case"ArrowUp":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus<8){var t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;var o=7-this.dayInFocus;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)-o}else{this.dayInFocus-=7}}else{this.unfocusMonth();if(this.monthNumInFocus<3){this.monthNumInFocus+=9}else{this.monthNumInFocus-=3}}break;case"ArrowDown":e.preventDefault();if(!this.isExpanded){this.openPopup()}else{if(this.view==="day"){if(!(document.activeElement.shadowRoot||document).activeElement.classList.contains("date-cell")){this.focusCell();break}this.unfocusCell();var a=this.getMonthDays(this.monthInFocus,this.yearInFocus)-7;if(this.dayInFocus>a){var t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=this.dayInFocus-a}else{this.dayInFocus+=7}}else{var n=(document.activeElement.shadowRoot||document).activeElement;if(n.tagName==="BUTTON"||n.id.includes("popup-title-year")){this.focusMonth();break}this.unfocusMonth();if(this.monthNumInFocus>8){this.monthNumInFocus-=9}else{this.monthNumInFocus+=3}}}break}};e.prototype.toggleTabbingOn=function(e){var t=["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter"];if(t.includes(e.key)){this.isTabbing=true}};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.blurHandler=function(e){if(!this.popupClicked&&!this.buttonClicked&&this.isExpanded){this.closePopup();this.popupBlurred.emit({relatedTarget:e.target})}this.popupClicked=false;this.buttonClicked=false};e.prototype.handleBlurOnWindow=function(e){if(this.isExpanded){this.closePopup();this.popupBlurred.emit({relatedTarget:e.target})}};e.prototype.componentDidUpdate=function(){this.handleSelectedDate();if(this.isExpanded){this.prevClicked?this.prevButton.focus():this.nextClicked?this.nextButton.focus():this.view==="day"?this.focusCell():this.focusMonth()}};e.prototype.componentDidLoad=function(){this.handleSelectedDate();this.setDateValuesForView()};e.prototype.zeroPad=function(e,t){if(!String.prototype.padStart){String.prototype.padStart=function e(t,o){t=t-this.length;if(t>o.length){o+=o.repeat(t/o.length)}return o.slice(0,t)+String(this)}}return"".concat(e.toString()).padStart(t,"0")};e.prototype.removeZeroes=function(e){return+e<10?+e.slice(1):+e};e.prototype.isDateToday=function(e){var t=this;var o=new Date;var a=[o.getFullYear().toString(),(o.getMonth()+1).toString(),o.getDate().toString()];return a.reduce((function(o,a,n){return o&&t.removeZeroes(e[n]).toString()===a}),true)};e.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.buttonClicked=true};e.prototype.closePopup=function(e){var t=this;if(e===void 0){e=false}this.isExpanded=false;this.popupEl.classList.remove("open");window.setTimeout((function(){t.popupEl.style.visibility="hidden"}),250);if(this.view==="day"){this.unfocusCell()}this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.changeView("day");if(e){this.buttonEl.focus()}};e.prototype.openPopup=function(){var e=this;this.panelPosition();this.setDateValuesForView();this.prevClicked=false;this.nextClicked=false;this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){e.popupEl.classList.add("open")}));this.isExpanded=true;this.focusCell()};e.prototype.getMonthDays=function(e,t){var o=[4,6,9,11];var a=t%4===0;return e===2?a?29:28:o.includes(e)?30:31};e.prototype.getMonthFirstDay=function(e,t){return+new Date(t,e-1,1,12,0,0).getDay()+1};e.prototype.getPreviousMonth=function(e,t){var o=e>1?e-1:12;var a=e>1?t:t-1;return{month:o,year:a}};e.prototype.getNextMonth=function(e,t){var o=e<12?e+1:1;var a=e<12?t:t+1;return{month:o,year:a}};e.prototype.getCalendarDates=function(e,t){var o=this;var a=this.getMonthDays(e,t);var n=this.getMonthFirstDay(e,t);var i=n-1;var s=42-(i+a);s=s>6?s-7:s;var r=this.getPreviousMonth(e,t),d=r.month,l=r.year;var c=this.getNextMonth(e,t),h=c.month,u=c.year;var p=this.getMonthDays(d,l);var f=__spreadArray([],new Array(i).fill("1"),true).map((function(e,t){var a=t+1+(p-i);return[l.toString(),o.zeroPad(d,2),o.zeroPad(a,2)]}));var m=__spreadArray([],new Array(a).fill("1"),true).map((function(a,n){var i=n+1;return[t.toString(),o.zeroPad(e,2),o.zeroPad(i,2)]}));var g=__spreadArray([],new Array(s).fill("1"),true).map((function(e,t){var a=t+1;return[u.toString(),o.zeroPad(h,2),o.zeroPad(a,2)]}));return __spreadArray(__spreadArray(__spreadArray([],f,true),m,true),g,true)};e.prototype.forwardOneMonth=function(){this.unfocusCell();var e=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month;this.yearInFocus=e.year;var t=this.getMonthDays(this.monthInFocus,this.yearInFocus);if(this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)){this.dayInFocus=t}this.updateLiveRegion("Displaying ".concat(this.calendar_months[this.monthInFocus-1],", ").concat(this.yearInFocus))};e.prototype.backOneMonth=function(){this.unfocusCell();var e=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month;this.yearInFocus=e.year;var t=this.getMonthDays(this.monthInFocus,this.yearInFocus);if(this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)){this.dayInFocus=t}this.updateLiveRegion("Viewing ".concat(this.calendar_months[this.monthInFocus-1],", ").concat(this.yearInFocus))};e.prototype.handleTriggeredDate=function(e){this.cellTriggered.emit(e);this.closePopup(true)};e.prototype.handleSelectedDate=function(){if(this.selectedDate){this.selectedDate.removeAttribute("aria-selected")}this.selectedDate=this.getCellById(this.selectedYear,this.selectedMonth,this.selectedDay);if(this.selectedDate){this.selectedDate.setAttribute("aria-selected","true")}};e.prototype.getCellById=function(e,t,o){var a=e+this.zeroPad(t,2)+this.zeroPad(o,2);return this.el.querySelector("#cell-".concat(a,"-").concat(this.parentId))};e.prototype.unfocusCell=function(){var e=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);e.tabIndex=-1};e.prototype.focusCell=function(){var e=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus=this.dayInFocus>e?e:this.dayInFocus;var t=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);if(t){t.tabIndex=0;t.focus()}};e.prototype.unfocusMonth=function(){var e=this.el.querySelector("#month-".concat(this.monthNumInFocus,"-").concat(this.parentId));e.tabIndex=-1};e.prototype.focusMonth=function(){var e=this.el.querySelector("#month-".concat(this.monthNumInFocus,"-").concat(this.parentId));e.tabIndex=0;e.focus()};e.prototype.trapFocusLeft=function(e){if(e.shiftKey&&e.key==="Tab"){e.preventDefault();this.focusCellInView()}};e.prototype.trapFocusEnd=function(e){if(!e.shiftKey&&e.key==="Tab"){e.preventDefault();this.prevButton.focus()}};e.prototype.trapFocusRight=function(e){if(!e.shiftKey&&e.key==="Tab"){e.preventDefault();this.focusCellInView()}};e.prototype.focusCellInView=function(){if(this.view==="day"){this.focusCell()}else{this.focusMonth()}};e.prototype.toggleBusyAttribute=function(e){this.el.querySelector("#wm-container").setAttribute("aria-busy",e)};e.prototype.setDateValuesForView=function(){this.selectedYear=this.date.getUTCFullYear();this.selectedMonth=this.date.getUTCMonth()+1;this.selectedDay=this.date.getUTCDate();this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.monthNumInFocus=this.selectedMonth-1};e.prototype.updateLiveRegion=function(e){var t=this.el.querySelector("#live-region");t.innerHTML=e};e.prototype.panelPosition=function(){var e=document.getElementById(this.parentId);var t=e.shadowRoot.querySelector(".label-wrapper").clientHeight;this.openUp=shouldOpenUp(e,this.popupEl,t);if(hasRoomRight(e,336)){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else{this.popupEl.style.right="0";this.popupEl.style.left="auto"}};e.prototype.changeView=function(e){this.view=e;this.monthNumInFocus=this.monthInFocus-1};e.prototype.renderMonths=function(e,t){var o=this;return h("div",{id:"month-".concat(t,"-").concat(this.parentId),class:"month ".concat(this.selectedMonth-1===t?"selected":""),role:"gridcell",tabindex:t+1===this.monthInFocus?0:-1,onKeyDown:function(e){return o.trapFocusEnd(e)},onBlur:function(e){return e.stopPropagation()},onClick:function(){o.monthInFocus=t+1;o.changeView("day")}},e)};e.prototype.render=function(){var e=this;var t=this.getCalendarDates(this.monthInFocus,this.yearInFocus);return h("div",{class:"container",id:"wm-container"},h("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input-".concat(this.parentId),ref:function(t){return e.buttonEl=t},"aria-expanded":"".concat(this.isExpanded),class:"toggle",id:"toggle-".concat(this.parentId)},h("span",{class:"calendar",title:intl.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),h("div",{class:"popup ".concat(this.view,"-view ").concat(this.openUp?"expand-upwards":""," ").concat(this.isTabbing?"user-is-tabbing":""),id:"popup-".concat(this.parentId),ref:function(t){return e.popupEl=t},onClick:function(){return e.popupClicked=true},role:"application","aria-describedby":"application"},this.view==="day"?h("div",{class:"day-view"},h("div",{class:"calendar-header"},h("button",{onClick:function(){e.prevClicked=true;e.popupClicked=true;e.backOneMonth()},onKeyDown:function(t){return e.trapFocusLeft(t)},ref:function(t){return e.prevButton=t},class:"arw-btn","aria-label":intl.formatMessage({id:"date.selectPreviousMonth",defaultMessage:"Select previous month",description:"Calendar button"})},h("span",{class:"mdi"},"")),h("div",{id:"popup-title-month-".concat(this.parentId),class:"title-box",tabindex:0,role:"button",onKeyDown:function(t){if(t.key==="Enter"||t.key===" "){t.preventDefault();e.changeView("month")}},onClick:this.changeView.bind(this,"month"),"aria-label":"".concat(intl.formatMessage({id:"date.currentMonth",defaultMessage:"current month",description:"Calendar button"}),": ").concat(this.calendar_months[this.monthInFocus-1],"\n ").concat(this.yearInFocus,"."),"aria-describedby":"month-title"},h("span",{class:"title","aria-hidden":"true"},this.calendar_months[this.monthInFocus-1]," ",this.yearInFocus)),h("button",{onClick:function(){e.nextClicked=true;e.popupClicked=true;e.forwardOneMonth()},onKeyDown:function(t){return e.trapFocusRight(t)},"aria-label":intl.formatMessage({id:"date.selectNextMonth",defaultMessage:"Select next month",description:"Calendar button"}),ref:function(t){return e.nextButton=t},class:"arw-btn"},h("span",{class:"mdi"},""))),h("div",{"aria-labelledby":"popup-title-month-".concat(this.parentId),role:"grid",class:"date-grid"},h("div",{role:"rowgroup",class:"date-header"},h("div",{role:"row",class:"header-row"},h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.su",defaultMessage:"Su",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.mo",defaultMessage:"Mo",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.tu",defaultMessage:"Tu",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.we",defaultMessage:"We",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.th",defaultMessage:"Th",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.fr",defaultMessage:"Fr",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.sa",defaultMessage:"Sa",description:"Abbreviated day of the week"}))))),h("div",{role:"rowgroup"},h("div",{role:"row",class:"date-row"},t.slice(0,7).map((function(t,o){return e.renderCalendarDate(t,o)}))),h("div",{role:"row"},t.slice(7,14).map((function(t,o){return e.renderCalendarDate(t,o)}))),h("div",{role:"row"},t.slice(14,21).map((function(t,o){return e.renderCalendarDate(t,o)}))),h("div",{role:"row"},t.slice(21,28).map((function(t,o){return e.renderCalendarDate(t,o)}))),h("div",{role:"row"},t.slice(28,35).map((function(t,o){return e.renderCalendarDate(t,o)}))),t.length>35?h("div",{role:"row"},t.slice(35).map((function(t,o){return e.renderCalendarDate(t,o)}))):""))):h("div",{class:"month-view"},h("div",{class:"calendar-header"},h("button",{onClick:function(){e.prevClicked=true;e.popupClicked=true;e.yearInFocus-=1;e.updateLiveRegion("".concat(e.yearInFocus," selected."))},onKeyDown:function(t){return e.trapFocusLeft(t)},"aria-label":intl.formatMessage({id:"date.selectPreviousYear",defaultMessage:"Select previous year",description:"Calendar button"}),ref:function(t){return e.prevButton=t},class:"arw-btn"},h("span",{class:"mdi"},"")),h("div",{id:"popup-title-year-".concat(this.parentId),tabindex:0,class:"title-box year",role:"button",onClick:this.changeView.bind(this,"day"),onKeyDown:function(t){if(t.key==="Enter"||t.key===" "){t.preventDefault();e.changeView("day")}},"aria-labelledby":"year-title"},h("span",{class:"title"},this.yearInFocus)),h("button",{onClick:function(){e.nextClicked=true;e.popupClicked=true;e.yearInFocus+=1;e.updateLiveRegion("".concat(e.yearInFocus," selected."))},"aria-label":intl.formatMessage({id:"date.selectNextYear",defaultMessage:"Select next year",description:"Calendar button"}),onKeyDown:function(t){return e.trapFocusRight(t)},ref:function(t){return e.nextButton=t},class:"arw-btn"},h("span",{class:"mdi"},""))),h("div",{"aria-labelledby":"popup-title-year-".concat(this.parentId),role:"grid",class:"months"},h("div",{role:"row",class:"month-row"},this.calendar_months.slice(0,3).map((function(t,o){return e.renderMonths(t,o)}))),h("div",{role:"row",class:"month-row"},this.calendar_months.slice(3,6).map((function(t,o){return e.renderMonths(t,o+3)}))),h("div",{role:"row",class:"month-row"},this.calendar_months.slice(6,9).map((function(t,o){return e.renderMonths(t,o+6)}))),h("div",{role:"row",class:"month-row"},this.calendar_months.slice(9).map((function(t,o){return e.renderMonths(t,o+9)})))))),this.isExpanded&&h("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),h("div",{id:"month-title",class:"sr-only"},intl.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),h("div",{id:"year-title",class:"sr-only"},intl.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})),h("div",{id:"application",class:"sr-only"},intl.formatMessage({id:"date.instructions",defaultMessage:"Use arrows to select a date in the table. Tab left or right to buttons for selecting previous month, next month, or the month selection table."})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PrivDatepicker.style=privDatepickerCss;export{PrivDatepicker as priv_datepicker};
1
+ var __spreadArray=this&&this.__spreadArray||function(e,t){for(var o=0,i=t.length,a=e.length;o<i;o++,a++)e[a]=t[o];return e};import{r as registerInstance,c as createEvent,h,f as forceUpdate,g as getElement}from"./index-d649a861.js";import{i as intl,l as shouldOpenUp,u as hasRoomRight}from"./functions-117d1a51.js";var privDatepickerCss='@charset "UTF-8";.toggle{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:#fff}.toggle:disabled{pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background-color:rgba(74, 74, 74, 0.05)}.toggle:disabled .calendar::after{color:#7b7b7b}.toggle:hover{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;background:#e6e6e6}.toggle:hover .calendar::after{color:#575195}[dir=RTL] .toggle{right:auto;left:0}.toggle span::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:"";font-size:1.5rem;color:#575195;padding:0;line-height:2.5rem}.toggle:focus{outline:none}.toggle::-moz-focus-inner{border:0}.user-is-tabbing .toggle:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.user-is-tabbing .toggle:focus::-moz-focus-inner{border:0}.popup{visibility:hidden;font-family:inherit;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);-moz-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);width:21rem;z-index:10;position:absolute;left:0;top:40px;min-height:21.0625rem;-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;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(1, 0);transform:scale(1, 0);background-color:#fff}.popup.open{-webkit-transform:scale(1, 1);transform:scale(1, 1)}.popup.expand-upwards{top:auto;bottom:2.375rem;-webkit-transform-origin:center bottom;transform-origin:center bottom}.popup .calendar-header{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;position:relative;padding:0.9375rem 0.25rem}.popup .calendar-header .title-box{height:2.625rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;font-weight:500;font-size:0.875rem;background:transparent;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 0.375rem 0 0.75rem;border-color:#575195;color:#575195}.popup .calendar-header .title-box: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:"";padding-left:0.75rem}.popup .calendar-header .title-box.year:after{content:""}.popup .calendar-header .title-box::-moz-focus-inner{border:0}.popup .calendar-header .title-box:focus{outline:none}.popup .calendar-header .arw-btn{cursor:pointer;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;width:2.75rem;height:2.75rem;border:none;color:#575195;background:transparent;padding:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;line-height:2.75rem}.popup .calendar-header .arw-btn .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;font-size:1.5rem;font-weight:normal;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi:hover{background-color:#efeef1}.popup .calendar-header .arw-btn:focus{outline:none}.popup .calendar-header .arw-btn:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9);background-color:#d7d6d9}.popup .day-view{min-width:100%}.popup .day-view .date-grid{width:100%;text-align:center;border-collapse:collapse;margin-bottom:0.4375rem;color:#757575}.popup .day-view .date-grid .date-row:first-child .date-cell{margin-top:0.125rem}.popup .day-view .date-grid .date-header{background-color:#eeedf4}.popup .day-view .date-grid .header-cell{height:2.0625rem;line-height:2.0625rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);padding:0;display:inline-block;font-size:0.8125rem;font-weight:bold;color:#4a4a4a;border:none}.popup .day-view .date-grid .date-cell{cursor:pointer;display:inline-block;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;height:2.75rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);font-size:0.875rem;font-weight:500;line-height:2.75rem}.popup .day-view .date-grid .date-cell:focus{outline:none}.popup .day-view .date-grid .date-cell:hover{background-color:#efeef1}.popup .day-view .date-grid .date-cell:active{background-color:#575195;color:#ffffff}.popup .day-view .date-grid .date-cell.current-month{color:#4a4a4a}.popup .day-view .date-grid .date-cell.current-month[aria-selected=true]{background-color:#575195;color:#ffffff}.popup .month-view .months{border-top:2px solid;border-top-color:#eeedf4;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.popup .month-view .month-row{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;width:100%;border-bottom:2px solid;border-bottom-color:#eeedf4}.popup .month-view .month{cursor:pointer;text-align:center;width:100%;height:4rem;line-height:4rem;font-weight:500;color:#575195}.popup .month-view .month:not(:last-child){border-right:2px solid;border-right-color:#eeedf4}.popup .month-view .month:focus{outline:none}.popup .month-view .month:hover{background-color:#efeef1}.popup .month-view .month:active,.popup .month-view .month.selected{background-color:#575195;color:#ffffff}.popup.user-is-tabbing button:focus,.popup.user-is-tabbing .title-box:focus,.popup.user-is-tabbing .date-cell:focus,.popup.user-is-tabbing .month:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;border:none;z-index:11}.popup.user-is-tabbing button:focus::-moz-focus-inner,.popup.user-is-tabbing .title-box:focus::-moz-focus-inner,.popup.user-is-tabbing .date-cell:focus::-moz-focus-inner,.popup.user-is-tabbing .month:focus::-moz-focus-inner{border:0}.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 PrivDatepicker=function(){function e(e){var t=this;registerInstance(this,e);this.cellTriggered=createEvent(this,"cellTriggered",7);this.toggleButtonClicked=createEvent(this,"toggleButtonClicked",7);this.popupClosed=createEvent(this,"popupClosed",7);this.popupBlurred=createEvent(this,"popupBlurred",7);this.disabled=false;this.isExpanded=false;this.view="day";this.date=new Date;this.selectedYear=this.date.getUTCFullYear();this.selectedMonth=this.date.getUTCMonth()+1;this.selectedDay=this.date.getUTCDate();this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.monthNumInFocus=this.selectedMonth;this.parentId="";this.isTabbing=false;this.popupClicked=true;this.buttonClicked=true;this.prevClicked=true;this.nextClicked=true;this.openUp=false;this.calendar_months=[intl.formatMessage({id:"date.january",defaultMessage:"January",description:"Month of the year"}),intl.formatMessage({id:"date.february",defaultMessage:"February",description:"Month of the year"}),intl.formatMessage({id:"date.march",defaultMessage:"March",description:"Month of the year"}),intl.formatMessage({id:"date.april",defaultMessage:"April",description:"Month of the year"}),intl.formatMessage({id:"date.may",defaultMessage:"May",description:"Month of the year"}),intl.formatMessage({id:"date.june",defaultMessage:"June",description:"Month of the year"}),intl.formatMessage({id:"date.july",defaultMessage:"July",description:"Month of the year"}),intl.formatMessage({id:"date.august",defaultMessage:"August",description:"Month of the year"}),intl.formatMessage({id:"date.september",defaultMessage:"September",description:"Month of the year"}),intl.formatMessage({id:"date.october",defaultMessage:"October",description:"Month of the year"}),intl.formatMessage({id:"date.november",defaultMessage:"November",description:"Month of the year"}),intl.formatMessage({id:"date.december",defaultMessage:"December",description:"Month of the year"})];this.weekdays=[intl.formatMessage({id:"date.sunday",defaultMessage:"Sunday"}),intl.formatMessage({id:"date.monday",defaultMessage:"Monday"}),intl.formatMessage({id:"date.tuesday",defaultMessage:"Tuesday"}),intl.formatMessage({id:"date.wednesday",defaultMessage:"Wednesday"}),intl.formatMessage({id:"date.thursday",defaultMessage:"Thursday"}),intl.formatMessage({id:"date.friday",defaultMessage:"Friday"}),intl.formatMessage({id:"date.saturday",defaultMessage:"Saturday"})];this.renderCalendarDate=function(e,o){var i=t.removeZeroes(String(e[1]));var a=t.removeZeroes(String(e[2]));var n=i===t.monthInFocus?"current-month":"";var s=e[0]+e[1]+e[2];var r=t.isDateToday(e);return h("div",{role:"gridcell",id:"cell-"+s+"-"+t.parentId,class:"date-cell "+n,"aria-selected":false,"aria-label":""+(r?intl.formatMessage({id:"date.today",defaultMessage:"today",description:"calendar button"})+", ":"")+t.weekdays[o]+", "+t.calendar_months[i-1]+" "+a+", "+e[0],onClick:function(e){t.handleTriggeredDate(e.target)},onKeyDown:function(e){return t.trapFocusEnd(e)},"data-month":e[1],"data-year":e[0],onBlur:function(e){return e.stopPropagation()}},a)}}e.prototype.handleKey=function(e){this.prevClicked=false;this.nextClicked=false;switch(e.key){case"Enter":e.preventDefault();!e.target.id.includes("popup-title")&&e.target.click();break;case"Escape":e.preventDefault();if(this.isExpanded){e.stopPropagation();this.closePopup(true)}break;case"PageUp":e.preventDefault();this.backOneMonth();break;case"PageDown":e.preventDefault();this.forwardOneMonth();break;case"Home":e.preventDefault();this.unfocusCell();this.dayInFocus=1;forceUpdate(this.el);break;case"End":e.preventDefault();this.unfocusCell();this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus);forceUpdate(this.el);break;case"ArrowLeft":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus===1){var t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)}else{this.dayInFocus-=1}}else{this.unfocusMonth();if(this.monthNumInFocus===0){this.monthNumInFocus=11}else{this.monthNumInFocus-=1}}break;case"ArrowRight":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus===this.getMonthDays(this.monthInFocus,this.yearInFocus)){var t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=1}else{this.dayInFocus+=1}}else{this.unfocusMonth();if(this.monthNumInFocus===11){this.monthNumInFocus=0}else{this.monthNumInFocus+=1}}break;case"ArrowUp":e.preventDefault();if(this.view==="day"){this.unfocusCell();if(this.dayInFocus<8){var t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;var o=7-this.dayInFocus;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)-o}else{this.dayInFocus-=7}}else{this.unfocusMonth();if(this.monthNumInFocus<3){this.monthNumInFocus+=9}else{this.monthNumInFocus-=3}}break;case"ArrowDown":e.preventDefault();if(!this.isExpanded){this.openPopup()}else{if(this.view==="day"){if(!(document.activeElement.shadowRoot||document).activeElement.classList.contains("date-cell")){this.focusCell();break}this.unfocusCell();var i=this.getMonthDays(this.monthInFocus,this.yearInFocus)-7;if(this.dayInFocus>i){var t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month;this.yearInFocus=t.year;this.dayInFocus=this.dayInFocus-i}else{this.dayInFocus+=7}}else{var a=(document.activeElement.shadowRoot||document).activeElement;if(a.tagName==="BUTTON"||a.id.includes("popup-title-year")){this.focusMonth();break}this.unfocusMonth();if(this.monthNumInFocus>8){this.monthNumInFocus-=9}else{this.monthNumInFocus+=3}}}break}};e.prototype.toggleTabbingOn=function(e){var t=["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter"];if(t.includes(e.key)){this.isTabbing=true}};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.blurHandler=function(e){if(!this.popupClicked&&!this.buttonClicked&&this.isExpanded){this.closePopup();this.popupBlurred.emit({relatedTarget:e.target})}this.popupClicked=false;this.buttonClicked=false};e.prototype.handleBlurOnWindow=function(e){if(this.isExpanded){this.closePopup();this.popupBlurred.emit({relatedTarget:e.target})}};e.prototype.componentDidUpdate=function(){this.handleSelectedDate();if(this.isExpanded){this.prevClicked?this.prevButton.focus():this.nextClicked?this.nextButton.focus():this.view==="day"?this.focusCell():this.focusMonth()}};e.prototype.componentDidLoad=function(){this.handleSelectedDate();this.setDateValuesForView()};e.prototype.zeroPad=function(e,t){if(!String.prototype.padStart){String.prototype.padStart=function e(t,o){t=t-this.length;if(t>o.length){o+=o.repeat(t/o.length)}return o.slice(0,t)+String(this)}}return(""+e.toString()).padStart(t,"0")};e.prototype.removeZeroes=function(e){return+e<10?+e.slice(1):+e};e.prototype.isDateToday=function(e){var t=this;var o=new Date;var i=[o.getFullYear().toString(),(o.getMonth()+1).toString(),o.getDate().toString()];return i.reduce((function(o,i,a){return o&&t.removeZeroes(e[a]).toString()===i}),true)};e.prototype.togglePopup=function(){this.isExpanded?this.closePopup():this.openPopup();this.buttonClicked=true};e.prototype.closePopup=function(e){var t=this;if(e===void 0){e=false}this.isExpanded=false;this.popupEl.classList.remove("open");window.setTimeout((function(){t.popupEl.style.visibility="hidden"}),250);if(this.view==="day"){this.unfocusCell()}this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.changeView("day");if(e){this.buttonEl.focus()}};e.prototype.openPopup=function(){var e=this;this.panelPosition();this.setDateValuesForView();this.prevClicked=false;this.nextClicked=false;this.popupEl.style.visibility="visible";window.requestAnimationFrame((function(){e.popupEl.classList.add("open")}));this.isExpanded=true;this.focusCell()};e.prototype.getMonthDays=function(e,t){var o=[4,6,9,11];var i=t%4===0;return e===2?i?29:28:o.includes(e)?30:31};e.prototype.getMonthFirstDay=function(e,t){return+new Date(t,e-1,1,12,0,0).getDay()+1};e.prototype.getPreviousMonth=function(e,t){var o=e>1?e-1:12;var i=e>1?t:t-1;return{month:o,year:i}};e.prototype.getNextMonth=function(e,t){var o=e<12?e+1:1;var i=e<12?t:t+1;return{month:o,year:i}};e.prototype.getCalendarDates=function(e,t){var o=this;var i=this.getMonthDays(e,t);var a=this.getMonthFirstDay(e,t);var n=a-1;var s=42-(n+i);s=s>6?s-7:s;var r=this.getPreviousMonth(e,t),d=r.month,l=r.year;var h=this.getNextMonth(e,t),u=h.month,c=h.year;var p=this.getMonthDays(d,l);var f=__spreadArray([],new Array(n).fill("1")).map((function(e,t){var i=t+1+(p-n);return[l.toString(),o.zeroPad(d,2),o.zeroPad(i,2)]}));var m=__spreadArray([],new Array(i).fill("1")).map((function(i,a){var n=a+1;return[t.toString(),o.zeroPad(e,2),o.zeroPad(n,2)]}));var g=__spreadArray([],new Array(s).fill("1")).map((function(e,t){var i=t+1;return[c.toString(),o.zeroPad(u,2),o.zeroPad(i,2)]}));return __spreadArray(__spreadArray(__spreadArray([],f),m),g)};e.prototype.forwardOneMonth=function(){this.unfocusCell();var e=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month;this.yearInFocus=e.year;var t=this.getMonthDays(this.monthInFocus,this.yearInFocus);if(this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)){this.dayInFocus=t}this.updateLiveRegion("Displaying "+this.calendar_months[this.monthInFocus-1]+", "+this.yearInFocus)};e.prototype.backOneMonth=function(){this.unfocusCell();var e=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month;this.yearInFocus=e.year;var t=this.getMonthDays(this.monthInFocus,this.yearInFocus);if(this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)){this.dayInFocus=t}this.updateLiveRegion("Viewing "+this.calendar_months[this.monthInFocus-1]+", "+this.yearInFocus)};e.prototype.handleTriggeredDate=function(e){this.cellTriggered.emit(e);this.closePopup(true)};e.prototype.handleSelectedDate=function(){if(this.selectedDate){this.selectedDate.removeAttribute("aria-selected")}this.selectedDate=this.getCellById(this.selectedYear,this.selectedMonth,this.selectedDay);if(this.selectedDate){this.selectedDate.setAttribute("aria-selected","true")}};e.prototype.getCellById=function(e,t,o){var i=e+this.zeroPad(t,2)+this.zeroPad(o,2);return this.el.querySelector("#cell-"+i+"-"+this.parentId)};e.prototype.unfocusCell=function(){var e=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);e.tabIndex=-1};e.prototype.focusCell=function(){var e=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus=this.dayInFocus>e?e:this.dayInFocus;var t=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);if(t){t.tabIndex=0;t.focus()}};e.prototype.unfocusMonth=function(){var e=this.el.querySelector("#month-"+this.monthNumInFocus+"-"+this.parentId);e.tabIndex=-1};e.prototype.focusMonth=function(){var e=this.el.querySelector("#month-"+this.monthNumInFocus+"-"+this.parentId);e.tabIndex=0;e.focus()};e.prototype.trapFocusLeft=function(e){if(e.shiftKey&&e.key==="Tab"){e.preventDefault();this.focusCellInView()}};e.prototype.trapFocusEnd=function(e){if(!e.shiftKey&&e.key==="Tab"){e.preventDefault();this.prevButton.focus()}};e.prototype.trapFocusRight=function(e){if(!e.shiftKey&&e.key==="Tab"){e.preventDefault();this.focusCellInView()}};e.prototype.focusCellInView=function(){if(this.view==="day"){this.focusCell()}else{this.focusMonth()}};e.prototype.toggleBusyAttribute=function(e){this.el.querySelector("#wm-container").setAttribute("aria-busy",e)};e.prototype.setDateValuesForView=function(){this.selectedYear=this.date.getUTCFullYear();this.selectedMonth=this.date.getUTCMonth()+1;this.selectedDay=this.date.getUTCDate();this.monthInFocus=this.selectedMonth;this.yearInFocus=this.selectedYear;this.dayInFocus=this.selectedDay;this.monthNumInFocus=this.selectedMonth-1};e.prototype.updateLiveRegion=function(e){var t=this.el.querySelector("#live-region");t.innerHTML=e};e.prototype.panelPosition=function(){var e=document.getElementById(this.parentId);var t=e.shadowRoot.querySelector(".label-wrapper").clientHeight;this.openUp=shouldOpenUp(e,this.popupEl,t);if(hasRoomRight(e,336)){this.popupEl.style.left="0";this.popupEl.style.right="auto"}else{this.popupEl.style.right="0";this.popupEl.style.left="auto"}};e.prototype.changeView=function(e){this.view=e;this.monthNumInFocus=this.monthInFocus-1};e.prototype.renderMonths=function(e,t){var o=this;return h("div",{id:"month-"+t+"-"+this.parentId,class:"month "+(this.selectedMonth-1===t?"selected":""),role:"gridcell",tabindex:t+1===this.monthInFocus?0:-1,onKeyDown:function(e){return o.trapFocusEnd(e)},onBlur:function(e){return e.stopPropagation()},onClick:function(){o.monthInFocus=t+1;o.changeView("day")}},e)};e.prototype.render=function(){var e=this;var t=this.getCalendarDates(this.monthInFocus,this.yearInFocus);return h("div",{class:"container",id:"wm-container"},h("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input-"+this.parentId,ref:function(t){return e.buttonEl=t},"aria-expanded":""+this.isExpanded,class:"toggle",id:"toggle-"+this.parentId},h("span",{class:"calendar",title:intl.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),h("div",{class:"popup "+this.view+"-view "+(this.openUp?"expand-upwards":"")+" "+(this.isTabbing?"user-is-tabbing":""),id:"popup-"+this.parentId,ref:function(t){return e.popupEl=t},onClick:function(){return e.popupClicked=true},role:"application","aria-describedby":"application"},this.view==="day"?h("div",{class:"day-view"},h("div",{class:"calendar-header"},h("button",{onClick:function(){e.prevClicked=true;e.popupClicked=true;e.backOneMonth()},onKeyDown:function(t){return e.trapFocusLeft(t)},ref:function(t){return e.prevButton=t},class:"arw-btn","aria-label":intl.formatMessage({id:"date.selectPreviousMonth",defaultMessage:"Select previous month",description:"Calendar button"})},h("span",{class:"mdi"},"")),h("div",{id:"popup-title-month-"+this.parentId,class:"title-box",tabindex:0,role:"button",onKeyDown:function(t){if(t.key==="Enter"||t.key===" "){t.preventDefault();e.changeView("month")}},onClick:this.changeView.bind(this,"month"),"aria-label":intl.formatMessage({id:"date.currentMonth",defaultMessage:"current month",description:"Calendar button"})+": "+this.calendar_months[this.monthInFocus-1]+"\n "+this.yearInFocus+".","aria-describedby":"month-title"},h("span",{class:"title","aria-hidden":"true"},this.calendar_months[this.monthInFocus-1]," ",this.yearInFocus)),h("button",{onClick:function(){e.nextClicked=true;e.popupClicked=true;e.forwardOneMonth()},onKeyDown:function(t){return e.trapFocusRight(t)},"aria-label":intl.formatMessage({id:"date.selectNextMonth",defaultMessage:"Select next month",description:"Calendar button"}),ref:function(t){return e.nextButton=t},class:"arw-btn"},h("span",{class:"mdi"},""))),h("div",{"aria-labelledby":"popup-title-month-"+this.parentId,role:"grid",class:"date-grid"},h("div",{role:"rowgroup",class:"date-header"},h("div",{role:"row",class:"header-row"},h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.su",defaultMessage:"Su",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.mo",defaultMessage:"Mo",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.tu",defaultMessage:"Tu",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.we",defaultMessage:"We",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.th",defaultMessage:"Th",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.fr",defaultMessage:"Fr",description:"Abbreviated day of the week"}))),h("div",{role:"columnheader",class:"header-cell"},h("span",null,intl.formatMessage({id:"date.sa",defaultMessage:"Sa",description:"Abbreviated day of the week"}))))),h("div",{role:"rowgroup"},h("div",{role:"row",class:"date-row"},t.slice(0,7).map((function(t,o){return e.renderCalendarDate(t,o)}))),h("div",{role:"row"},t.slice(7,14).map((function(t,o){return e.renderCalendarDate(t,o)}))),h("div",{role:"row"},t.slice(14,21).map((function(t,o){return e.renderCalendarDate(t,o)}))),h("div",{role:"row"},t.slice(21,28).map((function(t,o){return e.renderCalendarDate(t,o)}))),h("div",{role:"row"},t.slice(28,35).map((function(t,o){return e.renderCalendarDate(t,o)}))),t.length>35?h("div",{role:"row"},t.slice(35).map((function(t,o){return e.renderCalendarDate(t,o)}))):""))):h("div",{class:"month-view"},h("div",{class:"calendar-header"},h("button",{onClick:function(){e.prevClicked=true;e.popupClicked=true;e.yearInFocus-=1;e.updateLiveRegion(e.yearInFocus+" selected.")},onKeyDown:function(t){return e.trapFocusLeft(t)},"aria-label":intl.formatMessage({id:"date.selectPreviousYear",defaultMessage:"Select previous year",description:"Calendar button"}),ref:function(t){return e.prevButton=t},class:"arw-btn"},h("span",{class:"mdi"},"")),h("div",{id:"popup-title-year-"+this.parentId,tabindex:0,class:"title-box year",role:"button",onClick:this.changeView.bind(this,"day"),onKeyDown:function(t){if(t.key==="Enter"||t.key===" "){t.preventDefault();e.changeView("day")}},"aria-labelledby":"year-title"},h("span",{class:"title"},this.yearInFocus)),h("button",{onClick:function(){e.nextClicked=true;e.popupClicked=true;e.yearInFocus+=1;e.updateLiveRegion(e.yearInFocus+" selected.")},"aria-label":intl.formatMessage({id:"date.selectNextYear",defaultMessage:"Select next year",description:"Calendar button"}),onKeyDown:function(t){return e.trapFocusRight(t)},ref:function(t){return e.nextButton=t},class:"arw-btn"},h("span",{class:"mdi"},""))),h("div",{"aria-labelledby":"popup-title-year-"+this.parentId,role:"grid",class:"months"},h("div",{role:"row",class:"month-row"},this.calendar_months.slice(0,3).map((function(t,o){return e.renderMonths(t,o)}))),h("div",{role:"row",class:"month-row"},this.calendar_months.slice(3,6).map((function(t,o){return e.renderMonths(t,o+3)}))),h("div",{role:"row",class:"month-row"},this.calendar_months.slice(6,9).map((function(t,o){return e.renderMonths(t,o+6)}))),h("div",{role:"row",class:"month-row"},this.calendar_months.slice(9).map((function(t,o){return e.renderMonths(t,o+9)})))))),this.isExpanded&&h("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),h("div",{id:"month-title",class:"sr-only"},intl.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),h("div",{id:"year-title",class:"sr-only"},intl.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})),h("div",{id:"application",class:"sr-only"},intl.formatMessage({id:"date.instructions",defaultMessage:"Use arrows to select a date in the table. Tab left or right to buttons for selecting previous month, next month, or the month selection table."})))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PrivDatepicker.style=privDatepickerCss;export{PrivDatepicker as priv_datepicker};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-7603f98e.js";var privNavigatorButtonCss=':host *,priv-navigator-button *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .navigator,priv-navigator-button .navigator{color:#575195;padding:0 1.25rem;position:static !important;height:100%;background:transparent;border:none;min-height:3.75rem;cursor:pointer;border-radius:0;top:50%}:host .navigator img,priv-navigator-button .navigator img{height:2.25rem;width:2.25rem;vertical-align:middle}:host .navigator:hover,priv-navigator-button .navigator:hover{background:#dcdbde}:host .navigator:active,:host .navigator:focus,priv-navigator-button .navigator:active,priv-navigator-button .navigator:focus{outline:none}:host .navigator.user-is-tabbing:focus,priv-navigator-button .navigator.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .navigator.user-is-tabbing:focus::-moz-focus-inner,priv-navigator-button .navigator.user-is-tabbing:focus::-moz-focus-inner{border:0}:host button:after,priv-navigator-button button:after{vertical-align:middle;height:2.25rem;width:2.25rem;background-size:36px;display:inline-block;background-image:url(https://cdn.watermarkinsights.com/images/icons/appswitchericon_purple.svg);content:""}';var PrivNavigatorButton=function(){function t(t){registerInstance(this,t);this.buttonActivated=createEvent(this,"buttonActivated",7);this.expanded=false;this.altText="";this.isTabbing=false}t.prototype.handleClick=function(){this.buttonActivated.emit()};t.prototype.render=function(){var t=this,i=t.handleClick,a=t.altText;var r=this.isTabbing?"user-is-tabbing":"";return h("button",{"aria-expanded":this.expanded.toString(),class:"navigator ".concat(r),onClick:i.bind(this),"aria-label":a})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PrivNavigatorButton.style=privNavigatorButtonCss;export{PrivNavigatorButton as priv_navigator_button};
1
+ import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-d649a861.js";var privNavigatorButtonCss=':host *,priv-navigator-button *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .navigator,priv-navigator-button .navigator{color:#575195;padding:0 1.25rem;position:static !important;height:100%;background:transparent;border:none;min-height:3.75rem;cursor:pointer;border-radius:0;top:50%}:host .navigator img,priv-navigator-button .navigator img{height:2.25rem;width:2.25rem;vertical-align:middle}:host .navigator:hover,priv-navigator-button .navigator:hover{background:#dcdbde}:host .navigator:active,:host .navigator:focus,priv-navigator-button .navigator:active,priv-navigator-button .navigator:focus{outline:none}:host .navigator.user-is-tabbing:focus,priv-navigator-button .navigator.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .navigator.user-is-tabbing:focus::-moz-focus-inner,priv-navigator-button .navigator.user-is-tabbing:focus::-moz-focus-inner{border:0}:host button:after,priv-navigator-button button:after{vertical-align:middle;height:2.25rem;width:2.25rem;background-size:36px;display:inline-block;background-image:url(https://cdn.watermarkinsights.com/images/icons/appswitchericon_purple.svg);content:""}';var PrivNavigatorButton=function(){function t(t){registerInstance(this,t);this.buttonActivated=createEvent(this,"buttonActivated",7);this.expanded=false;this.altText="";this.isTabbing=false}t.prototype.handleClick=function(){this.buttonActivated.emit()};t.prototype.render=function(){var t=this,i=t.handleClick,a=t.altText;var r=this.isTabbing?"user-is-tabbing":"";return h("button",{"aria-expanded":this.expanded.toString(),class:"navigator "+r,onClick:i.bind(this),"aria-label":a})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();PrivNavigatorButton.style=privNavigatorButtonCss;export{PrivNavigatorButton as priv_navigator_button};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-7603f98e.js";var privNavigatorItemCss=":host,priv-navigator-item{list-style:none;border-bottom:1px solid #e0dde4;width:100%;display:block;cursor:pointer}:host .navoption,priv-navigator-item .navoption{color:#404248;padding:0.9375rem 1.25rem;background:#fff;font-size:0.875rem}:host .navoption.selected,:host .navoption:hover,priv-navigator-item .navoption.selected,priv-navigator-item .navoption:hover{background:#e5e5e5}:host .navoption.focused:not(.selected),priv-navigator-item .navoption.focused:not(.selected){background:#f4f4f4;opacity:1}";var PrivNavigatorItem=function(){function e(e){registerInstance(this,e);this.keydownOnNavItem=createEvent(this,"keydownOnNavItem",7);this.selected=false;this.focused=false;this.link=""}e.prototype.handleKeyDown=function(e){var t=e.key;var o=this.el;if(t!=="Tab"){e.preventDefault()}this.keydownOnNavItem.emit({navItem:o,key:t})};e.prototype.render=function(){var e=this.selected?"selected":"";var t=this.focused?"focused":"";return h("div",{class:"navoption ".concat(e," ").concat(t)},h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PrivNavigatorItem.style=privNavigatorItemCss;export{PrivNavigatorItem as priv_navigator_item};
1
+ import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-d649a861.js";var privNavigatorItemCss=":host,priv-navigator-item{list-style:none;border-bottom:1px solid #e0dde4;width:100%;display:block;cursor:pointer}:host .navoption,priv-navigator-item .navoption{color:#404248;padding:0.9375rem 1.25rem;background:#fff;font-size:0.875rem}:host .navoption.selected,:host .navoption:hover,priv-navigator-item .navoption.selected,priv-navigator-item .navoption:hover{background:#e5e5e5}:host .navoption.focused:not(.selected),priv-navigator-item .navoption.focused:not(.selected){background:#f4f4f4;opacity:1}";var PrivNavigatorItem=function(){function e(e){registerInstance(this,e);this.keydownOnNavItem=createEvent(this,"keydownOnNavItem",7);this.selected=false;this.focused=false;this.link=""}e.prototype.handleKeyDown=function(e){var t=e.key;var o=this.el;if(t!=="Tab"){e.preventDefault()}this.keydownOnNavItem.emit({navItem:o,key:t})};e.prototype.render=function(){var e=this.selected?"selected":"";var t=this.focused?"focused":"";return h("div",{class:"navoption "+e+" "+t},h("slot",null))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();PrivNavigatorItem.style=privNavigatorItemCss;export{PrivNavigatorItem as priv_navigator_item};
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-7603f98e.js";import"./global-fa341013.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["wm-tab-item_3",[[1,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"],"controllerEnabled":[4,"controller-enabled"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"wmTabSelected","handleTabSelected"],[0,"keydownOnTabItem","handleKeydown"],[9,"resize","setLayout"]]],[1,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]]]],["wm-navigator",[[1,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"isTabbing":[32],"itemIndexToFocus":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]]]]],["wm-network-uploader",[[1,"wm-network-uploader",{"getPath":[1,"get-path"],"requestUploadPath":[1,"request-upload-path"],"uploadPath":[1,"upload-path"],"requestDownloadPath":[1,"request-download-path"],"deletePath":[1,"delete-path"],"associatedData":[1,"associated-data"],"buttonText":[1,"button-text"],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1026,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"isTabbing":[32],"fileList":[32],"inProgressList":[32],"errorList":[32],"notif":[32],"snackbar":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"],[0,"userFinishedSnack","handleFinishedSnack"]]]]],["wm-navigation_3",[[1,"wm-navigation",{"open":[1540],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]]],[1,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"tooltipVisible":[1028,"tooltip-visible"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[1,"wm-navigation-item",{"href":[1],"text":[1],"active":[4],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["wm-progress-indicator_3",[[1,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"isTabbing":[32],"mode":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]]],[1,"wm-progress-monitor",{"breakpoint":[8]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["wm-action-menu_2",[[1,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonType":[1,"button-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[4,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"focused":[4],"icon":[1025],"description":[1],"isKeying":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]]]]],["wm-chart",[[1,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"valueFormat":[1,"value-format"],"showValues":[1,"show-values"],"showLegend":[4,"show-legend"],"notStartedColor":[4,"not-started-color"],"labelPosition":[1,"label-position"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[9,"resize","handleResize"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["wm-datepicker",[[1,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1025,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1025,"label-position"],"label":[1025],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"displayError":[32]},[[0,"keydown","handleTabbingOn"],[0,"click","handleTabbingOff"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"]]]]],["wm-modal-footer",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]},[[4,"focusLastElement","focusLastEl"]]]]],["wm-modal-header",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]},[[4,"focusFirstElement","focusFirstEl"]]]]],["wm-search",[[1,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["wm-uploader",[[1,"wm-uploader",{"uploaderType":[1025,"uploader-type"],"type":[1],"buttonText":[1,"button-text"],"info":[1],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1026,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"files":[1],"filesToUpload":[16],"rejectedFiles":[1,"rejected-files"],"isTabbing":[32],"errorList":[32],"notif":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"]]]]],["wm-chart-slice",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["wm-input",[[1,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1537],"disabled":[516],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"preventValidation":[1,"prevent-validation"],"type":[1],"step":[2],"min":[2],"max":[2],"announcement":[32],"displayedErrorMessage":[32]}]]],["wm-modal",[[0,"wm-modal",{"open":[1540],"isOpen":[1540,"is-open"],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"isTypeDialog":[516,"is-type-dialog"],"uid":[1537],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},[[0,"click","handleClick"],[0,"keydown","closeModalOnEscape"]]]]],["wm-pagination",[[1,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeViewport":[4,"is-large-viewport"],"isTabbing":[32],"srAnnouncement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"resize","handleResize"]]]]],["wm-tag-input",[[1,"wm-tag-input",{"label":[1],"labelPosition":[1,"label-position"],"options":[1025],"selectedTags":[1537,"selected-tags"],"info":[1],"addNew":[4,"add-new"],"placeholder":[1025],"characterLimit":[2,"character-limit"],"maxTags":[2,"max-tags"],"focusedListItem":[32],"focusedTag":[32],"isExpanded":[32],"tagsList":[32],"optionsList":[32],"charCount":[32],"liveRegionMessage":[32]},[[4,"click","closeIfNotElOrChild"],[9,"resize","handleResize"]]]]],["wm-timepicker",[[1,"wm-timepicker",{"disabled":[4],"value":[1537],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"selectedOption":[32],"isExpanded":[32],"isTabbing":[32],"displayedErrorMessage":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKey"]]]]],["wm-toggletip",[[1,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipText":[1,"tooltip-text"],"tooltipPosition":[1537,"tooltip-position"],"isOpen":[32],"isTabbing":[32]},[[0,"keydown","handleKeydown"],[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"click","handleClick"]]]]],["wm-wrapper",[[0,"wm-wrapper"]]],["priv-datepicker",[[0,"priv-datepicker",{"disabled":[4],"isExpanded":[1540,"is-expanded"],"view":[1537],"date":[1040],"selectedYear":[1026,"selected-year"],"selectedMonth":[1026,"selected-month"],"selectedDay":[1026,"selected-day"],"monthInFocus":[1026,"month-in-focus"],"yearInFocus":[1026,"year-in-focus"],"dayInFocus":[1026,"day-in-focus"],"parentId":[1537,"parent-id"],"monthNumInFocus":[32],"isTabbing":[32]},[[0,"keydown","handleKey"],[0,"keydown","toggleTabbingOn"],[9,"mousedown","toggleTabbingOff"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"]]]]],["priv-navigator-button",[[1,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"],"isTabbing":[1028,"is-tabbing"]}]]],["priv-navigator-item",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["wm-snackbar",[[1,"wm-snackbar",{"notifications":[1537]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]]]]],["wm-option_2",[[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]]],[1,"wm-select",{"disabled":[516],"invalid":[1028],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"placeholder":[1],"allSelectedMessage":[1,"all-selected-message"],"isTabbing":[32],"isExpanded":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstItem"],[0,"wmEndKeyPressed","moveToLastItem"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusItem"]]]]],["priv-chart-popover",[[0,"priv-chart-popover",{"sliceRef":[16],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"buttonText":[1,"button-text"],"open":[1028],"coords":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]]]]],["wm-button",[[1,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"buttonStyle":[1025,"button-style"],"icon":[1537],"iconSize":[1,"icon-size"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"tooltipVisible":[1028,"tooltip-visible"],"adjustedTooltipPosition":[32],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"scroll","handleScroll"],[0,"keydown","handleKeydown"]]]]]]'),e)}));
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-d649a861.js";import"./global-6a9c8257.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["wm-tab-item_3",[[1,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"],"controllerEnabled":[4,"controller-enabled"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"wmTabSelected","handleTabSelected"],[0,"keydownOnTabItem","handleKeydown"],[9,"resize","setLayout"]]],[1,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]},[[4,"keydown","toggleTabbingOn"],[4,"click","toggleTabbingOff"]]]]],["wm-navigator",[[1,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"isTabbing":[32],"itemIndexToFocus":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]]]]],["wm-network-uploader",[[1,"wm-network-uploader",{"getPath":[1,"get-path"],"requestUploadPath":[1,"request-upload-path"],"uploadPath":[1,"upload-path"],"requestDownloadPath":[1,"request-download-path"],"deletePath":[1,"delete-path"],"associatedData":[1,"associated-data"],"buttonText":[1,"button-text"],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1026,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"isTabbing":[32],"fileList":[32],"inProgressList":[32],"errorList":[32],"notif":[32],"snackbar":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"],[0,"userFinishedSnack","handleFinishedSnack"]]]]],["wm-navigation_3",[[1,"wm-navigation",{"open":[1540],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]]],[1,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"tooltipVisible":[1028,"tooltip-visible"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[1,"wm-navigation-item",{"href":[1],"text":[1],"active":[4],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["wm-progress-indicator_3",[[1,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"isTabbing":[32],"mode":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]]],[1,"wm-progress-monitor",{"breakpoint":[8]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["wm-action-menu_2",[[1,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonType":[1,"button-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[4,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"focused":[4],"icon":[1025],"description":[1],"isKeying":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]]]]],["wm-chart",[[1,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"valueFormat":[1,"value-format"],"showValues":[1,"show-values"],"showLegend":[4,"show-legend"],"notStartedColor":[4,"not-started-color"],"labelPosition":[1,"label-position"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[9,"resize","handleResize"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["wm-datepicker",[[1,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1025,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1025,"label-position"],"label":[1025],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"displayError":[32]},[[0,"keydown","handleTabbingOn"],[0,"click","handleTabbingOff"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"]]]]],["wm-modal-footer",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]},[[4,"focusLastElement","focusLastEl"]]]]],["wm-modal-header",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]},[[4,"focusFirstElement","focusFirstEl"]]]]],["wm-search",[[1,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]]]]],["wm-uploader",[[1,"wm-uploader",{"uploaderType":[1025,"uploader-type"],"type":[1],"buttonText":[1,"button-text"],"info":[1],"emptyStateText":[1,"empty-state-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1026,"max-size"],"maxFiles":[2,"max-files"],"sortBy":[1,"sort-by"],"files":[1],"filesToUpload":[16],"rejectedFiles":[1,"rejected-files"],"isTabbing":[32],"errorList":[32],"notif":[32],"numFilesInProgress":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmUploadProgress","handleUploadProgress"]]]]],["wm-chart-slice",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["wm-input",[[1,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1537],"disabled":[516],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"preventValidation":[1,"prevent-validation"],"type":[1],"step":[2],"min":[2],"max":[2],"announcement":[32],"displayedErrorMessage":[32]}]]],["wm-modal",[[0,"wm-modal",{"open":[1540],"isOpen":[1540,"is-open"],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"isTypeDialog":[516,"is-type-dialog"],"uid":[1537],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},[[0,"click","handleClick"],[0,"keydown","closeModalOnEscape"]]]]],["wm-pagination",[[1,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeViewport":[4,"is-large-viewport"],"isTabbing":[32],"srAnnouncement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"resize","handleResize"]]]]],["wm-tag-input",[[1,"wm-tag-input",{"label":[1],"labelPosition":[1,"label-position"],"options":[1025],"selectedTags":[1537,"selected-tags"],"info":[1],"addNew":[4,"add-new"],"placeholder":[1025],"characterLimit":[2,"character-limit"],"maxTags":[2,"max-tags"],"focusedListItem":[32],"focusedTag":[32],"isExpanded":[32],"tagsList":[32],"optionsList":[32],"charCount":[32],"liveRegionMessage":[32]},[[4,"click","closeIfNotElOrChild"],[9,"resize","handleResize"]]]]],["wm-timepicker",[[1,"wm-timepicker",{"disabled":[4],"value":[1537],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preventValidation":[1,"prevent-validation"],"selectedOption":[32],"isExpanded":[32],"isTabbing":[32],"displayedErrorMessage":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKey"]]]]],["wm-toggletip",[[1,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipText":[1,"tooltip-text"],"tooltipPosition":[1537,"tooltip-position"],"isOpen":[32],"isTabbing":[32]},[[0,"keydown","handleKeydown"],[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"click","handleClick"]]]]],["wm-wrapper",[[0,"wm-wrapper"]]],["priv-datepicker",[[0,"priv-datepicker",{"disabled":[4],"isExpanded":[1540,"is-expanded"],"view":[1537],"date":[1040],"selectedYear":[1026,"selected-year"],"selectedMonth":[1026,"selected-month"],"selectedDay":[1026,"selected-day"],"monthInFocus":[1026,"month-in-focus"],"yearInFocus":[1026,"year-in-focus"],"dayInFocus":[1026,"day-in-focus"],"parentId":[1537,"parent-id"],"monthNumInFocus":[32],"isTabbing":[32]},[[0,"keydown","handleKey"],[0,"keydown","toggleTabbingOn"],[9,"mousedown","toggleTabbingOff"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"]]]]],["priv-navigator-button",[[1,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"],"isTabbing":[1028,"is-tabbing"]}]]],["priv-navigator-item",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["wm-snackbar",[[1,"wm-snackbar",{"notifications":[1537]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]]]]],["wm-option_2",[[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]]],[1,"wm-select",{"disabled":[516],"invalid":[1028],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"placeholder":[1],"allSelectedMessage":[1,"all-selected-message"],"isTabbing":[32],"isExpanded":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstItem"],[0,"wmEndKeyPressed","moveToLastItem"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"],[0,"wmLetterPressed","findAndFocusItem"]]]]],["priv-chart-popover",[[0,"priv-chart-popover",{"sliceRef":[16],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"buttonText":[1,"button-text"],"open":[1028],"coords":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]]]]],["wm-button",[[1,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"buttonStyle":[1025,"button-style"],"icon":[1537],"iconSize":[1,"icon-size"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"tooltipVisible":[1028,"tooltip-visible"],"adjustedTooltipPosition":[32],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[9,"scroll","handleScroll"],[0,"keydown","handleKeydown"]]]]]]'),e)}));
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-7603f98e.js";import{n as shouldShiftRight,g as generateId,l as shouldOpenUp,q as getTextDir}from"./functions-e552a8b5.js";import{g as getIconCodeFromName}from"./interfaces-61c6305b.js";var wmActionMenuCss=":host{position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:#575195;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);-moz-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:#fff;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}";var ActionMenu=function(){function e(e){registerInstance(this,e);this.wmActionMenuLoaded=createEvent(this,"wmActionMenuLoaded",7);this.menuLoaded=createEvent(this,"menuLoaded",7);this.openUp=false;this.isExpanded=false;this.actionMenuType=null;this.buttonType=null;this.disabled=false;this.keysSoFar="";this.searchIndex=0;this.keyClear=null}Object.defineProperty(e.prototype,"horizontalPosition",{get:function(){return!!this.el&&!!this.itemsEl&&shouldShiftRight(this.el,this.itemsEl)?"right":"left"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-menuitem"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempActionMenuType",{get:function(){return this.actionMenuType||this.buttonType||"icon"},enumerable:false,configurable:true});e.prototype.handleClickedItem=function(){this.close()};e.prototype.handleKeyUp=function(e){this.moveUp(e.target)};e.prototype.handleKeyDown=function(e){this.moveDown(e.detail)};e.prototype.handleHomeKey=function(){this.focusFirstItem()};e.prototype.handleEndKey=function(){this.focusLastItem()};e.prototype.handleTabKey=function(){if(this.isExpanded){this.close()}};e.prototype.handleEscKey=function(){this.close();this.wmButtonEl.focus()};e.prototype.handleClick=function(e){var t=e.target===this.el||this.el.contains(e.target);if(!t&&this.isExpanded){this.close()}};e.prototype.handleKey=function(e){var t=this;switch(e.key){case"ArrowDown":if(!this.isExpanded){e.preventDefault();this.open();window.requestAnimationFrame((function(){return t.focusFirstItem()}))}break;case"ArrowUp":if(!this.isExpanded){e.preventDefault();this.open();window.requestAnimationFrame((function(){return t.focusLastItem()}))}break}};e.prototype.handleMenuitemBlur=function(e){var t=e.detail.relatedTarget===this.el||this.el.contains(e.detail.relatedTarget);if(!t){var i=new CustomEvent("blur");i.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(i)}};e.prototype.handleButtonBlur=function(e){var t=e.relatedTarget===this.el||this.el.contains(e.relatedTarget);if(t){e.stopPropagation()}};e.prototype.componentWillLoad=function(){this.uid=this.el.id?this.el.id:generateId();this.el.focus=function(){if(!this.disabled){var e=this.shadowRoot.querySelector("wm-button");e&&e.focus()}};if(this.buttonType){console.warn("wm-action-menu: button-type has been deprecated as of v3.1.0. Please use action-menu-type instead.")}};e.prototype.componentDidLoad=function(){if(this.childItems.length===0){console.error("wm-action-menu should have wm-menuitem elements as children")}else{this.focusFirstItem()}if(this.tempActionMenuType!=="icon"&&!this.buttonText){console.error("wm-action-menu should have a valid button-text property when button-type is set to 'text' or 'selector'")}if(this.tempActionMenuType==="icon"&&!this.tooltip){console.error("wm-action-menu should have a valid tooltip when button-type is set to 'icon'")}this.wmActionMenuLoaded.emit();this.menuLoaded.emit()};e.prototype.moveUp=function(e){var t=this.childItems.indexOf(e);if(t===0){this.focusLastItem()}else{this.focusItem(this.childItems[t-1])}};e.prototype.moveDown=function(e){var t=this.childItems.indexOf(e);if(t===this.childItems.length-1){this.focusFirstItem()}else{this.focusItem(this.childItems[t+1])}};e.prototype.open=function(){var e=this;if(!this.disabled){this.openUp=shouldOpenUp(this.el,this.itemsEl);this.isExpanded=true;this.itemsEl.classList.remove("hidden");window.requestAnimationFrame((function(){return e.focusFirstItem()}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;this.childItems.forEach((function(e){return e.focused=false}));window.setTimeout((function(){t.itemsEl.classList.add("hidden")}),150);window.setTimeout((function(){if(e&&(document.activeElement.tagName==="BODY"||document.activeElement.tagName==="WM-MENUITEM")){t.wmButtonEl.focus()}}),250)};e.prototype.focusItem=function(e){this.childItems.map((function(t){return t.focused=t===e}));e.focus&&e.focus()};e.prototype.focusFirstItem=function(){this.focusItem(this.childItems[0])};e.prototype.focusLastItem=function(){this.focusItem(this.childItems[this.childItems.length-1])};e.prototype.findAndFocusItem=function(e){var t=e.detail.toUpperCase();this.focusFirstItem();if(!this.keysSoFar){for(var i=0;i<this.childItems.length;i++){if(this.childItems[i]===document.activeElement){this.searchIndex=i}}}this.keysSoFar+=t;this.clearKeysSoFarAfterDelay();var n=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!n){n=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(n){this.focusItem(n)}};e.prototype.clearKeysSoFarAfterDelay=function(){if(this.keyClear){window.clearTimeout(this.keyClear);this.keyClear=null}this.keyClear=window.setTimeout(function(){this.keysSoFar="";this.keyClear=null}.bind(this),500)};e.prototype.findMatchInRange=function(e,t,i){for(var n=t;n<i;n++){var o=e[n].innerText;if(o&&o.toUpperCase().indexOf(this.keysSoFar)===0){return e[n]}}return null};e.prototype.render=function(){var e=this;return h(Host,{onBlur:function(){return e.close(false)}},h("div",{class:getTextDir()},h("wm-button",{"button-type":"".concat(this.tempActionMenuType,"only"),tooltip:this.tooltip,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:this.tempActionMenuType==="icon"?"f1d9":"",id:"menubtn-".concat(this.uid),onClick:function(){return e.isExpanded?e.close():e.open()},onBlur:function(t){return e.handleButtonBlur(t)},disabled:this.disabled,ref:function(t){return e.wmButtonEl=t},"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":"menu-".concat(this.uid)},this.buttonText),h("div",{class:"dropdown ".concat(this.openUp?"open-up":""," ").concat(this.horizontalPosition," ").concat(this.isExpanded?"open":""," hidden"),id:"menu-".concat(this.uid),tabindex:-1,role:"menu",ref:function(t){return e.itemsEl=t}},h("slot",null))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ActionMenu.style=wmActionMenuCss;var wmMenuitemCss=':host,wm-menuitem{contain:content;font-family:inherit}:host .wrapper,wm-menuitem .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:#fff;font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid rgba(46, 27, 70, 0.05);color:#575195;font-weight:700}:host .wrapper:focus,:host .wrapper.focus,wm-menuitem .wrapper:focus,wm-menuitem .wrapper.focus{outline:none;background:#f4f3f6}:host .wrapper:hover,wm-menuitem .wrapper:hover{background:#f4f3f6;outline:none}:host .wrapper .description,wm-menuitem .wrapper .description{color:#4a4a4a;font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper[aria-disabled=true],wm-menuitem .wrapper[aria-disabled=true]{font-style:italic;color:#6b6b6b}:host .wrapper:not(:last-child),wm-menuitem .wrapper:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host ::slotted,wm-menuitem ::slotted{font-family:inherit}:host .mdi,wm-menuitem .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}:host(:focus),wm-menuitem:focus{outline:none;background:#f4f3f6}:host([aria-disabled=true]),wm-menuitem[aria-disabled=true]{pointer-events:none}';var Menuitem=function(){function e(e){registerInstance(this,e);this.wmMenuitemClicked=createEvent(this,"wmMenuitemClicked",7);this.wmKeyUpPressed=createEvent(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=createEvent(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=createEvent(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=createEvent(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=createEvent(this,"wmEndKeyPressed",7);this.wmPageDownItems=createEvent(this,"wmPageDownItems",7);this.wmPageUpItems=createEvent(this,"wmPageUpItems",7);this.wmTabKeyPressed=createEvent(this,"wmTabKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmMenuitemBlurred=createEvent(this,"wmMenuitemBlurred",7);this.disabled=false;this.focused=false;this.icon=undefined;this.description=undefined;this.descriptionCharLimit=100;this.isKeying=false}e.prototype.toggleKeyingOn=function(){this.isKeying=true};e.prototype.toggleKeyingOff=function(){this.isKeying=false};e.prototype.handleKeydown=function(e){var t=e.altKey||e.ctrlKey||e.metaKey;var i=/^.$/.test(e.key);var n=i&&!t;switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":e.preventDefault();if(!this.disabled){this.el.click()}break;case"Escape":e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":e.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":e.preventDefault();this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:if(n){e.preventDefault();this.wmLetterPressed.emit(e.key)}}};e.prototype.handleClick=function(){if(!this.disabled){this.wmMenuitemClicked.emit()}};e.prototype.handleBlur=function(e){this.wmMenuitemBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.setOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.componentWillLoad=function(){if(this.icon){this.icon=getIconCodeFromName(this.icon)}if(this.description){if(this.description.length>this.descriptionCharLimit){console.error("wm-menuitem description is above the character limit of ".concat(this.descriptionCharLimit))}if(this.icon){console.error("wm-menuitems with descriptions do not support the use of icons")}}this.setOnClick()};e.prototype.componentDidLoad=function(){if(this.icon){this.iconEl.classList.add("mdi");this.iconEl.innerHTML="&#x".concat(this.icon,";")}};e.prototype.render=function(){var e=this;return h(Host,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},h("div",{class:"wrapper ".concat(this.focused&&this.isKeying?"focus":""),"aria-disabled":this.disabled?"true":null},h("span",{ref:function(t){return e.iconEl=t}}),h("slot",null),this.description?h("div",{class:"description"},this.description):""))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["setOnClick"]}},enumerable:false,configurable:true});return e}();Menuitem.style=wmMenuitemCss;export{ActionMenu as wm_action_menu,Menuitem as wm_menuitem};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-d649a861.js";import{n as shouldShiftRight,g as generateId,l as shouldOpenUp,q as getTextDir}from"./functions-117d1a51.js";import{g as getIconCodeFromName}from"./interfaces-2b97fab2.js";var wmActionMenuCss=":host{position:relative;display:inline-block;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;color:#575195;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);-moz-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:#fff;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}";var ActionMenu=function(){function e(e){registerInstance(this,e);this.wmActionMenuLoaded=createEvent(this,"wmActionMenuLoaded",7);this.menuLoaded=createEvent(this,"menuLoaded",7);this.openUp=false;this.isExpanded=false;this.actionMenuType=null;this.buttonType=null;this.disabled=false;this.keysSoFar="";this.searchIndex=0;this.keyClear=null}Object.defineProperty(e.prototype,"horizontalPosition",{get:function(){return!!this.el&&!!this.itemsEl&&shouldShiftRight(this.el,this.itemsEl)?"right":"left"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-menuitem"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempActionMenuType",{get:function(){return this.actionMenuType||this.buttonType||"icon"},enumerable:false,configurable:true});e.prototype.handleClickedItem=function(){this.close()};e.prototype.handleKeyUp=function(e){this.moveUp(e.target)};e.prototype.handleKeyDown=function(e){this.moveDown(e.detail)};e.prototype.handleHomeKey=function(){this.focusFirstItem()};e.prototype.handleEndKey=function(){this.focusLastItem()};e.prototype.handleTabKey=function(){if(this.isExpanded){this.close()}};e.prototype.handleEscKey=function(){this.close();this.wmButtonEl.focus()};e.prototype.handleClick=function(e){var t=e.target===this.el||this.el.contains(e.target);if(!t&&this.isExpanded){this.close()}};e.prototype.handleKey=function(e){var t=this;switch(e.key){case"ArrowDown":if(!this.isExpanded){e.preventDefault();this.open();window.requestAnimationFrame((function(){return t.focusFirstItem()}))}break;case"ArrowUp":if(!this.isExpanded){e.preventDefault();this.open();window.requestAnimationFrame((function(){return t.focusLastItem()}))}break}};e.prototype.handleMenuitemBlur=function(e){var t=e.detail.relatedTarget===this.el||this.el.contains(e.detail.relatedTarget);if(!t){var i=new CustomEvent("blur");i.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(i)}};e.prototype.handleButtonBlur=function(e){var t=e.relatedTarget===this.el||this.el.contains(e.relatedTarget);if(t){e.stopPropagation()}};e.prototype.componentWillLoad=function(){this.uid=this.el.id?this.el.id:generateId();this.el.focus=function(){if(!this.disabled){var e=this.shadowRoot.querySelector("wm-button");e&&e.focus()}};if(this.buttonType){console.warn("wm-action-menu: button-type has been deprecated as of v3.1.0. Please use action-menu-type instead.")}};e.prototype.componentDidLoad=function(){if(this.childItems.length===0){console.error("wm-action-menu should have wm-menuitem elements as children")}else{this.focusFirstItem()}if(this.tempActionMenuType!=="icon"&&!this.buttonText){console.error("wm-action-menu should have a valid button-text property when button-type is set to 'text' or 'selector'")}if(this.tempActionMenuType==="icon"&&!this.tooltip){console.error("wm-action-menu should have a valid tooltip when button-type is set to 'icon'")}this.wmActionMenuLoaded.emit();this.menuLoaded.emit()};e.prototype.moveUp=function(e){var t=this.childItems.indexOf(e);if(t===0){this.focusLastItem()}else{this.focusItem(this.childItems[t-1])}};e.prototype.moveDown=function(e){var t=this.childItems.indexOf(e);if(t===this.childItems.length-1){this.focusFirstItem()}else{this.focusItem(this.childItems[t+1])}};e.prototype.open=function(){var e=this;if(!this.disabled){this.openUp=shouldOpenUp(this.el,this.itemsEl);this.isExpanded=true;this.itemsEl.classList.remove("hidden");window.requestAnimationFrame((function(){return e.focusFirstItem()}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;this.childItems.forEach((function(e){return e.focused=false}));window.setTimeout((function(){t.itemsEl.classList.add("hidden")}),150);window.setTimeout((function(){if(e&&(document.activeElement.tagName==="BODY"||document.activeElement.tagName==="WM-MENUITEM")){t.wmButtonEl.focus()}}),250)};e.prototype.focusItem=function(e){this.childItems.map((function(t){return t.focused=t===e}));e.focus&&e.focus()};e.prototype.focusFirstItem=function(){this.focusItem(this.childItems[0])};e.prototype.focusLastItem=function(){this.focusItem(this.childItems[this.childItems.length-1])};e.prototype.findAndFocusItem=function(e){var t=e.detail.toUpperCase();this.focusFirstItem();if(!this.keysSoFar){for(var i=0;i<this.childItems.length;i++){if(this.childItems[i]===document.activeElement){this.searchIndex=i}}}this.keysSoFar+=t;this.clearKeysSoFarAfterDelay();var n=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!n){n=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(n){this.focusItem(n)}};e.prototype.clearKeysSoFarAfterDelay=function(){if(this.keyClear){window.clearTimeout(this.keyClear);this.keyClear=null}this.keyClear=window.setTimeout(function(){this.keysSoFar="";this.keyClear=null}.bind(this),500)};e.prototype.findMatchInRange=function(e,t,i){for(var n=t;n<i;n++){var o=e[n].innerText;if(o&&o.toUpperCase().indexOf(this.keysSoFar)===0){return e[n]}}return null};e.prototype.render=function(){var e=this;return h(Host,{onBlur:function(){return e.close(false)}},h("div",{class:getTextDir()},h("wm-button",{"button-type":this.tempActionMenuType+"only",tooltip:this.tooltip,"label-for-identical-buttons":this.labelForIdenticalButtons,icon:this.tempActionMenuType==="icon"?"f1d9":"",id:"menubtn-"+this.uid,onClick:function(){return e.isExpanded?e.close():e.open()},onBlur:function(t){return e.handleButtonBlur(t)},disabled:this.disabled,ref:function(t){return e.wmButtonEl=t},"tooltip-position":this.tooltipPosition||this.horizontalPosition,"aria-haspopup":"true","aria-expanded":this.isExpanded?"true":"false","aria-controls":"menu-"+this.uid},this.buttonText),h("div",{class:"dropdown "+(this.openUp?"open-up":"")+" "+this.horizontalPosition+" "+(this.isExpanded?"open":"")+" hidden",id:"menu-"+this.uid,tabindex:-1,role:"menu",ref:function(t){return e.itemsEl=t}},h("slot",null))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ActionMenu.style=wmActionMenuCss;var wmMenuitemCss=':host,wm-menuitem{contain:content;font-family:inherit}:host .wrapper,wm-menuitem .wrapper{display:block;min-width:8.75rem;cursor:pointer;padding:1.25rem;border-radius:0px 0px 0px 0px;background:#fff;font-family:inherit;font-weight:500;list-style:none;border-bottom:2px solid rgba(46, 27, 70, 0.05);color:#575195;font-weight:700}:host .wrapper:focus,:host .wrapper.focus,wm-menuitem .wrapper:focus,wm-menuitem .wrapper.focus{outline:none;background:#f4f3f6}:host .wrapper:hover,wm-menuitem .wrapper:hover{background:#f4f3f6;outline:none}:host .wrapper .description,wm-menuitem .wrapper .description{color:#4a4a4a;font-size:0.875rem;padding-top:0.5rem;white-space:normal;font-weight:400}:host .wrapper[aria-disabled=true],wm-menuitem .wrapper[aria-disabled=true]{font-style:italic;color:#6b6b6b}:host .wrapper:not(:last-child),wm-menuitem .wrapper:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host ::slotted,wm-menuitem ::slotted{font-family:inherit}:host .mdi,wm-menuitem .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}:host(:focus),wm-menuitem:focus{outline:none;background:#f4f3f6}:host([aria-disabled=true]),wm-menuitem[aria-disabled=true]{pointer-events:none}';var Menuitem=function(){function e(e){registerInstance(this,e);this.wmMenuitemClicked=createEvent(this,"wmMenuitemClicked",7);this.wmKeyUpPressed=createEvent(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=createEvent(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=createEvent(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=createEvent(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=createEvent(this,"wmEndKeyPressed",7);this.wmPageDownItems=createEvent(this,"wmPageDownItems",7);this.wmPageUpItems=createEvent(this,"wmPageUpItems",7);this.wmTabKeyPressed=createEvent(this,"wmTabKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmMenuitemBlurred=createEvent(this,"wmMenuitemBlurred",7);this.disabled=false;this.focused=false;this.icon=undefined;this.description=undefined;this.descriptionCharLimit=100;this.isKeying=false}e.prototype.toggleKeyingOn=function(){this.isKeying=true};e.prototype.toggleKeyingOff=function(){this.isKeying=false};e.prototype.handleKeydown=function(e){var t=e.altKey||e.ctrlKey||e.metaKey;var i=/^.$/.test(e.key);var n=i&&!t;switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":e.preventDefault();if(!this.disabled){this.el.click()}break;case"Escape":e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":e.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":e.preventDefault();this.wmEndKeyPressed.emit();break;case"Tab":this.wmTabKeyPressed.emit();break;default:if(n){e.preventDefault();this.wmLetterPressed.emit(e.key)}}};e.prototype.handleClick=function(){if(!this.disabled){this.wmMenuitemClicked.emit()}};e.prototype.handleBlur=function(e){this.wmMenuitemBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.setOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.componentWillLoad=function(){if(this.icon){this.icon=getIconCodeFromName(this.icon)}if(this.description){if(this.description.length>this.descriptionCharLimit){console.error("wm-menuitem description is above the character limit of "+this.descriptionCharLimit)}if(this.icon){console.error("wm-menuitems with descriptions do not support the use of icons")}}this.setOnClick()};e.prototype.componentDidLoad=function(){if(this.icon){this.iconEl.classList.add("mdi");this.iconEl.innerHTML="&#x"+this.icon+";"}};e.prototype.render=function(){var e=this;return h(Host,{tabindex:-1,role:"menuitem","aria-disabled":this.disabled?"true":null},h("div",{class:"wrapper "+(this.focused&&this.isKeying?"focus":""),"aria-disabled":this.disabled?"true":null},h("span",{ref:function(t){return e.iconEl=t}}),h("slot",null),this.description?h("div",{class:"description"},this.description):""))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["setOnClick"]}},enumerable:false,configurable:true});return e}();Menuitem.style=wmMenuitemCss;export{ActionMenu as wm_action_menu,Menuitem as wm_menuitem};
@@ -1 +1 @@
1
- import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement}from"./index-7603f98e.js";import{g as getIconCodeFromName}from"./interfaces-61c6305b.js";import{g as generateId,t as toBool,a as adjustTooltipPosition}from"./functions-e552a8b5.js";var wmButtonCss=':host .wm-button,wm-button .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:inherit;border:2px solid #575195;color:#575195;font-family:inherit;font-size:0.75rem;font-weight:700;height:2.75rem;padding:0 1.3333333333em;cursor:pointer;position:relative;background:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button,wm-button .wm-button{height:3.3333333333em}}:host .wm-button.nowrap,wm-button .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,wm-button .wm-button:focus{outline:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner,wm-button .wm-button::-moz-focus-inner{border:0;outline:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) :host .wm-button.-textonly .button-text,wm-button .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) :host .wm-button.-textonly .button-text,:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) wm-button .wm-button.-textonly .button-text,wm-button .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) wm-button .wm-button.-textonly .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled),wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark),wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner,wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled),wm-button .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled){background:transparent;border:2px solid #fff;color:#fff}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover,wm-button .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark,wm-button .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;outline:none}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption),wm-button .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-button:hover:not(:disabled):not(.disabled),wm-button .wm-button:hover:not(:disabled):not(.disabled){background:#464177;color:#fff}:host .wm-button .mdi,wm-button .wm-button .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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi,wm-button .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi,wm-button .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly),wm-button .wm-button.-primary:not(.-textonly){background:#575195;color:#fff}:host .wm-button.-primary:not(.-textonly):not(:focus),wm-button .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled),wm-button .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:#464177}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled),wm-button .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:#575195;background:#fff;border:2px solid #fff}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover,wm-button .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.-textonly,wm-button .wm-button.-textonly{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1}:host .wm-button.-textonly+.-textonly,wm-button .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus,wm-button .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner,wm-button .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text,wm-button .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text,wm-button .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, #fff), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #fff 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small,wm-button .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete),wm-button .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline;color:#454077}:host .wm-button.-textonly.-permanentlydelete,wm-button .wm-button.-textonly.-permanentlydelete{color:#c0392b}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled),wm-button .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled){text-decoration:underline;color:#c0392b !important}:host .wm-button.-textonly.dark,wm-button .wm-button.-textonly.dark{color:#fff}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled),wm-button .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline;color:#fff !important}:host .wm-button.-icononly,wm-button .wm-button.-icononly,:host .wm-button.-navigational,wm-button .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),wm-button .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus),wm-button .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,wm-button .wm-button.-icononly,:host .wm-button.-navigational,wm-button .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly,wm-button .wm-button.-icononly{border-width:1px !important}:host .wm-button.-icononly:before,wm-button .wm-button.-icononly: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}:host .wm-button.-navigational,wm-button .wm-button.-navigational{border:none !important;background-color:transparent}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled),wm-button .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:#575195}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,wm-button .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected,wm-button .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:#d7d6d9}:host .wm-button.-navigational:before,wm-button .wm-button.-navigational: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}:host .wm-button.-permanentlydelete:not(.-textonly),wm-button .wm-button.-permanentlydelete:not(.-textonly){background:#c0392b;border-color:#c0392b;color:#fff}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled),wm-button .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled){background:#9a2e22;border-color:#9a2e22}:host .wm-button.-pairnegative,wm-button .wm-button.-pairnegative{background:#cc4c3e;border-color:#cc4c3e;color:#fff}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled),wm-button .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:#a33d32;border-color:#a33d32}:host .wm-button.-pairpositive,wm-button .wm-button.-pairpositive{background:#15868d;border-color:#15868d;color:#fff}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled),wm-button .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:#116b71;border-color:#116b71}:host .wm-button.-selectoronly,wm-button .wm-button.-selectoronly{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;background:transparent;border:1px solid #575195;border-radius:3px 3px 3px 3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;color:#575195;font-weight:500;font-size:0.875rem;text-transform:none;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selectoronly,wm-button .wm-button.-selectoronly{height:2.5rem}}:host .wm-button.-selectoronly:before,wm-button .wm-button.-selectoronly:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}:host .wm-button.-selectoronly:hover:not(:disabled):not(.disabled),wm-button .wm-button.-selectoronly:hover:not(:disabled):not(.disabled){background:transparent;text-decoration:none}:host .wm-button.-selectoronly:active,wm-button .wm-button.-selectoronly:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selectoronly::-moz-focus-inner,wm-button .wm-button.-selectoronly::-moz-focus-inner{border:0}:host .wm-button.-selectoronly .overflowcontrol,wm-button .wm-button.-selectoronly .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button:disabled,wm-button .wm-button:disabled,:host .wm-button.disabled,wm-button .wm-button.disabled{background:inherit;border-color:#737373;color:#737373;cursor:default;pointer-events:none}:host .wm-button:disabled.dark,wm-button .wm-button:disabled.dark,:host .wm-button.disabled.dark,wm-button .wm-button.disabled.dark{color:#a6a6a6;border-color:#a6a6a6}:host .wm-button:disabled.-primary,wm-button .wm-button:disabled.-primary,:host .wm-button:disabled.-permanentlydelete,wm-button .wm-button:disabled.-permanentlydelete,:host .wm-button:disabled.-pairnegative,wm-button .wm-button:disabled.-pairnegative,:host .wm-button:disabled.-pairpositive,wm-button .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-primary,wm-button .wm-button.disabled.-primary,:host .wm-button.disabled.-permanentlydelete,wm-button .wm-button.disabled.-permanentlydelete,:host .wm-button.disabled.-pairnegative,wm-button .wm-button.disabled.-pairnegative,:host .wm-button.disabled.-pairpositive,wm-button .wm-button.disabled.-pairpositive{background:#737373;color:#fff;border-color:#737373}:host .wm-button:disabled.-primary.dark,wm-button .wm-button:disabled.-primary.dark,:host .wm-button.disabled.-primary.dark,wm-button .wm-button.disabled.-primary.dark{background:#a6a6a6;border-color:#a6a6a6;color:#353b48}:host .wm-button:disabled.-secondary,wm-button .wm-button:disabled.-secondary,:host .wm-button.disabled.-secondary,wm-button .wm-button.disabled.-secondary{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button:disabled.-selectoronly,wm-button .wm-button:disabled.-selectoronly,:host .wm-button.disabled.-selectoronly,wm-button .wm-button.disabled.-selectoronly{color:#737373}:host .wm-button:disabled.-textonly,wm-button .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly,wm-button .wm-button.disabled.-textonly{color:#6b6b6b;background:transparent}:host a.wm-button,wm-button a.wm-button,:host label.wm-button,wm-button label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host([disabled]),:host(.button-disabled){pointer-events:none}:host([disabled=false]){pointer-events:initial}:host,wm-button{display:inline-block;position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .sr-only,wm-button .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 Button=function(){function t(t){registerInstance(this,t);this.disabled=false;this.buttonType=null;this.buttonStyle=null;this.tooltipPosition="bottom-right";this.adjustedTooltipPosition=this.tooltipPosition;this.permanentlyDelete=false;this.textWrap=true;this.tooltipVisible=false;this.isTabbing=false;this.id=generateId();this.ariaPopup=false}Object.defineProperty(t.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tempButtonType",{get:function(){return this.buttonType||this.buttonStyle||"secondary"},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isTruncated",{get:function(){return!!this.buttonEl&&this.buttonEl.offsetWidth<this.buttonEl.scrollWidth},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"hasTooltip",{get:function(){return this.tempButtonType==="icononly"||this.tempButtonType==="navigational"||this.isTruncated},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tooltipEl",{get:function(){return document.getElementById("wm-tooltip")},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleScroll=function(){if(this.tooltipVisible){this.hideTooltip()}};t.prototype.validateType=function(t){var o=["primary","secondary","textonly","icononly","navigational","selectoronly","pairpositive","pairnegative"].includes(t);if(!o){this.buttonType="secondary"}this.validateIcon()};t.prototype.validateDeprecatedType=function(t){var o=["primary","secondary","textonly","icononly","navigational","selectoronly"].includes(t);if(!o){this.buttonStyle="secondary"}this.validateIcon()};t.prototype.updateIcon=function(){this.icon=getIconCodeFromName(this.icon)};t.prototype.validateIcon=function(){switch(this.tempButtonType){case"icononly":case"navigational":if(!this.icon){console.error("wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.")}if(!this.tooltip){console.error("wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.")}break;case"pairpositive":this.icon="f12c";break;case"pairnegative":this.icon="f739";break}};t.prototype.handleKeydown=function(t){switch(t.key){case"Enter":t.preventDefault();if(!this.isDisabled){this.el.click()}break}};t.prototype.componentWillLoad=function(){if(this.buttonStyle){console.warn("wm-button: button-style has been deprecated as of v3.1.0. Please use button-type instead.")}this.validateType(this.tempButtonType);this.el.focus=function(){var t=this;if(!this.disabled){this.shadowRoot.querySelector("button").focus();requestAnimationFrame((function(){t.tooltipVisible=false}))}};if(this.icon){this.icon=this.icon=getIconCodeFromName(this.icon)}};t.prototype.componentDidLoad=function(){if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}this.ariaPopup=!!this.el.getAttribute("aria-haspopup");forceUpdate(this.el)};t.prototype.showTooltip=function(){var t=this;if(this.hasTooltip){this.tooltipEl.textContent=this.isTruncated?this.el.textContent:this.tooltip;this.adjustedTooltipPosition=adjustTooltipPosition(this.tooltipPosition,this.buttonEl,this.tooltipEl);this.positionTooltip(this.adjustedTooltipPosition,this.tooltipEl);this.tooltipEl.style.transitionDelay="500ms";this.tooltipEl.style.opacity="1";setTimeout((function(){t.tooltipVisible=true}),500)}};t.prototype.positionTooltip=function(t,o){var n=o.getBoundingClientRect().height;var e=o.getBoundingClientRect().width;var i=(this.buttonEl.getBoundingClientRect().height-n)/2;var a=(this.buttonEl.getBoundingClientRect().width-e)/2;var r=this.buttonEl.getBoundingClientRect().top+i;var s=this.buttonEl.getBoundingClientRect().left+a;if(t.includes("top")){r=this.buttonEl.getBoundingClientRect().top-n-8}if(t.includes("bottom")){r=this.buttonEl.getBoundingClientRect().bottom+8}if(t.includes("left")){s=this.buttonEl.getBoundingClientRect().left-e-8}if(t.includes("right")){s=this.buttonEl.getBoundingClientRect().right+8}s=Math.max(s,24);o.style.top=(r/16).toString()+"rem";o.style.left=(s/16).toString()+"rem"};t.prototype.hideTooltip=function(){if(this.hasTooltip){this.tooltipEl.style.transitionDelay="0s";this.tooltipEl.style.opacity="0";this.tooltipVisible=false}};t.prototype.showTooltipForKeyboardUsers=function(){if(this.isTabbing){this.showTooltip()}};t.prototype.getClasses=function(){var t="wm-button";t+=this.permanentlyDelete?" -permanentlydelete":"";t+=this.tempButtonType?" -"+this.tempButtonType:" -secondary";t+=this.textWrap?"":" nowrap";t+=this.isTabbing?" user-is-tabbing":"";t+=this.isTruncated?" -truncated":"";t+=this.customBackground==="dark"?" dark":"";return t};t.prototype.getAriaLabel=function(){if(this.tempButtonType==="icononly"||this.tempButtonType==="navigational"){return this.labelForIdenticalButtons||this.tooltip}if(this.labelForIdenticalButtons){return this.labelForIdenticalButtons}};t.prototype.render=function(){var t=this;return h(Host,{class:this.isDisabled?"button-disabled":""},h("button",{id:this.id,class:"".concat(this.getClasses()),disabled:this.isDisabled,ref:function(o){return t.buttonEl=o},"aria-label":this.getAriaLabel(),"aria-hasPopup":this.ariaPopup?"menu":null,onMouseEnter:function(){return t.showTooltip()},onMouseLeave:function(){return t.hideTooltip()},onFocus:function(){return t.showTooltipForKeyboardUsers()},onBlur:function(){return t.hideTooltip()},onClick:function(){return t.hideTooltip()}},this.icon&&h("span",{class:"mdi",style:this.iconSize?{fontSize:this.iconSize}:{}},String.fromCodePoint(parseInt("0x".concat(this.icon)))),h("span",{class:"button-text"},h("slot",null))))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{buttonType:["validateType"],buttonStyle:["validateDeprecatedType"],icon:["updateIcon"]}},enumerable:false,configurable:true});return t}();Button.style=wmButtonCss;export{Button as wm_button};
1
+ import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement}from"./index-d649a861.js";import{g as getIconCodeFromName}from"./interfaces-2b97fab2.js";import{g as generateId,t as toBool,a as adjustTooltipPosition}from"./functions-117d1a51.js";var wmButtonCss='@charset "UTF-8";:host .wm-button,wm-button .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:inherit;border:2px solid #575195;color:#575195;font-family:inherit;font-size:0.75rem;font-weight:700;height:2.75rem;padding:0 1.3333333333em;cursor:pointer;position:relative;background:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button,wm-button .wm-button{height:3.3333333333em}}:host .wm-button.nowrap,wm-button .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,wm-button .wm-button:focus{outline:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner,wm-button .wm-button::-moz-focus-inner{border:0;outline:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) :host .wm-button.-textonly .button-text,wm-button .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) :host .wm-button.-textonly .button-text,:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) wm-button .wm-button.-textonly .button-text,wm-button .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) wm-button .wm-button.-textonly .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled),wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark),wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner,wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled),wm-button .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled){background:transparent;border:2px solid #fff;color:#fff}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover,wm-button .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark,wm-button .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;outline:none}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption),wm-button .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-button .mdi,wm-button .wm-button .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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi,wm-button .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi,wm-button .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly),wm-button .wm-button.-primary:not(.-textonly){background:#575195;color:#fff}:host .wm-button.-primary:not(.-textonly):not(:focus),wm-button .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled),wm-button .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:#464177}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled),wm-button .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:#575195;background:#fff;border:2px solid #fff}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover,wm-button .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled),wm-button .wm-button.-secondary:hover:not(:disabled):not(.disabled),:host .wm-button.-icononly:hover:not(:disabled):not(.disabled),wm-button .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:#464177;color:#fff}:host .wm-button.-textonly,wm-button .wm-button.-textonly{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1}:host .wm-button.-textonly+.-textonly,wm-button .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus,wm-button .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner,wm-button .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text,wm-button .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text,wm-button .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, #fff), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #fff 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small,wm-button .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete),wm-button .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete,wm-button .wm-button.-textonly.-permanentlydelete{color:#c0392b}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark),wm-button .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline;color:#c0392b !important}:host .wm-button.-textonly.dark,wm-button .wm-button.-textonly.dark{color:#fff}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled),wm-button .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline;color:#fff !important}:host .wm-button.-icononly,wm-button .wm-button.-icononly,:host .wm-button.-navigational,wm-button .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),wm-button .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus),wm-button .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,wm-button .wm-button.-icononly,:host .wm-button.-navigational,wm-button .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly,wm-button .wm-button.-icononly{border-width:1px !important}:host .wm-button.-icononly:before,wm-button .wm-button.-icononly: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}:host .wm-button.-navigational,wm-button .wm-button.-navigational{border:none !important;background-color:transparent}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled),wm-button .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:#575195}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,wm-button .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected,wm-button .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:#d7d6d9}:host .wm-button.-navigational:before,wm-button .wm-button.-navigational: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}:host .wm-button.-permanentlydelete:not(.-textonly),wm-button .wm-button.-permanentlydelete:not(.-textonly){background:#c0392b;border-color:#c0392b;color:#fff}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark),wm-button .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:#9a2e22;border-color:#9a2e22}:host .wm-button.-pairnegative,wm-button .wm-button.-pairnegative{background:#cc4c3e;border-color:#cc4c3e;color:#fff}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled),wm-button .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:#a33d32;border-color:#a33d32}:host .wm-button.-pairpositive,wm-button .wm-button.-pairpositive{background:#15868d;border-color:#15868d;color:#fff}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled),wm-button .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:#116b71;border-color:#116b71}:host .wm-button.-selectoronly,wm-button .wm-button.-selectoronly{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;background:transparent;border:1px solid #575195;border-radius:3px 3px 3px 3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;color:#575195;font-weight:500;font-size:0.875rem;text-transform:none;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selectoronly,wm-button .wm-button.-selectoronly{height:2.5rem}}:host .wm-button.-selectoronly:before,wm-button .wm-button.-selectoronly:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"";position:absolute;right:0.5625rem;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}:host .wm-button.-selectoronly:hover:not(:disabled):not(.disabled),wm-button .wm-button.-selectoronly:hover:not(:disabled):not(.disabled){background:transparent;text-decoration:none}:host .wm-button.-selectoronly:active,wm-button .wm-button.-selectoronly:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selectoronly::-moz-focus-inner,wm-button .wm-button.-selectoronly::-moz-focus-inner{border:0}:host .wm-button.-selectoronly .overflowcontrol,wm-button .wm-button.-selectoronly .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button:disabled,wm-button .wm-button:disabled,:host .wm-button.disabled,wm-button .wm-button.disabled{background:inherit;border-color:#737373;color:#737373;cursor:default;pointer-events:none}:host .wm-button:disabled.-primary,wm-button .wm-button:disabled.-primary,:host .wm-button:disabled.-permanentlydelete,wm-button .wm-button:disabled.-permanentlydelete,:host .wm-button:disabled.-pairnegative,wm-button .wm-button:disabled.-pairnegative,:host .wm-button:disabled.-pairpositive,wm-button .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-primary,wm-button .wm-button.disabled.-primary,:host .wm-button.disabled.-permanentlydelete,wm-button .wm-button.disabled.-permanentlydelete,:host .wm-button.disabled.-pairnegative,wm-button .wm-button.disabled.-pairnegative,:host .wm-button.disabled.-pairpositive,wm-button .wm-button.disabled.-pairpositive{background:#737373;color:#fff;border-color:#737373}:host .wm-button:disabled.-secondary,wm-button .wm-button:disabled.-secondary,:host .wm-button.disabled.-secondary,wm-button .wm-button.disabled.-secondary{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button:disabled.-selectoronly,wm-button .wm-button:disabled.-selectoronly,:host .wm-button.disabled.-selectoronly,wm-button .wm-button.disabled.-selectoronly{color:#737373}:host .wm-button:disabled.-textonly,wm-button .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly,wm-button .wm-button.disabled.-textonly{color:#6b6b6b;background:transparent}:host .wm-button:disabled.dark.-secondary:not(.-permanentlydelete),wm-button .wm-button:disabled.dark.-secondary:not(.-permanentlydelete),:host .wm-button:disabled.dark.-textonly,wm-button .wm-button:disabled.dark.-textonly,:host .wm-button:disabled.dark.-navigational,wm-button .wm-button:disabled.dark.-navigational,:host .wm-button:disabled.dark.-icononly,wm-button .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-secondary:not(.-permanentlydelete),wm-button .wm-button.disabled.dark.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.dark.-textonly,wm-button .wm-button.disabled.dark.-textonly,:host .wm-button.disabled.dark.-navigational,wm-button .wm-button.disabled.dark.-navigational,:host .wm-button.disabled.dark.-icononly,wm-button .wm-button.disabled.dark.-icononly{color:#b5b5b5;border-color:#b5b5b5}:host .wm-button:disabled.dark.-primary,wm-button .wm-button:disabled.dark.-primary,:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),wm-button .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-primary,wm-button .wm-button.disabled.dark.-primary,:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly),wm-button .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:#a6a6a6;border-color:#a6a6a6;color:#353b48}:host a.wm-button,wm-button a.wm-button,:host label.wm-button,wm-button label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host([disabled]),:host(.button-disabled){pointer-events:none}:host([disabled=false]){pointer-events:initial}:host,wm-button{display:inline-block;position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .sr-only,wm-button .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 Button=function(){function t(t){registerInstance(this,t);this.disabled=false;this.buttonType=null;this.buttonStyle=null;this.tooltipPosition="bottom-right";this.adjustedTooltipPosition=this.tooltipPosition;this.permanentlyDelete=false;this.textWrap=true;this.tooltipVisible=false;this.isTabbing=false;this.id=generateId();this.ariaPopup=false}Object.defineProperty(t.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tempButtonType",{get:function(){return this.buttonType||this.buttonStyle||"secondary"},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isTruncated",{get:function(){return!!this.buttonEl&&this.buttonEl.offsetWidth<this.buttonEl.scrollWidth},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"hasTooltip",{get:function(){return this.tempButtonType==="icononly"||this.tempButtonType==="navigational"||this.isTruncated},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"tooltipEl",{get:function(){return document.getElementById("wm-tooltip")},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleScroll=function(){if(this.tooltipVisible){this.hideTooltip()}};t.prototype.validateType=function(t){var o=["primary","secondary","textonly","icononly","navigational","selectoronly","pairpositive","pairnegative"].includes(t);if(!o){this.buttonType="secondary"}this.validateIcon()};t.prototype.validateDeprecatedType=function(t){var o=["primary","secondary","textonly","icononly","navigational","selectoronly"].includes(t);if(!o){this.buttonStyle="secondary"}this.validateIcon()};t.prototype.updateIcon=function(){this.icon=getIconCodeFromName(this.icon)};t.prototype.validateIcon=function(){switch(this.tempButtonType){case"icononly":case"navigational":if(!this.icon){console.error("wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.")}if(!this.tooltip){console.error("wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.")}break;case"pairpositive":this.icon="f12c";break;case"pairnegative":this.icon="f739";break}};t.prototype.handleKeydown=function(t){switch(t.key){case"Enter":t.preventDefault();if(!this.isDisabled){this.el.click()}break}};t.prototype.componentWillLoad=function(){if(this.buttonStyle){console.warn("wm-button: button-style has been deprecated as of v3.1.0. Please use button-type instead.")}this.validateType(this.tempButtonType);this.el.focus=function(){var t=this;if(!this.disabled){this.shadowRoot.querySelector("button").focus();requestAnimationFrame((function(){t.tooltipVisible=false}))}};if(this.icon){this.icon=this.icon=getIconCodeFromName(this.icon)}};t.prototype.componentDidLoad=function(){if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}this.ariaPopup=!!this.el.getAttribute("aria-haspopup");forceUpdate(this.el)};t.prototype.showTooltip=function(){var t=this;if(this.hasTooltip){this.tooltipEl.textContent=this.isTruncated?this.el.textContent:this.tooltip;this.adjustedTooltipPosition=adjustTooltipPosition(this.tooltipPosition,this.buttonEl,this.tooltipEl);this.positionTooltip(this.adjustedTooltipPosition,this.tooltipEl);this.tooltipEl.style.transitionDelay="500ms";this.tooltipEl.style.opacity="1";setTimeout((function(){t.tooltipVisible=true}),500)}};t.prototype.positionTooltip=function(t,o){var n=o.getBoundingClientRect().height;var e=o.getBoundingClientRect().width;var i=(this.buttonEl.getBoundingClientRect().height-n)/2;var a=(this.buttonEl.getBoundingClientRect().width-e)/2;var r=this.buttonEl.getBoundingClientRect().top+i;var s=this.buttonEl.getBoundingClientRect().left+a;if(t.includes("top")){r=this.buttonEl.getBoundingClientRect().top-n-8}if(t.includes("bottom")){r=this.buttonEl.getBoundingClientRect().bottom+8}if(t.includes("left")){s=this.buttonEl.getBoundingClientRect().left-e-8}if(t.includes("right")){s=this.buttonEl.getBoundingClientRect().right+8}s=Math.max(s,24);o.style.top=(r/16).toString()+"rem";o.style.left=(s/16).toString()+"rem"};t.prototype.hideTooltip=function(){if(this.hasTooltip){this.tooltipEl.style.transitionDelay="0s";this.tooltipEl.style.opacity="0";this.tooltipVisible=false}};t.prototype.showTooltipForKeyboardUsers=function(){if(this.isTabbing){this.showTooltip()}};t.prototype.getClasses=function(){var t="wm-button";t+=this.permanentlyDelete?" -permanentlydelete":"";t+=this.tempButtonType?" -"+this.tempButtonType:" -secondary";t+=this.textWrap?"":" nowrap";t+=this.isTabbing?" user-is-tabbing":"";t+=this.isTruncated?" -truncated":"";t+=this.customBackground==="dark"?" dark":"";return t};t.prototype.getAriaLabel=function(){if(this.tempButtonType==="icononly"||this.tempButtonType==="navigational"){return this.labelForIdenticalButtons||this.tooltip}if(this.labelForIdenticalButtons){return this.labelForIdenticalButtons}};t.prototype.render=function(){var t=this;return h(Host,{class:this.isDisabled?"button-disabled":""},h("button",{id:this.id,class:""+this.getClasses(),disabled:this.isDisabled,ref:function(o){return t.buttonEl=o},"aria-label":this.getAriaLabel(),"aria-hasPopup":this.ariaPopup?"menu":null,onMouseEnter:function(){return t.showTooltip()},onMouseLeave:function(){return t.hideTooltip()},onFocus:function(){return t.showTooltipForKeyboardUsers()},onBlur:function(){return t.hideTooltip()},onClick:function(){return t.hideTooltip()}},this.icon&&h("span",{class:"mdi",style:this.iconSize?{fontSize:this.iconSize}:{}},String.fromCodePoint(parseInt("0x"+this.icon))),h("span",{class:"button-text"},h("slot",null))))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{buttonType:["validateType"],buttonStyle:["validateDeprecatedType"],icon:["updateIcon"]}},enumerable:false,configurable:true});return t}();Button.style=wmButtonCss;export{Button as wm_button};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent}from"./index-7603f98e.js";var ChartSlice=function(){function t(t){registerInstance(this,t);this.wmChartSliceUpdated=createEvent(this,"wmChartSliceUpdated",7)}t.prototype.componentDidLoad=function(){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")}};t.prototype.componentDidUpdate=function(){this.wmChartSliceUpdated.emit()};return t}();export{ChartSlice as wm_chart_slice};
1
+ import{r as registerInstance,c as createEvent}from"./index-d649a861.js";var ChartSlice=function(){function t(t){registerInstance(this,t);this.wmChartSliceUpdated=createEvent(this,"wmChartSliceUpdated",7)}t.prototype.componentDidLoad=function(){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")}};t.prototype.componentDidUpdate=function(){this.wmChartSliceUpdated.emit()};return t}();export{ChartSlice as wm_chart_slice};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,n){function a(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,p){function o(e){try{s(n.next(e))}catch(e){p(e)}}function c(e){try{s(n["throw"](e))}catch(e){p(e)}}function s(e){e.done?t(e.value):a(e.value).then(o,c)}s((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},n,a,p,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(r){return s([e,r])}}function s(o){if(n)throw new TypeError("Generator is already executing.");while(t)try{if(n=1,a&&(p=o[0]&2?a["return"]:o[0]?a["throw"]||((p=a["return"])&&p.call(a),0):a.next)&&!(p=p.call(a,o[1])).done)return p;if(a=0,p)o=[o[0]&2,p.value];switch(o[0]){case 0:case 1:p=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(p=t.trys,p=p.length>0&&p[p.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!p||o[1]>p[0]&&o[1]<p[3])){t.label=o[1];break}if(o[0]===6&&t.label<p[1]){t.label=p[1];p=o;break}if(p&&t.label<p[2]){t.label=p[2];t.ops.push(o);break}if(p[2])t.ops.pop();t.trys.pop();continue}o=r.call(e,t)}catch(e){o=[6,e];a=0}finally{n=p=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement}from"./index-7603f98e.js";import{g as generateId,i as intl,d as debounce}from"./functions-e552a8b5.js";import{g as getData,t as types,h as handleChartKeydown,r as renderLegend,a as renderBar,b as renderDoughnut,c as renderCompletionMessage,d as amountToPercent}from"./chartFunctions-303e1644.js";var wmChartCss=":host,wm-chart{}:host .component-wrapper,wm-chart .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;}:host .component-wrapper .label,wm-chart .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}:host .component-wrapper .label .subinfo,wm-chart .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}:host .component-wrapper .legend-wrapper,wm-chart .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend,wm-chart .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.--top,wm-chart .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item,wm-chart .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color,wm-chart .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom,wm-chart .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item,wm-chart .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color,wm-chart .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item,wm-chart .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type),wm-chart .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text,wm-chart .component-wrapper .legend-wrapper .legend .legend-text{padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color,wm-chart .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .cluster-warning,wm-chart .component-wrapper .legend-wrapper .cluster-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .doughnut-svg,wm-chart .component-wrapper .doughnut-svg,:host .component-wrapper .inner-bar-wrapper,wm-chart .component-wrapper .inner-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper,wm-chart .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .values,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type),wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper,wm-chart .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment,wm-chart .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value,wm-chart .component-wrapper .value{display:inline-block;text-align:center}:host .component-wrapper .value:not(:last-of-type),wm-chart .component-wrapper .value:not(:last-of-type){margin-right:2px}:host .component-wrapper path:active,wm-chart .component-wrapper path:active,:host .component-wrapper path:hover,wm-chart .component-wrapper path:hover,:host .component-wrapper path:focus,wm-chart .component-wrapper path:focus,:host .component-wrapper .bar-segment:active,wm-chart .component-wrapper .bar-segment:active,:host .component-wrapper .bar-segment:hover,wm-chart .component-wrapper .bar-segment:hover,:host .component-wrapper .bar-segment:focus,wm-chart .component-wrapper .bar-segment:focus{outline:none}:host .component-wrapper .bar-segment:active.bar-segment,wm-chart .component-wrapper .bar-segment:active.bar-segment,:host .component-wrapper .bar-segment:hover.bar-segment,wm-chart .component-wrapper .bar-segment:hover.bar-segment,:host .component-wrapper .bar-segment:focus.bar-segment,wm-chart .component-wrapper .bar-segment:focus.bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,wm-chart .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,wm-chart .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,wm-chart .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .bar-segment:active.doughnut-segment,wm-chart .component-wrapper .bar-segment:active.doughnut-segment,:host .component-wrapper .bar-segment:hover.doughnut-segment,wm-chart .component-wrapper .bar-segment:hover.doughnut-segment,:host .component-wrapper .bar-segment:focus.doughnut-segment,wm-chart .component-wrapper .bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,wm-chart .component-wrapper path::-moz-focus-inner,:host .component-wrapper .bar-segment::-moz-focus-inner,wm-chart .component-wrapper .bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut,wm-chart .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,wm-chart .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,wm-chart .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,wm-chart .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,wm-chart .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,wm-chart .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text,wm-chart .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,wm-chart .component-wrapper.doughnut0,:host .component-wrapper.doughnut,wm-chart .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,wm-chart .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label,wm-chart .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,wm-chart .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo,wm-chart .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .legend,wm-chart .component-wrapper.doughnut0 .legend,:host .component-wrapper.doughnut .legend,wm-chart .component-wrapper.doughnut .legend{display:-ms-flexbox;display:flex}:host .component-wrapper.doughnut0 .completion-message,wm-chart .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message,wm-chart .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,wm-chart .component-wrapper.bar1,:host .component-wrapper.bar,wm-chart .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,wm-chart .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-chart .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,wm-chart .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo,wm-chart .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .legend,wm-chart .component-wrapper.bar1 .legend,:host .component-wrapper.bar .legend,wm-chart .component-wrapper.bar .legend{display:none}:host .component-wrapper.bar1 .chart-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper,wm-chart .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,wm-chart .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc,wm-chart .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar .chart-wrapper .inner-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,wm-chart .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message,wm-chart .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,wm-chart .component-wrapper.bar1,:host .component-wrapper.bar,wm-chart .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,wm-chart .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-chart .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,wm-chart .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper,wm-chart .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,wm-chart .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc,wm-chart .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,wm-chart .component-wrapper.bar2,:host .component-wrapper.bar3,wm-chart .component-wrapper.bar3,:host .component-wrapper.bar4,wm-chart .component-wrapper.bar4,:host .component-wrapper.bar5,wm-chart .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-bar-wrapper,wm-chart .component-wrapper.bar2 .inner-bar-wrapper,:host .component-wrapper.bar4 .inner-bar-wrapper,wm-chart .component-wrapper.bar4 .inner-bar-wrapper,:host .component-wrapper.bar5 .inner-bar-wrapper,wm-chart .component-wrapper.bar5 .inner-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar2 .inner-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar4 .inner-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar5 .inner-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .legend,wm-chart .component-wrapper.bar3 .legend{padding-bottom:1.25rem}:host .component-wrapper.bar3 .chart-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text{fill:#4a4a4a}:host .component-wrapper.bar3 .chart-wrapper .axis,wm-chart .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line,wm-chart .component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text,wm-chart .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.left-label,wm-chart .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label,wm-chart .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host :host(:focus),wm-chart :host(:focus){outline:none}:host :host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,wm-chart :host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,:host :host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper,wm-chart :host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host :host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,wm-chart :host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,:host :host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner,wm-chart :host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";var Chart=function(){function e(e){var r=this;registerInstance(this,e);this.chartType="doughnut1";this.showLegend=true;this.notStartedColor=false;this.labelPosition="top";this.isTabbing=false;this.uid=generateId();this.slicesData=[];this.chartLabelMessage=intl.formatMessage({id:"chart.interactiveChart",defaultMessage:"Interactive chart. Use arrow keys to browse elements, press Tab to exit."});this.debouncedResize=debounce((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getData.call(this,this.currentChartType)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))}),10);this.debouncedSliceUpdate=debounce((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getData.call(this,this.currentChartType)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))}),100)}Object.defineProperty(e.prototype,"tempValueFormat",{get:function(){return this.valueFormat||this.showValues||"none"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hybridType",{get:function(){return window.innerWidth>1340?"doughnut0":"bar1"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){var e=this.currentChartType.includes("bar");var r=this.currentChartType.includes("doughnut");return e?Array.from(this.el.shadowRoot.querySelectorAll(".bar-segment")):r?Array.from(this.el.shadowRoot.querySelectorAll(".doughnut-segment")):undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"currentChartType",{get:function(){return this.chartType==="hybrid"?this.hybridType:this.chartType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartData",{get:function(){return types[this.currentChartType]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label,", ").concat(this.chartLabelMessage);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){handleChartKeydown.call(this,e)};e.prototype.handleResize=function(){if(this.chartType==="hybrid"){this.debouncedResize()}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.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.")}if(this.showValues){console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.")}return[4,getData.call(this,this.currentChartType)];case 1:e.sent();return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.renderBarText=function(e,r){var t;if(this.tempValueFormat==="percentage"){t=e.perc+"%"}else if(this.tempValueFormat==="amount"){t=e.amount}else{return}return h("span",{class:"value",style:{width:"calc(".concat(amountToPercent(e.amount,this.total,false),"%\n ").concat(r!==this.slicesData.length-1?" - 2px":"")}},t)};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return h("svg",{class:"axis"},h("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),h("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),h("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),h("text",{x:"0.5",y:"-6"},"0%"),h("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),h("text",{x:"100%",y:"-6"},"100%"))}};e.prototype.render=function(){return h(Host,{role:"application","aria-label":this.ariaLabelText,tabindex:"0"},h("div",{class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.chartType==="bar4"?"left-label":"")},h("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"graphic-".concat(this.uid)},h("span",{class:"label-text"},this.label),this.subinfo?h("span",{class:"subinfo"},this.subinfo):""),this.chartData.isBar?renderLegend.call(this):"",this.total>0&&this.chartData.isBar?renderBar.call(this,this.currentChartType):renderDoughnut.call(this,this.currentChartType),!this.chartData.isBar?renderLegend.call(this):"",h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.currentChartType==="doughnut0"?renderCompletionMessage.call(this):""))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Chart.style=wmChartCss;export{Chart as wm_chart};
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,n){function a(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,p){function o(e){try{c(n.next(e))}catch(e){p(e)}}function s(e){try{c(n["throw"](e))}catch(e){p(e)}}function c(e){e.done?t(e.value):a(e.value).then(o,s)}c((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},n,a,p,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(r){return c([e,r])}}function c(o){if(n)throw new TypeError("Generator is already executing.");while(t)try{if(n=1,a&&(p=o[0]&2?a["return"]:o[0]?a["throw"]||((p=a["return"])&&p.call(a),0):a.next)&&!(p=p.call(a,o[1])).done)return p;if(a=0,p)o=[o[0]&2,p.value];switch(o[0]){case 0:case 1:p=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(p=t.trys,p=p.length>0&&p[p.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!p||o[1]>p[0]&&o[1]<p[3])){t.label=o[1];break}if(o[0]===6&&t.label<p[1]){t.label=p[1];p=o;break}if(p&&t.label<p[2]){t.label=p[2];t.ops.push(o);break}if(p[2])t.ops.pop();t.trys.pop();continue}o=r.call(e,t)}catch(e){o=[6,e];a=0}finally{n=p=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement}from"./index-d649a861.js";import{g as generateId,i as intl,d as debounce}from"./functions-117d1a51.js";import{g as getData,t as types,h as handleChartKeydown,r as renderLegend,a as renderBar,b as renderDoughnut,c as renderCompletionMessage,e as exitChart,d as amountToPercent}from"./chartFunctions-b24ba065.js";var wmChartCss=":host .component-wrapper,wm-chart .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;}:host .component-wrapper .label,wm-chart .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}:host .component-wrapper .label .subinfo,wm-chart .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}:host .component-wrapper .legend-wrapper,wm-chart .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend,wm-chart .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.--top,wm-chart .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item,wm-chart .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color,wm-chart .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom,wm-chart .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item,wm-chart .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color,wm-chart .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item,wm-chart .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type),wm-chart .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text,wm-chart .component-wrapper .legend-wrapper .legend .legend-text{padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color,wm-chart .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .cluster-warning,wm-chart .component-wrapper .legend-wrapper .cluster-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .doughnut-svg,wm-chart .component-wrapper .doughnut-svg,:host .component-wrapper .inner-bar-wrapper,wm-chart .component-wrapper .inner-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper,wm-chart .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .values,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type),wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper,wm-chart .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment,wm-chart .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value,wm-chart .component-wrapper .value{display:inline-block;text-align:center}:host .component-wrapper .value:not(:last-of-type),wm-chart .component-wrapper .value:not(:last-of-type){margin-right:2px}:host .component-wrapper path:active,wm-chart .component-wrapper path:active,:host .component-wrapper path:hover,wm-chart .component-wrapper path:hover,:host .component-wrapper path:focus,wm-chart .component-wrapper path:focus,:host .component-wrapper .bar-segment:active,wm-chart .component-wrapper .bar-segment:active,:host .component-wrapper .bar-segment:hover,wm-chart .component-wrapper .bar-segment:hover,:host .component-wrapper .bar-segment:focus,wm-chart .component-wrapper .bar-segment:focus{outline:none}:host .component-wrapper .bar-segment:active.bar-segment,wm-chart .component-wrapper .bar-segment:active.bar-segment,:host .component-wrapper .bar-segment:hover.bar-segment,wm-chart .component-wrapper .bar-segment:hover.bar-segment,:host .component-wrapper .bar-segment:focus.bar-segment,wm-chart .component-wrapper .bar-segment:focus.bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,wm-chart .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,wm-chart .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,wm-chart .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .bar-segment:active.doughnut-segment,wm-chart .component-wrapper .bar-segment:active.doughnut-segment,:host .component-wrapper .bar-segment:hover.doughnut-segment,wm-chart .component-wrapper .bar-segment:hover.doughnut-segment,:host .component-wrapper .bar-segment:focus.doughnut-segment,wm-chart .component-wrapper .bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,wm-chart .component-wrapper path::-moz-focus-inner,:host .component-wrapper .bar-segment::-moz-focus-inner,wm-chart .component-wrapper .bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut,wm-chart .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,wm-chart .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,wm-chart .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,wm-chart .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,wm-chart .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,wm-chart .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text,wm-chart .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,wm-chart .component-wrapper.doughnut0,:host .component-wrapper.doughnut,wm-chart .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,wm-chart .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label,wm-chart .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,wm-chart .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo,wm-chart .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .legend,wm-chart .component-wrapper.doughnut0 .legend,:host .component-wrapper.doughnut .legend,wm-chart .component-wrapper.doughnut .legend{display:-ms-flexbox;display:flex}:host .component-wrapper.doughnut0 .completion-message,wm-chart .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message,wm-chart .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,wm-chart .component-wrapper.bar1,:host .component-wrapper.bar,wm-chart .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,wm-chart .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-chart .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,wm-chart .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo,wm-chart .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .legend,wm-chart .component-wrapper.bar1 .legend,:host .component-wrapper.bar .legend,wm-chart .component-wrapper.bar .legend{display:none}:host .component-wrapper.bar1 .chart-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper,wm-chart .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,wm-chart .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc,wm-chart .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar .chart-wrapper .inner-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,wm-chart .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message,wm-chart .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,wm-chart .component-wrapper.bar1,:host .component-wrapper.bar,wm-chart .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,wm-chart .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-chart .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,wm-chart .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper,wm-chart .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,wm-chart .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc,wm-chart .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,wm-chart .component-wrapper.bar2,:host .component-wrapper.bar3,wm-chart .component-wrapper.bar3,:host .component-wrapper.bar4,wm-chart .component-wrapper.bar4,:host .component-wrapper.bar5,wm-chart .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-bar-wrapper,wm-chart .component-wrapper.bar2 .inner-bar-wrapper,:host .component-wrapper.bar4 .inner-bar-wrapper,wm-chart .component-wrapper.bar4 .inner-bar-wrapper,:host .component-wrapper.bar5 .inner-bar-wrapper,wm-chart .component-wrapper.bar5 .inner-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar2 .inner-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar4 .inner-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar5 .inner-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .legend,wm-chart .component-wrapper.bar3 .legend{padding-bottom:1.25rem}:host .component-wrapper.bar3 .chart-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text{fill:#4a4a4a}:host .component-wrapper.bar3 .chart-wrapper .axis,wm-chart .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line,wm-chart .component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text,wm-chart .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.left-label,wm-chart .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label,wm-chart .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";var Chart=function(){function e(e){var r=this;registerInstance(this,e);this.chartType="doughnut1";this.showLegend=true;this.notStartedColor=false;this.labelPosition="top";this.isTabbing=false;this.uid=generateId();this.slicesData=[];this.chartLabelMessage=intl.formatMessage({id:"chart.interactiveChart",defaultMessage:"Interactive chart. Use arrow keys to browse elements, press Tab to exit."});this.debouncedResize=debounce((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getData.call(this,this.currentChartType)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))}),10);this.debouncedSliceUpdate=debounce((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,getData.call(this,this.currentChartType)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))}),100)}Object.defineProperty(e.prototype,"tempValueFormat",{get:function(){return this.valueFormat||this.showValues||"none"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hybridType",{get:function(){return window.innerWidth>1340?"doughnut0":"bar1"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){var e=this.currentChartType.includes("bar");var r=this.currentChartType.includes("doughnut");return e?Array.from(this.el.shadowRoot.querySelectorAll(".bar-segment")):r?Array.from(this.el.shadowRoot.querySelectorAll(".doughnut-segment")):undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"currentChartType",{get:function(){return this.chartType==="hybrid"?this.hybridType:this.chartType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartData",{get:function(){return types[this.currentChartType]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e=this.label+", "+this.chartLabelMessage;if(this.subinfo){e+=" "+this.subinfo}return e},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){handleChartKeydown.call(this,e)};e.prototype.handleResize=function(){if(this.chartType==="hybrid"){this.debouncedResize()}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.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.")}if(this.showValues){console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.")}return[4,getData.call(this,this.currentChartType)];case 1:e.sent();return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.renderBarText=function(e,r){var t;if(this.tempValueFormat==="percentage"){t=e.perc+"%"}else if(this.tempValueFormat==="amount"){t=e.amount}else{return}return h("span",{class:"value",style:{width:"calc("+amountToPercent(e.amount,this.total,false)+"%\n "+(r!==this.slicesData.length-1?" - 2px":"")}},t)};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return h("svg",{class:"axis"},h("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),h("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),h("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),h("text",{x:"0.5",y:"-6"},"0%"),h("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),h("text",{x:"100%",y:"-6"},"100%"))}};e.prototype.render=function(){var e=this;return h(Host,{role:"application","aria-label":this.ariaLabelText,tabindex:"0",onBlur:function(){return exitChart.call(e)}},h("div",{class:"component-wrapper "+this.currentChartType+" "+(this.isTabbing?"user-is-tabbing":"")+" "+(this.labelPosition==="left"&&this.chartType==="bar4"?"left-label":"")},h("label",{class:"label",id:"label-"+this.uid,htmlFor:"graphic-"+this.uid},h("span",{class:"label-text"},this.label),this.subinfo?h("span",{class:"subinfo"},this.subinfo):""),this.chartData.isBar?renderLegend.call(this):"",this.total>0&&this.chartData.isBar?renderBar.call(this,this.currentChartType):renderDoughnut.call(this,this.currentChartType),!this.chartData.isBar?renderLegend.call(this):"",h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.currentChartType==="doughnut0"?renderCompletionMessage.call(this):""))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Chart.style=wmChartCss;export{Chart as wm_chart};