@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.
- package/dist/{esm/global-861eb453.js → cjs/app-globals-4dfe82d1.js} +10 -1
- package/dist/cjs/{chartFunctions-ce6c7c16.js → chartFunctions-878f8139.js} +3 -3
- package/dist/cjs/{functions-3be85c6d.js → functions-05e7ad5a.js} +104 -7
- package/dist/cjs/index-788526f5.js +1851 -0
- package/dist/cjs/{intl-567eb9d8.js → intl-2b550151.js} +1 -1
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/priv-calendar.cjs.entry.js +6 -5
- package/dist/cjs/priv-chart-popover.cjs.entry.js +6 -5
- package/dist/cjs/priv-navigator-button.cjs.entry.js +4 -3
- package/dist/cjs/priv-navigator-item.cjs.entry.js +4 -3
- package/dist/cjs/ripple.cjs.js +12 -11
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +8 -6
- package/dist/cjs/wm-button.cjs.entry.js +5 -4
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +7 -6
- package/dist/cjs/wm-date-range.cjs.entry.js +9 -8
- package/dist/cjs/wm-datepicker.cjs.entry.js +13 -14
- package/dist/cjs/wm-file-list.cjs.entry.js +4 -3
- package/dist/cjs/wm-file.cjs.entry.js +5 -4
- package/dist/cjs/wm-input.cjs.entry.js +6 -5
- package/dist/cjs/wm-line-chart.cjs.entry.js +15 -14
- package/dist/cjs/wm-modal-footer.cjs.entry.js +4 -3
- package/dist/cjs/wm-modal-header.cjs.entry.js +6 -5
- package/dist/cjs/wm-modal.cjs.entry.js +6 -5
- package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -10
- package/dist/cjs/wm-navigator.cjs.entry.js +4 -3
- package/dist/cjs/wm-option_2.cjs.entry.js +10 -8
- package/dist/cjs/wm-pagination.cjs.entry.js +5 -4
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +9 -7
- package/dist/cjs/wm-search.cjs.entry.js +7 -6
- package/dist/cjs/wm-snackbar.cjs.entry.js +7 -6
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +11 -8
- package/dist/cjs/wm-tag-input.cjs.entry.js +8 -7
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +6 -5
- package/dist/cjs/wm-timepicker.cjs.entry.js +6 -5
- package/dist/cjs/wm-toggletip.cjs.entry.js +6 -5
- package/dist/cjs/wm-uploader.cjs.entry.js +7 -6
- package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/charts/chartFunctions.js +1 -1
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
- package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
- package/dist/collection/components/datepickers/wm-date-range.js +17 -13
- package/dist/collection/components/datepickers/wm-datepicker.js +21 -19
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-file/wm-file.js +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
- package/dist/collection/components/wm-input/wm-input.js +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-option/wm-option.js +1 -1
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.js +5 -4
- package/dist/collection/components/wm-select/wm-select.js +2 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +11 -8
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
- package/dist/{cjs/global-ad843e7f.js → esm/app-globals-b8b36bbb.js} +7 -2
- package/dist/esm/{chartFunctions-0ebf83f3.js → chartFunctions-00fd6f23.js} +3 -3
- package/dist/esm/{functions-46843ea0.js → functions-25781571.js} +105 -8
- package/dist/esm/index-130e07bb.js +1820 -0
- package/dist/esm/{intl-8b8740b9.js → intl-df3d34d1.js} +1 -1
- package/dist/esm/loader.js +5 -4
- package/dist/esm/priv-calendar.entry.js +6 -5
- package/dist/esm/priv-chart-popover.entry.js +6 -5
- package/dist/esm/priv-navigator-button.entry.js +4 -3
- package/dist/esm/priv-navigator-item.entry.js +4 -3
- package/dist/esm/ripple.js +13 -12
- package/dist/esm/wm-action-menu_2.entry.js +8 -6
- package/dist/esm/wm-button.entry.js +5 -4
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +7 -6
- package/dist/esm/wm-date-range.entry.js +9 -8
- package/dist/esm/wm-datepicker.entry.js +13 -14
- package/dist/esm/wm-file-list.entry.js +4 -3
- package/dist/esm/wm-file.entry.js +5 -4
- package/dist/esm/wm-input.entry.js +6 -5
- package/dist/esm/wm-line-chart.entry.js +15 -14
- package/dist/esm/wm-modal-footer.entry.js +4 -3
- package/dist/esm/wm-modal-header.entry.js +6 -5
- package/dist/esm/wm-modal.entry.js +6 -5
- package/dist/esm/wm-navigation_3.entry.js +13 -10
- package/dist/esm/wm-navigator.entry.js +4 -3
- package/dist/esm/wm-option_2.entry.js +10 -8
- package/dist/esm/wm-pagination.entry.js +5 -4
- package/dist/esm/wm-progress-indicator_3.entry.js +9 -7
- package/dist/esm/wm-search.entry.js +7 -6
- package/dist/esm/wm-snackbar.entry.js +7 -6
- package/dist/esm/wm-tab-item_3.entry.js +11 -8
- package/dist/esm/wm-tag-input.entry.js +8 -7
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +6 -5
- package/dist/esm/wm-timepicker.entry.js +6 -5
- package/dist/esm/wm-toggletip.entry.js +6 -5
- package/dist/esm/wm-uploader.entry.js +7 -6
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/app-globals-b8b36bbb.js +1 -0
- package/dist/esm-es5/{chartFunctions-0ebf83f3.js → chartFunctions-00fd6f23.js} +1 -1
- package/dist/esm-es5/functions-25781571.js +1 -0
- package/dist/esm-es5/index-130e07bb.js +1 -0
- package/dist/esm-es5/{intl-8b8740b9.js → intl-df3d34d1.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/cdn.js +1 -2
- package/dist/loader/index.cjs.js +1 -2
- package/dist/loader/index.d.ts +3 -0
- package/dist/loader/index.es2017.js +1 -2
- package/dist/loader/index.js +1 -2
- package/dist/ripple/{p-99dd083d.system.js → p-03708b88.system.js} +1 -1
- package/dist/ripple/{p-45abd8fe.entry.js → p-041e579b.entry.js} +1 -1
- package/dist/ripple/{p-65d26233.system.entry.js → p-043901ab.system.entry.js} +1 -1
- package/dist/ripple/p-0af94825.entry.js +1 -0
- package/dist/ripple/p-0ff41567.system.entry.js +1 -0
- package/dist/ripple/p-1044e1dc.system.js +1 -0
- package/dist/ripple/{p-48e09589.entry.js → p-13b1d775.entry.js} +1 -1
- package/dist/ripple/p-13fc2164.entry.js +1 -0
- package/dist/ripple/p-155224a2.system.entry.js +1 -0
- package/dist/ripple/p-17bb1157.system.entry.js +1 -0
- package/dist/ripple/p-1f09134c.entry.js +1 -0
- package/dist/ripple/{p-204bdd73.entry.js → p-298bde1b.entry.js} +1 -1
- package/dist/ripple/p-298c2675.entry.js +1 -0
- package/dist/ripple/p-2d619f83.entry.js +1 -0
- package/dist/ripple/p-2ef49c84.entry.js +1 -0
- package/dist/ripple/p-2fd12dd9.entry.js +1 -0
- package/dist/ripple/p-3423a9b6.system.entry.js +1 -0
- package/dist/ripple/p-376efca9.entry.js +1 -0
- package/dist/ripple/p-38ccde69.system.js +1 -0
- package/dist/ripple/{p-e3241417.system.entry.js → p-3b4045f8.system.entry.js} +1 -1
- package/dist/ripple/p-3b5f4364.system.entry.js +1 -0
- package/dist/ripple/p-417c8e46.system.entry.js +1 -0
- package/dist/ripple/p-418ed08c.system.entry.js +1 -0
- package/dist/ripple/{p-28b70082.system.entry.js → p-41eb6a2e.system.entry.js} +1 -1
- package/dist/ripple/p-4670ccb4.system.js +1 -0
- package/dist/ripple/p-4baaf026.entry.js +1 -0
- package/dist/ripple/p-4ea1e503.entry.js +1 -0
- package/dist/ripple/p-5051034b.entry.js +1 -0
- package/dist/ripple/p-56766bb2.entry.js +1 -0
- package/dist/ripple/p-5caaf651.system.entry.js +1 -0
- package/dist/ripple/p-5ece78e5.system.entry.js +1 -0
- package/dist/ripple/{p-42d1c301.entry.js → p-672ae2cb.entry.js} +1 -1
- package/dist/ripple/{p-3a44e1c8.entry.js → p-67a7f0b0.entry.js} +1 -1
- package/dist/ripple/p-6d0e5159.system.entry.js +1 -0
- package/dist/ripple/p-6d56676e.system.entry.js +1 -0
- package/dist/ripple/{p-7326b62a.entry.js → p-6e60631a.entry.js} +1 -1
- package/dist/ripple/{p-b7ead395.system.entry.js → p-6fe35d1e.system.entry.js} +1 -1
- package/dist/ripple/p-748f8a97.system.entry.js +1 -0
- package/dist/ripple/p-7eab6bea.system.entry.js +1 -0
- package/dist/ripple/p-7fb95b89.entry.js +1 -0
- package/dist/ripple/{p-32bf3f5b.system.entry.js → p-823d7b4e.system.entry.js} +1 -1
- package/dist/ripple/p-830f8b3f.entry.js +1 -0
- package/dist/ripple/p-86fd68b3.system.entry.js +1 -0
- package/dist/ripple/p-88cfd58d.js +1 -0
- package/dist/ripple/p-89b27fbb.js +1 -0
- package/dist/ripple/p-8b56f9d8.system.entry.js +1 -0
- package/dist/ripple/{p-8159cdf5.entry.js → p-8e72de50.entry.js} +1 -1
- package/dist/ripple/{p-510679f8.system.entry.js → p-a1a2f8c9.system.entry.js} +1 -1
- package/dist/ripple/p-a62e7532.entry.js +1 -0
- package/dist/ripple/{p-f92bd0c1.js → p-a88bf1c5.js} +1 -1
- package/dist/ripple/{p-1ac66a15.system.js → p-a9d89ac8.system.js} +1 -1
- package/dist/ripple/{p-a152cf3a.system.entry.js → p-aab56a37.system.entry.js} +1 -1
- package/dist/ripple/{p-79106e23.system.entry.js → p-ac40417b.system.entry.js} +1 -1
- package/dist/ripple/{p-ffb31979.system.entry.js → p-b0c566b5.system.entry.js} +1 -1
- package/dist/ripple/p-b41ef3db.entry.js +1 -0
- package/dist/ripple/p-b7307be6.system.entry.js +1 -0
- package/dist/ripple/p-b80d9402.system.entry.js +1 -0
- package/dist/ripple/p-b8168f35.system.entry.js +1 -0
- package/dist/ripple/{p-dbc112a6.entry.js → p-bcff8b3a.entry.js} +1 -1
- package/dist/ripple/p-c2181de0.entry.js +1 -0
- package/dist/ripple/{p-88ebddd7.entry.js → p-cd0cc88d.entry.js} +1 -1
- package/dist/ripple/p-cef8a45b.system.js +2 -0
- package/dist/ripple/p-d5ba9de1.system.entry.js +1 -0
- package/dist/ripple/{p-df1a11f1.system.entry.js → p-d93c51dd.system.entry.js} +1 -1
- package/dist/ripple/p-d9da0502.js +2 -0
- package/dist/ripple/p-e2fe86a7.system.entry.js +1 -0
- package/dist/ripple/p-e85b1f40.entry.js +1 -0
- package/dist/ripple/p-ea0dfadf.system.entry.js +1 -0
- package/dist/ripple/p-eb14b354.entry.js +1 -0
- package/dist/ripple/p-ecb6c756.entry.js +1 -0
- package/dist/ripple/p-f09e2c22.entry.js +1 -0
- package/dist/ripple/p-f17fd62b.entry.js +1 -0
- package/dist/ripple/{p-d79fdf0b.js → p-f54e9ed0.js} +1 -1
- package/dist/ripple/p-fabe4ca4.entry.js +1 -0
- package/dist/ripple/{p-5d0e2006.system.entry.js → p-fc529ba1.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/package.json +2 -2
- package/dist/cjs/index-e86c28b6.js +0 -2641
- package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
- package/dist/collection/components/charts/screenshots.e2e.js +0 -96
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +0 -89
- package/dist/collection/components/datepickers/wm-date-range.e2e.js +0 -443
- package/dist/collection/components/datepickers/wm-date-range.spec.js +0 -22
- package/dist/collection/components/datepickers/wm-datepicker.e2e.js +0 -382
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +0 -21
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
- package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
- package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
- package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
- package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
- package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
- package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
- package/dist/collection/components/wm-option/wm-option.e2e.js +0 -22
- package/dist/collection/components/wm-option/wm-option.spec.js +0 -63
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
- package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
- package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
- package/dist/collection/components/wm-select/wm-select.e2e.js +0 -521
- package/dist/collection/components/wm-select/wm-select.spec.js +0 -271
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
- package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
- package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
- package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
- package/dist/collection/global/functions.spec.js +0 -126
- package/dist/collection/lang/lang.spec.js +0 -20
- package/dist/esm/index-558b5a82.js +0 -2610
- package/dist/esm-es5/functions-46843ea0.js +0 -1
- package/dist/esm-es5/global-861eb453.js +0 -1
- package/dist/esm-es5/index-558b5a82.js +0 -1
- package/dist/ripple/p-011477e2.entry.js +0 -1
- package/dist/ripple/p-021ff5fa.system.entry.js +0 -1
- package/dist/ripple/p-057ec1e4.js +0 -1
- package/dist/ripple/p-09a31f0c.entry.js +0 -1
- package/dist/ripple/p-0ea8609b.system.entry.js +0 -1
- package/dist/ripple/p-240124b0.system.entry.js +0 -1
- package/dist/ripple/p-26fbc7f5.system.entry.js +0 -1
- package/dist/ripple/p-294b38ca.system.entry.js +0 -1
- package/dist/ripple/p-2b05bf05.entry.js +0 -1
- package/dist/ripple/p-311923b2.system.entry.js +0 -1
- package/dist/ripple/p-31976813.entry.js +0 -1
- package/dist/ripple/p-33679b9d.entry.js +0 -1
- package/dist/ripple/p-34b5830f.system.js +0 -1
- package/dist/ripple/p-3568472c.entry.js +0 -1
- package/dist/ripple/p-3b8b1b44.system.entry.js +0 -1
- package/dist/ripple/p-4a6854d3.system.entry.js +0 -1
- package/dist/ripple/p-4c8db09c.system.entry.js +0 -1
- package/dist/ripple/p-4d0b1890.entry.js +0 -1
- package/dist/ripple/p-568c595f.js +0 -2
- package/dist/ripple/p-62a8f09c.entry.js +0 -1
- package/dist/ripple/p-6885d780.system.js +0 -1
- package/dist/ripple/p-7e6f5a1e.system.entry.js +0 -1
- package/dist/ripple/p-822618d7.entry.js +0 -1
- package/dist/ripple/p-825bd63b.entry.js +0 -1
- package/dist/ripple/p-884294c6.entry.js +0 -1
- package/dist/ripple/p-8fbddb6c.system.entry.js +0 -1
- package/dist/ripple/p-902a54c5.entry.js +0 -1
- package/dist/ripple/p-905dd4da.system.entry.js +0 -1
- package/dist/ripple/p-99c24568.system.entry.js +0 -1
- package/dist/ripple/p-a03f7141.entry.js +0 -1
- package/dist/ripple/p-a27d2177.entry.js +0 -1
- package/dist/ripple/p-a8524a48.entry.js +0 -1
- package/dist/ripple/p-ab8d78cc.system.js +0 -2
- package/dist/ripple/p-ade3d9a9.entry.js +0 -1
- package/dist/ripple/p-b2dac998.system.entry.js +0 -1
- package/dist/ripple/p-bc5e9d24.entry.js +0 -1
- package/dist/ripple/p-bd6b8cf2.system.js +0 -1
- package/dist/ripple/p-bf636261.entry.js +0 -1
- package/dist/ripple/p-c47811a2.entry.js +0 -1
- package/dist/ripple/p-c4b9d46d.entry.js +0 -1
- package/dist/ripple/p-c885c7f9.entry.js +0 -1
- package/dist/ripple/p-c9543950.system.entry.js +0 -1
- package/dist/ripple/p-cacfbaf1.system.entry.js +0 -1
- package/dist/ripple/p-d24882a7.system.entry.js +0 -1
- package/dist/ripple/p-d33d6e96.system.entry.js +0 -1
- package/dist/ripple/p-df2560f3.system.entry.js +0 -1
- package/dist/ripple/p-e3bcdde8.system.entry.js +0 -1
- package/dist/ripple/p-e83a98d3.entry.js +0 -1
- package/dist/ripple/p-e995f7f0.js +0 -1
- package/dist/ripple/p-eaac6bcd.entry.js +0 -1
- package/dist/ripple/p-fd0aae67.system.entry.js +0 -1
|
@@ -1,521 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
import { AxePuppeteer } from "@axe-core/puppeteer";
|
|
3
|
-
describe("wm-select", () => {
|
|
4
|
-
let page;
|
|
5
|
-
async function createPageHelper() {
|
|
6
|
-
page = await newE2EPage();
|
|
7
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
8
|
-
<wm-select id='test' label="Make a selection">
|
|
9
|
-
<wm-option id='first' selected>First option</wm-option>
|
|
10
|
-
<wm-option id='second'>Second option</wm-option>
|
|
11
|
-
<wm-option id='third'>Third option</wm-option>
|
|
12
|
-
</wm-select>
|
|
13
|
-
</main></body></html>`);
|
|
14
|
-
}
|
|
15
|
-
it("passes Axe checks", async () => {
|
|
16
|
-
await createPageHelper();
|
|
17
|
-
const results = await new AxePuppeteer(page).analyze();
|
|
18
|
-
expect(results.violations.length).toBe(0);
|
|
19
|
-
});
|
|
20
|
-
// RENDER
|
|
21
|
-
it("renders", async () => {
|
|
22
|
-
await createPageHelper();
|
|
23
|
-
const element = await page.find("wm-select");
|
|
24
|
-
await page.waitForChanges();
|
|
25
|
-
expect(element).not.toBeNull();
|
|
26
|
-
});
|
|
27
|
-
// ATTRIBUTES
|
|
28
|
-
it("has the right WAI_ARIA roles, states and properties", async () => {
|
|
29
|
-
await createPageHelper();
|
|
30
|
-
const button = await page.find("wm-select >>> button");
|
|
31
|
-
const listbox = await page.find("wm-select >>> #list");
|
|
32
|
-
/* check aria-expanded attribute */
|
|
33
|
-
expect(button).toEqualAttribute("aria-expanded", "false");
|
|
34
|
-
/* The listbox has tabindex="-1" */
|
|
35
|
-
expect(listbox).toEqualAttribute("tabindex", "-1");
|
|
36
|
-
/* Roving tabindex: we're setting tabindex dynamically. follows focus */
|
|
37
|
-
/* https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_roving_tabindex */
|
|
38
|
-
await page.keyboard.press("Tab");
|
|
39
|
-
await page.waitForChanges();
|
|
40
|
-
await page.keyboard.press("Enter"); // open popup
|
|
41
|
-
await page.waitForChanges();
|
|
42
|
-
const first = await page.find("#first");
|
|
43
|
-
await page.waitForChanges();
|
|
44
|
-
expect(first).toEqualAttribute("tabIndex", "0");
|
|
45
|
-
/* In a single-select listbox, the selected option has aria-selected set to true. */
|
|
46
|
-
await page.keyboard.press("ArrowDown");
|
|
47
|
-
await page.waitForChanges();
|
|
48
|
-
await page.keyboard.press("ArrowDown");
|
|
49
|
-
await page.waitForChanges();
|
|
50
|
-
const third = await page.find("#third");
|
|
51
|
-
expect(third).toEqualAttribute("tabIndex", "0"); // third is focused...
|
|
52
|
-
expect(first).toEqualAttribute("aria-selected", true); // ...first is still selected (default)
|
|
53
|
-
});
|
|
54
|
-
it("switches the dropdown direction", async () => {
|
|
55
|
-
// Viewport is 800 x 600 by default
|
|
56
|
-
// with the first select at the top of the page
|
|
57
|
-
// and the 2nd one at the bottom
|
|
58
|
-
page = await newE2EPage();
|
|
59
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
60
|
-
<wm-select id='select1' label="Make a selection">
|
|
61
|
-
<wm-option id='first' selected>First option</wm-option>
|
|
62
|
-
<wm-option id='second'>Second option</wm-option>
|
|
63
|
-
<wm-option id='third'>Third option</wm-option>
|
|
64
|
-
</wm-select>
|
|
65
|
-
<div style="height: 500px">A big block</div>
|
|
66
|
-
<wm-select id='select2' label="Make a selection">
|
|
67
|
-
<wm-option id='first' selected>First option</wm-option>
|
|
68
|
-
<wm-option id='second'>Second option</wm-option>
|
|
69
|
-
<wm-option id='third'>Third option</wm-option>
|
|
70
|
-
</wm-select>
|
|
71
|
-
</main></body></html>`);
|
|
72
|
-
// dropdown goes down by default, but if there is not
|
|
73
|
-
// enough space under the component AND there is more space above,
|
|
74
|
-
// it goes up
|
|
75
|
-
await page.keyboard.press("Tab");
|
|
76
|
-
await page.waitForChanges();
|
|
77
|
-
await page.keyboard.press("Enter");
|
|
78
|
-
await page.waitForChanges();
|
|
79
|
-
const select1_options = await page.find("#select1 >>> .dropdown");
|
|
80
|
-
await page.waitForChanges();
|
|
81
|
-
expect(select1_options.classList.contains("upwards")).toBeFalsy();
|
|
82
|
-
await page.keyboard.press("Tab");
|
|
83
|
-
await page.waitForChanges();
|
|
84
|
-
await page.keyboard.press("Enter");
|
|
85
|
-
await page.waitForChanges();
|
|
86
|
-
const select2_options = await page.find("#select2 >>> .dropdown");
|
|
87
|
-
await page.waitForChanges();
|
|
88
|
-
expect(select2_options.classList.contains("upwards")).toBeTruthy();
|
|
89
|
-
});
|
|
90
|
-
/* When a single-select listbox receives focus:
|
|
91
|
-
/* - If none of the options are selected before the listbox receives focus, the first option receives focus.
|
|
92
|
-
Optionally, the first option may be automatically selected. */
|
|
93
|
-
/* - If an option is selected before the listbox receives focus, focus is set on the selected option. */
|
|
94
|
-
it("automatically focuses the first option", async () => {
|
|
95
|
-
await createPageHelper();
|
|
96
|
-
await page.keyboard.press("Tab");
|
|
97
|
-
await page.waitForChanges();
|
|
98
|
-
await page.keyboard.press("Enter");
|
|
99
|
-
await page.waitForChanges();
|
|
100
|
-
const firstItem = await page.find("wm-option");
|
|
101
|
-
await page.waitForChanges();
|
|
102
|
-
expect(firstItem).toEqualAttribute("tabindex", "0");
|
|
103
|
-
});
|
|
104
|
-
/* Down Arrow: Moves focus to the next option (1). If the listbox is collapsed (2), also expands the list (3). */
|
|
105
|
-
/* Up Arrow: Moves focus to the previous option (4). If the listbox is collapsed (5), also expands the list (6). */
|
|
106
|
-
it("handles Up and Down Arrow keys", async () => {
|
|
107
|
-
await createPageHelper();
|
|
108
|
-
const btn = await page.find("wm-select >>> #selectbtn");
|
|
109
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("false"); // 2
|
|
110
|
-
await page.keyboard.press("Tab");
|
|
111
|
-
await page.waitForChanges();
|
|
112
|
-
await page.keyboard.press("ArrowDown");
|
|
113
|
-
await page.waitForChanges();
|
|
114
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("true"); // 3
|
|
115
|
-
const second = await page.find("#second");
|
|
116
|
-
await page.waitForChanges();
|
|
117
|
-
expect(second).toEqualAttribute("tabindex", "0"); // 1
|
|
118
|
-
await page.keyboard.press("ArrowDown");
|
|
119
|
-
await page.waitForChanges();
|
|
120
|
-
const third = await page.find("#third");
|
|
121
|
-
await page.waitForChanges();
|
|
122
|
-
expect(third).toEqualAttribute("tabindex", "0"); // 1
|
|
123
|
-
await page.keyboard.press("ArrowUp");
|
|
124
|
-
await page.waitForChanges();
|
|
125
|
-
expect(second).toEqualAttribute("tabindex", "0"); // 4
|
|
126
|
-
await page.keyboard.press("Enter");
|
|
127
|
-
await page.waitForChanges();
|
|
128
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("false"); // 5
|
|
129
|
-
await page.waitForTimeout(500); // focus returns to btn with a timeout to make sure SRs read the updated state
|
|
130
|
-
await page.keyboard.press("ArrowUp");
|
|
131
|
-
await page.waitForChanges();
|
|
132
|
-
await page.keyboard.press("ArrowUp");
|
|
133
|
-
await page.waitForChanges();
|
|
134
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("true"); // 6
|
|
135
|
-
});
|
|
136
|
-
/* Home: If the listbox is displayed, moves focus to first option. */
|
|
137
|
-
/* End: If the listbox is displayed, moves focus to last option. */
|
|
138
|
-
it("handles Home and End keys", async () => {
|
|
139
|
-
await createPageHelper();
|
|
140
|
-
await page.keyboard.press("Tab");
|
|
141
|
-
await page.waitForChanges();
|
|
142
|
-
await page.keyboard.press("Enter");
|
|
143
|
-
await page.waitForChanges();
|
|
144
|
-
let firstEl = await page.find("#first");
|
|
145
|
-
await page.waitForChanges();
|
|
146
|
-
expect(firstEl).toEqualAttribute("tabindex", "0");
|
|
147
|
-
await page.keyboard.press("End");
|
|
148
|
-
await page.waitForChanges();
|
|
149
|
-
let lastEl = await page.find("#third");
|
|
150
|
-
expect(lastEl).toEqualAttribute("tabindex", "0");
|
|
151
|
-
expect(firstEl).toEqualAttribute("tabindex", "-1");
|
|
152
|
-
await page.keyboard.press("Home");
|
|
153
|
-
await page.waitForChanges();
|
|
154
|
-
firstEl = await page.find("#first");
|
|
155
|
-
lastEl = await page.find("#third");
|
|
156
|
-
expect(firstEl).toEqualAttribute("tabindex", "0");
|
|
157
|
-
expect(lastEl).toEqualAttribute("tabindex", "-1");
|
|
158
|
-
});
|
|
159
|
-
/* Type-ahead is recommended for all listboxes, especially those with more than seven options: */
|
|
160
|
-
/* - Type a character: focus moves to the next item with a name that starts with the typed character. */
|
|
161
|
-
/* - Type multiple characters in rapid succession: focus moves to the next item with a name that starts with the string of characters typed */
|
|
162
|
-
it("handles typing", async () => {
|
|
163
|
-
await createPageHelper();
|
|
164
|
-
await page.keyboard.press("Tab");
|
|
165
|
-
await page.keyboard.press("Enter");
|
|
166
|
-
await page.waitForChanges();
|
|
167
|
-
await page.keyboard.press("t");
|
|
168
|
-
await page.waitForChanges();
|
|
169
|
-
const focusedEl = await page.find("#third");
|
|
170
|
-
await page.waitForChanges();
|
|
171
|
-
expect(focusedEl).toEqualAttribute("tabindex", "0");
|
|
172
|
-
});
|
|
173
|
-
// OPENING / CLOSING POPUP
|
|
174
|
-
it("Enter key opens and closes the dropdown", async () => {
|
|
175
|
-
await createPageHelper();
|
|
176
|
-
await page.keyboard.press("Tab");
|
|
177
|
-
await page.waitForChanges();
|
|
178
|
-
await page.keyboard.press("Enter");
|
|
179
|
-
await page.waitForChanges();
|
|
180
|
-
const btn = await page.find("wm-select >>> #selectbtn");
|
|
181
|
-
await page.waitForChanges();
|
|
182
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("true");
|
|
183
|
-
await page.keyboard.press("ArrowDown");
|
|
184
|
-
await page.waitForChanges();
|
|
185
|
-
await page.keyboard.press("Enter");
|
|
186
|
-
await page.waitForChanges();
|
|
187
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("false");
|
|
188
|
-
});
|
|
189
|
-
it("Space key opens and closes the dropdown", async () => {
|
|
190
|
-
await createPageHelper();
|
|
191
|
-
await page.keyboard.press("Tab");
|
|
192
|
-
await page.waitForChanges();
|
|
193
|
-
await page.keyboard.press("Space");
|
|
194
|
-
await page.waitForChanges();
|
|
195
|
-
const btn = await page.find("wm-select >>> #selectbtn");
|
|
196
|
-
await page.waitForChanges();
|
|
197
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("true");
|
|
198
|
-
await page.keyboard.press("ArrowDown");
|
|
199
|
-
await page.waitForChanges();
|
|
200
|
-
await page.keyboard.press("Space");
|
|
201
|
-
await page.waitForChanges();
|
|
202
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("false");
|
|
203
|
-
});
|
|
204
|
-
/* Spacebar: Should open the popup (we didn't implement, comes for free. test makes sure we don't break it) */
|
|
205
|
-
it("handles the Spacebar key", async () => {
|
|
206
|
-
await createPageHelper();
|
|
207
|
-
await page.keyboard.press("Tab");
|
|
208
|
-
await page.waitForChanges();
|
|
209
|
-
await page.keyboard.press("Space");
|
|
210
|
-
await page.waitForChanges();
|
|
211
|
-
const btn = await page.find("wm-select >>> #selectbtn");
|
|
212
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("true");
|
|
213
|
-
});
|
|
214
|
-
/* Escape: If the listbox is displayed, closes the popup and returns focus to the button. */
|
|
215
|
-
it("handles the Escape key", async () => {
|
|
216
|
-
await createPageHelper();
|
|
217
|
-
await page.keyboard.press("Tab");
|
|
218
|
-
await page.waitForChanges();
|
|
219
|
-
await page.keyboard.press("Enter");
|
|
220
|
-
await page.waitForChanges();
|
|
221
|
-
let btn = await page.find("wm-select >>> button");
|
|
222
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("true");
|
|
223
|
-
await page.keyboard.press("ArrowDown");
|
|
224
|
-
await page.waitForChanges();
|
|
225
|
-
await page.keyboard.press("Escape");
|
|
226
|
-
await page.waitForTimeout(500); // there's a set timeout on the focus func to make sure SR announce the updated state
|
|
227
|
-
const activeElId = await page.evaluate(() => document.activeElement.id);
|
|
228
|
-
btn = await page.find("wm-select >>> button");
|
|
229
|
-
expect(activeElId).toEqual("test");
|
|
230
|
-
expect(btn.getAttribute("aria-expanded")).toEqual("false");
|
|
231
|
-
});
|
|
232
|
-
// Label
|
|
233
|
-
it("creates a label element", async () => {
|
|
234
|
-
await createPageHelper();
|
|
235
|
-
let label = await page.find("wm-select >>> label");
|
|
236
|
-
expect(label.textContent).toBe("Make a selection");
|
|
237
|
-
});
|
|
238
|
-
it("emits the proper events when option is clicked", async () => {
|
|
239
|
-
page = await newE2EPage();
|
|
240
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
241
|
-
<wm-select multiple label="Make a selection">
|
|
242
|
-
<wm-option id='first'>First option</wm-option>
|
|
243
|
-
</wm-select>
|
|
244
|
-
</main></body></html>`);
|
|
245
|
-
const wmOptionSelectedSpy = await page.spyOnEvent("wmOptionSelected");
|
|
246
|
-
const wmOptionDeselectedSpy = await page.spyOnEvent("wmOptionDeselected");
|
|
247
|
-
// Selection key
|
|
248
|
-
await page.keyboard.press("Tab");
|
|
249
|
-
await page.keyboard.press("Enter");
|
|
250
|
-
await page.waitForChanges(); // allow dropdown to open
|
|
251
|
-
await page.keyboard.press("Space");
|
|
252
|
-
await page.waitForChanges();
|
|
253
|
-
expect(wmOptionSelectedSpy).toHaveReceivedEventTimes(1);
|
|
254
|
-
expect(wmOptionDeselectedSpy).toHaveReceivedEventTimes(0);
|
|
255
|
-
// Deselection
|
|
256
|
-
const optionEl = await page.find("wm-option");
|
|
257
|
-
optionEl.setProperty("selected", true);
|
|
258
|
-
await page.waitForChanges();
|
|
259
|
-
await page.keyboard.press("Space");
|
|
260
|
-
expect(wmOptionSelectedSpy).toHaveReceivedEventTimes(1);
|
|
261
|
-
expect(wmOptionDeselectedSpy).toHaveReceivedEventTimes(1);
|
|
262
|
-
});
|
|
263
|
-
/**************
|
|
264
|
-
* MULTISELECT *
|
|
265
|
-
**************/
|
|
266
|
-
/* If one or more options are selected before the listbox receives focus, focus is set on the first option in the list that is selected */
|
|
267
|
-
it("automatically focuses the first selected option - multiselect", async () => {
|
|
268
|
-
page = await newE2EPage();
|
|
269
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
270
|
-
<wm-select id='test' multiple label="Make a selection">
|
|
271
|
-
<wm-option id='first'>First option</wm-option>
|
|
272
|
-
<wm-option id='second' selected>Second option</wm-option>
|
|
273
|
-
<wm-option id='third' selected>Third option</wm-option>
|
|
274
|
-
</wm-select>
|
|
275
|
-
</main></body></html>`);
|
|
276
|
-
const select = await page.find("wm-select");
|
|
277
|
-
await page.keyboard.press("Tab");
|
|
278
|
-
await page.waitForChanges();
|
|
279
|
-
await page.keyboard.press("Enter");
|
|
280
|
-
await page.waitForChanges();
|
|
281
|
-
const secondOption = select.shadowRoot.querySelectorAll("wm-option")[1];
|
|
282
|
-
await page.waitForChanges();
|
|
283
|
-
expect(secondOption).toEqualAttribute("tabindex", "0");
|
|
284
|
-
});
|
|
285
|
-
/* Up Arrow: moves focus to the previous (last) option. */
|
|
286
|
-
it("automatically focuses the previous (last) option - multiselect", async () => {
|
|
287
|
-
page = await newE2EPage();
|
|
288
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
289
|
-
<wm-select multiple label="Make a selection">
|
|
290
|
-
<wm-option id='first'>First option</wm-option>
|
|
291
|
-
<wm-option id='second' selected>Second option</wm-option>
|
|
292
|
-
<wm-option id='third' selected>Third option</wm-option>
|
|
293
|
-
<wm-option id='fourth' selected>Fourth option</wm-option>
|
|
294
|
-
<wm-option id='fifth'>Fifth option</wm-option>
|
|
295
|
-
</wm-select>
|
|
296
|
-
</main></body></html>`);
|
|
297
|
-
await page.keyboard.press("Tab");
|
|
298
|
-
await page.waitForChanges();
|
|
299
|
-
await page.keyboard.press("ArrowUp");
|
|
300
|
-
await page.waitForChanges();
|
|
301
|
-
const lastOption = await page.find("#fifth");
|
|
302
|
-
await page.waitForChanges();
|
|
303
|
-
expect(lastOption).toEqualAttribute("tabindex", "0");
|
|
304
|
-
});
|
|
305
|
-
/* Down Arrow: moves focus to the next (first) option. */
|
|
306
|
-
it("automatically focuses the next option - multiselect", async () => {
|
|
307
|
-
page = await newE2EPage();
|
|
308
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
309
|
-
<wm-select multiple label="Make a selection">
|
|
310
|
-
<wm-option id='first'>First option</wm-option>
|
|
311
|
-
<wm-option id='second' selected>Second option</wm-option>
|
|
312
|
-
<wm-option id='third' selected>Third option</wm-option>
|
|
313
|
-
<wm-option id='fourth' selected>Fourth option</wm-option>
|
|
314
|
-
<wm-option id='fifth'>Fifth option</wm-option>
|
|
315
|
-
</wm-select>
|
|
316
|
-
</main></body></html>`);
|
|
317
|
-
await page.keyboard.press("Tab");
|
|
318
|
-
await page.waitForChanges();
|
|
319
|
-
await page.keyboard.press("ArrowDown");
|
|
320
|
-
await page.waitForChanges();
|
|
321
|
-
const firstOption = await page.find("#first");
|
|
322
|
-
await page.waitForChanges();
|
|
323
|
-
expect(firstOption).toEqualAttribute("tabindex", "0");
|
|
324
|
-
});
|
|
325
|
-
it("recognizes when all are selected", async () => {
|
|
326
|
-
page = await newE2EPage();
|
|
327
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
328
|
-
<div style='width: 300px'>
|
|
329
|
-
<wm-select multiple label="Make a selection" all-selected-message="All options selected">
|
|
330
|
-
<wm-option id='first' selected>First option</wm-option>
|
|
331
|
-
<wm-option id='second' selected>Second option</wm-option>
|
|
332
|
-
</wm-select>
|
|
333
|
-
</div>
|
|
334
|
-
</main></body></html>`);
|
|
335
|
-
let button = await page.find("wm-select >>> button");
|
|
336
|
-
expect(button.textContent).toBe("First option, Second option");
|
|
337
|
-
page = await newE2EPage();
|
|
338
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
339
|
-
<div style='width: 100px'>
|
|
340
|
-
<wm-select multiple label="Make a selection" all-selected-message="All options selected">
|
|
341
|
-
<wm-option id='first' selected>First option</wm-option>
|
|
342
|
-
<wm-option id='second' selected>Second option</wm-option>
|
|
343
|
-
<wm-option id='third' selected>Third option</wm-option>
|
|
344
|
-
<wm-option id='fourth' selected>Fourth option</wm-option>
|
|
345
|
-
<wm-option id='fifth' selected>Fifth option</wm-option>
|
|
346
|
-
</wm-select>
|
|
347
|
-
</div>
|
|
348
|
-
</main></body></html>`);
|
|
349
|
-
button = await page.find("wm-select >>> button");
|
|
350
|
-
expect(button.textContent).toBe("All options selected");
|
|
351
|
-
});
|
|
352
|
-
/*********************
|
|
353
|
-
* Select with Search *
|
|
354
|
-
*********************/
|
|
355
|
-
it("filters options when search term is entered", async () => {
|
|
356
|
-
page = await newE2EPage();
|
|
357
|
-
await page.setContent(`<wm-select search multiple label="Make a selection">
|
|
358
|
-
<wm-option id='first' selected>First option</wm-option>
|
|
359
|
-
<wm-option id='second'>Second option</wm-option>
|
|
360
|
-
<wm-option id='third'>Third option</wm-option>
|
|
361
|
-
<wm-option id='fourth'>Fourth option</wm-option>
|
|
362
|
-
<wm-option id='fifth'>Fifth option</wm-option>
|
|
363
|
-
</wm-select>`);
|
|
364
|
-
await page.keyboard.press("Tab");
|
|
365
|
-
await page.waitForChanges();
|
|
366
|
-
await page.keyboard.press("Space");
|
|
367
|
-
await page.waitForChanges();
|
|
368
|
-
// it sends focus to the searchfield when opened
|
|
369
|
-
let activeElName = await page.evaluate(async () => {
|
|
370
|
-
let el = await document.activeElement.shadowRoot.activeElement;
|
|
371
|
-
return el.nodeName;
|
|
372
|
-
});
|
|
373
|
-
expect(activeElName).toBe("INPUT");
|
|
374
|
-
// it displays selected options at the top of the dropdown
|
|
375
|
-
const duplicateFirstItemSelected = await page.evaluate(() => {
|
|
376
|
-
return document.activeElement.shadowRoot.querySelectorAll("wm-option")[0].getAttribute("aria-selected");
|
|
377
|
-
});
|
|
378
|
-
expect(duplicateFirstItemSelected).toBe("true");
|
|
379
|
-
// it filters options when a search term is entered
|
|
380
|
-
await page.waitForTimeout("160");
|
|
381
|
-
await page.keyboard.press("r");
|
|
382
|
-
await page.waitForChanges();
|
|
383
|
-
await page.waitForTimeout("160");
|
|
384
|
-
let searchTerm = await page.evaluate(() => {
|
|
385
|
-
return document.querySelector("wm-select").shadowRoot.querySelector(".searchfield")
|
|
386
|
-
.value;
|
|
387
|
-
});
|
|
388
|
-
expect(searchTerm).toBe("r");
|
|
389
|
-
const firstItem = await page.find("#first");
|
|
390
|
-
const secondItem = await page.find("#second");
|
|
391
|
-
const thirdItem = await page.find("#third");
|
|
392
|
-
expect(firstItem).not.toHaveClass("filtered-out");
|
|
393
|
-
expect(secondItem).toHaveClass("filtered-out");
|
|
394
|
-
expect(thirdItem).not.toHaveClass("filtered-out");
|
|
395
|
-
let liveRegionEl = await page.find("wm-select >>> #announcement");
|
|
396
|
-
expect(liveRegionEl.textContent).toBe("3 options found");
|
|
397
|
-
// it bolds matching text of options that pass the search term
|
|
398
|
-
const thirdItemInnerHTML = await page.evaluate(() => {
|
|
399
|
-
return document.querySelector("#third").shadowRoot.querySelector(".option-wrapper").innerHTML;
|
|
400
|
-
});
|
|
401
|
-
expect(thirdItemInnerHTML.includes("<strong>r</strong>")).toBe(true);
|
|
402
|
-
// it displayed no options message when none pass the filter
|
|
403
|
-
await page.keyboard.press("Delete");
|
|
404
|
-
await page.waitForChanges();
|
|
405
|
-
await page.keyboard.press("x");
|
|
406
|
-
await page.waitForChanges();
|
|
407
|
-
await page.waitForTimeout("200");
|
|
408
|
-
const searchResultsMessageEl = await page.find("wm-select >>> .search-results-message");
|
|
409
|
-
expect(searchResultsMessageEl.textContent).toBe("No results found. Please try your search again.");
|
|
410
|
-
liveRegionEl = await page.find("wm-select >>> #announcement");
|
|
411
|
-
expect(liveRegionEl.textContent).toBe("No results found. Please try your search again.");
|
|
412
|
-
// it clears search term when closing dropdown
|
|
413
|
-
await page.keyboard.press("Escape");
|
|
414
|
-
await page.waitForChanges();
|
|
415
|
-
await page.waitForTimeout("200");
|
|
416
|
-
await page.keyboard.press("Space");
|
|
417
|
-
await page.waitForChanges();
|
|
418
|
-
await page.waitForTimeout("200");
|
|
419
|
-
searchTerm = await page.evaluate(() => {
|
|
420
|
-
return document.querySelector("wm-select").shadowRoot.querySelector(".searchfield")
|
|
421
|
-
.value;
|
|
422
|
-
});
|
|
423
|
-
expect(searchTerm).toBe("");
|
|
424
|
-
});
|
|
425
|
-
it("doesn't show the select all option if user is typing in search bar", async () => {
|
|
426
|
-
page = await newE2EPage();
|
|
427
|
-
await page.setContent(`<wm-select multiple select-all search id='test' label="Make a selection">
|
|
428
|
-
<wm-option id='first'>First option</wm-option>
|
|
429
|
-
<wm-option id='second'>Second option</wm-option>
|
|
430
|
-
<wm-option id='third'>Third option</wm-option>
|
|
431
|
-
</wm-select>`);
|
|
432
|
-
let selectAllBtn = await page.find("wm-select >>> .select-all");
|
|
433
|
-
expect(selectAllBtn).not.toBeUndefined();
|
|
434
|
-
await page.keyboard.press("Tab");
|
|
435
|
-
await page.keyboard.press("Enter");
|
|
436
|
-
await page.waitForChanges();
|
|
437
|
-
await page.keyboard.press("Enter");
|
|
438
|
-
await page.waitForChanges();
|
|
439
|
-
selectAllBtn = await page.find("wm-select >>> .select-all");
|
|
440
|
-
expect(selectAllBtn).not.toBeUndefined();
|
|
441
|
-
await page.keyboard.press("s");
|
|
442
|
-
await page.waitForChanges();
|
|
443
|
-
// two waitForChanges are needed for this test to pass, presumably the first is to allow the keyboard press to go through
|
|
444
|
-
// and the second is for the select-all button to disappear
|
|
445
|
-
await page.waitForChanges();
|
|
446
|
-
selectAllBtn = await page.find("wm-select >>> .select-all");
|
|
447
|
-
expect(selectAllBtn).toBeNull();
|
|
448
|
-
});
|
|
449
|
-
it("emits the proper select all deselect all events", async () => {
|
|
450
|
-
let page = await newE2EPage();
|
|
451
|
-
await page.setContent(`<wm-select multiple select-all id='test' label="make a selection">
|
|
452
|
-
<wm-option id='first'>first option</wm-option>
|
|
453
|
-
<wm-option id='second'>second option</wm-option>
|
|
454
|
-
<wm-option id='third'>third option</wm-option>
|
|
455
|
-
</wm-select>`);
|
|
456
|
-
const wmSelectAllSelectedSpy = await page.spyOnEvent("wmSelectAllSelected");
|
|
457
|
-
const wmSelectAllDeselectedSpy = await page.spyOnEvent("wmSelectAllDeselected");
|
|
458
|
-
await page.keyboard.press("Tab");
|
|
459
|
-
await page.waitForChanges();
|
|
460
|
-
await page.keyboard.press("Enter");
|
|
461
|
-
await page.waitForChanges();
|
|
462
|
-
await page.keyboard.press("ArrowUp");
|
|
463
|
-
await page.waitForChanges();
|
|
464
|
-
await page.keyboard.press("Space");
|
|
465
|
-
await page.waitForChanges();
|
|
466
|
-
expect(wmSelectAllSelectedSpy).toHaveReceivedEventTimes(1);
|
|
467
|
-
expect(wmSelectAllDeselectedSpy).toHaveReceivedEventTimes(0);
|
|
468
|
-
const options = await page.findAll("wm-option");
|
|
469
|
-
options.forEach((option) => option.setProperty("selected", true));
|
|
470
|
-
await page.waitForChanges();
|
|
471
|
-
// // dropdown stayed open, focus stayed on button.
|
|
472
|
-
// // reactivating it should deselect
|
|
473
|
-
await page.keyboard.press("Enter");
|
|
474
|
-
await page.waitForChanges();
|
|
475
|
-
expect(wmSelectAllSelectedSpy).toHaveReceivedEventTimes(1);
|
|
476
|
-
expect(wmSelectAllDeselectedSpy).toHaveReceivedEventTimes(1);
|
|
477
|
-
});
|
|
478
|
-
xit("handles keyboard motion", async () => {
|
|
479
|
-
const page = await newE2EPage();
|
|
480
|
-
await page.setContent(`<wm-select select-all search multiple id='test' label="Make a selection">
|
|
481
|
-
<wm-option id='first'>First option</wm-option>
|
|
482
|
-
<wm-option id='second'>Second option</wm-option>
|
|
483
|
-
</wm-select>`);
|
|
484
|
-
await page.keyboard.press("Tab");
|
|
485
|
-
await page.waitForChanges();
|
|
486
|
-
await page.keyboard.press("ArrowDown");
|
|
487
|
-
await page.waitForChanges();
|
|
488
|
-
// Down arrow from the input focuses the Select All button
|
|
489
|
-
await page.keyboard.press("ArrowDown");
|
|
490
|
-
await page.waitForChanges();
|
|
491
|
-
// let activeEl = await page.evaluate(() => document.activeElement!.shadowRoot!.activeElement);
|
|
492
|
-
// expect(activeEl).toHaveClass("select-all");
|
|
493
|
-
// const selectAllBtn = await page.find("wm-select >>> .select-all");
|
|
494
|
-
// expect(selectAllBtn).toEqualAttribute("tabindex", "0");
|
|
495
|
-
// Down arrow from the Select All button focuses the first option
|
|
496
|
-
await page.keyboard.press("ArrowDown");
|
|
497
|
-
await page.waitForChanges();
|
|
498
|
-
const first = await page.find("#first");
|
|
499
|
-
expect(first).toEqualAttribute("tabindex", "0");
|
|
500
|
-
// - Down arrow from the last option focuses the search input
|
|
501
|
-
await page.keyboard.press("ArrowDown");
|
|
502
|
-
await page.waitForChanges();
|
|
503
|
-
await page.keyboard.press("ArrowDown");
|
|
504
|
-
await page.waitForChanges();
|
|
505
|
-
let inputWrapperEl = await page.find("wm-select >>> .searchfield-wrapper");
|
|
506
|
-
expect(inputWrapperEl).toHaveClass("focus");
|
|
507
|
-
// - Up arrow from the Select All button focuses the input
|
|
508
|
-
await page.keyboard.press("ArrowDown");
|
|
509
|
-
await page.waitForChanges();
|
|
510
|
-
await page.keyboard.press("ArrowUp");
|
|
511
|
-
await page.waitForChanges();
|
|
512
|
-
inputWrapperEl = await page.find("wm-select >>> .searchfield-wrapper");
|
|
513
|
-
expect(inputWrapperEl).toHaveClass("focus");
|
|
514
|
-
});
|
|
515
|
-
});
|
|
516
|
-
/* A11Y: SOURCES
|
|
517
|
-
https://www.w3.org/TR/wai-aria-practices/#listbox_roles_states_props
|
|
518
|
-
https://www.w3.org/TR/wai-aria-practices/#listbox_kbd_interaction
|
|
519
|
-
https://www.w3.org/TR/wai-aria-practices/#listbox-popup-keyboard-interaction
|
|
520
|
-
https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html
|
|
521
|
-
*/
|