@watermarkinsights/ripple 5.16.0-alpha.1 → 5.16.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/dist/{collection/global/global.js → ripple/app-globals-a0922f84.js} +60 -2
  2. package/dist/{esm/chartFunctions-6749593d.js → ripple/chartFunctions-021607da.js} +3 -3
  3. package/dist/{esm/functions-dabfd76f.js → ripple/functions-3eaaa7c4.js} +7766 -147
  4. package/dist/ripple/index-3d0f1864.js +3017 -0
  5. package/dist/ripple/index.esm.js +1 -0
  6. package/dist/{collection/global/interfaces.js → ripple/interfaces-382e0566.js} +6 -4
  7. package/dist/{esm/intl-43676e71.js → ripple/intl-14fae6dd.js} +1 -1
  8. package/dist/ripple/priv-calendar.entry.js +569 -0
  9. package/dist/ripple/{p-30236be3.system.entry.js → priv-chart-popover.entry.js} +140 -1
  10. package/dist/{esm-es5/priv-chart-popover.entry.js → ripple/priv-navigator-button.entry.js} +24 -1
  11. package/dist/ripple/{p-97ffaa7d.entry.js → priv-navigator-item.entry.js} +30 -1
  12. package/dist/ripple/{p-b01f9572.system.entry.js → priv-option-list.entry.js} +388 -1
  13. package/dist/ripple/ripple.esm.js +47 -1
  14. package/dist/ripple/shadow-css-7ad5caf8.js +332 -0
  15. package/dist/{cjs/wm-button.cjs.entry.js → ripple/wm-action-menu.entry.js} +162 -229
  16. package/dist/{esm-es5/priv-option-list.entry.js → ripple/wm-button.entry.js} +268 -1
  17. package/dist/{esm → ripple}/wm-chart-slice.entry.js +1 -1
  18. package/dist/{esm/wm-file.entry.js → ripple/wm-chart.entry.js} +137 -169
  19. package/dist/ripple/wm-date-range.entry.js +479 -0
  20. package/dist/ripple/wm-datepicker.entry.js +249 -0
  21. package/dist/ripple/{p-c53f5914.entry.js → wm-file-list.entry.js} +18 -1
  22. package/dist/ripple/{p-f9fa1506.system.entry.js → wm-file.entry.js} +189 -1
  23. package/dist/ripple/{p-89479d02.system.entry.js → wm-flyout.entry.js} +175 -1
  24. package/dist/{esm-es5/wm-flyout.entry.js → ripple/wm-input.entry.js} +120 -1
  25. package/dist/ripple/wm-line-chart.entry.js +456 -0
  26. package/dist/{esm/priv-chart-popover.entry.js → ripple/wm-menuitem.entry.js} +98 -114
  27. package/dist/{cjs/priv-navigator-button.cjs.entry.js → ripple/wm-modal-footer.entry.js} +35 -20
  28. package/dist/{esm/priv-navigator-button.entry.js → ripple/wm-modal-header.entry.js} +25 -14
  29. package/dist/ripple/{p-091fbc50.system.entry.js → wm-modal-pss-footer.entry.js} +40 -1
  30. package/dist/ripple/{p-92cb12d3.entry.js → wm-modal-pss-header.entry.js} +39 -1
  31. package/dist/ripple/wm-modal-pss.entry.js +136 -0
  32. package/dist/ripple/{p-1955c66a.system.entry.js → wm-modal.entry.js} +135 -1
  33. package/dist/ripple/wm-navigation-hamburger.entry.js +49 -0
  34. package/dist/ripple/{p-8f987f71.entry.js → wm-navigation-item.entry.js} +21 -1
  35. package/dist/ripple/wm-navigation.entry.js +116 -0
  36. package/dist/{esm/priv-navigator-item.entry.js → ripple/wm-navigator.entry.js} +351 -19
  37. package/dist/ripple/{p-fe93b6b9.system.entry.js → wm-nested-select.entry.js} +310 -1
  38. package/dist/ripple/wm-optgroup.entry.js +69 -0
  39. package/dist/{esm/priv-option-list.entry.js → ripple/wm-option.entry.js} +130 -347
  40. package/dist/ripple/wm-pagination.entry.js +223 -0
  41. package/dist/ripple/wm-progress-indicator.entry.js +112 -0
  42. package/dist/{esm-es5/priv-navigator-item.entry.js → ripple/wm-progress-monitor.entry.js} +74 -1
  43. package/dist/ripple/wm-progress-slice.entry.js +18 -0
  44. package/dist/{cjs/priv-option-list.cjs.entry.js → ripple/wm-search.entry.js} +162 -364
  45. package/dist/{esm/wm-nested-select.entry.js → ripple/wm-select.entry.js} +134 -194
  46. package/dist/ripple/wm-snackbar.entry.js +184 -0
  47. package/dist/{esm-es5/wm-file-list.entry.js → ripple/wm-tab-item.entry.js} +57 -1
  48. package/dist/ripple/wm-tab-list.entry.js +178 -0
  49. package/dist/ripple/wm-tab-panel.entry.js +26 -0
  50. package/dist/ripple/wm-tag-input.entry.js +947 -0
  51. package/dist/{esm → ripple}/wm-tag-option.entry.js +2 -2
  52. package/dist/{cjs/priv-chart-popover.cjs.entry.js → ripple/wm-textarea.entry.js} +60 -122
  53. package/dist/{esm/wm-button.entry.js → ripple/wm-timepicker.entry.js} +251 -218
  54. package/dist/{cjs/priv-navigator-item.cjs.entry.js → ripple/wm-toggletip.entry.js} +227 -25
  55. package/dist/ripple/wm-uploader.entry.js +320 -0
  56. package/dist/{esm → ripple}/wm-wrapper.entry.js +1 -1
  57. package/package.json +2 -2
  58. package/dist/cjs/app-globals-f56991b7.js +0 -92
  59. package/dist/cjs/chartFunctions-439c6fd4.js +0 -742
  60. package/dist/cjs/functions-dd27bda3.js +0 -10618
  61. package/dist/cjs/index-788526f5.js +0 -1863
  62. package/dist/cjs/index.cjs.js +0 -2
  63. package/dist/cjs/interfaces-85d78ae9.js +0 -37
  64. package/dist/cjs/intl-6d72b4a0.js +0 -283
  65. package/dist/cjs/loader.cjs.js +0 -15
  66. package/dist/cjs/priv-calendar.cjs.entry.js +0 -574
  67. package/dist/cjs/ripple.cjs.js +0 -25
  68. package/dist/cjs/wm-action-menu_2.cjs.entry.js +0 -335
  69. package/dist/cjs/wm-chart-slice.cjs.entry.js +0 -27
  70. package/dist/cjs/wm-chart.cjs.entry.js +0 -163
  71. package/dist/cjs/wm-date-range.cjs.entry.js +0 -484
  72. package/dist/cjs/wm-datepicker.cjs.entry.js +0 -254
  73. package/dist/cjs/wm-file-list.cjs.entry.js +0 -23
  74. package/dist/cjs/wm-file.cjs.entry.js +0 -194
  75. package/dist/cjs/wm-flyout.cjs.entry.js +0 -180
  76. package/dist/cjs/wm-input.cjs.entry.js +0 -125
  77. package/dist/cjs/wm-line-chart.cjs.entry.js +0 -461
  78. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +0 -217
  79. package/dist/cjs/wm-modal_3.cjs.entry.js +0 -217
  80. package/dist/cjs/wm-navigation_3.cjs.entry.js +0 -188
  81. package/dist/cjs/wm-navigator.cjs.entry.js +0 -327
  82. package/dist/cjs/wm-nested-select.cjs.entry.js +0 -315
  83. package/dist/cjs/wm-optgroup.cjs.entry.js +0 -74
  84. package/dist/cjs/wm-option_2.cjs.entry.js +0 -427
  85. package/dist/cjs/wm-pagination.cjs.entry.js +0 -228
  86. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +0 -204
  87. package/dist/cjs/wm-search.cjs.entry.js +0 -196
  88. package/dist/cjs/wm-snackbar.cjs.entry.js +0 -189
  89. package/dist/cjs/wm-tab-item_3.cjs.entry.js +0 -263
  90. package/dist/cjs/wm-tag-input.cjs.entry.js +0 -947
  91. package/dist/cjs/wm-tag-option.cjs.entry.js +0 -43
  92. package/dist/cjs/wm-textarea.cjs.entry.js +0 -88
  93. package/dist/cjs/wm-timepicker.cjs.entry.js +0 -307
  94. package/dist/cjs/wm-toggletip.cjs.entry.js +0 -242
  95. package/dist/cjs/wm-uploader.cjs.entry.js +0 -325
  96. package/dist/cjs/wm-wrapper.cjs.entry.js +0 -21
  97. package/dist/collection/collection-manifest.json +0 -197
  98. package/dist/collection/components/charts/chartFunctions.js +0 -675
  99. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +0 -948
  100. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +0 -262
  101. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +0 -125
  102. package/dist/collection/components/charts/wm-chart/wm-chart.css +0 -1314
  103. package/dist/collection/components/charts/wm-chart/wm-chart.js +0 -422
  104. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +0 -1106
  105. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +0 -723
  106. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +0 -1314
  107. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +0 -264
  108. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +0 -948
  109. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +0 -151
  110. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +0 -121
  111. package/dist/collection/components/datepickers/datepicker.css +0 -1083
  112. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +0 -1318
  113. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +0 -840
  114. package/dist/collection/components/datepickers/wm-date-range.js +0 -849
  115. package/dist/collection/components/datepickers/wm-datepicker.js +0 -524
  116. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +0 -958
  117. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +0 -780
  118. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +0 -1229
  119. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +0 -620
  120. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +0 -869
  121. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +0 -258
  122. package/dist/collection/components/selects/wm-option/wm-option.css +0 -970
  123. package/dist/collection/components/selects/wm-option/wm-option.js +0 -530
  124. package/dist/collection/components/selects/wm-select/wm-select.css +0 -1143
  125. package/dist/collection/components/selects/wm-select/wm-select.js +0 -584
  126. package/dist/collection/components/wm-action-menu/wm-action-menu.css +0 -930
  127. package/dist/collection/components/wm-action-menu/wm-action-menu.js +0 -435
  128. package/dist/collection/components/wm-button/wm-button.css +0 -1580
  129. package/dist/collection/components/wm-button/wm-button.js +0 -555
  130. package/dist/collection/components/wm-file/wm-file.css +0 -966
  131. package/dist/collection/components/wm-file/wm-file.js +0 -412
  132. package/dist/collection/components/wm-file-list/wm-file-list.css +0 -859
  133. package/dist/collection/components/wm-file-list/wm-file-list.js +0 -45
  134. package/dist/collection/components/wm-flyout/wm-flyout.css +0 -1053
  135. package/dist/collection/components/wm-flyout/wm-flyout.js +0 -448
  136. package/dist/collection/components/wm-input/wm-input.css +0 -1043
  137. package/dist/collection/components/wm-input/wm-input.js +0 -471
  138. package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -930
  139. package/dist/collection/components/wm-menuitem/wm-menuitem.js +0 -419
  140. package/dist/collection/components/wm-modal/wm-modal-footer.css +0 -884
  141. package/dist/collection/components/wm-modal/wm-modal-footer.js +0 -142
  142. package/dist/collection/components/wm-modal/wm-modal-header.css +0 -883
  143. package/dist/collection/components/wm-modal/wm-modal-header.js +0 -79
  144. package/dist/collection/components/wm-modal/wm-modal.css +0 -931
  145. package/dist/collection/components/wm-modal/wm-modal.js +0 -350
  146. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +0 -891
  147. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +0 -138
  148. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +0 -885
  149. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +0 -82
  150. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +0 -967
  151. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +0 -362
  152. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +0 -886
  153. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +0 -119
  154. package/dist/collection/components/wm-navigation/wm-navigation-item.css +0 -895
  155. package/dist/collection/components/wm-navigation/wm-navigation-item.js +0 -98
  156. package/dist/collection/components/wm-navigation/wm-navigation.css +0 -937
  157. package/dist/collection/components/wm-navigation/wm-navigation.js +0 -190
  158. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -889
  159. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +0 -86
  160. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +0 -869
  161. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +0 -124
  162. package/dist/collection/components/wm-navigator/wm-navigator.css +0 -942
  163. package/dist/collection/components/wm-navigator/wm-navigator.js +0 -496
  164. package/dist/collection/components/wm-pagination/wm-pagination.css +0 -1010
  165. package/dist/collection/components/wm-pagination/wm-pagination.js +0 -363
  166. package/dist/collection/components/wm-search/wm-search.css +0 -935
  167. package/dist/collection/components/wm-search/wm-search.js +0 -429
  168. package/dist/collection/components/wm-snackbar/wm-snackbar.css +0 -1117
  169. package/dist/collection/components/wm-snackbar/wm-snackbar.js +0 -276
  170. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +0 -908
  171. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +0 -175
  172. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -880
  173. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +0 -273
  174. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +0 -864
  175. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +0 -87
  176. package/dist/collection/components/wm-tag-input/wm-tag-input.css +0 -1318
  177. package/dist/collection/components/wm-tag-input/wm-tag-input.js +0 -1282
  178. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +0 -243
  179. package/dist/collection/components/wm-textarea/wm-textarea.css +0 -1019
  180. package/dist/collection/components/wm-textarea/wm-textarea.js +0 -313
  181. package/dist/collection/components/wm-timepicker/wm-timepicker.css +0 -1133
  182. package/dist/collection/components/wm-timepicker/wm-timepicker.js +0 -547
  183. package/dist/collection/components/wm-toggletip/wm-toggletip.css +0 -1256
  184. package/dist/collection/components/wm-toggletip/wm-toggletip.js +0 -366
  185. package/dist/collection/components/wm-uploader/wm-uploader.css +0 -1882
  186. package/dist/collection/components/wm-uploader/wm-uploader.js +0 -603
  187. package/dist/collection/components/wm-wrapper/wm-wrapper.js +0 -28
  188. package/dist/collection/dev/action-menu.js +0 -0
  189. package/dist/collection/dev/button.js +0 -0
  190. package/dist/collection/dev/chart-small.js +0 -56
  191. package/dist/collection/dev/chart.js +0 -18
  192. package/dist/collection/dev/date-range.js +0 -6
  193. package/dist/collection/dev/datepicker.js +0 -46
  194. package/dist/collection/dev/file-list.js +0 -16
  195. package/dist/collection/dev/file.js +0 -0
  196. package/dist/collection/dev/flyout.js +0 -194
  197. package/dist/collection/dev/input.js +0 -6
  198. package/dist/collection/dev/line-chart.js +0 -0
  199. package/dist/collection/dev/modal.js +0 -48
  200. package/dist/collection/dev/navigation.js +0 -13
  201. package/dist/collection/dev/navigator.js +0 -34
  202. package/dist/collection/dev/nested-select.js +0 -36
  203. package/dist/collection/dev/pagination.js +0 -7
  204. package/dist/collection/dev/progress-monitor.js +0 -0
  205. package/dist/collection/dev/pss-modal.js +0 -8
  206. package/dist/collection/dev/scripts.js +0 -49
  207. package/dist/collection/dev/search.js +0 -72
  208. package/dist/collection/dev/select.js +0 -57
  209. package/dist/collection/dev/snackbar.js +0 -60
  210. package/dist/collection/dev/tabs.js +0 -44
  211. package/dist/collection/dev/tag-input.js +0 -32
  212. package/dist/collection/dev/textarea.js +0 -28
  213. package/dist/collection/dev/timepicker.js +0 -32
  214. package/dist/collection/dev/toggletip.js +0 -9
  215. package/dist/collection/dev/uploader.js +0 -139
  216. package/dist/collection/global/__mocks__/functions.js +0 -6
  217. package/dist/collection/global/functions.js +0 -927
  218. package/dist/collection/global/intl.js +0 -274
  219. package/dist/collection/global/services/__mocks__/http-service.js +0 -130
  220. package/dist/collection/global/services/http-service.js +0 -50
  221. package/dist/collection/lang/lang.js +0 -5
  222. package/dist/collection/lang/missing.js +0 -43
  223. package/dist/collection/lang/piglatin.js +0 -101
  224. package/dist/esm/app-globals-cc7a1bd5.js +0 -90
  225. package/dist/esm/index-130e07bb.js +0 -1832
  226. package/dist/esm/index.js +0 -1
  227. package/dist/esm/interfaces-cc5b177f.js +0 -34
  228. package/dist/esm/loader.js +0 -11
  229. package/dist/esm/polyfills/core-js.js +0 -11
  230. package/dist/esm/polyfills/dom.js +0 -79
  231. package/dist/esm/polyfills/es5-html-element.js +0 -1
  232. package/dist/esm/polyfills/index.js +0 -34
  233. package/dist/esm/polyfills/system.js +0 -6
  234. package/dist/esm/priv-calendar.entry.js +0 -570
  235. package/dist/esm/ripple.js +0 -20
  236. package/dist/esm/wm-action-menu_2.entry.js +0 -330
  237. package/dist/esm/wm-chart.entry.js +0 -159
  238. package/dist/esm/wm-date-range.entry.js +0 -480
  239. package/dist/esm/wm-datepicker.entry.js +0 -250
  240. package/dist/esm/wm-file-list.entry.js +0 -19
  241. package/dist/esm/wm-flyout.entry.js +0 -176
  242. package/dist/esm/wm-input.entry.js +0 -121
  243. package/dist/esm/wm-line-chart.entry.js +0 -457
  244. package/dist/esm/wm-modal-pss_3.entry.js +0 -211
  245. package/dist/esm/wm-modal_3.entry.js +0 -211
  246. package/dist/esm/wm-navigation_3.entry.js +0 -182
  247. package/dist/esm/wm-navigator.entry.js +0 -323
  248. package/dist/esm/wm-optgroup.entry.js +0 -70
  249. package/dist/esm/wm-option_2.entry.js +0 -422
  250. package/dist/esm/wm-pagination.entry.js +0 -224
  251. package/dist/esm/wm-progress-indicator_3.entry.js +0 -198
  252. package/dist/esm/wm-search.entry.js +0 -192
  253. package/dist/esm/wm-snackbar.entry.js +0 -185
  254. package/dist/esm/wm-tab-item_3.entry.js +0 -257
  255. package/dist/esm/wm-tag-input.entry.js +0 -943
  256. package/dist/esm/wm-textarea.entry.js +0 -84
  257. package/dist/esm/wm-timepicker.entry.js +0 -303
  258. package/dist/esm/wm-toggletip.entry.js +0 -238
  259. package/dist/esm/wm-uploader.entry.js +0 -321
  260. package/dist/esm-es5/app-globals-cc7a1bd5.js +0 -1
  261. package/dist/esm-es5/chartFunctions-6749593d.js +0 -1
  262. package/dist/esm-es5/functions-dabfd76f.js +0 -1
  263. package/dist/esm-es5/index-130e07bb.js +0 -1
  264. package/dist/esm-es5/index.js +0 -0
  265. package/dist/esm-es5/interfaces-cc5b177f.js +0 -1
  266. package/dist/esm-es5/intl-43676e71.js +0 -1
  267. package/dist/esm-es5/loader.js +0 -1
  268. package/dist/esm-es5/priv-calendar.entry.js +0 -1
  269. package/dist/esm-es5/priv-navigator-button.entry.js +0 -1
  270. package/dist/esm-es5/ripple.js +0 -1
  271. package/dist/esm-es5/wm-action-menu_2.entry.js +0 -1
  272. package/dist/esm-es5/wm-button.entry.js +0 -1
  273. package/dist/esm-es5/wm-chart-slice.entry.js +0 -1
  274. package/dist/esm-es5/wm-chart.entry.js +0 -1
  275. package/dist/esm-es5/wm-date-range.entry.js +0 -1
  276. package/dist/esm-es5/wm-datepicker.entry.js +0 -1
  277. package/dist/esm-es5/wm-file.entry.js +0 -1
  278. package/dist/esm-es5/wm-input.entry.js +0 -1
  279. package/dist/esm-es5/wm-line-chart.entry.js +0 -1
  280. package/dist/esm-es5/wm-modal-pss_3.entry.js +0 -1
  281. package/dist/esm-es5/wm-modal_3.entry.js +0 -1
  282. package/dist/esm-es5/wm-navigation_3.entry.js +0 -1
  283. package/dist/esm-es5/wm-navigator.entry.js +0 -1
  284. package/dist/esm-es5/wm-nested-select.entry.js +0 -1
  285. package/dist/esm-es5/wm-optgroup.entry.js +0 -1
  286. package/dist/esm-es5/wm-option_2.entry.js +0 -1
  287. package/dist/esm-es5/wm-pagination.entry.js +0 -1
  288. package/dist/esm-es5/wm-progress-indicator_3.entry.js +0 -1
  289. package/dist/esm-es5/wm-search.entry.js +0 -1
  290. package/dist/esm-es5/wm-snackbar.entry.js +0 -1
  291. package/dist/esm-es5/wm-tab-item_3.entry.js +0 -1
  292. package/dist/esm-es5/wm-tag-input.entry.js +0 -1
  293. package/dist/esm-es5/wm-tag-option.entry.js +0 -1
  294. package/dist/esm-es5/wm-textarea.entry.js +0 -1
  295. package/dist/esm-es5/wm-timepicker.entry.js +0 -1
  296. package/dist/esm-es5/wm-toggletip.entry.js +0 -1
  297. package/dist/esm-es5/wm-uploader.entry.js +0 -1
  298. package/dist/esm-es5/wm-wrapper.entry.js +0 -1
  299. package/dist/index.cjs.js +0 -1
  300. package/dist/index.js +0 -1
  301. package/dist/loader/cdn.js +0 -2
  302. package/dist/loader/index.cjs.js +0 -2
  303. package/dist/loader/index.d.ts +0 -24
  304. package/dist/loader/index.es2017.js +0 -2
  305. package/dist/loader/index.js +0 -3
  306. package/dist/loader/package.json +0 -11
  307. package/dist/ripple/p-0189929d.entry.js +0 -1
  308. package/dist/ripple/p-043901ab.system.entry.js +0 -1
  309. package/dist/ripple/p-0bb576c5.system.entry.js +0 -1
  310. package/dist/ripple/p-0c89b82c.entry.js +0 -1
  311. package/dist/ripple/p-12ac8f93.js +0 -1
  312. package/dist/ripple/p-12d6ab73.system.entry.js +0 -1
  313. package/dist/ripple/p-13b1d775.entry.js +0 -1
  314. package/dist/ripple/p-144ce232.entry.js +0 -1
  315. package/dist/ripple/p-1497ccfc.entry.js +0 -1
  316. package/dist/ripple/p-1a3037aa.entry.js +0 -1
  317. package/dist/ripple/p-22b55b6f.entry.js +0 -1
  318. package/dist/ripple/p-257d2d5c.entry.js +0 -1
  319. package/dist/ripple/p-2732bddd.js +0 -1
  320. package/dist/ripple/p-2823d02b.system.entry.js +0 -1
  321. package/dist/ripple/p-2f7ca1a7.system.entry.js +0 -1
  322. package/dist/ripple/p-30201dc9.entry.js +0 -1
  323. package/dist/ripple/p-36d2b888.entry.js +0 -1
  324. package/dist/ripple/p-36fd8aed.system.entry.js +0 -1
  325. package/dist/ripple/p-3f98056c.js +0 -1
  326. package/dist/ripple/p-41120a33.system.js +0 -1
  327. package/dist/ripple/p-42fa7a77.system.js +0 -1
  328. package/dist/ripple/p-492aa9fe.system.entry.js +0 -1
  329. package/dist/ripple/p-49a347e1.js +0 -1
  330. package/dist/ripple/p-4a29bb8c.entry.js +0 -1
  331. package/dist/ripple/p-4c2a044d.system.entry.js +0 -1
  332. package/dist/ripple/p-4cebf2d7.entry.js +0 -1
  333. package/dist/ripple/p-4e6b0a6e.system.entry.js +0 -1
  334. package/dist/ripple/p-4fb4deb9.entry.js +0 -1
  335. package/dist/ripple/p-50ea2036.system.js +0 -1
  336. package/dist/ripple/p-56d54fe6.system.entry.js +0 -1
  337. package/dist/ripple/p-57c25b63.entry.js +0 -1
  338. package/dist/ripple/p-59591401.entry.js +0 -1
  339. package/dist/ripple/p-5cff41e0.entry.js +0 -1
  340. package/dist/ripple/p-5ef786db.system.entry.js +0 -1
  341. package/dist/ripple/p-61f9987d.system.entry.js +0 -1
  342. package/dist/ripple/p-6a03a172.entry.js +0 -1
  343. package/dist/ripple/p-6a082957.entry.js +0 -1
  344. package/dist/ripple/p-6abc1227.entry.js +0 -1
  345. package/dist/ripple/p-6d12cfb7.system.entry.js +0 -1
  346. package/dist/ripple/p-72ed488e.system.entry.js +0 -1
  347. package/dist/ripple/p-74f103dd.entry.js +0 -1
  348. package/dist/ripple/p-81ce2697.entry.js +0 -1
  349. package/dist/ripple/p-823d7b4e.system.entry.js +0 -1
  350. package/dist/ripple/p-89316785.system.js +0 -1
  351. package/dist/ripple/p-8a569d3b.entry.js +0 -1
  352. package/dist/ripple/p-8ec2e944.system.entry.js +0 -1
  353. package/dist/ripple/p-92a50b38.system.entry.js +0 -1
  354. package/dist/ripple/p-9328023c.entry.js +0 -1
  355. package/dist/ripple/p-94f776eb.entry.js +0 -1
  356. package/dist/ripple/p-9b2281e2.system.entry.js +0 -1
  357. package/dist/ripple/p-a2c8937d.js +0 -1
  358. package/dist/ripple/p-a5fb4171.system.entry.js +0 -1
  359. package/dist/ripple/p-b23c6351.system.entry.js +0 -1
  360. package/dist/ripple/p-b34552b0.system.entry.js +0 -1
  361. package/dist/ripple/p-b39ab477.entry.js +0 -1
  362. package/dist/ripple/p-ba399879.system.js +0 -1
  363. package/dist/ripple/p-bb9f6920.entry.js +0 -1
  364. package/dist/ripple/p-bc4976e6.entry.js +0 -1
  365. package/dist/ripple/p-bd48c50a.entry.js +0 -1
  366. package/dist/ripple/p-c1aa877a.system.js +0 -1
  367. package/dist/ripple/p-c31e1379.entry.js +0 -1
  368. package/dist/ripple/p-c4896784.system.entry.js +0 -1
  369. package/dist/ripple/p-c699aec8.system.entry.js +0 -1
  370. package/dist/ripple/p-c7d71181.system.entry.js +0 -1
  371. package/dist/ripple/p-cd0cc88d.entry.js +0 -1
  372. package/dist/ripple/p-ceac4dea.system.entry.js +0 -1
  373. package/dist/ripple/p-cef8a45b.system.js +0 -2
  374. package/dist/ripple/p-d333d851.system.entry.js +0 -1
  375. package/dist/ripple/p-d9da0502.js +0 -2
  376. package/dist/ripple/p-e59a48a6.system.js +0 -1
  377. package/dist/ripple/p-f3df715f.entry.js +0 -1
  378. package/dist/ripple/p-f8995a5e.system.entry.js +0 -1
  379. package/dist/ripple/p-fe71ec64.system.entry.js +0 -1
  380. package/dist/ripple/ripple.js +0 -127
