@watermarkinsights/ripple 5.12.0-9 → 5.12.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 (366) hide show
  1. package/dist/cjs/{chartFunctions-7314b414.js → chartFunctions-a1981e06.js} +31 -11
  2. package/dist/cjs/{functions-5ac8a62f.js → functions-4b187487.js} +1587 -370
  3. package/dist/{esm/app-globals-f3dbaf3e.js → cjs/global-4e034486.js} +2 -7
  4. package/dist/cjs/index-e86c28b6.js +2649 -0
  5. package/dist/cjs/{intl-07aaf53c.js → intl-7fd0760e.js} +104 -1
  6. package/dist/cjs/loader.cjs.js +3 -4
  7. package/dist/cjs/priv-calendar.cjs.entry.js +5 -6
  8. package/dist/cjs/priv-chart-popover.cjs.entry.js +5 -6
  9. package/dist/cjs/priv-navigator-button.cjs.entry.js +3 -4
  10. package/dist/cjs/priv-navigator-item.cjs.entry.js +3 -4
  11. package/dist/cjs/priv-option-list.cjs.entry.js +14 -52
  12. package/dist/cjs/ripple.cjs.js +11 -12
  13. package/dist/cjs/wm-action-menu_2.cjs.entry.js +6 -8
  14. package/dist/cjs/wm-button.cjs.entry.js +4 -5
  15. package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
  16. package/dist/cjs/wm-chart.cjs.entry.js +15 -9
  17. package/dist/cjs/wm-date-range.cjs.entry.js +21 -11
  18. package/dist/cjs/wm-datepicker.cjs.entry.js +8 -9
  19. package/dist/cjs/wm-file-list.cjs.entry.js +3 -4
  20. package/dist/cjs/wm-file.cjs.entry.js +4 -5
  21. package/dist/cjs/wm-input.cjs.entry.js +5 -6
  22. package/dist/cjs/wm-line-chart.cjs.entry.js +18 -18
  23. package/dist/cjs/wm-modal-pss_3.cjs.entry.js +10 -13
  24. package/dist/cjs/wm-modal_3.cjs.entry.js +13 -16
  25. package/dist/cjs/wm-navigation_3.cjs.entry.js +10 -13
  26. package/dist/cjs/wm-navigator.cjs.entry.js +3 -4
  27. package/dist/cjs/wm-nested-select.cjs.entry.js +16 -56
  28. package/dist/cjs/wm-optgroup.cjs.entry.js +4 -5
  29. package/dist/cjs/wm-option_2.cjs.entry.js +11 -25
  30. package/dist/cjs/wm-pagination.cjs.entry.js +65 -14
  31. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +7 -9
  32. package/dist/cjs/wm-search.cjs.entry.js +6 -7
  33. package/dist/cjs/wm-snackbar.cjs.entry.js +13 -9
  34. package/dist/cjs/wm-tab-item_3.cjs.entry.js +14 -12
  35. package/dist/cjs/wm-tag-input.cjs.entry.js +29 -24
  36. package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
  37. package/dist/cjs/wm-textarea.cjs.entry.js +5 -6
  38. package/dist/cjs/wm-timepicker.cjs.entry.js +5 -6
  39. package/dist/cjs/wm-toggletip.cjs.entry.js +6 -7
  40. package/dist/cjs/wm-uploader.cjs.entry.js +6 -7
  41. package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
  42. package/dist/collection/collection-manifest.json +2 -2
  43. package/dist/collection/components/charts/chartFunctions.js +29 -9
  44. package/dist/collection/components/charts/chartFunctions.spec.js +16 -0
  45. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +81 -0
  46. package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
  47. package/dist/collection/components/charts/screenshots.e2e.js +96 -0
  48. package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +213 -0
  49. package/dist/collection/components/charts/wm-chart/wm-chart.js +10 -3
  50. package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +37 -0
  51. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +176 -0
  52. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +14 -13
  53. package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +163 -0
  54. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
  55. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +69 -0
  56. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
  57. package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +79 -0
  58. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
  59. package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +89 -0
  60. package/dist/collection/components/datepickers/wm-date-range.e2e.js +443 -0
  61. package/dist/collection/components/datepickers/wm-date-range.js +26 -19
  62. package/dist/collection/components/datepickers/wm-date-range.spec.js +22 -0
  63. package/dist/collection/components/datepickers/wm-datepicker.e2e.js +382 -0
  64. package/dist/collection/components/datepickers/wm-datepicker.js +13 -17
  65. package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
  66. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +16 -55
  67. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +17 -56
  68. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +1 -1
  69. package/dist/collection/components/selects/wm-option/wm-option.e2e.js +22 -0
  70. package/dist/collection/components/selects/wm-option/wm-option.js +1 -1
  71. package/dist/collection/components/selects/wm-option/wm-option.spec.js +63 -0
  72. package/dist/collection/components/selects/wm-select/wm-select.e2e.js +521 -0
  73. package/dist/collection/components/selects/wm-select/wm-select.js +10 -22
  74. package/dist/collection/components/selects/wm-select/wm-select.spec.js +271 -0
  75. package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +200 -0
  76. package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
  77. package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +48 -0
  78. package/dist/collection/components/wm-button/wm-button.e2e.js +55 -0
  79. package/dist/collection/components/wm-button/wm-button.js +1 -1
  80. package/dist/collection/components/wm-button/wm-button.spec.js +74 -0
  81. package/dist/collection/components/wm-file/wm-file.js +1 -1
  82. package/dist/collection/components/wm-file/wm-file.spec.js +194 -0
  83. package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
  84. package/dist/collection/components/wm-file-list/wm-file-list.spec.js +69 -0
  85. package/dist/collection/components/wm-input/wm-input.e2e.js +32 -0
  86. package/dist/collection/components/wm-input/wm-input.js +1 -1
  87. package/dist/collection/components/wm-input/wm-input.spec.js +173 -0
  88. package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +23 -0
  89. package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
  90. package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +54 -0
  91. package/dist/collection/components/wm-modal/wm-modal-footer.css +9 -16
  92. package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
  93. package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +11 -0
  94. package/dist/collection/components/wm-modal/wm-modal-header.css +1 -3
  95. package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
  96. package/dist/collection/components/wm-modal/wm-modal-header.spec.js +8 -0
  97. package/dist/collection/components/wm-modal/wm-modal.css +3 -2
  98. package/dist/collection/components/wm-modal/wm-modal.e2e.js +104 -0
  99. package/dist/collection/components/wm-modal/wm-modal.js +2 -2
  100. package/dist/collection/components/wm-modal/wm-modal.spec.js +30 -0
  101. package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.js +1 -1
  102. package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +1 -1
  103. package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +2 -2
  104. package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
  105. package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
  106. package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +102 -0
  107. package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
  108. package/dist/collection/components/wm-navigation/wm-navigation.spec.js +91 -0
  109. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +50 -0
  110. package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
  111. package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
  112. package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +209 -0
  113. package/dist/collection/components/wm-navigator/wm-navigator.spec.js +177 -0
  114. package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +312 -0
  115. package/dist/collection/components/wm-pagination/wm-pagination.js +63 -11
  116. package/dist/collection/components/wm-search/wm-search.e2e.js +76 -0
  117. package/dist/collection/components/wm-search/wm-search.js +4 -5
  118. package/dist/collection/components/wm-search/wm-search.spec.js +71 -0
  119. package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +112 -0
  120. package/dist/collection/components/wm-snackbar/wm-snackbar.js +10 -5
  121. package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +9 -0
  122. package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
  123. package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +8 -3
  124. package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
  125. package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +91 -0
  126. package/dist/collection/components/wm-tabs/wm-tabs.spec.js +12 -0
  127. package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +204 -0
  128. package/dist/collection/components/wm-tag-input/wm-tag-input.js +25 -19
  129. package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +195 -0
  130. package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +41 -0
  131. package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
  132. package/dist/collection/components/wm-textarea/wm-textarea.spec.js +79 -0
  133. package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +163 -0
  134. package/dist/collection/components/wm-timepicker/wm-timepicker.js +8 -11
  135. package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +147 -0
  136. package/dist/collection/components/wm-toggletip/wm-toggletip.css +0 -1
  137. package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +69 -0
  138. package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
  139. package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +21 -0
  140. package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +70 -0
  141. package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
  142. package/dist/collection/components/wm-uploader/wm-uploader.spec.js +234 -0
  143. package/dist/collection/global/functions.spec.js +126 -0
  144. package/dist/collection/global/intl.js +102 -0
  145. package/dist/collection/lang/lang.spec.js +20 -0
  146. package/dist/collection/lang/piglatin.js +9 -1
  147. package/dist/esm/{chartFunctions-1478f4db.js → chartFunctions-9099c7e9.js} +31 -11
  148. package/dist/esm/{functions-f53b3537.js → functions-00e1916b.js} +1588 -371
  149. package/dist/{cjs/app-globals-b8352f28.js → esm/global-c76064cb.js} +1 -10
  150. package/dist/esm/index-558b5a82.js +2618 -0
  151. package/dist/esm/{intl-6426ba51.js → intl-a6f16883.js} +104 -2
  152. package/dist/esm/loader.js +4 -5
  153. package/dist/esm/priv-calendar.entry.js +5 -6
  154. package/dist/esm/priv-chart-popover.entry.js +5 -6
  155. package/dist/esm/priv-navigator-button.entry.js +3 -4
  156. package/dist/esm/priv-navigator-item.entry.js +3 -4
  157. package/dist/esm/priv-option-list.entry.js +14 -52
  158. package/dist/esm/ripple.js +12 -13
  159. package/dist/esm/wm-action-menu_2.entry.js +6 -8
  160. package/dist/esm/wm-button.entry.js +4 -5
  161. package/dist/esm/wm-chart-slice.entry.js +1 -1
  162. package/dist/esm/wm-chart.entry.js +15 -9
  163. package/dist/esm/wm-date-range.entry.js +21 -11
  164. package/dist/esm/wm-datepicker.entry.js +8 -9
  165. package/dist/esm/wm-file-list.entry.js +3 -4
  166. package/dist/esm/wm-file.entry.js +4 -5
  167. package/dist/esm/wm-input.entry.js +5 -6
  168. package/dist/esm/wm-line-chart.entry.js +18 -18
  169. package/dist/esm/wm-modal-pss_3.entry.js +10 -13
  170. package/dist/esm/wm-modal_3.entry.js +13 -16
  171. package/dist/esm/wm-navigation_3.entry.js +10 -13
  172. package/dist/esm/wm-navigator.entry.js +3 -4
  173. package/dist/esm/wm-nested-select.entry.js +16 -56
  174. package/dist/esm/wm-optgroup.entry.js +4 -5
  175. package/dist/esm/wm-option_2.entry.js +11 -25
  176. package/dist/esm/wm-pagination.entry.js +65 -14
  177. package/dist/esm/wm-progress-indicator_3.entry.js +7 -9
  178. package/dist/esm/wm-search.entry.js +6 -7
  179. package/dist/esm/wm-snackbar.entry.js +13 -9
  180. package/dist/esm/wm-tab-item_3.entry.js +14 -12
  181. package/dist/esm/wm-tag-input.entry.js +29 -24
  182. package/dist/esm/wm-tag-option.entry.js +2 -2
  183. package/dist/esm/wm-textarea.entry.js +5 -6
  184. package/dist/esm/wm-timepicker.entry.js +5 -6
  185. package/dist/esm/wm-toggletip.entry.js +6 -7
  186. package/dist/esm/wm-uploader.entry.js +6 -7
  187. package/dist/esm/wm-wrapper.entry.js +1 -1
  188. package/dist/esm-es5/chartFunctions-9099c7e9.js +1 -0
  189. package/dist/esm-es5/functions-00e1916b.js +1 -0
  190. package/dist/esm-es5/global-c76064cb.js +1 -0
  191. package/dist/esm-es5/index-558b5a82.js +1 -0
  192. package/dist/esm-es5/intl-a6f16883.js +1 -0
  193. package/dist/esm-es5/loader.js +1 -1
  194. package/dist/esm-es5/priv-calendar.entry.js +1 -1
  195. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  196. package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
  197. package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
  198. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  199. package/dist/esm-es5/ripple.js +1 -1
  200. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  201. package/dist/esm-es5/wm-button.entry.js +1 -1
  202. package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
  203. package/dist/esm-es5/wm-chart.entry.js +1 -1
  204. package/dist/esm-es5/wm-date-range.entry.js +1 -1
  205. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  206. package/dist/esm-es5/wm-file-list.entry.js +1 -1
  207. package/dist/esm-es5/wm-file.entry.js +1 -1
  208. package/dist/esm-es5/wm-input.entry.js +1 -1
  209. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  210. package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
  211. package/dist/esm-es5/wm-modal_3.entry.js +1 -1
  212. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  213. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  214. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  215. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  216. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  217. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  218. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  219. package/dist/esm-es5/wm-search.entry.js +1 -1
  220. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  221. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  222. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  223. package/dist/esm-es5/wm-tag-option.entry.js +1 -1
  224. package/dist/esm-es5/wm-textarea.entry.js +1 -1
  225. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  226. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  227. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  228. package/dist/esm-es5/wm-wrapper.entry.js +1 -1
  229. package/dist/loader/cdn.js +2 -1
  230. package/dist/loader/index.cjs.js +2 -1
  231. package/dist/loader/index.d.ts +0 -3
  232. package/dist/loader/index.es2017.js +2 -1
  233. package/dist/loader/index.js +2 -1
  234. package/dist/ripple/p-05ae54d7.entry.js +1 -0
  235. package/dist/ripple/{p-fdfa3579.system.entry.js → p-0d89d63c.system.entry.js} +1 -1
  236. package/dist/ripple/p-118c47eb.system.entry.js +1 -0
  237. package/dist/ripple/{p-658f146a.system.entry.js → p-1a4b6b02.system.entry.js} +1 -1
  238. package/dist/ripple/{p-a0edf336.system.entry.js → p-1a4b7504.system.entry.js} +1 -1
  239. package/dist/ripple/{p-165b5d3d.system.entry.js → p-1a71d867.system.entry.js} +1 -1
  240. package/dist/ripple/p-1a951dfb.entry.js +1 -0
  241. package/dist/ripple/{p-28f9e202.system.entry.js → p-1c8f550f.system.entry.js} +1 -1
  242. package/dist/ripple/p-1f751b87.js +1 -0
  243. package/dist/ripple/p-1fac5bf9.js +1 -0
  244. package/dist/ripple/{p-03fafb82.entry.js → p-20a8f732.system.entry.js} +1 -1
  245. package/dist/ripple/{p-3b5d106d.entry.js → p-249b56fb.entry.js} +1 -1
  246. package/dist/ripple/p-249d13a1.system.entry.js +1 -0
  247. package/dist/ripple/p-26906899.entry.js +1 -0
  248. package/dist/ripple/{p-486b3b56.system.entry.js → p-28119645.system.entry.js} +1 -1
  249. package/dist/ripple/{p-a2544443.system.js → p-2f37f3ee.system.js} +1 -1
  250. package/dist/ripple/{p-823d7b4e.system.entry.js → p-32bf3f5b.system.entry.js} +1 -1
  251. package/dist/ripple/{p-20b137a3.system.entry.js → p-335c03d3.system.entry.js} +1 -1
  252. package/dist/ripple/p-363b534b.entry.js +1 -0
  253. package/dist/ripple/p-393e4636.js +1 -0
  254. package/dist/ripple/p-39f79d71.system.entry.js +1 -0
  255. package/dist/ripple/{p-ff60375d.system.entry.js → p-3a231f4b.system.entry.js} +1 -1
  256. package/dist/ripple/{p-55f8aa05.entry.js → p-3d4bb85f.entry.js} +1 -1
  257. package/dist/ripple/p-4228de00.entry.js +1 -0
  258. package/dist/ripple/{p-13b1d775.entry.js → p-48e09589.entry.js} +1 -1
  259. package/dist/ripple/p-4f8fe1d1.system.js +1 -0
  260. package/dist/ripple/{p-02e60a11.system.entry.js → p-522ecb7d.system.entry.js} +1 -1
  261. package/dist/ripple/{p-ee825214.entry.js → p-54d6f0f9.entry.js} +1 -1
  262. package/dist/ripple/p-568c595f.js +2 -0
  263. package/dist/ripple/p-56aeee6e.system.entry.js +1 -0
  264. package/dist/ripple/p-5e6a4f70.system.js +1 -0
  265. package/dist/ripple/{p-82819500.system.entry.js → p-5f082360.system.entry.js} +1 -1
  266. package/dist/ripple/p-5f5fe905.js +1 -0
  267. package/dist/ripple/p-617c2c75.entry.js +1 -0
  268. package/dist/ripple/{p-4fbe205e.system.entry.js → p-6524c53e.system.entry.js} +1 -1
  269. package/dist/ripple/{p-043901ab.system.entry.js → p-65d26233.system.entry.js} +1 -1
  270. package/dist/ripple/p-6834a6d3.entry.js +1 -0
  271. package/dist/ripple/{p-81ac8d49.entry.js → p-68e04222.entry.js} +1 -1
  272. package/dist/ripple/{p-f778baf4.system.entry.js → p-68fddfaa.system.entry.js} +1 -1
  273. package/dist/ripple/{p-e2fbed8c.system.entry.js → p-694903e6.system.entry.js} +1 -1
  274. package/dist/ripple/p-73ca2f26.system.js +1 -0
  275. package/dist/ripple/{p-1f174e18.system.entry.js → p-7b6a65f8.system.entry.js} +1 -1
  276. package/dist/ripple/{p-a9a7731b.system.entry.js → p-7b7e1eb5.system.entry.js} +1 -1
  277. package/dist/ripple/{p-cd0cc88d.entry.js → p-88ebddd7.entry.js} +1 -1
  278. package/dist/ripple/{p-791513e7.entry.js → p-8c1d27a7.entry.js} +1 -1
  279. package/dist/ripple/{p-ccae5bec.entry.js → p-8e9c24f3.entry.js} +1 -1
  280. package/dist/ripple/{p-b16f07f1.system.entry.js → p-8f836507.system.entry.js} +1 -1
  281. package/dist/ripple/p-94495341.entry.js +1 -0
  282. package/dist/ripple/{p-76f9acec.entry.js → p-958331bf.entry.js} +1 -1
  283. package/dist/ripple/p-9872623b.entry.js +1 -0
  284. package/dist/ripple/{p-e6e36701.system.entry.js → p-9ab3c088.system.entry.js} +1 -1
  285. package/dist/ripple/p-9aedd599.entry.js +1 -0
  286. package/dist/ripple/p-9b848151.entry.js +1 -0
  287. package/dist/ripple/{p-3376581a.system.entry.js → p-a04ef164.system.entry.js} +1 -1
  288. package/dist/ripple/{p-02bd68af.system.entry.js → p-a78bb423.system.entry.js} +1 -1
  289. package/dist/ripple/{p-0d163672.system.entry.js → p-a880d9a0.system.entry.js} +1 -1
  290. package/dist/ripple/p-ab8d78cc.system.js +2 -0
  291. package/dist/ripple/p-adc254e6.entry.js +1 -0
  292. package/dist/ripple/p-b165d61a.entry.js +1 -0
  293. package/dist/ripple/p-b39377c7.entry.js +1 -0
  294. package/dist/ripple/p-b9bca547.entry.js +1 -0
  295. package/dist/ripple/p-bae2c236.entry.js +1 -0
  296. package/dist/ripple/{p-8634abad.system.entry.js → p-c53f3704.system.entry.js} +1 -1
  297. package/dist/ripple/p-c56ff16f.entry.js +1 -0
  298. package/dist/ripple/{p-94fbf6f6.system.entry.js → p-c8cf09a2.system.entry.js} +1 -1
  299. package/dist/ripple/p-cbdceb6e.entry.js +1 -0
  300. package/dist/ripple/p-cc813406.system.js +1 -0
  301. package/dist/ripple/{p-529f179c.system.entry.js → p-d20a0f0c.system.entry.js} +1 -1
  302. package/dist/ripple/p-d6111226.entry.js +1 -0
  303. package/dist/ripple/{p-f28106ea.entry.js → p-da68c87c.entry.js} +1 -1
  304. package/dist/ripple/{p-e8cfa832.entry.js → p-ddef82fa.system.entry.js} +1 -1
  305. package/dist/ripple/p-dee6d5a3.entry.js +1 -0
  306. package/dist/ripple/p-e55d5371.entry.js +1 -0
  307. package/dist/ripple/{p-7959c4bd.system.entry.js → p-e8c22f01.system.entry.js} +1 -1
  308. package/dist/ripple/p-f555831b.entry.js +1 -0
  309. package/dist/ripple/{p-226217d3.system.entry.js → p-f5c40e9e.system.entry.js} +1 -1
  310. package/dist/ripple/p-f9cade98.entry.js +1 -0
  311. package/dist/ripple/{p-fc7965e4.system.entry.js → p-fa09191b.system.entry.js} +1 -1
  312. package/dist/ripple/{p-233f14ec.system.entry.js → p-fdfca58b.entry.js} +1 -1
  313. package/dist/ripple/ripple.esm.js +1 -1
  314. package/dist/ripple/ripple.js +1 -1
  315. package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +0 -6
  316. package/dist/types/components/wm-pagination/wm-pagination.d.ts +6 -0
  317. package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +1 -0
  318. package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +1 -0
  319. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +2 -1
  320. package/dist/types/global/intl.d.ts +22 -0
  321. package/dist/types/stencil-public-runtime.d.ts +10 -3
  322. package/package.json +2 -2
  323. package/dist/cjs/index-788526f5.js +0 -1859
  324. package/dist/esm/index-130e07bb.js +0 -1828
  325. package/dist/esm-es5/app-globals-f3dbaf3e.js +0 -1
  326. package/dist/esm-es5/chartFunctions-1478f4db.js +0 -1
  327. package/dist/esm-es5/functions-f53b3537.js +0 -1
  328. package/dist/esm-es5/index-130e07bb.js +0 -1
  329. package/dist/esm-es5/intl-6426ba51.js +0 -1
  330. package/dist/ripple/p-243a7a17.system.entry.js +0 -1
  331. package/dist/ripple/p-263e42e0.entry.js +0 -1
  332. package/dist/ripple/p-27ff3a85.js +0 -1
  333. package/dist/ripple/p-2c8153c1.entry.js +0 -1
  334. package/dist/ripple/p-368e9ee9.entry.js +0 -1
  335. package/dist/ripple/p-3a2a3b70.entry.js +0 -1
  336. package/dist/ripple/p-45b5d2d2.entry.js +0 -1
  337. package/dist/ripple/p-49e24926.entry.js +0 -1
  338. package/dist/ripple/p-50294e3f.entry.js +0 -1
  339. package/dist/ripple/p-53400bc4.system.entry.js +0 -1
  340. package/dist/ripple/p-58734b13.entry.js +0 -1
  341. package/dist/ripple/p-59cc46a6.entry.js +0 -1
  342. package/dist/ripple/p-5c62e26d.entry.js +0 -1
  343. package/dist/ripple/p-6136d0d7.entry.js +0 -1
  344. package/dist/ripple/p-66141f19.entry.js +0 -1
  345. package/dist/ripple/p-713ea307.entry.js +0 -1
  346. package/dist/ripple/p-727175e1.system.entry.js +0 -1
  347. package/dist/ripple/p-73056e10.system.js +0 -1
  348. package/dist/ripple/p-7a1bb29b.js +0 -1
  349. package/dist/ripple/p-864158de.system.entry.js +0 -1
  350. package/dist/ripple/p-8c95493c.js +0 -1
  351. package/dist/ripple/p-94dc80a0.entry.js +0 -1
  352. package/dist/ripple/p-9b739280.entry.js +0 -1
  353. package/dist/ripple/p-a280d710.entry.js +0 -1
  354. package/dist/ripple/p-b78d8ab1.system.js +0 -1
  355. package/dist/ripple/p-c550716e.js +0 -1
  356. package/dist/ripple/p-cef8a45b.system.js +0 -2
  357. package/dist/ripple/p-d530c703.entry.js +0 -1
  358. package/dist/ripple/p-d96291e7.entry.js +0 -1
  359. package/dist/ripple/p-d9da0502.js +0 -2
  360. package/dist/ripple/p-e973024a.entry.js +0 -1
  361. package/dist/ripple/p-ed24dc42.entry.js +0 -1
  362. package/dist/ripple/p-ef75bf23.system.entry.js +0 -1
  363. package/dist/ripple/p-f471ee29.system.js +0 -1
  364. package/dist/ripple/p-f66480de.entry.js +0 -1
  365. package/dist/ripple/p-f9a71cf6.entry.js +0 -1
  366. package/dist/ripple/p-ffbb9fc0.system.js +0 -1
