@watermarkinsights/ripple 3.24.0 → 3.24.1

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 (554) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/{chartFunctions-5309f8ed.js → chartFunctions-da36e4cb.js} +591 -586
  3. package/dist/cjs/chartFunctions-da36e4cb.js.map +1 -0
  4. package/dist/cjs/{functions-6d2a5824.js → functions-9ddaeb33.js} +468 -468
  5. package/dist/cjs/{functions-6d2a5824.js.map → functions-9ddaeb33.js.map} +1 -1
  6. package/dist/cjs/{global-d20d5267.js → global-a563c2d1.js} +63 -63
  7. package/dist/cjs/global-a563c2d1.js.map +1 -0
  8. package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +50 -50
  9. package/dist/cjs/http-service-494d81de.js.map +1 -0
  10. package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +30 -30
  11. package/dist/cjs/interfaces-a3338581.js.map +1 -0
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/priv-chart-popover.cjs.entry.js +91 -91
  14. package/dist/cjs/priv-chart-popover.cjs.entry.js.map +1 -1
  15. package/dist/cjs/priv-datepicker.cjs.entry.js +657 -657
  16. package/dist/cjs/priv-datepicker.cjs.entry.js.map +1 -1
  17. package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
  18. package/dist/cjs/priv-navigator-button.cjs.entry.js.map +1 -1
  19. package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
  20. package/dist/cjs/priv-navigator-item.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ripple.cjs.js +1 -1
  22. package/dist/cjs/wm-action-menu_2.cjs.entry.js +334 -334
  23. package/dist/cjs/wm-action-menu_2.cjs.entry.js.map +1 -1
  24. package/dist/cjs/wm-button.cjs.entry.js +260 -260
  25. package/dist/cjs/wm-button.cjs.entry.js.map +1 -1
  26. package/dist/cjs/wm-chart-slice.cjs.entry.js +18 -18
  27. package/dist/cjs/wm-chart-slice.cjs.entry.js.map +1 -1
  28. package/dist/cjs/wm-chart.cjs.entry.js +179 -179
  29. package/dist/cjs/wm-chart.cjs.entry.js.map +1 -1
  30. package/dist/cjs/wm-datepicker.cjs.entry.js +263 -263
  31. package/dist/cjs/wm-datepicker.cjs.entry.js.map +1 -1
  32. package/dist/cjs/wm-file-list.cjs.entry.js +35 -35
  33. package/dist/cjs/wm-file-list.cjs.entry.js.map +1 -1
  34. package/dist/cjs/wm-file.cjs.entry.js +201 -201
  35. package/dist/cjs/wm-file.cjs.entry.js.map +1 -1
  36. package/dist/cjs/wm-input.cjs.entry.js +139 -139
  37. package/dist/cjs/wm-input.cjs.entry.js.map +1 -1
  38. package/dist/cjs/wm-modal-footer.cjs.entry.js +33 -33
  39. package/dist/cjs/wm-modal-footer.cjs.entry.js.map +1 -1
  40. package/dist/cjs/wm-modal-header.cjs.entry.js +36 -36
  41. package/dist/cjs/wm-modal-header.cjs.entry.js.map +1 -1
  42. package/dist/cjs/wm-modal.cjs.entry.js +152 -152
  43. package/dist/cjs/wm-modal.cjs.entry.js.map +1 -1
  44. package/dist/cjs/wm-navigation_3.cjs.entry.js +234 -234
  45. package/dist/cjs/wm-navigation_3.cjs.entry.js.map +1 -1
  46. package/dist/cjs/wm-navigator.cjs.entry.js +264 -264
  47. package/dist/cjs/wm-navigator.cjs.entry.js.map +1 -1
  48. package/dist/cjs/wm-network-uploader.cjs.entry.js +467 -467
  49. package/dist/cjs/wm-network-uploader.cjs.entry.js.map +1 -1
  50. package/dist/cjs/wm-option_2.cjs.entry.js +771 -771
  51. package/dist/cjs/wm-option_2.cjs.entry.js.map +1 -1
  52. package/dist/cjs/wm-pagination.cjs.entry.js +179 -179
  53. package/dist/cjs/wm-pagination.cjs.entry.js.map +1 -1
  54. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +155 -155
  55. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js.map +1 -1
  56. package/dist/cjs/wm-search.cjs.entry.js +191 -191
  57. package/dist/cjs/wm-search.cjs.entry.js.map +1 -1
  58. package/dist/cjs/wm-snackbar.cjs.entry.js +169 -169
  59. package/dist/cjs/wm-snackbar.cjs.entry.js.map +1 -1
  60. package/dist/cjs/wm-tab-item_3.cjs.entry.js +264 -264
  61. package/dist/cjs/wm-tab-item_3.cjs.entry.js.map +1 -1
  62. package/dist/cjs/wm-tag-input-row.cjs.entry.js +14 -14
  63. package/dist/cjs/wm-tag-input-row.cjs.entry.js.map +1 -1
  64. package/dist/cjs/wm-tag-input.cjs.entry.js +908 -908
  65. package/dist/cjs/wm-tag-input.cjs.entry.js.map +1 -1
  66. package/dist/cjs/wm-timepicker.cjs.entry.js +385 -385
  67. package/dist/cjs/wm-timepicker.cjs.entry.js.map +1 -1
  68. package/dist/cjs/wm-toggletip.cjs.entry.js +130 -130
  69. package/dist/cjs/wm-toggletip.cjs.entry.js.map +1 -1
  70. package/dist/cjs/wm-uploader.cjs.entry.js +510 -510
  71. package/dist/cjs/wm-uploader.cjs.entry.js.map +1 -1
  72. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  73. package/dist/cjs/wm-wrapper.cjs.entry.js.map +1 -1
  74. package/dist/collection/components/charts/chartFunctions.js +557 -552
  75. package/dist/collection/components/charts/chartFunctions.js.map +1 -1
  76. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +268 -268
  77. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js.map +1 -1
  78. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +126 -126
  79. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js.map +1 -1
  80. package/dist/collection/components/charts/wm-chart/wm-chart.js +447 -447
  81. package/dist/collection/components/charts/wm-chart/wm-chart.js.map +1 -1
  82. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +208 -208
  83. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js.map +1 -1
  84. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +144 -144
  85. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js.map +1 -1
  86. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +122 -122
  87. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js.map +1 -1
  88. package/dist/collection/components/wm-action-menu/wm-action-menu.js +473 -473
  89. package/dist/collection/components/wm-action-menu/wm-action-menu.js.map +1 -1
  90. package/dist/collection/components/wm-button/wm-button.js +576 -576
  91. package/dist/collection/components/wm-button/wm-button.js.map +1 -1
  92. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +984 -984
  93. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js.map +1 -1
  94. package/dist/collection/components/wm-datepicker/wm-datepicker.js +492 -492
  95. package/dist/collection/components/wm-datepicker/wm-datepicker.js.map +1 -1
  96. package/dist/collection/components/wm-file/wm-file.js +334 -334
  97. package/dist/collection/components/wm-file/wm-file.js.map +1 -1
  98. package/dist/collection/components/wm-file-list/wm-file-list.js +153 -153
  99. package/dist/collection/components/wm-file-list/wm-file-list.js.map +1 -1
  100. package/dist/collection/components/wm-input/wm-input.js +444 -444
  101. package/dist/collection/components/wm-input/wm-input.js.map +1 -1
  102. package/dist/collection/components/wm-menuitem/wm-menuitem.js +455 -455
  103. package/dist/collection/components/wm-menuitem/wm-menuitem.js.map +1 -1
  104. package/dist/collection/components/wm-modal/wm-modal-footer.js +139 -139
  105. package/dist/collection/components/wm-modal/wm-modal-footer.js.map +1 -1
  106. package/dist/collection/components/wm-modal/wm-modal-header.js +88 -88
  107. package/dist/collection/components/wm-modal/wm-modal-header.js.map +1 -1
  108. package/dist/collection/components/wm-modal/wm-modal.js +463 -463
  109. package/dist/collection/components/wm-modal/wm-modal.js.map +1 -1
  110. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +177 -177
  111. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js.map +1 -1
  112. package/dist/collection/components/wm-navigation/wm-navigation-item.js +131 -131
  113. package/dist/collection/components/wm-navigation/wm-navigation-item.js.map +1 -1
  114. package/dist/collection/components/wm-navigation/wm-navigation.js +227 -227
  115. package/dist/collection/components/wm-navigation/wm-navigation.js.map +1 -1
  116. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +107 -107
  117. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js.map +1 -1
  118. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +124 -124
  119. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js.map +1 -1
  120. package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
  121. package/dist/collection/components/wm-navigator/wm-navigator.js.map +1 -1
  122. package/dist/collection/components/wm-option/wm-option.js +436 -436
  123. package/dist/collection/components/wm-option/wm-option.js.map +1 -1
  124. package/dist/collection/components/wm-pagination/wm-pagination.js +371 -371
  125. package/dist/collection/components/wm-pagination/wm-pagination.js.map +1 -1
  126. package/dist/collection/components/wm-search/wm-search.js +447 -447
  127. package/dist/collection/components/wm-search/wm-search.js.map +1 -1
  128. package/dist/collection/components/wm-select/wm-select.js +1058 -1058
  129. package/dist/collection/components/wm-select/wm-select.js.map +1 -1
  130. package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
  131. package/dist/collection/components/wm-snackbar/wm-snackbar.js.map +1 -1
  132. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +212 -212
  133. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js.map +1 -1
  134. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +328 -328
  135. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js.map +1 -1
  136. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +109 -109
  137. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js.map +1 -1
  138. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js +123 -123
  139. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js.map +1 -1
  140. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1209 -1209
  141. package/dist/collection/components/wm-tag-input/wm-tag-input.js.map +1 -1
  142. package/dist/collection/components/wm-timepicker/wm-timepicker.js +606 -606
  143. package/dist/collection/components/wm-timepicker/wm-timepicker.js.map +1 -1
  144. package/dist/collection/components/wm-toggletip/wm-toggletip.js +254 -254
  145. package/dist/collection/components/wm-toggletip/wm-toggletip.js.map +1 -1
  146. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +775 -775
  147. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js.map +1 -1
  148. package/dist/collection/components/wm-uploader/wm-uploader.js +1034 -1034
  149. package/dist/collection/components/wm-uploader/wm-uploader.js.map +1 -1
  150. package/dist/collection/components/wm-wrapper/wm-wrapper.js +29 -29
  151. package/dist/collection/components/wm-wrapper/wm-wrapper.js.map +1 -1
  152. package/dist/collection/dev/scripts.js +20 -20
  153. package/dist/collection/global/__mocks__/functions.js +7 -7
  154. package/dist/collection/global/__mocks__/functions.js.map +1 -1
  155. package/dist/collection/global/functions.js +511 -511
  156. package/dist/collection/global/functions.js.map +1 -1
  157. package/dist/collection/global/global.js +70 -70
  158. package/dist/collection/global/global.js.map +1 -1
  159. package/dist/collection/global/interfaces.js +50 -50
  160. package/dist/collection/global/interfaces.js.map +1 -1
  161. package/dist/collection/global/services/__mocks__/http-service.js +131 -131
  162. package/dist/collection/global/services/__mocks__/http-service.js.map +1 -1
  163. package/dist/collection/global/services/http-service.js +51 -51
  164. package/dist/collection/global/services/http-service.js.map +1 -1
  165. package/dist/collection/lang/lang.js +6 -6
  166. package/dist/collection/lang/lang.js.map +1 -1
  167. package/dist/collection/lang/missing.js +43 -43
  168. package/dist/collection/lang/piglatin.js +93 -93
  169. package/dist/esm/{chartFunctions-e22110b8.js → chartFunctions-b0a9e440.js} +591 -586
  170. package/dist/esm/chartFunctions-b0a9e440.js.map +1 -0
  171. package/dist/esm/{functions-c58046f2.js → functions-1c41e984.js} +468 -468
  172. package/dist/esm/{functions-c58046f2.js.map → functions-1c41e984.js.map} +1 -1
  173. package/dist/esm/{global-fee3549b.js → global-65156bcf.js} +63 -63
  174. package/dist/esm/global-65156bcf.js.map +1 -0
  175. package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +50 -50
  176. package/dist/esm/http-service-3dc3b3e7.js.map +1 -0
  177. package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +30 -30
  178. package/dist/esm/interfaces-2b97fab2.js.map +1 -0
  179. package/dist/esm/loader.js +1 -1
  180. package/dist/esm/polyfills/core-js.js +0 -0
  181. package/dist/esm/polyfills/dom.js +0 -0
  182. package/dist/esm/polyfills/es5-html-element.js +0 -0
  183. package/dist/esm/polyfills/index.js +0 -0
  184. package/dist/esm/polyfills/system.js +0 -0
  185. package/dist/esm/priv-chart-popover.entry.js +91 -91
  186. package/dist/esm/priv-chart-popover.entry.js.map +1 -1
  187. package/dist/esm/priv-datepicker.entry.js +657 -657
  188. package/dist/esm/priv-datepicker.entry.js.map +1 -1
  189. package/dist/esm/priv-navigator-button.entry.js +19 -19
  190. package/dist/esm/priv-navigator-button.entry.js.map +1 -1
  191. package/dist/esm/priv-navigator-item.entry.js +23 -23
  192. package/dist/esm/priv-navigator-item.entry.js.map +1 -1
  193. package/dist/esm/ripple.js +1 -1
  194. package/dist/esm/wm-action-menu_2.entry.js +334 -334
  195. package/dist/esm/wm-action-menu_2.entry.js.map +1 -1
  196. package/dist/esm/wm-button.entry.js +260 -260
  197. package/dist/esm/wm-button.entry.js.map +1 -1
  198. package/dist/esm/wm-chart-slice.entry.js +18 -18
  199. package/dist/esm/wm-chart-slice.entry.js.map +1 -1
  200. package/dist/esm/wm-chart.entry.js +179 -179
  201. package/dist/esm/wm-chart.entry.js.map +1 -1
  202. package/dist/esm/wm-datepicker.entry.js +263 -263
  203. package/dist/esm/wm-datepicker.entry.js.map +1 -1
  204. package/dist/esm/wm-file-list.entry.js +35 -35
  205. package/dist/esm/wm-file-list.entry.js.map +1 -1
  206. package/dist/esm/wm-file.entry.js +201 -201
  207. package/dist/esm/wm-file.entry.js.map +1 -1
  208. package/dist/esm/wm-input.entry.js +139 -139
  209. package/dist/esm/wm-input.entry.js.map +1 -1
  210. package/dist/esm/wm-modal-footer.entry.js +33 -33
  211. package/dist/esm/wm-modal-footer.entry.js.map +1 -1
  212. package/dist/esm/wm-modal-header.entry.js +36 -36
  213. package/dist/esm/wm-modal-header.entry.js.map +1 -1
  214. package/dist/esm/wm-modal.entry.js +152 -152
  215. package/dist/esm/wm-modal.entry.js.map +1 -1
  216. package/dist/esm/wm-navigation_3.entry.js +234 -234
  217. package/dist/esm/wm-navigation_3.entry.js.map +1 -1
  218. package/dist/esm/wm-navigator.entry.js +264 -264
  219. package/dist/esm/wm-navigator.entry.js.map +1 -1
  220. package/dist/esm/wm-network-uploader.entry.js +467 -467
  221. package/dist/esm/wm-network-uploader.entry.js.map +1 -1
  222. package/dist/esm/wm-option_2.entry.js +771 -771
  223. package/dist/esm/wm-option_2.entry.js.map +1 -1
  224. package/dist/esm/wm-pagination.entry.js +179 -179
  225. package/dist/esm/wm-pagination.entry.js.map +1 -1
  226. package/dist/esm/wm-progress-indicator_3.entry.js +155 -155
  227. package/dist/esm/wm-progress-indicator_3.entry.js.map +1 -1
  228. package/dist/esm/wm-search.entry.js +191 -191
  229. package/dist/esm/wm-search.entry.js.map +1 -1
  230. package/dist/esm/wm-snackbar.entry.js +169 -169
  231. package/dist/esm/wm-snackbar.entry.js.map +1 -1
  232. package/dist/esm/wm-tab-item_3.entry.js +264 -264
  233. package/dist/esm/wm-tab-item_3.entry.js.map +1 -1
  234. package/dist/esm/wm-tag-input-row.entry.js +14 -14
  235. package/dist/esm/wm-tag-input-row.entry.js.map +1 -1
  236. package/dist/esm/wm-tag-input.entry.js +908 -908
  237. package/dist/esm/wm-tag-input.entry.js.map +1 -1
  238. package/dist/esm/wm-timepicker.entry.js +385 -385
  239. package/dist/esm/wm-timepicker.entry.js.map +1 -1
  240. package/dist/esm/wm-toggletip.entry.js +130 -130
  241. package/dist/esm/wm-toggletip.entry.js.map +1 -1
  242. package/dist/esm/wm-uploader.entry.js +510 -510
  243. package/dist/esm/wm-uploader.entry.js.map +1 -1
  244. package/dist/esm/wm-wrapper.entry.js +12 -12
  245. package/dist/esm/wm-wrapper.entry.js.map +1 -1
  246. package/dist/esm-es5/{chartFunctions-e22110b8.js → chartFunctions-b0a9e440.js} +2 -2
  247. package/dist/esm-es5/chartFunctions-b0a9e440.js.map +1 -0
  248. package/dist/esm-es5/{functions-c58046f2.js → functions-1c41e984.js} +1 -1
  249. package/dist/esm-es5/{functions-c58046f2.js.map → functions-1c41e984.js.map} +1 -1
  250. package/dist/esm-es5/{global-fee3549b.js → global-65156bcf.js} +2 -2
  251. package/dist/esm-es5/global-65156bcf.js.map +1 -0
  252. package/dist/esm-es5/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +1 -1
  253. package/dist/esm-es5/http-service-3dc3b3e7.js.map +1 -0
  254. package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +1 -1
  255. package/dist/esm-es5/interfaces-2b97fab2.js.map +1 -0
  256. package/dist/esm-es5/loader.js +1 -1
  257. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  258. package/dist/esm-es5/priv-chart-popover.entry.js.map +1 -1
  259. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  260. package/dist/esm-es5/priv-datepicker.entry.js.map +1 -1
  261. package/dist/esm-es5/priv-navigator-button.entry.js.map +1 -1
  262. package/dist/esm-es5/priv-navigator-item.entry.js.map +1 -1
  263. package/dist/esm-es5/ripple.js +1 -1
  264. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  265. package/dist/esm-es5/wm-action-menu_2.entry.js.map +1 -1
  266. package/dist/esm-es5/wm-button.entry.js +1 -1
  267. package/dist/esm-es5/wm-button.entry.js.map +1 -1
  268. package/dist/esm-es5/wm-chart-slice.entry.js.map +1 -1
  269. package/dist/esm-es5/wm-chart.entry.js +1 -1
  270. package/dist/esm-es5/wm-chart.entry.js.map +1 -1
  271. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  272. package/dist/esm-es5/wm-datepicker.entry.js.map +1 -1
  273. package/dist/esm-es5/wm-file-list.entry.js.map +1 -1
  274. package/dist/esm-es5/wm-file.entry.js +1 -1
  275. package/dist/esm-es5/wm-file.entry.js.map +1 -1
  276. package/dist/esm-es5/wm-input.entry.js +1 -1
  277. package/dist/esm-es5/wm-input.entry.js.map +1 -1
  278. package/dist/esm-es5/wm-modal-footer.entry.js.map +1 -1
  279. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  280. package/dist/esm-es5/wm-modal-header.entry.js.map +1 -1
  281. package/dist/esm-es5/wm-modal.entry.js +1 -1
  282. package/dist/esm-es5/wm-modal.entry.js.map +1 -1
  283. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  284. package/dist/esm-es5/wm-navigation_3.entry.js.map +1 -1
  285. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  286. package/dist/esm-es5/wm-navigator.entry.js.map +1 -1
  287. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  288. package/dist/esm-es5/wm-network-uploader.entry.js.map +1 -1
  289. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  290. package/dist/esm-es5/wm-option_2.entry.js.map +1 -1
  291. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  292. package/dist/esm-es5/wm-pagination.entry.js.map +1 -1
  293. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  294. package/dist/esm-es5/wm-progress-indicator_3.entry.js.map +1 -1
  295. package/dist/esm-es5/wm-search.entry.js +1 -1
  296. package/dist/esm-es5/wm-search.entry.js.map +1 -1
  297. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  298. package/dist/esm-es5/wm-snackbar.entry.js.map +1 -1
  299. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  300. package/dist/esm-es5/wm-tab-item_3.entry.js.map +1 -1
  301. package/dist/esm-es5/wm-tag-input-row.entry.js.map +1 -1
  302. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  303. package/dist/esm-es5/wm-tag-input.entry.js.map +1 -1
  304. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  305. package/dist/esm-es5/wm-timepicker.entry.js.map +1 -1
  306. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  307. package/dist/esm-es5/wm-toggletip.entry.js.map +1 -1
  308. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  309. package/dist/esm-es5/wm-uploader.entry.js.map +1 -1
  310. package/dist/esm-es5/wm-wrapper.entry.js.map +1 -1
  311. package/dist/ripple/{p-8e6bd600.system.entry.js → p-010b2cac.system.entry.js} +2 -2
  312. package/dist/ripple/p-010b2cac.system.entry.js.map +1 -0
  313. package/dist/ripple/{p-b22ba3a2.system.js → p-08950379.system.js} +2 -2
  314. package/dist/ripple/{p-c25abcc5.system.js → p-0b21e936.system.js} +2 -2
  315. package/dist/ripple/p-0b21e936.system.js.map +1 -0
  316. package/dist/ripple/p-0d7bccf7.entry.js.map +1 -1
  317. package/dist/ripple/{p-98a9eb8c.entry.js → p-136460c0.entry.js} +2 -2
  318. package/dist/ripple/p-136460c0.entry.js.map +1 -0
  319. package/dist/ripple/{p-695286e7.entry.js → p-1da75922.entry.js} +2 -2
  320. package/dist/ripple/p-1da75922.entry.js.map +1 -0
  321. package/dist/ripple/{p-0a23f0fa.entry.js → p-22d9c36e.entry.js} +2 -2
  322. package/dist/ripple/p-22d9c36e.entry.js.map +1 -0
  323. package/dist/ripple/p-24a4cb11.system.entry.js.map +1 -1
  324. package/dist/ripple/{p-c5a50724.entry.js → p-24f7d6eb.entry.js} +2 -2
  325. package/dist/ripple/p-24f7d6eb.entry.js.map +1 -0
  326. package/dist/ripple/{p-4c383e9e.system.entry.js → p-27d3e1ab.system.entry.js} +2 -2
  327. package/dist/ripple/p-27d3e1ab.system.entry.js.map +1 -0
  328. package/dist/ripple/p-2c2a7092.system.entry.js.map +1 -1
  329. package/dist/ripple/{p-fe63519a.system.entry.js → p-2f4b4e3a.system.entry.js} +2 -2
  330. package/dist/ripple/p-2f4b4e3a.system.entry.js.map +1 -0
  331. package/dist/ripple/{p-e8fd25c8.js → p-3303b568.js} +2 -2
  332. package/dist/ripple/p-3303b568.js.map +1 -0
  333. package/dist/ripple/p-33558ec4.system.entry.js.map +1 -1
  334. package/dist/ripple/{p-1a2d8112.system.entry.js → p-337f2c82.system.entry.js} +2 -2
  335. package/dist/ripple/p-337f2c82.system.entry.js.map +1 -0
  336. package/dist/ripple/{p-bfc8d2bb.entry.js → p-34567f7e.entry.js} +2 -2
  337. package/dist/ripple/p-34567f7e.entry.js.map +1 -0
  338. package/dist/ripple/{p-67373e6f.system.entry.js → p-3655a421.system.entry.js} +2 -2
  339. package/dist/ripple/p-3655a421.system.entry.js.map +1 -0
  340. package/dist/ripple/p-3759b7af.system.entry.js.map +1 -1
  341. package/dist/ripple/{p-0b31c210.entry.js → p-40cc5375.entry.js} +2 -2
  342. package/dist/ripple/p-40cc5375.entry.js.map +1 -0
  343. package/dist/ripple/{p-76830e28.entry.js → p-4370bb17.entry.js} +2 -2
  344. package/dist/ripple/p-4370bb17.entry.js.map +1 -0
  345. package/dist/ripple/p-4391166c.entry.js.map +1 -1
  346. package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +1 -1
  347. package/dist/ripple/p-43f1298b.js.map +1 -0
  348. package/dist/ripple/{p-18e58141.system.entry.js → p-48c8619f.system.entry.js} +2 -2
  349. package/dist/ripple/p-48c8619f.system.entry.js.map +1 -0
  350. package/dist/ripple/p-4a014591.entry.js.map +1 -1
  351. package/dist/ripple/{p-ccd0d43b.system.entry.js → p-4acc9e8d.system.entry.js} +2 -2
  352. package/dist/ripple/p-4acc9e8d.system.entry.js.map +1 -0
  353. package/dist/ripple/{p-a3b9c87d.system.entry.js → p-52655351.system.entry.js} +2 -2
  354. package/dist/ripple/p-52655351.system.entry.js.map +1 -0
  355. package/dist/ripple/{p-2a9fa9b5.entry.js → p-54df11c8.entry.js} +2 -2
  356. package/dist/ripple/p-54df11c8.entry.js.map +1 -0
  357. package/dist/ripple/p-59654f8e.entry.js.map +1 -1
  358. package/dist/ripple/{p-535e33d7.entry.js → p-5bf24119.entry.js} +2 -2
  359. package/dist/ripple/p-5bf24119.entry.js.map +1 -0
  360. package/dist/ripple/{p-e746fe88.system.entry.js → p-60e941cc.system.entry.js} +2 -2
  361. package/dist/ripple/p-60e941cc.system.entry.js.map +1 -0
  362. package/dist/ripple/{p-f38332ed.system.entry.js → p-684f2c1e.system.entry.js} +2 -2
  363. package/dist/ripple/p-684f2c1e.system.entry.js.map +1 -0
  364. package/dist/ripple/{p-e61d2c52.entry.js → p-75c9cad6.entry.js} +2 -2
  365. package/dist/ripple/p-75c9cad6.entry.js.map +1 -0
  366. package/dist/ripple/{p-e252738e.entry.js → p-78a7278d.entry.js} +2 -2
  367. package/dist/ripple/p-78a7278d.entry.js.map +1 -0
  368. package/dist/ripple/{p-45e7b944.entry.js → p-81c698e2.entry.js} +2 -2
  369. package/dist/ripple/p-81c698e2.entry.js.map +1 -0
  370. package/dist/ripple/{p-87da5d8e.entry.js → p-82323561.entry.js} +2 -2
  371. package/dist/ripple/p-82323561.entry.js.map +1 -0
  372. package/dist/ripple/{p-2b577e99.entry.js → p-873a5f0f.entry.js} +2 -2
  373. package/dist/ripple/p-873a5f0f.entry.js.map +1 -0
  374. package/dist/ripple/p-8c51e9f8.system.entry.js.map +1 -1
  375. package/dist/ripple/{p-be954fba.system.entry.js → p-8e11777d.system.entry.js} +2 -2
  376. package/dist/ripple/p-8e11777d.system.entry.js.map +1 -0
  377. package/dist/ripple/{p-63166c83.system.entry.js → p-90d67afa.system.entry.js} +2 -2
  378. package/dist/ripple/p-90d67afa.system.entry.js.map +1 -0
  379. package/dist/ripple/p-976b2789.system.entry.js.map +1 -1
  380. package/dist/ripple/{p-3e9da0fb.system.entry.js → p-97f0722e.system.entry.js} +2 -2
  381. package/dist/ripple/p-97f0722e.system.entry.js.map +1 -0
  382. package/dist/ripple/p-9b9eb944.entry.js.map +1 -1
  383. package/dist/ripple/{p-4a45a473.entry.js → p-9c9cf5e7.entry.js} +2 -2
  384. package/dist/ripple/p-9c9cf5e7.entry.js.map +1 -0
  385. package/dist/ripple/{p-313b6073.system.js → p-9d02957d.system.js} +1 -1
  386. package/dist/ripple/p-9d02957d.system.js.map +1 -0
  387. package/dist/ripple/{p-7b85f5a8.entry.js → p-a1c4d1d2.entry.js} +2 -2
  388. package/dist/ripple/p-a1c4d1d2.entry.js.map +1 -0
  389. package/dist/ripple/{p-9727c8f5.entry.js → p-a6cd8eb1.entry.js} +2 -2
  390. package/dist/ripple/p-a6cd8eb1.entry.js.map +1 -0
  391. package/dist/ripple/{p-dfeb2a0f.system.entry.js → p-ab792e0d.system.entry.js} +2 -2
  392. package/dist/ripple/p-ab792e0d.system.entry.js.map +1 -0
  393. package/dist/ripple/{p-5e2be836.entry.js → p-ab996399.entry.js} +2 -2
  394. package/dist/ripple/p-ab996399.entry.js.map +1 -0
  395. package/dist/ripple/{p-85b47217.system.entry.js → p-ac27d425.system.entry.js} +2 -2
  396. package/dist/ripple/p-ac27d425.system.entry.js.map +1 -0
  397. package/dist/ripple/{p-4091aa36.system.js → p-b8783b39.system.js} +2 -2
  398. package/dist/ripple/p-b8783b39.system.js.map +1 -0
  399. package/dist/ripple/{p-525fbd6b.system.entry.js → p-be2aab24.system.entry.js} +2 -2
  400. package/dist/ripple/p-be2aab24.system.entry.js.map +1 -0
  401. package/dist/ripple/p-bf569af0.entry.js.map +1 -1
  402. package/dist/ripple/{p-d6478e67.system.entry.js → p-c63b63ee.system.entry.js} +2 -2
  403. package/dist/ripple/p-c63b63ee.system.entry.js.map +1 -0
  404. package/dist/ripple/{p-90f42d65.system.entry.js → p-ce0002d4.system.entry.js} +2 -2
  405. package/dist/ripple/p-ce0002d4.system.entry.js.map +1 -0
  406. package/dist/ripple/{p-54f29e18.entry.js → p-d23db6e2.entry.js} +2 -2
  407. package/dist/ripple/p-d23db6e2.entry.js.map +1 -0
  408. package/dist/ripple/p-d939cb54.entry.js.map +1 -1
  409. package/dist/ripple/p-dbfd1640.system.entry.js.map +1 -1
  410. package/dist/ripple/{p-bc883afc.entry.js → p-e29c4789.entry.js} +2 -2
  411. package/dist/ripple/p-e29c4789.entry.js.map +1 -0
  412. package/dist/ripple/{p-0cd88c74.entry.js → p-e6b9766e.entry.js} +2 -2
  413. package/dist/ripple/p-e6b9766e.entry.js.map +1 -0
  414. package/dist/ripple/{p-2abe8404.system.entry.js → p-e8dab7c0.system.entry.js} +2 -2
  415. package/dist/ripple/p-e8dab7c0.system.entry.js.map +1 -0
  416. package/dist/ripple/{p-dcd38073.system.entry.js → p-eb64d16a.system.entry.js} +2 -2
  417. package/dist/ripple/p-eb64d16a.system.entry.js.map +1 -0
  418. package/dist/ripple/{p-a31a30ac.system.entry.js → p-eccbad16.system.entry.js} +2 -2
  419. package/dist/ripple/p-eccbad16.system.entry.js.map +1 -0
  420. package/dist/ripple/{p-054e206a.entry.js → p-edae6ef2.entry.js} +2 -2
  421. package/dist/ripple/p-edae6ef2.entry.js.map +1 -0
  422. package/dist/ripple/{p-9fd3badc.js → p-edfba0e1.js} +1 -1
  423. package/dist/ripple/{p-9fd3badc.js.map → p-edfba0e1.js.map} +1 -1
  424. package/dist/ripple/{p-d0c3d25a.entry.js → p-efc36352.entry.js} +2 -2
  425. package/dist/ripple/p-efc36352.entry.js.map +1 -0
  426. package/dist/ripple/{p-e782194d.system.js → p-f08e6a5a.system.js} +1 -1
  427. package/dist/ripple/{p-e782194d.system.js.map → p-f08e6a5a.system.js.map} +1 -1
  428. package/dist/ripple/{p-29cd07d5.system.entry.js → p-f09541fc.system.entry.js} +2 -2
  429. package/dist/ripple/p-f09541fc.system.entry.js.map +1 -0
  430. package/dist/ripple/{p-4aa0ee75.system.entry.js → p-f4487f66.system.entry.js} +2 -2
  431. package/dist/ripple/p-f4487f66.system.entry.js.map +1 -0
  432. package/dist/ripple/{p-08b7ec08.system.js → p-f5df5903.system.js} +1 -1
  433. package/dist/ripple/p-f5df5903.system.js.map +1 -0
  434. package/dist/ripple/{p-23e54ad4.js → p-f8d1e5a0.js} +2 -2
  435. package/dist/ripple/p-f8d1e5a0.js.map +1 -0
  436. package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +1 -1
  437. package/dist/ripple/p-fd8070fb.js.map +1 -0
  438. package/dist/ripple/ripple.esm.js +1 -1
  439. package/dist/ripple/ripple.js +1 -1
  440. package/dist/types/components/charts/chartFunctions.d.ts +37 -37
  441. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +27 -27
  442. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
  443. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +47 -47
  444. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +29 -29
  445. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +20 -20
  446. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
  447. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +49 -49
  448. package/dist/types/components/wm-button/wm-button.d.ts +49 -49
  449. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
  450. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +42 -42
  451. package/dist/types/components/wm-file/wm-file.d.ts +42 -42
  452. package/dist/types/components/wm-file-list/wm-file-list.d.ts +16 -16
  453. package/dist/types/components/wm-input/wm-input.d.ts +46 -46
  454. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
  455. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
  456. package/dist/types/components/wm-modal/wm-modal-header.d.ts +11 -11
  457. package/dist/types/components/wm-modal/wm-modal.d.ts +40 -40
  458. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
  459. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
  460. package/dist/types/components/wm-navigation/wm-navigation.d.ts +28 -28
  461. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
  462. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
  463. package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
  464. package/dist/types/components/wm-option/wm-option.d.ts +34 -34
  465. package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
  466. package/dist/types/components/wm-search/wm-search.d.ts +77 -77
  467. package/dist/types/components/wm-select/wm-select.d.ts +102 -102
  468. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
  469. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +37 -37
  470. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +52 -52
  471. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
  472. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +11 -11
  473. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +127 -127
  474. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +62 -62
  475. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +28 -28
  476. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
  477. package/dist/types/components/wm-uploader/wm-uploader.d.ts +104 -104
  478. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
  479. package/dist/types/components.d.ts +27 -27
  480. package/dist/types/global/__mocks__/functions.d.ts +6 -6
  481. package/dist/types/global/functions.d.ts +47 -47
  482. package/dist/types/global/global.d.ts +1 -1
  483. package/dist/types/global/interfaces.d.ts +74 -74
  484. package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
  485. package/dist/types/global/services/http-service.d.ts +4 -4
  486. package/dist/types/lang/lang.d.ts +5 -5
  487. package/package.json +46 -46
  488. package/dist/cjs/chartFunctions-5309f8ed.js.map +0 -1
  489. package/dist/cjs/global-d20d5267.js.map +0 -1
  490. package/dist/cjs/http-service-9e8c4dd5.js.map +0 -1
  491. package/dist/cjs/interfaces-30a74c1f.js.map +0 -1
  492. package/dist/esm/chartFunctions-e22110b8.js.map +0 -1
  493. package/dist/esm/global-fee3549b.js.map +0 -1
  494. package/dist/esm/http-service-5d037e16.js.map +0 -1
  495. package/dist/esm/interfaces-61c6305b.js.map +0 -1
  496. package/dist/esm-es5/chartFunctions-e22110b8.js.map +0 -1
  497. package/dist/esm-es5/global-fee3549b.js.map +0 -1
  498. package/dist/esm-es5/http-service-5d037e16.js.map +0 -1
  499. package/dist/esm-es5/interfaces-61c6305b.js.map +0 -1
  500. package/dist/ripple/p-054e206a.entry.js.map +0 -1
  501. package/dist/ripple/p-08b7ec08.system.js.map +0 -1
  502. package/dist/ripple/p-0a23f0fa.entry.js.map +0 -1
  503. package/dist/ripple/p-0b31c210.entry.js.map +0 -1
  504. package/dist/ripple/p-0cd88c74.entry.js.map +0 -1
  505. package/dist/ripple/p-18e58141.system.entry.js.map +0 -1
  506. package/dist/ripple/p-1a2d8112.system.entry.js.map +0 -1
  507. package/dist/ripple/p-23e54ad4.js.map +0 -1
  508. package/dist/ripple/p-29cd07d5.system.entry.js.map +0 -1
  509. package/dist/ripple/p-2a9fa9b5.entry.js.map +0 -1
  510. package/dist/ripple/p-2abe8404.system.entry.js.map +0 -1
  511. package/dist/ripple/p-2b577e99.entry.js.map +0 -1
  512. package/dist/ripple/p-313b6073.system.js.map +0 -1
  513. package/dist/ripple/p-3e9da0fb.system.entry.js.map +0 -1
  514. package/dist/ripple/p-4091aa36.system.js.map +0 -1
  515. package/dist/ripple/p-45e7b944.entry.js.map +0 -1
  516. package/dist/ripple/p-4a45a473.entry.js.map +0 -1
  517. package/dist/ripple/p-4aa0ee75.system.entry.js.map +0 -1
  518. package/dist/ripple/p-4c383e9e.system.entry.js.map +0 -1
  519. package/dist/ripple/p-525fbd6b.system.entry.js.map +0 -1
  520. package/dist/ripple/p-535e33d7.entry.js.map +0 -1
  521. package/dist/ripple/p-54f29e18.entry.js.map +0 -1
  522. package/dist/ripple/p-5e2be836.entry.js.map +0 -1
  523. package/dist/ripple/p-63166c83.system.entry.js.map +0 -1
  524. package/dist/ripple/p-67373e6f.system.entry.js.map +0 -1
  525. package/dist/ripple/p-695286e7.entry.js.map +0 -1
  526. package/dist/ripple/p-76830e28.entry.js.map +0 -1
  527. package/dist/ripple/p-7b85f5a8.entry.js.map +0 -1
  528. package/dist/ripple/p-85b47217.system.entry.js.map +0 -1
  529. package/dist/ripple/p-87da5d8e.entry.js.map +0 -1
  530. package/dist/ripple/p-888bec42.js.map +0 -1
  531. package/dist/ripple/p-8e6bd600.system.entry.js.map +0 -1
  532. package/dist/ripple/p-90f42d65.system.entry.js.map +0 -1
  533. package/dist/ripple/p-9727c8f5.entry.js.map +0 -1
  534. package/dist/ripple/p-98a9eb8c.entry.js.map +0 -1
  535. package/dist/ripple/p-a31a30ac.system.entry.js.map +0 -1
  536. package/dist/ripple/p-a3b9c87d.system.entry.js.map +0 -1
  537. package/dist/ripple/p-a6d6eae7.js.map +0 -1
  538. package/dist/ripple/p-bc883afc.entry.js.map +0 -1
  539. package/dist/ripple/p-be954fba.system.entry.js.map +0 -1
  540. package/dist/ripple/p-bfc8d2bb.entry.js.map +0 -1
  541. package/dist/ripple/p-c25abcc5.system.js.map +0 -1
  542. package/dist/ripple/p-c5a50724.entry.js.map +0 -1
  543. package/dist/ripple/p-ccd0d43b.system.entry.js.map +0 -1
  544. package/dist/ripple/p-d0c3d25a.entry.js.map +0 -1
  545. package/dist/ripple/p-d6478e67.system.entry.js.map +0 -1
  546. package/dist/ripple/p-dcd38073.system.entry.js.map +0 -1
  547. package/dist/ripple/p-dfeb2a0f.system.entry.js.map +0 -1
  548. package/dist/ripple/p-e252738e.entry.js.map +0 -1
  549. package/dist/ripple/p-e61d2c52.entry.js.map +0 -1
  550. package/dist/ripple/p-e746fe88.system.entry.js.map +0 -1
  551. package/dist/ripple/p-e8fd25c8.js.map +0 -1
  552. package/dist/ripple/p-f38332ed.system.entry.js.map +0 -1
  553. package/dist/ripple/p-fe63519a.system.entry.js.map +0 -1
  554. /package/dist/ripple/{p-b22ba3a2.system.js.map → p-08950379.system.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"wm-button.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,86lBAA86lB;;MCSr7lB,MAAM;;;IAgCT,WAAM,GAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACnC,OAAE,GAAGA,oBAAU,EAAE,CAAC;IAClB,cAAS,GAAY,KAAK,CAAC;oBA5BU,KAAK;sBAKa,IAAI;uBACH,IAAI;;;;;;;2BAYxB,cAAc;6BACpB,KAAK;oBACf,IAAI;;0BAEU,KAAK;qBAEjB,KAAK;;EAvBnC,IAAI,UAAU;;IAEZ,OAAOC,gBAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;GAC9B;EAGD,IAAI,cAAc;;;IAGhB,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC;GAC3D;EAmBD,IAAI,WAAW;IACb,QACE,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,KAAK,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAC9G;GACH;EAED,IAAI,UAAU;;IAEZ,OAAO,IAAI,CAAC,cAAc,KAAK,UAAU,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,IAAI,IAAI,CAAC,WAAW,CAAC;GACzG;EAED,IAAI,SAAS;IACX,OAAO,QAAQ,CAAC,cAAc,CAAC,YAAY,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AG,IAAI,EAC7C,YAAY,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACtC,YAAY,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACtC,OAAO,EAAE,MAAM,IAAI,CAAC,2BAA2B,EAAE,EACjD,MAAM,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EAChC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEhC,IAAI,CAAC,IAAI,KACRA,kBAAM,KAAK,EAAC,KAAK,EAAC,KAAK,EAAE,IAAI,CAAC,UAAU,IACrC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAC5C,CACR,EACDA,kBAAM,KAAK,EAAC,aAAa,IACvBA,qBAAQ,CACH,CACA,CACJ,EACP;GACH;;;;;;;;;;;;;","names":["generateId","toBool","getIconCodeFromName","adjustTooltipPlacement","h","Host"],"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"],"version":3}