@@ -1,723 +0,0 @@
1
- import { h, Host, forceUpdate } from "@stencil/core";
2
- import { csvToArray, debounce, transposeMatrix, getSmallestSkipInterval, wrapAround, calcPercentageInRange, } from "../../../global/functions";
3
- import { abbrNumber, getInterval } from "../chartFunctions";
4
- import { chartMessages, globalMessages, lineChartMessages } from "../../../global/intl";
5
- export class LineChart {
6
- constructor() {
7
- this.minTickWidth = 120;
8
- this.popoverData = [];
9
- this.dataPointMatrix = [];
10
- this.xIntervals = [];
11
- this.displayedXIntervals = [];
12
- this.yIntervals = [];
13
- this.lineStyles = [
14
- { color: "#8b86ca", icon: "triangle" }, // lavender
15
- { color: "#2e1b46", icon: "circle" }, // midnight
16
- { color: "#0089e4", icon: "square" }, // blue
17
- { color: "#088000", icon: "star" }, // forest
18
- { color: "#ea8500", icon: "rhombus" }, // orange
19
- { color: "#d54f41", icon: "triangle-inverted" }, // red
20
- { color: "#146ca9", icon: "pentagon" }, // blue
21
- ];
22
- this.debouncedResize = debounce(async () => {
23
- this.displayedXIntervals = this.determineDisplayedXIntervals();
24
- }, 100);
25
- this.label = undefined;
26
- this.description = "";
27
- this.xAxisLabel = undefined;
28
- this.yAxisLabel = undefined;
29
- this.lineData = undefined;
30
- this.units = "null,null";
31
- this.labelWidth = "120px";
32
- this.highlightQualifier = lineChartMessages.highlightQualifier;
33
- this.highlightStart = undefined;
34
- this.highlightEnd = undefined;
35
- this.visibilityToggles = false;
36
- this.showDeltas = false;
37
- this.yRange = undefined;
38
- this.parsedLineData = {};
39
- this.popoverIndex = -1;
40
- this.focusedLine = -1;
41
- this.hiddenLines = [];
42
- this.isTabbing = false;
43
- this.intervalSkip = 0;
44
- this.announcement = "";
45
- }
46
- parseData() {
47
- this.parsedLineData = JSON.parse(this.lineData);
48
- this.yIntervals = this.calcYIntervals().reverse(); // needed before building dataPointMatrix
49
- this.xIntervals = Object.keys(Object.values(this.parsedLineData)[0]);
50
- this.displayedXIntervals = this.determineDisplayedXIntervals();
51
- this.dataPointMatrix = Object.entries(this.parsedLineData).map((entry) => this.buildLineDataPointDetails(entry[0], entry[1]));
52
- this.popoverData = transposeMatrix(this.dataPointMatrix);
53
- }
54
- handleIntervalSkip() {
55
- // if intervalSkip ever changes, dataPointMatrix must be regenerated to account for chart spacers
56
- this.parseData();
57
- }
58
- get hasPartialInterval() {
59
- // if chart width is too small, an odd # of intervals like 1,2,3,4,5,6,7 can be shortened to 1,3,5,7 or 1,4,7
60
- // but an even # like 1,2,3,4,5,6,7,8 will be shortened to 1,3,5,7 (can't show first and last interval)
61
- // in these cases, show a partial interval must be shown in order to still provide space to plot the 8th data point
62
- // e.g intervals will be 1-3, 3-5, 5-7, 7-8
63
- return this.intervalSkip > 0 && this.xIntervals.length % 2 === 0;
64
- }
65
- get parsedUnits() {
66
- return csvToArray(this.units).map((unit) => (unit === "null" ? null : unit));
67
- }
68
- get visibilityToggleEls() {
69
- return this.legendEl.querySelectorAll("wm-button");
70
- }
71
- get lineEls() {
72
- return this.plotAreaEl.querySelectorAll(".line");
73
- }
74
- get firstVisibleLineIdx() {
75
- let firstVisibleLineIdx = 0;
76
- while (this.hiddenLines.includes(firstVisibleLineIdx)) {
77
- firstVisibleLineIdx++;
78
- }
79
- return firstVisibleLineIdx < this.dataPointMatrix.length ? firstVisibleLineIdx : -1;
80
- }
81
- get pointEls() {
82
- return this.plotAreaEl.querySelectorAll(".point");
83
- }
84
- toggleTabbingOn() {
85
- this.isTabbing = true;
86
- }
87
- toggleTabbingOff() {
88
- this.isTabbing = false;
89
- }
90
- componentWillLoad() {
91
- this.parseData();
92
- }
93
- componentDidLoad() {
94
- const resizeObserver = new ResizeObserver(() => this.debouncedResize());
95
- resizeObserver.observe(this.el);
96
- }
97
- handleVisibilityToggleKeydown(ev, toggleIdx) {
98
- switch (ev.key) {
99
- case "Tab":
100
- if (!ev.shiftKey && this.firstVisibleLineIdx !== -1) {
101
- ev.preventDefault();
102
- this.announce(this.lineFocusMessage(this.firstVisibleLineIdx));
103
- this.focusDataPointByEl(this.lineEls[this.firstVisibleLineIdx].querySelector(".point"));
104
- }
105
- break;
106
- case "ArrowUp":
107
- case "ArrowLeft":
108
- ev.preventDefault();
109
- const prevToggleIdx = wrapAround(toggleIdx, -1, this.dataPointMatrix.length - 1);
110
- this.visibilityToggleEls[prevToggleIdx].focus();
111
- break;
112
- case "ArrowDown":
113
- case "ArrowRight":
114
- ev.preventDefault();
115
- const nextToggleIdx = wrapAround(toggleIdx, 1, this.dataPointMatrix.length - 1);
116
- this.visibilityToggleEls[nextToggleIdx].focus();
117
- break;
118
- }
119
- }
120
- handleDataPointKeydown(ev) {
121
- const curPointEl = ev.target;
122
- switch (ev.key) {
123
- case "Tab":
124
- if (ev.shiftKey && this.visibilityToggles) {
125
- ev.preventDefault();
126
- this.visibilityToggleEls[0].focus();
127
- }
128
- break;
129
- case "ArrowUp":
130
- ev.preventDefault();
131
- this.navigatePointsVertically(curPointEl, -1);
132
- break;
133
- case "ArrowDown":
134
- ev.preventDefault();
135
- this.navigatePointsVertically(curPointEl, 1);
136
- break;
137
- case "ArrowLeft":
138
- ev.preventDefault();
139
- this.navigatePointsHorizontally(curPointEl, -1);
140
- break;
141
- case "ArrowRight":
142
- ev.preventDefault();
143
- this.navigatePointsHorizontally(curPointEl, 1);
144
- break;
145
- }
146
- }
147
- navigatePointsVertically(originPoint, stepAmount) {
148
- const pointElsInColumn = Array.from(this.pointEls).filter((p) => p.dataset.pointidx == originPoint.dataset.pointidx);
149
- if (pointElsInColumn.length > 1) {
150
- const nextPointIdx = wrapAround(pointElsInColumn.indexOf(originPoint), stepAmount, pointElsInColumn.length - 1);
151
- const nextVerticalPoint = pointElsInColumn[nextPointIdx];
152
- this.announce(this.lineFocusMessage(parseInt(nextVerticalPoint.dataset.lineidx)));
153
- this.focusDataPointByEl(nextVerticalPoint);
154
- }
155
- }
156
- navigatePointsHorizontally(originPoint, stepAmount) {
157
- const linePoints = Array.from(originPoint.parentElement.querySelectorAll(".point"));
158
- if (linePoints.length > 1) {
159
- const nextPointIdxInDirection = wrapAround(linePoints.indexOf(originPoint), stepAmount, linePoints.length - 1);
160
- const nextHorizontalPoint = linePoints[nextPointIdxInDirection];
161
- this.focusDataPointByEl(nextHorizontalPoint);
162
- }
163
- }
164
- announce(message) {
165
- // \u00A0 is a non-breaking space character, which causes the message to be read as a new one
166
- if (this.liveRegionEl.textContent === message) {
167
- message += "\u00A0";
168
- }
169
- this.announcement = message;
170
- }
171
- lineFocusMessage(lineIdx) {
172
- const label = this.dataPointMatrix[lineIdx][0].lineLabel;
173
- const numDataPoints = this.dataPointMatrix[lineIdx].filter((datapoint) => datapoint.yValue !== null).length;
174
- const focusMessage = lineChartMessages.getLineFocusAnnouncement(label, lineIdx + 1, this.dataPointMatrix.length, numDataPoints);
175
- return focusMessage;
176
- }
177
- focusDataPointByEl(pointEl) {
178
- this.pointEls.forEach((point) => (point.tabIndex = -1));
179
- pointEl.tabIndex = 0;
180
- pointEl.focus();
181
- }
182
- calcYIntervals() {
183
- let yIntervals = [];
184
- if (this.yRange) {
185
- yIntervals = csvToArray(this.yRange).map((val) => parseInt(val));
186
- }
187
- else {
188
- // gather all yValues
189
- let allYValues = [];
190
- const lines = Object.values(this.parsedLineData).flat();
191
- lines.forEach((line) => allYValues.push(...Object.values(line)));
192
- const filteredYValues = allYValues.filter((val) => val !== null);
193
- // get max and min yValues in data
194
- let minYValue = Math.min(...filteredYValues);
195
- const maxYValue = Math.max(...filteredYValues);
196
- // calculate neat yInterval
197
- let interval = getInterval(maxYValue - minYValue, 4);
198
- // find new min below smallest yValue that divides cleanly by interval
199
- let counter = interval;
200
- while (minYValue % interval !== 0 && counter > 0) {
201
- minYValue--;
202
- counter--;
203
- }
204
- // calculate new interval using new min
205
- interval = getInterval(maxYValue - minYValue, 4);
206
- let current = minYValue;
207
- // determine top interval, no more than one tick above max yValue
208
- while (current <= maxYValue + interval) {
209
- yIntervals.push(current);
210
- current += interval;
211
- }
212
- }
213
- return yIntervals;
214
- }
215
- determineDisplayedXIntervals() {
216
- // if component has display: none, plotAreaEl is truthy, but it's clientWidth is 0. This caused a crash when component was hidden in a tab
217
- const maxTicks = this.plotAreaEl && this.plotAreaEl.clientWidth > 0
218
- ? Math.round(this.plotAreaEl.clientWidth / this.minTickWidth)
219
- : this.xIntervals.length;
220
- const { skipInterval, skippedList } = getSmallestSkipInterval(this.xIntervals, maxTicks);
221
- this.intervalSkip = skipInterval;
222
- return skippedList;
223
- }
224
- buildLineDataPointDetails(lineLabel, line) {
225
- let dataPointDetailsList = [];
226
- const lineDataPoints = Object.entries(line);
227
- let isHighlighted;
228
- lineDataPoints.forEach((entry, pointIdx) => {
229
- const [xValue, yValue] = entry;
230
- let xPositionPercent = (100 / (lineDataPoints.length - 1)) * pointIdx;
231
- const yPositionPercent = yValue === null
232
- ? null
233
- : 100 - calcPercentageInRange(yValue, this.yIntervals[this.yIntervals.length - 1], this.yIntervals[0]);
234
- // add space between first points and y-axis
235
- if (pointIdx === 0) {
236
- xPositionPercent +=
237
- this.plotAreaEl && this.plotAreaEl.clientWidth > 0 ? (8 / this.plotAreaEl.clientWidth) * 100 : 1;
238
- }
239
- if (xValue === this.highlightStart && !isHighlighted) {
240
- isHighlighted = true;
241
- }
242
- dataPointDetailsList.push({
243
- lineLabel: lineLabel,
244
- xValue: xValue,
245
- yValue: yValue,
246
- xPositionPercent: xPositionPercent,
247
- yPositionPercent: yPositionPercent,
248
- highlighted: isHighlighted,
249
- });
250
- // because highlight range is inclusive, disable after pushing details
251
- if (xValue === this.highlightEnd && isHighlighted) {
252
- isHighlighted = false;
253
- }
254
- });
255
- return dataPointDetailsList;
256
- }
257
- toggleLineVisibility(lineIdx) {
258
- if (this.hiddenLines.includes(lineIdx)) {
259
- this.hiddenLines = this.hiddenLines.filter((num) => num !== lineIdx);
260
- }
261
- else {
262
- this.hiddenLines.push(lineIdx);
263
- }
264
- forceUpdate(this.el);
265
- }
266
- resetDataPointFocus() {
267
- this.popoverIndex = -1;
268
- this.pointEls.forEach((point) => (point.tabIndex = -1));
269
- if (this.firstVisibleLineIdx !== -1) {
270
- const lineEl = this.lineEls[this.firstVisibleLineIdx];
271
- const linePointEl = lineEl.querySelectorAll(".point")[0];
272
- linePointEl.tabIndex = 0;
273
- }
274
- }
275
- calcDelta(dataPoint, prevDataPoint) {
276
- let delta;
277
- if (dataPoint.yValue === null || prevDataPoint.yValue === null) {
278
- // display "No data" when either of the datapoints is missing
279
- delta = lineChartMessages.noData;
280
- }
281
- else if (dataPoint.yValue == prevDataPoint.yValue) {
282
- // display "0%" if datapoints are equal
283
- delta = "0%";
284
- }
285
- else if (prevDataPoint.yValue == 0) {
286
- // display "-" for % increase if prev data point is 0, as the technical number would be infinity
287
- delta = "-";
288
- }
289
- else {
290
- const changePercent = ((dataPoint.yValue - prevDataPoint.yValue) / prevDataPoint.yValue) * 100;
291
- const roundedPercent = Math.round(changePercent * 100) / 100;
292
- delta = `${roundedPercent > 0 ? "+" : ""}${roundedPercent}%`;
293
- }
294
- return delta;
295
- }
296
- renderLegend() {
297
- const lineLabels = Object.keys(this.parsedLineData);
298
- return (h("div", { ref: (el) => (this.legendEl = el), class: "legend" }, lineLabels.map((lineLabel, lineIdx) => {
299
- const isHidden = this.hiddenLines.includes(lineIdx);
300
- const isFaded = this.focusedLine !== -1 && this.focusedLine !== lineIdx;
301
- return (h("div", { id: `legend-label-${lineIdx}`, class: `legend-label ${isFaded ? "faded" : ""}`, onMouseEnter: () => (this.focusedLine = isHidden ? -1 : lineIdx), onMouseLeave: () => (this.focusedLine = -1) }, this.renderIcon(lineIdx), lineLabel, this.visibilityToggles && this.renderVisibilityToggle(lineLabel, lineIdx, isHidden)));
302
- })));
303
- }
304
- renderVisibilityToggle(lineLabel, lineIdx, isHidden) {
305
- return (h("wm-button", { id: `visibility-button-${lineIdx}`, class: "visibility-toggle", "label-for-identical-buttons": `${lineIdx === 0 ? lineChartMessages.getToggleButtonLabel(this.dataPointMatrix.length) : ""} ${isHidden ? globalMessages.show : globalMessages.hide} ${lineLabel} ${lineChartMessages.getToggleButtonState(isHidden)}`, "button-type": "navigational", tooltip: isHidden ? globalMessages.show : globalMessages.hide, tooltipPosition: "bottom", icon: isHidden ? "#hide" : "#show", onClick: () => this.toggleLineVisibility(lineIdx), onKeyDown: (ev) => this.handleVisibilityToggleKeydown(ev, lineIdx), onFocus: () => (this.popoverIndex = -1) }));
306
- }
307
- renderIcon(lineIdx) {
308
- const { color, icon } = this.lineStyles[lineIdx];
309
- return h("div", { style: { color: color }, class: `svg-icon svg-shape-${icon}` });
310
- }
311
- renderXIntervals() {
312
- const gridStyle = {
313
- "--columns": `.5fr repeat(${this.xIntervals.length - 2}, 1fr) .5fr`,
314
- };
315
- return (h("div", { class: "x-intervals", style: gridStyle }, this.xIntervals.map((interval) => (h("span", { class: `x-interval ${this.displayedXIntervals.includes(interval) ? "" : "hidden"}` }, interval)))));
316
- }
317
- renderYIntervals() {
318
- return (h("div", { ref: (el) => (this.yIntervalsEl = el), class: "y-intervals" }, this.yIntervals.map((yInterval) => (h("span", { class: "y-interval" }, abbrNumber(yInterval))))));
319
- }
320
- renderData() {
321
- return this.dataPointMatrix.map((_, lineIdx) => {
322
- let focusState = this.focusedLine === lineIdx ? "focused" : "faded";
323
- const isHidden = this.hiddenLines.includes(lineIdx);
324
- return (h("div", { class: `line ${this.focusedLine !== -1 ? focusState : ""} ${isHidden ? "hidden" : ""}` }, this.renderLines(lineIdx), this.renderPoints(lineIdx)));
325
- });
326
- }
327
- renderPoints(lineIdx) {
328
- const lineDataPoints = this.dataPointMatrix[lineIdx];
329
- return (h("div", { class: "line-icons" }, lineDataPoints.map((dataPoint, pointIdx) => {
330
- const { lineLabel, xValue, yValue, xPositionPercent, yPositionPercent, highlighted } = dataPoint;
331
- if (yValue !== null) {
332
- const { color, icon } = this.lineStyles[lineIdx];
333
- const firstPointTabIndex = lineIdx === 0 && pointIdx === 0 ? 0 : undefined;
334
- const iconStyle = {
335
- color: color,
336
- "--xPosition": xPositionPercent + "%",
337
- "--yPosition": yPositionPercent + "%",
338
- };
339
- let ariaLabel = `${lineLabel} ${highlighted ? this.highlightQualifier : ""} ${this.xAxisLabel} ${xValue + (this.parsedUnits[0] ? this.parsedUnits[0] : "")}, ${this.yAxisLabel}: ${yValue + (this.parsedUnits[1] ? this.parsedUnits[1] : "")}`;
340
- if (this.showDeltas && pointIdx > 0) {
341
- const prevDataPoint = lineDataPoints[pointIdx - 1];
342
- const changeSinceMessage = lineChartMessages.getChangeSince(prevDataPoint.xValue);
343
- ariaLabel += `, ${changeSinceMessage} ${this.calcDelta(dataPoint, prevDataPoint)}`;
344
- }
345
- return (h("span", { id: `${lineLabel}-${pointIdx}`, role: "img", "aria-label": ariaLabel, tabIndex: firstPointTabIndex, class: `point svg-icon svg-shape-${icon}`, style: iconStyle, "data-lineidx": lineIdx, "data-pointidx": pointIdx, "data-xvalue": xValue, onKeyDown: (ev) => this.handleDataPointKeydown(ev), onFocus: () => (this.popoverIndex = pointIdx), onClick: (ev) => this.focusDataPointByEl(ev.target), onMouseEnter: () => (this.popoverIndex = pointIdx) }, h("span", { class: `point-bg svg-icon svg-shape-${icon}` })));
346
- }
347
- })));
348
- }
349
- renderLines(lineIdx) {
350
- const lineDataPoints = this.dataPointMatrix[lineIdx];
351
- return (h("svg", { class: "line-svg" }, lineDataPoints.map((dataPoint, pointIdx) => {
352
- const shouldDraw = dataPoint.yValue !== null &&
353
- pointIdx !== lineDataPoints.length - 1 &&
354
- lineDataPoints[pointIdx + 1].yValue !== null;
355
- if (shouldDraw) {
356
- const { color } = this.lineStyles[lineIdx];
357
- const { xPositionPercent: xStart, yPositionPercent: yStart } = dataPoint;
358
- const { xPositionPercent: xEnd, yPositionPercent: yEnd } = lineDataPoints[pointIdx + 1];
359
- return (h("line", { x1: xStart + "%", y1: yStart + "%", x2: xEnd + "%", y2: yEnd + "%", stroke: color, "stroke-width": "2px" }));
360
- }
361
- })));
362
- }
363
- renderHoverAreas() {
364
- const hoverAreaStyle = { "--columns": `.5fr repeat(${this.xIntervals.length - 2}, 1fr) .5fr` };
365
- return (h("div", { class: "hover-area-wrapper", style: hoverAreaStyle, onMouseLeave: () => (this.popoverIndex = -1) }, this.xIntervals.map((_, idx) => (h("div", { onMouseEnter: () => (this.popoverIndex = idx) })))));
366
- }
367
- renderPopover() {
368
- const hasPopoverData = this.popoverData &&
369
- this.popoverData[this.popoverIndex] &&
370
- this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`);
371
- if (!hasPopoverData) {
372
- return "";
373
- }
374
- const displayedPopoverData = this.popoverData[this.popoverIndex];
375
- const xPosition = displayedPopoverData[0].xPositionPercent;
376
- const yPositions = displayedPopoverData
377
- .map((point) => point.yPositionPercent)
378
- .filter((yPosition) => yPosition !== null);
379
- const averageYPosition = yPositions.reduce((acc, cur) => acc + cur, 0) / yPositions.length;
380
- const referencePointEl = this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`);
381
- const componentBoundingClientRect = this.el.getBoundingClientRect();
382
- const referencePointBoundingClientRect = referencePointEl.getBoundingClientRect();
383
- const rightSpaceAvailable = componentBoundingClientRect.right - referencePointBoundingClientRect.right;
384
- const leftSpaceAvailable = referencePointBoundingClientRect.left - componentBoundingClientRect.left;
385
- const hasRoomRight = rightSpaceAvailable >= (this.popoverEl ? Math.min(this.popoverEl.clientWidth, 400) : 400);
386
- const hasRoomLeft = leftSpaceAvailable >= (this.popoverEl ? Math.min(this.popoverEl.clientWidth, 400) : 400);
387
- const percentMargin = (8 / this.plotAreaEl.clientWidth) * 100;
388
- let popoverStyle = {
389
- "--leftPosition": hasRoomRight ? xPosition + percentMargin + "%" : "unset",
390
- "--rightPosition": hasRoomLeft ? 100 - xPosition + percentMargin + "%" : "unset",
391
- "--topPosition": averageYPosition + "%",
392
- transform: "translateY(-50%)", // vertically center for averageYPosition
393
- };
394
- if (!hasRoomLeft && !hasRoomRight) {
395
- // if there's not enough room to the left and right, position "detached" from the data points towards the top of the chart
396
- const displaceLeft = `0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth + "px"} + ${this.el.scrollLeft + "px"} + 2px`;
397
- popoverStyle = {
398
- "--leftPosition": `0%`,
399
- "--topPosition": "0%",
400
- maxWidth: Math.min(this.el.clientWidth - 2, 400) + "px", // take up no more max-width than is visually available
401
- transform: `translateX(calc(${displaceLeft}))`, // align with left edge of component
402
- };
403
- }
404
- return (h("div", { ref: (el) => (this.popoverEl = el), class: "popover", style: popoverStyle }, h("div", { class: "title" }, displayedPopoverData[0].xValue, this.parsedUnits[0] && h("span", { class: "unit --x" }, "(", this.parsedUnits[0], ")")), this.showDeltas && this.popoverIndex > 0 && (h("div", { class: "comparison-title" }, lineChartMessages.getChangeSince(this.popoverData[this.popoverIndex - 1][0].xValue))), this.renderPopoverTable()));
405
- }
406
- renderPopoverTable() {
407
- const displayedPopoverData = this.popoverData[this.popoverIndex];
408
- return (h("table", { class: "popover-table" }, displayedPopoverData.map((dataPoint, lineIdx) => {
409
- if (!this.hiddenLines.includes(lineIdx)) {
410
- const { lineLabel, yValue } = dataPoint;
411
- const prevDataPoint = this.popoverIndex > 0 ? this.popoverData[this.popoverIndex - 1][lineIdx] : null;
412
- const localizedYValue = yValue !== null ? new Intl.NumberFormat().format(yValue) : null;
413
- return (h("tr", { class: "popover-row" }, h("td", null, this.renderIcon(lineIdx)), h("td", { class: "row-label" }, lineLabel), h("td", { class: "row-value" }, yValue === null ? lineChartMessages.noData : localizedYValue, yValue !== null && this.parsedUnits[1] && h("span", { class: "unit --y" }, this.parsedUnits[1])), this.showDeltas && prevDataPoint && this.renderDeltas(dataPoint, prevDataPoint)));
414
- }
415
- })));
416
- }
417
- renderDeltas(dataPoint, prevDataPoint) {
418
- const delta = this.calcDelta(dataPoint, prevDataPoint);
419
- const deltaColor = delta.toString()[0] == "+" || delta == "-" ? "positive" : delta.toString()[0] == "-" ? "negative" : "";
420
- return prevDataPoint && h("td", { class: `delta --${deltaColor}` }, delta);
421
- }
422
- renderHoverIndicator() {
423
- const hasIndicatorData = this.dataPointMatrix.length > 0 && this.dataPointMatrix[0][this.popoverIndex];
424
- if (!hasIndicatorData) {
425
- return "";
426
- }
427
- const xPosition = this.dataPointMatrix[0][this.popoverIndex].xPositionPercent;
428
- const indicatorStyle = { "--xPosition": xPosition + "%" };
429
- return h("div", { class: "hover-indicator", style: indicatorStyle });
430
- }
431
- renderHighlight() {
432
- const startPercentage = this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent;
433
- const endPercentage = this.highlightEnd
434
- ? 100 - this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent
435
- : 0;
436
- const highlightStyle = { "--startPercentage": startPercentage + "%", "--endPercentage": endPercentage + "%" };
437
- return h("div", { class: "highlight", style: highlightStyle });
438
- }
439
- render() {
440
- return (h(Host, { key: 'fb0d9a5d98e31e44e873a45a057151abf8422af2', onBlur: () => this.resetDataPointFocus(), onMouseLeave: () => (this.popoverIndex = -1) }, h("div", { key: '8ad9a77f2ed681fe3e0e12d22e478f578a5f5378', class: "component-wrapper", role: "application", "aria-roledescription": chartMessages.interactiveChart, "aria-label": this.label, "aria-describedby": "chart-description" }, this.renderLegend(), h("div", { key: '8c75ab0d44e8b843bd00ac7c884010f86a7c32ed', class: "chart-wrapper" }, h("div", { key: '733592d351ba71b9e48591ccc87406c90ba6ee1c', class: "chart-label --y-axis", style: { "--labelWidth": this.labelWidth } }, this.yAxisLabel, this.parsedUnits[1] && ` (${this.parsedUnits[1]})`), this.renderYIntervals(), h("div", { key: 'a5d35aca9eb498bf41641978206cda9504d26531', ref: (el) => (this.plotAreaEl = el), class: `plot-area ${this.hasPartialInterval ? "" : "right-border"}`, style: {
441
- "--backgroundSize": `${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`,
442
- } }, this.highlightStart && this.renderHighlight(), this.renderData(), this.renderHoverAreas()), this.popoverIndex !== -1 && this.renderHoverIndicator(), this.popoverIndex !== -1 && this.renderPopover(), this.renderXIntervals(), h("div", { key: '848ec2e4cc1342d06c771dd5043e663c274862d2', class: "chart-label --x-axis" }, this.xAxisLabel, this.parsedUnits[0] && ` (${this.parsedUnits[0]})`)), h("div", { key: 'd9db30e4e1d3eaec8a9fd16a60dc6d15dff0d352', id: "chart-description", class: "sr-only" }, `${lineChartMessages.instructions} ${this.description}`), h("div", { key: '7042ad9fe099a30dde2385a71a4a78d9eb022b73', ref: (el) => (this.liveRegionEl = el), "aria-live": "polite", class: "sr-only" }, this.announcement))));
443
- }
444
- static get is() { return "wm-line-chart"; }
445
- static get encapsulation() { return "shadow"; }
446
- static get originalStyleUrls() {
447
- return {
448
- "$": ["wm-line-chart.scss"]
449
- };
450
- }
451
- static get styleUrls() {
452
- return {
453
- "$": ["wm-line-chart.css"]
454
- };
455
- }
456
- static get properties() {
457
- return {
458
- "label": {
459
- "type": "string",
460
- "mutable": false,
461
- "complexType": {
462
- "original": "string",
463
- "resolved": "string",
464
- "references": {}
465
- },
466
- "required": true,
467
- "optional": false,
468
- "docs": {
469
- "tags": [],
470
- "text": ""
471
- },
472
- "attribute": "label",
473
- "reflect": false
474
- },
475
- "description": {
476
- "type": "string",
477
- "mutable": false,
478
- "complexType": {
479
- "original": "string",
480
- "resolved": "string",
481
- "references": {}
482
- },
483
- "required": false,
484
- "optional": false,
485
- "docs": {
486
- "tags": [],
487
- "text": ""
488
- },
489
- "attribute": "description",
490
- "reflect": false,
491
- "defaultValue": "\"\""
492
- },
493
- "xAxisLabel": {
494
- "type": "string",
495
- "mutable": false,
496
- "complexType": {
497
- "original": "string",
498
- "resolved": "string",
499
- "references": {}
500
- },
501
- "required": true,
502
- "optional": false,
503
- "docs": {
504
- "tags": [],
505
- "text": ""
506
- },
507
- "attribute": "x-axis-label",
508
- "reflect": false
509
- },
510
- "yAxisLabel": {
511
- "type": "string",
512
- "mutable": false,
513
- "complexType": {
514
- "original": "string",
515
- "resolved": "string",
516
- "references": {}
517
- },
518
- "required": true,
519
- "optional": false,
520
- "docs": {
521
- "tags": [],
522
- "text": ""
523
- },
524
- "attribute": "y-axis-label",
525
- "reflect": false
526
- },
527
- "lineData": {
528
- "type": "string",
529
- "mutable": false,
530
- "complexType": {
531
- "original": "string",
532
- "resolved": "string",
533
- "references": {}
534
- },
535
- "required": true,
536
- "optional": false,
537
- "docs": {
538
- "tags": [],
539
- "text": ""
540
- },
541
- "attribute": "line-data",
542
- "reflect": true
543
- },
544
- "units": {
545
- "type": "string",
546
- "mutable": false,
547
- "complexType": {
548
- "original": "string",
549
- "resolved": "string",
550
- "references": {}
551
- },
552
- "required": false,
553
- "optional": false,
554
- "docs": {
555
- "tags": [],
556
- "text": ""
557
- },
558
- "attribute": "units",
559
- "reflect": false,
560
- "defaultValue": "\"null,null\""
561
- },
562
- "labelWidth": {
563
- "type": "string",
564
- "mutable": false,
565
- "complexType": {
566
- "original": "string",
567
- "resolved": "string",
568
- "references": {}
569
- },
570
- "required": false,
571
- "optional": false,
572
- "docs": {
573
- "tags": [],
574
- "text": ""
575
- },
576
- "attribute": "label-width",
577
- "reflect": false,
578
- "defaultValue": "\"120px\""
579
- },
580
- "highlightQualifier": {
581
- "type": "string",
582
- "mutable": false,
583
- "complexType": {
584
- "original": "string",
585
- "resolved": "string",
586
- "references": {}
587
- },
588
- "required": false,
589
- "optional": false,
590
- "docs": {
591
- "tags": [],
592
- "text": ""
593
- },
594
- "attribute": "highlight-qualifier",
595
- "reflect": false,
596
- "defaultValue": "lineChartMessages.highlightQualifier"
597
- },
598
- "highlightStart": {
599
- "type": "string",
600
- "mutable": false,
601
- "complexType": {
602
- "original": "string",
603
- "resolved": "string | undefined",
604
- "references": {}
605
- },
606
- "required": false,
607
- "optional": true,
608
- "docs": {
609
- "tags": [],
610
- "text": ""
611
- },
612
- "attribute": "highlight-start",
613
- "reflect": false
614
- },
615
- "highlightEnd": {
616
- "type": "string",
617
- "mutable": false,
618
- "complexType": {
619
- "original": "string",
620
- "resolved": "string | undefined",
621
- "references": {}
622
- },
623
- "required": false,
624
- "optional": true,
625
- "docs": {
626
- "tags": [],
627
- "text": ""
628
- },
629
- "attribute": "highlight-end",
630
- "reflect": false
631
- },
632
- "visibilityToggles": {
633
- "type": "boolean",
634
- "mutable": false,
635
- "complexType": {
636
- "original": "boolean",
637
- "resolved": "boolean",
638
- "references": {}
639
- },
640
- "required": false,
641
- "optional": false,
642
- "docs": {
643
- "tags": [],
644
- "text": ""
645
- },
646
- "attribute": "visibility-toggles",
647
- "reflect": false,
648
- "defaultValue": "false"
649
- },
650
- "showDeltas": {
651
- "type": "boolean",
652
- "mutable": false,
653
- "complexType": {
654
- "original": "boolean",
655
- "resolved": "boolean",
656
- "references": {}
657
- },
658
- "required": false,
659
- "optional": false,
660
- "docs": {
661
- "tags": [],
662
- "text": ""
663
- },
664
- "attribute": "show-deltas",
665
- "reflect": false,
666
- "defaultValue": "false"
667
- },
668
- "yRange": {
669
- "type": "string",
670
- "mutable": false,
671
- "complexType": {
672
- "original": "string",
673
- "resolved": "string | undefined",
674
- "references": {}
675
- },
676
- "required": false,
677
- "optional": true,
678
- "docs": {
679
- "tags": [],
680
- "text": ""
681
- },
682
- "attribute": "y-range",
683
- "reflect": false
684
- }
685
- };
686
- }
687
- static get states() {
688
- return {
689
- "parsedLineData": {},
690
- "popoverIndex": {},
691
- "focusedLine": {},
692
- "hiddenLines": {},
693
- "isTabbing": {},
694
- "intervalSkip": {},
695
- "announcement": {}
696
- };
697
- }
698
- static get elementRef() { return "el"; }
699
- static get watchers() {
700
- return [{
701
- "propName": "lineData",
702
- "methodName": "parseData"
703
- }, {
704
- "propName": "intervalSkip",
705
- "methodName": "handleIntervalSkip"
706
- }];
707
- }
708
- static get listeners() {
709
- return [{
710
- "name": "wmUserIsTabbing",
711
- "method": "toggleTabbingOn",
712
- "target": "window",
713
- "capture": false,
714
- "passive": false
715
- }, {
716
- "name": "wmUserIsNotTabbing",
717
- "method": "toggleTabbingOff",
718
- "target": "window",
719
- "capture": false,
720
- "passive": false
721
- }];
722
- }
723
- }