@watermarkinsights/ripple 5.12.0-9 → 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-f3dbaf3e.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 +3 -2
- 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-b8352f28.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-f3dbaf3e.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-27ff3a85.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-59cc46a6.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-73056e10.system.js +0 -1
- package/dist/ripple/p-7a1bb29b.js +0 -1
- package/dist/ripple/p-864158de.system.entry.js +0 -1
- package/dist/ripple/p-8c95493c.js +0 -1
- package/dist/ripple/p-94dc80a0.entry.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-b78d8ab1.system.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-ef75bf23.system.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,213 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
import { AxePuppeteer } from "@axe-core/puppeteer";
|
|
3
|
+
describe("wm-chart", () => {
|
|
4
|
+
let page,
|
|
5
|
+
// @ts-ignore for some reason ts says it's unused
|
|
6
|
+
component,
|
|
7
|
+
// slices: NodeList,
|
|
8
|
+
paths, svg;
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
page = await newE2EPage();
|
|
11
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
12
|
+
<wm-chart label="the label"><wm-chart-slice amount="70" legend="Created"></wm-chart-slice><wm-chart-slice amount="2" legend="Not Created"></wm-chart-slice></wm-chart>
|
|
13
|
+
</main></body></html>`);
|
|
14
|
+
component = await page.find("wm-chart");
|
|
15
|
+
svg = await page.find("wm-chart >>> svg");
|
|
16
|
+
// slices = await page.findAll("wm-chart-slice");
|
|
17
|
+
paths = await page.findAll("wm-chart >>> path");
|
|
18
|
+
});
|
|
19
|
+
it("passes Axe tests", async () => {
|
|
20
|
+
const results = await new AxePuppeteer(page).analyze();
|
|
21
|
+
expect(results.violations.length).toBe(0);
|
|
22
|
+
});
|
|
23
|
+
it("renders", async () => {
|
|
24
|
+
expect(svg).toBeTruthy();
|
|
25
|
+
});
|
|
26
|
+
it("renders the right amount of slices and text", async () => {
|
|
27
|
+
let tmpPage = await newE2EPage();
|
|
28
|
+
await tmpPage.setContent(`<wm-chart label="the label">
|
|
29
|
+
<wm-chart-slice amount="100" legend="Created"></wm-chart-slice>
|
|
30
|
+
<wm-chart-slice amount="123" legend="Created"></wm-chart-slice>
|
|
31
|
+
<wm-chart-slice amount="0" legend="Maybe Created"></wm-chart-slice>
|
|
32
|
+
</wm-chart>`);
|
|
33
|
+
let tmpSlices = await tmpPage.findAll("wm-chart-slice");
|
|
34
|
+
let tmpPaths = await tmpPage.findAll("wm-chart >>> path");
|
|
35
|
+
let tmpTexts = await tmpPage.findAll("wm-chart >>> text.value");
|
|
36
|
+
expect(tmpSlices.length).toEqual(3);
|
|
37
|
+
// slices rendered even if amount === 0 for accessibility reasons
|
|
38
|
+
expect(tmpPaths.length).toEqual(tmpSlices.length);
|
|
39
|
+
expect(tmpTexts.length).toEqual(tmpSlices.length - 1);
|
|
40
|
+
});
|
|
41
|
+
it("hides clustered small numbers", async () => {
|
|
42
|
+
// rule: num < 4 && either neighbor < 5
|
|
43
|
+
let page = await newE2EPage();
|
|
44
|
+
await page.setContent(`<wm-chart id="one" label="the label" chart-type="doughnut3">
|
|
45
|
+
<wm-chart-slice amount="75" legend="A"></wm-chart-slice> // 89%
|
|
46
|
+
<wm-chart-slice amount="5" legend="B"></wm-chart-slice> // 6%
|
|
47
|
+
<wm-chart-slice amount="4" legend="C"></wm-chart-slice> // 5%
|
|
48
|
+
</wm-chart>
|
|
49
|
+
<wm-chart id="two" label="the label" chart-type="doughnut3">
|
|
50
|
+
<wm-chart-slice amount="65" legend="A"></wm-chart-slice> // 69%
|
|
51
|
+
<wm-chart-slice amount="14" legend="B"></wm-chart-slice> // 15%
|
|
52
|
+
<wm-chart-slice amount="4" legend="C"></wm-chart-slice> // 4%
|
|
53
|
+
<wm-chart-slice amount="4" legend="D"></wm-chart-slice> // 4%
|
|
54
|
+
<wm-chart-slice amount="4" legend="E"></wm-chart-slice> // 4%
|
|
55
|
+
<wm-chart-slice amount="3" legend="F"></wm-chart-slice> // 3%
|
|
56
|
+
</wm-chart>
|
|
57
|
+
<wm-chart id="three" label="the label" chart-type="doughnut3">
|
|
58
|
+
<wm-chart-slice amount="83" legend="A"></wm-chart-slice> // 83%
|
|
59
|
+
<wm-chart-slice amount="7" legend="B"></wm-chart-slice> // 7%
|
|
60
|
+
<wm-chart-slice amount="6" legend="C"></wm-chart-slice> // 6%
|
|
61
|
+
<wm-chart-slice amount="3" legend="D"></wm-chart-slice> // 3%
|
|
62
|
+
<wm-chart-slice amount="1" legend="E"></wm-chart-slice> // 1%
|
|
63
|
+
<wm-chart-slice amount="0" legend="F"></wm-chart-slice> // 0%
|
|
64
|
+
</wm-chart>`);
|
|
65
|
+
let [one, two, three] = await page.findAll("wm-chart");
|
|
66
|
+
let oneSlices = await one.findAll("wm-chart-slice");
|
|
67
|
+
let onePaths = await page.findAll("#one >>> path");
|
|
68
|
+
let oneTexts = await page.findAll("#one >>> text.value");
|
|
69
|
+
expect(onePaths.length).toEqual(oneSlices.length);
|
|
70
|
+
// All vals should show incl. small ones
|
|
71
|
+
// (they are not neighbors to other small vals)
|
|
72
|
+
expect(oneTexts.length).toEqual(oneSlices.length);
|
|
73
|
+
let twoSlices = await two.findAll("wm-chart-slice");
|
|
74
|
+
let twoPaths = await page.findAll("#two >>> path");
|
|
75
|
+
let twoTexts = await page.findAll("#two >>> text.value");
|
|
76
|
+
expect(twoPaths.length).toEqual(twoSlices.length);
|
|
77
|
+
// 1 small val should be hidden (3%)
|
|
78
|
+
// because it is < 4 and has a neighbor < 5
|
|
79
|
+
expect(twoTexts.length).toEqual(twoSlices.length - 1);
|
|
80
|
+
let threeSlices = await three.findAll("wm-chart-slice");
|
|
81
|
+
let threePaths = await page.findAll("#three >>> path");
|
|
82
|
+
let threeTexts = await page.findAll("#three >>> text.value");
|
|
83
|
+
// 3 small values should be hidden
|
|
84
|
+
expect(threePaths.length).toEqual(threeSlices.length);
|
|
85
|
+
expect(threeTexts.length).toEqual(threeSlices.length - 3);
|
|
86
|
+
});
|
|
87
|
+
it("handles percentages less than 1", async () => {
|
|
88
|
+
let page = await newE2EPage();
|
|
89
|
+
await page.setContent(`<wm-chart id="one" label="the label" chart-type="doughnut3">
|
|
90
|
+
// total 284
|
|
91
|
+
<wm-chart-slice amount="209" legend="A"></wm-chart-slice> // 74%
|
|
92
|
+
<wm-chart-slice amount="40" legend="B"></wm-chart-slice> // 14%
|
|
93
|
+
<wm-chart-slice amount="20" legend="C"></wm-chart-slice> // 7%
|
|
94
|
+
<wm-chart-slice amount="14" legend="D"></wm-chart-slice> // 5%
|
|
95
|
+
<wm-chart-slice amount="1" legend="E"></wm-chart-slice> // <1%
|
|
96
|
+
</wm-chart>
|
|
97
|
+
<wm-chart id="two" label="the label" chart-type="doughnut3">
|
|
98
|
+
// total 284
|
|
99
|
+
<wm-chart-slice amount="209" legend="A"></wm-chart-slice> // 73%
|
|
100
|
+
<wm-chart-slice amount="40" legend="B"></wm-chart-slice> // 14%
|
|
101
|
+
<wm-chart-slice amount="34" legend="C"></wm-chart-slice> // 12%
|
|
102
|
+
<wm-chart-slice amount="1" legend="D"></wm-chart-slice> // <1%
|
|
103
|
+
</wm-chart>`);
|
|
104
|
+
let [one, two] = await page.findAll("wm-chart");
|
|
105
|
+
let oneSlices = await one.findAll("wm-chart-slice");
|
|
106
|
+
let onePaths = await page.findAll("#one >>> path");
|
|
107
|
+
let oneTexts = await page.findAll("#one >>> text.value");
|
|
108
|
+
expect(oneSlices.length).toEqual(5);
|
|
109
|
+
// All paths are rendered
|
|
110
|
+
expect(onePaths.length).toEqual(oneSlices.length);
|
|
111
|
+
// E should be hidden because it borders a percentage < 8
|
|
112
|
+
expect(oneTexts.length).toEqual(oneSlices.length - 1);
|
|
113
|
+
let twoSlices = await two.findAll("wm-chart-slice");
|
|
114
|
+
let twoPaths = await page.findAll("#two >>> path");
|
|
115
|
+
let twoTexts = await page.findAll("#two >>> text.value");
|
|
116
|
+
expect(twoSlices.length).toEqual(4);
|
|
117
|
+
// All paths are rendered
|
|
118
|
+
expect(twoPaths.length).toEqual(twoSlices.length);
|
|
119
|
+
// Even D should be visible because it borders a percentage > 8
|
|
120
|
+
expect(twoTexts.length).toEqual(twoSlices.length);
|
|
121
|
+
});
|
|
122
|
+
it("sets the subinfo value", async () => {
|
|
123
|
+
const comp = await page.find("wm-chart");
|
|
124
|
+
comp.setProperty("subinfo", "subinfo text");
|
|
125
|
+
await page.waitForChanges();
|
|
126
|
+
const subinfo = await page.find("wm-chart >>> .subinfo");
|
|
127
|
+
expect(subinfo.textContent).toEqual("subinfo text");
|
|
128
|
+
});
|
|
129
|
+
it("changes the display values", async () => {
|
|
130
|
+
// type bar2 and bar3
|
|
131
|
+
const tmpPage = await newE2EPage();
|
|
132
|
+
await tmpPage.setContent(`<wm-chart id="bar2chart" chart-type="bar2" label="the label" value-format="percentage"><wm-chart-slice amount="10" legend="Created"></wm-chart-slice><wm-chart-slice amount="10" legend="Not Created"></wm-chart-slice></wm-chart>
|
|
133
|
+
<wm-chart id="bar3chart" chart-type="bar3" label="the label" value-format="amount"><wm-chart-slice amount="70" legend="Created"></wm-chart-slice><wm-chart-slice amount="10" legend="Not Created"></wm-chart-slice></wm-chart>`);
|
|
134
|
+
await tmpPage.waitForChanges();
|
|
135
|
+
const bar2val = await tmpPage.findAll("#bar2chart >>> .value");
|
|
136
|
+
expect(bar2val[0].textContent).toEqual("50%");
|
|
137
|
+
const bar3val = await tmpPage.findAll("#bar3chart >>> .value");
|
|
138
|
+
expect(bar3val[0].textContent).toEqual("70");
|
|
139
|
+
});
|
|
140
|
+
it("handles Arrows and Tab keys", async () => {
|
|
141
|
+
const componentWrapper = await page.find("wm-chart >>> .component-wrapper");
|
|
142
|
+
await page.keyboard.press("Tab");
|
|
143
|
+
await page.waitForChanges();
|
|
144
|
+
await page.keyboard.press("ArrowDown");
|
|
145
|
+
await page.waitForChanges();
|
|
146
|
+
paths = await page.findAll("wm-chart >>> path");
|
|
147
|
+
expect(componentWrapper).toEqualAttribute("tabindex", "-1");
|
|
148
|
+
expect(paths[0]).toEqualAttribute("tabindex", "0");
|
|
149
|
+
expect(paths[1]).toEqualAttribute("tabindex", "-1");
|
|
150
|
+
await page.keyboard.press("ArrowRight");
|
|
151
|
+
await page.waitForChanges();
|
|
152
|
+
paths = await page.findAll("wm-chart >>> path");
|
|
153
|
+
expect(componentWrapper).toEqualAttribute("tabindex", "-1");
|
|
154
|
+
expect(paths[0]).toEqualAttribute("tabindex", "-1");
|
|
155
|
+
expect(paths[1]).toEqualAttribute("tabindex", "0");
|
|
156
|
+
await page.keyboard.press("ArrowLeft");
|
|
157
|
+
await page.waitForChanges();
|
|
158
|
+
paths = await page.findAll("wm-chart >>> path");
|
|
159
|
+
expect(componentWrapper).toEqualAttribute("tabindex", "-1");
|
|
160
|
+
expect(paths[0]).toEqualAttribute("tabindex", "0");
|
|
161
|
+
expect(paths[1]).toEqualAttribute("tabindex", "-1");
|
|
162
|
+
await page.keyboard.press("ArrowUp");
|
|
163
|
+
await page.waitForChanges();
|
|
164
|
+
paths = await page.findAll("wm-chart >>> path");
|
|
165
|
+
expect(componentWrapper).toEqualAttribute("tabindex", "-1");
|
|
166
|
+
expect(paths[0]).toEqualAttribute("tabindex", "-1");
|
|
167
|
+
expect(paths[1]).toEqualAttribute("tabindex", "0");
|
|
168
|
+
await page.keyboard.press("Tab");
|
|
169
|
+
await page.waitForChanges();
|
|
170
|
+
expect(componentWrapper).toEqualAttribute("tabindex", "0");
|
|
171
|
+
expect(paths[0]).toEqualAttribute("tabindex", "-1");
|
|
172
|
+
expect(paths[1]).toEqualAttribute("tabindex", "-1");
|
|
173
|
+
});
|
|
174
|
+
it("opens popover when slice clicked", async () => {
|
|
175
|
+
const tmpPage = await newE2EPage();
|
|
176
|
+
await tmpPage.setContent(`<wm-chart id="one" label="the label" chart-type="doughnut3">
|
|
177
|
+
<wm-chart-slice amount="95" popover-title="A" popover-text="Text A" popover-button-text="A Button" legend="A"></wm-chart-slice>
|
|
178
|
+
<wm-chart-slice amount="5" popover-title="B" popover-text="Text B" popover-button-text="B Button" legend="B"></wm-chart-slice>
|
|
179
|
+
</wm-chart>`);
|
|
180
|
+
await tmpPage.waitForChanges;
|
|
181
|
+
let hasPopover = await tmpPage.find("wm-chart >>> .popover");
|
|
182
|
+
const path = await tmpPage.find("wm-chart >>> path");
|
|
183
|
+
expect(hasPopover).toBeFalsy;
|
|
184
|
+
await path.click();
|
|
185
|
+
await tmpPage.waitForChanges();
|
|
186
|
+
hasPopover = await tmpPage.find("wm-chart >>> .popover");
|
|
187
|
+
expect(hasPopover).toBeTruthy;
|
|
188
|
+
});
|
|
189
|
+
it("activating popover button fires event", async () => {
|
|
190
|
+
const tmpPage = await newE2EPage();
|
|
191
|
+
await tmpPage.setContent(`<wm-chart id="one" label="the label" chart-type="doughnut3">
|
|
192
|
+
<wm-chart-slice amount="5" popover-title="A" popover-text="Text A" popover-button-text="A Button" legend="A"></wm-chart-slice>
|
|
193
|
+
<wm-chart-slice amount="95" popover-title="B" popover-text="Text B" popover-button-text="B Button" legend="B"></wm-chart-slice>
|
|
194
|
+
</wm-chart>
|
|
195
|
+
<div id="indicator"></div>`);
|
|
196
|
+
await tmpPage.waitForChanges;
|
|
197
|
+
await tmpPage.evaluate(async () => {
|
|
198
|
+
const component = await document.querySelector("wm-chart");
|
|
199
|
+
const indicator = await document.querySelector("#indicator");
|
|
200
|
+
await component.addEventListener("wmChartPopoverButtonTriggered", () => (indicator.textContent = "event heard"));
|
|
201
|
+
});
|
|
202
|
+
await tmpPage.waitForChanges;
|
|
203
|
+
const indicator = await tmpPage.find("#indicator");
|
|
204
|
+
expect(indicator.textContent).toBe("");
|
|
205
|
+
await tmpPage.keyboard.press("Tab");
|
|
206
|
+
await tmpPage.waitForChanges();
|
|
207
|
+
await tmpPage.keyboard.press("ArrowDown");
|
|
208
|
+
await tmpPage.waitForChanges();
|
|
209
|
+
await tmpPage.keyboard.press("Enter");
|
|
210
|
+
await tmpPage.waitForChanges();
|
|
211
|
+
expect(indicator.textContent).toBe("event heard");
|
|
212
|
+
});
|
|
213
|
+
});
|
|
@@ -107,8 +107,15 @@ export class Chart {
|
|
|
107
107
|
renderBarText(s, minimumWidth) {
|
|
108
108
|
let val;
|
|
109
109
|
if (this.valueFormat === "percentage") {
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
if (s.perc === 0 && s.amount > 0) {
|
|
111
|
+
val = "<1%";
|
|
112
|
+
}
|
|
113
|
+
else if (s.perc === 100 && s.amount < this.total) {
|
|
114
|
+
val = ">99%";
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
val = s.perc + "%";
|
|
118
|
+
}
|
|
112
119
|
}
|
|
113
120
|
else if (this.valueFormat === "amount") {
|
|
114
121
|
val = s.amount;
|
|
@@ -138,7 +145,7 @@ export class Chart {
|
|
|
138
145
|
}
|
|
139
146
|
}
|
|
140
147
|
render() {
|
|
141
|
-
return (h(Host, {
|
|
148
|
+
return (h(Host, { onBlur: () => exitChart.call(this) }, h("div", { ref: (el) => (this.componentWrapperEl = el), class: `component-wrapper ${this.currentChartType} ${this.isTabbing && !this.userIsNavigating ? "user-is-tabbing" : ""} ${this.labelPosition === "left" && this.currentChartType === "bar4" ? "left-label" : ""}`, role: "application", "aria-label": this.ariaLabelText, tabindex: 0, "aria-roledescription": chartMessages.interactiveChart, "aria-describedby": "chart-instructions" }, h("label", { id: `label-${this.uid}`, class: `label --${this.labelPosition}`, htmlFor: `graphic-${this.uid}` }, h("span", { class: "label-text" }, this.label), this.subinfo ? h("span", { class: "subinfo" }, this.subinfo) : ""), this.isBar && renderLegend.call(this, this.currentChartType), this.renderChart(), this.isDoughnut && renderLegend.call(this, this.currentChartType), h("priv-chart-popover", { class: this.isTabbing ? "user-is-tabbing" : "", onIntChartPopoverOpenChanged: (ev) => this.handlePopoverOpenChanged(ev) }), this.isBar && !this.printMode && renderHiddenValuesMessage()), renderInstructionsText()));
|
|
142
149
|
}
|
|
143
150
|
static get is() { return "wm-chart"; }
|
|
144
151
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import * as globalFuncs from "../../../global/functions";
|
|
3
|
+
jest.spyOn(globalFuncs, "generateId");
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
globalFuncs.generateId.mockImplementation(() => "random-id");
|
|
6
|
+
import { Chart } from "./wm-chart";
|
|
7
|
+
// mock ResizeObserver
|
|
8
|
+
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
9
|
+
observe: jest.fn(),
|
|
10
|
+
unobserve: jest.fn(),
|
|
11
|
+
disconnect: jest.fn(),
|
|
12
|
+
}));
|
|
13
|
+
describe("wm-chart", () => {
|
|
14
|
+
it("builds", async () => {
|
|
15
|
+
const page = await newSpecPage({ components: [Chart], html: '<wm-chart label="charty"></wm-chart>' });
|
|
16
|
+
expect(page.root).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
it("properties and attributes", async () => {
|
|
19
|
+
const page = await newSpecPage({ components: [Chart], html: '<wm-chart label="charty"></wm-chart>' });
|
|
20
|
+
const componentWrapper = page.root.shadowRoot.querySelector(".component-wrapper");
|
|
21
|
+
expect(componentWrapper).toEqualAttribute("role", "application");
|
|
22
|
+
expect(componentWrapper).toEqualAttribute("aria-label", "charty");
|
|
23
|
+
expect(componentWrapper).toEqualAttribute("aria-roledescription", "Interactive chart");
|
|
24
|
+
expect(componentWrapper).toEqualAttribute("aria-describedby", "chart-instructions");
|
|
25
|
+
});
|
|
26
|
+
// needs refactoring before it can be tested
|
|
27
|
+
// it("generates the svg path", () => {
|
|
28
|
+
// const chart = new Chart();
|
|
29
|
+
// expect(chart.getPathData(122, 23)).toEqual("thing");
|
|
30
|
+
// })
|
|
31
|
+
// needs refactoring before it can be tested
|
|
32
|
+
// it("outputs the svg arc syntax", () => {
|
|
33
|
+
// const chart = new Chart();
|
|
34
|
+
// // the 2nd arc is set according to whether we're drawing the inner or outer arc, and whether it's concave or convex
|
|
35
|
+
// expect(chart.getArc(23, "0 1", 34, 66)).toEqual("nene");
|
|
36
|
+
// })
|
|
37
|
+
});
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
import { AxePuppeteer } from "@axe-core/puppeteer";
|
|
3
|
+
describe("wm-line-chart", () => {
|
|
4
|
+
let page;
|
|
5
|
+
async function createPageHelper() {
|
|
6
|
+
page = await newE2EPage();
|
|
7
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
8
|
+
<wm-line-chart
|
|
9
|
+
label="Regional Job Trends"
|
|
10
|
+
description="View job trends for your region compared to national tends from the past 3 years with a 3 year projection"
|
|
11
|
+
x-axis-label="Year"
|
|
12
|
+
y-axis-label="Change Since 2020"
|
|
13
|
+
line-data='{"Regional": {"2020": 5, "2021": 10, "2022": 13, "2023": null, "2024": 20, "2025": 23, "2026": 25, "2027": 32, "2028": 35, "2029": 40, "2030": 42, "2031": 52, "2032": 54, "2033": 61}, "National": {"2020": 8, "2021": 13, "2022": 16, "2023": 21, "2024": 23, "2025": 26, "2026": 28, "2027": 29, "2028": 32, "2029": 35, "2030": 39, "2031": 49, "2032": 51, "2033": 58} }'
|
|
14
|
+
units="year,%"
|
|
15
|
+
show-deltas="true"
|
|
16
|
+
y-range="0,25,50,75,100"
|
|
17
|
+
highlight-start="2026"
|
|
18
|
+
visibility-toggles="true"
|
|
19
|
+
>
|
|
20
|
+
</wm-line-chart>
|
|
21
|
+
</main></body></html>`);
|
|
22
|
+
}
|
|
23
|
+
it("passes Axe tests", async () => {
|
|
24
|
+
await createPageHelper();
|
|
25
|
+
const results = await new AxePuppeteer(page).analyze();
|
|
26
|
+
expect(results.violations.length).toBe(0);
|
|
27
|
+
});
|
|
28
|
+
it("has keyboard navigation for legend", async () => {
|
|
29
|
+
await createPageHelper();
|
|
30
|
+
// first focus goes to first button
|
|
31
|
+
await page.keyboard.press("Tab");
|
|
32
|
+
await page.waitForChanges();
|
|
33
|
+
let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
34
|
+
await page.waitForChanges();
|
|
35
|
+
expect(activeElId).toBe("visibility-button-0");
|
|
36
|
+
// wraps right
|
|
37
|
+
await page.keyboard.press("ArrowLeft");
|
|
38
|
+
await page.waitForChanges();
|
|
39
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
40
|
+
await page.waitForChanges();
|
|
41
|
+
expect(activeElId).toBe("visibility-button-1");
|
|
42
|
+
await page.keyboard.press("ArrowLeft");
|
|
43
|
+
await page.waitForChanges();
|
|
44
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
45
|
+
await page.waitForChanges();
|
|
46
|
+
expect(activeElId).toBe("visibility-button-0");
|
|
47
|
+
await page.keyboard.press("ArrowRight");
|
|
48
|
+
await page.waitForChanges();
|
|
49
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
50
|
+
await page.waitForChanges();
|
|
51
|
+
expect(activeElId).toBe("visibility-button-1");
|
|
52
|
+
// wraps left
|
|
53
|
+
await page.keyboard.press("ArrowRight");
|
|
54
|
+
await page.waitForChanges();
|
|
55
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
56
|
+
await page.waitForChanges();
|
|
57
|
+
expect(activeElId).toBe("visibility-button-0");
|
|
58
|
+
});
|
|
59
|
+
it("has keyboard navigation for data points", async () => {
|
|
60
|
+
page = await newE2EPage();
|
|
61
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
62
|
+
<wm-line-chart
|
|
63
|
+
label="Regional Job Trends"
|
|
64
|
+
description="View job trends for your region compared to national tends from the past 3 years with a 3 year projection"
|
|
65
|
+
x-axis-label="Year"
|
|
66
|
+
y-axis-label="Change Since 2020"
|
|
67
|
+
line-data='{"Regional": {"2020": 5, "2021": 10, "2022": 13}, "National": {"2020": 8, "2021": null, "2022": 16}}'
|
|
68
|
+
y-range="0,25,50,75,100"
|
|
69
|
+
>
|
|
70
|
+
</wm-line-chart>
|
|
71
|
+
</main></body></html>`);
|
|
72
|
+
await page.keyboard.press("Tab");
|
|
73
|
+
await page.waitForChanges();
|
|
74
|
+
let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
75
|
+
expect(activeElId).toBe("Regional-0");
|
|
76
|
+
await page.keyboard.press("ArrowRight");
|
|
77
|
+
await page.waitForChanges();
|
|
78
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
79
|
+
await page.waitForChanges();
|
|
80
|
+
expect(activeElId).toBe("Regional-1");
|
|
81
|
+
await page.keyboard.press("ArrowRight");
|
|
82
|
+
await page.waitForChanges();
|
|
83
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
84
|
+
expect(activeElId).toBe("Regional-2");
|
|
85
|
+
// wraps left
|
|
86
|
+
await page.keyboard.press("ArrowRight");
|
|
87
|
+
await page.waitForChanges();
|
|
88
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
89
|
+
expect(activeElId).toBe("Regional-0");
|
|
90
|
+
// wraps Left
|
|
91
|
+
await page.keyboard.press("ArrowLeft");
|
|
92
|
+
await page.waitForChanges();
|
|
93
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
94
|
+
expect(activeElId).toBe("Regional-2");
|
|
95
|
+
await page.keyboard.press("ArrowLeft");
|
|
96
|
+
await page.waitForChanges();
|
|
97
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
98
|
+
expect(activeElId).toBe("Regional-1");
|
|
99
|
+
// next line
|
|
100
|
+
await page.keyboard.press("ArrowLeft");
|
|
101
|
+
await page.waitForChanges();
|
|
102
|
+
await page.keyboard.press("ArrowDown");
|
|
103
|
+
await page.waitForChanges();
|
|
104
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
105
|
+
expect(activeElId).toBe("National-0");
|
|
106
|
+
// skips null data point
|
|
107
|
+
await page.keyboard.press("ArrowLeft");
|
|
108
|
+
await page.waitForChanges();
|
|
109
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
110
|
+
expect(activeElId).toBe("National-2");
|
|
111
|
+
// wraps to first line
|
|
112
|
+
await page.keyboard.press("ArrowLeft");
|
|
113
|
+
await page.waitForChanges();
|
|
114
|
+
await page.keyboard.press("ArrowDown");
|
|
115
|
+
await page.waitForChanges();
|
|
116
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
117
|
+
expect(activeElId).toBe("Regional-0");
|
|
118
|
+
// wraps to last line
|
|
119
|
+
await page.keyboard.press("ArrowUp");
|
|
120
|
+
await page.waitForChanges();
|
|
121
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
122
|
+
expect(activeElId).toBe("National-0");
|
|
123
|
+
await page.keyboard.press("ArrowUp");
|
|
124
|
+
await page.waitForChanges();
|
|
125
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
126
|
+
expect(activeElId).toBe("Regional-0");
|
|
127
|
+
});
|
|
128
|
+
it("visibility toggle hides lines, data points are skipped by navigation", async () => {
|
|
129
|
+
page = await newE2EPage();
|
|
130
|
+
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
131
|
+
<wm-line-chart
|
|
132
|
+
label="Regional Job Trends"
|
|
133
|
+
description="View job trends for your region compared to national tends from the past 3 years with a 3 year projection"
|
|
134
|
+
x-axis-label="Year"
|
|
135
|
+
y-axis-label="Change Since 2020"
|
|
136
|
+
line-data='{"Regional": {"2020": 5, "2021": 10, "2022": 13}, "National": {"2020": 8, "2021": 12, "2022": 16}, "International": {"2020": 8, "2021": 12, "2022": 16}}'
|
|
137
|
+
visibility-toggles="true"
|
|
138
|
+
>
|
|
139
|
+
</wm-line-chart>
|
|
140
|
+
</main></body></html>`);
|
|
141
|
+
const allLineEls = await page.findAll("wm-line-chart >>> .line");
|
|
142
|
+
expect(allLineEls[0]).not.toHaveClass("hidden");
|
|
143
|
+
await page.keyboard.press("Tab");
|
|
144
|
+
await page.waitForChanges();
|
|
145
|
+
// Enter key toggles button
|
|
146
|
+
await page.keyboard.press("Enter");
|
|
147
|
+
await page.waitForChanges();
|
|
148
|
+
expect(allLineEls[0]).toHaveClass("hidden");
|
|
149
|
+
// Space key toggles button
|
|
150
|
+
await page.keyboard.press("Space");
|
|
151
|
+
await page.waitForChanges();
|
|
152
|
+
expect(allLineEls[0]).not.toHaveClass("hidden");
|
|
153
|
+
await page.keyboard.press("Space");
|
|
154
|
+
await page.waitForChanges();
|
|
155
|
+
expect(allLineEls[0]).toHaveClass("hidden");
|
|
156
|
+
// tab focuses first visible data point
|
|
157
|
+
await page.keyboard.press("Tab");
|
|
158
|
+
await page.waitForChanges();
|
|
159
|
+
let activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
160
|
+
expect(activeElId).toBe("National-0");
|
|
161
|
+
await page.keyboard.press("ArrowDown");
|
|
162
|
+
await page.waitForChanges();
|
|
163
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
164
|
+
expect(activeElId).toBe("International-0");
|
|
165
|
+
// data point nav skips hidden line
|
|
166
|
+
await page.keyboard.press("ArrowDown");
|
|
167
|
+
await page.waitForChanges();
|
|
168
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
169
|
+
expect(activeElId).toBe("National-0");
|
|
170
|
+
// data point nav skips hidden line
|
|
171
|
+
await page.keyboard.press("ArrowUp");
|
|
172
|
+
await page.waitForChanges();
|
|
173
|
+
activeElId = await page.evaluate(() => document.activeElement.shadowRoot.activeElement.id);
|
|
174
|
+
expect(activeElId).toBe("International-0");
|
|
175
|
+
});
|
|
176
|
+
});
|
|
@@ -11,12 +11,12 @@ export class LineChart {
|
|
|
11
11
|
this.displayedXIntervals = [];
|
|
12
12
|
this.yIntervals = [];
|
|
13
13
|
this.lineStyles = [
|
|
14
|
-
{ color: "#8b86ca", icon: "triangle" },
|
|
15
|
-
{ color: "#2e1b46", icon: "circle" },
|
|
16
|
-
{ color: "#0089e4", icon: "square" },
|
|
17
|
-
{ color: "#088000", icon: "star" },
|
|
18
|
-
{ color: "#ea8500", icon: "rhombus" },
|
|
19
|
-
{ color: "#d54f41", icon: "triangle-inverted" },
|
|
14
|
+
{ color: "#8b86ca", icon: "triangle" },
|
|
15
|
+
{ color: "#2e1b46", icon: "circle" },
|
|
16
|
+
{ color: "#0089e4", icon: "square" },
|
|
17
|
+
{ color: "#088000", icon: "star" },
|
|
18
|
+
{ color: "#ea8500", icon: "rhombus" },
|
|
19
|
+
{ color: "#d54f41", icon: "triangle-inverted" },
|
|
20
20
|
{ color: "#146ca9", icon: "pentagon" }, // blue
|
|
21
21
|
];
|
|
22
22
|
this.debouncedResize = debounce(async () => {
|
|
@@ -29,7 +29,7 @@ export class LineChart {
|
|
|
29
29
|
this.lineData = undefined;
|
|
30
30
|
this.units = "null,null";
|
|
31
31
|
this.labelWidth = "120px";
|
|
32
|
-
this.highlightQualifier =
|
|
32
|
+
this.highlightQualifier = lineChartMessages.highlightQualifier;
|
|
33
33
|
this.highlightStart = undefined;
|
|
34
34
|
this.highlightEnd = undefined;
|
|
35
35
|
this.visibilityToggles = false;
|
|
@@ -171,7 +171,8 @@ export class LineChart {
|
|
|
171
171
|
lineFocusMessage(lineIdx) {
|
|
172
172
|
const label = this.dataPointMatrix[lineIdx][0].lineLabel;
|
|
173
173
|
const numDataPoints = this.dataPointMatrix[lineIdx].filter((datapoint) => datapoint.yValue !== null).length;
|
|
174
|
-
|
|
174
|
+
const focusMessage = lineChartMessages.getLineFocusAnnouncement(label, lineIdx + 1, this.dataPointMatrix.length, numDataPoints);
|
|
175
|
+
return focusMessage;
|
|
175
176
|
}
|
|
176
177
|
focusDataPointByEl(pointEl) {
|
|
177
178
|
this.pointEls.forEach((point) => (point.tabIndex = -1));
|
|
@@ -301,7 +302,7 @@ export class LineChart {
|
|
|
301
302
|
})));
|
|
302
303
|
}
|
|
303
304
|
renderVisibilityToggle(lineLabel, lineIdx, isHidden) {
|
|
304
|
-
return (h("wm-button", { id: `visibility-button-${lineIdx}`, class: "visibility-toggle", "label-for-identical-buttons": `${lineIdx === 0 ?
|
|
305
|
+
return (h("wm-button", { id: `visibility-button-${lineIdx}`, class: "visibility-toggle", "label-for-identical-buttons": `${lineIdx === 0 ? lineChartMessages.getToggleButtonLabel(this.dataPointMatrix.length) : ""} ${isHidden ? globalMessages.show : globalMessages.hide} ${lineLabel} ${lineChartMessages.getToggleButtonState(isHidden)}`, "button-type": "navigational", tooltip: isHidden ? globalMessages.show : globalMessages.hide, tooltipPosition: "bottom", icon: isHidden ? "#hide" : "#show", onClick: () => this.toggleLineVisibility(lineIdx), onKeyDown: (ev) => this.handleVisibilityToggleKeydown(ev, lineIdx), onFocus: () => (this.popoverIndex = -1) }));
|
|
305
306
|
}
|
|
306
307
|
renderIcon(lineIdx) {
|
|
307
308
|
const { color, icon } = this.lineStyles[lineIdx];
|
|
@@ -396,7 +397,7 @@ export class LineChart {
|
|
|
396
397
|
popoverStyle = {
|
|
397
398
|
"--leftPosition": `0%`,
|
|
398
399
|
"--topPosition": "0%",
|
|
399
|
-
maxWidth: Math.min(this.el.clientWidth - 2, 400) + "px",
|
|
400
|
+
maxWidth: Math.min(this.el.clientWidth - 2, 400) + "px",
|
|
400
401
|
transform: `translateX(calc(${displaceLeft}))`, // align with left edge of component
|
|
401
402
|
};
|
|
402
403
|
}
|
|
@@ -436,9 +437,9 @@ export class LineChart {
|
|
|
436
437
|
return h("div", { class: "highlight", style: highlightStyle });
|
|
437
438
|
}
|
|
438
439
|
render() {
|
|
439
|
-
return (h(Host, {
|
|
440
|
+
return (h(Host, { onBlur: () => this.resetDataPointFocus(), onMouseLeave: () => (this.popoverIndex = -1) }, h("div", { class: "component-wrapper", role: "application", "aria-roledescription": chartMessages.interactiveChart, "aria-label": this.label, "aria-describedby": "chart-description" }, this.renderLegend(), h("div", { class: "chart-wrapper" }, h("div", { class: "chart-label --y-axis", style: { "--labelWidth": this.labelWidth } }, this.yAxisLabel, this.parsedUnits[1] && ` (${this.parsedUnits[1]})`), this.renderYIntervals(), h("div", { ref: (el) => (this.plotAreaEl = el), class: `plot-area ${this.hasPartialInterval ? "" : "right-border"}`, style: {
|
|
440
441
|
"--backgroundSize": `${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`,
|
|
441
|
-
} }, this.highlightStart && this.renderHighlight(), this.renderData(), this.renderHoverAreas()), this.popoverIndex !== -1 && this.renderHoverIndicator(), this.popoverIndex !== -1 && this.renderPopover(), this.renderXIntervals(), h("div", {
|
|
442
|
+
} }, this.highlightStart && this.renderHighlight(), this.renderData(), this.renderHoverAreas()), this.popoverIndex !== -1 && this.renderHoverIndicator(), this.popoverIndex !== -1 && this.renderPopover(), this.renderXIntervals(), h("div", { class: "chart-label --x-axis" }, this.xAxisLabel, this.parsedUnits[0] && ` (${this.parsedUnits[0]})`)), h("div", { id: "chart-description", class: "sr-only" }, `${lineChartMessages.instructions} ${this.description}`), h("div", { ref: (el) => (this.liveRegionEl = el), "aria-live": "polite", class: "sr-only" }, this.announcement))));
|
|
442
443
|
}
|
|
443
444
|
static get is() { return "wm-line-chart"; }
|
|
444
445
|
static get encapsulation() { return "shadow"; }
|
|
@@ -592,7 +593,7 @@ export class LineChart {
|
|
|
592
593
|
},
|
|
593
594
|
"attribute": "highlight-qualifier",
|
|
594
595
|
"reflect": false,
|
|
595
|
-
"defaultValue": "
|
|
596
|
+
"defaultValue": "lineChartMessages.highlightQualifier"
|
|
596
597
|
},
|
|
597
598
|
"highlightStart": {
|
|
598
599
|
"type": "string",
|