1
+ {"file":"wm-button.entry.cjs.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,86lBAA86lB;;MCSr7lB,MAAM;;;IAgCT,WAAM,GAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE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EAAC,aAAa,IACvBA,qBAAQ,CACH,CACA,CACJ,EACP;GACH;;;;;;;;;;;;;","names":["generateId","toBool","getIconCodeFromName","adjustTooltipPlacement","h","Host"],"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"],"version":3}
@@ -4,24 +4,24 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1f84c034.js');
6
6
 
7
- const ChartSlice = class {
8
- constructor(hostRef) {
9
- index.registerInstance(this, hostRef);
10
- this.wmChartSliceUpdated = index.createEvent(this, "wmChartSliceUpdated", 7);
11
- this.legend = undefined;
12
- this.amount = undefined;
13
- this.popoverTitle = undefined;
14
- this.popoverText = undefined;
15
- this.popoverButtonText = undefined;
16
- }
17
- componentDidLoad() {
18
- if (parseInt(this.amount) > 0 && !this.legend) {
19
- throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart");
20
- }
21
- }
22
- componentDidUpdate() {
23
- this.wmChartSliceUpdated.emit();
24
- }
7
+ const ChartSlice = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.wmChartSliceUpdated = index.createEvent(this, "wmChartSliceUpdated", 7);
11
+ this.legend = undefined;
12
+ this.amount = undefined;
13
+ this.popoverTitle = undefined;
14
+ this.popoverText = undefined;
15
+ this.popoverButtonText = undefined;
16
+ }
17
+ componentDidLoad() {
18
+ if (parseInt(this.amount) > 0 && !this.legend) {
19
+ throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart");
20
+ }
21
+ }
22
+ componentDidUpdate() {
23
+ this.wmChartSliceUpdated.emit();
24
+ }
25
25
  };