@@ -0,0 +1,112 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe("wm-snackbar", () => {
3
+ let page;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent("<wm-button id='create-snack' onclick='generateSnackbar()'></wm-button><wm-snackbar notifications='[]' id='snack'></wm-snackbar ><script>function generateSnackbar() { const snackbar = document.getElementById('snack'); const id = '3'; let notifications = JSON.parse(snackbar.notifications); let newNotification = {'id': id, message: 'You did something', link: 'Undo'}; let updatedNotifications = [ ...notifications, newNotification ]; snackbar.notifications = JSON.stringify(updatedNotifications); }</script>");
7
+ await page.evaluate(async () => {
8
+ document.addEventListener("wmSnackbarSnackFinished", (ev) => {
9
+ const snackbar = document.querySelector("wm-snackbar");
10
+ let newSnacks = JSON.parse(snackbar.notifications).filter((snack) => +snack.id !== +ev.detail.id);
11
+ snackbar.notifications = JSON.stringify(newSnacks);
12
+ });
13
+ });
14
+ });
15
+ afterEach(async () => {
16
+ jest.clearAllTimers();
17
+ });
18
+ // RENDER
19
+ it("it displays a snackbar when it receives a notification", async () => {
20
+ //generate snackbar
21
+ const button = await page.find("wm-button");
22
+ button.click(); //perform action that generates a notification
23
+ await page.waitForChanges();
24
+ const snackbar = await page.find("wm-snackbar >>> .content-wrapper");
25
+ expect(snackbar).not.toBeNull();
26
+ });
27
+ it("it displays multiple snackbars when it receives more than one notification", async () => {
28
+ //generate snackbars
29
+ const button = await page.find("wm-button");
30
+ button.click();
31
+ await page.waitForChanges();
32
+ button.click();
33
+ await page.waitForChanges();
34
+ const snackbars = await page.findAll("wm-snackbar >>> .content-wrapper");
35
+ expect(snackbars.length).toBe(2);
36
+ });
37
+ it("dismisses the snackbar after 20 seconds if the user is clicking and not tabbing", async () => {
38
+ //generate snackbar
39
+ const snackExpired = await page.spyOnEvent("wmSnackbarSnackFinished");
40
+ const button = await page.find("wm-button");
41
+ button.click();
42
+ await page.waitForChanges();
43
+ let snack = await page.find("wm-snackbar >>> .content-wrapper");
44
+ expect(snack).not.toBeNull();
45
+ await new Promise((resolve) => {
46
+ setTimeout(() => {
47
+ resolve("");
48
+ }, 21000);
49
+ });
50
+ snack = await page.find("wm-snackbar >>> .content-wrapper");
51
+ expect(snack).toBeNull();
52
+ expect(snackExpired).toHaveReceivedEventDetail({
53
+ id: "3",
54
+ message: "You did something",
55
+ link: "Undo",
56
+ });
57
+ });
58
+ it("dismisses the snackbar when the close button is clicked", async () => {
59
+ //generate snackbar
60
+ const triggerButton = await page.find("wm-button");
61
+ triggerButton.click();
62
+ await page.waitForChanges();
63
+ //press close button
64
+ const closeButton = await page.find("wm-snackbar >>> button");
65
+ closeButton.click();
66
+ await page.waitForChanges();
67
+ const snackbar = await page.find("wm-snackbar >>> .content-wrapper");
68
+ expect(snackbar).toBeNull();
69
+ });
70
+ //ACCESSIBILITY
71
+ it("renders an aria-live region", async () => {
72
+ const element = await page.find("wm-snackbar >>> #wm-live-region-snack");
73
+ expect(element).toEqualAttribute("aria-live", "polite");
74
+ });
75
+ it("focuses the action link in snackbar if the user is tabbing", async () => {
76
+ //generate snackbar
77
+ await page.keyboard.press("Tab");
78
+ await page.keyboard.press("Enter");
79
+ await page.waitForChanges();
80
+ const focusedElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
81
+ const link = await page.find("wm-snackbar >>> .link");
82
+ expect(focusedElId).toBe(link.id);
83
+ });
84
+ it("dismisses the snackbar when enter is pressed on close button and returns focus to last active element before snackbar was created", async () => {
85
+ //generate snackbar
86
+ await page.keyboard.press("Tab");
87
+ await page.keyboard.press("Enter");
88
+ await page.waitForChanges();
89
+ //press close button
90
+ await page.keyboard.press("Tab");
91
+ await page.keyboard.press("Enter");
92
+ await page.waitForChanges();
93
+ const snackbar = await page.find("wm-snackbar >>> .content-wrapper");
94
+ expect(snackbar).toBeNull();
95
+ const focusedElId = await page.evaluate(() => document.activeElement.id);
96
+ expect(focusedElId).toBe("create-snack");
97
+ });
98
+ it("dismisses the snackbar if the user tabs out of it and it returns focus to last active element before snackbar was created", async () => {
99
+ //generate snackbar
100
+ await page.keyboard.press("Tab");
101
+ await page.keyboard.press("Enter");
102
+ await page.waitForChanges();
103
+ //tab out
104
+ await page.keyboard.press("Tab");
105
+ await page.keyboard.press("Tab");
106
+ await page.waitForChanges();
107
+ const snackbar = await page.find("wm-snackbar >>> .content-wrapper");
108
+ expect(snackbar).toBeNull();
109
+ const focusedElId = await page.evaluate(() => document.activeElement.id);
110
+ expect(focusedElId).toBe("create-snack");
111
+ });
112
+ });
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { generateId, hideTooltip, showTooltip } from "../../global/functions";
2
+ import { generateId, hideTooltip, intl, showTooltip } from "../../global/functions";
3
3
  import { globalMessages } from "../../global/intl";
