@watermarkinsights/ripple 5.3.0-12 → 5.3.0-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chartFunctions-86227b27.js → chartFunctions-0238043b.js} +3 -3
- package/dist/cjs/{functions-05e7ad5a.js → functions-3be85c6d.js} +7 -104
- package/dist/{esm/app-globals-51ea1005.js → cjs/global-042bb995.js} +2 -7
- package/dist/cjs/index-e86c28b6.js +2641 -0
- package/dist/cjs/{intl-2b550151.js → intl-567eb9d8.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/cjs/priv-calendar.cjs.entry.js +5 -6
- package/dist/cjs/priv-chart-popover.cjs.entry.js +17 -16
- package/dist/cjs/priv-navigator-button.cjs.entry.js +3 -4
- package/dist/cjs/priv-navigator-item.cjs.entry.js +3 -4
- package/dist/cjs/ripple.cjs.js +11 -12
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +6 -8
- package/dist/cjs/wm-button.cjs.entry.js +4 -5
- package/dist/cjs/wm-chart-slice.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +6 -7
- package/dist/cjs/wm-date-range.cjs.entry.js +7 -8
- package/dist/cjs/wm-datepicker.cjs.entry.js +7 -8
- package/dist/cjs/wm-file-list.cjs.entry.js +3 -4
- package/dist/cjs/wm-file.cjs.entry.js +4 -5
- package/dist/cjs/wm-input.cjs.entry.js +5 -6
- package/dist/cjs/wm-line-chart.cjs.entry.js +14 -15
- package/dist/cjs/wm-modal-footer.cjs.entry.js +3 -4
- package/dist/cjs/wm-modal-header.cjs.entry.js +5 -6
- package/dist/cjs/wm-modal.cjs.entry.js +5 -6
- package/dist/cjs/wm-navigation_3.cjs.entry.js +10 -13
- package/dist/cjs/wm-navigator.cjs.entry.js +3 -4
- package/dist/cjs/wm-option_2.cjs.entry.js +8 -10
- package/dist/cjs/wm-pagination.cjs.entry.js +4 -5
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +7 -9
- package/dist/cjs/wm-search.cjs.entry.js +6 -7
- package/dist/cjs/wm-snackbar.cjs.entry.js +6 -7
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +8 -11
- package/dist/cjs/wm-tag-input.cjs.entry.js +7 -8
- package/dist/cjs/wm-tag-option.cjs.entry.js +2 -2
- package/dist/cjs/wm-textarea.cjs.entry.js +5 -6
- package/dist/cjs/wm-timepicker.cjs.entry.js +5 -6
- package/dist/cjs/wm-toggletip.cjs.entry.js +5 -6
- package/dist/cjs/wm-uploader.cjs.entry.js +6 -7
- package/dist/cjs/wm-wrapper.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/charts/chartFunctions.js +1 -1
- package/dist/collection/components/charts/chartFunctions.spec.js +16 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.e2e.js +81 -0
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +14 -12
- package/dist/collection/components/charts/screenshots.e2e.js +96 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.e2e.js +213 -0
- package/dist/collection/components/charts/wm-chart/wm-chart.js +1 -1
- package/dist/collection/components/charts/wm-chart/wm-chart.spec.js +37 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.e2e.js +176 -0
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +9 -9
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.spec.js +163 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.e2e.js +69 -0
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +1 -1
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.spec.js +79 -0
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.js +2 -2
- package/dist/collection/components/datepickers/priv-calendar/priv-calendar.spec.js +89 -0
- package/dist/collection/components/datepickers/wm-date-range.e2e.js +443 -0
- package/dist/collection/components/datepickers/wm-date-range.js +12 -16
- package/dist/collection/components/datepickers/wm-date-range.spec.js +22 -0
- package/dist/collection/components/datepickers/wm-datepicker.e2e.js +382 -0
- package/dist/collection/components/datepickers/wm-datepicker.js +12 -16
- package/dist/collection/components/datepickers/wm-datepicker.spec.js +21 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.e2e.js +200 -0
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +1 -1
- package/dist/collection/components/wm-action-menu/wm-action-menu.spec.js +48 -0
- package/dist/collection/components/wm-button/wm-button.e2e.js +55 -0
- package/dist/collection/components/wm-button/wm-button.js +1 -1
- package/dist/collection/components/wm-button/wm-button.spec.js +74 -0
- package/dist/collection/components/wm-file/wm-file.js +1 -1
- package/dist/collection/components/wm-file/wm-file.spec.js +194 -0
- package/dist/collection/components/wm-file-list/wm-file-list.js +1 -1
- package/dist/collection/components/wm-file-list/wm-file-list.spec.js +69 -0
- package/dist/collection/components/wm-input/wm-input.e2e.js +32 -0
- package/dist/collection/components/wm-input/wm-input.js +1 -1
- package/dist/collection/components/wm-input/wm-input.spec.js +173 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.e2e.js +23 -0
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +1 -1
- package/dist/collection/components/wm-menuitem/wm-menuitem.spec.js +54 -0
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-footer.spec.js +11 -0
- package/dist/collection/components/wm-modal/wm-modal-header.js +1 -1
- package/dist/collection/components/wm-modal/wm-modal-header.spec.js +8 -0
- package/dist/collection/components/wm-modal/wm-modal.e2e.js +104 -0
- package/dist/collection/components/wm-modal/wm-modal.js +2 -2
- package/dist/collection/components/wm-modal/wm-modal.spec.js +30 -0
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +1 -1
- package/dist/collection/components/wm-navigation/wm-navigation.e2e.js +102 -0
- package/dist/collection/components/wm-navigation/wm-navigation.js +2 -2
- package/dist/collection/components/wm-navigation/wm-navigation.spec.js +91 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.e2e.js +50 -0
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +1 -1
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +1 -1
- package/dist/collection/components/wm-navigator/wm-navigator.e2e.js +209 -0
- package/dist/collection/components/wm-navigator/wm-navigator.spec.js +177 -0
- package/dist/collection/components/wm-option/wm-option.e2e.js +22 -0
- package/dist/collection/components/wm-option/wm-option.js +1 -1
- package/dist/collection/components/wm-option/wm-option.spec.js +63 -0
- package/dist/collection/components/wm-pagination/wm-pagination.e2e.js +312 -0
- package/dist/collection/components/wm-pagination/wm-pagination.js +1 -1
- package/dist/collection/components/wm-search/wm-search.e2e.js +76 -0
- package/dist/collection/components/wm-search/wm-search.js +4 -5
- package/dist/collection/components/wm-search/wm-search.spec.js +71 -0
- package/dist/collection/components/wm-select/wm-select.e2e.js +521 -0
- package/dist/collection/components/wm-select/wm-select.js +2 -2
- package/dist/collection/components/wm-select/wm-select.spec.js +271 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.e2e.js +112 -0
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +2 -2
- package/dist/collection/components/wm-snackbar/wm-snackbar.spec.js +9 -0
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +1 -1
- package/dist/collection/components/wm-tabs/wm-tabs.e2e.js +91 -0
- package/dist/collection/components/wm-tabs/wm-tabs.spec.js +12 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.e2e.js +204 -0
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +3 -3
- package/dist/collection/components/wm-tag-input/wm-tag-input.spec.js +195 -0
- package/dist/collection/components/wm-textarea/wm-textarea.e2e.js +41 -0
- package/dist/collection/components/wm-textarea/wm-textarea.js +1 -1
- package/dist/collection/components/wm-textarea/wm-textarea.spec.js +79 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.e2e.js +163 -0
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +8 -11
- package/dist/collection/components/wm-timepicker/wm-timepicker.spec.js +147 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.e2e.js +69 -0
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +2 -2
- package/dist/collection/components/wm-toggletip/wm-toggletip.spec.js +21 -0
- package/dist/collection/components/wm-uploader/wm-uploader.e2e.js +70 -0
- package/dist/collection/components/wm-uploader/wm-uploader.js +2 -2
- package/dist/collection/components/wm-uploader/wm-uploader.spec.js +234 -0
- package/dist/collection/global/functions.spec.js +126 -0
- package/dist/collection/lang/lang.spec.js +20 -0
- package/dist/esm/{chartFunctions-da985798.js → chartFunctions-036fdb89.js} +3 -3
- package/dist/esm/{functions-25781571.js → functions-46843ea0.js} +8 -105
- package/dist/{cjs/app-globals-c1efe198.js → esm/global-570a3fbb.js} +1 -10
- package/dist/esm/index-558b5a82.js +2610 -0
- package/dist/esm/{intl-df3d34d1.js → intl-8b8740b9.js} +1 -1
- package/dist/esm/loader.js +4 -5
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-calendar.entry.js +5 -6
- package/dist/esm/priv-chart-popover.entry.js +17 -16
- package/dist/esm/priv-navigator-button.entry.js +3 -4
- package/dist/esm/priv-navigator-item.entry.js +3 -4
- package/dist/esm/ripple.js +12 -13
- package/dist/esm/wm-action-menu_2.entry.js +6 -8
- package/dist/esm/wm-button.entry.js +4 -5
- package/dist/esm/wm-chart-slice.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +6 -7
- package/dist/esm/wm-date-range.entry.js +7 -8
- package/dist/esm/wm-datepicker.entry.js +7 -8
- package/dist/esm/wm-file-list.entry.js +3 -4
- package/dist/esm/wm-file.entry.js +4 -5
- package/dist/esm/wm-input.entry.js +5 -6
- package/dist/esm/wm-line-chart.entry.js +14 -15
- package/dist/esm/wm-modal-footer.entry.js +3 -4
- package/dist/esm/wm-modal-header.entry.js +5 -6
- package/dist/esm/wm-modal.entry.js +5 -6
- package/dist/esm/wm-navigation_3.entry.js +10 -13
- package/dist/esm/wm-navigator.entry.js +3 -4
- package/dist/esm/wm-option_2.entry.js +8 -10
- package/dist/esm/wm-pagination.entry.js +4 -5
- package/dist/esm/wm-progress-indicator_3.entry.js +7 -9
- package/dist/esm/wm-search.entry.js +6 -7
- package/dist/esm/wm-snackbar.entry.js +6 -7
- package/dist/esm/wm-tab-item_3.entry.js +8 -11
- package/dist/esm/wm-tag-input.entry.js +7 -8
- package/dist/esm/wm-tag-option.entry.js +2 -2
- package/dist/esm/wm-textarea.entry.js +5 -6
- package/dist/esm/wm-timepicker.entry.js +5 -6
- package/dist/esm/wm-toggletip.entry.js +5 -6
- package/dist/esm/wm-uploader.entry.js +6 -7
- package/dist/esm/wm-wrapper.entry.js +1 -1
- package/dist/esm-es5/{chartFunctions-da985798.js → chartFunctions-036fdb89.js} +1 -1
- package/dist/esm-es5/functions-46843ea0.js +1 -0
- package/dist/esm-es5/global-570a3fbb.js +1 -0
- package/dist/esm-es5/index-558b5a82.js +1 -0
- package/dist/esm-es5/{intl-df3d34d1.js → intl-8b8740b9.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-button.entry.js +1 -1
- package/dist/esm-es5/priv-navigator-item.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart-slice.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file-list.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-footer.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/esm-es5/wm-wrapper.entry.js +1 -1
- package/dist/loader/cdn.js +2 -1
- package/dist/loader/index.cjs.js +2 -1
- package/dist/loader/index.d.ts +0 -3
- package/dist/loader/index.es2017.js +2 -1
- package/dist/loader/index.js +2 -1
- package/dist/ripple/p-09a31f0c.entry.js +1 -0
- package/dist/ripple/{p-6e3ef46a.system.entry.js → p-09dd7f17.system.entry.js} +1 -1
- package/dist/ripple/p-0dc51fad.entry.js +1 -0
- package/dist/ripple/p-0ea8609b.system.entry.js +1 -0
- package/dist/ripple/{p-a9d89ac8.system.js → p-1ac66a15.system.js} +1 -1
- package/dist/ripple/p-240124b0.system.entry.js +1 -0
- package/dist/ripple/p-26fbc7f5.system.entry.js +1 -0
- package/dist/ripple/p-294b38ca.system.entry.js +1 -0
- package/dist/ripple/p-2b05bf05.entry.js +1 -0
- package/dist/ripple/{p-72bdebb5.system.entry.js → p-2ba7e68e.system.entry.js} +1 -1
- package/dist/ripple/p-311923b2.system.entry.js +1 -0
- package/dist/ripple/p-3183bba8.entry.js +1 -0
- package/dist/ripple/p-31976813.entry.js +1 -0
- package/dist/ripple/{p-823d7b4e.system.entry.js → p-32bf3f5b.system.entry.js} +1 -1
- package/dist/ripple/p-33679b9d.entry.js +1 -0
- package/dist/ripple/p-34b5830f.system.js +1 -0
- package/dist/ripple/p-3568472c.entry.js +1 -0
- package/dist/ripple/p-359d45dc.entry.js +1 -0
- package/dist/ripple/{p-67a7f0b0.entry.js → p-3a44e1c8.entry.js} +1 -1
- package/dist/ripple/{p-672ae2cb.entry.js → p-42d1c301.entry.js} +1 -1
- package/dist/ripple/{p-041e579b.entry.js → p-45abd8fe.entry.js} +1 -1
- package/dist/ripple/{p-13b1d775.entry.js → p-48e09589.entry.js} +1 -1
- package/dist/ripple/p-4e56f3f5.system.entry.js +1 -0
- package/dist/ripple/{p-9f06ed3b.system.entry.js → p-5029fcd8.system.entry.js} +1 -1
- package/dist/ripple/p-568c595f.js +2 -0
- package/dist/ripple/p-591918a4.entry.js +1 -0
- package/dist/ripple/p-5ea5c0e6.system.entry.js +1 -0
- package/dist/ripple/p-5ef5081f.entry.js +1 -0
- package/dist/ripple/{p-bee8ab6e.entry.js → p-624a2812.entry.js} +1 -1
- package/dist/ripple/p-62a8f09c.entry.js +1 -0
- package/dist/ripple/{p-043901ab.system.entry.js → p-65d26233.system.entry.js} +1 -1
- package/dist/ripple/p-75ba63ba.entry.js +1 -0
- package/dist/ripple/{p-ac40417b.system.entry.js → p-79106e23.system.entry.js} +1 -1
- package/dist/ripple/p-7e6f5a1e.system.entry.js +1 -0
- package/dist/ripple/p-8029af07.system.entry.js +1 -0
- package/dist/ripple/{p-8e72de50.entry.js → p-8159cdf5.entry.js} +1 -1
- package/dist/ripple/p-822618d7.entry.js +1 -0
- package/dist/ripple/p-86d655fb.system.entry.js +1 -0
- package/dist/ripple/p-884294c6.entry.js +1 -0
- package/dist/ripple/{p-cd0cc88d.entry.js → p-88ebddd7.entry.js} +1 -1
- package/dist/ripple/p-8fbddb6c.system.entry.js +1 -0
- package/dist/ripple/p-902a54c5.entry.js +1 -0
- package/dist/ripple/p-905dd4da.system.entry.js +1 -0
- package/dist/ripple/{p-aab56a37.system.entry.js → p-a152cf3a.system.entry.js} +1 -1
- package/dist/ripple/{p-468a0218.entry.js → p-a37cf34a.entry.js} +1 -1
- package/dist/ripple/p-a8524a48.entry.js +1 -0
- package/dist/ripple/p-ab8d78cc.system.js +2 -0
- package/dist/ripple/{p-6fe35d1e.system.entry.js → p-b7ead395.system.entry.js} +1 -1
- package/dist/ripple/p-bc5e9d24.entry.js +1 -0
- package/dist/ripple/p-c4b9d46d.entry.js +1 -0
- package/dist/ripple/p-c885c7f9.entry.js +1 -0
- package/dist/ripple/p-c91b10f3.system.entry.js +1 -0
- package/dist/ripple/p-c9543950.system.entry.js +1 -0
- package/dist/ripple/p-cacfbaf1.system.entry.js +1 -0
- package/dist/ripple/{p-2e3728f1.entry.js → p-cc4a429b.entry.js} +1 -1
- package/dist/ripple/p-ce9a8bd1.entry.js +1 -0
- package/dist/ripple/p-d24882a7.system.entry.js +1 -0
- package/dist/ripple/p-d33d6e96.system.entry.js +1 -0
- package/dist/ripple/{p-777b8ebc.system.js → p-d4b209ec.system.js} +1 -1
- package/dist/ripple/p-d6ce9a49.system.js +1 -0
- package/dist/ripple/{p-f54e9ed0.js → p-d79fdf0b.js} +1 -1
- package/dist/ripple/{p-fcf76854.js → p-d837c1f5.js} +1 -1
- package/dist/ripple/{p-d93c51dd.system.entry.js → p-df1a11f1.system.entry.js} +1 -1
- package/dist/ripple/p-df2560f3.system.entry.js +1 -0
- package/dist/ripple/p-dfa61ff5.entry.js +1 -0
- package/dist/ripple/p-e3bcdde8.system.entry.js +1 -0
- package/dist/ripple/{p-ca35a8b7.system.entry.js → p-e7a64841.system.entry.js} +1 -1
- package/dist/ripple/p-e83a98d3.entry.js +1 -0
- package/dist/ripple/p-e995f7f0.js +1 -0
- package/dist/ripple/p-e9b9c587.js +1 -0
- package/dist/ripple/p-eaac6bcd.entry.js +1 -0
- package/dist/ripple/p-f42c3b8c.system.js +1 -0
- package/dist/ripple/p-f67fd802.system.entry.js +1 -0
- package/dist/ripple/p-fe8d02c3.system.entry.js +1 -0
- package/dist/ripple/{p-b0c566b5.system.entry.js → p-ffb31979.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/charts/priv-chart-popover/priv-chart-popover.d.ts +1 -2
- package/dist/types/stencil-public-runtime.d.ts +10 -3
- package/package.json +1 -1
- package/dist/cjs/index-788526f5.js +0 -1851
- package/dist/esm/index-130e07bb.js +0 -1820
- package/dist/esm-es5/app-globals-51ea1005.js +0 -1
- package/dist/esm-es5/functions-25781571.js +0 -1
- package/dist/esm-es5/index-130e07bb.js +0 -1
- package/dist/ripple/p-060ba991.entry.js +0 -1
- package/dist/ripple/p-0abc9300.entry.js +0 -1
- package/dist/ripple/p-0af94825.entry.js +0 -1
- package/dist/ripple/p-0ff41567.system.entry.js +0 -1
- package/dist/ripple/p-13fc2164.entry.js +0 -1
- package/dist/ripple/p-155224a2.system.entry.js +0 -1
- package/dist/ripple/p-1f09134c.entry.js +0 -1
- package/dist/ripple/p-298c2675.entry.js +0 -1
- package/dist/ripple/p-31781d88.system.entry.js +0 -1
- package/dist/ripple/p-31d7ecf9.system.entry.js +0 -1
- package/dist/ripple/p-341ebafa.entry.js +0 -1
- package/dist/ripple/p-35f209d9.system.entry.js +0 -1
- package/dist/ripple/p-376efca9.entry.js +0 -1
- package/dist/ripple/p-3b5f4364.system.entry.js +0 -1
- package/dist/ripple/p-418ed08c.system.entry.js +0 -1
- package/dist/ripple/p-4670ccb4.system.js +0 -1
- package/dist/ripple/p-488e1690.entry.js +0 -1
- package/dist/ripple/p-4b7a444c.system.entry.js +0 -1
- package/dist/ripple/p-4baaf026.entry.js +0 -1
- package/dist/ripple/p-56766bb2.entry.js +0 -1
- package/dist/ripple/p-5caaf651.system.entry.js +0 -1
- package/dist/ripple/p-5ece78e5.system.entry.js +0 -1
- package/dist/ripple/p-691ecf14.entry.js +0 -1
- package/dist/ripple/p-6d0e5159.system.entry.js +0 -1
- package/dist/ripple/p-6d56676e.system.entry.js +0 -1
- package/dist/ripple/p-7eab6bea.system.entry.js +0 -1
- package/dist/ripple/p-7fb95b89.entry.js +0 -1
- package/dist/ripple/p-85cbeb7d.system.entry.js +0 -1
- package/dist/ripple/p-88cfd58d.js +0 -1
- package/dist/ripple/p-8d075bcf.system.entry.js +0 -1
- package/dist/ripple/p-93fca187.entry.js +0 -1
- package/dist/ripple/p-a3d6be99.system.entry.js +0 -1
- package/dist/ripple/p-a62e7532.entry.js +0 -1
- package/dist/ripple/p-a6466dbd.system.js +0 -1
- package/dist/ripple/p-ad4529d2.entry.js +0 -1
- package/dist/ripple/p-b7307be6.system.entry.js +0 -1
- package/dist/ripple/p-c1f2092e.js +0 -1
- package/dist/ripple/p-c2181de0.entry.js +0 -1
- package/dist/ripple/p-ca76dc92.entry.js +0 -1
- package/dist/ripple/p-cef8a45b.system.js +0 -2
- package/dist/ripple/p-d5ba9de1.system.entry.js +0 -1
- package/dist/ripple/p-d9da0502.js +0 -2
- package/dist/ripple/p-db10990a.entry.js +0 -1
- package/dist/ripple/p-e2fe86a7.system.entry.js +0 -1
- package/dist/ripple/p-e85b1f40.entry.js +0 -1
- package/dist/ripple/p-ea0dfadf.system.entry.js +0 -1
- package/dist/ripple/p-eb14b354.entry.js +0 -1
- package/dist/ripple/p-ef886cd4.system.js +0 -1
- package/dist/ripple/p-f17fd62b.entry.js +0 -1
- package/dist/ripple/p-fabe4ca4.entry.js +0 -1
- package/dist/ripple/p-fbaae34d.system.entry.js +0 -1
- package/dist/types/components/datepickers/priv-calendar/priv-calendar.d.ts +0 -77
- package/dist/types/components/datepickers/wm-date-range.d.ts +0 -73
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,f as i,h as e,H as o,g as s}from"./p-d9da0502.js";import{d as r,E as n,x as a,F as l,G as h,H as c}from"./p-88cfd58d.js";import{n as p,o as d}from"./p-fcf76854.js";import{l as g,c as v,g as b}from"./p-f54e9ed0.js";const f=class{constructor(i){t(this,i),this.minTickWidth=120,this.popoverData=[],this.focusedDataPoint=[0,0],this.dataPointMatrix=[],this.xIntervals=[],this.displayedXIntervals=[],this.yIntervals=[],this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}],this.debouncedResize=r((async()=>{this.displayedXIntervals=this.determineDisplayedXIntervals()}),100),this.label=void 0,this.description="",this.xAxisLabel=void 0,this.yAxisLabel=void 0,this.lineData=void 0,this.units="null,null",this.labelWidth="120px",this.highlightQualifier="highlighted",this.highlightStart=void 0,this.highlightEnd=void 0,this.visibilityToggles=!1,this.showDeltas=!1,this.yRange=void 0,this.parsedLineData={},this.popoverIndex=-1,this.focusedLine=-1,this.hiddenLines=[],this.isTabbing=!1,this.intervalSkip=0,this.announcement=""}parseData(){this.parsedLineData=JSON.parse(this.lineData),this.yIntervals=this.calcYIntervals().reverse(),this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]),this.displayedXIntervals=this.determineDisplayedXIntervals(),this.dataPointMatrix=Object.entries(this.parsedLineData).map((t=>this.buildLineDataPointDetails(t[0],t[1]))),this.popoverData=n(this.dataPointMatrix)}handleIntervalSkip(){this.parseData()}get hasPartialInterval(){return this.intervalSkip>0&&this.xIntervals.length%2==0}get parsedUnits(){return a(this.units).map((t=>"null"===t?null:t))}get visibilityToggleEls(){return this.legendEl.querySelectorAll("wm-button")}get lineEls(){return this.plotAreaEl.querySelectorAll(".line")}get firstVisibleLineIdx(){let t=0;for(;this.hiddenLines.includes(t);)t++;return t<this.dataPointMatrix.length?t:-1}get pointEls(){return this.plotAreaEl.querySelectorAll(".point")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.parseData()}componentDidLoad(){new ResizeObserver((()=>this.debouncedResize())).observe(this.el)}handleVisibilityToggleKeydown(t,i){switch(t.key){case"Tab":t.shiftKey||-1===this.firstVisibleLineIdx||(t.preventDefault(),this.announce(this.lineFocusMessage(this.firstVisibleLineIdx)),this.focusDataPoint(this.firstVisibleLineIdx,0));break;case"ArrowUp":case"ArrowLeft":t.preventDefault();const e=l(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();const o=l(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[o].focus()}}handleDataPointKeydown(t){const[i,e]=this.focusedDataPoint,o=this.lineEls[i].querySelectorAll(".point").length,s=this.dataPointMatrix.length;switch(t.key){case"Tab":t.shiftKey&&this.visibilityToggles&&(t.preventDefault(),this.visibilityToggleEls[0].focus());break;case"ArrowUp":t.preventDefault();let r=i;do{r=l(r,-1,s-1)}while(this.hiddenLines.includes(r));this.announce(this.lineFocusMessage(r)),this.focusDataPoint(r,e);break;case"ArrowDown":t.preventDefault();let n=i;do{n=l(n,1,s-1)}while(this.hiddenLines.includes(n));this.announce(this.lineFocusMessage(n)),this.focusDataPoint(n,e);break;case"ArrowLeft":t.preventDefault();const a=l(e,-1,o-1);this.focusDataPoint(i,a);break;case"ArrowRight":t.preventDefault();const h=l(e,1,o-1);this.focusDataPoint(i,h)}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}lineFocusMessage(t){const i=this.dataPointMatrix[t][0].lineLabel,e=this.dataPointMatrix[t].filter((t=>null!==t.yValue)).length;return`${i}, line ${t+1} of ${this.dataPointMatrix.length} with ${e} data points`}focusDataPoint(t,i){const e=this.lineEls[t].querySelectorAll(".point")[i];this.pointEls.forEach((t=>t.tabIndex=-1)),e.tabIndex=0,e.focus(),this.focusedDataPoint=[t,i]}focusDataPointByEl(t){const i=parseInt(t.dataset.lineidx),e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.pointEls.forEach((t=>t.tabIndex=-1)),t.tabIndex=0,t.focus(),this.focusedDataPoint=[i,e]}calcYIntervals(){let t=[];if(this.yRange)t=a(this.yRange).map((t=>parseInt(t)));else{let i=[];Object.values(this.parsedLineData).flat().forEach((t=>i.push(...Object.values(t))));const e=i.filter((t=>null!==t));let o=Math.min(...e);const s=Math.max(...e);let r=d(s-o,4),n=r;for(;o%r!=0&&n>0;)o--,n--;r=d(s-o,4);let a=o;for(;a<=s+r;)t.push(a),a+=r}return t}determineDisplayedXIntervals(){const t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length,{skipInterval:i,skippedList:e}=h(this.xIntervals,t);return this.intervalSkip=i,e}buildLineDataPointDetails(t,i){let e=[];const o=Object.entries(i);let s;return o.forEach(((i,r)=>{const[n,a]=i;let l=100/(o.length-1)*r;const h=null===a?null:100-c(a,this.yIntervals[this.yIntervals.length-1],this.yIntervals[0]);0===r&&(l+=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?8/this.plotAreaEl.clientWidth*100:1),n!==this.highlightStart||s||(s=!0),e.push({lineLabel:t,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:s}),n===this.highlightEnd&&s&&(s=!1)})),e}toggleLineVisibility(t){this.hiddenLines.includes(t)?this.hiddenLines=this.hiddenLines.filter((i=>i!==t)):this.hiddenLines.push(t),i(this.el)}resetDataPointFocus(){this.popoverIndex=-1,this.pointEls.forEach((t=>t.tabIndex=-1)),-1!==this.firstVisibleLineIdx&&(this.lineEls[this.firstVisibleLineIdx].querySelectorAll(".point")[0].tabIndex=0,this.focusedDataPoint=[this.firstVisibleLineIdx,0])}calcDelta(t,i){let e;if(null===t.yValue||null===i.yValue)e=g.noData;else if(t.yValue==i.yValue)e="0%";else if(0==i.yValue)e="-";else{const o=Math.round((t.yValue-i.yValue)/i.yValue*100*100)/100;e=`${o>0?"+":""}${o}%`}return e}renderLegend(){const t=Object.keys(this.parsedLineData);return e("div",{ref:t=>this.legendEl=t,class:"legend"},t.map(((t,i)=>{const o=this.hiddenLines.includes(i);return e("div",{id:`legend-label-${i}`,class:"legend-label "+(-1!==this.focusedLine&&this.focusedLine!==i?"faded":""),onMouseEnter:()=>this.focusedLine=o?-1:i,onMouseLeave:()=>this.focusedLine=-1},this.renderIcon(i),t,this.visibilityToggles&&this.renderVisibilityToggle(t,i,o))})))}renderVisibilityToggle(t,i,o){return e("wm-button",{id:`visibility-button-${i}`,class:"visibility-toggle","label-for-identical-buttons":`${0===i?`Toggle line visibility list with ${this.dataPointMatrix.length} items`:""} ${o?b.show:b.hide} ${t} toggle ${o?"pressed":""}`,"button-type":"navigational",tooltip:o?b.show:b.hide,tooltipPosition:"bottom",icon:o?"f209":"f208",onClick:()=>this.toggleLineVisibility(i),onKeyDown:t=>this.handleVisibilityToggleKeydown(t,i),onFocus:()=>this.popoverIndex=-1})}renderIcon(t){const{color:i,icon:o}=this.lineStyles[t];return e("span",{class:"icon",style:{"--iconColor":i,"--icon":`"\\${o}"`,"--translation":5===t?"rotate(180deg)":"unset"}})}renderXIntervals(){return e("div",{class:"x-intervals",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`}},this.xIntervals.map((t=>e("span",{class:"x-interval "+(this.displayedXIntervals.includes(t)?"":"hidden")},t))))}renderYIntervals(){return e("div",{ref:t=>this.yIntervalsEl=t,class:"y-intervals"},this.yIntervals.map((t=>e("span",{class:"y-interval"},p(t)))))}renderData(){return this.dataPointMatrix.map(((t,i)=>{let o=this.focusedLine===i?"focused":"faded";const s=this.hiddenLines.includes(i);return e("div",{class:`line ${-1!==this.focusedLine?o:""} ${s?"hidden":""}`},this.renderLines(i),this.renderPoints(i))}))}renderPoints(t){const i=this.dataPointMatrix[t];return e("div",{class:"line-icons"},i.map(((o,s)=>{const{lineLabel:r,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:c}=o;if(null!==a){const{color:p,icon:d}=this.lineStyles[t],v=0===t&&0===s?0:void 0,b={"--icon":`"\\${d}"`,"--iconColor":p,"--xPosition":l+"%","--yPosition":h+"%","--translation":5===t?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};let f=`${r} ${c?this.highlightQualifier:""} ${this.xAxisLabel} ${n+(this.parsedUnits[0]?this.parsedUnits[0]:"")}, ${this.yAxisLabel}: ${a+(this.parsedUnits[1]?this.parsedUnits[1]:"")}`;if(this.showDeltas&&s>0){const t=i[s-1];f+=`, ${g.getChangeSince(t.xValue)} ${this.calcDelta(o,t)}`}return e("span",{id:`${r}-${s}`,role:"img","aria-label":f,tabIndex:v,class:"point icon",style:b,"data-lineidx":t,"data-xvalue":n,onKeyDown:t=>this.handleDataPointKeydown(t),onFocus:()=>this.popoverIndex=s,onClick:t=>this.focusDataPointByEl(t.target),onMouseEnter:()=>this.popoverIndex=s})}})))}renderLines(t){const i=this.dataPointMatrix[t];return e("svg",{class:"line-svg"},i.map(((o,s)=>{if(null!==o.yValue&&s!==i.length-1&&null!==i[s+1].yValue){const{color:r}=this.lineStyles[t],{xPositionPercent:n,yPositionPercent:a}=o,{xPositionPercent:l,yPositionPercent:h}=i[s+1];return e("line",{x1:n+"%",y1:a+"%",x2:l+"%",y2:h+"%",stroke:r,"stroke-width":"2px"})}})))}renderHoverAreas(){return e("div",{class:"hover-area-wrapper",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`},onMouseLeave:()=>this.popoverIndex=-1},this.xIntervals.map(((t,i)=>e("div",{onMouseEnter:()=>this.popoverIndex=i}))))}renderPopover(){if(!(this.popoverData&&this.popoverData[this.popoverIndex]&&this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`)))return"";const t=this.popoverData[this.popoverIndex],i=t[0].xPositionPercent,o=t.map((t=>t.yPositionPercent)).filter((t=>null!==t)),s=o.reduce(((t,i)=>t+i),0)/o.length,r=this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`),n=this.el.getBoundingClientRect(),a=r.getBoundingClientRect(),l=a.left-n.left,h=n.right-a.right>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),c=l>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),p=8/this.plotAreaEl.clientWidth*100;let d={"--leftPosition":h?i+p+"%":"unset","--rightPosition":c?100-i+p+"%":"unset","--topPosition":s+"%",transform:"translateY(-50%)"};if(!c&&!h){const t=`0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth+"px"} + ${this.el.scrollLeft+"px"} + 2px`;d={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:`translateX(calc(${t}))`}}return e("div",{ref:t=>this.popoverEl=t,class:"popover",style:d},e("div",{class:"title"},t[0].xValue,this.parsedUnits[0]&&e("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.popoverIndex>0&&e("div",{class:"comparison-title"},g.getChangeSince(this.popoverData[this.popoverIndex-1][0].xValue)),this.renderPopoverTable())}renderPopoverTable(){return e("table",{class:"popover-table"},this.popoverData[this.popoverIndex].map(((t,i)=>{if(!this.hiddenLines.includes(i)){const{lineLabel:o,yValue:s}=t,r=this.popoverIndex>0?this.popoverData[this.popoverIndex-1][i]:null,n=null!==s?(new Intl.NumberFormat).format(s):null;return e("tr",{class:"popover-row"},e("td",null,this.renderIcon(i)),e("td",{class:"row-label"},o),e("td",{class:"row-value"},null===s?g.noData:n,null!==s&&this.parsedUnits[1]&&e("span",{class:"unit --y"},this.parsedUnits[1])),this.showDeltas&&r&&this.renderDeltas(t,r))}})))}renderDeltas(t,i){const o=this.calcDelta(t,i),s="+"==o.toString()[0]||"-"==o?"positive":"-"==o.toString()[0]?"negative":"";return i&&e("td",{class:`delta --${s}`},o)}renderHoverIndicator(){return this.dataPointMatrix.length>0&&this.dataPointMatrix[0][this.popoverIndex]?e("div",{class:"hover-indicator",style:{"--xPosition":this.dataPointMatrix[0][this.popoverIndex].xPositionPercent+"%"}}):""}renderHighlight(){const t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent,i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;return e("div",{class:"highlight",style:{"--startPercentage":t+"%","--endPercentage":i+"%"}})}render(){return e(o,{key:"9817eea8765cce513a0848cd222a6409c8f1f912",onBlur:()=>this.resetDataPointFocus(),onMouseLeave:()=>this.popoverIndex=-1},e("div",{key:"60de41437bb425483be4b5a24fc2468c8e8f8d4e",class:"component-wrapper",role:"application","aria-roledescription":v.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),e("div",{key:"2029ed03f09b8c133ee430f7b1d70c9dded326f3",class:"chart-wrapper"},e("div",{key:"4e9123177b8c02cf1fef010d370b2b1a23b2015c",class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&` (${this.parsedUnits[1]})`),this.renderYIntervals(),e("div",{key:"3cbe51169818095cd830e7b8099d3a10980e3cf2",ref:t=>this.plotAreaEl=t,class:"plot-area "+(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":`${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),-1!==this.popoverIndex&&this.renderHoverIndicator(),-1!==this.popoverIndex&&this.renderPopover(),this.renderXIntervals(),e("div",{key:"dad130dfb9063769dd36316cb060c90a8f1c8cb8",class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&` (${this.parsedUnits[0]})`)),e("div",{key:"bb4ffc7fbae6ab63e6f3e16c1d7e8a98c382e243",id:"chart-description",class:"sr-only"},`${g.instructions} ${this.description}`),e("div",{key:"de40d0eecd0db387912b45fb2b4576b37e3876aa",ref:t=>this.liveRegionEl=t,"aria-live":"polite",class:"sr-only"},this.announcement)))}get el(){return s(this)}static get watchers(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}}};f.style=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .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:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);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:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0;border-radius:3px}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}: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{f as wm_line_chart}
|
|
1
|
+
import{r as t,f as i,h as e,H as o,g as s}from"./p-568c595f.js";import{d as r,E as n,x as a,F as l,G as h,H as c}from"./p-e995f7f0.js";import{n as p,o as d}from"./p-d837c1f5.js";import{l as g,c as v,g as x}from"./p-d79fdf0b.js";const u=class{constructor(i){t(this,i),this.minTickWidth=120,this.popoverData=[],this.focusedDataPoint=[0,0],this.dataPointMatrix=[],this.xIntervals=[],this.displayedXIntervals=[],this.yIntervals=[],this.lineStyles=[{color:"#8b86ca",icon:"f536"},{color:"#2e1b46",icon:"f12f"},{color:"#0089e4",icon:"f763"},{color:"#088000",icon:"f4ce"},{color:"#ea8500",icon:"f70a"},{color:"#d54f41",icon:"f536"},{color:"#146ca9",icon:"f6ff"}],this.debouncedResize=r((async()=>{this.displayedXIntervals=this.determineDisplayedXIntervals()}),100),this.label=void 0,this.description="",this.xAxisLabel=void 0,this.yAxisLabel=void 0,this.lineData=void 0,this.units="null,null",this.labelWidth="120px",this.highlightQualifier="highlighted",this.highlightStart=void 0,this.highlightEnd=void 0,this.visibilityToggles=!1,this.showDeltas=!1,this.yRange=void 0,this.parsedLineData={},this.popoverIndex=-1,this.focusedLine=-1,this.hiddenLines=[],this.isTabbing=!1,this.intervalSkip=0,this.announcement=""}parseData(){this.parsedLineData=JSON.parse(this.lineData),this.yIntervals=this.calcYIntervals().reverse(),this.xIntervals=Object.keys(Object.values(this.parsedLineData)[0]),this.displayedXIntervals=this.determineDisplayedXIntervals(),this.dataPointMatrix=Object.entries(this.parsedLineData).map((t=>this.buildLineDataPointDetails(t[0],t[1]))),this.popoverData=n(this.dataPointMatrix)}handleIntervalSkip(){this.parseData()}get hasPartialInterval(){return this.intervalSkip>0&&this.xIntervals.length%2==0}get parsedUnits(){return a(this.units).map((t=>"null"===t?null:t))}get visibilityToggleEls(){return this.legendEl.querySelectorAll("wm-button")}get lineEls(){return this.plotAreaEl.querySelectorAll(".line")}get firstVisibleLineIdx(){let t=0;for(;this.hiddenLines.includes(t);)t++;return t<this.dataPointMatrix.length?t:-1}get pointEls(){return this.plotAreaEl.querySelectorAll(".point")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.parseData()}componentDidLoad(){new ResizeObserver((()=>this.debouncedResize())).observe(this.el)}handleVisibilityToggleKeydown(t,i){switch(t.key){case"Tab":t.shiftKey||-1===this.firstVisibleLineIdx||(t.preventDefault(),this.announce(this.lineFocusMessage(this.firstVisibleLineIdx)),this.focusDataPoint(this.firstVisibleLineIdx,0));break;case"ArrowUp":case"ArrowLeft":t.preventDefault();const e=l(i,-1,this.dataPointMatrix.length-1);this.visibilityToggleEls[e].focus();break;case"ArrowDown":case"ArrowRight":t.preventDefault();const o=l(i,1,this.dataPointMatrix.length-1);this.visibilityToggleEls[o].focus()}}handleDataPointKeydown(t){const[i,e]=this.focusedDataPoint,o=this.lineEls[i].querySelectorAll(".point").length,s=this.dataPointMatrix.length;switch(t.key){case"Tab":t.shiftKey&&this.visibilityToggles&&(t.preventDefault(),this.visibilityToggleEls[0].focus());break;case"ArrowUp":t.preventDefault();let r=i;do{r=l(r,-1,s-1)}while(this.hiddenLines.includes(r));this.announce(this.lineFocusMessage(r)),this.focusDataPoint(r,e);break;case"ArrowDown":t.preventDefault();let n=i;do{n=l(n,1,s-1)}while(this.hiddenLines.includes(n));this.announce(this.lineFocusMessage(n)),this.focusDataPoint(n,e);break;case"ArrowLeft":t.preventDefault();const a=l(e,-1,o-1);this.focusDataPoint(i,a);break;case"ArrowRight":t.preventDefault();const h=l(e,1,o-1);this.focusDataPoint(i,h)}}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}lineFocusMessage(t){const i=this.dataPointMatrix[t][0].lineLabel,e=this.dataPointMatrix[t].filter((t=>null!==t.yValue)).length;return`${i}, line ${t+1} of ${this.dataPointMatrix.length} with ${e} data points`}focusDataPoint(t,i){const e=this.lineEls[t].querySelectorAll(".point")[i];this.pointEls.forEach((t=>t.tabIndex=-1)),e.tabIndex=0,e.focus(),this.focusedDataPoint=[t,i]}focusDataPointByEl(t){const i=parseInt(t.dataset.lineidx),e=Array.from(t.parentElement.querySelectorAll(".point")).indexOf(t);this.pointEls.forEach((t=>t.tabIndex=-1)),t.tabIndex=0,t.focus(),this.focusedDataPoint=[i,e]}calcYIntervals(){let t=[];if(this.yRange)t=a(this.yRange).map((t=>parseInt(t)));else{let i=[];Object.values(this.parsedLineData).flat().forEach((t=>i.push(...Object.values(t))));const e=i.filter((t=>null!==t));let o=Math.min(...e);const s=Math.max(...e);let r=d(s-o,4),n=r;for(;o%r!=0&&n>0;)o--,n--;r=d(s-o,4);let a=o;for(;a<=s+r;)t.push(a),a+=r}return t}determineDisplayedXIntervals(){const t=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?Math.round(this.plotAreaEl.clientWidth/this.minTickWidth):this.xIntervals.length,{skipInterval:i,skippedList:e}=h(this.xIntervals,t);return this.intervalSkip=i,e}buildLineDataPointDetails(t,i){let e=[];const o=Object.entries(i);let s;return o.forEach(((i,r)=>{const[n,a]=i;let l=100/(o.length-1)*r;const h=null===a?null:100-c(a,this.yIntervals[this.yIntervals.length-1],this.yIntervals[0]);0===r&&(l+=this.plotAreaEl&&this.plotAreaEl.clientWidth>0?8/this.plotAreaEl.clientWidth*100:1),n!==this.highlightStart||s||(s=!0),e.push({lineLabel:t,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:s}),n===this.highlightEnd&&s&&(s=!1)})),e}toggleLineVisibility(t){this.hiddenLines.includes(t)?this.hiddenLines=this.hiddenLines.filter((i=>i!==t)):this.hiddenLines.push(t),i(this.el)}resetDataPointFocus(){this.popoverIndex=-1,this.pointEls.forEach((t=>t.tabIndex=-1)),-1!==this.firstVisibleLineIdx&&(this.lineEls[this.firstVisibleLineIdx].querySelectorAll(".point")[0].tabIndex=0,this.focusedDataPoint=[this.firstVisibleLineIdx,0])}calcDelta(t,i){let e;if(null===t.yValue||null===i.yValue)e=g.noData;else if(t.yValue==i.yValue)e="0%";else if(0==i.yValue)e="-";else{const o=Math.round((t.yValue-i.yValue)/i.yValue*100*100)/100;e=`${o>0?"+":""}${o}%`}return e}renderLegend(){const t=Object.keys(this.parsedLineData);return e("div",{ref:t=>this.legendEl=t,class:"legend"},t.map(((t,i)=>{const o=this.hiddenLines.includes(i);return e("div",{id:`legend-label-${i}`,class:"legend-label "+(-1!==this.focusedLine&&this.focusedLine!==i?"faded":""),onMouseEnter:()=>this.focusedLine=o?-1:i,onMouseLeave:()=>this.focusedLine=-1},this.renderIcon(i),t,this.visibilityToggles&&this.renderVisibilityToggle(t,i,o))})))}renderVisibilityToggle(t,i,o){return e("wm-button",{id:`visibility-button-${i}`,class:"visibility-toggle","label-for-identical-buttons":`${0===i?`Toggle line visibility list with ${this.dataPointMatrix.length} items`:""} ${o?x.show:x.hide} ${t} toggle ${o?"pressed":""}`,"button-type":"navigational",tooltip:o?x.show:x.hide,tooltipPosition:"bottom",icon:o?"f209":"f208",onClick:()=>this.toggleLineVisibility(i),onKeyDown:t=>this.handleVisibilityToggleKeydown(t,i),onFocus:()=>this.popoverIndex=-1})}renderIcon(t){const{color:i,icon:o}=this.lineStyles[t];return e("span",{class:"icon",style:{"--iconColor":i,"--icon":`"\\${o}"`,"--translation":5===t?"rotate(180deg)":"unset"}})}renderXIntervals(){return e("div",{class:"x-intervals",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`}},this.xIntervals.map((t=>e("span",{class:"x-interval "+(this.displayedXIntervals.includes(t)?"":"hidden")},t))))}renderYIntervals(){return e("div",{ref:t=>this.yIntervalsEl=t,class:"y-intervals"},this.yIntervals.map((t=>e("span",{class:"y-interval"},p(t)))))}renderData(){return this.dataPointMatrix.map(((t,i)=>{let o=this.focusedLine===i?"focused":"faded";const s=this.hiddenLines.includes(i);return e("div",{class:`line ${-1!==this.focusedLine?o:""} ${s?"hidden":""}`},this.renderLines(i),this.renderPoints(i))}))}renderPoints(t){const i=this.dataPointMatrix[t];return e("div",{class:"line-icons"},i.map(((o,s)=>{const{lineLabel:r,xValue:n,yValue:a,xPositionPercent:l,yPositionPercent:h,highlighted:c}=o;if(null!==a){const{color:p,icon:d}=this.lineStyles[t],v=0===t&&0===s?0:void 0,x={"--icon":`"\\${d}"`,"--iconColor":p,"--xPosition":l+"%","--yPosition":h+"%","--translation":5===t?"translate(-50%, -50%) rotate(180deg)":"translate(-50%, -50%)"};let u=`${r} ${c?this.highlightQualifier:""} ${this.xAxisLabel} ${n+(this.parsedUnits[0]?this.parsedUnits[0]:"")}, ${this.yAxisLabel}: ${a+(this.parsedUnits[1]?this.parsedUnits[1]:"")}`;if(this.showDeltas&&s>0){const t=i[s-1];u+=`, ${g.getChangeSince(t.xValue)} ${this.calcDelta(o,t)}`}return e("span",{id:`${r}-${s}`,role:"img","aria-label":u,tabIndex:v,class:"point icon",style:x,"data-lineidx":t,"data-xvalue":n,onKeyDown:t=>this.handleDataPointKeydown(t),onFocus:()=>this.popoverIndex=s,onClick:t=>this.focusDataPointByEl(t.target),onMouseEnter:()=>this.popoverIndex=s})}})))}renderLines(t){const i=this.dataPointMatrix[t];return e("svg",{class:"line-svg"},i.map(((o,s)=>{if(null!==o.yValue&&s!==i.length-1&&null!==i[s+1].yValue){const{color:r}=this.lineStyles[t],{xPositionPercent:n,yPositionPercent:a}=o,{xPositionPercent:l,yPositionPercent:h}=i[s+1];return e("line",{x1:n+"%",y1:a+"%",x2:l+"%",y2:h+"%",stroke:r,"stroke-width":"2px"})}})))}renderHoverAreas(){return e("div",{class:"hover-area-wrapper",style:{"--columns":`.5fr repeat(${this.xIntervals.length-2}, 1fr) .5fr`},onMouseLeave:()=>this.popoverIndex=-1},this.xIntervals.map(((t,i)=>e("div",{onMouseEnter:()=>this.popoverIndex=i}))))}renderPopover(){if(!(this.popoverData&&this.popoverData[this.popoverIndex]&&this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`)))return"";const t=this.popoverData[this.popoverIndex],i=t[0].xPositionPercent,o=t.map((t=>t.yPositionPercent)).filter((t=>null!==t)),s=o.reduce(((t,i)=>t+i),0)/o.length,r=this.plotAreaEl.querySelector(`.point[data-xvalue="${this.dataPointMatrix[0][this.popoverIndex].xValue}"]`),n=this.el.getBoundingClientRect(),a=r.getBoundingClientRect(),l=a.left-n.left,h=n.right-a.right>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),c=l>=(this.popoverEl?Math.min(this.popoverEl.clientWidth,400):400),p=8/this.plotAreaEl.clientWidth*100;let d={"--leftPosition":h?i+p+"%":"unset","--rightPosition":c?100-i+p+"%":"unset","--topPosition":s+"%",transform:"translateY(-50%)"};if(!c&&!h){const t=`0px - ${this.labelWidth} - 20px - ${this.yIntervalsEl.clientWidth+"px"} + ${this.el.scrollLeft+"px"} + 2px`;d={"--leftPosition":"0%","--topPosition":"0%",maxWidth:Math.min(this.el.clientWidth-2,400)+"px",transform:`translateX(calc(${t}))`}}return e("div",{ref:t=>this.popoverEl=t,class:"popover",style:d},e("div",{class:"title"},t[0].xValue,this.parsedUnits[0]&&e("span",{class:"unit --x"},"(",this.parsedUnits[0],")")),this.showDeltas&&this.popoverIndex>0&&e("div",{class:"comparison-title"},g.getChangeSince(this.popoverData[this.popoverIndex-1][0].xValue)),this.renderPopoverTable())}renderPopoverTable(){return e("table",{class:"popover-table"},this.popoverData[this.popoverIndex].map(((t,i)=>{if(!this.hiddenLines.includes(i)){const{lineLabel:o,yValue:s}=t,r=this.popoverIndex>0?this.popoverData[this.popoverIndex-1][i]:null,n=null!==s?(new Intl.NumberFormat).format(s):null;return e("tr",{class:"popover-row"},e("td",null,this.renderIcon(i)),e("td",{class:"row-label"},o),e("td",{class:"row-value"},null===s?g.noData:n,null!==s&&this.parsedUnits[1]&&e("span",{class:"unit --y"},this.parsedUnits[1])),this.showDeltas&&r&&this.renderDeltas(t,r))}})))}renderDeltas(t,i){const o=this.calcDelta(t,i),s="+"==o.toString()[0]||"-"==o?"positive":"-"==o.toString()[0]?"negative":"";return i&&e("td",{class:`delta --${s}`},o)}renderHoverIndicator(){return this.dataPointMatrix.length>0&&this.dataPointMatrix[0][this.popoverIndex]?e("div",{class:"hover-indicator",style:{"--xPosition":this.dataPointMatrix[0][this.popoverIndex].xPositionPercent+"%"}}):""}renderHighlight(){const t=this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightStart)].xPositionPercent,i=this.highlightEnd?100-this.dataPointMatrix[0][this.xIntervals.indexOf(this.highlightEnd)].xPositionPercent:0;return e("div",{class:"highlight",style:{"--startPercentage":t+"%","--endPercentage":i+"%"}})}render(){return e(o,{onBlur:()=>this.resetDataPointFocus(),onMouseLeave:()=>this.popoverIndex=-1},e("div",{class:"component-wrapper",role:"application","aria-roledescription":v.interactiveChart,"aria-label":this.label,"aria-describedby":"chart-description"},this.renderLegend(),e("div",{class:"chart-wrapper"},e("div",{class:"chart-label --y-axis",style:{"--labelWidth":this.labelWidth}},this.yAxisLabel,this.parsedUnits[1]&&` (${this.parsedUnits[1]})`),this.renderYIntervals(),e("div",{ref:t=>this.plotAreaEl=t,class:"plot-area "+(this.hasPartialInterval?"":"right-border"),style:{"--backgroundSize":`${this.dataPointMatrix[0][this.xIntervals.indexOf(this.displayedXIntervals[1])].xPositionPercent}%`}},this.highlightStart&&this.renderHighlight(),this.renderData(),this.renderHoverAreas()),-1!==this.popoverIndex&&this.renderHoverIndicator(),-1!==this.popoverIndex&&this.renderPopover(),this.renderXIntervals(),e("div",{class:"chart-label --x-axis"},this.xAxisLabel,this.parsedUnits[0]&&` (${this.parsedUnits[0]})`)),e("div",{id:"chart-description",class:"sr-only"},`${g.instructions} ${this.description}`),e("div",{ref:t=>this.liveRegionEl=t,"aria-live":"polite",class:"sr-only"},this.announcement)))}get el(){return s(this)}static get watchers(){return{lineData:["parseData"],intervalSkip:["handleIntervalSkip"]}}};u.style=':host{--wmcolor-linechart-currentposition:var(--wmcolor-lavender);--wmcolor-linechart-delta-text-negative:var(--wmcolor-text-negative);--wmcolor-linechart-delta-text-positive:var(--wmcolor-text-positive);--wmcolor-linechart-gridline:var(--wmcolor-chart-gridline);--wmcolor-linechart-highlight-background:var(--wmcolor-background-highlight);--wmcolor-linechart-popover-background:var(--wmcolor-chart-popover-background);display:block;height:500px;width:100%;font-size:14px;overflow-y:visible;overflow-x:auto}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:562px;width:100%;height:100%;outline:none}:host .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;position:relative;color:var(--iconColor);-webkit-transform:var(--translation, unset);transform:var(--translation, unset)}:host .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:var(--icon);padding:0 3px;z-index:1}:host .icon:after{color:white;position:absolute;left:3px;-webkit-transform:scale(180%);transform:scale(180%);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:var(--icon);z-index:0}:host .legend{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px 16px;margin-top:4px;margin-bottom:16px}:host .legend .legend-label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:default;font-weight:600}:host .legend .legend-label.faded{opacity:0.3}:host .legend .legend-label .icon{margin-right:4px}:host .legend .visibility-toggle{margin-left:4px}:host .chart-wrapper{position:relative;-ms-flex-positive:1;flex-grow:1;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:1fr auto auto;margin-right:16px}:host .chart-label{font-size:14px;font-weight:600}:host .chart-label.--y-axis{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:var(--labelWidth);align-self:center;margin-right:16px;grid-area:1/1/2/2;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}:host .chart-label.--x-axis{margin-top:16px;text-align:center;grid-area:3/3/4/4}:host .y-intervals{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;grid-area:1/2/2/3;margin-right:4px}:host .y-intervals .y-interval{text-align:right}:host .x-intervals{display:grid;grid-template-columns:var(--columns);grid-area:2/3/3/4;line-height:1;margin-top:4px}:host .x-intervals .x-interval{text-align:center}:host .x-intervals .x-interval:first-child{text-align:left}:host .x-intervals .x-interval:last-child{text-align:right}:host .x-intervals .x-interval.hidden{visibility:hidden}:host .plot-area{position:relative;grid-area:1/3/2/4;background-image:linear-gradient(90deg, var(--wmcolor-linechart-gridline) 1px, transparent 1px);border-bottom:1px solid var(--wmcolor-linechart-gridline);background-size:var(--backgroundSize)}:host .plot-area.right-border{border-right:1px solid var(--wmcolor-linechart-gridline)}:host .line{position:absolute;width:100%;height:100%}:host .line .icon{position:absolute;-webkit-transform:var(--translation);transform:var(--translation);left:var(--xPosition);top:var(--yPosition);z-index:1}:host .line .icon:focus{z-index:2;outline:none}:host .line .icon:focus:before{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:0;border-radius:3px}:host .line .line-svg{height:100%;width:100%}:host .line.faded{opacity:0.3}:host .line.focused{z-index:1}:host .line.hidden{visibility:hidden}:host .hover-area-wrapper{position:absolute;width:100%;height:100%;top:0;left:0;display:grid;grid-template-rows:1fr;grid-template-columns:var(--columns)}:host .hover-indicator{-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;height:100%;width:2px;border:1px solid var(--wmcolor-linechart-currentposition);-webkit-transform:translateX(-50%);transform:translateX(-50%);left:var(--xPosition);grid-column:3/4;grid-row:1/2;pointer-events:none}:host .popover{width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:400px;background-color:var(--wmcolor-linechart-popover-background);position:absolute;top:var(--topPosition, 0);left:var(--leftPosition, unset);right:var(--rightPosition, unset);padding:16px;border-radius:5px;-webkit-box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);box-shadow:0px 2px 10px 0px rgba(0, 0, 0, 0.09);-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;z-index:3;grid-column:3/4;grid-row:1/2;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box}:host .popover .title{font-size:16px;font-weight:600}:host .popover .comparison-title{font-style:italic;margin-top:4px}:host .popover .unit{font-size:12px;font-weight:600}:host .popover .unit.--x{margin-left:4px}:host .popover .popover-table{margin-top:16px}:host .popover .popover-table .popover-row{line-height:1}:host .popover .popover-table .popover-row:not(:last-child) td{padding-bottom:8px}:host .popover .popover-table .popover-row .row-label{font-weight:600;padding-right:16px;overflow-wrap:anywhere}:host .popover .popover-table .popover-row .row-label .icon{margin-right:4px}:host .popover .popover-table .popover-row .row-value,:host .popover .popover-table .popover-row .delta{text-align:right;white-space:nowrap}:host .popover .popover-table .popover-row .delta{padding-left:12px;font-weight:600}:host .popover .popover-table .popover-row .delta.--positive{color:var(--wmcolor-linechart-delta-text-positive)}:host .popover .popover-table .popover-row .delta.--negative{color:var(--wmcolor-linechart-delta-text-negative)}:host .highlight{position:absolute;height:100%;background-color:color-mix(in srgb, var(--wmcolor-linechart-highlight-background) 60%, transparent);left:var(--startPercentage);right:var(--endPercentage)}: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{u as wm_line_chart}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as i,H as e,g as r}from"./p-568c595f.js";import{d as n,L as s,i as a}from"./p-e995f7f0.js";const p=class{constructor(i){t(this,i),this.wmChartPopoverButtonTriggered=o(this,"wmChartPopoverButtonTriggered",7),this.wmProgressIndicatorButtonTriggered=o(this,"wmProgressIndicatorButtonTriggered",7),this.intChartPopoverOpenChanged=o(this,"intChartPopoverOpenChanged",7),this.chartEl=this.el.parentElement.getRootNode().host,this.popoverWidth=168,this.popoverClicked=!1,this.debouncedClosePopover=n((async()=>{this.open=!1}),10),this.open=!1,this.sliceDetails=void 0}get eventToEmit(){return"WM-CHART"===this.chartEl.nodeName?this.wmChartPopoverButtonTriggered:this.wmProgressIndicatorButtonTriggered}handleClickOnDocument(t){this.open&&t.target!=this.sliceDetails.sliceRef&&(this.open=this.popoverClicked,this.popoverClicked=!1)}handleClick(t){this.open&&(this.popoverClicked=t.target===this.el||this.el.contains(t.target))}componentDidLoad(){document.addEventListener("scroll",(()=>{this.debouncedClosePopover()}));const t=s(this.chartEl);t&&t.addEventListener("scroll",(()=>{this.debouncedClosePopover()}))}handleOpenChange(){this.intChartPopoverOpenChanged.emit(this.open)}handleDetailsChange(){this.sliceDetails&&this.sliceDetails.coords&&this.positionPopover()}updateHighlightedInfo(){}handleButtonClick(){if(this.sliceDetails){const t=this.sliceDetails.sliceRef;t.click(),this.eventToEmit.emit(t)}}renderLiveRegion(){if(this.liveRegion){this.liveRegion.innerHTML="";const t=document.createElement("div"),o=document.createElement("span");o.innerHTML=this.sliceDetails.title+" "||"",t.appendChild(o);const i=document.createElement("span");if(i.innerHTML=this.sliceDetails.text+" "||"",t.appendChild(i),this.sliceDetails.buttonText){const o=document.createElement("span");o.innerHTML=this.sliceDetails.buttonText+" "+a.formatMessage({id:"chart.infoButton",defaultMessage:"Button. Click for more information."}),t.appendChild(o)}this.liveRegion.appendChild(t)}}positionPopover(){this.el.style.top=this.sliceDetails.coords.y+"px",this.el.style.left=window.innerWidth-this.sliceDetails.coords.x>=this.popoverWidth+10?this.sliceDetails.coords.x+"px":this.sliceDetails.coords.x-this.popoverWidth+"px"}render(){return i(e,null,this.open&&this.sliceDetails?i("div",{"aria-hidden":"true",class:"popover"},i("h1",{class:`title ${this.sliceDetails&&this.sliceDetails.title&&("-"===this.sliceDetails.title[0]?"negative":"+"===this.sliceDetails.title[0]?"positive":"")}`},this.sliceDetails.title),i("p",{class:"text"},this.sliceDetails.text),this.sliceDetails.buttonText?i("button",{tabindex:"-1",focusable:"false",class:"popover-button",onClick:()=>this.handleButtonClick()},i("svg",{class:"btn-icon",height:"9",width:"9"},i("path",{fill:"#575195",d:"M0 3.38v2.25h9V3.38H0zM0 0v2.25h4.5V0H0zm6.19 6.75H0V9h6.19V6.75z"})),i("span",{class:"button-text"},this.sliceDetails.buttonText)):""):"",i("div",{ref:t=>this.liveRegion=t,class:"live-region sr-only","aria-live":"polite","aria-atomic":"true"},this.open&&this.renderLiveRegion()))}get el(){return r(this)}static get watchers(){return{open:["handleOpenChange"],sliceDetails:["handleDetailsChange"]}}};p.style="priv-chart-popover{--wmcolor-chart-popover-link-background:var(--wmcolor-background-transparent);--wmcolor-chart-popover-link-text-focus:var(--wmcolor-interactive-focus);--wmcolor-chart-popover-link-text:var(--wmcolor-button-text-textonly);position:fixed;z-index:10;border-radius:0.1875rem;-webkit-box-shadow:0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.12);-moz-box-shadow:0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.12);box-shadow:0 11px 15px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.12);background-color:var(--wmcolor-chart-popover-background);font-size:0.875rem;text-align:left}priv-chart-popover.user-is-tabbing .button-text{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.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}.popover{width:10.5rem;padding:0.625rem 0.9375rem;-webkit-box-sizing:border-box;box-sizing:border-box}.popover .title{font-size:1em;font-weight:500;margin:0;padding-top:0;padding-left:0;padding-bottom:0.25rem}.popover .title.positive{color:var(--wmcolor-chart-label-text-positive)}.popover .title.negative{color:var(--wmcolor-chart-label-text-negative)}.popover .text{margin:0;margin-bottom:0.5rem}.popover .popover-button{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;position:relative;display:inline-block;margin-left:1rem;padding-left:0;padding-right:0;height:auto;border:none;background:var(--wmcolor-chart-popover-link-background);cursor:pointer;text-decoration:none;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;font-weight:700;color:var(--wmcolor-chart-popover-link-text);line-height:normal}.popover .popover-button .button-text{display:inline-block}.popover .popover-button .btn-icon{position:absolute;top:0.1875rem;left:-1rem}.popover .popover-button:focus{outline:none}.popover .popover-button::-moz-focus-inner{border:0;outline:none}.popover .popover-button:hover{text-decoration:none}.popover .popover-button:hover span{text-decoration:underline}";export{p as priv_chart_popover}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var r=function(e,n){r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))r[n]=e[n]};return r(e,n)};return function(e,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(r,e,n,t){function i(r){return r instanceof n?r:new n((function(e){e(r)}))}return new(n||(n=Promise))((function(n,a){function f(r){try{o(t.next(r))}catch(r){a(r)}}function u(r){try{o(t["throw"](r))}catch(r){a(r)}}function o(r){r.done?n(r.value):i(r.value).then(f,u)}o((t=t.apply(r,e||[])).next())}))};var __generator=this&&this.__generator||function(r,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,f;return f={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(f[Symbol.iterator]=function(){return this}),f;function u(r){return function(e){return o([r,e])}}function o(u){if(t)throw new TypeError("Generator is already executing.");while(f&&(f=0,u[0]&&(n=0)),n)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1];a=u;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(u);break}if(a[2])n.ops.pop();n.trys.pop();continue}u=e.call(r,n)}catch(r){u=[6,r];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(r,e,n){if(n||arguments.length===2)for(var t=0,i=e.length,a;t<i;t++){if(a||!(t in e)){if(!a)a=Array.prototype.slice.call(e,0,t);a[t]=e[t]}}return r.concat(a||Array.prototype.slice.call(e))};System.register([],(function(r,e){"use strict";return{execute:function(){var n=this;var t="ripple";var i={allRenderFn:false,appendChildSlotFix:false,asyncLoading:true,asyncQueue:false,attachStyles:true,cloneNodeFix:false,cmpDidLoad:true,cmpDidRender:true,cmpDidUnload:false,cmpDidUpdate:true,cmpShouldUpdate:false,cmpWillLoad:true,cmpWillRender:false,cmpWillUpdate:true,connectedCallback:false,constructableCSS:true,cssAnnotations:true,devTools:false,disconnectedCallback:false,element:false,event:true,experimentalSlotFixes:false,formAssociated:false,hasRenderFn:true,hostListener:true,hostListenerTarget:true,hostListenerTargetBody:false,hostListenerTargetDocument:true,hostListenerTargetParent:false,hostListenerTargetWindow:true,hotModuleReplacement:false,hydrateClientSide:false,hydrateServerSide:false,hydratedAttribute:false,hydratedClass:true,initializeNextTick:false,invisiblePrehydration:true,isDebug:false,isDev:false,isTesting:false,lazyLoad:true,lifecycle:true,lifecycleDOMEvents:false,member:true,method:true,mode:false,observeAttribute:true,profile:false,prop:true,propBoolean:true,propMutable:true,propNumber:true,propString:true,reflect:true,scoped:false,scopedSlotTextContentFix:false,scriptDataOpts:false,shadowDelegatesFocus:true,shadowDom:true,slot:true,slotChildNodesFix:false,slotRelocation:true,state:true,style:true,svg:true,taskQueue:true,transformTagName:false,updatable:true,vdomAttribute:true,vdomClass:true,vdomFunctional:true,vdomKey:true,vdomListener:true,vdomPropOrAttr:true,vdomRef:true,vdomRender:true,vdomStyle:true,vdomText:true,vdomXlink:true,watchCallback:true};var a;var f;var u;var o=false;var l=false;var v=false;var s=false;var c=false;var d=function(r,e){if(e===void 0){e=""}{return function(){return}}};var p=function(r,e){{return function(){return}}};var h="{visibility:hidden}.hydrated{visibility:inherit}";var y="slot-fb{display:contents}slot-fb[hidden]{display:none}";var m="http://www.w3.org/1999/xlink";var b={};var w="http://www.w3.org/2000/svg";var g="http://www.w3.org/1999/xhtml";var $=function(r){return r!=null};var _=function(r){r=typeof r;return r==="object"||r==="function"};function S(r){var e,n,t;return(t=(n=(e=r.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&t!==void 0?t:undefined}var k=r("h",(function(r,e){var n=[];for(var t=2;t<arguments.length;t++){n[t-2]=arguments[t]}var i=null;var a=null;var f=null;var u=false;var o=false;var l=[];var v=function(e){for(var n=0;n<e.length;n++){i=e[n];if(Array.isArray(i)){v(i)}else if(i!=null&&typeof i!=="boolean"){if(u=typeof r!=="function"&&!_(i)){i=String(i)}if(u&&o){l[l.length-1].t+=i}else{l.push(u?x(null,i):i)}o=u}}};v(n);if(e){if(e.key){a=e.key}if(e.name){f=e.name}{var s=e.className||e.class;if(s){e.class=typeof s!=="object"?s:Object.keys(s).filter((function(r){return s[r]})).join(" ")}}}if(typeof r==="function"){return r(e===null?{}:e,l,O)}var c=x(r,null);c.i=e;if(l.length>0){c.u=l}{c.o=a}{c.l=f}return c}));var x=function(r,e){var n={v:0,p:r,t:e,h:null,u:null};{n.i=null}{n.o=null}{n.l=null}return n};var j=r("H",{});var A=function(r){return r&&r.p===j};var O={forEach:function(r,e){return r.map(T).forEach(e)},map:function(r,e){return r.map(T).map(e).map(C)}};var T=function(r){return{vattrs:r.i,vchildren:r.u,vkey:r.o,vname:r.l,vtag:r.p,vtext:r.t}};var C=function(r){if(typeof r.vtag==="function"){var e=Object.assign({},r.vattrs);if(r.vkey){e.key=r.vkey}if(r.vname){e.name=r.vname}return k.apply(void 0,__spreadArray([r.vtag,e],r.vchildren||[],false))}var n=x(r.vtag,r.vtext);n.i=r.vattrs;n.u=r.vchildren;n.o=r.vkey;n.l=r.vname;return n};var L=function(r,e){if(r!=null&&!_(r)){if(e&4){return r==="false"?false:r===""||!!r}if(e&2){return parseFloat(r)}if(e&1){return String(r)}return r}return r};var D=r("g",(function(r){return Pr(r).$hostElement$}));var R=r("c",(function(r,e,n){var t=D(r);return{emit:function(r){return F(t,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:r})}}}));var F=function(r,e,n){var t=Gr.ce(e,n);r.dispatchEvent(t);return t};var M=new WeakMap;var P=function(r,e,n){var t=Hr.get(r);if(Kr&&n){t=t||new CSSStyleSheet;if(typeof t==="string"){t=e}else{t.replaceSync(e)}}else{t=e}Hr.set(r,t)};var U=function(r,e,n){var t;var i=E(e);var a=Hr.get(i);r=r.nodeType===11?r:qr;if(a){if(typeof a==="string"){r=r.head||r;var f=M.get(r);var u=void 0;if(!f){M.set(r,f=new Set)}if(!f.has(i)){{u=qr.createElement("style");u.innerHTML=a;var o=(t=Gr.m)!==null&&t!==void 0?t:S(qr);if(o!=null){u.setAttribute("nonce",o)}r.insertBefore(u,r.querySelector("link"))}if(e.v&4){u.innerHTML+=y}if(f){f.add(i)}}}else if(!r.adoptedStyleSheets.includes(a)){r.adoptedStyleSheets=__spreadArray(__spreadArray([],r.adoptedStyleSheets,true),[a],false)}}return i};var N=function(r){var e=r.$;var n=r.$hostElement$;var t=e.v;var i=d("attachStyles",e._);var a=U(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(t&10){n["s-sc"]=a;n.classList.add(a+"-h")}i()};var E=function(r,e){return"sc-"+r._};var W=function(r,e,n,t,i,a){if(n!==t){var f=Er(r,e);var u=e.toLowerCase();if(e==="class"){var o=r.classList;var l=B(n);var v=B(t);o.remove.apply(o,l.filter((function(r){return r&&!v.includes(r)})));o.add.apply(o,v.filter((function(r){return r&&!l.includes(r)})))}else if(e==="style"){{for(var s in n){if(!t||t[s]==null){if(s.includes("-")){r.style.removeProperty(s)}else{r.style[s]=""}}}}for(var s in t){if(!n||t[s]!==n[s]){if(s.includes("-")){r.style.setProperty(s,t[s])}else{r.style[s]=t[s]}}}}else if(e==="key");else if(e==="ref"){if(t){t(r)}}else if(!f&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(Er(Qr,u)){e=u.slice(2)}else{e=u[2]+e.slice(3)}if(n||t){var c=e.endsWith(H);e=e.replace(Q,"");if(n){Gr.rel(r,e,n,c)}if(t){Gr.ael(r,e,t,c)}}}else{var d=_(t);if((f||d&&t!==null)&&!i){try{if(!r.tagName.includes("-")){var p=t==null?"":t;if(e==="list"){f=false}else if(n==null||r[e]!=p){r[e]=p}}else{r[e]=t}}catch(r){}}var h=false;{if(u!==(u=u.replace(/^xlink\:?/,""))){e=u;h=true}}if(t==null||t===false){if(t!==false||r.getAttribute(e)===""){if(h){r.removeAttributeNS(m,e)}else{r.removeAttribute(e)}}}else if((!f||a&4||i)&&!d){t=t===true?"":t;if(h){r.setAttributeNS(m,e,t)}else{r.setAttribute(e,t)}}}}};var z=/\s/;var B=function(r){return!r?[]:r.split(z)};var H="Capture";var Q=new RegExp(H+"$");var q=function(r,e,n,t){var i=e.h.nodeType===11&&e.h.host?e.h.host:e.h;var a=r&&r.i||b;var f=e.i||b;{for(t in a){if(!(t in f)){W(i,t,a[t],undefined,n,e.v)}}}for(t in f){W(i,t,a[t],f[t],n,e.v)}};var G=function(r,e,n,t){var i;var l=e.u[n];var c=0;var d;var p;var h;if(!o){v=true;if(l.p==="slot"){if(a){t.classList.add(a+"-s")}l.v|=l.u?2:1}}if(l.t!==null){d=l.h=qr.createTextNode(l.t)}else if(l.v&1){d=l.h=qr.createTextNode("")}else{if(!s){s=l.p==="svg"}d=l.h=qr.createElementNS(s?w:g,l.v&2?"slot-fb":l.p);if(s&&l.p==="foreignObject"){s=false}{q(null,l,s)}if($(a)&&d["s-si"]!==a){d.classList.add(d["s-si"]=a)}if(l.u){for(c=0;c<l.u.length;++c){p=G(r,l,c,d);if(p){d.appendChild(p)}}}{if(l.p==="svg"){s=false}else if(d.tagName==="foreignObject"){s=true}}}d["s-hn"]=u;{if(l.v&(2|1)){d["s-sr"]=true;d["s-fs"]=(i=l.i)===null||i===void 0?void 0:i.slot;d["s-cr"]=f;d["s-sn"]=l.l||"";h=r&&r.u&&r.u[n];if(h&&h.p===l.p&&r.h){{I(r.h,false)}}}}return d};var I=function(r,e){var n;Gr.v|=1;var t=r.childNodes;for(var i=t.length-1;i>=0;i--){var a=t[i];if(a["s-hn"]!==u&&a["s-ol"]){Z(a).insertBefore(a,Y(a));a["s-ol"].remove();a["s-ol"]=undefined;a["s-sh"]=undefined;if(a.nodeType===1){a.setAttribute("slot",(n=a["s-sn"])!==null&&n!==void 0?n:"")}v=true}if(e){I(a,e)}}Gr.v&=~1};var K=function(r,e,n,t,i,a){var f=r["s-cr"]&&r["s-cr"].parentNode||r;var o;if(f.shadowRoot&&f.tagName===u){f=f.shadowRoot}for(;i<=a;++i){if(t[i]){o=G(null,n,i,r);if(o){t[i].h=o;f.insertBefore(o,Y(e))}}}};var V=function(r,e,n){for(var t=e;t<=n;++t){var i=r[t];if(i){var a=i.h;ar(i);if(a){{l=true;if(a["s-ol"]){a["s-ol"].remove()}else{I(a,true)}}a.remove()}}}};var X=function(r,e,n,t){var i=0;var a=0;var f=0;var u=0;var o=e.length-1;var l=e[0];var v=e[o];var s=t.length-1;var c=t[0];var d=t[s];var p;var h;while(i<=o&&a<=s){if(l==null){l=e[++i]}else if(v==null){v=e[--o]}else if(c==null){c=t[++a]}else if(d==null){d=t[--s]}else if(J(l,c)){rr(l,c);l=e[++i];c=t[++a]}else if(J(v,d)){rr(v,d);v=e[--o];d=t[--s]}else if(J(l,d)){if(l.p==="slot"||d.p==="slot"){I(l.h.parentNode,false)}rr(l,d);r.insertBefore(l.h,v.h.nextSibling);l=e[++i];d=t[--s]}else if(J(v,c)){if(l.p==="slot"||d.p==="slot"){I(v.h.parentNode,false)}rr(v,c);r.insertBefore(v.h,l.h);v=e[--o];c=t[++a]}else{f=-1;{for(u=i;u<=o;++u){if(e[u]&&e[u].o!==null&&e[u].o===c.o){f=u;break}}}if(f>=0){h=e[f];if(h.p!==c.p){p=G(e&&e[a],n,f,r)}else{rr(h,c);e[f]=undefined;p=h.h}c=t[++a]}else{p=G(e&&e[a],n,a,r);c=t[++a]}if(p){{Z(l.h).insertBefore(p,Y(l.h))}}}}if(i>o){K(r,t[s+1]==null?null:t[s+1].h,n,t,a,s)}else if(a>s){V(e,i,o)}};var J=function(r,e){if(r.p===e.p){if(r.p==="slot"){return r.l===e.l}{return r.o===e.o}}return false};var Y=function(r){return r&&r["s-ol"]||r};var Z=function(r){return(r["s-ol"]?r["s-ol"]:r).parentNode};var rr=function(r,e){var n=e.h=r.h;var t=r.u;var i=e.u;var a=e.p;var f=e.t;var u;if(f===null){{s=a==="svg"?true:a==="foreignObject"?false:s}{if(a==="slot");else{q(r,e,s)}}if(t!==null&&i!==null){X(n,t,e,i)}else if(i!==null){if(r.t!==null){n.textContent=""}K(n,null,e,i,0,i.length-1)}else if(t!==null){V(t,0,t.length-1)}if(s&&a==="svg"){s=false}}else if(u=n["s-cr"]){u.parentNode.textContent=f}else if(r.t!==f){n.data=f}};var er=function(r){var e=r.childNodes;for(var n=0,t=e;n<t.length;n++){var i=t[n];if(i.nodeType===1){if(i["s-sr"]){var a=i["s-sn"];i.hidden=false;for(var f=0,u=e;f<u.length;f++){var o=u[f];if(o!==i){if(o["s-hn"]!==i["s-hn"]||a!==""){if(o.nodeType===1&&(a===o.getAttribute("slot")||a===o["s-sn"])){i.hidden=true;break}}else{if(o.nodeType===1||o.nodeType===3&&o.textContent.trim()!==""){i.hidden=true;break}}}}}er(i)}}};var nr=[];var tr=function(r){var e;var n;var t;for(var a=0,f=r.childNodes;a<f.length;a++){var u=f[a];if(u["s-sr"]&&(e=u["s-cr"])&&e.parentNode){n=e.parentNode.childNodes;var o=u["s-sn"];var v=function(){e=n[t];if(!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==u["s-hn"]&&!i.experimentalSlotFixes){if(ir(e,o)){var r=nr.find((function(r){return r.S===e}));l=true;e["s-sn"]=e["s-sn"]||o;if(r){r.S["s-sh"]=u["s-hn"];r.k=u}else{e["s-sh"]=u["s-hn"];nr.push({k:u,S:e})}if(e["s-sr"]){nr.map((function(n){if(ir(n.S,e["s-sn"])){r=nr.find((function(r){return r.S===e}));if(r&&!n.k){n.k=r.k}}}))}}else if(!nr.some((function(r){return r.S===e}))){nr.push({S:e})}}};for(t=n.length-1;t>=0;t--){v()}}if(u.nodeType===1){tr(u)}}};var ir=function(r,e){if(r.nodeType===1){if(r.getAttribute("slot")===null&&e===""){return true}if(r.getAttribute("slot")===e){return true}return false}if(r["s-sn"]===e){return true}return e===""};var ar=function(r){{r.i&&r.i.ref&&r.i.ref(null);r.u&&r.u.map(ar)}};var fr=function(r,e,n){if(n===void 0){n=false}var t,i,s,c;var d=r.$hostElement$;var p=r.$;var h=r.j||x(null,null);var y=A(e)?e:k(null,null,e);u=d.tagName;if(p.A){y.i=y.i||{};p.A.map((function(r){var e=r[0],n=r[1];return y.i[n]=d[e]}))}if(n&&y.i){for(var m=0,b=Object.keys(y.i);m<b.length;m++){var w=b[m];if(d.hasAttribute(w)&&!["key","ref","style","class"].includes(w)){y.i[w]=d[w]}}}y.p=null;y.v|=4;r.j=y;y.h=h.h=d.shadowRoot||d;{a=d["s-sc"]}{f=d["s-cr"];o=(p.v&1)!==0;l=false}rr(h,y);{Gr.v|=1;if(v){tr(y.h);for(var g=0,$=nr;g<$.length;g++){var _=$[g];var S=_.S;if(!S["s-ol"]){var j=qr.createTextNode("");j["s-nr"]=S;S.parentNode.insertBefore(S["s-ol"]=j,S)}}for(var O=0,T=nr;O<T.length;O++){var _=T[O];var S=_.S;var C=_.k;if(C){var L=C.parentNode;var D=C.nextSibling;{var j=(t=S["s-ol"])===null||t===void 0?void 0:t.previousSibling;while(j){var R=(i=j["s-nr"])!==null&&i!==void 0?i:null;if(R&&R["s-sn"]===S["s-sn"]&&L===R.parentNode){R=R.nextSibling;if(!R||!R["s-nr"]){D=R;break}}j=j.previousSibling}}if(!D&&L!==S.parentNode||S.nextSibling!==D){if(S!==D){if(!S["s-hn"]&&S["s-ol"]){S["s-hn"]=S["s-ol"].parentNode.nodeName}L.insertBefore(S,D);if(S.nodeType===1){S.hidden=(s=S["s-ih"])!==null&&s!==void 0?s:false}}}}else{if(S.nodeType===1){if(n){S["s-ih"]=(c=S.hidden)!==null&&c!==void 0?c:false}S.hidden=true}}}}if(l){er(y.h)}Gr.v&=~1;nr.length=0}};var ur=function(r,e){if(e&&!r.O&&e["s-p"]){e["s-p"].push(new Promise((function(e){return r.O=e})))}};var or=function(r,e){{r.v|=16}if(r.v&4){r.v|=512;return}ur(r,r.T);var n=function(){return lr(r,e)};return ee(n)};var lr=function(r,e){var n=d("scheduleUpdate",r.$._);var t=r.C;var i;if(e){{r.v|=256;if(r.L){r.L.map((function(r){var e=r[0],n=r[1];return mr(t,e,n)}));r.L=undefined}}{i=mr(t,"componentWillLoad")}}else{{i=mr(t,"componentWillUpdate")}}n();return vr(i,(function(){return cr(r,t,e)}))};var vr=function(r,e){return sr(r)?r.then(e):e()};var sr=function(r){return r instanceof Promise||r&&r.then&&typeof r.then==="function"};var cr=function(r,e,t){return __awaiter(n,void 0,void 0,(function(){var n,i,a,f,u,o,l;return __generator(this,(function(v){i=r.$hostElement$;a=d("update",r.$._);f=i["s-rc"];if(t){N(r)}u=d("render",r.$._);{dr(r,e,i,t)}if(f){f.map((function(r){return r()}));i["s-rc"]=undefined}u();a();{o=(n=i["s-p"])!==null&&n!==void 0?n:[];l=function(){return pr(r)};if(o.length===0){l()}else{Promise.all(o).then(l);r.v|=4;o.length=0}}return[2]}))}))};var dr=function(r,e,n,t){try{e=e.render&&e.render();{r.v&=~16}{r.v|=2}{{{fr(r,e,t)}}}}catch(e){Wr(e,r.$hostElement$)}return null};var pr=function(r){var e=r.$._;var n=r.$hostElement$;var t=d("postUpdate",e);var i=r.C;var a=r.T;{mr(i,"componentDidRender")}if(!(r.v&64)){r.v|=64;{br(n)}{mr(i,"componentDidLoad")}t();{r.D(n);if(!a){yr()}}}else{{mr(i,"componentDidUpdate")}t()}{r.R(n)}{if(r.O){r.O();r.O=undefined}if(r.v&512){re((function(){return or(r,false)}))}r.v&=~(4|512)}};var hr=r("f",(function(r){{var e=Pr(r);var n=e.$hostElement$.isConnected;if(n&&(e.v&(2|16))===2){or(e,false)}return n}}));var yr=function(r){{br(qr.documentElement)}re((function(){return F(Qr,"appload",{detail:{namespace:t}})}))};var mr=function(r,e,n){if(r&&r[e]){try{return r[e](n)}catch(r){Wr(r)}}return undefined};var br=function(r){return r.classList.add("hydrated")};var wr=function(r,e){return Pr(r).F.get(e)};var gr=function(r,e,n,t){var i=Pr(r);var a=i.$hostElement$;var f=i.F.get(e);var u=i.v;var o=i.C;n=L(n,t.M[e][0]);var l=Number.isNaN(f)&&Number.isNaN(n);var v=n!==f&&!l;if((!(u&8)||f===undefined)&&v){i.F.set(e,n);if(o){if(t.P&&u&128){var s=t.P[e];if(s){s.map((function(r){try{o[r](n,f,e)}catch(r){Wr(r,a)}}))}}if((u&(2|16))===2){or(i,false)}}}};var $r=function(r,e,n){var t;var i=r.prototype;if(e.M){if(r.watchers){e.P=r.watchers}var a=Object.entries(e.M);a.map((function(r){var t=r[0],a=r[1][0];if(a&31||n&2&&a&32){Object.defineProperty(i,t,{get:function(){return wr(this,t)},set:function(r){gr(this,t,r,e)},configurable:true,enumerable:true})}else if(n&1&&a&64){Object.defineProperty(i,t,{value:function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}var n;var i=Pr(this);return(n=i===null||i===void 0?void 0:i.U)===null||n===void 0?void 0:n.then((function(){var e;return(e=i.C)===null||e===void 0?void 0:e[t].apply(e,r)}))}})}}));if(n&1){var f=new Map;i.attributeChangedCallback=function(r,n,t){var a=this;Gr.jmp((function(){var u;var o=f.get(r);if(a.hasOwnProperty(o)){t=a[o];delete a[o]}else if(i.hasOwnProperty(o)&&typeof a[o]==="number"&&a[o]==t){return}else if(o==null){var l=Pr(a);var v=l===null||l===void 0?void 0:l.v;if(v&&!(v&8)&&v&128&&t!==n){var s=l.C;var c=(u=e.P)===null||u===void 0?void 0:u[r];c===null||c===void 0?void 0:c.forEach((function(e){if(s[e]!=null){s[e].call(s,t,n,r)}}))}return}a[o]=t===null&&typeof a[o]==="boolean"?false:t}))};r.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=e.P)!==null&&t!==void 0?t:{}),true),a.filter((function(r){var e=r[0],n=r[1];return n[0]&15})).map((function(r){var n=r[0],t=r[1];var i;var a=t[1]||n;f.set(a,n);if(t[0]&512){(i=e.A)===null||i===void 0?void 0:i.push([n,a])}return a})),true)))}}return r};var _r=function(r,e,t,i){return __awaiter(n,void 0,void 0,(function(){var r,n,i,a,f,u,o,l;return __generator(this,(function(v){switch(v.label){case 0:if(!((e.v&32)===0))return[3,3];e.v|=32;r=Br(t);if(!r.then)return[3,2];n=p();return[4,r];case 1:r=v.sent();n();v.label=2;case 2:if(!r.isProxied){{t.P=r.watchers}$r(r,t,2);r.isProxied=true}i=d("createInstance",t._);{e.v|=8}try{new r(e)}catch(r){Wr(r)}{e.v&=~8}{e.v|=128}i();if(r.style){a=r.style;f=E(t);if(!Hr.has(f)){u=d("registerStyles",t._);P(f,a,!!(t.v&1));u()}}v.label=3;case 3:o=e.T;l=function(){return or(e,true)};if(o&&o["s-rc"]){o["s-rc"].push(l)}else{l()}return[2]}}))}))};var Sr=function(r){};var kr=function(r){if((Gr.v&1)===0){var e=Pr(r);var n=e.$;var t=d("connectedCallback",n._);if(!(e.v&1)){e.v|=1;{if(n.v&(4|8)){xr(r)}}{var i=r;while(i=i.parentNode||i.host){if(i["s-p"]){ur(e,e.T=i);break}}}if(n.M){Object.entries(n.M).map((function(e){var n=e[0],t=e[1][0];if(t&31&&r.hasOwnProperty(n)){var i=r[n];delete r[n];r[n]=i}}))}{_r(r,e,n)}}else{Cr(r,e,n.N);if(e===null||e===void 0?void 0:e.C);else if(e===null||e===void 0?void 0:e.W){e.W.then((function(){return Sr()}))}}t()}};var xr=function(r){var e=r["s-cr"]=qr.createComment("");e["s-cn"]=true;r.insertBefore(e,r.firstChild)};var jr=function(r){};var Ar=function(r){return __awaiter(n,void 0,void 0,(function(){var e;return __generator(this,(function(n){if((Gr.v&1)===0){e=Pr(r);{if(e.B){e.B.map((function(r){return r()}));e.B=undefined}}if(e===null||e===void 0?void 0:e.C);else if(e===null||e===void 0?void 0:e.W){e.W.then((function(){return jr()}))}}return[2]}))}))};var Or=r("b",(function(r,e){if(e===void 0){e={}}var n;var t=d();var i=[];var a=e.exclude||[];var f=Qr.customElements;var u=qr.head;var o=u.querySelector("meta[charset]");var l=qr.createElement("style");var v=[];var s;var c=true;Object.assign(Gr,e);Gr.H=new URL(e.resourcesUrl||"./",qr.baseURI).href;var p=false;r.map((function(r){r[1].map((function(e){var n;var t={v:e[0],_:e[1],M:e[2],N:e[3]};if(t.v&4){p=true}{t.M=e[2]}{t.N=e[3]}{t.A=[]}{t.P=(n=e[4])!==null&&n!==void 0?n:{}}var u=t._;var o=function(r){__extends(e,r);function e(e){var n=r.call(this,e)||this;e=n;Nr(e,t);if(t.v&1){{{e.attachShadow({mode:"open",delegatesFocus:!!(t.v&16)})}}}return n}e.prototype.connectedCallback=function(){var r=this;if(s){clearTimeout(s);s=null}if(c){v.push(this)}else{Gr.jmp((function(){return kr(r)}))}};e.prototype.disconnectedCallback=function(){var r=this;Gr.jmp((function(){return Ar(r)}))};e.prototype.componentOnReady=function(){return Pr(this).W};return e}(HTMLElement);t.q=r[0];if(!a.includes(u)&&!f.get(u)){i.push(u);f.define(u,$r(o,t,1))}}))}));if(p){l.innerHTML+=y}{l.innerHTML+=i+h}if(l.innerHTML.length){l.setAttribute("data-styles","");var m=(n=Gr.m)!==null&&n!==void 0?n:S(qr);if(m!=null){l.setAttribute("nonce",m)}u.insertBefore(l,o?o.nextSibling:u.firstChild)}c=false;if(v.length){v.map((function(r){return r.connectedCallback()}))}else{{Gr.jmp((function(){return s=setTimeout(yr,30)}))}}t()}));var Tr=r("F",(function(r,e){return e}));var Cr=function(r,e,n,t){if(n){n.map((function(n){var t=n[0],i=n[1],a=n[2];var f=Dr(r,t);var u=Lr(e,a);var o=Rr(t);Gr.ael(f,i,u,o);(e.B=e.B||[]).push((function(){return Gr.rel(f,i,u,o)}))}))}};var Lr=function(r,e){return function(n){try{{if(r.v&256){r.C[e](n)}else{(r.L=r.L||[]).push([e,n])}}}catch(r){Wr(r)}}};var Dr=function(r,e){if(e&4)return qr;if(e&8)return Qr;return r};var Rr=function(r){return(r&2)!==0};var Fr=r("s",(function(r){return Gr.m=r}));var Mr=new WeakMap;var Pr=function(r){return Mr.get(r)};var Ur=r("r",(function(r,e){return Mr.set(e.C=r,e)}));var Nr=function(r,e){var n={v:0,$hostElement$:r,$:e,F:new Map};{n.U=new Promise((function(r){return n.R=r}))}{n.W=new Promise((function(r){return n.D=r}));r["s-p"]=[];r["s-rc"]=[]}Cr(r,n,e.N);return Mr.set(r,n)};var Er=function(r,e){return e in r};var Wr=function(r,e){return(0,console.error)(r,e)};var zr=new Map;var Br=function(r,n,t){var i=r._.replace(/-/g,"_");var a=r.q;var f=zr.get(a);if(f){return f[i]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return e.import("./".concat(a,".entry.js").concat("")).then((function(r){{zr.set(a,r)}return r[i]}),Wr)};var Hr=new Map;var Qr=typeof window!=="undefined"?window:{};var qr=Qr.document||{head:{}};var Gr={v:0,H:"",jmp:function(r){return r()},raf:function(r){return requestAnimationFrame(r)},ael:function(r,e,n,t){return r.addEventListener(e,n,t)},rel:function(r,e,n,t){return r.removeEventListener(e,n,t)},ce:function(r,e){return new CustomEvent(r,e)}};var Ir=r("p",(function(r){return Promise.resolve(r)}));var Kr=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(r){}return false}();var Vr=[];var Xr=[];var Jr=function(r,e){return function(n){r.push(n);if(!c){c=true;if(e&&Gr.v&4){re(Zr)}else{Gr.raf(Zr)}}}};var Yr=function(r){for(var e=0;e<r.length;e++){try{r[e](performance.now())}catch(r){Wr(r)}}r.length=0};var Zr=function(){Yr(Vr);{Yr(Xr);if(c=Vr.length>0){Gr.raf(Zr)}}};var re=function(r){return Ir().then(r)};var ee=Jr(Xr,true)}}}));
|
|
@@ -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}}}));
|