26
26
 
27
27
  exports.wm_chart_slice = ChartSlice;
@@ -1 +1 @@
1
- {"file":"wm-chart-slice.entry.cjs.js","mappings":";;;;;;MAKa,UAAU;;;;;;;;;;EASrB,gBAAgB;IACd,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;MAC9C,MAAM,IAAI,KAAK,CACb,oMAAoM,CACrM,CAAC;KACH;GACF;EAED,kBAAkB;IAChB,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;GACjC;;;;;","names":[],"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"],"version":3}
1
+ {"file":"wm-chart-slice.entry.cjs.js","mappings":";;;;;;MAKa,UAAU;;;;;;;;;;EASrB,gBAAgB;IACd,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;MAC9C,MAAM,IAAI,KAAK,CACb,oMAAoM,CACrM,CAAC;KACH;GACF;EAED,kBAAkB;IAChB,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;GACjC;;;;;","names":[],"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"],"version":3}
@@ -3,188 +3,188 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1f84c034.js');
6
- const functions = require('./functions-6d2a5824.js');
7
- const chartFunctions = require('./chartFunctions-5309f8ed.js');
6
+ const functions = require('./functions-9ddaeb33.js');
7
+ const chartFunctions = require('./chartFunctions-da36e4cb.js');
8
8
 