4
4
  export class Snackbar {
5
5
  constructor() {
@@ -7,6 +7,11 @@ export class Snackbar {
7
7
  this.uid = this.el.id ? this.el.id : generateId();
8
8
  this.focusOnDismiss = null;
9
9
  this.timers = {};
10
+ this.closeSnackMessage = intl.formatMessage({
11
+ id: "snackbar.closeNotification",
12
+ defaultMessage: "Close this notification",
13
+ description: "Notification refers to a notification UI element that can be dismissed",
14
+ });
10
15
  this.notifications = "[]";
11
16
  this.isTabbing = false;
12
17
  this.announcement = "";
@@ -145,16 +150,16 @@ export class Snackbar {
145
150
  this.announcement = message;
146
151
  }
147
152
  renderSnackbars() {
148
- return this.parsedNotifications.map((notification) => (h("div", { class: "wm-snack-wrapper", key: `snack-${notification.id}` }, h("div", { id: `snack-${notification.id}`, class: "wm-snackbar active neutral" }, h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) }), h("div", { class: "content-wrapper" }, h("div", { class: "msg-wrapper" }, h("span", { class: "msg" }, notification.message), notification.link && (h("a", { id: `action-${notification.id}`, class: `link ${notification.newWindow ? "new-window" : ""}`, "aria-label": `Click to ${notification.link}...${notification.newWindow ? " " + globalMessages.newWindow : ""}`, tabindex: 0, onClick: () => {
153
+ return this.parsedNotifications.map((notification) => (h("div", { class: "wm-snack-wrapper", key: `snack-${notification.id}` }, h("div", { id: `snack-${notification.id}`, class: "wm-snackbar active neutral" }, h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) }), h("div", { class: "content-wrapper" }, h("div", { class: "msg-wrapper" }, h("span", { class: "msg" }, notification.message), notification.link && (h("a", { id: `action-${notification.id}`, class: `link ${notification.newWindow ? "new-window" : ""}`, "aria-label": `${notification.link}${notification.newWindow ? " " + globalMessages.newWindow : ""}`, tabindex: 0, onClick: () => {
149
154
  this.snackLinkClicked(notification);
150
- }, onKeyDown: (ev) => ev.key === "Enter" && this.snackLinkClicked(notification) }, h("span", { "aria-hidden": "true" }, notification.link), notification.newWindow && h("div", { class: "svg-icon svg-open-in-new" })))), h("button", { id: `close-button-${notification.id}`, "aria-label": "Close this notification", class: "closesnack", tabindex: notification.link ? 0 : -1, onClick: () => this.snackDismissed(notification), onMouseEnter: (ev) => showTooltip("bottom", ev.target, globalMessages.close), onMouseLeave: () => hideTooltip(), onFocus: (ev) => this.isTabbing && showTooltip("bottom", ev.target, globalMessages.close), onBlur: () => hideTooltip() }, h("div", { class: "svg-icon svg-close" }))), h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) })))));
155
+ }, onKeyDown: (ev) => ev.key === "Enter" && this.snackLinkClicked(notification) }, h("span", { "aria-hidden": "true" }, notification.link), notification.newWindow && h("div", { class: "svg-icon svg-open-in-new" })))), h("button", { id: `close-button-${notification.id}`, "aria-label": this.closeSnackMessage, class: "closesnack", tabindex: notification.link ? 0 : -1, onClick: () => this.snackDismissed(notification), onMouseEnter: (ev) => showTooltip("bottom", ev.target, globalMessages.close), onMouseLeave: () => hideTooltip(), onFocus: (ev) => this.isTabbing && showTooltip("bottom", ev.target, globalMessages.close), onBlur: () => hideTooltip() }, h("div", { class: "svg-icon svg-close" }))), h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) })))));
151
156
  }
