@watermarkinsights/ripple 3.36.0-1 → 3.36.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/dist/cjs/chartFunctions-a5fc3f56.js +615 -0
  2. package/dist/cjs/{functions-b85d9b0c.js → functions-5ab75e7b.js} +461 -461
  3. package/dist/cjs/{global-3651127c.js → global-3b5bc3c6.js} +24 -24
  4. package/dist/cjs/http-service-0a0b66c8.js +57 -0
  5. package/dist/cjs/{index-670c5d2a.js → index-ab860fe5.js} +263 -55
  6. package/dist/cjs/interfaces-2db4cefd.js +35 -0
  7. package/dist/cjs/intl-68b743d4.js +179 -0
  8. package/dist/cjs/loader.cjs.js +4 -13
  9. package/dist/cjs/priv-chart-popover.cjs.entry.js +85 -85
  10. package/dist/cjs/priv-datepicker.cjs.entry.js +640 -640
  11. package/dist/cjs/priv-navigator-button.cjs.entry.js +18 -18
  12. package/dist/cjs/priv-navigator-item.cjs.entry.js +21 -21
  13. package/dist/cjs/ripple.cjs.js +4 -7
  14. package/dist/cjs/wm-action-menu_2.cjs.entry.js +324 -324
  15. package/dist/cjs/wm-button.cjs.entry.js +199 -192
  16. package/dist/cjs/wm-chart-slice.cjs.entry.js +17 -17
  17. package/dist/cjs/wm-chart.cjs.entry.js +173 -173
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +246 -246
  19. package/dist/cjs/wm-file-list.cjs.entry.js +33 -33
  20. package/dist/cjs/wm-file.cjs.entry.js +180 -180
  21. package/dist/cjs/wm-input.cjs.entry.js +148 -148
  22. package/dist/cjs/wm-line-chart.cjs.entry.js +448 -448
  23. package/dist/cjs/wm-modal-footer.cjs.entry.js +32 -32
  24. package/dist/cjs/wm-modal-header.cjs.entry.js +31 -31
  25. package/dist/cjs/wm-modal.cjs.entry.js +151 -151
  26. package/dist/cjs/wm-navigation_3.cjs.entry.js +179 -179
  27. package/dist/cjs/wm-navigator.cjs.entry.js +245 -245
  28. package/dist/cjs/wm-network-uploader.cjs.entry.js +452 -452
  29. package/dist/cjs/wm-option_2.cjs.entry.js +761 -761
  30. package/dist/cjs/wm-pagination.cjs.entry.js +171 -171
  31. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +151 -151
  32. package/dist/cjs/wm-search.cjs.entry.js +194 -194
  33. package/dist/cjs/wm-snackbar.cjs.entry.js +128 -128
  34. package/dist/cjs/wm-tab-item_3.cjs.entry.js +258 -258
  35. package/dist/cjs/wm-tag-input-row.cjs.entry.js +14 -14
  36. package/dist/cjs/wm-tag-input.cjs.entry.js +953 -953
  37. package/dist/cjs/wm-timepicker.cjs.entry.js +365 -365
  38. package/dist/cjs/wm-toggletip.cjs.entry.js +106 -106
  39. package/dist/cjs/wm-uploader.cjs.entry.js +437 -437
  40. package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
  41. package/dist/collection/collection-manifest.json +42 -42
  42. package/dist/collection/components/charts/chartFunctions.js +471 -471
  43. package/dist/collection/components/charts/chartFunctions.spec.js +13 -13
  44. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +73 -73
  45. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +257 -254
  46. package/dist/collection/components/charts/screenshots.e2e.js +30 -30
  47. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +121 -121
  48. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +179 -179
  49. package/dist/collection/components/charts/wm-chart/wm-chart.js +421 -420
  50. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +41 -41
  51. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +1 -2
  52. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +138 -138
  53. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +717 -717
  54. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +106 -106
  55. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +202 -202
  56. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +54 -54
  57. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +136 -136
  58. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +31 -31
  59. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +119 -119
  60. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +187 -187
  61. package/dist/collection/components/wm-action-menu/wm-action-menu.js +463 -463
  62. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +36 -36
  63. package/dist/collection/components/wm-button/wm-button.e2e.js +58 -58
  64. package/dist/collection/components/wm-button/wm-button.js +503 -493
  65. package/dist/collection/components/wm-button/wm-button.spec.js +65 -65
  66. package/dist/collection/components/wm-datepicker/datepicker-input.e2e.js +216 -216
  67. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +964 -960
  68. package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.spec.js +71 -71
  69. package/dist/collection/components/wm-datepicker/wm-datepicker.css +1 -2
  70. package/dist/collection/components/wm-datepicker/wm-datepicker.e2e.js +345 -345
  71. package/dist/collection/components/wm-datepicker/wm-datepicker.js +472 -472
  72. package/dist/collection/components/wm-datepicker/wm-datepicker.spec.js +51 -51
  73. package/dist/collection/components/wm-file/wm-file.js +300 -300
  74. package/dist/collection/components/wm-file/wm-file.spec.js +106 -106
  75. package/dist/collection/components/wm-file-list/wm-file-list.js +147 -147
  76. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +72 -72
  77. package/dist/collection/components/wm-input/wm-input.e2e.js +54 -54
  78. package/dist/collection/components/wm-input/wm-input.js +525 -525
  79. package/dist/collection/components/wm-input/wm-input.spec.js +207 -207
  80. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +18 -18
  81. package/dist/collection/components/wm-menuitem/wm-menuitem.js +446 -436
  82. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +46 -46
  83. package/dist/collection/components/wm-modal/wm-modal-footer.js +135 -135
  84. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +8 -8
  85. package/dist/collection/components/wm-modal/wm-modal-header.js +78 -78
  86. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +5 -5
  87. package/dist/collection/components/wm-modal/wm-modal.e2e.js +94 -94
  88. package/dist/collection/components/wm-modal/wm-modal.js +440 -437
  89. package/dist/collection/components/wm-modal/wm-modal.spec.js +51 -51
  90. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +0 -1
  91. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +112 -112
  92. package/dist/collection/components/wm-navigation/wm-navigation-item.js +125 -125
  93. package/dist/collection/components/wm-navigation/wm-navigation.css +0 -2
  94. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +86 -86
  95. package/dist/collection/components/wm-navigation/wm-navigation.js +209 -209
  96. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +79 -79
  97. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +30 -30
  98. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +103 -103
  99. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +119 -118
  100. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +180 -180
  101. package/dist/collection/components/wm-navigator/wm-navigator.js +454 -454
  102. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +153 -153
  103. package/dist/collection/components/wm-option/wm-option.e2e.js +19 -19
  104. package/dist/collection/components/wm-option/wm-option.js +426 -418
  105. package/dist/collection/components/wm-option/wm-option.spec.js +39 -39
  106. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +301 -301
  107. package/dist/collection/components/wm-pagination/wm-pagination.js +342 -342
  108. package/dist/collection/components/wm-search/wm-search.e2e.js +69 -69
  109. package/dist/collection/components/wm-search/wm-search.js +430 -429
  110. package/dist/collection/components/wm-search/wm-search.spec.js +64 -64
  111. package/dist/collection/components/wm-select/wm-select.e2e.js +485 -485
  112. package/dist/collection/components/wm-select/wm-select.js +1037 -1035
  113. package/dist/collection/components/wm-select/wm-select.spec.js +251 -251
  114. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +114 -114
  115. package/dist/collection/components/wm-snackbar/wm-snackbar.js +257 -253
  116. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +4 -4
  117. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +207 -205
  118. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +305 -305
  119. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
  120. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +117 -117
  121. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +6 -6
  122. package/dist/collection/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.js +120 -120
  123. package/dist/collection/components/wm-tag-input/wm-tag-input.css +2 -4
  124. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +178 -178
  125. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1304 -1303
  126. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +935 -935
  127. package/dist/collection/components/wm-timepicker/wm-timepicker.css +1 -2
  128. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +164 -164
  129. package/dist/collection/components/wm-timepicker/wm-timepicker.js +599 -599
  130. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +521 -521
  131. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +60 -60
  132. package/dist/collection/components/wm-toggletip/wm-toggletip.js +234 -233
  133. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +16 -16
  134. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +0 -2
  135. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.e2e.js +74 -74
  136. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +752 -751
  137. package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.spec.js +103 -103
  138. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +81 -81
  139. package/dist/collection/components/wm-uploader/wm-uploader.js +948 -947
  140. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +369 -369
  141. package/dist/collection/components/wm-wrapper/wm-wrapper.js +26 -26
  142. package/dist/collection/global/__mocks__/functions.js +1 -1
  143. package/dist/collection/global/functions.js +498 -498
  144. package/dist/collection/global/functions.spec.js +141 -141
  145. package/dist/collection/global/global.js +16 -16
  146. package/dist/collection/global/interfaces.js +39 -39
  147. package/dist/collection/global/intl.js +162 -162
  148. package/dist/collection/global/services/__mocks__/http-service.js +112 -112
  149. package/dist/collection/global/services/http-service.js +41 -41
  150. package/dist/collection/global/themes/default.js +4 -4
  151. package/dist/collection/global/themes/neutral.js +4 -4
  152. package/dist/collection/lang/lang.spec.js +13 -13
  153. package/dist/esm/chartFunctions-c6184d93.js +599 -0
  154. package/dist/esm/{functions-da3b00cf.js → functions-678206d3.js} +461 -461
  155. package/dist/esm/{global-476a47a3.js → global-f7b4b22f.js} +24 -24
  156. package/dist/esm/http-service-29ae1654.js +52 -0
  157. package/dist/esm/{index-294d486f.js → index-a9481bfb.js} +263 -55
  158. package/dist/esm/interfaces-0d0c80fb.js +32 -0
  159. package/dist/esm/intl-13ee0913.js +174 -0
  160. package/dist/esm/loader.js +5 -14
  161. package/dist/esm/priv-chart-popover.entry.js +85 -85
  162. package/dist/esm/priv-datepicker.entry.js +640 -640
  163. package/dist/esm/priv-navigator-button.entry.js +18 -18
  164. package/dist/esm/priv-navigator-item.entry.js +21 -21
  165. package/dist/esm/ripple.js +5 -8
  166. package/dist/esm/wm-action-menu_2.entry.js +324 -324
  167. package/dist/esm/wm-button.entry.js +199 -192
  168. package/dist/esm/wm-chart-slice.entry.js +17 -17
  169. package/dist/esm/wm-chart.entry.js +173 -173
  170. package/dist/esm/wm-datepicker.entry.js +246 -246
  171. package/dist/esm/wm-file-list.entry.js +33 -33
  172. package/dist/esm/wm-file.entry.js +180 -180
  173. package/dist/esm/wm-input.entry.js +148 -148
  174. package/dist/esm/wm-line-chart.entry.js +448 -448
  175. package/dist/esm/wm-modal-footer.entry.js +32 -32
  176. package/dist/esm/wm-modal-header.entry.js +31 -31
  177. package/dist/esm/wm-modal.entry.js +151 -151
  178. package/dist/esm/wm-navigation_3.entry.js +179 -179
  179. package/dist/esm/wm-navigator.entry.js +245 -245
  180. package/dist/esm/wm-network-uploader.entry.js +452 -452
  181. package/dist/esm/wm-option_2.entry.js +761 -761
  182. package/dist/esm/wm-pagination.entry.js +171 -171
  183. package/dist/esm/wm-progress-indicator_3.entry.js +151 -151
  184. package/dist/esm/wm-search.entry.js +194 -194
  185. package/dist/esm/wm-snackbar.entry.js +128 -128
  186. package/dist/esm/wm-tab-item_3.entry.js +258 -258
  187. package/dist/esm/wm-tag-input-row.entry.js +14 -14
  188. package/dist/esm/wm-tag-input.entry.js +953 -953
  189. package/dist/esm/wm-timepicker.entry.js +365 -365
  190. package/dist/esm/wm-toggletip.entry.js +106 -106
  191. package/dist/esm/wm-uploader.entry.js +437 -437
  192. package/dist/esm/wm-wrapper.entry.js +12 -12
  193. package/dist/esm-es5/chartFunctions-c6184d93.js +1 -0
  194. package/dist/esm-es5/{functions-da3b00cf.js → functions-678206d3.js} +1 -1
  195. package/dist/esm-es5/{global-476a47a3.js → global-f7b4b22f.js} +1 -1
  196. package/dist/esm-es5/http-service-29ae1654.js +1 -0
  197. package/dist/esm-es5/index-a9481bfb.js +2 -0
  198. package/dist/esm-es5/{intl-3eb5074d.js → intl-13ee0913.js} +1 -1
  199. package/dist/esm-es5/loader.js +1 -1
  200. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  201. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  202. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  203. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  204. package/dist/esm-es5/ripple.js +1 -1
  205. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  206. package/dist/esm-es5/wm-button.entry.js +1 -1
  207. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  208. package/dist/esm-es5/wm-chart.entry.js +1 -1
  209. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  210. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  211. package/dist/esm-es5/wm-file.entry.js +1 -1
  212. package/dist/esm-es5/wm-input.entry.js +1 -1
  213. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  214. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  215. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  216. package/dist/esm-es5/wm-modal.entry.js +1 -1
  217. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  218. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  219. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  220. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  221. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  222. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  223. package/dist/esm-es5/wm-search.entry.js +1 -1
  224. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  225. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  226. package/dist/esm-es5/wm-tag-input-row.entry.js +1 -1
  227. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  228. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  229. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  230. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  231. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  232. package/dist/loader/index.d.ts +1 -1
  233. package/dist/ripple/{p-eb0d569a.system.entry.js → p-030a1d60.system.entry.js} +1 -1
  234. package/dist/ripple/{p-fcb4328c.entry.js → p-05faa70d.entry.js} +1 -1
  235. package/dist/ripple/{p-1984e1c7.system.entry.js → p-09189cd7.system.entry.js} +1 -1
  236. package/dist/ripple/{p-aa3f9686.entry.js → p-0ac8675f.entry.js} +1 -1
  237. package/dist/ripple/p-0d294a36.system.js +1 -0
  238. package/dist/ripple/{p-9f3a6192.js → p-14918bd3.js} +1 -1
  239. package/dist/ripple/{p-a3ce6f93.entry.js → p-15b390e4.entry.js} +1 -1
  240. package/dist/ripple/{p-cd01caeb.system.entry.js → p-16789af9.system.entry.js} +1 -1
  241. package/dist/ripple/{p-6fb4eb05.system.entry.js → p-178fb4f8.system.entry.js} +1 -1
  242. package/dist/ripple/{p-63abf623.system.entry.js → p-18ee4128.system.entry.js} +1 -1
  243. package/dist/ripple/{p-32c8a588.entry.js → p-19f912bd.entry.js} +1 -1
  244. package/dist/ripple/{p-5e109597.entry.js → p-1b188292.entry.js} +1 -1
  245. package/dist/ripple/{p-9be73edd.system.entry.js → p-213ac3de.system.entry.js} +1 -1
  246. package/dist/ripple/{p-d3df5034.system.entry.js → p-23b906b6.system.entry.js} +1 -1
  247. package/dist/ripple/{p-da048416.system.entry.js → p-25b1eb9c.system.entry.js} +1 -1
  248. package/dist/ripple/{p-dea254a1.entry.js → p-26e71cda.entry.js} +1 -1
  249. package/dist/ripple/{p-5c2d6dae.entry.js → p-27fea0fb.entry.js} +1 -1
  250. package/dist/ripple/{p-38699bbd.js → p-32a69850.js} +1 -1
  251. package/dist/ripple/{p-08b7ec08.system.js → p-334d727d.system.js} +1 -1
  252. package/dist/ripple/p-33d93cb0.system.js +2 -0
  253. package/dist/ripple/{p-81c52231.entry.js → p-346c8b1a.entry.js} +1 -1
  254. package/dist/ripple/{p-70bcec5b.system.entry.js → p-356fec62.system.entry.js} +1 -1
  255. package/dist/ripple/{p-f7391b66.entry.js → p-38e0cd05.entry.js} +1 -1
  256. package/dist/ripple/p-39b905d4.system.entry.js +1 -0
  257. package/dist/ripple/p-3a233bd1.js +2 -0
  258. package/dist/ripple/p-3b510ae3.system.entry.js +1 -0
  259. package/dist/ripple/{p-d3b54132.entry.js → p-3d397c20.entry.js} +1 -1
  260. package/dist/ripple/{p-be78d6db.entry.js → p-3ed4cd8b.entry.js} +1 -1
  261. package/dist/ripple/{p-c44fb391.entry.js → p-3ed9b3e8.entry.js} +1 -1
  262. package/dist/ripple/{p-e5e28616.system.entry.js → p-42dcaffb.system.entry.js} +1 -1
  263. package/dist/ripple/{p-427747c5.system.entry.js → p-5379ad6d.system.entry.js} +1 -1
  264. package/dist/ripple/{p-33b79cba.system.js → p-562b94a3.system.js} +1 -1
  265. package/dist/ripple/p-5b0910de.system.entry.js +1 -0
  266. package/dist/ripple/{p-fbb44d4c.entry.js → p-5e731b44.entry.js} +1 -1
  267. package/dist/ripple/{p-81c40ed3.system.entry.js → p-6289d0c6.system.entry.js} +1 -1
  268. package/dist/ripple/{p-d26d60fd.entry.js → p-65303e4b.entry.js} +1 -1
  269. package/dist/ripple/{p-c1b36890.system.entry.js → p-6784b8b1.system.entry.js} +1 -1
  270. package/dist/ripple/{p-4891e621.system.entry.js → p-6cd7bf6f.system.entry.js} +1 -1
  271. package/dist/ripple/{p-203152e7.entry.js → p-6e8973e6.entry.js} +1 -1
  272. package/dist/ripple/{p-7f1c918f.system.entry.js → p-6edb5fc4.system.entry.js} +1 -1
  273. package/dist/ripple/{p-bf85a915.system.entry.js → p-7393dfaa.system.entry.js} +1 -1
  274. package/dist/ripple/{p-f2f4b743.entry.js → p-7768c5bb.entry.js} +1 -1
  275. package/dist/ripple/{p-c459ef8e.entry.js → p-7d1166f8.entry.js} +1 -1
  276. package/dist/ripple/p-7dd354b3.system.entry.js +1 -0
  277. package/dist/ripple/{p-6cc52a23.system.entry.js → p-7e984aa5.system.entry.js} +1 -1
  278. package/dist/ripple/{p-af1d2a68.js → p-8c562810.js} +1 -1
  279. package/dist/ripple/p-94d12250.system.js +1 -0
  280. package/dist/ripple/{p-2c9fa4e1.entry.js → p-955d56d8.entry.js} +1 -1
  281. package/dist/ripple/{p-38b67301.entry.js → p-98762794.entry.js} +1 -1
  282. package/dist/ripple/{p-86878f67.system.entry.js → p-9a1418f3.system.entry.js} +1 -1
  283. package/dist/ripple/p-9ab01d24.entry.js +1 -0
  284. package/dist/ripple/{p-1eb5a93a.js → p-a849b12d.js} +1 -1
  285. package/dist/ripple/p-b0f3ad42.system.js +1 -0
  286. package/dist/ripple/{p-14e956bd.entry.js → p-b831badc.entry.js} +1 -1
  287. package/dist/ripple/{p-458c1c0b.system.entry.js → p-b9d08dc0.system.entry.js} +1 -1
  288. package/dist/ripple/p-beb16976.system.js +1 -0
  289. package/dist/ripple/{p-2683ea3a.entry.js → p-c1772227.entry.js} +1 -1
  290. package/dist/ripple/p-ca0ca361.system.entry.js +1 -0
  291. package/dist/ripple/{p-a7dd417d.entry.js → p-cc0a48ff.entry.js} +1 -1
  292. package/dist/ripple/p-d1a4a3cf.system.entry.js +1 -0
  293. package/dist/ripple/{p-bdce95d4.entry.js → p-d56df6c0.entry.js} +1 -1
  294. package/dist/ripple/{p-82152243.system.entry.js → p-d5a8b5cc.system.entry.js} +1 -1
  295. package/dist/ripple/p-d66f928a.system.entry.js +1 -0
  296. package/dist/ripple/{p-d601c5a1.entry.js → p-db989c8b.entry.js} +1 -1
  297. package/dist/ripple/{p-249597a9.system.entry.js → p-df5bd186.system.entry.js} +1 -1
  298. package/dist/ripple/{p-1678e4b5.entry.js → p-e41b4093.entry.js} +1 -1
  299. package/dist/ripple/{p-3642dff3.system.entry.js → p-e5875515.system.entry.js} +1 -1
  300. package/dist/ripple/{p-42cd9ae6.entry.js → p-ed0eb50a.entry.js} +1 -1
  301. package/dist/ripple/{p-f3184d03.entry.js → p-ee822ead.entry.js} +1 -1
  302. package/dist/ripple/p-f34bbe7c.system.entry.js +1 -0
  303. package/dist/ripple/{p-d3353dda.entry.js → p-f36d48e7.entry.js} +1 -1
  304. package/dist/ripple/{p-2c049e82.system.entry.js → p-f70ff7c5.system.entry.js} +1 -1
  305. package/dist/ripple/{p-2b59a09f.entry.js → p-f8e5f0b7.entry.js} +1 -1
  306. package/dist/ripple/{p-2e52e36f.system.js → p-fbbdc9cc.system.js} +1 -1
  307. package/dist/ripple/{p-fcbd4194.entry.js → p-fd5389c9.entry.js} +1 -1
  308. package/dist/ripple/ripple.esm.js +1 -1
  309. package/dist/ripple/ripple.js +16 -20
  310. package/dist/types/components/charts/chartFunctions.d.ts +13 -13
  311. package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +24 -24
  312. package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +8 -8
  313. package/dist/types/components/charts/wm-chart/wm-chart.d.ts +43 -43
  314. package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +73 -73
  315. package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +26 -26
  316. package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
  317. package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +7 -7
  318. package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +46 -46
  319. package/dist/types/components/wm-button/wm-button.d.ts +45 -43
  320. package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +77 -77
  321. package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
  322. package/dist/types/components/wm-file/wm-file.d.ts +36 -36
  323. package/dist/types/components/wm-file-list/wm-file-list.d.ts +12 -12
  324. package/dist/types/components/wm-input/wm-input.d.ts +56 -56
  325. package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +31 -31
  326. package/dist/types/components/wm-modal/wm-modal-footer.d.ts +12 -12
  327. package/dist/types/components/wm-modal/wm-modal-header.d.ts +8 -8
  328. package/dist/types/components/wm-modal/wm-modal.d.ts +37 -37
  329. package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +13 -13
  330. package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +10 -10
  331. package/dist/types/components/wm-navigation/wm-navigation.d.ts +23 -23
  332. package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +7 -7
  333. package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +10 -10
  334. package/dist/types/components/wm-navigator/wm-navigator.d.ts +57 -57
  335. package/dist/types/components/wm-option/wm-option.d.ts +31 -31
  336. package/dist/types/components/wm-pagination/wm-pagination.d.ts +28 -28
  337. package/dist/types/components/wm-search/wm-search.d.ts +76 -76
  338. package/dist/types/components/wm-select/wm-select.d.ts +100 -100
  339. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +26 -26
  340. package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +33 -33
  341. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +49 -49
  342. package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +16 -16
  343. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +8 -8
  344. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +130 -130
  345. package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +60 -60
  346. package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +22 -22
  347. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +73 -73
  348. package/dist/types/components/wm-uploader/wm-uploader.d.ts +93 -93
  349. package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +4 -4
  350. package/dist/types/components.d.ts +425 -0
  351. package/dist/types/global/__mocks__/functions.d.ts +1 -1
  352. package/dist/types/global/functions.d.ts +4 -4
  353. package/dist/types/global/interfaces.d.ts +56 -56
  354. package/dist/types/global/intl.d.ts +31 -31
  355. package/dist/types/global/services/__mocks__/http-service.d.ts +1 -1
  356. package/dist/types/stencil-public-runtime.d.ts +46 -5
  357. package/package.json +1 -1
  358. package/dist/cjs/chartFunctions-dcefe35e.js +0 -615
  359. package/dist/cjs/http-service-9e8c4dd5.js +0 -57
  360. package/dist/cjs/interfaces-30a74c1f.js +0 -35
  361. package/dist/cjs/intl-800e0638.js +0 -179
  362. package/dist/esm/chartFunctions-38758d18.js +0 -599
  363. package/dist/esm/http-service-5d037e16.js +0 -52
  364. package/dist/esm/interfaces-61c6305b.js +0 -32
  365. package/dist/esm/intl-3eb5074d.js +0 -174
  366. package/dist/esm/polyfills/css-shim.js +0 -1
  367. package/dist/esm-es5/chartFunctions-38758d18.js +0 -1
  368. package/dist/esm-es5/http-service-5d037e16.js +0 -1
  369. package/dist/esm-es5/index-294d486f.js +0 -2
  370. package/dist/ripple/p-0412d22d.system.entry.js +0 -1
  371. package/dist/ripple/p-11b416c7.js +0 -2
  372. package/dist/ripple/p-172fa114.system.entry.js +0 -1
  373. package/dist/ripple/p-313b6073.system.js +0 -1
  374. package/dist/ripple/p-3cc86126.system.entry.js +0 -1
  375. package/dist/ripple/p-7e84d2f5.entry.js +0 -1
  376. package/dist/ripple/p-7eb9bac9.system.js +0 -1
  377. package/dist/ripple/p-8c6ffd70.system.entry.js +0 -1
  378. package/dist/ripple/p-975c0d09.system.js +0 -1
  379. package/dist/ripple/p-9d565ee0.system.js +0 -1
  380. package/dist/ripple/p-bde26da9.system.entry.js +0 -1
  381. package/dist/ripple/p-c467a1e1.system.js +0 -2
  382. package/dist/ripple/p-c5942ad6.system.entry.js +0 -1
  383. package/dist/ripple/p-e527bff3.system.entry.js +0 -1
  384. package/dist/ripple/p-e8732b27.system.entry.js +0 -1
  385. /package/dist/esm-es5/{interfaces-61c6305b.js → interfaces-0d0c80fb.js} +0 -0
  386. /package/dist/ripple/{p-888bec42.js → p-5f695d93.js} +0 -0
  387. /package/dist/ripple/{p-a6d6eae7.js → p-6750c455.js} +0 -0
