@watermarkinsights/ripple 5.11.1 → 5.11.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-7314b414.js → chartFunctions-0436714f.js} +31 -11
- package/dist/cjs/{functions-5ac8a62f.js → functions-e24249e6.js} +7 -104
- package/dist/{esm/app-globals-c3920c78.js → cjs/global-650a6fe6.js} +2 -7
- package/dist/cjs/index-e86c28b6.js +2649 -0
- package/dist/cjs/{intl-07aaf53c.js → intl-a70cf8c2.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/priv-option-list.cjs.entry.js +4 -5
- 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 +15 -9
- package/dist/cjs/wm-date-range.cjs.entry.js +8 -9
- package/dist/cjs/wm-datepicker.cjs.entry.js +8 -9
- 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-pss_3.cjs.entry.js +10 -13
- package/dist/cjs/wm-modal_3.cjs.entry.js +10 -13
- 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-nested-select.cjs.entry.js +7 -8
- package/dist/cjs/wm-optgroup.cjs.entry.js +4 -5
- 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 +6 -7
- 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 +29 -9
- 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 +10 -3
- 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 +13 -17
- 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 +13 -17
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +5 -7
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +3 -3
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +1 -1
- package/dist/collection/components/selects/wm-option/wm-option.e2e.js +22 -0
- package/dist/collection/components/selects/wm-option/wm-option.js +1 -1
- package/dist/collection/components/selects/wm-option/wm-option.spec.js +63 -0
- package/dist/collection/components/selects/wm-select/wm-select.e2e.js +521 -0
- package/dist/collection/components/selects/wm-select/wm-select.js +2 -2
- package/dist/collection/components/selects/wm-select/wm-select.spec.js +271 -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-modal-pss/wm-modal-pss-footer.js +1 -1
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +1 -1
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.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-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-snackbar/wm-snackbar.e2e.js +112 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- 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/global/functions.spec.js +126 -0
- package/dist/collection/lang/lang.spec.js +20 -0
- package/dist/esm/{chartFunctions-c273c613.js → chartFunctions-37511f93.js} +31 -11
- package/dist/esm/{functions-f39e6177.js → functions-8800c690.js} +8 -105
- package/dist/{cjs/app-globals-e5411d07.js → esm/global-1e5a92fa.js} +1 -10
- package/dist/esm/index-558b5a82.js +2618 -0
- package/dist/esm/{intl-a0ebf99e.js → intl-cf443c87.js} +1 -1
- package/dist/esm/loader.js +4 -5
- 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/priv-option-list.entry.js +4 -5
- 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 +15 -9
- package/dist/esm/wm-date-range.entry.js +8 -9
- package/dist/esm/wm-datepicker.entry.js +8 -9
- 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-pss_3.entry.js +10 -13
- package/dist/esm/wm-modal_3.entry.js +10 -13
- package/dist/esm/wm-navigation_3.entry.js +10 -13
- package/dist/esm/wm-navigator.entry.js +3 -4
- package/dist/esm/wm-nested-select.entry.js +7 -8
- package/dist/esm/wm-optgroup.entry.js +4 -5
- 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 +6 -7
- 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-37511f93.js +1 -0
- package/dist/esm-es5/functions-8800c690.js +1 -0
- package/dist/esm-es5/global-1e5a92fa.js +1 -0
- package/dist/esm-es5/index-558b5a82.js +1 -0
- package/dist/esm-es5/{intl-a0ebf99e.js → intl-cf443c87.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/priv-option-list.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-pss_3.entry.js +1 -1
- package/dist/esm-es5/wm-modal_3.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-nested-select.entry.js +1 -1
- package/dist/esm-es5/wm-optgroup.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-bda9a663.system.entry.js → p-0ba2e506.system.entry.js} +1 -1
- package/dist/ripple/{p-0f09ccc6.system.entry.js → p-0e36d5b8.system.entry.js} +1 -1
- package/dist/ripple/{p-658f146a.system.entry.js → p-1a4b6b02.system.entry.js} +1 -1
- package/dist/ripple/{p-165b5d3d.system.entry.js → p-1a71d867.system.entry.js} +1 -1
- package/dist/ripple/{p-79a6b32f.system.entry.js → p-1aea1ad2.system.entry.js} +1 -1
- package/dist/ripple/p-22cfff23.entry.js +1 -0
- package/dist/ripple/p-32507c13.system.entry.js +1 -0
- package/dist/ripple/{p-823d7b4e.system.entry.js → p-32bf3f5b.system.entry.js} +1 -1
- package/dist/ripple/{p-bb25b9af.system.js → p-3322823d.system.js} +1 -1
- package/dist/ripple/p-39e26322.entry.js +1 -0
- package/dist/ripple/{p-23bcc6d4.system.entry.js → p-3f40f06b.system.entry.js} +1 -1
- package/dist/ripple/p-3fa38234.entry.js +1 -0
- package/dist/ripple/p-44f426ad.entry.js +1 -0
- package/dist/ripple/{p-391d9f32.system.entry.js → p-460e9ef3.system.entry.js} +1 -1
- package/dist/ripple/{p-c34c9cbb.system.entry.js → p-4743176d.system.entry.js} +1 -1
- package/dist/ripple/{p-13b1d775.entry.js → p-48e09589.entry.js} +1 -1
- package/dist/ripple/{p-4c1efa04.system.js → p-49c23d69.system.js} +1 -1
- package/dist/ripple/p-4de728e1.entry.js +1 -0
- package/dist/ripple/p-4ff87702.system.entry.js +1 -0
- package/dist/ripple/p-50bcde40.js +1 -0
- package/dist/ripple/{p-362b19a2.entry.js → p-544925c2.entry.js} +1 -1
- package/dist/ripple/p-568c595f.js +2 -0
- package/dist/ripple/{p-bee47080.system.entry.js → p-58668e84.system.entry.js} +1 -1
- package/dist/ripple/{p-83d1c1fb.entry.js → p-59bb36fc.entry.js} +1 -1
- package/dist/ripple/p-5e9c9f0d.entry.js +1 -0
- package/dist/ripple/{p-39dd3870.system.entry.js → p-608f69c1.system.entry.js} +1 -1
- package/dist/ripple/{p-043901ab.system.entry.js → p-65d26233.system.entry.js} +1 -1
- package/dist/ripple/{p-5c25870c.entry.js → p-68e04222.entry.js} +1 -1
- package/dist/ripple/p-6e72a06c.entry.js +1 -0
- package/dist/ripple/{p-5c62e26d.entry.js → p-702252ba.entry.js} +1 -1
- package/dist/ripple/{p-a40296fc.system.entry.js → p-704be1e8.system.entry.js} +1 -1
- package/dist/ripple/{p-9708c995.js → p-710c6115.js} +1 -1
- package/dist/ripple/{p-42596f25.entry.js → p-7478303e.entry.js} +1 -1
- package/dist/ripple/p-79043436.entry.js +1 -0
- package/dist/ripple/p-797d65b7.entry.js +1 -0
- package/dist/ripple/{p-fc170968.system.entry.js → p-79d4f14b.system.entry.js} +1 -1
- package/dist/ripple/{p-59e50ea1.system.entry.js → p-7e0fc193.system.entry.js} +1 -1
- package/dist/ripple/{p-a3f9e2f6.system.entry.js → p-84e7a8df.system.entry.js} +1 -1
- package/dist/ripple/{p-d0736520.system.entry.js → p-878fd4af.system.entry.js} +1 -1
- package/dist/ripple/{p-cd0cc88d.entry.js → p-88ebddd7.entry.js} +1 -1
- package/dist/ripple/p-8cd8f784.entry.js +1 -0
- package/dist/ripple/p-8d72d140.entry.js +1 -0
- package/dist/ripple/p-94495341.entry.js +1 -0
- package/dist/ripple/p-94717864.entry.js +1 -0
- package/dist/ripple/{p-0ed1e17e.entry.js → p-9d461de5.entry.js} +1 -1
- package/dist/ripple/p-9eaa0acb.system.entry.js +1 -0
- package/dist/ripple/{p-3376581a.system.entry.js → p-a04ef164.system.entry.js} +1 -1
- package/dist/ripple/{p-d1751f87.system.entry.js → p-a2936bcb.system.entry.js} +1 -1
- package/dist/ripple/p-a30e2948.entry.js +1 -0
- package/dist/ripple/p-a69425b0.entry.js +1 -0
- package/dist/ripple/p-ab8d78cc.system.js +2 -0
- package/dist/ripple/p-adc254e6.entry.js +1 -0
- package/dist/ripple/p-b02048a9.entry.js +1 -0
- package/dist/ripple/p-b2706394.entry.js +1 -0
- package/dist/ripple/{p-3bde67f1.system.entry.js → p-b5971475.system.entry.js} +1 -1
- package/dist/ripple/{p-8240dd82.system.entry.js → p-b5c371aa.system.entry.js} +1 -1
- package/dist/ripple/{p-76d248e6.entry.js → p-b976c84b.entry.js} +1 -1
- package/dist/ripple/{p-3ec9a2a2.system.entry.js → p-bd547650.system.entry.js} +1 -1
- package/dist/ripple/{p-0c7cf863.system.entry.js → p-bfc1065f.system.entry.js} +1 -1
- package/dist/ripple/{p-62a99b68.entry.js → p-c2b5d9e5.entry.js} +1 -1
- package/dist/ripple/p-c3fa1588.system.js +1 -0
- package/dist/ripple/p-c4e329e9.entry.js +1 -0
- package/dist/ripple/{p-72e05203.system.entry.js → p-c7e30eb0.system.entry.js} +1 -1
- package/dist/ripple/{p-9287d70b.system.entry.js → p-caec4f57.system.entry.js} +1 -1
- package/dist/ripple/{p-35c7696e.entry.js → p-ce44ba70.entry.js} +1 -1
- package/dist/ripple/{p-c62342c4.entry.js → p-d57e8196.entry.js} +1 -1
- package/dist/ripple/p-dc77d98a.entry.js +1 -0
- package/dist/ripple/{p-3c407959.system.entry.js → p-ddcbb694.system.entry.js} +1 -1
- package/dist/ripple/{p-35218430.system.entry.js → p-de272ae7.system.entry.js} +1 -1
- package/dist/ripple/{p-cca7a151.system.entry.js → p-e2c6052b.system.entry.js} +1 -1
- package/dist/ripple/p-e6f884a6.js +1 -0
- package/dist/ripple/p-e844cbf3.entry.js +1 -0
- package/dist/ripple/p-eca78c2b.js +1 -0
- package/dist/ripple/p-edd87140.system.js +1 -0
- package/dist/ripple/p-efdad4ea.system.js +1 -0
- package/dist/ripple/{p-35644be9.system.entry.js → p-f22e26b6.system.entry.js} +1 -1
- package/dist/ripple/p-f5bc8926.entry.js +1 -0
- package/dist/ripple/{p-ead461fe.system.entry.js → p-f6eff655.system.entry.js} +1 -1
- package/dist/ripple/{p-22dda578.system.entry.js → p-f779ec68.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +10 -3
- package/package.json +1 -1
- package/dist/cjs/index-788526f5.js +0 -1859
- package/dist/esm/index-130e07bb.js +0 -1828
- package/dist/esm-es5/app-globals-c3920c78.js +0 -1
- package/dist/esm-es5/chartFunctions-c273c613.js +0 -1
- package/dist/esm-es5/functions-f39e6177.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/ripple/p-0f356c45.entry.js +0 -1
- package/dist/ripple/p-105e5721.system.entry.js +0 -1
- package/dist/ripple/p-152b20ae.entry.js +0 -1
- package/dist/ripple/p-2a30d411.system.entry.js +0 -1
- package/dist/ripple/p-32b88ab2.entry.js +0 -1
- package/dist/ripple/p-3ceed568.entry.js +0 -1
- package/dist/ripple/p-3f486eed.system.js +0 -1
- package/dist/ripple/p-4a1601c5.js +0 -1
- package/dist/ripple/p-4b8cb0a4.entry.js +0 -1
- package/dist/ripple/p-5d8386b4.system.entry.js +0 -1
- package/dist/ripple/p-68a96191.entry.js +0 -1
- package/dist/ripple/p-6c0c2e1f.entry.js +0 -1
- package/dist/ripple/p-72f7d6e1.system.js +0 -1
- package/dist/ripple/p-76542ab3.entry.js +0 -1
- package/dist/ripple/p-76f9acec.entry.js +0 -1
- package/dist/ripple/p-86a5178d.entry.js +0 -1
- package/dist/ripple/p-89a2db02.js +0 -1
- package/dist/ripple/p-8d4f674f.entry.js +0 -1
- package/dist/ripple/p-8f5ac061.entry.js +0 -1
- package/dist/ripple/p-96505312.js +0 -1
- package/dist/ripple/p-985fb8b9.entry.js +0 -1
- package/dist/ripple/p-aaaee14f.entry.js +0 -1
- package/dist/ripple/p-b4e7d63f.entry.js +0 -1
- package/dist/ripple/p-ba047c79.entry.js +0 -1
- package/dist/ripple/p-ba32888d.system.js +0 -1
- package/dist/ripple/p-c5c31818.entry.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d528f5e4.entry.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-da424bdb.entry.js +0 -1
- package/dist/ripple/p-f39b556d.entry.js +0 -1
- package/dist/ripple/p-f98f9a32.entry.js +0 -1
- package/dist/ripple/p-f9a71cf6.entry.js +0 -1
|
@@ -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
|
|
@@ -212,23 +212,23 @@ export class DatePicker {
|
|
|
212
212
|
this.liveRegionEl.textContent = message;
|
|
213
213
|
}
|
|
214
214
|
render() {
|
|
215
|
-
return (h(Host, {
|
|
215
|
+
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-label": intl.formatMessage({
|
|
216
216
|
id: "date.selectDate",
|
|
217
217
|
defaultMessage: "Select date",
|
|
218
218
|
description: "Button text for screen readers.",
|
|
219
|
-
}), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", {
|
|
219
|
+
}), "aria-describedby": "single-date-input", ref: (el) => (this.toggleEl = el), "aria-expanded": `${this.isExpanded}`, class: "toggle", id: "toggle" }, h("span", { class: "svg-icon svg-date" }), h("span", { class: "calendar", title: intl.formatMessage({
|
|
220
220
|
id: "date.calendarView",
|
|
221
221
|
defaultMessage: "Calendar View",
|
|
222
222
|
description: "Calendar button",
|
|
223
|
-
}) })), h("div", {
|
|
223
|
+
}) })), 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({
|
|
224
224
|
id: "date.selectMonth",
|
|
225
225
|
defaultMessage: "Activate to select a month.",
|
|
226
226
|
description: "Calendar button",
|
|
227
|
-
})), h("div", {
|
|
227
|
+
})), h("div", { id: "year-title", class: "sr-only" }, intl.formatMessage({
|
|
228
228
|
id: "date.selectYear",
|
|
229
229
|
defaultMessage: "Activate to select a year.",
|
|
230
230
|
description: "Calendar button",
|
|
231
|
-
})))), h("div", {
|
|
231
|
+
})))), h("div", { id: "error", class: "error" }, this.errorMessage), h("div", { ref: (el) => (this.liveRegionEl = el), class: "sr-only", "aria-live": "polite", "aria-atomic": "true" })))));
|
|
232
232
|
}
|
|
233
233
|
static get is() { return "wm-datepicker"; }
|
|
234
234
|
static get encapsulation() { return "shadow"; }
|
|
@@ -433,17 +433,14 @@ export class DatePicker {
|
|
|
433
433
|
"complexType": {
|
|
434
434
|
"signature": "(inputFormat: string, outputFormat: string, date?: string) => Promise<string>",
|
|
435
435
|
"parameters": [{
|
|
436
|
-
"
|
|
437
|
-
"
|
|
438
|
-
"docs": ""
|
|
436
|
+
"tags": [],
|
|
437
|
+
"text": ""
|
|
439
438
|
}, {
|
|
440
|
-
"
|
|
441
|
-
"
|
|
442
|
-
"docs": ""
|
|
439
|
+
"tags": [],
|
|
440
|
+
"text": ""
|
|
443
441
|
}, {
|
|
444
|
-
"
|
|
445
|
-
"
|
|
446
|
-
"docs": ""
|
|
442
|
+
"tags": [],
|
|
443
|
+
"text": ""
|
|
447
444
|
}],
|
|
448
445
|
"references": {
|
|
449
446
|
"Promise": {
|
|
@@ -462,9 +459,8 @@ export class DatePicker {
|
|
|
462
459
|
"complexType": {
|
|
463
460
|
"signature": "(input?: string) => Promise<boolean>",
|
|
464
461
|
"parameters": [{
|
|
465
|
-
"
|
|
466
|
-
"
|
|
467
|
-
"docs": ""
|
|
462
|
+
"tags": [],
|
|
463
|
+
"text": ""
|
|
468
464
|
}],
|
|
469
465
|
"references": {
|
|
470
466
|
"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
|
+
});
|
|
@@ -406,7 +406,7 @@ export class PrivOptionList {
|
|
|
406
406
|
return (h("div", { class: "non-options-wrapper" }, this.isInNestedSelect && this.renderReturnBtn(), this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton()));
|
|
407
407
|
}
|
|
408
408
|
render() {
|
|
409
|
-
return (h("div", {
|
|
409
|
+
return (h("div", { class: "list-wrapper" }, (this.isInNestedSelect || this.search || this.visibleSelectAllButton) && this.renderNonOptions(), h("div", { id: "list", class: "options-wrapper", tabindex: -1, role: "listbox", "aria-multiselectable": this.multiple ? "true" : null, "aria-labelledby": "label", ref: (el) => (this.listboxEl = el), style: { "--max-height": this.effectiveMaxHeight } }, this.searchTerm && this.filteredOptions.length === 0 && this.renderSearchFailedMessage(), this.multiple && this.renderCloneOptions(), h("slot", null)), h("div", { id: "optionlist-announcement", "aria-live": "polite", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
|
|
410
410
|
}
|
|
411
411
|
static get is() { return "priv-option-list"; }
|
|
412
412
|
static get originalStyleUrls() {
|
|
@@ -690,9 +690,8 @@ export class PrivOptionList {
|
|
|
690
690
|
"complexType": {
|
|
691
691
|
"signature": "(option: HTMLElement) => Promise<void>",
|
|
692
692
|
"parameters": [{
|
|
693
|
-
"
|
|
694
|
-
"
|
|
695
|
-
"docs": ""
|
|
693
|
+
"tags": [],
|
|
694
|
+
"text": ""
|
|
696
695
|
}],
|
|
697
696
|
"references": {
|
|
698
697
|
"Promise": {
|
|
@@ -715,9 +714,8 @@ export class PrivOptionList {
|
|
|
715
714
|
"complexType": {
|
|
716
715
|
"signature": "(optionToSelect?: \"next\" | \"previous\") => Promise<void>",
|
|
717
716
|
"parameters": [{
|
|
718
|
-
"
|
|
719
|
-
"
|
|
720
|
-
"docs": ""
|
|
717
|
+
"tags": [],
|
|
718
|
+
"text": ""
|
|
721
719
|
}],
|
|
722
720
|
"references": {
|
|
723
721
|
"Promise": {
|
|
@@ -325,16 +325,16 @@ export class NestedSelect {
|
|
|
325
325
|
this.isExpanded ? this.close() : this.open();
|
|
326
326
|
},
|
|
327
327
|
};
|
|
328
|
-
return (h(Host, {
|
|
328
|
+
return (h(Host, { onBlur: (ev) => this.handleComponentBlur(ev) }, h("div", { class: `wrapper ${getTextDir()} label-${this.labelPosition} ${this.errorMessage ? "invalid" : ""}` }, h("div", { class: "label-wrapper" }, h("label", { class: "label", id: "label", htmlFor: "selectbtn" }, this.label,
|
|
329
329
|
// we can't use aria-required because the listbox is in a sub-component and it is not announced
|
|
330
|
-
this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", {
|
|
330
|
+
this.requiredField ? (h("span", { class: "required" }, h("span", { class: "sr-only" }, globalMessages.requiredField), h("span", { "aria-hidden": "true" }, "*"))) : (""))), h("div", { class: "button-wrapper" }, h("button", Object.assign({}, buttonProps, { class: "displayedoption", ref: (el) => (this.buttonEl = el), onBlur: (ev) => this.handleButtonBlur(ev) }), h("span", { class: "overflowcontrol" }, h("span", { class: "button-text" }, this.renderButtonText())), h("div", { class: `expand-icon svg-icon ${this.isExpanded ? "svg-expand-less" : "svg-expand-more"}` }), this.renderOverflowCount(), h("div", { ref: (el) => (this.measurementAreaEl = el), class: "measurement-area", "aria-hidden": "true" })), h("div", { class: `dropdown ${this.openUp ? "upwards" : ""}`, ref: (el) => (this.dropdownEl = el) }, h("div", { ref: (el) => (this.menuEl = el), class: "menu", style: { "--max-height": this.constrainedMaxHeight }, tabIndex: -1 }, this.renderClearSelectionButton(), this.optgroupEls.map((optgroupEl) => {
|
|
331
331
|
return (h("button", { class: `menuitem group-btn ${optgroupEl.disabled ? "disabled" : ""}`, role: "menuitem", "data-label": optgroupEl.label, tabindex: -1, "aria-disabled": optgroupEl.disabled, onClick: () => {
|
|
332
332
|
if (!optgroupEl.disabled) {
|
|
333
333
|
optgroupEl.isExpanded = !optgroupEl.isExpanded;
|
|
334
334
|
forceUpdate(this.el);
|
|
335
335
|
}
|
|
336
336
|
}, onKeyDown: (ev) => this.handleMenuitemKeydown(ev) }, h("span", null, optgroupEl.label), this.renderSelectionCount(optgroupEl), optgroupEl.disabled && h("div", { class: "disabled-indication" }, "Disabled"), h("div", { class: "svg-icon svg-next" })));
|
|
337
|
-
})), h("div", {
|
|
337
|
+
})), h("div", { ref: (el) => (this.optListWrapperEl = el), class: "option-list-wrapper hidden" }, h("slot", null))), h("div", { id: "error", class: this.errorMessage ? "error-message" : "" }, this.errorMessage))), h("div", { id: "nestedselect-announcement", "aria-live": "assertive", "aria-atomic": "true", class: "sr-only", ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
|
|
338
338
|
}
|
|
339
339
|
static get is() { return "wm-nested-select"; }
|
|
340
340
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,7 +48,7 @@ export class Optgroup {
|
|
|
48
48
|
handleDisabledAttribute(this.el, this.isDisabled);
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host,
|
|
51
|
+
return (h(Host, null, h("div", { class: `list-wrapper` }, h("priv-option-list", { ref: (el) => (this.optionListEl = el), multiple: this.parentNestedSelect.multiple, search: this.parentNestedSelect.search, maxHeight: this.parentNestedSelect.constrainedMaxHeight, searchPlaceholder: this.parentNestedSelect.searchPlaceholder, optgroupLabel: this.label, selectAll: this.parentNestedSelect.selectAll, onOptionListAllSelected: () => this.wmOptgroupAllSelected.emit(), onOptionListAllDeselected: () => this.wmOptgroupAllDeselected.emit() }, h("slot", null)))));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "wm-optgroup"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe("wm-option", () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent("<wm-select id='test' label='select something'><wm-option id='first' disabled onClick='action()'>First option</wm-option><wm-option id='second' disabled>Second option</wm-option><wm-option id='third'>Third option</wm-option></wm-select><script>function action() {document.getElementById('second').textContent = 'the function ran!'}</script>");
|
|
7
|
+
});
|
|
8
|
+
// RENDER
|
|
9
|
+
it("renders", async () => {
|
|
10
|
+
const element = await page.find("wm-option");
|
|
11
|
+
expect(element).not.toBeNull();
|
|
12
|
+
});
|
|
13
|
+
it("prevents action on disabled option", async () => {
|
|
14
|
+
await page.keyboard.press("Tab");
|
|
15
|
+
await page.keyboard.press("Enter"); // dropdown opens
|
|
16
|
+
await page.waitForChanges();
|
|
17
|
+
await page.keyboard.press("Enter"); // Enter on disabled option
|
|
18
|
+
await page.waitForChanges();
|
|
19
|
+
let changedOption = await page.find("wm-option#second");
|
|
20
|
+
expect(changedOption.textContent).toEqual("Second option"); // the function that shouldn't run replaces this text by: "the function ran!"
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -143,7 +143,7 @@ export class Option {
|
|
|
143
143
|
this.parentOptionList.addEventListener("optionListSearchChanged", (ev) => this.handleSearch(ev));
|
|
144
144
|
}
|
|
145
145
|
render() {
|
|
146
|
-
return (h(Host, {
|
|
146
|
+
return (h(Host, { role: "option", tabindex: this.focused ? 0 : -1, class: this.hostClasses }, h("div", { class: `option-wrapper ${this.parentOptionList.multiple ? "checkbox" : ""}` }, this.parentOptionList.multiple && (h("div", { class: `checkbox svg-icon ${this.selected ? "svg-checkbox-selected" : "svg-checkbox-blank"}` })), h("span", { class: "option-text", "aria-hidden": "true", ref: (el) => (this.textEl = el) }, this.el.textContent), h("span", { class: "sr-only" }, this.el.textContent)), h("div", { class: "subinfo" }, this.subinfo)));
|
|
147
147
|
}
|
|
148
148
|
static get is() { return "wm-option"; }
|
|
149
149
|
static get encapsulation() { return "shadow"; }
|