@watermarkinsights/ripple 5.12.0-9 → 5.14.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{esm/chartFunctions-1478f4db.js → components/chartFunctions.js} +31 -11
  3. package/dist/components/functions.js +17465 -0
  4. package/dist/components/index.d.ts +33 -0
  5. package/dist/{collection/global/global.js → components/index.js} +52 -2
  6. package/dist/{collection/global → components}/interfaces.js +6 -4
  7. package/dist/{esm/intl-6426ba51.js → components/intl.js} +104 -2
  8. package/dist/components/priv-calendar.d.ts +11 -0
  9. package/dist/components/priv-calendar.js +6 -0
  10. package/dist/{esm/priv-calendar.entry.js → components/priv-calendar2.js} +38 -16
  11. package/dist/components/priv-chart-popover.d.ts +11 -0
  12. package/dist/components/priv-chart-popover.js +6 -0
  13. package/dist/{esm/priv-chart-popover.entry.js → components/priv-chart-popover2.js} +30 -12
  14. package/dist/components/priv-navigator-button.d.ts +11 -0
  15. package/dist/components/priv-navigator-button.js +6 -0
  16. package/dist/{esm/priv-navigator-button.entry.js → components/priv-navigator-button2.js} +26 -9
  17. package/dist/components/priv-navigator-item.d.ts +11 -0
  18. package/dist/components/priv-navigator-item.js +6 -0
  19. package/dist/{esm/priv-navigator-item.entry.js → components/priv-navigator-item2.js} +27 -9
  20. package/dist/components/priv-option-list.d.ts +11 -0
  21. package/dist/components/priv-option-list.js +6 -0
  22. package/dist/{esm/priv-option-list.entry.js → components/priv-option-list2.js} +63 -68
  23. package/dist/components/wm-action-menu.d.ts +11 -0
  24. package/dist/components/wm-action-menu.js +6 -0
  25. package/dist/{cjs/wm-pagination.cjs.entry.js → components/wm-action-menu2.js} +216 -161
  26. package/dist/components/wm-button.d.ts +11 -0
  27. package/dist/components/wm-button.js +6 -0
  28. package/dist/{esm/wm-button.entry.js → components/wm-button2.js} +48 -20
  29. package/dist/components/wm-chart-slice.d.ts +11 -0
  30. package/dist/components/wm-chart-slice.js +41 -0
  31. package/dist/components/wm-chart.d.ts +11 -0
  32. package/dist/{esm/wm-chart.entry.js → components/wm-chart.js} +70 -25
  33. package/dist/components/wm-date-range.d.ts +11 -0
  34. package/dist/{esm/wm-date-range.entry.js → components/wm-date-range.js} +79 -26
  35. package/dist/components/wm-datepicker.d.ts +11 -0
  36. package/dist/{esm/wm-datepicker.entry.js → components/wm-datepicker.js} +53 -16
  37. package/dist/components/wm-file-list.d.ts +11 -0
  38. package/dist/{esm/wm-file-list.entry.js → components/wm-file-list.js} +28 -9
  39. package/dist/components/wm-file.d.ts +11 -0
  40. package/dist/{esm/wm-file.entry.js → components/wm-file.js} +58 -20
  41. package/dist/components/wm-input.d.ts +11 -0
  42. package/dist/{esm/wm-input.entry.js → components/wm-input.js} +53 -22
  43. package/dist/components/wm-line-chart.d.ts +11 -0
  44. package/dist/{esm/wm-line-chart.entry.js → components/wm-line-chart.js} +77 -36
  45. package/dist/components/wm-menuitem.d.ts +11 -0
  46. package/dist/components/wm-menuitem.js +6 -0
  47. package/dist/{cjs/wm-optgroup.cjs.entry.js → components/wm-menuitem2.js} +130 -58
  48. package/dist/components/wm-modal-footer.d.ts +11 -0
  49. package/dist/components/wm-modal-footer.js +73 -0
  50. package/dist/components/wm-modal-header.d.ts +11 -0
  51. package/dist/components/wm-modal-header.js +61 -0
  52. package/dist/components/wm-modal-pss-footer.d.ts +11 -0
  53. package/dist/{cjs/priv-chart-popover.cjs.entry.js → components/wm-modal-pss-footer.js} +58 -129
  54. package/dist/components/wm-modal-pss-header.d.ts +11 -0
  55. package/dist/components/wm-modal-pss-header.js +64 -0
  56. package/dist/components/wm-modal-pss.d.ts +11 -0
  57. package/dist/{cjs/wm-textarea.cjs.entry.js → components/wm-modal-pss.js} +141 -67
  58. package/dist/components/wm-modal.d.ts +11 -0
  59. package/dist/{cjs/wm-input.cjs.entry.js → components/wm-modal.js} +140 -104
  60. package/dist/components/wm-navigation-hamburger.d.ts +11 -0
  61. package/dist/{esm-es5/priv-chart-popover.entry.js → components/wm-navigation-hamburger.js} +70 -1
  62. package/dist/components/wm-navigation-item.d.ts +11 -0
  63. package/dist/{ripple/p-713ea307.entry.js → components/wm-navigation-item.js} +40 -1
  64. package/dist/components/wm-navigation.d.ts +11 -0
  65. package/dist/{ripple/p-165b5d3d.system.entry.js → components/wm-navigation.js} +144 -1
  66. package/dist/components/wm-navigator.d.ts +11 -0
  67. package/dist/{esm/wm-navigator.entry.js → components/wm-navigator.js} +106 -19
  68. package/dist/components/wm-nested-select.d.ts +11 -0
  69. package/dist/{esm/wm-nested-select.entry.js → components/wm-nested-select.js} +63 -70
  70. package/dist/components/wm-optgroup.d.ts +11 -0
  71. package/dist/{esm/wm-optgroup.entry.js → components/wm-optgroup.js} +48 -11
  72. package/dist/components/wm-option.d.ts +11 -0
  73. package/dist/components/wm-option.js +6 -0
  74. package/dist/{cjs/wm-search.cjs.entry.js → components/wm-option2.js} +168 -166
  75. package/dist/components/wm-pagination.d.ts +11 -0
  76. package/dist/{esm/wm-pagination.entry.js → components/wm-pagination.js} +105 -26
  77. package/dist/components/wm-progress-indicator.d.ts +11 -0
  78. package/dist/{esm/wm-progress-indicator_3.entry.js → components/wm-progress-indicator.js} +51 -105
  79. package/dist/components/wm-progress-monitor.d.ts +11 -0
  80. package/dist/{ripple/p-d530c703.entry.js → components/wm-progress-monitor.js} +93 -1
  81. package/dist/components/wm-progress-slice.d.ts +11 -0
  82. package/dist/components/wm-progress-slice.js +37 -0
  83. package/dist/components/wm-search.d.ts +11 -0
  84. package/dist/{esm/wm-search.entry.js → components/wm-search.js} +74 -14
  85. package/dist/components/wm-select.d.ts +11 -0
  86. package/dist/components/wm-select.js +6 -0
  87. package/dist/components/wm-select2.js +294 -0
  88. package/dist/components/wm-snackbar.d.ts +11 -0
  89. package/dist/{esm/wm-snackbar.entry.js → components/wm-snackbar.js} +46 -17
  90. package/dist/components/wm-tab-item.d.ts +11 -0
  91. package/dist/components/wm-tab-item.js +85 -0
  92. package/dist/components/wm-tab-list.d.ts +11 -0
  93. package/dist/{cjs/wm-uploader.cjs.entry.js → components/wm-tab-list.js} +174 -282
  94. package/dist/components/wm-tab-panel.d.ts +11 -0
  95. package/dist/{cjs/wm-file-list.cjs.entry.js → components/wm-tab-panel.js} +46 -17
  96. package/dist/components/wm-tag-input.d.ts +11 -0
  97. package/dist/{esm/wm-tag-input.entry.js → components/wm-tag-input.js} +86 -49
  98. package/dist/components/wm-tag-option.d.ts +11 -0
  99. package/dist/components/wm-tag-option.js +63 -0
  100. package/dist/components/wm-textarea.d.ts +11 -0
  101. package/dist/{esm/wm-textarea.entry.js → components/wm-textarea.js} +46 -17
  102. package/dist/components/wm-timepicker.d.ts +11 -0
  103. package/dist/{esm/wm-timepicker.entry.js → components/wm-timepicker.js} +49 -19
  104. package/dist/components/wm-toggletip.d.ts +11 -0
  105. package/dist/{esm/wm-toggletip.entry.js → components/wm-toggletip.js} +37 -16
  106. package/dist/components/wm-uploader.d.ts +11 -0
  107. package/dist/{esm/wm-uploader.entry.js → components/wm-uploader.js} +50 -23
  108. package/dist/components/wm-wrapper.d.ts +11 -0
  109. package/dist/components/wm-wrapper.js +34 -0
  110. package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +0 -6
  111. package/dist/types/components/wm-pagination/wm-pagination.d.ts +6 -0
  112. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +1 -0
  113. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +1 -0
  114. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +2 -1
  115. package/dist/types/global/intl.d.ts +22 -0
  116. package/dist/types/stencil-public-runtime.d.ts +28 -0
  117. package/package.json +5 -9
  118. package/dist/cjs/app-globals-b8352f28.js +0 -92
  119. package/dist/cjs/chartFunctions-7314b414.js +0 -712
  120. package/dist/cjs/functions-5ac8a62f.js +0 -8462
  121. package/dist/cjs/index-788526f5.js +0 -1859
  122. package/dist/cjs/index.cjs.js +0 -2
  123. package/dist/cjs/interfaces-85d78ae9.js +0 -37
  124. package/dist/cjs/intl-07aaf53c.js +0 -180
  125. package/dist/cjs/loader.cjs.js +0 -15
  126. package/dist/cjs/priv-calendar.cjs.entry.js +0 -574
  127. package/dist/cjs/priv-navigator-button.cjs.entry.js +0 -29
  128. package/dist/cjs/priv-navigator-item.cjs.entry.js +0 -35
  129. package/dist/cjs/priv-option-list.cjs.entry.js +0 -430
  130. package/dist/cjs/ripple.cjs.js +0 -25
  131. package/dist/cjs/wm-action-menu_2.cjs.entry.js +0 -335
  132. package/dist/cjs/wm-button.cjs.entry.js +0 -207
  133. package/dist/cjs/wm-chart-slice.cjs.entry.js +0 -27
  134. package/dist/cjs/wm-chart.cjs.entry.js +0 -156
  135. package/dist/cjs/wm-date-range.cjs.entry.js +0 -473
  136. package/dist/cjs/wm-datepicker.cjs.entry.js +0 -254
  137. package/dist/cjs/wm-file.cjs.entry.js +0 -194
  138. package/dist/cjs/wm-line-chart.cjs.entry.js +0 -460
  139. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +0 -217
  140. package/dist/cjs/wm-modal_3.cjs.entry.js +0 -215
  141. package/dist/cjs/wm-navigation_3.cjs.entry.js +0 -188
  142. package/dist/cjs/wm-navigator.cjs.entry.js +0 -327
  143. package/dist/cjs/wm-nested-select.cjs.entry.js +0 -354
  144. package/dist/cjs/wm-option_2.cjs.entry.js +0 -439
  145. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +0 -204
  146. package/dist/cjs/wm-snackbar.cjs.entry.js +0 -177
  147. package/dist/cjs/wm-tab-item_3.cjs.entry.js +0 -258
  148. package/dist/cjs/wm-tag-input.cjs.entry.js +0 -886
  149. package/dist/cjs/wm-tag-option.cjs.entry.js +0 -43
  150. package/dist/cjs/wm-timepicker.cjs.entry.js +0 -307
  151. package/dist/cjs/wm-toggletip.cjs.entry.js +0 -183
  152. package/dist/cjs/wm-wrapper.cjs.entry.js +0 -21
  153. package/dist/collection/collection-manifest.json +0 -191
  154. package/dist/collection/components/charts/chartFunctions.js +0 -645
  155. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +0 -908
  156. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +0 -257
  157. package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +0 -125
  158. package/dist/collection/components/charts/wm-chart/wm-chart.css +0 -1274
  159. package/dist/collection/components/charts/wm-chart/wm-chart.js +0 -415
  160. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +0 -1067
  161. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +0 -722
  162. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +0 -1274
  163. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +0 -264
  164. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +0 -909
  165. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +0 -151
  166. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +0 -121
  167. package/dist/collection/components/datepickers/datepicker.css +0 -1043
  168. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +0 -1279
  169. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +0 -840
  170. package/dist/collection/components/datepickers/wm-date-range.js +0 -838
  171. package/dist/collection/components/datepickers/wm-datepicker.js +0 -524
  172. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +0 -918
  173. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +0 -817
  174. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +0 -1181
  175. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +0 -659
  176. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +0 -830
  177. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +0 -258
  178. package/dist/collection/components/selects/wm-option/wm-option.css +0 -931
  179. package/dist/collection/components/selects/wm-option/wm-option.js +0 -530
  180. package/dist/collection/components/selects/wm-select/wm-select.css +0 -1104
  181. package/dist/collection/components/selects/wm-select/wm-select.js +0 -596
  182. package/dist/collection/components/wm-action-menu/wm-action-menu.css +0 -891
  183. package/dist/collection/components/wm-action-menu/wm-action-menu.js +0 -435
  184. package/dist/collection/components/wm-button/wm-button.css +0 -1261
  185. package/dist/collection/components/wm-button/wm-button.js +0 -489
  186. package/dist/collection/components/wm-file/wm-file.css +0 -927
  187. package/dist/collection/components/wm-file/wm-file.js +0 -412
  188. package/dist/collection/components/wm-file-list/wm-file-list.css +0 -820
  189. package/dist/collection/components/wm-file-list/wm-file-list.js +0 -45
  190. package/dist/collection/components/wm-input/wm-input.css +0 -992
  191. package/dist/collection/components/wm-input/wm-input.js +0 -471
  192. package/dist/collection/components/wm-menuitem/wm-menuitem.css +0 -891
  193. package/dist/collection/components/wm-menuitem/wm-menuitem.js +0 -419
  194. package/dist/collection/components/wm-modal/wm-modal-footer.css +0 -852
  195. package/dist/collection/components/wm-modal/wm-modal-footer.js +0 -141
  196. package/dist/collection/components/wm-modal/wm-modal-header.css +0 -846
  197. package/dist/collection/components/wm-modal/wm-modal-header.js +0 -78
  198. package/dist/collection/components/wm-modal/wm-modal.css +0 -890
  199. package/dist/collection/components/wm-modal/wm-modal.js +0 -350
  200. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +0 -852
  201. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +0 -138
  202. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.css +0 -846
  203. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +0 -82
  204. package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +0 -927
  205. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +0 -362
  206. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +0 -847
  207. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +0 -119
  208. package/dist/collection/components/wm-navigation/wm-navigation-item.css +0 -856
  209. package/dist/collection/components/wm-navigation/wm-navigation-item.js +0 -98
  210. package/dist/collection/components/wm-navigation/wm-navigation.css +0 -898
  211. package/dist/collection/components/wm-navigation/wm-navigation.js +0 -190
  212. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +0 -849
  213. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +0 -86
  214. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.css +0 -830
  215. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +0 -124
  216. package/dist/collection/components/wm-navigator/wm-navigator.css +0 -903
  217. package/dist/collection/components/wm-navigator/wm-navigator.js +0 -496
  218. package/dist/collection/components/wm-pagination/wm-pagination.css +0 -971
  219. package/dist/collection/components/wm-pagination/wm-pagination.js +0 -311
  220. package/dist/collection/components/wm-search/wm-search.css +0 -895
  221. package/dist/collection/components/wm-search/wm-search.js +0 -427
  222. package/dist/collection/components/wm-snackbar/wm-snackbar.css +0 -1077
  223. package/dist/collection/components/wm-snackbar/wm-snackbar.js +0 -264
  224. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +0 -868
  225. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +0 -175
  226. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.css +0 -840
  227. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +0 -268
  228. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.css +0 -825
  229. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +0 -87
  230. package/dist/collection/components/wm-tag-input/wm-tag-input.css +0 -1275
  231. package/dist/collection/components/wm-tag-input/wm-tag-input.js +0 -1221
  232. package/dist/collection/components/wm-tag-input/wm-tag-option/wm-tag-option.js +0 -243
  233. package/dist/collection/components/wm-textarea/wm-textarea.css +0 -979
  234. package/dist/collection/components/wm-textarea/wm-textarea.js +0 -313
  235. package/dist/collection/components/wm-timepicker/wm-timepicker.css +0 -1093
  236. package/dist/collection/components/wm-timepicker/wm-timepicker.js +0 -547
  237. package/dist/collection/components/wm-toggletip/wm-toggletip.css +0 -1153
  238. package/dist/collection/components/wm-toggletip/wm-toggletip.js +0 -289
  239. package/dist/collection/components/wm-uploader/wm-uploader.css +0 -1563
  240. package/dist/collection/components/wm-uploader/wm-uploader.js +0 -603
  241. package/dist/collection/components/wm-wrapper/wm-wrapper.js +0 -28
  242. package/dist/collection/dev/button.js +0 -0
  243. package/dist/collection/dev/chart-small.js +0 -56
  244. package/dist/collection/dev/chart.js +0 -18
  245. package/dist/collection/dev/date-range.js +0 -6
  246. package/dist/collection/dev/datepicker.js +0 -46
  247. package/dist/collection/dev/file-list.js +0 -16
  248. package/dist/collection/dev/file.js +0 -0
  249. package/dist/collection/dev/input.js +0 -6
  250. package/dist/collection/dev/line-chart.js +0 -0
  251. package/dist/collection/dev/modal.js +0 -48
  252. package/dist/collection/dev/navigation.js +0 -13
  253. package/dist/collection/dev/navigator.js +0 -34
  254. package/dist/collection/dev/nested-select.js +0 -36
  255. package/dist/collection/dev/pagination.js +0 -7
  256. package/dist/collection/dev/progress-monitor.js +0 -0
  257. package/dist/collection/dev/pss-modal.js +0 -8
  258. package/dist/collection/dev/scripts.js +0 -49
  259. package/dist/collection/dev/search.js +0 -72
  260. package/dist/collection/dev/select.js +0 -57
  261. package/dist/collection/dev/snackbar.js +0 -54
  262. package/dist/collection/dev/tabs.js +0 -44
  263. package/dist/collection/dev/tag-input.js +0 -32
  264. package/dist/collection/dev/textarea.js +0 -28
  265. package/dist/collection/dev/timepicker.js +0 -32
  266. package/dist/collection/dev/toggletip.js +0 -9
  267. package/dist/collection/dev/uploader.js +0 -139
  268. package/dist/collection/global/__mocks__/functions.js +0 -6
  269. package/dist/collection/global/functions.js +0 -825
  270. package/dist/collection/global/intl.js +0 -172
  271. package/dist/collection/global/services/__mocks__/http-service.js +0 -130
  272. package/dist/collection/global/services/http-service.js +0 -50
  273. package/dist/collection/lang/lang.js +0 -5
  274. package/dist/collection/lang/missing.js +0 -43
  275. package/dist/collection/lang/piglatin.js +0 -93
  276. package/dist/esm/app-globals-f3dbaf3e.js +0 -90
  277. package/dist/esm/functions-f53b3537.js +0 -8422
  278. package/dist/esm/index-130e07bb.js +0 -1828
  279. package/dist/esm/index.js +0 -1
  280. package/dist/esm/interfaces-cc5b177f.js +0 -34
  281. package/dist/esm/loader.js +0 -11
  282. package/dist/esm/polyfills/core-js.js +0 -11
  283. package/dist/esm/polyfills/dom.js +0 -79
  284. package/dist/esm/polyfills/es5-html-element.js +0 -1
  285. package/dist/esm/polyfills/index.js +0 -34
  286. package/dist/esm/polyfills/system.js +0 -6
  287. package/dist/esm/ripple.js +0 -20
  288. package/dist/esm/wm-action-menu_2.entry.js +0 -330
  289. package/dist/esm/wm-chart-slice.entry.js +0 -23
  290. package/dist/esm/wm-modal-pss_3.entry.js +0 -211
  291. package/dist/esm/wm-modal_3.entry.js +0 -209
  292. package/dist/esm/wm-navigation_3.entry.js +0 -182
  293. package/dist/esm/wm-option_2.entry.js +0 -434
  294. package/dist/esm/wm-tab-item_3.entry.js +0 -252
  295. package/dist/esm/wm-tag-option.entry.js +0 -39
  296. package/dist/esm/wm-wrapper.entry.js +0 -17
  297. package/dist/esm-es5/app-globals-f3dbaf3e.js +0 -1
  298. package/dist/esm-es5/chartFunctions-1478f4db.js +0 -1
  299. package/dist/esm-es5/functions-f53b3537.js +0 -1
  300. package/dist/esm-es5/index-130e07bb.js +0 -1
  301. package/dist/esm-es5/index.js +0 -0
  302. package/dist/esm-es5/interfaces-cc5b177f.js +0 -1
  303. package/dist/esm-es5/intl-6426ba51.js +0 -1
  304. package/dist/esm-es5/loader.js +0 -1
  305. package/dist/esm-es5/priv-calendar.entry.js +0 -1
  306. package/dist/esm-es5/priv-navigator-button.entry.js +0 -1
  307. package/dist/esm-es5/priv-navigator-item.entry.js +0 -1
  308. package/dist/esm-es5/priv-option-list.entry.js +0 -1
  309. package/dist/esm-es5/ripple.js +0 -1
  310. package/dist/esm-es5/wm-action-menu_2.entry.js +0 -1
  311. package/dist/esm-es5/wm-button.entry.js +0 -1
  312. package/dist/esm-es5/wm-chart-slice.entry.js +0 -1
  313. package/dist/esm-es5/wm-chart.entry.js +0 -1
  314. package/dist/esm-es5/wm-date-range.entry.js +0 -1
  315. package/dist/esm-es5/wm-datepicker.entry.js +0 -1
  316. package/dist/esm-es5/wm-file-list.entry.js +0 -1
  317. package/dist/esm-es5/wm-file.entry.js +0 -1
  318. package/dist/esm-es5/wm-input.entry.js +0 -1
  319. package/dist/esm-es5/wm-line-chart.entry.js +0 -1
  320. package/dist/esm-es5/wm-modal-pss_3.entry.js +0 -1
  321. package/dist/esm-es5/wm-modal_3.entry.js +0 -1
  322. package/dist/esm-es5/wm-navigation_3.entry.js +0 -1
  323. package/dist/esm-es5/wm-navigator.entry.js +0 -1
  324. package/dist/esm-es5/wm-nested-select.entry.js +0 -1
  325. package/dist/esm-es5/wm-optgroup.entry.js +0 -1
  326. package/dist/esm-es5/wm-option_2.entry.js +0 -1
  327. package/dist/esm-es5/wm-pagination.entry.js +0 -1
  328. package/dist/esm-es5/wm-progress-indicator_3.entry.js +0 -1
  329. package/dist/esm-es5/wm-search.entry.js +0 -1
  330. package/dist/esm-es5/wm-snackbar.entry.js +0 -1
  331. package/dist/esm-es5/wm-tab-item_3.entry.js +0 -1
  332. package/dist/esm-es5/wm-tag-input.entry.js +0 -1
  333. package/dist/esm-es5/wm-tag-option.entry.js +0 -1
  334. package/dist/esm-es5/wm-textarea.entry.js +0 -1
  335. package/dist/esm-es5/wm-timepicker.entry.js +0 -1
  336. package/dist/esm-es5/wm-toggletip.entry.js +0 -1
  337. package/dist/esm-es5/wm-uploader.entry.js +0 -1
  338. package/dist/esm-es5/wm-wrapper.entry.js +0 -1
  339. package/dist/index.cjs.js +0 -1
  340. package/dist/index.js +0 -1
  341. package/dist/loader/cdn.js +0 -2
  342. package/dist/loader/index.cjs.js +0 -2
  343. package/dist/loader/index.d.ts +0 -24
  344. package/dist/loader/index.es2017.js +0 -2
  345. package/dist/loader/index.js +0 -3
  346. package/dist/loader/package.json +0 -11
  347. package/dist/ripple/index.esm.js +0 -0
  348. package/dist/ripple/p-02bd68af.system.entry.js +0 -1
  349. package/dist/ripple/p-02e60a11.system.entry.js +0 -1
  350. package/dist/ripple/p-03fafb82.entry.js +0 -1
  351. package/dist/ripple/p-043901ab.system.entry.js +0 -1
  352. package/dist/ripple/p-0d163672.system.entry.js +0 -1
  353. package/dist/ripple/p-13b1d775.entry.js +0 -1
  354. package/dist/ripple/p-1f174e18.system.entry.js +0 -1
  355. package/dist/ripple/p-20b137a3.system.entry.js +0 -1
  356. package/dist/ripple/p-226217d3.system.entry.js +0 -1
  357. package/dist/ripple/p-233f14ec.system.entry.js +0 -1
  358. package/dist/ripple/p-243a7a17.system.entry.js +0 -1
  359. package/dist/ripple/p-263e42e0.entry.js +0 -1
  360. package/dist/ripple/p-2732bddd.js +0 -1
  361. package/dist/ripple/p-27ff3a85.js +0 -1
  362. package/dist/ripple/p-28f9e202.system.entry.js +0 -1
  363. package/dist/ripple/p-2c8153c1.entry.js +0 -1
  364. package/dist/ripple/p-3376581a.system.entry.js +0 -1
  365. package/dist/ripple/p-368e9ee9.entry.js +0 -1
  366. package/dist/ripple/p-3a2a3b70.entry.js +0 -1
  367. package/dist/ripple/p-3b5d106d.entry.js +0 -1
  368. package/dist/ripple/p-42fa7a77.system.js +0 -1
  369. package/dist/ripple/p-45b5d2d2.entry.js +0 -1
  370. package/dist/ripple/p-486b3b56.system.entry.js +0 -1
  371. package/dist/ripple/p-49e24926.entry.js +0 -1
  372. package/dist/ripple/p-4fbe205e.system.entry.js +0 -1
  373. package/dist/ripple/p-50294e3f.entry.js +0 -1
  374. package/dist/ripple/p-50ea2036.system.js +0 -1
  375. package/dist/ripple/p-529f179c.system.entry.js +0 -1
  376. package/dist/ripple/p-53400bc4.system.entry.js +0 -1
  377. package/dist/ripple/p-55f8aa05.entry.js +0 -1
  378. package/dist/ripple/p-58734b13.entry.js +0 -1
  379. package/dist/ripple/p-59cc46a6.entry.js +0 -1
  380. package/dist/ripple/p-5c62e26d.entry.js +0 -1
  381. package/dist/ripple/p-6136d0d7.entry.js +0 -1
  382. package/dist/ripple/p-658f146a.system.entry.js +0 -1
  383. package/dist/ripple/p-66141f19.entry.js +0 -1
  384. package/dist/ripple/p-727175e1.system.entry.js +0 -1
  385. package/dist/ripple/p-73056e10.system.js +0 -1
  386. package/dist/ripple/p-76f9acec.entry.js +0 -1
  387. package/dist/ripple/p-791513e7.entry.js +0 -1
  388. package/dist/ripple/p-7959c4bd.system.entry.js +0 -1
  389. package/dist/ripple/p-7a1bb29b.js +0 -1
  390. package/dist/ripple/p-81ac8d49.entry.js +0 -1
  391. package/dist/ripple/p-823d7b4e.system.entry.js +0 -1
  392. package/dist/ripple/p-82819500.system.entry.js +0 -1
  393. package/dist/ripple/p-8634abad.system.entry.js +0 -1
  394. package/dist/ripple/p-864158de.system.entry.js +0 -1
  395. package/dist/ripple/p-8c95493c.js +0 -1
  396. package/dist/ripple/p-94dc80a0.entry.js +0 -1
  397. package/dist/ripple/p-94fbf6f6.system.entry.js +0 -1
  398. package/dist/ripple/p-9b739280.entry.js +0 -1
  399. package/dist/ripple/p-a0edf336.system.entry.js +0 -1
  400. package/dist/ripple/p-a2544443.system.js +0 -1
  401. package/dist/ripple/p-a280d710.entry.js +0 -1
  402. package/dist/ripple/p-a9a7731b.system.entry.js +0 -1
  403. package/dist/ripple/p-b16f07f1.system.entry.js +0 -1
  404. package/dist/ripple/p-b78d8ab1.system.js +0 -1
  405. package/dist/ripple/p-c550716e.js +0 -1
  406. package/dist/ripple/p-ccae5bec.entry.js +0 -1
  407. package/dist/ripple/p-cd0cc88d.entry.js +0 -1
  408. package/dist/ripple/p-cef8a45b.system.js +0 -2
  409. package/dist/ripple/p-d96291e7.entry.js +0 -1
  410. package/dist/ripple/p-d9da0502.js +0 -2
  411. package/dist/ripple/p-e2fbed8c.system.entry.js +0 -1
  412. package/dist/ripple/p-e6e36701.system.entry.js +0 -1
  413. package/dist/ripple/p-e8cfa832.entry.js +0 -1
  414. package/dist/ripple/p-e973024a.entry.js +0 -1
  415. package/dist/ripple/p-ed24dc42.entry.js +0 -1
  416. package/dist/ripple/p-ee825214.entry.js +0 -1
  417. package/dist/ripple/p-ef75bf23.system.entry.js +0 -1
  418. package/dist/ripple/p-f28106ea.entry.js +0 -1
  419. package/dist/ripple/p-f471ee29.system.js +0 -1
  420. package/dist/ripple/p-f66480de.entry.js +0 -1
  421. package/dist/ripple/p-f778baf4.system.entry.js +0 -1
  422. package/dist/ripple/p-f9a71cf6.entry.js +0 -1
  423. package/dist/ripple/p-fc7965e4.system.entry.js +0 -1
  424. package/dist/ripple/p-fdfa3579.system.entry.js +0 -1
  425. package/dist/ripple/p-ff60375d.system.entry.js +0 -1
  426. package/dist/ripple/p-ffbb9fc0.system.js +0 -1
  427. package/dist/ripple/ripple.css +0 -1
  428. package/dist/ripple/ripple.esm.js +0 -1
  429. package/dist/ripple/ripple.js +0 -127
  430. /package/dist/{collection/dev/action-menu.js → types/test-setup.d.ts} +0 -0