@@ -0,0 +1,615 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-ab860fe5.js');
4
+ const functions = require('./functions-5ab75e7b.js');
5
+
6
+ const colors = {
7
+ salmon: "#ff5f4e",
8
+ cyan: "#19a1a9",
9
+ forest: "#088000",
10
+ sleet: "#7f97ad",
11
+ midnight: "#2e1b46",
12
+ lavender: "#8b86ca",
13
+ periwinkle: "#575195",
14
+ gray: "#6b6b6b",
15
+ };
16
+ const allChartsDetails = {
17
+ // for progress monitor
18
+ doughnut: {
19
+ size: 155,
20
+ colors: [colors.forest, colors.gray],
21
+ thickness: 0.73,
22
+ padding: 25,
23
+ category: "doughnut",
24
+ },
25
+ // deprecated hybrid chart type, should use Progress Indicator's "doughnut" instead
26
+ doughnut0: {
27
+ size: 155,
28
+ colors: [colors.forest, colors.gray],
29
+ thickness: 0.73,
30
+ padding: 25,
31
+ category: "doughnut",
32
+ },
33
+ doughnut1: {
34
+ size: 130,
35
+ colors: [colors.lavender, colors.midnight, colors.gray],
36
+ thickness: 0.5,
37
+ padding: 90,
38
+ category: "doughnut",
39
+ },
40
+ doughnut2: {
41
+ size: 130,
42
+ colors: [colors.cyan, colors.salmon, colors.gray],
43
+ thickness: 0.5,
44
+ padding: 90,
45
+ category: "doughnut",
46
+ },
47
+ // an internal type only for use when doughnut 2 is populated with 4 slices
48
+ // in this case, the first slice is colored purple
49
+ doughnut2b: {
50
+ size: 130,
51
+ colors: [colors.periwinkle, colors.cyan, colors.salmon, colors.gray],
52
+ thickness: 0.5,
53
+ padding: 90,
54
+ category: "doughnut",
55
+ },
56
+ doughnut3: {
57
+ size: 130,
58
+ colors: [colors.lavender, colors.midnight, "#0089e4", colors.forest, "#ea8500", "#d54f41", "#146ca9"],
59
+ thickness: 0.5,
60
+ padding: 90,
61
+ category: "doughnut",
62
+ },
63
+ // for progress monitor
64
+ bar: {
65
+ size: 350,
66
+ colors: [colors.forest, colors.gray],
67
+ padding: 0,
68
+ category: "stackedBar",
69
+ },
70
+ // deprecated hybrid chart type, should use Progress Indicator's "bar" instead
71
+ bar1: {
72
+ size: 350,
73
+ colors: [colors.forest, colors.gray],
74
+ padding: 0,
75
+ category: "stackedBar",
76
+ },
77
+ bar2: {
78
+ size: 400,
79
+ colors: [colors.gray, colors.periwinkle, colors.cyan, colors.salmon],
80
+ padding: 0,
81
+ category: "stackedBar",
82
+ },
83
+ bar2b: {
84
+ size: 400,
85
+ colors: [colors.gray, colors.periwinkle, colors.midnight, colors.cyan, colors.salmon],
86
+ padding: 0,
87
+ category: "stackedBar",
88
+ },
89
+ bar3: {
90
+ size: 300,
91
+ colors: ["#0d696e", colors.cyan, "#8e4129", colors.salmon],
92
+ padding: 0,
93
+ category: "stackedBar",
94
+ },
95
+ bar4: {
96
+ size: 400,
97
+ colors: [colors.salmon, colors.cyan, colors.periwinkle],
98
+ padding: 0,
99
+ category: "stackedBar",
100
+ },
101
+ bar5: {
102
+ size: 400,
103
+ colors: [
104
+ colors.gray,
105
+ colors.lavender,
106
+ colors.midnight,
107
+ "#0089e4",
108
+ colors.forest,
109
+ "#ea8500",
110
+ "#d54f41",
111
+ "#146ca9",
112
+ ],
113
+ padding: 0,
114
+ category: "stackedBar",
115
+ },
116
+ bar6: {
117
+ size: 400,
118
+ colors: [colors.lavender],
119
+ padding: 0,
120
+ category: "simpleBar",
121
+ },
122
+ bar7: {
123
+ size: 400,
124
+ colors: [colors.periwinkle, colors.cyan, colors.salmon, colors.gray],
125
+ padding: 0,
126
+ category: "simpleBar",
127
+ },
128
+ };
129
+ function showValue(valueFormat) {
130
+ return valueFormat === "percentage" || valueFormat === "amount" ? "show-values" : "";
131
+ }
132
+ const textHiddenMessage = functions.intl.formatMessage({
133
+ id: "chart.hiddenValues",
134
+ defaultMessage: "Values are not shown when too close to each other.",
135
+ description: "Text displayed when a chart has some values hidden",
136
+ });
137
+ const seeDetailsMessage = functions.intl.formatMessage({
138
+ id: "chart.clickToSeeDetails",
139
+ defaultMessage: "Click or use arrow keys to see details.",
140
+ description: "Text displayed, guiding user to interact to see more details.",
141
+ });
142
+ function abbrNumber(num) {
143
+ return num > 999 || num < -999 ? Math.round(num / 100) / 10 + "K" : num;
144
+ }
145
+ function amountToPercent(val, total, asInt) {
146
+ return asInt ? Math.round((val * 100) / total) : Math.round((val * 10000) / total) / 100; // with 2 decimals
147
+ }
148
+ function amountToDegree(val, total) {
149
+ // In a circle of {total}, determine degrees of slice {val}
150
+ return (val * 360) / total;
151
+ }
152
+ function toFixed(number) {
153
+ return parseFloat((Math.floor(number * 100) / 100).toFixed(2));
154
+ }
155
+ function polarToCartesian(half, radius, startAngle, endAngle) {
156
+ var x = toFixed(half + half * radius * Math.cos((Math.PI * startAngle) / 180));
157
+ var y = toFixed(half + half * radius * Math.sin((Math.PI * startAngle) / 180));
158
+ if (endAngle !== undefined) {
159
+ // if a 2nd angle value was passed, return 2 pairs of coords
160
+ var x2 = toFixed(half + half * radius * Math.cos((Math.PI * endAngle) / 180));
161
+ var y2 = toFixed(half + half * radius * Math.sin((Math.PI * endAngle) / 180));
162
+ return { x1: x, y1: y, x2, y2 };
163
+ }
164
+ return { x, y };
165
+ }
166
+ function getArc(radius, largeArcFlag, x, y, chartSize) {
167
+ var z = toFixed((chartSize / 2) * radius);
168
+ return `A ${z}, ${z} 0 ${largeArcFlag} ${toFixed(x)}, ${toFixed(y)}`;
169
+ }
170
+ function scale(val, inMin, inMax, outMin, outMax) {
171
+ let scaled = ((val - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;
172
+ // clip the values so that whatever is passed in the output is never smaller than outMin or greater than outMax
173
+ return scaled < outMin ? outMin : scaled > outMax ? outMax : scaled;
174
+ }
175
+ function minSpacing(width) {
176
+ // minimum spacing between 2 ticks, in px
177
+ return scale(width, 300, 900, 70, 150);
178
+ }
179
+ function getMaxTicks(width) {
180
+ return Math.round(width / minSpacing(width));
181
+ }
182
+ function getInterval(largest, maxticks) {
183
+ const minimum = largest / maxticks;
184
+ const magnitude = 10 ** Math.floor(Math.log10(minimum));
185
+ const residual = minimum / magnitude;
186
+ let interval;
187
+ if (residual > 5) {
188
+ interval = 10 * magnitude;
189
+ }
190
+ else if (residual > 3) {
191
+ interval = 5 * magnitude;
192
+ }
193
+ else if (residual > 2) {
194
+ interval = 3 * magnitude;
195
+ }
196
+ else if (residual > 1.5) {
197
+ interval = 2 * magnitude;
198
+ }
199
+ else if (residual > 1) {
200
+ interval = 1.5 * magnitude;
201
+ }
202
+ else {
203
+ interval = magnitude;
204
+ }
205
+ return interval;
206
+ }
207
+ function handleSliceKeyDown(ev) {
208
+ if (this.popoverEl && this.popoverEl.open && ev.key === "Enter") {
209
+ const popoverBtn = this.popoverEl.querySelector("button");
210
+ popoverBtn && popoverBtn.click();
211
+ }
212
+ }
213
+ function handleSliceClick(ev, s) {
214
+ if (this.popoverEl && !this.isTabbing) {
215
+ s.coords = { x: ev.clientX, y: ev.clientY };
216
+ openPopover.call(this, s);
217
+ }
218
+ }
219
+ function handleSliceFocus(ev, s) {
220
+ if (this.popoverEl && this.isTabbing) {
221
+ s.coords = functions.getPosition(ev.target);
222
+ openPopover.call(this, s);
223
+ }
224
+ }
225
+ function handleChartKeydown(ev) {
226
+ switch (ev.key) {
227
+ // arrow up / left
228
+ case "ArrowUp":
229
+ case "ArrowLeft":
230
+ ev.preventDefault();
231
+ this.isTabbing = true; // shd already be true. just in case user clicked on chart then pressed an arrow key
232
+ focusPrevious.call(this);
233
+ break;
234
+ // arrow right / down
235
+ case "ArrowRight":
236
+ case "ArrowDown":
237
+ ev.preventDefault();
238
+ this.isTabbing = true; // shd already be true. just in case user clicked on chart then pressed an arrow key
239
+ focusNext.call(this);
240
+ break;
241
+ // tab
242
+ case "Tab":
243
+ exitChart.call(this);
244
+ break;
245
+ case "Escape":
246
+ this.popoverEl.open = false;
247
+ this.userIsNavigating = false;
248
+ break;
249
+ }
250
+ }
251
+ function openPopover(s) {
252
+ if (!!this.popoverEl && !!s.title && !!s.text) {
253
+ this.popoverEl.popoverTitle = s.title;
254
+ this.popoverEl.popoverText = s.text;
255
+ this.popoverEl.buttonText = s.buttonText;
256
+ this.popoverEl.coords = s.coords;
257
+ this.popoverEl.sliceRef = s.sliceRef;
258
+ window.setTimeout(() => {
259
+ if (this.popoverEl) {
260
+ this.popoverEl.open = true;
261
+ }
262
+ }, 30);
263
+ const debouncedClosePopover = functions.debounce(async () => {
264
+ this.popoverEl.open = false;
265
+ }, 10);
266
+ // set up event listeners for scrolling
267
+ // to close popover on page scroll
268
+ document.addEventListener("scroll", () => {
269
+ debouncedClosePopover();
270
+ });
271
+ // ... and on parent scroll
272
+ const scrollableParent = functions.findParentWithScrollbar(this.el);
273
+ if (!!scrollableParent) {
274
+ scrollableParent.addEventListener("scroll", () => {
275
+ debouncedClosePopover();
276
+ });
277
+ }
278
+ }
279
+ }
280
+ function focusNext() {
281
+ const activeEl = functions.checkForActiveElInShadow(document.activeElement);
282
+ const index =
283
+ // if the active el is not in the array the first element gets focused
284
+ (this.sliceEls.indexOf(activeEl) + 1) % this.sliceEls.length;
285
+ focusSlice.call(this, index);
286
+ }
287
+ function focusPrevious() {
288
+ if (this.sliceEls) {
289
+ const activeEl = functions.checkForActiveElInShadow(document.activeElement);
290
+ let index = this.sliceEls.indexOf(activeEl);
291
+ if (index === -1) {
292
+ // not in the array : focus the first slice
293
+ index = 0;
294
+ }
295
+ else if (index === 0) {
296
+ // first slice : focus the last slice
297
+ index = this.sliceEls.length - 1;
298
+ }
299
+ else {
300
+ // anything else: focus previous
301
+ index -= 1;
302
+ }
303
+ focusSlice.call(this, index);
304
+ }
305
+ }
306
+ function focusSlice(index) {
307
+ if (this.sliceEls && this.el) {
308
+ this.userIsNavigating = true;
309
+ if (this.popoverEl) {
310
+ this.popoverEl.open = false;
311
+ }
312
+ // set tabindex of the wrapper to -1 while slices are being focused, to allow for shft-tabbing out of the component directly
313
+ this.componentWrapperEl.tabIndex = -1;
314
+ // @ts-ignore
315
+ this.el.focusable = false; // for Edge
316
+ this.sliceEls.map((p) => {
317
+ p.tabIndex = -1;
318
+ // @ts-ignore
319
+ p.focusable = false; // for Edge
320
+ });
321
+ this.sliceEls[index].tabIndex = 0;
322
+ // @ts-ignore
323
+ this.sliceEls[index].focusable = true; // for Edge
324
+ this.sliceEls[index].focus();
325
+ window.setTimeout(() => {
326
+ if (this.popoverEl) {
327
+ this.popoverEl.open = true;
328
+ }
329
+ }, 10);
330
+ }
331
+ }
332
+ function exitChart() {
333
+ this.sliceEls &&
334
+ this.sliceEls.map((p) => {
335
+ p.tabIndex = -1;
336
+ // @ts-ignore
337
+ p.focusable = false; // for Edge
338
+ });
339
+ this.userIsNavigating = false;
340
+ // delay so that we can tab out of component before chart becomes focusable again
341
+ // and in case user was still pressing an arrow key when they pressed tab
342
+ window.setTimeout(() => {
343
+ this.componentWrapperEl.tabIndex = 0;
344
+ // @ts-ignore
345
+ this.el.focusable = true; // for Edge
346
+ if (this.popoverEl) {
347
+ this.popoverEl.open = false;
348
+ }
349
+ }, 100);
350
+ }
351
+ async function getDetails(chartType) {
352
+ this.slicesDetails = [];
353
+ let acc = 0;
354
+ const children = Array.from(this.el.children);
355
+ this.total = children.reduce((total, slice) => (total += parseInt(slice.getAttribute("amount") || "0")), 0);
356
+ children.forEach((c, i) => {
357
+ const amount = parseInt(c.getAttribute("amount") || "0");
358
+ const perc = amountToPercent(amount, this.total, true);
359
+ let colorIndex = i;
360
+ // for bar5, first color should be skipped unless notStartedColor is set to true
361
+ if (chartType === "bar5") {
362
+ colorIndex = this.notStartedColor ? i : i + 1;
363
+ }
364
+ // bars in bar6 are all the same color
365
+ if (chartType === "bar6") {
366
+ colorIndex = 0;
367
+ }
368
+ const color = allChartsDetails[chartType].colors[colorIndex];
369
+ const sliceDetails = {
370
+ amount: amount,
371
+ perc: perc,
372
+ legend: c.getAttribute("legend"),
373
+ color: color || colors.gray,
374
+ offset: acc,
375
+ id: `${this.uid}-${i + 1}`,
376
+ title: c.getAttribute("popover-title"),
377
+ text: c.getAttribute("popover-text"),
378
+ buttonText: c.getAttribute("popover-button-text"),
379
+ sliceRef: c,
380
+ inSmallCluster: false,
381
+ };
382
+ acc += amount;
383
+ this.slicesDetails.push(sliceDetails);
384
+ });
385
+ }
386
+ function sortSlicesDetails(slicesDetails, total) {
387
+ // sort slices by decreasing amount
388
+ let sortedSlicesDetails = [...slicesDetails].sort((a, b) => a.amount === b.amount ? 0 : a.amount > b.amount ? -1 : 1);
389
+ let acc = 0;
390
+ sortedSlicesDetails.forEach((s, idx) => {
391
+ const prev = sortedSlicesDetails[idx === 0 ? sortedSlicesDetails.length - 1 : idx - 1];
392
+ const next = sortedSlicesDetails[idx === sortedSlicesDetails.length - 1 ? 0 : idx + 1];
393
+ const prevPerc = amountToPercent(prev.amount, total, true);
394
+ const nextPerc = amountToPercent(next.amount, total, true);
395
+ s.offset = acc;
396
+ acc += s.amount;
397
+ s.inSmallCluster = isInSmallCluster(prevPerc, s.perc, s.amount, nextPerc);
398
+ });
399
+ return sortedSlicesDetails;
400
+ }
401
+ function isInSmallCluster(prevPerc, perc, amount, nextPerc) {
402
+ // determine whether the slice is in a cluster of small values
403
+ // to avoid percentage text overlap for small values
404
+ const isSmall = perc < 4;
405
+ const prevIsSmall = prevPerc < 5;
406
+ const nextIsSmall = nextPerc < 5;
407
+ let inSmallCluster = isSmall && (prevIsSmall || nextIsSmall);
408
+ // because <1% slice percentage text has an additional character
409
+ // the inSmallCluster threshold needs to be widened for that slice only
410
+ const lessThanOnePerc = perc === 0 && amount > 0;
411
+ if (lessThanOnePerc && (nextPerc < 8 || prevPerc < 8)) {
412
+ inSmallCluster = true;
413
+ }
414
+ return inSmallCluster;
415
+ }
416
+ function getPathData(amount, offset, chartType) {
417
+ const startAngle = amountToDegree(offset, this.total) - 90; // start at noon, not at 3 o'clock
418
+ const activeAngle = (amount / this.total) * 360;
419
+ let endAngle = startAngle + activeAngle;
420
+ const largeArcFlagOuter = activeAngle > 180 ? "1 1" : "0 1";
421
+ const largeArcFlagInner = activeAngle > 180 ? "1 0" : "0 0";
422
+ const half = this.chartDetails.size / 2;
423
+ const innerRadius = this.chartDetails.thickness;
424
+ const outerRadius = 1;
425
+ const isHybridDoughnut = chartType === "doughnut0" || chartType === "doughnut";
426
+ const outerSeparatorOffset = 1.5;
427
+ const innerSeparatorOffset = isHybridDoughnut ? 2.25 : 3;
428
+ if (activeAngle === 360) {
429
+ // fix to avoid bad svg shape when the path goes all around (100%)
430
+ endAngle -= 0.01;
431
+ }
432
+ const outerCoords = polarToCartesian(half, outerRadius, startAngle + outerSeparatorOffset, // Addition for slice separator
433
+ endAngle);
434
+ const innerCoords = polarToCartesian(half, innerRadius, startAngle + innerSeparatorOffset, // Addition for slice separator
435
+ endAngle);
436
+ const moveTo = `M ${outerCoords.x1}, ${outerCoords.y1} `;
437
+ const arc1 = getArc(outerRadius, largeArcFlagOuter, outerCoords.x2, outerCoords.y2, this.chartDetails.size);
438
+ const line = ` L ${innerCoords.x2}, ${innerCoords.y2} `;
439
+ const arc2 = getArc(innerRadius, largeArcFlagInner, innerCoords.x1, innerCoords.y1, this.chartDetails.size);
440
+ return moveTo + arc1 + line + arc2 + " z";
441
+ }
442
+ function renderInstructionsText() {
443
+ const chartInstructions = functions.intl.formatMessage({
444
+ id: "chart.instructions",
445
+ defaultMessage: "Use arrow keys to browse elements, press Tab to exit.",
446
+ description: "For screen readers only, instructions on how to interact with the chart component",
447
+ });
448
+ return index.h("div", { id: "chart-instructions" }, chartInstructions);
449
+ }
450
+ function renderFilter() {
451
+ return (index.h("defs", null,
452
+ index.h("filter", { id: "wmHoverDropShadow" },
453
+ index.h("feGaussianBlur", { stdDeviation: "3" }),
454
+ index.h("feOffset", { result: "offsetblur" }),
455
+ index.h("feFlood", { "flood-color": "#333" }),
456
+ index.h("feComposite", { operator: "in", in2: "offsetblur" }),
457
+ index.h("feMerge", null,
458
+ index.h("feMergeNode", null),
459
+ index.h("feMergeNode", { in: "SourceGraphic" })))));
460
+ }
461
+ function renderDoughnut(chartType) {
462
+ const outerSize = this.chartDetails.size + this.chartDetails.padding;
463
+ const isHybridDoughnut = chartType === "doughnut0" || chartType === "doughnut";
464
+ // no sorting in progress indicators
465
+ let slicesDetails = isHybridDoughnut ? this.slicesDetails : sortSlicesDetails(this.slicesDetails, this.total);
466
+ return (index.h("div", { class: "chart-wrapper doughnut-wrapper" },
467
+ index.h("svg", { width: outerSize + "px", height: outerSize + "px", id: `graphic-${this.uid}`, class: "doughnut-svg" },
468
+ renderFilter(),
469
+ slicesDetails.map((s) => renderPath.call(this, s, chartType)),
470
+ isHybridDoughnut ? (index.h("text", { class: "value", x: "50%", y: "50%", "font-size": "1.5rem", "font-weight": "500", "text-anchor": "middle", "dominant-baseline": "middle" }, amountToPercent(slicesDetails[0].amount, this.total, true) + "%")) : (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})`, "text-anchor": "middle", "dominant-baseline": "middle" }, slicesDetails.map((s) => s.amount > 0 && !s.inSmallCluster ? renderDoughnutText.call(this, s) : ""))))));
471
+ }
472
+ function renderPath(s, chartType) {
473
+ return (index.h("g", { transform: `translate(${this.chartDetails.padding / 2}, ${this.chartDetails.padding / 2})` },
474
+ index.h("path", { id: s.id, class: "segment doughnut-segment", fill: s.amount ? s.color : "transparent", d: getPathData.call(this, s.amount, s.offset, chartType), onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev), role: "img", "aria-label": s.legend })));
475
+ }
476
+ function renderDoughnutText(s) {
477
+ const arcMiddle = amountToDegree(s.offset + s.amount / 2, this.total);
478
+ let { x, y } = polarToCartesian(this.chartDetails.size / 2, 1.4, arcMiddle - 90);
479
+ return (index.h("text", { class: "value", x: x + "px", y: y + "px" }, `${s.perc > 0 ? s.perc : "<1"}%`));
480
+ }
481
+ function renderStackedBar(chartType) {
482
+ const isHybridBar = chartType === "bar1" || chartType === "bar";
483
+ return (index.h("div", { class: "chart-wrapper bar-wrapper" },
484
+ isHybridBar ? (index.h("div", { class: "single-perc" }, amountToPercent(this.slicesDetails[0].amount, this.total, true) + "%")) : (""),
485
+ this.chartType === "bar3" && this.drawAxis(),
486
+ index.h("div", { class: `inner-stacked-bar-wrapper ${showValue(this.tempValueFormat)}` },
487
+ !isHybridBar ? (index.h("div", { class: "values" }, this.slicesDetails.map((s, idx) => this.renderBarText(s, idx)))) : (""),
488
+ index.h("div", { class: "stacked-bar-segments-wrapper" }, this.slicesDetails.map((s, idx) => renderStackedBarSegment.call(this, s, idx))),
489
+ isHybridBar ? renderCompletionMessage.call(this) : "")));
490
+ }
491
+ function renderStackedBarSegment(s, idx) {
492
+ const isLastSlice = idx !== this.slicesDetails.length - 1;
493
+ const width = `calc(${amountToPercent(s.amount, this.total, false)}%${isLastSlice ? " - 2px" : ""})`;
494
+ return (index.h("div", { class: `segment stacked-bar-segment ${amountToPercent(s.amount, this.total, false) === 0 ? "zero" : ""}`, style: {
495
+ backgroundColor: s.color,
496
+ width: width,
497
+ }, onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev) },
498
+ index.h("span", { class: "sr-only" }, s.legend)));
499
+ }
500
+ function renderSimpleBar(chartType) {
501
+ // find largest number and get interval, numTicks, chartMaxVal for all.
502
+ const largest = this.slicesDetails
503
+ .map((s) => s.amount)
504
+ .reduce((a, b) => {
505
+ return a > b ? a : b;
506
+ });
507
+ const labelWidth = parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"), 10);
508
+ const chartPadding = 48;
509
+ const componentWidth = this.el.getBoundingClientRect().width;
510
+ const chartWidth = componentWidth - labelWidth - chartPadding;
511
+ let numTicks = getMaxTicks(chartWidth);
512
+ let interval = getInterval(largest, numTicks);
513
+ // after the algorithm finds an interval, remove extra ticks so that the greater number is always between the last tick and the one before that
514
+ const lastTickVal = numTicks * interval;
515
+ const extraTicks = Math.floor((lastTickVal - largest) / interval);
516
+ numTicks -= extraTicks;
517
+ this.el.style.setProperty("--backgroundSize", 100 / numTicks + "%");
518
+ this.el.style.setProperty("--labelWidth", this.labelWidth);
519
+ if (chartType === "bar7" && !this.showBarLegend) {
520
+ this.el.style.setProperty("--labelWidth", "0px");
521
+ }
522
+ // we have to prep the data here rather than iterate directly in the return statement
523
+ // because CSS grid needs a flat structure, and return functions must
524
+ // have a single parent element
525
+ const rows = [];
526
+ this.slicesDetails.forEach((s) => {
527
+ s.legend && rows.push(renderSimpleBarLegend(s.legend, this.showBarLegend, chartType));
528
+ rows.push(renderSimpleBarItem.call(this, s, interval, numTicks, largest));
529
+ });
530
+ const ticks = [];
531
+ for (let i = 1; i <= numTicks; i++) {
532
+ const tickVal = abbrNumber(i * interval);
533
+ ticks.push(index.h("div", { class: "tick" },
534
+ index.h("span", null, tickVal)));
535
+ }
536
+ const showGrid = chartType === "bar6" && this.showGrid && this.el.getBoundingClientRect().width > 300;
537
+ return (index.h("div", { class: "chart-wrapper simple-bar-wrapper" },
538
+ index.h("div", { class: `chart ${showValue(this.tempValueFormat)}` },
539
+ showGrid && index.h("div", { class: "gridlines" }),
540
+ index.h("div", { class: "rows" }, rows)),
541
+ showGrid && (index.h("div", { class: "x-axis", "aria-hidden": "true" },
542
+ index.h("div", { class: "zero" },
543
+ index.h("span", null, "0")),
544
+ ticks))));
545
+ }
546
+ function renderSimpleBarLegend(legend, show, chartType) {
547
+ // not sure how to collapse the left column to 0 width with CSS grid. text should still be available to SR.
548
+ const hidden = chartType === "bar7" && !show ? " hidden" : "";
549
+ return index.h("label", { class: `label${hidden}` }, legend);
550
+ }
551
+ function renderSimpleBarItem(s, interval, ticks, largest) {
552
+ const chartMaxVal = this.currentChartType === "bar6" ? interval * ticks : largest;
553
+ const width = amountToPercent(s.amount, chartMaxVal, false);
554
+ const cssWidth = width ? width + "%" : "1px";
555
+ const amt = abbrNumber(s.amount);
556
+ let displayValue = this.tempValueFormat === "amount" ? amt : "";
557
+ if (this.currentChartType === "bar6" && this.tempValueFormat === "percentage") {
558
+ displayValue = s.amount + "%";
559
+ }
560
+ else if (this.currentChartType === "bar7" && this.tempValueFormat === "percentage") {
561
+ displayValue = (this.total === 0 ? "0" : amountToPercent(s.amount, this.total, true)) + "%";
562
+ }
563
+ return (index.h("div", { class: "bar segment", style: {
564
+ backgroundColor: s.color,
565
+ width: cssWidth,
566
+ }, onClick: (ev) => handleSliceClick.call(this, ev, s), onFocus: (ev) => handleSliceFocus.call(this, ev, s), onKeyDown: (ev) => handleSliceKeyDown.call(this, ev) },
567
+ index.h("div", { class: "value" }, displayValue)));
568
+ }
569
+ function renderLegend(chartType) {
570
+ // legend is hidden for bar1 and bar6 types regardless of showLegend value
571
+ if (this.showLegend) {
572
+ const hasCluster = !this.chartDetails.isBar &&
573
+ this.slicesDetails.reduce((hasCluster, cur) => (hasCluster = cur.inSmallCluster ? true : hasCluster), false);
574
+ return (index.h("div", { class: "legend-wrapper" },
575
+ index.h("div", { class: `legend ${chartType} ${this.mode === "bar" ? "--top" : "--bottom"}`, "aria-hidden": "true" }, this.slicesDetails.map((s) => {
576
+ // when both legend and amount are omitted, the legend is not shown for that particular option (it's been deactivated by the user)
577
+ if (!!s.amount || !!s.legend) {
578
+ return renderLegendItem({ key: s.legend, color: s.color });
579
+ }
580
+ })),
581
+ hasCluster && renderHiddenValuesMessage()));
582
+ }
583
+ }
584
+ function renderLegendItem(legendItem) {
585
+ return (index.h("div", { class: "legend-item" },
586
+ index.h("div", { class: "legend-color", style: { backgroundColor: legendItem.color } }),
587
+ index.h("div", { class: "legend-text" }, legendItem.key)));
588
+ }
589
+ function renderCompletionMessage() {
590
+ if (this.completionMessage) {
591
+ return index.h("div", { class: "completion-message" }, this.completionMessage);
592
+ }
593
+ }
594
+ function renderHiddenValuesMessage() {
595
+ return (index.h("div", { class: "hidden-values-warning" },
596
+ textHiddenMessage,
597
+ index.h("br", null),
598
+ seeDetailsMessage));
599
+ }
600
+
601
+ exports.abbrNumber = abbrNumber;
602
+ exports.allChartsDetails = allChartsDetails;
603
+ exports.amountToPercent = amountToPercent;
604
+ exports.exitChart = exitChart;
605
+ exports.getDetails = getDetails;
606
+ exports.getInterval = getInterval;
607
+ exports.handleChartKeydown = handleChartKeydown;
608
+ exports.renderCompletionMessage = renderCompletionMessage;
609
+ exports.renderDoughnut = renderDoughnut;
610
+ exports.renderHiddenValuesMessage = renderHiddenValuesMessage;
611
+ exports.renderInstructionsText = renderInstructionsText;
612
+ exports.renderLegend = renderLegend;
613
+ exports.renderLegendItem = renderLegendItem;
614
+ exports.renderSimpleBar = renderSimpleBar;
615
+ exports.renderStackedBar = renderStackedBar;