@watermarkinsights/ripple 5.12.0-8 → 5.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chartFunctions-7314b414.js → chartFunctions-a1981e06.js} +31 -11
- package/dist/cjs/{functions-5ac8a62f.js → functions-4b187487.js} +1587 -370
- package/dist/{esm/app-globals-7306e215.js → cjs/global-4e034486.js} +2 -7
- package/dist/cjs/index-e86c28b6.js +2649 -0
- package/dist/cjs/{intl-07aaf53c.js → intl-7fd0760e.js} +104 -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 +14 -52
- 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 +21 -11
- 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 +18 -18
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +10 -13
- package/dist/cjs/wm-modal_3.cjs.entry.js +13 -16
- 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 +16 -56
- package/dist/cjs/wm-optgroup.cjs.entry.js +4 -5
- package/dist/cjs/wm-option_2.cjs.entry.js +11 -25
- package/dist/cjs/wm-pagination.cjs.entry.js +65 -14
- 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 +13 -9
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +14 -12
- package/dist/cjs/wm-tag-input.cjs.entry.js +29 -24
- 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 +6 -7
- 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 +14 -13
- 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 +26 -19
- 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 +16 -55
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +17 -56
- 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 +10 -22
- 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.css +9 -16
- 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.css +1 -3
- 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.css +5 -4
- 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 +63 -11
- 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 +10 -5
- 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 +8 -3
- 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 +25 -19
- 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.css +0 -1
- 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/global/intl.js +102 -0
- package/dist/collection/lang/lang.spec.js +20 -0
- package/dist/collection/lang/piglatin.js +9 -1
- package/dist/esm/{chartFunctions-1478f4db.js → chartFunctions-9099c7e9.js} +31 -11
- package/dist/esm/{functions-f53b3537.js → functions-00e1916b.js} +1588 -371
- package/dist/{cjs/app-globals-f0911027.js → esm/global-c76064cb.js} +1 -10
- package/dist/esm/index-558b5a82.js +2618 -0
- package/dist/esm/{intl-6426ba51.js → intl-a6f16883.js} +104 -2
- 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 +14 -52
- 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 +21 -11
- 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 +18 -18
- package/dist/esm/wm-modal-pss_3.entry.js +10 -13
- package/dist/esm/wm-modal_3.entry.js +13 -16
- 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 +16 -56
- package/dist/esm/wm-optgroup.entry.js +4 -5
- package/dist/esm/wm-option_2.entry.js +11 -25
- package/dist/esm/wm-pagination.entry.js +65 -14
- 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 +13 -9
- package/dist/esm/wm-tab-item_3.entry.js +14 -12
- package/dist/esm/wm-tag-input.entry.js +29 -24
- 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 +6 -7
- package/dist/esm/wm-uploader.entry.js +6 -7
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/chartFunctions-9099c7e9.js +1 -0
- package/dist/esm-es5/functions-00e1916b.js +1 -0
- package/dist/esm-es5/global-c76064cb.js +1 -0
- package/dist/esm-es5/index-558b5a82.js +1 -0
- package/dist/esm-es5/intl-a6f16883.js +1 -0
- 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-05ae54d7.entry.js +1 -0
- package/dist/ripple/{p-fdfa3579.system.entry.js → p-0d89d63c.system.entry.js} +1 -1
- package/dist/ripple/p-118c47eb.system.entry.js +1 -0
- package/dist/ripple/{p-658f146a.system.entry.js → p-1a4b6b02.system.entry.js} +1 -1
- package/dist/ripple/{p-a0edf336.system.entry.js → p-1a4b7504.system.entry.js} +1 -1
- package/dist/ripple/{p-165b5d3d.system.entry.js → p-1a71d867.system.entry.js} +1 -1
- package/dist/ripple/p-1a951dfb.entry.js +1 -0
- package/dist/ripple/{p-28f9e202.system.entry.js → p-1c8f550f.system.entry.js} +1 -1
- package/dist/ripple/p-1f751b87.js +1 -0
- package/dist/ripple/p-1fac5bf9.js +1 -0
- package/dist/ripple/{p-03fafb82.entry.js → p-20a8f732.system.entry.js} +1 -1
- package/dist/ripple/{p-3b5d106d.entry.js → p-249b56fb.entry.js} +1 -1
- package/dist/ripple/p-249d13a1.system.entry.js +1 -0
- package/dist/ripple/p-26906899.entry.js +1 -0
- package/dist/ripple/{p-486b3b56.system.entry.js → p-28119645.system.entry.js} +1 -1
- package/dist/ripple/{p-a2544443.system.js → p-2f37f3ee.system.js} +1 -1
- package/dist/ripple/{p-823d7b4e.system.entry.js → p-32bf3f5b.system.entry.js} +1 -1
- package/dist/ripple/{p-20b137a3.system.entry.js → p-335c03d3.system.entry.js} +1 -1
- package/dist/ripple/p-363b534b.entry.js +1 -0
- package/dist/ripple/p-393e4636.js +1 -0
- package/dist/ripple/p-39f79d71.system.entry.js +1 -0
- package/dist/ripple/{p-ff60375d.system.entry.js → p-3a231f4b.system.entry.js} +1 -1
- package/dist/ripple/{p-55f8aa05.entry.js → p-3d4bb85f.entry.js} +1 -1
- package/dist/ripple/p-4228de00.entry.js +1 -0
- package/dist/ripple/{p-13b1d775.entry.js → p-48e09589.entry.js} +1 -1
- package/dist/ripple/p-4f8fe1d1.system.js +1 -0
- package/dist/ripple/{p-02e60a11.system.entry.js → p-522ecb7d.system.entry.js} +1 -1
- package/dist/ripple/{p-ee825214.entry.js → p-54d6f0f9.entry.js} +1 -1
- package/dist/ripple/p-568c595f.js +2 -0
- package/dist/ripple/p-56aeee6e.system.entry.js +1 -0
- package/dist/ripple/p-5e6a4f70.system.js +1 -0
- package/dist/ripple/{p-82819500.system.entry.js → p-5f082360.system.entry.js} +1 -1
- package/dist/ripple/p-5f5fe905.js +1 -0
- package/dist/ripple/p-617c2c75.entry.js +1 -0
- package/dist/ripple/{p-4fbe205e.system.entry.js → p-6524c53e.system.entry.js} +1 -1
- package/dist/ripple/{p-043901ab.system.entry.js → p-65d26233.system.entry.js} +1 -1
- package/dist/ripple/p-6834a6d3.entry.js +1 -0
- package/dist/ripple/{p-81ac8d49.entry.js → p-68e04222.entry.js} +1 -1
- package/dist/ripple/{p-f778baf4.system.entry.js → p-68fddfaa.system.entry.js} +1 -1
- package/dist/ripple/{p-e2fbed8c.system.entry.js → p-694903e6.system.entry.js} +1 -1
- package/dist/ripple/p-73ca2f26.system.js +1 -0
- package/dist/ripple/{p-1f174e18.system.entry.js → p-7b6a65f8.system.entry.js} +1 -1
- package/dist/ripple/{p-a9a7731b.system.entry.js → p-7b7e1eb5.system.entry.js} +1 -1
- package/dist/ripple/{p-cd0cc88d.entry.js → p-88ebddd7.entry.js} +1 -1
- package/dist/ripple/{p-791513e7.entry.js → p-8c1d27a7.entry.js} +1 -1
- package/dist/ripple/{p-ccae5bec.entry.js → p-8e9c24f3.entry.js} +1 -1
- package/dist/ripple/{p-b16f07f1.system.entry.js → p-8f836507.system.entry.js} +1 -1
- package/dist/ripple/p-94495341.entry.js +1 -0
- package/dist/ripple/{p-76f9acec.entry.js → p-958331bf.entry.js} +1 -1
- package/dist/ripple/p-9872623b.entry.js +1 -0
- package/dist/ripple/{p-e6e36701.system.entry.js → p-9ab3c088.system.entry.js} +1 -1
- package/dist/ripple/p-9aedd599.entry.js +1 -0
- package/dist/ripple/p-9b848151.entry.js +1 -0
- package/dist/ripple/{p-3376581a.system.entry.js → p-a04ef164.system.entry.js} +1 -1
- package/dist/ripple/{p-02bd68af.system.entry.js → p-a78bb423.system.entry.js} +1 -1
- package/dist/ripple/{p-0d163672.system.entry.js → p-a880d9a0.system.entry.js} +1 -1
- package/dist/ripple/p-ab8d78cc.system.js +2 -0
- package/dist/ripple/p-adc254e6.entry.js +1 -0
- package/dist/ripple/p-b165d61a.entry.js +1 -0
- package/dist/ripple/p-b39377c7.entry.js +1 -0
- package/dist/ripple/p-b9bca547.entry.js +1 -0
- package/dist/ripple/p-bae2c236.entry.js +1 -0
- package/dist/ripple/{p-8634abad.system.entry.js → p-c53f3704.system.entry.js} +1 -1
- package/dist/ripple/p-c56ff16f.entry.js +1 -0
- package/dist/ripple/{p-94fbf6f6.system.entry.js → p-c8cf09a2.system.entry.js} +1 -1
- package/dist/ripple/p-cbdceb6e.entry.js +1 -0
- package/dist/ripple/p-cc813406.system.js +1 -0
- package/dist/ripple/{p-529f179c.system.entry.js → p-d20a0f0c.system.entry.js} +1 -1
- package/dist/ripple/p-d6111226.entry.js +1 -0
- package/dist/ripple/{p-f28106ea.entry.js → p-da68c87c.entry.js} +1 -1
- package/dist/ripple/{p-e8cfa832.entry.js → p-ddef82fa.system.entry.js} +1 -1
- package/dist/ripple/p-dee6d5a3.entry.js +1 -0
- package/dist/ripple/p-e55d5371.entry.js +1 -0
- package/dist/ripple/{p-7959c4bd.system.entry.js → p-e8c22f01.system.entry.js} +1 -1
- package/dist/ripple/p-f555831b.entry.js +1 -0
- package/dist/ripple/{p-226217d3.system.entry.js → p-f5c40e9e.system.entry.js} +1 -1
- package/dist/ripple/p-f9cade98.entry.js +1 -0
- package/dist/ripple/{p-fc7965e4.system.entry.js → p-fa09191b.system.entry.js} +1 -1
- package/dist/ripple/{p-233f14ec.system.entry.js → p-fdfca58b.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +0 -6
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +6 -0
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +1 -0
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +1 -0
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +2 -1
- package/dist/types/global/intl.d.ts +22 -0
- package/dist/types/stencil-public-runtime.d.ts +10 -3
- package/package.json +2 -2
- package/dist/cjs/index-788526f5.js +0 -1859
- package/dist/esm/index-130e07bb.js +0 -1828
- package/dist/esm-es5/app-globals-7306e215.js +0 -1
- package/dist/esm-es5/chartFunctions-1478f4db.js +0 -1
- package/dist/esm-es5/functions-f53b3537.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/esm-es5/intl-6426ba51.js +0 -1
- package/dist/ripple/p-243a7a17.system.entry.js +0 -1
- package/dist/ripple/p-263e42e0.entry.js +0 -1
- package/dist/ripple/p-2c8153c1.entry.js +0 -1
- package/dist/ripple/p-368e9ee9.entry.js +0 -1
- package/dist/ripple/p-3a2a3b70.entry.js +0 -1
- package/dist/ripple/p-45b5d2d2.entry.js +0 -1
- package/dist/ripple/p-49e24926.entry.js +0 -1
- package/dist/ripple/p-50294e3f.entry.js +0 -1
- package/dist/ripple/p-53400bc4.system.entry.js +0 -1
- package/dist/ripple/p-58734b13.entry.js +0 -1
- package/dist/ripple/p-5c62e26d.entry.js +0 -1
- package/dist/ripple/p-6136d0d7.entry.js +0 -1
- package/dist/ripple/p-66141f19.entry.js +0 -1
- package/dist/ripple/p-713ea307.entry.js +0 -1
- package/dist/ripple/p-727175e1.system.entry.js +0 -1
- package/dist/ripple/p-77a96f3e.system.entry.js +0 -1
- package/dist/ripple/p-79f8f38d.entry.js +0 -1
- package/dist/ripple/p-7a1bb29b.js +0 -1
- package/dist/ripple/p-84dc142f.js +0 -1
- package/dist/ripple/p-864158de.system.entry.js +0 -1
- package/dist/ripple/p-87e5a642.system.js +0 -1
- package/dist/ripple/p-8c95493c.js +0 -1
- package/dist/ripple/p-94dc80a0.entry.js +0 -1
- package/dist/ripple/p-9513c937.system.js +0 -1
- package/dist/ripple/p-9b739280.entry.js +0 -1
- package/dist/ripple/p-a280d710.entry.js +0 -1
- package/dist/ripple/p-c550716e.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d530c703.entry.js +0 -1
- package/dist/ripple/p-d96291e7.entry.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-e973024a.entry.js +0 -1
- package/dist/ripple/p-ed24dc42.entry.js +0 -1
- package/dist/ripple/p-f471ee29.system.js +0 -1
- package/dist/ripple/p-f66480de.entry.js +0 -1
- package/dist/ripple/p-f9a71cf6.entry.js +0 -1
- package/dist/ripple/p-ffbb9fc0.system.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
|
+
});
|
|
@@ -1,33 +1,18 @@
|
|
|
1
1
|
import { h, forceUpdate } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { debounce, isElOrChild } from "../../../global/functions";
|
|
3
|
+
import { selectMessages } from "../../../global/intl";
|
|
3
4
|
export class PrivOptionList {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.searchIndex = 0;
|
|
6
7
|
this.keysSoFar = "";
|
|
7
|
-
this.selectAllMessage = intl.formatMessage({
|
|
8
|
-
id: "select.selectAll",
|
|
9
|
-
defaultMessage: "Select All",
|
|
10
|
-
});
|
|
11
|
-
this.deselectAllMessage = intl.formatMessage({
|
|
12
|
-
id: "select.deselectAll",
|
|
13
|
-
defaultMessage: "Deselect All",
|
|
14
|
-
});
|
|
15
|
-
this.allOptionsSelectedMessage = intl.formatMessage({
|
|
16
|
-
id: "select.allOptionsSelected",
|
|
17
|
-
defaultMessage: "All options selected",
|
|
18
|
-
});
|
|
19
|
-
this.allOptionsDeselectedMessage = intl.formatMessage({
|
|
20
|
-
id: "select.allOptionsDeselected",
|
|
21
|
-
defaultMessage: "All options deselected",
|
|
22
|
-
});
|
|
23
8
|
this.debouncedSearch = debounce(() => {
|
|
24
9
|
this.searchTerm = this.searchFieldEl.value;
|
|
25
10
|
this.optionListSearchChanged.emit({ searchTerm: this.searchTerm });
|
|
26
11
|
if (this.filteredOptions.length) {
|
|
27
|
-
this.announce(this.
|
|
12
|
+
this.announce(selectMessages.getSearchResultsFound(this.filteredOptions.length));
|
|
28
13
|
}
|
|
29
14
|
else {
|
|
30
|
-
this.announce(
|
|
15
|
+
this.announce(selectMessages.noSearchResults);
|
|
31
16
|
}
|
|
32
17
|
}, 150);
|
|
33
18
|
this.debouncedClearKeysSoFar = debounce(() => {
|
|
@@ -77,20 +62,6 @@ export class PrivOptionList {
|
|
|
77
62
|
return this.childOptions.every((option) => option.selected);
|
|
78
63
|
}
|
|
79
64
|
//////////////////////////////////////
|
|
80
|
-
get resultsFoundMessage() {
|
|
81
|
-
return intl.formatMessage({
|
|
82
|
-
id: "select.searchResultsFound",
|
|
83
|
-
defaultMessage: "{numResults, plural, one {1 option found} other {# options found}}",
|
|
84
|
-
description: "The message read by the screen reader, indicating how many results a search returned",
|
|
85
|
-
}, { numResults: this.filteredOptions.length });
|
|
86
|
-
}
|
|
87
|
-
get noResultsFoundMessage() {
|
|
88
|
-
return intl.formatMessage({
|
|
89
|
-
id: "select.noSearchResults",
|
|
90
|
-
defaultMessage: "No results found. Please try your search again.",
|
|
91
|
-
description: "The message displayed when no options pass the search filter",
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
65
|
get effectiveMaxHeight() {
|
|
95
66
|
let result = this.maxHeight;
|
|
96
67
|
if (this.upwardsHeightLimit && this.el.parentElement.clientHeight > this.upwardsHeightLimit) {
|
|
@@ -295,11 +266,11 @@ export class PrivOptionList {
|
|
|
295
266
|
this.allSelected ? this.deselectAllOptions() : this.selectAllOptions();
|
|
296
267
|
}
|
|
297
268
|
selectAllOptions() {
|
|
298
|
-
this.announce(
|
|
269
|
+
this.announce(selectMessages.allOptionsSelectedMessage);
|
|
299
270
|
this.optionListAllSelected.emit();
|
|
300
271
|
}
|
|
301
272
|
deselectAllOptions() {
|
|
302
|
-
this.announce(
|
|
273
|
+
this.announce(selectMessages.allOptionsDeselectedMessage);
|
|
303
274
|
this.optionListAllDeselected.emit();
|
|
304
275
|
}
|
|
305
276
|
moveUp(el) {
|
|
@@ -370,20 +341,12 @@ export class PrivOptionList {
|
|
|
370
341
|
}
|
|
371
342
|
renderReturnBtn() {
|
|
372
343
|
const selectionCount = this.childOptions.filter((o) => o.selected).length;
|
|
373
|
-
const singleSelectionCountMessage = intl.formatMessage({
|
|
374
|
-
id: "select.optgroupSingleSelectionCount",
|
|
375
|
-
defaultMessage: "Item Selected",
|
|
376
|
-
description: "Text indicating number of selected in a group, where only a single selection is possible.",
|
|
377
|
-
}, { numSelected: selectionCount });
|
|
378
|
-
const multipleSelectionCountMessage = intl.formatMessage({
|
|
379
|
-
id: "select.optgroupMultipleSelectionCount",
|
|
380
|
-
defaultMessage: "{numSelected} Selected",
|
|
381
|
-
description: "Text indicating number of selected in a group, where multiple selections are possible.",
|
|
382
|
-
}, { numSelected: selectionCount });
|
|
383
344
|
return (h("button", { ref: (el) => (this.returnBtnEl = el), id: "return-btn", class: "return-btn", onKeyDown: (ev) => this.handleKeyDown(ev), onClick: () => {
|
|
384
345
|
//@ts-ignore -- Check out this one weird trick TypeScript doesn't want you to know about
|
|
385
346
|
this.el.getRootNode().host.isExpanded = false;
|
|
386
|
-
} }, h("div", { class: "svg-icon svg-previous" }), h("div", { class: "return-btn-label" }, this.optgroupLabel, selectionCount > 0 && (h("span", { class: "selection-count" }, this.multiple
|
|
347
|
+
} }, h("div", { class: "svg-icon svg-previous" }), h("div", { class: "return-btn-label" }, this.optgroupLabel, selectionCount > 0 && (h("span", { class: "selection-count" }, this.multiple
|
|
348
|
+
? selectMessages.getOptgroupMultipleSelectionCount(selectionCount)
|
|
349
|
+
: selectMessages.optgroupSingleSelectionCount)))));
|
|
387
350
|
}
|
|
388
351
|
renderSearchField() {
|
|
389
352
|
return (h("div", { class: "search" }, h("div", { class: "searchfield-wrapper", ref: (el) => (this.searchFieldWrapperEl = el) }, h("div", { class: "svg-icon svg-search" }), h("input", { ref: (el) => (this.searchFieldEl = el), class: "searchfield", role: "combobox", "aria-controls": "list",
|
|
@@ -391,10 +354,10 @@ export class PrivOptionList {
|
|
|
391
354
|
onKeyDown: (ev) => this.handleKeyDown(ev), onFocus: () => this.searchFieldWrapperEl.classList.add("focus"), onBlur: (ev) => this.handleSearchFieldBlur(ev), onInput: () => this.debouncedSearch(), placeholder: this.searchPlaceholder }))));
|
|
392
355
|
}
|
|
393
356
|
renderSearchFailedMessage() {
|
|
394
|
-
return h("div", { class: "search-results-message" },
|
|
357
|
+
return h("div", { class: "search-results-message" }, selectMessages.noSearchResults);
|
|
395
358
|
}
|
|
396
359
|
renderSelectAllButton() {
|
|
397
|
-
return (h("button", { ref: (el) => (this.selectAllEl = el), class: "select-all", onClick: () => this.handleSelectAllClick(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: "-1" }, this.allSelected ?
|
|
360
|
+
return (h("button", { ref: (el) => (this.selectAllEl = el), class: "select-all", onClick: () => this.handleSelectAllClick(), onKeyDown: (ev) => this.handleKeyDown(ev), tabindex: "-1" }, this.allSelected ? selectMessages.deselectAllMessage : selectMessages.selectAllMessage));
|
|
398
361
|
}
|
|
399
362
|
renderCloneOptions() {
|
|
400
363
|
return Array.from(this.childOptions).map((o) => {
|
|
@@ -406,7 +369,7 @@ export class PrivOptionList {
|
|
|
406
369
|
return (h("div", { class: "non-options-wrapper" }, this.isInNestedSelect && this.renderReturnBtn(), this.search && this.renderSearchField(), this.visibleSelectAllButton && this.renderSelectAllButton()));
|
|
407
370
|
}
|
|
408
371
|
render() {
|
|
409
|
-
return (h("div", {
|
|
372
|
+
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
373
|
}
|
|
411
374
|
static get is() { return "priv-option-list"; }
|
|
412
375
|
static get originalStyleUrls() {
|
|
@@ -690,9 +653,8 @@ export class PrivOptionList {
|
|
|
690
653
|
"complexType": {
|
|
691
654
|
"signature": "(option: HTMLElement) => Promise<void>",
|
|
692
655
|
"parameters": [{
|
|
693
|
-
"
|
|
694
|
-
"
|
|
695
|
-
"docs": ""
|
|
656
|
+
"tags": [],
|
|
657
|
+
"text": ""
|
|
696
658
|
}],
|
|
697
659
|
"references": {
|
|
698
660
|
"Promise": {
|
|
@@ -715,9 +677,8 @@ export class PrivOptionList {
|
|
|
715
677
|
"complexType": {
|
|
716
678
|
"signature": "(optionToSelect?: \"next\" | \"previous\") => Promise<void>",
|
|
717
679
|
"parameters": [{
|
|
718
|
-
"
|
|
719
|
-
"
|
|
720
|
-
"docs": ""
|
|
680
|
+
"tags": [],
|
|
681
|
+
"text": ""
|
|
721
682
|
}],
|
|
722
683
|
"references": {
|
|
723
684
|
"Promise": {
|