@watermarkinsights/ripple 5.12.0 → 5.13.0-alpha.10

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 (490) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -1
  3. package/dist/components/index.d.ts +33 -0
  4. package/dist/components/priv-calendar.d.ts +11 -0
  5. package/dist/components/priv-chart-popover.d.ts +11 -0
  6. package/dist/components/priv-navigator-button.d.ts +11 -0
  7. package/dist/components/priv-navigator-item.d.ts +11 -0
  8. package/dist/components/priv-option-list.d.ts +11 -0
  9. package/dist/components/wm-action-menu.d.ts +11 -0
  10. package/dist/components/wm-button.d.ts +11 -0
  11. package/dist/components/wm-chart-slice.d.ts +11 -0
  12. package/dist/components/wm-chart.d.ts +11 -0
  13. package/dist/components/wm-date-range.d.ts +11 -0
  14. package/dist/components/wm-datepicker.d.ts +11 -0
  15. package/dist/components/wm-file-list.d.ts +11 -0
  16. package/dist/components/wm-file.d.ts +11 -0
  17. package/dist/components/wm-flyout.d.ts +11 -0
  18. package/dist/components/wm-input.d.ts +11 -0
  19. package/dist/components/wm-line-chart.d.ts +11 -0
  20. package/dist/components/wm-menuitem.d.ts +11 -0
  21. package/dist/components/wm-modal-footer.d.ts +11 -0
  22. package/dist/components/wm-modal-header.d.ts +11 -0
  23. package/dist/components/wm-modal-pss-footer.d.ts +11 -0
  24. package/dist/components/wm-modal-pss-header.d.ts +11 -0
  25. package/dist/components/wm-modal-pss.d.ts +11 -0
  26. package/dist/components/wm-modal.d.ts +11 -0
  27. package/dist/components/wm-navigation-hamburger.d.ts +11 -0
  28. package/dist/components/wm-navigation-item.d.ts +11 -0
  29. package/dist/components/wm-navigation.d.ts +11 -0
  30. package/dist/components/wm-navigator.d.ts +11 -0
  31. package/dist/components/wm-nested-select.d.ts +11 -0
  32. package/dist/components/wm-optgroup.d.ts +11 -0
  33. package/dist/components/wm-option.d.ts +11 -0
  34. package/dist/components/wm-pagination.d.ts +11 -0
  35. package/dist/components/wm-progress-indicator.d.ts +11 -0
  36. package/dist/components/wm-progress-monitor.d.ts +11 -0
  37. package/dist/components/wm-progress-slice.d.ts +11 -0
  38. package/dist/components/wm-search.d.ts +11 -0
  39. package/dist/components/wm-select.d.ts +11 -0
  40. package/dist/components/wm-snackbar.d.ts +11 -0
  41. package/dist/components/wm-tab-item.d.ts +11 -0
  42. package/dist/components/wm-tab-list.d.ts +11 -0
  43. package/dist/components/wm-tab-panel.d.ts +11 -0
  44. package/dist/components/wm-tag-input.d.ts +11 -0
  45. package/dist/components/wm-tag-option.d.ts +11 -0
  46. package/dist/components/wm-textarea.d.ts +11 -0
  47. package/dist/components/wm-timepicker.d.ts +11 -0
  48. package/dist/components/wm-toggletip.d.ts +11 -0
  49. package/dist/components/wm-uploader.d.ts +11 -0
  50. package/dist/components/wm-wrapper.d.ts +11 -0
  51. package/dist/{collection/global/global.js → ripple/app-globals-B7cOtGhY.js} +84 -2
  52. package/dist/{esm/chartFunctions-9099c7e9.js → ripple/chartFunctions-1XZcmyix.js} +4 -4
  53. package/dist/ripple/functions-DVLl0rH_.js +18108 -0
  54. package/dist/ripple/index-CU5QNCKv.js +4167 -0
  55. package/dist/ripple/index.esm.js +1 -0
  56. package/dist/{collection/global/interfaces.js → ripple/interfaces-CrANcZM9.js} +6 -4
  57. package/dist/{esm/intl-a6f16883.js → ripple/intl-7p27BJSM.js} +1 -1
  58. package/dist/ripple/priv-calendar.entry.js +566 -0
  59. package/dist/ripple/{p-28119645.system.entry.js → priv-chart-popover.entry.js} +134 -1
  60. package/dist/ripple/priv-navigator-button.entry.js +24 -0
  61. package/dist/ripple/{p-958331bf.entry.js → priv-navigator-item.entry.js} +30 -1
  62. package/dist/ripple/{p-363b534b.entry.js → priv-option-list.entry.js} +385 -1
  63. package/dist/ripple/ripple.css +809 -1
  64. package/dist/ripple/ripple.esm.js +48 -1
  65. package/dist/ripple/wm-action-menu.entry.js +201 -0
  66. package/dist/ripple/wm-button.entry.js +197 -0
  67. package/dist/{esm → ripple}/wm-chart-slice.entry.js +1 -6
  68. package/dist/ripple/{p-a78bb423.system.entry.js → wm-chart.entry.js} +157 -1
  69. package/dist/ripple/wm-date-range.entry.js +477 -0
  70. package/dist/ripple/wm-datepicker.entry.js +247 -0
  71. package/dist/ripple/wm-file-list.entry.js +18 -0
  72. package/dist/ripple/{p-1a71d867.system.entry.js → wm-file.entry.js} +182 -1
  73. package/dist/ripple/{p-56aeee6e.system.entry.js → wm-flyout.entry.js} +159 -1
  74. package/dist/ripple/wm-input.entry.js +111 -0
  75. package/dist/{esm/wm-chart.entry.js → ripple/wm-line-chart.entry.js} +402 -111
  76. package/dist/{esm/priv-chart-popover.entry.js → ripple/wm-menuitem.entry.js} +98 -108
  77. package/dist/{cjs/priv-navigator-button.cjs.entry.js → ripple/wm-modal-footer.entry.js} +35 -19
  78. package/dist/{esm/priv-navigator-button.entry.js → ripple/wm-modal-header.entry.js} +25 -13
  79. package/dist/ripple/wm-modal-pss-footer.entry.js +40 -0
  80. package/dist/ripple/wm-modal-pss-header.entry.js +39 -0
  81. package/dist/ripple/wm-modal-pss.entry.js +135 -0
  82. package/dist/ripple/wm-modal.entry.js +133 -0
  83. package/dist/ripple/wm-navigation-hamburger.entry.js +48 -0
  84. package/dist/ripple/wm-navigation-item.entry.js +18 -0
  85. package/dist/ripple/{p-b9bca547.entry.js → wm-navigation.entry.js} +116 -1
  86. package/dist/{cjs/priv-navigator-item.cjs.entry.js → ripple/wm-navigator.entry.js} +357 -23
  87. package/dist/ripple/{p-a04ef164.system.entry.js → wm-nested-select.entry.js} +308 -1
  88. package/dist/{cjs/priv-chart-popover.cjs.entry.js → ripple/wm-optgroup.entry.js} +48 -119
  89. package/dist/{esm/priv-option-list.entry.js → ripple/wm-option.entry.js} +129 -346
  90. package/dist/ripple/{p-05ae54d7.entry.js → wm-pagination.entry.js} +223 -1
  91. package/dist/ripple/wm-progress-indicator.entry.js +107 -0
  92. package/dist/{esm-es5/priv-navigator-item.entry.js → ripple/wm-progress-monitor.entry.js} +71 -1
  93. package/dist/ripple/wm-progress-slice.entry.js +13 -0
  94. package/dist/{cjs/priv-option-list.cjs.entry.js → ripple/wm-search.entry.js} +180 -364
  95. package/dist/{esm/wm-nested-select.entry.js → ripple/wm-select.entry.js} +137 -198
  96. package/dist/ripple/wm-snackbar.entry.js +178 -0
  97. package/dist/{esm-es5/wm-file-list.entry.js → ripple/wm-tab-item.entry.js} +63 -1
  98. package/dist/ripple/wm-tab-list.entry.js +175 -0
  99. package/dist/ripple/wm-tab-panel.entry.js +32 -0
  100. package/dist/ripple/wm-tag-input.entry.js +877 -0
  101. package/dist/{esm → ripple}/wm-tag-option.entry.js +2 -6
  102. package/dist/ripple/wm-textarea.entry.js +79 -0
  103. package/dist/ripple/wm-timepicker.entry.js +300 -0
  104. package/dist/{esm/priv-navigator-item.entry.js → ripple/wm-toggletip.entry.js} +164 -18
  105. package/dist/ripple/wm-uploader.entry.js +313 -0
  106. package/dist/{esm → ripple}/wm-wrapper.entry.js +1 -1
  107. package/dist/types/components/wm-flyout/wm-flyout.d.ts +45 -0
  108. package/dist/types/components.d.ts +56 -0
  109. package/dist/types/global/functions.d.ts +1 -0
  110. package/dist/types/stencil-public-runtime.d.ts +31 -10
  111. package/package.json +32 -12
  112. package/dist/cjs/chartFunctions-a1981e06.js +0 -732
  113. package/dist/cjs/functions-4b187487.js +0 -9679
  114. package/dist/cjs/global-4e034486.js +0 -85
  115. package/dist/cjs/index-e86c28b6.js +0 -2649
  116. package/dist/cjs/index.cjs.js +0 -2
  117. package/dist/cjs/interfaces-85d78ae9.js +0 -37
  118. package/dist/cjs/intl-7fd0760e.js +0 -283
  119. package/dist/cjs/loader.cjs.js +0 -14
  120. package/dist/cjs/priv-calendar.cjs.entry.js +0 -573
  121. package/dist/cjs/ripple.cjs.js +0 -24
  122. package/dist/cjs/wm-action-menu_2.cjs.entry.js +0 -333
  123. package/dist/cjs/wm-button.cjs.entry.js +0 -206
  124. package/dist/cjs/wm-chart-slice.cjs.entry.js +0 -27
  125. package/dist/cjs/wm-chart.cjs.entry.js +0 -162
  126. package/dist/cjs/wm-date-range.cjs.entry.js +0 -483
  127. package/dist/cjs/wm-datepicker.cjs.entry.js +0 -253
  128. package/dist/cjs/wm-file-list.cjs.entry.js +0 -22
  129. package/dist/cjs/wm-file.cjs.entry.js +0 -193
  130. package/dist/cjs/wm-input.cjs.entry.js +0 -124
  131. package/dist/cjs/wm-line-chart.cjs.entry.js +0 -460
  132. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +0 -214
  133. package/dist/cjs/wm-modal_3.cjs.entry.js +0 -212
  134. package/dist/cjs/wm-navigation_3.cjs.entry.js +0 -185
  135. package/dist/cjs/wm-navigator.cjs.entry.js +0 -326
  136. package/dist/cjs/wm-nested-select.cjs.entry.js +0 -314
  137. package/dist/cjs/wm-optgroup.cjs.entry.js +0 -73
  138. package/dist/cjs/wm-option_2.cjs.entry.js +0 -425
  139. package/dist/cjs/wm-pagination.cjs.entry.js +0 -227
  140. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +0 -202
  141. package/dist/cjs/wm-search.cjs.entry.js +0 -193
  142. package/dist/cjs/wm-snackbar.cjs.entry.js +0 -181
  143. package/dist/cjs/wm-tab-item_3.cjs.entry.js +0 -260
  144. package/dist/cjs/wm-tag-input.cjs.entry.js +0 -891
  145. package/dist/cjs/wm-tag-option.cjs.entry.js +0 -43
  146. package/dist/cjs/wm-textarea.cjs.entry.js +0 -87
  147. package/dist/cjs/wm-timepicker.cjs.entry.js +0 -306
  148. package/dist/cjs/wm-toggletip.cjs.entry.js +0 -182
  149. package/dist/cjs/wm-uploader.cjs.entry.js +0 -324
  150. package/dist/cjs/wm-wrapper.cjs.entry.js +0 -21
  151. package/dist/collection/collection-manifest.json +0 -191
  152. package/dist/collection/components/charts/chartFunctions.js +0 -665
  153. package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
  154. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +0 -908
  155. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
  156. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +0 -257
  157. package/dist/collection/components/charts/screenshots.e2e.js +0 -96
  158. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +0 -125
  159. package/dist/collection/components/charts/wm-chart/wm-chart.css +0 -1274
  160. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
  161. package/dist/collection/components/charts/wm-chart/wm-chart.js +0 -422
  162. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
  163. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +0 -1067
  164. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
  165. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +0 -723
  166. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
  167. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +0 -1274
  168. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +0 -264
  169. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +0 -909
  170. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
  171. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +0 -151
  172. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
  173. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +0 -121
  174. package/dist/collection/components/datepickers/datepicker.css +0 -1043
  175. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +0 -1279
  176. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +0 -840
  177. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +0 -89
  178. package/dist/collection/components/datepickers/wm-date-range.e2e.js +0 -443
  179. package/dist/collection/components/datepickers/wm-date-range.js +0 -845
  180. package/dist/collection/components/datepickers/wm-date-range.spec.js +0 -22
  181. package/dist/collection/components/datepickers/wm-datepicker.e2e.js +0 -382
  182. package/dist/collection/components/datepickers/wm-datepicker.js +0 -520
  183. package/dist/collection/components/datepickers/wm-datepicker.spec.js +0 -21
  184. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +0 -918
  185. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +0 -778
  186. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +0 -1181
  187. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +0 -620
  188. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +0 -830
  189. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +0 -258
  190. package/dist/collection/components/selects/wm-option/wm-option.css +0 -931
  191. package/dist/collection/components/selects/wm-option/wm-option.e2e.js +0 -22
  192. package/dist/collection/components/selects/wm-option/wm-option.js +0 -530
  193. package/dist/collection/components/selects/wm-option/wm-option.spec.js +0 -63
  194. package/dist/collection/components/selects/wm-select/wm-select.css +0 -1104
  195. package/dist/collection/components/selects/wm-select/wm-select.e2e.js +0 -521
  196. package/dist/collection/components/selects/wm-select/wm-select.js +0 -584
  197. package/dist/collection/components/selects/wm-select/wm-select.spec.js +0 -271
  198. package/dist/collection/components/wm-action-menu/wm-action-menu.css +0 -891
  199. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
  200. package/dist/collection/components/wm-action-menu/wm-action-menu.js +0 -435
  201. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
  202. package/dist/collection/components/wm-button/wm-button.css +0 -1261
  203. package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
  204. package/dist/collection/components/wm-button/wm-button.js +0 -489
  205. package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
  206. package/dist/collection/components/wm-file/wm-file.css +0 -927
  207. package/dist/collection/components/wm-file/wm-file.js +0 -412
  208. package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
  209. package/dist/collection/components/wm-file-list/wm-file-list.css +0 -820
  210. package/dist/collection/components/wm-file-list/wm-file-list.js +0 -45
  211. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
  212. package/dist/collection/components/wm-input/wm-input.css +0 -992
  213. package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
  214. package/dist/collection/components/wm-input/wm-input.js +0 -471
  215. package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
  216. package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -891
  217. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
  218. package/dist/collection/components/wm-menuitem/wm-menuitem.js +0 -419
  219. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
  220. package/dist/collection/components/wm-modal/wm-modal-footer.css +0 -845
  221. package/dist/collection/components/wm-modal/wm-modal-footer.js +0 -141
  222. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
  223. package/dist/collection/components/wm-modal/wm-modal-header.css +0 -844
  224. package/dist/collection/components/wm-modal/wm-modal-header.js +0 -78
  225. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
  226. package/dist/collection/components/wm-modal/wm-modal.css +0 -891
  227. package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
  228. package/dist/collection/components/wm-modal/wm-modal.js +0 -350
  229. package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
  230. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +0 -852
  231. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +0 -138
  232. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +0 -846
  233. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +0 -82
  234. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +0 -927
  235. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +0 -362
  236. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +0 -847
  237. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +0 -119
  238. package/dist/collection/components/wm-navigation/wm-navigation-item.css +0 -856
  239. package/dist/collection/components/wm-navigation/wm-navigation-item.js +0 -98
  240. package/dist/collection/components/wm-navigation/wm-navigation.css +0 -898
  241. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
  242. package/dist/collection/components/wm-navigation/wm-navigation.js +0 -190
  243. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
  244. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -849
  245. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
  246. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +0 -86
  247. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +0 -830
  248. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +0 -124
  249. package/dist/collection/components/wm-navigator/wm-navigator.css +0 -903
  250. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
  251. package/dist/collection/components/wm-navigator/wm-navigator.js +0 -496
  252. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
  253. package/dist/collection/components/wm-pagination/wm-pagination.css +0 -971
  254. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
  255. package/dist/collection/components/wm-pagination/wm-pagination.js +0 -363
  256. package/dist/collection/components/wm-search/wm-search.css +0 -895
  257. package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
  258. package/dist/collection/components/wm-search/wm-search.js +0 -426
  259. package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
  260. package/dist/collection/components/wm-snackbar/wm-snackbar.css +0 -1077
  261. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
  262. package/dist/collection/components/wm-snackbar/wm-snackbar.js +0 -269
  263. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
  264. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +0 -868
  265. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +0 -175
  266. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -840
  267. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +0 -273
  268. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +0 -825
  269. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +0 -87
  270. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
  271. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
  272. package/dist/collection/components/wm-tag-input/wm-tag-input.css +0 -1275
  273. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
  274. package/dist/collection/components/wm-tag-input/wm-tag-input.js +0 -1227
  275. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
  276. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +0 -243
  277. package/dist/collection/components/wm-textarea/wm-textarea.css +0 -979
  278. package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
  279. package/dist/collection/components/wm-textarea/wm-textarea.js +0 -313
  280. package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
  281. package/dist/collection/components/wm-timepicker/wm-timepicker.css +0 -1093
  282. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
  283. package/dist/collection/components/wm-timepicker/wm-timepicker.js +0 -544
  284. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
  285. package/dist/collection/components/wm-toggletip/wm-toggletip.css +0 -1152
  286. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
  287. package/dist/collection/components/wm-toggletip/wm-toggletip.js +0 -289
  288. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
  289. package/dist/collection/components/wm-uploader/wm-uploader.css +0 -1563
  290. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
  291. package/dist/collection/components/wm-uploader/wm-uploader.js +0 -603
  292. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
  293. package/dist/collection/components/wm-wrapper/wm-wrapper.js +0 -28
  294. package/dist/collection/dev/action-menu.js +0 -0
  295. package/dist/collection/dev/button.js +0 -0
  296. package/dist/collection/dev/chart-small.js +0 -56
  297. package/dist/collection/dev/chart.js +0 -18
  298. package/dist/collection/dev/date-range.js +0 -6
  299. package/dist/collection/dev/datepicker.js +0 -46
  300. package/dist/collection/dev/file-list.js +0 -16
  301. package/dist/collection/dev/file.js +0 -0
  302. package/dist/collection/dev/input.js +0 -6
  303. package/dist/collection/dev/line-chart.js +0 -0
  304. package/dist/collection/dev/modal.js +0 -48
  305. package/dist/collection/dev/navigation.js +0 -13
  306. package/dist/collection/dev/navigator.js +0 -34
  307. package/dist/collection/dev/nested-select.js +0 -36
  308. package/dist/collection/dev/pagination.js +0 -7
  309. package/dist/collection/dev/progress-monitor.js +0 -0
  310. package/dist/collection/dev/pss-modal.js +0 -8
  311. package/dist/collection/dev/scripts.js +0 -49
  312. package/dist/collection/dev/search.js +0 -72
  313. package/dist/collection/dev/select.js +0 -57
  314. package/dist/collection/dev/snackbar.js +0 -54
  315. package/dist/collection/dev/tabs.js +0 -44
  316. package/dist/collection/dev/tag-input.js +0 -32
  317. package/dist/collection/dev/textarea.js +0 -28
  318. package/dist/collection/dev/timepicker.js +0 -32
  319. package/dist/collection/dev/toggletip.js +0 -9
  320. package/dist/collection/dev/uploader.js +0 -139
  321. package/dist/collection/global/__mocks__/functions.js +0 -6
  322. package/dist/collection/global/functions.js +0 -825
  323. package/dist/collection/global/functions.spec.js +0 -126
  324. package/dist/collection/global/intl.js +0 -274
  325. package/dist/collection/global/services/__mocks__/http-service.js +0 -130
  326. package/dist/collection/global/services/http-service.js +0 -50
  327. package/dist/collection/lang/lang.js +0 -5
  328. package/dist/collection/lang/lang.spec.js +0 -20
  329. package/dist/collection/lang/missing.js +0 -43
  330. package/dist/collection/lang/piglatin.js +0 -101
  331. package/dist/esm/functions-00e1916b.js +0 -9639
  332. package/dist/esm/global-c76064cb.js +0 -83
  333. package/dist/esm/index-558b5a82.js +0 -2618
  334. package/dist/esm/index.js +0 -1
  335. package/dist/esm/interfaces-cc5b177f.js +0 -34
  336. package/dist/esm/loader.js +0 -10
  337. package/dist/esm/polyfills/core-js.js +0 -11
  338. package/dist/esm/polyfills/dom.js +0 -79
  339. package/dist/esm/polyfills/es5-html-element.js +0 -1
  340. package/dist/esm/polyfills/index.js +0 -34
  341. package/dist/esm/polyfills/system.js +0 -6
  342. package/dist/esm/priv-calendar.entry.js +0 -569
  343. package/dist/esm/ripple.js +0 -19
  344. package/dist/esm/wm-action-menu_2.entry.js +0 -328
  345. package/dist/esm/wm-button.entry.js +0 -202
  346. package/dist/esm/wm-date-range.entry.js +0 -479
  347. package/dist/esm/wm-datepicker.entry.js +0 -249
  348. package/dist/esm/wm-file-list.entry.js +0 -18
  349. package/dist/esm/wm-file.entry.js +0 -189
  350. package/dist/esm/wm-input.entry.js +0 -120
  351. package/dist/esm/wm-line-chart.entry.js +0 -456
  352. package/dist/esm/wm-modal-pss_3.entry.js +0 -208
  353. package/dist/esm/wm-modal_3.entry.js +0 -206
  354. package/dist/esm/wm-navigation_3.entry.js +0 -179
  355. package/dist/esm/wm-navigator.entry.js +0 -322
  356. package/dist/esm/wm-optgroup.entry.js +0 -69
  357. package/dist/esm/wm-option_2.entry.js +0 -420
  358. package/dist/esm/wm-pagination.entry.js +0 -223
  359. package/dist/esm/wm-progress-indicator_3.entry.js +0 -196
  360. package/dist/esm/wm-search.entry.js +0 -189
  361. package/dist/esm/wm-snackbar.entry.js +0 -177
  362. package/dist/esm/wm-tab-item_3.entry.js +0 -254
  363. package/dist/esm/wm-tag-input.entry.js +0 -887
  364. package/dist/esm/wm-textarea.entry.js +0 -83
  365. package/dist/esm/wm-timepicker.entry.js +0 -302
  366. package/dist/esm/wm-toggletip.entry.js +0 -178
  367. package/dist/esm/wm-uploader.entry.js +0 -320
  368. package/dist/esm-es5/chartFunctions-9099c7e9.js +0 -1
  369. package/dist/esm-es5/functions-00e1916b.js +0 -1
  370. package/dist/esm-es5/global-c76064cb.js +0 -1
  371. package/dist/esm-es5/index-558b5a82.js +0 -1
  372. package/dist/esm-es5/index.js +0 -0
  373. package/dist/esm-es5/interfaces-cc5b177f.js +0 -1
  374. package/dist/esm-es5/intl-a6f16883.js +0 -1
  375. package/dist/esm-es5/loader.js +0 -1
  376. package/dist/esm-es5/priv-calendar.entry.js +0 -1
  377. package/dist/esm-es5/priv-chart-popover.entry.js +0 -1
  378. package/dist/esm-es5/priv-navigator-button.entry.js +0 -1
  379. package/dist/esm-es5/priv-option-list.entry.js +0 -1
  380. package/dist/esm-es5/ripple.js +0 -1
  381. package/dist/esm-es5/wm-action-menu_2.entry.js +0 -1
  382. package/dist/esm-es5/wm-button.entry.js +0 -1
  383. package/dist/esm-es5/wm-chart-slice.entry.js +0 -1
  384. package/dist/esm-es5/wm-chart.entry.js +0 -1
  385. package/dist/esm-es5/wm-date-range.entry.js +0 -1
  386. package/dist/esm-es5/wm-datepicker.entry.js +0 -1
  387. package/dist/esm-es5/wm-file.entry.js +0 -1
  388. package/dist/esm-es5/wm-input.entry.js +0 -1
  389. package/dist/esm-es5/wm-line-chart.entry.js +0 -1
  390. package/dist/esm-es5/wm-modal-pss_3.entry.js +0 -1
  391. package/dist/esm-es5/wm-modal_3.entry.js +0 -1
  392. package/dist/esm-es5/wm-navigation_3.entry.js +0 -1
  393. package/dist/esm-es5/wm-navigator.entry.js +0 -1
  394. package/dist/esm-es5/wm-nested-select.entry.js +0 -1
  395. package/dist/esm-es5/wm-optgroup.entry.js +0 -1
  396. package/dist/esm-es5/wm-option_2.entry.js +0 -1
  397. package/dist/esm-es5/wm-pagination.entry.js +0 -1
  398. package/dist/esm-es5/wm-progress-indicator_3.entry.js +0 -1
  399. package/dist/esm-es5/wm-search.entry.js +0 -1
  400. package/dist/esm-es5/wm-snackbar.entry.js +0 -1
  401. package/dist/esm-es5/wm-tab-item_3.entry.js +0 -1
  402. package/dist/esm-es5/wm-tag-input.entry.js +0 -1
  403. package/dist/esm-es5/wm-tag-option.entry.js +0 -1
  404. package/dist/esm-es5/wm-textarea.entry.js +0 -1
  405. package/dist/esm-es5/wm-timepicker.entry.js +0 -1
  406. package/dist/esm-es5/wm-toggletip.entry.js +0 -1
  407. package/dist/esm-es5/wm-uploader.entry.js +0 -1
  408. package/dist/esm-es5/wm-wrapper.entry.js +0 -1
  409. package/dist/index.cjs.js +0 -1
  410. package/dist/index.js +0 -1
  411. package/dist/loader/cdn.js +0 -3
  412. package/dist/loader/index.cjs.js +0 -3
  413. package/dist/loader/index.d.ts +0 -21
  414. package/dist/loader/index.es2017.js +0 -3
  415. package/dist/loader/index.js +0 -4
  416. package/dist/loader/package.json +0 -11
  417. package/dist/ripple/p-0d89d63c.system.entry.js +0 -1
  418. package/dist/ripple/p-118c47eb.system.entry.js +0 -1
  419. package/dist/ripple/p-1a4b6b02.system.entry.js +0 -1
  420. package/dist/ripple/p-1a4b7504.system.entry.js +0 -1
  421. package/dist/ripple/p-1a951dfb.entry.js +0 -1
  422. package/dist/ripple/p-1c8f550f.system.entry.js +0 -1
  423. package/dist/ripple/p-1f751b87.js +0 -1
  424. package/dist/ripple/p-1fac5bf9.js +0 -1
  425. package/dist/ripple/p-20a8f732.system.entry.js +0 -1
  426. package/dist/ripple/p-249b56fb.entry.js +0 -1
  427. package/dist/ripple/p-249d13a1.system.entry.js +0 -1
  428. package/dist/ripple/p-26906899.entry.js +0 -1
  429. package/dist/ripple/p-2732bddd.js +0 -1
  430. package/dist/ripple/p-2f37f3ee.system.js +0 -1
  431. package/dist/ripple/p-32bf3f5b.system.entry.js +0 -1
  432. package/dist/ripple/p-335c03d3.system.entry.js +0 -1
  433. package/dist/ripple/p-393e4636.js +0 -1
  434. package/dist/ripple/p-39f79d71.system.entry.js +0 -1
  435. package/dist/ripple/p-3a231f4b.system.entry.js +0 -1
  436. package/dist/ripple/p-3d4bb85f.entry.js +0 -1
  437. package/dist/ripple/p-4228de00.entry.js +0 -1
  438. package/dist/ripple/p-42fa7a77.system.js +0 -1
  439. package/dist/ripple/p-48e09589.entry.js +0 -1
  440. package/dist/ripple/p-4f8fe1d1.system.js +0 -1
  441. package/dist/ripple/p-50ea2036.system.js +0 -1
  442. package/dist/ripple/p-522ecb7d.system.entry.js +0 -1
  443. package/dist/ripple/p-54d6f0f9.entry.js +0 -1
  444. package/dist/ripple/p-568c595f.js +0 -2
  445. package/dist/ripple/p-5e6a4f70.system.js +0 -1
  446. package/dist/ripple/p-5f082360.system.entry.js +0 -1
  447. package/dist/ripple/p-5f5fe905.js +0 -1
  448. package/dist/ripple/p-617c2c75.entry.js +0 -1
  449. package/dist/ripple/p-6524c53e.system.entry.js +0 -1
  450. package/dist/ripple/p-65d26233.system.entry.js +0 -1
  451. package/dist/ripple/p-6834a6d3.entry.js +0 -1
  452. package/dist/ripple/p-68e04222.entry.js +0 -1
  453. package/dist/ripple/p-68fddfaa.system.entry.js +0 -1
  454. package/dist/ripple/p-694903e6.system.entry.js +0 -1
  455. package/dist/ripple/p-73ca2f26.system.js +0 -1
  456. package/dist/ripple/p-7b6a65f8.system.entry.js +0 -1
  457. package/dist/ripple/p-7b7e1eb5.system.entry.js +0 -1
  458. package/dist/ripple/p-88ebddd7.entry.js +0 -1
  459. package/dist/ripple/p-8c1d27a7.entry.js +0 -1
  460. package/dist/ripple/p-8e9c24f3.entry.js +0 -1
  461. package/dist/ripple/p-8f836507.system.entry.js +0 -1
  462. package/dist/ripple/p-94495341.entry.js +0 -1
  463. package/dist/ripple/p-9872623b.entry.js +0 -1
  464. package/dist/ripple/p-9ab3c088.system.entry.js +0 -1
  465. package/dist/ripple/p-9aedd599.entry.js +0 -1
  466. package/dist/ripple/p-9b848151.entry.js +0 -1
  467. package/dist/ripple/p-a880d9a0.system.entry.js +0 -1
  468. package/dist/ripple/p-ab8d78cc.system.js +0 -2
  469. package/dist/ripple/p-adc254e6.entry.js +0 -1
  470. package/dist/ripple/p-b165d61a.entry.js +0 -1
  471. package/dist/ripple/p-b39377c7.entry.js +0 -1
  472. package/dist/ripple/p-bae2c236.entry.js +0 -1
  473. package/dist/ripple/p-c53f3704.system.entry.js +0 -1
  474. package/dist/ripple/p-c56ff16f.entry.js +0 -1
  475. package/dist/ripple/p-c8cf09a2.system.entry.js +0 -1
  476. package/dist/ripple/p-cbdceb6e.entry.js +0 -1
  477. package/dist/ripple/p-cc813406.system.js +0 -1
  478. package/dist/ripple/p-d20a0f0c.system.entry.js +0 -1
  479. package/dist/ripple/p-d6111226.entry.js +0 -1
  480. package/dist/ripple/p-da68c87c.entry.js +0 -1
  481. package/dist/ripple/p-ddef82fa.system.entry.js +0 -1
  482. package/dist/ripple/p-dee6d5a3.entry.js +0 -1
  483. package/dist/ripple/p-e55d5371.entry.js +0 -1
  484. package/dist/ripple/p-e8c22f01.system.entry.js +0 -1
  485. package/dist/ripple/p-f555831b.entry.js +0 -1
  486. package/dist/ripple/p-f5c40e9e.system.entry.js +0 -1
  487. package/dist/ripple/p-f9cade98.entry.js +0 -1
  488. package/dist/ripple/p-fa09191b.system.entry.js +0 -1
  489. package/dist/ripple/p-fdfca58b.entry.js +0 -1
  490. 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" },
15
- { color: "#2e1b46", icon: "circle" },
16
- { color: "#0089e4", icon: "square" },
17
- { color: "#088000", icon: "star" },
18
- { color: "#ea8500", icon: "rhombus" },
19
- { color: "#d54f41", icon: "triangle-inverted" },
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",
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, { onBlur: () => this.resetDataPointFocus(), onMouseLeave: () => (this.popoverIndex = -1) }, h("div", { class: "component-wrapper", role: "application", "aria-roledescription": chartMessages.interactiveChart, "aria-label": this.label, "aria-describedby": "chart-description" }, this.renderLegend(), h("div", { class: "chart-wrapper" }, h("div", { class: "chart-label --y-axis", style: { "--labelWidth": this.labelWidth } }, this.yAxisLabel, this.parsedUnits[1] && ` (${this.parsedUnits[1]})`), this.renderYIntervals(), h("div", { 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", { class: "chart-label --x-axis" }, this.xAxisLabel, this.parsedUnits[0] && ` (${this.parsedUnits[0]})`)), h("div", { id: "chart-description", class: "sr-only" }, `${lineChartMessages.instructions} ${this.description}`), h("div", { 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
- }