@@ -1,722 +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 = "highlighted";
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
- return `${label}, line ${lineIdx + 1} of ${this.dataPointMatrix.length} with ${numDataPoints} data points`;
175
- }
176
- focusDataPointByEl(pointEl) {
177
- this.pointEls.forEach((point) => (point.tabIndex = -1));
178
- pointEl.tabIndex = 0;
179
- pointEl.focus();
180
- }
181
- calcYIntervals() {
182
- let yIntervals = [];
183
- if (this.yRange) {
184
- yIntervals = csvToArray(this.yRange).map((val) => parseInt(val));
185
- }
186
- else {
187
- // gather all yValues
188
- let allYValues = [];
189
- const lines = Object.values(this.parsedLineData).flat();
190
- lines.forEach((line) => allYValues.push(...Object.values(line)));
191
- const filteredYValues = allYValues.filter((val) => val !== null);
192
- // get max and min yValues in data
193
- let minYValue = Math.min(...filteredYValues);
194
- const maxYValue = Math.max(...filteredYValues);
195
- // calculate neat yInterval
196
- let interval = getInterval(maxYValue - minYValue, 4);
197
- // find new min below smallest yValue that divides cleanly by interval
198
- let counter = interval;
199
- while (minYValue % interval !== 0 && counter > 0) {
200
- minYValue--;
201
- counter--;
202
- }
203
- // calculate new interval using new min
204
- interval = getInterval(maxYValue - minYValue, 4);
205
- let current = minYValue;
206
- // determine top interval, no more than one tick above max yValue
207
- while (current <= maxYValue + interval) {
208
- yIntervals.push(current);
209
- current += interval;
210
- }
211
- }
212
- return yIntervals;
213
- }
214
- determineDisplayedXIntervals() {
215
- // 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
216
- const maxTicks = this.plotAreaEl && this.plotAreaEl.clientWidth > 0
217
- ? Math.round(this.plotAreaEl.clientWidth / this.minTickWidth)
218
- : this.xIntervals.length;
219
- const { skipInterval, skippedList } = getSmallestSkipInterval(this.xIntervals, maxTicks);
220
- this.intervalSkip = skipInterval;
221
- return skippedList;
222
- }
223
- buildLineDataPointDetails(lineLabel, line) {
224
- let dataPointDetailsList = [];
225
- const lineDataPoints = Object.entries(line);
226
- let isHighlighted;
227
- lineDataPoints.forEach((entry, pointIdx) => {
228
- const [xValue, yValue] = entry;
229
- let xPositionPercent = (100 / (lineDataPoints.length - 1)) * pointIdx;
230
- const yPositionPercent = yValue === null
231
- ? null
232
- : 100 - calcPercentageInRange(yValue, this.yIntervals[this.yIntervals.length - 1], this.yIntervals[0]);
233
- // add space between first points and y-axis
234
- if (pointIdx === 0) {
235
- xPositionPercent +=
236
- this.plotAreaEl && this.plotAreaEl.clientWidth > 0 ? (8 / this.plotAreaEl.clientWidth) * 100 : 1;
237
- }
238
- if (xValue === this.highlightStart && !isHighlighted) {
239
- isHighlighted = true;
240
- }
241
- dataPointDetailsList.push({
242
- lineLabel: lineLabel,
243
- xValue: xValue,
244
- yValue: yValue,
245
- xPositionPercent: xPositionPercent,
246
- yPositionPercent: yPositionPercent,
247
- highlighted: isHighlighted,
248
- });
249
- // because highlight range is inclusive, disable after pushing details
250
- if (xValue === this.highlightEnd && isHighlighted) {
251
- isHighlighted = false;
252
- }
253
- });
254
- return dataPointDetailsList;
255
- }
256
- toggleLineVisibility(lineIdx) {
257
- if (this.hiddenLines.includes(lineIdx)) {
258
- this.hiddenLines = this.hiddenLines.filter((num) => num !== lineIdx);
259
- }
260
- else {
261
- this.hiddenLines.push(lineIdx);
262
- }
263
- forceUpdate(this.el);
264
- }
265
- resetDataPointFocus() {
266
- this.popoverIndex = -1;
267
- this.pointEls.forEach((point) => (point.tabIndex = -1));
268
- if (this.firstVisibleLineIdx !== -1) {
269
- const lineEl = this.lineEls[this.firstVisibleLineIdx];
270
- const linePointEl = lineEl.querySelectorAll(".point")[0];
271
- linePointEl.tabIndex = 0;
272
- }
273
- }
274
- calcDelta(dataPoint, prevDataPoint) {
275
- let delta;
276
- if (dataPoint.yValue === null || prevDataPoint.yValue === null) {
277
- // display "No data" when either of the datapoints is missing
278
- delta = lineChartMessages.noData;
279
- }
280
- else if (dataPoint.yValue == prevDataPoint.yValue) {
281
- // display "0%" if datapoints are equal
282
- delta = "0%";
283
- }
284
- else if (prevDataPoint.yValue == 0) {
285
- // display "-" for % increase if prev data point is 0, as the technical number would be infinity
286
- delta = "-";
287
- }
288
- else {
289
- const changePercent = ((dataPoint.yValue - prevDataPoint.yValue) / prevDataPoint.yValue) * 100;
290
- const roundedPercent = Math.round(changePercent * 100) / 100;
291
- delta = `${roundedPercent > 0 ? "+" : ""}${roundedPercent}%`;
292
- }
293
- return delta;
294
- }
295
- renderLegend() {
296
- const lineLabels = Object.keys(this.parsedLineData);
297
- return (h("div", { ref: (el) => (this.legendEl = el), class: "legend" }, lineLabels.map((lineLabel, lineIdx) => {
298
- const isHidden = this.hiddenLines.includes(lineIdx);
299
- const isFaded = this.focusedLine !== -1 && this.focusedLine !== lineIdx;
300
- 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)));
301
- })));
302
- }
303
- renderVisibilityToggle(lineLabel, lineIdx, isHidden) {
304
- return (h("wm-button", { id: `visibility-button-${lineIdx}`, class: "visibility-toggle", "label-for-identical-buttons": `${lineIdx === 0 ? `Toggle line visibility list with ${this.dataPointMatrix.length} items` : ""} ${isHidden ? globalMessages.show : globalMessages.hide} ${lineLabel} toggle ${isHidden ? "pressed" : ""}`, "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) }));
305
- }
306
- renderIcon(lineIdx) {
307
- const { color, icon } = this.lineStyles[lineIdx];
308
- return h("div", { style: { color: color }, class: `svg-icon svg-shape-${icon}` });
309
- }
310
- renderXIntervals() {
311
- const gridStyle = {
312
- "--columns": `.5fr repeat(${this.xIntervals.length - 2}, 1fr) .5fr`,
313
- };
314
- return (h("div", { class: "x-intervals", style: gridStyle }, this.xIntervals.map((interval) => (h("span", { class: `x-interval ${this.displayedXIntervals.includes(interval) ? "" : "hidden"}` }, interval)))));
315
- }
316
- renderYIntervals() {
317
- return (h("div", { ref: (el) => (this.yIntervalsEl = el), class: "y-intervals" }, this.yIntervals.map((yInterval) => (h("span", { class: "y-interval" }, abbrNumber(yInterval))))));
318
- }
319
- renderData() {
320
- return this.dataPointMatrix.map((_, lineIdx) => {
321
- let focusState = this.focusedLine === lineIdx ? "focused" : "faded";
322
- const isHidden = this.hiddenLines.includes(lineIdx);
323
- return (h("div", { class: `line ${this.focusedLine !== -1 ? focusState : ""} ${isHidden ? "hidden" : ""}` }, this.renderLines(lineIdx), this.renderPoints(lineIdx)));
324
- });
325
- }
326
- renderPoints(lineIdx) {
327
- const lineDataPoints = this.dataPointMatrix[lineIdx];
328
- return (h("div", { class: "line-icons" }, lineDataPoints.map((dataPoint, pointIdx) => {
329
- const { lineLabel, xValue, yValue, xPositionPercent, yPositionPercent, highlighted } = dataPoint;
330
- if (yValue !== null) {
331
- const { color, icon } = this.lineStyles[lineIdx];
332
- const firstPointTabIndex = lineIdx === 0 && pointIdx === 0 ? 0 : undefined;
333
- const iconStyle = {
334
- color: color,
335
- "--xPosition": xPositionPercent + "%",
336
- "--yPosition": yPositionPercent + "%",
337
- };
338
- let ariaLabel = `${lineLabel} ${highlighted ? this.highlightQualifier : ""} ${this.xAxisLabel} ${xValue + (this.parsedUnits[0] ? this.parsedUnits[0] : "")}, ${this.yAxisLabel}: ${yValue + (this.parsedUnits[1] ? this.parsedUnits[1] : "")}`;
339
- if (this.showDeltas && pointIdx > 0) {
340
- const prevDataPoint = lineDataPoints[pointIdx - 1];
341
- const changeSinceMessage = lineChartMessages.getChangeSince(prevDataPoint.xValue);
342
- ariaLabel += `, ${changeSinceMessage} ${this.calcDelta(dataPoint, prevDataPoint)}`;
343
- }
344
- 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}` })));
345
- }
346
- })));
347
- }
348
- renderLines(lineIdx) {
349
- const lineDataPoints = this.dataPointMatrix[lineIdx];
350
- return (h("svg", { class: "line-svg" }, lineDataPoints.map((dataPoint, pointIdx) => {
351
- const shouldDraw = dataPoint.yValue !== null &&
352
- pointIdx !== lineDataPoints.length - 1 &&
353
- lineDataPoints[pointIdx + 1].yValue !== null;
354
- if (shouldDraw) {
355
- const { color } = this.lineStyles[lineIdx];
356
- const { xPositionPercent: xStart, yPositionPercent: yStart } = dataPoint;
357
- const { xPositionPercent: xEnd, yPositionPercent: yEnd } = lineDataPoints[pointIdx + 1];
358
- return (h("line", { x1: xStart + "%", y1: yStart + "%", x2: xEnd + "%", y2: yEnd + "%", stroke: color, "stroke-width": "2px" }));
359
- }
360
- })));
361
- }
362
- renderHoverAreas() {
363
- const hoverAreaStyle = { "--columns": `.5fr repeat(${this.xIntervals.length - 2}, 1fr) .5fr` };
364
- return (h("div", { class: "hover-area-wrapper", style: hoverAreaStyle, onMouseLeave: () => (this.popoverIndex = -1) }, this.xIntervals.map((_, idx) => (h("div", { onMouseEnter: () => (this.popoverIndex = idx) })))));
365
- }
366
- renderPopover() {
367
- const hasPopoverData = this.popoverData &&
368
- this.popoverData[this.popoverIndex] &&
369
- this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`);
370
- if (!hasPopoverData) {
371
- return "";
372
- }
373
- const displayedPopoverData = this.popoverData[this.popoverIndex];
374
- const xPosition = displayedPopoverData[0].xPositionPercent;
375
- const yPositions = displayedPopoverData
376
- .map((point) => point.yPositionPercent)
377
- .filter((yPosition) => yPosition !== null);
378
- const averageYPosition = yPositions.reduce((acc, cur) => acc + cur, 0) / yPositions.length;
379
- const referencePointEl = this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`);
380
- const componentBoundingClientRect = this.el.getBoundingClientRect();
381
- const referencePointBoundingClientRect = referencePointEl.getBoundingClientRect();
382
- const rightSpaceAvailable = componentBoundingClientRect.right - referencePointBoundingClientRect.right;
383
- const leftSpaceAvailable = referencePointBoundingClientRect.left - componentBoundingClientRect.left;
384
- const hasRoomRight = rightSpaceAvailable >= (this.popoverEl ? Math.min(this.popoverEl.clientWidth, 400) : 400);
385
- const hasRoomLeft = leftSpaceAvailable >= (this.popoverEl ? Math.min(this.popoverEl.clientWidth, 400) : 400);
386
- const percentMargin = (8 / this.plotAreaEl.clientWidth) * 100;
387
- let popoverStyle = {
388
- "--leftPosition": hasRoomRight ? xPosition + percentMargin + "%" : "unset",
389
- "--rightPosition": hasRoomLeft ? 100 - xPosition + percentMargin + "%" : "unset",
390
- "--topPosition": averageYPosition + "%",
391
- transform: "translateY(-50%)", // vertically center for averageYPosition
392
- };
393
- if (!hasRoomLeft && !hasRoomRight) {
394
- // if there's not enough room to the left and right, position "detached" from the data points towards the top of the chart
395
- const displaceLeft = `0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth + "px"} + ${this.el.scrollLeft + "px"} + 2px`;
396
- popoverStyle = {
397
- "--leftPosition": `0%`,
398
- "--topPosition": "0%",
399
- maxWidth: Math.min(this.el.clientWidth - 2, 400) + "px", // take up no more max-width than is visually available
400
- transform: `translateX(calc(${displaceLeft}))`, // align with left edge of component
401
- };
402
- }
403
- 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()));
404
- }
405
- renderPopoverTable() {
406
- const displayedPopoverData = this.popoverData[this.popoverIndex];
407
- return (h("table", { class: "popover-table" }, displayedPopoverData.map((dataPoint, lineIdx) => {
408
- if (!this.hiddenLines.includes(lineIdx)) {
409
- const { lineLabel, yValue } = dataPoint;
410
- const prevDataPoint = this.popoverIndex > 0 ? this.popoverData[this.popoverIndex - 1][lineIdx] : null;
411
- const localizedYValue = yValue !== null ? new Intl.NumberFormat().format(yValue) : null;
412
- 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)));
413
- }
414
- })));
415
- }
416
- renderDeltas(dataPoint, prevDataPoint) {
417
- const delta = this.calcDelta(dataPoint, prevDataPoint);
418
- const deltaColor = delta.toString()[0] == "+" || delta == "-" ? "positive" : delta.toString()[0] == "-" ? "negative" : "";
419
- return prevDataPoint && h("td", { class: `delta --${deltaColor}` }, delta);
420
- }
421
- renderHoverIndicator() {
422
- const hasIndicatorData = this.dataPointMatrix.length > 0 && this.dataPointMatrix[0][this.popoverIndex];
423
- if (!hasIndicatorData) {
424
- return "";
425
- }
426
- const xPosition = this.dataPointMatrix[0][this.popoverIndex].xPositionPercent;
427
- const indicatorStyle = { "--xPosition": xPosition + "%" };
428
- return h("div", { class: "hover-indicator", style: indicatorStyle });
429
- }
430
- renderHighlight() {
431
- const startPercentage = this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent;
432
- const endPercentage = this.highlightEnd
433
- ? 100 - this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent
434
- : 0;
435
- const highlightStyle = { "--startPercentage": startPercentage + "%", "--endPercentage": endPercentage + "%" };
436
- return h("div", { class: "highlight", style: highlightStyle });
437
- }
438
- render() {
439
- return (h(Host, { key: '4ddac80582553966d0220bf23227946830071c2c', onBlur: () => this.resetDataPointFocus(), onMouseLeave: () => (this.popoverIndex = -1) }, h("div", { key: '0449968192d808926652fac96cfa2067471b0dfb', class: "component-wrapper", role: "application", "aria-roledescription": chartMessages.interactiveChart, "aria-label": this.label, "aria-describedby": "chart-description" }, this.renderLegend(), h("div", { key: '4f1b3b0a9b5979fa34a2444201cac973015c0994', class: "chart-wrapper" }, h("div", { key: '88ded396f08aff0a52558c5f07a4577db39417bf', class: "chart-label --y-axis", style: { "--labelWidth": this.labelWidth } }, this.yAxisLabel, this.parsedUnits[1] && ` (${this.parsedUnits[1]})`), this.renderYIntervals(), h("div", { key: '417b81ee9507d4513120033a82ed30eaa44f960a', ref: (el) => (this.plotAreaEl = el), class: `plot-area ${this.hasPartialInterval ? "" : "right-border"}`, style: {
440
- "--backgroundSize": `${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`,
441
- } }, this.highlightStart && this.renderHighlight(), this.renderData(), this.renderHoverAreas()), this.popoverIndex !== -1 && this.renderHoverIndicator(), this.popoverIndex !== -1 && this.renderPopover(), this.renderXIntervals(), h("div", { key: '89ba3ebc74778a9cea23786ecaffe2314e3781fa', class: "chart-label --x-axis" }, this.xAxisLabel, this.parsedUnits[0] && ` (${this.parsedUnits[0]})`)), h("div", { key: 'ef3dab4aea3e3600db34017e74903d6f5e0f6cff', id: "chart-description", class: "sr-only" }, `${lineChartMessages.instructions} ${this.description}`), h("div", { key: '8ed7658d881d03f1b22e0b3c39046c9170c870bb', ref: (el) => (this.liveRegionEl = el), "aria-live": "polite", class: "sr-only" }, this.announcement))));
442
- }
443
- static get is() { return "wm-line-chart"; }
444
- static get encapsulation() { return "shadow"; }
445
- static get originalStyleUrls() {
446
- return {
447
- "$": ["wm-line-chart.scss"]
448
- };
449
- }
450
- static get styleUrls() {
451
- return {
452
- "$": ["wm-line-chart.css"]
453
- };
454
- }
455
- static get properties() {
456
- return {
457
- "label": {
458
- "type": "string",
459
- "mutable": false,
460
- "complexType": {
461
- "original": "string",
462
- "resolved": "string",
463
- "references": {}
464
- },
465
- "required": true,
466
- "optional": false,
467
- "docs": {
468
- "tags": [],
469
- "text": ""
470
- },
471
- "attribute": "label",
472
- "reflect": false
473
- },
474
- "description": {
475
- "type": "string",
476
- "mutable": false,
477
- "complexType": {
478
- "original": "string",
479
- "resolved": "string",
480
- "references": {}
481
- },
482
- "required": false,
483
- "optional": false,
484
- "docs": {
485
- "tags": [],
486
- "text": ""
487
- },
488
- "attribute": "description",
489
- "reflect": false,
490
- "defaultValue": "\"\""
491
- },
492
- "xAxisLabel": {
493
- "type": "string",
494
- "mutable": false,
495
- "complexType": {
496
- "original": "string",
497
- "resolved": "string",
498
- "references": {}
499
- },
500
- "required": true,
501
- "optional": false,
502
- "docs": {
503
- "tags": [],
504
- "text": ""
505
- },
506
- "attribute": "x-axis-label",
507
- "reflect": false
508
- },
509
- "yAxisLabel": {
510
- "type": "string",
511
- "mutable": false,
512
- "complexType": {
513
- "original": "string",
514
- "resolved": "string",
515
- "references": {}
516
- },
517
- "required": true,
518
- "optional": false,
519
- "docs": {
520
- "tags": [],
521
- "text": ""
522
- },
523
- "attribute": "y-axis-label",
524
- "reflect": false
525
- },
526
- "lineData": {
527
- "type": "string",
528
- "mutable": false,
529
- "complexType": {
530
- "original": "string",
531
- "resolved": "string",
532
- "references": {}
533
- },
534
- "required": true,
535
- "optional": false,
536
- "docs": {
537
- "tags": [],
538
- "text": ""
539
- },
540
- "attribute": "line-data",
541
- "reflect": true
542
- },
543
- "units": {
544
- "type": "string",
545
- "mutable": false,
546
- "complexType": {
547
- "original": "string",
548
- "resolved": "string",
549
- "references": {}
550
- },
551
- "required": false,
552
- "optional": false,
553
- "docs": {
554
- "tags": [],
555
- "text": ""
556
- },
557
- "attribute": "units",
558
- "reflect": false,
559
- "defaultValue": "\"null,null\""
560
- },
561
- "labelWidth": {
562
- "type": "string",
563
- "mutable": false,
564
- "complexType": {
565
- "original": "string",
566
- "resolved": "string",
567
- "references": {}
568
- },
569
- "required": false,
570
- "optional": false,
571
- "docs": {
572
- "tags": [],
573
- "text": ""
574
- },
575
- "attribute": "label-width",
576
- "reflect": false,
577
- "defaultValue": "\"120px\""
578
- },
579
- "highlightQualifier": {
580
- "type": "string",
581
- "mutable": false,
582
- "complexType": {
583
- "original": "string",
584
- "resolved": "string",
585
- "references": {}
586
- },
587
- "required": false,
588
- "optional": false,
589
- "docs": {
590
- "tags": [],
591
- "text": ""
592
- },
593
- "attribute": "highlight-qualifier",
594
- "reflect": false,
595
- "defaultValue": "\"highlighted\""
596
- },
597
- "highlightStart": {
598
- "type": "string",
599
- "mutable": false,
600
- "complexType": {
601
- "original": "string",
602
- "resolved": "string | undefined",
603
- "references": {}
604
- },
605
- "required": false,
606
- "optional": true,
607
- "docs": {
608
- "tags": [],
609
- "text": ""
610
- },
611
- "attribute": "highlight-start",
612
- "reflect": false
613
- },
614
- "highlightEnd": {
615
- "type": "string",
616
- "mutable": false,
617
- "complexType": {
618
- "original": "string",
619
- "resolved": "string | undefined",
620
- "references": {}
621
- },
622
- "required": false,
623
- "optional": true,
624
- "docs": {
625
- "tags": [],
626
- "text": ""
627
- },
628
- "attribute": "highlight-end",
629
- "reflect": false
630
- },
631
- "visibilityToggles": {
632
- "type": "boolean",
633
- "mutable": false,
634
- "complexType": {
635
- "original": "boolean",
636
- "resolved": "boolean",
637
- "references": {}
638
- },
639
- "required": false,
640
- "optional": false,
641
- "docs": {
642
- "tags": [],
643
- "text": ""
644
- },
645
- "attribute": "visibility-toggles",
646
- "reflect": false,
647
- "defaultValue": "false"
648
- },
649
- "showDeltas": {
650
- "type": "boolean",
651
- "mutable": false,
652
- "complexType": {
653
- "original": "boolean",
654
- "resolved": "boolean",
655
- "references": {}
656
- },
657
- "required": false,
658
- "optional": false,
659
- "docs": {
660
- "tags": [],
661
- "text": ""
662
- },
663
- "attribute": "show-deltas",
664
- "reflect": false,
665
- "defaultValue": "false"
666
- },
667
- "yRange": {
668
- "type": "string",
669
- "mutable": false,
670
- "complexType": {
671
- "original": "string",
672
- "resolved": "string | undefined",
673
- "references": {}
674
- },
675
- "required": false,
676
- "optional": true,
677
- "docs": {
678
- "tags": [],
679
- "text": ""
680
- },
681
- "attribute": "y-range",
682
- "reflect": false
683
- }
684
- };
685
- }
686
- static get states() {
687
- return {
688
- "parsedLineData": {},
689
- "popoverIndex": {},
690
- "focusedLine": {},
691
- "hiddenLines": {},
692
- "isTabbing": {},
693
- "intervalSkip": {},
694
- "announcement": {}
695
- };
696
- }
697
- static get elementRef() { return "el"; }
698
- static get watchers() {
699
- return [{
700
- "propName": "lineData",
701
- "methodName": "parseData"
702
- }, {
703
- "propName": "intervalSkip",
704
- "methodName": "handleIntervalSkip"
705
- }];
706
- }
707
- static get listeners() {
708
- return [{
709
- "name": "wmUserIsTabbing",
710
- "method": "toggleTabbingOn",
711
- "target": "window",
712
- "capture": false,
713
- "passive": false
714
- }, {
715
- "name": "wmUserIsNotTabbing",
716
- "method": "toggleTabbingOff",
717
- "target": "window",
718
- "capture": false,
719
- "passive": false
720
- }];
721
- }
722
- }