@watermarkinsights/ripple 5.11.0-1 → 5.11.0-10
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-a3a08880.js → chartFunctions-b47a5431.js} +12 -9
- package/dist/cjs/{functions-5ac8a62f.js → functions-e24249e6.js} +7 -104
- package/dist/{esm/app-globals-ca017e0d.js → cjs/global-775ad4b5.js} +2 -7
- package/dist/cjs/index-e86c28b6.js +2649 -0
- package/dist/cjs/{intl-07aaf53c.js → intl-a70cf8c2.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/priv-calendar.cjs.entry.js +12 -13
- package/dist/cjs/priv-chart-popover.cjs.entry.js +6 -7
- package/dist/cjs/priv-navigator-button.cjs.entry.js +4 -5
- package/dist/cjs/priv-navigator-item.cjs.entry.js +4 -5
- package/dist/cjs/priv-option-list.cjs.entry.js +7 -8
- package/dist/cjs/ripple.cjs.js +11 -12
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +8 -10
- package/dist/cjs/wm-button.cjs.entry.js +5 -6
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +7 -8
- package/dist/cjs/wm-date-range.cjs.entry.js +9 -10
- package/dist/cjs/wm-datepicker.cjs.entry.js +9 -10
- package/dist/cjs/wm-file-list.cjs.entry.js +4 -5
- package/dist/cjs/wm-file.cjs.entry.js +12 -13
- package/dist/cjs/wm-input.cjs.entry.js +6 -7
- package/dist/cjs/wm-line-chart.cjs.entry.js +20 -28
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +13 -16
- package/dist/cjs/wm-modal_3.cjs.entry.js +13 -16
- package/dist/cjs/wm-navigation_3.cjs.entry.js +13 -16
- package/dist/cjs/wm-navigator.cjs.entry.js +4 -5
- package/dist/cjs/wm-nested-select.cjs.entry.js +11 -12
- package/dist/cjs/wm-optgroup.cjs.entry.js +5 -6
- package/dist/cjs/wm-option_2.cjs.entry.js +11 -13
- package/dist/cjs/wm-pagination.cjs.entry.js +5 -6
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +10 -12
- package/dist/cjs/wm-search.cjs.entry.js +9 -10
- package/dist/cjs/wm-snackbar.cjs.entry.js +8 -9
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +11 -14
- package/dist/cjs/wm-tag-input.cjs.entry.js +10 -11
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +6 -7
- package/dist/cjs/wm-timepicker.cjs.entry.js +6 -7
- package/dist/cjs/wm-toggletip.cjs.entry.js +8 -8
- package/dist/cjs/wm-uploader.cjs.entry.js +7 -8
- 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 +10 -7
- package/dist/collection/components/charts/chartFunctions.spec.js +16 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +570 -13
- 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 +3 -3
- package/dist/collection/components/charts/screenshots.e2e.js +96 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.css +622 -65
- 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.css +599 -68
- 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 -21
- 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.css +622 -65
- 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.css +583 -26
- 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 +2 -2
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +79 -0
- package/dist/collection/components/datepickers/datepicker.css +588 -25
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +587 -51
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +8 -8
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +89 -0
- package/dist/collection/components/datepickers/wm-date-range.e2e.js +443 -0
- package/dist/collection/components/datepickers/wm-date-range.js +13 -17
- package/dist/collection/components/datepickers/wm-date-range.spec.js +22 -0
- package/dist/collection/components/datepickers/wm-datepicker.e2e.js +382 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +13 -17
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +576 -36
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +7 -9
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +596 -64
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +6 -6
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +570 -13
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +1 -1
- package/dist/collection/components/selects/wm-option/wm-option.css +577 -30
- 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.css +590 -40
- package/dist/collection/components/selects/wm-select/wm-select.e2e.js +521 -0
- package/dist/collection/components/selects/wm-select/wm-select.js +3 -3
- package/dist/collection/components/selects/wm-select/wm-select.spec.js +271 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +575 -18
- 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.css +584 -51
- 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.css +573 -25
- package/dist/collection/components/wm-file/wm-file.js +8 -8
- package/dist/collection/components/wm-file/wm-file.spec.js +194 -0
- package/dist/collection/components/wm-file-list/wm-file-list.css +577 -20
- 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.css +587 -25
- 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.css +579 -18
- 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 +577 -20
- 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 +577 -20
- 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 +570 -13
- 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.css +570 -13
- 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.css +577 -20
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +1 -1
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +570 -13
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +575 -24
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.css +570 -13
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.css +570 -13
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +102 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +3 -3
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +91 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +570 -13
- 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.css +576 -19
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-navigator/wm-navigator.css +575 -18
- 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.css +575 -18
- 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.css +573 -23
- package/dist/collection/components/wm-search/wm-search.e2e.js +76 -0
- package/dist/collection/components/wm-search/wm-search.js +6 -7
- package/dist/collection/components/wm-search/wm-search.spec.js +71 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +577 -34
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +112 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +3 -3
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +9 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +570 -13
- 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.css +576 -19
- 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.css +570 -13
- 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.css +623 -86
- 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 +5 -5
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +195 -0
- package/dist/collection/components/wm-textarea/wm-textarea.css +587 -25
- 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.css +589 -37
- 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 +573 -23
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +69 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +4 -3
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +21 -0
- package/dist/collection/components/wm-uploader/wm-uploader.css +599 -61
- 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-21d5a3d3.js → chartFunctions-d2ecde7f.js} +12 -9
- package/dist/esm/{functions-f39e6177.js → functions-8800c690.js} +8 -105
- package/dist/{cjs/app-globals-5e46c5dd.js → esm/global-3e567d74.js} +1 -10
- package/dist/esm/index-558b5a82.js +2618 -0
- package/dist/esm/{intl-a0ebf99e.js → intl-cf443c87.js} +1 -1
- package/dist/esm/loader.js +4 -5
- package/dist/esm/priv-calendar.entry.js +12 -13
- package/dist/esm/priv-chart-popover.entry.js +6 -7
- package/dist/esm/priv-navigator-button.entry.js +4 -5
- package/dist/esm/priv-navigator-item.entry.js +4 -5
- package/dist/esm/priv-option-list.entry.js +7 -8
- package/dist/esm/ripple.js +12 -13
- package/dist/esm/wm-action-menu_2.entry.js +8 -10
- package/dist/esm/wm-button.entry.js +5 -6
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +7 -8
- package/dist/esm/wm-date-range.entry.js +9 -10
- package/dist/esm/wm-datepicker.entry.js +9 -10
- package/dist/esm/wm-file-list.entry.js +4 -5
- package/dist/esm/wm-file.entry.js +12 -13
- package/dist/esm/wm-input.entry.js +6 -7
- package/dist/esm/wm-line-chart.entry.js +20 -28
- package/dist/esm/wm-modal-pss_3.entry.js +13 -16
- package/dist/esm/wm-modal_3.entry.js +13 -16
- package/dist/esm/wm-navigation_3.entry.js +13 -16
- package/dist/esm/wm-navigator.entry.js +4 -5
- package/dist/esm/wm-nested-select.entry.js +11 -12
- package/dist/esm/wm-optgroup.entry.js +5 -6
- package/dist/esm/wm-option_2.entry.js +11 -13
- package/dist/esm/wm-pagination.entry.js +5 -6
- package/dist/esm/wm-progress-indicator_3.entry.js +10 -12
- package/dist/esm/wm-search.entry.js +9 -10
- package/dist/esm/wm-snackbar.entry.js +8 -9
- package/dist/esm/wm-tab-item_3.entry.js +11 -14
- package/dist/esm/wm-tag-input.entry.js +10 -11
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +6 -7
- package/dist/esm/wm-timepicker.entry.js +6 -7
- package/dist/esm/wm-toggletip.entry.js +8 -8
- package/dist/esm/wm-uploader.entry.js +7 -8
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/chartFunctions-d2ecde7f.js +1 -0
- package/dist/esm-es5/functions-8800c690.js +1 -0
- package/dist/esm-es5/global-3e567d74.js +1 -0
- package/dist/esm-es5/index-558b5a82.js +1 -0
- package/dist/esm-es5/{intl-a0ebf99e.js → intl-cf443c87.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/priv-option-list.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-pss_3.entry.js +1 -1
- package/dist/esm-es5/wm-modal_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-nested-select.entry.js +1 -1
- package/dist/esm-es5/wm-optgroup.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/cdn.js +2 -1
- package/dist/loader/index.cjs.js +2 -1
- package/dist/loader/index.d.ts +0 -3
- package/dist/loader/index.es2017.js +2 -1
- package/dist/loader/index.js +2 -1
- package/dist/ripple/p-0ba2e506.system.entry.js +1 -0
- package/dist/ripple/p-0e36d5b8.system.entry.js +1 -0
- package/dist/ripple/p-13010619.system.entry.js +1 -0
- package/dist/ripple/p-159c4e96.entry.js +1 -0
- package/dist/ripple/p-1a4b6b02.system.entry.js +1 -0
- package/dist/ripple/p-1a71d867.system.entry.js +1 -0
- package/dist/ripple/p-1fce9f27.entry.js +1 -0
- package/dist/ripple/p-2b21c6f5.system.entry.js +1 -0
- package/dist/ripple/p-31fdac9d.system.entry.js +1 -0
- package/dist/ripple/p-32507c13.system.entry.js +1 -0
- package/dist/ripple/{p-823d7b4e.system.entry.js → p-32bf3f5b.system.entry.js} +1 -1
- package/dist/ripple/{p-bb25b9af.system.js → p-3322823d.system.js} +1 -1
- package/dist/ripple/p-366920dc.js +1 -0
- package/dist/ripple/p-39e26322.entry.js +1 -0
- package/dist/ripple/p-44f426ad.entry.js +1 -0
- package/dist/ripple/p-46c1e078.entry.js +1 -0
- package/dist/ripple/{p-c34c9cbb.system.entry.js → p-4743176d.system.entry.js} +1 -1
- package/dist/ripple/{p-13b1d775.entry.js → p-48e09589.entry.js} +1 -1
- package/dist/ripple/p-4b775dae.entry.js +1 -0
- package/dist/ripple/p-4de728e1.entry.js +1 -0
- package/dist/ripple/p-4e052cb2.system.js +1 -0
- package/dist/ripple/p-4ff87702.system.entry.js +1 -0
- package/dist/ripple/p-5415aaf9.system.entry.js +1 -0
- package/dist/ripple/p-544925c2.entry.js +1 -0
- package/dist/ripple/p-568c595f.js +2 -0
- package/dist/ripple/p-58668e84.system.entry.js +1 -0
- package/dist/ripple/p-5e9c9f0d.entry.js +1 -0
- package/dist/ripple/p-5fbac7de.entry.js +1 -0
- package/dist/ripple/p-608f69c1.system.entry.js +1 -0
- package/dist/ripple/p-64b1e73b.entry.js +1 -0
- package/dist/ripple/{p-043901ab.system.entry.js → p-65d26233.system.entry.js} +1 -1
- package/dist/ripple/p-687dd465.system.entry.js +1 -0
- package/dist/ripple/p-68e04222.entry.js +1 -0
- package/dist/ripple/p-6abe043f.system.entry.js +1 -0
- package/dist/ripple/p-6ed60300.system.entry.js +1 -0
- package/dist/ripple/p-704be1e8.system.entry.js +1 -0
- package/dist/ripple/{p-9708c995.js → p-710c6115.js} +1 -1
- package/dist/ripple/p-7478303e.entry.js +1 -0
- package/dist/ripple/p-79043436.entry.js +1 -0
- package/dist/ripple/p-797d65b7.entry.js +1 -0
- package/dist/ripple/p-7cf5993c.system.entry.js +1 -0
- package/dist/ripple/p-878fd4af.system.entry.js +1 -0
- package/dist/ripple/{p-cd0cc88d.entry.js → p-88ebddd7.entry.js} +1 -1
- package/dist/ripple/p-8bf0b22f.system.entry.js +1 -0
- package/dist/ripple/p-8d72d140.entry.js +1 -0
- package/dist/ripple/p-94495341.entry.js +1 -0
- package/dist/ripple/p-94717864.entry.js +1 -0
- package/dist/ripple/p-95ec6a70.js +1 -0
- package/dist/ripple/p-9d461de5.entry.js +1 -0
- package/dist/ripple/p-9de8a17f.system.js +1 -0
- package/dist/ripple/p-9eaa0acb.system.entry.js +1 -0
- package/dist/ripple/p-9faac169.entry.js +1 -0
- package/dist/ripple/p-a04ef164.system.entry.js +1 -0
- package/dist/ripple/p-a69425b0.entry.js +1 -0
- package/dist/ripple/p-a84c22bb.entry.js +1 -0
- package/dist/ripple/p-ab8d78cc.system.js +2 -0
- package/dist/ripple/p-ac296ab2.system.entry.js +1 -0
- package/dist/ripple/p-adc254e6.entry.js +1 -0
- package/dist/ripple/p-b02048a9.entry.js +1 -0
- package/dist/ripple/p-b3127fb5.system.entry.js +1 -0
- package/dist/ripple/{p-76d248e6.entry.js → p-b976c84b.entry.js} +1 -1
- package/dist/ripple/p-bc2aa476.entry.js +1 -0
- package/dist/ripple/p-bfc1065f.system.entry.js +1 -0
- package/dist/ripple/p-c7e30eb0.system.entry.js +1 -0
- package/dist/ripple/p-cac59220.entry.js +1 -0
- package/dist/ripple/p-ce44ba70.entry.js +1 -0
- package/dist/ripple/p-d57e8196.entry.js +1 -0
- package/dist/ripple/p-d88e7201.entry.js +1 -0
- package/dist/ripple/p-dc77d98a.entry.js +1 -0
- package/dist/ripple/p-ddcbb694.system.entry.js +1 -0
- package/dist/ripple/p-de272ae7.system.entry.js +1 -0
- package/dist/ripple/p-e2c6052b.system.entry.js +1 -0
- package/dist/ripple/p-e3da1dad.system.entry.js +1 -0
- package/dist/ripple/p-e71ee9f4.system.js +1 -0
- package/dist/ripple/p-e874575d.entry.js +1 -0
- package/dist/ripple/p-eca78c2b.js +1 -0
- package/dist/ripple/p-edd87140.system.js +1 -0
- package/dist/ripple/p-f6eff655.system.entry.js +1 -0
- package/dist/ripple/p-f779ec68.system.entry.js +1 -0
- package/dist/ripple/ripple.css +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/global/interfaces.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +10 -3
- package/package.json +1 -1
- package/dist/cjs/index-788526f5.js +0 -1859
- package/dist/esm/index-130e07bb.js +0 -1828
- package/dist/esm-es5/app-globals-ca017e0d.js +0 -1
- package/dist/esm-es5/chartFunctions-21d5a3d3.js +0 -1
- package/dist/esm-es5/functions-f39e6177.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/ripple/p-0335da82.entry.js +0 -1
- package/dist/ripple/p-044cbd11.system.entry.js +0 -1
- package/dist/ripple/p-07087139.system.entry.js +0 -1
- package/dist/ripple/p-0bffed17.entry.js +0 -1
- package/dist/ripple/p-0d77c2f2.system.entry.js +0 -1
- package/dist/ripple/p-1c9e0cae.system.entry.js +0 -1
- package/dist/ripple/p-2686e38f.entry.js +0 -1
- package/dist/ripple/p-26c0304e.entry.js +0 -1
- package/dist/ripple/p-2e1f1f9e.entry.js +0 -1
- package/dist/ripple/p-2f07262e.entry.js +0 -1
- package/dist/ripple/p-3405e16e.entry.js +0 -1
- package/dist/ripple/p-342e6ba1.system.entry.js +0 -1
- package/dist/ripple/p-36fa8451.entry.js +0 -1
- package/dist/ripple/p-37b044c7.system.js +0 -1
- package/dist/ripple/p-3e144fc5.system.js +0 -1
- package/dist/ripple/p-3f486eed.system.js +0 -1
- package/dist/ripple/p-44b7ac3f.system.entry.js +0 -1
- package/dist/ripple/p-46979d51.entry.js +0 -1
- package/dist/ripple/p-4b0989d7.entry.js +0 -1
- package/dist/ripple/p-4ffed2a0.system.entry.js +0 -1
- package/dist/ripple/p-540dc07f.entry.js +0 -1
- package/dist/ripple/p-56d7d853.entry.js +0 -1
- package/dist/ripple/p-585d603f.entry.js +0 -1
- package/dist/ripple/p-5a05046a.system.entry.js +0 -1
- package/dist/ripple/p-5c2fc698.entry.js +0 -1
- package/dist/ripple/p-5f247e4a.entry.js +0 -1
- package/dist/ripple/p-65d2c6b7.entry.js +0 -1
- package/dist/ripple/p-6b119eec.system.entry.js +0 -1
- package/dist/ripple/p-6c1553b1.system.entry.js +0 -1
- package/dist/ripple/p-6c716f1c.system.entry.js +0 -1
- package/dist/ripple/p-721c785a.system.entry.js +0 -1
- package/dist/ripple/p-72935ed4.entry.js +0 -1
- package/dist/ripple/p-7718d572.system.entry.js +0 -1
- package/dist/ripple/p-79b5df24.entry.js +0 -1
- package/dist/ripple/p-7dec8712.system.entry.js +0 -1
- package/dist/ripple/p-8270cd9e.system.entry.js +0 -1
- package/dist/ripple/p-88e4a846.js +0 -1
- package/dist/ripple/p-89a2db02.js +0 -1
- package/dist/ripple/p-8acb1dc0.entry.js +0 -1
- package/dist/ripple/p-8b983e94.system.entry.js +0 -1
- package/dist/ripple/p-9160d382.system.entry.js +0 -1
- package/dist/ripple/p-91fc6acf.system.entry.js +0 -1
- package/dist/ripple/p-945d47d1.system.js +0 -1
- package/dist/ripple/p-97c524e5.system.entry.js +0 -1
- package/dist/ripple/p-a173bac6.system.entry.js +0 -1
- package/dist/ripple/p-a89a0ce4.system.entry.js +0 -1
- package/dist/ripple/p-a96fd05a.entry.js +0 -1
- package/dist/ripple/p-aaa18797.entry.js +0 -1
- package/dist/ripple/p-aab342f1.entry.js +0 -1
- package/dist/ripple/p-aae83494.system.entry.js +0 -1
- package/dist/ripple/p-ade89f97.system.entry.js +0 -1
- package/dist/ripple/p-b02dfe01.system.entry.js +0 -1
- package/dist/ripple/p-b8912fba.system.entry.js +0 -1
- package/dist/ripple/p-c22b9ac6.entry.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d19f494d.system.entry.js +0 -1
- package/dist/ripple/p-d3ffe48c.system.entry.js +0 -1
- package/dist/ripple/p-d49cd886.entry.js +0 -1
- package/dist/ripple/p-d7ce58a3.entry.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-e3083b58.entry.js +0 -1
- package/dist/ripple/p-e8023928.system.entry.js +0 -1
- package/dist/ripple/p-eb832c89.entry.js +0 -1
- package/dist/ripple/p-ecd38ef7.entry.js +0 -1
- package/dist/ripple/p-ee307bf6.entry.js +0 -1
- package/dist/ripple/p-f1abfaa1.entry.js +0 -1
- package/dist/ripple/p-f41ab9ea.js +0 -1
- package/dist/ripple/p-f4ed6ee8.system.entry.js +0 -1
- package/dist/ripple/p-f9222794.system.entry.js +0 -1
- package/dist/ripple/p-fd862f4e.system.entry.js +0 -1
- package/dist/ripple/p-fec7ea2d.entry.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
|
+
});
|
|
@@ -138,7 +138,7 @@ export class Chart {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
render() {
|
|
141
|
-
return (h(Host, {
|
|
141
|
+
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
142
|
}
|
|
143
143
|
static get is() { return "wm-chart"; }
|
|
144
144
|
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
|
+
});
|