9
9
  const 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}";
10
10
 
11
- const Chart = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.uid = functions.generateId();
15
- this.slicesDetails = [];
16
- this.handleStackedBarResize = functions.debounce(async () => {
17
- let hasHiddenBarValue = false;
18
- // if any value text overlaps with another, hide it and display warning
19
- const valueEls = this.el.shadowRoot.querySelectorAll(".value");
20
- if (valueEls.length) {
21
- let lastVisibleRightEdge = valueEls.length ? valueEls[0].getBoundingClientRect().right : 0;
22
- let margin = 4;
23
- valueEls.forEach((valueEl, idx) => {
24
- // checks are to the left of each valueEl, so skip the first one
25
- if (idx > 0) {
26
- const bounds = valueEl.getBoundingClientRect();
27
- if (bounds.left - margin < lastVisibleRightEdge) {
28
- // left edge of current value is overlapping right edge of last visible value
29
- valueEl.classList.add("hidden");
30
- hasHiddenBarValue = true;
31
- }
32
- else {
33
- valueEl.classList.remove("hidden");
34
- lastVisibleRightEdge = bounds.right;
35
- }
36
- }
37
- });
38
- }
39
- this.hasHiddenBarValue = hasHiddenBarValue;
40
- }, 100);
41
- this.debouncedUpdate = functions.debounce(async () => {
42
- index.forceUpdate(this.el);
43
- }, 10);
44
- this.debouncedSliceUpdate = functions.debounce(async () => {
45
- await chartFunctions.getDetails.call(this, this.currentChartType);
46
- index.forceUpdate(this.el);
47
- }, 100);
48
- this.chartType = "doughnut1";
49
- this.label = undefined;
50
- this.labelWidth = "150px";
51
- this.subinfo = undefined;
52
- this.completionMessage = undefined;
53
- this.valueFormat = undefined;
54
- this.showValues = undefined;
55
- this.showGrid = true;
56
- this.showLegend = true;
57
- this.showBarLegend = false;
58
- this.notStartedColor = false;
59
- this.labelPosition = "top";
60
- this.isTabbing = false;
61
- this.userIsNavigating = false;
62
- this.hasHiddenBarValue = false;
63
- }
64
- get tempValueFormat() {
65
- // use of this getter should be replaced with dateFormat when showValues is fully phased out
66
- return this.valueFormat || this.showValues || "none";
67
- }
68
- get hybridType() {
69
- return window.innerWidth > 1340 ? "doughnut0" : "bar1";
70
- }
71
- get popoverEl() {
72
- return this.el.shadowRoot.querySelector("priv-chart-popover");
73
- }
74
- get sliceEls() {
75
- return Array.from(this.el.shadowRoot.querySelectorAll(".segment"));
76
- }
77
- get currentChartType() {
78
- let current = this.chartType;
79
- if (this.chartType === "hybrid") {
80
- current = this.hybridType;
81
- }
82
- else if (this.chartType === "doughnut2" && this.el.children.length > 3) {
83
- // render an internal type (that includes an additional color) if doughnut2 has more than 3 slices
84
- current = "doughnut2plus";
85
- }
86
- return current;
87
- }
88
- get chartDetails() {
89
- return chartFunctions.allChartsDetails[this.currentChartType];
90
- }
91
- get ariaLabelText() {
92
- let text = `${this.label}`;
93
- if (this.subinfo) {
94
- text += ` ${this.subinfo}`;
95
- }
96
- return text;
97
- }
98
- get isDoughnut() {
99
- return this.chartDetails.category === "doughnut";
100
- }
101
- get isStackedBar() {
102
- return this.chartDetails.category === "stackedBar";
103
- }
104
- get isSimpleBar() {
105
- return this.chartDetails.category === "simpleBar";
106
- }
107
- get isBar() {
108
- return this.isStackedBar || this.isSimpleBar;
109
- }
110
- get chartRoleDescription() {
111
- return functions.intl.formatMessage({
112
- id: "chart.roleDescription",
113
- defaultMessage: "Interactive chart",
114
- description: "For screen readers only, a description clarifying the role of the chart widget",
115
- });
116
- }
117
- toggleTabbingOn() {
118
- this.isTabbing = true;
119
- }
120
- toggleTabbingOff() {
121
- this.isTabbing = false;
122
- }
123
- handleKeydown(ev) {
124
- chartFunctions.handleChartKeydown.call(this, ev);
125
- }
126
- /* LIFECYCLE METHODS + EVENTS FROM THE CHILDREN */
127
- async componentWillLoad() {
128
- if (!this.label) {
129
- throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");
130
- }
131
- if (this.showValues) {
132
- console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.");
133
- }
134
- await chartFunctions.getDetails.call(this, this.currentChartType);
135
- // rerender on resize
136
- // unnecessary for doughnuts (except hybrid) as layout doesn't change
137
- if (this.chartType === "hybrid" || !this.isDoughnut) {
138
- const resizeObserver = new ResizeObserver(() => {
139
- this.isStackedBar ? this.handleStackedBarResize() : this.debouncedUpdate();
140
- });
141
- resizeObserver.observe(this.el);
142
- }
143
- }
144
- handleSliceUpdate() {
145
- this.debouncedSliceUpdate();
146
- }
147
- /* RENDERING */
148
- renderBarText(s, idx) {
149
- let val;
150
- if (this.tempValueFormat === "percentage") {
151
- // if segment has an amount, but "0" percentage (it's below 0.5% and rounded down), still display it as <1%
152
- val = s.perc === 0 && s.amount > 0 ? "<1%" : `${s.perc}%`;
153
- }
154
- else if (this.tempValueFormat === "amount") {
155
- val = s.amount;
156
- }
157
- // even though we do not display the value text if it has an amount of 0, we still want to render the value-wrapper
158
- // in order to not disturb the positioning of the other value texts in the entire row
159
- return (index.h("div", { class: "value-wrapper", style: {
160
- width: `calc(${chartFunctions.amountToPercent(s.amount, this.total, false)}%
161
- ${idx !== this.slicesDetails.length - 1 ? " - 2px" : ""}`,
162
- } }, index.h("span", { class: "value" }, s.amount > 0 && val)));
163
- }
164
- drawAxis() {
165
- if (this.currentChartType === "bar3") {
166
- return (index.h("svg", { class: "axis" }, index.h("line", { x1: "0", x2: "100%", y1: "0", y2: "0" }), index.h("line", { x1: "0", x2: "0", y1: "0", y2: "-85px" }), index.h("line", { class: "tick", x1: "0.5", x2: "0.5", y1: "0", y2: "6" }), index.h("text", { x: "0.5", y: "-6" }, "0%"), index.h("line", { class: "tick", x1: "100%", x2: "100%", y1: "0", y2: "6" }), index.h("text", { x: "100%", y: "-6" }, "100%")));
167
- }
168
- }
169
- renderChart() {
170
- if (this.total > 0) {
171
- if (this.isStackedBar) {
172
- return chartFunctions.renderStackedBar.call(this, this.currentChartType);
173
- }
174
- else if (this.isSimpleBar) {
175
- return chartFunctions.renderSimpleBar.call(this, this.currentChartType);
176
- }
177
- else if (this.isDoughnut) {
178
- return chartFunctions.renderDoughnut.call(this, this.currentChartType);
179
- }
180
- }
181
- }
182
- render() {
183
- return (index.h(index.Host, { onBlur: () => chartFunctions.exitChart.call(this) }, index.h("div", { ref: (el) => (this.componentWrapperEl = el), class: `component-wrapper ${this.currentChartType} ${this.isTabbing && !this.userIsNavigating ? "user-is-tabbing" : ""} ${this.labelPosition === "left" && this.currentChartType === "bar4" ? "left-label" : ""}`, role: "application", "aria-label": this.ariaLabelText, tabindex: 0, "aria-roledescription": this.chartRoleDescription, "aria-describedby": "chart-instructions" }, index.h("label", { class: "label", id: `label-${this.uid}`, htmlFor: `graphic-${this.uid}` }, index.h("span", { class: "label-text" }, this.label), this.subinfo ? index.h("span", { class: "subinfo" }, this.subinfo) : ""), this.isBar && chartFunctions.renderLegend.call(this, this.currentChartType), this.renderChart(), this.isDoughnut && chartFunctions.renderLegend.call(this, this.currentChartType), index.h("priv-chart-popover", { class: this.isTabbing ? "user-is-tabbing" : "" }), this.currentChartType === "doughnut0" ? chartFunctions.renderCompletionMessage.call(this) : "", this.hasHiddenBarValue && chartFunctions.renderHiddenValuesMessage()), chartFunctions.renderInstructionsText()));
184
- }
185
- static get delegatesFocus() { return true; }
186
- get el() { return index.getElement(this); }
187
- };
11
+ const Chart = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.uid = functions.generateId();
15
+ this.slicesDetails = [];
16
+ this.handleStackedBarResize = functions.debounce(async () => {
17
+ let hasHiddenBarValue = false;
18
+ // if any value text overlaps with another, hide it and display warning
19
+ const valueEls = this.el.shadowRoot.querySelectorAll(".value");
20
+ if (valueEls.length) {
21
+ let lastVisibleRightEdge = valueEls.length ? valueEls[0].getBoundingClientRect().right : 0;
22
+ let margin = 4;
23
+ valueEls.forEach((valueEl, idx) => {
24
+ // checks are to the left of each valueEl, so skip the first one
25
+ if (idx > 0) {
26
+ const bounds = valueEl.getBoundingClientRect();
27
+ if (bounds.left - margin < lastVisibleRightEdge) {
28
+ // left edge of current value is overlapping right edge of last visible value
29
+ valueEl.classList.add("hidden");
30
+ hasHiddenBarValue = true;
31
+ }
32
+ else {
33
+ valueEl.classList.remove("hidden");
34
+ lastVisibleRightEdge = bounds.right;
35
+ }
36
+ }
37
+ });
38
+ }
39
+ this.hasHiddenBarValue = hasHiddenBarValue;
40
+ }, 100);
41
+ this.debouncedUpdate = functions.debounce(async () => {
42
+ index.forceUpdate(this.el);
43
+ }, 10);
44
+ this.debouncedSliceUpdate = functions.debounce(async () => {
45
+ await chartFunctions.getDetails.call(this, this.currentChartType);
46
+ index.forceUpdate(this.el);
47
+ }, 100);
48
+ this.chartType = "doughnut1";
49
+ this.label = undefined;
50
+ this.labelWidth = "150px";
51
+ this.subinfo = undefined;
52
+ this.completionMessage = undefined;
53
+ this.valueFormat = undefined;
54
+ this.showValues = undefined;
55
+ this.showGrid = true;
56
+ this.showLegend = true;
57
+ this.showBarLegend = false;
58
+ this.notStartedColor = false;
59
+ this.labelPosition = "top";
60
+ this.isTabbing = false;
61
+ this.userIsNavigating = false;
62
+ this.hasHiddenBarValue = false;
63
+ }
64
+ get tempValueFormat() {
65
+ // use of this getter should be replaced with dateFormat when showValues is fully phased out
66
+ return this.valueFormat || this.showValues || "none";
67
+ }
68
+ get hybridType() {
69
+ return window.innerWidth > 1340 ? "doughnut0" : "bar1";
70
+ }
71
+ get popoverEl() {
72
+ return this.el.shadowRoot.querySelector("priv-chart-popover");
73
+ }
74
+ get sliceEls() {
75
+ return Array.from(this.el.shadowRoot.querySelectorAll(".segment"));
76
+ }
77
+ get currentChartType() {
78
+ let current = this.chartType;
79
+ if (this.chartType === "hybrid") {
80
+ current = this.hybridType;
81
+ }
82
+ else if (this.chartType === "doughnut2" && this.el.children.length > 3) {
83
+ // render an internal type (that includes an additional color) if doughnut2 has more than 3 slices
84
+ current = "doughnut2plus";
85
+ }
86
+ return current;
87
+ }
88
+ get chartDetails() {
89
+ return chartFunctions.allChartsDetails[this.currentChartType];
90
+ }
91
+ get ariaLabelText() {
92
+ let text = `${this.label}`;
93
+ if (this.subinfo) {
94
+ text += ` ${this.subinfo}`;
95
+ }
96
+ return text;
97
+ }
98
+ get isDoughnut() {
99
+ return this.chartDetails.category === "doughnut";
100
+ }
101
+ get isStackedBar() {
102
+ return this.chartDetails.category === "stackedBar";
103
+ }
104
+ get isSimpleBar() {
105
+ return this.chartDetails.category === "simpleBar";
106
+ }
107
+ get isBar() {
108
+ return this.isStackedBar || this.isSimpleBar;
109
+ }
110
+ get chartRoleDescription() {
111
+ return functions.intl.formatMessage({
112
+ id: "chart.roleDescription",
113
+ defaultMessage: "Interactive chart",
114
+ description: "For screen readers only, a description clarifying the role of the chart widget",
115
+ });
116
+ }
117
+ toggleTabbingOn() {
118
+ this.isTabbing = true;
119
+ }
120
+ toggleTabbingOff() {
121
+ this.isTabbing = false;
122
+ }
123
+ handleKeydown(ev) {
124
+ chartFunctions.handleChartKeydown.call(this, ev);
125
+ }
126
+ /* LIFECYCLE METHODS + EVENTS FROM THE CHILDREN */
127
+ async componentWillLoad() {
128
+ if (!this.label) {
129
+ throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");
130
+ }
131
+ if (this.showValues) {
132
+ console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead.");
133
+ }
134
+ await chartFunctions.getDetails.call(this, this.currentChartType);
135
+ // rerender on resize
136
+ // unnecessary for doughnuts (except hybrid) as layout doesn't change
137
+ if (this.chartType === "hybrid" || !this.isDoughnut) {
138
+ const resizeObserver = new ResizeObserver(() => {
139
+ this.isStackedBar ? this.handleStackedBarResize() : this.debouncedUpdate();
140
+ });
141
+ resizeObserver.observe(this.el);
142
+ }
143
+ }
144
+ handleSliceUpdate() {
145
+ this.debouncedSliceUpdate();
146
+ }
147
+ /* RENDERING */
148
+ renderBarText(s, idx) {
149
+ let val;
150
+ if (this.tempValueFormat === "percentage") {
151
+ // if segment has an amount, but "0" percentage (it's below 0.5% and rounded down), still display it as <1%
152
+ val = s.perc === 0 && s.amount > 0 ? "<1%" : `${s.perc}%`;
153
+ }
154
+ else if (this.tempValueFormat === "amount") {
155
+ val = s.amount;
156
+ }
157
+ // even though we do not display the value text if it has an amount of 0, we still want to render the value-wrapper
158
+ // in order to not disturb the positioning of the other value texts in the entire row
159
+ return (index.h("div", { class: "value-wrapper", style: {
160
+ width: `calc(${chartFunctions.amountToPercent(s.amount, this.total, false)}%
161
+ ${idx !== this.slicesDetails.length - 1 ? " - 2px" : ""}`,
162
+ } }, index.h("span", { class: "value" }, s.amount > 0 && val)));
163
+ }
164
+ drawAxis() {
165
+ if (this.currentChartType === "bar3") {
166
+ return (index.h("svg", { class: "axis" }, index.h("line", { x1: "0", x2: "100%", y1: "0", y2: "0" }), index.h("line", { x1: "0", x2: "0", y1: "0", y2: "-85px" }), index.h("line", { class: "tick", x1: "0.5", x2: "0.5", y1: "0", y2: "6" }), index.h("text", { x: "0.5", y: "-6" }, "0%"), index.h("line", { class: "tick", x1: "100%", x2: "100%", y1: "0", y2: "6" }), index.h("text", { x: "100%", y: "-6" }, "100%")));
167
+ }
168
+ }
169
+ renderChart() {
170
+ if (this.total > 0) {
171
+ if (this.isStackedBar) {
172
+ return chartFunctions.renderStackedBar.call(this, this.currentChartType);
173
+ }
174
+ else if (this.isSimpleBar) {
175
+ return chartFunctions.renderSimpleBar.call(this, this.currentChartType);
176
+ }
177
+ else if (this.isDoughnut) {
178
+ return chartFunctions.renderDoughnut.call(this, this.currentChartType);
179
+ }
180
+ }
181
+ }
182
+ render() {
183
+ return (index.h(index.Host, { onBlur: () => chartFunctions.exitChart.call(this) }, index.h("div", { ref: (el) => (this.componentWrapperEl = el), class: `component-wrapper ${this.currentChartType} ${this.isTabbing && !this.userIsNavigating ? "user-is-tabbing" : ""} ${this.labelPosition === "left" && this.currentChartType === "bar4" ? "left-label" : ""}`, role: "application", "aria-label": this.ariaLabelText, tabindex: 0, "aria-roledescription": this.chartRoleDescription, "aria-describedby": "chart-instructions" }, index.h("label", { class: "label", id: `label-${this.uid}`, htmlFor: `graphic-${this.uid}` }, index.h("span", { class: "label-text" }, this.label), this.subinfo ? index.h("span", { class: "subinfo" }, this.subinfo) : ""), this.isBar && chartFunctions.renderLegend.call(this, this.currentChartType), this.renderChart(), this.isDoughnut && chartFunctions.renderLegend.call(this, this.currentChartType), index.h("priv-chart-popover", { class: this.isTabbing ? "user-is-tabbing" : "" }), this.currentChartType === "doughnut0" ? chartFunctions.renderCompletionMessage.call(this) : "", this.hasHiddenBarValue && chartFunctions.renderHiddenValuesMessage()), chartFunctions.renderInstructionsText()));
184
+ }
185
+ static get delegatesFocus() { return true; }
186
+ get el() { return index.getElement(this); }
187
+ };
188
188
  Chart.style = wmChartCss;
189
189
 
190
190
  exports.wm_chart = Chart;