@watermarkinsights/ripple 5.3.0-3 → 5.3.0-4
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-a8999ce1.js → chartFunctions-0238043b.js} +4 -4
- package/dist/cjs/{functions-05e7ad5a.js → functions-3be85c6d.js} +7 -104
- package/dist/{esm/app-globals-bc617542.js → cjs/global-6a36ad09.js} +2 -7
- package/dist/cjs/index-e86c28b6.js +2641 -0
- package/dist/cjs/{intl-2b550151.js → intl-567eb9d8.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/priv-calendar.cjs.entry.js +6 -7
- package/dist/cjs/priv-chart-popover.cjs.entry.js +5 -6
- package/dist/cjs/priv-navigator-button.cjs.entry.js +3 -4
- package/dist/cjs/priv-navigator-item.cjs.entry.js +3 -4
- package/dist/cjs/ripple.cjs.js +11 -12
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +6 -8
- package/dist/cjs/wm-button.cjs.entry.js +4 -5
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +6 -7
- package/dist/cjs/wm-date-range.cjs.entry.js +7 -8
- package/dist/cjs/wm-datepicker.cjs.entry.js +7 -8
- package/dist/cjs/wm-file-list.cjs.entry.js +3 -4
- package/dist/cjs/wm-file.cjs.entry.js +4 -5
- package/dist/cjs/wm-input.cjs.entry.js +5 -6
- package/dist/cjs/wm-line-chart.cjs.entry.js +14 -15
- package/dist/cjs/wm-modal-footer.cjs.entry.js +3 -4
- package/dist/cjs/wm-modal-header.cjs.entry.js +5 -6
- package/dist/cjs/wm-modal.cjs.entry.js +5 -6
- package/dist/cjs/wm-navigation_3.cjs.entry.js +10 -13
- package/dist/cjs/wm-navigator.cjs.entry.js +3 -4
- package/dist/cjs/wm-option_2.cjs.entry.js +8 -10
- package/dist/cjs/wm-pagination.cjs.entry.js +4 -5
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +7 -9
- package/dist/cjs/wm-search.cjs.entry.js +6 -7
- package/dist/cjs/wm-snackbar.cjs.entry.js +6 -7
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +8 -11
- package/dist/cjs/wm-tag-input.cjs.entry.js +7 -8
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +5 -6
- package/dist/cjs/wm-timepicker.cjs.entry.js +5 -6
- package/dist/cjs/wm-toggletip.cjs.entry.js +5 -6
- package/dist/cjs/wm-uploader.cjs.entry.js +6 -7
- package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/charts/chartFunctions.js +2 -2
- package/dist/collection/components/charts/chartFunctions.spec.js +16 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +81 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +2 -2
- package/dist/collection/components/charts/screenshots.e2e.js +96 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +213 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +37 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +176 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +163 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +69 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +79 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.css +2 -1
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +89 -0
- package/dist/collection/components/datepickers/wm-date-range.e2e.js +443 -0
- package/dist/collection/components/datepickers/wm-date-range.js +12 -16
- package/dist/collection/components/datepickers/wm-date-range.spec.js +22 -0
- package/dist/collection/components/datepickers/wm-datepicker.e2e.js +382 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +12 -16
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +200 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +48 -0
- package/dist/collection/components/wm-button/wm-button.e2e.js +55 -0
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-button/wm-button.spec.js +74 -0
- package/dist/collection/components/wm-file/wm-file.js +1 -1
- package/dist/collection/components/wm-file/wm-file.spec.js +194 -0
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +69 -0
- package/dist/collection/components/wm-input/wm-input.e2e.js +32 -0
- package/dist/collection/components/wm-input/wm-input.js +1 -1
- package/dist/collection/components/wm-input/wm-input.spec.js +173 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +23 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +54 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +11 -0
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +8 -0
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +104 -0
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-modal/wm-modal.spec.js +30 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +102 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +91 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +50 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +209 -0
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +177 -0
- package/dist/collection/components/wm-option/wm-option.e2e.js +22 -0
- package/dist/collection/components/wm-option/wm-option.js +1 -1
- package/dist/collection/components/wm-option/wm-option.spec.js +63 -0
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +312 -0
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.e2e.js +76 -0
- package/dist/collection/components/wm-search/wm-search.js +4 -5
- package/dist/collection/components/wm-search/wm-search.spec.js +71 -0
- package/dist/collection/components/wm-select/wm-select.e2e.js +521 -0
- package/dist/collection/components/wm-select/wm-select.js +2 -2
- package/dist/collection/components/wm-select/wm-select.spec.js +271 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +112 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +9 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +91 -0
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +12 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +204 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +195 -0
- package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +41 -0
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-textarea/wm-textarea.spec.js +79 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +163 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +8 -11
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +147 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +69 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +21 -0
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +70 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +234 -0
- package/dist/collection/global/functions.spec.js +126 -0
- package/dist/collection/lang/lang.spec.js +20 -0
- package/dist/esm/{chartFunctions-f4bc4821.js → chartFunctions-036fdb89.js} +4 -4
- package/dist/esm/{functions-25781571.js → functions-46843ea0.js} +8 -105
- package/dist/{cjs/app-globals-4191e8d6.js → esm/global-bcdca57d.js} +1 -10
- package/dist/esm/index-558b5a82.js +2610 -0
- package/dist/esm/{intl-df3d34d1.js → intl-8b8740b9.js} +1 -1
- package/dist/esm/loader.js +4 -5
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-calendar.entry.js +6 -7
- package/dist/esm/priv-chart-popover.entry.js +5 -6
- package/dist/esm/priv-navigator-button.entry.js +3 -4
- package/dist/esm/priv-navigator-item.entry.js +3 -4
- package/dist/esm/ripple.js +12 -13
- package/dist/esm/wm-action-menu_2.entry.js +6 -8
- package/dist/esm/wm-button.entry.js +4 -5
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +6 -7
- package/dist/esm/wm-date-range.entry.js +7 -8
- package/dist/esm/wm-datepicker.entry.js +7 -8
- package/dist/esm/wm-file-list.entry.js +3 -4
- package/dist/esm/wm-file.entry.js +4 -5
- package/dist/esm/wm-input.entry.js +5 -6
- package/dist/esm/wm-line-chart.entry.js +14 -15
- package/dist/esm/wm-modal-footer.entry.js +3 -4
- package/dist/esm/wm-modal-header.entry.js +5 -6
- package/dist/esm/wm-modal.entry.js +5 -6
- package/dist/esm/wm-navigation_3.entry.js +10 -13
- package/dist/esm/wm-navigator.entry.js +3 -4
- package/dist/esm/wm-option_2.entry.js +8 -10
- package/dist/esm/wm-pagination.entry.js +4 -5
- package/dist/esm/wm-progress-indicator_3.entry.js +7 -9
- package/dist/esm/wm-search.entry.js +6 -7
- package/dist/esm/wm-snackbar.entry.js +6 -7
- package/dist/esm/wm-tab-item_3.entry.js +8 -11
- package/dist/esm/wm-tag-input.entry.js +7 -8
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +5 -6
- package/dist/esm/wm-timepicker.entry.js +5 -6
- package/dist/esm/wm-toggletip.entry.js +5 -6
- package/dist/esm/wm-uploader.entry.js +6 -7
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/{chartFunctions-f4bc4821.js → chartFunctions-036fdb89.js} +1 -1
- package/dist/esm-es5/functions-46843ea0.js +1 -0
- package/dist/esm-es5/global-bcdca57d.js +1 -0
- package/dist/esm-es5/index-558b5a82.js +1 -0
- package/dist/esm-es5/{intl-df3d34d1.js → intl-8b8740b9.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/cdn.js +2 -1
- package/dist/loader/index.cjs.js +2 -1
- package/dist/loader/index.d.ts +0 -3
- package/dist/loader/index.es2017.js +2 -1
- package/dist/loader/index.js +2 -1
- package/dist/ripple/p-09a31f0c.entry.js +1 -0
- package/dist/ripple/p-0dc51fad.entry.js +1 -0
- package/dist/ripple/p-0ea8609b.system.entry.js +1 -0
- package/dist/ripple/{p-a9d89ac8.system.js → p-1ac66a15.system.js} +1 -1
- package/dist/ripple/p-1c32dc29.system.js +1 -0
- package/dist/ripple/p-240124b0.system.entry.js +1 -0
- package/dist/ripple/p-26fbc7f5.system.entry.js +1 -0
- package/dist/ripple/p-294b38ca.system.entry.js +1 -0
- package/dist/ripple/p-2b05bf05.entry.js +1 -0
- package/dist/ripple/{p-2f1d2fe3.system.entry.js → p-2ba7e68e.system.entry.js} +1 -1
- package/dist/ripple/p-2de2c954.js +1 -0
- package/dist/ripple/p-311923b2.system.entry.js +1 -0
- package/dist/ripple/p-3183bba8.entry.js +1 -0
- package/dist/ripple/p-31976813.entry.js +1 -0
- package/dist/ripple/{p-823d7b4e.system.entry.js → p-32bf3f5b.system.entry.js} +1 -1
- package/dist/ripple/p-33679b9d.entry.js +1 -0
- package/dist/ripple/p-34b5830f.system.js +1 -0
- package/dist/ripple/p-3568472c.entry.js +1 -0
- package/dist/ripple/p-359d45dc.entry.js +1 -0
- package/dist/ripple/{p-67a7f0b0.entry.js → p-3a44e1c8.entry.js} +1 -1
- package/dist/ripple/{p-672ae2cb.entry.js → p-42d1c301.entry.js} +1 -1
- package/dist/ripple/{p-041e579b.entry.js → p-45abd8fe.entry.js} +1 -1
- package/dist/ripple/{p-13b1d775.entry.js → p-48e09589.entry.js} +1 -1
- package/dist/ripple/p-4b0d5b98.entry.js +1 -0
- package/dist/ripple/p-4e56f3f5.system.entry.js +1 -0
- package/dist/ripple/{p-9176672f.system.entry.js → p-5029fcd8.system.entry.js} +1 -1
- package/dist/ripple/p-54922aa3.system.entry.js +1 -0
- package/dist/ripple/p-568c595f.js +2 -0
- package/dist/ripple/p-591918a4.entry.js +1 -0
- package/dist/ripple/p-5b9de05a.system.entry.js +1 -0
- package/dist/ripple/p-5d9bccfb.entry.js +1 -0
- package/dist/ripple/p-61bcfba6.system.js +1 -0
- package/dist/ripple/{p-bee8ab6e.entry.js → p-624a2812.entry.js} +1 -1
- package/dist/ripple/p-62a8f09c.entry.js +1 -0
- package/dist/ripple/p-64e929d6.system.entry.js +1 -0
- package/dist/ripple/{p-043901ab.system.entry.js → p-65d26233.system.entry.js} +1 -1
- package/dist/ripple/p-685db40b.entry.js +1 -0
- package/dist/ripple/{p-ac40417b.system.entry.js → p-79106e23.system.entry.js} +1 -1
- package/dist/ripple/p-7e6f5a1e.system.entry.js +1 -0
- package/dist/ripple/p-8029af07.system.entry.js +1 -0
- package/dist/ripple/{p-8e72de50.entry.js → p-8159cdf5.entry.js} +1 -1
- package/dist/ripple/p-822618d7.entry.js +1 -0
- package/dist/ripple/p-86d655fb.system.entry.js +1 -0
- package/dist/ripple/p-884294c6.entry.js +1 -0
- package/dist/ripple/{p-cd0cc88d.entry.js → p-88ebddd7.entry.js} +1 -1
- package/dist/ripple/p-8fbddb6c.system.entry.js +1 -0
- package/dist/ripple/p-902a54c5.entry.js +1 -0
- package/dist/ripple/{p-aab56a37.system.entry.js → p-a152cf3a.system.entry.js} +1 -1
- package/dist/ripple/{p-75a79896.entry.js → p-a37cf34a.entry.js} +1 -1
- package/dist/ripple/p-ab8d78cc.system.js +2 -0
- package/dist/ripple/p-b516b418.entry.js +1 -0
- package/dist/ripple/{p-6fe35d1e.system.entry.js → p-b7ead395.system.entry.js} +1 -1
- package/dist/ripple/p-bc5e9d24.entry.js +1 -0
- package/dist/ripple/p-c4b9d46d.entry.js +1 -0
- package/dist/ripple/p-c885c7f9.entry.js +1 -0
- package/dist/ripple/p-c91b10f3.system.entry.js +1 -0
- package/dist/ripple/p-c9543950.system.entry.js +1 -0
- package/dist/ripple/p-cacfbaf1.system.entry.js +1 -0
- package/dist/ripple/{p-2e3728f1.entry.js → p-cc4a429b.entry.js} +1 -1
- package/dist/ripple/p-ce9a8bd1.entry.js +1 -0
- package/dist/ripple/p-d24882a7.system.entry.js +1 -0
- package/dist/ripple/p-d33d6e96.system.entry.js +1 -0
- package/dist/ripple/{p-96bd1868.system.js → p-d4b209ec.system.js} +1 -1
- package/dist/ripple/{p-f54e9ed0.js → p-d79fdf0b.js} +1 -1
- package/dist/ripple/{p-f8250ca9.js → p-d837c1f5.js} +1 -1
- package/dist/ripple/{p-d93c51dd.system.entry.js → p-df1a11f1.system.entry.js} +1 -1
- package/dist/ripple/p-df2560f3.system.entry.js +1 -0
- package/dist/ripple/p-e3bcdde8.system.entry.js +1 -0
- package/dist/ripple/p-e83a98d3.entry.js +1 -0
- package/dist/ripple/p-e995f7f0.js +1 -0
- package/dist/ripple/p-eaac6bcd.entry.js +1 -0
- package/dist/ripple/p-f67fd802.system.entry.js +1 -0
- package/dist/ripple/p-fe8d02c3.system.entry.js +1 -0
- package/dist/ripple/{p-799d06ad.system.entry.js → p-ff23d5e2.system.entry.js} +1 -1
- package/dist/ripple/{p-b0c566b5.system.entry.js → p-ffb31979.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/stencil-public-runtime.d.ts +10 -3
- package/package.json +1 -1
- package/dist/cjs/index-788526f5.js +0 -1851
- package/dist/esm/index-130e07bb.js +0 -1820
- package/dist/esm-es5/app-globals-bc617542.js +0 -1
- package/dist/esm-es5/functions-25781571.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/ripple/p-0abc9300.entry.js +0 -1
- package/dist/ripple/p-0af94825.entry.js +0 -1
- package/dist/ripple/p-0ff41567.system.entry.js +0 -1
- package/dist/ripple/p-13fc2164.entry.js +0 -1
- package/dist/ripple/p-155224a2.system.entry.js +0 -1
- package/dist/ripple/p-15f8ea28.system.entry.js +0 -1
- package/dist/ripple/p-1c4d2203.system.entry.js +0 -1
- package/dist/ripple/p-1f09134c.entry.js +0 -1
- package/dist/ripple/p-298c2675.entry.js +0 -1
- package/dist/ripple/p-31781d88.system.entry.js +0 -1
- package/dist/ripple/p-31d7ecf9.system.entry.js +0 -1
- package/dist/ripple/p-341ebafa.entry.js +0 -1
- package/dist/ripple/p-35f209d9.system.entry.js +0 -1
- package/dist/ripple/p-376efca9.entry.js +0 -1
- package/dist/ripple/p-3b5f4364.system.entry.js +0 -1
- package/dist/ripple/p-418ed08c.system.entry.js +0 -1
- package/dist/ripple/p-439d0c1f.system.js +0 -1
- package/dist/ripple/p-4670ccb4.system.js +0 -1
- package/dist/ripple/p-488e1690.entry.js +0 -1
- package/dist/ripple/p-4978eebe.entry.js +0 -1
- package/dist/ripple/p-4baaf026.entry.js +0 -1
- package/dist/ripple/p-4c24711f.entry.js +0 -1
- package/dist/ripple/p-56766bb2.entry.js +0 -1
- package/dist/ripple/p-5caaf651.system.entry.js +0 -1
- package/dist/ripple/p-5ece78e5.system.entry.js +0 -1
- package/dist/ripple/p-6d0e5159.system.entry.js +0 -1
- package/dist/ripple/p-6d56676e.system.entry.js +0 -1
- package/dist/ripple/p-7eab6bea.system.entry.js +0 -1
- package/dist/ripple/p-7fb95b89.entry.js +0 -1
- package/dist/ripple/p-85cbeb7d.system.entry.js +0 -1
- package/dist/ripple/p-88cfd58d.js +0 -1
- package/dist/ripple/p-8d075bcf.system.entry.js +0 -1
- package/dist/ripple/p-90c76565.entry.js +0 -1
- package/dist/ripple/p-a62e7532.entry.js +0 -1
- package/dist/ripple/p-a78001e2.system.js +0 -1
- package/dist/ripple/p-a8661c35.system.entry.js +0 -1
- package/dist/ripple/p-b7307be6.system.entry.js +0 -1
- package/dist/ripple/p-c2181de0.entry.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d5ba9de1.system.entry.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-db10990a.entry.js +0 -1
- package/dist/ripple/p-e2fe86a7.system.entry.js +0 -1
- package/dist/ripple/p-e4d8a800.entry.js +0 -1
- package/dist/ripple/p-e85b1f40.entry.js +0 -1
- package/dist/ripple/p-ea0dfadf.system.entry.js +0 -1
- package/dist/ripple/p-eb14b354.entry.js +0 -1
- package/dist/ripple/p-f17fd62b.entry.js +0 -1
- package/dist/ripple/p-f741e7c4.entry.js +0 -1
- package/dist/ripple/p-f8613ec2.js +0 -1
- package/dist/ripple/p-fabe4ca4.entry.js +0 -1
- package/dist/ripple/p-fbaae34d.system.entry.js +0 -1
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +0 -77
- package/dist/types/components/datepickers/wm-date-range.d.ts +0 -73
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as r,F as i,H as a,g as s}from"./p-568c595f.js";import{t as o,j as n,a as l,k as d,A as p,B as h,C as c,D as u,i as m}from"./p-e995f7f0.js";const w=class{constructor(r){t(this,r),this.wmRangeSelection=e(this,"wmRangeSelection",7),this.wmStartInputBlur=e(this,"wmStartInputBlur",7),this.wmEndInputBlur=e(this,"wmEndInputBlur",7),this.openUp=!1,this.calWidth=673,this.popupClicked=!1,this.toggleButtonClicked=!1,this.formats={"mm/dd/yyyy":"US","dd/mm/yyyy":"INT","yyyy/mm/dd":"ISO"},this.dateFormat="mm/dd/yyyy",this.disabled=!1,this.errorMessage=void 0,this.invalidStart=!1,this.invalidEnd=!1,this.labelStart="",this.labelEnd="",this.preselected=void 0,this.requiredField=!1,this.valueStart="",this.valueEnd="",this.availSpace=0,this.isExpanded=!1}get _disabled(){return o(this.disabled)}get focusDates(){const t=this.toISO(this.valueStart);let e=n(new Date);this._isValidISO(t)?e=t:this.preselected&&this._isValidISO(this.preselected)&&(e=this.preselected);let r=this.toJSDate(e);11==r.getUTCMonth()&&r.setYear(r.getUTCFullYear()+1),r.setMonth((r.getUTCMonth()+1)%12,1);let i=n(r);const a=this.toISO(this.valueEnd);if(this._isValidISO(a)&&!this.isSameMonth(e,a)&&(i=a,!t)){let t=this.toJSDate(i),r=t.getUTCMonth()-1;-1==r&&(r=11,t.setYear(t.getUTCFullYear()-1)),t.setMonth(r,1),e=n(t)}return[e,i]}isSameMonth(t,e){return!(!t||!e)&&parseInt(t.split("-")[1])==parseInt(e.split("-")[1])}toJSDate(t){if(t&&this._isValidISO(t)){let e=new Date;return e.setUTCFullYear(parseInt(t.split("-")[0]),parseInt(t.split("-")[1])-1,parseInt(t.split("-")[2])),e}}toISO(t){return this._reformatDate(this.formats[this.dateFormat],"ISO",t)}handleDisabled(){l(this.el,this._disabled)}updateValueStart(){this.startInputEl.value=this.valueStart?this.valueStart:""}updateValueEnd(){this.endInputEl.value=this.valueEnd?this.valueEnd:""}handleErrorMessage(){this.errorMessage&&setTimeout((()=>this.announce(this.errorMessage)),100)}togglePopup(){this.isExpanded?this.closePopup():this.openPopup(),this.toggleButtonClicked=!0}closePopup(t=!1){this.date1=void 0,this.date2=void 0,this.startCalEl.startDate=void 0,this.startCalEl.endDate=void 0,this.startCalEl.hoverDate=void 0,this.endCalEl.startDate=void 0,this.endCalEl.endDate=void 0,this.endCalEl.hoverDate=void 0,this.isExpanded=!1,this.startCalEl.view="day",this.endCalEl.view="day",this.popupEl.classList.remove("open"),window.setTimeout((()=>{this.popupEl.style.visibility="hidden"}),250),t&&this.toggleEl.focus()}openPopup(){this.openUp=d(this.el,this.popupEl.clientHeight,this.labelEl.clientHeight);const{spaceLeft:t,spaceRight:e}=p(this.el);if(e>=this.popupEl.clientWidth-this.el.clientWidth?(this.popupEl.style.left="0",this.popupEl.style.right="auto"):t>=this.popupEl.clientWidth-this.el.clientWidth?(this.popupEl.style.right="0",this.popupEl.style.left="auto"):(this.popupEl.style.left=(this.availSpace-this.calWidth)/2-t+"px",this.popupEl.style.right="auto"),this.popupEl.style.visibility="visible",window.requestAnimationFrame((()=>{this.popupEl.classList.add("open")})),this.isExpanded=!0,this.startCalEl.focusDate=this.focusDates[0],this.endCalEl.focusDate=this.focusDates[1],this.startCalEl.focusCell(),this.valueStart){const t=this.toISO(this.valueStart);if(this._isValidISO(t)&&(this.startCalEl.startDate=t),this.valueEnd){const e=this.toISO(this.valueEnd);this._isValidISO(e)&&(this.isSameMonth(t,e)?this.startCalEl.endDate=e:this.endCalEl.endDate=e)}}}handleFocus(){this.wrapperEl.classList.add("focus")}handleBlur(){this.wrapperEl.classList.remove("focus")}handleStartInputBlur(){this.wmStartInputBlur.emit()}handleEndInputBlur(){this.wmEndInputBlur.emit()}handleStartInput(t){this.valueStart=t.target.value}handleEndInput(t){this.valueEnd=t.target.value}handleKey(t){"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),this.closePopup(!0))}blurHandler(){this.popupClicked||this.toggleButtonClicked||!this.isExpanded||this.closePopup(),this.popupClicked=!1,this.toggleButtonClicked=!1}handleBlurOnWindow(){this.isExpanded&&this.closePopup()}handleDateFocus(t){const e=t.target,r=e.focusDate,i=this.startCalEl.focusDate.slice(0,-3),a=this.endCalEl.focusDate.slice(0,-3);if(e==this.startCalEl?i>=a&&(this.endCalEl.focusDate=h.month.increase(this.startCalEl.focusDate,1)):e==this.endCalEl&&a<=i&&(this.startCalEl.focusDate=h.month.decrease(this.endCalEl.focusDate,1)),this.oldFocusVal){const t=h.year.asInt(r),i=h.year.asInt(this.oldFocusVal),a=h.month.asInt(r),s=h.month.asInt(this.oldFocusVal);"day"===e.view?t==i&&a==s||(this.liveRegionEl.innerHTML=`Viewing ${c[a-1]}, ${t}`):t!=i?this.liveRegionEl.innerHTML=`${t} selected.`:a!=s&&(this.liveRegionEl.innerHTML=`${c[a-1]}, ${t}`)}this.oldFocusVal=e.focusDate}handlePopupBlurred(t){if(t.detail.relatedTarget!==this.el){const e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(e)}}handleCellTriggered(t){const e=t.detail.cal,r=t.detail.cell,i=r.getAttribute("data-year")+"-"+r.getAttribute("data-month")+"-"+r.textContent.padStart(2,"0");if(this.startCalEl.endDate||this.endCalEl.endDate)this.startCalEl.startDate=void 0,this.startCalEl.endDate=void 0,this.endCalEl.startDate=void 0,this.endCalEl.endDate=void 0,e.startDate=i,this.date1=i,this.date2=void 0;else if(this.date1&&i!==this.date1){this.date1>i?(this.date2=this.date1,this.date1=i):this.date2=i;const t={startDate:{iso:this.date1,us:this._reformatDate("ISO","US",this.date1),int:this._reformatDate("ISO","INT",this.date1)},endDate:{iso:this.date2,us:this._reformatDate("ISO","US",this.date2),int:this._reformatDate("ISO","INT",this.date2)}};this.wmRangeSelection.emit(t),this.closePopup(!0),this.date1=void 0,this.date2=void 0}else e.startDate=i,this.date1=i;const a=new CustomEvent("input");this.el.dispatchEvent(a);const s=new CustomEvent("change");this.el.dispatchEvent(s)}handleOutOfCal(){this.startCalEl.hoverDate=void 0,this.endCalEl.hoverDate=void 0}handleCellHovered(t){this.startCalEl.hoverDate=this.startCalEl.startDate===t.detail?void 0:t.detail,this.endCalEl.hoverDate=this.endCalEl.startDate===t.detail?void 0:t.detail}async reformatDate(t,e,r){return this._reformatDate(t,e,r)}_reformatDate(t,e,r){if("ISO"!==t&&"ISO"!==e)return"";if(!t||!e||!r)return"";if(!/^(\d{1}|\d{2}|\d{4})[\-\.\/]\d{1,2}[\-\.\/](\d{1}|\d{2}|\d{4})$/.test(r))return r;{const i=r.replace(/[\-\.]/gi,"/").split("/");switch(e){case"US":return i[1].padStart(2,"0")+"/"+i[2].padStart(2,"0")+"/"+i[0].padStart(4,"20");case"INT":return i[2].padStart(2,"0")+"/"+i[1].padStart(2,"0")+"/"+i[0].padStart(4,"20");case"ISO":if("US"===t)return i[2].padStart(4,"20")+"-"+i[0].padStart(2,"0")+"-"+i[1].padStart(2,"0");if("INT"===t)return i[2].padStart(4,"20")+"-"+i[1].padStart(2,"0")+"-"+i[0].padStart(2,"0");if("ISO"===t)return i[0].padStart(4,"20")+"-"+i[1].padStart(2,"0")+"-"+i[2].padStart(2,"0");default:return i.join("/")}}}async isValidISO(t){return this._isValidISO(t)}_isValidISO(t){if(t&&/^\d\d\d\d[-]\d\d[-]\d\d$/.test(t)){const e=t.split("-"),r=parseInt(e[2],10),i=parseInt(e[1],10),a=parseInt(e[0],10);if(a<1e3||a>3e3||0==i||i>12)return!1;let s=[31,28,31,30,31,30,31,31,30,31,30,31];return(a%400==0||a%100!=0&&a%4==0)&&(s[1]=29),r>0&&r<=s[i-1]}return!1}setAvailSpace(){this.availSpace=(this.hiddenOverflowParent||document.body).clientWidth}componentWillLoad(){""!==this.labelStart&&""!==this.labelEnd||console.error("For accessibility reasons you must specify labels for the date range inputs."),l(this.el,this._disabled),this.hiddenOverflowParent=u(this.el),this.hiddenOverflowParent&&new ResizeObserver((()=>{this.availSpace=this.hiddenOverflowParent.clientWidth})).observe(this.hiddenOverflowParent),this.setAvailSpace()}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionEl.textContent=t}renderCalendars(){if(this.calWidth<=this.availSpace)return r(i,null,r("div",{class:`popup-wrapper ${this.startCalEl&&this.startCalEl.view}-view ${this.openUp?"expand-upwards":""}`,id:"popup-wrapper",ref:t=>this.popupEl=t,onClick:()=>this.popupClicked=!0,style:{display:"flex"}},r("div",{class:"trapfocus",tabIndex:this.isExpanded?0:void 0,onFocus:()=>this.endCalEl.focusLastFocusable()}),r("priv-calendar",{ref:t=>this.startCalEl=t,onClick:()=>this.popupClicked=!0,onDateFocus:t=>this.handleDateFocus(t)}),r("priv-calendar",{ref:t=>this.endCalEl=t,onClick:()=>this.popupClicked=!0,onDateFocus:t=>this.handleDateFocus(t)}),r("div",{class:"trapfocus",tabIndex:this.isExpanded?0:void 0,onFocus:()=>this.startCalEl.focusFirstFocusable()})))}render(){return r(a,{"aria-busy":"false"},r("div",{ref:t=>this.wrapperEl=t,class:"wrapper"},r("div",{class:"range-wrapper "+(this.calWidth<=this.availSpace?"cal":"")},r("div",{class:"label-wrapper",id:"start-label-wrapper"},r("label",{ref:t=>this.labelEl=t,id:"startlabel",htmlFor:"start-date-input",class:"label",title:`${this.labelStart} (${this.dateFormat})`},this.labelStart,this.requiredField&&r("span",{"aria-hidden":"true",class:"required"},"*"))),r("div",{class:"label-wrapper",id:"end-label-wrapper"},r("label",{id:"endlabel",htmlFor:"end-date-input",class:"label",title:`${this.labelEnd} (${this.dateFormat})`},this.labelEnd,this.requiredField&&r("span",{"aria-hidden":"true",class:"required"},"*"))),r("input",{disabled:this._disabled,type:"text",id:"start-date-input",class:"date-input input "+(this.invalidStart?"invalid":""),name:"start-date",placeholder:this.dateFormat,value:this.valueStart,onFocus:()=>this.handleFocus(),onInput:t=>this.handleStartInput(t),onBlur:()=>this.handleStartInputBlur(),ref:t=>this.startInputEl=t,"aria-describedby":"error","aria-label":this.labelStart,"aria-required":this.requiredField?"true":null}),r("div",{id:"hyphen"}," - "),r("input",{disabled:this._disabled,type:"text",id:"end-date-input",class:"date-input input "+(this.invalidEnd?"invalid":""),name:"end-date",placeholder:this.dateFormat,value:this.valueEnd,onFocus:()=>this.handleFocus(),onInput:t=>this.handleEndInput(t),onBlur:()=>this.handleEndInputBlur(),ref:t=>this.endInputEl=t,"aria-describedby":"error","aria-label":this.labelEnd,"aria-required":this.requiredField?"true":null}),r("div",{class:"toggle-wrapper",id:"toggle-wrapper"},this.calWidth<=this.availSpace&&r("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":"date-input",ref:t=>this.toggleEl=t,"aria-expanded":`${this.isExpanded}`,class:"toggle",id:"toggle"},r("span",{class:"calendar",title:m.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})}))),this.renderCalendars()),r("div",null,r("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),r("div",{id:"month-title",class:"sr-only"},m.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),r("div",{id:"year-title",class:"sr-only"},m.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"}))),r("div",{id:"error",class:"error"},this.errorMessage),r("div",{ref:t=>this.liveRegionEl=t,class:"sr-only","aria-live":"polite","aria-atomic":"true"})))}static get delegatesFocus(){return!0}get el(){return s(this)}static get watchers(){return{disabled:["handleDisabled"],valueStart:["updateValueStart"],valueEnd:["updateValueEnd"],errorMessage:["handleErrorMessage"]}}};w.style=':host{--wmcolor-datepicker-background:var(--wmcolor-background);--wmcolor-datepicker-day-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-day-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-day-text-outside:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-day-text-selected:var(--wmcolor-interactive-text-selected);--wmcolor-datepicker-day-text:var(--wmcolor-text);--wmcolor-datepicker-input-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-input-background:var(--wmcolor-input-background);--wmcolor-datepicker-input-border:var(--wmcolor-input-border);--wmcolor-datepicker-input-text-disabled:var(--wmcolor-input-text-disabled);--wmcolor-datepicker-input-text:var(--wmcolor-input-text);--wmcolor-datepicker-month-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-month-background-selected:var(--wmcolor-interactive);--wmcolor-datepicker-month-background:var(--wmcolor-text);--wmcolor-datepicker-month-border:var(--wmcolor-border-light);--wmcolor-datepicker-month-text-selected:var(--wmcolor-text-ondark);--wmcolor-datepicker-month-text:var(--wmcolor-interactive);--wmcolor-datepicker-navigation-background-hover:var(--wmcolor-button-background-navigational-hover);--wmcolor-datepicker-navigation-background:var(--wmcolor-button-background-navigational);--wmcolor-datepicker-navigation-text:var(--wmcolor-button-icon-navigational);--wmcolor-datepicker-selector-background:var(--wmcolor-button-background-secondary);--wmcolor-datepicker-selector-border:var(--wmcolor-button-border-secondary);--wmcolor-datepicker-selector-text:var(--wmcolor-button-text-secondary);--wmcolor-datepicker-toggle-background-disabled:var(--wmcolor-input-background-disabled);--wmcolor-datepicker-toggle-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-datepicker-toggle-background:var(--wmcolor-input-background);--wmcolor-datepicker-toggle-icon-disabled:var(--wmcolor-interactive-disabled);--wmcolor-datepicker-toggle-icon:var(--wmcolor-interactive);--wmcolor-datepicker-weekdays-background:var(--wmcolor-table-header-background);--wmcolor-datepicker-weekdays-text:var(--wmcolor-text);font-family:inherit}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{position:relative}:host .wrapper .single-wrapper,:host .wrapper .range-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .date-input{border-radius:3px;color:var(--wmcolor-datepicker-input-text);font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;-ms-flex:1;flex:1;margin:0;background-color:var(--wmcolor-datepicker-input-background)}:host .wrapper .date-input:disabled{background-color:var(--wmcolor-datepicker-input-background-disabled);color:var(--wmcolor-datepicker-input-text-disabled)}:host .wrapper .date-input:focus{outline:none}:host .wrapper .input{height:2.5rem;border:1px solid var(--wmcolor-datepicker-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;}:host .wrapper #single-date-input{height:100%;border:none;border-radius:3px;-webkit-margin-end:3px;margin-inline-end:3px}:host .wrapper .range-wrapper{max-width:257px;display:grid;grid-template-rows:minmax(21px, 1fr) 38px;grid-template-columns:120px 17px 120px;grid-template-areas:"start-label-wrapper . end-label-wrapper" "start-date-input hyphen end-date-input"}:host .wrapper .range-wrapper #start-label-wrapper{grid-area:start-label-wrapper}:host .wrapper .range-wrapper #end-label-wrapper{grid-area:end-label-wrapper}:host .wrapper .range-wrapper #start-date-input{grid-area:start-date-input}:host .wrapper .range-wrapper #hyphen{grid-area:hyphen}:host .wrapper .range-wrapper #end-date-input{grid-area:end-date-input}:host .wrapper .range-wrapper .label{text-wrap:wrap}:host .wrapper .range-wrapper.cal{max-width:305px;-webkit-column-gap:4px;-moz-column-gap:4px;column-gap:4px;grid-template-columns:120px 17px 120px 36px;grid-template-areas:"start-label-wrapper . end-label-wrapper ." "start-date-input hyphen end-date-input toggle-wrapper"}:host .wrapper .range-wrapper.cal #toggle-wrapper{grid-area:toggle-wrapper}:host .wrapper #start-date-input,:host .wrapper #end-date-input{max-width:120px}:host .wrapper #start-date-input:focus,:host .wrapper #end-date-input:focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wrapper.invalid .input,:host .wrapper .date-input.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper .error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:4px;top:100%;left:0}:host .wrapper .error:not(:empty){margin-top:0.25rem}:host .wrapper.focus #single-date-input{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{w as wm_date_range}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js"],(function(t){"use strict";var o,e,r,i,n,a,s,l,p,h,c;return{setters:[function(t){o=t.r;e=t.h;r=t.H;i=t.g},function(t){n=t.i;a=t.h;s=t.k;l=t.p;p=t.q;h=t.r;c=t.s}],execute:function(){var m=':host{--button-size:16px}:host(.size-small){--button-size:16px}:host(.size-small) .button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host(.size-large){--button-size:40px}:host(.size-large) .button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-3px}:host{--wmcolor-toggletip-background:var(--wmcolor-background-dark);--wmcolor-toggletip-icon-background:var(--wmcolor-background-dark);--wmcolor-toggletip-icon-text:var(--wmcolor-icon-ondark);--wmcolor-toggletip-text:var(--wmcolor-text-ondark);display:inline-block;position:relative;height:var(--button-size);width:var(--button-size);text-transform:none;font-weight:normal}:host .button{display:-ms-flexbox;display:flex;background:none;border:none;padding:0;width:inherit;height:inherit;border-radius:50%;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:relative;cursor:pointer}:host .button:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f2fc";font-size:16px;color:var(--wmcolor-toggletip-icon-background);background:radial-gradient(var(--wmcolor-toggletip-icon-text) 40%, transparent 0%)}:host .button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-3px}:host .tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);pointer-events:none;font-family:inherit;font-size:0.875rem;text-transform:none;font-weight:normal;background:var(--wmcolor-tooltip-background);color:var(--wmcolor-tooltip-text);padding:0.375rem;line-height:normal;z-index:30;white-space:nowrap}:host .tooltip.hover{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;white-space:nowrap}:host .toggletip{position:absolute;max-width:13.75rem;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5rem 0.75rem;border-radius:0.1875rem;background:var(--wmcolor-toggletip-background);color:var(--wmcolor-toggletip-text);font-size:14px;z-index:30}:host .toggletip.top:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.bottom:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-right-color:var(--wmcolor-toggletip-background);border-right-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-left-width:0px;top:calc(50% - 6px);left:-0.1875rem}:host .toggletip.left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-left-color:var(--wmcolor-toggletip-background);border-left-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-right-width:0px;top:calc(50% - 6px);right:-0.1875rem}:host .toggletip.bottom-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.bottom-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:var(--wmcolor-toggletip-background);border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.top-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.top-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:var(--wmcolor-toggletip-background);border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.hidden{-webkit-transform:scale(0, 0) !important;transform:scale(0, 0) !important;visibility:hidden}:host .toggletip{top:calc(var(--button-size) / 2);left:calc(var(--button-size) / 2)}:host .toggletip.top{-webkit-transform:translate(-50%, calc(-100% - 18px));transform:translate(-50%, calc(-100% - 18px))}:host .toggletip.bottom{-webkit-transform:translate(-50%, 18px);transform:translate(-50%, 18px)}:host .toggletip.right{-webkit-transform:translate(18px, -50%);transform:translate(18px, -50%)}:host .toggletip.left{-webkit-transform:translate(calc(-100% - 18px), -50%);transform:translate(calc(-100% - 18px), -50%)}:host .toggletip.bottom-right{-webkit-transform:translate(-20px, 18px);transform:translate(-20px, 18px)}:host .toggletip.bottom-left{-webkit-transform:translate(calc(-100% + 20px), 18px);transform:translate(calc(-100% + 20px), 18px)}:host .toggletip.top-right{-webkit-transform:translate(-20px, calc(-100% - 18px));transform:translate(-20px, calc(-100% - 18px))}:host .toggletip.top-left{-webkit-transform:translate(calc(-100% + 20px), calc(-100% - 18px));transform:translate(calc(-100% + 20px), calc(-100% - 18px))}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var g=t("wm_toggletip",function(){function t(t){o(this,t);this.tooltipMessage=n.formatMessage({id:"toggletip.moreInformation",defaultMessage:"More information"});this.label=undefined;this.tooltip=undefined;this.tooltipPosition="bottom-right";this.targetSize="small";this.isOpen=false}t.prototype.componentWillLoad=function(){var t=["top","right","bottom","left","top-right","top-left","bottom-right","bottom-left"];if(!this.label){console.error("wm-toggletip must have a label property")}if(!this.tooltip){console.error("wm-toggletip must have a tooltip property")}if(!t.includes(this.tooltipPosition)){console.error('wm-toggletip: tooltip-position has an invalid value of "'.concat(this.tooltipPosition,'", make sure to use one of the following values: ').concat(t))}};t.prototype.handleKeydown=function(t){switch(t.key){case"Escape":t.preventDefault();if(this.isOpen){t.stopPropagation();this.close()}break;case"Tab":if(this.isOpen){this.close()}}};t.prototype.handleClick=function(t){if(this.isOpen){if(t.target===this.el||this.el.contains(t.target)){this.announceToggletip()}else{this.close()}}};t.prototype.open=function(){a();this.setToggletipPosition(this.tooltipPosition,this.el,this.toggletipEl.clientHeight,this.toggletipEl.clientWidth);this.isOpen=true;this.announceToggletip()};t.prototype.close=function(){this.isOpen=false;a()};t.prototype.handleBlur=function(){a();this.liveRegionEl.innerHTML=""};t.prototype.announceToggletip=function(){var t=this;this.liveRegionEl.innerHTML="";setTimeout((function(){t.liveRegionEl.innerHTML=t.tooltip}),10)};t.prototype.setToggletipPosition=function(t,o,e,r){if(t.includes("bottom")&&s(o,e)){t=t.replace("bottom","top")}else if(t.includes("top")&&l(o,e)){t=t.replace("top","bottom")}if(t.includes("left")&&p(o,r)){t=t.replace("left","right")}else if(t.includes("right")&&h(o,r)){t=t.replace("right","left")}};t.prototype.render=function(){var t=this;return e(r,{class:"size-".concat(this.targetSize)},e("button",{class:"button",type:"button","aria-label":this.label,onClick:function(){return t.open()},onMouseEnter:function(){return c(t.tooltipPosition,t.el,t.tooltipMessage)},onMouseLeave:function(){return a()},onFocus:function(){return c(t.tooltipPosition,t.el,t.tooltipMessage)},onBlur:function(){return t.handleBlur()}}),e("div",{ref:function(o){return t.toggletipEl=o},class:"toggletip ".concat(this.isOpen?"":"hidden"," ").concat(this.tooltipPosition)},this.tooltip),e("div",{ref:function(o){return t.liveRegionEl=o},class:"live-region sr-only",role:"status","aria-live":"polite","aria-atomic":"true"}))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});return t}());g.style=m}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as o,g as s,f as r}from"./p-568c595f.js";import{i as n,d as a,t as l,a as h,k as c,y as d}from"./p-e995f7f0.js";import{g as p}from"./p-d79fdf0b.js";const m=class{constructor(i){t(this,i),this.wmOptionSelected=e(this,"wmOptionSelected",7),this.wmOptionDeselected=e(this,"wmOptionDeselected",7),this.intCloneClicked=e(this,"intCloneClicked",7),this.wmKeyUpPressed=e(this,"wmKeyUpPressed",7),this.wmKeyDownPressed=e(this,"wmKeyDownPressed",7),this.wmEscKeyPressed=e(this,"wmEscKeyPressed",7),this.wmHomeKeyPressed=e(this,"wmHomeKeyPressed",7),this.wmEndKeyPressed=e(this,"wmEndKeyPressed",7),this.wmEnterKeyPressed=e(this,"wmEnterKeyPressed",7),this.wmLetterPressed=e(this,"wmLetterPressed",7),this.wmOptionBlurred=e(this,"wmOptionBlurred",7),this.value=void 0,this.subinfo=void 0,this.disabled=!1,this.selected=!1,this.focused=!1,this.searchTerm=""}get hostClasses(){let t=[];return this.subinfo&&t.push("hassubinfo"),this.parentSelectEl.multiple&&t.push("multi-option"),this.el.textContent.toLowerCase().includes(this.searchTerm)||t.push("filtered-out"),t.join(" ")}get parentSelectEl(){var t;return"WM-SELECT"!==(null===(t=this.el.parentElement)||void 0===t?void 0:t.nodeName)?this.el.getRootNode().host:this.el.parentElement}handleKeydown(t){switch(t.key){case"ArrowUp":t.preventDefault(),this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":t.preventDefault(),this.wmKeyDownPressed.emit(this.el);break;case"Enter":t.preventDefault(),this.disabled||(this.el.click(),this.wmEnterKeyPressed.emit(this.el));break;case"Escape":t.preventDefault(),t.stopPropagation(),this.wmEscKeyPressed.emit();break;case"Home":t.preventDefault(),this.wmHomeKeyPressed.emit();break;case"End":t.preventDefault(),this.wmEndKeyPressed.emit();break;default:1===t.key.length&&(t.preventDefault(),this.wmLetterPressed.emit({letter:t.key,optionEl:this.el}))}}handleSelection(){this.disabled||(this.el.classList.contains("clone")?this.intCloneClicked.emit(this.el):this.parentSelectEl.multiple&&this.selected?this.wmOptionDeselected.emit(this.el):this.wmOptionSelected.emit(this.el))}handleBlur(t){this.wmOptionBlurred.emit({relatedTarget:t.relatedTarget})}syncAriaSelected(){this.el.setAttribute("aria-selected",this.selected?"true":"false")}syncAriaDisabled(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")}updateDisabledOnClick(){this.disabled&&this.el.onclick?(this.onClickFunc=this.el.onclick,this.el.onclick=null):!this.disabled&&this.onClickFunc&&(this.el.onclick=this.onClickFunc)}handleSearch(t){if(this.searchTerm=t.detail.searchTerm.toLowerCase(),this.searchTerm&&this.el.textContent.toLowerCase().includes(this.searchTerm)){const t=this.el.textContent.toLowerCase().indexOf(this.searchTerm),e=this.el.textContent.slice(0,t),i=this.el.textContent.slice(t,t+this.searchTerm.length),o=this.el.textContent.slice(t+this.searchTerm.length),s=document.createElement("span");s.textContent=e;const r=document.createElement("strong");r.textContent=i;const n=document.createElement("span");n.textContent=o,this.textEl.innerHTML="",this.textEl.appendChild(s),this.textEl.appendChild(r),this.textEl.appendChild(n)}else this.textEl.textContent=this.el.textContent}componentWillLoad(){this.syncAriaSelected(),this.syncAriaDisabled(),this.updateDisabledOnClick(),this.parentSelectEl.addEventListener("wmSelectSearchChanged",(t=>this.handleSearch(t)))}render(){return i(o,{role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},i("div",{class:"option-wrapper "+(this.parentSelectEl.multiple?"checkbox":"")},i("span",{class:"option-text","aria-hidden":"true",ref:t=>this.textEl=t},this.el.textContent),i("span",{class:"sr-only"},this.el.textContent)),i("div",{class:"subinfo"},this.subinfo))}get el(){return s(this)}static get watchers(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"]}}};m.style=':host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.checkbox:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f131";display:inline-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background-selected);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){color:var(--wmcolor-select-option-text-disabled);background:var(--wmcolor-select-option-background-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host([aria-disabled=true]) .subinfo{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.clone.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;gap:16px}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:-ms-flexbox;display:flex}.option-text{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus){outline:none;background:var(--wmcolor-select-option-background-hover)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}';const b=class{constructor(i){t(this,i),this.wmSelectDidLoad=e(this,"wmSelectDidLoad",7),this.wmSelectBlurred=e(this,"wmSelectBlurred",7),this.wmSelectSearchChanged=e(this,"wmSelectSearchChanged",7),this.wmSelectAllSelected=e(this,"wmSelectAllSelected",7),this.wmSelectAllDeselected=e(this,"wmSelectAllDeselected",7),this.selectAllMessage=n.formatMessage({id:"select.selectAll",defaultMessage:"Select All"}),this.deselectAllMessage=n.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"}),this.allOptionsSelectedMessage=n.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"}),this.allOptionsDeselectedMessage=n.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"}),this.keysSoFar="",this.searchIndex=0,this.openUp=!1,this.overflowCount=0,this.displayedOptions=[],this.debouncedClearKeysSoFar=a((()=>{this.keysSoFar=""}),500),this.debouncedSearch=a((()=>{this.wmSelectSearchChanged.emit({searchTerm:this.searchTerm}),this.announce(this.filteredOptions.length?this.resultsFoundMessage:this.noResultsFoundMessage)}),150),this.disabled=!1,this.maxHeight=void 0,this.label=void 0,this.labelPosition="top",this.requiredField=!1,this.errorMessage=void 0,this.multiple=!1,this.search=!1,this.selectAll=!1,this.placeholder=n.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"}),this.searchPlaceholder=n.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"}),this.allSelectedMessage=n.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"}),this.isExpanded=!1,this.announcement=""}get childOptions(){return Array.from(this.el.querySelectorAll("wm-option"))}get cloneOptions(){return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"))}get allOptionEls(){return this.cloneOptions.concat(this.childOptions)}get visibleOptionEls(){return this.allOptionEls.filter((t=>!t.classList.contains("hidden")&&!t.classList.contains("filtered-out")))}get isDisabled(){return l(this.disabled)}get searchTerm(){return this.searchFieldEl?this.searchFieldEl.value:""}get filteredOptions(){return this.childOptions.filter((t=>{var e;return null===(e=t.textContent)||void 0===e?void 0:e.toLowerCase().includes(this.searchTerm.toLowerCase())}))}get selectedOptions(){return Array.from(this.el.querySelectorAll("wm-option")).filter((t=>t.selected))}get allSelected(){return this.childOptions.every((t=>t.selected))}get visibleSelectAllButton(){return this.selectAll&&this.multiple&&""===this.searchTerm}get resultsFoundMessage(){return n.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})}get noResultsFoundMessage(){return n.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})}handleOptionSelection(t){this.focusOption(t.detail),this.multiple||this.close()}handleOptionCloneSelection(t){this.findCorrespondingOption(t.detail).click()}handleChildEnter(){this.close()}handleChildUp(t){this.moveUp(t.detail)}handleChildDown(t){this.moveDown(t.detail)}moveToFirstOption(){this.focusOption(this.visibleOptionEls[0])}moveToLastOption(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])}closePopupOnEscape(){this.close()}handleOptionBlur(t){if(!this.isElOrChild(t.detail.relatedTarget)){const e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget,this.el.dispatchEvent(e)}}handleClick(t){this.isElOrChild(t.target)||this.close()}handleSelectAllClick(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()}selectAllOptions(){this.announce(this.allOptionsSelectedMessage),this.wmSelectAllSelected.emit()}deselectAllOptions(){this.announce(this.allOptionsDeselectedMessage),this.wmSelectAllDeselected.emit()}handleButtonBlur(t){this.isElOrChild(t.relatedTarget)&&t.stopPropagation()}handleSearchFieldBlur(t){this.searchFieldWrapperEl.classList.remove("focus"),this.isElOrChild(t.relatedTarget)&&t.stopPropagation()}handleKey(t){switch(t.key){case"ArrowDown":!1===this.isExpanded&&(t.preventDefault(),this.open("next"));break;case"ArrowUp":!1===this.isExpanded&&(t.preventDefault(),this.open("previous"))}}componentWillLoad(){this.label||console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`)."),this.multiple||0!==this.selectedOptions.length||console.error("wm-select should have one initial option selected"),h(this.el,this.isDisabled),new MutationObserver((t=>t.forEach((t=>this.handleChildChange(t))))).observe(this.el,{childList:!0,attributes:!0,subtree:!0,attributeFilter:["selected"]})}handleChildChange(t){this.setButtonText(),r(this.el)}componentDidLoad(){this.wmSelectDidLoad.emit(),this.dropdownEl.classList.add("hidden"),r(this.el),this.maxHeight&&(this.listboxEl.style.maxHeight=this.maxHeight),this.multiple&&this.updateOptionVisibility(),this.setButtonText()}componentWillUpdate(){if(this.multiple){const t=this.visibleOptionEls.filter((t=>t.classList.contains("clone"))),e=t.length===this.visibleOptionEls.length;t.forEach(((i,o)=>{e||o!==t.length-1?i.classList.remove("last"):i.classList.add("last")}))}}moveUp(t){const e=this.visibleOptionEls;this.selectAllEl&&e.unshift(this.selectAllEl),this.searchFieldEl&&e.unshift(this.searchFieldEl);const i=e[e.indexOf(t)-1]||e[e.length-1];i&&this.focusOption(i)}moveDown(t){const e=this.visibleOptionEls;this.selectAllEl&&e.unshift(this.selectAllEl),this.searchFieldEl&&e.unshift(this.searchFieldEl);const i=e[e.indexOf(t)+1]||e[0];i&&this.focusOption(i)}open(t){this.isDisabled||(this.openUp=c(this.el,this.dropdownEl.clientHeight,this.el.clientHeight,this.buttonEl.clientHeight),this.isExpanded=!0,this.dropdownEl.classList.remove("hidden"),window.requestAnimationFrame((()=>{switch(t){case"next":this.search?(this.searchFieldEl.focus(),this.listboxEl.scrollTop=0):this.moveDown(this.visibleOptionEls.filter((t=>t.selected)).slice(-1)[0]);break;case"previous":this.search?this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1]):this.moveUp(this.visibleOptionEls.filter((t=>t.selected))[0]);break;default:this.search?(this.searchFieldEl.focus(),this.listboxEl.scrollTop=0):this.focusOption(this.selectedOptions.length>0?this.visibleOptionEls.filter((t=>t.selected))[0]:this.visibleOptionEls[0])}})))}close(t=!0){this.isExpanded&&(this.isExpanded=!1,this.allOptionEls.map((t=>t.focused=!1)),window.setTimeout((()=>{this.dropdownEl.classList.add("hidden"),this.multiple&&this.updateOptionVisibility(),this.search&&(this.searchFieldEl.value="",this.wmSelectSearchChanged.emit({searchTerm:this.searchTerm})),t&&this.buttonEl.focus()}),150))}updateOptionVisibility(){this.childOptions.forEach(((t,e)=>{const i=this.cloneOptions[e];t.selected?(t.classList.add("hidden"),i.classList.remove("hidden")):(t.classList.remove("hidden"),i.classList.add("hidden"))}))}focusOption(t){this.allOptionEls.forEach((e=>e.focused=e===t)),t.scrollIntoView({block:"nearest"}),window.setTimeout((()=>t.scrollIntoView({block:"nearest"})),60),t.focus()}findAndFocusOption(t){const e=t.detail.letter.toLowerCase(),i=t.detail.optionEl;if(this.keysSoFar||" "!=e){this.keysSoFar||this.visibleOptionEls.forEach(((t,e)=>{t.focused&&(this.searchIndex=e)})),this.keysSoFar+=e;let t=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);t||(t=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)),t&&this.focusOption(t),this.debouncedClearKeysSoFar()}else i.click()}findMatchInRange(t,e,i){let o=null;return t.slice(e,i).forEach((t=>{const e=t.textContent;!o&&e&&e.toLowerCase().startsWith(this.keysSoFar)&&(o=t)})),o}findCorrespondingOption(t){return t.classList.contains("clone")?this.childOptions[this.cloneOptions.indexOf(t)]:this.cloneOptions[this.childOptions.indexOf(t)]}isElOrChild(t){var e;return t===this.el||this.el.contains(t)||(null===(e=this.el.shadowRoot)||void 0===e?void 0:e.contains(t))}announceError(){this.errorMessage&&setTimeout((()=>this.announce(this.errorMessage)),100)}handleDisabledChange(){h(this.el,this.isDisabled)}handleComponentBlur(t){this.el.contains(t.relatedTarget)||(this.close(!1),this.wmSelectBlurred.emit())}handleKeyDown(t){const e=t.target;switch(t.key){case"ArrowDown":t.preventDefault(),this.moveDown(t.target);break;case"ArrowUp":t.preventDefault(),this.moveUp(t.target);break;case"Escape":t.preventDefault(),this.close();break;case"Enter":e===this.selectAllEl&&(t.preventDefault(),this.handleSelectAllClick(),this.close());break;case" ":e===this.selectAllEl&&(t.preventDefault(),this.handleSelectAllClick())}}setButtonText(){if(this.displayedOptions=this.childOptions.filter((t=>t.selected)).map((t=>t.classList.contains("hidden")?this.findCorrespondingOption(t):t)),this.multiple){const t=38,e=window.getComputedStyle(this.buttonEl),i=parseInt(e.getPropertyValue("padding-left").slice(0,-2)),o=parseInt(e.getPropertyValue("padding-right").slice(0,-2)),s=this.buttonEl.clientWidth-i-o-t;let r=this.displayedOptions.map((t=>t.shadowRoot.querySelector(".option-text").clientWidth)),n=r.reduce(((t,e)=>t+e),0);for(this.overflowCount=0;n>s&&this.displayedOptions.length>1;)this.overflowCount++,n-=r[r.length-1],r.pop(),this.displayedOptions.pop()}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}renderButtonText(){return this.multiple&&this.displayedOptions.length<1?i("span",null,this.placeholder):this.multiple&&this.allSelected&&this.overflowCount>0?this.allSelectedMessage:this.displayedOptions.map(((t,e)=>i("span",null,e>0?", ":"",t.textContent)))}renderOverflowCount(){if(this.overflowCount>0&&!this.allSelected)return i("span",null,i("span",{class:"overflow-counter"},"+",this.overflowCount))}renderSearchField(){return i("div",{class:"search"},i("div",{class:"searchfield-wrapper",ref:t=>this.searchFieldWrapperEl=t},i("div",{class:"icon"}),i("input",{ref:t=>this.searchFieldEl=t,class:"searchfield",role:"combobox","aria-controls":"list","aria-expanded":this.isExpanded?"true":"false",onKeyDown:t=>this.handleKeyDown(t),onFocus:()=>this.searchFieldWrapperEl.classList.add("focus"),onBlur:t=>this.handleSearchFieldBlur(t),onInput:()=>this.debouncedSearch(),placeholder:this.searchPlaceholder})))}renderSearchFailedMessage(){return i("div",{class:"search-results-message"},this.noResultsFoundMessage)}renderSelectAllButton(){return i("button",{ref:t=>this.selectAllEl=t,class:"select-all",onClick:()=>this.handleSelectAllClick(),onKeyDown:t=>this.handleKeyDown(t),tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)}renderCloneOptions(){return Array.from(this.el.children).map((t=>i("wm-option",{class:"clone",subinfo:t.subinfo,selected:t.selected},t.textContent)))}render(){const t=!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo,e={id:"selectbtn",disabled:this.isDisabled,"aria-controls":"list","aria-labelledby":"label selectbtn","aria-describedby":"error","aria-expanded":this.isExpanded?"true":"false",onClick:()=>this.isExpanded?this.close():this.open()};return i(o,{onBlur:t=>this.handleComponentBlur(t)},i("div",{class:`wrapper ${d()} label-${this.labelPosition} ${this.errorMessage?"invalid":""}`},i("div",{class:"label-wrapper"},i("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?i("span",{class:"required"},i("span",{class:"sr-only"},p.requiredField),i("span",{"aria-hidden":"true"},"*")):"")),i("div",{class:"button-wrapper"},i("button",Object.assign({},e,{class:"displayedoption",ref:t=>this.buttonEl=t,onBlur:t=>this.handleButtonBlur(t),onFocus:()=>this.close()}),i("span",{class:"overflowcontrol "+(t?"hassubinfo":"")},i("span",{class:"button-text"},this.renderButtonText()),t&&i("span",{class:"subinfo"},this.selectedOptions[0].subinfo)),this.renderOverflowCount()),i("div",{class:`dropdown ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,ref:t=>this.dropdownEl=t},this.search&&this.renderSearchField(),this.visibleSelectAllButton&&this.renderSelectAllButton(),i("div",{id:"list",class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label",ref:t=>this.listboxEl=t},this.search&&0===this.filteredOptions.length&&this.renderSearchFailedMessage(),this.multiple&&this.renderCloneOptions(),i("slot",null))),i("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage),i("div",{id:"announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:t=>this.liveRegionEl=t},this.announcement))))}static get delegatesFocus(){return!0}get el(){return s(this)}static get watchers(){return{errorMessage:["announceError"],disabled:["handleDisabledChange"]}}};b.style=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.wrapper .button-wrapper>.dropdown.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.options-wrapper{max-height:12.5rem;overflow:auto}.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-selectall-border);background:var(--wmcolor-select-selectall-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-selectall-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-all:hover,.select-all:focus{outline:none;background:#f4f4f4}.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';export{m as wm_option,b as wm_select}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as r,g as e}from"./p-568c595f.js";import{t as s,a as o,b as a}from"./p-e995f7f0.js";import{g as n}from"./p-d79fdf0b.js";const l=class{constructor(r){t(this,r),this.wmInputValueChanged=i(this,"wmInputValueChanged",7),this.previousValue="",this.label=void 0,this.labelPosition="top",this.value="",this.disabled=!1,this.info=void 0,this.inputWidth="",this.placeholder="",this.requiredField=!1,this.errorMessage=void 0,this.characterLimit=void 0,this.symbolBefore=void 0,this.symbolAfter=void 0,this.textAfter=void 0,this.type="text",this.step=1,this.min=void 0,this.max=void 0,this.isSubmit=!1,this.announcement=""}getInputWidth(){return this.inputWidth?{width:this.inputWidth}:{flex:"1"}}get charCount(){return this.value.length}get isDisabled(){return s(this.disabled)}componentWillLoad(){this.label||console.error("wm-input requires the label property"),o(this.el,this.isDisabled)}componentDidLoad(){this.previousValue=this.inputEl.value}handleDisabledChange(){o(this.el,this.isDisabled)}announceError(){this.errorMessage&&setTimeout((()=>this.announce(this.errorMessage)),100)}handleInput(t){this.value=t.target.value,this.characterLimit&&this.charCount>=this.characterLimit-5&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit))}handleKeyDown(t){const i=t.ctrlKey||t.metaKey||t.altKey;/^.$/.test(t.key)&&!i&&this.characterLimit&&this.inputEl.value.length>=this.characterLimit&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit)),"Enter"===t.key&&this.isSubmit&&a(this.el.closest("form"))}handleBlur(){this.value!==this.previousValue&&this.wmInputValueChanged.emit({value:this.value}),this.previousValue=this.value,this.inputWrapperEl.classList.remove("focus")}handleFocus(){this.inputWrapperEl.classList.add("focus")}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}generateCharacterLimitWarning(t,i){let r=n.getCharactersEntered(t,i);return t>=i&&(r+=` ${n.characterLimitReached}`),r}descriptors(){return this.symbolBefore||this.symbolAfter||this.textAfter?"symbol-before inputfield symbol-after text-after info error":"info error"}render(){return r("div",{class:`wrapper label-${this.labelPosition} ${this.errorMessage?"invalid":""}`,ref:t=>this.inputWrapperEl=t},r("div",{class:"label-wrapper"},r("label",{htmlFor:"inputfield",class:"label"},this.label,this.characterLimit&&r("span",{class:"sr-only"}," ",n.getCharacterLimit(this.characterLimit)),this.requiredField&&r("span",{class:"required","aria-hidden":"true"},"*"))),r("div",{class:"inner-wrapper"},r("div",{class:"text-after-wrapper"},r("div",{class:"inputfield-wrapper "+(this.isDisabled?"disabled":""),style:this.getInputWidth()},this.symbolBefore&&r("span",{class:"symbol",id:"symbol-before"},this.symbolBefore),r("input",{ref:t=>this.inputEl=t,id:"inputfield",disabled:this.isDisabled,"aria-describedby":this.descriptors(),onInput:t=>this.handleInput(t),onKeyDown:t=>this.handleKeyDown(t),onBlur:()=>this.handleBlur(),onFocus:()=>this.handleFocus(),placeholder:this.placeholder,autocomplete:"off","aria-required":this.requiredField?"true":null,maxLength:this.characterLimit||void 0,type:this.type,step:this.step,max:this.max,min:this.min,value:this.el.value}),this.symbolAfter&&r("span",{class:"symbol",id:"symbol-after"},this.symbolAfter),this.characterLimit&&"number"==typeof this.characterLimit?r("div",{class:"character-count"},this.charCount,"/",this.characterLimit):""),this.textAfter&&r("span",{class:"text-after",id:"text-after"},this.textAfter)),this.info&&r("div",{id:"info",class:"info"},this.info),r("div",{id:"error",class:"error-message"},this.errorMessage),r("div",{class:"sr-only","aria-live":"polite","aria-atomic":"true",ref:t=>this.liveRegionEl=t},this.announcement)))}static get delegatesFocus(){return!0}get el(){return e(this)}static get watchers(){return{disabled:["handleDisabledChange"],errorMessage:["announceError"]}}};l.style=':host{font-family:inherit;width:100%}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper{width:100%}:host .wrapper .text-after-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px}:host .wrapper .text-after{-ms-flex:0 1 fit-content;flex:0 1 fit-content}:host .wrapper .inputfield-wrapper{height:2.5rem;min-width:6.25rem;border:1px solid var(--wmcolor-input-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:-ms-flexbox;display:flex}:host .wrapper .inputfield-wrapper.disabled{background-color:var(--wmcolor-input-background-disabled);color:var(--wmcolor-input-text-disabled)}:host .wrapper .inputfield-wrapper.disabled .symbol{background:none}:host .wrapper .symbol{display:-ms-flexbox;display:flex;background-color:var(--wmcolor-input-unit-background);-ms-flex:0 0 44px;flex:0 0 44px;padding-inline:8px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .wrapper .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:var(--wmcolor-input-charcount-background);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .wrapper input{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:none;font-family:inherit;font-size:0.875rem;height:100%;-ms-flex:1;flex:1;padding:0.75rem 1rem;width:100%}:host .wrapper input:focus{outline:none}:host .wrapper input[type=number]{padding-right:0}:host .wrapper .info{font-style:italic;line-height:100%;margin:4px 0}:host .wrapper.invalid .inputfield-wrapper{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper.invalid .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;line-height:100%}:host .wrapper.invalid .error-message:not(:empty){margin-top:0.25rem}:host .wrapper:focus .inputfield-wrapper,:host .wrapper.focus .inputfield-wrapper{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{l as wm_input}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as t,g as e}from"./p-568c595f.js";const l=class{constructor(t){s(this,t),this.showInfo="last-updated"}render(){return t("div",{role:"list",class:"list-wrapper"},t("slot",null))}static get delegatesFocus(){return!0}get el(){return e(this)}};l.style=":host{display:block}.list-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0.5rem}";export{l as wm_file_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-ab8d78cc.system.js"],(function(t){"use strict";var o,e,r,n;return{setters:[function(t){o=t.r;e=t.c;r=t.h;n=t.g}],execute:function(){var i=":host{list-style:none;border-bottom:1px solid var(--wmcolor-navigator-item-border);width:100%;display:block;cursor:pointer}:host .navoption{color:var(--wmcolor-navigator-item-text);padding:0.9375rem 1.25rem;background:var(--wmcolor-navigator-item-background);font-size:0.875rem}:host .navoption.selected,:host .navoption:hover{background:var(--wmcolor-navigator-item-background-hover)}:host .navoption.focused:not(.selected){background:var(--wmcolor-navigator-item-background-focus);opacity:1}";var a=t("priv_navigator_item",function(){function t(t){o(this,t);this.keydownOnNavItem=e(this,"keydownOnNavItem",7);this.selected=false;this.focused=false;this.link=""}t.prototype.handleKeyDown=function(t){var o=t.key;var e=this.el;if(o!=="Tab"){t.preventDefault()}this.keydownOnNavItem.emit({navItem:e,key:o})};t.prototype.render=function(){var t=this.selected?"selected":"";var o=this.focused?"focused":"";return r("div",{class:"navoption ".concat(t," ").concat(o)},r("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());a.style=i}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-ab8d78cc.system.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.r;n=e.h;r=e.g}],execute:function(){var l=":host{display:block}.list-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0.5rem}";var s=e("wm_file_list",function(){function e(e){t(this,e);this.showInfo="last-updated"}e.prototype.render=function(){return n("div",{role:"list",class:"list-wrapper"},n("slot",null))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return e}());s.style=l}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,i,s){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function o(t){try{u(s.next(t))}catch(t){r(t)}}function a(t){try{u(s["throw"](t))}catch(t){r(t)}}function u(t){t.done?i(t.value):n(t.value).then(o,a)}u((s=s.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return u([t,e])}}function u(a){if(s)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(s=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];n=0}finally{s=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js","./p-1ac66a15.system.js"],(function(t){"use strict";var e,i,s,n,r,o,a,u,l;return{setters:[function(t){e=t.r;i=t.c;s=t.h;n=t.H;r=t.g},function(t){o=t.t;a=t.i;u=t.a},function(t){l=t.g}],execute:function(){var c=':host{--wmcolor-search-background:var(--wmcolor-input-background);--wmcolor-search-border:var(--wmcolor-input-border);--wmcolor-search-jump-text-focus:var(--wmcolor-interactive-focus);--wmcolor-search-jump-text:var(--wmcolor-button-text-textonly);width:100%;font-size:0.875rem}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wm-search-wrapper{border-radius:3px;position:relative;border:1px solid var(--wmcolor-search-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .wm-search-wrapper .search-icon{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1.12rem;position:absolute;left:0.4375rem}:host .wm-search-wrapper input{border:none;height:40px;padding:0 1.75rem;background:var(--wmcolor-search-background);overflow:visible;width:100%;-ms-flex:1;flex:1;font-family:inherit}:host .wm-search-wrapper:focus-within{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wm-search-wrapper:focus-within input{outline:none}:host .find{min-height:3rem}:host .find input{padding:16px 8px 16px 28px}:host .find .wm-find-elements{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding-right:16px}:host .find .wm-find-elements wm-button+wm-button{margin-left:0.25rem}:host .find .wm-find-elements .results{margin-right:0.5rem;font-style:italic}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .jump-results{all:unset;color:var(--wmcolor-search-jump-text);text-decoration:none;font-weight:500;font-size:0.875rem;display:inline-block;margin:8px 0}:host .jump-results:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}';var h=t("wm_search",function(){function t(t){e(this,t);this.wmSearchBrowseResults=i(this,"wmSearchBrowseResults",7);this.wmSearchValueChanged=i(this,"wmSearchValueChanged",7);this.linkEl=null;this.searchType="basic";this.disabled=false;this.placeholder="";this.label="";this.numResults=0;this.value="";this.isTabbing=false;this.highlightedId="";this.highlightedName=null;this.highlightedNum=0;this.previousBlurredValue="";this.parentModal=undefined;this.announcement=""}Object.defineProperty(t.prototype,"isDisabled",{get:function(){return o(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"resultCount",{get:function(){var t="";var e=a.formatMessage({id:"search.resultsFound",defaultMessage:"{numResults, plural, =0 {No results} one {1 result} other {# results}} found"},{numResults:this.numResults});var i=a.formatMessage({id:"search.xOfYResults",defaultMessage:"{numResults, plural, =0 {No results found} other {{current} of {numResults} results}}"},{numResults:this.numResults,current:this.highlightedNum});if(this.searchType==="basic"){t=e}else if(this.searchType==="find"){t=i}return t},enumerable:false,configurable:true});t.prototype.toggleTabbingOn=function(){this.isTabbing=true;this.linkEl&&this.linkEl.classList.remove("sr-only");this.linkEl&&this.linkEl.classList.add("user-is-tabbing")};t.prototype.toggleTabbingOff=function(){this.isTabbing=false;this.linkEl&&this.linkEl.classList.add("sr-only");this.linkEl&&this.linkEl.classList.remove("user-is-tabbing")};t.prototype.componentWillLoad=function(){if(this.placeholder===""){console.error("You must set the placeholder property for the wm-search component.")}if(this.label===""){console.error("You must set the label property for the wm-search component.")}this.hookToModal();u(this.el,this.isDisabled)};t.prototype.hookToModal=function(){var t=this;var e=this.el;while(!!e){if(e.tagName==="WM-MODAL"){this.parentModal=e}e=e.parentElement}if(this.parentModal){var i=["wmModalCloseTriggered","wmModalPrimaryTriggered","wmModalSecondaryTriggered"];i.map((function(e){t.parentModal.addEventListener(e,(function(){t.updateValue("")}))}))}};t.prototype.updateValue=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.value=t;this.resetHighlightCountToStart();return[2]}))}))};t.prototype.handleNumResultsUpdate=function(){this.resetHighlightCountToStart();if(this.value){this.announceChanges()}};t.prototype.handleDisabledChange=function(){u(this.el,this.isDisabled)};t.prototype.resetHighlightCountToStart=function(){if(this.searchType==="find"){this.highlightedNum=this.numResults?1:0}};t.prototype.announce=function(t){if(this.resultsLiveRegion.textContent===t){t+=" "}this.announcement=t};t.prototype.announceChanges=function(){var t=this;window.requestAnimationFrame((function(){var e=t.resultCount;if(t.searchType==="find"&&t.highlightedName){e+=", ".concat(t.highlightedName)}t.announce(e)}))};t.prototype.changeHighlightedNum=function(t){if(this.numResults){if(t<1){this.highlightedNum=this.numResults}else if(t>this.numResults){this.highlightedNum=1}else{this.highlightedNum=t}this.wmSearchBrowseResults.emit({position:this.highlightedNum});this.announceChanges()}};t.prototype.handleBlur=function(){if(this.previousBlurredValue!==this.value){this.wmSearchValueChanged.emit({value:this.value})}this.previousBlurredValue=this.value};t.prototype.renderResultsAndBrowseButtons=function(){var t=this;return s("div",{class:"wm-find-elements"},s("div",{id:"results-display",class:"results"},!!this.value&&this.resultCount),s("div",{class:"wm-button-collection"},s("wm-button",{"button-type":"icononly",icon:"f05d",tooltip:l.previous,"tooltip-position":"bottom",onClick:function(){return t.changeHighlightedNum(t.highlightedNum-1)},disabled:this.isDisabled||this.numResults<2,"label-for-identical-buttons":a.formatMessage({id:"search.previousResult",defaultMessage:"Press to hear previous matching result"})}),s("wm-button",{"button-type":"icononly",icon:"f045",tooltip:l.next,"tooltip-position":"bottom",onClick:function(){return t.changeHighlightedNum(t.highlightedNum+1)},disabled:this.isDisabled||this.numResults<2,"label-for-identical-buttons":a.formatMessage({id:"search.nextResult",defaultMessage:"Press to hear next matching result"})})))};t.prototype.renderJumpToLink=function(){var t=this;if(this.numResults&&this.highlightedId){return s("a",{ref:function(e){return t.linkEl=e},href:"#".concat(this.highlightedId),class:"jump-results sr-only"},a.formatMessage({id:"search.jumpToResult",defaultMessage:"Jump to search result in list"}))}else{return null}};t.prototype.render=function(){var t=this;return s(n,null,s("div",{id:"wm-search-wrapper",class:"wm-search-wrapper ".concat(this.searchType)},s("input",{disabled:this.isDisabled,id:"wm-search-input",placeholder:this.placeholder,"aria-label":"".concat(this.label?this.label+". ":"").concat(a.formatMessage({id:"search.typeToFilterResults",defaultMessage:"Type to filter the results"})),onInput:function(e){return t.updateValue(e.target.value)},onBlur:function(){return t.handleBlur()},"aria-autocomplete":"none",autocomplete:"off",value:this.value}),s("span",{class:"mdi search-icon"},String.fromCodePoint(parseInt("0xf349"))),this.searchType==="find"&&this.renderResultsAndBrowseButtons(),s("div",{id:"wm-search-live",class:"sr-only","aria-live":"polite","aria-atomic":"true",ref:function(e){return t.resultsLiveRegion=e}},this.announcement)),this.searchType==="find"&&this.renderJumpToLink())};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{numResults:["handleNumResultsUpdate"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return t}());h.style=c}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as r,h as i,H as s,g as a}from"./p-
|
|
1
|
+
import{r as t,c as r,h as i,H as s,g as a}from"./p-568c595f.js";import{a as o}from"./p-2732bddd.js";import{n as e,o as n,i as h}from"./p-e995f7f0.js";const c=class{constructor(i){t(this,i),this.wmNavigatorLogout=r(this,"wmNavigatorLogout",7),this.retrievedInfo=!this.loadFromUserinfo,this.parsedProducts=[],this.openRight=!1,this.userName=void 0,this.email=void 0,this.authType=1,this.connectionName=void 0,this.logoutUrl=void 0,this.products=void 0,this.loadFromUserinfo=!1,this.isOpen=!1,this.itemIndexToFocus=0}isSafeUrl(t){let r=!1;return["digitalmeasures\\.com","evalkit\\.info","evaluationkit\\.com","evaluationkit\\.info","lat_ams\\.com","livetext\\.com","smartcatalogiq\\.com","smartcatalogiq\\.net","smartcatalogiq\\.us","taskstream\\.com","vialivetext\\.com","watermarkinsights\\.com"].forEach((i=>{t&&t.match(`^https://(.*.)?${i}(/.*)?$`)&&(r=!0)})),r}async componentWillLoad(){this.userName||console.error("wm-navigator: user-name is a required property."),await this.parseData(),this.setFocusIndex()}async parseData(){this.loadFromUserinfo?await(async()=>{const t=await fetch("/platform/navigator/userinfo");if(t&&t.ok)return await t.json();throw new Error(t.statusText)})().then((t=>{this.email=t.email,this.currentProductId=t.current_product_id,this.parsedProducts=this.productKeysToCamelCase(t.products),this.logoutUrl=this.logoutUrl?this.logoutUrl:t.logout_url,this.connectionName=this.connectionName?this.connectionName:t.connection_name,this.email&&this.currentProductId&&(this.retrievedInfo=!0)})).catch((t=>{console.error(t)})):(this.currentProductId=o(this.el),this.products&&(this.parsedProducts="string"==typeof this.products?JSON.parse(this.products):this.products,this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts))),this.parsedProducts.sort(((t,r)=>t.name<r.name?-1:1))}productKeysToCamelCase(t){return t.map((t=>{const r=Object.keys(t);let i={};return r.forEach((r=>{i[e(r)]=t[r]})),i}))}setFocusIndex(){if(this.parsedProducts.length>1){const t=this.getProduct(this.currentProductId);t&&(this.itemIndexToFocus=this.parsedProducts.indexOf(t))}}handleKeys(t){switch(t.key){case"Escape":t.preventDefault(),this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault(),this.isOpen||(this.itemIndexToFocus=n(this.itemIndexToFocus,t.key,this.navigatorItems.length),this.openMenu())}}handleKeydown(t){const r=t.detail.key,i=t.detail.navItem;switch(r){case"Tab":this.closeMenu(!1);break;case"Enter":case" ":i.click();break;case"ArrowDown":case"ArrowUp":const t=this.itemIndexToFocus;this.itemIndexToFocus=n(this.itemIndexToFocus,r,this.navigatorItems.length),this.focusItem(),this.unfocusItem(t)}}handleClick(t){t.target!==this.el&&!this.el.contains(t.target)&&this.isOpen&&this.closeMenu(!1)}handleButtonClick(){this.isOpen?this.closeMenu():this.openMenu()}openMenu(){if(this.wrapperEl){const t=this.wrapperEl.clientWidth,r=this.el.getBoundingClientRect().left,i=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>r&&i>r}this.isOpen=!0,this.focusItem()}closeMenu(t=!0){this.isOpen=!1,window.requestAnimationFrame((()=>{this.unfocusItem(this.itemIndexToFocus),this.setFocusIndex(),t&&this.buttonFocusHandler()}))}focusItem(){const t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0,t.focused=!0,window.requestAnimationFrame((()=>t.focus()))}unfocusItem(t){const r=this.navigatorItems[t];r.tabIndex=-1,r.focused=!1}buttonFocusHandler(){this.el.shadowRoot.querySelector("priv-navigator-button").shadowRoot.querySelector("button").focus()}renderUserInfo(){return i("div",{class:"user",id:"wm-nav-user","aria-label":h.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},i("p",null,this.userName),i("p",null,this.email))}setAltText(){return h.formatMessage(this.parsedProducts.length>1?{id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"}:{id:"navigator.userinfo",defaultMessage:"User information"})}renderHeading(){return i("h2",null,h.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))}renderList(){return i("ul",{role:"listbox","aria-label":`${h.formatMessage({id:"navigator.WatermarkAppNavigation",defaultMessage:"Watermark App Navigation",description:"list of applications by Watermark Insights"})}`,"aria-describedby":"wm-nav-user"},this.parsedProducts.length>1&&this.renderProductOptions(),this.renderLogoutOption())}renderProductOptions(){return this.parsedProducts.map((t=>{let r,s,a,o;if(r=t.name,s=t.iconUrl,o=this.setProductOnClick(t.id),r&&s)return a=this.currentProductId===t.id,i("priv-navigator-item",{selected:a,id:t.id,onClick:o,role:"option","aria-label":r},i("img",{src:s,alt:r}))}))}setProductOnClick(t){const r=this.getProduct(t);if(this.currentProductId===t)return()=>{};if(r){if(this.loadFromUserinfo||2===this.authType){const t=r.linkUrl;return this.isSafeUrl(t)?()=>window.location.href=t:void console.error(`"${t}" is not a safe url`)}if(3===this.authType){const t=this.connectionName?`/?connection_name=${this.connectionName}`:"",i=r.samlLinkUrl;return this.isSafeUrl(i)?()=>window.location.href=i+t:void console.error(`"${i}" is not a safe url`)}}}renderLogoutOption(){return i("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},i("span",{class:"logout"},h.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))}setLogoutOnclick(){return()=>{this.wmNavigatorLogout.emit();const t=this.logoutUrl;this.isSafeUrl(t)?window.location.href=t:console.error(`"${t}" is not a safe url`)}}get navigatorItems(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))}getProduct(t){return this.parsedProducts.find((r=>r.id===t))}render(){return this.retrievedInfo?i(s,null,i("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText()}),i("div",{class:`wrapper ${this.isOpen?"":"hide"} ${this.openRight?"right":""}`,ref:t=>this.wrapperEl=t},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""}static get delegatesFocus(){return!0}get el(){return a(this)}static get watchers(){return{products:["parseData"]}}};c.style=":host{--wmcolor-navigator-background:var(--wmcolor-background);--wmcolor-navigator-header-background:var(--wmcolor-brand-dark);--wmcolor-navigator-header-text:var(--wmcolor-text-ondark);--wmcolor-navigator-item-background-focus:var(--wmcolor-interactive-background-focus);--wmcolor-navigator-item-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigator-item-background:var(--wmcolor-background);--wmcolor-navigator-item-border:var(--wmcolor-border);--wmcolor-navigator-item-text:var(--wmcolor-text);--wmcolor-navigator-user-background:var(--wmcolor-background-readonly);min-width:0;position:relative;display:inline-block}:host .wrapper{overflow:auto;font-size:1.125rem;min-width:13.125rem;width:auto;max-height:80vh;text-align:left;position:absolute;z-index:50;top:100%;right:20px;left:auto;background:var(--wmcolor-navigator-background);letter-spacing:normal;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper .user{background:var(--wmcolor-navigator-user-background);padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper .user p{margin:0}:host .wrapper .user p:first-child{font-weight:700;text-transform:capitalize}:host .wrapper h2{background:var(--wmcolor-navigator-header-background);color:var(--wmcolor-navigator-header-text);font-weight:700;margin:0;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper [role=listbox]{list-style:none;margin:0;padding-left:0}:host .wrapper.hide{-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0)}:host .wrapper.right{right:auto;left:20px}:host img{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:left center;transform-origin:left center;display:block}:host .logout{text-align:center;text-transform:capitalize}priv-navigator-item:focus{outline:none}";export{c as wm_navigator}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as o,H as e,g as a,f as n}from"./p-568c595f.js";import{i as r,z as s,h as c,s as l}from"./p-e995f7f0.js";import{g as h}from"./p-d79fdf0b.js";const d=class{constructor(o){t(this,o),this.wmNavigationStateChanged=i(this,"wmNavigationStateChanged",7),this.mainNavigationMessage=r.formatMessage({id:"navigation.mainNavigation",defaultMessage:"Main",description:"Label describing the site navigation, for screen reader users"}),this.throttledRerender=s((()=>n(this.el)),50),this.open=!1}get isCollapsible(){return window.innerWidth<1024}get ariaExpanded(){return this.isCollapsible?this.open.toString():void 0}closeOnEscape(t){"Escape"===t.key&&(this.open=!1)}handleWindowResize(){this.throttledRerender()}handleHamburgerClicked(){this.open=!this.open}handleClickOnItem(){this.open=!1}handleStateChange(){this.isCollapsible&&(this.wmNavigationStateChanged.emit(),this.open?this.expand():this.collapse())}componentWillLoad(){this.el.focus=()=>{const t=this.open?this.el.shadowRoot.querySelector(".toggle"):document.querySelector("wm-navigation-hamburger"),i=this.el.querySelector("wm-navigation-item");this.isCollapsible?t.focus():i.focus()},this.isCollapsible&&this.open&&(this.wmNavigationStateChanged.emit(),this.expand())}redirectFocusFromBody(t){"BODY"!==document.activeElement.tagName||t.relatedTarget||this.el.focus()}expand(){document.body.tabIndex=0,document.body.addEventListener("focus",this.redirectFocusFromBody.bind(this),!0),setTimeout((()=>this.toggleEl.focus()),250)}collapse(){document.body.tabIndex=-1,document.body.removeEventListener("focus",this.redirectFocusFromBody.bind(this));const t=document.querySelector("wm-navigation-hamburger");t&&t.focus()}focusLastItem(){const t=this.el.querySelectorAll("wm-navigation-item");Array.from(t).pop().focus()}renderOverlay(){return o("div",{class:"overlay",onClick:()=>{this.open=!1}})}render(){return o(e,{role:"navigation","aria-expanded":this.ariaExpanded,"aria-label":this.mainNavigationMessage},this.open?this.renderOverlay():"",this.isCollapsible&&o("div",{class:"trapfocus",tabindex:this.open?0:void 0,onFocus:()=>this.focusLastItem()}),o("div",{class:"tray"},o("div",{class:"toggle-wrapper"},o("wm-button",{ref:t=>this.toggleEl=t,class:"toggle","button-type":"navigational",icon:this.open?"f156":"f35c","icon-size":"2rem",tooltip:this.open?h.close:h.open,"tooltip-position":"right",tabIndex:this.open?void 0:-1,onClick:()=>{this.open=!this.open}})),o("ul",{class:"navlist"},o("slot",null))),this.isCollapsible&&o("div",{class:"trapfocus",tabindex:this.open?0:void 0,onFocus:()=>this.toggleEl.focus()}))}static get delegatesFocus(){return!0}get el(){return a(this)}static get watchers(){return{open:["handleStateChange"]}}};d.style=":host{--wmcolor-navigation-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigation-background-selected:var(--wmcolor-background-selected);--wmcolor-navigation-background:var(--wmcolor-background);--wmcolor-navigation-border-selected:var(--wmcolor-interactive);--wmcolor-navigation-focus:var(--wmcolor-interactive-focus);--wmcolor-navigation-icon-selected:var(--wmcolor-interactive);--wmcolor-navigation-icon:var(--wmcolor-icon);--wmcolor-navigation-text-selected:var(--wmcolor-interactive);z-index:10}:host([aria-expanded=true]){z-index:5000}.tray{-webkit-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);-moz-box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);box-shadow:0 0 14px 0 rgba(0, 0, 0, 0.14);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:7.5625rem;background-color:var(--wmcolor-navigation-background);overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;font-size:0.875rem;height:100%}.navlist{margin:0;padding:0}.toggle-wrapper{display:none}@media screen and (max-width: 1023px){.tray{-ms-transition:transform 0.33s ease;-webkit-transition:transform 0.33s ease;-moz-transition:transform 0.33s ease;-webkit-transition:-webkit-transform 0.33s ease;transition:-webkit-transform 0.33s ease;transition:transform 0.33s ease;transition:transform 0.33s ease, -webkit-transform 0.33s ease;position:fixed;top:0;bottom:0;left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.tray ul{visibility:hidden}.tray .toggle-wrapper{display:inline-block;min-height:5rem;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([aria-expanded=true]) .tray{-webkit-transform:translateX(0);transform:translateX(0)}:host([aria-expanded=true]) .tray ul{visibility:visible}.overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:0;bottom:0;left:0;right:0;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:rgba(25, 25, 25, 0.4);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out}}";const m=class{constructor(o){t(this,o),this.wmNavigationHamburgerClicked=i(this,"wmNavigationHamburgerClicked",7),this.showNavMessage=r.formatMessage({id:"navigation.showNavigation",defaultMessage:"Show navigation",description:"For user interface element opening a navigation menu"}),this.navId=void 0,this.isTabbing=!1,this.open=!1}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleNavigationStateChanged(t){this.open=t.target.open}componentWillLoad(){document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn(),this.navId||console.error("wm-navigation-hamburger: nav-id is a required prop")}handleClick(){c(),this.wmNavigationHamburgerClicked.emit()}render(){return o(e,{class:"hamburger "+(this.open?"nav-open":"nav-closed")},o("button",{"aria-expanded":this.open,"aria-label":this.showNavMessage,onMouseEnter:()=>l("right",this.el,this.showNavMessage),onMouseLeave:()=>c(),onFocus:()=>this.isTabbing&&l("right",this.el,this.showNavMessage),onBlur:()=>c(),onClick:()=>this.handleClick()},o("span",{class:"icon"})))}static get delegatesFocus(){return!0}get el(){return a(this)}};m.style='button{--wmcolor-navigation-hamburger-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-navigation-hamburger-icon:var(--wmcolor-interactive);display:none;width:100%;height:100%;border:none;-webkit-box-shadow:none;box-shadow:none;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1);background-color:transparent;outline:none;padding:0}button:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0}button:hover{background-color:var(--wmcolor-navigation-hamburger-background-hover)}.icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f35c";font-size:1.5rem;color:var(--wmcolor-navigation-hamburger-icon)}@media screen and (max-width: 1023px){:host{width:3.75rem;height:3.75rem}button{display:initial}}';const g=class{constructor(o){t(this,o),this.wmNavigationItemClicked=i(this,"wmNavigationItemClicked",7),this.href=void 0,this.text=void 0,this.active=void 0}render(){return o(e,{role:"listitem"},o("a",{class:"link "+(this.active?"active":""),href:this.href,onClick:()=>this.wmNavigationItemClicked.emit()},o("div",{class:"icon","aria-hidden":"true"},o("slot",null)),o("div",{class:"text"},this.text)))}static get delegatesFocus(){return!0}get el(){return a(this)}};g.style='.link{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:inherit;text-decoration:none;min-height:4.5rem;text-align:center;padding:1.25rem 0.5rem;font-weight:500;outline:none;position:relative;background:var(--wmcolor-navigation-background)}.link:hover{background-color:var(--wmcolor-navigation-background-hover)}.link .icon{font-size:1.375rem;color:var(--wmcolor-navigation-icon)}.link .text{font-size:0.875rem}.link:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:-3px}.link.active{background-color:var(--wmcolor-navigation-background-selected)}.link.active:before{content:"";background-color:var(--wmcolor-navigation-border-selected);position:absolute;height:100%;width:5px;left:0}.link.active .text{color:var(--wmcolor-navigation-text-selected)}.link.active .icon{color:var(--wmcolor-navigation-icon-selected)}';export{d as wm_navigation,m as wm_navigation_hamburger,g as wm_navigation_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js"],(function(e){"use strict";var t,i,o,r,n,l,s,a,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;n=e.g},function(e){l=e.i;s=e.m;a=e.s;f=e.h}],execute:function(){var u=':host{--wmcolor-file-background-error:var(--wmcolor-background-error);--wmcolor-file-background:var(--wmcolor-background-readonly);--wmcolor-file-border-error:var(--wmcolor-border-error);--wmcolor-file-border:var(--wmcolor-border);--wmcolor-file-checkmark-icon:var(--wmcolor-positive);--wmcolor-file-progress:var(--wmcolor-progress);display:block;width:100%}.file-wrapper{font-size:0.875rem;position:relative;list-style:none}.file-wrapper .file{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;min-height:3.5rem;padding:0.5rem 1.25rem;position:relative;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.file-wrapper .file .filename{display:inline-block;white-space:nowrap}.file-wrapper .file .left-group{overflow:hidden;min-width:5.3125rem;-ms-flex-positive:1;flex-grow:1}.file-wrapper .file .right-group{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:end;-ms-flex-align:center;align-items:center;gap:1rem;min-width:0;padding-left:5rem}.file-wrapper .file .right-group.condensed{padding-left:2.5rem}.file-wrapper .file .right-group .file-controls{display:-ms-flexbox;display:flex;gap:1rem}.file-wrapper .file .right-group .file-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:end;gap:0.25rem;text-align:right;min-width:8.5rem;max-width:450px;-ms-flex:1;flex:1}.file-wrapper .file .right-group .file-info .uploader-name{max-width:100%;overflow-wrap:break-word}.file-wrapper .file.--error{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}.file-wrapper.checked .file:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f133";position:absolute;right:-44px;color:var(--wmcolor-file-checkmark-icon);font-size:28px;line-height:1}.name-wrapper{overflow:hidden}.progress{position:absolute;left:0;top:0;right:0;height:8px}.error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem}.error-message:not(:empty){margin-top:0.25rem}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var c=e("wm_file",function(){function e(e){t(this,e);this.wmFilePreview=i(this,"wmFilePreview",7);this.wmFileDownload=i(this,"wmFileDownload",7);this.wmFileDelete=i(this,"wmFileDelete",7);this.wmFileErrorCleared=i(this,"wmFileErrorCleared",7);this.fullFilename="".concat(this.name,".").concat(this.type);this.name=undefined;this.type=undefined;this.fileActions="download delete";this.lastUpdated=undefined;this.progress=undefined;this.size=undefined;this.uploadedBy=undefined;this.errorMessage=undefined;this.showInfo="last-updated"}Object.defineProperty(e.prototype,"isCondensed",{get:function(){return this.el.clientWidth<500},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUploading",{get:function(){return this.progress!==undefined&&this.progress<100},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewButtonTooltip",{get:function(){return l.formatMessage({id:"file.previewButtonTooltip",defaultMessage:"Preview",description:"Tooltip of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadButtonTooltip",{get:function(){return l.formatMessage({id:"file.downloadButtonTooltip",defaultMessage:"Download",description:"Tooltip of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteButtonTooltip",{get:function(){return l.formatMessage({id:"file.deleteButtonTooltip",defaultMessage:"Delete",description:"Tooltip of a button that triggers a file to be deleted"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewActionMessage",{get:function(){return l.formatMessage({id:"file.previewAction",defaultMessage:"Preview File",description:"Label of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadActionMessage",{get:function(){return l.formatMessage({id:"file.downloadAction",defaultMessage:"Download File",description:"Label of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteActionMessage",{get:function(){return l.formatMessage({id:"file.deleteAction",defaultMessage:"Delete File",description:"Label of a button that triggers a file to be delete"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"actionMenuLabel",{get:function(){return l.formatMessage({id:"file.actionMenuLabel",defaultMessage:"Actions",description:"Label of a button that opens a menu of file actions"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clearButtonText",{get:function(){return l.formatMessage({id:"file.clearErrorText",defaultMessage:"Clear",description:"Text for a button used to clear an error"})},enumerable:false,configurable:true});e.prototype.generateClearButtonLabel=function(e){return l.formatMessage({id:"file.clearErrorLabel",defaultMessage:"Clear {fileName} error",description:"Label for a button used to clear an error, including filename"},{fileName:e})};e.prototype.componentWillLoad=function(){var e=this;if(!this.el.id){console.error("wm-file: a file id is required")}if(!this.name){console.error('wm-file: "name" is a required property')}if(!this.type){console.error('wm-file: "type" is a required property')}if(this.el.parentElement&&this.el.parentElement.showInfo){this.showInfo=this.el.parentElement.showInfo}if(this.showInfo==="time"){console.warn("wm-file: show-info='time' is deprecated, use show-info='last-updated'");this.showInfo="last-updated"}var t=new ResizeObserver((function(){e.setFilename()}));t.observe(this.el)};e.prototype.setFilename=function(){var e=this;requestAnimationFrame((function(){var t=e.el.shadowRoot.querySelector(".filename");var i=e.el.shadowRoot.querySelector(".left-group").getBoundingClientRect().left;var o=e.el.shadowRoot.querySelector(".right-group");var r=o?o.getBoundingClientRect().left:e.el.shadowRoot.querySelector(".file-wrapper").getBoundingClientRect().right-20;t.textContent=s(t,e.fullFilename,r-i,7)}))};e.prototype.componentDidRender=function(){this.setFilename()};e.prototype.previewFile=function(){this.wmFilePreview.emit()};e.prototype.downloadFile=function(){this.wmFileDownload.emit()};e.prototype.deleteFile=function(){this.wmFileDelete.emit()};e.prototype.handleFilenameMouseEnter=function(e){if(e.target.textContent!==this.fullFilename){a("bottom",e.target,this.fullFilename)}};e.prototype.renderFileName=function(){var e=this;return o("div",{class:"left-group"},o("div",{class:"name-wrapper"},o("span",{class:"sr-only"},this.fullFilename),o("span",{"aria-hidden":"true",class:"filename",onMouseEnter:function(t){return e.handleFilenameMouseEnter(t)},onMouseLeave:function(){return f()}}),this.isUploading&&o("span",{class:"sr-only"},"uploading")))};e.prototype.renderFileInfo=function(){return o("div",{class:"file-info"},(this.showInfo==="uploaded-by"||this.showInfo==="all")&&o("div",{class:"details uploader-name"},this.uploadedBy),(this.showInfo==="last-updated"||this.showInfo==="all")&&o("div",{class:"details"},this.lastUpdated),(this.showInfo==="size"||this.showInfo==="all")&&o("div",{class:"details"},this.size))};e.prototype.renderActionMenu=function(){var e=this;var t=o("wm-menuitem",{icon:"f208",onClick:function(){return e.previewFile()}},this.previewActionMessage);var i=o("wm-menuitem",{icon:"f1da",onClick:function(){return e.downloadFile()}},this.downloadActionMessage);var r=o("wm-menuitem",{icon:"f1c0",onClick:function(){return e.deleteFile()}},this.deleteActionMessage);return o("wm-action-menu",{"action-menu-type":"icon",tooltip:this.actionMenuLabel,"tooltip-position":"bottom","label-for-identical-buttons":"".concat(this.name," ").concat(this.actionMenuLabel)},this.fileActions.includes("preview")&&t,this.fileActions.includes("download")&&i,this.fileActions.includes("delete")&&r)};e.prototype.renderFileActionButtons=function(){var e=this;var t=o("wm-button",{class:"preview-button","button-type":"icononly",tooltip:this.previewButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"preview ".concat(this.name),icon:"f208",onClick:function(){return e.previewFile()}});var i=o("wm-button",{class:"download-button","button-type":"icononly",tooltip:this.downloadButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"download ".concat(this.name),icon:"f1da",onClick:function(){return e.downloadFile()}});var r=o("wm-button",{class:"delete-button","button-type":"icononly",tooltip:this.deleteButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"delete ".concat(this.name),icon:"f1c0",onClick:function(){return e.deleteFile()}});return o("div",{class:"file-controls"},this.fileActions.includes("preview")&&t,this.fileActions.includes("download")&&i,this.fileActions.includes("delete")&&r)};e.prototype.renderFileInProgress=function(){return o("div",{class:"file-wrapper"},o("div",{class:"file --progress"},o("div",{class:"progress",style:{background:"linear-gradient(to right, var(--wmcolor-file-progress) ".concat(this.progress,"%, transparent ").concat(this.progress,"%)")}}),this.renderFileName()))};e.prototype.renderFileControls=function(){var e=this.fileActions.split(" ").length===1;var t=this.isCondensed&&!e;return t?this.renderActionMenu():this.renderFileActionButtons()};e.prototype.renderFile=function(){var e=this;return o("div",{class:"file-wrapper ".concat(this.progress===100?"checked":"")},o("div",{class:"file ".concat(this.errorMessage?"--error":"")},this.renderFileName(),!this.errorMessage&&o("div",{class:"right-group ".concat(this.isCondensed?"condensed":"")},this.renderFileInfo(),this.fileActions!==""&&this.renderFileControls()),this.errorMessage&&o("wm-button",{"permanently-delete":true,"button-type":"textonly","label-for-identical-buttons":this.generateClearButtonLabel(this.name),onClick:function(){return e.wmFileErrorCleared.emit()}},this.clearButtonText)),this.errorMessage&&o("div",{class:"error-message"},this.errorMessage))};e.prototype.render=function(){return o(r,{role:"listitem"},this.isUploading?this.renderFileInProgress():this.renderFile())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());c.style=u}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js","./p-1ac66a15.system.js"],(function(e){"use strict";var t,i,r,o,s,n,a,l,c,h,u,d,p;return{setters:[function(e){t=e.r;i=e.c;r=e.h;o=e.H;s=e.g;n=e.f},function(e){a=e.i;l=e.d;c=e.t;h=e.a;u=e.k;d=e.y},function(e){p=e.g}],execute:function(){var f=':host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.checkbox:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f131";display:inline-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background-selected);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){color:var(--wmcolor-select-option-text-disabled);background:var(--wmcolor-select-option-background-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host([aria-disabled=true]) .subinfo{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.clone.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;gap:16px}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:-ms-flexbox;display:flex}.option-text{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus){outline:none;background:var(--wmcolor-select-option-background-hover)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}';var b=e("wm_option",function(){function e(e){t(this,e);this.wmOptionSelected=i(this,"wmOptionSelected",7);this.wmOptionDeselected=i(this,"wmOptionDeselected",7);this.intCloneClicked=i(this,"intCloneClicked",7);this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7);this.wmEnterKeyPressed=i(this,"wmEnterKeyPressed",7);this.wmLetterPressed=i(this,"wmLetterPressed",7);this.wmOptionBlurred=i(this,"wmOptionBlurred",7);this.value=undefined;this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false;this.searchTerm=""}Object.defineProperty(e.prototype,"hostClasses",{get:function(){var e=[];if(this.subinfo){e.push("hassubinfo")}if(this.parentSelectEl.multiple){e.push("multi-option")}if(!this.el.textContent.toLowerCase().includes(this.searchTerm)){e.push("filtered-out")}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"parentSelectEl",{get:function(){var e;return((e=this.el.parentElement)===null||e===void 0?void 0:e.nodeName)!=="WM-SELECT"?this.el.getRootNode().host:this.el.parentElement},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":e.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case"Escape":e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":e.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":e.preventDefault();this.wmEndKeyPressed.emit();break;default:if(e.key.length===1){e.preventDefault();this.wmLetterPressed.emit({letter:e.key,optionEl:this.el})}}};e.prototype.handleSelection=function(){if(!this.disabled){if(this.el.classList.contains("clone")){this.intCloneClicked.emit(this.el)}else{if(this.parentSelectEl.multiple){this.selected?this.wmOptionDeselected.emit(this.el):this.wmOptionSelected.emit(this.el)}else{this.wmOptionSelected.emit(this.el)}}}};e.prototype.handleBlur=function(e){this.wmOptionBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.setAttribute("aria-selected","false")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.handleSearch=function(e){this.searchTerm=e.detail.searchTerm.toLowerCase();if(this.searchTerm&&this.el.textContent.toLowerCase().includes(this.searchTerm)){var t=this.el.textContent.toLowerCase().indexOf(this.searchTerm);var i=this.el.textContent.slice(0,t);var r=this.el.textContent.slice(t,t+this.searchTerm.length);var o=this.el.textContent.slice(t+this.searchTerm.length);var s=document.createElement("span");s.textContent=i;var n=document.createElement("strong");n.textContent=r;var a=document.createElement("span");a.textContent=o;this.textEl.innerHTML="";this.textEl.appendChild(s);this.textEl.appendChild(n);this.textEl.appendChild(a)}else{this.textEl.textContent=this.el.textContent}};e.prototype.componentWillLoad=function(){var e=this;this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick();this.parentSelectEl.addEventListener("wmSelectSearchChanged",(function(t){return e.handleSearch(t)}))};e.prototype.render=function(){var e=this;return r(o,{role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},r("div",{class:"option-wrapper ".concat(this.parentSelectEl.multiple?"checkbox":"")},r("span",{class:"option-text","aria-hidden":"true",ref:function(t){return e.textEl=t}},this.el.textContent),r("span",{class:"sr-only"},this.el.textContent)),r("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"]}},enumerable:false,configurable:true});return e}());b.style=f;var m=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.wrapper .button-wrapper>.dropdown.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.options-wrapper{max-height:12.5rem;overflow:auto}.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-selectall-border);background:var(--wmcolor-select-selectall-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-selectall-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-all:hover,.select-all:focus{outline:none;background:#f4f4f4}.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var w=e("wm_select",function(){function e(e){var r=this;t(this,e);this.wmSelectDidLoad=i(this,"wmSelectDidLoad",7);this.wmSelectBlurred=i(this,"wmSelectBlurred",7);this.wmSelectSearchChanged=i(this,"wmSelectSearchChanged",7);this.wmSelectAllSelected=i(this,"wmSelectAllSelected",7);this.wmSelectAllDeselected=i(this,"wmSelectAllDeselected",7);this.selectAllMessage=a.formatMessage({id:"select.selectAll",defaultMessage:"Select All"});this.deselectAllMessage=a.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"});this.allOptionsSelectedMessage=a.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"});this.allOptionsDeselectedMessage=a.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"});this.keysSoFar="";this.searchIndex=0;this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.debouncedClearKeysSoFar=l((function(){r.keysSoFar=""}),500);this.debouncedSearch=l((function(){r.wmSelectSearchChanged.emit({searchTerm:r.searchTerm});if(r.filteredOptions.length){r.announce(r.resultsFoundMessage)}else{r.announce(r.noResultsFoundMessage)}}),150);this.disabled=false;this.maxHeight=undefined;this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage=undefined;this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=a.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.searchPlaceholder=a.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=a.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isExpanded=false;this.announcement=""}Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"cloneOptions",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptionEls",{get:function(){return this.cloneOptions.concat(this.childOptions)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"visibleOptionEls",{get:function(){return this.allOptionEls.filter((function(e){return!e.classList.contains("hidden")&&!e.classList.contains("filtered-out")}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDisabled",{get:function(){return c(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"searchTerm",{get:function(){return this.searchFieldEl?this.searchFieldEl.value:""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"filteredOptions",{get:function(){var e=this;return this.childOptions.filter((function(t){var i;return(i=t.textContent)===null||i===void 0?void 0:i.toLowerCase().includes(e.searchTerm.toLowerCase())}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allSelected",{get:function(){return this.childOptions.every((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"visibleSelectAllButton",{get:function(){return this.selectAll&&this.multiple&&this.searchTerm===""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"resultsFoundMessage",{get:function(){return a.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"noResultsFoundMessage",{get:function(){return a.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})},enumerable:false,configurable:true});e.prototype.handleOptionSelection=function(e){this.focusOption(e.detail);if(!this.multiple){this.close()}};e.prototype.handleOptionCloneSelection=function(e){var t=this.findCorrespondingOption(e.detail);t.click()};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.detail)};e.prototype.handleChildDown=function(e){this.moveDown(e.detail)};e.prototype.moveToFirstOption=function(){this.focusOption(this.visibleOptionEls[0])};e.prototype.moveToLastOption=function(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){if(!this.isElOrChild(e.detail.relatedTarget)){var t=new CustomEvent("blur");t.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(t)}};e.prototype.handleClick=function(e){if(!this.isElOrChild(e.target)){this.close()}};e.prototype.handleSelectAllClick=function(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()};e.prototype.selectAllOptions=function(){this.announce(this.allOptionsSelectedMessage);this.wmSelectAllSelected.emit()};e.prototype.deselectAllOptions=function(){this.announce(this.allOptionsDeselectedMessage);this.wmSelectAllDeselected.emit()};e.prototype.handleButtonBlur=function(e){if(this.isElOrChild(e.relatedTarget)){e.stopPropagation()}};e.prototype.handleSearchFieldBlur=function(e){this.searchFieldWrapperEl.classList.remove("focus");if(this.isElOrChild(e.relatedTarget)){e.stopPropagation()}};e.prototype.handleKey=function(e){switch(e.key){case"ArrowDown":if(this.isExpanded===false){e.preventDefault();this.open("next")}break;case"ArrowUp":if(this.isExpanded===false){e.preventDefault();this.open("previous")}break}};e.prototype.componentWillLoad=function(){var e=this;if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}if(!this.multiple&&this.selectedOptions.length===0){console.error("wm-select should have one initial option selected")}h(this.el,this.isDisabled);var t=new MutationObserver((function(t){return t.forEach((function(t){return e.handleChildChange(t)}))}));t.observe(this.el,{childList:true,attributes:true,subtree:true,attributeFilter:["selected"]})};e.prototype.handleChildChange=function(e){this.setButtonText();n(this.el)};e.prototype.componentDidLoad=function(){this.wmSelectDidLoad.emit();this.dropdownEl.classList.add("hidden");n(this.el);if(this.maxHeight){this.listboxEl.style.maxHeight=this.maxHeight}if(this.multiple){this.updateOptionVisibility()}this.setButtonText()};e.prototype.componentWillUpdate=function(){if(this.multiple){var e=this.visibleOptionEls.filter((function(e){return e.classList.contains("clone")}));var t=e.length===this.visibleOptionEls.length;e.forEach((function(i,r){if(!t&&r===e.length-1){i.classList.add("last")}else{i.classList.remove("last")}}))}};e.prototype.moveUp=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var i=t[t.indexOf(e)-1]||t[t.length-1];if(i){this.focusOption(i)}};e.prototype.moveDown=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var i=t[t.indexOf(e)+1]||t[0];if(i){this.focusOption(i)}};e.prototype.open=function(e){var t=this;if(!this.isDisabled){var i=this.el.clientHeight;var r=this.buttonEl.clientHeight;this.openUp=u(this.el,this.dropdownEl.clientHeight,i,r);this.isExpanded=true;this.dropdownEl.classList.remove("hidden");window.requestAnimationFrame((function(){switch(e){case"next":if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else{t.moveDown(t.visibleOptionEls.filter((function(e){return e.selected})).slice(-1)[0])}break;case"previous":if(t.search){t.focusOption(t.visibleOptionEls[t.visibleOptionEls.length-1])}else{t.moveUp(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}break;default:if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else if(t.selectedOptions.length>0){t.focusOption(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}else{t.focusOption(t.visibleOptionEls[0])}break}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}if(this.isExpanded){this.isExpanded=false;this.allOptionEls.map((function(e){return e.focused=false}));window.setTimeout((function(){t.dropdownEl.classList.add("hidden");if(t.multiple){t.updateOptionVisibility()}if(t.search){t.searchFieldEl.value="";t.wmSelectSearchChanged.emit({searchTerm:t.searchTerm})}if(e){t.buttonEl.focus()}}),150)}};e.prototype.updateOptionVisibility=function(){var e=this;this.childOptions.forEach((function(t,i){var r=e.cloneOptions[i];if(t.selected){t.classList.add("hidden");r.classList.remove("hidden")}else{t.classList.remove("hidden");r.classList.add("hidden")}}))};e.prototype.focusOption=function(e){this.allOptionEls.forEach((function(t){return t.focused=t===e}));e.scrollIntoView({block:"nearest"});window.setTimeout((function(){return e.scrollIntoView({block:"nearest"})}),60);e.focus()};e.prototype.findAndFocusOption=function(e){var t=this;var i=e.detail.letter.toLowerCase();var r=e.detail.optionEl;if(!this.keysSoFar&&i==" "){r.click()}else{if(!this.keysSoFar){this.visibleOptionEls.forEach((function(e,i){if(e.focused){t.searchIndex=i}}))}this.keysSoFar+=i;var o=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);if(!o){o=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)}if(o){this.focusOption(o)}this.debouncedClearKeysSoFar()}};e.prototype.findMatchInRange=function(e,t,i){var r=this;var o=null;var s=e.slice(t,i);s.forEach((function(e){var t=e.textContent;if(!o&&t&&t.toLowerCase().startsWith(r.keysSoFar)){o=e}}));return o};e.prototype.findCorrespondingOption=function(e){var t=e.classList.contains("clone");return t?this.childOptions[this.cloneOptions.indexOf(e)]:this.cloneOptions[this.childOptions.indexOf(e)]};e.prototype.isElOrChild=function(e){var t;return e===this.el||this.el.contains(e)||((t=this.el.shadowRoot)===null||t===void 0?void 0:t.contains(e))};e.prototype.announceError=function(){var e=this;if(this.errorMessage){setTimeout((function(){return e.announce(e.errorMessage)}),100)}};e.prototype.handleDisabledChange=function(){h(this.el,this.isDisabled)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit()}};e.prototype.handleKeyDown=function(e){var t=e.target;switch(e.key){case"ArrowDown":e.preventDefault();this.moveDown(e.target);break;case"ArrowUp":e.preventDefault();this.moveUp(e.target);break;case"Escape":e.preventDefault();this.close();break;case"Enter":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick();this.close()}break;case" ":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick()}break}};e.prototype.setButtonText=function(){var e=this;this.displayedOptions=this.childOptions.filter((function(e){return e.selected})).map((function(t){return!t.classList.contains("hidden")?t:e.findCorrespondingOption(t)}));if(this.multiple){var t=38;var i=window.getComputedStyle(this.buttonEl);var r=parseInt(i.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(i.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-r-o-t;var n=this.displayedOptions.map((function(e){return e.shadowRoot.querySelector(".option-text").clientWidth}));var a=n.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(a>s&&this.displayedOptions.length>1){this.overflowCount++;a-=n[n.length-1];n.pop();this.displayedOptions.pop()}}};e.prototype.announce=function(e){if(this.liveRegionEl.textContent===e){e+=" "}this.announcement=e};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedOptions.length<1){return r("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(e,t){return r("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return r("span",null,r("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.renderSearchField=function(){var e=this;return r("div",{class:"search"},r("div",{class:"searchfield-wrapper",ref:function(t){return e.searchFieldWrapperEl=t}},r("div",{class:"icon"}),r("input",{ref:function(t){return e.searchFieldEl=t},class:"searchfield",role:"combobox","aria-controls":"list","aria-expanded":this.isExpanded?"true":"false",onKeyDown:function(t){return e.handleKeyDown(t)},onFocus:function(){return e.searchFieldWrapperEl.classList.add("focus")},onBlur:function(t){return e.handleSearchFieldBlur(t)},onInput:function(){return e.debouncedSearch()},placeholder:this.searchPlaceholder})))};e.prototype.renderSearchFailedMessage=function(){return r("div",{class:"search-results-message"},this.noResultsFoundMessage)};e.prototype.renderSelectAllButton=function(){var e=this;return r("button",{ref:function(t){return e.selectAllEl=t},class:"select-all",onClick:function(){return e.handleSelectAllClick()},onKeyDown:function(t){return e.handleKeyDown(t)},tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)};e.prototype.renderCloneOptions=function(){return Array.from(this.el.children).map((function(e){var t=e;return r("wm-option",{class:"clone",subinfo:t.subinfo,selected:t.selected},t.textContent)}))};e.prototype.render=function(){var e;var t=this;var i=!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo;var s=(e={id:"selectbtn"},e["disabled"]=this.isDisabled,e["aria-controls"]="list",e["aria-labelledby"]="label selectbtn",e["aria-describedby"]="error",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return r(o,{onBlur:function(e){return t.handleComponentBlur(e)}},r("div",{class:"wrapper ".concat(d()," label-").concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},r("div",{class:"label-wrapper"},r("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?r("span",{class:"required"},r("span",{class:"sr-only"},p.requiredField),r("span",{"aria-hidden":"true"},"*")):"")),r("div",{class:"button-wrapper"},r("button",Object.assign({},s,{class:"displayedoption",ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)},onFocus:function(){return t.close()}}),r("span",{class:"overflowcontrol ".concat(i?"hassubinfo":"")},r("span",{class:"button-text"},this.renderButtonText()),i&&r("span",{class:"subinfo"},this.selectedOptions[0].subinfo)),this.renderOverflowCount()),r("div",{class:"dropdown ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},this.search&&this.renderSearchField(),this.visibleSelectAllButton&&this.renderSelectAllButton(),r("div",{id:"list",class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label",ref:function(e){return t.listboxEl=e}},this.search&&this.filteredOptions.length===0&&this.renderSearchFailedMessage(),this.multiple&&this.renderCloneOptions(),r("slot",null))),r("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage),r("div",{id:"announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:function(e){return t.liveRegionEl=e}},this.announcement))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["announceError"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return e}());w.style=m}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,r,e,n){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function s(t){try{u(n.next(t))}catch(t){a(t)}}function o(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?e(t.value):i(t.value).then(s,o)}u((n=n.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(r){return u([t,r])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(e=0)),e)try{if(n=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;i=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){e.label=o[1];break}if(o[0]===6&&e.label<a[1]){e.label=a[1];a=o;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(o);break}if(a[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];i=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var n=0,i=r.length,a;n<i;n++){if(a||!(n in r)){if(!a)a=Array.prototype.slice.call(r,0,n);a[n]=r[n]}}return t.concat(a||Array.prototype.slice.call(r))};System.register(["./p-cef8a45b.system.js","./p-4670ccb4.system.js"],(function(t){"use strict";var r,e,n,i,a;return{setters:[function(t){r=t.h},function(t){e=t.i;n=t.c;i=t.e;a=t.f}],execute:function(){t({b:U,c:N,d:K,e:j,f:P,g:D,h:z,i:X,j:S,k:d,l:Q,m:J,n:f,o:w,r:E});var s={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca",periwinkle:"#575195",gray:"#6b6b6b"};var o=t("a",{doughnut:{size:155,colors:[s.forest,s.gray],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[s.lavender,s.midnight,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[s.cyan,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2b:{size:130,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[s.forest,s.gray],padding:0,category:"stackedBar"},bar2:{size:400,colors:[s.gray,s.periwinkle,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar2b:{size:400,colors:[s.gray,s.periwinkle,s.midnight,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",s.cyan,"#8e4129",s.salmon],padding:0,category:"stackedBar"},bar4:{size:400,colors:[s.salmon,s.cyan,s.periwinkle],padding:0,category:"stackedBar"},bar5:{size:400,colors:[s.gray,s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[s.lavender],padding:0,category:"simpleBar"},bar7:{size:400,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],padding:0,category:"simpleBar"}});function u(t){return t==="percentage"||t==="amount"?"show-values":""}var c=e.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"});var h=e.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function f(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function d(t,r,e){return e?Math.round(t*100/r):Math.round(t*1e4/r)/100}function l(t,r){return t*360/r}function v(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function g(t,r,e,n){var i=v(t+t*r*Math.cos(Math.PI*e/180));var a=v(t+t*r*Math.sin(Math.PI*e/180));if(n!==undefined){var s=v(t+t*r*Math.cos(Math.PI*n/180));var o=v(t+t*r*Math.sin(Math.PI*n/180));return{x1:i,y1:a,x2:s,y2:o}}return{x:i,y:a}}function p(t,r,e,n,i){var a=v(i/2*t);return"A ".concat(a,", ").concat(a," 0 ").concat(r," ").concat(v(e),", ").concat(v(n))}function b(t,r,e,n,i){var a=(t-r)*(i-n)/(e-r)+n;return a<n?n:a>i?i:a}function m(t){return b(t,300,900,70,150)}function y(t){return Math.round(t/m(t))}function w(t,r){var e=t/r;var n=Math.pow(10,Math.floor(Math.log10(e)));var i=e/n;var a;if(i>5){a=10*n}else if(i>3){a=5*n}else if(i>2){a=3*n}else if(i>1.5){a=2*n}else if(i>1){a=1.5*n}else{a=n}return a}function x(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var r=this.popoverEl.querySelector("button");r&&r.click()}}function k(t,r){if(this.popoverEl&&!this.isTabbing){r.coords={x:t.clientX,y:t.clientY};A(this.popoverEl,r);O(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function M(t,r){if(this.popoverEl&&this.isTabbing){this.focusedSliceId=r.id;r.coords=i(t.target);r.coords.x=r.coords.x+30;r.coords.y=r.coords.y+30;A(this.popoverEl,r);O(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function z(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;C.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;_.call(this);break;case"Tab":S.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function A(t,r){t.open=false;if(r.title&&r.text){t.sliceDetails=Object.assign({},r);window.setTimeout((function(){return t.open=true}),30)}}function _(){var t=a(document.activeElement);var r=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;B.call(this,r)}function C(){if(this.sliceEls){var t=a(document.activeElement);var r=this.sliceEls.indexOf(t);if(r===-1){r=0}else if(r===0){r=this.sliceEls.length-1}else{r-=1}B.call(this,r)}}function B(t){var r=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;this.componentWrapperEl.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();this.focusedSliceId=this.sliceEls[t].id;window.setTimeout((function(){if(r.popoverEl){r.popoverEl.open=true}}),10)}}function S(){var t=this;this.focusedSliceId=undefined;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){t.componentWrapperEl.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}),100)}function D(t){return __awaiter(this,void 0,void 0,(function(){var r,e,n;var i=this;return __generator(this,(function(a){this.slicesDetails=[];r=0;e=Array.from(this.el.children);this.total=e.reduce((function(t,r){return t+=parseInt(r.getAttribute("amount")||"0")}),0);n=o[t].colors;if(t==="bar3"&&e.length===2){n=[n[1],n[3]]}e.forEach((function(e,a){var o=parseInt(e.getAttribute("amount")||"0");var u=d(o,i.total,true);var c=a;if(t==="bar5"){c=i.notStartedColor?a:a+1}if(t==="bar6"){c=0}var h={amount:o,perc:u,legend:e.getAttribute("legend"),color:n[c]||s.gray,offset:r,id:"".concat(i.uid,"-").concat(a+1),title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:false,index:a};r+=o;i.slicesDetails.push(h)}));return[2]}))}))}function F(t,r){var e=__spreadArray([],t,true).sort((function(t,r){return t.amount===r.amount?0:t.amount>r.amount?-1:1}));var n=0;e.filter((function(t){return t.amount>0})).forEach((function(t,i){var a=e[i===0?e.length-1:i-1];var s=e[i===e.length-1?0:i+1];var o=d(a.amount,r,true);var u=d(s.amount,r,true);var c=t.perc===0?8:5;var h=t.perc<4;var f=o<c;var l=u<c;var v=h&&(f||l);t.inSmallCluster=v;t.offset=n;n+=t.amount}));return e}function T(t,r,e){var n=l(r,this.total)-90;var i=t/this.total*360;var a=n+i;var s=i>180?"1 1":"0 1";var o=i>180?"1 0":"0 0";var u=this.chartDetails.size/2;var c=this.chartDetails.thickness;var h=1;var f=e==="doughnut";var d=1.5;var v=f?2.25:3;if(i===360){a-=.01}var b=g(u,h,n+d,a);var m=g(u,c,n+v,a);var y="M ".concat(b.x1,", ").concat(b.y1," ");var w=p(h,s,b.x2,b.y2,this.chartDetails.size);var x=" L ".concat(m.x2,", ").concat(m.y2," ");var k=p(c,o,m.x1,m.y1,this.chartDetails.size);return y+w+x+k+" z"}function j(){var t=e.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return r("div",{id:"chart-instructions"},t)}function I(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}function H(t,r,e){var n=r.map((function(t){return l(t.amount,e)}));var i=n.some((function(r){return r!==0&&r<t}));if(i){var a=n.map((function(r){return r==0?r:Math.max(r,t)}));var s=a.reduce((function(r,e){return r+(e>t&&e!==0?e:0)}),0);var o=a.reduce((function(r,e){return r+(e>t&&e!==0?0:e)}),0);var u=360-o;var c=s-u;var h=c/u;var f=a.map((function(r){return r>t?r-h*r:r==0?0:t}));var d=0;r=r.map((function(t,r){var n=f[r]/360*e;var i=d;d+=n;return Object.assign(Object.assign({},t),{amount:n,offset:i})}))}return r}function K(t){var e=this;var n=this.chartDetails.size+this.chartDetails.padding;var i=t==="doughnut";var a=i?this.slicesDetails:F(this.slicesDetails,this.total);a=H(7,a,this.total);return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:n+"px",height:n+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},I(),a.map((function(r){return G.call(e,r,t)})),W.call(this),i?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},d(a[0].amount,this.total,true)+"%"):r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},a.map((function(t){return t.amount>0&&!t.inSmallCluster?L.call(e,t):""})))))}function O(t,r){t.forEach((function(t){if(t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==r.index){t.classList.add("faded")}else{t.classList.remove("faded")}}))}function E(t){t.forEach((function(t){t.classList.remove("faded")}))}function G(t,e){var n=this;var i=d(t.amount,this.total,true)+"%";return r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("path",{id:t.id,class:"segment doughnut-segment",fill:t.amount?t.color:"transparent",d:T.call(this,t.amount,t.offset,e),onClick:function(r){return k.call(n,r,t)},onFocus:function(r){return M.call(n,r,t)},onKeyDown:function(t){return x.call(n,t)},role:"img","aria-label":"".concat(t.legend,", ").concat(i),"data-segmentindex":t.index}))}function W(){return this.isTabbing?r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("use",{tabindex:-1,id:"kfbg1",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfstroke",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfbg2",xlinkHref:"#".concat(this.focusedSliceId)})):""}function L(t){var e=l(t.offset+t.amount/2,this.total);var n=g(this.chartDetails.size/2,1.4,e-90),i=n.x,a=n.y;return r("text",{class:"value",x:i+"px",y:a+"px","data-segmentindex":t.index},"".concat(t.perc>0?t.perc:"<1","%"))}function N(t){var e=this;var n=t==="bar";var i=this.el.shadowRoot.querySelectorAll(".value");if(i.length>0){requestAnimationFrame((function(){var t=[];var r=4;var n=false;i.forEach((function(e){e.classList.remove("hidden");var i=parseInt(e.dataset.value);if(t.length>0&&i!=0){var a=e.getBoundingClientRect().left-r;t.forEach((function(t){var r=parseInt(t.dataset.value);var s=t.getBoundingClientRect().right>a;if(s){var o=i<r?e:t;o.classList.add("hidden");n=true}}))}if(!e.classList.contains("hidden")&&i>0){t.push(e)}}));(e.isBar||e.isDoughnut)&&e.showHiddenValuesMessage(n)}))}return r("div",{class:"chart-wrapper bar-wrapper"},n?r("div",{class:"single-perc"},d(this.slicesDetails[0].amount,this.total,true)+"%"):"",this.drawAxis(),r("div",{class:"inner-stacked-bar-wrapper ".concat(u(this.valueFormat))},!n?r("div",{class:"values"},this.slicesDetails.map((function(t){return e.renderBarText(t,5)}))):"",r("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((function(t){return R.call(e,t,5)}))),n?Q.call(this):""))}function R(t,e){var n=this;var i=d(t.amount,this.total,false);var a=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper");var s=a?a.offsetWidth:this.el.offsetWidth;var o=i/100*s>=e;var u=o||t.amount==0?"".concat(i,"%"):"".concat(e,"px");var c="";if(this.valueFormat=="percentage"){c="".concat(d(t.amount,this.total,true)," %")}else if(this.valueFormat=="amount"){c=t.amount.toString()}return r("div",{class:"segment stacked-bar-segment ".concat(d(t.amount,this.total,false)===0?"zero":""," ").concat(o?"":"fixed-width"),style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(n,r,t)},onFocus:function(r){return M.call(n,r,t)},onKeyDown:function(t){return x.call(n,t)},"data-segmentindex":t.index},r("span",{class:"sr-only"},"".concat(t.legend," ").concat(c)))}function U(t){var e=this;var i=this.slicesDetails.map((function(t){return t.amount})).reduce((function(t,r){return t>r?t:r}));var a=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);var s=48;var o=this.el.getBoundingClientRect().width;var c=o-a-s;var h=y(c);var d=w(i,h);var l=h*d;var v=Math.floor((l-i)/d);h-=v;this.el.style.setProperty("--backgroundSize",100/h+"%");this.el.style.setProperty("--labelWidth",this.labelWidth);if(t==="bar7"&&!this.showBarLegend){this.el.style.setProperty("--labelWidth","0px")}var g=[];this.slicesDetails.forEach((function(r){r.legend&&g.push(V(r.legend,e.showBarLegend,t));g.push(q.call(e,r,d,h,i))}));var p=[];for(var b=1;b<=h;b++){var m=f(n(b,d));p.push(r("div",{class:"tick"},r("span",null,m)))}var x=t==="bar6"&&this.showGrid&&this.el.getBoundingClientRect().width>300;return r("div",{class:"chart-wrapper simple-bar-wrapper"},r("div",{class:"chart ".concat(u(this.valueFormat))},x&&r("div",{class:"gridlines"}),r("div",{class:"rows"},g)),x&&r("div",{class:"x-axis","aria-hidden":"true"},r("div",{class:"zero"},r("span",null,"0")),p))}function V(t,e,n){var i=n==="bar7"&&!e?" hidden":"";return r("label",{class:"label".concat(i)},t)}function q(t,e,n,i){var a=this;var s=this.currentChartType==="bar6"?e*n:i;var o=d(t.amount,s,false);var u=o?o+"%":"1px";var c=f(t.amount);var h=this.valueFormat==="amount"?c:"";if(this.currentChartType==="bar6"&&this.valueFormat==="percentage"){h=t.amount+"%"}else if(this.currentChartType==="bar7"&&this.valueFormat==="percentage"){h=(this.total===0?"0":d(t.amount,this.total,true))+"%"}return r("div",{class:"bar segment",style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(a,r,t)},onFocus:function(r){return M.call(a,r,t)},onKeyDown:function(t){return x.call(a,t)},"data-segmentindex":t.index},r("div",{class:"value"},h))}function P(t){var e=this;if(this.showLegend){var n=this.slicesDetails.reduce((function(t,r){return t=r.inSmallCluster?true:t}),false);this.isDoughnut&&this.showHiddenValuesMessage(n);return r("div",{class:"legend-wrapper"},r("div",{class:"legend ".concat(t," ").concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.slicesDetails.map((function(t){var r=e.printModeFormat=="amount"?"".concat(t.amount,"/").concat(e.total):"".concat(d(t.amount,e.total,true),"%");if(!!t.amount||!!t.legend){return J.call(e,{key:t.legend,color:t.color},r,t)}}))),this.isDoughnut&&!this.printMode&&X())}}function J(t,e,n){var i=this;if(e===void 0){e=""}if(n===void 0){n=null}var a=function(t){if(n){n.coords={x:t.clientX,y:t.clientY};A(i.popoverEl,n);O(Array.from(i.el.shadowRoot.querySelectorAll("[data-segmentindex")),n)}};return r("div",{class:"legend-item",onClick:function(t){return a(t)},"data-segmentindex":n?n.index:null},r("div",{class:"legend-color",style:{backgroundColor:t.color}}),r("div",{class:"legend-text"},t.key,e&&r("span",{class:"print-value ".concat(this.printMode?"force-visible":"")},": ",e)))}function Q(){if(this.completionMessage){return r("div",{class:"completion-message"},this.completionMessage)}}function X(){return r("div",{class:"hidden-values-warning hidden"},c,r("br",null),h)}}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,r,e,n){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function s(t){try{u(n.next(t))}catch(t){a(t)}}function o(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?e(t.value):i(t.value).then(s,o)}u((n=n.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(r){return u([t,r])}}function u(o){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(e=0)),e)try{if(n=1,i&&(a=o[0]&2?i["return"]:o[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;if(i=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;i=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){e.label=o[1];break}if(o[0]===6&&e.label<a[1]){e.label=a[1];a=o;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(o);break}if(a[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];i=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var n=0,i=r.length,a;n<i;n++){if(a||!(n in r)){if(!a)a=Array.prototype.slice.call(r,0,n);a[n]=r[n]}}return t.concat(a||Array.prototype.slice.call(r))};System.register(["./p-ab8d78cc.system.js","./p-34b5830f.system.js"],(function(t){"use strict";var r,e,n,i,a;return{setters:[function(t){r=t.h},function(t){e=t.i;n=t.c;i=t.e;a=t.f}],execute:function(){t({b:U,c:N,d:K,e:j,f:P,g:D,h:z,i:X,j:S,k:d,l:Q,m:J,n:f,o:w,r:E});var s={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca",periwinkle:"#575195",gray:"#6b6b6b"};var o=t("a",{doughnut:{size:155,colors:[s.forest,s.gray],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[s.lavender,s.midnight,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[s.cyan,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2b:{size:130,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[s.forest,s.gray],padding:0,category:"stackedBar"},bar2:{size:400,colors:[s.gray,s.periwinkle,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar2b:{size:400,colors:[s.gray,s.periwinkle,s.midnight,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",s.cyan,"#8e4129",s.salmon],padding:0,category:"stackedBar"},bar4:{size:400,colors:[s.salmon,s.cyan,s.periwinkle],padding:0,category:"stackedBar"},bar5:{size:400,colors:[s.gray,s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[s.lavender],padding:0,category:"simpleBar"},bar7:{size:400,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],padding:0,category:"simpleBar"}});function u(t){return t==="percentage"||t==="amount"?"show-values":""}var c=e.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"});var h=e.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function f(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function d(t,r,e){return e?Math.round(t*100/r):Math.round(t*1e4/r)/100}function l(t,r){return t*360/r}function v(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function g(t,r,e,n){var i=v(t+t*r*Math.cos(Math.PI*e/180));var a=v(t+t*r*Math.sin(Math.PI*e/180));if(n!==undefined){var s=v(t+t*r*Math.cos(Math.PI*n/180));var o=v(t+t*r*Math.sin(Math.PI*n/180));return{x1:i,y1:a,x2:s,y2:o}}return{x:i,y:a}}function p(t,r,e,n,i){var a=v(i/2*t);return"A ".concat(a,", ").concat(a," 0 ").concat(r," ").concat(v(e),", ").concat(v(n))}function b(t,r,e,n,i){var a=(t-r)*(i-n)/(e-r)+n;return a<n?n:a>i?i:a}function m(t){return b(t,300,900,70,150)}function y(t){return Math.round(t/m(t))}function w(t,r){var e=t/r;var n=Math.pow(10,Math.floor(Math.log10(e)));var i=e/n;var a;if(i>5){a=10*n}else if(i>3){a=5*n}else if(i>2){a=3*n}else if(i>1.5){a=2*n}else if(i>1){a=1.5*n}else{a=n}return a}function x(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var r=this.popoverEl.querySelector("button");r&&r.click()}}function k(t,r){if(this.popoverEl&&!this.isTabbing){r.coords={x:t.clientX,y:t.clientY};A(this.popoverEl,r);O(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function M(t,r){if(this.popoverEl&&this.isTabbing){this.focusedSliceId=r.id;r.coords=i(t.target);r.coords.x=r.coords.x+30;r.coords.y=r.coords.y+30;A(this.popoverEl,r);O(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function z(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;C.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;_.call(this);break;case"Tab":S.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function A(t,r){t.open=false;if(r.title&&r.text){t.sliceDetails=Object.assign({},r);window.setTimeout((function(){return t.open=true}),30)}}function _(){var t=a(document.activeElement);var r=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;B.call(this,r)}function C(){if(this.sliceEls){var t=a(document.activeElement);var r=this.sliceEls.indexOf(t);if(r===-1){r=0}else if(r===0){r=this.sliceEls.length-1}else{r-=1}B.call(this,r)}}function B(t){var r=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;this.componentWrapperEl.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();this.focusedSliceId=this.sliceEls[t].id;window.setTimeout((function(){if(r.popoverEl){r.popoverEl.open=true}}),10)}}function S(){var t=this;this.focusedSliceId=undefined;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){t.componentWrapperEl.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}),100)}function D(t){return __awaiter(this,void 0,void 0,(function(){var r,e,n;var i=this;return __generator(this,(function(a){this.slicesDetails=[];r=0;e=Array.from(this.el.children);this.total=e.reduce((function(t,r){return t+=parseInt(r.getAttribute("amount")||"0")}),0);n=o[t].colors;if(t==="bar3"&&e.length===2){n=[n[1],n[3]]}e.forEach((function(e,a){var o=parseInt(e.getAttribute("amount")||"0");var u=d(o,i.total,true);var c=a;if(t==="bar5"){c=i.notStartedColor?a:a+1}if(t==="bar6"){c=0}var h={amount:o,perc:u,legend:e.getAttribute("legend"),color:n[c]||s.gray,offset:r,id:"".concat(i.uid,"-").concat(a+1),title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:false,index:a};r+=o;i.slicesDetails.push(h)}));return[2]}))}))}function F(t,r){var e=__spreadArray([],t,true).sort((function(t,r){return t.amount===r.amount?0:t.amount>r.amount?-1:1}));var n=0;e.filter((function(t){return t.amount>0})).forEach((function(t,i){var a=e[i===0?e.length-1:i-1];var s=e[i===e.length-1?0:i+1];var o=d(a.amount,r,true);var u=d(s.amount,r,true);var c=t.perc===0?8:5;var h=t.perc<4;var f=o<c;var l=u<c;var v=h&&(f||l);t.inSmallCluster=v;t.offset=n;n+=t.amount}));return e}function T(t,r,e){var n=l(r,this.total)-90;var i=t/this.total*360;var a=n+i;var s=i>180?"1 1":"0 1";var o=i>180?"1 0":"0 0";var u=this.chartDetails.size/2;var c=this.chartDetails.thickness;var h=1;var f=e==="doughnut";var d=1.5;var v=f?2.25:3;if(i===360){a-=.01}var b=g(u,h,n+d,a);var m=g(u,c,n+v,a);var y="M ".concat(b.x1,", ").concat(b.y1," ");var w=p(h,s,b.x2,b.y2,this.chartDetails.size);var x=" L ".concat(m.x2,", ").concat(m.y2," ");var k=p(c,o,m.x1,m.y1,this.chartDetails.size);return y+w+x+k+" z"}function j(){var t=e.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return r("div",{id:"chart-instructions"},t)}function I(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}function H(t,r,e){var n=r.map((function(t){return l(t.amount,e)}));var i=n.some((function(r){return r!==0&&r<t}));if(i){var a=n.map((function(r){return r==0?r:Math.max(r,t)}));var s=a.reduce((function(r,e){return r+(e>t&&e!==0?e:0)}),0);var o=a.reduce((function(r,e){return r+(e>t&&e!==0?0:e)}),0);var u=360-o;var c=s-u;var h=c/u;var f=a.map((function(r){return r>t?r-h*r:r==0?0:t}));var d=0;r=r.map((function(t,r){var n=f[r]/360*e;var i=d;d+=n;return Object.assign(Object.assign({},t),{amount:n,offset:i})}))}return r}function K(t){var e=this;var n=this.chartDetails.size+this.chartDetails.padding;var i=t==="doughnut";var a=i?this.slicesDetails:F(this.slicesDetails,this.total);a=H(7,a,this.total);return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:n+"px",height:n+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},I(),a.map((function(r){return G.call(e,r,t)})),W.call(this),i?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},d(a[0].amount,this.total,true)+"%"):r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},a.map((function(t){return t.amount>0&&!t.inSmallCluster?L.call(e,t):""})))))}function O(t,r){t.forEach((function(t){if(t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==r.index){t.classList.add("faded")}else{t.classList.remove("faded")}}))}function E(t){t.forEach((function(t){t.classList.remove("faded")}))}function G(t,e){var n=this;var i=d(t.amount,this.total,true)+"%";return r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("path",{id:t.id,class:"segment doughnut-segment",fill:t.amount?t.color:"transparent",d:T.call(this,t.amount,t.offset,e),onClick:function(r){return k.call(n,r,t)},onFocus:function(r){return M.call(n,r,t)},onKeyDown:function(t){return x.call(n,t)},role:"img","aria-label":"".concat(t.legend,", ").concat(i),"data-segmentindex":t.index}))}function W(){return this.isTabbing?r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("use",{tabindex:-1,id:"kfbg1",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfstroke",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfbg2",xlinkHref:"#".concat(this.focusedSliceId)})):""}function L(t){var e=l(t.offset+t.amount/2,this.total);var n=g(this.chartDetails.size/2,1.4,e-90),i=n.x,a=n.y;return r("text",{class:"value",x:i+"px",y:a+"px","data-segmentindex":t.index},"".concat(t.perc>0?t.perc:"<1","%"))}function N(t){var e=this;var n=t==="bar";var i=this.el.shadowRoot.querySelectorAll(".value");if(i.length>0){requestAnimationFrame((function(){var t=[];var r=4;var n=false;i.forEach((function(e){e.classList.remove("hidden");var i=parseInt(e.dataset.value);if(t.length>0&&i!=0){var a=e.getBoundingClientRect().left-r;t.forEach((function(t){var r=parseInt(t.dataset.value);var s=t.getBoundingClientRect().right>a;if(s){var o=i<r?e:t;o.classList.add("hidden");n=true}}))}if(!e.classList.contains("hidden")&&i>0){t.push(e)}}));(e.isBar||e.isDoughnut)&&e.showHiddenValuesMessage(n)}))}return r("div",{class:"chart-wrapper bar-wrapper"},n?r("div",{class:"single-perc"},d(this.slicesDetails[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),r("div",{class:"inner-stacked-bar-wrapper ".concat(u(this.valueFormat))},!n?r("div",{class:"values"},this.slicesDetails.map((function(t){return e.renderBarText(t,5)}))):"",r("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((function(t){return R.call(e,t,5)}))),n?Q.call(this):""))}function R(t,e){var n=this;var i=d(t.amount,this.total,false);var a=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper");var s=a?a.offsetWidth:this.el.offsetWidth;var o=i/100*s>=e;var u=o||t.amount==0?"".concat(i,"%"):"".concat(e,"px");var c="";if(this.valueFormat=="percentage"){c="".concat(d(t.amount,this.total,true)," %")}else if(this.valueFormat=="amount"){c=t.amount.toString()}return r("div",{class:"segment stacked-bar-segment ".concat(d(t.amount,this.total,false)===0?"zero":""," ").concat(o?"":"fixed-width"),style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(n,r,t)},onFocus:function(r){return M.call(n,r,t)},onKeyDown:function(t){return x.call(n,t)},"data-segmentindex":t.index},r("span",{class:"sr-only"},"".concat(t.legend," ").concat(c)))}function U(t){var e=this;var i=this.slicesDetails.map((function(t){return t.amount})).reduce((function(t,r){return t>r?t:r}));var a=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);var s=48;var o=this.el.getBoundingClientRect().width;var c=o-a-s;var h=y(c);var d=w(i,h);var l=h*d;var v=Math.floor((l-i)/d);h-=v;this.el.style.setProperty("--backgroundSize",100/h+"%");this.el.style.setProperty("--labelWidth",this.labelWidth);if(t==="bar7"&&!this.showBarLegend){this.el.style.setProperty("--labelWidth","0px")}var g=[];this.slicesDetails.forEach((function(r){r.legend&&g.push(V(r.legend,e.showBarLegend,t));g.push(q.call(e,r,d,h,i))}));var p=[];for(var b=1;b<=h;b++){var m=f(n(b,d));p.push(r("div",{class:"tick"},r("span",null,m)))}var x=t==="bar6"&&this.showGrid&&this.el.getBoundingClientRect().width>300;return r("div",{class:"chart-wrapper simple-bar-wrapper"},r("div",{class:"chart ".concat(u(this.valueFormat))},x&&r("div",{class:"gridlines"}),r("div",{class:"rows"},g)),x&&r("div",{class:"x-axis","aria-hidden":"true"},r("div",{class:"zero"},r("span",null,"0")),p))}function V(t,e,n){var i=n==="bar7"&&!e?" hidden":"";return r("label",{class:"label".concat(i)},t)}function q(t,e,n,i){var a=this;var s=this.currentChartType==="bar6"?e*n:i;var o=d(t.amount,s,false);var u=o?o+"%":"1px";var c=f(t.amount);var h=this.valueFormat==="amount"?c:"";if(this.currentChartType==="bar6"&&this.valueFormat==="percentage"){h=t.amount+"%"}else if(this.currentChartType==="bar7"&&this.valueFormat==="percentage"){h=(this.total===0?"0":d(t.amount,this.total,true))+"%"}return r("div",{class:"bar segment",style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(a,r,t)},onFocus:function(r){return M.call(a,r,t)},onKeyDown:function(t){return x.call(a,t)},"data-segmentindex":t.index},r("div",{class:"value"},h))}function P(t){var e=this;if(this.showLegend){var n=this.slicesDetails.reduce((function(t,r){return t=r.inSmallCluster?true:t}),false);this.isDoughnut&&this.showHiddenValuesMessage(n);return r("div",{class:"legend-wrapper"},r("div",{class:"legend ".concat(t," ").concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.slicesDetails.map((function(t){var r=e.printModeFormat=="amount"?"".concat(t.amount,"/").concat(e.total):"".concat(d(t.amount,e.total,true),"%");if(!!t.amount||!!t.legend){return J.call(e,{key:t.legend,color:t.color},r,t)}}))),this.isDoughnut&&!this.printMode&&X())}}function J(t,e,n){var i=this;if(e===void 0){e=""}if(n===void 0){n=null}var a=function(t){if(n){n.coords={x:t.clientX,y:t.clientY};A(i.popoverEl,n);O(Array.from(i.el.shadowRoot.querySelectorAll("[data-segmentindex")),n)}};return r("div",{class:"legend-item",onClick:function(t){return a(t)},"data-segmentindex":n?n.index:null},r("div",{class:"legend-color",style:{backgroundColor:t.color}}),r("div",{class:"legend-text"},t.key,e&&r("span",{class:"print-value ".concat(this.printMode?"force-visible":"")},": ",e)))}function Q(){if(this.completionMessage){return r("div",{class:"completion-message"},this.completionMessage)}}function X(){return r("div",{class:"hidden-values-warning hidden"},c,r("br",null),h)}}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./p-
|
|
1
|
+
import{i as e}from"./p-e995f7f0.js";const i={characterLimitReached:e.formatMessage({id:"global.characterLimitReached",defaultMessage:"No additional characters will be entered.",description:"for screen readers"}),close:e.formatMessage({id:"global.closeVerb",defaultMessage:"Close",description:"For a button, to close a user interface element"}),genericError:e.formatMessage({id:"global.genericError",defaultMessage:"An error occurred. Please try again."}),hide:e.formatMessage({id:"global.hideVerb",defaultMessage:"Hide",description:"For a button, to hide something"}),newWindow:e.formatMessage({id:"global.newWindowLink",defaultMessage:"Opens in a new window.",description:"Indicates that a focused link will open in a new window"}),next:e.formatMessage({id:"global.next",defaultMessage:"next",description:"Button text, indicating an action leading to a 'next' state"}),open:e.formatMessage({id:"global.openVerb",defaultMessage:"Open",description:"For a button, to open a user interface element"}),previous:e.formatMessage({id:"global.previous",defaultMessage:"previous",description:"Button text, indicating an action leading to a 'previous' state"}),requiredError:e.formatMessage({id:"global.requiredError",defaultMessage:"This field is required.",description:"Error displayed under a required field when it has not been filled"}),requiredField:e.formatMessage({id:"global.requiredField",defaultMessage:"required field",description:"Screen reader text, indicating the currently focused field is required"}),show:e.formatMessage({id:"global.showVerb",defaultMessage:"Show",description:"For a button, to show something"}),getCharactersEntered:(i,a)=>e.formatMessage({id:"global.charactersEntered",defaultMessage:"{x, number} of {y, number} characters entered.",description:"for screen readers"},{x:i,y:a}),getCharacterLimit:i=>e.formatMessage({id:"global.characterLimit",defaultMessage:"{limit, number} characters allowed.",description:"for screen readers"},{limit:i})},a={duplicateName:e.formatMessage({id:"uploader.duplicateName",defaultMessage:"A file with this name already exists."}),fileLimitExceeded:e.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"}),fileLimitReached:e.formatMessage({id:"uploader.fileUploadLimitReached",defaultMessage:"The maximum number of files has been reached",description:"Message displayed when trying to upload additional files, but the limit has been reached"}),finishedUploading:e.formatMessage({id:"uploader.finishedUploading",defaultMessage:"Finished uploading"}),waitToUpload:e.formatMessage({id:"uploader.waitToUpload",defaultMessage:"Please wait for current upload to complete before uploading new files.",description:"Message for screen reader users"}),zeroFileSize:e.formatMessage({id:"uploader.zeroFileSize",defaultMessage:"The file must be more than 0 bytes",description:"Error message when user attempts to upload a file of no size"}),getAcceptedFileTypes:(i,a)=>e.formatMessage({id:"uploader.acceptedFileTypes",defaultMessage:"Accepted file {amount, plural, =1 {type} other {types}}: {fileTypes}"},{fileTypes:i,amount:a}),getFilesAdded:i=>e.formatMessage({id:"uploader.filesAdded",defaultMessage:"{numFiles, plural, one {1 file added} other {# files added}}"},{numFiles:i}),getFileCount:(i,a)=>e.formatMessage({id:"uploader.fileCount",defaultMessage:"{x} of {y} Files",description:"A count of the number of files currently uploaded"},{x:i,y:a}),getFileTooLarge:i=>e.formatMessage({id:"uploader.fileTooLarge",defaultMessage:"The selected file is too large. Maximum file size is {size}"},{size:i}),getFilesUploading:i=>e.formatMessage({id:"uploader.filesUploading",defaultMessage:"{num, plural, one {1 file uploading} other {# files uploading}}"},{num:i}),getInvalidFileType:i=>e.formatMessage({id:"uploader.invalidFileType",defaultMessage:"The file type is invalid. Accepted types: {validTypes}"},{validTypes:i}),getMaxSize:i=>e.formatMessage({id:"uploader.maxSize",defaultMessage:"Maximum file size {maxSize}",description:"An indicator of the maximum file size the uploader allows"},{maxSize:i}),getUploadProgress:i=>e.formatMessage({id:"uploader.uploadProgress",defaultMessage:"Upload progress: {percentage}%"},{percentage:i})},t={interactiveChart:e.formatMessage({id:"chart.interactiveChart",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})},d={instructions:e.formatMessage({id:"linechart.instructions",defaultMessage:"Use Tab and arrow keys to browse elements.",description:"For screen readers only, instructions on how to interact with the line chart component"}),noData:e.formatMessage({id:"linechart.noData",defaultMessage:"No Data",description:"Message displayed when a data point has missing data"}),getChangeSince:i=>e.formatMessage({id:"linechart.changeSince",defaultMessage:"Change since {time}",description:"Indicates a comparison between current and previous data"},{time:i})};export{t as c,i as g,d as l,a as u}
|