@watermarkinsights/ripple 5.3.0-0 → 5.3.0-2
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/cjs/{chartFunctions-9075d687.js → chartFunctions-246529c5.js} +3 -3
- package/dist/cjs/{functions-b73604c3.js → functions-be4156cf.js} +7 -104
- package/dist/{esm/app-globals-0c592c57.js → cjs/global-6b1a23e9.js} +2 -7
- package/dist/cjs/index-f8ef86de.js +2582 -0
- package/dist/cjs/{intl-b20d5420.js → intl-a13884e8.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/priv-calendar.cjs.entry.js +5 -6
- package/dist/cjs/priv-chart-popover.cjs.entry.js +5 -6
- package/dist/cjs/priv-navigator-button.cjs.entry.js +3 -4
- package/dist/cjs/priv-navigator-item.cjs.entry.js +3 -4
- package/dist/cjs/ripple.cjs.js +11 -12
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +6 -8
- package/dist/cjs/wm-button.cjs.entry.js +4 -5
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +6 -7
- package/dist/cjs/wm-date-range.cjs.entry.js +7 -8
- package/dist/cjs/wm-datepicker.cjs.entry.js +7 -8
- package/dist/cjs/wm-file-list.cjs.entry.js +3 -4
- package/dist/cjs/wm-file.cjs.entry.js +4 -5
- package/dist/cjs/wm-input.cjs.entry.js +5 -6
- package/dist/cjs/wm-line-chart.cjs.entry.js +14 -15
- package/dist/cjs/wm-modal-footer.cjs.entry.js +3 -4
- package/dist/cjs/wm-modal-header.cjs.entry.js +5 -6
- package/dist/cjs/wm-modal.cjs.entry.js +5 -6
- package/dist/cjs/wm-navigation_3.cjs.entry.js +10 -13
- package/dist/cjs/wm-navigator.cjs.entry.js +3 -4
- package/dist/cjs/wm-option_2.cjs.entry.js +8 -10
- package/dist/cjs/wm-pagination.cjs.entry.js +4 -5
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +7 -9
- package/dist/cjs/wm-search.cjs.entry.js +6 -7
- package/dist/cjs/wm-snackbar.cjs.entry.js +69 -35
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +8 -11
- package/dist/cjs/wm-tag-input.cjs.entry.js +7 -8
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +5 -6
- package/dist/cjs/wm-timepicker.cjs.entry.js +5 -6
- package/dist/cjs/wm-toggletip.cjs.entry.js +5 -6
- package/dist/cjs/wm-uploader.cjs.entry.js +6 -7
- 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/chartFunctions.spec.js +16 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +81 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
- package/dist/collection/components/charts/screenshots.e2e.js +96 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +213 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +37 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +176 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +163 -0
- 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.e2e.js +69 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +79 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +89 -0
- package/dist/collection/components/datepickers/wm-date-range.e2e.js +443 -0
- package/dist/collection/components/datepickers/wm-date-range.js +12 -16
- package/dist/collection/components/datepickers/wm-date-range.spec.js +22 -0
- package/dist/collection/components/datepickers/wm-datepicker.e2e.js +382 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +12 -16
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +200 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +48 -0
- package/dist/collection/components/wm-button/wm-button.e2e.js +55 -0
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-button/wm-button.spec.js +74 -0
- package/dist/collection/components/wm-file/wm-file.js +1 -1
- package/dist/collection/components/wm-file/wm-file.spec.js +194 -0
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +69 -0
- package/dist/collection/components/wm-input/wm-input.e2e.js +32 -0
- package/dist/collection/components/wm-input/wm-input.js +1 -1
- package/dist/collection/components/wm-input/wm-input.spec.js +173 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +23 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +54 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +11 -0
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +8 -0
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +104 -0
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-modal/wm-modal.spec.js +30 -0
- 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.e2e.js +102 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +91 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +50 -0
- 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-navigator/wm-navigator.e2e.js +209 -0
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +177 -0
- package/dist/collection/components/wm-option/wm-option.e2e.js +22 -0
- package/dist/collection/components/wm-option/wm-option.js +1 -1
- package/dist/collection/components/wm-option/wm-option.spec.js +63 -0
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +312 -0
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.e2e.js +76 -0
- package/dist/collection/components/wm-search/wm-search.js +4 -5
- package/dist/collection/components/wm-search/wm-search.spec.js +71 -0
- package/dist/collection/components/wm-select/wm-select.e2e.js +521 -0
- package/dist/collection/components/wm-select/wm-select.js +2 -2
- package/dist/collection/components/wm-select/wm-select.spec.js +271 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +69 -46
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +112 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +66 -31
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +9 -0
- 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-tabs/wm-tabs.e2e.js +91 -0
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +12 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +204 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +195 -0
- package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +41 -0
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-textarea/wm-textarea.spec.js +79 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +163 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +8 -11
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +147 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +69 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +21 -0
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +70 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +234 -0
- package/dist/collection/dev/snackbar.js +48 -32
- package/dist/collection/global/functions.spec.js +126 -0
- package/dist/collection/lang/lang.spec.js +20 -0
- package/dist/esm/{chartFunctions-730742b7.js → chartFunctions-e2554a36.js} +3 -3
- package/dist/esm/{functions-eda88c5f.js → functions-f65dbb96.js} +8 -105
- package/dist/{cjs/app-globals-7025eb63.js → esm/global-b3bbb95e.js} +1 -10
- package/dist/esm/index-f164fbca.js +2552 -0
- package/dist/esm/{intl-de8432e2.js → intl-f7f77de7.js} +1 -1
- package/dist/esm/loader.js +4 -5
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-calendar.entry.js +5 -6
- package/dist/esm/priv-chart-popover.entry.js +5 -6
- package/dist/esm/priv-navigator-button.entry.js +3 -4
- package/dist/esm/priv-navigator-item.entry.js +3 -4
- package/dist/esm/ripple.js +12 -13
- package/dist/esm/wm-action-menu_2.entry.js +6 -8
- package/dist/esm/wm-button.entry.js +4 -5
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +6 -7
- package/dist/esm/wm-date-range.entry.js +7 -8
- package/dist/esm/wm-datepicker.entry.js +7 -8
- package/dist/esm/wm-file-list.entry.js +3 -4
- package/dist/esm/wm-file.entry.js +4 -5
- package/dist/esm/wm-input.entry.js +5 -6
- package/dist/esm/wm-line-chart.entry.js +14 -15
- package/dist/esm/wm-modal-footer.entry.js +3 -4
- package/dist/esm/wm-modal-header.entry.js +5 -6
- package/dist/esm/wm-modal.entry.js +5 -6
- package/dist/esm/wm-navigation_3.entry.js +10 -13
- package/dist/esm/wm-navigator.entry.js +3 -4
- package/dist/esm/wm-option_2.entry.js +8 -10
- package/dist/esm/wm-pagination.entry.js +4 -5
- package/dist/esm/wm-progress-indicator_3.entry.js +7 -9
- package/dist/esm/wm-search.entry.js +6 -7
- package/dist/esm/wm-snackbar.entry.js +69 -35
- package/dist/esm/wm-tab-item_3.entry.js +8 -11
- package/dist/esm/wm-tag-input.entry.js +7 -8
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +5 -6
- package/dist/esm/wm-timepicker.entry.js +5 -6
- package/dist/esm/wm-toggletip.entry.js +5 -6
- package/dist/esm/wm-uploader.entry.js +6 -7
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/{chartFunctions-730742b7.js → chartFunctions-e2554a36.js} +1 -1
- package/dist/esm-es5/functions-f65dbb96.js +1 -0
- package/dist/esm-es5/global-b3bbb95e.js +1 -0
- package/dist/esm-es5/index-f164fbca.js +1 -0
- package/dist/esm-es5/{intl-de8432e2.js → intl-f7f77de7.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 +2 -1
- package/dist/loader/index.cjs.js +2 -1
- package/dist/loader/index.d.ts +0 -3
- package/dist/loader/index.es2017.js +2 -1
- package/dist/loader/index.js +2 -1
- package/dist/ripple/p-04bf6c89.entry.js +1 -0
- package/dist/ripple/{p-98e77431.entry.js → p-0b77b2a1.entry.js} +1 -1
- package/dist/ripple/p-0fe97e85.system.js +2 -0
- package/dist/ripple/p-109684b1.entry.js +1 -0
- package/dist/ripple/p-11383396.system.entry.js +1 -0
- package/dist/ripple/{p-7b5ac088.entry.js → p-19dec591.entry.js} +1 -1
- package/dist/ripple/p-1cb6b37e.entry.js +1 -0
- package/dist/ripple/p-2197287c.entry.js +1 -0
- package/dist/ripple/{p-5ab8174c.entry.js → p-22e6104e.entry.js} +1 -1
- package/dist/ripple/p-24d88d8d.system.entry.js +1 -0
- package/dist/ripple/{p-ff095cec.entry.js → p-25446670.entry.js} +1 -1
- package/dist/ripple/p-2bac4b4e.system.entry.js +1 -0
- package/dist/ripple/p-30a9ba6e.entry.js +1 -0
- package/dist/ripple/p-32cf6907.system.entry.js +1 -0
- package/dist/ripple/p-379fe53e.entry.js +1 -0
- package/dist/ripple/{p-4aae5688.entry.js → p-3a070f35.entry.js} +1 -1
- package/dist/ripple/{p-181068af.system.entry.js → p-3db9e0d8.system.entry.js} +1 -1
- package/dist/ripple/p-41e8a079.entry.js +1 -0
- package/dist/ripple/p-4272aa37.system.js +1 -0
- package/dist/ripple/p-45126063.system.entry.js +1 -0
- package/dist/ripple/{p-fd34619f.system.entry.js → p-48a6acfa.system.entry.js} +1 -1
- package/dist/ripple/p-4de51706.js +2 -0
- package/dist/ripple/{p-245f0080.entry.js → p-4e616347.entry.js} +1 -1
- package/dist/ripple/p-577ea283.system.entry.js +1 -0
- package/dist/ripple/p-5a04c222.entry.js +1 -0
- package/dist/ripple/{p-3036a712.js → p-5b2c1bd1.js} +1 -1
- package/dist/ripple/{p-e0929c38.system.js → p-5bbf7fdc.system.js} +1 -1
- package/dist/ripple/p-5dbad2ff.entry.js +1 -0
- package/dist/ripple/p-625aeeec.system.entry.js +1 -0
- package/dist/ripple/p-635f40b1.entry.js +1 -0
- package/dist/ripple/p-63fabfed.entry.js +1 -0
- package/dist/ripple/p-6dc3ee86.system.js +1 -0
- package/dist/ripple/p-7144d185.system.entry.js +1 -0
- package/dist/ripple/p-720b6ab0.entry.js +1 -0
- package/dist/ripple/p-7573a2fa.entry.js +1 -0
- package/dist/ripple/p-76d2dada.entry.js +1 -0
- package/dist/ripple/{p-0f117524.system.entry.js → p-780d4673.system.entry.js} +1 -1
- package/dist/ripple/p-79af9baf.entry.js +1 -0
- package/dist/ripple/{p-b6dcc6d8.system.entry.js → p-7a9ffbcb.system.entry.js} +1 -1
- package/dist/ripple/{p-f170963b.system.entry.js → p-7e56da2e.system.entry.js} +1 -1
- package/dist/ripple/p-7f4b4071.system.entry.js +1 -0
- package/dist/ripple/{p-a36f5e7d.system.entry.js → p-8081f931.system.entry.js} +1 -1
- package/dist/ripple/p-84926b89.system.entry.js +1 -0
- package/dist/ripple/p-88406560.system.entry.js +1 -0
- package/dist/ripple/{p-f95bc54b.entry.js → p-8f38dc86.entry.js} +1 -1
- package/dist/ripple/p-92c1ff36.system.entry.js +1 -0
- package/dist/ripple/{p-0e1523db.entry.js → p-98120733.entry.js} +1 -1
- package/dist/ripple/p-9c6d6b26.system.entry.js +1 -0
- package/dist/ripple/{p-e3a15de3.system.entry.js → p-9d8c2a52.system.entry.js} +1 -1
- package/dist/ripple/{p-47d993b9.system.entry.js → p-a99b05de.system.entry.js} +1 -1
- package/dist/ripple/{p-ce028b38.system.js → p-ae32eb8d.system.js} +1 -1
- package/dist/ripple/p-ae8ad491.entry.js +1 -0
- package/dist/ripple/p-b0579a2a.system.entry.js +1 -0
- package/dist/ripple/p-b0f14557.system.entry.js +1 -0
- package/dist/ripple/p-ba751ca4.js +1 -0
- package/dist/ripple/{p-39f4fca0.system.entry.js → p-bd27ded2.system.entry.js} +1 -1
- package/dist/ripple/p-c38f2a00.system.entry.js +1 -0
- package/dist/ripple/p-c51293e2.entry.js +1 -0
- package/dist/ripple/p-c717d895.entry.js +1 -0
- package/dist/ripple/p-c8873e0c.system.entry.js +1 -0
- package/dist/ripple/p-ca9d9447.system.entry.js +1 -0
- package/dist/ripple/p-cda6c77e.entry.js +1 -0
- package/dist/ripple/{p-ecd26b33.system.entry.js → p-ce5455a3.system.entry.js} +1 -1
- package/dist/ripple/p-d265a41e.entry.js +1 -0
- package/dist/ripple/p-d325a37b.entry.js +1 -0
- package/dist/ripple/p-d7c47dc0.system.entry.js +1 -0
- package/dist/ripple/p-d88d806e.js +1 -0
- package/dist/ripple/p-dcfdbd30.entry.js +1 -0
- package/dist/ripple/p-eb649319.system.js +1 -0
- package/dist/ripple/p-ef3fe609.system.entry.js +1 -0
- package/dist/ripple/p-f6f29a56.entry.js +1 -0
- package/dist/ripple/{p-96cc3c63.js → p-f79a6e32.js} +1 -1
- package/dist/ripple/p-f93858ad.system.entry.js +1 -0
- package/dist/ripple/p-fc7e5296.entry.js +1 -0
- package/dist/ripple/p-ff80aadd.system.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +6 -3
- package/dist/types/global/interfaces.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +10 -3
- package/package.json +1 -1
- package/dist/cjs/index-3c3d6c9f.js +0 -1810
- package/dist/esm/index-0ed3ed7d.js +0 -1780
- package/dist/esm-es5/app-globals-0c592c57.js +0 -1
- package/dist/esm-es5/functions-eda88c5f.js +0 -1
- package/dist/esm-es5/index-0ed3ed7d.js +0 -1
- package/dist/ripple/p-0096e233.system.entry.js +0 -1
- package/dist/ripple/p-0ad27de3.system.entry.js +0 -1
- package/dist/ripple/p-0ccf9f96.entry.js +0 -1
- package/dist/ripple/p-0f7a85f4.entry.js +0 -1
- package/dist/ripple/p-13760c2c.entry.js +0 -1
- package/dist/ripple/p-14bab3fa.system.entry.js +0 -1
- package/dist/ripple/p-1e536698.js +0 -1
- package/dist/ripple/p-2c18b6d1.system.entry.js +0 -1
- package/dist/ripple/p-340b18ea.entry.js +0 -1
- package/dist/ripple/p-37c39a40.system.entry.js +0 -1
- package/dist/ripple/p-3f5e94e3.system.js +0 -1
- package/dist/ripple/p-48beea19.system.js +0 -1
- package/dist/ripple/p-4ea963f3.system.entry.js +0 -1
- package/dist/ripple/p-501d3115.entry.js +0 -1
- package/dist/ripple/p-527581c5.entry.js +0 -1
- package/dist/ripple/p-563b5820.entry.js +0 -1
- package/dist/ripple/p-57695dba.js +0 -2
- package/dist/ripple/p-5c6c325e.system.entry.js +0 -1
- package/dist/ripple/p-5f4c8d63.system.entry.js +0 -1
- package/dist/ripple/p-68e3e7c0.entry.js +0 -1
- package/dist/ripple/p-68fec757.system.entry.js +0 -1
- package/dist/ripple/p-6982bc34.entry.js +0 -1
- package/dist/ripple/p-6a793c40.system.entry.js +0 -1
- package/dist/ripple/p-6c31f0ad.system.entry.js +0 -1
- package/dist/ripple/p-6daf1bd3.system.entry.js +0 -1
- package/dist/ripple/p-6e406e8b.entry.js +0 -1
- package/dist/ripple/p-77210f26.entry.js +0 -1
- package/dist/ripple/p-7a844f5d.system.js +0 -2
- package/dist/ripple/p-7d5aaa73.system.entry.js +0 -1
- package/dist/ripple/p-80c92919.system.entry.js +0 -1
- package/dist/ripple/p-81fd2ed5.system.entry.js +0 -1
- package/dist/ripple/p-84d294d1.system.js +0 -1
- package/dist/ripple/p-85178a0d.entry.js +0 -1
- package/dist/ripple/p-8768ba4d.system.entry.js +0 -1
- package/dist/ripple/p-8af21b69.entry.js +0 -1
- package/dist/ripple/p-a30eef53.entry.js +0 -1
- package/dist/ripple/p-ad6c979f.entry.js +0 -1
- package/dist/ripple/p-af8c1cfa.entry.js +0 -1
- package/dist/ripple/p-b19be746.entry.js +0 -1
- package/dist/ripple/p-b483ec14.entry.js +0 -1
- package/dist/ripple/p-b4a34241.entry.js +0 -1
- package/dist/ripple/p-be28a95e.system.entry.js +0 -1
- package/dist/ripple/p-c6d970a4.entry.js +0 -1
- package/dist/ripple/p-dba63006.system.entry.js +0 -1
- package/dist/ripple/p-dbb37269.system.entry.js +0 -1
- package/dist/ripple/p-e19f8c43.js +0 -1
- package/dist/ripple/p-e3d66797.entry.js +0 -1
- package/dist/ripple/p-e64276f2.entry.js +0 -1
- package/dist/ripple/p-e9978b2f.entry.js +0 -1
- package/dist/ripple/p-ecbd3ea9.system.entry.js +0 -1
- package/dist/ripple/p-ee49cb03.entry.js +0 -1
- package/dist/ripple/p-f0fbb86b.system.entry.js +0 -1
- package/dist/ripple/p-f4f3bf9f.system.entry.js +0 -1
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +0 -72
- package/dist/types/components/datepickers/wm-date-range.d.ts +0 -68
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { TagInput } from "./wm-tag-input";
|
|
3
|
+
import { TagOption } from "./wm-tag-option/wm-tag-option";
|
|
4
|
+
import * as globalFuncs from "../../global/functions";
|
|
5
|
+
jest.spyOn(globalFuncs, "generateId");
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
globalFuncs.generateId.mockImplementation(() => "random-id");
|
|
8
|
+
// mock observers
|
|
9
|
+
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
10
|
+
observe: jest.fn(),
|
|
11
|
+
unobserve: jest.fn(),
|
|
12
|
+
disconnect: jest.fn(),
|
|
13
|
+
}));
|
|
14
|
+
global.MutationObserver = jest.fn().mockImplementation(() => ({
|
|
15
|
+
observe: jest.fn(),
|
|
16
|
+
unobserve: jest.fn(),
|
|
17
|
+
disconnect: jest.fn(),
|
|
18
|
+
}));
|
|
19
|
+
// mockComputedStyle, component measures the placeholder on render to properly position the input
|
|
20
|
+
global.getComputedStyle = jest
|
|
21
|
+
.fn()
|
|
22
|
+
.mockImplementation(() => ({
|
|
23
|
+
paddingLeft: "0px",
|
|
24
|
+
paddingRight: "0px",
|
|
25
|
+
marginLeft: "0px",
|
|
26
|
+
marginRight: "0px",
|
|
27
|
+
}));
|
|
28
|
+
describe("taginput", () => {
|
|
29
|
+
let page;
|
|
30
|
+
beforeEach(async () => {
|
|
31
|
+
page = await newSpecPage({
|
|
32
|
+
components: [TagInput, TagOption],
|
|
33
|
+
html: `<wm-tag-input id="input" label="label">
|
|
34
|
+
<wm-tag-option>one</wm-tag-option>
|
|
35
|
+
<wm-tag-option>two</wm-tag-option>
|
|
36
|
+
<wm-tag-option>three</wm-tag-option>
|
|
37
|
+
<wm-tag-option>four</wm-tag-option>
|
|
38
|
+
</wm-tag-input>`,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
it("builds", async () => {
|
|
42
|
+
expect(page.root).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
it("has right aria roles", async () => {
|
|
45
|
+
page = await newSpecPage({
|
|
46
|
+
components: [TagInput, TagOption],
|
|
47
|
+
html: `<wm-tag-input label="label" info="info text">
|
|
48
|
+
<wm-tag-option selected>one</wm-tag-option>
|
|
49
|
+
<wm-tag-option>two</wm-tag-option>
|
|
50
|
+
<wm-tag-option selected>three</wm-tag-option>
|
|
51
|
+
<wm-tag-option>four</wm-tag-option>
|
|
52
|
+
</wm-tag-input>`,
|
|
53
|
+
});
|
|
54
|
+
const label = await page.root.shadowRoot.querySelector("label");
|
|
55
|
+
expect(label.textContent).toBe("label");
|
|
56
|
+
const input = await page.root.shadowRoot.querySelector("input");
|
|
57
|
+
expect(input).toEqualAttribute("role", "combobox");
|
|
58
|
+
expect(input).toEqualAttribute("aria-label", "label 50 characters allowed.");
|
|
59
|
+
const helpText = await page.root.shadowRoot.querySelector(".help-text");
|
|
60
|
+
expect(input).toEqualAttribute("aria-describedby", helpText.id);
|
|
61
|
+
const dropdown = await page.root.shadowRoot.querySelector(".dropdown");
|
|
62
|
+
expect(dropdown).toEqualAttribute("role", "listbox");
|
|
63
|
+
expect(dropdown).toHaveAttribute("aria-multiselectable");
|
|
64
|
+
const options = await page.root.shadowRoot.querySelectorAll(".option");
|
|
65
|
+
options.forEach((option) => {
|
|
66
|
+
expect(option).toEqualAttribute("role", "option");
|
|
67
|
+
});
|
|
68
|
+
const tagArea = await page.root.shadowRoot.querySelector(".tag-area");
|
|
69
|
+
expect(tagArea).toEqualAttribute("role", "listbox");
|
|
70
|
+
expect(tagArea).toEqualAttribute("aria-label", "label tag selection. Press Backspace or Delete to remove a tag.");
|
|
71
|
+
expect(tagArea).toEqualAttribute("aria-describedby", "info max-tags");
|
|
72
|
+
expect(tagArea).toEqualAttribute("aria-orientation", "horizontal");
|
|
73
|
+
const tags = await page.root.shadowRoot.querySelectorAll(".tag");
|
|
74
|
+
tags.forEach((tag) => {
|
|
75
|
+
expect(tag).toEqualAttribute("role", "option");
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
it("changes help text when options are not provided", async () => {
|
|
79
|
+
// not editable with options
|
|
80
|
+
page = await newSpecPage({
|
|
81
|
+
components: [TagInput, TagOption],
|
|
82
|
+
html: `<wm-tag-input label="label" add-new="false">
|
|
83
|
+
<wm-tag-option>One</wm-tag-option>
|
|
84
|
+
<wm-tag-option>Two</wm-tag-option>
|
|
85
|
+
<wm-tag-option>Three</wm-tag-option>
|
|
86
|
+
</wm-tag-input>`,
|
|
87
|
+
});
|
|
88
|
+
const el = page.root;
|
|
89
|
+
let helpText = await el.shadowRoot.querySelector(".help-text");
|
|
90
|
+
expect(helpText.textContent).toBe("Search and select a tag.");
|
|
91
|
+
// editable with options
|
|
92
|
+
page = await newSpecPage({
|
|
93
|
+
components: [TagInput, TagOption],
|
|
94
|
+
html: `<wm-tag-input label="label">
|
|
95
|
+
<wm-tag-option>One</wm-tag-option>
|
|
96
|
+
<wm-tag-option>Two</wm-tag-option>
|
|
97
|
+
<wm-tag-option>Three</wm-tag-option>
|
|
98
|
+
</wm-tag-input>`,
|
|
99
|
+
});
|
|
100
|
+
helpText = await page.root.shadowRoot.querySelector(".help-text");
|
|
101
|
+
expect(helpText.textContent).toBe("Search and select a tag. Press the Enter or Comma key to add a new tag.");
|
|
102
|
+
// editable without options
|
|
103
|
+
page = await newSpecPage({
|
|
104
|
+
components: [TagInput, TagOption],
|
|
105
|
+
html: `<wm-tag-input label="label"></wm-tag-input>`,
|
|
106
|
+
});
|
|
107
|
+
helpText = await page.root.shadowRoot.querySelector(".help-text");
|
|
108
|
+
expect(helpText.textContent).toBe(" Press the Enter or Comma key to add a new tag.");
|
|
109
|
+
});
|
|
110
|
+
it("shows the appropriate default placeholder text", async () => {
|
|
111
|
+
// editable with options
|
|
112
|
+
await page.setContent(`<wm-tag-input label="label">
|
|
113
|
+
<wm-tag-option>One</wm-tag-option>
|
|
114
|
+
<wm-tag-option>Two</wm-tag-option>
|
|
115
|
+
</wm-tag-input>`);
|
|
116
|
+
let input = await page.root.shadowRoot.querySelector("input");
|
|
117
|
+
expect(input).toEqualAttribute("placeholder", "Add or search for a tag");
|
|
118
|
+
// editable without options
|
|
119
|
+
page = await newSpecPage({
|
|
120
|
+
components: [TagInput, TagOption],
|
|
121
|
+
html: `<wm-tag-input label="label"></wm-tag-input>`,
|
|
122
|
+
});
|
|
123
|
+
input = await page.root.shadowRoot.querySelector("input");
|
|
124
|
+
expect(input).toEqualAttribute("placeholder", "Add a new tag");
|
|
125
|
+
// not editable
|
|
126
|
+
page = await newSpecPage({
|
|
127
|
+
components: [TagInput, TagOption],
|
|
128
|
+
html: `<wm-tag-input label="label" add-new="false">
|
|
129
|
+
<wm-tag-option>One</wm-tag-option>
|
|
130
|
+
<wm-tag-option>Two</wm-tag-option>
|
|
131
|
+
<wm-tag-option>Three</wm-tag-option>
|
|
132
|
+
</wm-tag-input>`,
|
|
133
|
+
});
|
|
134
|
+
input = await page.root.shadowRoot.querySelector("input");
|
|
135
|
+
expect(input).toEqualAttribute("placeholder", "Search and select a tag");
|
|
136
|
+
});
|
|
137
|
+
it("throws error if no label prop is passed", async () => {
|
|
138
|
+
const mockConsoleError = (console.error = jest.fn());
|
|
139
|
+
await page.setContent(`<wm-tag-input></wm-tag-input>`);
|
|
140
|
+
expect(mockConsoleError).toHaveBeenCalledWith("wm-tag-input must have a label property");
|
|
141
|
+
jest.restoreAllMocks();
|
|
142
|
+
});
|
|
143
|
+
describe("handles announcements", () => {
|
|
144
|
+
it("announces live region notifications", async () => {
|
|
145
|
+
// announce
|
|
146
|
+
const component = new TagInput();
|
|
147
|
+
const div = document.createElement("div");
|
|
148
|
+
div.textContent = "";
|
|
149
|
+
//@ts-ignore
|
|
150
|
+
component.liveRegionEl = div;
|
|
151
|
+
component.announce("Message");
|
|
152
|
+
expect(component.liveRegionMessage).toBe("Message");
|
|
153
|
+
});
|
|
154
|
+
it("announces existing options", async () => {
|
|
155
|
+
// announceExistingOptions
|
|
156
|
+
const component = new TagInput();
|
|
157
|
+
const element1 = {};
|
|
158
|
+
const element2 = {};
|
|
159
|
+
const mockAnnounce = (component.announce = jest.fn());
|
|
160
|
+
jest.spyOn(component, "optionEls", "get").mockReturnValue([element1, element2]);
|
|
161
|
+
const spyRequestAnimationFrame = jest
|
|
162
|
+
.spyOn(window, "requestAnimationFrame")
|
|
163
|
+
//@ts-ignore
|
|
164
|
+
.mockImplementation((cb) => cb());
|
|
165
|
+
component.announceExistingOptions();
|
|
166
|
+
expect(spyRequestAnimationFrame).toHaveBeenCalledTimes(1);
|
|
167
|
+
expect(mockAnnounce).toHaveBeenCalledTimes(1);
|
|
168
|
+
expect(mockAnnounce).toHaveBeenLastCalledWith("2 existing options.");
|
|
169
|
+
jest.clearAllMocks();
|
|
170
|
+
jest.spyOn(component, "optionEls", "get").mockReturnValue([element1]);
|
|
171
|
+
component.announceExistingOptions();
|
|
172
|
+
expect(spyRequestAnimationFrame).toHaveBeenCalledTimes(1);
|
|
173
|
+
expect(mockAnnounce).toHaveBeenCalledTimes(1);
|
|
174
|
+
expect(mockAnnounce).toHaveBeenLastCalledWith("1 existing option.");
|
|
175
|
+
jest.clearAllMocks();
|
|
176
|
+
jest.spyOn(component, "optionEls", "get").mockReturnValue([]);
|
|
177
|
+
component.announceExistingOptions();
|
|
178
|
+
expect(spyRequestAnimationFrame).toHaveBeenCalledTimes(1);
|
|
179
|
+
expect(mockAnnounce).toHaveBeenCalledTimes(1);
|
|
180
|
+
expect(mockAnnounce).toHaveBeenLastCalledWith("0 existing options.");
|
|
181
|
+
jest.restoreAllMocks();
|
|
182
|
+
});
|
|
183
|
+
it("announces character limits warnings", async () => {
|
|
184
|
+
const component = new TagInput();
|
|
185
|
+
let message = component.generateCharacterLimitWarning(0, 50);
|
|
186
|
+
expect(message).toBe("0 of 50 characters entered.");
|
|
187
|
+
message = component.generateCharacterLimitWarning(30, 50);
|
|
188
|
+
expect(message).toBe("30 of 50 characters entered.");
|
|
189
|
+
message = component.generateCharacterLimitWarning(50, 50);
|
|
190
|
+
expect(message).toBe("50 of 50 characters entered. No additional characters will be entered.");
|
|
191
|
+
message = component.generateCharacterLimitWarning(75, 50);
|
|
192
|
+
expect(message).toBe("75 of 50 characters entered. No additional characters will be entered.");
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import AxePuppeteer from "@axe-core/puppeteer";
|
|
2
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
3
|
+
describe("wm-textarea", () => {
|
|
4
|
+
// ts throws erroneous warning about vars being unused...
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
let page, el, textarea;
|
|
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-textarea label='label' character-limit="20"></wm-textarea>
|
|
11
|
+
</main></body></html>`);
|
|
12
|
+
el = await page.find("wm-textarea");
|
|
13
|
+
textarea = await page.find("wm-textarea >>> textarea");
|
|
14
|
+
await page.waitForChanges();
|
|
15
|
+
});
|
|
16
|
+
it("passes Axe checks", async () => {
|
|
17
|
+
const results = await new AxePuppeteer(page).analyze();
|
|
18
|
+
expect(results.violations.length).toBe(0);
|
|
19
|
+
});
|
|
20
|
+
it("updates character count on text entry", async () => {
|
|
21
|
+
await page.keyboard.press("Tab");
|
|
22
|
+
await page.keyboard.type("1234");
|
|
23
|
+
await page.waitForChanges();
|
|
24
|
+
const characterCount = await page.find("wm-textarea >>> .character-count");
|
|
25
|
+
expect(characterCount.textContent).toBe("4/20");
|
|
26
|
+
});
|
|
27
|
+
it("emits event on value change", async () => {
|
|
28
|
+
const eventSpy = await el.spyOnEvent("wmTextareaValueChanged");
|
|
29
|
+
await el.focus();
|
|
30
|
+
await page.keyboard.type("1234");
|
|
31
|
+
await page.waitForChanges();
|
|
32
|
+
expect(eventSpy).toHaveReceivedEventTimes(0);
|
|
33
|
+
await page.keyboard.press("Tab");
|
|
34
|
+
expect(eventSpy).toHaveReceivedEventTimes(1);
|
|
35
|
+
await el.focus();
|
|
36
|
+
await page.keyboard.press("Tab");
|
|
37
|
+
await page.waitForChanges();
|
|
38
|
+
// expect event to still have fired only once, because value has not changed
|
|
39
|
+
expect(eventSpy).toHaveReceivedEventTimes(1);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -65,7 +65,7 @@ export class Textarea {
|
|
|
65
65
|
this.announcement = message;
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return (h("div", {
|
|
68
|
+
return (h("div", { class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { htmlFor: "inputfield", class: "label" }, this.label, this.characterLimit && (h("span", { class: "sr-only" }, " ", globalMessages.getCharacterLimit(this.characterLimit))), this.requiredField && (h("span", { class: "required", "aria-hidden": "true" }, "*")))), h("div", { class: "inner-wrapper" }, h("div", { class: `inputfield-wrapper ${this.errorMessage ? "invalid" : ""}`, style: this.inputWidth ? { width: this.inputWidth } : {} }, h("textarea", { id: "inputfield", disabled: this.isDisabled, "aria-describedby": "info error", onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleBlur(), placeholder: this.placeholder, autocomplete: "off", "aria-required": this.requiredField ? "true" : null, value: this.value, rows: 3, style: { height: this.inputHeight } }), this.characterLimit && typeof this.characterLimit === "number" ? (h("div", { class: `character-count ${this.value.length > this.characterLimit ? "exceeded" : ""}` }, this.charCount, "/", this.characterLimit)) : ("")), this.info && (h("div", { id: "info", class: "info" }, this.info)), h("div", { id: "error", class: "error-message" }, this.errorMessage), h("div", { id: "live-polite", class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.liveRegionEl = el) }, this.announcement))));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "wm-textarea"; }
|
|
71
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { Textarea } from "./wm-textarea";
|
|
3
|
+
// mock observers
|
|
4
|
+
// global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
5
|
+
// observe: jest.fn(),
|
|
6
|
+
// unobserve: jest.fn(),
|
|
7
|
+
// disconnect: jest.fn(),
|
|
8
|
+
// }));
|
|
9
|
+
// global.MutationObserver = jest.fn().mockImplementation(() => ({
|
|
10
|
+
// observe: jest.fn(),
|
|
11
|
+
// unobserve: jest.fn(),
|
|
12
|
+
// disconnect: jest.fn(),
|
|
13
|
+
// }));
|
|
14
|
+
describe("textarea", () => {
|
|
15
|
+
let page;
|
|
16
|
+
let component;
|
|
17
|
+
beforeEach(async () => {
|
|
18
|
+
page = await newSpecPage({
|
|
19
|
+
components: [Textarea],
|
|
20
|
+
html: `<wm-textarea id="textarea" label="label"></wm-textarea>`,
|
|
21
|
+
});
|
|
22
|
+
component = page.root;
|
|
23
|
+
});
|
|
24
|
+
it("builds", async () => {
|
|
25
|
+
expect(page.root).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
it("has right aria roles", async () => {
|
|
28
|
+
page = await newSpecPage({
|
|
29
|
+
components: [Textarea],
|
|
30
|
+
html: `<wm-textarea id="textarea" label="label" disabled required-field></wm-textarea>`,
|
|
31
|
+
});
|
|
32
|
+
const textarea = await page.root.shadowRoot.querySelector("textarea");
|
|
33
|
+
expect(textarea).toEqualAttribute("aria-describedby", "info error");
|
|
34
|
+
expect(textarea).toHaveAttribute("disabled");
|
|
35
|
+
const error = await page.root.shadowRoot.querySelector("#error");
|
|
36
|
+
expect(error).toEqualAttribute("aria-live", "assertive");
|
|
37
|
+
const livePolite = await page.root.shadowRoot.querySelector("#live-polite");
|
|
38
|
+
expect(livePolite).toEqualAttribute("aria-live", "polite");
|
|
39
|
+
});
|
|
40
|
+
it("sets initial value from textcontent", async () => {
|
|
41
|
+
page = await newSpecPage({
|
|
42
|
+
components: [Textarea],
|
|
43
|
+
html: `<wm-textarea id="textarea" label="label">Initial value</wm-textarea>`,
|
|
44
|
+
});
|
|
45
|
+
component = page.root;
|
|
46
|
+
expect(component.value).toBe("Initial value");
|
|
47
|
+
});
|
|
48
|
+
it("renders character limit", async () => {
|
|
49
|
+
page = await newSpecPage({
|
|
50
|
+
components: [Textarea],
|
|
51
|
+
html: `<wm-textarea id="textarea" label="label" character-limit="20">Hello</wm-textarea>`,
|
|
52
|
+
});
|
|
53
|
+
component = page.root;
|
|
54
|
+
const characterLimitArea = await page.root.shadowRoot.querySelector(".character-count");
|
|
55
|
+
expect(characterLimitArea.textContent).toBe("5/20");
|
|
56
|
+
});
|
|
57
|
+
it("properties override height and width", async () => {
|
|
58
|
+
page = await newSpecPage({
|
|
59
|
+
components: [Textarea],
|
|
60
|
+
html: `<wm-textarea id="textarea" label="label" input-width="200px" input-height="300px"></wm-textarea>`,
|
|
61
|
+
});
|
|
62
|
+
component = page.root;
|
|
63
|
+
const textarea = await component.shadowRoot.querySelector("textarea");
|
|
64
|
+
expect(textarea).toEqualAttribute("style", "height: 300px;");
|
|
65
|
+
const widthWrapper = await component.shadowRoot.querySelector(".inputfield-wrapper");
|
|
66
|
+
expect(widthWrapper).toEqualAttribute("style", "width: 200px;");
|
|
67
|
+
});
|
|
68
|
+
it("displays info and error-message properties", async () => {
|
|
69
|
+
page = await newSpecPage({
|
|
70
|
+
components: [Textarea],
|
|
71
|
+
html: `<wm-textarea id="textarea" label="label" info="example info text" error-message="example error text"></wm-textarea>`,
|
|
72
|
+
});
|
|
73
|
+
component = page.root;
|
|
74
|
+
const info = await component.shadowRoot.querySelector("#info");
|
|
75
|
+
expect(info.textContent).toBe("example info text");
|
|
76
|
+
const error = await component.shadowRoot.querySelector("#error");
|
|
77
|
+
expect(error.textContent).toBe("example error text");
|
|
78
|
+
});
|
|
79
|
+
});
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import AxePuppeteer from "@axe-core/puppeteer";
|
|
2
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
3
|
+
describe("wm-timepicker", () => {
|
|
4
|
+
let page, input;
|
|
5
|
+
beforeEach(async () => {
|
|
6
|
+
page = await newE2EPage();
|
|
7
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
8
|
+
<wm-timepicker label="timepicker" dropdown-time="09:00"></wm-timepicker>
|
|
9
|
+
</main></body></html>`);
|
|
10
|
+
input = await page.find("wm-timepicker >>> input");
|
|
11
|
+
await page.waitForChanges();
|
|
12
|
+
});
|
|
13
|
+
it("passes Axe checks", async () => {
|
|
14
|
+
const results = await new AxePuppeteer(page).analyze();
|
|
15
|
+
expect(results.violations.length).toBe(0);
|
|
16
|
+
});
|
|
17
|
+
it("emits input blurred event", async () => {
|
|
18
|
+
page = await newE2EPage();
|
|
19
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
20
|
+
<wm-timepicker label="timepicker"></wm-timepicker>
|
|
21
|
+
<div id="indicator">no event heard</div>
|
|
22
|
+
</main></body></html>`);
|
|
23
|
+
input = await page.find("wm-timepicker >>> input");
|
|
24
|
+
await page.waitForChanges();
|
|
25
|
+
await page.evaluate(async () => {
|
|
26
|
+
const indicator = document.querySelector("#indicator");
|
|
27
|
+
await document.addEventListener("wmTimepickerInputBlurred", () => (indicator.textContent = "event heard"));
|
|
28
|
+
});
|
|
29
|
+
await page.waitForChanges;
|
|
30
|
+
let indicator = await page.find("#indicator");
|
|
31
|
+
expect(indicator.textContent).toBe("no event heard");
|
|
32
|
+
await input.type("522");
|
|
33
|
+
await page.waitForChanges();
|
|
34
|
+
await page.keyboard.press("Tab");
|
|
35
|
+
await page.waitForChanges();
|
|
36
|
+
expect(indicator.textContent).toBe("event heard");
|
|
37
|
+
});
|
|
38
|
+
it("opens to preselected time", async () => {
|
|
39
|
+
page = await newE2EPage();
|
|
40
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
41
|
+
<wm-timepicker label="timepicker" preselected="14:15"></wm-timepicker>
|
|
42
|
+
</main></body></html>`);
|
|
43
|
+
await page.waitForChanges();
|
|
44
|
+
await page.keyboard.press("Tab");
|
|
45
|
+
await page.waitForChanges();
|
|
46
|
+
await page.keyboard.press("Tab");
|
|
47
|
+
await page.waitForChanges();
|
|
48
|
+
await page.keyboard.press("Enter");
|
|
49
|
+
await page.waitForChanges();
|
|
50
|
+
const nineAm = await page.find("wm-timepicker >>> li#option58");
|
|
51
|
+
expect(nineAm).toEqualAttribute("tabindex", 0);
|
|
52
|
+
});
|
|
53
|
+
it("opens next option with down arrow key", async () => {
|
|
54
|
+
await page.keyboard.press("Tab");
|
|
55
|
+
await page.waitForChanges();
|
|
56
|
+
await page.keyboard.press("Tab");
|
|
57
|
+
await page.waitForChanges();
|
|
58
|
+
await page.keyboard.press("ArrowDown");
|
|
59
|
+
await page.waitForChanges();
|
|
60
|
+
const nineFifteenAm = await page.find("wm-timepicker >>> li#option38");
|
|
61
|
+
expect(nineFifteenAm).toEqualAttribute("tabindex", 0);
|
|
62
|
+
});
|
|
63
|
+
it("opens previous option with up arrow key", async () => {
|
|
64
|
+
await page.keyboard.press("Tab");
|
|
65
|
+
await page.waitForChanges();
|
|
66
|
+
await page.keyboard.press("Tab");
|
|
67
|
+
await page.waitForChanges();
|
|
68
|
+
await page.keyboard.press("ArrowUp");
|
|
69
|
+
await page.waitForChanges();
|
|
70
|
+
const eightFourtyFiveAm = await page.find("wm-timepicker >>> li#option36");
|
|
71
|
+
expect(eightFourtyFiveAm).toEqualAttribute("tabindex", 0);
|
|
72
|
+
});
|
|
73
|
+
it("navigates through the dropdown with keyboard", async () => {
|
|
74
|
+
await page.keyboard.press("Tab");
|
|
75
|
+
await page.waitForChanges();
|
|
76
|
+
await page.keyboard.press("Tab");
|
|
77
|
+
await page.waitForChanges();
|
|
78
|
+
await page.keyboard.press("Enter");
|
|
79
|
+
await page.waitForChanges();
|
|
80
|
+
const nineAm = await page.find("wm-timepicker >>> li#option37");
|
|
81
|
+
const nineFifteenAm = await page.find("wm-timepicker >>> li#option38");
|
|
82
|
+
await page.keyboard.press("ArrowDown");
|
|
83
|
+
await page.waitForChanges();
|
|
84
|
+
expect(nineFifteenAm).toEqualAttribute("tabindex", 0);
|
|
85
|
+
await page.keyboard.press("ArrowUp");
|
|
86
|
+
await page.waitForChanges();
|
|
87
|
+
expect(nineAm).toEqualAttribute("tabindex", 0);
|
|
88
|
+
});
|
|
89
|
+
it("emits timeSelected event with time", async () => {
|
|
90
|
+
page = await newE2EPage();
|
|
91
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
92
|
+
<wm-timepicker label="timepicker" value="03:15 PM" preselected="15:15"></wm-timepicker>
|
|
93
|
+
<div id="indicator">no event heard</div>
|
|
94
|
+
</main></body></html>`);
|
|
95
|
+
input = await page.find("wm-timepicker >>> input");
|
|
96
|
+
await page.waitForChanges();
|
|
97
|
+
await page.evaluate(async () => {
|
|
98
|
+
const indicator = document.querySelector("#indicator");
|
|
99
|
+
await document.addEventListener("wmTimepickerTimeSelected", (ev) => (indicator.textContent = `event heard: ${ev.detail.time}`));
|
|
100
|
+
});
|
|
101
|
+
await page.waitForChanges;
|
|
102
|
+
let indicator = await page.find("#indicator");
|
|
103
|
+
expect(indicator.textContent).toBe("no event heard");
|
|
104
|
+
await page.keyboard.press("Tab");
|
|
105
|
+
await page.keyboard.press("Tab");
|
|
106
|
+
await page.keyboard.press("Enter");
|
|
107
|
+
await page.waitForChanges();
|
|
108
|
+
await page.keyboard.press("Enter");
|
|
109
|
+
await page.waitForChanges();
|
|
110
|
+
expect(indicator.textContent).toBe("event heard: 15:15");
|
|
111
|
+
});
|
|
112
|
+
it("closes dropdown on Escape and Tab", async () => {
|
|
113
|
+
const dropdown = await page.find("wm-timepicker >>> ul.options");
|
|
114
|
+
expect(dropdown).not.toHaveClass("open");
|
|
115
|
+
await page.keyboard.press("Tab");
|
|
116
|
+
await page.waitForChanges();
|
|
117
|
+
await page.keyboard.press("Tab");
|
|
118
|
+
await page.waitForChanges();
|
|
119
|
+
await page.keyboard.press("Enter");
|
|
120
|
+
await page.waitForChanges();
|
|
121
|
+
expect(dropdown).toHaveClass("open");
|
|
122
|
+
await page.keyboard.press("Escape");
|
|
123
|
+
await page.waitForChanges();
|
|
124
|
+
expect(dropdown).not.toHaveClass("open");
|
|
125
|
+
await page.waitForChanges();
|
|
126
|
+
await page.keyboard.press("Enter");
|
|
127
|
+
await page.waitForChanges();
|
|
128
|
+
expect(dropdown).toHaveClass("open");
|
|
129
|
+
await page.keyboard.press("Tab");
|
|
130
|
+
await page.waitForChanges();
|
|
131
|
+
expect(dropdown).not.toHaveClass("open");
|
|
132
|
+
});
|
|
133
|
+
it("closes dropdown when clicking outside component", async () => {
|
|
134
|
+
const dropdown = await page.find("wm-timepicker >>> ul.options");
|
|
135
|
+
expect(dropdown).not.toHaveClass("open");
|
|
136
|
+
await page.keyboard.press("Tab");
|
|
137
|
+
await page.waitForChanges();
|
|
138
|
+
await page.keyboard.press("Tab");
|
|
139
|
+
await page.waitForChanges();
|
|
140
|
+
await page.keyboard.press("Enter");
|
|
141
|
+
await page.waitForChanges();
|
|
142
|
+
expect(dropdown).toHaveClass("open");
|
|
143
|
+
await page.mouse.click(-10, -10);
|
|
144
|
+
await page.waitForChanges();
|
|
145
|
+
expect(dropdown).not.toHaveClass("open");
|
|
146
|
+
});
|
|
147
|
+
it("handles Home and End keys", async () => {
|
|
148
|
+
await page.keyboard.press("Tab");
|
|
149
|
+
await page.waitForChanges();
|
|
150
|
+
await page.keyboard.press("Tab");
|
|
151
|
+
await page.waitForChanges();
|
|
152
|
+
await page.keyboard.press("Enter");
|
|
153
|
+
await page.waitForChanges();
|
|
154
|
+
const firstOption = await page.find("wm-timepicker >>> li#option1");
|
|
155
|
+
await page.keyboard.press("Home");
|
|
156
|
+
await page.waitForChanges();
|
|
157
|
+
expect(firstOption).toEqualAttribute("tabindex", 0);
|
|
158
|
+
const lastOption = await page.find("wm-timepicker >>> li#option96");
|
|
159
|
+
await page.keyboard.press("End");
|
|
160
|
+
await page.waitForChanges();
|
|
161
|
+
expect(lastOption).toEqualAttribute("tabindex", 0);
|
|
162
|
+
});
|
|
163
|
+
});
|
|
@@ -275,13 +275,13 @@ export class Timepicker {
|
|
|
275
275
|
return this.times.map((time, index) => (h("li", { id: `option${index + 1}`, "data-time": time, role: "option", onClick: () => this.handleOptionClick(time) }, this.reformatTimeInternal("12", time))));
|
|
276
276
|
}
|
|
277
277
|
render() {
|
|
278
|
-
return (h(Host, {
|
|
278
|
+
return (h(Host, { onBlur: () => this.close(false) }, h("div", { class: `wrapper label-${this.labelPosition} ${!!this.errorMessage ? "invalid" : ""}`, ref: (t) => (this.tpWrapper = t) }, h("div", { class: "label-wrapper" }, this.labelPosition !== "none" && (h("label", { id: "label", class: "label", htmlFor: "time-input" }, this.label, this.requiredField && (h("span", { class: "required", "aria-hidden": "true" }, "*"))))), h("div", null, h("div", { class: "inner-wrapper" }, h("input", { id: "time-input", "aria-label": this.label, "aria-describedby": "error", ref: (el) => (this.inputEl = el), onBlur: () => this.handleInputBlur(), onInput: () => (this.value = this.inputEl.value), disabled: this.isDisabled, "aria-required": this.requiredField ? "true" : null, placeholder: this.timeFormat, autocomplete: "off", value: this.value, onFocus: () => this.tpWrapper.classList.add("focus") }), h("button", { id: "btn", ref: (el) => (this.buttonEl = el), disabled: this.isDisabled, "aria-controls": "list", "aria-expanded": this.isExpanded ? "true" : "false", "aria-label": this.buttonAriaLabel, "aria-describedby": "time-input", onClick: () => (this.isExpanded ? this.close() : this.open()),
|
|
279
279
|
// This addresses an issue in Safari, where clicking buttons does not focus them
|
|
280
280
|
// if the button does not receive focus when clicked, Timepicker incorrectly emits a blur event
|
|
281
281
|
onMouseDown: (ev) => {
|
|
282
282
|
ev.preventDefault();
|
|
283
283
|
this.buttonEl.focus();
|
|
284
|
-
} }, h("span", {
|
|
284
|
+
} }, h("span", { class: "clock" })), h("ul", { class: `options ${this.isExpanded ? "open" : ""} ${this.openUp ? "upwards" : ""}`, id: "list", role: "listbox", "aria-labelledby": "label", "aria-describedby": this.isExpanded ? "collapsed" : null, tabindex: -1, ref: (el) => (this.optionsEl = el) }, this.renderOptions())), h("div", { id: "error", class: "error" }, this.errorMessage)), h("div", { id: "live-polite", class: "sr-only", "aria-live": "polite", "aria-atomic": "true", ref: (el) => (this.liveRegionEl = el) }))));
|
|
285
285
|
}
|
|
286
286
|
static get is() { return "wm-timepicker"; }
|
|
287
287
|
static get encapsulation() { return "shadow"; }
|
|
@@ -468,9 +468,8 @@ export class Timepicker {
|
|
|
468
468
|
"complexType": {
|
|
469
469
|
"signature": "(input: string) => Promise<boolean>",
|
|
470
470
|
"parameters": [{
|
|
471
|
-
"
|
|
472
|
-
"
|
|
473
|
-
"docs": ""
|
|
471
|
+
"tags": [],
|
|
472
|
+
"text": ""
|
|
474
473
|
}],
|
|
475
474
|
"references": {
|
|
476
475
|
"Promise": {
|
|
@@ -489,13 +488,11 @@ export class Timepicker {
|
|
|
489
488
|
"complexType": {
|
|
490
489
|
"signature": "(format: \"12\" | \"24\", time: TimeFormat12 | TimeFormat24) => Promise<string>",
|
|
491
490
|
"parameters": [{
|
|
492
|
-
"
|
|
493
|
-
"
|
|
494
|
-
"docs": ""
|
|
491
|
+
"tags": [],
|
|
492
|
+
"text": ""
|
|
495
493
|
}, {
|
|
496
|
-
"
|
|
497
|
-
"
|
|
498
|
-
"docs": ""
|
|
494
|
+
"tags": [],
|
|
495
|
+
"text": ""
|
|
499
496
|
}],
|
|
500
497
|
"references": {
|
|
501
498
|
"Promise": {
|