152
157
  render() {
153
- return (h(Host, { key: '4a20ad18b5f35266c9bb1b2000c6dd4a56260850' }, h("div", { key: 'c732bd432d88c8522096491c4e28750e18912832', ref: (el) => (this.snackAreaEl = el), class: {
158
+ return (h(Host, null, h("div", { ref: (el) => (this.snackAreaEl = el), class: {
154
159
  "list-wrapper": true,
155
160
  "user-is-tabbing": this.isTabbing,
156
161
  empty: this.parsedNotifications.length == 0,
157
- } }, this.renderSnackbars()), h("div", { key: '88d92b97479e3914bd99958c3045e95048e527c2', class: "sr-only", "aria-live": "polite", "aria-atomic": "false", id: `wm-live-region-${this.uid}`, ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
162
+ } }, this.renderSnackbars()), h("div", { class: "sr-only", "aria-live": "polite", "aria-atomic": "false", id: `wm-live-region-${this.uid}`, ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
158
163
  }
159
164
  static get is() { return "wm-snackbar"; }
160
165
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,9 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ jest.mock("../../global/functions");
3
+ import { Snackbar } from "./wm-snackbar";
4
+ describe("wm-snackbar", () => {
5
+ it("builds", async () => {
6
+ const comp = await newSpecPage({ components: [Snackbar], html: "<wm-snackbar><wm-snackbar>" });
7
+ expect(comp.root).toMatchSnapshot();
8
+ });
9
+ });
@@ -40,7 +40,7 @@ export class TabItem {
40
40
  "background-size": `calc(100% - ${bkgSize}${units}) 3px`,
41
41
  };
42
42
  }
43
- return (h(Host, { key: '03f7157e9d97d75d964bcf74bd3b22a6d4b134f7', role: "presentation" }, h("li", { key: '4c2f0e96555a70677c07e27a93bc8b32da016044', class: "tab-item", role: "presentation" }, h("a", { key: 'f433630cab179818bd2193b2fdac45a794e9f241', class: `tab ${classes}`, style: styles, role: "tab", ref: (el) => (this.linkEl = el), onClick: this.tabClicked, id: `tab-link-${this.tabId}`, onKeyDown: (ev) => this.tabPressed(ev), "aria-selected": this.selected ? "true" : "false", tabindex: this.selected ? 0 : -1 }, h("slot", { key: 'cbfdd92ef027ae9c1b73ffe9bbce37ab71007521' })))));
43
+ return (h(Host, { role: "presentation" }, h("li", { class: "tab-item", role: "presentation" }, h("a", { class: `tab ${classes}`, style: styles, role: "tab", ref: (el) => (this.linkEl = el), onClick: this.tabClicked, id: `tab-link-${this.tabId}`, onKeyDown: (ev) => this.tabPressed(ev), "aria-selected": this.selected ? "true" : "false", tabindex: this.selected ? 0 : -1 }, h("slot", null)))));
44
44
  }
45
45
  static get is() { return "wm-tab-item"; }
46
46
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,12 @@
1
1
  import { forceUpdate, h, Host } from "@stencil/core";
2
- import { debounce } from "../../../global/functions";
2
+ import { debounce, intl } from "../../../global/functions";
3
3
  export class TabList {
4
4
  constructor() {
5
+ this.selectLabel = intl.formatMessage({
6
+ id: "tab.selectLabel",
7
+ defaultMessage: "Choose a tab",
8
+ description: "Tab refers to a tab UI element",
9
+ });
5
10
  this.debouncedSetLayout = debounce(() => {
6
11
  if (!this.listWidth) {
7
12
  this.setListWidth();
@@ -135,7 +140,7 @@ export class TabList {
135
140
  renderMenuOrTabs() {
136
141
  if (this.menuLayout) {
137
142
  this.hideItems();
138
- return (h("wm-select", { label: "Choose a tab", "label-position": "none" }, this.renderOptions()));
143
+ return (h("wm-select", { label: this.selectLabel, "label-position": "none" }, this.renderOptions()));
139
144
  }
140
145
  else {
141
146
  this.showItems();
@@ -155,7 +160,7 @@ export class TabList {
155
160
  } }, t.textContent)));
156
161
  }
157
162
  render() {
158
- return h(Host, { key: '226fe27325450249c54dd968e987b830a6a9b2ef', class: this.menuLayout ? "menu" : "" }, this.renderMenuOrTabs());
163
+ return h(Host, { class: this.menuLayout ? "menu" : "" }, this.renderMenuOrTabs());
159
164
  }
160
165
  static get is() { return "wm-tab-list"; }
161
166
  static get encapsulation() { return "shadow"; }
@@ -12,7 +12,7 @@ export class TabPanel {
12
12
  this.tabPanelLoaded.emit({ tabId: this.tabId });
13
13
  }
14
14
  render() {
15
- return h(Host, { key: '0f98f2483566f5c10062cf2413ef5a03417f2e6e', role: "tabpanel", class: { "tab-hidden": !this.active } });
15
+ return h(Host, { role: "tabpanel", class: { "tab-hidden": !this.active } });
16
16
  }
17
17
  static get is() { return "wm-tab-panel"; }
18
18
  static get originalStyleUrls() {
@@ -0,0 +1,91 @@
1
+ import { newE2EPage } from "@stencil/core/testing";
2
+ describe("wm-tab-item", () => {
3
+ let page; //, mock: any;
4
+ beforeEach(async () => {
5
+ page = await newE2EPage();
6
+ await page.setContent(`<html lang='en' dir="ltr">
7
+ <head><title>Page</title></head>
8
+ <body>
9
+ <main style="height: 3000px">
10
+ <h1>Title</h1>
11
+ <div id="tab-container">
12
+ <wm-tab-list id="test-tab" selected-tab="first">
13
+ <wm-tab-item tab-id="first" id="first-tab">First</wm-tab-item>
14
+ <wm-tab-item tab-id="second" id="second-tab">Second</wm-tab-item>
15
+ </wm-tab-list>
16
+ <wm-tab-panel tab-id="first" id="dynamic-panel">Tab Content First</wm-tab-panel>
17
+ </div>
18
+ <div id="test-div"></div>
19
+ </main>
20
+ </body>
21
+ </html>`);
22
+ await page.evaluate(async () => {
23
+ const container = document.querySelector("#tab-container");
24
+ container.addEventListener("wmTabSelected", (ev) => {
25
+ const tabList = document.querySelector("#test-tab");
26
+ tabList.selectedTab = ev.detail.tabId;
27
+ });
28
+ });
29
+ await page.waitForChanges();
30
+ });
31
+ it("renders a list item with a role of presentation and with a link that has a role of tab", async () => {
32
+ const tabItem = await page.find("wm-tab-item");
33
+ const listItem = await tabItem.shadowRoot.querySelector("li");
34
+ expect(listItem).not.toBeNull();
35
+ expect(listItem.getAttribute("role")).toEqual("presentation");
36
+ const link = await tabItem.shadowRoot.querySelector("a");
37
+ expect(link).not.toBeNull();
38
+ expect(link.getAttribute("role")).toEqual("tab");
39
+ });
40
+ it("emits an event when clicked or enter is pressed", async () => {
41
+ const wmTabSelectedSpy = await page.spyOnEvent("wmTabSelected");
42
+ await page.keyboard.press("Tab");
43
+ await page.keyboard.press("ArrowRight");
44
+ await page.keyboard.press("Enter");
45
+ expect(wmTabSelectedSpy).toHaveReceivedEventDetail({ tabId: "second" });
46
+ jest.restoreAllMocks();
47
+ });
48
+ it("has an aria-selected attribute set to true when it is selected", async () => {
49
+ await page.keyboard.press("Tab"); // To next tab component
50
+ await page.keyboard.press("ArrowRight");
51
+ await page.keyboard.press("Enter");
52
+ await page.waitForChanges();
53
+ let secondTabItemUncontrolled = await page.find("#second-tab");
54
+ const linkUncontrolled = await secondTabItemUncontrolled.shadowRoot.querySelector("#tab-link-second");
55
+ const selectedStatusUncontrolled = await linkUncontrolled.getAttribute("aria-selected");
56
+ expect(selectedStatusUncontrolled).toBe("true");
57
+ });
58
+ it("renders an unordered list with a role of tablist", async () => {
59
+ const ulElement = await page.find("wm-tab-list >>> ul");
60
+ expect(ulElement).not.toBeNull();
61
+ expect(ulElement.getAttribute("role")).toEqual("tablist");
62
+ });
63
+ it("has a role of tabpanel", async () => {
64
+ const tabPanel = await page.find("wm-tab-panel");
65
+ expect(tabPanel.getAttribute("role")).toEqual("tabpanel");
66
+ });
67
+ it("displays if the tab item with the same tabId is selected", async () => {
68
+ const dynamicPanel = await page.find("#dynamic-panel");
69
+ expect(dynamicPanel).not.toHaveClass("tab-hidden");
70
+ });
71
+ it("does not display if the tab item with the same tabId is not selected", async () => { });
72
+ it("has an aria-labelledby attribute that corresponds to the correct tab", async () => {
73
+ //uncontrolled -- tab panel attribute is dynamic
74
+ let changingTabPanel = await page.find("#dynamic-panel");
75
+ const label = await changingTabPanel.getAttribute("aria-labelledby");
76
+ expect(label).toEqual("tab-link-first");
77
+ let secondTabItemUncontrolled = await page.find("#second-tab");
78
+ await secondTabItemUncontrolled.click();
79
+ await page.waitForChanges();
80
+ changingTabPanel = await page.find("#dynamic-panel");
81
+ const newLabel = await changingTabPanel.getAttribute("aria-labelledby");
82
+ expect(newLabel).toEqual("tab-link-second");
83
+ });
84
+ it("switches to a dropdown at the appropriate breakpoint", async () => {
85
+ const comp = await page.find("wm-tab-list");
86
+ expect(comp).toMatchSnapshot();
87
+ page.setViewport({ width: 300, height: 900 });
88
+ await page.waitForChanges();
89
+ expect(comp).toMatchSnapshot();
90
+ });
91
+ });
@@ -0,0 +1,12 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { TabList } from "./wm-tab-list/wm-tab-list";
3
+ import { TabItem } from "./wm-tab-item/wm-tab-item";
4
+ describe("wm-tabs", () => {
5
+ it("builds", async () => {
6
+ const page = await newSpecPage({
7
+ components: [TabList, TabItem],
8
+ html: '<wm-tab-list><wm-tab-item id="tab1"></wm-tab-item></wm-tab-list>',
9
+ });
10
+ expect(page.root).toMatchSnapshot();
11
+ });
12
+ });
@@ -0,0 +1,204 @@
1
+ import AxePuppeteer from "@axe-core/puppeteer";
2
+ import { newE2EPage } from "@stencil/core/testing";
3
+ describe("wm-tag-input", () => {
4
+ // ts throws erroneous warning about vars being unused...
5
+ // @ts-ignore
6
+ let page, el, input;
7
+ beforeEach(async () => {
8
+ page = await newE2EPage();
9
+ await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
10
+ <wm-tag-input label='label'>
11
+ <wm-tag-option>One</wm-tag-option>
12
+ <wm-tag-option>Two</wm-tag-option>
13
+ <wm-tag-option>Three</wm-tag-option>
14
+ </wm-tag-input>
15
+ </main></body></html>`);
16
+ el = await page.find("wm-tag-input");
17
+ input = await page.find("wm-tag-input >>> input");
18
+ await page.waitForChanges();
19
+ });
20
+ it("passes Axe checks", async () => {
21
+ const results = await new AxePuppeteer(page).analyze();
22
+ expect(results.violations.length).toBe(0);
23
+ });
24
+ it.skip("uses Enter and Comma to add a new tag", async () => {
25
+ page = await newE2EPage();
26
+ await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
27
+ <wm-tag-input label='label'></wm-tag-input>
28
+ </main></body></html>`);
29
+ await page.waitForChanges();
30
+ await page.keyboard.press("Tab");
31
+ await page.waitForChanges();
32
+ await page.keyboard.type("Hello");
33
+ await page.waitForChanges();
34
+ await page.keyboard.press("Enter");
35
+ await page.waitForChanges();
36
+ let tags = await page.findAll("wm-tag-input >>> .tag");
37
+ expect(tags[0].textContent).toBe("Hello");
38
+ await page.keyboard.type("Apple");
39
+ await page.waitForChanges();
40
+ await page.keyboard.type(",");
41
+ await page.waitForChanges();
42
+ tags = await page.findAll("wm-tag-input >>> .tag");
43
+ expect(tags[1].textContent).toBe("Apple");
44
+ // it clears the input when adding a tag
45
+ const input = await page.find("wm-tag-input >>> input");
46
+ const inputValue = await input.getProperty("value");
47
+ expect(inputValue).toBe("");
48
+ // it includes user-added options in the dropdown
49
+ const listItems = await page.findAll("wm-tag-input >>> .option");
50
+ expect(listItems[0].textContent).toBe("Apple");
51
+ expect(listItems[1].textContent).toBe("Hello");
52
+ // it shows tags in the order they are added
53
+ await page.keyboard.type("Third");
54
+ await page.waitForChanges();
55
+ await page.keyboard.press("Enter");
56
+ await page.waitForChanges();
57
+ tags = await page.findAll("wm-tag-input >>> .tag");
58
+ expect(tags[0].textContent).toBe("Hello");
59
+ expect(tags[1].textContent).toBe("Apple");
60
+ expect(tags[2].textContent).toBe("Third");
61
+ });
62
+ it("displays column1 text instead of id for table variant", async () => {
63
+ page = await newE2EPage();
64
+ await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
65
+ <wm-tag-input
66
+ tag-input-type="table"
67
+ label="Share Access"
68
+ col-headers="Name,Email,Role"
69
+ col-widths=",40%,20%"
70
+ col-wrap="wrap,trunc,wrap"
71
+ >
72
+ <wm-tag-option selected id="johnprice1" col1="John Price" col2="john.price1@university.edu" col3="Admin" locked></wm-tag-option>
73
+ <wm-tag-option id="johnprice2" col1="John Price" col2="john.price2@university.edu" col3="Faculty"></wm-tag-option>
74
+ <wm-tag-option id="samsandwich" col1="Sam Sandwich" col2="sam.sandwich@university.edu" col3="Faculty"></wm-tag-option>
75
+ </wm-tag-input>
76
+ </main></body></html>`);
77
+ await page.waitForChanges();
78
+ let tagTextList = await page.findAll("wm-tag-input >>> .tag-text");
79
+ expect(tagTextList[0].textContent).toBe("John Price");
80
+ });
81
+ it("does not allow adding tags if add-new prop is false", async () => {
82
+ page = await newE2EPage();
83
+ await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
84
+ <wm-tag-input label='label' add-new="false"></wm-tag-input>
85
+ </main></body></html>`);
86
+ await page.keyboard.press("Tab");
87
+ await page.waitForChanges();
88
+ await page.keyboard.press("Tab");
89
+ await page.waitForChanges();
90
+ await page.keyboard.type("New Tag");
91
+ await page.waitForChanges();
92
+ await page.keyboard.press("Enter");
93
+ await page.waitForChanges();
94
+ const tags = await page.findAll("wm-tag-input >>> .tag");
95
+ expect(tags.length).toBe(0);
96
+ });
97
+ it("does not allow duplicate tags to be added", async () => {
98
+ page = await newE2EPage();
99
+ await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
100
+ <wm-tag-input label='label'>
101
+ <wm-tag-option selected>one</wm-tag-option>
102
+ </wm-tag-input>
103
+ </main></body></html>`);
104
+ let tags = await page.findAll("wm-tag-input >>> .tag");
105
+ expect(tags.length).toBe(1);
106
+ await page.keyboard.press("Tab");
107
+ await page.waitForChanges();
108
+ await page.keyboard.press("Tab");
109
+ await page.waitForChanges();
110
+ await page.keyboard.type("one");
111
+ await page.waitForChanges();
112
+ await page.keyboard.press("Enter");
113
+ await page.waitForChanges();
114
+ await page.keyboard.press("Delete");
115
+ await page.keyboard.press("Delete");
116
+ await page.keyboard.press("Delete");
117
+ await page.waitForChanges();
118
+ // it is case insensitive
119
+ await page.keyboard.type("OnE");
120
+ await page.waitForChanges();
121
+ await page.keyboard.press("Enter");
122
+ await page.waitForChanges();
123
+ expect(tags.length).toBe(1);
124
+ });
125
+ it("opens dropdown when input field is focused", async () => {
126
+ const dropdown = await page.find("wm-tag-input >>> .dropdown-wrapper");
127
+ expect(dropdown).not.toHaveClass("open");
128
+ await input.focus();
129
+ expect(dropdown).toHaveClass("open");
130
+ });
131
+ it("closes dropdown", async () => {
132
+ //
133
+ // when pressing escape twice
134
+ // when clicking outside of component
135
+ // when tabbing out of component
136
+ // not while tabbing inside of component
137
+ });
138
+ it("renders the add new button when typing in the input", async () => { });
139
+ it("removes only user-added tags from the dropdown", async () => {
140
+ // Removing a pre-existing tag will have it still in the dropdown
141
+ // removing a user-added tag will remove it from the dropdown
142
+ });
143
+ it("navigates the dropdown with arrow keys", async () => {
144
+ let options = await page.findAll("wm-tag-input >>> .option");
145
+ await page.keyboard.press("Tab");
146
+ await page.waitForChanges();
147
+ await page.keyboard.press("ArrowDown");
148
+ await page.waitForChanges();
149
+ expect(options[0]).toHaveClass("focused");
150
+ expect(options[1]).not.toHaveClass("focused");
151
+ expect(options[2]).not.toHaveClass("focused");
152
+ await page.keyboard.press("ArrowDown");
153
+ await page.waitForChanges();
154
+ expect(options[0]).not.toHaveClass("focused");
155
+ expect(options[1]).toHaveClass("focused");
156
+ expect(options[2]).not.toHaveClass("focused");
157
+ await page.keyboard.press("ArrowDown");
158
+ await page.waitForChanges();
159
+ expect(options[0]).not.toHaveClass("focused");
160
+ expect(options[1]).not.toHaveClass("focused");
161
+ expect(options[2]).toHaveClass("focused");
162
+ await page.keyboard.press("ArrowDown");
163
+ await page.waitForChanges();
164
+ expect(options[0]).toHaveClass("focused");
165
+ expect(options[1]).not.toHaveClass("focused");
166
+ expect(options[2]).not.toHaveClass("focused");
167
+ await page.keyboard.press("ArrowUp");
168
+ await page.waitForChanges();
169
+ expect(options[0]).not.toHaveClass("focused");
170
+ expect(options[1]).not.toHaveClass("focused");
171
+ expect(options[2]).toHaveClass("focused");
172
+ });
173
+ it("navigates tags with left and right keys", async () => {
174
+ page = await newE2EPage();
175
+ await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
176
+ <wm-tag-input label='label'>
177
+ <wm-tag-option selected>One</wm-tag-option>
178
+ <wm-tag-option selected>Two</wm-tag-option>
179
+ <wm-tag-option selected>Three</wm-tag-option>
180
+ </wm-tag-input>
181
+ </main></body></html>`);
182
+ let tags = await page.findAll("wm-tag-input >>> .tag");
183
+ await page.keyboard.press("Tab");
184
+ await page.waitForChanges();
185
+ expect(tags[0]).toHaveClass("focused");
186
+ expect(tags[1]).not.toHaveClass("focused");
187
+ expect(tags[2]).not.toHaveClass("focused");
188
+ await page.keyboard.press("ArrowRight");
189
+ await page.waitForChanges();
190
+ expect(tags[0]).not.toHaveClass("focused");
191
+ expect(tags[1]).toHaveClass("focused");
192
+ expect(tags[2]).not.toHaveClass("focused");
193
+ await page.keyboard.press("ArrowLeft");
194
+ await page.waitForChanges();
195
+ expect(tags[0]).toHaveClass("focused");
196
+ expect(tags[1]).not.toHaveClass("focused");
197
+ expect(tags[2]).not.toHaveClass("focused");
198
+ await page.keyboard.press("ArrowLeft");
199
+ await page.waitForChanges();
200
+ expect(tags[0]).not.toHaveClass("focused");
201
+ expect(tags[1]).not.toHaveClass("focused");
202
+ expect(tags[2]).toHaveClass("focused");
203
+ });
204
+ });