@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,112 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe("wm-snackbar", () => {
|
|
3
|
+
let page;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent("<wm-button id='create-snack' onclick='generateSnackbar()'></wm-button><wm-snackbar notifications='[]' id='snack'></wm-snackbar ><script>function generateSnackbar() { const snackbar = document.getElementById('snack'); const id = '3'; let notifications = JSON.parse(snackbar.notifications); let newNotification = {'id': id, message: 'You did something', link: 'Undo'}; let updatedNotifications = [ ...notifications, newNotification ]; snackbar.notifications = JSON.stringify(updatedNotifications); }</script>");
|
|
7
|
+
await page.evaluate(async () => {
|
|
8
|
+
document.addEventListener("wmSnackbarSnackFinished", (ev) => {
|
|
9
|
+
const snackbar = document.querySelector("wm-snackbar");
|
|
10
|
+
let newSnacks = JSON.parse(snackbar.notifications).filter((snack) => +snack.id !== +ev.detail.id);
|
|
11
|
+
snackbar.notifications = JSON.stringify(newSnacks);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
afterEach(async () => {
|
|
16
|
+
jest.clearAllTimers();
|
|
17
|
+
});
|
|
18
|
+
// RENDER
|
|
19
|
+
it("it displays a snackbar when it receives a notification", async () => {
|
|
20
|
+
//generate snackbar
|
|
21
|
+
const button = await page.find("wm-button");
|
|
22
|
+
button.click(); //perform action that generates a notification
|
|
23
|
+
await page.waitForChanges();
|
|
24
|
+
const snackbar = await page.find("wm-snackbar >>> .content-wrapper");
|
|
25
|
+
expect(snackbar).not.toBeNull();
|
|
26
|
+
});
|
|
27
|
+
it("it displays multiple snackbars when it receives more than one notification", async () => {
|
|
28
|
+
//generate snackbars
|
|
29
|
+
const button = await page.find("wm-button");
|
|
30
|
+
button.click();
|
|
31
|
+
await page.waitForChanges();
|
|
32
|
+
button.click();
|
|
33
|
+
await page.waitForChanges();
|
|
34
|
+
const snackbars = await page.findAll("wm-snackbar >>> .content-wrapper");
|
|
35
|
+
expect(snackbars.length).toBe(2);
|
|
36
|
+
});
|
|
37
|
+
it("dismisses the snackbar after 20 seconds if the user is clicking and not tabbing", async () => {
|
|
38
|
+
//generate snackbar
|
|
39
|
+
const snackExpired = await page.spyOnEvent("wmSnackbarSnackFinished");
|
|
40
|
+
const button = await page.find("wm-button");
|
|
41
|
+
button.click();
|
|
42
|
+
await page.waitForChanges();
|
|
43
|
+
let snack = await page.find("wm-snackbar >>> .content-wrapper");
|
|
44
|
+
expect(snack).not.toBeNull();
|
|
45
|
+
await new Promise((resolve) => {
|
|
46
|
+
setTimeout(() => {
|
|
47
|
+
resolve("");
|
|
48
|
+
}, 21000);
|
|
49
|
+
});
|
|
50
|
+
snack = await page.find("wm-snackbar >>> .content-wrapper");
|
|
51
|
+
expect(snack).toBeNull();
|
|
52
|
+
expect(snackExpired).toHaveReceivedEventDetail({
|
|
53
|
+
id: "3",
|
|
54
|
+
message: "You did something",
|
|
55
|
+
link: "Undo",
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
it("dismisses the snackbar when the close button is clicked", async () => {
|
|
59
|
+
//generate snackbar
|
|
60
|
+
const triggerButton = await page.find("wm-button");
|
|
61
|
+
triggerButton.click();
|
|
62
|
+
await page.waitForChanges();
|
|
63
|
+
//press close button
|
|
64
|
+
const closeButton = await page.find("wm-snackbar >>> button");
|
|
65
|
+
closeButton.click();
|
|
66
|
+
await page.waitForChanges();
|
|
67
|
+
const snackbar = await page.find("wm-snackbar >>> .content-wrapper");
|
|
68
|
+
expect(snackbar).toBeNull();
|
|
69
|
+
});
|
|
70
|
+
//ACCESSIBILITY
|
|
71
|
+
it("renders an aria-live region", async () => {
|
|
72
|
+
const element = await page.find("wm-snackbar >>> #wm-live-region-snack");
|
|
73
|
+
expect(element).toEqualAttribute("aria-live", "polite");
|
|
74
|
+
});
|
|
75
|
+
it("focuses the action link in snackbar if the user is tabbing", async () => {
|
|
76
|
+
//generate snackbar
|
|
77
|
+
await page.keyboard.press("Tab");
|
|
78
|
+
await page.keyboard.press("Enter");
|
|
79
|
+
await page.waitForChanges();
|
|
80
|
+
const focusedElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
81
|
+
const link = await page.find("wm-snackbar >>> .link");
|
|
82
|
+
expect(focusedElId).toBe(link.id);
|
|
83
|
+
});
|
|
84
|
+
it("dismisses the snackbar when enter is pressed on close button and returns focus to last active element before snackbar was created", async () => {
|
|
85
|
+
//generate snackbar
|
|
86
|
+
await page.keyboard.press("Tab");
|
|
87
|
+
await page.keyboard.press("Enter");
|
|
88
|
+
await page.waitForChanges();
|
|
89
|
+
//press close button
|
|
90
|
+
await page.keyboard.press("Tab");
|
|
91
|
+
await page.keyboard.press("Enter");
|
|
92
|
+
await page.waitForChanges();
|
|
93
|
+
const snackbar = await page.find("wm-snackbar >>> .content-wrapper");
|
|
94
|
+
expect(snackbar).toBeNull();
|
|
95
|
+
const focusedElId = await page.evaluate(() => document.activeElement.id);
|
|
96
|
+
expect(focusedElId).toBe("create-snack");
|
|
97
|
+
});
|
|
98
|
+
it("dismisses the snackbar if the user tabs out of it and it returns focus to last active element before snackbar was created", async () => {
|
|
99
|
+
//generate snackbar
|
|
100
|
+
await page.keyboard.press("Tab");
|
|
101
|
+
await page.keyboard.press("Enter");
|
|
102
|
+
await page.waitForChanges();
|
|
103
|
+
//tab out
|
|
104
|
+
await page.keyboard.press("Tab");
|
|
105
|
+
await page.keyboard.press("Tab");
|
|
106
|
+
await page.waitForChanges();
|
|
107
|
+
const snackbar = await page.find("wm-snackbar >>> .content-wrapper");
|
|
108
|
+
expect(snackbar).toBeNull();
|
|
109
|
+
const focusedElId = await page.evaluate(() => document.activeElement.id);
|
|
110
|
+
expect(focusedElId).toBe("create-snack");
|
|
111
|
+
});
|
|
112
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { generateId, hideTooltip, showTooltip } from "../../global/functions";
|
|
2
|
+
import { generateId, hideTooltip, intl, showTooltip } from "../../global/functions";
|
|
3
3
|
import { globalMessages } from "../../global/intl";
|
|
4
4
|
export class Snackbar {
|
|
5
5
|
constructor() {
|
|
@@ -7,6 +7,11 @@ export class Snackbar {
|
|
|
7
7
|
this.uid = this.el.id ? this.el.id : generateId();
|
|
8
8
|
this.focusOnDismiss = null;
|
|
9
9
|
this.timers = {};
|
|
10
|
+
this.closeSnackMessage = intl.formatMessage({
|
|
11
|
+
id: "snackbar.closeNotification",
|
|
12
|
+
defaultMessage: "Close this notification",
|
|
13
|
+
description: "Notification refers to a notification UI element that can be dismissed",
|
|
14
|
+
});
|
|
10
15
|
this.notifications = "[]";
|
|
11
16
|
this.isTabbing = false;
|
|
12
17
|
this.announcement = "";
|
|
@@ -145,16 +150,16 @@ export class Snackbar {
|
|
|
145
150
|
this.announcement = message;
|
|
146
151
|
}
|
|
147
152
|
renderSnackbars() {
|
|
148
|
-
return this.parsedNotifications.map((notification) => (h("div", { class: "wm-snack-wrapper", key: `snack-${notification.id}` }, h("div", { id: `snack-${notification.id}`, class: "wm-snackbar active neutral" }, h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) }), h("div", { class: "content-wrapper" }, h("div", { class: "msg-wrapper" }, h("span", { class: "msg" }, notification.message), notification.link && (h("a", { id: `action-${notification.id}`, class: `link ${notification.newWindow ? "new-window" : ""}`, "aria-label":
|
|
153
|
+
return this.parsedNotifications.map((notification) => (h("div", { class: "wm-snack-wrapper", key: `snack-${notification.id}` }, h("div", { id: `snack-${notification.id}`, class: "wm-snackbar active neutral" }, h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) }), h("div", { class: "content-wrapper" }, h("div", { class: "msg-wrapper" }, h("span", { class: "msg" }, notification.message), notification.link && (h("a", { id: `action-${notification.id}`, class: `link ${notification.newWindow ? "new-window" : ""}`, "aria-label": `${notification.link}${notification.newWindow ? " " + globalMessages.newWindow : ""}`, tabindex: 0, onClick: () => {
|
|
149
154
|
this.snackLinkClicked(notification);
|
|
150
|
-
}, onKeyDown: (ev) => ev.key === "Enter" && this.snackLinkClicked(notification) }, h("span", { "aria-hidden": "true" }, notification.link), notification.newWindow && h("div", { class: "svg-icon svg-open-in-new" })))), h("button", { id: `close-button-${notification.id}`, "aria-label":
|
|
155
|
+
}, onKeyDown: (ev) => ev.key === "Enter" && this.snackLinkClicked(notification) }, h("span", { "aria-hidden": "true" }, notification.link), notification.newWindow && h("div", { class: "svg-icon svg-open-in-new" })))), h("button", { id: `close-button-${notification.id}`, "aria-label": this.closeSnackMessage, class: "closesnack", tabindex: notification.link ? 0 : -1, onClick: () => this.snackDismissed(notification), onMouseEnter: (ev) => showTooltip("bottom", ev.target, globalMessages.close), onMouseLeave: () => hideTooltip(), onFocus: (ev) => this.isTabbing && showTooltip("bottom", ev.target, globalMessages.close), onBlur: () => hideTooltip() }, h("div", { class: "svg-icon svg-close" }))), h("div", { class: "sr-only", tabindex: notification.link ? 0 : -1, onFocus: () => notification.link && this.snackDismissed(notification) })))));
|
|
151
156
|
}
|
|
152
157
|
render() {
|
|
153
|
-
return (h(Host,
|
|
158
|
+
return (h(Host, null, h("div", { ref: (el) => (this.snackAreaEl = el), class: {
|
|
154
159
|
"list-wrapper": true,
|
|
155
160
|
"user-is-tabbing": this.isTabbing,
|
|
156
161
|
empty: this.parsedNotifications.length == 0,
|
|
157
|
-
} }, this.renderSnackbars()), h("div", {
|
|
162
|
+
} }, this.renderSnackbars()), h("div", { class: "sr-only", "aria-live": "polite", "aria-atomic": "false", id: `wm-live-region-${this.uid}`, ref: (el) => (this.liveRegionEl = el) }, this.announcement)));
|
|
158
163
|
}
|
|
159
164
|
static get is() { return "wm-snackbar"; }
|
|
160
165
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
jest.mock("../../global/functions");
|
|
3
|
+
import { Snackbar } from "./wm-snackbar";
|
|
4
|
+
describe("wm-snackbar", () => {
|
|
5
|
+
it("builds", async () => {
|
|
6
|
+
const comp = await newSpecPage({ components: [Snackbar], html: "<wm-snackbar><wm-snackbar>" });
|
|
7
|
+
expect(comp.root).toMatchSnapshot();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -40,7 +40,7 @@ export class TabItem {
|
|
|
40
40
|
"background-size": `calc(100% - ${bkgSize}${units}) 3px`,
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
return (h(Host, {
|
|
43
|
+
return (h(Host, { role: "presentation" }, h("li", { class: "tab-item", role: "presentation" }, h("a", { class: `tab ${classes}`, style: styles, role: "tab", ref: (el) => (this.linkEl = el), onClick: this.tabClicked, id: `tab-link-${this.tabId}`, onKeyDown: (ev) => this.tabPressed(ev), "aria-selected": this.selected ? "true" : "false", tabindex: this.selected ? 0 : -1 }, h("slot", null)))));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "wm-tab-item"; }
|
|
46
46
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { forceUpdate, h, Host } from "@stencil/core";
|
|
2
|
-
import { debounce } from "../../../global/functions";
|
|
2
|
+
import { debounce, intl } from "../../../global/functions";
|
|
3
3
|
export class TabList {
|
|
4
4
|
constructor() {
|
|
5
|
+
this.selectLabel = intl.formatMessage({
|
|
6
|
+
id: "tab.selectLabel",
|
|
7
|
+
defaultMessage: "Choose a tab",
|
|
8
|
+
description: "Tab refers to a tab UI element",
|
|
9
|
+
});
|
|
5
10
|
this.debouncedSetLayout = debounce(() => {
|
|
6
11
|
if (!this.listWidth) {
|
|
7
12
|
this.setListWidth();
|
|
@@ -135,7 +140,7 @@ export class TabList {
|
|
|
135
140
|
renderMenuOrTabs() {
|
|
136
141
|
if (this.menuLayout) {
|
|
137
142
|
this.hideItems();
|
|
138
|
-
return (h("wm-select", { label:
|
|
143
|
+
return (h("wm-select", { label: this.selectLabel, "label-position": "none" }, this.renderOptions()));
|
|
139
144
|
}
|
|
140
145
|
else {
|
|
141
146
|
this.showItems();
|
|
@@ -155,7 +160,7 @@ export class TabList {
|
|
|
155
160
|
} }, t.textContent)));
|
|
156
161
|
}
|
|
157
162
|
render() {
|
|
158
|
-
return h(Host, {
|
|
163
|
+
return h(Host, { class: this.menuLayout ? "menu" : "" }, this.renderMenuOrTabs());
|
|
159
164
|
}
|
|
160
165
|
static get is() { return "wm-tab-list"; }
|
|
161
166
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,7 +12,7 @@ export class TabPanel {
|
|
|
12
12
|
this.tabPanelLoaded.emit({ tabId: this.tabId });
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return h(Host, {
|
|
15
|
+
return h(Host, { role: "tabpanel", class: { "tab-hidden": !this.active } });
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "wm-tab-panel"; }
|
|
18
18
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe("wm-tab-item", () => {
|
|
3
|
+
let page; //, mock: any;
|
|
4
|
+
beforeEach(async () => {
|
|
5
|
+
page = await newE2EPage();
|
|
6
|
+
await page.setContent(`<html lang='en' dir="ltr">
|
|
7
|
+
<head><title>Page</title></head>
|
|
8
|
+
<body>
|
|
9
|
+
<main style="height: 3000px">
|
|
10
|
+
<h1>Title</h1>
|
|
11
|
+
<div id="tab-container">
|
|
12
|
+
<wm-tab-list id="test-tab" selected-tab="first">
|
|
13
|
+
<wm-tab-item tab-id="first" id="first-tab">First</wm-tab-item>
|
|
14
|
+
<wm-tab-item tab-id="second" id="second-tab">Second</wm-tab-item>
|
|
15
|
+
</wm-tab-list>
|
|
16
|
+
<wm-tab-panel tab-id="first" id="dynamic-panel">Tab Content First</wm-tab-panel>
|
|
17
|
+
</div>
|
|
18
|
+
<div id="test-div"></div>
|
|
19
|
+
</main>
|
|
20
|
+
</body>
|
|
21
|
+
</html>`);
|
|
22
|
+
await page.evaluate(async () => {
|
|
23
|
+
const container = document.querySelector("#tab-container");
|
|
24
|
+
container.addEventListener("wmTabSelected", (ev) => {
|
|
25
|
+
const tabList = document.querySelector("#test-tab");
|
|
26
|
+
tabList.selectedTab = ev.detail.tabId;
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
await page.waitForChanges();
|
|
30
|
+
});
|
|
31
|
+
it("renders a list item with a role of presentation and with a link that has a role of tab", async () => {
|
|
32
|
+
const tabItem = await page.find("wm-tab-item");
|
|
33
|
+
const listItem = await tabItem.shadowRoot.querySelector("li");
|
|
34
|
+
expect(listItem).not.toBeNull();
|
|
35
|
+
expect(listItem.getAttribute("role")).toEqual("presentation");
|
|
36
|
+
const link = await tabItem.shadowRoot.querySelector("a");
|
|
37
|
+
expect(link).not.toBeNull();
|
|
38
|
+
expect(link.getAttribute("role")).toEqual("tab");
|
|
39
|
+
});
|
|
40
|
+
it("emits an event when clicked or enter is pressed", async () => {
|
|
41
|
+
const wmTabSelectedSpy = await page.spyOnEvent("wmTabSelected");
|
|
42
|
+
await page.keyboard.press("Tab");
|
|
43
|
+
await page.keyboard.press("ArrowRight");
|
|
44
|
+
await page.keyboard.press("Enter");
|
|
45
|
+
expect(wmTabSelectedSpy).toHaveReceivedEventDetail({ tabId: "second" });
|
|
46
|
+
jest.restoreAllMocks();
|
|
47
|
+
});
|
|
48
|
+
it("has an aria-selected attribute set to true when it is selected", async () => {
|
|
49
|
+
await page.keyboard.press("Tab"); // To next tab component
|
|
50
|
+
await page.keyboard.press("ArrowRight");
|
|
51
|
+
await page.keyboard.press("Enter");
|
|
52
|
+
await page.waitForChanges();
|
|
53
|
+
let secondTabItemUncontrolled = await page.find("#second-tab");
|
|
54
|
+
const linkUncontrolled = await secondTabItemUncontrolled.shadowRoot.querySelector("#tab-link-second");
|
|
55
|
+
const selectedStatusUncontrolled = await linkUncontrolled.getAttribute("aria-selected");
|
|
56
|
+
expect(selectedStatusUncontrolled).toBe("true");
|
|
57
|
+
});
|
|
58
|
+
it("renders an unordered list with a role of tablist", async () => {
|
|
59
|
+
const ulElement = await page.find("wm-tab-list >>> ul");
|
|
60
|
+
expect(ulElement).not.toBeNull();
|
|
61
|
+
expect(ulElement.getAttribute("role")).toEqual("tablist");
|
|
62
|
+
});
|
|
63
|
+
it("has a role of tabpanel", async () => {
|
|
64
|
+
const tabPanel = await page.find("wm-tab-panel");
|
|
65
|
+
expect(tabPanel.getAttribute("role")).toEqual("tabpanel");
|
|
66
|
+
});
|
|
67
|
+
it("displays if the tab item with the same tabId is selected", async () => {
|
|
68
|
+
const dynamicPanel = await page.find("#dynamic-panel");
|
|
69
|
+
expect(dynamicPanel).not.toHaveClass("tab-hidden");
|
|
70
|
+
});
|
|
71
|
+
it("does not display if the tab item with the same tabId is not selected", async () => { });
|
|
72
|
+
it("has an aria-labelledby attribute that corresponds to the correct tab", async () => {
|
|
73
|
+
//uncontrolled -- tab panel attribute is dynamic
|
|
74
|
+
let changingTabPanel = await page.find("#dynamic-panel");
|
|
75
|
+
const label = await changingTabPanel.getAttribute("aria-labelledby");
|
|
76
|
+
expect(label).toEqual("tab-link-first");
|
|
77
|
+
let secondTabItemUncontrolled = await page.find("#second-tab");
|
|
78
|
+
await secondTabItemUncontrolled.click();
|
|
79
|
+
await page.waitForChanges();
|
|
80
|
+
changingTabPanel = await page.find("#dynamic-panel");
|
|
81
|
+
const newLabel = await changingTabPanel.getAttribute("aria-labelledby");
|
|
82
|
+
expect(newLabel).toEqual("tab-link-second");
|
|
83
|
+
});
|
|
84
|
+
it("switches to a dropdown at the appropriate breakpoint", async () => {
|
|
85
|
+
const comp = await page.find("wm-tab-list");
|
|
86
|
+
expect(comp).toMatchSnapshot();
|
|
87
|
+
page.setViewport({ width: 300, height: 900 });
|
|
88
|
+
await page.waitForChanges();
|
|
89
|
+
expect(comp).toMatchSnapshot();
|
|
90
|
+
});
|
|
91
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { TabList } from "./wm-tab-list/wm-tab-list";
|
|
3
|
+
import { TabItem } from "./wm-tab-item/wm-tab-item";
|
|
4
|
+
describe("wm-tabs", () => {
|
|
5
|
+
it("builds", async () => {
|
|
6
|
+
const page = await newSpecPage({
|
|
7
|
+
components: [TabList, TabItem],
|
|
8
|
+
html: '<wm-tab-list><wm-tab-item id="tab1"></wm-tab-item></wm-tab-list>',
|
|
9
|
+
});
|
|
10
|
+
expect(page.root).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import AxePuppeteer from "@axe-core/puppeteer";
|
|
2
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
3
|
+
describe("wm-tag-input", () => {
|
|
4
|
+
// ts throws erroneous warning about vars being unused...
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
let page, el, input;
|
|
7
|
+
beforeEach(async () => {
|
|
8
|
+
page = await newE2EPage();
|
|
9
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
10
|
+
<wm-tag-input label='label'>
|
|
11
|
+
<wm-tag-option>One</wm-tag-option>
|
|
12
|
+
<wm-tag-option>Two</wm-tag-option>
|
|
13
|
+
<wm-tag-option>Three</wm-tag-option>
|
|
14
|
+
</wm-tag-input>
|
|
15
|
+
</main></body></html>`);
|
|
16
|
+
el = await page.find("wm-tag-input");
|
|
17
|
+
input = await page.find("wm-tag-input >>> input");
|
|
18
|
+
await page.waitForChanges();
|
|
19
|
+
});
|
|
20
|
+
it("passes Axe checks", async () => {
|
|
21
|
+
const results = await new AxePuppeteer(page).analyze();
|
|
22
|
+
expect(results.violations.length).toBe(0);
|
|
23
|
+
});
|
|
24
|
+
it.skip("uses Enter and Comma to add a new tag", async () => {
|
|
25
|
+
page = await newE2EPage();
|
|
26
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
27
|
+
<wm-tag-input label='label'></wm-tag-input>
|
|
28
|
+
</main></body></html>`);
|
|
29
|
+
await page.waitForChanges();
|
|
30
|
+
await page.keyboard.press("Tab");
|
|
31
|
+
await page.waitForChanges();
|
|
32
|
+
await page.keyboard.type("Hello");
|
|
33
|
+
await page.waitForChanges();
|
|
34
|
+
await page.keyboard.press("Enter");
|
|
35
|
+
await page.waitForChanges();
|
|
36
|
+
let tags = await page.findAll("wm-tag-input >>> .tag");
|
|
37
|
+
expect(tags[0].textContent).toBe("Hello");
|
|
38
|
+
await page.keyboard.type("Apple");
|
|
39
|
+
await page.waitForChanges();
|
|
40
|
+
await page.keyboard.type(",");
|
|
41
|
+
await page.waitForChanges();
|
|
42
|
+
tags = await page.findAll("wm-tag-input >>> .tag");
|
|
43
|
+
expect(tags[1].textContent).toBe("Apple");
|
|
44
|
+
// it clears the input when adding a tag
|
|
45
|
+
const input = await page.find("wm-tag-input >>> input");
|
|
46
|
+
const inputValue = await input.getProperty("value");
|
|
47
|
+
expect(inputValue).toBe("");
|
|
48
|
+
// it includes user-added options in the dropdown
|
|
49
|
+
const listItems = await page.findAll("wm-tag-input >>> .option");
|
|
50
|
+
expect(listItems[0].textContent).toBe("Apple");
|
|
51
|
+
expect(listItems[1].textContent).toBe("Hello");
|
|
52
|
+
// it shows tags in the order they are added
|
|
53
|
+
await page.keyboard.type("Third");
|
|
54
|
+
await page.waitForChanges();
|
|
55
|
+
await page.keyboard.press("Enter");
|
|
56
|
+
await page.waitForChanges();
|
|
57
|
+
tags = await page.findAll("wm-tag-input >>> .tag");
|
|
58
|
+
expect(tags[0].textContent).toBe("Hello");
|
|
59
|
+
expect(tags[1].textContent).toBe("Apple");
|
|
60
|
+
expect(tags[2].textContent).toBe("Third");
|
|
61
|
+
});
|
|
62
|
+
it("displays column1 text instead of id for table variant", async () => {
|
|
63
|
+
page = await newE2EPage();
|
|
64
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
65
|
+
<wm-tag-input
|
|
66
|
+
tag-input-type="table"
|
|
67
|
+
label="Share Access"
|
|
68
|
+
col-headers="Name,Email,Role"
|
|
69
|
+
col-widths=",40%,20%"
|
|
70
|
+
col-wrap="wrap,trunc,wrap"
|
|
71
|
+
>
|
|
72
|
+
<wm-tag-option selected id="johnprice1" col1="John Price" col2="john.price1@university.edu" col3="Admin" locked></wm-tag-option>
|
|
73
|
+
<wm-tag-option id="johnprice2" col1="John Price" col2="john.price2@university.edu" col3="Faculty"></wm-tag-option>
|
|
74
|
+
<wm-tag-option id="samsandwich" col1="Sam Sandwich" col2="sam.sandwich@university.edu" col3="Faculty"></wm-tag-option>
|
|
75
|
+
</wm-tag-input>
|
|
76
|
+
</main></body></html>`);
|
|
77
|
+
await page.waitForChanges();
|
|
78
|
+
let tagTextList = await page.findAll("wm-tag-input >>> .tag-text");
|
|
79
|
+
expect(tagTextList[0].textContent).toBe("John Price");
|
|
80
|
+
});
|
|
81
|
+
it("does not allow adding tags if add-new prop is false", async () => {
|
|
82
|
+
page = await newE2EPage();
|
|
83
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
84
|
+
<wm-tag-input label='label' add-new="false"></wm-tag-input>
|
|
85
|
+
</main></body></html>`);
|
|
86
|
+
await page.keyboard.press("Tab");
|
|
87
|
+
await page.waitForChanges();
|
|
88
|
+
await page.keyboard.press("Tab");
|
|
89
|
+
await page.waitForChanges();
|
|
90
|
+
await page.keyboard.type("New Tag");
|
|
91
|
+
await page.waitForChanges();
|
|
92
|
+
await page.keyboard.press("Enter");
|
|
93
|
+
await page.waitForChanges();
|
|
94
|
+
const tags = await page.findAll("wm-tag-input >>> .tag");
|
|
95
|
+
expect(tags.length).toBe(0);
|
|
96
|
+
});
|
|
97
|
+
it("does not allow duplicate tags to be added", async () => {
|
|
98
|
+
page = await newE2EPage();
|
|
99
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
100
|
+
<wm-tag-input label='label'>
|
|
101
|
+
<wm-tag-option selected>one</wm-tag-option>
|
|
102
|
+
</wm-tag-input>
|
|
103
|
+
</main></body></html>`);
|
|
104
|
+
let tags = await page.findAll("wm-tag-input >>> .tag");
|
|
105
|
+
expect(tags.length).toBe(1);
|
|
106
|
+
await page.keyboard.press("Tab");
|
|
107
|
+
await page.waitForChanges();
|
|
108
|
+
await page.keyboard.press("Tab");
|
|
109
|
+
await page.waitForChanges();
|
|
110
|
+
await page.keyboard.type("one");
|
|
111
|
+
await page.waitForChanges();
|
|
112
|
+
await page.keyboard.press("Enter");
|
|
113
|
+
await page.waitForChanges();
|
|
114
|
+
await page.keyboard.press("Delete");
|
|
115
|
+
await page.keyboard.press("Delete");
|
|
116
|
+
await page.keyboard.press("Delete");
|
|
117
|
+
await page.waitForChanges();
|
|
118
|
+
// it is case insensitive
|
|
119
|
+
await page.keyboard.type("OnE");
|
|
120
|
+
await page.waitForChanges();
|
|
121
|
+
await page.keyboard.press("Enter");
|
|
122
|
+
await page.waitForChanges();
|
|
123
|
+
expect(tags.length).toBe(1);
|
|
124
|
+
});
|
|
125
|
+
it("opens dropdown when input field is focused", async () => {
|
|
126
|
+
const dropdown = await page.find("wm-tag-input >>> .dropdown-wrapper");
|
|
127
|
+
expect(dropdown).not.toHaveClass("open");
|
|
128
|
+
await input.focus();
|
|
129
|
+
expect(dropdown).toHaveClass("open");
|
|
130
|
+
});
|
|
131
|
+
it("closes dropdown", async () => {
|
|
132
|
+
//
|
|
133
|
+
// when pressing escape twice
|
|
134
|
+
// when clicking outside of component
|
|
135
|
+
// when tabbing out of component
|
|
136
|
+
// not while tabbing inside of component
|
|
137
|
+
});
|
|
138
|
+
it("renders the add new button when typing in the input", async () => { });
|
|
139
|
+
it("removes only user-added tags from the dropdown", async () => {
|
|
140
|
+
// Removing a pre-existing tag will have it still in the dropdown
|
|
141
|
+
// removing a user-added tag will remove it from the dropdown
|
|
142
|
+
});
|
|
143
|
+
it("navigates the dropdown with arrow keys", async () => {
|
|
144
|
+
let options = await page.findAll("wm-tag-input >>> .option");
|
|
145
|
+
await page.keyboard.press("Tab");
|
|
146
|
+
await page.waitForChanges();
|
|
147
|
+
await page.keyboard.press("ArrowDown");
|
|
148
|
+
await page.waitForChanges();
|
|
149
|
+
expect(options[0]).toHaveClass("focused");
|
|
150
|
+
expect(options[1]).not.toHaveClass("focused");
|
|
151
|
+
expect(options[2]).not.toHaveClass("focused");
|
|
152
|
+
await page.keyboard.press("ArrowDown");
|
|
153
|
+
await page.waitForChanges();
|
|
154
|
+
expect(options[0]).not.toHaveClass("focused");
|
|
155
|
+
expect(options[1]).toHaveClass("focused");
|
|
156
|
+
expect(options[2]).not.toHaveClass("focused");
|
|
157
|
+
await page.keyboard.press("ArrowDown");
|
|
158
|
+
await page.waitForChanges();
|
|
159
|
+
expect(options[0]).not.toHaveClass("focused");
|
|
160
|
+
expect(options[1]).not.toHaveClass("focused");
|
|
161
|
+
expect(options[2]).toHaveClass("focused");
|
|
162
|
+
await page.keyboard.press("ArrowDown");
|
|
163
|
+
await page.waitForChanges();
|
|
164
|
+
expect(options[0]).toHaveClass("focused");
|
|
165
|
+
expect(options[1]).not.toHaveClass("focused");
|
|
166
|
+
expect(options[2]).not.toHaveClass("focused");
|
|
167
|
+
await page.keyboard.press("ArrowUp");
|
|
168
|
+
await page.waitForChanges();
|
|
169
|
+
expect(options[0]).not.toHaveClass("focused");
|
|
170
|
+
expect(options[1]).not.toHaveClass("focused");
|
|
171
|
+
expect(options[2]).toHaveClass("focused");
|
|
172
|
+
});
|
|
173
|
+
it("navigates tags with left and right keys", async () => {
|
|
174
|
+
page = await newE2EPage();
|
|
175
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
176
|
+
<wm-tag-input label='label'>
|
|
177
|
+
<wm-tag-option selected>One</wm-tag-option>
|
|
178
|
+
<wm-tag-option selected>Two</wm-tag-option>
|
|
179
|
+
<wm-tag-option selected>Three</wm-tag-option>
|
|
180
|
+
</wm-tag-input>
|
|
181
|
+
</main></body></html>`);
|
|
182
|
+
let tags = await page.findAll("wm-tag-input >>> .tag");
|
|
183
|
+
await page.keyboard.press("Tab");
|
|
184
|
+
await page.waitForChanges();
|
|
185
|
+
expect(tags[0]).toHaveClass("focused");
|
|
186
|
+
expect(tags[1]).not.toHaveClass("focused");
|
|
187
|
+
expect(tags[2]).not.toHaveClass("focused");
|
|
188
|
+
await page.keyboard.press("ArrowRight");
|
|
189
|
+
await page.waitForChanges();
|
|
190
|
+
expect(tags[0]).not.toHaveClass("focused");
|
|
191
|
+
expect(tags[1]).toHaveClass("focused");
|
|
192
|
+
expect(tags[2]).not.toHaveClass("focused");
|
|
193
|
+
await page.keyboard.press("ArrowLeft");
|
|
194
|
+
await page.waitForChanges();
|
|
195
|
+
expect(tags[0]).toHaveClass("focused");
|
|
196
|
+
expect(tags[1]).not.toHaveClass("focused");
|
|
197
|
+
expect(tags[2]).not.toHaveClass("focused");
|
|
198
|
+
await page.keyboard.press("ArrowLeft");
|
|
199
|
+
await page.waitForChanges();
|
|
200
|
+
expect(tags[0]).not.toHaveClass("focused");
|
|
201
|
+
expect(tags[1]).not.toHaveClass("focused");
|
|
202
|
+
expect(tags[2]).toHaveClass("focused");
|
|
203
|
+
});
|
|
204
|
+
});
|