@watermarkinsights/ripple 5.3.0-12 → 5.3.0-13
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-86227b27.js → chartFunctions-0238043b.js} +3 -3
- package/dist/cjs/{functions-05e7ad5a.js → functions-3be85c6d.js} +7 -104
- package/dist/{esm/app-globals-51ea1005.js → cjs/global-042bb995.js} +2 -7
- package/dist/cjs/index-e86c28b6.js +2641 -0
- package/dist/cjs/{intl-2b550151.js → intl-567eb9d8.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/priv-calendar.cjs.entry.js +5 -6
- package/dist/cjs/priv-chart-popover.cjs.entry.js +17 -16
- package/dist/cjs/priv-navigator-button.cjs.entry.js +3 -4
- package/dist/cjs/priv-navigator-item.cjs.entry.js +3 -4
- package/dist/cjs/ripple.cjs.js +11 -12
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +6 -8
- package/dist/cjs/wm-button.cjs.entry.js +4 -5
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +6 -7
- package/dist/cjs/wm-date-range.cjs.entry.js +7 -8
- package/dist/cjs/wm-datepicker.cjs.entry.js +7 -8
- package/dist/cjs/wm-file-list.cjs.entry.js +3 -4
- package/dist/cjs/wm-file.cjs.entry.js +4 -5
- package/dist/cjs/wm-input.cjs.entry.js +5 -6
- package/dist/cjs/wm-line-chart.cjs.entry.js +14 -15
- package/dist/cjs/wm-modal-footer.cjs.entry.js +3 -4
- package/dist/cjs/wm-modal-header.cjs.entry.js +5 -6
- package/dist/cjs/wm-modal.cjs.entry.js +5 -6
- package/dist/cjs/wm-navigation_3.cjs.entry.js +10 -13
- package/dist/cjs/wm-navigator.cjs.entry.js +3 -4
- package/dist/cjs/wm-option_2.cjs.entry.js +8 -10
- package/dist/cjs/wm-pagination.cjs.entry.js +4 -5
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +7 -9
- package/dist/cjs/wm-search.cjs.entry.js +6 -7
- package/dist/cjs/wm-snackbar.cjs.entry.js +6 -7
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +8 -11
- package/dist/cjs/wm-tag-input.cjs.entry.js +7 -8
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +5 -6
- package/dist/cjs/wm-timepicker.cjs.entry.js +5 -6
- package/dist/cjs/wm-toggletip.cjs.entry.js +5 -6
- package/dist/cjs/wm-uploader.cjs.entry.js +6 -7
- package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/charts/chartFunctions.js +1 -1
- package/dist/collection/components/charts/chartFunctions.spec.js +16 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +81 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +14 -12
- package/dist/collection/components/charts/screenshots.e2e.js +96 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +213 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +37 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +176 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +163 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +69 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +79 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +89 -0
- package/dist/collection/components/datepickers/wm-date-range.e2e.js +443 -0
- package/dist/collection/components/datepickers/wm-date-range.js +12 -16
- package/dist/collection/components/datepickers/wm-date-range.spec.js +22 -0
- package/dist/collection/components/datepickers/wm-datepicker.e2e.js +382 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +12 -16
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +200 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +48 -0
- package/dist/collection/components/wm-button/wm-button.e2e.js +55 -0
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-button/wm-button.spec.js +74 -0
- package/dist/collection/components/wm-file/wm-file.js +1 -1
- package/dist/collection/components/wm-file/wm-file.spec.js +194 -0
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +69 -0
- package/dist/collection/components/wm-input/wm-input.e2e.js +32 -0
- package/dist/collection/components/wm-input/wm-input.js +1 -1
- package/dist/collection/components/wm-input/wm-input.spec.js +173 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +23 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +54 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +11 -0
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +8 -0
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +104 -0
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-modal/wm-modal.spec.js +30 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +102 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +91 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +50 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +209 -0
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +177 -0
- package/dist/collection/components/wm-option/wm-option.e2e.js +22 -0
- package/dist/collection/components/wm-option/wm-option.js +1 -1
- package/dist/collection/components/wm-option/wm-option.spec.js +63 -0
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +312 -0
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.e2e.js +76 -0
- package/dist/collection/components/wm-search/wm-search.js +4 -5
- package/dist/collection/components/wm-search/wm-search.spec.js +71 -0
- package/dist/collection/components/wm-select/wm-select.e2e.js +521 -0
- package/dist/collection/components/wm-select/wm-select.js +2 -2
- package/dist/collection/components/wm-select/wm-select.spec.js +271 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +112 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +9 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +91 -0
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +12 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +204 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +195 -0
- package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +41 -0
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-textarea/wm-textarea.spec.js +79 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +163 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +8 -11
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +147 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +69 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +21 -0
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +70 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +234 -0
- package/dist/collection/global/functions.spec.js +126 -0
- package/dist/collection/lang/lang.spec.js +20 -0
- package/dist/esm/{chartFunctions-da985798.js → chartFunctions-036fdb89.js} +3 -3
- package/dist/esm/{functions-25781571.js → functions-46843ea0.js} +8 -105
- package/dist/{cjs/app-globals-c1efe198.js → esm/global-570a3fbb.js} +1 -10
- package/dist/esm/index-558b5a82.js +2610 -0
- package/dist/esm/{intl-df3d34d1.js → intl-8b8740b9.js} +1 -1
- package/dist/esm/loader.js +4 -5
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-calendar.entry.js +5 -6
- package/dist/esm/priv-chart-popover.entry.js +17 -16
- package/dist/esm/priv-navigator-button.entry.js +3 -4
- package/dist/esm/priv-navigator-item.entry.js +3 -4
- package/dist/esm/ripple.js +12 -13
- package/dist/esm/wm-action-menu_2.entry.js +6 -8
- package/dist/esm/wm-button.entry.js +4 -5
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +6 -7
- package/dist/esm/wm-date-range.entry.js +7 -8
- package/dist/esm/wm-datepicker.entry.js +7 -8
- package/dist/esm/wm-file-list.entry.js +3 -4
- package/dist/esm/wm-file.entry.js +4 -5
- package/dist/esm/wm-input.entry.js +5 -6
- package/dist/esm/wm-line-chart.entry.js +14 -15
- package/dist/esm/wm-modal-footer.entry.js +3 -4
- package/dist/esm/wm-modal-header.entry.js +5 -6
- package/dist/esm/wm-modal.entry.js +5 -6
- package/dist/esm/wm-navigation_3.entry.js +10 -13
- package/dist/esm/wm-navigator.entry.js +3 -4
- package/dist/esm/wm-option_2.entry.js +8 -10
- package/dist/esm/wm-pagination.entry.js +4 -5
- package/dist/esm/wm-progress-indicator_3.entry.js +7 -9
- package/dist/esm/wm-search.entry.js +6 -7
- package/dist/esm/wm-snackbar.entry.js +6 -7
- package/dist/esm/wm-tab-item_3.entry.js +8 -11
- package/dist/esm/wm-tag-input.entry.js +7 -8
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +5 -6
- package/dist/esm/wm-timepicker.entry.js +5 -6
- package/dist/esm/wm-toggletip.entry.js +5 -6
- package/dist/esm/wm-uploader.entry.js +6 -7
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/{chartFunctions-da985798.js → chartFunctions-036fdb89.js} +1 -1
- package/dist/esm-es5/functions-46843ea0.js +1 -0
- package/dist/esm-es5/global-570a3fbb.js +1 -0
- package/dist/esm-es5/index-558b5a82.js +1 -0
- package/dist/esm-es5/{intl-df3d34d1.js → intl-8b8740b9.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/cdn.js +2 -1
- package/dist/loader/index.cjs.js +2 -1
- package/dist/loader/index.d.ts +0 -3
- package/dist/loader/index.es2017.js +2 -1
- package/dist/loader/index.js +2 -1
- package/dist/ripple/p-09a31f0c.entry.js +1 -0
- package/dist/ripple/{p-6e3ef46a.system.entry.js → p-09dd7f17.system.entry.js} +1 -1
- package/dist/ripple/p-0dc51fad.entry.js +1 -0
- package/dist/ripple/p-0ea8609b.system.entry.js +1 -0
- package/dist/ripple/{p-a9d89ac8.system.js → p-1ac66a15.system.js} +1 -1
- package/dist/ripple/p-240124b0.system.entry.js +1 -0
- package/dist/ripple/p-26fbc7f5.system.entry.js +1 -0
- package/dist/ripple/p-294b38ca.system.entry.js +1 -0
- package/dist/ripple/p-2b05bf05.entry.js +1 -0
- package/dist/ripple/{p-72bdebb5.system.entry.js → p-2ba7e68e.system.entry.js} +1 -1
- package/dist/ripple/p-311923b2.system.entry.js +1 -0
- package/dist/ripple/p-3183bba8.entry.js +1 -0
- package/dist/ripple/p-31976813.entry.js +1 -0
- package/dist/ripple/{p-823d7b4e.system.entry.js → p-32bf3f5b.system.entry.js} +1 -1
- package/dist/ripple/p-33679b9d.entry.js +1 -0
- package/dist/ripple/p-34b5830f.system.js +1 -0
- package/dist/ripple/p-3568472c.entry.js +1 -0
- package/dist/ripple/p-359d45dc.entry.js +1 -0
- package/dist/ripple/{p-67a7f0b0.entry.js → p-3a44e1c8.entry.js} +1 -1
- package/dist/ripple/{p-672ae2cb.entry.js → p-42d1c301.entry.js} +1 -1
- package/dist/ripple/{p-041e579b.entry.js → p-45abd8fe.entry.js} +1 -1
- package/dist/ripple/{p-13b1d775.entry.js → p-48e09589.entry.js} +1 -1
- package/dist/ripple/p-4e56f3f5.system.entry.js +1 -0
- package/dist/ripple/{p-9f06ed3b.system.entry.js → p-5029fcd8.system.entry.js} +1 -1
- package/dist/ripple/p-568c595f.js +2 -0
- package/dist/ripple/p-591918a4.entry.js +1 -0
- package/dist/ripple/p-5ea5c0e6.system.entry.js +1 -0
- package/dist/ripple/p-5ef5081f.entry.js +1 -0
- package/dist/ripple/{p-bee8ab6e.entry.js → p-624a2812.entry.js} +1 -1
- package/dist/ripple/p-62a8f09c.entry.js +1 -0
- package/dist/ripple/{p-043901ab.system.entry.js → p-65d26233.system.entry.js} +1 -1
- package/dist/ripple/p-75ba63ba.entry.js +1 -0
- package/dist/ripple/{p-ac40417b.system.entry.js → p-79106e23.system.entry.js} +1 -1
- package/dist/ripple/p-7e6f5a1e.system.entry.js +1 -0
- package/dist/ripple/p-8029af07.system.entry.js +1 -0
- package/dist/ripple/{p-8e72de50.entry.js → p-8159cdf5.entry.js} +1 -1
- package/dist/ripple/p-822618d7.entry.js +1 -0
- package/dist/ripple/p-86d655fb.system.entry.js +1 -0
- package/dist/ripple/p-884294c6.entry.js +1 -0
- package/dist/ripple/{p-cd0cc88d.entry.js → p-88ebddd7.entry.js} +1 -1
- package/dist/ripple/p-8fbddb6c.system.entry.js +1 -0
- package/dist/ripple/p-902a54c5.entry.js +1 -0
- package/dist/ripple/p-905dd4da.system.entry.js +1 -0
- package/dist/ripple/{p-aab56a37.system.entry.js → p-a152cf3a.system.entry.js} +1 -1
- package/dist/ripple/{p-468a0218.entry.js → p-a37cf34a.entry.js} +1 -1
- package/dist/ripple/p-a8524a48.entry.js +1 -0
- package/dist/ripple/p-ab8d78cc.system.js +2 -0
- package/dist/ripple/{p-6fe35d1e.system.entry.js → p-b7ead395.system.entry.js} +1 -1
- package/dist/ripple/p-bc5e9d24.entry.js +1 -0
- package/dist/ripple/p-c4b9d46d.entry.js +1 -0
- package/dist/ripple/p-c885c7f9.entry.js +1 -0
- package/dist/ripple/p-c91b10f3.system.entry.js +1 -0
- package/dist/ripple/p-c9543950.system.entry.js +1 -0
- package/dist/ripple/p-cacfbaf1.system.entry.js +1 -0
- package/dist/ripple/{p-2e3728f1.entry.js → p-cc4a429b.entry.js} +1 -1
- package/dist/ripple/p-ce9a8bd1.entry.js +1 -0
- package/dist/ripple/p-d24882a7.system.entry.js +1 -0
- package/dist/ripple/p-d33d6e96.system.entry.js +1 -0
- package/dist/ripple/{p-777b8ebc.system.js → p-d4b209ec.system.js} +1 -1
- package/dist/ripple/p-d6ce9a49.system.js +1 -0
- package/dist/ripple/{p-f54e9ed0.js → p-d79fdf0b.js} +1 -1
- package/dist/ripple/{p-fcf76854.js → p-d837c1f5.js} +1 -1
- package/dist/ripple/{p-d93c51dd.system.entry.js → p-df1a11f1.system.entry.js} +1 -1
- package/dist/ripple/p-df2560f3.system.entry.js +1 -0
- package/dist/ripple/p-dfa61ff5.entry.js +1 -0
- package/dist/ripple/p-e3bcdde8.system.entry.js +1 -0
- package/dist/ripple/{p-ca35a8b7.system.entry.js → p-e7a64841.system.entry.js} +1 -1
- package/dist/ripple/p-e83a98d3.entry.js +1 -0
- package/dist/ripple/p-e995f7f0.js +1 -0
- package/dist/ripple/p-e9b9c587.js +1 -0
- package/dist/ripple/p-eaac6bcd.entry.js +1 -0
- package/dist/ripple/p-f42c3b8c.system.js +1 -0
- package/dist/ripple/p-f67fd802.system.entry.js +1 -0
- package/dist/ripple/p-fe8d02c3.system.entry.js +1 -0
- package/dist/ripple/{p-b0c566b5.system.entry.js → p-ffb31979.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +1 -2
- package/dist/types/stencil-public-runtime.d.ts +10 -3
- package/package.json +1 -1
- package/dist/cjs/index-788526f5.js +0 -1851
- package/dist/esm/index-130e07bb.js +0 -1820
- package/dist/esm-es5/app-globals-51ea1005.js +0 -1
- package/dist/esm-es5/functions-25781571.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/ripple/p-060ba991.entry.js +0 -1
- package/dist/ripple/p-0abc9300.entry.js +0 -1
- package/dist/ripple/p-0af94825.entry.js +0 -1
- package/dist/ripple/p-0ff41567.system.entry.js +0 -1
- package/dist/ripple/p-13fc2164.entry.js +0 -1
- package/dist/ripple/p-155224a2.system.entry.js +0 -1
- package/dist/ripple/p-1f09134c.entry.js +0 -1
- package/dist/ripple/p-298c2675.entry.js +0 -1
- package/dist/ripple/p-31781d88.system.entry.js +0 -1
- package/dist/ripple/p-31d7ecf9.system.entry.js +0 -1
- package/dist/ripple/p-341ebafa.entry.js +0 -1
- package/dist/ripple/p-35f209d9.system.entry.js +0 -1
- package/dist/ripple/p-376efca9.entry.js +0 -1
- package/dist/ripple/p-3b5f4364.system.entry.js +0 -1
- package/dist/ripple/p-418ed08c.system.entry.js +0 -1
- package/dist/ripple/p-4670ccb4.system.js +0 -1
- package/dist/ripple/p-488e1690.entry.js +0 -1
- package/dist/ripple/p-4b7a444c.system.entry.js +0 -1
- package/dist/ripple/p-4baaf026.entry.js +0 -1
- package/dist/ripple/p-56766bb2.entry.js +0 -1
- package/dist/ripple/p-5caaf651.system.entry.js +0 -1
- package/dist/ripple/p-5ece78e5.system.entry.js +0 -1
- package/dist/ripple/p-691ecf14.entry.js +0 -1
- package/dist/ripple/p-6d0e5159.system.entry.js +0 -1
- package/dist/ripple/p-6d56676e.system.entry.js +0 -1
- package/dist/ripple/p-7eab6bea.system.entry.js +0 -1
- package/dist/ripple/p-7fb95b89.entry.js +0 -1
- package/dist/ripple/p-85cbeb7d.system.entry.js +0 -1
- package/dist/ripple/p-88cfd58d.js +0 -1
- package/dist/ripple/p-8d075bcf.system.entry.js +0 -1
- package/dist/ripple/p-93fca187.entry.js +0 -1
- package/dist/ripple/p-a3d6be99.system.entry.js +0 -1
- package/dist/ripple/p-a62e7532.entry.js +0 -1
- package/dist/ripple/p-a6466dbd.system.js +0 -1
- package/dist/ripple/p-ad4529d2.entry.js +0 -1
- package/dist/ripple/p-b7307be6.system.entry.js +0 -1
- package/dist/ripple/p-c1f2092e.js +0 -1
- package/dist/ripple/p-c2181de0.entry.js +0 -1
- package/dist/ripple/p-ca76dc92.entry.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d5ba9de1.system.entry.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-db10990a.entry.js +0 -1
- package/dist/ripple/p-e2fe86a7.system.entry.js +0 -1
- package/dist/ripple/p-e85b1f40.entry.js +0 -1
- package/dist/ripple/p-ea0dfadf.system.entry.js +0 -1
- package/dist/ripple/p-eb14b354.entry.js +0 -1
- package/dist/ripple/p-ef886cd4.system.js +0 -1
- package/dist/ripple/p-f17fd62b.entry.js +0 -1
- package/dist/ripple/p-fabe4ca4.entry.js +0 -1
- package/dist/ripple/p-fbaae34d.system.entry.js +0 -1
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +0 -77
- package/dist/types/components/datepickers/wm-date-range.d.ts +0 -73
|
@@ -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
|
+
});
|
|
@@ -149,7 +149,7 @@ export class Chart {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
render() {
|
|
152
|
-
return (h(Host, {
|
|
152
|
+
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()));
|
|
153
153
|
}
|
|
154
154
|
static get is() { return "wm-chart"; }
|
|
155
155
|
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
|
+
});
|
|
@@ -12,12 +12,12 @@ export class LineChart {
|
|
|
12
12
|
this.displayedXIntervals = [];
|
|
13
13
|
this.yIntervals = [];
|
|
14
14
|
this.lineStyles = [
|
|
15
|
-
{ color: "#8b86ca", icon: "f536" },
|
|
16
|
-
{ color: "#2e1b46", icon: "f12f" },
|
|
17
|
-
{ color: "#0089e4", icon: "f763" },
|
|
18
|
-
{ color: "#088000", icon: "f4ce" },
|
|
19
|
-
{ color: "#ea8500", icon: "f70a" },
|
|
20
|
-
{ color: "#d54f41", icon: "f536" },
|
|
15
|
+
{ color: "#8b86ca", icon: "f536" },
|
|
16
|
+
{ color: "#2e1b46", icon: "f12f" },
|
|
17
|
+
{ color: "#0089e4", icon: "f763" },
|
|
18
|
+
{ color: "#088000", icon: "f4ce" },
|
|
19
|
+
{ color: "#ea8500", icon: "f70a" },
|
|
20
|
+
{ color: "#d54f41", icon: "f536" },
|
|
21
21
|
{ color: "#146ca9", icon: "f6ff" }, // blue, upside down triangle
|
|
22
22
|
];
|
|
23
23
|
this.debouncedResize = debounce(async () => {
|
|
@@ -413,7 +413,7 @@ export class LineChart {
|
|
|
413
413
|
popoverStyle = {
|
|
414
414
|
"--leftPosition": `0%`,
|
|
415
415
|
"--topPosition": "0%",
|
|
416
|
-
maxWidth: Math.min(this.el.clientWidth - 2, 400) + "px",
|
|
416
|
+
maxWidth: Math.min(this.el.clientWidth - 2, 400) + "px",
|
|
417
417
|
transform: `translateX(calc(${displaceLeft}))`, // align with left edge of component
|
|
418
418
|
};
|
|
419
419
|
}
|
|
@@ -453,9 +453,9 @@ export class LineChart {
|
|
|
453
453
|
return h("div", { class: "highlight", style: highlightStyle });
|
|
454
454
|
}
|
|
455
455
|
render() {
|
|
456
|
-
return (h(Host, {
|
|
456
|
+
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: {
|
|
457
457
|
"--backgroundSize": `${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`,
|
|
458
|
-
} }, this.highlightStart && this.renderHighlight(), this.renderData(), this.renderHoverAreas()), this.popoverIndex !== -1 && this.renderHoverIndicator(), this.popoverIndex !== -1 && this.renderPopover(), this.renderXIntervals(), h("div", {
|
|
458
|
+
} }, 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))));
|
|
459
459
|
}
|
|
460
460
|
static get is() { return "wm-line-chart"; }
|
|
461
461
|
static get encapsulation() { return "shadow"; }
|