@watermarkinsights/ripple 3.25.0-2 → 3.25.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 (605) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-9dce0ea3.js → chartFunctions-2f04ab6a.js} +591 -591
  3. package/dist/cjs/chartFunctions-2f04ab6a.js.map +1 -0
  4. package/dist/cjs/{functions-53aff314.js → functions-d2d99997.js} +478 -478
  5. package/dist/cjs/{functions-53aff314.js.map → functions-d2d99997.js.map} +1 -1
  6. package/dist/cjs/{global-c22b1249.js → global-d0584d18.js} +63 -63
  7. package/dist/cjs/global-d0584d18.js.map +1 -0
  8. package/dist/cjs/{http-service-494d81de.js → http-service-9e8c4dd5.js} +50 -50
  9. package/dist/cjs/http-service-9e8c4dd5.js.map +1 -0
  10. package/dist/cjs/{interfaces-a3338581.js → interfaces-30a74c1f.js} +30 -30
  11. package/dist/cjs/interfaces-30a74c1f.js.map +1 -0
  12. package/dist/cjs/intl-a1ccf587.js +140 -0
  13. package/dist/cjs/intl-a1ccf587.js.map +1 -0
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/priv-chart-popover.cjs.entry.js +91 -91
  16. package/dist/cjs/priv-chart-popover.cjs.entry.js.map +1 -1
  17. package/dist/cjs/priv-datepicker.cjs.entry.js +657 -657
  18. package/dist/cjs/priv-datepicker.cjs.entry.js.map +1 -1
  19. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  20. package/dist/cjs/priv-navigator-button.cjs.entry.js.map +1 -1
  21. package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
  22. package/dist/cjs/priv-navigator-item.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ripple.cjs.js +2 -2
  24. package/dist/cjs/wm-action-menu_2.cjs.entry.js +334 -334
  25. package/dist/cjs/wm-action-menu_2.cjs.entry.js.map +1 -1
  26. package/dist/cjs/wm-button.cjs.entry.js +260 -260
  27. package/dist/cjs/wm-button.cjs.entry.js.map +1 -1
  28. package/dist/cjs/wm-chart-slice.cjs.entry.js +18 -18
  29. package/dist/cjs/wm-chart-slice.cjs.entry.js.map +1 -1
  30. package/dist/cjs/wm-chart.cjs.entry.js +179 -179
  31. package/dist/cjs/wm-chart.cjs.entry.js.map +1 -1
  32. package/dist/cjs/wm-datepicker.cjs.entry.js +264 -264
  33. package/dist/cjs/wm-datepicker.cjs.entry.js.map +1 -1
  34. package/dist/cjs/wm-file-list.cjs.entry.js +35 -35
  35. package/dist/cjs/wm-file-list.cjs.entry.js.map +1 -1
  36. package/dist/cjs/wm-file.cjs.entry.js +201 -201
  37. package/dist/cjs/wm-file.cjs.entry.js.map +1 -1
  38. package/dist/cjs/wm-input.cjs.entry.js +124 -140
  39. package/dist/cjs/wm-input.cjs.entry.js.map +1 -1
  40. package/dist/cjs/wm-modal-footer.cjs.entry.js +33 -33
  41. package/dist/cjs/wm-modal-footer.cjs.entry.js.map +1 -1
  42. package/dist/cjs/wm-modal-header.cjs.entry.js +32 -32
  43. package/dist/cjs/wm-modal-header.cjs.entry.js.map +1 -1
  44. package/dist/cjs/wm-modal.cjs.entry.js +152 -152
  45. package/dist/cjs/wm-modal.cjs.entry.js.map +1 -1
  46. package/dist/cjs/wm-navigation_3.cjs.entry.js +225 -230
  47. package/dist/cjs/wm-navigation_3.cjs.entry.js.map +1 -1
  48. package/dist/cjs/wm-navigator.cjs.entry.js +264 -264
  49. package/dist/cjs/wm-navigator.cjs.entry.js.map +1 -1
  50. package/dist/cjs/wm-network-uploader.cjs.entry.js +465 -467
  51. package/dist/cjs/wm-network-uploader.cjs.entry.js.map +1 -1
  52. package/dist/cjs/wm-option_2.cjs.entry.js +769 -772
  53. package/dist/cjs/wm-option_2.cjs.entry.js.map +1 -1
  54. package/dist/cjs/wm-pagination.cjs.entry.js +179 -179
  55. package/dist/cjs/wm-pagination.cjs.entry.js.map +1 -1
  56. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +155 -155
  57. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js.map +1 -1
  58. package/dist/cjs/wm-search.cjs.entry.js +185 -192
  59. package/dist/cjs/wm-search.cjs.entry.js.map +1 -1
  60. package/dist/cjs/wm-snackbar.cjs.entry.js +155 -159
  61. package/dist/cjs/wm-snackbar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/wm-tab-item_3.cjs.entry.js +264 -264
  63. package/dist/cjs/wm-tab-item_3.cjs.entry.js.map +1 -1
  64. package/dist/cjs/wm-tag-input-row.cjs.entry.js +14 -14
  65. package/dist/cjs/wm-tag-input-row.cjs.entry.js.map +1 -1
  66. package/dist/cjs/wm-tag-input.cjs.entry.js +912 -924
  67. package/dist/cjs/wm-tag-input.cjs.entry.js.map +1 -1
  68. package/dist/cjs/wm-timepicker.cjs.entry.js +386 -386
  69. package/dist/cjs/wm-timepicker.cjs.entry.js.map +1 -1
  70. package/dist/cjs/wm-toggletip.cjs.entry.js +130 -130
  71. package/dist/cjs/wm-toggletip.cjs.entry.js.map +1 -1
  72. package/dist/cjs/wm-uploader.cjs.entry.js +441 -510
  73. package/dist/cjs/wm-uploader.cjs.entry.js.map +1 -1
  74. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  75. package/dist/cjs/wm-wrapper.cjs.entry.js.map +1 -1
  76. package/dist/collection/components/charts/chartFunctions.js +557 -557
  77. package/dist/collection/components/charts/chartFunctions.js.map +1 -1
  78. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +268 -270
  79. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js.map +1 -1
  80. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +126 -126
  81. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js.map +1 -1
  82. package/dist/collection/components/charts/wm-chart/wm-chart.js +447 -447
  83. package/dist/collection/components/charts/wm-chart/wm-chart.js.map +1 -1
  84. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +208 -208
  85. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js.map +1 -1
  86. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +144 -144
  87. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js.map +1 -1
  88. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +122 -122
  89. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js.map +1 -1
  90. package/dist/collection/components/wm-action-menu/wm-action-menu.js +473 -473
  91. package/dist/collection/components/wm-action-menu/wm-action-menu.js.map +1 -1
  92. package/dist/collection/components/wm-button/wm-button.js +576 -576
  93. package/dist/collection/components/wm-button/wm-button.js.map +1 -1
  94. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +984 -984
  95. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js.map +1 -1
  96. package/dist/collection/components/wm-datepicker/wm-datepicker.css +4 -4
  97. package/dist/collection/components/wm-datepicker/wm-datepicker.js +492 -492
  98. package/dist/collection/components/wm-datepicker/wm-datepicker.js.map +1 -1
  99. package/dist/collection/components/wm-file/wm-file.js +334 -334
  100. package/dist/collection/components/wm-file/wm-file.js.map +1 -1
  101. package/dist/collection/components/wm-file-list/wm-file-list.js +153 -153
  102. package/dist/collection/components/wm-file-list/wm-file-list.js.map +1 -1
  103. package/dist/collection/components/wm-input/wm-input.css +4 -4
  104. package/dist/collection/components/wm-input/wm-input.js +428 -444
  105. package/dist/collection/components/wm-input/wm-input.js.map +1 -1
  106. package/dist/collection/components/wm-menuitem/wm-menuitem.js +455 -455
  107. package/dist/collection/components/wm-menuitem/wm-menuitem.js.map +1 -1
  108. package/dist/collection/components/wm-modal/wm-modal-footer.js +139 -139
  109. package/dist/collection/components/wm-modal/wm-modal-footer.js.map +1 -1
  110. package/dist/collection/components/wm-modal/wm-modal-header.js +83 -83
  111. package/dist/collection/components/wm-modal/wm-modal-header.js.map +1 -1
  112. package/dist/collection/components/wm-modal/wm-modal.js +463 -463
  113. package/dist/collection/components/wm-modal/wm-modal.js.map +1 -1
  114. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +177 -177
  115. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js.map +1 -1
  116. package/dist/collection/components/wm-navigation/wm-navigation-item.js +131 -131
  117. package/dist/collection/components/wm-navigation/wm-navigation-item.js.map +1 -1
  118. package/dist/collection/components/wm-navigation/wm-navigation.js +218 -223
  119. package/dist/collection/components/wm-navigation/wm-navigation.js.map +1 -1
  120. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +107 -107
  121. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js.map +1 -1
  122. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +124 -124
  123. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js.map +1 -1
  124. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  125. package/dist/collection/components/wm-navigator/wm-navigator.js.map +1 -1
  126. package/dist/collection/components/wm-option/wm-option.js +436 -436
  127. package/dist/collection/components/wm-option/wm-option.js.map +1 -1
  128. package/dist/collection/components/wm-pagination/wm-pagination.js +371 -371
  129. package/dist/collection/components/wm-pagination/wm-pagination.js.map +1 -1
  130. package/dist/collection/components/wm-search/wm-search.css +5 -3
  131. package/dist/collection/components/wm-search/wm-search.js +440 -447
  132. package/dist/collection/components/wm-search/wm-search.js.map +1 -1
  133. package/dist/collection/components/wm-select/wm-select.css +4 -4
  134. package/dist/collection/components/wm-select/wm-select.js +1055 -1058
  135. package/dist/collection/components/wm-select/wm-select.js.map +1 -1
  136. package/dist/collection/components/wm-snackbar/wm-snackbar.js +283 -287
  137. package/dist/collection/components/wm-snackbar/wm-snackbar.js.map +1 -1
  138. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +212 -212
  139. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js.map +1 -1
  140. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +328 -328
  141. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js.map +1 -1
  142. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +109 -109
  143. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js.map +1 -1
  144. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js +123 -123
  145. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js.map +1 -1
  146. package/dist/collection/components/wm-tag-input/wm-tag-input.css +4 -4
  147. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1267 -1279
  148. package/dist/collection/components/wm-tag-input/wm-tag-input.js.map +1 -1
  149. package/dist/collection/components/wm-timepicker/wm-timepicker.css +4 -4
  150. package/dist/collection/components/wm-timepicker/wm-timepicker.js +606 -606
  151. package/dist/collection/components/wm-timepicker/wm-timepicker.js.map +1 -1
  152. package/dist/collection/components/wm-toggletip/wm-toggletip.js +254 -254
  153. package/dist/collection/components/wm-toggletip/wm-toggletip.js.map +1 -1
  154. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +773 -775
  155. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js.map +1 -1
  156. package/dist/collection/components/wm-uploader/wm-uploader.js +965 -1034
  157. package/dist/collection/components/wm-uploader/wm-uploader.js.map +1 -1
  158. package/dist/collection/components/wm-wrapper/wm-wrapper.js +29 -29
  159. package/dist/collection/components/wm-wrapper/wm-wrapper.js.map +1 -1
  160. package/dist/collection/dev/scripts.js +20 -20
  161. package/dist/collection/global/__mocks__/functions.js +7 -7
  162. package/dist/collection/global/__mocks__/functions.js.map +1 -1
  163. package/dist/collection/global/functions.js +521 -521
  164. package/dist/collection/global/functions.js.map +1 -1
  165. package/dist/collection/global/global.js +70 -70
  166. package/dist/collection/global/global.js.map +1 -1
  167. package/dist/collection/global/interfaces.js +50 -50
  168. package/dist/collection/global/interfaces.js.map +1 -1
  169. package/dist/collection/global/intl.js +133 -7
  170. package/dist/collection/global/intl.js.map +1 -1
  171. package/dist/collection/global/services/__mocks__/http-service.js +131 -131
  172. package/dist/collection/global/services/__mocks__/http-service.js.map +1 -1
  173. package/dist/collection/global/services/http-service.js +51 -51
  174. package/dist/collection/global/services/http-service.js.map +1 -1
  175. package/dist/collection/lang/lang.js +6 -6
  176. package/dist/collection/lang/lang.js.map +1 -1
  177. package/dist/collection/lang/missing.js +43 -43
  178. package/dist/collection/lang/piglatin.js +93 -93
  179. package/dist/esm/{chartFunctions-1df8043a.js → chartFunctions-a72f5835.js} +591 -591
  180. package/dist/esm/chartFunctions-a72f5835.js.map +1 -0
  181. package/dist/esm/{functions-bb1309d0.js → functions-dc9964aa.js} +478 -478
  182. package/dist/esm/{functions-bb1309d0.js.map → functions-dc9964aa.js.map} +1 -1
  183. package/dist/esm/{global-2c5c2727.js → global-3d0ef32b.js} +63 -63
  184. package/dist/esm/global-3d0ef32b.js.map +1 -0
  185. package/dist/esm/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +50 -50
  186. package/dist/esm/http-service-5d037e16.js.map +1 -0
  187. package/dist/esm/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +30 -30
  188. package/dist/esm/interfaces-61c6305b.js.map +1 -0
  189. package/dist/esm/intl-4d4826dd.js +137 -0
  190. package/dist/esm/intl-4d4826dd.js.map +1 -0
  191. package/dist/esm/loader.js +2 -2
  192. package/dist/esm/polyfills/core-js.js +0 -0
  193. package/dist/esm/polyfills/dom.js +0 -0
  194. package/dist/esm/polyfills/es5-html-element.js +0 -0
  195. package/dist/esm/polyfills/index.js +0 -0
  196. package/dist/esm/polyfills/system.js +0 -0
  197. package/dist/esm/priv-chart-popover.entry.js +91 -91
  198. package/dist/esm/priv-chart-popover.entry.js.map +1 -1
  199. package/dist/esm/priv-datepicker.entry.js +657 -657
  200. package/dist/esm/priv-datepicker.entry.js.map +1 -1
  201. package/dist/esm/priv-navigator-button.entry.js +19 -19
  202. package/dist/esm/priv-navigator-button.entry.js.map +1 -1
  203. package/dist/esm/priv-navigator-item.entry.js +23 -23
  204. package/dist/esm/priv-navigator-item.entry.js.map +1 -1
  205. package/dist/esm/ripple.js +2 -2
  206. package/dist/esm/wm-action-menu_2.entry.js +334 -334
  207. package/dist/esm/wm-action-menu_2.entry.js.map +1 -1
  208. package/dist/esm/wm-button.entry.js +260 -260
  209. package/dist/esm/wm-button.entry.js.map +1 -1
  210. package/dist/esm/wm-chart-slice.entry.js +18 -18
  211. package/dist/esm/wm-chart-slice.entry.js.map +1 -1
  212. package/dist/esm/wm-chart.entry.js +179 -179
  213. package/dist/esm/wm-chart.entry.js.map +1 -1
  214. package/dist/esm/wm-datepicker.entry.js +264 -264
  215. package/dist/esm/wm-datepicker.entry.js.map +1 -1
  216. package/dist/esm/wm-file-list.entry.js +35 -35
  217. package/dist/esm/wm-file-list.entry.js.map +1 -1
  218. package/dist/esm/wm-file.entry.js +201 -201
  219. package/dist/esm/wm-file.entry.js.map +1 -1
  220. package/dist/esm/wm-input.entry.js +124 -140
  221. package/dist/esm/wm-input.entry.js.map +1 -1
  222. package/dist/esm/wm-modal-footer.entry.js +33 -33
  223. package/dist/esm/wm-modal-footer.entry.js.map +1 -1
  224. package/dist/esm/wm-modal-header.entry.js +32 -32
  225. package/dist/esm/wm-modal-header.entry.js.map +1 -1
  226. package/dist/esm/wm-modal.entry.js +152 -152
  227. package/dist/esm/wm-modal.entry.js.map +1 -1
  228. package/dist/esm/wm-navigation_3.entry.js +225 -230
  229. package/dist/esm/wm-navigation_3.entry.js.map +1 -1
  230. package/dist/esm/wm-navigator.entry.js +264 -264
  231. package/dist/esm/wm-navigator.entry.js.map +1 -1
  232. package/dist/esm/wm-network-uploader.entry.js +465 -467
  233. package/dist/esm/wm-network-uploader.entry.js.map +1 -1
  234. package/dist/esm/wm-option_2.entry.js +769 -772
  235. package/dist/esm/wm-option_2.entry.js.map +1 -1
  236. package/dist/esm/wm-pagination.entry.js +179 -179
  237. package/dist/esm/wm-pagination.entry.js.map +1 -1
  238. package/dist/esm/wm-progress-indicator_3.entry.js +155 -155
  239. package/dist/esm/wm-progress-indicator_3.entry.js.map +1 -1
  240. package/dist/esm/wm-search.entry.js +185 -192
  241. package/dist/esm/wm-search.entry.js.map +1 -1
  242. package/dist/esm/wm-snackbar.entry.js +155 -159
  243. package/dist/esm/wm-snackbar.entry.js.map +1 -1
  244. package/dist/esm/wm-tab-item_3.entry.js +264 -264
  245. package/dist/esm/wm-tab-item_3.entry.js.map +1 -1
  246. package/dist/esm/wm-tag-input-row.entry.js +14 -14
  247. package/dist/esm/wm-tag-input-row.entry.js.map +1 -1
  248. package/dist/esm/wm-tag-input.entry.js +912 -924
  249. package/dist/esm/wm-tag-input.entry.js.map +1 -1
  250. package/dist/esm/wm-timepicker.entry.js +386 -386
  251. package/dist/esm/wm-timepicker.entry.js.map +1 -1
  252. package/dist/esm/wm-toggletip.entry.js +130 -130
  253. package/dist/esm/wm-toggletip.entry.js.map +1 -1
  254. package/dist/esm/wm-uploader.entry.js +441 -510
  255. package/dist/esm/wm-uploader.entry.js.map +1 -1
  256. package/dist/esm/wm-wrapper.entry.js +12 -12
  257. package/dist/esm/wm-wrapper.entry.js.map +1 -1
  258. package/dist/esm-es5/{chartFunctions-1df8043a.js → chartFunctions-a72f5835.js} +2 -2
  259. package/dist/esm-es5/chartFunctions-a72f5835.js.map +1 -0
  260. package/dist/esm-es5/{functions-bb1309d0.js → functions-dc9964aa.js} +1 -1
  261. package/dist/esm-es5/{functions-bb1309d0.js.map → functions-dc9964aa.js.map} +1 -1
  262. package/dist/esm-es5/global-3d0ef32b.js +2 -0
  263. package/dist/esm-es5/global-3d0ef32b.js.map +1 -0
  264. package/dist/esm-es5/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +1 -1
  265. package/dist/esm-es5/http-service-5d037e16.js.map +1 -0
  266. package/dist/esm-es5/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +1 -1
  267. package/dist/esm-es5/interfaces-61c6305b.js.map +1 -0
  268. package/dist/esm-es5/intl-4d4826dd.js +2 -0
  269. package/dist/esm-es5/intl-4d4826dd.js.map +1 -0
  270. package/dist/esm-es5/loader.js +1 -1
  271. package/dist/esm-es5/loader.js.map +1 -1
  272. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  273. package/dist/esm-es5/priv-chart-popover.entry.js.map +1 -1
  274. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  275. package/dist/esm-es5/priv-datepicker.entry.js.map +1 -1
  276. package/dist/esm-es5/priv-navigator-button.entry.js.map +1 -1
  277. package/dist/esm-es5/priv-navigator-item.entry.js.map +1 -1
  278. package/dist/esm-es5/ripple.js +1 -1
  279. package/dist/esm-es5/ripple.js.map +1 -1
  280. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  281. package/dist/esm-es5/wm-action-menu_2.entry.js.map +1 -1
  282. package/dist/esm-es5/wm-button.entry.js +1 -1
  283. package/dist/esm-es5/wm-button.entry.js.map +1 -1
  284. package/dist/esm-es5/wm-chart-slice.entry.js.map +1 -1
  285. package/dist/esm-es5/wm-chart.entry.js +1 -1
  286. package/dist/esm-es5/wm-chart.entry.js.map +1 -1
  287. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  288. package/dist/esm-es5/wm-datepicker.entry.js.map +1 -1
  289. package/dist/esm-es5/wm-file-list.entry.js.map +1 -1
  290. package/dist/esm-es5/wm-file.entry.js +1 -1
  291. package/dist/esm-es5/wm-file.entry.js.map +1 -1
  292. package/dist/esm-es5/wm-input.entry.js +1 -1
  293. package/dist/esm-es5/wm-input.entry.js.map +1 -1
  294. package/dist/esm-es5/wm-modal-footer.entry.js.map +1 -1
  295. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  296. package/dist/esm-es5/wm-modal-header.entry.js.map +1 -1
  297. package/dist/esm-es5/wm-modal.entry.js +1 -1
  298. package/dist/esm-es5/wm-modal.entry.js.map +1 -1
  299. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  300. package/dist/esm-es5/wm-navigation_3.entry.js.map +1 -1
  301. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  302. package/dist/esm-es5/wm-navigator.entry.js.map +1 -1
  303. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  304. package/dist/esm-es5/wm-network-uploader.entry.js.map +1 -1
  305. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  306. package/dist/esm-es5/wm-option_2.entry.js.map +1 -1
  307. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  308. package/dist/esm-es5/wm-pagination.entry.js.map +1 -1
  309. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  310. package/dist/esm-es5/wm-progress-indicator_3.entry.js.map +1 -1
  311. package/dist/esm-es5/wm-search.entry.js +1 -1
  312. package/dist/esm-es5/wm-search.entry.js.map +1 -1
  313. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  314. package/dist/esm-es5/wm-snackbar.entry.js.map +1 -1
  315. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  316. package/dist/esm-es5/wm-tab-item_3.entry.js.map +1 -1
  317. package/dist/esm-es5/wm-tag-input-row.entry.js.map +1 -1
  318. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  319. package/dist/esm-es5/wm-tag-input.entry.js.map +1 -1
  320. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  321. package/dist/esm-es5/wm-timepicker.entry.js.map +1 -1
  322. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  323. package/dist/esm-es5/wm-toggletip.entry.js.map +1 -1
  324. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  325. package/dist/esm-es5/wm-uploader.entry.js.map +1 -1
  326. package/dist/esm-es5/wm-wrapper.entry.js.map +1 -1
  327. package/dist/ripple/{p-3f6c7e6c.entry.js → p-002d067e.entry.js} +2 -2
  328. package/dist/ripple/p-002d067e.entry.js.map +1 -0
  329. package/dist/ripple/p-02a1000a.entry.js +2 -0
  330. package/dist/ripple/p-02a1000a.entry.js.map +1 -0
  331. package/dist/ripple/{p-21bb563a.system.entry.js → p-04ae66fd.system.entry.js} +2 -2
  332. package/dist/ripple/p-04ae66fd.system.entry.js.map +1 -0
  333. package/dist/ripple/{p-c38f6103.system.js → p-0826dc64.system.js} +2 -2
  334. package/dist/ripple/{p-c38f6103.system.js.map → p-0826dc64.system.js.map} +1 -1
  335. package/dist/ripple/{p-f5df5903.system.js → p-08b7ec08.system.js} +1 -1
  336. package/dist/ripple/p-08b7ec08.system.js.map +1 -0
  337. package/dist/ripple/{p-d5b0809e.entry.js → p-0ad3a708.entry.js} +2 -2
  338. package/dist/ripple/p-0ad3a708.entry.js.map +1 -0
  339. package/dist/ripple/p-0cd13c7d.system.entry.js +2 -0
  340. package/dist/ripple/p-0cd13c7d.system.entry.js.map +1 -0
  341. package/dist/ripple/p-0d7bccf7.entry.js.map +1 -1
  342. package/dist/ripple/p-0eb7b1b7.system.entry.js +2 -0
  343. package/dist/ripple/p-0eb7b1b7.system.entry.js.map +1 -0
  344. package/dist/ripple/{p-70768add.entry.js → p-11124a23.entry.js} +2 -2
  345. package/dist/ripple/p-11124a23.entry.js.map +1 -0
  346. package/dist/ripple/p-1808b90a.entry.js +2 -0
  347. package/dist/ripple/p-1808b90a.entry.js.map +1 -0
  348. package/dist/ripple/p-1fd20e05.system.entry.js +2 -0
  349. package/dist/ripple/p-1fd20e05.system.entry.js.map +1 -0
  350. package/dist/ripple/{p-f36b1c58.system.entry.js → p-23fa1ff6.system.entry.js} +2 -2
  351. package/dist/ripple/p-23fa1ff6.system.entry.js.map +1 -0
  352. package/dist/ripple/p-24a4cb11.system.entry.js.map +1 -1
  353. package/dist/ripple/p-2c2a7092.system.entry.js.map +1 -1
  354. package/dist/ripple/{p-9d02957d.system.js → p-313b6073.system.js} +1 -1
  355. package/dist/ripple/p-313b6073.system.js.map +1 -0
  356. package/dist/ripple/p-33558ec4.system.entry.js.map +1 -1
  357. package/dist/ripple/{p-28c12986.system.entry.js → p-33ec18d4.system.entry.js} +2 -2
  358. package/dist/ripple/p-33ec18d4.system.entry.js.map +1 -0
  359. package/dist/ripple/{p-7d0f3abe.entry.js → p-341aa131.entry.js} +2 -2
  360. package/dist/ripple/p-341aa131.entry.js.map +1 -0
  361. package/dist/ripple/p-3759b7af.system.entry.js.map +1 -1
  362. package/dist/ripple/p-38449dff.system.entry.js +2 -0
  363. package/dist/ripple/p-38449dff.system.entry.js.map +1 -0
  364. package/dist/ripple/{p-ee97c3f6.entry.js → p-384c4981.entry.js} +2 -2
  365. package/dist/ripple/p-384c4981.entry.js.map +1 -0
  366. package/dist/ripple/{p-b81ce905.system.entry.js → p-3869a69e.system.entry.js} +2 -2
  367. package/dist/ripple/p-3869a69e.system.entry.js.map +1 -0
  368. package/dist/ripple/p-4391166c.entry.js.map +1 -1
  369. package/dist/ripple/{p-e6e7cb2d.entry.js → p-43be123d.entry.js} +2 -2
  370. package/dist/ripple/p-43be123d.entry.js.map +1 -0
  371. package/dist/ripple/p-4a014591.entry.js.map +1 -1
  372. package/dist/ripple/p-4a06d0a9.system.entry.js +2 -0
  373. package/dist/ripple/p-4a06d0a9.system.entry.js.map +1 -0
  374. package/dist/ripple/p-4e02e2ae.entry.js +2 -0
  375. package/dist/ripple/p-4e02e2ae.entry.js.map +1 -0
  376. package/dist/ripple/p-56cd4d5e.entry.js +2 -0
  377. package/dist/ripple/p-56cd4d5e.entry.js.map +1 -0
  378. package/dist/ripple/p-59654f8e.entry.js.map +1 -1
  379. package/dist/ripple/p-5cc287d2.entry.js +2 -0
  380. package/dist/ripple/p-5cc287d2.entry.js.map +1 -0
  381. package/dist/ripple/{p-8eebf787.entry.js → p-7e0e6b00.entry.js} +2 -2
  382. package/dist/ripple/p-7e0e6b00.entry.js.map +1 -0
  383. package/dist/ripple/{p-0400599e.system.entry.js → p-833c622f.system.entry.js} +2 -2
  384. package/dist/ripple/p-833c622f.system.entry.js.map +1 -0
  385. package/dist/ripple/{p-b00991d9.system.entry.js → p-8613600d.system.entry.js} +2 -2
  386. package/dist/ripple/p-8613600d.system.entry.js.map +1 -0
  387. package/dist/ripple/{p-43f1298b.js → p-888bec42.js} +1 -1
  388. package/dist/ripple/p-888bec42.js.map +1 -0
  389. package/dist/ripple/p-889579fc.entry.js +2 -0
  390. package/dist/ripple/p-889579fc.entry.js.map +1 -0
  391. package/dist/ripple/p-8c51e9f8.system.entry.js.map +1 -1
  392. package/dist/ripple/{p-42158d44.entry.js → p-8db604d2.entry.js} +2 -2
  393. package/dist/ripple/p-8db604d2.entry.js.map +1 -0
  394. package/dist/ripple/{p-24ef6556.system.entry.js → p-91deb45f.system.entry.js} +2 -2
  395. package/dist/ripple/p-91deb45f.system.entry.js.map +1 -0
  396. package/dist/ripple/p-9338011f.system.entry.js +2 -0
  397. package/dist/ripple/p-9338011f.system.entry.js.map +1 -0
  398. package/dist/ripple/p-976b2789.system.entry.js.map +1 -1
  399. package/dist/ripple/{p-1aa16d42.js → p-994303f2.js} +2 -2
  400. package/dist/ripple/p-994303f2.js.map +1 -0
  401. package/dist/ripple/p-9b2dfb54.js +2 -0
  402. package/dist/ripple/p-9b2dfb54.js.map +1 -0
  403. package/dist/ripple/p-9b9eb944.entry.js.map +1 -1
  404. package/dist/ripple/{p-980afed1.system.entry.js → p-a6d64d8a.system.entry.js} +2 -2
  405. package/dist/ripple/p-a6d64d8a.system.entry.js.map +1 -0
  406. package/dist/ripple/{p-fd8070fb.js → p-a6d6eae7.js} +1 -1
  407. package/dist/ripple/p-a6d6eae7.js.map +1 -0
  408. package/dist/ripple/{p-219fbe2b.system.entry.js → p-a73cf968.system.entry.js} +2 -2
  409. package/dist/ripple/p-a73cf968.system.entry.js.map +1 -0
  410. package/dist/ripple/{p-76aafb99.system.entry.js → p-aed625c1.system.entry.js} +2 -2
  411. package/dist/ripple/p-aed625c1.system.entry.js.map +1 -0
  412. package/dist/ripple/{p-0d36ceba.system.entry.js → p-b5b521e4.system.entry.js} +2 -2
  413. package/dist/ripple/p-b5b521e4.system.entry.js.map +1 -0
  414. package/dist/ripple/{p-47d223f1.system.entry.js → p-b7451e73.system.entry.js} +2 -2
  415. package/dist/ripple/p-b7451e73.system.entry.js.map +1 -0
  416. package/dist/ripple/p-bafdcb4e.system.entry.js +2 -0
  417. package/dist/ripple/p-bafdcb4e.system.entry.js.map +1 -0
  418. package/dist/ripple/{p-262713b9.entry.js → p-bb45e122.entry.js} +2 -2
  419. package/dist/ripple/p-bb45e122.entry.js.map +1 -0
  420. package/dist/ripple/p-bd84628c.system.entry.js +2 -0
  421. package/dist/ripple/p-bd84628c.system.entry.js.map +1 -0
  422. package/dist/ripple/p-bf569af0.entry.js.map +1 -1
  423. package/dist/ripple/p-c094f6a8.entry.js +2 -0
  424. package/dist/ripple/p-c094f6a8.entry.js.map +1 -0
  425. package/dist/ripple/p-c36002b6.system.js +2 -0
  426. package/dist/ripple/p-c36002b6.system.js.map +1 -0
  427. package/dist/ripple/p-c5bf7db8.entry.js +2 -0
  428. package/dist/ripple/p-c5bf7db8.entry.js.map +1 -0
  429. package/dist/ripple/p-c68b3798.system.js +2 -0
  430. package/dist/ripple/p-c68b3798.system.js.map +1 -0
  431. package/dist/ripple/{p-05e0f901.js → p-c6a0f7e5.js} +1 -1
  432. package/dist/ripple/{p-05e0f901.js.map → p-c6a0f7e5.js.map} +1 -1
  433. package/dist/ripple/{p-bcba3ce8.entry.js → p-d46f5794.entry.js} +2 -2
  434. package/dist/ripple/p-d46f5794.entry.js.map +1 -0
  435. package/dist/ripple/{p-d7ffac2f.entry.js → p-d48313e0.entry.js} +2 -2
  436. package/dist/ripple/p-d48313e0.entry.js.map +1 -0
  437. package/dist/ripple/p-d939cb54.entry.js.map +1 -1
  438. package/dist/ripple/p-dbfd1640.system.entry.js.map +1 -1
  439. package/dist/ripple/{p-d7c55ce1.entry.js → p-e22854c1.entry.js} +2 -2
  440. package/dist/ripple/p-e22854c1.entry.js.map +1 -0
  441. package/dist/ripple/p-e70bb79f.js +2 -0
  442. package/dist/ripple/p-e70bb79f.js.map +1 -0
  443. package/dist/ripple/{p-e99a7f36.entry.js → p-ed82573a.entry.js} +2 -2
  444. package/dist/ripple/p-ed82573a.entry.js.map +1 -0
  445. package/dist/ripple/{p-bc28c815.system.js → p-f0fd8695.system.js} +1 -1
  446. package/dist/ripple/{p-bc28c815.system.js.map → p-f0fd8695.system.js.map} +1 -1
  447. package/dist/ripple/{p-e5f84104.system.entry.js → p-f312d59a.system.entry.js} +2 -2
  448. package/dist/ripple/p-f312d59a.system.entry.js.map +1 -0
  449. package/dist/ripple/{p-c19ddc00.system.entry.js → p-f59a495a.system.entry.js} +2 -2
  450. package/dist/ripple/p-f59a495a.system.entry.js.map +1 -0
  451. package/dist/ripple/{p-cc8ca6bd.system.js → p-f80eb8a5.system.js} +2 -2
  452. package/dist/ripple/p-f80eb8a5.system.js.map +1 -0
  453. package/dist/ripple/{p-1be55579.system.entry.js → p-fb67c39e.system.entry.js} +2 -2
  454. package/dist/ripple/p-fb67c39e.system.entry.js.map +1 -0
  455. package/dist/ripple/{p-20d0d019.entry.js → p-fc08d5e1.entry.js} +2 -2
  456. package/dist/ripple/p-fc08d5e1.entry.js.map +1 -0
  457. package/dist/ripple/{p-d7b946ed.entry.js → p-fe7da854.entry.js} +2 -2
  458. package/dist/ripple/p-fe7da854.entry.js.map +1 -0
  459. package/dist/ripple/ripple.esm.js +1 -1
  460. package/dist/ripple/ripple.esm.js.map +1 -1
  461. package/dist/ripple/ripple.js +1 -1
  462. package/dist/types/components/charts/chartFunctions.d.ts +37 -37
  463. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -0
  464. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  465. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +47 -0
  466. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +29 -0
  467. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +20 -0
  468. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  469. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +49 -0
  470. package/dist/types/components/wm-button/wm-button.d.ts +49 -0
  471. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -0
  472. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -0
  473. package/dist/types/components/wm-file/wm-file.d.ts +42 -0
  474. package/dist/types/components/wm-file-list/wm-file-list.d.ts +16 -0
  475. package/dist/types/components/wm-input/wm-input.d.ts +45 -0
  476. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -0
  477. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
  478. package/dist/types/components/wm-modal/wm-modal-header.d.ts +10 -10
  479. package/dist/types/components/wm-modal/wm-modal.d.ts +40 -0
  480. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -0
  481. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -0
  482. package/dist/types/components/wm-navigation/wm-navigation.d.ts +26 -0
  483. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  484. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -0
  485. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -0
  486. package/dist/types/components/wm-option/wm-option.d.ts +34 -0
  487. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  488. package/dist/types/components/wm-search/wm-search.d.ts +77 -0
  489. package/dist/types/components/wm-select/wm-select.d.ts +101 -0
  490. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +31 -32
  491. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +37 -0
  492. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +52 -0
  493. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -0
  494. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +11 -0
  495. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +135 -0
  496. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +62 -0
  497. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +28 -0
  498. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -0
  499. package/dist/types/components/wm-uploader/wm-uploader.d.ts +99 -0
  500. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  501. package/dist/types/components.d.ts +27 -27
  502. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  503. package/dist/types/global/functions.d.ts +48 -48
  504. package/dist/types/global/global.d.ts +1 -1
  505. package/dist/types/global/interfaces.d.ts +74 -74
  506. package/dist/types/global/intl.d.ts +29 -1
  507. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  508. package/dist/types/global/services/http-service.d.ts +4 -4
  509. package/dist/types/lang/lang.d.ts +5 -5
  510. package/package.json +46 -46
  511. package/dist/cjs/chartFunctions-9dce0ea3.js.map +0 -1
  512. package/dist/cjs/global-c22b1249.js.map +0 -1
  513. package/dist/cjs/http-service-494d81de.js.map +0 -1
  514. package/dist/cjs/interfaces-a3338581.js.map +0 -1
  515. package/dist/cjs/intl-e14dc0a1.js +0 -13
  516. package/dist/cjs/intl-e14dc0a1.js.map +0 -1
  517. package/dist/esm/chartFunctions-1df8043a.js.map +0 -1
  518. package/dist/esm/global-2c5c2727.js.map +0 -1
  519. package/dist/esm/http-service-3dc3b3e7.js.map +0 -1
  520. package/dist/esm/interfaces-2b97fab2.js.map +0 -1
  521. package/dist/esm/intl-4153b9ef.js +0 -11
  522. package/dist/esm/intl-4153b9ef.js.map +0 -1
  523. package/dist/esm-es5/chartFunctions-1df8043a.js.map +0 -1
  524. package/dist/esm-es5/global-2c5c2727.js +0 -2
  525. package/dist/esm-es5/global-2c5c2727.js.map +0 -1
  526. package/dist/esm-es5/http-service-3dc3b3e7.js.map +0 -1
  527. package/dist/esm-es5/interfaces-2b97fab2.js.map +0 -1
  528. package/dist/esm-es5/intl-4153b9ef.js +0 -2
  529. package/dist/esm-es5/intl-4153b9ef.js.map +0 -1
  530. package/dist/ripple/p-0400599e.system.entry.js.map +0 -1
  531. package/dist/ripple/p-075607ac.entry.js +0 -2
  532. package/dist/ripple/p-075607ac.entry.js.map +0 -1
  533. package/dist/ripple/p-08d17d5a.entry.js +0 -2
  534. package/dist/ripple/p-08d17d5a.entry.js.map +0 -1
  535. package/dist/ripple/p-0d36ceba.system.entry.js.map +0 -1
  536. package/dist/ripple/p-124da634.entry.js +0 -2
  537. package/dist/ripple/p-124da634.entry.js.map +0 -1
  538. package/dist/ripple/p-1aa16d42.js.map +0 -1
  539. package/dist/ripple/p-1be55579.system.entry.js.map +0 -1
  540. package/dist/ripple/p-20d0d019.entry.js.map +0 -1
  541. package/dist/ripple/p-219fbe2b.system.entry.js.map +0 -1
  542. package/dist/ripple/p-21bb563a.system.entry.js.map +0 -1
  543. package/dist/ripple/p-241d4d41.system.entry.js +0 -2
  544. package/dist/ripple/p-241d4d41.system.entry.js.map +0 -1
  545. package/dist/ripple/p-24ef6556.system.entry.js.map +0 -1
  546. package/dist/ripple/p-262713b9.entry.js.map +0 -1
  547. package/dist/ripple/p-28c12986.system.entry.js.map +0 -1
  548. package/dist/ripple/p-3f6c7e6c.entry.js.map +0 -1
  549. package/dist/ripple/p-42158d44.entry.js.map +0 -1
  550. package/dist/ripple/p-43f1298b.js.map +0 -1
  551. package/dist/ripple/p-47d223f1.system.entry.js.map +0 -1
  552. package/dist/ripple/p-4d30004f.entry.js +0 -2
  553. package/dist/ripple/p-4d30004f.entry.js.map +0 -1
  554. package/dist/ripple/p-58b1415e.system.js +0 -2
  555. package/dist/ripple/p-58b1415e.system.js.map +0 -1
  556. package/dist/ripple/p-5cda4e9c.system.entry.js +0 -2
  557. package/dist/ripple/p-5cda4e9c.system.entry.js.map +0 -1
  558. package/dist/ripple/p-64f15a9e.system.entry.js +0 -2
  559. package/dist/ripple/p-64f15a9e.system.entry.js.map +0 -1
  560. package/dist/ripple/p-6e6b5b2c.system.entry.js +0 -2
  561. package/dist/ripple/p-6e6b5b2c.system.entry.js.map +0 -1
  562. package/dist/ripple/p-70768add.entry.js.map +0 -1
  563. package/dist/ripple/p-76aafb99.system.entry.js.map +0 -1
  564. package/dist/ripple/p-7d0f3abe.entry.js.map +0 -1
  565. package/dist/ripple/p-8aa85021.system.entry.js +0 -2
  566. package/dist/ripple/p-8aa85021.system.entry.js.map +0 -1
  567. package/dist/ripple/p-8eebf787.entry.js.map +0 -1
  568. package/dist/ripple/p-96b0ca93.system.js +0 -2
  569. package/dist/ripple/p-96b0ca93.system.js.map +0 -1
  570. package/dist/ripple/p-980afed1.system.entry.js.map +0 -1
  571. package/dist/ripple/p-9d02957d.system.js.map +0 -1
  572. package/dist/ripple/p-adbeb6a8.system.entry.js +0 -2
  573. package/dist/ripple/p-adbeb6a8.system.entry.js.map +0 -1
  574. package/dist/ripple/p-b00991d9.system.entry.js.map +0 -1
  575. package/dist/ripple/p-b81ce905.system.entry.js.map +0 -1
  576. package/dist/ripple/p-bcba3ce8.entry.js.map +0 -1
  577. package/dist/ripple/p-bf808ec4.entry.js +0 -2
  578. package/dist/ripple/p-bf808ec4.entry.js.map +0 -1
  579. package/dist/ripple/p-c19ddc00.system.entry.js.map +0 -1
  580. package/dist/ripple/p-cc8ca6bd.system.js.map +0 -1
  581. package/dist/ripple/p-ce52357e.js +0 -2
  582. package/dist/ripple/p-ce52357e.js.map +0 -1
  583. package/dist/ripple/p-d0f5773a.entry.js +0 -2
  584. package/dist/ripple/p-d0f5773a.entry.js.map +0 -1
  585. package/dist/ripple/p-d5b0809e.entry.js.map +0 -1
  586. package/dist/ripple/p-d7b946ed.entry.js.map +0 -1
  587. package/dist/ripple/p-d7c55ce1.entry.js.map +0 -1
  588. package/dist/ripple/p-d7ffac2f.entry.js.map +0 -1
  589. package/dist/ripple/p-dbf657c5.js +0 -2
  590. package/dist/ripple/p-dbf657c5.js.map +0 -1
  591. package/dist/ripple/p-e1b812ed.entry.js +0 -2
  592. package/dist/ripple/p-e1b812ed.entry.js.map +0 -1
  593. package/dist/ripple/p-e5f84104.system.entry.js.map +0 -1
  594. package/dist/ripple/p-e6e7cb2d.entry.js.map +0 -1
  595. package/dist/ripple/p-e99a7f36.entry.js.map +0 -1
  596. package/dist/ripple/p-ed14d37c.system.entry.js +0 -2
  597. package/dist/ripple/p-ed14d37c.system.entry.js.map +0 -1
  598. package/dist/ripple/p-ee97c3f6.entry.js.map +0 -1
  599. package/dist/ripple/p-f3130941.entry.js +0 -2
  600. package/dist/ripple/p-f3130941.entry.js.map +0 -1
  601. package/dist/ripple/p-f36b1c58.system.entry.js.map +0 -1
  602. package/dist/ripple/p-f4a622a9.system.entry.js +0 -2
  603. package/dist/ripple/p-f4a622a9.system.entry.js.map +0 -1
  604. package/dist/ripple/p-f5df5903.system.js.map +0 -1
  605. package/dist/ripple/p-fd8070fb.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["wmActionMenuCss","ActionMenu","this","openUp","keysSoFar","searchIndex","keyClear","Object","defineProperty","prototype","el","itemsEl","shouldShiftRight","Array","from","querySelectorAll","tempActionMenuType","actionMenuType","buttonType","handleClickedItem","close","handleKeyUp","ev","moveUp","target","handleKeyDown","moveDown","detail","handleHomeKey","focusFirstItem","handleEndKey","focusLastItem","handleTabKey","isExpanded","handleEscKey","wmButtonEl","focus","handleKey","_this","key","preventDefault","open","window","requestAnimationFrame","handleMenuitemBlur","toElOrChild","relatedTarget","contains","event","CustomEvent","dispatchEvent","handleButtonBlur","stopPropagation","componentWillLoad","uid","id","generateId","console","warn","componentDidLoad","buttonText","error","tooltip","wmActionMenuLoaded","emit","menuLoaded","index","childItems","indexOf","focusItem","length","disabled","shouldOpenUp","classList","remove","returnFocus","forEach","i","focused","setTimeout","add","document","activeElement","tagName","item","map","findAndFocusItem","character","toUpperCase","clearKeysSoFarAfterDelay","nextMatch","findMatchInRange","clearTimeout","bind","list","startIndex","endIndex","n","label","innerText","render","h","Host","onBlur","class","getTextDir","internalButtonType","darkMode","undefined","labelForIdenticalButtons","icon","concat","onClick","ref","tooltipPosition","horizontalPosition","tabindex","role","wmMenuitemCss","Menuitem","descriptionCharLimit","toggleKeyingOn","isKeying","toggleKeyingOff","handleKeydown","modifierKeyUsed","altKey","ctrlKey","metaKey","isSingleCharacter","test","isCharacterEntry","wmKeyUpPressed","wmKeyDownPressed","click","wmEscKeyPressed","wmHomeKeyPressed","wmEndKeyPressed","wmTabKeyPressed","wmLetterPressed","handleClick","wmMenuitemClicked","handleBlur","wmMenuitemBlurred","setOnClick","onclick","onClickFunc","getIconCodeFromName","description","iconEl","innerHTML"],"sources":["src/components/wm-action-menu/wm-action-menu.scss?tag=wm-action-menu&encapsulation=shadow","src/components/wm-action-menu/wm-action-menu.tsx","src/components/wm-menuitem/wm-menuitem.scss?tag=wm-menuitem&encapsulation=shadow","src/components/wm-menuitem/wm-menuitem.tsx"],"sourcesContent":[":host {\r\n position: relative;\r\n display: inline-block;\r\n width: -moz-fit-content;\r\n width: fit-content;\r\n color: #575195;\r\n font-family: inherit;\r\n\r\n .sr-only {\r\n @include srOnly;\r\n }\r\n}\r\n\r\n:host(:focus) {\r\n outline: none;\r\n}\r\n\r\nwm-action-menu:focus {\r\n outline: none;\r\n}\r\n\r\n.dropdown {\r\n position: absolute;\r\n padding: 0;\r\n margin: rem-calc(4) 0;\r\n border-radius: 3px 3px 3px 3px;\r\n min-width: rem-calc(183);\r\n @include scale($xVal: 1, $yVal: 0);\r\n @include transition(transform 0.25s ease);\r\n @include transformOrigin(center top);\r\n visibility: hidden;\r\n\r\n &:focus {\r\n outline: none;\r\n }\r\n\r\n @include box-shadow(0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2));\r\n background: #fff;\r\n z-index: 10;\r\n text-align: left;\r\n\r\n &.open {\r\n @include scale($xVal: 1, $yVal: 1);\r\n visibility: visible;\r\n }\r\n\r\n &.open-up {\r\n bottom: 2.5rem;\r\n top: auto;\r\n @include transformOrigin(center bottom);\r\n }\r\n\r\n &.right {\r\n // anchoring to left corner means it opens on the right side\r\n left: 0;\r\n }\r\n\r\n &.left {\r\n right: 0;\r\n }\r\n\r\n white-space: nowrap;\r\n}\r\n","import { h, Component, Element, Listen, Prop, State, Event, EventEmitter, Host } from \"@stencil/core\";\r\nimport { generateId, getTextDir, shouldOpenUp, shouldShiftRight } from \"../../global/functions\";\r\n\r\n@Component({\r\n tag: \"wm-action-menu\",\r\n styleUrl: \"wm-action-menu.scss\",\r\n shadow: { delegatesFocus: true },\r\n})\r\nexport class ActionMenu {\r\n @Element() el!: HTMLWmActionMenuElement;\r\n private wmButtonEl!: HTMLWmButtonElement;\r\n private itemsEl?: HTMLDivElement;\r\n private uid!: string;\r\n private openUp: boolean = false;\r\n get horizontalPosition(): \"right\" | \"left\" {\r\n return !!this.el && !!this.itemsEl && shouldShiftRight(this.el, this.itemsEl!) ? \"right\" : \"left\";\r\n }\r\n get childItems(): HTMLWmMenuitemElement[] {\r\n return Array.from(this.el.querySelectorAll(\"wm-menuitem\"));\r\n }\r\n get internalButtonType(): string {\r\n return this.tempActionMenuType === \"icon\" || this.tempActionMenuType === \"text\"\r\n ? this.tempActionMenuType + \"only\"\r\n : this.tempActionMenuType;\r\n }\r\n\r\n @State() isExpanded = false;\r\n @Prop() tooltipPosition?:\r\n | \"top\"\r\n | \"bottom\"\r\n | \"left\"\r\n | \"right\"\r\n | \"bottom-left\"\r\n | \"bottom-right\"\r\n | \"top-right\"\r\n | \"top-left\";\r\n @Prop() actionMenuType: \"icon\" | \"text\" | \"selector\" | \"selector-primary\" | null = null;\r\n @Prop() buttonType: \"icon\" | \"text\" | \"selector\" | null = null; // deprecated in favor of actionMenuType\r\n get tempActionMenuType(): \"icon\" | \"text\" | \"selector\" | \"selector-primary\" {\r\n // uses of this getter should be replaced with this.actionMenuType when buttonType is fully phased out\r\n // don't forget to reset this.actionMenuTypes's default value to icon\r\n return this.actionMenuType || this.buttonType || \"icon\";\r\n }\r\n @Prop() buttonText?: string;\r\n @Prop({ reflect: true }) disabled: boolean = false;\r\n @Prop() tooltip?: string;\r\n @Prop() labelForIdenticalButtons?: string;\r\n @Prop() darkMode?: boolean;\r\n @Event({ composed: true, bubbles: true }) wmActionMenuLoaded!: EventEmitter;\r\n @Event({ composed: true, bubbles: true }) menuLoaded!: EventEmitter; // deprecated in favor of wmActionMenuLoaded\r\n\r\n private keysSoFar: string = \"\";\r\n private searchIndex: number = 0;\r\n private keyClear: number | null = null;\r\n\r\n @Listen(\"wmMenuitemClicked\")\r\n handleClickedItem() {\r\n this.close();\r\n }\r\n\r\n @Listen(\"wmKeyUpPressed\")\r\n handleKeyUp(ev: CustomEvent) {\r\n this.moveUp(ev.target as HTMLWmMenuitemElement);\r\n }\r\n\r\n @Listen(\"wmKeyDownPressed\")\r\n handleKeyDown(ev: CustomEvent) {\r\n this.moveDown(ev.detail);\r\n }\r\n\r\n @Listen(\"wmHomeKeyPressed\")\r\n handleHomeKey() {\r\n this.focusFirstItem();\r\n }\r\n\r\n @Listen(\"wmEndKeyPressed\")\r\n handleEndKey() {\r\n this.focusLastItem();\r\n }\r\n\r\n @Listen(\"wmTabKeyPressed\")\r\n handleTabKey() {\r\n if (this.isExpanded) {\r\n this.close();\r\n }\r\n }\r\n\r\n @Listen(\"wmEscKeyPressed\")\r\n handleEscKey() {\r\n this.close();\r\n this.wmButtonEl.focus();\r\n }\r\n\r\n @Listen(\"keydown\")\r\n handleKey(ev: KeyboardEvent) {\r\n switch (ev.key) {\r\n case \"ArrowDown\":\r\n if (!this.isExpanded) {\r\n ev.preventDefault();\r\n this.open();\r\n window.requestAnimationFrame(() => this.focusFirstItem());\r\n }\r\n break;\r\n case \"ArrowUp\":\r\n if (!this.isExpanded) {\r\n ev.preventDefault();\r\n this.open();\r\n window.requestAnimationFrame(() => this.focusLastItem());\r\n }\r\n break;\r\n }\r\n }\r\n\r\n @Listen(\"wmMenuitemBlurred\")\r\n handleMenuitemBlur(ev: CustomEvent): void {\r\n const toElOrChild = ev.detail.relatedTarget === this.el || this.el.contains(ev.detail.relatedTarget as Node);\r\n // if the Menuitem is blurred to something other than the component, emit a blur event with the appropriate relatedTarget\r\n // keeps our component's blur events accurate, and closes when focusing browser address bar\r\n if (!toElOrChild) {\r\n const event = new CustomEvent(\"blur\");\r\n // @ts-ignore\r\n event.relatedTarget = ev.detail.relatedTarget;\r\n this.el.dispatchEvent(event);\r\n }\r\n }\r\n\r\n handleButtonBlur(ev: FocusEvent) {\r\n const toElOrChild = ev.relatedTarget === this.el || this.el.contains(ev.relatedTarget as Node);\r\n if (toElOrChild) {\r\n // do not emit a blur event when opening the dropdown and focusing the Menuitems\r\n ev.stopPropagation();\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n this.uid = this.el.id ? this.el.id : generateId();\r\n\r\n if (this.buttonType) {\r\n console.warn(\r\n \"wm-action-menu: button-type has been deprecated as of v3.1.0. Please use action-menu-type instead.\"\r\n );\r\n }\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.tempActionMenuType !== \"icon\" && !this.buttonText) {\r\n console.error(\r\n \"wm-action-menu should have a valid button-text property when action-menu-type is set to 'text' or 'selector'\"\r\n );\r\n }\r\n\r\n if (this.tempActionMenuType === \"icon\" && !this.tooltip) {\r\n console.error(\"wm-action-menu should have a valid tooltip when action-menu-type is set to 'icon'\");\r\n }\r\n\r\n this.wmActionMenuLoaded.emit();\r\n this.menuLoaded.emit(); // deprecated\r\n }\r\n\r\n moveUp(el: HTMLWmMenuitemElement) {\r\n const index = this.childItems.indexOf(el);\r\n if (index === 0) {\r\n this.focusLastItem();\r\n } else {\r\n this.focusItem(this.childItems[index - 1]);\r\n }\r\n }\r\n\r\n moveDown(el: HTMLWmMenuitemElement) {\r\n const index = this.childItems.indexOf(el);\r\n if (index === this.childItems.length - 1) {\r\n this.focusFirstItem();\r\n } else {\r\n this.focusItem(this.childItems[index + 1]);\r\n }\r\n }\r\n\r\n open() {\r\n if (!this.disabled) {\r\n this.openUp = shouldOpenUp(this.el, this.itemsEl!);\r\n // action menu usually is on the right side of the screen,\r\n // so dropdown opens to the left (is anchored on the right corner)\r\n // if there is not enough space on the left and enough on the right though,\r\n // it will open on the right side\r\n\r\n this.isExpanded = true;\r\n this.itemsEl!.classList.remove(\"hidden\");\r\n window.requestAnimationFrame(() => this.focusFirstItem());\r\n }\r\n }\r\n\r\n close(returnFocus: boolean = true) {\r\n this.isExpanded = false;\r\n this.childItems.forEach((i) => (i.focused = false));\r\n\r\n window.setTimeout(() => {\r\n this.itemsEl!.classList.add(\"hidden\");\r\n }, 150);\r\n\r\n window.setTimeout(() => {\r\n // if dev omits to assign focus after an action is triggered,\r\n // the component brings the focus back on the button\r\n // Focus will only be lost (and go to the body) once the menuitem\r\n // is not visible anymore, so we need to wait for the transition to\r\n // finish and the hidden class to be applied.\r\n // also checking if focus stayed on the menuitem\r\n if (\r\n returnFocus &&\r\n (document.activeElement!.tagName === \"BODY\" || document.activeElement!.tagName === \"WM-MENUITEM\")\r\n ) {\r\n this.wmButtonEl.focus();\r\n }\r\n }, 250);\r\n }\r\n\r\n focusItem(item: HTMLWmMenuitemElement) {\r\n this.childItems.map((i: HTMLWmMenuitemElement) => (i.focused = i === item));\r\n item.focus && item.focus();\r\n }\r\n\r\n focusFirstItem() {\r\n this.focusItem(this.childItems[0]);\r\n }\r\n\r\n focusLastItem() {\r\n this.focusItem(this.childItems[this.childItems.length - 1]);\r\n }\r\n\r\n @Listen(\"wmLetterPressed\")\r\n findAndFocusItem(ev: CustomEvent) {\r\n const character = ev.detail.toUpperCase();\r\n this.focusFirstItem();\r\n if (!this.keysSoFar) {\r\n for (var i = 0; i < this.childItems.length; i++) {\r\n if (this.childItems[i] === document.activeElement) {\r\n this.searchIndex = i;\r\n }\r\n }\r\n }\r\n\r\n this.keysSoFar += character;\r\n this.clearKeysSoFarAfterDelay();\r\n\r\n var nextMatch = this.findMatchInRange(this.childItems, this.searchIndex + 1, this.childItems.length);\r\n if (!nextMatch) {\r\n nextMatch = this.findMatchInRange(this.childItems, 0, this.searchIndex);\r\n }\r\n if (nextMatch) {\r\n this.focusItem(nextMatch as HTMLWmMenuitemElement);\r\n }\r\n }\r\n\r\n clearKeysSoFarAfterDelay() {\r\n if (this.keyClear) {\r\n window.clearTimeout(this.keyClear);\r\n this.keyClear = null;\r\n }\r\n this.keyClear = window.setTimeout(\r\n function (this: ActionMenu) {\r\n this.keysSoFar = \"\";\r\n this.keyClear = null;\r\n }.bind(this),\r\n 500\r\n );\r\n }\r\n\r\n findMatchInRange(list: HTMLWmMenuitemElement[], startIndex: number, endIndex: number) {\r\n // Find the first item starting with the keysSoFar substring, searching in\r\n // the specified range of items\r\n for (var n = startIndex; n < endIndex; n++) {\r\n var label = list[n].innerText;\r\n if (label && label.toUpperCase().indexOf(this.keysSoFar) === 0) {\r\n return list[n];\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n render() {\r\n return (\r\n <Host onBlur={() => this.close(false)}>\r\n <div class={getTextDir()}>\r\n <wm-button\r\n button-type={this.internalButtonType}\r\n tooltip={this.tooltip}\r\n custom-background={this.darkMode ? \"dark\" : undefined}\r\n label-for-identical-buttons={this.labelForIdenticalButtons}\r\n icon={this.tempActionMenuType === \"icon\" ? \"f1d9\" : \"\"}\r\n id={`menubtn-${this.uid}`}\r\n onClick={() => (this.isExpanded ? this.close() : this.open())}\r\n onBlur={(ev) => this.handleButtonBlur(ev)}\r\n disabled={this.disabled}\r\n ref={(el) => (this.wmButtonEl = el as HTMLWmButtonElement)}\r\n tooltip-position={this.tooltipPosition || this.horizontalPosition}\r\n aria-haspopup=\"true\"\r\n aria-expanded={this.isExpanded ? \"true\" : \"false\"}\r\n aria-controls={`menu-${this.uid}`}\r\n >\r\n {this.buttonText}\r\n </wm-button>\r\n <div\r\n class={`dropdown ${this.openUp ? \"open-up\" : \"\"} ${this.horizontalPosition} ${\r\n this.isExpanded ? \"open\" : \"\"\r\n } hidden`}\r\n id={`menu-${this.uid}`}\r\n tabindex={-1}\r\n role=\"menu\"\r\n ref={(el) => (this.itemsEl = el)}\r\n >\r\n <slot />\r\n </div>\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n",":host,\r\nwm-menuitem {\r\n contain: content;\r\n font-family: inherit;\r\n\r\n .wrapper {\r\n display: block;\r\n min-width: rem-calc(140);\r\n cursor: pointer;\r\n padding: rem-calc(20);\r\n border-radius: 0px 0px 0px 0px;\r\n background: #fff;\r\n font-family: inherit;\r\n font-weight: 500;\r\n list-style: none;\r\n border-bottom: 2px solid rgba(#2e1b46, 0.05);\r\n color: $button-default-text;\r\n font-weight: 700;\r\n\r\n &:focus,\r\n &.focus {\r\n outline: none;\r\n background: #f4f3f6;\r\n }\r\n\r\n &:hover {\r\n background: #f4f3f6;\r\n outline: none;\r\n }\r\n\r\n .description {\r\n color: $charcoal;\r\n font-size: rem-calc(14);\r\n padding-top: rem-calc(8);\r\n white-space: normal;\r\n font-weight: 400;\r\n }\r\n\r\n &[aria-disabled=\"true\"] {\r\n font-style: italic;\r\n color: #6b6b6b;\r\n }\r\n\r\n &:not(:last-child) {\r\n border-bottom: 2px solid rgba(#2e1b46, 0.05);\r\n }\r\n }\r\n\r\n ::slotted {\r\n font-family: inherit;\r\n }\r\n\r\n .mdi {\r\n @include mdi-icon;\r\n display: inline-block;\r\n margin-right: rem-calc(10);\r\n pointer-events: none;\r\n }\r\n}\r\n\r\n:host(:focus),\r\nwm-menuitem:focus {\r\n outline: none;\r\n background: #f4f3f6;\r\n}\r\n\r\n//Set pointer events to none on host and element in shadow dom to disable menuitem\r\n:host([aria-disabled=\"true\"]),\r\nwm-menuitem[aria-disabled=\"true\"] {\r\n pointer-events: none;\r\n}\r\n","import { h, Component, Element, Event, EventEmitter, Listen, Prop, State, Host, Watch } from \"@stencil/core\";\r\nimport { getIconCodeFromName } from \"../../global/interfaces\";\r\n\r\n@Component({\r\n tag: \"wm-menuitem\",\r\n styleUrl: \"wm-menuitem.scss\",\r\n shadow: true,\r\n})\r\nexport class Menuitem {\r\n @Element() el!: HTMLWmMenuitemElement;\r\n private iconEl?: HTMLSpanElement;\r\n\r\n @Prop() disabled = false;\r\n @Prop() focused = false;\r\n @Prop({ mutable: true }) icon?: string = undefined;\r\n @Prop() description?: string = undefined;\r\n\r\n @Event() wmMenuitemClicked!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmKeyUpPressed!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmKeyDownPressed!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmEscKeyPressed!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmHomeKeyPressed!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmEndKeyPressed!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmPageDownItems!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmPageUpItems!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmTabKeyPressed!: EventEmitter<HTMLWmMenuitemElement>;\r\n @Event() wmLetterPressed!: EventEmitter;\r\n @Event() wmMenuitemBlurred!: EventEmitter<{ relatedTarget: EventTarget | null }>;\r\n private onClickFunc!: (this: GlobalEventHandlers, ev: MouseEvent) => any;\r\n private descriptionCharLimit = 100;\r\n\r\n @State() isKeying: boolean = false;\r\n\r\n @Listen(\"wmUserIsKeying\", { target: \"window\" })\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleKeyingOn() {\r\n this.isKeying = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotKeying\", { target: \"window\" })\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleKeyingOff() {\r\n this.isKeying = false;\r\n }\r\n\r\n @Listen(\"keydown\")\r\n handleKeydown(ev: KeyboardEvent) {\r\n const modifierKeyUsed = ev.altKey || ev.ctrlKey || ev.metaKey;\r\n const isSingleCharacter = /^.$/.test(ev.key);\r\n const isCharacterEntry = isSingleCharacter && !modifierKeyUsed;\r\n switch (ev.key) {\r\n case \"ArrowUp\":\r\n ev.preventDefault();\r\n this.wmKeyUpPressed.emit(this.el as HTMLWmMenuitemElement);\r\n break;\r\n case \"ArrowDown\":\r\n ev.preventDefault();\r\n this.wmKeyDownPressed.emit(this.el as HTMLWmMenuitemElement);\r\n break;\r\n case \"Enter\":\r\n ev.preventDefault();\r\n if (!this.disabled) {\r\n this.el.click();\r\n }\r\n break;\r\n case \"Escape\":\r\n ev.preventDefault();\r\n ev.stopPropagation(); // prevents closing of parent modal\r\n this.wmEscKeyPressed.emit();\r\n break;\r\n case \"Home\":\r\n ev.preventDefault();\r\n this.wmHomeKeyPressed.emit();\r\n break;\r\n case \"End\":\r\n ev.preventDefault();\r\n this.wmEndKeyPressed.emit();\r\n break;\r\n case \"Tab\":\r\n this.wmTabKeyPressed.emit();\r\n break;\r\n default:\r\n if (isCharacterEntry) {\r\n ev.preventDefault();\r\n this.wmLetterPressed.emit(ev.key);\r\n }\r\n }\r\n }\r\n\r\n @Listen(\"click\")\r\n handleClick() {\r\n if (!this.disabled) {\r\n this.wmMenuitemClicked.emit();\r\n }\r\n }\r\n\r\n @Listen(\"blur\")\r\n handleBlur(ev: FocusEvent) {\r\n this.wmMenuitemBlurred.emit({ relatedTarget: ev.relatedTarget });\r\n }\r\n\r\n @Watch(\"disabled\")\r\n setOnClick() {\r\n if (this.disabled && this.el.onclick) {\r\n this.onClickFunc = this.el.onclick;\r\n this.el.onclick = null;\r\n } else if (!this.disabled && this.onClickFunc) {\r\n this.el.onclick = this.onClickFunc;\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n if (this.icon) {\r\n // in case a name was passed instead of a code, convert it to code (for backwards compatibility)\r\n this.icon = getIconCodeFromName(this.icon);\r\n }\r\n\r\n if (this.description) {\r\n if (this.description.length > this.descriptionCharLimit) {\r\n console.error(`wm-menuitem description is above the character limit of ${this.descriptionCharLimit}`);\r\n }\r\n if (this.icon) {\r\n console.error(\"wm-menuitems with descriptions do not support the use of icons\");\r\n }\r\n }\r\n\r\n this.setOnClick();\r\n }\r\n\r\n componentDidLoad() {\r\n if (this.icon) {\r\n this.iconEl!.classList.add(\"mdi\");\r\n this.iconEl!.innerHTML = `&#x${this.icon};`;\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <Host tabindex={-1} role=\"menuitem\" aria-disabled={this.disabled ? \"true\" : null}>\r\n <div\r\n class={`wrapper ${this.focused && this.isKeying ? \"focus\" : \"\"}`}\r\n aria-disabled={this.disabled ? \"true\" : null}\r\n >\r\n <span ref={(el) => (this.iconEl = el)} />\r\n <slot />\r\n {this.description ? <div class=\"description\">{this.description}</div> : \"\"}\r\n </div>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"mappings":"gRAAA,IAAMA,gBAAkB,41D,ICQXC,WAAU,W,yJAKbC,KAAAC,OAAkB,MAsClBD,KAAAE,UAAoB,GACpBF,KAAAG,YAAsB,EACtBH,KAAAI,SAA0B,K,gBA3BZ,M,mDAU6D,K,gBACzB,K,wCAOb,M,uFA9B7CC,OAAAC,eAAIP,EAAAQ,UAAA,qBAAkB,C,IAAtB,WACE,QAASP,KAAKQ,MAAQR,KAAKS,SAAWC,iBAAiBV,KAAKQ,GAAIR,KAAKS,SAAY,QAAU,M,uCAE7FJ,OAAAC,eAAIP,EAAAQ,UAAA,aAAU,C,IAAd,WACE,OAAOI,MAAMC,KAAKZ,KAAKQ,GAAGK,iBAAiB,e,uCAE7CR,OAAAC,eAAIP,EAAAQ,UAAA,qBAAkB,C,IAAtB,WACE,OAAOP,KAAKc,qBAAuB,QAAUd,KAAKc,qBAAuB,OACrEd,KAAKc,mBAAqB,OAC1Bd,KAAKc,kB,uCAeXT,OAAAC,eAAIP,EAAAQ,UAAA,qBAAkB,C,IAAtB,WAGE,OAAOP,KAAKe,gBAAkBf,KAAKgB,YAAc,M,uCAenDjB,EAAAQ,UAAAU,kBAAA,WACEjB,KAAKkB,O,EAIPnB,EAAAQ,UAAAY,YAAA,SAAYC,GACVpB,KAAKqB,OAAOD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KQ,GAAGuI,QAAS,CACpC/I,KAAKgJ,YAAchJ,KAAKQ,GAAGuI,QAC3B/I,KAAKQ,GAAGuI,QAAU,I,MACb,IAAK/I,KAAKqE,UAAYrE,KAAKgJ,YAAa,CAC7ChJ,KAAKQ,GAAGuI,QAAU/I,KAAKgJ,W,GAI3B3B,EAAA9G,UAAA4C,kBAAA,WACE,GAAInD,KAAK4G,KAAM,CAEb5G,KAAK4G,KAAOqC,oBAAoBjJ,KAAK4G,K,CAGvC,GAAI5G,KAAKkJ,YAAa,CACpB,GAAIlJ,KAAKkJ,YAAY9E,OAASpE,KAAKsH,qBAAsB,CACvD/D,QAAQI,MAAM,2DAAAkD,OAA2D7G,KAAKsH,sB,CAEhF,GAAItH,KAAK4G,KAAM,CACbrD,QAAQI,MAAM,iE,EAIlB3D,KAAK8I,Y,EAGPzB,EAAA9G,UAAAkD,iBAAA,WACE,GAAIzD,KAAK4G,KAAM,CACb5G,KAAKmJ,OAAQ5E,UAAUO,IAAI,OAC3B9E,KAAKmJ,OAAQC,UAAY,MAAAvC,OAAM7G,KAAK4G,KAAI,I,GAI5CS,EAAA9G,UAAA2F,OAAA,eAAA9D,EAAApC,KACE,OACEmG,EAACC,KAAI,CAACc,UAAW,EAAGC,KAAK,WAAU,gBAAgBnH,KAAKqE,SAAW,OAAS,MAC1E8B,EAAA,OACEG,MAAO,WAAAO,OAAW7G,KAAK4E,SAAW5E,KAAKwH,SAAW,QAAU,IAAI,gBACjDxH,KAAKqE,SAAW,OAAS,MAExC8B,EAAA,QAAMY,IAAK,SAACvG,GAAE,OAAM4B,EAAK+G,OAAS3I,CAApB,IACd2F,EAAA,aACCnG,KAAKkJ,YAAc/C,EAAA,OAAKG,MAAM,eAAetG,KAAKkJ,aAAqB,I,yPAzI7D,G"}
1
+ {"version":3,"names":["wmActionMenuCss","ActionMenu","this","openUp","keysSoFar","searchIndex","keyClear","Object","defineProperty","prototype","el","itemsEl","shouldShiftRight","Array","from","querySelectorAll","tempActionMenuType","actionMenuType","buttonType","handleClickedItem","close","handleKeyUp","ev","moveUp","target","handleKeyDown","moveDown","detail","handleHomeKey","focusFirstItem","handleEndKey","focusLastItem","handleTabKey","isExpanded","handleEscKey","wmButtonEl","focus","handleKey","_this","key","preventDefault","open","window","requestAnimationFrame","handleMenuitemBlur","toElOrChild","relatedTarget","contains","event","CustomEvent","dispatchEvent","handleButtonBlur","stopPropagation","componentWillLoad","uid","id","generateId","console","warn","componentDidLoad","buttonText","error","tooltip","wmActionMenuLoaded","emit","menuLoaded","index","childItems","indexOf","focusItem","length","disabled","shouldOpenUp","classList","remove","returnFocus","forEach","i","focused","setTimeout","add","document","activeElement","tagName","item","map","findAndFocusItem","character","toUpperCase","clearKeysSoFarAfterDelay","nextMatch","findMatchInRange","clearTimeout","bind","list","startIndex","endIndex","n","label","innerText","render","h","Host","onBlur","class","getTextDir","internalButtonType","darkMode","undefined","labelForIdenticalButtons","icon","concat","onClick","ref","tooltipPosition","horizontalPosition","tabindex","role","wmMenuitemCss","Menuitem","descriptionCharLimit","toggleKeyingOn","isKeying","toggleKeyingOff","handleKeydown","modifierKeyUsed","altKey","ctrlKey","metaKey","isSingleCharacter","test","isCharacterEntry","wmKeyUpPressed","wmKeyDownPressed","click","wmEscKeyPressed","wmHomeKeyPressed","wmEndKeyPressed","wmTabKeyPressed","wmLetterPressed","handleClick","wmMenuitemClicked","handleBlur","wmMenuitemBlurred","setOnClick","onclick","onClickFunc","getIconCodeFromName","description","iconEl","innerHTML"],"sources":["src/components/wm-action-menu/wm-action-menu.scss?tag=wm-action-menu&encapsulation=shadow","src/components/wm-action-menu/wm-action-menu.tsx","src/components/wm-menuitem/wm-menuitem.scss?tag=wm-menuitem&encapsulation=shadow","src/components/wm-menuitem/wm-menuitem.tsx"],"sourcesContent":[":host {\n position: relative;\n display: inline-block;\n width: -moz-fit-content;\n width: fit-content;\n color: #575195;\n font-family: inherit;\n\n .sr-only {\n @include srOnly;\n }\n}\n\n:host(:focus) {\n outline: none;\n}\n\nwm-action-menu:focus {\n outline: none;\n}\n\n.dropdown {\n position: absolute;\n padding: 0;\n margin: rem-calc(4) 0;\n border-radius: 3px 3px 3px 3px;\n min-width: rem-calc(183);\n @include scale($xVal: 1, $yVal: 0);\n @include transition(transform 0.25s ease);\n @include transformOrigin(center top);\n visibility: hidden;\n\n &:focus {\n outline: none;\n }\n\n @include box-shadow(0 3px 14px 3px rgba(5, 3, 3, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2));\n background: #fff;\n z-index: 10;\n text-align: left;\n\n &.open {\n @include scale($xVal: 1, $yVal: 1);\n visibility: visible;\n }\n\n &.open-up {\n bottom: 2.5rem;\n top: auto;\n @include transformOrigin(center bottom);\n }\n\n &.right {\n // anchoring to left corner means it opens on the right side\n left: 0;\n }\n\n &.left {\n right: 0;\n }\n\n white-space: nowrap;\n}\n","import { h, Component, Element, Listen, Prop, State, Event, EventEmitter, Host } from \"@stencil/core\";\nimport { generateId, getTextDir, shouldOpenUp, shouldShiftRight } from \"../../global/functions\";\n\n@Component({\n tag: \"wm-action-menu\",\n styleUrl: \"wm-action-menu.scss\",\n shadow: { delegatesFocus: true },\n})\nexport class ActionMenu {\n @Element() el!: HTMLWmActionMenuElement;\n private wmButtonEl!: HTMLWmButtonElement;\n private itemsEl?: HTMLDivElement;\n private uid!: string;\n private openUp: boolean = false;\n get horizontalPosition(): \"right\" | \"left\" {\n return !!this.el && !!this.itemsEl && shouldShiftRight(this.el, this.itemsEl!) ? \"right\" : \"left\";\n }\n get childItems(): HTMLWmMenuitemElement[] {\n return Array.from(this.el.querySelectorAll(\"wm-menuitem\"));\n }\n get internalButtonType(): string {\n return this.tempActionMenuType === \"icon\" || this.tempActionMenuType === \"text\"\n ? this.tempActionMenuType + \"only\"\n : this.tempActionMenuType;\n }\n\n @State() isExpanded = false;\n @Prop() tooltipPosition?:\n | \"top\"\n | \"bottom\"\n | \"left\"\n | \"right\"\n | \"bottom-left\"\n | \"bottom-right\"\n | \"top-right\"\n | \"top-left\";\n @Prop() actionMenuType: \"icon\" | \"text\" | \"selector\" | \"selector-primary\" | null = null;\n @Prop() buttonType: \"icon\" | \"text\" | \"selector\" | null = null; // deprecated in favor of actionMenuType\n get tempActionMenuType(): \"icon\" | \"text\" | \"selector\" | \"selector-primary\" {\n // uses of this getter should be replaced with this.actionMenuType when buttonType is fully phased out\n // don't forget to reset this.actionMenuTypes's default value to icon\n return this.actionMenuType || this.buttonType || \"icon\";\n }\n @Prop() buttonText?: string;\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop() tooltip?: string;\n @Prop() labelForIdenticalButtons?: string;\n @Prop() darkMode?: boolean;\n @Event({ composed: true, bubbles: true }) wmActionMenuLoaded!: EventEmitter;\n @Event({ composed: true, bubbles: true }) menuLoaded!: EventEmitter; // deprecated in favor of wmActionMenuLoaded\n\n private keysSoFar: string = \"\";\n private searchIndex: number = 0;\n private keyClear: number | null = null;\n\n @Listen(\"wmMenuitemClicked\")\n handleClickedItem() {\n this.close();\n }\n\n @Listen(\"wmKeyUpPressed\")\n handleKeyUp(ev: CustomEvent) {\n this.moveUp(ev.target as HTMLWmMenuitemElement);\n }\n\n @Listen(\"wmKeyDownPressed\")\n handleKeyDown(ev: CustomEvent) {\n this.moveDown(ev.detail);\n }\n\n @Listen(\"wmHomeKeyPressed\")\n handleHomeKey() {\n this.focusFirstItem();\n }\n\n @Listen(\"wmEndKeyPressed\")\n handleEndKey() {\n this.focusLastItem();\n }\n\n @Listen(\"wmTabKeyPressed\")\n handleTabKey() {\n if (this.isExpanded) {\n this.close();\n }\n }\n\n @Listen(\"wmEscKeyPressed\")\n handleEscKey() {\n this.close();\n this.wmButtonEl.focus();\n }\n\n @Listen(\"keydown\")\n handleKey(ev: KeyboardEvent) {\n switch (ev.key) {\n case \"ArrowDown\":\n if (!this.isExpanded) {\n ev.preventDefault();\n this.open();\n window.requestAnimationFrame(() => this.focusFirstItem());\n }\n break;\n case \"ArrowUp\":\n if (!this.isExpanded) {\n ev.preventDefault();\n this.open();\n window.requestAnimationFrame(() => this.focusLastItem());\n }\n break;\n }\n }\n\n @Listen(\"wmMenuitemBlurred\")\n handleMenuitemBlur(ev: CustomEvent): void {\n const toElOrChild = ev.detail.relatedTarget === this.el || this.el.contains(ev.detail.relatedTarget as Node);\n // if the Menuitem is blurred to something other than the component, emit a blur event with the appropriate relatedTarget\n // keeps our component's blur events accurate, and closes when focusing browser address bar\n if (!toElOrChild) {\n const event = new CustomEvent(\"blur\");\n // @ts-ignore\n event.relatedTarget = ev.detail.relatedTarget;\n this.el.dispatchEvent(event);\n }\n }\n\n handleButtonBlur(ev: FocusEvent) {\n const toElOrChild = ev.relatedTarget === this.el || this.el.contains(ev.relatedTarget as Node);\n if (toElOrChild) {\n // do not emit a blur event when opening the dropdown and focusing the Menuitems\n ev.stopPropagation();\n }\n }\n\n componentWillLoad() {\n this.uid = this.el.id ? this.el.id : generateId();\n\n if (this.buttonType) {\n console.warn(\n \"wm-action-menu: button-type has been deprecated as of v3.1.0. Please use action-menu-type instead.\"\n );\n }\n }\n\n componentDidLoad() {\n if (this.tempActionMenuType !== \"icon\" && !this.buttonText) {\n console.error(\n \"wm-action-menu should have a valid button-text property when action-menu-type is set to 'text' or 'selector'\"\n );\n }\n\n if (this.tempActionMenuType === \"icon\" && !this.tooltip) {\n console.error(\"wm-action-menu should have a valid tooltip when action-menu-type is set to 'icon'\");\n }\n\n this.wmActionMenuLoaded.emit();\n this.menuLoaded.emit(); // deprecated\n }\n\n moveUp(el: HTMLWmMenuitemElement) {\n const index = this.childItems.indexOf(el);\n if (index === 0) {\n this.focusLastItem();\n } else {\n this.focusItem(this.childItems[index - 1]);\n }\n }\n\n moveDown(el: HTMLWmMenuitemElement) {\n const index = this.childItems.indexOf(el);\n if (index === this.childItems.length - 1) {\n this.focusFirstItem();\n } else {\n this.focusItem(this.childItems[index + 1]);\n }\n }\n\n open() {\n if (!this.disabled) {\n this.openUp = shouldOpenUp(this.el, this.itemsEl!);\n // action menu usually is on the right side of the screen,\n // so dropdown opens to the left (is anchored on the right corner)\n // if there is not enough space on the left and enough on the right though,\n // it will open on the right side\n\n this.isExpanded = true;\n this.itemsEl!.classList.remove(\"hidden\");\n window.requestAnimationFrame(() => this.focusFirstItem());\n }\n }\n\n close(returnFocus: boolean = true) {\n this.isExpanded = false;\n this.childItems.forEach((i) => (i.focused = false));\n\n window.setTimeout(() => {\n this.itemsEl!.classList.add(\"hidden\");\n }, 150);\n\n window.setTimeout(() => {\n // if dev omits to assign focus after an action is triggered,\n // the component brings the focus back on the button\n // Focus will only be lost (and go to the body) once the menuitem\n // is not visible anymore, so we need to wait for the transition to\n // finish and the hidden class to be applied.\n // also checking if focus stayed on the menuitem\n if (\n returnFocus &&\n (document.activeElement!.tagName === \"BODY\" || document.activeElement!.tagName === \"WM-MENUITEM\")\n ) {\n this.wmButtonEl.focus();\n }\n }, 250);\n }\n\n focusItem(item: HTMLWmMenuitemElement) {\n this.childItems.map((i: HTMLWmMenuitemElement) => (i.focused = i === item));\n item.focus && item.focus();\n }\n\n focusFirstItem() {\n this.focusItem(this.childItems[0]);\n }\n\n focusLastItem() {\n this.focusItem(this.childItems[this.childItems.length - 1]);\n }\n\n @Listen(\"wmLetterPressed\")\n findAndFocusItem(ev: CustomEvent) {\n const character = ev.detail.toUpperCase();\n this.focusFirstItem();\n if (!this.keysSoFar) {\n for (var i = 0; i < this.childItems.length; i++) {\n if (this.childItems[i] === document.activeElement) {\n this.searchIndex = i;\n }\n }\n }\n\n this.keysSoFar += character;\n this.clearKeysSoFarAfterDelay();\n\n var nextMatch = this.findMatchInRange(this.childItems, this.searchIndex + 1, this.childItems.length);\n if (!nextMatch) {\n nextMatch = this.findMatchInRange(this.childItems, 0, this.searchIndex);\n }\n if (nextMatch) {\n this.focusItem(nextMatch as HTMLWmMenuitemElement);\n }\n }\n\n clearKeysSoFarAfterDelay() {\n if (this.keyClear) {\n window.clearTimeout(this.keyClear);\n this.keyClear = null;\n }\n this.keyClear = window.setTimeout(\n function (this: ActionMenu) {\n this.keysSoFar = \"\";\n this.keyClear = null;\n }.bind(this),\n 500\n );\n }\n\n findMatchInRange(list: HTMLWmMenuitemElement[], startIndex: number, endIndex: number) {\n // Find the first item starting with the keysSoFar substring, searching in\n // the specified range of items\n for (var n = startIndex; n < endIndex; n++) {\n var label = list[n].innerText;\n if (label && label.toUpperCase().indexOf(this.keysSoFar) === 0) {\n return list[n];\n }\n }\n return null;\n }\n\n render() {\n return (\n <Host onBlur={() => this.close(false)}>\n <div class={getTextDir()}>\n <wm-button\n button-type={this.internalButtonType}\n tooltip={this.tooltip}\n custom-background={this.darkMode ? \"dark\" : undefined}\n label-for-identical-buttons={this.labelForIdenticalButtons}\n icon={this.tempActionMenuType === \"icon\" ? \"f1d9\" : \"\"}\n id={`menubtn-${this.uid}`}\n onClick={() => (this.isExpanded ? this.close() : this.open())}\n onBlur={(ev) => this.handleButtonBlur(ev)}\n disabled={this.disabled}\n ref={(el) => (this.wmButtonEl = el as HTMLWmButtonElement)}\n tooltip-position={this.tooltipPosition || this.horizontalPosition}\n aria-haspopup=\"true\"\n aria-expanded={this.isExpanded ? \"true\" : \"false\"}\n aria-controls={`menu-${this.uid}`}\n >\n {this.buttonText}\n </wm-button>\n <div\n class={`dropdown ${this.openUp ? \"open-up\" : \"\"} ${this.horizontalPosition} ${\n this.isExpanded ? \"open\" : \"\"\n } hidden`}\n id={`menu-${this.uid}`}\n tabindex={-1}\n role=\"menu\"\n ref={(el) => (this.itemsEl = el)}\n >\n <slot />\n </div>\n </div>\n </Host>\n );\n }\n}\n",":host,\nwm-menuitem {\n contain: content;\n font-family: inherit;\n\n .wrapper {\n display: block;\n min-width: rem-calc(140);\n cursor: pointer;\n padding: rem-calc(20);\n border-radius: 0px 0px 0px 0px;\n background: #fff;\n font-family: inherit;\n font-weight: 500;\n list-style: none;\n border-bottom: 2px solid rgba(#2e1b46, 0.05);\n color: $button-default-text;\n font-weight: 700;\n\n &:focus,\n &.focus {\n outline: none;\n background: #f4f3f6;\n }\n\n &:hover {\n background: #f4f3f6;\n outline: none;\n }\n\n .description {\n color: $charcoal;\n font-size: rem-calc(14);\n padding-top: rem-calc(8);\n white-space: normal;\n font-weight: 400;\n }\n\n &[aria-disabled=\"true\"] {\n font-style: italic;\n color: #6b6b6b;\n }\n\n &:not(:last-child) {\n border-bottom: 2px solid rgba(#2e1b46, 0.05);\n }\n }\n\n ::slotted {\n font-family: inherit;\n }\n\n .mdi {\n @include mdi-icon;\n display: inline-block;\n margin-right: rem-calc(10);\n pointer-events: none;\n }\n}\n\n:host(:focus),\nwm-menuitem:focus {\n outline: none;\n background: #f4f3f6;\n}\n\n//Set pointer events to none on host and element in shadow dom to disable menuitem\n:host([aria-disabled=\"true\"]),\nwm-menuitem[aria-disabled=\"true\"] {\n pointer-events: none;\n}\n","import { h, Component, Element, Event, EventEmitter, Listen, Prop, State, Host, Watch } from \"@stencil/core\";\nimport { getIconCodeFromName } from \"../../global/interfaces\";\n\n@Component({\n tag: \"wm-menuitem\",\n styleUrl: \"wm-menuitem.scss\",\n shadow: true,\n})\nexport class Menuitem {\n @Element() el!: HTMLWmMenuitemElement;\n private iconEl?: HTMLSpanElement;\n\n @Prop() disabled = false;\n @Prop() focused = false;\n @Prop({ mutable: true }) icon?: string = undefined;\n @Prop() description?: string = undefined;\n\n @Event() wmMenuitemClicked!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmKeyUpPressed!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmKeyDownPressed!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmEscKeyPressed!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmHomeKeyPressed!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmEndKeyPressed!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmPageDownItems!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmPageUpItems!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmTabKeyPressed!: EventEmitter<HTMLWmMenuitemElement>;\n @Event() wmLetterPressed!: EventEmitter;\n @Event() wmMenuitemBlurred!: EventEmitter<{ relatedTarget: EventTarget | null }>;\n private onClickFunc!: (this: GlobalEventHandlers, ev: MouseEvent) => any;\n private descriptionCharLimit = 100;\n\n @State() isKeying: boolean = false;\n\n @Listen(\"wmUserIsKeying\", { target: \"window\" })\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\n toggleKeyingOn() {\n this.isKeying = true;\n }\n\n @Listen(\"wmUserIsNotKeying\", { target: \"window\" })\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\n toggleKeyingOff() {\n this.isKeying = false;\n }\n\n @Listen(\"keydown\")\n handleKeydown(ev: KeyboardEvent) {\n const modifierKeyUsed = ev.altKey || ev.ctrlKey || ev.metaKey;\n const isSingleCharacter = /^.$/.test(ev.key);\n const isCharacterEntry = isSingleCharacter && !modifierKeyUsed;\n switch (ev.key) {\n case \"ArrowUp\":\n ev.preventDefault();\n this.wmKeyUpPressed.emit(this.el as HTMLWmMenuitemElement);\n break;\n case \"ArrowDown\":\n ev.preventDefault();\n this.wmKeyDownPressed.emit(this.el as HTMLWmMenuitemElement);\n break;\n case \"Enter\":\n ev.preventDefault();\n if (!this.disabled) {\n this.el.click();\n }\n break;\n case \"Escape\":\n ev.preventDefault();\n ev.stopPropagation(); // prevents closing of parent modal\n this.wmEscKeyPressed.emit();\n break;\n case \"Home\":\n ev.preventDefault();\n this.wmHomeKeyPressed.emit();\n break;\n case \"End\":\n ev.preventDefault();\n this.wmEndKeyPressed.emit();\n break;\n case \"Tab\":\n this.wmTabKeyPressed.emit();\n break;\n default:\n if (isCharacterEntry) {\n ev.preventDefault();\n this.wmLetterPressed.emit(ev.key);\n }\n }\n }\n\n @Listen(\"click\")\n handleClick() {\n if (!this.disabled) {\n this.wmMenuitemClicked.emit();\n }\n }\n\n @Listen(\"blur\")\n handleBlur(ev: FocusEvent) {\n this.wmMenuitemBlurred.emit({ relatedTarget: ev.relatedTarget });\n }\n\n @Watch(\"disabled\")\n setOnClick() {\n if (this.disabled && this.el.onclick) {\n this.onClickFunc = this.el.onclick;\n this.el.onclick = null;\n } else if (!this.disabled && this.onClickFunc) {\n this.el.onclick = this.onClickFunc;\n }\n }\n\n componentWillLoad() {\n if (this.icon) {\n // in case a name was passed instead of a code, convert it to code (for backwards compatibility)\n this.icon = getIconCodeFromName(this.icon);\n }\n\n if (this.description) {\n if (this.description.length > this.descriptionCharLimit) {\n console.error(`wm-menuitem description is above the character limit of ${this.descriptionCharLimit}`);\n }\n if (this.icon) {\n console.error(\"wm-menuitems with descriptions do not support the use of icons\");\n }\n }\n\n this.setOnClick();\n }\n\n componentDidLoad() {\n if (this.icon) {\n this.iconEl!.classList.add(\"mdi\");\n this.iconEl!.innerHTML = `&#x${this.icon};`;\n }\n }\n\n render() {\n return (\n <Host tabindex={-1} role=\"menuitem\" aria-disabled={this.disabled ? \"true\" : null}>\n <div\n class={`wrapper ${this.focused && this.isKeying ? \"focus\" : \"\"}`}\n aria-disabled={this.disabled ? \"true\" : null}\n >\n <span ref={(el) => (this.iconEl = el)} />\n <slot />\n {this.description ? <div class=\"description\">{this.description}</div> : \"\"}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gRAAA,IAAMA,gBAAkB,41D,ICQXC,WAAU,W,yJAKbC,KAAAC,OAAkB,MAsClBD,KAAAE,UAAoB,GACpBF,KAAAG,YAAsB,EACtBH,KAAAI,SAA0B,K,gBA3BZ,M,mDAU6D,K,gBACzB,K,wCAOb,M,uFA9B7CC,OAAAC,eAAIP,EAAAQ,UAAA,qBAAkB,C,IAAtB,WACE,QAASP,KAAKQ,MAAQR,KAAKS,SAAWC,iBAAiBV,KAAKQ,GAAIR,KAAKS,SAAY,QAAU,M,uCAE7FJ,OAAAC,eAAIP,EAAAQ,UAAA,aAAU,C,IAAd,WACE,OAAOI,MAAMC,KAAKZ,KAAKQ,GAAGK,iBAAiB,e,uCAE7CR,OAAAC,eAAIP,EAAAQ,UAAA,qBAAkB,C,IA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AAW,OAAS,MAExC8B,EAAA,QAAMY,IAAK,SAACvG,GAAE,OAAM4B,EAAK+G,OAAS3I,CAApB,IACd2F,EAAA,aACCnG,KAAKkJ,YAAc/C,EAAA,OAAKG,MAAM,eAAetG,KAAKkJ,aAAqB,I,yPAzI7D,G"}
@@ -1,2 +1,2 @@
1
- import{r as registerInstance,h,H as Host,g as getElement}from"./index-84a6ae22.js";import{g as getIconCodeFromName}from"./interfaces-2b97fab2.js";import{g as generateId,t as toBool,a as adjustTooltipPlacement}from"./functions-bb1309d0.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 .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.-selector:hover:not(:disabled):not(.disabled),wm-button .wm-button.-selector: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.-selector,wm-button .wm-button.-selector,:host .wm-button.-selector-primary,wm-button .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;background:transparent;border:2px solid #575195;border-radius: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:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,wm-button .wm-button.-selector,:host .wm-button.-selector-primary,wm-button .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,wm-button .wm-button.-selector:before,:host .wm-button.-selector-primary:before,wm-button .wm-button.-selector-primary: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%);font-size:0.875rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,wm-button .wm-button.-selector:active,:host .wm-button.-selector-primary:active,wm-button .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,wm-button .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner,wm-button .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,wm-button .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol,wm-button .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover,wm-button .wm-button.-selector.dark:not(:disabled):not(.disabled):hover,:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover,wm-button .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.-selector-primary,wm-button .wm-button.-selector-primary{background:#575195;color:#fff}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled),wm-button .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:#464177}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled),wm-button .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:#575195;background:#fff;border:2px solid #fff}: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.-selector,wm-button .wm-button:disabled.-selector,:host .wm-button.disabled.-selector,wm-button .wm-button.disabled.-selector{color:#737373}:host .wm-button:disabled.-selector-primary,wm-button .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary,wm-button .wm-button.disabled.-selector-primary{background:#737373;color:#fff;border-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.-selector,wm-button .wm-button:disabled.dark.-selector,: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.-selector,wm-button .wm-button.disabled.dark.-selector,: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.-selector-primary,wm-button .wm-button:disabled.dark.-selector-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.-selector-primary,wm-button .wm-button.disabled.dark.-selector-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;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;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.btnPos={old:{},new:{}};this.id=generateId();this.ariaPopup=false;this.disabled=false;this.buttonType=null;this.buttonStyle=null;this.icon=undefined;this.iconSize=undefined;this.iconRotate=undefined;this.iconFlip=undefined;this.tooltip=undefined;this.labelForIdenticalButtons=undefined;this.tooltipPosition="bottom-right";this.permanentlyDelete=false;this.textWrap=true;this.customBackground=undefined;this.tooltipVisible=false;this.isTabbing=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.tempButtonType==="textonly"&&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});Object.defineProperty(t.prototype,"buttonClasses",{get: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},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"iconStyles",{get:function(){var t="";t+=this.iconRotate?"rotate(".concat(this.iconRotate,"deg)"):"";t+=this.iconFlip==="horizontal"?"scaleX(-1)":"";t+=this.iconFlip==="vertical"?"scaleY(-1)":"";return Object.assign(Object.assign({},this.iconSize&&{fontSize:this.iconSize}),(this.iconRotate||this.iconFlip)&&{transform:t})},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","selector","selector-primary","pairpositive","pairnegative"].includes(t);if(!o){this.buttonType="secondary"}this.validateIcon()};t.prototype.validateDeprecatedType=function(t){var o=["primary","secondary","textonly","icononly","navigational","selector"].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);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");this.btnPos.new=this.buttonEl.getBoundingClientRect()};t.prototype.showTooltip=function(){var t=this;if(this.hasTooltip){var o="";if(this.isTruncated&&this.el.textContent){o=this.el.textContent}else if(this.tooltip){o=this.tooltip}this.tooltipEl.textContent=o;var n=o.match(/^[^\s]+$/);if(n){this.tooltipEl.classList.add("single-word");this.tooltipEl.style.setProperty("--wmTooltipMaxWidth","none")}else{this.tooltipEl.classList.remove("single-word");this.tooltipEl.style.removeProperty("--wmTooltipMaxWidth")}var e=adjustTooltipPlacement(this.tooltipPosition,this.buttonEl,this.tooltipEl);this.btnPos.old={};var i=this.tooltipEl.getBoundingClientRect();this.tooltipEl.style.transitionDelay="500ms";this.tooltipEl.style.opacity="1";setTimeout((function(){t.tooltipVisible=true;t.positionTooltip(e,i)}),50)}};t.prototype.positionTooltip=function(t,o){var n=this;if(this.tooltipVisible){window.requestAnimationFrame((function(){return n.positionTooltip(t,o)}))}this.btnPos.new=this.buttonEl.getBoundingClientRect();if(this.btnPos.new.top!=this.btnPos.old.top||this.btnPos.new.left!=this.btnPos.old.left){var e=(this.btnPos.new.height-o.height)/2;var i=(this.btnPos.new.width-o.width)/2;var r=this.btnPos.new.top+e;var a=this.btnPos.new.left+i;if(t.includes("top")){r=this.btnPos.new.top-o.height-8}if(t.includes("bottom")){r=this.btnPos.new.bottom+8}if(t.includes("left")){a=this.btnPos.new.left-o.width-8}if(t.includes("right")){a=this.btnPos.new.right+8}a=Math.max(a,24);this.tooltipEl.style.setProperty("--wmTooltipTop",r+"px");this.tooltipEl.style.setProperty("--wmTooltipLeft",a+"px");this.btnPos.old=this.btnPos.new}};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.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.buttonClasses),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.iconStyles},String.fromCodePoint(parseInt("0x".concat(this.icon)))),h("span",{class:"button-text"},h("slot",null))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{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,h,H as Host,g as getElement}from"./index-84a6ae22.js";import{g as getIconCodeFromName}from"./interfaces-61c6305b.js";import{g as generateId,t as toBool,a as adjustTooltipPlacement}from"./functions-dc9964aa.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 .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.-selector:hover:not(:disabled):not(.disabled),wm-button .wm-button.-selector: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.-selector,wm-button .wm-button.-selector,:host .wm-button.-selector-primary,wm-button .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;background:transparent;border:2px solid #575195;border-radius: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:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,wm-button .wm-button.-selector,:host .wm-button.-selector-primary,wm-button .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,wm-button .wm-button.-selector:before,:host .wm-button.-selector-primary:before,wm-button .wm-button.-selector-primary: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%);font-size:0.875rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,wm-button .wm-button.-selector:active,:host .wm-button.-selector-primary:active,wm-button .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,wm-button .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner,wm-button .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,wm-button .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol,wm-button .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover,wm-button .wm-button.-selector.dark:not(:disabled):not(.disabled):hover,:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover,wm-button .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.-selector-primary,wm-button .wm-button.-selector-primary{background:#575195;color:#fff}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled),wm-button .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:#464177}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled),wm-button .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:#575195;background:#fff;border:2px solid #fff}: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.-selector,wm-button .wm-button:disabled.-selector,:host .wm-button.disabled.-selector,wm-button .wm-button.disabled.-selector{color:#737373}:host .wm-button:disabled.-selector-primary,wm-button .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary,wm-button .wm-button.disabled.-selector-primary{background:#737373;color:#fff;border-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.-selector,wm-button .wm-button:disabled.dark.-selector,: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.-selector,wm-button .wm-button.disabled.dark.-selector,: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.-selector-primary,wm-button .wm-button:disabled.dark.-selector-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.-selector-primary,wm-button .wm-button.disabled.dark.-selector-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;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;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.btnPos={old:{},new:{}};this.id=generateId();this.ariaPopup=false;this.disabled=false;this.buttonType=null;this.buttonStyle=null;this.icon=undefined;this.iconSize=undefined;this.iconRotate=undefined;this.iconFlip=undefined;this.tooltip=undefined;this.labelForIdenticalButtons=undefined;this.tooltipPosition="bottom-right";this.permanentlyDelete=false;this.textWrap=true;this.customBackground=undefined;this.tooltipVisible=false;this.isTabbing=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.tempButtonType==="textonly"&&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});Object.defineProperty(t.prototype,"buttonClasses",{get: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},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"iconStyles",{get:function(){var t="";t+=this.iconRotate?"rotate(".concat(this.iconRotate,"deg)"):"";t+=this.iconFlip==="horizontal"?"scaleX(-1)":"";t+=this.iconFlip==="vertical"?"scaleY(-1)":"";return Object.assign(Object.assign({},this.iconSize&&{fontSize:this.iconSize}),(this.iconRotate||this.iconFlip)&&{transform:t})},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","selector","selector-primary","pairpositive","pairnegative"].includes(t);if(!o){this.buttonType="secondary"}this.validateIcon()};t.prototype.validateDeprecatedType=function(t){var o=["primary","secondary","textonly","icononly","navigational","selector"].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);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");this.btnPos.new=this.buttonEl.getBoundingClientRect()};t.prototype.showTooltip=function(){var t=this;if(this.hasTooltip){var o="";if(this.isTruncated&&this.el.textContent){o=this.el.textContent}else if(this.tooltip){o=this.tooltip}this.tooltipEl.textContent=o;var n=o.match(/^[^\s]+$/);if(n){this.tooltipEl.classList.add("single-word");this.tooltipEl.style.setProperty("--wmTooltipMaxWidth","none")}else{this.tooltipEl.classList.remove("single-word");this.tooltipEl.style.removeProperty("--wmTooltipMaxWidth")}var e=adjustTooltipPlacement(this.tooltipPosition,this.buttonEl,this.tooltipEl);this.btnPos.old={};var i=this.tooltipEl.getBoundingClientRect();this.tooltipEl.style.transitionDelay="500ms";this.tooltipEl.style.opacity="1";setTimeout((function(){t.tooltipVisible=true;t.positionTooltip(e,i)}),50)}};t.prototype.positionTooltip=function(t,o){var n=this;if(this.tooltipVisible){window.requestAnimationFrame((function(){return n.positionTooltip(t,o)}))}this.btnPos.new=this.buttonEl.getBoundingClientRect();if(this.btnPos.new.top!=this.btnPos.old.top||this.btnPos.new.left!=this.btnPos.old.left){var e=(this.btnPos.new.height-o.height)/2;var i=(this.btnPos.new.width-o.width)/2;var r=this.btnPos.new.top+e;var a=this.btnPos.new.left+i;if(t.includes("top")){r=this.btnPos.new.top-o.height-8}if(t.includes("bottom")){r=this.btnPos.new.bottom+8}if(t.includes("left")){a=this.btnPos.new.left-o.width-8}if(t.includes("right")){a=this.btnPos.new.right+8}a=Math.max(a,24);this.tooltipEl.style.setProperty("--wmTooltipTop",r+"px");this.tooltipEl.style.setProperty("--wmTooltipLeft",a+"px");this.btnPos.old=this.btnPos.new}};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.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.buttonClasses),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.iconStyles},String.fromCodePoint(parseInt("0x".concat(this.icon)))),h("span",{class:"button-text"},h("slot",null))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{buttonType:["validateType"],buttonStyle:["validateDeprecatedType"],icon:["updateIcon"]}},enumerable:false,configurable:true});return t}();Button.style=wmButtonCss;export{Button as wm_button};
2
2
  //# sourceMappingURL=wm-button.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["wmButtonCss","Button","this","btnPos","old","new","id","generateId","ariaPopup","Object","defineProperty","prototype","toBool","disabled","buttonType","buttonStyle","buttonEl","tempButtonType","offsetWidth","scrollWidth","isTruncated","document","getElementById","classes","permanentlyDelete","textWrap","isTabbing","customBackground","transformStyle","iconRotate","concat","iconFlip","assign","iconSize","fontSize","transform","toggleTabbingOn","toggleTabbingOff","handleScroll","tooltipVisible","hideTooltip","validateType","newValue","valid","includes","validateIcon","validateDeprecatedType","updateIcon","icon","getIconCodeFromName","console","error","tooltip","handleKeydown","ev","key","preventDefault","isDisabled","el","click","componentWillLoad","warn","componentDidLoad","body","classList","contains","getAttribute","getBoundingClientRect","showTooltip","_this","hasTooltip","tooltipText","textContent","tooltipEl","hasNoWhitespace","match","add","style","setProperty","remove","removeProperty","adjustedTooltipPlacement_1","adjustTooltipPlacement","tooltipPosition","tooltipRect_1","transitionDelay","opacity","setTimeout","positionTooltip","tPos","tooltipRect","window","requestAnimationFrame","top","left","vDiff","height","hDiff","width","vPos","hPos","bottom","right","Math","max","showTooltipForKeyboardUsers","getAriaLabel","labelForIdenticalButtons","render","h","Host","class","buttonClasses","ref","onMouseEnter","onMouseLeave","onFocus","onBlur","onClick","iconStyles","String","fromCodePoint","parseInt"],"sources":["src/components/wm-button/wm-button.scss?tag=wm-button&encapsulation=shadow","src/components/wm-button/wm-button.tsx"],"sourcesContent":[":host([disabled]),\r\n:host(.button-disabled) {\r\n pointer-events: none;\r\n}\r\n\r\n:host([disabled=\"false\"]) {\r\n // override disabled behavior from occuring when the string is \"false\", which would evaluate as truthy\r\n pointer-events: initial;\r\n}\r\n\r\n:host,\r\nwm-button {\r\n display: inline-block;\r\n width: fit-content;\r\n position: relative; // for tooltip\r\n @include box-shadow(none);\r\n\r\n .sr-only {\r\n @include srOnly;\r\n }\r\n\r\n @extend %wm-button;\r\n}\r\n","import { h, Component, Prop, Element, Listen, Watch, Host, State } from \"@stencil/core\";\r\nimport { getIconCodeFromName, TooltipPlacement, validButtonTypes } from \"../../global/interfaces\";\r\nimport { generateId, adjustTooltipPlacement, toBool } from \"../../global/functions\";\r\n\r\n@Component({\r\n tag: \"wm-button\",\r\n styleUrl: \"wm-button.scss\",\r\n shadow: { delegatesFocus: true },\r\n})\r\nexport class Button {\r\n @Element() el!: HTMLWmButtonElement;\r\n private buttonEl!: HTMLButtonElement;\r\n\r\n // icon and tooltip have reflect set to true. Without reflect, the react wrappers don't expose the attribute\r\n // and the component throws errors when they are required (when buttonType is icononly or navigational)\r\n @Prop({ reflect: true }) disabled: boolean = false;\r\n get isDisabled(): boolean {\r\n // string \"false\" needs to be treated as bool False because react wrappers convert bool to string.\r\n return toBool(this.disabled);\r\n }\r\n @Prop({ mutable: true }) buttonType: validButtonTypes | null = null;\r\n @Prop({ mutable: true }) buttonStyle: validButtonTypes | null = null; // DEPRECATED in favor of button-type\r\n get tempButtonType(): validButtonTypes {\r\n // uses of this getter should be replaced with this.buttonType when buttonStyle is fully phased out\r\n // don't forget to reset this.buttonType's default value to secondary\r\n return this.buttonType || this.buttonStyle || \"secondary\";\r\n }\r\n @Prop({ reflect: true, mutable: true }) icon?: string;\r\n @Prop() iconSize?: string;\r\n @Prop() iconRotate?: number;\r\n @Prop() iconFlip?: \"horizontal\" | \"vertical\";\r\n @Prop({ reflect: true, mutable: true }) tooltip?: string;\r\n @Prop() labelForIdenticalButtons?: string;\r\n @Prop() tooltipPosition: TooltipPlacement = \"bottom-right\";\r\n @Prop() permanentlyDelete?: boolean = false;\r\n @Prop() textWrap: boolean = true;\r\n @Prop() customBackground?: string;\r\n @Prop({ mutable: true }) tooltipVisible = false; // this is not part of the documented API but we need to expose as prop in order to change it from the focus method defined in WillLoad()\r\n\r\n @State() isTabbing: boolean = false;\r\n\r\n private btnPos: any = { old: {}, new: {} }; // for tooltip position. old and new are DOMRect\r\n private id = generateId();\r\n private ariaPopup: boolean = false;\r\n\r\n get isTruncated(): boolean {\r\n return (\r\n !!this.buttonEl && this.tempButtonType === \"textonly\" && this.buttonEl.offsetWidth < this.buttonEl.scrollWidth\r\n );\r\n }\r\n\r\n get hasTooltip(): boolean {\r\n // tooltip is only rendered for icononly and navigational types, or if the button text is truncated\r\n return this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\" || this.isTruncated;\r\n }\r\n\r\n get tooltipEl(): HTMLElement {\r\n return document.getElementById(\"wm-tooltip\")!;\r\n }\r\n\r\n get buttonClasses() {\r\n let classes = \"wm-button\";\r\n classes += this.permanentlyDelete ? \" -permanentlydelete\" : \"\";\r\n classes += this.tempButtonType ? \" -\" + this.tempButtonType : \" -secondary\";\r\n classes += this.textWrap ? \"\" : \" nowrap\";\r\n classes += this.isTabbing ? \" user-is-tabbing\" : \"\";\r\n classes += this.isTruncated ? \" -truncated\" : \"\";\r\n classes += this.customBackground === \"dark\" ? \" dark\" : \"\";\r\n return classes;\r\n }\r\n\r\n get iconStyles() {\r\n let transformStyle = \"\";\r\n transformStyle += this.iconRotate ? `rotate(${this.iconRotate}deg)` : \"\";\r\n transformStyle += this.iconFlip === \"horizontal\" ? `scaleX(-1)` : \"\";\r\n transformStyle += this.iconFlip === \"vertical\" ? `scaleY(-1)` : \"\";\r\n\r\n return {\r\n ...(this.iconSize && { fontSize: this.iconSize }),\r\n ...((this.iconRotate || this.iconFlip) && { transform: transformStyle }),\r\n };\r\n }\r\n\r\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\r\n toggleTabbingOn() {\r\n this.isTabbing = true;\r\n }\r\n\r\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\r\n toggleTabbingOff() {\r\n this.isTabbing = false;\r\n }\r\n\r\n // we need to listen for scroll events during the capture phase because they do not bubble up\r\n // there can be layouts where the main content has 100vh and overflows\r\n // in these cases window will register no scroll events unless we catch on they way down\r\n @Listen(\"scroll\", { target: \"window\", capture: true })\r\n handleScroll() {\r\n if (this.tooltipVisible) {\r\n this.hideTooltip();\r\n }\r\n }\r\n\r\n @Watch(\"buttonType\")\r\n validateType(newValue: string) {\r\n const valid = [\r\n \"primary\",\r\n \"secondary\",\r\n \"textonly\",\r\n \"icononly\",\r\n \"navigational\",\r\n \"selector\",\r\n \"selector-primary\",\r\n \"pairpositive\",\r\n \"pairnegative\",\r\n ].includes(newValue);\r\n\r\n if (!valid) {\r\n this.buttonType = \"secondary\";\r\n }\r\n\r\n this.validateIcon();\r\n }\r\n\r\n // remove entire watcher after buttonStyle has been fully removed\r\n @Watch(\"buttonStyle\")\r\n validateDeprecatedType(newValue: string) {\r\n const valid = [\"primary\", \"secondary\", \"textonly\", \"icononly\", \"navigational\", \"selector\"].includes(newValue);\r\n\r\n if (!valid) {\r\n this.buttonStyle = \"secondary\";\r\n }\r\n\r\n this.validateIcon();\r\n }\r\n\r\n @Watch(\"icon\")\r\n updateIcon() {\r\n this.icon = getIconCodeFromName(this.icon!);\r\n }\r\n\r\n validateIcon() {\r\n switch (this.tempButtonType) {\r\n case \"icononly\":\r\n case \"navigational\":\r\n // if the style is icononly or navigational...\r\n // - an icon must be provided\r\n if (!this.icon) {\r\n console.error(\r\n \"wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.\"\r\n );\r\n }\r\n // - if no tooltip text was passed and we couldn't generate one, throw an error\r\n if (!this.tooltip) {\r\n console.error(\r\n \"wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.\"\r\n );\r\n }\r\n break;\r\n case \"pairpositive\":\r\n this.icon = \"f12c\";\r\n break;\r\n case \"pairnegative\":\r\n this.icon = \"f739\";\r\n break;\r\n }\r\n }\r\n\r\n @Listen(\"keydown\")\r\n handleKeydown(ev: KeyboardEvent) {\r\n switch (ev.key) {\r\n case \"Enter\":\r\n ev.preventDefault();\r\n if (!this.isDisabled) {\r\n this.el.click();\r\n }\r\n break;\r\n }\r\n }\r\n\r\n componentWillLoad() {\r\n if (this.buttonStyle) {\r\n console.warn(\"wm-button: button-style has been deprecated as of v3.1.0. Please use button-type instead.\");\r\n }\r\n\r\n this.validateType(this.tempButtonType);\r\n\r\n if (this.icon) {\r\n this.icon = this.icon = getIconCodeFromName(this.icon);\r\n }\r\n }\r\n\r\n componentDidLoad() {\r\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\r\n this.toggleTabbingOn();\r\n }\r\n\r\n this.ariaPopup = !!this.el.getAttribute(\"aria-haspopup\");\r\n\r\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\r\n }\r\n\r\n showTooltip() {\r\n if (this.hasTooltip) {\r\n // set tooltip text\r\n let tooltipText = \"\";\r\n if (this.isTruncated && this.el.textContent) {\r\n // when truncated, tooltip text is the button's content\r\n tooltipText = this.el.textContent;\r\n } else if (this.tooltip) {\r\n // otherwise it is the tooltip property if present\r\n tooltipText = this.tooltip;\r\n }\r\n this.tooltipEl.textContent = tooltipText;\r\n\r\n // tooltip only has a maxWidth if it contains whitespace and can break\r\n const hasNoWhitespace = tooltipText.match(/^[^\\s]+$/);\r\n if (hasNoWhitespace) {\r\n this.tooltipEl.classList.add(\"single-word\");\r\n this.tooltipEl.style.setProperty(\"--wmTooltipMaxWidth\", \"none\");\r\n } else {\r\n this.tooltipEl.classList.remove(\"single-word\");\r\n this.tooltipEl.style.removeProperty(\"--wmTooltipMaxWidth\");\r\n }\r\n\r\n // adjust placement in case there is no space to place the tooltip where specified via prop\r\n // calculation outside of the function to keep it pure\r\n const adjustedTooltipPlacement = adjustTooltipPlacement(this.tooltipPosition, this.buttonEl, this.tooltipEl);\r\n\r\n this.btnPos.old = {};\r\n const tooltipRect = this.tooltipEl.getBoundingClientRect();\r\n this.tooltipEl.style.transitionDelay = \"500ms\";\r\n this.tooltipEl.style.opacity = \"1\";\r\n // This slight delay fixes an issue for keyboard users:\r\n // if they tab to a button out of screen bounds, the page scrolls\r\n // and hideTooltip() would be triggered before the tooltip would show\r\n setTimeout(() => {\r\n this.tooltipVisible = true;\r\n this.positionTooltip(adjustedTooltipPlacement, tooltipRect);\r\n }, 50);\r\n }\r\n }\r\n\r\n positionTooltip(tPos: string, tooltipRect: DOMRect) {\r\n if (this.tooltipVisible) {\r\n window.requestAnimationFrame(() => this.positionTooltip(tPos, tooltipRect));\r\n }\r\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\r\n if (this.btnPos.new.top != this.btnPos.old.top || this.btnPos.new.left != this.btnPos.old.left) {\r\n // this is to figure out how to offset, given the size of the button and of the tooltip\r\n // to get the center positions, calculate the difference between the button width and the tooltip width\r\n const vDiff = (this.btnPos.new.height - tooltipRect.height) / 2;\r\n const hDiff = (this.btnPos.new.width - tooltipRect.width) / 2;\r\n // the naming convention defaults to center in the absence of a value\r\n // Values \"top\" and \"bottom\" imply horizontal centering; Values \"right\" and \"left\" imply vertical centering\r\n // therefore we first set to center first, then adjust accordingly\r\n let vPos = this.btnPos.new.top + vDiff;\r\n let hPos = this.btnPos.new.left + hDiff;\r\n\r\n if (tPos.includes(\"top\")) {\r\n vPos = this.btnPos.new.top - tooltipRect.height - 8;\r\n }\r\n if (tPos.includes(\"bottom\")) {\r\n vPos = this.btnPos.new.bottom + 8;\r\n }\r\n if (tPos.includes(\"left\")) {\r\n hPos = this.btnPos.new.left - tooltipRect.width - 8;\r\n }\r\n if (tPos.includes(\"right\")) {\r\n hPos = this.btnPos.new.right + 8;\r\n }\r\n\r\n // after all positioning has been calculated, if tooltip is off-screen or closer than 24px it is readjusted\r\n // this only occurs when the tooltip is overflowing to the left and is positioned top or bottom\r\n // (button placed too far left, or screen size under 268px)\r\n hPos = Math.max(hPos, 24);\r\n this.tooltipEl.style.setProperty(\"--wmTooltipTop\", vPos + \"px\");\r\n this.tooltipEl.style.setProperty(\"--wmTooltipLeft\", hPos + \"px\");\r\n // this.tooltipEl.style.top = vPos + \"px\";\r\n // this.tooltipEl.style.left = hPos + \"px\";\r\n // this.tooltipEl.style.top = (vPos / 16).toString() + \"rem\";\r\n // this.tooltipEl.style.left = (hPos / 16).toString() + \"rem\";\r\n\r\n this.btnPos.old = this.btnPos.new;\r\n }\r\n }\r\n\r\n hideTooltip() {\r\n if (this.hasTooltip) {\r\n this.tooltipEl.style.transitionDelay = \"0s\";\r\n this.tooltipEl.style.opacity = \"0\";\r\n this.tooltipVisible = false;\r\n }\r\n }\r\n\r\n showTooltipForKeyboardUsers() {\r\n if (this.isTabbing) {\r\n this.showTooltip();\r\n }\r\n }\r\n\r\n getAriaLabel() {\r\n if (this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\") {\r\n return this.labelForIdenticalButtons || this.tooltip;\r\n }\r\n\r\n if (this.labelForIdenticalButtons) {\r\n return this.labelForIdenticalButtons;\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <Host class={this.isDisabled ? \"button-disabled\" : \"\"}>\r\n <button\r\n id={this.id}\r\n class={`${this.buttonClasses}`}\r\n disabled={this.isDisabled}\r\n ref={(el) => (this.buttonEl = el as HTMLButtonElement)}\r\n aria-label={this.getAriaLabel()}\r\n aria-hasPopup={this.ariaPopup ? \"menu\" : null}\r\n onMouseEnter={() => this.showTooltip()}\r\n onMouseLeave={() => this.hideTooltip()}\r\n onFocus={() => this.showTooltipForKeyboardUsers()}\r\n onBlur={() => this.hideTooltip()}\r\n onClick={() => this.hideTooltip()}\r\n >\r\n {this.icon && (\r\n <span class=\"mdi\" style={this.iconStyles}>\r\n {String.fromCodePoint(parseInt(`0x${this.icon}`))}\r\n </span>\r\n )}\r\n <span class=\"button-text\">\r\n <slot />\r\n </span>\r\n </button>\r\n </Host>\r\n );\r\n }\r\n}\r\n"],"mappings":"+OAAA,IAAMA,YAAc,q6lB,ICSPC,OAAM,W,uCAgCTC,KAAAC,OAAc,CAAEC,IAAK,GAAIC,IAAK,IAC9BH,KAAAI,G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AIvG,KAAKwB,UAAW,CAClBxB,KAAKkE,a,GAITnE,EAAAU,UAAA+F,aAAA,WACE,GAAIxG,KAAKe,iBAAmB,YAAcf,KAAKe,iBAAmB,eAAgB,CAChF,OAAOf,KAAKyG,0BAA4BzG,KAAKkD,O,CAG/C,GAAIlD,KAAKyG,yBAA0B,CACjC,OAAOzG,KAAKyG,wB,GAIhB1G,EAAAU,UAAAiG,OAAA,eAAAvC,EAAAnE,KACE,OACE2G,EAACC,KAAI,CAACC,MAAO7G,KAAKuD,WAAa,kBAAoB,IACjDoD,EAAA,UACEvG,GAAIJ,KAAKI,GACTyG,MAAO,GAAAjF,OAAG5B,KAAK8G,eACfnG,SAAUX,KAAKuD,WACfwD,IAAK,SAACvD,GAAE,OAAMW,EAAKrD,SAAW0C,CAAtB,EAA8C,aAC1CxD,KAAKwG,eAAc,gBAChBxG,KAAKM,UAAY,OAAS,KACzC0G,aAAc,WAAM,OAAA7C,EAAKD,aAAL,EACpB+C,aAAc,WAAM,OAAA9C,EAAK7B,aAAL,EACpB4E,QAAS,WAAM,OAAA/C,EAAKoC,6BAAL,EACfY,OAAQ,WAAM,OAAAhD,EAAK7B,aAAL,EACd8E,QAAS,WAAM,OAAAjD,EAAK7B,aAAL,GAEdtC,KAAK8C,MACJ6D,EAAA,QAAME,MAAM,MAAMlC,MAAO3E,KAAKqH,YAC3BC,OAAOC,cAAcC,SAAS,KAAA5F,OAAK5B,KAAK8C,SAG7C6D,EAAA,QAAME,MAAM,eACVF,EAAA,e,maApUO,G"}
