@watermarkinsights/ripple 5.10.0-9 → 5.11.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{esm/global-af0a58b2.js → cjs/app-globals-ae02016c.js} +11 -2
- package/dist/cjs/{chartFunctions-995023b1.js → chartFunctions-a3a08880.js} +13 -7
- package/dist/cjs/{functions-e24249e6.js → functions-5ac8a62f.js} +104 -7
- package/dist/cjs/index-788526f5.js +1859 -0
- package/dist/cjs/{intl-5aeba788.js → intl-07aaf53c.js} +16 -15
- package/dist/cjs/loader.cjs.js +5 -4
- package/dist/cjs/priv-calendar.cjs.entry.js +7 -6
- package/dist/cjs/priv-chart-popover.cjs.entry.js +7 -6
- package/dist/cjs/priv-navigator-button.cjs.entry.js +5 -4
- package/dist/cjs/priv-navigator-item.cjs.entry.js +5 -4
- package/dist/cjs/priv-option-list.cjs.entry.js +6 -5
- package/dist/cjs/ripple.cjs.js +13 -12
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +10 -8
- package/dist/cjs/wm-button.cjs.entry.js +6 -5
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +8 -7
- package/dist/cjs/wm-date-range.cjs.entry.js +10 -9
- package/dist/cjs/wm-datepicker.cjs.entry.js +10 -9
- package/dist/cjs/wm-file-list.cjs.entry.js +5 -4
- package/dist/cjs/wm-file.cjs.entry.js +14 -10
- package/dist/cjs/wm-input.cjs.entry.js +7 -6
- package/dist/cjs/wm-line-chart.cjs.entry.js +16 -15
- package/dist/cjs/wm-modal-pss_3.cjs.entry.js +16 -13
- package/dist/cjs/wm-modal_3.cjs.entry.js +16 -13
- package/dist/cjs/wm-navigation_3.cjs.entry.js +16 -13
- package/dist/cjs/wm-navigator.cjs.entry.js +5 -4
- package/dist/cjs/wm-nested-select.cjs.entry.js +9 -8
- package/dist/cjs/wm-optgroup.cjs.entry.js +6 -5
- package/dist/cjs/wm-option_2.cjs.entry.js +12 -10
- package/dist/cjs/wm-pagination.cjs.entry.js +6 -5
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +17 -10
- package/dist/cjs/wm-search.cjs.entry.js +8 -7
- package/dist/cjs/wm-snackbar.cjs.entry.js +8 -7
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +14 -11
- package/dist/cjs/wm-tag-input.cjs.entry.js +9 -8
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +7 -6
- package/dist/cjs/wm-timepicker.cjs.entry.js +7 -6
- package/dist/cjs/wm-toggletip.cjs.entry.js +7 -6
- package/dist/cjs/wm-uploader.cjs.entry.js +113 -19
- 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 +11 -5
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.css +193 -1
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
- package/dist/collection/components/charts/wm-chart/wm-chart.css +196 -5
- package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.css +193 -1
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.css +196 -5
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +7 -2
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.css +193 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
- package/dist/collection/components/datepickers/datepicker.css +193 -1
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +193 -1
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
- package/dist/collection/components/datepickers/wm-date-range.js +17 -13
- package/dist/collection/components/datepickers/wm-datepicker.js +17 -13
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +193 -1
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +7 -5
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +193 -1
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +3 -3
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +193 -1
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +1 -1
- package/dist/collection/components/selects/wm-option/wm-option.css +193 -1
- package/dist/collection/components/selects/wm-option/wm-option.js +1 -1
- package/dist/collection/components/selects/wm-select/wm-select.css +193 -1
- package/dist/collection/components/selects/wm-select/wm-select.js +2 -2
- package/dist/collection/components/wm-action-menu/wm-action-menu.css +193 -1
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-button/wm-button.css +194 -2
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-file/wm-file.css +202 -7
- package/dist/collection/components/wm-file/wm-file.js +11 -8
- package/dist/collection/components/wm-file-list/wm-file-list.css +194 -1
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
- package/dist/collection/components/wm-input/wm-input.css +193 -1
- package/dist/collection/components/wm-input/wm-input.js +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.css +193 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.css +193 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.css +193 -1
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal.css +193 -1
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-footer.css +193 -1
- 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 +193 -1
- package/dist/collection/components/wm-modal-pss/wm-modal-pss-header.js +1 -1
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.css +193 -1
- package/dist/collection/components/wm-modal-pss/wm-modal-pss.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.css +193 -1
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.css +193 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.css +193 -1
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.css +193 -1
- 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 +193 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-navigator/wm-navigator.css +193 -1
- package/dist/collection/components/wm-pagination/wm-pagination.css +193 -1
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.css +193 -1
- package/dist/collection/components/wm-search/wm-search.js +5 -4
- package/dist/collection/components/wm-snackbar/wm-snackbar.css +193 -1
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.css +193 -1
- 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 +193 -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.css +193 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
- package/dist/collection/components/wm-tag-input/wm-tag-input.css +193 -1
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
- package/dist/collection/components/wm-textarea/wm-textarea.css +193 -1
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-timepicker/wm-timepicker.css +193 -1
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +11 -8
- package/dist/collection/components/wm-toggletip/wm-toggletip.css +193 -1
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.css +373 -19
- package/dist/collection/components/wm-uploader/wm-uploader.js +168 -14
- package/dist/collection/global/global.js +1 -1
- package/dist/collection/global/intl.js +15 -14
- package/dist/{cjs/global-58d83ea2.js → esm/app-globals-17b41ab8.js} +8 -3
- package/dist/esm/{chartFunctions-34f19953.js → chartFunctions-21d5a3d3.js} +13 -7
- package/dist/esm/{functions-8800c690.js → functions-f39e6177.js} +105 -8
- package/dist/esm/index-130e07bb.js +1828 -0
- package/dist/esm/{intl-b110ca8d.js → intl-a0ebf99e.js} +16 -15
- package/dist/esm/loader.js +6 -5
- package/dist/esm/priv-calendar.entry.js +7 -6
- package/dist/esm/priv-chart-popover.entry.js +7 -6
- package/dist/esm/priv-navigator-button.entry.js +5 -4
- package/dist/esm/priv-navigator-item.entry.js +5 -4
- package/dist/esm/priv-option-list.entry.js +6 -5
- package/dist/esm/ripple.js +14 -13
- package/dist/esm/wm-action-menu_2.entry.js +10 -8
- package/dist/esm/wm-button.entry.js +6 -5
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +8 -7
- package/dist/esm/wm-date-range.entry.js +10 -9
- package/dist/esm/wm-datepicker.entry.js +10 -9
- package/dist/esm/wm-file-list.entry.js +5 -4
- package/dist/esm/wm-file.entry.js +14 -10
- package/dist/esm/wm-input.entry.js +7 -6
- package/dist/esm/wm-line-chart.entry.js +16 -15
- package/dist/esm/wm-modal-pss_3.entry.js +16 -13
- package/dist/esm/wm-modal_3.entry.js +16 -13
- package/dist/esm/wm-navigation_3.entry.js +16 -13
- package/dist/esm/wm-navigator.entry.js +5 -4
- package/dist/esm/wm-nested-select.entry.js +9 -8
- package/dist/esm/wm-optgroup.entry.js +6 -5
- package/dist/esm/wm-option_2.entry.js +12 -10
- package/dist/esm/wm-pagination.entry.js +6 -5
- package/dist/esm/wm-progress-indicator_3.entry.js +17 -10
- package/dist/esm/wm-search.entry.js +8 -7
- package/dist/esm/wm-snackbar.entry.js +8 -7
- package/dist/esm/wm-tab-item_3.entry.js +14 -11
- package/dist/esm/wm-tag-input.entry.js +9 -8
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +7 -6
- package/dist/esm/wm-timepicker.entry.js +7 -6
- package/dist/esm/wm-toggletip.entry.js +7 -6
- package/dist/esm/wm-uploader.entry.js +113 -19
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/app-globals-17b41ab8.js +1 -0
- package/dist/esm-es5/chartFunctions-21d5a3d3.js +1 -0
- package/dist/esm-es5/functions-f39e6177.js +1 -0
- package/dist/esm-es5/index-130e07bb.js +1 -0
- package/dist/esm-es5/{intl-b110ca8d.js → intl-a0ebf99e.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 +1 -2
- package/dist/loader/index.cjs.js +1 -2
- package/dist/loader/index.d.ts +3 -0
- package/dist/loader/index.es2017.js +1 -2
- package/dist/loader/index.js +1 -2
- package/dist/ripple/p-0335da82.entry.js +1 -0
- package/dist/ripple/p-035bb5e7.entry.js +1 -0
- package/dist/ripple/{p-65d26233.system.entry.js → p-043901ab.system.entry.js} +1 -1
- package/dist/ripple/p-044cbd11.system.entry.js +1 -0
- package/dist/ripple/p-069ec9d0.system.entry.js +1 -0
- package/dist/ripple/p-07087139.system.entry.js +1 -0
- package/dist/ripple/p-0bffed17.entry.js +1 -0
- package/dist/ripple/p-0d77c2f2.system.entry.js +1 -0
- package/dist/ripple/p-0e1d1d0e.entry.js +1 -0
- package/dist/ripple/{p-48e09589.entry.js → p-13b1d775.entry.js} +1 -1
- package/dist/ripple/p-1c9e0cae.system.entry.js +1 -0
- package/dist/ripple/p-2686e38f.entry.js +1 -0
- package/dist/ripple/p-26c0304e.entry.js +1 -0
- package/dist/ripple/p-2b07e7f1.system.entry.js +1 -0
- package/dist/ripple/p-2e1f1f9e.entry.js +1 -0
- package/dist/ripple/p-2f07262e.entry.js +1 -0
- package/dist/ripple/p-3405e16e.entry.js +1 -0
- package/dist/ripple/p-342e6ba1.system.entry.js +1 -0
- package/dist/ripple/p-36fa8451.entry.js +1 -0
- package/dist/ripple/p-37b044c7.system.js +1 -0
- package/dist/ripple/p-3f486eed.system.js +1 -0
- package/dist/ripple/p-44b7ac3f.system.entry.js +1 -0
- package/dist/ripple/p-46979d51.entry.js +1 -0
- package/dist/ripple/p-4b0989d7.entry.js +1 -0
- package/dist/ripple/p-4ffed2a0.system.entry.js +1 -0
- package/dist/ripple/p-540dc07f.entry.js +1 -0
- package/dist/ripple/p-585d603f.entry.js +1 -0
- package/dist/ripple/p-5a05046a.system.entry.js +1 -0
- package/dist/ripple/p-5c2fc698.entry.js +1 -0
- package/dist/ripple/p-5f247e4a.entry.js +1 -0
- package/dist/ripple/p-65d2c6b7.entry.js +1 -0
- package/dist/ripple/p-6b119eec.system.entry.js +1 -0
- package/dist/ripple/p-6c1553b1.system.entry.js +1 -0
- package/dist/ripple/p-6c716f1c.system.entry.js +1 -0
- package/dist/ripple/p-72935ed4.entry.js +1 -0
- package/dist/ripple/{p-b976c84b.entry.js → p-76d248e6.entry.js} +1 -1
- package/dist/ripple/p-7718d572.system.entry.js +1 -0
- package/dist/ripple/p-79b5df24.entry.js +1 -0
- package/dist/ripple/p-7dec8712.system.entry.js +1 -0
- package/dist/ripple/{p-32bf3f5b.system.entry.js → p-823d7b4e.system.entry.js} +1 -1
- package/dist/ripple/p-8270cd9e.system.entry.js +1 -0
- package/dist/ripple/p-89a2db02.js +1 -0
- package/dist/ripple/p-8acb1dc0.entry.js +1 -0
- package/dist/ripple/p-8b983e94.system.entry.js +1 -0
- package/dist/ripple/p-8f1a78e1.system.js +1 -0
- package/dist/ripple/p-9160d382.system.entry.js +1 -0
- package/dist/ripple/p-91fc6acf.system.entry.js +1 -0
- package/dist/ripple/{p-02dc1562.js → p-9708c995.js} +1 -1
- package/dist/ripple/p-97c524e5.system.entry.js +1 -0
- package/dist/ripple/p-a7b1398e.system.js +1 -0
- package/dist/ripple/p-a89a0ce4.system.entry.js +1 -0
- package/dist/ripple/p-a96fd05a.entry.js +1 -0
- package/dist/ripple/p-aaa18797.entry.js +1 -0
- package/dist/ripple/p-aab342f1.entry.js +1 -0
- package/dist/ripple/p-aae83494.system.entry.js +1 -0
- package/dist/ripple/p-ade89f97.system.entry.js +1 -0
- package/dist/ripple/p-b02dfe01.system.entry.js +1 -0
- package/dist/ripple/p-b8912fba.system.entry.js +1 -0
- package/dist/ripple/{p-ee31c799.system.js → p-bb25b9af.system.js} +1 -1
- package/dist/ripple/p-c22b9ac6.entry.js +1 -0
- package/dist/ripple/{p-4743176d.system.entry.js → p-c34c9cbb.system.entry.js} +1 -1
- package/dist/ripple/{p-88ebddd7.entry.js → p-cd0cc88d.entry.js} +1 -1
- package/dist/ripple/p-cef8a45b.system.js +2 -0
- package/dist/ripple/p-d19f494d.system.entry.js +1 -0
- package/dist/ripple/p-d3ffe48c.system.entry.js +1 -0
- package/dist/ripple/p-d49cd886.entry.js +1 -0
- package/dist/ripple/p-d7ce58a3.entry.js +1 -0
- package/dist/ripple/p-d9da0502.js +2 -0
- package/dist/ripple/p-e3083b58.entry.js +1 -0
- package/dist/ripple/p-e8023928.system.entry.js +1 -0
- package/dist/ripple/p-eb832c89.entry.js +1 -0
- package/dist/ripple/p-ecd38ef7.entry.js +1 -0
- package/dist/ripple/p-ee307bf6.entry.js +1 -0
- package/dist/ripple/p-f1abfaa1.entry.js +1 -0
- package/dist/ripple/p-f4067dfb.js +1 -0
- package/dist/ripple/p-f41ab9ea.js +1 -0
- package/dist/ripple/p-f4ed6ee8.system.entry.js +1 -0
- package/dist/ripple/p-f9222794.system.entry.js +1 -0
- package/dist/ripple/p-fd862f4e.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/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +1 -1
- package/dist/types/components/wm-file/wm-file.d.ts +1 -0
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +19 -3
- package/dist/types/components.d.ts +4 -0
- package/dist/types/global/intl.d.ts +3 -2
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/package.json +5 -5
- package/dist/cjs/index-e86c28b6.js +0 -2649
- package/dist/collection/components/charts/chartFunctions.spec.js +0 -16
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +0 -81
- package/dist/collection/components/charts/screenshots.e2e.js +0 -96
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +0 -213
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +0 -37
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +0 -176
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +0 -163
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +0 -69
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +0 -79
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +0 -89
- package/dist/collection/components/datepickers/wm-date-range.e2e.js +0 -443
- package/dist/collection/components/datepickers/wm-date-range.spec.js +0 -22
- package/dist/collection/components/datepickers/wm-datepicker.e2e.js +0 -382
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +0 -21
- package/dist/collection/components/selects/wm-option/wm-option.e2e.js +0 -22
- package/dist/collection/components/selects/wm-option/wm-option.spec.js +0 -63
- package/dist/collection/components/selects/wm-select/wm-select.e2e.js +0 -521
- package/dist/collection/components/selects/wm-select/wm-select.spec.js +0 -271
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +0 -200
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +0 -48
- package/dist/collection/components/wm-button/wm-button.e2e.js +0 -55
- package/dist/collection/components/wm-button/wm-button.spec.js +0 -74
- package/dist/collection/components/wm-file/wm-file.spec.js +0 -194
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +0 -69
- package/dist/collection/components/wm-input/wm-input.e2e.js +0 -32
- package/dist/collection/components/wm-input/wm-input.spec.js +0 -173
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +0 -23
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +0 -54
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +0 -11
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +0 -8
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +0 -104
- package/dist/collection/components/wm-modal/wm-modal.spec.js +0 -30
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +0 -102
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +0 -91
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +0 -50
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +0 -209
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +0 -177
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +0 -312
- package/dist/collection/components/wm-search/wm-search.e2e.js +0 -76
- package/dist/collection/components/wm-search/wm-search.spec.js +0 -71
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +0 -112
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +0 -9
- package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +0 -91
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +0 -12
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +0 -204
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +0 -195
- package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +0 -41
- package/dist/collection/components/wm-textarea/wm-textarea.spec.js +0 -79
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +0 -163
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +0 -147
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +0 -69
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +0 -21
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +0 -70
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +0 -234
- package/dist/collection/global/functions.spec.js +0 -126
- package/dist/collection/lang/lang.spec.js +0 -20
- package/dist/esm/index-558b5a82.js +0 -2618
- package/dist/esm-es5/chartFunctions-34f19953.js +0 -1
- package/dist/esm-es5/functions-8800c690.js +0 -1
- package/dist/esm-es5/global-af0a58b2.js +0 -1
- package/dist/esm-es5/index-558b5a82.js +0 -1
- package/dist/ripple/p-0195213e.system.entry.js +0 -1
- package/dist/ripple/p-04c6d049.entry.js +0 -1
- package/dist/ripple/p-0aded1ad.system.entry.js +0 -1
- package/dist/ripple/p-10cfa4f1.system.entry.js +0 -1
- package/dist/ripple/p-1465e576.system.entry.js +0 -1
- package/dist/ripple/p-1bd2cb0c.system.entry.js +0 -1
- package/dist/ripple/p-214ae691.entry.js +0 -1
- package/dist/ripple/p-28efe40a.system.js +0 -1
- package/dist/ripple/p-2b783e04.entry.js +0 -1
- package/dist/ripple/p-2f49268a.entry.js +0 -1
- package/dist/ripple/p-303593cb.js +0 -1
- package/dist/ripple/p-32867e2e.entry.js +0 -1
- package/dist/ripple/p-3a9a98ff.entry.js +0 -1
- package/dist/ripple/p-3e854aad.system.entry.js +0 -1
- package/dist/ripple/p-40ce8220.system.entry.js +0 -1
- package/dist/ripple/p-414032d3.entry.js +0 -1
- package/dist/ripple/p-41476faa.system.entry.js +0 -1
- package/dist/ripple/p-4378b6b9.system.js +0 -1
- package/dist/ripple/p-43f68b56.system.entry.js +0 -1
- package/dist/ripple/p-4de1777b.system.entry.js +0 -1
- package/dist/ripple/p-4fc47d67.entry.js +0 -1
- package/dist/ripple/p-50010933.entry.js +0 -1
- package/dist/ripple/p-50c2bb00.entry.js +0 -1
- package/dist/ripple/p-568c595f.js +0 -2
- package/dist/ripple/p-56cdd9af.system.entry.js +0 -1
- package/dist/ripple/p-5943c8b1.js +0 -1
- package/dist/ripple/p-5a216138.system.entry.js +0 -1
- package/dist/ripple/p-600fdedd.system.entry.js +0 -1
- package/dist/ripple/p-6277db44.entry.js +0 -1
- package/dist/ripple/p-63c226a0.system.entry.js +0 -1
- package/dist/ripple/p-64461414.entry.js +0 -1
- package/dist/ripple/p-6a47a797.entry.js +0 -1
- package/dist/ripple/p-6f18ff34.entry.js +0 -1
- package/dist/ripple/p-73e4e23a.entry.js +0 -1
- package/dist/ripple/p-78176eec.system.entry.js +0 -1
- package/dist/ripple/p-7ea2523a.system.entry.js +0 -1
- package/dist/ripple/p-98cc1aae.system.entry.js +0 -1
- package/dist/ripple/p-a118292d.entry.js +0 -1
- package/dist/ripple/p-a7e55fb6.entry.js +0 -1
- package/dist/ripple/p-a9bdc8ed.entry.js +0 -1
- package/dist/ripple/p-ab254e2b.entry.js +0 -1
- package/dist/ripple/p-ab8d78cc.system.js +0 -2
- package/dist/ripple/p-b2c2245e.entry.js +0 -1
- package/dist/ripple/p-b75b811f.entry.js +0 -1
- package/dist/ripple/p-b77706d6.entry.js +0 -1
- package/dist/ripple/p-b80a3bf5.entry.js +0 -1
- package/dist/ripple/p-bca4b4b6.system.entry.js +0 -1
- package/dist/ripple/p-be22192b.system.entry.js +0 -1
- package/dist/ripple/p-c354e78a.system.entry.js +0 -1
- package/dist/ripple/p-ce5532cc.entry.js +0 -1
- package/dist/ripple/p-cf2a23e8.system.entry.js +0 -1
- package/dist/ripple/p-cf817b9c.system.js +0 -1
- package/dist/ripple/p-d3eb9335.entry.js +0 -1
- package/dist/ripple/p-d412aa02.system.entry.js +0 -1
- package/dist/ripple/p-d6da12dc.system.entry.js +0 -1
- package/dist/ripple/p-deb96326.entry.js +0 -1
- package/dist/ripple/p-dee79f8c.system.entry.js +0 -1
- package/dist/ripple/p-df253834.system.entry.js +0 -1
- package/dist/ripple/p-e14233fd.entry.js +0 -1
- package/dist/ripple/p-e77ac9d0.entry.js +0 -1
- package/dist/ripple/p-e963cbc7.system.entry.js +0 -1
- package/dist/ripple/p-ebe2b432.system.entry.js +0 -1
- package/dist/ripple/p-eca78c2b.js +0 -1
- package/dist/ripple/p-ecd3ac6e.system.entry.js +0 -1
- package/dist/ripple/p-edd87140.system.js +0 -1
- package/dist/ripple/p-f14d1a31.system.entry.js +0 -1
- package/dist/ripple/p-f394a24f.entry.js +0 -1
- package/dist/ripple/p-f42e1ea9.entry.js +0 -1
- package/dist/ripple/p-faad130f.entry.js +0 -1
- package/dist/ripple/p-fb3d7911.system.entry.js +0 -1
- package/dist/ripple/p-ff0dba4e.system.entry.js +0 -1
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { File } from "./wm-file";
|
|
3
|
-
// mock ResizeObserver
|
|
4
|
-
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
5
|
-
observe: jest.fn(),
|
|
6
|
-
unobserve: jest.fn(),
|
|
7
|
-
disconnect: jest.fn(),
|
|
8
|
-
}));
|
|
9
|
-
describe("wm-file", () => {
|
|
10
|
-
let html, page;
|
|
11
|
-
async function createPageHelper() {
|
|
12
|
-
return await newSpecPage({
|
|
13
|
-
components: [File],
|
|
14
|
-
html: `<wm-file
|
|
15
|
-
id="file1"
|
|
16
|
-
name="File retrieved from server"
|
|
17
|
-
type="pdf"
|
|
18
|
-
last-updated="10/30/97 3:46 PM"
|
|
19
|
-
size="22 KB"
|
|
20
|
-
file-actions="download preview delete"
|
|
21
|
-
>
|
|
22
|
-
</wm-file>`,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
it("renders green check alongside recently uploaded files", async () => {
|
|
26
|
-
html = `<wm-file
|
|
27
|
-
id="file1"
|
|
28
|
-
name="File retrieved from server"
|
|
29
|
-
type="pdf"
|
|
30
|
-
last-updated="10/30/97 3:46 PM"
|
|
31
|
-
size="22 KB"
|
|
32
|
-
file-actions="download preview delete"
|
|
33
|
-
progress="100"
|
|
34
|
-
>
|
|
35
|
-
</wm-file>`;
|
|
36
|
-
page = await newSpecPage({ components: [File], html });
|
|
37
|
-
await page.waitForChanges();
|
|
38
|
-
const fileWrapperEl = page.root.shadowRoot.querySelector(".file-wrapper");
|
|
39
|
-
expect(fileWrapperEl).toHaveClass("checked");
|
|
40
|
-
});
|
|
41
|
-
it("renders file actions in the proper order", async () => {
|
|
42
|
-
html = `<wm-file
|
|
43
|
-
id="file1"
|
|
44
|
-
name="File retrieved from server"
|
|
45
|
-
type="pdf"
|
|
46
|
-
last-updated="10/30/97 3:46 PM"
|
|
47
|
-
size="22 KB"
|
|
48
|
-
file-actions="download delete preview"
|
|
49
|
-
>
|
|
50
|
-
</wm-file>`;
|
|
51
|
-
page = await newSpecPage({ components: [File], html });
|
|
52
|
-
await page.waitForChanges();
|
|
53
|
-
const fileActionEls = page.root.shadowRoot.querySelectorAll("wm-button");
|
|
54
|
-
expect(fileActionEls[0]).toEqualAttribute("tooltip", "Preview");
|
|
55
|
-
expect(fileActionEls[1]).toEqualAttribute("tooltip", "Download");
|
|
56
|
-
expect(fileActionEls[2]).toEqualAttribute("tooltip", "Delete");
|
|
57
|
-
});
|
|
58
|
-
it("defaults available actions to download and delete", async () => {
|
|
59
|
-
html = `<wm-file
|
|
60
|
-
id="file1"
|
|
61
|
-
name="File retrieved from server"
|
|
62
|
-
type="pdf"
|
|
63
|
-
last-updated="10/30/97 3:46 PM"
|
|
64
|
-
size="22 KB"
|
|
65
|
-
>
|
|
66
|
-
</wm-file>`;
|
|
67
|
-
page = await newSpecPage({ components: [File], html });
|
|
68
|
-
await page.waitForChanges();
|
|
69
|
-
const deleteButton = page.root.shadowRoot.querySelector(".delete-button");
|
|
70
|
-
const downloadButton = page.root.shadowRoot.querySelector(".download-button");
|
|
71
|
-
const previewButton = page.root.shadowRoot.querySelector(".preview-button");
|
|
72
|
-
expect(deleteButton).toBeTruthy();
|
|
73
|
-
expect(downloadButton).toBeTruthy();
|
|
74
|
-
expect(previewButton).toBeFalsy();
|
|
75
|
-
});
|
|
76
|
-
it("displays no file actions when an empty string is passed", async () => {
|
|
77
|
-
html = `<wm-file
|
|
78
|
-
id="file1"
|
|
79
|
-
name="File retrieved from server"
|
|
80
|
-
type="pdf"
|
|
81
|
-
last-updated="10/30/97 3:46 PM"
|
|
82
|
-
size="22 KB"
|
|
83
|
-
file-actions=""
|
|
84
|
-
>
|
|
85
|
-
</wm-file>`;
|
|
86
|
-
page = await newSpecPage({ components: [File], html });
|
|
87
|
-
await page.waitForChanges();
|
|
88
|
-
const deleteButton = page.root.shadowRoot.querySelector(".delete-button");
|
|
89
|
-
const downloadButton = page.root.shadowRoot.querySelector(".download-button");
|
|
90
|
-
const previewButton = page.root.shadowRoot.querySelector(".preview-button");
|
|
91
|
-
expect(deleteButton).toBeFalsy();
|
|
92
|
-
expect(downloadButton).toBeFalsy();
|
|
93
|
-
expect(previewButton).toBeFalsy();
|
|
94
|
-
});
|
|
95
|
-
it("renders timestamp by default, size if specified, or none based on show-info prop", async () => {
|
|
96
|
-
page = await createPageHelper();
|
|
97
|
-
await page.waitForChanges();
|
|
98
|
-
let fileInfoEl = page.root.shadowRoot.querySelector(".file-info");
|
|
99
|
-
expect(fileInfoEl.textContent).toBe("10/30/97 3:46 PM");
|
|
100
|
-
page = await newSpecPage({
|
|
101
|
-
components: [File],
|
|
102
|
-
html: `<wm-file
|
|
103
|
-
id="file1"
|
|
104
|
-
name="File retrieved from server"
|
|
105
|
-
type="pdf"
|
|
106
|
-
last-updated="10/30/97 3:46 PM"
|
|
107
|
-
size="22 KB"
|
|
108
|
-
file-actions="download preview delete"
|
|
109
|
-
show-info="size"
|
|
110
|
-
>
|
|
111
|
-
</wm-file>`,
|
|
112
|
-
});
|
|
113
|
-
await page.waitForChanges();
|
|
114
|
-
fileInfoEl = page.root.shadowRoot.querySelector(".file-info");
|
|
115
|
-
expect(fileInfoEl.textContent).toBe("22 KB");
|
|
116
|
-
page = await newSpecPage({
|
|
117
|
-
components: [File],
|
|
118
|
-
html: `<wm-file
|
|
119
|
-
id="file1"
|
|
120
|
-
name="File retrieved from server"
|
|
121
|
-
type="pdf"
|
|
122
|
-
last-updated="10/30/97 3:46 PM"
|
|
123
|
-
size="22 KB"
|
|
124
|
-
file-actions="download preview delete"
|
|
125
|
-
show-info="time"
|
|
126
|
-
>
|
|
127
|
-
</wm-file>`,
|
|
128
|
-
});
|
|
129
|
-
await page.waitForChanges();
|
|
130
|
-
fileInfoEl = page.root.shadowRoot.querySelector(".file-info");
|
|
131
|
-
expect(fileInfoEl.textContent).toBe("10/30/97 3:46 PM");
|
|
132
|
-
page = await newSpecPage({
|
|
133
|
-
components: [File],
|
|
134
|
-
html: `<wm-file
|
|
135
|
-
id="file1"
|
|
136
|
-
name="File retrieved from server"
|
|
137
|
-
type="pdf"
|
|
138
|
-
last-updated="10/30/97 3:46 PM"
|
|
139
|
-
size="22 KB"
|
|
140
|
-
file-actions="download preview delete"
|
|
141
|
-
show-info="none"
|
|
142
|
-
>
|
|
143
|
-
</wm-file>`,
|
|
144
|
-
});
|
|
145
|
-
await page.waitForChanges();
|
|
146
|
-
fileInfoEl = page.root.shadowRoot.querySelector(".file-info");
|
|
147
|
-
expect(fileInfoEl).toBeFalsy();
|
|
148
|
-
});
|
|
149
|
-
it("emits the appropriate events when user clicks the buttons", async () => {
|
|
150
|
-
const filePreviewedSpy = jest.fn();
|
|
151
|
-
const fileDownloadedSpy = jest.fn();
|
|
152
|
-
const fileDeletedSpy = jest.fn();
|
|
153
|
-
html = `<wm-file
|
|
154
|
-
id="file1"
|
|
155
|
-
name="File retrieved from server"
|
|
156
|
-
type="pdf"
|
|
157
|
-
last-updated="10/30/97 3:46 PM"
|
|
158
|
-
size="22 KB"
|
|
159
|
-
file-actions="download preview delete"
|
|
160
|
-
>
|
|
161
|
-
</wm-file>`;
|
|
162
|
-
page = await newSpecPage({ components: [File], html });
|
|
163
|
-
await page.waitForChanges();
|
|
164
|
-
page.root.addEventListener("wmFilePreview", filePreviewedSpy);
|
|
165
|
-
page.root.addEventListener("wmFileDownload", fileDownloadedSpy);
|
|
166
|
-
page.root.addEventListener("wmFileDelete", fileDeletedSpy);
|
|
167
|
-
// wmFilePreview
|
|
168
|
-
page.root.shadowRoot.querySelector(".preview-button").click();
|
|
169
|
-
await page.waitForChanges();
|
|
170
|
-
expect(filePreviewedSpy.mock.calls[0][0].target.id).toBe("file1");
|
|
171
|
-
// wmFileDownload
|
|
172
|
-
page.root.shadowRoot.querySelector(".download-button").click();
|
|
173
|
-
await page.waitForChanges();
|
|
174
|
-
expect(fileDownloadedSpy.mock.calls[0][0].target.id).toBe("file1");
|
|
175
|
-
// wmFileDelete
|
|
176
|
-
page.root.shadowRoot.querySelector(".delete-button").click();
|
|
177
|
-
await page.waitForChanges();
|
|
178
|
-
expect(fileDeletedSpy.mock.calls[0][0].target.id).toBe("file1");
|
|
179
|
-
jest.restoreAllMocks();
|
|
180
|
-
});
|
|
181
|
-
it("renders with an error if one is passed", async () => {
|
|
182
|
-
html = `<wm-file
|
|
183
|
-
id="file1"
|
|
184
|
-
error-message="Example error message"
|
|
185
|
-
file='{"id": "file1", "name": "File retrieved from server.pdf", "lastUpdated": "10/30/97 3:46 PM", "size": "22 KB", "fileActions": "download preview delete"}'
|
|
186
|
-
></wm-file>`;
|
|
187
|
-
page = await newSpecPage({ components: [File], html });
|
|
188
|
-
await page.waitForChanges();
|
|
189
|
-
const fileDiv = page.root.shadowRoot.querySelector(".file");
|
|
190
|
-
expect(fileDiv).toHaveClass("--error");
|
|
191
|
-
const errorText = page.root.shadowRoot.querySelector(".error-message");
|
|
192
|
-
expect(errorText.textContent).toBe("Example error message");
|
|
193
|
-
});
|
|
194
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { FileList } from "./wm-file-list";
|
|
3
|
-
import { File } from "../wm-file/wm-file";
|
|
4
|
-
// mock ResizeObserver
|
|
5
|
-
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
6
|
-
observe: jest.fn(),
|
|
7
|
-
unobserve: jest.fn(),
|
|
8
|
-
disconnect: jest.fn(),
|
|
9
|
-
}));
|
|
10
|
-
describe("wm-file-list", () => {
|
|
11
|
-
let page;
|
|
12
|
-
async function createPageHelper() {
|
|
13
|
-
return await newSpecPage({
|
|
14
|
-
components: [FileList, File],
|
|
15
|
-
html: `<wm-file-list id="filelist1">
|
|
16
|
-
<wm-file id="file1" name="File retrieved from server" type="pdf" last-updated="1/28/2020 5:29 PM" file-actions="preview download"></wm-file>
|
|
17
|
-
<wm-file id="file2" name="Second file" type="jpeg" last-updated="2/14/2019 7:21 AM" file-actions="preview download"></wm-file>
|
|
18
|
-
</wm-file-list>`,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
it("renders all files", async () => {
|
|
22
|
-
page = await createPageHelper();
|
|
23
|
-
await page.waitForChanges();
|
|
24
|
-
let fileEls = page.root.querySelectorAll("wm-file");
|
|
25
|
-
expect(fileEls.length).toBe(2);
|
|
26
|
-
expect(fileEls[0]).toEqualAttribute("id", "file1");
|
|
27
|
-
expect(fileEls[1]).toEqualAttribute("id", "file2");
|
|
28
|
-
});
|
|
29
|
-
it("passes on show-info to it's children wm-files", async () => {
|
|
30
|
-
page = await createPageHelper();
|
|
31
|
-
await page.waitForChanges();
|
|
32
|
-
// default (last-updated)
|
|
33
|
-
let fileEl = page.root.querySelector("wm-file");
|
|
34
|
-
expect(fileEl.showInfo).toBe("last-updated");
|
|
35
|
-
// size
|
|
36
|
-
page = await newSpecPage({
|
|
37
|
-
components: [FileList, File],
|
|
38
|
-
html: `<wm-file-list id="filelist1" show-info="size">
|
|
39
|
-
<wm-file id="file1" name="File retrieved from server" type="pdf" last-updated="1/28/2020 5:29 PM" file-actions="preview download"></wm-file>
|
|
40
|
-
<wm-file id="file2" name="Second file" type="jpeg" last-updated="2/14/2019 7:21 AM" file-actions="preview download"></wm-file>
|
|
41
|
-
</wm-file-list>`,
|
|
42
|
-
});
|
|
43
|
-
await page.waitForChanges();
|
|
44
|
-
fileEl = page.root.querySelector("wm-file");
|
|
45
|
-
expect(fileEl.showInfo).toBe("size");
|
|
46
|
-
// last-updated (specified)
|
|
47
|
-
page = await newSpecPage({
|
|
48
|
-
components: [FileList, File],
|
|
49
|
-
html: `<wm-file-list id="filelist1" show-info="last-updated">
|
|
50
|
-
<wm-file id="file1" name="File retrieved from server" type="pdf" last-updated="1/28/2020 5:29 PM" file-actions="preview download"></wm-file>
|
|
51
|
-
<wm-file id="file2" name="Second file" type="jpeg" last-updated="2/14/2019 7:21 AM" file-actions="preview download"></wm-file>
|
|
52
|
-
</wm-file-list>`,
|
|
53
|
-
});
|
|
54
|
-
await page.waitForChanges();
|
|
55
|
-
fileEl = page.root.querySelector("wm-file");
|
|
56
|
-
expect(fileEl.showInfo).toBe("last-updated");
|
|
57
|
-
// none
|
|
58
|
-
page = await newSpecPage({
|
|
59
|
-
components: [FileList, File],
|
|
60
|
-
html: `<wm-file-list id="filelist1" show-info="none">
|
|
61
|
-
<wm-file id="file1" name="File retrieved from server" type="pdf" last-updated="1/28/2020 5:29 PM" file-actions="preview download"></wm-file>
|
|
62
|
-
<wm-file id="file2" name="Second file" type="jpeg" last-updated="2/14/2019 7:21 AM" file-actions="preview download"></wm-file>
|
|
63
|
-
</wm-file-list>`,
|
|
64
|
-
});
|
|
65
|
-
await page.waitForChanges();
|
|
66
|
-
fileEl = page.root.querySelector("wm-file");
|
|
67
|
-
expect(fileEl.showInfo).toBe("none");
|
|
68
|
-
});
|
|
69
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import AxePuppeteer from "@axe-core/puppeteer";
|
|
2
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
3
|
-
describe("wm-input", () => {
|
|
4
|
-
// ts throws erroneous warning about vars being unused...
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
let page, el, inputField;
|
|
7
|
-
beforeEach(async () => {
|
|
8
|
-
page = await newE2EPage();
|
|
9
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
10
|
-
<wm-input label="input"></wm-input>
|
|
11
|
-
</main></body></html>`);
|
|
12
|
-
el = await page.find("wm-input");
|
|
13
|
-
inputField = await page.find("wm-input >>> input");
|
|
14
|
-
await page.waitForChanges();
|
|
15
|
-
});
|
|
16
|
-
it("passes Axe checks", async () => {
|
|
17
|
-
const results = await new AxePuppeteer(page).analyze();
|
|
18
|
-
expect(results.violations.length).toBe(0);
|
|
19
|
-
});
|
|
20
|
-
it("updates input value when changed programatically", async () => {
|
|
21
|
-
el.setProperty("value", "33245");
|
|
22
|
-
await page.waitForChanges();
|
|
23
|
-
const value = await el.getProperty("value");
|
|
24
|
-
expect(value).toBe("33245");
|
|
25
|
-
});
|
|
26
|
-
it("updates value prop when user types", async () => {
|
|
27
|
-
await inputField.type("example");
|
|
28
|
-
await page.waitForChanges();
|
|
29
|
-
const value = await el.getProperty("value");
|
|
30
|
-
expect(value).toBe("example");
|
|
31
|
-
});
|
|
32
|
-
});
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { Input } from "./wm-input";
|
|
3
|
-
describe("input", () => {
|
|
4
|
-
let page;
|
|
5
|
-
beforeEach(async () => {
|
|
6
|
-
page = await newSpecPage({
|
|
7
|
-
components: [Input],
|
|
8
|
-
html: "<wm-input label='input'></wm-input>",
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
it("has the right aria attributes", async () => {
|
|
12
|
-
let inputField = await page.root.shadowRoot.querySelector("input");
|
|
13
|
-
// input field is described by help text
|
|
14
|
-
expect(inputField).toEqualAttribute("aria-describedby", "info error");
|
|
15
|
-
});
|
|
16
|
-
it("inputfield is disabled when the prop is passed", async () => {
|
|
17
|
-
await page.setContent(`<wm-input label="input" disabled></wm-input>`);
|
|
18
|
-
let inputField = await page.root.shadowRoot.querySelector("input");
|
|
19
|
-
expect(inputField).toHaveAttribute("disabled");
|
|
20
|
-
});
|
|
21
|
-
it("handles keydown", () => {
|
|
22
|
-
// handleKeyDown
|
|
23
|
-
const component = new Input();
|
|
24
|
-
component.characterLimit = 10;
|
|
25
|
-
let event = { key: "", ctrlKey: false, metaKey: false, altKey: false };
|
|
26
|
-
let inputEl = document.createElement("input");
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
component.inputEl = inputEl;
|
|
29
|
-
const mockAnnounce = (component.announce = jest.fn());
|
|
30
|
-
const mockGenerateCharacterLimiWarning = (component.generateCharacterLimitWarning = jest.fn());
|
|
31
|
-
function resetKeys() {
|
|
32
|
-
event.key = "";
|
|
33
|
-
event.ctrlKey = false;
|
|
34
|
-
event.metaKey = false;
|
|
35
|
-
event.altKey = false;
|
|
36
|
-
//@ts-ignore
|
|
37
|
-
component.inputEl.value = "";
|
|
38
|
-
}
|
|
39
|
-
// no modifiers, empty key
|
|
40
|
-
resetKeys();
|
|
41
|
-
component.handleKeyDown(event);
|
|
42
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(0);
|
|
43
|
-
expect(mockGenerateCharacterLimiWarning).toHaveBeenCalledTimes(0);
|
|
44
|
-
jest.clearAllMocks();
|
|
45
|
-
// no modifiers, wrong key
|
|
46
|
-
resetKeys();
|
|
47
|
-
event.key = "ArrowDown";
|
|
48
|
-
component.handleKeyDown(event);
|
|
49
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(0);
|
|
50
|
-
expect(mockGenerateCharacterLimiWarning).toHaveBeenCalledTimes(0);
|
|
51
|
-
jest.clearAllMocks();
|
|
52
|
-
// no modifiers, right key, not at limit
|
|
53
|
-
resetKeys();
|
|
54
|
-
event.key = "a";
|
|
55
|
-
component.handleKeyDown(event);
|
|
56
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(0);
|
|
57
|
-
expect(mockGenerateCharacterLimiWarning).toHaveBeenCalledTimes(0);
|
|
58
|
-
jest.clearAllMocks();
|
|
59
|
-
// no modifiers, right key, at limit
|
|
60
|
-
resetKeys();
|
|
61
|
-
//@ts-ignore
|
|
62
|
-
component.inputEl.value = "1234567890";
|
|
63
|
-
event.key = "a";
|
|
64
|
-
component.handleKeyDown(event);
|
|
65
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(1);
|
|
66
|
-
expect(mockGenerateCharacterLimiWarning).toHaveBeenCalledTimes(1);
|
|
67
|
-
jest.clearAllMocks();
|
|
68
|
-
// no modifiers, right key, above limit
|
|
69
|
-
resetKeys();
|
|
70
|
-
//@ts-ignore
|
|
71
|
-
component.inputEl.value = "12345678901234567890";
|
|
72
|
-
event.key = "a";
|
|
73
|
-
component.handleKeyDown(event);
|
|
74
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(1);
|
|
75
|
-
expect(mockGenerateCharacterLimiWarning).toHaveBeenCalledTimes(1);
|
|
76
|
-
jest.clearAllMocks();
|
|
77
|
-
// ctrl modifier, right key, above limit
|
|
78
|
-
resetKeys();
|
|
79
|
-
//@ts-ignore
|
|
80
|
-
component.inputEl.value = "12345678901234567890";
|
|
81
|
-
event.key = "a";
|
|
82
|
-
event.ctrlKey = true;
|
|
83
|
-
component.handleKeyDown(event);
|
|
84
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(0);
|
|
85
|
-
expect(mockGenerateCharacterLimiWarning).toHaveBeenCalledTimes(0);
|
|
86
|
-
jest.clearAllMocks();
|
|
87
|
-
// meta modifier, right key, above limit
|
|
88
|
-
resetKeys();
|
|
89
|
-
//@ts-ignore
|
|
90
|
-
component.inputEl.value = "12345678901234567890";
|
|
91
|
-
event.key = "a";
|
|
92
|
-
event.metaKey = true;
|
|
93
|
-
component.handleKeyDown(event);
|
|
94
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(0);
|
|
95
|
-
expect(mockGenerateCharacterLimiWarning).toHaveBeenCalledTimes(0);
|
|
96
|
-
jest.clearAllMocks();
|
|
97
|
-
// alt modifier, right key, above limit
|
|
98
|
-
resetKeys();
|
|
99
|
-
//@ts-ignore
|
|
100
|
-
component.inputEl.value = "12345678901234567890";
|
|
101
|
-
event.key = "a";
|
|
102
|
-
event.altKey = true;
|
|
103
|
-
component.handleKeyDown(event);
|
|
104
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(0);
|
|
105
|
-
expect(mockGenerateCharacterLimiWarning).toHaveBeenCalledTimes(0);
|
|
106
|
-
jest.clearAllMocks();
|
|
107
|
-
jest.restoreAllMocks();
|
|
108
|
-
});
|
|
109
|
-
it("handles input", () => {
|
|
110
|
-
// handleInput
|
|
111
|
-
const component = new Input();
|
|
112
|
-
let inputEl = {};
|
|
113
|
-
let event = { target: inputEl };
|
|
114
|
-
const mockAnnounce = (component.announce = jest.fn());
|
|
115
|
-
const mockGenerateCharacterLimitWarning = (component.generateCharacterLimitWarning = jest.fn(() => "announcement"));
|
|
116
|
-
inputEl.value = "fish";
|
|
117
|
-
event.target = inputEl;
|
|
118
|
-
//@ts-ignore
|
|
119
|
-
component.handleInput(event);
|
|
120
|
-
expect(component.value).toBe("fish");
|
|
121
|
-
expect(component.charCount).toBe(4);
|
|
122
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(0);
|
|
123
|
-
expect(mockGenerateCharacterLimitWarning).toHaveBeenCalledTimes(0);
|
|
124
|
-
component.characterLimit = 10;
|
|
125
|
-
inputEl.value = "two fish";
|
|
126
|
-
event.target = inputEl;
|
|
127
|
-
//@ts-ignore
|
|
128
|
-
component.handleInput(event);
|
|
129
|
-
expect(component.value).toBe("two fish");
|
|
130
|
-
expect(component.charCount).toBe(8);
|
|
131
|
-
expect(mockAnnounce).toHaveBeenCalledTimes(1);
|
|
132
|
-
expect(mockAnnounce).toHaveBeenCalledWith("announcement");
|
|
133
|
-
expect(mockGenerateCharacterLimitWarning).toHaveBeenCalledTimes(1);
|
|
134
|
-
expect(mockGenerateCharacterLimitWarning).toHaveBeenCalledWith(8, 10);
|
|
135
|
-
jest.resetAllMocks();
|
|
136
|
-
});
|
|
137
|
-
it("updates classes on focus", () => {
|
|
138
|
-
const component = new Input();
|
|
139
|
-
const divEl = document.createElement("div");
|
|
140
|
-
//@ts-ignore
|
|
141
|
-
component.inputWrapperEl = divEl;
|
|
142
|
-
//@ts-ignore
|
|
143
|
-
expect(component.inputWrapperEl).not.toHaveClass("focus");
|
|
144
|
-
component.handleFocus();
|
|
145
|
-
//@ts-ignore
|
|
146
|
-
expect(component.inputWrapperEl).toHaveClass("focus");
|
|
147
|
-
});
|
|
148
|
-
it("updates the live region announcement", () => {
|
|
149
|
-
// announce
|
|
150
|
-
const component = new Input();
|
|
151
|
-
let divEl = document.createElement("div");
|
|
152
|
-
//@ts-ignore
|
|
153
|
-
component.liveRegionEl = divEl;
|
|
154
|
-
component.announce("Message");
|
|
155
|
-
expect(component.announcement).toBe("Message");
|
|
156
|
-
//@ts-ignore
|
|
157
|
-
component.liveRegionEl.textContent = "Message";
|
|
158
|
-
component.announce("Message");
|
|
159
|
-
expect(component.announcement).toBe("Message" + "\u00A0");
|
|
160
|
-
});
|
|
161
|
-
it("generates the appropriate character limit warning", () => {
|
|
162
|
-
// generateCharacterLimitWarning
|
|
163
|
-
const component = new Input();
|
|
164
|
-
expect(component.generateCharacterLimitWarning(0, 10)).toBe("0 of 10 characters entered.");
|
|
165
|
-
expect(component.generateCharacterLimitWarning(5, 8)).toBe("5 of 8 characters entered.");
|
|
166
|
-
expect(component.generateCharacterLimitWarning(8, 8)).toBe("8 of 8 characters entered. No additional characters will be entered.");
|
|
167
|
-
});
|
|
168
|
-
it("sets input to required", async () => {
|
|
169
|
-
await page.setContent(`<wm-input label='input' required-field='true'></wm-input>`);
|
|
170
|
-
const input = await page.root.shadowRoot.querySelector("input");
|
|
171
|
-
expect(input).toEqualAttribute("aria-required", "true");
|
|
172
|
-
});
|
|
173
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
describe("wm-menuitem", () => {
|
|
3
|
-
let page;
|
|
4
|
-
beforeEach(async () => {
|
|
5
|
-
page = await newE2EPage();
|
|
6
|
-
await page.setContent(`<html lang='en'><head><title>Page</title></head><body><main><h1>Title</h1>
|
|
7
|
-
<wm-action-menu id='menu' tooltip="menu name"><wm-menuitem id='first' disabled onClick='action()'>First action</wm-menuitem><wm-menuitem id='second'>Second action</wm-menuitem><wm-menuitem id='third'>Third action</wm-menuitem></wm-action-menu>
|
|
8
|
-
<script>function action() {document.getElementById('second').innerHTML = 'Changed text'}</script></main></body></html>`);
|
|
9
|
-
});
|
|
10
|
-
it("renders", async () => {
|
|
11
|
-
const element = await page.find("wm-menuitem");
|
|
12
|
-
expect(element).not.toBeNull();
|
|
13
|
-
});
|
|
14
|
-
it("prevents action on disabled item", async () => {
|
|
15
|
-
await page.keyboard.press("Tab");
|
|
16
|
-
await page.keyboard.press("Enter"); // open popup
|
|
17
|
-
await page.waitForChanges();
|
|
18
|
-
await page.keyboard.press("Enter");
|
|
19
|
-
await page.waitForChanges();
|
|
20
|
-
let changedMenuitem = await page.find("wm-menuitem#second");
|
|
21
|
-
expect(changedMenuitem.innerHTML).toEqual("Second action");
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { Menuitem } from "./wm-menuitem";
|
|
3
|
-
describe("wm-menuitem", () => {
|
|
4
|
-
it("builds", async () => {
|
|
5
|
-
const comp = await newSpecPage({
|
|
6
|
-
components: [Menuitem],
|
|
7
|
-
html: "<wm-menuitem><wm-menuitem>",
|
|
8
|
-
});
|
|
9
|
-
expect(comp.root).toMatchSnapshot();
|
|
10
|
-
});
|
|
11
|
-
it("handles disabled onClick function", async () => {
|
|
12
|
-
const page = await newSpecPage({
|
|
13
|
-
components: [Menuitem],
|
|
14
|
-
html: "<wm-menuitem><wm-menuitem>",
|
|
15
|
-
});
|
|
16
|
-
const menuItem = page.root;
|
|
17
|
-
const onClickFunc = () => console.log("Message");
|
|
18
|
-
menuItem.onclick = onClickFunc;
|
|
19
|
-
expect(menuItem.onclick).toEqual(onClickFunc);
|
|
20
|
-
menuItem.disabled = true;
|
|
21
|
-
expect(menuItem.onclick).toBe(null);
|
|
22
|
-
menuItem.disabled = false;
|
|
23
|
-
expect(menuItem.onclick).toEqual(onClickFunc);
|
|
24
|
-
});
|
|
25
|
-
it("renders description if prop is present", async () => {
|
|
26
|
-
const page = await newSpecPage({
|
|
27
|
-
components: [Menuitem],
|
|
28
|
-
html: "<wm-menuitem description='Description here'><wm-menuitem>",
|
|
29
|
-
});
|
|
30
|
-
const descriptionEl = page.root.shadowRoot.querySelector(".description");
|
|
31
|
-
expect(descriptionEl === null || descriptionEl === void 0 ? void 0 : descriptionEl.textContent).toBe("Description here");
|
|
32
|
-
});
|
|
33
|
-
describe("error throwing", () => {
|
|
34
|
-
it("throws error when description is over character limit", async () => {
|
|
35
|
-
const mockFunc = jest.fn();
|
|
36
|
-
console.error = mockFunc;
|
|
37
|
-
const description = "q".repeat(200);
|
|
38
|
-
await newSpecPage({
|
|
39
|
-
components: [Menuitem],
|
|
40
|
-
html: `<wm-menuitem description='${description}'></wm-menuitem>`,
|
|
41
|
-
});
|
|
42
|
-
expect(mockFunc).toHaveBeenCalledWith("wm-menuitem description is above the character limit of 100");
|
|
43
|
-
});
|
|
44
|
-
it("throws error when description and icon props are used simultaneously", async () => {
|
|
45
|
-
const mockFunc = jest.fn();
|
|
46
|
-
console.error = mockFunc;
|
|
47
|
-
await newSpecPage({
|
|
48
|
-
components: [Menuitem],
|
|
49
|
-
html: `<wm-menuitem description='Example description' icon="f3eb"></wm-menuitem>`,
|
|
50
|
-
});
|
|
51
|
-
expect(mockFunc).toHaveBeenCalledWith("wm-menuitems with descriptions do not support the use of icons");
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ModalFooter } from "./wm-modal-footer";
|
|
2
|
-
describe("wm-modal-footer", () => {
|
|
3
|
-
it("has the right props", () => {
|
|
4
|
-
const modal = new ModalFooter();
|
|
5
|
-
expect(modal).toHaveProperty("secondaryText");
|
|
6
|
-
expect(modal).toHaveProperty("primaryText");
|
|
7
|
-
expect(modal).toHaveProperty("infoText");
|
|
8
|
-
expect(modal).toHaveProperty("primaryActionDisabled");
|
|
9
|
-
expect(modal).toHaveProperty("deleteStyle");
|
|
10
|
-
});
|
|
11
|
-
});
|