@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,382 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
import { AxePuppeteer } from "@axe-core/puppeteer";
|
|
3
|
+
describe("wm-datepicker", () => {
|
|
4
|
+
let page, component, input, btn, popup, popupTitleDay;
|
|
5
|
+
beforeEach(async () => {
|
|
6
|
+
page = await newE2EPage();
|
|
7
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
8
|
+
<wm-datepicker id="dp" label="label"></wm-datepicker>
|
|
9
|
+
</main></body></html>`);
|
|
10
|
+
component = await page.find("wm-datepicker");
|
|
11
|
+
input = await page.find("wm-datepicker >>> input");
|
|
12
|
+
btn = await page.find("wm-datepicker >>> #toggle");
|
|
13
|
+
popup = await page.find("wm-datepicker >>> #popup");
|
|
14
|
+
popupTitleDay = await page.find("wm-datepicker >>> #popup-title-month");
|
|
15
|
+
// await page.keyboard.press("Tab");
|
|
16
|
+
// await page.waitForChanges();
|
|
17
|
+
});
|
|
18
|
+
it("passes Axe checks", async () => {
|
|
19
|
+
const results = await new AxePuppeteer(page).analyze();
|
|
20
|
+
expect(results.violations.length).toBe(0);
|
|
21
|
+
});
|
|
22
|
+
// TODO
|
|
23
|
+
// see https://dequeuniversity.com/checklists/web/form-validation-feedback
|
|
24
|
+
// for Dynamic Error Detection / Error messages
|
|
25
|
+
// see also role="alert"
|
|
26
|
+
/* INPUT */
|
|
27
|
+
// See datepicker-input.e2e.ts
|
|
28
|
+
/* BUTTON */
|
|
29
|
+
// Opening and closing the date picker
|
|
30
|
+
it("opens at today's date by default", async () => {
|
|
31
|
+
const popup = await page.find("wm-datepicker >>> .popup");
|
|
32
|
+
const today = new Date();
|
|
33
|
+
const year = today.getUTCFullYear();
|
|
34
|
+
const month = (today.getUTCMonth() + 1).toString().padStart(2, "0");
|
|
35
|
+
const day = today.getUTCDate().toString();
|
|
36
|
+
const dateTable = await popup.find("[role='grid']");
|
|
37
|
+
// await page.waitForChanges();
|
|
38
|
+
const selDate = await dateTable.find("[aria-selected='true']");
|
|
39
|
+
expect(selDate).toEqualAttribute("data-year", year);
|
|
40
|
+
expect(selDate).toEqualAttribute("data-month", month);
|
|
41
|
+
expect(selDate.textContent).toBe(day);
|
|
42
|
+
});
|
|
43
|
+
it("opens at the date in the input if there is one", async () => {
|
|
44
|
+
const input = await page.find("wm-datepicker >>> input");
|
|
45
|
+
const popup = await page.find("wm-datepicker >>> .popup");
|
|
46
|
+
await input.type("02/01/2030");
|
|
47
|
+
await component.setProperty("calendarDate", "2030-02-01");
|
|
48
|
+
await page.waitForChanges();
|
|
49
|
+
await page.keyboard.press("Tab");
|
|
50
|
+
await page.keyboard.press("Enter");
|
|
51
|
+
await page.waitForChanges();
|
|
52
|
+
const dateTable = await popup.find("[role='grid']");
|
|
53
|
+
const selDate = await dateTable.find("[aria-selected='true']");
|
|
54
|
+
expect(selDate).toEqualAttribute("data-year", "2030");
|
|
55
|
+
expect(selDate).toEqualAttribute("data-month", "02");
|
|
56
|
+
expect(selDate.textContent).toBe("1");
|
|
57
|
+
});
|
|
58
|
+
it("Closes the popup when user triggers the calendar button", async () => {
|
|
59
|
+
const popup = await page.find("wm-datepicker >>> .popup");
|
|
60
|
+
await page.keyboard.press("Tab"); // in input
|
|
61
|
+
await page.keyboard.press("Tab"); // on btn
|
|
62
|
+
await page.keyboard.press("Enter");
|
|
63
|
+
await page.waitForChanges();
|
|
64
|
+
expect(popup).toHaveClass("open");
|
|
65
|
+
await page.keyboard.press("Escape");
|
|
66
|
+
await page.waitForChanges();
|
|
67
|
+
expect(popup).not.toHaveClass("open");
|
|
68
|
+
});
|
|
69
|
+
/* POPUP */
|
|
70
|
+
it("closes the calendar popup when the user presses ESCAPE", async () => {
|
|
71
|
+
await input.type("02/03/2019");
|
|
72
|
+
await component.setProperty("calendarDate", "2019-02-03");
|
|
73
|
+
await page.waitForChanges();
|
|
74
|
+
await page.keyboard.press("Tab");
|
|
75
|
+
await page.keyboard.press("Enter");
|
|
76
|
+
await page.waitForChanges();
|
|
77
|
+
await page.keyboard.press("Escape");
|
|
78
|
+
await page.waitForChanges();
|
|
79
|
+
expect(popup).not.toHaveClass("open");
|
|
80
|
+
});
|
|
81
|
+
it("shows the next month on PAGE DOWN and shows the previous month on PAGE UP", async () => {
|
|
82
|
+
await input.type("02/03/2019");
|
|
83
|
+
await component.setProperty("calendarDate", "2019-02-03");
|
|
84
|
+
await page.waitForChanges();
|
|
85
|
+
await page.keyboard.press("Tab");
|
|
86
|
+
await page.keyboard.press("Enter");
|
|
87
|
+
await page.waitForChanges();
|
|
88
|
+
await page.keyboard.press("PageDown");
|
|
89
|
+
await page.waitForChanges();
|
|
90
|
+
expect(popupTitleDay.textContent).toBe("March 2019");
|
|
91
|
+
let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
92
|
+
expect(activeElId).toEqual("cell-20190303");
|
|
93
|
+
await page.keyboard.press("PageUp");
|
|
94
|
+
await page.waitForChanges();
|
|
95
|
+
await page.keyboard.press("PageUp");
|
|
96
|
+
await page.waitForChanges();
|
|
97
|
+
await page.keyboard.press("PageUp");
|
|
98
|
+
await page.waitForChanges();
|
|
99
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
100
|
+
expect(activeElId).toEqual("cell-20181203");
|
|
101
|
+
});
|
|
102
|
+
it("handles HOME and END keys", async () => {
|
|
103
|
+
await input.type("02/15/2020");
|
|
104
|
+
await component.setProperty("calendarDate", "2020-02-15");
|
|
105
|
+
await page.waitForChanges();
|
|
106
|
+
await page.keyboard.press("Tab");
|
|
107
|
+
await page.keyboard.press("Enter");
|
|
108
|
+
await page.waitForChanges();
|
|
109
|
+
await page.keyboard.press("Home");
|
|
110
|
+
await page.waitForChanges();
|
|
111
|
+
const firstDayOfMonth = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
112
|
+
expect(firstDayOfMonth).toEqual("cell-20200201");
|
|
113
|
+
await page.keyboard.press("End");
|
|
114
|
+
await page.waitForChanges();
|
|
115
|
+
const lastDayOfMonth = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
116
|
+
expect(lastDayOfMonth).toEqual("cell-20200229"); // 2020 is a leap year
|
|
117
|
+
});
|
|
118
|
+
it("navigates the calendar with keyboard (day view)", async () => {
|
|
119
|
+
// left/right: -1 / +1 in the row
|
|
120
|
+
// up/down
|
|
121
|
+
await input.type("08/15/2024");
|
|
122
|
+
await component.setProperty("calendarDate", "2024-08-15");
|
|
123
|
+
await page.keyboard.press("Tab"); // on the toggle popup btn
|
|
124
|
+
await page.waitForChanges();
|
|
125
|
+
await page.keyboard.press("Enter"); // open popup
|
|
126
|
+
await page.waitForChanges();
|
|
127
|
+
await page.keyboard.press("ArrowLeft");
|
|
128
|
+
await page.waitForChanges();
|
|
129
|
+
let focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
130
|
+
await page.waitForChanges();
|
|
131
|
+
expect(focusedCell).toEqualAttribute("id", "cell-20240814");
|
|
132
|
+
await page.keyboard.press("ArrowUp");
|
|
133
|
+
await page.waitForChanges();
|
|
134
|
+
focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
135
|
+
expect(focusedCell).toEqualAttribute("id", "cell-20240807");
|
|
136
|
+
await page.keyboard.press("ArrowRight");
|
|
137
|
+
await page.waitForChanges();
|
|
138
|
+
focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
139
|
+
expect(focusedCell).toEqualAttribute("id", "cell-20240808");
|
|
140
|
+
await page.keyboard.press("ArrowDown");
|
|
141
|
+
await page.waitForChanges();
|
|
142
|
+
focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
143
|
+
expect(focusedCell).toEqualAttribute("id", "cell-20240815");
|
|
144
|
+
});
|
|
145
|
+
it("navigates the calendar with keyboard (month view)", async () => {
|
|
146
|
+
await input.type("08/15/2024");
|
|
147
|
+
await component.setProperty("calendarDate", "2024-08-15");
|
|
148
|
+
await page.keyboard.press("Tab"); // on the toggle popup btn
|
|
149
|
+
await page.waitForChanges();
|
|
150
|
+
await page.keyboard.press("Enter"); // open popup
|
|
151
|
+
await page.keyboard.down("Shift");
|
|
152
|
+
await page.waitForChanges();
|
|
153
|
+
await page.keyboard.press("Tab"); // next btn
|
|
154
|
+
await page.waitForChanges();
|
|
155
|
+
await page.keyboard.press("Tab"); // popup-title (month + year)
|
|
156
|
+
await page.waitForChanges();
|
|
157
|
+
await page.keyboard.press("Enter");
|
|
158
|
+
await page.waitForChanges();
|
|
159
|
+
await page.keyboard.up("Shift");
|
|
160
|
+
await page.waitForChanges();
|
|
161
|
+
await page.keyboard.press("ArrowLeft");
|
|
162
|
+
await page.waitForChanges();
|
|
163
|
+
let focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
164
|
+
await page.waitForChanges();
|
|
165
|
+
expect(focusedCell).toEqualAttribute("id", "month-6"); // month is july (7), 0-indexed
|
|
166
|
+
await page.keyboard.press("ArrowUp");
|
|
167
|
+
await page.waitForChanges();
|
|
168
|
+
focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
169
|
+
expect(focusedCell).toEqualAttribute("id", "month-3");
|
|
170
|
+
await page.keyboard.press("ArrowRight");
|
|
171
|
+
await page.waitForChanges();
|
|
172
|
+
focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
173
|
+
expect(focusedCell).toEqualAttribute("id", "month-4");
|
|
174
|
+
await page.keyboard.press("ArrowDown");
|
|
175
|
+
await page.waitForChanges();
|
|
176
|
+
focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
177
|
+
expect(focusedCell).toEqualAttribute("id", "month-7");
|
|
178
|
+
});
|
|
179
|
+
// it("goes to the year view when the month name is clicked", async () => {
|
|
180
|
+
// // (i.e. allows selection of a month)
|
|
181
|
+
// });
|
|
182
|
+
it("goes to the previous/next month when the arrow button is triggered in day view", async () => {
|
|
183
|
+
await input.type("11/29/1999");
|
|
184
|
+
await component.setProperty("calendarDate", "1999-11-29");
|
|
185
|
+
await page.keyboard.press("Tab"); // on the toggle popup btn
|
|
186
|
+
await page.waitForChanges();
|
|
187
|
+
await page.keyboard.press("Enter"); // open popup
|
|
188
|
+
await page.waitForChanges();
|
|
189
|
+
await page.keyboard.down("Shift");
|
|
190
|
+
await page.waitForChanges();
|
|
191
|
+
await page.keyboard.press("Tab"); // next btn
|
|
192
|
+
await page.waitForChanges();
|
|
193
|
+
await page.keyboard.press("Tab"); // popup-title (month + year)
|
|
194
|
+
await page.waitForChanges();
|
|
195
|
+
await page.keyboard.press("Tab"); // prev btn
|
|
196
|
+
await page.waitForChanges();
|
|
197
|
+
await page.keyboard.up("Shift");
|
|
198
|
+
await page.waitForChanges();
|
|
199
|
+
await page.keyboard.press("Enter"); // press prev btn
|
|
200
|
+
await page.waitForChanges();
|
|
201
|
+
expect(popup).toHaveClasses(["open", "day-view"]);
|
|
202
|
+
expect(popupTitleDay.textContent).toBe("October 1999");
|
|
203
|
+
await page.keyboard.press("Tab"); // popup title btn
|
|
204
|
+
await page.keyboard.press("Tab"); // next btn
|
|
205
|
+
await page.keyboard.press("Enter"); // press next btn
|
|
206
|
+
await page.waitForChanges();
|
|
207
|
+
await page.keyboard.press("Enter"); // press next btn
|
|
208
|
+
await page.waitForChanges();
|
|
209
|
+
expect(popupTitleDay.textContent).toBe("December 1999");
|
|
210
|
+
});
|
|
211
|
+
it("goes to the previous/next year when the arrow button is clicked in month view", async () => {
|
|
212
|
+
await input.type("11/29/1999");
|
|
213
|
+
await component.setProperty("calendarDate", "1999-11-29");
|
|
214
|
+
await page.waitForChanges();
|
|
215
|
+
await page.keyboard.press("Tab"); // on the toggle popup btn
|
|
216
|
+
await page.waitForChanges();
|
|
217
|
+
await page.keyboard.press("Enter"); // open popup
|
|
218
|
+
await page.waitForChanges();
|
|
219
|
+
await page.keyboard.down("Shift");
|
|
220
|
+
await page.keyboard.press("Tab"); // next btn
|
|
221
|
+
await page.waitForChanges();
|
|
222
|
+
await page.keyboard.press("Tab"); // month view btn
|
|
223
|
+
await page.waitForChanges();
|
|
224
|
+
await page.keyboard.up("Shift");
|
|
225
|
+
await page.waitForChanges();
|
|
226
|
+
await page.keyboard.press("Enter"); // press month view btn
|
|
227
|
+
await page.waitForChanges();
|
|
228
|
+
expect(popup).toHaveClasses(["open", "month-view"]);
|
|
229
|
+
const title = await popup.find("#popup-title-year");
|
|
230
|
+
expect(title.textContent).toBe("1999");
|
|
231
|
+
await page.keyboard.down("Shift");
|
|
232
|
+
await page.keyboard.press("Tab"); // next btn
|
|
233
|
+
await page.keyboard.up("Shift");
|
|
234
|
+
await page.keyboard.press("Enter"); // press next btn
|
|
235
|
+
await page.waitForChanges();
|
|
236
|
+
expect(title.textContent).toBe("2000");
|
|
237
|
+
await page.keyboard.down("Shift");
|
|
238
|
+
await page.keyboard.press("Tab"); // year btn
|
|
239
|
+
await page.keyboard.down("Shift");
|
|
240
|
+
await page.keyboard.press("Tab"); // prev btn
|
|
241
|
+
await page.keyboard.up("Shift");
|
|
242
|
+
await page.keyboard.press("Enter"); // press prev btn
|
|
243
|
+
await page.waitForChanges();
|
|
244
|
+
expect(title.textContent).toBe("1999");
|
|
245
|
+
await page.keyboard.press("Enter"); // press prev btn
|
|
246
|
+
await page.waitForChanges();
|
|
247
|
+
await page.keyboard.press("Enter"); // press prev btn
|
|
248
|
+
await page.waitForChanges();
|
|
249
|
+
expect(title.textContent).toBe("1997");
|
|
250
|
+
});
|
|
251
|
+
it("has the aria attributes related to the popup", async () => {
|
|
252
|
+
// NB "If the element with the aria-expanded attribute controls the expansion of another grouping container
|
|
253
|
+
// that is not 'owned by' the element, the author SHOULD reference the container by using the aria-controls attribute."
|
|
254
|
+
// src: https://www.w3.org/TR/wai-aria-1.1/#aria-expanded
|
|
255
|
+
expect(btn).toHaveAttribute("aria-expanded");
|
|
256
|
+
// Not sure is aria-haspopup is necessary. If it is present the popup should have a role
|
|
257
|
+
// if that role is grid (the only role that seems to correspond) then the cells must have
|
|
258
|
+
// a role of gridcell
|
|
259
|
+
// https://www.w3.org/TR/wai-aria/#aria-haspopup
|
|
260
|
+
// expect(btn).toHaveAttribute("aria-haspopup");
|
|
261
|
+
//Removed aria-controls since the popup comes immediately after the aria-expanded controller:
|
|
262
|
+
//https://www.heydonworks.com/article/aria-controls-is-poop
|
|
263
|
+
});
|
|
264
|
+
it("toggles aria-expanded attribute", async () => {
|
|
265
|
+
expect(btn).toEqualAttribute("aria-expanded", "false");
|
|
266
|
+
await page.keyboard.press("Tab");
|
|
267
|
+
await page.keyboard.press("Tab");
|
|
268
|
+
await page.keyboard.press("Enter");
|
|
269
|
+
await page.waitForChanges();
|
|
270
|
+
expect(btn).toEqualAttribute("aria-expanded", "true");
|
|
271
|
+
});
|
|
272
|
+
it("properly fills the-label on table cells", async () => {
|
|
273
|
+
// screen reader should read "Thursday, May 10 2018" on focus
|
|
274
|
+
// screen reader should read "Thursday, May 10 2018, selected" on select
|
|
275
|
+
await input.type("05/10/2018");
|
|
276
|
+
await component.setProperty("calendarDate", "2018-05-10");
|
|
277
|
+
await page.waitForChanges();
|
|
278
|
+
await page.keyboard.press("Tab");
|
|
279
|
+
await page.waitForChanges();
|
|
280
|
+
await page.keyboard.press("Enter");
|
|
281
|
+
await page.waitForChanges();
|
|
282
|
+
const focusedCell = await popup.find("[role='gridcell'][tabindex='0']");
|
|
283
|
+
await page.waitForChanges();
|
|
284
|
+
// day of the week is read by sr bcse it's the table column
|
|
285
|
+
expect(focusedCell).toEqualAttribute("aria-label", "Thursday, May 10, 2018");
|
|
286
|
+
// screen reader should read "Thursday, May 10 2018, selected" on select
|
|
287
|
+
await page.keyboard.press("Enter");
|
|
288
|
+
await page.waitForChanges();
|
|
289
|
+
const selCell = await popup.find("[aria-selected='true']");
|
|
290
|
+
// day of the week is read by sr bcse it's the table column
|
|
291
|
+
expect(selCell).toEqualAttribute("aria-label", "Thursday, May 10, 2018");
|
|
292
|
+
});
|
|
293
|
+
it("aligns dates properly", async () => {
|
|
294
|
+
// -> check that both 01/01/1999 and 12/31/2100 are in the Friday column
|
|
295
|
+
// couldn't figure this one out...
|
|
296
|
+
});
|
|
297
|
+
it("emits event on input blur", async () => {
|
|
298
|
+
page = await newE2EPage();
|
|
299
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
300
|
+
<wm-datepicker id="dp" label="label"></wm-datepicker>
|
|
301
|
+
<div id="indicator">no event heard</div>
|
|
302
|
+
</main></body></html>`);
|
|
303
|
+
component = await page.find("wm-datepicker");
|
|
304
|
+
input = await page.find("wm-datepicker >>> input");
|
|
305
|
+
await page.waitForChanges();
|
|
306
|
+
await page.evaluate(async () => {
|
|
307
|
+
const indicator = document.querySelector("#indicator");
|
|
308
|
+
await document.addEventListener("wmDatepickerInputBlurred", () => (indicator.textContent = "event heard"));
|
|
309
|
+
});
|
|
310
|
+
await page.waitForChanges;
|
|
311
|
+
const indicator = await page.find("#indicator");
|
|
312
|
+
expect(indicator.textContent).toBe("no event heard");
|
|
313
|
+
await input.type("05/10/2018");
|
|
314
|
+
await page.keyboard.press("Tab");
|
|
315
|
+
await page.waitForChanges();
|
|
316
|
+
expect(indicator.textContent).toBe("event heard");
|
|
317
|
+
});
|
|
318
|
+
it("emits event on change", async () => {
|
|
319
|
+
page = await newE2EPage();
|
|
320
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
321
|
+
<wm-datepicker id="dp" label="label"></wm-datepicker>
|
|
322
|
+
<div id="indicator">events heard: 0</div>
|
|
323
|
+
</main></body></html>`);
|
|
324
|
+
component = await page.find("wm-datepicker");
|
|
325
|
+
input = await page.find("wm-datepicker >>> input");
|
|
326
|
+
await page.waitForChanges();
|
|
327
|
+
await page.evaluate(async () => {
|
|
328
|
+
const indicator = document.querySelector("#indicator");
|
|
329
|
+
await document
|
|
330
|
+
.querySelector("wm-datepicker")
|
|
331
|
+
.addEventListener("change", () => (indicator.textContent =
|
|
332
|
+
indicator.textContent.slice(0, -1) + (parseInt(indicator.textContent.slice(-1)) + 1)));
|
|
333
|
+
});
|
|
334
|
+
await page.waitForChanges;
|
|
335
|
+
const indicator = await page.find("#indicator");
|
|
336
|
+
expect(indicator.textContent).toBe("events heard: 0");
|
|
337
|
+
// user types date
|
|
338
|
+
await input.type("05/10/2018");
|
|
339
|
+
await page.keyboard.press("Tab");
|
|
340
|
+
await page.waitForChanges();
|
|
341
|
+
expect(indicator.textContent).toBe("events heard: 1");
|
|
342
|
+
// user selects date from calendar
|
|
343
|
+
await page.keyboard.press("Enter");
|
|
344
|
+
await page.waitForChanges();
|
|
345
|
+
await page.keyboard.press("ArrowRight");
|
|
346
|
+
await page.keyboard.press("Enter");
|
|
347
|
+
await page.waitForChanges();
|
|
348
|
+
expect(indicator.textContent).toBe("events heard: 2");
|
|
349
|
+
});
|
|
350
|
+
it("emits event with date on cell selection", async () => {
|
|
351
|
+
page = await newE2EPage();
|
|
352
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
353
|
+
<wm-datepicker id="dp" value="12/30/1999" label="label"></wm-datepicker>
|
|
354
|
+
<div id="indicator"></div>
|
|
355
|
+
</main></body></html>`);
|
|
356
|
+
component = await page.find("wm-datepicker");
|
|
357
|
+
input = await page.find("wm-datepicker >>> input");
|
|
358
|
+
await page.waitForChanges();
|
|
359
|
+
await page.evaluate(async () => {
|
|
360
|
+
const indicator = document.querySelector("#indicator");
|
|
361
|
+
await document.querySelector("wm-datepicker").addEventListener("wmDatepickerDateSelected", (ev) => (indicator.textContent =
|
|
362
|
+
//@ts-ignore
|
|
363
|
+
`date received: ${ev.detail.date}`));
|
|
364
|
+
});
|
|
365
|
+
await page.waitForChanges;
|
|
366
|
+
const indicator = await page.find("#indicator");
|
|
367
|
+
// user types date
|
|
368
|
+
await page.keyboard.press("Tab");
|
|
369
|
+
await page.keyboard.press("Tab");
|
|
370
|
+
await page.waitForChanges();
|
|
371
|
+
await page.keyboard.press("Enter");
|
|
372
|
+
await page.waitForChanges();
|
|
373
|
+
await page.keyboard.press("Enter");
|
|
374
|
+
await page.waitForChanges();
|
|
375
|
+
expect(indicator.textContent).toBe("date received: 1999-12-30");
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
// Sources:
|
|
379
|
+
// https://watermarkinsights.atlassian.net/browse/DNP-3411
|
|
380
|
+
// https://watermarkinsights.atlassian.net/browse/DNP-4318
|
|
381
|
+
// https://axesslab.com/accessible-datepickers/
|
|
382
|
+
// https://www.w3.org/WAI/PF/HTML/wiki/Datepickers
|
|
@@ -211,19 +211,19 @@ export class DatePicker {
|
|
|
211
211
|
this.liveRegionEl.textContent = message;
|
|
212
212
|
}
|
|
213
213
|
render() {
|
|
214
|
-
return (h(Host, {
|
|
214
|
+
return (h(Host, { "aria-busy": "false", class: `${this.errorMessage ? "invalid" : ""}` }, h("div", { ref: (d) => (this.dpWrapperEl = d), class: `wrapper label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper", ref: (e) => (this.labelWrapperEl = e) }, this.labelPosition !== "none" && (h("label", { id: "datepickerLabel", htmlFor: "date-input", class: "label", title: `${this.label} (${this.dateFormat})` }, this.label, this.requiredField && (h("span", { "aria-hidden": "true", class: "required" }, "*"))))), h("div", null, h("div", { class: "single-wrapper input" }, h("input", { disabled: this.isDisabled, type: "text", id: "single-date-input", class: "date-input", name: "date", placeholder: this.dateFormat, value: this.value, onFocus: () => this.handleInputFocus(), onInput: (ev) => this.handleInput(ev), onBlur: () => this.handleInputBlur(), onChange: () => this.handleInputChange(), ref: (input) => (this.inputEl = input), "aria-describedby": "error", "aria-label": this.label, "aria-required": this.requiredField ? "true" : null }), h("div", { class: "container", id: "wm-container" }, h("button", { disabled: this.disabled, onClick: this.togglePopup.bind(this), "aria-describedby": "date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", { class: "calendar", title: intl.formatMessage({
|
|
215
215
|
id: "date.calendarView",
|
|
216
216
|
defaultMessage: "Calendar View",
|
|
217
217
|
description: "Calendar button",
|
|
218
|
-
}) })), h("div", {
|
|
218
|
+
}) })), h("div", { class: `popup-wrapper ${this.calEl && this.calEl.view}-view ${this.openUp ? "expand-upwards" : ""}`, id: "popup-wrapper", ref: (el) => (this.popupEl = el), onClick: () => (this.popupClicked = true) }, h("div", { tabIndex: 0, onFocus: () => this.calEl.focusLastFocusable() }), h("priv-calendar", { ref: (el) => (this.calEl = el), startDate: this.calendarDate, focusDate: this.calendarDate, class: "inside" }), h("div", { tabIndex: 0, onFocus: () => this.calEl.focusFirstFocusable() })), h("div", { id: "live-region", "aria-live": "polite", "aria-relevant": "text", class: "sr-only" }), h("div", { id: "month-title", class: "sr-only" }, intl.formatMessage({
|
|
219
219
|
id: "date.selectMonth",
|
|
220
220
|
defaultMessage: "Activate to select a month.",
|
|
221
221
|
description: "Calendar button",
|
|
222
|
-
})), h("div", {
|
|
222
|
+
})), h("div", { id: "year-title", class: "sr-only" }, intl.formatMessage({
|
|
223
223
|
id: "date.selectYear",
|
|
224
224
|
defaultMessage: "Activate to select a year.",
|
|
225
225
|
description: "Calendar button",
|
|
226
|
-
})))), h("div", {
|
|
226
|
+
})))), h("div", { id: "error", class: "error" }, this.errorMessage), h("div", { ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
|
|
227
227
|
}
|
|
228
228
|
static get is() { return "wm-datepicker"; }
|
|
229
229
|
static get encapsulation() { return "shadow"; }
|
|
@@ -423,17 +423,14 @@ export class DatePicker {
|
|
|
423
423
|
"complexType": {
|
|
424
424
|
"signature": "(inputFormat: string, outputFormat: string, date?: string) => Promise<string>",
|
|
425
425
|
"parameters": [{
|
|
426
|
-
"
|
|
427
|
-
"
|
|
428
|
-
"docs": ""
|
|
426
|
+
"tags": [],
|
|
427
|
+
"text": ""
|
|
429
428
|
}, {
|
|
430
|
-
"
|
|
431
|
-
"
|
|
432
|
-
"docs": ""
|
|
429
|
+
"tags": [],
|
|
430
|
+
"text": ""
|
|
433
431
|
}, {
|
|
434
|
-
"
|
|
435
|
-
"
|
|
436
|
-
"docs": ""
|
|
432
|
+
"tags": [],
|
|
433
|
+
"text": ""
|
|
437
434
|
}],
|
|
438
435
|
"references": {
|
|
439
436
|
"Promise": {
|
|
@@ -452,9 +449,8 @@ export class DatePicker {
|
|
|
452
449
|
"complexType": {
|
|
453
450
|
"signature": "(input?: string) => Promise<boolean>",
|
|
454
451
|
"parameters": [{
|
|
455
|
-
"
|
|
456
|
-
"
|
|
457
|
-
"docs": ""
|
|
452
|
+
"tags": [],
|
|
453
|
+
"text": ""
|
|
458
454
|
}],
|
|
459
455
|
"references": {
|
|
460
456
|
"Promise": {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import * as globalFunctions from "../../global/functions";
|
|
3
|
+
jest.spyOn(globalFunctions, "generateId").mockReturnValue("random-id");
|
|
4
|
+
import { DatePicker } from "./wm-datepicker";
|
|
5
|
+
describe("wm-datepicker", () => {
|
|
6
|
+
it("builds", async () => {
|
|
7
|
+
const comp = await newSpecPage({
|
|
8
|
+
components: [DatePicker],
|
|
9
|
+
html: '<wm-datepicker label="mock label"></wm-datepicker>',
|
|
10
|
+
});
|
|
11
|
+
expect(comp.root).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
it("sets input to required", async () => {
|
|
14
|
+
const page = await newSpecPage({
|
|
15
|
+
components: [DatePicker],
|
|
16
|
+
html: `<wm-datepicker label='datepicker' required-field='true'></wm-datepicker>`,
|
|
17
|
+
});
|
|
18
|
+
const input = await page.root.shadowRoot.querySelector("input");
|
|
19
|
+
expect(input).toEqualAttribute("aria-required", "true");
|
|
20
|
+
});
|
|
21
|
+
});
|