1
+ {"version":3,"names":["wmButtonCss","Button","this","btnPos","old","new","id","generateId","ariaPopup","Object","defineProperty","prototype","toBool","disabled","buttonType","buttonStyle","buttonEl","tempButtonType","offsetWidth","scrollWidth","isTruncated","document","getElementById","classes","permanentlyDelete","textWrap","isTabbing","customBackground","transformStyle","iconRotate","concat","iconFlip","assign","iconSize","fontSize","transform","toggleTabbingOn","toggleTabbingOff","handleScroll","tooltipVisible","hideTooltip","validateType","newValue","valid","includes","validateIcon","validateDeprecatedType","updateIcon","icon","getIconCodeFromName","console","error","tooltip","handleKeydown","ev","key","preventDefault","isDisabled","el","click","componentWillLoad","warn","componentDidLoad","body","classList","contains","getAttribute","getBoundingClientRect","showTooltip","_this","hasTooltip","tooltipText","textContent","tooltipEl","hasNoWhitespace","match","add","style","setProperty","remove","removeProperty","adjustedTooltipPlacement_1","adjustTooltipPlacement","tooltipPosition","tooltipRect_1","transitionDelay","opacity","setTimeout","positionTooltip","tPos","tooltipRect","window","requestAnimationFrame","top","left","vDiff","height","hDiff","width","vPos","hPos","bottom","right","Math","max","showTooltipForKeyboardUsers","getAriaLabel","labelForIdenticalButtons","render","h","Host","class","buttonClasses","ref","onMouseEnter","onMouseLeave","onFocus","onBlur","onClick","iconStyles","String","fromCodePoint","parseInt"],"sources":["src/components/wm-button/wm-button.scss?tag=wm-button&encapsulation=shadow","src/components/wm-button/wm-button.tsx"],"sourcesContent":[":host([disabled]),\n:host(.button-disabled) {\n pointer-events: none;\n}\n\n:host([disabled=\"false\"]) {\n // override disabled behavior from occuring when the string is \"false\", which would evaluate as truthy\n pointer-events: initial;\n}\n\n:host,\nwm-button {\n display: inline-block;\n width: fit-content;\n position: relative; // for tooltip\n @include box-shadow(none);\n\n .sr-only {\n @include srOnly;\n }\n\n @extend %wm-button;\n}\n","import { h, Component, Prop, Element, Listen, Watch, Host, State } from \"@stencil/core\";\nimport { getIconCodeFromName, TooltipPlacement, validButtonTypes } from \"../../global/interfaces\";\nimport { generateId, adjustTooltipPlacement, toBool } from \"../../global/functions\";\n\n@Component({\n tag: \"wm-button\",\n styleUrl: \"wm-button.scss\",\n shadow: { delegatesFocus: true },\n})\nexport class Button {\n @Element() el!: HTMLWmButtonElement;\n private buttonEl!: HTMLButtonElement;\n\n // icon and tooltip have reflect set to true. Without reflect, the react wrappers don't expose the attribute\n // and the component throws errors when they are required (when buttonType is icononly or navigational)\n @Prop({ reflect: true }) disabled: boolean = false;\n get isDisabled(): boolean {\n // string \"false\" needs to be treated as bool False because react wrappers convert bool to string.\n return toBool(this.disabled);\n }\n @Prop({ mutable: true }) buttonType: validButtonTypes | null = null;\n @Prop({ mutable: true }) buttonStyle: validButtonTypes | null = null; // DEPRECATED in favor of button-type\n get tempButtonType(): validButtonTypes {\n // uses of this getter should be replaced with this.buttonType when buttonStyle is fully phased out\n // don't forget to reset this.buttonType's default value to secondary\n return this.buttonType || this.buttonStyle || \"secondary\";\n }\n @Prop({ reflect: true, mutable: true }) icon?: string;\n @Prop() iconSize?: string;\n @Prop() iconRotate?: number;\n @Prop() iconFlip?: \"horizontal\" | \"vertical\";\n @Prop({ reflect: true, mutable: true }) tooltip?: string;\n @Prop() labelForIdenticalButtons?: string;\n @Prop() tooltipPosition: TooltipPlacement = \"bottom-right\";\n @Prop() permanentlyDelete?: boolean = false;\n @Prop() textWrap: boolean = true;\n @Prop() customBackground?: string;\n @Prop({ mutable: true }) tooltipVisible = false; // this is not part of the documented API but we need to expose as prop in order to change it from the focus method defined in WillLoad()\n\n @State() isTabbing: boolean = false;\n\n private btnPos: any = { old: {}, new: {} }; // for tooltip position. old and new are DOMRect\n private id = generateId();\n private ariaPopup: boolean = false;\n\n get isTruncated(): boolean {\n return (\n !!this.buttonEl && this.tempButtonType === \"textonly\" && this.buttonEl.offsetWidth < this.buttonEl.scrollWidth\n );\n }\n\n get hasTooltip(): boolean {\n // tooltip is only rendered for icononly and navigational types, or if the button text is truncated\n return this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\" || this.isTruncated;\n }\n\n get tooltipEl(): HTMLElement {\n return document.getElementById(\"wm-tooltip\")!;\n }\n\n get buttonClasses() {\n let classes = \"wm-button\";\n classes += this.permanentlyDelete ? \" -permanentlydelete\" : \"\";\n classes += this.tempButtonType ? \" -\" + this.tempButtonType : \" -secondary\";\n classes += this.textWrap ? \"\" : \" nowrap\";\n classes += this.isTabbing ? \" user-is-tabbing\" : \"\";\n classes += this.isTruncated ? \" -truncated\" : \"\";\n classes += this.customBackground === \"dark\" ? \" dark\" : \"\";\n return classes;\n }\n\n get iconStyles() {\n let transformStyle = \"\";\n transformStyle += this.iconRotate ? `rotate(${this.iconRotate}deg)` : \"\";\n transformStyle += this.iconFlip === \"horizontal\" ? `scaleX(-1)` : \"\";\n transformStyle += this.iconFlip === \"vertical\" ? `scaleY(-1)` : \"\";\n\n return {\n ...(this.iconSize && { fontSize: this.iconSize }),\n ...((this.iconRotate || this.iconFlip) && { transform: transformStyle }),\n };\n }\n\n @Listen(\"wmUserIsTabbing\", { target: \"window\" })\n toggleTabbingOn() {\n this.isTabbing = true;\n }\n\n @Listen(\"wmUserIsNotTabbing\", { target: \"window\" })\n toggleTabbingOff() {\n this.isTabbing = false;\n }\n\n // we need to listen for scroll events during the capture phase because they do not bubble up\n // there can be layouts where the main content has 100vh and overflows\n // in these cases window will register no scroll events unless we catch on they way down\n @Listen(\"scroll\", { target: \"window\", capture: true })\n handleScroll() {\n if (this.tooltipVisible) {\n this.hideTooltip();\n }\n }\n\n @Watch(\"buttonType\")\n validateType(newValue: string) {\n const valid = [\n \"primary\",\n \"secondary\",\n \"textonly\",\n \"icononly\",\n \"navigational\",\n \"selector\",\n \"selector-primary\",\n \"pairpositive\",\n \"pairnegative\",\n ].includes(newValue);\n\n if (!valid) {\n this.buttonType = \"secondary\";\n }\n\n this.validateIcon();\n }\n\n // remove entire watcher after buttonStyle has been fully removed\n @Watch(\"buttonStyle\")\n validateDeprecatedType(newValue: string) {\n const valid = [\"primary\", \"secondary\", \"textonly\", \"icononly\", \"navigational\", \"selector\"].includes(newValue);\n\n if (!valid) {\n this.buttonStyle = \"secondary\";\n }\n\n this.validateIcon();\n }\n\n @Watch(\"icon\")\n updateIcon() {\n this.icon = getIconCodeFromName(this.icon!);\n }\n\n validateIcon() {\n switch (this.tempButtonType) {\n case \"icononly\":\n case \"navigational\":\n // if the style is icononly or navigational...\n // - an icon must be provided\n if (!this.icon) {\n console.error(\n \"wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'.\"\n );\n }\n // - if no tooltip text was passed and we couldn't generate one, throw an error\n if (!this.tooltip) {\n console.error(\n \"wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'.\"\n );\n }\n break;\n case \"pairpositive\":\n this.icon = \"f12c\";\n break;\n case \"pairnegative\":\n this.icon = \"f739\";\n break;\n }\n }\n\n @Listen(\"keydown\")\n handleKeydown(ev: KeyboardEvent) {\n switch (ev.key) {\n case \"Enter\":\n ev.preventDefault();\n if (!this.isDisabled) {\n this.el.click();\n }\n break;\n }\n }\n\n componentWillLoad() {\n if (this.buttonStyle) {\n console.warn(\"wm-button: button-style has been deprecated as of v3.1.0. Please use button-type instead.\");\n }\n\n this.validateType(this.tempButtonType);\n\n if (this.icon) {\n this.icon = this.icon = getIconCodeFromName(this.icon);\n }\n }\n\n componentDidLoad() {\n if (document.body.classList.contains(\"wmcl-user-is-tabbing\")) {\n this.toggleTabbingOn();\n }\n\n this.ariaPopup = !!this.el.getAttribute(\"aria-haspopup\");\n\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\n }\n\n showTooltip() {\n if (this.hasTooltip) {\n // set tooltip text\n let tooltipText = \"\";\n if (this.isTruncated && this.el.textContent) {\n // when truncated, tooltip text is the button's content\n tooltipText = this.el.textContent;\n } else if (this.tooltip) {\n // otherwise it is the tooltip property if present\n tooltipText = this.tooltip;\n }\n this.tooltipEl.textContent = tooltipText;\n\n // tooltip only has a maxWidth if it contains whitespace and can break\n const hasNoWhitespace = tooltipText.match(/^[^\\s]+$/);\n if (hasNoWhitespace) {\n this.tooltipEl.classList.add(\"single-word\");\n this.tooltipEl.style.setProperty(\"--wmTooltipMaxWidth\", \"none\");\n } else {\n this.tooltipEl.classList.remove(\"single-word\");\n this.tooltipEl.style.removeProperty(\"--wmTooltipMaxWidth\");\n }\n\n // adjust placement in case there is no space to place the tooltip where specified via prop\n // calculation outside of the function to keep it pure\n const adjustedTooltipPlacement = adjustTooltipPlacement(this.tooltipPosition, this.buttonEl, this.tooltipEl);\n\n this.btnPos.old = {};\n const tooltipRect = this.tooltipEl.getBoundingClientRect();\n this.tooltipEl.style.transitionDelay = \"500ms\";\n this.tooltipEl.style.opacity = \"1\";\n // This slight delay fixes an issue for keyboard users:\n // if they tab to a button out of screen bounds, the page scrolls\n // and hideTooltip() would be triggered before the tooltip would show\n setTimeout(() => {\n this.tooltipVisible = true;\n this.positionTooltip(adjustedTooltipPlacement, tooltipRect);\n }, 50);\n }\n }\n\n positionTooltip(tPos: string, tooltipRect: DOMRect) {\n if (this.tooltipVisible) {\n window.requestAnimationFrame(() => this.positionTooltip(tPos, tooltipRect));\n }\n this.btnPos.new = this.buttonEl.getBoundingClientRect();\n if (this.btnPos.new.top != this.btnPos.old.top || this.btnPos.new.left != this.btnPos.old.left) {\n // this is to figure out how to offset, given the size of the button and of the tooltip\n // to get the center positions, calculate the difference between the button width and the tooltip width\n const vDiff = (this.btnPos.new.height - tooltipRect.height) / 2;\n const hDiff = (this.btnPos.new.width - tooltipRect.width) / 2;\n // the naming convention defaults to center in the absence of a value\n // Values \"top\" and \"bottom\" imply horizontal centering; Values \"right\" and \"left\" imply vertical centering\n // therefore we first set to center first, then adjust accordingly\n let vPos = this.btnPos.new.top + vDiff;\n let hPos = this.btnPos.new.left + hDiff;\n\n if (tPos.includes(\"top\")) {\n vPos = this.btnPos.new.top - tooltipRect.height - 8;\n }\n if (tPos.includes(\"bottom\")) {\n vPos = this.btnPos.new.bottom + 8;\n }\n if (tPos.includes(\"left\")) {\n hPos = this.btnPos.new.left - tooltipRect.width - 8;\n }\n if (tPos.includes(\"right\")) {\n hPos = this.btnPos.new.right + 8;\n }\n\n // after all positioning has been calculated, if tooltip is off-screen or closer than 24px it is readjusted\n // this only occurs when the tooltip is overflowing to the left and is positioned top or bottom\n // (button placed too far left, or screen size under 268px)\n hPos = Math.max(hPos, 24);\n this.tooltipEl.style.setProperty(\"--wmTooltipTop\", vPos + \"px\");\n this.tooltipEl.style.setProperty(\"--wmTooltipLeft\", hPos + \"px\");\n // this.tooltipEl.style.top = vPos + \"px\";\n // this.tooltipEl.style.left = hPos + \"px\";\n // this.tooltipEl.style.top = (vPos / 16).toString() + \"rem\";\n // this.tooltipEl.style.left = (hPos / 16).toString() + \"rem\";\n\n this.btnPos.old = this.btnPos.new;\n }\n }\n\n hideTooltip() {\n if (this.hasTooltip) {\n this.tooltipEl.style.transitionDelay = \"0s\";\n this.tooltipEl.style.opacity = \"0\";\n this.tooltipVisible = false;\n }\n }\n\n showTooltipForKeyboardUsers() {\n if (this.isTabbing) {\n this.showTooltip();\n }\n }\n\n getAriaLabel() {\n if (this.tempButtonType === \"icononly\" || this.tempButtonType === \"navigational\") {\n return this.labelForIdenticalButtons || this.tooltip;\n }\n\n if (this.labelForIdenticalButtons) {\n return this.labelForIdenticalButtons;\n }\n }\n\n render() {\n return (\n <Host class={this.isDisabled ? \"button-disabled\" : \"\"}>\n <button\n id={this.id}\n class={`${this.buttonClasses}`}\n disabled={this.isDisabled}\n ref={(el) => (this.buttonEl = el as HTMLButtonElement)}\n aria-label={this.getAriaLabel()}\n aria-hasPopup={this.ariaPopup ? \"menu\" : null}\n onMouseEnter={() => this.showTooltip()}\n onMouseLeave={() => this.hideTooltip()}\n onFocus={() => this.showTooltipForKeyboardUsers()}\n onBlur={() => this.hideTooltip()}\n onClick={() => this.hideTooltip()}\n >\n {this.icon && (\n <span class=\"mdi\" style={this.iconStyles}>\n {String.fromCodePoint(parseInt(`0x${this.icon}`))}\n </span>\n )}\n <span class=\"button-text\">\n <slot />\n </span>\n </button>\n </Host>\n );\n }\n}\n"],"mappings":"+OAAA,IAAMA,YAAc,q6lB,ICSPC,OAAM,W,uCAgCTC,KAAAC,OAAc,CAAEC,IAAK,GAAIC,IAAK,IAC9BH,KAAAI,GAAKC,aACLL,KAAAM,UAAqB,M,cA5BgB,M,gBAKkB,K,iBACC,K,kLAYpB,e,uBACN,M,cACV,K,oDAEc,M,eAEZ,K,CAvB9BC,OAAAC,eAAIT,E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ChF,OAAOf,KAAKyG,0BAA4BzG,KAAKkD,O,CAG/C,GAAIlD,KAAKyG,yBAA0B,CACjC,OAAOzG,KAAKyG,wB,GAIhB1G,EAAAU,UAAAiG,OAAA,eAAAvC,EAAAnE,KACE,OACE2G,EAACC,KAAI,CAACC,MAAO7G,KAAKuD,WAAa,kBAAoB,IACjDoD,EAAA,UACEvG,GAAIJ,KAAKI,GACTyG,MAAO,GAAAjF,OAAG5B,KAAK8G,eACfnG,SAAUX,KAAKuD,WACfwD,IAAK,SAACvD,GAAE,OAAMW,EAAKrD,SAAW0C,CAAtB,EAA8C,aAC1CxD,KAAKwG,eAAc,gBAChBxG,KAAKM,UAAY,OAAS,KACzC0G,aAAc,WAAM,OAAA7C,EAAKD,aAAL,EACpB+C,aAAc,WAAM,OAAA9C,EAAK7B,aAAL,EACpB4E,QAAS,WAAM,OAAA/C,EAAKoC,6BAAL,EACfY,OAAQ,WAAM,OAAAhD,EAAK7B,aAAL,EACd8E,QAAS,WAAM,OAAAjD,EAAK7B,aAAL,GAEdtC,KAAK8C,MACJ6D,EAAA,QAAME,MAAM,MAAMlC,MAAO3E,KAAKqH,YAC3BC,OAAOC,cAAcC,SAAS,KAAA5F,OAAK5B,KAAK8C,SAG7C6D,EAAA,QAAME,MAAM,eACVF,EAAA,e,maApUO,G"}
@@ -1 +1 @@
1
- {"version":3,"names":["ChartSlice","prototype","componentDidLoad","parseInt","this","amount","legend","Error","componentDidUpdate","wmChartSliceUpdated","emit"],"sources":["src/components/charts/wm-chart/wm-chart-slice.tsx"],"sourcesContent":["import { Component, Prop, Event, EventEmitter } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"wm-chart-slice\",\r\n})\r\nexport class ChartSlice {\r\n @Prop() legend?: string;\r\n @Prop() amount?: string;\r\n @Prop() popoverTitle?: string;\r\n @Prop() popoverText?: string;\r\n @Prop() popoverButtonText?: string;\r\n\r\n @Event() wmChartSliceUpdated!: EventEmitter<void>;\r\n\r\n componentDidLoad() {\r\n if (parseInt(this.amount!) > 0 && !this.legend) {\r\n throw new Error(\r\n \"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\"\r\n );\r\n }\r\n }\r\n\r\n componentDidUpdate() {\r\n this.wmChartSliceUpdated.emit();\r\n }\r\n}\r\n"],"mappings":"4EAKaA,WAAU,W,8OASrBA,EAAAC,UAAAC,iBAAA,WACE,GAAIC,SAASC,KAAKC,QAAW,IAAMD,KAAKE,OAAQ,CAC9C,MAAM,IAAIC,MACR,qM,GAKNP,EAAAC,UAAAO,mBAAA,WACEJ,KAAKK,oBAAoBC,M,WAlBN,U"}
1
+ {"version":3,"names":["ChartSlice","prototype","componentDidLoad","parseInt","this","amount","legend","Error","componentDidUpdate","wmChartSliceUpdated","emit"],"sources":["src/components/charts/wm-chart/wm-chart-slice.tsx"],"sourcesContent":["import { Component, Prop, Event, EventEmitter } from \"@stencil/core\";\n\n@Component({\n tag: \"wm-chart-slice\",\n})\nexport class ChartSlice {\n @Prop() legend?: string;\n @Prop() amount?: string;\n @Prop() popoverTitle?: string;\n @Prop() popoverText?: string;\n @Prop() popoverButtonText?: string;\n\n @Event() wmChartSliceUpdated!: EventEmitter<void>;\n\n componentDidLoad() {\n if (parseInt(this.amount!) > 0 && !this.legend) {\n throw new Error(\n \"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\"\n );\n }\n }\n\n componentDidUpdate() {\n this.wmChartSliceUpdated.emit();\n }\n}\n"],"mappings":"4EAKaA,WAAU,W,8OASrBA,EAAAC,UAAAC,iBAAA,WACE,GAAIC,SAASC,KAAKC,QAAW,IAAMD,KAAKE,OAAQ,CAC9C,MAAM,IAAIC,MACR,qM,GAKNP,EAAAC,UAAAO,mBAAA,WACEJ,KAAKK,oBAAoBC,M,WAlBN,U"}
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,a){function n(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(a.next(e))}catch(e){p(e)}}function c(e){try{s(a["throw"](e))}catch(e){p(e)}}function s(e){e.done?t(e.value):n(e.value).then(o,c)}s((a=a.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:[]},a,n,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(c){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(t=0)),t)try{if(a=1,n&&(p=c[0]&2?n["return"]:c[0]?n["throw"]||((p=n["return"])&&p.call(n),0):n.next)&&!(p=p.call(n,c[1])).done)return p;if(n=0,p)c=[c[0]&2,p.value];switch(c[0]){case 0:case 1:p=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;n=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(p=t.trys,p=p.length>0&&p[p.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!p||c[1]>p[0]&&c[1]<p[3])){t.label=c[1];break}if(c[0]===6&&t.label<p[1]){t.label=p[1];p=c;break}if(p&&t.label<p[2]){t.label=p[2];t.ops.push(c);break}if(p[2])t.ops.pop();t.trys.pop();continue}c=r.call(e,t)}catch(e){c=[6,e];n=0}finally{a=p=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement}from"./index-84a6ae22.js";import{g as generateId,d as debounce,i as intl}from"./functions-bb1309d0.js";import{g as getDetails,a as allChartsDetails,h as handleChartKeydown,b as amountToPercent,r as renderStackedBar,c as renderSimpleBar,d as renderDoughnut,e as renderInstructionsText,f as renderLegend,i as renderCompletionMessage,j as renderHiddenValuesMessage,k as exitChart}from"./chartFunctions-1df8043a.js";var wmChartCss=":host,wm-chart{display:block}: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;outline:none;}: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 .label.custom-width,wm-chart .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .doughnut-svg,wm-chart .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper .inner-stacked-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-stacked-bar-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type),wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-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-wrapper,wm-chart .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper:not(:last-of-type),wm-chart .component-wrapper .value-wrapper:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden,wm-chart .component-wrapper .value-wrapper .value.hidden{visibility:hidden}: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 .stacked-bar-segment:active,wm-chart .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,wm-chart .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus,wm-chart .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:focus.stacked-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 .stacked-bar-segment:active.doughnut-segment,wm-chart .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,wm-chart .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment,wm-chart .component-wrapper .stacked-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 .stacked-bar-segment::-moz-focus-inner,wm-chart .component-wrapper .stacked-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.doughnut2plus label,wm-chart .component-wrapper.doughnut2plus label,:host .component-wrapper.doughnut2plus .label-text,wm-chart .component-wrapper.doughnut2plus .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 .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 .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-stacked-bar-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar .chart-wrapper .inner-stacked-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-stacked-bar-wrapper,wm-chart .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper text,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-stacked-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.bar3 .hidden-values-warning,wm-chart .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,wm-chart .component-wrapper.bar6,:host .component-wrapper.bar7,wm-chart .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,wm-chart .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper,wm-chart .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,wm-chart .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart,wm-chart .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,wm-chart .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines,wm-chart .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, #8f8f8f 1px, transparent 1px);background-position:-1px;border-left:1px solid #8f8f8f;border-bottom:1px solid #8f8f8f;background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,wm-chart .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows,wm-chart .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,wm-chart .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label,wm-chart .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,wm-chart .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden,wm-chart .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,wm-chart .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar,wm-chart .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,wm-chart .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value,wm-chart .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,wm-chart .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis,wm-chart .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,wm-chart .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick,wm-chart .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,wm-chart .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span,wm-chart .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,wm-chart .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero,wm-chart .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,wm-chart .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,wm-chart .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,wm-chart .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,wm-chart .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,wm-chart .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus,wm-chart .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar,wm-chart .component-wrapper.bar6 .bar:active.bar,:host .component-wrapper.bar6 .bar:hover.bar,wm-chart .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,wm-chart .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,wm-chart .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,wm-chart .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar,wm-chart .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}: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 .component-wrapper .hidden-values-warning,wm-chart .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host #chart-instructions,wm-chart #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper,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.bar1,wm-chart .component-wrapper .legend-wrapper .legend.bar1,:host .component-wrapper .legend-wrapper .legend.bar6,wm-chart .component-wrapper .legend-wrapper .legend.bar6{display:none}: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{font-size:0.875rem;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 .legend.bar3,wm-chart .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-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 .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-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.uid=generateId();this.slicesDetails=[];this.handleStackedBarResize=debounce((function(){return __awaiter(r,void 0,void 0,(function(){var e,r,t,a;return __generator(this,(function(n){e=false;r=this.el.shadowRoot.querySelectorAll(".value");if(r.length){t=r.length?r[0].getBoundingClientRect().right:0;a=4;r.forEach((function(r,n){if(n>0){var p=r.getBoundingClientRect();if(p.left-a<t){r.classList.add("hidden");e=true}else{r.classList.remove("hidden");t=p.right}}}))}this.hasHiddenBarValue=e;return[2]}))}))}),100);this.debouncedUpdate=debounce((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){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,getDetails.call(this,this.currentChartType)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.completionMessage=undefined;this.valueFormat=undefined;this.showValues=undefined;this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.hasHiddenBarValue=false}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(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"currentChartType",{get:function(){var e=this.chartType;if(this.chartType==="hybrid"){e=this.hybridType}else if(this.chartType==="doughnut2"&&this.el.children.length>3){e="doughnut2plus"}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return allChartsDetails[this.currentChartType]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartRoleDescription",{get:function(){return intl.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){handleChartKeydown.call(this,e)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var r=this;return __generator(this,(function(t){switch(t.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,getDetails.call(this,this.currentChartType)];case 1:t.sent();if(this.chartType==="hybrid"||!this.isDoughnut){e=new ResizeObserver((function(){r.isStackedBar?r.handleStackedBarResize():r.debouncedUpdate()}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.renderBarText=function(e,r){var t;if(this.tempValueFormat==="percentage"){t=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.tempValueFormat==="amount"){t=e.amount}return h("div",{class:"value-wrapper",style:{width:"calc(".concat(amountToPercent(e.amount,this.total,false),"%\n ").concat(r!==this.slicesDetails.length-1?" - 2px":"")}},h("span",{class:"value"},e.amount>0&&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.renderChart=function(){if(this.total>0){if(this.isStackedBar){return renderStackedBar.call(this,this.currentChartType)}else if(this.isSimpleBar){return renderSimpleBar.call(this,this.currentChartType)}else if(this.isDoughnut){return renderDoughnut.call(this,this.currentChartType)}}};e.prototype.render=function(){var e=this;return h(Host,{onBlur:function(){return exitChart.call(e)}},h("div",{ref:function(r){return e.componentWrapperEl=r},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},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.isBar&&renderLegend.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&renderLegend.call(this,this.currentChartType),h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.currentChartType==="doughnut0"?renderCompletionMessage.call(this):"",this.hasHiddenBarValue&&renderHiddenValuesMessage()),renderInstructionsText())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Chart.style=wmChartCss;export{Chart as wm_chart};
1
+ var __awaiter=this&&this.__awaiter||function(e,r,t,a){function n(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(a.next(e))}catch(e){p(e)}}function c(e){try{s(a["throw"](e))}catch(e){p(e)}}function s(e){e.done?t(e.value):n(e.value).then(o,c)}s((a=a.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:[]},a,n,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(c){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(t=0)),t)try{if(a=1,n&&(p=c[0]&2?n["return"]:c[0]?n["throw"]||((p=n["return"])&&p.call(n),0):n.next)&&!(p=p.call(n,c[1])).done)return p;if(n=0,p)c=[c[0]&2,p.value];switch(c[0]){case 0:case 1:p=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;n=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(p=t.trys,p=p.length>0&&p[p.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!p||c[1]>p[0]&&c[1]<p[3])){t.label=c[1];break}if(c[0]===6&&t.label<p[1]){t.label=p[1];p=c;break}if(p&&t.label<p[2]){t.label=p[2];t.ops.push(c);break}if(p[2])t.ops.pop();t.trys.pop();continue}c=r.call(e,t)}catch(e){c=[6,e];n=0}finally{a=p=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{r as registerInstance,f as forceUpdate,h,H as Host,g as getElement}from"./index-84a6ae22.js";import{g as generateId,d as debounce,i as intl}from"./functions-dc9964aa.js";import{g as getDetails,a as allChartsDetails,h as handleChartKeydown,b as amountToPercent,r as renderStackedBar,c as renderSimpleBar,d as renderDoughnut,e as renderInstructionsText,f as renderLegend,i as renderCompletionMessage,j as renderHiddenValuesMessage,k as exitChart}from"./chartFunctions-a72f5835.js";var wmChartCss=":host,wm-chart{display:block}: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;outline:none;}: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 .label.custom-width,wm-chart .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .doughnut-svg,wm-chart .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper .inner-stacked-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-stacked-bar-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment,wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type),wm-chart .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-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-wrapper,wm-chart .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper:not(:last-of-type),wm-chart .component-wrapper .value-wrapper:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden,wm-chart .component-wrapper .value-wrapper .value.hidden{visibility:hidden}: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 .stacked-bar-segment:active,wm-chart .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,wm-chart .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus,wm-chart .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment,wm-chart .component-wrapper .stacked-bar-segment:focus.stacked-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 .stacked-bar-segment:active.doughnut-segment,wm-chart .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,wm-chart .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment,wm-chart .component-wrapper .stacked-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 .stacked-bar-segment::-moz-focus-inner,wm-chart .component-wrapper .stacked-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.doughnut2plus label,wm-chart .component-wrapper.doughnut2plus label,:host .component-wrapper.doughnut2plus .label-text,wm-chart .component-wrapper.doughnut2plus .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 .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 .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-stacked-bar-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar .chart-wrapper .inner-stacked-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-stacked-bar-wrapper,wm-chart .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values,wm-chart .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper text,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-stacked-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.bar3 .hidden-values-warning,wm-chart .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,wm-chart .component-wrapper.bar6,:host .component-wrapper.bar7,wm-chart .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,wm-chart .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper,wm-chart .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,wm-chart .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart,wm-chart .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,wm-chart .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines,wm-chart .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, #8f8f8f 1px, transparent 1px);background-position:-1px;border-left:1px solid #8f8f8f;border-bottom:1px solid #8f8f8f;background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,wm-chart .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows,wm-chart .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,wm-chart .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label,wm-chart .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,wm-chart .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden,wm-chart .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,wm-chart .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar,wm-chart .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,wm-chart .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value,wm-chart .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,wm-chart .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis,wm-chart .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,wm-chart .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick,wm-chart .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,wm-chart .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span,wm-chart .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,wm-chart .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero,wm-chart .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,wm-chart .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,wm-chart .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,wm-chart .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,wm-chart .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,wm-chart .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus,wm-chart .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar,wm-chart .component-wrapper.bar6 .bar:active.bar,:host .component-wrapper.bar6 .bar:hover.bar,wm-chart .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,wm-chart .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,wm-chart .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,wm-chart .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar,wm-chart .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}: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 .component-wrapper .hidden-values-warning,wm-chart .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host #chart-instructions,wm-chart #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper,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.bar1,wm-chart .component-wrapper .legend-wrapper .legend.bar1,:host .component-wrapper .legend-wrapper .legend.bar6,wm-chart .component-wrapper .legend-wrapper .legend.bar6{display:none}: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{font-size:0.875rem;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 .legend.bar3,wm-chart .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-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 .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-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.uid=generateId();this.slicesDetails=[];this.handleStackedBarResize=debounce((function(){return __awaiter(r,void 0,void 0,(function(){var e,r,t,a;return __generator(this,(function(n){e=false;r=this.el.shadowRoot.querySelectorAll(".value");if(r.length){t=r.length?r[0].getBoundingClientRect().right:0;a=4;r.forEach((function(r,n){if(n>0){var p=r.getBoundingClientRect();if(p.left-a<t){r.classList.add("hidden");e=true}else{r.classList.remove("hidden");t=p.right}}}))}this.hasHiddenBarValue=e;return[2]}))}))}),100);this.debouncedUpdate=debounce((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(e){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,getDetails.call(this,this.currentChartType)];case 1:e.sent();forceUpdate(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.completionMessage=undefined;this.valueFormat=undefined;this.showValues=undefined;this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.hasHiddenBarValue=false}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(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"currentChartType",{get:function(){var e=this.chartType;if(this.chartType==="hybrid"){e=this.hybridType}else if(this.chartType==="doughnut2"&&this.el.children.length>3){e="doughnut2plus"}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return allChartsDetails[this.currentChartType]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartRoleDescription",{get:function(){return intl.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){handleChartKeydown.call(this,e)};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var r=this;return __generator(this,(function(t){switch(t.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,getDetails.call(this,this.currentChartType)];case 1:t.sent();if(this.chartType==="hybrid"||!this.isDoughnut){e=new ResizeObserver((function(){r.isStackedBar?r.handleStackedBarResize():r.debouncedUpdate()}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.renderBarText=function(e,r){var t;if(this.tempValueFormat==="percentage"){t=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.tempValueFormat==="amount"){t=e.amount}return h("div",{class:"value-wrapper",style:{width:"calc(".concat(amountToPercent(e.amount,this.total,false),"%\n ").concat(r!==this.slicesDetails.length-1?" - 2px":"")}},h("span",{class:"value"},e.amount>0&&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.renderChart=function(){if(this.total>0){if(this.isStackedBar){return renderStackedBar.call(this,this.currentChartType)}else if(this.isSimpleBar){return renderSimpleBar.call(this,this.currentChartType)}else if(this.isDoughnut){return renderDoughnut.call(this,this.currentChartType)}}};e.prototype.render=function(){var e=this;return h(Host,{onBlur:function(){return exitChart.call(e)}},h("div",{ref:function(r){return e.componentWrapperEl=r},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},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.isBar&&renderLegend.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&renderLegend.call(this,this.currentChartType),h("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),this.currentChartType==="doughnut0"?renderCompletionMessage.call(this):"",this.hasHiddenBarValue&&renderHiddenValuesMessage()),renderInstructionsText())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Chart.style=wmChartCss;export{Chart as wm_chart};
2
2
  //# sourceMappingURL=wm-chart.entry.js.map