@watermarkinsights/ripple 5.5.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/dist/{esm/global-861eb453.js → cjs/app-globals-4dfe82d1.js} +10 -1
  2. package/dist/cjs/{chartFunctions-ce6c7c16.js → chartFunctions-878f8139.js} +3 -3
  3. package/dist/cjs/{functions-3be85c6d.js → functions-05e7ad5a.js} +104 -7
  4. package/dist/cjs/index-788526f5.js +1851 -0
  5. package/dist/cjs/{intl-567eb9d8.js → intl-2b550151.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +4 -3
  7. package/dist/cjs/priv-calendar.cjs.entry.js +6 -5
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +6 -5
  9. package/dist/cjs/priv-navigator-button.cjs.entry.js +4 -3
  10. package/dist/cjs/priv-navigator-item.cjs.entry.js +4 -3
  11. package/dist/cjs/ripple.cjs.js +12 -11
  12. package/dist/cjs/wm-action-menu_2.cjs.entry.js +8 -6
  13. package/dist/cjs/wm-button.cjs.entry.js +5 -4
  14. package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
  15. package/dist/cjs/wm-chart.cjs.entry.js +7 -6
  16. package/dist/cjs/wm-date-range.cjs.entry.js +9 -8
  17. package/dist/cjs/wm-datepicker.cjs.entry.js +13 -14
  18. package/dist/cjs/wm-file-list.cjs.entry.js +4 -3
  19. package/dist/cjs/wm-file.cjs.entry.js +5 -4
  20. package/dist/cjs/wm-input.cjs.entry.js +6 -5
  21. package/dist/cjs/wm-line-chart.cjs.entry.js +15 -14
  22. package/dist/cjs/wm-modal-footer.cjs.entry.js +4 -3
  23. package/dist/cjs/wm-modal-header.cjs.entry.js +6 -5
  24. package/dist/cjs/wm-modal.cjs.entry.js +6 -5
  25. package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -10
  26. package/dist/cjs/wm-navigator.cjs.entry.js +4 -3
  27. package/dist/cjs/wm-option_2.cjs.entry.js +10 -8
  28. package/dist/cjs/wm-pagination.cjs.entry.js +5 -4
  29. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +9 -7
  30. package/dist/cjs/wm-search.cjs.entry.js +7 -6
  31. package/dist/cjs/wm-snackbar.cjs.entry.js +7 -6
  32. package/dist/cjs/wm-tab-item_3.cjs.entry.js +11 -8
  33. package/dist/cjs/wm-tag-input.cjs.entry.js +8 -7
  34. package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
  35. package/dist/cjs/wm-textarea.cjs.entry.js +6 -5
  36. package/dist/cjs/wm-timepicker.cjs.entry.js +6 -5
  37. package/dist/cjs/wm-toggletip.cjs.entry.js +6 -5
  38. package/dist/cjs/wm-uploader.cjs.entry.js +7 -6
  39. package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
  40. package/dist/collection/collection-manifest.json +2 -2
  41. package/dist/collection/components/charts/chartFunctions.js +1 -1
  42. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
  43. package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
  44. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
  45. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
  46. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
  47. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
  48. package/dist/collection/components/datepickers/wm-date-range.js +17 -13
  49. package/dist/collection/components/datepickers/wm-datepicker.js +21 -19
  50. package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
  51. package/dist/collection/components/wm-button/wm-button.js +1 -1
  52. package/dist/collection/components/wm-file/wm-file.js +1 -1
  53. package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
  54. package/dist/collection/components/wm-input/wm-input.js +1 -1
  55. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  56. package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
  57. package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
  58. package/dist/collection/components/wm-modal/wm-modal.js +2 -2
  59. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
  60. package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
  61. package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
  62. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
  63. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
  64. package/dist/collection/components/wm-option/wm-option.js +1 -1
  65. package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
  66. package/dist/collection/components/wm-search/wm-search.js +5 -4
  67. package/dist/collection/components/wm-select/wm-select.js +2 -2
  68. package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
  69. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
  70. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
  71. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
  72. package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
  73. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  74. package/dist/collection/components/wm-timepicker/wm-timepicker.js +11 -8
  75. package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
  76. package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
  77. package/dist/{cjs/global-ad843e7f.js → esm/app-globals-b8b36bbb.js} +7 -2
  78. package/dist/esm/{chartFunctions-0ebf83f3.js → chartFunctions-00fd6f23.js} +3 -3
  79. package/dist/esm/{functions-46843ea0.js → functions-25781571.js} +105 -8
  80. package/dist/esm/index-130e07bb.js +1820 -0
  81. package/dist/esm/{intl-8b8740b9.js → intl-df3d34d1.js} +1 -1
  82. package/dist/esm/loader.js +5 -4
  83. package/dist/esm/priv-calendar.entry.js +6 -5
  84. package/dist/esm/priv-chart-popover.entry.js +6 -5
  85. package/dist/esm/priv-navigator-button.entry.js +4 -3
  86. package/dist/esm/priv-navigator-item.entry.js +4 -3
  87. package/dist/esm/ripple.js +13 -12
  88. package/dist/esm/wm-action-menu_2.entry.js +8 -6
  89. package/dist/esm/wm-button.entry.js +5 -4
  90. package/dist/esm/wm-chart-slice.entry.js +1 -1
  91. package/dist/esm/wm-chart.entry.js +7 -6
  92. package/dist/esm/wm-date-range.entry.js +9 -8
  93. package/dist/esm/wm-datepicker.entry.js +13 -14
  94. package/dist/esm/wm-file-list.entry.js +4 -3
  95. package/dist/esm/wm-file.entry.js +5 -4
  96. package/dist/esm/wm-input.entry.js +6 -5
  97. package/dist/esm/wm-line-chart.entry.js +15 -14
  98. package/dist/esm/wm-modal-footer.entry.js +4 -3
  99. package/dist/esm/wm-modal-header.entry.js +6 -5
  100. package/dist/esm/wm-modal.entry.js +6 -5
  101. package/dist/esm/wm-navigation_3.entry.js +13 -10
  102. package/dist/esm/wm-navigator.entry.js +4 -3
  103. package/dist/esm/wm-option_2.entry.js +10 -8
  104. package/dist/esm/wm-pagination.entry.js +5 -4
  105. package/dist/esm/wm-progress-indicator_3.entry.js +9 -7
  106. package/dist/esm/wm-search.entry.js +7 -6
  107. package/dist/esm/wm-snackbar.entry.js +7 -6
  108. package/dist/esm/wm-tab-item_3.entry.js +11 -8
  109. package/dist/esm/wm-tag-input.entry.js +8 -7
  110. package/dist/esm/wm-tag-option.entry.js +2 -2
  111. package/dist/esm/wm-textarea.entry.js +6 -5
  112. package/dist/esm/wm-timepicker.entry.js +6 -5
  113. package/dist/esm/wm-toggletip.entry.js +6 -5
  114. package/dist/esm/wm-uploader.entry.js +7 -6
  115. package/dist/esm/wm-wrapper.entry.js +1 -1
  116. package/dist/esm-es5/app-globals-b8b36bbb.js +1 -0
  117. package/dist/esm-es5/{chartFunctions-0ebf83f3.js → chartFunctions-00fd6f23.js} +1 -1
  118. package/dist/esm-es5/functions-25781571.js +1 -0
  119. package/dist/esm-es5/index-130e07bb.js +1 -0
  120. package/dist/esm-es5/{intl-8b8740b9.js → intl-df3d34d1.js} +1 -1
  121. package/dist/esm-es5/loader.js +1 -1
  122. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  123. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  124. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  125. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  126. package/dist/esm-es5/ripple.js +1 -1
  127. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  128. package/dist/esm-es5/wm-button.entry.js +1 -1
  129. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  130. package/dist/esm-es5/wm-chart.entry.js +1 -1
  131. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  132. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  133. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  134. package/dist/esm-es5/wm-file.entry.js +1 -1
  135. package/dist/esm-es5/wm-input.entry.js +1 -1
  136. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  137. package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
  138. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  139. package/dist/esm-es5/wm-modal.entry.js +1 -1
  140. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  141. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  142. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  143. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  144. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  145. package/dist/esm-es5/wm-search.entry.js +1 -1
  146. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  147. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  148. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  149. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  150. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  151. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  152. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  153. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  154. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  155. package/dist/loader/cdn.js +1 -2
  156. package/dist/loader/index.cjs.js +1 -2
  157. package/dist/loader/index.d.ts +3 -0
  158. package/dist/loader/index.es2017.js +1 -2
  159. package/dist/loader/index.js +1 -2
  160. package/dist/ripple/{p-99dd083d.system.js → p-03708b88.system.js} +1 -1
  161. package/dist/ripple/{p-45abd8fe.entry.js → p-041e579b.entry.js} +1 -1
  162. package/dist/ripple/{p-65d26233.system.entry.js → p-043901ab.system.entry.js} +1 -1
  163. package/dist/ripple/p-0af94825.entry.js +1 -0
  164. package/dist/ripple/p-0ff41567.system.entry.js +1 -0
  165. package/dist/ripple/p-1044e1dc.system.js +1 -0
  166. package/dist/ripple/{p-48e09589.entry.js → p-13b1d775.entry.js} +1 -1
  167. package/dist/ripple/p-13fc2164.entry.js +1 -0
  168. package/dist/ripple/p-155224a2.system.entry.js +1 -0
  169. package/dist/ripple/p-17bb1157.system.entry.js +1 -0
  170. package/dist/ripple/p-1f09134c.entry.js +1 -0
  171. package/dist/ripple/{p-204bdd73.entry.js → p-298bde1b.entry.js} +1 -1
  172. package/dist/ripple/p-298c2675.entry.js +1 -0
  173. package/dist/ripple/p-2d619f83.entry.js +1 -0
  174. package/dist/ripple/p-2ef49c84.entry.js +1 -0
  175. package/dist/ripple/p-2fd12dd9.entry.js +1 -0
  176. package/dist/ripple/p-3423a9b6.system.entry.js +1 -0
  177. package/dist/ripple/p-376efca9.entry.js +1 -0
  178. package/dist/ripple/p-38ccde69.system.js +1 -0
  179. package/dist/ripple/{p-e3241417.system.entry.js → p-3b4045f8.system.entry.js} +1 -1
  180. package/dist/ripple/p-3b5f4364.system.entry.js +1 -0
  181. package/dist/ripple/p-417c8e46.system.entry.js +1 -0
  182. package/dist/ripple/p-418ed08c.system.entry.js +1 -0
  183. package/dist/ripple/{p-28b70082.system.entry.js → p-41eb6a2e.system.entry.js} +1 -1
  184. package/dist/ripple/p-4670ccb4.system.js +1 -0
  185. package/dist/ripple/p-4baaf026.entry.js +1 -0
  186. package/dist/ripple/p-4ea1e503.entry.js +1 -0
  187. package/dist/ripple/p-5051034b.entry.js +1 -0
  188. package/dist/ripple/p-56766bb2.entry.js +1 -0
  189. package/dist/ripple/p-5caaf651.system.entry.js +1 -0
  190. package/dist/ripple/p-5ece78e5.system.entry.js +1 -0
  191. package/dist/ripple/{p-42d1c301.entry.js → p-672ae2cb.entry.js} +1 -1
  192. package/dist/ripple/{p-3a44e1c8.entry.js → p-67a7f0b0.entry.js} +1 -1
  193. package/dist/ripple/p-6d0e5159.system.entry.js +1 -0
  194. package/dist/ripple/p-6d56676e.system.entry.js +1 -0
  195. package/dist/ripple/{p-7326b62a.entry.js → p-6e60631a.entry.js} +1 -1
  196. package/dist/ripple/{p-b7ead395.system.entry.js → p-6fe35d1e.system.entry.js} +1 -1
  197. package/dist/ripple/p-748f8a97.system.entry.js +1 -0
  198. package/dist/ripple/p-7eab6bea.system.entry.js +1 -0
  199. package/dist/ripple/p-7fb95b89.entry.js +1 -0
  200. package/dist/ripple/{p-32bf3f5b.system.entry.js → p-823d7b4e.system.entry.js} +1 -1
  201. package/dist/ripple/p-830f8b3f.entry.js +1 -0
  202. package/dist/ripple/p-86fd68b3.system.entry.js +1 -0
  203. package/dist/ripple/p-88cfd58d.js +1 -0
  204. package/dist/ripple/p-89b27fbb.js +1 -0
  205. package/dist/ripple/p-8b56f9d8.system.entry.js +1 -0
  206. package/dist/ripple/{p-8159cdf5.entry.js → p-8e72de50.entry.js} +1 -1
  207. package/dist/ripple/{p-510679f8.system.entry.js → p-a1a2f8c9.system.entry.js} +1 -1
  208. package/dist/ripple/p-a62e7532.entry.js +1 -0
  209. package/dist/ripple/{p-f92bd0c1.js → p-a88bf1c5.js} +1 -1
  210. package/dist/ripple/{p-1ac66a15.system.js → p-a9d89ac8.system.js} +1 -1
  211. package/dist/ripple/{p-a152cf3a.system.entry.js → p-aab56a37.system.entry.js} +1 -1
  212. package/dist/ripple/{p-79106e23.system.entry.js → p-ac40417b.system.entry.js} +1 -1
  213. package/dist/ripple/{p-ffb31979.system.entry.js → p-b0c566b5.system.entry.js} +1 -1
  214. package/dist/ripple/p-b41ef3db.entry.js +1 -0
  215. package/dist/ripple/p-b7307be6.system.entry.js +1 -0
  216. package/dist/ripple/p-b80d9402.system.entry.js +1 -0
  217. package/dist/ripple/p-b8168f35.system.entry.js +1 -0
  218. package/dist/ripple/{p-dbc112a6.entry.js → p-bcff8b3a.entry.js} +1 -1
  219. package/dist/ripple/p-c2181de0.entry.js +1 -0
  220. package/dist/ripple/{p-88ebddd7.entry.js → p-cd0cc88d.entry.js} +1 -1
  221. package/dist/ripple/p-cef8a45b.system.js +2 -0
  222. package/dist/ripple/p-d5ba9de1.system.entry.js +1 -0
  223. package/dist/ripple/{p-df1a11f1.system.entry.js → p-d93c51dd.system.entry.js} +1 -1
  224. package/dist/ripple/p-d9da0502.js +2 -0
  225. package/dist/ripple/p-e2fe86a7.system.entry.js +1 -0
  226. package/dist/ripple/p-e85b1f40.entry.js +1 -0
  227. package/dist/ripple/p-ea0dfadf.system.entry.js +1 -0
  228. package/dist/ripple/p-eb14b354.entry.js +1 -0
  229. package/dist/ripple/p-ecb6c756.entry.js +1 -0
  230. package/dist/ripple/p-f09e2c22.entry.js +1 -0
  231. package/dist/ripple/p-f17fd62b.entry.js +1 -0
  232. package/dist/ripple/{p-d79fdf0b.js → p-f54e9ed0.js} +1 -1
  233. package/dist/ripple/p-fabe4ca4.entry.js +1 -0
  234. package/dist/ripple/{p-5d0e2006.system.entry.js → p-fc529ba1.system.entry.js} +1 -1
  235. package/dist/ripple/ripple.esm.js +1 -1
  236. package/dist/ripple/ripple.js +1 -1
  237. package/dist/types/stencil-public-runtime.d.ts +3 -10
  238. package/package.json +2 -2
  239. package/dist/cjs/index-e86c28b6.js +0 -2641
  240. package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
  241. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
  242. package/dist/collection/components/charts/screenshots.e2e.js +0 -96
  243. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
  244. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
  245. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
  246. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
  247. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
  248. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
  249. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +0 -89
  250. package/dist/collection/components/datepickers/wm-date-range.e2e.js +0 -443
  251. package/dist/collection/components/datepickers/wm-date-range.spec.js +0 -22
  252. package/dist/collection/components/datepickers/wm-datepicker.e2e.js +0 -382
  253. package/dist/collection/components/datepickers/wm-datepicker.spec.js +0 -21
  254. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
  255. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
  256. package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
  257. package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
  258. package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
  259. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
  260. package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
  261. package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
  262. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
  263. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
  264. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
  265. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
  266. package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
  267. package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
  268. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
  269. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
  270. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
  271. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
  272. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
  273. package/dist/collection/components/wm-option/wm-option.e2e.js +0 -22
  274. package/dist/collection/components/wm-option/wm-option.spec.js +0 -63
  275. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
  276. package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
  277. package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
  278. package/dist/collection/components/wm-select/wm-select.e2e.js +0 -521
  279. package/dist/collection/components/wm-select/wm-select.spec.js +0 -271
  280. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
  281. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
  282. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
  283. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
  284. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
  285. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
  286. package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
  287. package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
  288. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
  289. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
  290. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
  291. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
  292. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
  293. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
  294. package/dist/collection/global/functions.spec.js +0 -126
  295. package/dist/collection/lang/lang.spec.js +0 -20
  296. package/dist/esm/index-558b5a82.js +0 -2610
  297. package/dist/esm-es5/functions-46843ea0.js +0 -1
  298. package/dist/esm-es5/global-861eb453.js +0 -1
  299. package/dist/esm-es5/index-558b5a82.js +0 -1
  300. package/dist/ripple/p-011477e2.entry.js +0 -1
  301. package/dist/ripple/p-021ff5fa.system.entry.js +0 -1
  302. package/dist/ripple/p-057ec1e4.js +0 -1
  303. package/dist/ripple/p-09a31f0c.entry.js +0 -1
  304. package/dist/ripple/p-0ea8609b.system.entry.js +0 -1
  305. package/dist/ripple/p-240124b0.system.entry.js +0 -1
  306. package/dist/ripple/p-26fbc7f5.system.entry.js +0 -1
  307. package/dist/ripple/p-294b38ca.system.entry.js +0 -1
  308. package/dist/ripple/p-2b05bf05.entry.js +0 -1
  309. package/dist/ripple/p-311923b2.system.entry.js +0 -1
  310. package/dist/ripple/p-31976813.entry.js +0 -1
  311. package/dist/ripple/p-33679b9d.entry.js +0 -1
  312. package/dist/ripple/p-34b5830f.system.js +0 -1
  313. package/dist/ripple/p-3568472c.entry.js +0 -1
  314. package/dist/ripple/p-3b8b1b44.system.entry.js +0 -1
  315. package/dist/ripple/p-4a6854d3.system.entry.js +0 -1
  316. package/dist/ripple/p-4c8db09c.system.entry.js +0 -1
  317. package/dist/ripple/p-4d0b1890.entry.js +0 -1
  318. package/dist/ripple/p-568c595f.js +0 -2
  319. package/dist/ripple/p-62a8f09c.entry.js +0 -1
  320. package/dist/ripple/p-6885d780.system.js +0 -1
  321. package/dist/ripple/p-7e6f5a1e.system.entry.js +0 -1
  322. package/dist/ripple/p-822618d7.entry.js +0 -1
  323. package/dist/ripple/p-825bd63b.entry.js +0 -1
  324. package/dist/ripple/p-884294c6.entry.js +0 -1
  325. package/dist/ripple/p-8fbddb6c.system.entry.js +0 -1
  326. package/dist/ripple/p-902a54c5.entry.js +0 -1
  327. package/dist/ripple/p-905dd4da.system.entry.js +0 -1
  328. package/dist/ripple/p-99c24568.system.entry.js +0 -1
  329. package/dist/ripple/p-a03f7141.entry.js +0 -1
  330. package/dist/ripple/p-a27d2177.entry.js +0 -1
  331. package/dist/ripple/p-a8524a48.entry.js +0 -1
  332. package/dist/ripple/p-ab8d78cc.system.js +0 -2
  333. package/dist/ripple/p-ade3d9a9.entry.js +0 -1
  334. package/dist/ripple/p-b2dac998.system.entry.js +0 -1
  335. package/dist/ripple/p-bc5e9d24.entry.js +0 -1
  336. package/dist/ripple/p-bd6b8cf2.system.js +0 -1
  337. package/dist/ripple/p-bf636261.entry.js +0 -1
  338. package/dist/ripple/p-c47811a2.entry.js +0 -1
  339. package/dist/ripple/p-c4b9d46d.entry.js +0 -1
  340. package/dist/ripple/p-c885c7f9.entry.js +0 -1
  341. package/dist/ripple/p-c9543950.system.entry.js +0 -1
  342. package/dist/ripple/p-cacfbaf1.system.entry.js +0 -1
  343. package/dist/ripple/p-d24882a7.system.entry.js +0 -1
  344. package/dist/ripple/p-d33d6e96.system.entry.js +0 -1
  345. package/dist/ripple/p-df2560f3.system.entry.js +0 -1
  346. package/dist/ripple/p-e3bcdde8.system.entry.js +0 -1
  347. package/dist/ripple/p-e83a98d3.entry.js +0 -1
  348. package/dist/ripple/p-e995f7f0.js +0 -1
  349. package/dist/ripple/p-eaac6bcd.entry.js +0 -1
  350. package/dist/ripple/p-fd0aae67.system.entry.js +0 -1
@@ -1,382 +0,0 @@
1
- import { newE2EPage } from "@stencil/core/testing";
2
- import { AxePuppeteer } from "@axe-core/puppeteer";
3
- describe("wm-datepicker", () => {
4
- let page, component, input, btn, popup, popupTitleDay;
5
- beforeEach(async () => {
6
- page = await newE2EPage();
7
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
8
- <wm-datepicker id="dp" label="label"></wm-datepicker>
9
- </main></body></html>`);
10
- component = await page.find("wm-datepicker");
11
- input = await page.find("wm-datepicker >>> input");
12
- btn = await page.find("wm-datepicker >>> #toggle");
13
- popup = await page.find("wm-datepicker >>> #popup");
14
- popupTitleDay = await page.find("wm-datepicker >>> #popup-title-month");
15
- // await page.keyboard.press("Tab");
16
- // await page.waitForChanges();
17
- });
18
- it("passes Axe checks", async () => {
19
- const results = await new AxePuppeteer(page).analyze();
20
- expect(results.violations.length).toBe(0);
21
- });
22
- // TODO
23
- // see https://dequeuniversity.com/checklists/web/form-validation-feedback
24
- // for Dynamic Error Detection / Error messages
25
- // see also role="alert"
26
- /* INPUT */
27
- // See datepicker-input.e2e.ts
28
- /* BUTTON */
29
- // Opening and closing the date picker
30
- it("opens at today's date by default", async () => {
31
- const popup = await page.find("wm-datepicker >>> .popup");
32
- const today = new Date();
33
- const year = today.getUTCFullYear();
34
- const month = (today.getUTCMonth() + 1).toString().padStart(2, "0");
35
- const day = today.getUTCDate().toString();
36
- const dateTable = await popup.find("[role='grid']");
37
- // await page.waitForChanges();
38
- const selDate = await dateTable.find("[aria-selected='true']");
39
- expect(selDate).toEqualAttribute("data-year", year);
40
- expect(selDate).toEqualAttribute("data-month", month);
41
- expect(selDate.textContent).toBe(day);
42
- });
43
- it("opens at the date in the input if there is one", async () => {
44
- const input = await page.find("wm-datepicker >>> input");
45
- const popup = await page.find("wm-datepicker >>> .popup");
46
- await input.type("02/01/2030");
47
- await component.setProperty("calendarDate", "2030-02-01");
48
- await page.waitForChanges();
49
- await page.keyboard.press("Tab");
50
- await page.keyboard.press("Enter");
51
- await page.waitForChanges();
52
- const dateTable = await popup.find("[role='grid']");
53
- const selDate = await dateTable.find("[aria-selected='true']");
54
- expect(selDate).toEqualAttribute("data-year", "2030");
55
- expect(selDate).toEqualAttribute("data-month", "02");
56
- expect(selDate.textContent).toBe("1");
57
- });
58
- it("Closes the popup when user triggers the calendar button", async () => {
59
- const popup = await page.find("wm-datepicker >>> .popup");
60
- await page.keyboard.press("Tab"); // in input
61
- await page.keyboard.press("Tab"); // on btn
62
- await page.keyboard.press("Enter");
63
- await page.waitForChanges();
64
- expect(popup).toHaveClass("open");
65
- await page.keyboard.press("Escape");
66
- await page.waitForChanges();
67
- expect(popup).not.toHaveClass("open");
68
- });
69
- /* POPUP */
70
- it("closes the calendar popup when the user presses ESCAPE", async () => {
71
- await input.type("02/03/2019");
72
- await component.setProperty("calendarDate", "2019-02-03");
73
- await page.waitForChanges();
74
- await page.keyboard.press("Tab");
75
- await page.keyboard.press("Enter");
76
- await page.waitForChanges();
77
- await page.keyboard.press("Escape");
78
- await page.waitForChanges();
79
- expect(popup).not.toHaveClass("open");
80
- });
81
- it("shows the next month on PAGE DOWN and shows the previous month on PAGE UP", async () => {
82
- await input.type("02/03/2019");
83
- await component.setProperty("calendarDate", "2019-02-03");
84
- await page.waitForChanges();
85
- await page.keyboard.press("Tab");
86
- await page.keyboard.press("Enter");
87
- await page.waitForChanges();
88
- await page.keyboard.press("PageDown");
89
- await page.waitForChanges();
90
- expect(popupTitleDay.textContent).toBe("March 2019");
91
- let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
92
- expect(activeElId).toEqual("cell-20190303");
93
- await page.keyboard.press("PageUp");
94
- await page.waitForChanges();
95
- await page.keyboard.press("PageUp");
96
- await page.waitForChanges();
97
- await page.keyboard.press("PageUp");
98
- await page.waitForChanges();
99
- activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
100
- expect(activeElId).toEqual("cell-20181203");
101
- });
102
- it("handles HOME and END keys", async () => {
103
- await input.type("02/15/2020");
104
- await component.setProperty("calendarDate", "2020-02-15");
105
- await page.waitForChanges();
106
- await page.keyboard.press("Tab");
107
- await page.keyboard.press("Enter");
108
- await page.waitForChanges();
109
- await page.keyboard.press("Home");
110
- await page.waitForChanges();
111
- const firstDayOfMonth = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
112
- expect(firstDayOfMonth).toEqual("cell-20200201");
113
- await page.keyboard.press("End");
114
- await page.waitForChanges();
115
- const lastDayOfMonth = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
116
- expect(lastDayOfMonth).toEqual("cell-20200229"); // 2020 is a leap year
117
- });
118
- it("navigates the calendar with keyboard (day view)", async () => {
119
- // left/right: -1 / +1 in the row
120
- // up/down
121
- await input.type("08/15/2024");
122
- await component.setProperty("calendarDate", "2024-08-15");
123
- await page.keyboard.press("Tab"); // on the toggle popup btn
124
- await page.waitForChanges();
125
- await page.keyboard.press("Enter"); // open popup
126
- await page.waitForChanges();
127
- await page.keyboard.press("ArrowLeft");
128
- await page.waitForChanges();
129
- let focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
130
- await page.waitForChanges();
131
- expect(focusedCell).toEqualAttribute("id", "cell-20240814");
132
- await page.keyboard.press("ArrowUp");
133
- await page.waitForChanges();
134
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
135
- expect(focusedCell).toEqualAttribute("id", "cell-20240807");
136
- await page.keyboard.press("ArrowRight");
137
- await page.waitForChanges();
138
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
139
- expect(focusedCell).toEqualAttribute("id", "cell-20240808");
140
- await page.keyboard.press("ArrowDown");
141
- await page.waitForChanges();
142
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
143
- expect(focusedCell).toEqualAttribute("id", "cell-20240815");
144
- });
145
- it("navigates the calendar with keyboard (month view)", async () => {
146
- await input.type("08/15/2024");
147
- await component.setProperty("calendarDate", "2024-08-15");
148
- await page.keyboard.press("Tab"); // on the toggle popup btn
149
- await page.waitForChanges();
150
- await page.keyboard.press("Enter"); // open popup
151
- await page.keyboard.down("Shift");
152
- await page.waitForChanges();
153
- await page.keyboard.press("Tab"); // next btn
154
- await page.waitForChanges();
155
- await page.keyboard.press("Tab"); // popup-title (month + year)
156
- await page.waitForChanges();
157
- await page.keyboard.press("Enter");
158
- await page.waitForChanges();
159
- await page.keyboard.up("Shift");
160
- await page.waitForChanges();
161
- await page.keyboard.press("ArrowLeft");
162
- await page.waitForChanges();
163
- let focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
164
- await page.waitForChanges();
165
- expect(focusedCell).toEqualAttribute("id", "month-6"); // month is july (7), 0-indexed
166
- await page.keyboard.press("ArrowUp");
167
- await page.waitForChanges();
168
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
169
- expect(focusedCell).toEqualAttribute("id", "month-3");
170
- await page.keyboard.press("ArrowRight");
171
- await page.waitForChanges();
172
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
173
- expect(focusedCell).toEqualAttribute("id", "month-4");
174
- await page.keyboard.press("ArrowDown");
175
- await page.waitForChanges();
176
- focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
177
- expect(focusedCell).toEqualAttribute("id", "month-7");
178
- });
179
- // it("goes to the year view when the month name is clicked", async () => {
180
- // // (i.e. allows selection of a month)
181
- // });
182
- it("goes to the previous/next month when the arrow button is triggered in day view", async () => {
183
- await input.type("11/29/1999");
184
- await component.setProperty("calendarDate", "1999-11-29");
185
- await page.keyboard.press("Tab"); // on the toggle popup btn
186
- await page.waitForChanges();
187
- await page.keyboard.press("Enter"); // open popup
188
- await page.waitForChanges();
189
- await page.keyboard.down("Shift");
190
- await page.waitForChanges();
191
- await page.keyboard.press("Tab"); // next btn
192
- await page.waitForChanges();
193
- await page.keyboard.press("Tab"); // popup-title (month + year)
194
- await page.waitForChanges();
195
- await page.keyboard.press("Tab"); // prev btn
196
- await page.waitForChanges();
197
- await page.keyboard.up("Shift");
198
- await page.waitForChanges();
199
- await page.keyboard.press("Enter"); // press prev btn
200
- await page.waitForChanges();
201
- expect(popup).toHaveClasses(["open", "day-view"]);
202
- expect(popupTitleDay.textContent).toBe("October 1999");
203
- await page.keyboard.press("Tab"); // popup title btn
204
- await page.keyboard.press("Tab"); // next btn
205
- await page.keyboard.press("Enter"); // press next btn
206
- await page.waitForChanges();
207
- await page.keyboard.press("Enter"); // press next btn
208
- await page.waitForChanges();
209
- expect(popupTitleDay.textContent).toBe("December 1999");
210
- });
211
- it("goes to the previous/next year when the arrow button is clicked in month view", async () => {
212
- await input.type("11/29/1999");
213
- await component.setProperty("calendarDate", "1999-11-29");
214
- await page.waitForChanges();
215
- await page.keyboard.press("Tab"); // on the toggle popup btn
216
- await page.waitForChanges();
217
- await page.keyboard.press("Enter"); // open popup
218
- await page.waitForChanges();
219
- await page.keyboard.down("Shift");
220
- await page.keyboard.press("Tab"); // next btn
221
- await page.waitForChanges();
222
- await page.keyboard.press("Tab"); // month view btn
223
- await page.waitForChanges();
224
- await page.keyboard.up("Shift");
225
- await page.waitForChanges();
226
- await page.keyboard.press("Enter"); // press month view btn
227
- await page.waitForChanges();
228
- expect(popup).toHaveClasses(["open", "month-view"]);
229
- const title = await popup.find("#popup-title-year");
230
- expect(title.textContent).toBe("1999");
231
- await page.keyboard.down("Shift");
232
- await page.keyboard.press("Tab"); // next btn
233
- await page.keyboard.up("Shift");
234
- await page.keyboard.press("Enter"); // press next btn
235
- await page.waitForChanges();
236
- expect(title.textContent).toBe("2000");
237
- await page.keyboard.down("Shift");
238
- await page.keyboard.press("Tab"); // year btn
239
- await page.keyboard.down("Shift");
240
- await page.keyboard.press("Tab"); // prev btn
241
- await page.keyboard.up("Shift");
242
- await page.keyboard.press("Enter"); // press prev btn
243
- await page.waitForChanges();
244
- expect(title.textContent).toBe("1999");
245
- await page.keyboard.press("Enter"); // press prev btn
246
- await page.waitForChanges();
247
- await page.keyboard.press("Enter"); // press prev btn
248
- await page.waitForChanges();
249
- expect(title.textContent).toBe("1997");
250
- });
251
- it("has the aria attributes related to the popup", async () => {
252
- // NB "If the element with the aria-expanded attribute controls the expansion of another grouping container
253
- // that is not 'owned by' the element, the author SHOULD reference the container by using the aria-controls attribute."
254
- // src: https://www.w3.org/TR/wai-aria-1.1/#aria-expanded
255
- expect(btn).toHaveAttribute("aria-expanded");
256
- // Not sure is aria-haspopup is necessary. If it is present the popup should have a role
257
- // if that role is grid (the only role that seems to correspond) then the cells must have
258
- // a role of gridcell
259
- // https://www.w3.org/TR/wai-aria/#aria-haspopup
260
- // expect(btn).toHaveAttribute("aria-haspopup");
261
- //Removed aria-controls since the popup comes immediately after the aria-expanded controller:
262
- //https://www.heydonworks.com/article/aria-controls-is-poop
263
- });
264
- it("toggles aria-expanded attribute", async () => {
265
- expect(btn).toEqualAttribute("aria-expanded", "false");
266
- await page.keyboard.press("Tab");
267
- await page.keyboard.press("Tab");
268
- await page.keyboard.press("Enter");
269
- await page.waitForChanges();
270
- expect(btn).toEqualAttribute("aria-expanded", "true");
271
- });
272
- it("properly fills the-label on table cells", async () => {
273
- // screen reader should read "Thursday, May 10 2018" on focus
274
- // screen reader should read "Thursday, May 10 2018, selected" on select
275
- await input.type("05/10/2018");
276
- await component.setProperty("calendarDate", "2018-05-10");
277
- await page.waitForChanges();
278
- await page.keyboard.press("Tab");
279
- await page.waitForChanges();
280
- await page.keyboard.press("Enter");
281
- await page.waitForChanges();
282
- const focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
283
- await page.waitForChanges();
284
- // day of the week is read by sr bcse it's the table column
285
- expect(focusedCell).toEqualAttribute("aria-label", "Thursday, May 10, 2018");
286
- // screen reader should read "Thursday, May 10 2018, selected" on select
287
- await page.keyboard.press("Enter");
288
- await page.waitForChanges();
289
- const selCell = await popup.find("[aria-selected='true']");
290
- // day of the week is read by sr bcse it's the table column
291
- expect(selCell).toEqualAttribute("aria-label", "Thursday, May 10, 2018");
292
- });
293
- it("aligns dates properly", async () => {
294
- // -> check that both 01/01/1999 and 12/31/2100 are in the Friday column
295
- // couldn't figure this one out...
296
- });
297
- it("emits event on input blur", async () => {
298
- page = await newE2EPage();
299
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
300
- <wm-datepicker id="dp" label="label"></wm-datepicker>
301
- <div id="indicator">no event heard</div>
302
- </main></body></html>`);
303
- component = await page.find("wm-datepicker");
304
- input = await page.find("wm-datepicker >>> input");
305
- await page.waitForChanges();
306
- await page.evaluate(async () => {
307
- const indicator = document.querySelector("#indicator");
308
- await document.addEventListener("wmDatepickerInputBlurred", () => (indicator.textContent = "event heard"));
309
- });
310
- await page.waitForChanges;
311
- const indicator = await page.find("#indicator");
312
- expect(indicator.textContent).toBe("no event heard");
313
- await input.type("05/10/2018");
314
- await page.keyboard.press("Tab");
315
- await page.waitForChanges();
316
- expect(indicator.textContent).toBe("event heard");
317
- });
318
- it("emits event on change", async () => {
319
- page = await newE2EPage();
320
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
321
- <wm-datepicker id="dp" label="label"></wm-datepicker>
322
- <div id="indicator">events heard: 0</div>
323
- </main></body></html>`);
324
- component = await page.find("wm-datepicker");
325
- input = await page.find("wm-datepicker >>> input");
326
- await page.waitForChanges();
327
- await page.evaluate(async () => {
328
- const indicator = document.querySelector("#indicator");
329
- await document
330
- .querySelector("wm-datepicker")
331
- .addEventListener("change", () => (indicator.textContent =
332
- indicator.textContent.slice(0, -1) + (parseInt(indicator.textContent.slice(-1)) + 1)));
333
- });
334
- await page.waitForChanges;
335
- const indicator = await page.find("#indicator");
336
- expect(indicator.textContent).toBe("events heard: 0");
337
- // user types date
338
- await input.type("05/10/2018");
339
- await page.keyboard.press("Tab");
340
- await page.waitForChanges();
341
- expect(indicator.textContent).toBe("events heard: 1");
342
- // user selects date from calendar
343
- await page.keyboard.press("Enter");
344
- await page.waitForChanges();
345
- await page.keyboard.press("ArrowRight");
346
- await page.keyboard.press("Enter");
347
- await page.waitForChanges();
348
- expect(indicator.textContent).toBe("events heard: 2");
349
- });
350
- it("emits event with date on cell selection", async () => {
351
- page = await newE2EPage();
352
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
353
- <wm-datepicker id="dp" value="12/30/1999" label="label"></wm-datepicker>
354
- <div id="indicator"></div>
355
- </main></body></html>`);
356
- component = await page.find("wm-datepicker");
357
- input = await page.find("wm-datepicker >>> input");
358
- await page.waitForChanges();
359
- await page.evaluate(async () => {
360
- const indicator = document.querySelector("#indicator");
361
- await document.querySelector("wm-datepicker").addEventListener("wmDatepickerDateSelected", (ev) => (indicator.textContent =
362
- //@ts-ignore
363
- `date received: ${ev.detail.date}`));
364
- });
365
- await page.waitForChanges;
366
- const indicator = await page.find("#indicator");
367
- // user types date
368
- await page.keyboard.press("Tab");
369
- await page.keyboard.press("Tab");
370
- await page.waitForChanges();
371
- await page.keyboard.press("Enter");
372
- await page.waitForChanges();
373
- await page.keyboard.press("Enter");
374
- await page.waitForChanges();
375
- expect(indicator.textContent).toBe("date received: 1999-12-30");
376
- });
377
- });
378
- // Sources:
379
- // https://watermarkinsights.atlassian.net/browse/DNP-3411
380
- // https://watermarkinsights.atlassian.net/browse/DNP-4318
381
- // https://axesslab.com/accessible-datepickers/
382
- // https://www.w3.org/WAI/PF/HTML/wiki/Datepickers
@@ -1,21 +0,0 @@
1
- import { newSpecPage } from "@stencil/core/testing";
2
- import * as globalFunctions from "../../global/functions";
3
- jest.spyOn(globalFunctions, "generateId").mockReturnValue("random-id");
4
- import { DatePicker } from "./wm-datepicker";
5
- describe("wm-datepicker", () => {
6
- it("builds", async () => {
7
- const comp = await newSpecPage({
8
- components: [DatePicker],
9
- html: '<wm-datepicker label="mock label"></wm-datepicker>',
10
- });
11
- expect(comp.root).toMatchSnapshot();
12
- });
13
- it("sets input to required", async () => {
14
- const page = await newSpecPage({
15
- components: [DatePicker],
16
- html: `<wm-datepicker label='datepicker' required-field='true'></wm-datepicker>`,
17
- });
18
- const input = await page.root.shadowRoot.querySelector("input");
19
- expect(input).toEqualAttribute("aria-required", "true");
20
- });
21
- });
@@ -1,200 +0,0 @@
1
- import { newE2EPage } from "@stencil/core/testing";
2
- import { AxePuppeteer } from "@axe-core/puppeteer";
3
- describe("wm-action-menu", () => {
4
- let page;
5
- beforeEach(async () => {
6
- page = await newE2EPage();
7
- await page.setContent("<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1><wm-action-menu id='test' tooltip='menu name'><wm-menuitem id='first' onClick='action()'>First action</wm-menuitem><wm-menuitem id='second'>Second action</wm-menuitem><wm-menuitem id='third'>Third action</wm-menuitem></wm-action-menu><script>function action() {document.getElementById('first').innerHTML = 'Changed text'}</script></main></body></html>");
8
- });
9
- it("passes Axe checks", async () => {
10
- const results = await new AxePuppeteer(page).analyze();
11
- expect(results.violations.length).toBe(0);
12
- });
13
- //ATTRIBUTES;
14
- it("has the right WAI_ARIA roles, states and properties", async () => {
15
- const wmbtn = await page.find("wm-action-menu >>> wm-button");
16
- const menu = await page.find("wm-action-menu >>> #menu-test");
17
- const second = await page.find("#second");
18
- const third = await page.find("#third");
19
- await page.waitForChanges();
20
- // check aria-expanded attribute
21
- expect(wmbtn).toEqualAttribute("aria-expanded", "false");
22
- // If the element with the aria-expanded attribute controls the expansion of another grouping container that is not 'owned by' the element, the author SHOULD reference the container by using the aria-controls attribute.
23
- // src: https://www.w3.org/WAI/PF/aria/states_and_properties#aria-expanded
24
- expect(wmbtn).toEqualAttribute("aria-controls", "menu-test");
25
- // An element that contains or owns all the menu items has role menu.
26
- expect(menu).toEqualAttribute("role", "menu");
27
- expect(menu).toEqualAttribute("tabindex", "-1");
28
- // Each menuitem in the menu has role menuitem.
29
- expect(second).toEqualAttribute("role", "menuitem"); // just checking one randomly
30
- expect(third).toEqualAttribute("tabindex", "-1");
31
- });
32
- // Down Arrow: Moves focus to the first menuitem. If the dropdown is collapsed, it also expands the list.
33
- // Up Arrow: Moves focus to the last menuitem. If the dropdown is collapsed, it also expands the list.
34
- it("handles Up and Down Arrow keys", async () => {
35
- const wmbtn = await page.find("wm-action-menu >>> wm-button");
36
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("false");
37
- await page.keyboard.press("Tab");
38
- await page.waitForChanges();
39
- await page.keyboard.press("ArrowDown");
40
- await page.waitForChanges();
41
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("true");
42
- const first = await page.find("wm-menuitem#first >>> div");
43
- const second = await page.find("wm-menuitem#second >>> div");
44
- expect(first).toHaveClass("focus");
45
- await page.keyboard.press("ArrowDown");
46
- await page.waitForChanges();
47
- expect(second).toHaveClass("focus");
48
- await page.keyboard.press("ArrowUp");
49
- await page.waitForChanges();
50
- expect(first).toHaveClass("focus");
51
- await page.keyboard.press("Enter");
52
- await page.waitForChanges();
53
- await page.waitForTimeout(500); //allow closing animation and setTimeout to finish
54
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("false");
55
- await page.keyboard.press("ArrowUp");
56
- await page.waitForChanges();
57
- // after the action runs the dropdown close and the dev should focus the relevant element.
58
- // in case they don't, focus will return to the body. The component checks that and brings focus
59
- // back to the button when that's the case.
60
- // Things seem to happen differently with headless chrome / puppeteer. Focus stays on the menuitem even after
61
- // it has become unable to have focus in normal browsers (after dropdown closes). Focus never gets to body.
62
- // So here we simply test that the active el is not the body
63
- const activeEl = await page.evaluate(() => document.activeElement.tagName);
64
- expect(activeEl).not.toEqual("BODY");
65
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("true");
66
- await page.keyboard.press("ArrowUp");
67
- await page.waitForChanges();
68
- expect(second).toHaveClass("focus");
69
- });
70
- // Home: If the dropdown is displayed, moves focus to first menuitem.
71
- // End: If the dropdown is displayed, moves focus to last menuitem.
72
- it("handles Home and End keys", async () => {
73
- await page.keyboard.press("Tab");
74
- await page.keyboard.press("Enter");
75
- await page.waitForTimeout(40);
76
- await page.keyboard.press("ArrowDown");
77
- await page.keyboard.press("ArrowDown");
78
- await page.waitForChanges();
79
- const focusedEl = await page.find("wm-menuitem#third >>> div");
80
- expect(focusedEl).toHaveClass("focus");
81
- await page.keyboard.press("Home");
82
- await page.waitForChanges();
83
- const homefocusedEl = await page.find("wm-menuitem#first >>> div");
84
- expect(focusedEl).not.toHaveClass("focus");
85
- expect(homefocusedEl).toHaveClass("focus");
86
- await page.keyboard.press("End");
87
- await page.waitForChanges();
88
- const endfocusedEl = await page.find("wm-menuitem#third >>> div");
89
- expect(endfocusedEl).toHaveClass("focus");
90
- });
91
- // - Type a character: focus moves to the next menuitem with a name that starts with the typed character.
92
- // - Type multiple characters in rapid succession: focus moves to the next menuitem with a name that starts with the string of characters typed
93
- it("handles typing", async () => {
94
- await page.keyboard.press("Tab");
95
- await page.keyboard.press("Enter");
96
- await page.waitForChanges();
97
- await page.keyboard.press("t");
98
- await page.waitForChanges();
99
- const focusedEl = await page.find("wm-menuitem#third >>> div");
100
- expect(focusedEl).toHaveClass("focus");
101
- });
102
- // OPEN / CLOSE
103
- // Spacebar: Should open the popup (we didn't implement, comes for free. Test is to make sure we don't break it)
104
- it("handles the Spacebar key", async () => {
105
- await page.keyboard.press("Tab");
106
- await page.keyboard.press("Space");
107
- await page.waitForChanges();
108
- const wmbtn = await page.find("wm-action-menu >>> wm-button");
109
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("true");
110
- });
111
- // Escape: If the menu is displayed, closes the popup and returns focus to the button.
112
- it("handles the Escape key", async () => {
113
- await page.keyboard.press("Tab");
114
- await page.keyboard.press("Enter");
115
- await page.waitForChanges();
116
- const wmbtn = await page.find("wm-action-menu >>> wm-button");
117
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("true");
118
- await page.keyboard.press("ArrowDown");
119
- await page.keyboard.press("Escape");
120
- await page.waitForChanges();
121
- await page.waitForTimeout(500); //allow closing animation and setTimeout to finish
122
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("false");
123
- const activeElId = await page.evaluate(() => document.activeElement.id);
124
- expect(activeElId).toEqual("test");
125
- //When dropdown reopens, focus returns to first element
126
- await page.keyboard.press("Enter");
127
- await page.waitForChanges();
128
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("true");
129
- const focusedEl = await page.find("wm-menuitem#first >>> div");
130
- expect(focusedEl).toHaveClass("focus"); //
131
- });
132
- // Enter:
133
- // - If the focus is on the button, it expands the dropdown and places focuses on the first menuitem.
134
- // - If the dropdown is open, it closes the dropdown.
135
- it("opens and closes the dropdown when enter key is pressed", async () => {
136
- await page.keyboard.press("Tab");
137
- const wmbtn = await page.find("wm-action-menu >>> wm-button");
138
- await page.keyboard.press("Enter");
139
- await page.waitForChanges();
140
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("true");
141
- await page.keyboard.press("Enter");
142
- await page.waitForChanges();
143
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("false");
144
- });
145
- it("runs the onClick function passed to the menuitem when clicked or key pressed", async () => {
146
- page = await newE2EPage();
147
- await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
148
- <wm-action-menu id='test' tooltip='menu name'>
149
- <wm-menuitem id='first' onClick='action()'>First action</wm-menuitem>
150
- </wm-action-menu>
151
- <div id='changeMe'>default</div>
152
- <script>
153
- function action() {
154
- document.getElementById('changeMe').textContent += "&"
155
- }
156
- </script></main></body></html>`);
157
- const div = await page.find("#changeMe");
158
- await page.keyboard.press("Tab");
159
- await page.waitForChanges();
160
- await page.keyboard.press("Enter");
161
- await page.waitForChanges();
162
- await page.keyboard.press("Enter");
163
- await page.waitForChanges();
164
- expect(div.textContent).toBe("default&");
165
- await page.waitForTimeout(300); // make sure menu is closed before reopening (closes after the 250ms animation)
166
- await page.keyboard.press("Enter");
167
- await page.waitForChanges();
168
- await page.click("#first");
169
- await page.waitForChanges();
170
- expect(div.textContent).toBe("default&&");
171
- });
172
- it("doesn't open the dropdown if the dropdown is disabled", async () => {
173
- await page.evaluate(() => document.querySelector("wm-action-menu").setAttribute("disabled", "true"));
174
- await page.keyboard.press("Tab");
175
- await page.keyboard.press("Enter");
176
- await page.waitForChanges();
177
- const wmbtn = await page.find("wm-action-menu >>> wm-button");
178
- await page.waitForChanges();
179
- expect(wmbtn.getAttribute("aria-expanded")).toEqual("false");
180
- });
181
- // TOOLTIP
182
- it("renders a tooltip when type is icon", async () => {
183
- await page.keyboard.press("Tab");
184
- await page.waitForChanges();
185
- const tooltipEl = await page.find("#wm-tooltip");
186
- expect(tooltipEl.textContent).toBe("menu name");
187
- });
188
- it("uses the label instead of tooltip text", async () => {
189
- page = await newE2EPage();
190
- await page.setContent("<wm-action-menu icon='f1c0' action-menu-type='icon' tooltip='delete' label-for-identical-buttons='delete this particular thing'><wm-menuitem>1</wm-menuitem></wm-action-menu>");
191
- // use case: when the tooltip is something like "edit" and there are several buttons on a page, the aria label should be more specific than the tooltip
192
- const wmbtn = await page.find("wm-action-menu >>> wm-button");
193
- const btn = wmbtn.shadowRoot.querySelector("button");
194
- await page.keyboard.press("Tab");
195
- await page.waitForChanges();
196
- const tooltipEl = await page.find("#wm-tooltip");
197
- expect(tooltipEl.textContent).toEqual("delete");
198
- expect(btn).toEqualAttribute("aria-label", "delete this particular thing");
199
- });
200
- });
@@ -1,48 +0,0 @@
1
- import { newSpecPage } from "@stencil/core/testing";
2
- import { ActionMenu } from "./wm-action-menu";
3
- import { Menuitem } from "../wm-menuitem/wm-menuitem";
4
- import * as globalFuncs from "../../global/functions";
5
- jest.spyOn(globalFuncs, "getTextDir").mockImplementation(() => "rtl");
6
- jest.spyOn(globalFuncs, "generateId");
7
- // @ts-ignore
8
- globalFuncs.generateId.mockImplementation(() => "random-id");
9
- describe("wm-action-menu", () => {
10
- it("builds", async () => {
11
- const page = await newSpecPage({
12
- components: [ActionMenu, Menuitem],
13
- html: "<wm-action-menu action-menu-type='icon' tooltip='Menu Name'><wm-menuitem icon='f3eb' onClick='someFunction()'>Menuitem one</wm-menuitem></wm-action-menu>",
14
- });
15
- expect(page.root).toMatchSnapshot();
16
- });
17
- it("has the right props", () => {
18
- const menu = new ActionMenu();
19
- expect(menu).toHaveProperty("childItems");
20
- expect(menu).toHaveProperty("keysSoFar");
21
- expect(menu).toHaveProperty("searchIndex");
22
- expect(menu).toHaveProperty("tooltipPosition");
23
- expect(menu).toHaveProperty("actionMenuType");
24
- expect(menu).toHaveProperty("buttonText");
25
- expect(menu).toHaveProperty("tooltip");
26
- expect(menu).toHaveProperty("labelForIdenticalButtons");
27
- });
28
- describe("error throwing", () => {
29
- it("throws error when action-menu-type is text/selector but no button-text is passed", async () => {
30
- const mockFunc = jest.fn();
31
- console.error = mockFunc;
32
- await newSpecPage({
33
- components: [ActionMenu, Menuitem],
34
- html: "<wm-action-menu action-menu-type='text'><wm-menuitem icon='f3eb' onClick='someFunction()'>Menuitem one</wm-menuitem></wm-action-menu>",
35
- });
36
- expect(mockFunc).toHaveBeenCalledWith("wm-action-menu should have a valid button-text property when action-menu-type is set to 'text' or 'selector'");
37
- });
38
- it("throws error when action-menu-type is icon but no tooltip is passed", async () => {
39
- const mockFunc = jest.fn();
40
- console.error = mockFunc;
41
- await newSpecPage({
42
- components: [ActionMenu, Menuitem],
43
- html: "<wm-action-menu action-menu-type='icon'><wm-menuitem icon='f3eb' onClick='someFunction()'>Menuitem one</wm-menuitem></wm-action-menu>",
44
- });
45
- expect(mockFunc).toHaveBeenCalledWith("wm-action-menu should have a valid tooltip when action-menu-type is set to 'icon'");
46
- });
47
- });
48
- });