@watermarkinsights/ripple 3.12.0 → 3.13.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/{chartFunctions-44ae2eee.js → chartFunctions-b5f0319b.js} +420 -420
- package/dist/cjs/{functions-1a67b971.js → functions-3c5e979d.js} +1900 -479
- package/dist/cjs/{global-122fc638.js → global-23355ac3.js} +60 -60
- package/dist/cjs/{http-service-494d81de.js → http-service-9e8c4dd5.js} +49 -49
- package/dist/cjs/{index-acad7ab3.js → index-df6a3611.js} +4 -1
- package/dist/cjs/{interfaces-a3338581.js → interfaces-30a74c1f.js} +29 -29
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/priv-chart-popover.cjs.entry.js +87 -87
- package/dist/cjs/priv-datepicker.cjs.entry.js +658 -658
- package/dist/cjs/priv-navigator-button.cjs.entry.js +19 -19
- package/dist/cjs/priv-navigator-item.cjs.entry.js +24 -24
- package/dist/cjs/ripple.cjs.js +4 -4
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +336 -336
- package/dist/cjs/wm-button.cjs.entry.js +239 -231
- package/dist/cjs/wm-chart-slice.cjs.entry.js +14 -14
- package/dist/cjs/wm-chart.cjs.entry.js +111 -111
- package/dist/cjs/wm-datepicker.cjs.entry.js +266 -266
- package/dist/cjs/wm-input.cjs.entry.js +135 -135
- package/dist/cjs/wm-modal-footer.cjs.entry.js +34 -34
- package/dist/cjs/wm-modal-header.cjs.entry.js +37 -37
- package/dist/cjs/wm-modal.cjs.entry.js +164 -164
- package/dist/cjs/wm-navigation_3.cjs.entry.js +228 -228
- package/dist/cjs/wm-navigator.cjs.entry.js +269 -269
- package/dist/cjs/wm-network-uploader.cjs.entry.js +453 -453
- package/dist/cjs/wm-option_2.cjs.entry.js +485 -485
- package/dist/cjs/wm-pagination.cjs.entry.js +168 -168
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +130 -130
- package/dist/cjs/wm-search.cjs.entry.js +233 -233
- package/dist/cjs/wm-snackbar.cjs.entry.js +171 -171
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +297 -297
- package/dist/cjs/wm-tag-input.cjs.entry.js +580 -580
- package/dist/cjs/wm-timepicker.cjs.entry.js +384 -384
- package/dist/cjs/wm-toggletip.cjs.entry.js +125 -125
- package/dist/cjs/wm-uploader.cjs.entry.js +635 -635
- package/dist/cjs/wm-wrapper.cjs.entry.js +13 -13
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/charts/priv-chart-popover/priv-chart-popover.js +258 -258
- package/dist/collection/components/charts/wm-chart/wm-chart-slice.js +115 -115
- package/dist/collection/components/charts/wm-chart/wm-chart.js +328 -328
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-indicator.js +195 -195
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-monitor.js +88 -88
- package/dist/collection/components/charts/wm-progress-monitor/wm-progress-slice.js +111 -111
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +448 -448
- package/dist/collection/components/wm-button/wm-button.css +1 -0
- package/dist/collection/components/wm-button/wm-button.js +500 -494
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1024 -1024
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +471 -471
- package/dist/collection/components/wm-input/wm-input.js +423 -423
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
- package/dist/collection/components/wm-modal/wm-modal-footer.js +136 -136
- package/dist/collection/components/wm-modal/wm-modal-header.js +87 -87
- package/dist/collection/components/wm-modal/wm-modal.js +461 -461
- package/dist/collection/components/wm-navigation/wm-navigation-hamburger.js +162 -162
- package/dist/collection/components/wm-navigation/wm-navigation-item.js +121 -121
- package/dist/collection/components/wm-navigation/wm-navigation.js +218 -218
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
- package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
- package/dist/collection/components/wm-option/wm-option.js +414 -414
- package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
- package/dist/collection/components/wm-search/wm-search.js +480 -480
- package/dist/collection/components/wm-select/wm-select.js +718 -718
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -216
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -330
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +810 -810
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +583 -583
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +785 -785
- package/dist/collection/components/wm-uploader/wm-uploader.css +1 -2
- package/dist/collection/components/wm-uploader/wm-uploader.js +1079 -1079
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
- package/dist/collection/dev/scripts.js +20 -20
- package/dist/collection/global/__mocks__/functions.js +6 -6
- package/dist/collection/global/chartFunctions.js +421 -421
- package/dist/collection/global/functions.js +445 -468
- package/dist/collection/global/global.js +67 -67
- package/dist/collection/global/interfaces.js +49 -49
- package/dist/collection/global/services/__mocks__/http-service.js +130 -130
- package/dist/collection/global/services/http-service.js +50 -50
- package/dist/collection/lang/lang.js +5 -5
- package/dist/collection/lang/missing.js +43 -43
- package/dist/collection/lang/piglatin.js +93 -93
- package/dist/esm/{chartFunctions-8fa800a6.js → chartFunctions-89470707.js} +420 -420
- package/dist/esm/{functions-61c7bb1f.js → functions-78aea827.js} +1900 -479
- package/dist/esm/{global-5902ef31.js → global-2c09bb9a.js} +60 -60
- package/dist/esm/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +49 -49
- package/dist/esm/{index-7603f98e.js → index-17c79cc6.js} +4 -1
- package/dist/esm/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +29 -29
- package/dist/esm/loader.js +4 -4
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- 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-chart-popover.entry.js +87 -87
- package/dist/esm/priv-datepicker.entry.js +658 -658
- package/dist/esm/priv-navigator-button.entry.js +19 -19
- package/dist/esm/priv-navigator-item.entry.js +24 -24
- package/dist/esm/ripple.js +4 -4
- package/dist/esm/wm-action-menu_2.entry.js +336 -336
- package/dist/esm/wm-button.entry.js +239 -231
- package/dist/esm/wm-chart-slice.entry.js +14 -14
- package/dist/esm/wm-chart.entry.js +111 -111
- package/dist/esm/wm-datepicker.entry.js +266 -266
- package/dist/esm/wm-input.entry.js +135 -135
- package/dist/esm/wm-modal-footer.entry.js +34 -34
- package/dist/esm/wm-modal-header.entry.js +37 -37
- package/dist/esm/wm-modal.entry.js +164 -164
- package/dist/esm/wm-navigation_3.entry.js +228 -228
- package/dist/esm/wm-navigator.entry.js +269 -269
- package/dist/esm/wm-network-uploader.entry.js +453 -453
- package/dist/esm/wm-option_2.entry.js +485 -485
- package/dist/esm/wm-pagination.entry.js +168 -168
- package/dist/esm/wm-progress-indicator_3.entry.js +130 -130
- package/dist/esm/wm-search.entry.js +233 -233
- package/dist/esm/wm-snackbar.entry.js +171 -171
- package/dist/esm/wm-tab-item_3.entry.js +297 -297
- package/dist/esm/wm-tag-input.entry.js +580 -580
- package/dist/esm/wm-timepicker.entry.js +384 -384
- package/dist/esm/wm-toggletip.entry.js +125 -125
- package/dist/esm/wm-uploader.entry.js +635 -635
- package/dist/esm/wm-wrapper.entry.js +13 -13
- package/dist/esm-es5/{chartFunctions-8fa800a6.js → chartFunctions-89470707.js} +1 -1
- package/dist/esm-es5/functions-78aea827.js +1 -0
- package/dist/esm-es5/global-2c09bb9a.js +1 -0
- package/dist/esm-es5/{http-service-3dc3b3e7.js → http-service-5d037e16.js} +0 -0
- package/dist/esm-es5/{index-7603f98e.js → index-17c79cc6.js} +1 -1
- package/dist/esm-es5/{interfaces-2b97fab2.js → interfaces-61c6305b.js} +0 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/priv-datepicker.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-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-input.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-network-uploader.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-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/ripple/{p-9f12284b.system.entry.js → p-00c9f26c.system.entry.js} +1 -1
- package/dist/ripple/{p-d81a4e7c.system.entry.js → p-01fb2a55.system.entry.js} +1 -1
- package/dist/ripple/{p-212aac05.system.entry.js → p-07870c6b.system.entry.js} +1 -1
- package/dist/ripple/{p-f5df5903.system.js → p-08b7ec08.system.js} +0 -0
- package/dist/ripple/p-08e5f351.entry.js +1 -0
- package/dist/ripple/p-09043ef5.js +1 -0
- package/dist/ripple/p-0bd1815c.system.entry.js +1 -0
- package/dist/ripple/{p-fdc4a599.system.entry.js → p-1a64cbce.system.entry.js} +1 -1
- package/dist/ripple/p-1ca113d7.entry.js +1 -0
- package/dist/ripple/p-22283507.system.js +1 -0
- package/dist/ripple/p-262c75ff.entry.js +1 -0
- package/dist/ripple/{p-90ed3268.system.entry.js → p-27253ed2.system.entry.js} +1 -1
- package/dist/ripple/p-2ceec421.entry.js +1 -0
- package/dist/ripple/p-2e5cb321.entry.js +1 -0
- package/dist/ripple/{p-eee347b4.system.entry.js → p-31364104.system.entry.js} +1 -1
- package/dist/ripple/{p-9d02957d.system.js → p-313b6073.system.js} +0 -0
- package/dist/ripple/p-3e451dd0.entry.js +1 -0
- package/dist/ripple/{p-eacd33cc.system.entry.js → p-4439bdd1.system.entry.js} +1 -1
- package/dist/ripple/{p-ac2485a6.system.entry.js → p-474e6695.system.entry.js} +1 -1
- package/dist/ripple/p-539e9bfa.entry.js +1 -0
- package/dist/ripple/p-55c27bcc.entry.js +1 -0
- package/dist/ripple/p-57c94258.entry.js +1 -0
- package/dist/ripple/{p-1242752c.system.entry.js → p-58fc7a8d.system.entry.js} +1 -1
- package/dist/ripple/{p-1df2adee.system.entry.js → p-59678b70.system.entry.js} +1 -1
- package/dist/ripple/{p-5471864e.system.entry.js → p-5aa7b31c.system.entry.js} +1 -1
- package/dist/ripple/p-5bec3eeb.entry.js +1 -0
- package/dist/ripple/{p-e180001c.system.entry.js → p-65363da5.system.entry.js} +1 -1
- package/dist/ripple/p-6855af44.entry.js +1 -0
- package/dist/ripple/{p-28bf6a2e.system.js → p-68c7d04d.system.js} +1 -1
- package/dist/ripple/p-6a87da11.js +1 -0
- package/dist/ripple/{p-a0c3ef16.system.js → p-726b9452.system.js} +1 -1
- package/dist/ripple/p-82370ff7.entry.js +1 -0
- package/dist/ripple/p-82e24061.entry.js +1 -0
- package/dist/ripple/{p-398b2486.system.entry.js → p-84960032.system.entry.js} +1 -1
- package/dist/ripple/{p-43f1298b.js → p-888bec42.js} +0 -0
- package/dist/ripple/{p-487f7419.system.entry.js → p-8ad4f5ec.system.entry.js} +1 -1
- package/dist/ripple/p-93f6326d.system.js +1 -0
- package/dist/ripple/p-962f51ff.entry.js +1 -0
- package/dist/ripple/p-97c5c2ed.entry.js +1 -0
- package/dist/ripple/p-9fc092f2.entry.js +1 -0
- package/dist/ripple/p-a4b21d7b.entry.js +1 -0
- package/dist/ripple/{p-c873b490.system.entry.js → p-a5ae5ebb.system.entry.js} +1 -1
- package/dist/ripple/{p-75ef731b.system.entry.js → p-a65c09e8.system.entry.js} +1 -1
- package/dist/ripple/{p-ca2fbd1b.system.js → p-a695c1b5.system.js} +1 -1
- package/dist/ripple/{p-fd8070fb.js → p-a6d6eae7.js} +0 -0
- package/dist/ripple/{p-8aa9f811.js → p-a9ae4fa8.js} +1 -1
- package/dist/ripple/{p-73d66b0a.system.entry.js → p-abb0514c.system.entry.js} +1 -1
- package/dist/ripple/p-ad13a695.entry.js +1 -0
- package/dist/ripple/p-b0536ddb.entry.js +1 -0
- package/dist/ripple/p-b9f445c0.entry.js +1 -0
- package/dist/ripple/p-ba91d8ad.system.entry.js +1 -0
- package/dist/ripple/{p-42aa51fe.system.entry.js → p-babcd2c8.system.entry.js} +1 -1
- package/dist/ripple/{p-3f1d8211.system.entry.js → p-bcfd74b3.system.entry.js} +1 -1
- package/dist/ripple/p-c2abdcba.js +1 -0
- package/dist/ripple/{p-d3ed8b65.system.entry.js → p-c5ac8d9d.system.entry.js} +1 -1
- package/dist/ripple/p-cfe5b40f.entry.js +1 -0
- package/dist/ripple/p-d2d91a99.entry.js +1 -0
- package/dist/ripple/{p-44035b02.system.entry.js → p-d41727ae.system.entry.js} +1 -1
- package/dist/ripple/{p-ae6cfbca.system.entry.js → p-db44eb6f.system.entry.js} +1 -1
- package/dist/ripple/p-e18870d9.entry.js +1 -0
- package/dist/ripple/{p-3e6498ea.system.entry.js → p-e46174bc.system.entry.js} +1 -1
- package/dist/ripple/p-e6dee50b.entry.js +1 -0
- package/dist/ripple/p-ebd67c13.entry.js +1 -0
- package/dist/ripple/{p-68155230.system.entry.js → p-f048e76f.system.entry.js} +1 -1
- package/dist/ripple/{p-3b3e847c.system.entry.js → p-f17076c4.system.entry.js} +1 -1
- package/dist/ripple/p-f2c0d110.entry.js +1 -0
- package/dist/ripple/p-f74ccdea.entry.js +1 -0
- 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 +27 -27
- package/dist/types/components/charts/wm-chart/wm-chart-slice.d.ts +11 -11
- package/dist/types/components/charts/wm-chart/wm-chart.d.ts +36 -36
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-indicator.d.ts +27 -27
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-monitor.d.ts +17 -17
- package/dist/types/components/charts/wm-progress-monitor/wm-progress-slice.d.ts +10 -10
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +47 -47
- package/dist/types/components/wm-button/wm-button.d.ts +43 -43
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +80 -80
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
- package/dist/types/components/wm-input/wm-input.d.ts +46 -46
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +14 -14
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +11 -11
- package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
- package/dist/types/components/wm-navigation/wm-navigation-hamburger.d.ts +21 -21
- package/dist/types/components/wm-navigation/wm-navigation-item.d.ts +13 -13
- package/dist/types/components/wm-navigation/wm-navigation.d.ts +28 -28
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
- package/dist/types/components/wm-option/wm-option.d.ts +32 -32
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
- package/dist/types/components/wm-search/wm-search.d.ts +86 -86
- package/dist/types/components/wm-select/wm-select.d.ts +66 -66
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
- package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +119 -119
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
- package/dist/types/components.d.ts +29 -29
- package/dist/types/global/__mocks__/functions.d.ts +6 -6
- package/dist/types/global/chartFunctions.d.ts +29 -29
- package/dist/types/global/functions.d.ts +42 -42
- package/dist/types/global/global.d.ts +1 -1
- package/dist/types/global/interfaces.d.ts +44 -44
- package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
- package/dist/types/global/services/http-service.d.ts +4 -4
- package/dist/types/lang/lang.d.ts +5 -5
- package/package.json +47 -47
- package/dist/esm-es5/functions-61c7bb1f.js +0 -15
- package/dist/esm-es5/global-5902ef31.js +0 -1
- package/dist/ripple/p-00fa3d4b.entry.js +0 -1
- package/dist/ripple/p-0f33461d.entry.js +0 -1
- package/dist/ripple/p-15b1c11b.js +0 -16
- package/dist/ripple/p-1b058a44.entry.js +0 -1
- package/dist/ripple/p-2077203e.system.js +0 -1
- package/dist/ripple/p-30745db6.entry.js +0 -1
- package/dist/ripple/p-358bde27.entry.js +0 -1
- package/dist/ripple/p-35cfcf9f.entry.js +0 -1
- package/dist/ripple/p-379b125b.entry.js +0 -1
- package/dist/ripple/p-49bf0b81.js +0 -1
- package/dist/ripple/p-4d59fe86.entry.js +0 -1
- package/dist/ripple/p-520b0f54.entry.js +0 -1
- package/dist/ripple/p-584fef7f.system.entry.js +0 -1
- package/dist/ripple/p-5e041c35.entry.js +0 -1
- package/dist/ripple/p-72eb5064.system.entry.js +0 -1
- package/dist/ripple/p-76ca7498.system.js +0 -15
- package/dist/ripple/p-7fae0cc2.entry.js +0 -1
- package/dist/ripple/p-8caae464.entry.js +0 -1
- package/dist/ripple/p-8d347cd5.entry.js +0 -1
- package/dist/ripple/p-92226595.entry.js +0 -1
- package/dist/ripple/p-9fe64cec.entry.js +0 -1
- package/dist/ripple/p-a82d37d8.entry.js +0 -1
- package/dist/ripple/p-a9e0ce88.entry.js +0 -1
- package/dist/ripple/p-b3c71506.js +0 -1
- package/dist/ripple/p-ba168596.entry.js +0 -1
- package/dist/ripple/p-cd4fda75.entry.js +0 -1
- package/dist/ripple/p-d3603def.entry.js +0 -1
- package/dist/ripple/p-e49b9a96.entry.js +0 -1
- package/dist/ripple/p-e748e22b.entry.js +0 -1
- package/dist/ripple/p-e75e75e0.entry.js +0 -1
- package/dist/ripple/p-ed657559.entry.js +0 -1
- package/dist/ripple/p-f0656464.entry.js +0 -1
- package/dist/ripple/p-f12a510f.entry.js +0 -1
- package/dist/ripple/p-f36b74bf.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-a0c3ef16.system.js","./p-76ca7498.system.js"],(function(e){"use strict";var t,i,o,s,r,n,l,a,p,d;return{setters:[function(e){t=e.r;i=e.c;o=e.h;s=e.H;r=e.g;n=e.f},function(e){l=e.i;a=e.g;p=e.l;d=e.q}],execute:function(){var c=':host(:not(:last-child)),wm-option:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host,wm-option{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus,wm-option:focus,wm-option.focus{outline:none;background:#f4f4f4}:host.icon,wm-option.icon{color:#575195}.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;margin-right:0.25rem;color:#575195}:host([aria-selected=true]),wm-option[aria-selected=true]{background:rgba(46, 27, 70, 0.05);font-weight:500}:host([aria-selected=true]) .checkbox:before,wm-option[aria-selected=true] .checkbox:before{content:"\\f132"}:host([aria-disabled=true]),wm-option[aria-disabled=true]{font-style:italic;color:#6b6b6b;cursor:default}:host([aria-disabled=true]) .checkbox:before,wm-option[aria-disabled=true] .checkbox:before{color:#6b6b6b}:host(.multi-option),wm-option.multi-option{background:unset}:host(.hassubinfo),wm-option.hassubinfo{display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper,wm-option.hassubinfo .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo,wm-option.hassubinfo .subinfo{-ms-flex:none;flex:none}.subinfo{font-style:italic}.option-wrapper{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),wm-option:focus{outline:none;background:#f4f4f4}:host(:hover){background:#f4f4f4;outline:none}';var h=e("wm_option",function(){function e(e){t(this,e);this.wmOptionSelected=i(this,"wmOptionSelected",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.wmTabKeyPressed=i(this,"wmTabKeyPressed",7);this.wmEnterKeyPressed=i(this,"wmEnterKeyPressed",7);this.wmLetterPressed=i(this,"wmLetterPressed",7);this.wmOptionBlurred=i(this,"wmOptionBlurred",7);this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false}Object.defineProperty(e.prototype,"isMultiChild",{get:function(){var e;return(e=this.el.parentElement)===null||e===void 0?void 0:e.multiple},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit();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" ":e.preventDefault();this.el.click();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;case"Tab":this.wmTabKeyPressed.emit();break;default:this.wmLetterPressed.emit(e.key)}};e.prototype.handleSelection=function(){if(!this.disabled){this.wmOptionSelected.emit()}};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.removeAttribute("aria-selected")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.focusHandler=function(e){if(e)this.el.focus()};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.componentWillLoad=function(){this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick()};e.prototype.render=function(){return o(s,{role:"option",tabindex:this.focused?0:-1,class:"".concat(this.subinfo?"hassubinfo":""," ").concat(this.isMultiChild?"multi-option":"")},o("div",{class:"option-wrapper ".concat(this.isMultiChild?"checkbox":"")},o("slot",null)),o("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"],focused:["focusHandler"]}},enumerable:false,configurable:true});return e}());h.style=c;var f=':host{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:#c0392b}.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:#c0392b}.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 .dropdown{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:#575195;min-width:8.75rem}.wrapper .dropdown .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:transparent;width:100%;border:solid 1px rgba(35, 35, 35, 0.6);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:#575195;font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .dropdown .displayedoption{height:2.75rem}}.wrapper .dropdown .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}.wrapper .dropdown .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:transparent;text-decoration:none}.wrapper .dropdown .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .dropdown .displayedoption:focus{outline:none}.wrapper .dropdown .displayedoption::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.wrapper .dropdown .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .dropdown .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .dropdown>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .dropdown>.options{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;-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:#fff;z-index:100;width:100%;font-size:0.875rem}.wrapper .dropdown>.options.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 .dropdown>.options.hidden{visibility:hidden}.wrapper .dropdown>.options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .dropdown .displayedoption{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}.wrapper .error-message{color:#c0392b;font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;display:block;top:100%;left:0;font-style:italic}.rtl>.options{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.options .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 u=e("wm_select",function(){function e(e){t(this,e);this.wmSelectDidLoad=i(this,"wmSelectDidLoad",7);this.wmSelectBlurred=i(this,"wmSelectBlurred",7);this.wmComponentBlurred=i(this,"wmComponentBlurred",7);this.disabled=false;this.invalid=false;this.labelPosition="top";this.requiredField=false;this.errorMessage="";this.multiple=false;this.placeholder=l.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.allSelectedMessage=l.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.requiredMessage=l.formatMessage({id:"global.requiredField",defaultMessage:"required field"});this.isTabbing=false;this.isExpanded=false;this.keysSoFar="";this.searchIndex=0;this.keyClear=null;this.openUp=false;this.overflowCount=0;this.displayedItems=[];this.allSelected=false}Object.defineProperty(e.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleOptionSelection=function(e){if(!this.multiple){this.childItems.filter((function(t){return t!=e.target&&!!t.selected})).map((function(e){return e.selected=false}))}this.focusItem(e.target);this.selectItem(e.target);if(!this.multiple){this.close()}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.target)};e.prototype.handleChildDown=function(e){this.moveDown(e.target)};e.prototype.moveToFirstItem=function(){this.focusItem(this.childItems[0])};e.prototype.moveToLastItem=function(){this.focusItem(this.childItems[this.childItems.length-1])};e.prototype.handleTabKey=function(){this.close(false)};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){var t=e.detail.relatedTarget===this.el||this.el.contains(e.detail.relatedTarget);if(!t){var i=new CustomEvent("blur");i.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(i)}};e.prototype.handleClick=function(e){var t=e.target===this.el||this.el.contains(e.target);if(!t&&this.isExpanded){this.close()}};e.prototype.handleButtonBlur=function(e){var t=e.relatedTarget===this.el||this.el.contains(e.relatedTarget);if(t){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(){if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("button").focus()}};this.uid=this.el.id?this.el.id:a();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.componentDidLoad=function(){var e=this;this.wmSelectDidLoad.emit();if(!this.childItems.length){throw new Error("wm-select should have wm-option elements as children.")}if(this.multiple&&this.childItems.filter((function(e){return e.subinfo})).length>0){throw new Error("wm-select with the multiple prop cannot have subinfo options")}if(this.multiple&&!this.placeholder){throw new Error("wm-select with the multiple prop needs to also use the placeholder prop.")}if(this.selectedItems.length>0){this.selectedItems.forEach((function(t){return e.displayedItems.push(t)}));this.setButtonText()}else if(!this.multiple){this.selectItem(this.childItems[0])}this.optionsEl.classList.add("hidden");n(this.el);if(this.maxHeight){this.optionsEl.style.maxHeight=this.maxHeight}};e.prototype.moveUp=function(e){var t=e.previousElementSibling;if(t){if(t.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top){this.optionsEl.scrollTop=t.getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop}this.focusItem(t)}else{this.focusItem(this.childItems[this.childItems.length-1])}};e.prototype.moveDown=function(e){var t=e.nextElementSibling;if(t&&t.tagName!=="INPUT"){if(t.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom){this.optionsEl.scrollTop=t.getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight}this.focusItem(t)}else{this.focusItem(this.childItems[0])}};e.prototype.open=function(e){var t=this;if(!this.disabled){var i=this.el.clientHeight;var o=this.buttonEl.clientHeight;this.openUp=p(this.el,this.optionsEl,i,o);this.isExpanded=true;this.optionsEl.classList.remove("hidden");window.requestAnimationFrame((function(){if(t.selectedItems.length>0){if(e==="next"){t.moveDown(t.selectedItems[t.selectedItems.length-1])}else if(e==="previous"){t.moveUp(t.selectedItems[0])}else{t.focusItem(t.selectedItems[0])}}else{t.focusItem(t.childItems[0])}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;this.childItems.map((function(e){return e.focused=false}));window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.el.focus()}}),150)};e.prototype.focusItem=function(e){this.childItems.forEach((function(t){return t.focused=t===e}))};e.prototype.selectItem=function(e){if(this.multiple){e.selected=!e.selected}else{this.childItems.forEach((function(t){return t.selected=t===e}))}this.setButtonText()};e.prototype.findAndFocusItem=function(e){var t=e.detail.toUpperCase();if(!this.keysSoFar){for(var i=0;i<this.childItems.length;i++){if(this.childItems[i].focused){this.searchIndex=i}}}this.keysSoFar+=t;this.clearKeysSoFarAfterDelay();var o=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!o){o=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(o){this.focusItem(o)}};e.prototype.clearKeysSoFarAfterDelay=function(){if(this.keyClear){window.clearTimeout(this.keyClear);this.keyClear=null}this.keyClear=window.setTimeout(function(){this.keysSoFar="";this.keyClear=null}.bind(this),500)};e.prototype.findMatchInRange=function(e,t,i){for(var o=t;o<i;o++){var s=e[o].textContent;if(s&&s.toUpperCase().indexOf(this.keysSoFar)===0){return e[o]}}return null};e.prototype.exposeErrors=function(){var e=a();this.errorContainer.id="wm-errors-".concat(e);this.buttonEl.setAttribute("aria-describedby","wm-errors-".concat(e))};e.prototype.renderErrorContainer=function(){var e=this;return o("div",{id:"wm-errors",class:this.errorMessage?"error-message":"",ref:function(t){return e.errorContainer=t},"aria-live":"assertive","aria-atomic":"true"},this.errorMessage)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit();this.wmComponentBlurred.emit()}};e.prototype.setButtonText=function(){this.displayedItems=this.childItems.filter((function(e){return e.selected}));this.allSelected=this.displayedItems.length===this.childItems.length;if(this.multiple){var e=38;var t=window.getComputedStyle(this.buttonEl);var i=parseInt(t.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(t.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-i-o-e;var r=this.displayedItems.map((function(e){return e.shadowRoot.querySelector(".option-wrapper").clientWidth}));var n=r.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(n>s&&this.displayedItems.length>1){this.overflowCount++;n-=r[r.length-1];r.pop();this.displayedItems.pop()}}};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedItems.length<1){return o("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedItems.map((function(e,t){return o("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderSubinfo=function(){if(!this.multiple&&this.selectedItems.length>0&&this.selectedItems[0].subinfo){return o("span",{class:"subinfo"},this.selectedItems[0].subinfo)}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return o("span",null,o("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.render=function(){var e;var t=this;var i=(e={id:"selectbtn-".concat(this.uid)},e["disabled"]=this.disabled,e["aria-controls"]="list-".concat(this.uid),e["aria-labelledby"]="label-".concat(this.uid," selectbtn-").concat(this.uid),e["aria-describedby"]="wm-errors",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return o(s,{onBlur:function(e){return t.handleComponentBlur(e)}},o("div",{class:"wrapper ".concat(d()," label-").concat(this.labelPosition," ").concat(this.invalid||this.errorMessage?"invalid":"")},o("div",{class:"label-wrapper"},o("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"selectbtn-".concat(this.uid)},this.label,this.requiredField?o("span",{class:"required"},o("span",{class:"sr-only"},this.requiredMessage),o("span",{"aria-hidden":"true"},"*")):"")),o("div",{class:"dropdown"},o("button",Object.assign({},i,{class:"displayedoption ".concat(this.isTabbing?"user-is-tabbing":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)}}),o("span",{class:this.selectedItems.length>0&&this.selectedItems.filter((function(e){return e.subinfo})).length>0?"overflowcontrol hassubinfo":"overflowcontrol"},o("span",{class:"button-text"},this.renderButtonText()),this.renderSubinfo()),this.renderOverflowCount()),o("div",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list-".concat(this.uid),tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label-".concat(this.uid),ref:function(e){return t.optionsEl=e}},o("slot",null)),this.renderErrorContainer())))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["exposeErrors"]}},enumerable:false,configurable:true});return e}());u.style=f}}}));
|
|
1
|
+
System.register(["./p-726b9452.system.js","./p-93f6326d.system.js"],(function(e){"use strict";var t,i,o,s,r,n,l,a,p,d;return{setters:[function(e){t=e.r;i=e.c;o=e.h;s=e.H;r=e.g;n=e.f},function(e){l=e.i;a=e.g;p=e.l;d=e.q}],execute:function(){var c=':host(:not(:last-child)),wm-option:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host,wm-option{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus,wm-option:focus,wm-option.focus{outline:none;background:#f4f4f4}:host.icon,wm-option.icon{color:#575195}.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;margin-right:0.25rem;color:#575195}:host([aria-selected=true]),wm-option[aria-selected=true]{background:rgba(46, 27, 70, 0.05);font-weight:500}:host([aria-selected=true]) .checkbox:before,wm-option[aria-selected=true] .checkbox:before{content:"\\f132"}:host([aria-disabled=true]),wm-option[aria-disabled=true]{font-style:italic;color:#6b6b6b;cursor:default}:host([aria-disabled=true]) .checkbox:before,wm-option[aria-disabled=true] .checkbox:before{color:#6b6b6b}:host(.multi-option),wm-option.multi-option{background:unset}:host(.hassubinfo),wm-option.hassubinfo{display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper,wm-option.hassubinfo .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo,wm-option.hassubinfo .subinfo{-ms-flex:none;flex:none}.subinfo{font-style:italic}.option-wrapper{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),wm-option:focus{outline:none;background:#f4f4f4}:host(:hover){background:#f4f4f4;outline:none}';var h=e("wm_option",function(){function e(e){t(this,e);this.wmOptionSelected=i(this,"wmOptionSelected",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.wmTabKeyPressed=i(this,"wmTabKeyPressed",7);this.wmEnterKeyPressed=i(this,"wmEnterKeyPressed",7);this.wmLetterPressed=i(this,"wmLetterPressed",7);this.wmOptionBlurred=i(this,"wmOptionBlurred",7);this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false}Object.defineProperty(e.prototype,"isMultiChild",{get:function(){var e;return(e=this.el.parentElement)===null||e===void 0?void 0:e.multiple},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit();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" ":e.preventDefault();this.el.click();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;case"Tab":this.wmTabKeyPressed.emit();break;default:this.wmLetterPressed.emit(e.key)}};e.prototype.handleSelection=function(){if(!this.disabled){this.wmOptionSelected.emit()}};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.removeAttribute("aria-selected")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.focusHandler=function(e){if(e)this.el.focus()};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.componentWillLoad=function(){this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick()};e.prototype.render=function(){return o(s,{role:"option",tabindex:this.focused?0:-1,class:"".concat(this.subinfo?"hassubinfo":""," ").concat(this.isMultiChild?"multi-option":"")},o("div",{class:"option-wrapper ".concat(this.isMultiChild?"checkbox":"")},o("slot",null)),o("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"],focused:["focusHandler"]}},enumerable:false,configurable:true});return e}());h.style=c;var f=':host{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:#c0392b}.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:#c0392b}.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 .dropdown{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:#575195;min-width:8.75rem}.wrapper .dropdown .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:transparent;width:100%;border:solid 1px rgba(35, 35, 35, 0.6);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:#575195;font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .dropdown .displayedoption{height:2.75rem}}.wrapper .dropdown .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}.wrapper .dropdown .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:transparent;text-decoration:none}.wrapper .dropdown .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .dropdown .displayedoption:focus{outline:none}.wrapper .dropdown .displayedoption::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}.wrapper .dropdown .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .dropdown .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .dropdown .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .dropdown .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .dropdown>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .dropdown>.options{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;-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:#fff;z-index:100;width:100%;font-size:0.875rem}.wrapper .dropdown>.options.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 .dropdown>.options.hidden{visibility:hidden}.wrapper .dropdown>.options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .dropdown .displayedoption{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}.wrapper .error-message{color:#c0392b;font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;display:block;top:100%;left:0;font-style:italic}.rtl>.options{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.options .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 u=e("wm_select",function(){function e(e){t(this,e);this.wmSelectDidLoad=i(this,"wmSelectDidLoad",7);this.wmSelectBlurred=i(this,"wmSelectBlurred",7);this.wmComponentBlurred=i(this,"wmComponentBlurred",7);this.disabled=false;this.invalid=false;this.labelPosition="top";this.requiredField=false;this.errorMessage="";this.multiple=false;this.placeholder=l.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.allSelectedMessage=l.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.requiredMessage=l.formatMessage({id:"global.requiredField",defaultMessage:"required field"});this.isTabbing=false;this.isExpanded=false;this.keysSoFar="";this.searchIndex=0;this.keyClear=null;this.openUp=false;this.overflowCount=0;this.displayedItems=[];this.allSelected=false}Object.defineProperty(e.prototype,"childItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedItems",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleOptionSelection=function(e){if(!this.multiple){this.childItems.filter((function(t){return t!=e.target&&!!t.selected})).map((function(e){return e.selected=false}))}this.focusItem(e.target);this.selectItem(e.target);if(!this.multiple){this.close()}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.target)};e.prototype.handleChildDown=function(e){this.moveDown(e.target)};e.prototype.moveToFirstItem=function(){this.focusItem(this.childItems[0])};e.prototype.moveToLastItem=function(){this.focusItem(this.childItems[this.childItems.length-1])};e.prototype.handleTabKey=function(){this.close(false)};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){var t=e.detail.relatedTarget===this.el||this.el.contains(e.detail.relatedTarget);if(!t){var i=new CustomEvent("blur");i.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(i)}};e.prototype.handleClick=function(e){var t=e.target===this.el||this.el.contains(e.target);if(!t&&this.isExpanded){this.close()}};e.prototype.handleButtonBlur=function(e){var t=e.relatedTarget===this.el||this.el.contains(e.relatedTarget);if(t){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(){if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("button").focus()}};this.uid=this.el.id?this.el.id:a();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.componentDidLoad=function(){var e=this;this.wmSelectDidLoad.emit();if(!this.childItems.length){throw new Error("wm-select should have wm-option elements as children.")}if(this.multiple&&this.childItems.filter((function(e){return e.subinfo})).length>0){throw new Error("wm-select with the multiple prop cannot have subinfo options")}if(this.multiple&&!this.placeholder){throw new Error("wm-select with the multiple prop needs to also use the placeholder prop.")}if(this.selectedItems.length>0){this.selectedItems.forEach((function(t){return e.displayedItems.push(t)}));this.setButtonText()}else if(!this.multiple){this.selectItem(this.childItems[0])}this.optionsEl.classList.add("hidden");n(this.el);if(this.maxHeight){this.optionsEl.style.maxHeight=this.maxHeight}};e.prototype.moveUp=function(e){var t=e.previousElementSibling;if(t){if(t.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top){this.optionsEl.scrollTop=t.getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop}this.focusItem(t)}else{this.focusItem(this.childItems[this.childItems.length-1])}};e.prototype.moveDown=function(e){var t=e.nextElementSibling;if(t&&t.tagName!=="INPUT"){if(t.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom){this.optionsEl.scrollTop=t.getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight}this.focusItem(t)}else{this.focusItem(this.childItems[0])}};e.prototype.open=function(e){var t=this;if(!this.disabled){var i=this.el.clientHeight;var o=this.buttonEl.clientHeight;this.openUp=p(this.el,this.optionsEl,i,o);this.isExpanded=true;this.optionsEl.classList.remove("hidden");window.requestAnimationFrame((function(){if(t.selectedItems.length>0){if(e==="next"){t.moveDown(t.selectedItems[t.selectedItems.length-1])}else if(e==="previous"){t.moveUp(t.selectedItems[0])}else{t.focusItem(t.selectedItems[0])}}else{t.focusItem(t.childItems[0])}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;this.childItems.map((function(e){return e.focused=false}));window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.el.focus()}}),150)};e.prototype.focusItem=function(e){this.childItems.forEach((function(t){return t.focused=t===e}))};e.prototype.selectItem=function(e){if(this.multiple){e.selected=!e.selected}else{this.childItems.forEach((function(t){return t.selected=t===e}))}this.setButtonText()};e.prototype.findAndFocusItem=function(e){var t=e.detail.toUpperCase();if(!this.keysSoFar){for(var i=0;i<this.childItems.length;i++){if(this.childItems[i].focused){this.searchIndex=i}}}this.keysSoFar+=t;this.clearKeysSoFarAfterDelay();var o=this.findMatchInRange(this.childItems,this.searchIndex+1,this.childItems.length);if(!o){o=this.findMatchInRange(this.childItems,0,this.searchIndex)}if(o){this.focusItem(o)}};e.prototype.clearKeysSoFarAfterDelay=function(){if(this.keyClear){window.clearTimeout(this.keyClear);this.keyClear=null}this.keyClear=window.setTimeout(function(){this.keysSoFar="";this.keyClear=null}.bind(this),500)};e.prototype.findMatchInRange=function(e,t,i){for(var o=t;o<i;o++){var s=e[o].textContent;if(s&&s.toUpperCase().indexOf(this.keysSoFar)===0){return e[o]}}return null};e.prototype.exposeErrors=function(){var e=a();this.errorContainer.id="wm-errors-".concat(e);this.buttonEl.setAttribute("aria-describedby","wm-errors-".concat(e))};e.prototype.renderErrorContainer=function(){var e=this;return o("div",{id:"wm-errors",class:this.errorMessage?"error-message":"",ref:function(t){return e.errorContainer=t},"aria-live":"assertive","aria-atomic":"true"},this.errorMessage)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit();this.wmComponentBlurred.emit()}};e.prototype.setButtonText=function(){this.displayedItems=this.childItems.filter((function(e){return e.selected}));this.allSelected=this.displayedItems.length===this.childItems.length;if(this.multiple){var e=38;var t=window.getComputedStyle(this.buttonEl);var i=parseInt(t.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(t.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-i-o-e;var r=this.displayedItems.map((function(e){return e.shadowRoot.querySelector(".option-wrapper").clientWidth}));var n=r.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(n>s&&this.displayedItems.length>1){this.overflowCount++;n-=r[r.length-1];r.pop();this.displayedItems.pop()}}};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedItems.length<1){return o("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedItems.map((function(e,t){return o("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderSubinfo=function(){if(!this.multiple&&this.selectedItems.length>0&&this.selectedItems[0].subinfo){return o("span",{class:"subinfo"},this.selectedItems[0].subinfo)}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return o("span",null,o("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.render=function(){var e;var t=this;var i=(e={id:"selectbtn-".concat(this.uid)},e["disabled"]=this.disabled,e["aria-controls"]="list-".concat(this.uid),e["aria-labelledby"]="label-".concat(this.uid," selectbtn-").concat(this.uid),e["aria-describedby"]="wm-errors",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return o(s,{onBlur:function(e){return t.handleComponentBlur(e)}},o("div",{class:"wrapper ".concat(d()," label-").concat(this.labelPosition," ").concat(this.invalid||this.errorMessage?"invalid":"")},o("div",{class:"label-wrapper"},o("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"selectbtn-".concat(this.uid)},this.label,this.requiredField?o("span",{class:"required"},o("span",{class:"sr-only"},this.requiredMessage),o("span",{"aria-hidden":"true"},"*")):"")),o("div",{class:"dropdown"},o("button",Object.assign({},i,{class:"displayedoption ".concat(this.isTabbing?"user-is-tabbing":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)}}),o("span",{class:this.selectedItems.length>0&&this.selectedItems.filter((function(e){return e.subinfo})).length>0?"overflowcontrol hassubinfo":"overflowcontrol"},o("span",{class:"button-text"},this.renderButtonText()),this.renderSubinfo()),this.renderOverflowCount()),o("div",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list-".concat(this.uid),tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label-".concat(this.uid),ref:function(e){return t.optionsEl=e}},o("slot",null)),this.renderErrorContainer())))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["exposeErrors"]}},enumerable:false,configurable:true});return e}());u.style=f}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as r,h as t,H as i,g as o}from"./p-c2abdcba.js";import{i as s,g as a,l as n,e as p}from"./p-6a87da11.js";const h=class{constructor(t){e(this,t),this.wmTimepickerNewValidValue=r(this,"wmTimepickerNewValidValue",7),this.wmTimepickerOnChange=r(this,"wmTimepickerOnChange",7),this.disabled=!1,this.value="",this.label="",this.labelPosition="top",this.requiredField=!1,this.isExpanded=!1,this.isTabbing=!1,this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i,this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/,this.uid="",this.timeFormat="hh:mm",this.times=[],this.openUp=!1,this.buttonAriaLabel=s.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."})}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKey(e){switch(e.key){case"ArrowDown":e.preventDefault(),!1===this.isExpanded?this.open("next"):this.moveDown(this.selectedOption);break;case"ArrowUp":e.preventDefault(),!1===this.isExpanded?this.open("previous"):this.moveUp(this.selectedOption);break;case"Enter":case" ":this.isExpanded&&(e.preventDefault(),this.handleOptionClick(this.selectedOption.textContent));break;case"Escape":e.preventDefault(),this.isExpanded&&(e.stopPropagation(),this.close());break;case"Tab":this.isExpanded&&this.close(!1);break;case"Home":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"));break;case"End":e.preventDefault(),this.isExpanded&&(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}}updateErrorState(){this.displayedErrorMessage=this.errorMessage}componentWillLoad(){""===this.label&&console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none."),this.el.focus=function(){this.disabled||this.shadowRoot.querySelector("input").focus()},this.uid=this.el.id?this.el.id:a(),this.updateErrorState(),this.timeFormat=s.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"}),this.times=this.generateTimes()}componentDidLoad(){this.optionsEl.classList.add("hidden"),this.optionsList=Array.from(this.optionsEl.querySelectorAll("li")),this.value&&this.processInput()}isValidTime(e){return this.twelveHrValid.test(e)||this.twentyFourHrValid.test(e)}generateTimes(){let e=[],r=0;for(let t=0;r<1440;t++){const i=Math.floor(r/60).toString().padStart(2,"0"),o=(r%60).toString().padStart(2,"0");e[t]=`${i}:${o}`,r+=15}return e}findNearestTimeInterval(e){let r=this.formatToStorage(e);const t=parseInt(r.slice(3,5));if(t%15!=0){const i=parseInt(r.slice(0,2));let o=(15*Math.round(t/15)).toString().padStart(2,"0");if("60"===o){o="00";let e=i+1;24===e&&(e=0),r=r.replace(`${i.toString().padStart(2,"0")}:`,`${e.toString().padStart(2,"0")}:`)}parseInt(o)<8&&(o="00"),e=r.replace(`:${t.toString().padStart(2,"0")}`,`:${o}`)}return e}handleListSelection(e){e=this.findNearestTimeInterval(e);const r=this.optionsList.filter((r=>r.textContent==this.formatToDisplay(e)))[0];r&&this.focusOption(r)}setValue(e){const r=this.value;this.inputEl.value=this.formatToDisplay(e),this.value=this.formatToStorage(e),this.handleListSelection(e),r!==this.value&&this.wmTimepickerNewValidValue.emit({value:this.value}),this.wmTimepickerOnChange.emit({value:this.value,isValid:!!this.displayedErrorMessage})}processInput(){this.isValidTime(this.value)&&this.setValue(this.value);const e=this.determineErrorMessage();this.displayedErrorMessage=e}determineErrorMessage(){let e=this.errorMessage;const r=s.formatMessage({id:"time.requiredError",defaultMessage:"A time is required."}),t=s.formatMessage({id:"time.invalidTime",defaultMessage:"Please enter a valid time."}),i=this.isValidTime(this.value);return i&&!this.errorMessage?e=null:i||this.errorMessage||(e=this.requiredField&&!this.value?r:this.value?t:null),e}splitTime(e){const r=this.twelveHrValid.exec(e)||this.twentyFourHrValid.exec(e);let t=parseInt(r[1]),i=r[2]||"00",o=r?r[3]:void 0;return 0===t&&(null==o?void 0:o.toUpperCase().includes("P"))&&(o="AM"),[t,i,o]}formatToDisplay(e){let[r,t,i]=this.splitTime(e);return 12!==r||i||(i="PM"),0!==r&&24!==r||(r=12),r>12&&(r-=12,i="PM"),i=i&&i.toUpperCase().includes("P")?"PM":"AM",`${r.toString().padStart(2,"0")}:${t} ${i}`}formatToStorage(e){let[r,t,i]=this.splitTime(e);return 24===r&&(r=0),12===r&&i&&i.toUpperCase().includes("A")&&(r-=12),i&&i.toUpperCase().includes("P")&&12!==r&&(r+=12),`${r.toString().padStart(2,"0")}:${t}`}open(e){this.openUp=n(this.el,this.optionsEl),this.isExpanded=!0,this.optionsEl.classList.remove("hidden"),!this.errorMessage&&this.value||this.handleListSelection("09:00"),this.setDropdownPosition("center",this.selectedOption),this.focusOption(this.selectedOption),window.requestAnimationFrame((()=>{"next"===e?this.moveDown(this.selectedOption):"previous"===e&&this.moveUp(this.selectedOption)}))}close(e=!0){this.isExpanded=!1,window.setTimeout((()=>{this.optionsEl.classList.add("hidden"),e&&this.buttonEl.focus()}),150)}focusOption(e){this.optionsList.forEach((e=>{e.tabIndex=-1})),e.tabIndex=0,this.selectedOption=e,e.focus()}setDropdownPosition(e,r){switch(e){case"top":this.optionsEl.scrollTop=(null==r?void 0:r.previousElementSibling).getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop;break;case"bottom":this.optionsEl.scrollTop=(null==r?void 0:r.nextElementSibling).getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight;break;case"center":this.optionsEl.scrollTop=(this.optionsList.findIndex((e=>e.textContent===(null==r?void 0:r.textContent)))-2)*r.offsetHeight;break;case"first":this.optionsEl.scrollTop=0;break;case"last":this.optionsEl.scrollTop=this.optionsList[0].clientHeight*this.optionsList.length}}moveUp(e){const r=e.previousElementSibling;r?(r.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top&&this.setDropdownPosition("top",e),this.focusOption(r)):(this.focusOption(this.optionsList[this.optionsList.length-1]),this.setDropdownPosition("last"))}moveDown(e){const r=e.nextElementSibling;r?(r.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom&&this.setDropdownPosition("bottom",e),this.focusOption(r)):(this.focusOption(this.optionsList[0]),this.setDropdownPosition("first"))}handleOptionClick(e){this.close(),this.setValue(e),this.processInput()}handleInput(){this.value=this.inputEl.value,this.isValidTime(this.value)&&(this.handleListSelection(this.findNearestTimeInterval(this.value)),this.setDropdownPosition("center",this.selectedOption))}handleInputBlur(e){this.preventValidation&&p(e,this.preventValidation)||this.processInput(),this.tpWrapper.classList.remove("focus")}renderOptions(){return this.times.map(((e,r)=>t("li",{id:`option${r+1}`,role:"option",onClick:()=>this.handleOptionClick(e)},this.formatToDisplay(e))))}render(){return t(i,{id:this.uid,invalid:this.displayedErrorMessage?"true":null,onBlur:()=>this.close(!1)},t("div",{class:`wrapper label-${this.labelPosition} ${this.displayedErrorMessage?"invalid":""}`,ref:e=>this.tpWrapper=e},t("div",{class:"label-wrapper"},"none"!==this.labelPosition&&t("label",{id:`label-${this.uid}`,class:"label",htmlFor:`time-input-${this.uid}`},this.label,this.requiredField&&t("span",{class:"required","aria-hidden":"true"},"*"))),t("div",null,t("div",{class:"inner-wrapper"},t("input",{id:`time-input-${this.uid}`,"aria-label":this.label,"aria-describedby":`error-${this.uid}`,ref:e=>this.inputEl=e,onBlur:e=>this.handleInputBlur(e),onInput:()=>this.handleInput(),disabled:this.disabled,required:this.requiredField,placeholder:this.timeFormat,autocomplete:"off",onFocus:()=>this.tpWrapper.classList.add("focus")}),t("button",{id:`btn-${this.uid}`,class:this.isTabbing?"user-is-tabbing":"",ref:e=>this.buttonEl=e,disabled:this.disabled,"aria-controls":`list-${this.uid}`,"aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":`time-input-${this.uid}`,onClick:()=>this.isExpanded?this.close():this.open(),onMouseDown:e=>{e.preventDefault(),this.buttonEl.focus()}},t("span",{class:"clock"})),t("ul",{class:`options ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,id:`list-${this.uid}`,role:"listbox","aria-labelledby":`label-${this.uid}`,"aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:e=>this.optionsEl=e},this.renderOptions())),t("div",{id:`error-${this.uid}`,class:"error","aria-live":"assertive","aria-atomic":"true"},this.displayedErrorMessage))))}get el(){return o(this)}static get watchers(){return{errorMessage:["updateErrorState"]}}};h.style=':host,wm-timepicker{font-family:inherit}:host *,wm-timepicker *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .sr-only,wm-timepicker .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 .wrapper,wm-timepicker .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,wm-timepicker .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-timepicker .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-timepicker .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-timepicker .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-timepicker .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,wm-timepicker .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,wm-timepicker .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-timepicker .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,[dir=RTL] wm-timepicker .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-timepicker .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-timepicker .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input,wm-timepicker .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled,wm-timepicker .wrapper .inner-wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper .inner-wrapper input:focus,wm-timepicker .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button,wm-timepicker .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:#fff;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button .clock::after,wm-timepicker .wrapper .inner-wrapper button .clock::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:"\\f150";color:#575195;font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover,wm-timepicker .wrapper .inner-wrapper button:hover{background:#e6e6e6;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled,wm-timepicker .wrapper .inner-wrapper button:disabled{background-color:rgba(74, 74, 74, 0.05);pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled .clock::after,wm-timepicker .wrapper .inner-wrapper button:disabled .clock::after{color:#7b7b7b}[dir=RTL] :host .wrapper .inner-wrapper button,[dir=RTL] wm-timepicker .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus,wm-timepicker .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper button.user-is-tabbing:focus,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options,wm-timepicker .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-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:2.5rem;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards,wm-timepicker .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden,wm-timepicker .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option],wm-timepicker .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a}:host .wrapper .inner-wrapper .options [role=option]:hover,wm-timepicker .wrapper .inner-wrapper .options [role=option]:hover{background:#f4f4f4;outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus,wm-timepicker .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:#f4f4f4}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child),wm-timepicker .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .wrapper .inner-wrapper .options.open,wm-timepicker .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper,wm-timepicker .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error,wm-timepicker .wrapper.invalid .error{color:#c0392b;margin-top:4px;margin-bottom:4px;display:block;top:100%;left:0;font-style:italic}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper,wm-timepicker .wrapper:focus .inner-wrapper,wm-timepicker .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}';export{h as wm_timepicker}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as o,f as n}from"./p-c2abdcba.js";import{i as a,r}from"./p-6a87da11.js";const l=class{constructor(e){t(this,e),this.wmNavigationStateChanged=i(this,"wmNavigationStateChanged",7),this.open=!1,this.isTabbing=!1,this.mainNavigationMessage=a.formatMessage({id:"navigation.mainNavigation",defaultMessage:"Main",description:"Label describing the site navigation, for screen reader users"}),this.openTooltipMessage=a.formatMessage({id:"global.openVerb",defaultMessage:"Open",description:"For a button, to open a user interface element"}),this.closeTooltipMessage=a.formatMessage({id:"global.closeVerb",defaultMessage:"Close",description:"For a button, to close a user interface element"}),this.throttledRerender=r((()=>n(this.el)),50)}get isCollapsible(){return window.innerWidth<1024}get ariaExpanded(){return this.isCollapsible?this.open.toString():void 0}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}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(){document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn(),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 e("div",{class:"overlay",onClick:()=>{this.open=!1}})}render(){return e(s,{role:"navigation","aria-expanded":this.ariaExpanded,"aria-label":this.mainNavigationMessage},this.open?this.renderOverlay():"",this.isCollapsible&&e("div",{class:"trapfocus",tabindex:this.open?0:void 0,onFocus:()=>this.focusLastItem()}),e("div",{class:"tray"},e("div",{class:"toggle-wrapper"},e("wm-button",{ref:t=>this.toggleEl=t,class:"toggle "+(this.isTabbing?"user-is-tabbing":""),"button-type":"navigational",icon:this.open?"f156":"f35c","icon-size":"2rem",tooltip:this.open?this.closeTooltipMessage:this.openTooltipMessage,"tooltip-position":"left",tabIndex:this.open?void 0:-1,onClick:()=>{this.open=!this.open}})),e("ul",{class:"navlist"},e("slot",null))),this.isCollapsible&&e("div",{class:"trapfocus",tabindex:this.open?0:void 0,onFocus:()=>this.toggleEl.focus()}))}get el(){return o(this)}static get watchers(){return{open:["handleStateChange"]}}};l.style=":host{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:#fff;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 h=class{constructor(e){t(this,e),this.wmNavigationHamburgerClicked=i(this,"wmNavigationHamburgerClicked",7),this.tooltipVisible=!1,this.isTabbing=!1,this.open=!1,this.showNavMessage=a.formatMessage({id:"navigation.showNavigation",defaultMessage:"Show navigation",description:"For user interface element opening a navigation menu"})}get tooltipEl(){return document.getElementById("wm-tooltip")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleNavigationStateChanged(t){this.open=t.target.open}componentWillLoad(){this.el.focus=function(){this.shadowRoot.querySelector("button").focus(),requestAnimationFrame((()=>{this.tooltipVisible=!1}))},document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn(),this.navId||console.error("wm-navigation-hamburger: nav-id is a required prop")}showTooltip(){this.tooltipEl.textContent=this.showNavMessage,this.tooltipEl.style.top="1.125rem",this.tooltipEl.style.left="2.75rem",this.tooltipEl.style.transitionDelay="500ms",this.tooltipEl.style.opacity="1",setTimeout((()=>{this.tooltipVisible=!0}),500)}hideTooltip(){this.tooltipEl.style.transitionDelay="0s",this.tooltipEl.style.opacity="0",this.tooltipVisible=!1}showTooltipForKeyboardUsers(){this.isTabbing&&this.showTooltip()}handleClick(){this.hideTooltip(),this.wmNavigationHamburgerClicked.emit()}render(){return e(s,{class:"hamburger "+(this.open?"nav-open":"nav-closed")},e("button",{class:this.isTabbing?"user-is-tabbing":void 0,"aria-expanded":this.open,"aria-controls":this.navId,"aria-label":this.showNavMessage,onMouseEnter:()=>this.showTooltip(),onMouseLeave:()=>this.hideTooltip(),onFocus:()=>this.showTooltipForKeyboardUsers(),onBlur:()=>this.hideTooltip(),onClick:()=>this.handleClick()},e("span",{class:"icon"})))}get el(){return o(this)}};h.style='button{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.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}button.user-is-tabbing:focus::-moz-focus-inner{border:0}button:hover{background-color:#d7d6d9}.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:#575195}@media screen and (max-width: 1023px){:host{width:3.75rem;height:3.75rem}button{display:initial}}';const c=class{constructor(e){t(this,e),this.wmNavigationItemClicked=i(this,"wmNavigationItemClicked",7),this.isTabbing=!1}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}componentWillLoad(){this.el.focus=function(){this.shadowRoot.querySelector(".link").focus()},document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn()}render(){return e(s,{role:"listitem"},e("a",{class:`link ${this.active?"active":""} ${this.isTabbing?"user-is-tabbing":""}`,href:this.href,onClick:()=>this.wmNavigationItemClicked.emit()},e("div",{class:"icon","aria-hidden":"true"},e("slot",null)),e("div",{class:"text"},this.text)))}get el(){return o(this)}};c.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}.link:hover{background-color:#f2f2f2}.link .icon{font-size:1.375rem;color:#6b6b6b}.link .text{font-size:0.875rem}.link.user-is-tabbing:focus{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e;box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px #61279e}.link.active{background-color:#e9e7ec}.link.active:before{content:"";background-color:#575195;position:absolute;height:100%;width:5px;left:0}.link.active .text{color:#575195}.link.active .icon{color:#575195}';export{l as wm_navigation,h as wm_navigation_hamburger,c as wm_navigation_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e}from"./p-c2abdcba.js";const s=class{constructor(s){t(this,s),this.wmChartSliceUpdated=e(this,"wmChartSliceUpdated",7)}componentDidLoad(){if(parseInt(this.amount)>0&&!this.legend)throw new Error("wm-chart-slice was provided an amount value without a legend. The legend is required unless the amount is 0 or left empty. For more information see https://components.watermarkinsights.com/chart")}componentDidUpdate(){this.wmChartSliceUpdated.emit()}};export{s as wm_chart_slice}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o["throw"](t))}catch(t){i(t)}}function u(t){t.done?r(t.value):n(t.value).then(s,a)}u((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return u([t,e])}}function u(s){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-a0c3ef16.system.js","./p-f5df5903.system.js","./p-76ca7498.system.js","./p-9d02957d.system.js"],(function(t){"use strict";var e,r,o,n,i,s,a,u,c,l;return{setters:[function(t){e=t.r;r=t.c;o=t.h;n=t.H;i=t.g},function(t){s=t.a},function(t){a=t.s;u=t.k;c=t.i},function(t){l=t.g}],execute:function(){var p=":host,wm-navigator{height:100%;min-width:0;position:relative;display:inline-block}:host .wrapper,wm-navigator .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:#fff;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,wm-navigator .wrapper .user{background:#f4f4f4;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper .user p,wm-navigator .wrapper .user p{margin:0}:host .wrapper .user p:first-child,wm-navigator .wrapper .user p:first-child{font-weight:700;text-transform:capitalize}:host .wrapper h2,wm-navigator .wrapper h2{background:#2e1b46;color:#fff;font-weight:700;margin:0;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper [role=listbox],wm-navigator .wrapper [role=listbox]{list-style:none;margin:0;padding-left:0}:host .wrapper.hide,wm-navigator .wrapper.hide{-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0)}:host .wrapper.right,wm-navigator .wrapper.right{right:auto;left:20px}:host img,wm-navigator img{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:left center;transform-origin:left center;display:block}:host .logout,wm-navigator .logout{text-align:center;text-transform:capitalize}priv-navigator-item:focus{outline:none}";var f=t("wm_navigator",function(){function t(t){e(this,t);this.wmNavigatorLogout=r(this,"wmNavigatorLogout",7);this.authType=1;this.loadFromUserinfo=false;this.retrievedInfo=!this.loadFromUserinfo;this.parsedProducts=[];this.isOpen=false;this.openRight=false;this.isTabbing=false;this.itemIndexToFocus=0}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.userName){console.error("wm-navigator: user-name is a required property.")}return[4,this.parseData()];case 1:t.sent();this.setFocusIndex();return[2]}}))}))};t.prototype.parseData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:if(!!!this.loadFromUserinfo)return[3,2];return[4,l("/platform/navigator/userinfo").then((function(e){t.email=e.email;t.currentProductId=e.current_product_id;t.parsedProducts=t.productKeysToCamelCase(e.products);t.logoutUrl=t.logoutUrl?t.logoutUrl:e.logout_url;t.connectionName=t.connectionName?t.connectionName:e.connection_name;if(!!t.email&&!!t.currentProductId){t.retrievedInfo=true}})).catch((function(t){console.error(t)}))];case 1:e.sent();return[3,3];case 2:this.currentProductId=s(this.el);if(!!this.products){if(typeof this.products==="string"){this.parsedProducts=JSON.parse(this.products)}else{this.parsedProducts=this.products}this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts)}e.label=3;case 3:this.parsedProducts.sort((function(t,e){return t.name<e.name?-1:1}));return[2]}}))}))};t.prototype.productKeysToCamelCase=function(t){t=t.map((function(t){var e=Object.keys(t);var r={};e.forEach((function(e){r[a(e)]=t[e]}));return r}));return t};t.prototype.setFocusIndex=function(){if(this.parsedProducts.length>1){var t=this.getProduct(this.currentProductId);if(t){this.itemIndexToFocus=this.parsedProducts.indexOf(t)}}};t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleKeys=function(t){switch(t.key){case"Escape":t.preventDefault();this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault();if(!this.isOpen){this.itemIndexToFocus=u(this.itemIndexToFocus,t.key,this.navigatorItems.length);this.openMenu()}break}};t.prototype.handleKeydown=function(t){var e=t.detail.key;var r=t.detail.navItem;switch(e){case"Tab":this.closeMenu();break;case"Enter":case" ":r.click();break;case"ArrowDown":case"ArrowUp":var o=this.itemIndexToFocus;this.itemIndexToFocus=u(this.itemIndexToFocus,e,this.navigatorItems.length);this.focusItem();this.unfocusItem(o);break}};t.prototype.handleClick=function(t){var e=t.target===this.el||this.el.contains(t.target);if(!e&&this.isOpen){this.closeMenu()}};t.prototype.handleButtonClick=function(){this.isOpen?this.closeMenu():this.openMenu()};t.prototype.openMenu=function(){if(this.wrapperEl){var t=this.wrapperEl.clientWidth;var e=this.el.getBoundingClientRect().left;var r=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>e&&r>e}this.isOpen=true;this.focusItem()};t.prototype.closeMenu=function(){this.isOpen=false;this.buttonFocusHandler();this.unfocusItem(this.itemIndexToFocus);this.setFocusIndex()};t.prototype.focusItem=function(){var t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0;t.focused=true;window.requestAnimationFrame((function(){return t.focus()}))};t.prototype.unfocusItem=function(t){var e=this.navigatorItems[t];e.tabIndex=-1;e.focused=false};t.prototype.buttonFocusHandler=function(){var t=this.el.shadowRoot.querySelector("priv-navigator-button");var e=t.shadowRoot.querySelector("button");window.requestAnimationFrame((function(){return e.focus()}))};t.prototype.renderUserInfo=function(){return o("div",{class:"user",id:"wm-nav-user","aria-label":c.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},o("p",null,this.userName),o("p",null,this.email))};t.prototype.setAltText=function(){if(this.parsedProducts.length>1){return c.formatMessage({id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"})}else{return c.formatMessage({id:"navigator.userinfo",defaultMessage:"User information"})}};t.prototype.renderHeading=function(){return o("h2",null,c.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))};t.prototype.renderList=function(){return o("ul",{role:"listbox","aria-label":"".concat(c.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())};t.prototype.renderProductOptions=function(){var t=this;return this.parsedProducts.map((function(e){var r,n,i,s;r=e.name;n=e.iconUrl;s=t.setProductOnClick(e.id);if(!!r&&!!n){i=t.currentProductId===e.id;return o("priv-navigator-item",{selected:i,id:e.id,onClick:s,role:"option","aria-label":r},o("img",{src:n,alt:r}))}}))};t.prototype.setProductOnClick=function(t){var e=this.getProduct(t);if(this.currentProductId===t){return function(){}}else if(e){if(!!this.loadFromUserinfo||this.authType===2){return function(){return window.location.href=e.linkUrl}}else if(this.authType===3){var r=this.connectionName?"/?connection_name=".concat(this.connectionName):"";return function(){return window.location.href=e.samlLinkUrl+r}}}};t.prototype.renderLogoutOption=function(){return o("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},o("span",{class:"logout"},c.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))};t.prototype.setLogoutOnclick=function(){var t=this;return function(){t.wmNavigatorLogout.emit();if(t.logoutUrl){window.location.href=t.logoutUrl}}};Object.defineProperty(t.prototype,"navigatorItems",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))},enumerable:false,configurable:true});t.prototype.getProduct=function(t){return this.parsedProducts.find((function(e){return e.id===t}))};t.prototype.render=function(){var t=this;return this.retrievedInfo?o(n,{class:this.isTabbing?"user-is-tabbing":""},o("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText(),isTabbing:this.isTabbing}),o("div",{class:"wrapper ".concat(this.isOpen?"":"hide"," ").concat(this.openRight?"right":""),ref:function(e){return t.wrapperEl=e}},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""};Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{products:["parseData"]}},enumerable:false,configurable:true});return t}());f.style=p}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,r,o){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o["throw"](t))}catch(t){i(t)}}function u(t){t.done?r(t.value):n(t.value).then(s,a)}u((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return u([t,e])}}function u(s){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-726b9452.system.js","./p-08b7ec08.system.js","./p-93f6326d.system.js","./p-313b6073.system.js"],(function(t){"use strict";var e,r,o,n,i,s,a,u,c,l;return{setters:[function(t){e=t.r;r=t.c;o=t.h;n=t.H;i=t.g},function(t){s=t.a},function(t){a=t.s;u=t.k;c=t.i},function(t){l=t.g}],execute:function(){var p=":host,wm-navigator{height:100%;min-width:0;position:relative;display:inline-block}:host .wrapper,wm-navigator .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:#fff;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,wm-navigator .wrapper .user{background:#f4f4f4;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper .user p,wm-navigator .wrapper .user p{margin:0}:host .wrapper .user p:first-child,wm-navigator .wrapper .user p:first-child{font-weight:700;text-transform:capitalize}:host .wrapper h2,wm-navigator .wrapper h2{background:#2e1b46;color:#fff;font-weight:700;margin:0;padding:0.625rem 1.25rem;font-size:0.875rem}:host .wrapper [role=listbox],wm-navigator .wrapper [role=listbox]{list-style:none;margin:0;padding-left:0}:host .wrapper.hide,wm-navigator .wrapper.hide{-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0)}:host .wrapper.right,wm-navigator .wrapper.right{right:auto;left:20px}:host img,wm-navigator img{-webkit-transform:scale(0.8);transform:scale(0.8);-webkit-transform-origin:left center;transform-origin:left center;display:block}:host .logout,wm-navigator .logout{text-align:center;text-transform:capitalize}priv-navigator-item:focus{outline:none}";var f=t("wm_navigator",function(){function t(t){e(this,t);this.wmNavigatorLogout=r(this,"wmNavigatorLogout",7);this.authType=1;this.loadFromUserinfo=false;this.retrievedInfo=!this.loadFromUserinfo;this.parsedProducts=[];this.isOpen=false;this.openRight=false;this.isTabbing=false;this.itemIndexToFocus=0}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!this.userName){console.error("wm-navigator: user-name is a required property.")}return[4,this.parseData()];case 1:t.sent();this.setFocusIndex();return[2]}}))}))};t.prototype.parseData=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(e){switch(e.label){case 0:if(!!!this.loadFromUserinfo)return[3,2];return[4,l("/platform/navigator/userinfo").then((function(e){t.email=e.email;t.currentProductId=e.current_product_id;t.parsedProducts=t.productKeysToCamelCase(e.products);t.logoutUrl=t.logoutUrl?t.logoutUrl:e.logout_url;t.connectionName=t.connectionName?t.connectionName:e.connection_name;if(!!t.email&&!!t.currentProductId){t.retrievedInfo=true}})).catch((function(t){console.error(t)}))];case 1:e.sent();return[3,3];case 2:this.currentProductId=s(this.el);if(!!this.products){if(typeof this.products==="string"){this.parsedProducts=JSON.parse(this.products)}else{this.parsedProducts=this.products}this.parsedProducts=this.productKeysToCamelCase(this.parsedProducts)}e.label=3;case 3:this.parsedProducts.sort((function(t,e){return t.name<e.name?-1:1}));return[2]}}))}))};t.prototype.productKeysToCamelCase=function(t){t=t.map((function(t){var e=Object.keys(t);var r={};e.forEach((function(e){r[a(e)]=t[e]}));return r}));return t};t.prototype.setFocusIndex=function(){if(this.parsedProducts.length>1){var t=this.getProduct(this.currentProductId);if(t){this.itemIndexToFocus=this.parsedProducts.indexOf(t)}}};t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleKeys=function(t){switch(t.key){case"Escape":t.preventDefault();this.closeMenu();break;case"ArrowDown":case"ArrowUp":t.preventDefault();if(!this.isOpen){this.itemIndexToFocus=u(this.itemIndexToFocus,t.key,this.navigatorItems.length);this.openMenu()}break}};t.prototype.handleKeydown=function(t){var e=t.detail.key;var r=t.detail.navItem;switch(e){case"Tab":this.closeMenu();break;case"Enter":case" ":r.click();break;case"ArrowDown":case"ArrowUp":var o=this.itemIndexToFocus;this.itemIndexToFocus=u(this.itemIndexToFocus,e,this.navigatorItems.length);this.focusItem();this.unfocusItem(o);break}};t.prototype.handleClick=function(t){var e=t.target===this.el||this.el.contains(t.target);if(!e&&this.isOpen){this.closeMenu()}};t.prototype.handleButtonClick=function(){this.isOpen?this.closeMenu():this.openMenu()};t.prototype.openMenu=function(){if(this.wrapperEl){var t=this.wrapperEl.clientWidth;var e=this.el.getBoundingClientRect().left;var r=document.documentElement.clientWidth-this.el.getBoundingClientRect().right;this.openRight=t>e&&r>e}this.isOpen=true;this.focusItem()};t.prototype.closeMenu=function(){this.isOpen=false;this.buttonFocusHandler();this.unfocusItem(this.itemIndexToFocus);this.setFocusIndex()};t.prototype.focusItem=function(){var t=this.navigatorItems[this.itemIndexToFocus];t.tabIndex=0;t.focused=true;window.requestAnimationFrame((function(){return t.focus()}))};t.prototype.unfocusItem=function(t){var e=this.navigatorItems[t];e.tabIndex=-1;e.focused=false};t.prototype.buttonFocusHandler=function(){var t=this.el.shadowRoot.querySelector("priv-navigator-button");var e=t.shadowRoot.querySelector("button");window.requestAnimationFrame((function(){return e.focus()}))};t.prototype.renderUserInfo=function(){return o("div",{class:"user",id:"wm-nav-user","aria-label":c.formatMessage({id:"navigator.userinfoLabel",defaultMessage:"for {name}, email {email}"},{name:this.userName,email:this.email})},o("p",null,this.userName),o("p",null,this.email))};t.prototype.setAltText=function(){if(this.parsedProducts.length>1){return c.formatMessage({id:"navigator.userinfoAndProductNavigator",defaultMessage:"User information and product navigator"})}else{return c.formatMessage({id:"navigator.userinfo",defaultMessage:"User information"})}};t.prototype.renderHeading=function(){return o("h2",null,c.formatMessage({id:"navigator.watermarkApps",defaultMessage:"Watermark Apps",description:"Applications made by Watermark Insights"}))};t.prototype.renderList=function(){return o("ul",{role:"listbox","aria-label":"".concat(c.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())};t.prototype.renderProductOptions=function(){var t=this;return this.parsedProducts.map((function(e){var r,n,i,s;r=e.name;n=e.iconUrl;s=t.setProductOnClick(e.id);if(!!r&&!!n){i=t.currentProductId===e.id;return o("priv-navigator-item",{selected:i,id:e.id,onClick:s,role:"option","aria-label":r},o("img",{src:n,alt:r}))}}))};t.prototype.setProductOnClick=function(t){var e=this.getProduct(t);if(this.currentProductId===t){return function(){}}else if(e){if(!!this.loadFromUserinfo||this.authType===2){return function(){return window.location.href=e.linkUrl}}else if(this.authType===3){var r=this.connectionName?"/?connection_name=".concat(this.connectionName):"";return function(){return window.location.href=e.samlLinkUrl+r}}}};t.prototype.renderLogoutOption=function(){return o("priv-navigator-item",{class:"logout",selected:!(this.parsedProducts.length>1),id:"nav-logout",onClick:this.setLogoutOnclick(),role:"option"},o("span",{class:"logout"},c.formatMessage({id:"navigator.logout",defaultMessage:"Log Out"})))};t.prototype.setLogoutOnclick=function(){var t=this;return function(){t.wmNavigatorLogout.emit();if(t.logoutUrl){window.location.href=t.logoutUrl}}};Object.defineProperty(t.prototype,"navigatorItems",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("priv-navigator-item"))},enumerable:false,configurable:true});t.prototype.getProduct=function(t){return this.parsedProducts.find((function(e){return e.id===t}))};t.prototype.render=function(){var t=this;return this.retrievedInfo?o(n,{class:this.isTabbing?"user-is-tabbing":""},o("priv-navigator-button",{expanded:this.isOpen,altText:this.setAltText(),isTabbing:this.isTabbing}),o("div",{class:"wrapper ".concat(this.isOpen?"":"hide"," ").concat(this.openRight?"right":""),ref:function(e){return t.wrapperEl=e}},this.renderUserInfo(),this.parsedProducts.length>1&&this.renderHeading(),this.renderList())):""};Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{products:["parseData"]}},enumerable:false,configurable:true});return t}());f.style=p}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-
|
|
1
|
+
System.register(["./p-726b9452.system.js"],(function(e){"use strict";var t,r,n;return{setters:[function(e){t=e.r;r=e.c;n=e.g}],execute:function(){var o=e("wm_wrapper",function(){function e(e){t(this,e);this.wmWrapperLoaded=r(this,"wmWrapperLoaded",7)}e.prototype.componentDidLoad=function(){this.wmWrapperLoaded.emit()};e.prototype.render=function(){return};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}())}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-a0c3ef16.system.js","./p-76ca7498.system.js"],(function(e){"use strict";var t,i,r,o,n,s,a,p,l;return{setters:[function(e){t=e.r;i=e.c;r=e.h;o=e.H;n=e.g},function(e){s=e.i;a=e.g;p=e.l;l=e.e}],execute:function(){var d=':host,wm-timepicker{font-family:inherit}:host *,wm-timepicker *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .sr-only,wm-timepicker .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 .wrapper,wm-timepicker .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,wm-timepicker .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-timepicker .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-timepicker .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-timepicker .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-timepicker .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,wm-timepicker .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,wm-timepicker .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-timepicker .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,[dir=RTL] wm-timepicker .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-timepicker .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-timepicker .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input,wm-timepicker .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled,wm-timepicker .wrapper .inner-wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper .inner-wrapper input:focus,wm-timepicker .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button,wm-timepicker .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:#fff;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button .clock::after,wm-timepicker .wrapper .inner-wrapper button .clock::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:"\\f150";color:#575195;font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover,wm-timepicker .wrapper .inner-wrapper button:hover{background:#e6e6e6;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled,wm-timepicker .wrapper .inner-wrapper button:disabled{background-color:rgba(74, 74, 74, 0.05);pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled .clock::after,wm-timepicker .wrapper .inner-wrapper button:disabled .clock::after{color:#7b7b7b}[dir=RTL] :host .wrapper .inner-wrapper button,[dir=RTL] wm-timepicker .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus,wm-timepicker .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper button.user-is-tabbing:focus,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options,wm-timepicker .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-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:2.5rem;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards,wm-timepicker .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden,wm-timepicker .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option],wm-timepicker .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a}:host .wrapper .inner-wrapper .options [role=option]:hover,wm-timepicker .wrapper .inner-wrapper .options [role=option]:hover{background:#f4f4f4;outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus,wm-timepicker .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:#f4f4f4}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child),wm-timepicker .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .wrapper .inner-wrapper .options.open,wm-timepicker .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper,wm-timepicker .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error,wm-timepicker .wrapper.invalid .error{color:#c0392b;margin-top:4px;margin-bottom:4px;display:block;top:100%;left:0;font-style:italic}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper,wm-timepicker .wrapper:focus .inner-wrapper,wm-timepicker .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}';var c=e("wm_timepicker",function(){function e(e){t(this,e);this.wmTimepickerNewValidValue=i(this,"wmTimepickerNewValidValue",7);this.wmTimepickerOnChange=i(this,"wmTimepickerOnChange",7);this.disabled=false;this.value="";this.label="";this.labelPosition="top";this.requiredField=false;this.isExpanded=false;this.isTabbing=false;this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i;this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/;this.uid="";this.timeFormat="hh:mm";this.times=[];this.openUp=false;this.buttonAriaLabel=s.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."})}e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKey=function(e){switch(e.key){case"ArrowDown":e.preventDefault();if(this.isExpanded===false){this.open("next")}else{this.moveDown(this.selectedOption)}break;case"ArrowUp":e.preventDefault();if(this.isExpanded===false){this.open("previous")}else{this.moveUp(this.selectedOption)}break;case"Enter":case" ":if(this.isExpanded){e.preventDefault();this.handleOptionClick(this.selectedOption.textContent)}break;case"Escape":e.preventDefault();if(this.isExpanded){e.stopPropagation();this.close()}break;case"Tab":if(this.isExpanded){this.close(false)}break;case"Home":e.preventDefault();if(this.isExpanded){this.focusOption(this.optionsList[0]);this.setDropdownPosition("first")}break;case"End":e.preventDefault();if(this.isExpanded){this.focusOption(this.optionsList[this.optionsList.length-1]);this.setDropdownPosition("last")}break}};e.prototype.updateErrorState=function(){this.displayedErrorMessage=this.errorMessage};e.prototype.componentWillLoad=function(){if(this.label===""){console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none.")}this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("input").focus()}};this.uid=this.el.id?this.el.id:a();this.updateErrorState();this.timeFormat=s.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"});this.times=this.generateTimes()};e.prototype.componentDidLoad=function(){this.optionsEl.classList.add("hidden");this.optionsList=Array.from(this.optionsEl.querySelectorAll("li"));if(this.value){this.processInput()}};e.prototype.isValidTime=function(e){return this.twelveHrValid.test(e)||this.twentyFourHrValid.test(e)};e.prototype.generateTimes=function(){var e=[];var t=0;for(var i=0;t<24*60;i++){var r=Math.floor(t/60);var o=r.toString().padStart(2,"0");var n=(t%60).toString();var s=n.padStart(2,"0");e[i]="".concat(o,":").concat(s);t=t+15}return e};e.prototype.findNearestTimeInterval=function(e){var t=this.formatToStorage(e);var i=parseInt(t.slice(3,5));if(i%15!==0){var r=parseInt(t.slice(0,2));var o=(Math.round(i/15)*15).toString().padStart(2,"0");if(o==="60"){o="00";var n=r+1;if(n===24){n=0}t=t.replace("".concat(r.toString().padStart(2,"0"),":"),"".concat(n.toString().padStart(2,"0"),":"))}if(parseInt(o)<8){o="00"}e=t.replace(":".concat(i.toString().padStart(2,"0")),":".concat(o))}return e};e.prototype.handleListSelection=function(e){var t=this;e=this.findNearestTimeInterval(e);var i=this.optionsList.filter((function(i){return i.textContent==t.formatToDisplay(e)}))[0];i&&this.focusOption(i)};e.prototype.setValue=function(e){var t=this.value;this.inputEl.value=this.formatToDisplay(e);this.value=this.formatToStorage(e);this.handleListSelection(e);if(t!==this.value){this.wmTimepickerNewValidValue.emit({value:this.value})}this.wmTimepickerOnChange.emit({value:this.value,isValid:!!this.displayedErrorMessage})};e.prototype.processInput=function(){if(this.isValidTime(this.value)){this.setValue(this.value)}var e=this.determineErrorMessage();this.displayedErrorMessage=e};e.prototype.determineErrorMessage=function(){var e=this.errorMessage;var t=s.formatMessage({id:"time.requiredError",defaultMessage:"A time is required."});var i=s.formatMessage({id:"time.invalidTime",defaultMessage:"Please enter a valid time."});var r=this.isValidTime(this.value);if(r&&!this.errorMessage){e=null}else if(!r&&!this.errorMessage){if(this.requiredField&&!this.value){e=t}else if(this.value){e=i}else{e=null}}return e};e.prototype.splitTime=function(e){var t=this.twelveHrValid.exec(e)||this.twentyFourHrValid.exec(e);var i=parseInt(t[1]);var r=t[2]||"00";var o=t?t[3]:undefined;if(i===0&&(o===null||o===void 0?void 0:o.toUpperCase().includes("P"))){o="AM"}return[i,r,o]};e.prototype.formatToDisplay=function(e){var t=this.splitTime(e),i=t[0],r=t[1],o=t[2];if(i===12&&!o){o="PM"}if(i===0||i===24){i=12}if(i>12){i-=12;o="PM"}if(o&&o.toUpperCase().includes("P")){o="PM"}else{o="AM"}return"".concat(i.toString().padStart(2,"0"),":").concat(r," ").concat(o)};e.prototype.formatToStorage=function(e){var t=this.splitTime(e),i=t[0],r=t[1],o=t[2];if(i===24){i=0}if(i===12&&o&&o.toUpperCase().includes("A")){i-=12}if(o&&o.toUpperCase().includes("P")&&i!==12){i+=12}return"".concat(i.toString().padStart(2,"0"),":").concat(r)};e.prototype.open=function(e){var t=this;this.openUp=p(this.el,this.optionsEl);this.isExpanded=true;this.optionsEl.classList.remove("hidden");if(this.errorMessage||!this.value){this.handleListSelection("09:00")}this.setDropdownPosition("center",this.selectedOption);this.focusOption(this.selectedOption);window.requestAnimationFrame((function(){if(e==="next"){t.moveDown(t.selectedOption)}else if(e==="previous"){t.moveUp(t.selectedOption)}}))};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.buttonEl.focus()}}),150)};e.prototype.focusOption=function(e){this.optionsList.forEach((function(e){e.tabIndex=-1}));e.tabIndex=0;this.selectedOption=e;e.focus()};e.prototype.setDropdownPosition=function(e,t){switch(e){case"top":var i=t===null||t===void 0?void 0:t.previousElementSibling;this.optionsEl.scrollTop=i.getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop;break;case"bottom":var r=t===null||t===void 0?void 0:t.nextElementSibling;this.optionsEl.scrollTop=r.getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight;break;case"center":this.optionsEl.scrollTop=(this.optionsList.findIndex((function(e){return e.textContent===(t===null||t===void 0?void 0:t.textContent)}))-2)*t.offsetHeight;break;case"first":this.optionsEl.scrollTop=0;break;case"last":this.optionsEl.scrollTop=this.optionsList[0].clientHeight*this.optionsList.length;break}};e.prototype.moveUp=function(e){var t=e.previousElementSibling;if(t){if(t.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top){this.setDropdownPosition("top",e)}this.focusOption(t)}else{this.focusOption(this.optionsList[this.optionsList.length-1]);this.setDropdownPosition("last")}};e.prototype.moveDown=function(e){var t=e.nextElementSibling;if(t){if(t.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom){this.setDropdownPosition("bottom",e)}this.focusOption(t)}else{this.focusOption(this.optionsList[0]);this.setDropdownPosition("first")}};e.prototype.handleOptionClick=function(e){this.close();this.setValue(e);this.processInput()};e.prototype.handleInput=function(){this.value=this.inputEl.value;if(this.isValidTime(this.value)){this.handleListSelection(this.findNearestTimeInterval(this.value));this.setDropdownPosition("center",this.selectedOption)}};e.prototype.handleInputBlur=function(e){var t=this.preventValidation&&l(e,this.preventValidation);if(!t){this.processInput()}this.tpWrapper.classList.remove("focus")};e.prototype.renderOptions=function(){var e=this;return this.times.map((function(t,i){return r("li",{id:"option".concat(i+1),role:"option",onClick:function(){return e.handleOptionClick(t)}},e.formatToDisplay(t))}))};e.prototype.render=function(){var e=this;return r(o,{id:this.uid,invalid:!!this.displayedErrorMessage?"true":null,onBlur:function(){return e.close(false)}},r("div",{class:"wrapper label-".concat(this.labelPosition," ").concat(!!this.displayedErrorMessage?"invalid":""),ref:function(t){return e.tpWrapper=t}},r("div",{class:"label-wrapper"},this.labelPosition!=="none"&&r("label",{id:"label-".concat(this.uid),class:"label",htmlFor:"time-input-".concat(this.uid)},this.label,this.requiredField&&r("span",{class:"required","aria-hidden":"true"},"*"))),r("div",null,r("div",{class:"inner-wrapper"},r("input",{id:"time-input-".concat(this.uid),"aria-label":this.label,"aria-describedby":"error-".concat(this.uid),ref:function(t){return e.inputEl=t},onBlur:function(t){return e.handleInputBlur(t)},onInput:function(){return e.handleInput()},disabled:this.disabled,required:this.requiredField,placeholder:this.timeFormat,autocomplete:"off",onFocus:function(){return e.tpWrapper.classList.add("focus")}}),r("button",{id:"btn-".concat(this.uid),class:this.isTabbing?"user-is-tabbing":"",ref:function(t){return e.buttonEl=t},disabled:this.disabled,"aria-controls":"list-".concat(this.uid),"aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":"time-input-".concat(this.uid),onClick:function(){return e.isExpanded?e.close():e.open()},onMouseDown:function(t){t.preventDefault();e.buttonEl.focus()}},r("span",{class:"clock"})),r("ul",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list-".concat(this.uid),role:"listbox","aria-labelledby":"label-".concat(this.uid),"aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:function(t){return e.optionsEl=t}},this.renderOptions())),r("div",{id:"error-".concat(this.uid),class:"error","aria-live":"assertive","aria-atomic":"true"},this.displayedErrorMessage))))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["updateErrorState"]}},enumerable:false,configurable:true});return e}());c.style=d}}}));
|
|
1
|
+
System.register(["./p-726b9452.system.js","./p-93f6326d.system.js"],(function(e){"use strict";var t,i,r,o,n,s,a,p,l;return{setters:[function(e){t=e.r;i=e.c;r=e.h;o=e.H;n=e.g},function(e){s=e.i;a=e.g;p=e.l;l=e.e}],execute:function(){var d=':host,wm-timepicker{font-family:inherit}:host *,wm-timepicker *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .sr-only,wm-timepicker .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 .wrapper,wm-timepicker .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,wm-timepicker .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required,wm-timepicker .wrapper .label .required{color:#c0392b}:host .wrapper.label-left,wm-timepicker .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper,wm-timepicker .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label,wm-timepicker .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,wm-timepicker .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,wm-timepicker .wrapper.invalid .label{color:#c0392b}:host .wrapper.invalid .label:after,wm-timepicker .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,[dir=RTL] wm-timepicker .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label,wm-timepicker .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper .inner-wrapper,wm-timepicker .wrapper .inner-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.5rem;border:1px solid #4a4a4a;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;max-width:236px;-ms-flex-pack:justify;justify-content:space-between;position:relative}:host .wrapper .inner-wrapper input,wm-timepicker .wrapper .inner-wrapper input{-moz-border-top-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-bottom-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;border:none;font-size:0.875rem;padding:0.625rem 0.9375rem 0.5rem;min-width:0;height:100%;-ms-flex:1;flex:1;margin:0;font-family:inherit}:host .wrapper .inner-wrapper input:disabled,wm-timepicker .wrapper .inner-wrapper input:disabled{background-color:#f0f0f0;color:#737373}:host .wrapper .inner-wrapper input:focus,wm-timepicker .wrapper .inner-wrapper input:focus{outline:none}:host .wrapper .inner-wrapper button,wm-timepicker .wrapper .inner-wrapper button{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:#fff;border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-top-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-bottom-left-radius:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button .clock::after,wm-timepicker .wrapper .inner-wrapper button .clock::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:"\\f150";color:#575195;font-size:1.5rem;padding:0;line-height:2.5rem}:host .wrapper .inner-wrapper button:hover,wm-timepicker .wrapper .inner-wrapper button:hover{background:#e6e6e6;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled,wm-timepicker .wrapper .inner-wrapper button:disabled{background-color:rgba(74, 74, 74, 0.05);pointer-events:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wrapper .inner-wrapper button:disabled .clock::after,wm-timepicker .wrapper .inner-wrapper button:disabled .clock::after{color:#7b7b7b}[dir=RTL] :host .wrapper .inner-wrapper button,[dir=RTL] wm-timepicker .wrapper .inner-wrapper button{right:auto;left:0}:host .wrapper .inner-wrapper button:focus,wm-timepicker .wrapper .inner-wrapper button:focus{outline:none}:host .wrapper .inner-wrapper button.user-is-tabbing:focus,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button.user-is-tabbing:focus::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper button::-moz-focus-inner,wm-timepicker .wrapper .inner-wrapper button::-moz-focus-inner{border:0}:host .wrapper .inner-wrapper .options,wm-timepicker .wrapper .inner-wrapper .options{margin:0;padding:0;-webkit-overflow-scrolling:touch;overflow:auto;max-height:19.0625rem;-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:2.5rem;right:0;background:#fff;z-index:100;width:100%;font-size:0.875rem}:host .wrapper .inner-wrapper .options.upwards,wm-timepicker .wrapper .inner-wrapper .options.upwards{top:unset;bottom:2.5rem;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .wrapper .inner-wrapper .options.hidden,wm-timepicker .wrapper .inner-wrapper .options.hidden{visibility:hidden}:host .wrapper .inner-wrapper .options [role=option],wm-timepicker .wrapper .inner-wrapper .options [role=option]{display:block;cursor:pointer;position:relative;padding:1.25rem;background:#fff;font-family:inherit;list-style:none;color:#4a4a4a}:host .wrapper .inner-wrapper .options [role=option]:hover,wm-timepicker .wrapper .inner-wrapper .options [role=option]:hover{background:#f4f4f4;outline:none}:host .wrapper .inner-wrapper .options [role=option]:focus,wm-timepicker .wrapper .inner-wrapper .options [role=option]:focus{outline:none;background:#f4f4f4}:host .wrapper .inner-wrapper .options [role=option]:not(:last-child),wm-timepicker .wrapper .inner-wrapper .options [role=option]:not(:last-child){border-bottom:2px solid rgba(46, 27, 70, 0.05)}:host .wrapper .inner-wrapper .options.open,wm-timepicker .wrapper .inner-wrapper .options.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .wrapper.invalid .inner-wrapper,wm-timepicker .wrapper.invalid .inner-wrapper{-webkit-box-shadow:0 0 0 1px #c0392b;-moz-box-shadow:0 0 0 1px #c0392b;box-shadow:0 0 0 1px #c0392b;border-color:#c0392b}:host .wrapper.invalid .error,wm-timepicker .wrapper.invalid .error{color:#c0392b;margin-top:4px;margin-bottom:4px;display:block;top:100%;left:0;font-style:italic}:host .wrapper:focus .inner-wrapper,:host .wrapper.focus .inner-wrapper,wm-timepicker .wrapper:focus .inner-wrapper,wm-timepicker .wrapper.focus .inner-wrapper{-webkit-box-shadow:0 0 0 1px #20cbd4;-moz-box-shadow:0 0 0 1px #20cbd4;box-shadow:0 0 0 1px #20cbd4;outline:none;border-color:#20cbd4}';var c=e("wm_timepicker",function(){function e(e){t(this,e);this.wmTimepickerNewValidValue=i(this,"wmTimepickerNewValidValue",7);this.wmTimepickerOnChange=i(this,"wmTimepickerOnChange",7);this.disabled=false;this.value="";this.label="";this.labelPosition="top";this.requiredField=false;this.isExpanded=false;this.isTabbing=false;this.twelveHrValid=/^(0?[0-9]|1[0-2])\s*:?\s*([0-5][0-9])?\s?(a|p|am|pm)?$/i;this.twentyFourHrValid=/^(0?[0-9]|1[0-9]|2[0-4])\s*:?\s*([0-5][0-9])?$/;this.uid="";this.timeFormat="hh:mm";this.times=[];this.openUp=false;this.buttonAriaLabel=s.formatMessage({id:"time.selectTime",defaultMessage:"Select time",description:"Button text for screen readers."})}e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKey=function(e){switch(e.key){case"ArrowDown":e.preventDefault();if(this.isExpanded===false){this.open("next")}else{this.moveDown(this.selectedOption)}break;case"ArrowUp":e.preventDefault();if(this.isExpanded===false){this.open("previous")}else{this.moveUp(this.selectedOption)}break;case"Enter":case" ":if(this.isExpanded){e.preventDefault();this.handleOptionClick(this.selectedOption.textContent)}break;case"Escape":e.preventDefault();if(this.isExpanded){e.stopPropagation();this.close()}break;case"Tab":if(this.isExpanded){this.close(false)}break;case"Home":e.preventDefault();if(this.isExpanded){this.focusOption(this.optionsList[0]);this.setDropdownPosition("first")}break;case"End":e.preventDefault();if(this.isExpanded){this.focusOption(this.optionsList[this.optionsList.length-1]);this.setDropdownPosition("last")}break}};e.prototype.updateErrorState=function(){this.displayedErrorMessage=this.errorMessage};e.prototype.componentWillLoad=function(){if(this.label===""){console.error("You must include a label prop for the timepicker (for accessibility reasons), even if the label position is none.")}this.el.focus=function(){if(!this.disabled){this.shadowRoot.querySelector("input").focus()}};this.uid=this.el.id?this.el.id:a();this.updateErrorState();this.timeFormat=s.formatMessage({id:"time.timeFormat",defaultMessage:"hh:mm"});this.times=this.generateTimes()};e.prototype.componentDidLoad=function(){this.optionsEl.classList.add("hidden");this.optionsList=Array.from(this.optionsEl.querySelectorAll("li"));if(this.value){this.processInput()}};e.prototype.isValidTime=function(e){return this.twelveHrValid.test(e)||this.twentyFourHrValid.test(e)};e.prototype.generateTimes=function(){var e=[];var t=0;for(var i=0;t<24*60;i++){var r=Math.floor(t/60);var o=r.toString().padStart(2,"0");var n=(t%60).toString();var s=n.padStart(2,"0");e[i]="".concat(o,":").concat(s);t=t+15}return e};e.prototype.findNearestTimeInterval=function(e){var t=this.formatToStorage(e);var i=parseInt(t.slice(3,5));if(i%15!==0){var r=parseInt(t.slice(0,2));var o=(Math.round(i/15)*15).toString().padStart(2,"0");if(o==="60"){o="00";var n=r+1;if(n===24){n=0}t=t.replace("".concat(r.toString().padStart(2,"0"),":"),"".concat(n.toString().padStart(2,"0"),":"))}if(parseInt(o)<8){o="00"}e=t.replace(":".concat(i.toString().padStart(2,"0")),":".concat(o))}return e};e.prototype.handleListSelection=function(e){var t=this;e=this.findNearestTimeInterval(e);var i=this.optionsList.filter((function(i){return i.textContent==t.formatToDisplay(e)}))[0];i&&this.focusOption(i)};e.prototype.setValue=function(e){var t=this.value;this.inputEl.value=this.formatToDisplay(e);this.value=this.formatToStorage(e);this.handleListSelection(e);if(t!==this.value){this.wmTimepickerNewValidValue.emit({value:this.value})}this.wmTimepickerOnChange.emit({value:this.value,isValid:!!this.displayedErrorMessage})};e.prototype.processInput=function(){if(this.isValidTime(this.value)){this.setValue(this.value)}var e=this.determineErrorMessage();this.displayedErrorMessage=e};e.prototype.determineErrorMessage=function(){var e=this.errorMessage;var t=s.formatMessage({id:"time.requiredError",defaultMessage:"A time is required."});var i=s.formatMessage({id:"time.invalidTime",defaultMessage:"Please enter a valid time."});var r=this.isValidTime(this.value);if(r&&!this.errorMessage){e=null}else if(!r&&!this.errorMessage){if(this.requiredField&&!this.value){e=t}else if(this.value){e=i}else{e=null}}return e};e.prototype.splitTime=function(e){var t=this.twelveHrValid.exec(e)||this.twentyFourHrValid.exec(e);var i=parseInt(t[1]);var r=t[2]||"00";var o=t?t[3]:undefined;if(i===0&&(o===null||o===void 0?void 0:o.toUpperCase().includes("P"))){o="AM"}return[i,r,o]};e.prototype.formatToDisplay=function(e){var t=this.splitTime(e),i=t[0],r=t[1],o=t[2];if(i===12&&!o){o="PM"}if(i===0||i===24){i=12}if(i>12){i-=12;o="PM"}if(o&&o.toUpperCase().includes("P")){o="PM"}else{o="AM"}return"".concat(i.toString().padStart(2,"0"),":").concat(r," ").concat(o)};e.prototype.formatToStorage=function(e){var t=this.splitTime(e),i=t[0],r=t[1],o=t[2];if(i===24){i=0}if(i===12&&o&&o.toUpperCase().includes("A")){i-=12}if(o&&o.toUpperCase().includes("P")&&i!==12){i+=12}return"".concat(i.toString().padStart(2,"0"),":").concat(r)};e.prototype.open=function(e){var t=this;this.openUp=p(this.el,this.optionsEl);this.isExpanded=true;this.optionsEl.classList.remove("hidden");if(this.errorMessage||!this.value){this.handleListSelection("09:00")}this.setDropdownPosition("center",this.selectedOption);this.focusOption(this.selectedOption);window.requestAnimationFrame((function(){if(e==="next"){t.moveDown(t.selectedOption)}else if(e==="previous"){t.moveUp(t.selectedOption)}}))};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}this.isExpanded=false;window.setTimeout((function(){t.optionsEl.classList.add("hidden");if(e){t.buttonEl.focus()}}),150)};e.prototype.focusOption=function(e){this.optionsList.forEach((function(e){e.tabIndex=-1}));e.tabIndex=0;this.selectedOption=e;e.focus()};e.prototype.setDropdownPosition=function(e,t){switch(e){case"top":var i=t===null||t===void 0?void 0:t.previousElementSibling;this.optionsEl.scrollTop=i.getBoundingClientRect().top-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop;break;case"bottom":var r=t===null||t===void 0?void 0:t.nextElementSibling;this.optionsEl.scrollTop=r.getBoundingClientRect().bottom-this.optionsEl.getBoundingClientRect().top+this.optionsEl.scrollTop-this.optionsEl.offsetHeight;break;case"center":this.optionsEl.scrollTop=(this.optionsList.findIndex((function(e){return e.textContent===(t===null||t===void 0?void 0:t.textContent)}))-2)*t.offsetHeight;break;case"first":this.optionsEl.scrollTop=0;break;case"last":this.optionsEl.scrollTop=this.optionsList[0].clientHeight*this.optionsList.length;break}};e.prototype.moveUp=function(e){var t=e.previousElementSibling;if(t){if(t.getBoundingClientRect().top<this.optionsEl.getBoundingClientRect().top){this.setDropdownPosition("top",e)}this.focusOption(t)}else{this.focusOption(this.optionsList[this.optionsList.length-1]);this.setDropdownPosition("last")}};e.prototype.moveDown=function(e){var t=e.nextElementSibling;if(t){if(t.getBoundingClientRect().bottom>this.optionsEl.getBoundingClientRect().bottom){this.setDropdownPosition("bottom",e)}this.focusOption(t)}else{this.focusOption(this.optionsList[0]);this.setDropdownPosition("first")}};e.prototype.handleOptionClick=function(e){this.close();this.setValue(e);this.processInput()};e.prototype.handleInput=function(){this.value=this.inputEl.value;if(this.isValidTime(this.value)){this.handleListSelection(this.findNearestTimeInterval(this.value));this.setDropdownPosition("center",this.selectedOption)}};e.prototype.handleInputBlur=function(e){var t=this.preventValidation&&l(e,this.preventValidation);if(!t){this.processInput()}this.tpWrapper.classList.remove("focus")};e.prototype.renderOptions=function(){var e=this;return this.times.map((function(t,i){return r("li",{id:"option".concat(i+1),role:"option",onClick:function(){return e.handleOptionClick(t)}},e.formatToDisplay(t))}))};e.prototype.render=function(){var e=this;return r(o,{id:this.uid,invalid:!!this.displayedErrorMessage?"true":null,onBlur:function(){return e.close(false)}},r("div",{class:"wrapper label-".concat(this.labelPosition," ").concat(!!this.displayedErrorMessage?"invalid":""),ref:function(t){return e.tpWrapper=t}},r("div",{class:"label-wrapper"},this.labelPosition!=="none"&&r("label",{id:"label-".concat(this.uid),class:"label",htmlFor:"time-input-".concat(this.uid)},this.label,this.requiredField&&r("span",{class:"required","aria-hidden":"true"},"*"))),r("div",null,r("div",{class:"inner-wrapper"},r("input",{id:"time-input-".concat(this.uid),"aria-label":this.label,"aria-describedby":"error-".concat(this.uid),ref:function(t){return e.inputEl=t},onBlur:function(t){return e.handleInputBlur(t)},onInput:function(){return e.handleInput()},disabled:this.disabled,required:this.requiredField,placeholder:this.timeFormat,autocomplete:"off",onFocus:function(){return e.tpWrapper.classList.add("focus")}}),r("button",{id:"btn-".concat(this.uid),class:this.isTabbing?"user-is-tabbing":"",ref:function(t){return e.buttonEl=t},disabled:this.disabled,"aria-controls":"list-".concat(this.uid),"aria-expanded":this.isExpanded?"true":"false","aria-label":this.buttonAriaLabel,"aria-describedby":"time-input-".concat(this.uid),onClick:function(){return e.isExpanded?e.close():e.open()},onMouseDown:function(t){t.preventDefault();e.buttonEl.focus()}},r("span",{class:"clock"})),r("ul",{class:"options ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),id:"list-".concat(this.uid),role:"listbox","aria-labelledby":"label-".concat(this.uid),"aria-describedby":this.isExpanded?"collapsed":null,tabindex:-1,ref:function(t){return e.optionsEl=t}},this.renderOptions())),r("div",{id:"error-".concat(this.uid),class:"error","aria-live":"assertive","aria-atomic":"true"},this.displayedErrorMessage))))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["updateErrorState"]}},enumerable:false,configurable:true});return e}());c.style=d}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as a,g as n}from"./p-c2abdcba.js";import{d as i}from"./p-6a87da11.js";const s=class{constructor(a){t(this,a),this.wmPaginationPageClicked=e(this,"wmPaginationPageClicked",7),this.pageClicked=e(this,"pageClicked",7),this.focusCurrentPage=e(this,"focusCurrentPage",7),this.currentPage=1,this.totalItems=void 0,this.itemsPerPage=void 0,this.value=1,this.isLargeViewport=window.innerWidth>600,this.isTabbing=!1,this.srAnnouncement="",this.totalPages=0,this.debouncedResize=i((()=>{this.isLargeViewport=window.innerWidth>600}),250),this.getMiddlePageNums=()=>{let t;return t=this.currentPage<4?[2,3,4]:this.currentPage>this.totalPages-3?[this.totalPages-3,this.totalPages-2,this.totalPages-1]:[this.currentPage-1,this.currentPage,this.currentPage+1],t}}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}maintainFocusOnNumberChange(t){window.requestAnimationFrame((()=>{switch(t){case"previous":1===this.currentPage&&this.el.shadowRoot.querySelector("button#wm-1").focus();break;case"next":this.currentPage===this.totalPages&&this.el.shadowRoot.querySelector(`button#wm-${this.totalPages}`).focus();break;case"prev-arrow":1===this.currentPage&&this.el.shadowRoot.querySelector("#next-arw").focus();break;case"next-arrow":this.currentPage===this.totalPages&&this.el.shadowRoot.querySelector("#previous-arw").focus();break;case"page":this.el.shadowRoot.querySelector(`button#wm-${this.currentPage}`).focus();default:return}}))}handleResize(){this.debouncedResize()}calculateTotalPages(){this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage)}componentWillLoad(){if(!this.totalItems||!this.itemsPerPage||!this.currentPage)throw new Error("Please check the required attributes");this.calculateTotalPages(),document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn()}updatePageDisplayed(t){this.value=t,this.wmPaginationPageClicked.emit(),this.pageClicked.emit(),this.srAnnouncement=`Current page, ${this.currentPage}. ${this.getCurrentPagesInView()}`}displayShortPagination(){let t=[];for(let e=1;e<=this.totalPages;e++)t.push(this.displayPageNumber(e));return t}displayLongPagination(){return[this.displayPageNumber(1),this.currentPage>3&&this.displayEllipsis(),...this.getMiddlePageNums().map((t=>this.displayPageNumber(t))),this.currentPage+2<this.totalPages&&this.displayEllipsis(),this.displayPageNumber(this.totalPages)]}displayPageNumber(t){return a("button",{id:`wm-${t}`,class:"paginationbtn",onClick:()=>{this.currentPage=t,this.updatePageDisplayed(t),this.maintainFocusOnNumberChange("page")},value:t,"aria-label":this.currentPage!==t?`Go to page ${t}`:"","aria-current":this.currentPage===t?"page":void 0},t)}displayEllipsis(){return a("span",{class:"ellipsis"},"...")}getCurrentPagesInView(){let t=this.itemsPerPage*this.currentPage;const e=t-this.itemsPerPage+1;return t>this.totalItems&&(t=this.totalItems),"Viewing "+(e===t?`${e}`:`${e}–${t} of ${this.totalItems}`)}renderLarge(){return a("div",{class:"largescreen"},a("div",{class:"pageview"},this.getCurrentPagesInView()),a("div",{class:"pagebtncontainer "+(this.isTabbing?"user-is-tabbing":"")},a("button",{id:"previous",class:"paginationbtn previousbtn",onClick:()=>{this.currentPage=this.currentPage-1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("previous")},disabled:1===this.currentPage,"aria-label":"Go to previous page","aria-controls":"status"},"Previous"),this.totalPages<6?this.displayShortPagination():this.displayLongPagination(),a("button",{id:"next",class:"paginationbtn nextbtn",onClick:()=>{this.currentPage=this.currentPage+1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("next")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page","aria-controls":"status"},"Next")))}renderSmall(){return a("div",{class:"smallscreen"},a("div",{class:"pagebtncontainer "+(this.isTabbing?"user-is-tabbing":"")},a("button",{id:"wm-1-arw",class:"paginationbtn",onClick:()=>{this.currentPage=1,this.updatePageDisplayed(1),this.maintainFocusOnNumberChange("prev-arrow")},value:1,"aria-current":1===this.currentPage?"page":void 0,"aria-label":"Go to page 1","aria-controls":"status",disabled:1===this.currentPage},a("svg",{width:"16",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6zM15.41 10.59L10.83 6l4.58-4.59L14 0 8 6l6 6z"}))),a("button",{id:"previous-arw",class:"paginationbtn previousbtn",onClick:()=>{this.currentPage-=1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("prev-arrow")},disabled:1===this.currentPage,"aria-label":"Go to previous page"},a("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M7.41 10.59L2.83 6l4.58-4.59L6 0 0 6l6 6z"}))),"Page ",this.currentPage," of ",this.totalPages,a("button",{id:"next-arw",class:"paginationbtn nextbtn",onClick:()=>{this.currentPage+=1,this.updatePageDisplayed(this.currentPage),this.maintainFocusOnNumberChange("next-arrow")},disabled:this.currentPage===this.totalPages,"aria-label":"Go to next page"},a("svg",{width:"8",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6z"}))),a("button",{id:`wm-${this.totalPages}-arw`,class:"paginationbtn",onClick:()=>{this.currentPage=this.totalPages,this.updatePageDisplayed(this.totalPages),this.maintainFocusOnNumberChange("next-arrow")},value:this.totalPages,"aria-current":this.currentPage===this.totalPages?"page":void 0,"aria-label":`Go to last page, page ${this.totalPages}`,"aria-controls":"status",disabled:this.currentPage===this.totalPages},a("svg",{width:"17",height:"12",xmlns:"http://www.w3.org/2000/svg"},a("path",{d:"M.59 10.59L5.17 6 .59 1.41 2 0l6 6-6 6zM9.59 10.59L14.17 6 9.59 1.41 11 0l6 6-6 6z"})))))}render(){return this.totalItems>this.itemsPerPage&&a("nav",{"aria-label":`Pagination Navigation. ${this.getCurrentPagesInView()}. Current page, ${this.currentPage}.`},this.isLargeViewport?this.renderLarge():this.renderSmall(),a("div",{id:"status",class:"sr-only","aria-live":"polite","aria-relevant":"text","aria-atomic":"true"},this.srAnnouncement))}get el(){return n(this)}static get watchers(){return{totalItems:["calculateTotalPages"],itemsPerPage:["calculateTotalPages"]}}};s.style='nav .largescreen,nav .smallscreen{margin-bottom:0.625rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:flex-end;-ms-flex-pack:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end;font-size:0.875rem}nav .largescreen .pageview,nav .smallscreen .pageview{font-size:0.875rem;margin:0 0.625rem}nav .largescreen .paginationbtn,nav .smallscreen .paginationbtn{position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none;border:none;color:#575195;background-color:transparent;margin:0;padding:0;height:2.5rem;width:2.5rem;font-family:inherit;letter-spacing:0.3px;font-size:0.875rem;font-weight:500;cursor:pointer;text-transform:none}nav .largescreen .paginationbtn svg *,nav .smallscreen .paginationbtn svg *{fill:#565397}nav .largescreen .paginationbtn:hover:not([aria-current=page]):not([disabled]),nav .smallscreen .paginationbtn:hover:not([aria-current=page]):not([disabled]){text-decoration:underline}nav .largescreen .paginationbtn:focus,nav .smallscreen .paginationbtn:focus{outline:none}nav .largescreen .paginationbtn::-moz-focus-inner,nav .smallscreen .paginationbtn::-moz-focus-inner{border:0;outline:none}nav .largescreen .paginationbtn[disabled],nav .smallscreen .paginationbtn[disabled]{color:#9f9f9f;pointer-events:none}nav .largescreen .paginationbtn[disabled] svg *,nav .smallscreen .paginationbtn[disabled] svg *{fill:#9f9f9f}nav .largescreen .previousbtn,nav .smallscreen .previousbtn{margin-right:0.625rem;width:auto !important}nav .largescreen .nextbtn,nav .smallscreen .nextbtn{margin-left:0.625rem;margin-right:0;width:auto !important}nav .largescreen .previousbtn,nav .largescreen .nextbtn,nav .smallscreen .previousbtn,nav .smallscreen .nextbtn{-ms-transition:none;-webkit-transition:none;-moz-transition:none;transition:none}nav .largescreen .ellipsis,nav .smallscreen .ellipsis{display:inline-block;width:2.5rem;text-align:center}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]),nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]):before{position:absolute;content:"";height:auto;width:16px;top:0;bottom:0;left:12px;right:0;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #3862e9), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 2px;background-position:0 2em;border-radius:0;line-height:normal}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before,nav .smallscreen .pagebtncontainer.user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{left:0 !important}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}nav .largescreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner,nav .smallscreen .pagebtncontainer.user-is-tabbing [aria-current=page]:focus::-moz-focus-inner{border:0}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).previousbtn:focus:before{width:56px !important}nav .largescreen .user-is-tabbing :focus:not(.-disabled):not([aria-current=page]).nextbtn:focus:before{width:32px !important}nav .largescreen .paginationbtn[aria-current=page]{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background-color:#575195;color:#fff}nav .largescreen .paginationbtn[aria-current=page]:hover{-webkit-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 2px 0 rgba(87, 81, 149, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.2);background:#4e4986}.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{s as wm_pagination}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;i=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1];r=a;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(a);break}if(r[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-a0c3ef16.system.js","./p-76ca7498.system.js"],(function(e){"use strict";var t,o,n,i,r,a,s,l;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H;r=e.g},function(e){a=e.g;s=e.j;l=e.c}],execute:function(){var d="wm-modal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal>*{width:80vw;max-width:750px;background:#fff}wm-modal>*:focus{outline:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem}wm-modal wm-modal-header{z-index:2003}wm-modal wm-modal-footer{z-index:2003}wm-modal>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal.wm-modal wm-modal-header{border-bottom:1px solid #f4f3f6}wm-modal.wm-modal wm-modal-footer{border-top:1px solid #f4f3f6}@media only screen and (max-width: 768px){wm-modal.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal.wm-modal>*{max-width:none;width:100vw}wm-modal.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal.wm-dialog>:not(wm-modal-header):not(wm-modal-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-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;z-index:2000}wm-modal.hide{visibility:hidden}wm-modal .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;top:0;left:0}";var m=e("wm_modal",function(){function e(e){var n=this;t(this,e);this.focusLastElement=o(this,"focusLastElement",3);this.focusFirstElement=o(this,"focusFirstElement",3);this.wmModalCloseTriggered=o(this,"wmModalCloseTriggered",3);this.wmCloseTriggered=o(this,"wmCloseTriggered",7);this.wmModalPrimaryTriggered=o(this,"wmModalPrimaryTriggered",7);this.wmPrimaryTriggered=o(this,"wmPrimaryTriggered",7);this.wmModalSecondaryTriggered=o(this,"wmModalSecondaryTriggered",7);this.wmSecondaryTriggered=o(this,"wmSecondaryTriggered",7);this.open=false;this.isOpen=false;this.elementToFocus="";this.modalType=null;this.isTypeDialog=null;this.bodyFocusListener=function(){return n.redirectFocusFromBody()}}Object.defineProperty(e.prototype,"tempOpen",{get:function(){return this.open||this.isOpen},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempModalType",{get:function(){return this.modalType?this.modalType:this.isTypeDialog?"dialog":"modal"},enumerable:false,configurable:true});e.prototype.toggleModal=function(){this.tempOpen?this.showModal():this.hideModal()};e.prototype.handleClick=function(e){this.tempOpen&&e.target===this.overlayEl&&this.focusOnOpen.focus()};e.prototype.closeModalOnEscape=function(e){if(e.key==="Escape"){e.stopPropagation();this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();this.open=false}};e.prototype.showModal=function(){var e=this;this.setElToFocusOnClose();document.body.style.overflow="hidden";document.body.tabIndex=0;document.body.removeEventListener("focus",this.bodyFocusListener,true);document.body.addEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){e.setElToFocusOnOpen();window.requestAnimationFrame((function(){return e.focusOnOpen.focus()}))}))};e.prototype.hideModal=function(){var e=this;document.body.style.overflow="visible";document.body.tabIndex=-1;document.body.removeEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){return e.focusOnClose.focus()}))};e.prototype.componentWillLoad=function(){if(this.isOpen){console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.")}if(this.isTypeDialog){console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.")}if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){if(!this.el.id){console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.")}}this.uid=this.el.id?this.el.id:a()};e.prototype.componentDidLoad=function(){if(this.tempOpen){this.showModal()}};e.prototype.emitCloseEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();return[2]}))}))};e.prototype.emitPrimaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalPrimaryTriggered.emit();this.wmPrimaryTriggered.emit();return[2]}))}))};e.prototype.emitSecondaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalSecondaryTriggered.emit();this.wmSecondaryTriggered.emit();return[2]}))}))};e.prototype.setElToFocusOnOpen=function(){var e=s(this.el.querySelector("#wm-modal-close-".concat(this.uid)));if(this.elementToFocus){if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){this.setAriaDescribedbyOnModal();this.elementToFocus="wm-".concat(this.elementToFocus,"-").concat(this.uid)}var t=this.el.querySelector("#".concat(this.elementToFocus));if(t){var o=s(t);if(o){this.focusOnOpen=o}else{console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");this.focusOnOpen=e}}else{console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");this.focusOnOpen=e}}else{this.focusOnOpen=e}};e.prototype.setAriaDescribedbyOnModal=function(){var e=document.getElementById("content-".concat(this.uid));if(!e){console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}else{this.el.setAttribute("aria-describedby","wm-modal-heading-text-".concat(this.uid," content-").concat(this.uid))}};e.prototype.setElToFocusOnClose=function(){var e=document.activeElement;if(e.tagName==="WM-MENUITEM"){this.focusOnClose=e.parentElement}else{this.focusOnClose=l(e)}};e.prototype.redirectFocusFromBody=function(){if(document.activeElement.tagName==="BODY"){this.setElToFocusOnOpen();this.focusOnOpen.focus()}};e.prototype.render=function(){var e=this;return n(i,{class:"".concat(this.tempOpen?"":"hide ").concat("wm-"+this.tempModalType),role:"dialog","aria-describedby":"wm-modal-heading-text-".concat(this.uid),"aria-modal":"true",tabindex:this.tempOpen?0:null,onFocus:function(){e.focusLastElement.emit()}},n("div",{class:"overlay",ref:function(t){return e.overlayEl=t}}),n("div",{class:"sr-only",tabIndex:0,onFocus:function(){e.focusFirstElement.emit()}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["toggleModal"],isOpen:["toggleModal"]}},enumerable:false,configurable:true});return e}());m.style=d}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,o,n){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function a(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):i(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o)try{if(n=1,i&&(r=a[0]&2?i["return"]:a[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;if(i=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:o.label++;return{value:a[1],done:false};case 5:o.label++;i=a[1];a=[0];continue;case 7:a=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1];r=a;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(a);break}if(r[2])o.ops.pop();o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e];i=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-726b9452.system.js","./p-93f6326d.system.js"],(function(e){"use strict";var t,o,n,i,r,a,s,l;return{setters:[function(e){t=e.r;o=e.c;n=e.h;i=e.H;r=e.g},function(e){a=e.g;s=e.j;l=e.c}],execute:function(){var d="wm-modal{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal>*{width:80vw;max-width:750px;background:#fff}wm-modal>*:focus{outline:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem}wm-modal wm-modal-header{z-index:2003}wm-modal wm-modal-footer{z-index:2003}wm-modal>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal.wm-modal wm-modal-header{border-bottom:1px solid #f4f3f6}wm-modal.wm-modal wm-modal-footer{border-top:1px solid #f4f3f6}@media only screen and (max-width: 768px){wm-modal.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal.wm-modal>*{max-width:none;width:100vw}wm-modal.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal.wm-dialog>:not(wm-modal-header):not(wm-modal-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-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;z-index:2000}wm-modal.hide{visibility:hidden}wm-modal .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;top:0;left:0}";var m=e("wm_modal",function(){function e(e){var n=this;t(this,e);this.focusLastElement=o(this,"focusLastElement",3);this.focusFirstElement=o(this,"focusFirstElement",3);this.wmModalCloseTriggered=o(this,"wmModalCloseTriggered",3);this.wmCloseTriggered=o(this,"wmCloseTriggered",7);this.wmModalPrimaryTriggered=o(this,"wmModalPrimaryTriggered",7);this.wmPrimaryTriggered=o(this,"wmPrimaryTriggered",7);this.wmModalSecondaryTriggered=o(this,"wmModalSecondaryTriggered",7);this.wmSecondaryTriggered=o(this,"wmSecondaryTriggered",7);this.open=false;this.isOpen=false;this.elementToFocus="";this.modalType=null;this.isTypeDialog=null;this.bodyFocusListener=function(){return n.redirectFocusFromBody()}}Object.defineProperty(e.prototype,"tempOpen",{get:function(){return this.open||this.isOpen},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempModalType",{get:function(){return this.modalType?this.modalType:this.isTypeDialog?"dialog":"modal"},enumerable:false,configurable:true});e.prototype.toggleModal=function(){this.tempOpen?this.showModal():this.hideModal()};e.prototype.handleClick=function(e){this.tempOpen&&e.target===this.overlayEl&&this.focusOnOpen.focus()};e.prototype.closeModalOnEscape=function(e){if(e.key==="Escape"){e.stopPropagation();this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();this.open=false}};e.prototype.showModal=function(){var e=this;this.setElToFocusOnClose();document.body.style.overflow="hidden";document.body.tabIndex=0;document.body.removeEventListener("focus",this.bodyFocusListener,true);document.body.addEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){e.setElToFocusOnOpen();window.requestAnimationFrame((function(){return e.focusOnOpen.focus()}))}))};e.prototype.hideModal=function(){var e=this;document.body.style.overflow="visible";document.body.tabIndex=-1;document.body.removeEventListener("focus",this.bodyFocusListener,true);window.requestAnimationFrame((function(){return e.focusOnClose.focus()}))};e.prototype.componentWillLoad=function(){if(this.isOpen){console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead.")}if(this.isTypeDialog){console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead.")}if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){if(!this.el.id){console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes.")}}this.uid=this.el.id?this.el.id:a()};e.prototype.componentDidLoad=function(){if(this.tempOpen){this.showModal()}};e.prototype.emitCloseEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalCloseTriggered.emit();this.wmCloseTriggered.emit();return[2]}))}))};e.prototype.emitPrimaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalPrimaryTriggered.emit();this.wmPrimaryTriggered.emit();return[2]}))}))};e.prototype.emitSecondaryEvent=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.wmModalSecondaryTriggered.emit();this.wmSecondaryTriggered.emit();return[2]}))}))};e.prototype.setElToFocusOnOpen=function(){var e=s(this.el.querySelector("#wm-modal-close-".concat(this.uid)));if(this.elementToFocus){if(this.elementToFocus==="primary"||this.elementToFocus==="secondary"){this.setAriaDescribedbyOnModal();this.elementToFocus="wm-".concat(this.elementToFocus,"-").concat(this.uid)}var t=this.el.querySelector("#".concat(this.elementToFocus));if(t){var o=s(t);if(o){this.focusOnOpen=o}else{console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");this.focusOnOpen=e}}else{console.warn("Ripple Component Library: The modal component couldn't find an element matching the value you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens.");this.focusOnOpen=e}}else{this.focusOnOpen=e}};e.prototype.setAriaDescribedbyOnModal=function(){var e=document.getElementById("content-".concat(this.uid));if(!e){console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}else{this.el.setAttribute("aria-describedby","wm-modal-heading-text-".concat(this.uid," content-").concat(this.uid))}};e.prototype.setElToFocusOnClose=function(){var e=document.activeElement;if(e.tagName==="WM-MENUITEM"){this.focusOnClose=e.parentElement}else{this.focusOnClose=l(e)}};e.prototype.redirectFocusFromBody=function(){if(document.activeElement.tagName==="BODY"){this.setElToFocusOnOpen();this.focusOnOpen.focus()}};e.prototype.render=function(){var e=this;return n(i,{class:"".concat(this.tempOpen?"":"hide ").concat("wm-"+this.tempModalType),role:"dialog","aria-describedby":"wm-modal-heading-text-".concat(this.uid),"aria-modal":"true",tabindex:this.tempOpen?0:null,onFocus:function(){e.focusLastElement.emit()}},n("div",{class:"overlay",ref:function(t){return e.overlayEl=t}}),n("div",{class:"sr-only",tabIndex:0,onFocus:function(){e.focusFirstElement.emit()}}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{open:["toggleModal"],isOpen:["toggleModal"]}},enumerable:false,configurable:true});return e}());m.style=d}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,f as r,h as p,H as t,g as a}from"./p-c2abdcba.js";import{g as n,i as o,d as m}from"./p-6a87da11.js";import{g as s,t as w,h as c,r as h,a as i,b as l,c as b,e as g,d}from"./p-a9ae4fa8.js";const u=class{constructor(p){e(this,p),this.chartType="doughnut1",this.showLegend=!0,this.notStartedColor=!1,this.labelPosition="top",this.isTabbing=!1,this.userIsNavigating=!1,this.uid=n(),this.slicesData=[],this.chartLabelMessage=o.formatMessage({id:"chart.interactiveChart",defaultMessage:"Interactive chart. Use arrow keys to browse elements, press Tab to exit."}),this.debouncedResize=m((async()=>{await s.call(this,this.currentChartType),r(this.el)}),10),this.debouncedSliceUpdate=m((async()=>{await s.call(this,this.currentChartType),r(this.el)}),100)}get tempValueFormat(){return this.valueFormat||this.showValues||"none"}get hybridType(){return window.innerWidth>1340?"doughnut0":"bar1"}get popoverEl(){return this.el.shadowRoot.querySelector("priv-chart-popover")}get sliceEls(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))}get currentChartType(){return"hybrid"===this.chartType?this.hybridType:this.chartType}get chartData(){return w[this.currentChartType]}get ariaLabelText(){let e=`${this.label}, ${this.chartLabelMessage}`;return this.subinfo&&(e+=` ${this.subinfo}`),e}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKeydown(e){c.call(this,e)}handleResize(){"hybrid"===this.chartType&&this.debouncedResize()}async componentWillLoad(){if(!this.label)throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.");this.showValues&&console.warn("wm-chart: show-values has been deprecated as of v3.1.0. Please use value-format instead."),await s.call(this,this.currentChartType)}handleSliceUpdate(){this.debouncedSliceUpdate()}renderBarText(e,r){let t;if("percentage"===this.tempValueFormat)t=e.perc+"%";else{if("amount"!==this.tempValueFormat)return;t=e.amount}return p("span",{class:"value",style:{width:`calc(${d(e.amount,this.total,!1)}%\n ${r!==this.slicesData.length-1?" - 2px":""}`}},t)}drawAxis(){if("bar3"===this.currentChartType)return p("svg",{class:"axis"},p("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),p("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),p("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),p("text",{x:"0.5",y:"-6"},"0%"),p("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}),p("text",{x:"100%",y:"-6"},"100%"))}render(){return p(t,{role:"application","aria-label":this.ariaLabelText,tabindex:"0",onBlur:()=>g.call(this)},p("div",{class:`component-wrapper ${this.currentChartType} ${this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""} ${"left"===this.labelPosition&&"bar4"===this.chartType?"left-label":""}`},p("label",{class:"label",id:`label-${this.uid}`,htmlFor:`graphic-${this.uid}`},p("span",{class:"label-text"},this.label),this.subinfo?p("span",{class:"subinfo"},this.subinfo):""),this.chartData.isBar?h.call(this):"",this.total>0&&this.chartData.isBar?i.call(this,this.currentChartType):l.call(this,this.currentChartType),this.chartData.isBar?"":h.call(this),p("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),"doughnut0"===this.currentChartType?b.call(this):""))}get el(){return a(this)}};u.style=":host .component-wrapper,wm-chart .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;}:host .component-wrapper .label,wm-chart .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:500;position:relative}:host .component-wrapper .label .subinfo,wm-chart .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:#6b6b6b}:host .component-wrapper .legend-wrapper,wm-chart .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend,wm-chart .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.--top,wm-chart .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item,wm-chart .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color,wm-chart .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom,wm-chart .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item,wm-chart .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color,wm-chart .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item,wm-chart .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type),wm-chart .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text,wm-chart .component-wrapper .legend-wrapper .legend .legend-text{padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color,wm-chart .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .cluster-warning,wm-chart .component-wrapper .legend-wrapper .cluster-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host .component-wrapper .doughnut-svg,wm-chart .component-wrapper .doughnut-svg,:host .component-wrapper .inner-bar-wrapper,wm-chart .component-wrapper .inner-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper,wm-chart .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .values,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment,wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type),wm-chart .component-wrapper .bar-wrapper .inner-bar-wrapper .bar-segments-wrapper .bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper,wm-chart .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment,wm-chart .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value,wm-chart .component-wrapper .value{display:inline-block;text-align:center}:host .component-wrapper .value:not(:last-of-type),wm-chart .component-wrapper .value:not(:last-of-type){margin-right:2px}:host .component-wrapper path:active,wm-chart .component-wrapper path:active,:host .component-wrapper path:hover,wm-chart .component-wrapper path:hover,:host .component-wrapper path:focus,wm-chart .component-wrapper path:focus,:host .component-wrapper .bar-segment:active,wm-chart .component-wrapper .bar-segment:active,:host .component-wrapper .bar-segment:hover,wm-chart .component-wrapper .bar-segment:hover,:host .component-wrapper .bar-segment:focus,wm-chart .component-wrapper .bar-segment:focus{outline:none}:host .component-wrapper .bar-segment:active.bar-segment,wm-chart .component-wrapper .bar-segment:active.bar-segment,:host .component-wrapper .bar-segment:hover.bar-segment,wm-chart .component-wrapper .bar-segment:hover.bar-segment,:host .component-wrapper .bar-segment:focus.bar-segment,wm-chart .component-wrapper .bar-segment:focus.bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,wm-chart .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,wm-chart .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,wm-chart .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .bar-segment:active.doughnut-segment,wm-chart .component-wrapper .bar-segment:active.doughnut-segment,:host .component-wrapper .bar-segment:hover.doughnut-segment,wm-chart .component-wrapper .bar-segment:hover.doughnut-segment,:host .component-wrapper .bar-segment:focus.doughnut-segment,wm-chart .component-wrapper .bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,wm-chart .component-wrapper path::-moz-focus-inner,:host .component-wrapper .bar-segment::-moz-focus-inner,wm-chart .component-wrapper .bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut,wm-chart .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,wm-chart .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,wm-chart .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,wm-chart .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,wm-chart .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut3 label,wm-chart .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text,wm-chart .component-wrapper.doughnut3 .label-text{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 .component-wrapper.doughnut0,wm-chart .component-wrapper.doughnut0,:host .component-wrapper.doughnut,wm-chart .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,wm-chart .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label,wm-chart .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,wm-chart .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo,wm-chart .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .legend,wm-chart .component-wrapper.doughnut0 .legend,:host .component-wrapper.doughnut .legend,wm-chart .component-wrapper.doughnut .legend{display:-ms-flexbox;display:flex}:host .component-wrapper.doughnut0 .completion-message,wm-chart .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message,wm-chart .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,wm-chart .component-wrapper.bar1,:host .component-wrapper.bar,wm-chart .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,wm-chart .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-chart .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,wm-chart .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo,wm-chart .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .legend,wm-chart .component-wrapper.bar1 .legend,:host .component-wrapper.bar .legend,wm-chart .component-wrapper.bar .legend{display:none}:host .component-wrapper.bar1 .chart-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper,wm-chart .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,wm-chart .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc,wm-chart .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar1 .chart-wrapper .inner-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar .chart-wrapper .inner-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,wm-chart .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message,wm-chart .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,wm-chart .component-wrapper.bar1,:host .component-wrapper.bar,wm-chart .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,wm-chart .component-wrapper.bar1 label,:host .component-wrapper.bar label,wm-chart .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,wm-chart .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper,wm-chart .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,wm-chart .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc,wm-chart .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,wm-chart .component-wrapper.bar2,:host .component-wrapper.bar3,wm-chart .component-wrapper.bar3,:host .component-wrapper.bar4,wm-chart .component-wrapper.bar4,:host .component-wrapper.bar5,wm-chart .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-bar-wrapper,wm-chart .component-wrapper.bar2 .inner-bar-wrapper,:host .component-wrapper.bar4 .inner-bar-wrapper,wm-chart .component-wrapper.bar4 .inner-bar-wrapper,:host .component-wrapper.bar5 .inner-bar-wrapper,wm-chart .component-wrapper.bar5 .inner-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar2 .inner-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar4 .inner-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-bar-wrapper.show-values,wm-chart .component-wrapper.bar5 .inner-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .legend,wm-chart .component-wrapper.bar3 .legend{padding-bottom:1.25rem}:host .component-wrapper.bar3 .chart-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text,wm-chart .component-wrapper.bar3 .chart-wrapper .inner-bar-wrapper text{fill:#4a4a4a}:host .component-wrapper.bar3 .chart-wrapper .axis,wm-chart .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line,wm-chart .component-wrapper.bar3 .chart-wrapper .axis line{stroke:#eeedf4;stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text,wm-chart .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.left-label,wm-chart .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label,wm-chart .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host(:focus) .component-wrapper.user-is-tabbing .bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";export{u as wm_chart}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,a,r){function n(t){return t instanceof a?t:new a((function(e){e(t)}))}return new(a||(a=Promise))((function(a,i){function s(t){try{l(r.next(t))}catch(t){i(t)}}function o(t){try{l(r["throw"](t))}catch(t){i(t)}}function l(t){t.done?a(t.value):n(t.value).then(s,o)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return l([t,e])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:a.label++;return{value:s[1],done:false};case 5:a.label++;n=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1];i=s;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(s);break}if(i[2])a.ops.pop();a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t];n=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-a0c3ef16.system.js","./p-76ca7498.system.js"],(function(t){"use strict";var e,a,r,n,i,s;return{setters:[function(t){e=t.h},function(t){a=t.c;r=t.i;n=t.b;i=t.f;s=t.d}],execute:function(){t({a:_,b:z,c:S,d:c,e:E,g:D,h:b,r:B});var o={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca"};var l=t("t",{doughnut:{size:155,colors:[o.forest,"#bfbfbf"],thickness:.73,padding:25,isBar:false},doughnut0:{size:155,colors:[o.forest,"#bfbfbf"],thickness:.73,padding:25,isBar:false},doughnut1:{size:130,colors:[o.lavender,o.midnight,"#d4d4d4"],thickness:.5,padding:90,isBar:false},doughnut2:{size:130,colors:[o.cyan,o.salmon,"#d4d4d4"],thickness:.5,padding:90,isBar:false},doughnut3:{size:130,colors:[o.lavender,o.midnight,"#919834","#c177cf","#c16e00","#029af2","#2a6993"],thickness:.5,padding:90,isBar:false},bar:{size:350,colors:[o.forest,"#bfbfbf"],padding:0,isBar:true},bar1:{size:350,colors:[o.forest,"#bfbfbf"],padding:0,isBar:true},bar2:{size:400,colors:["#d4d4d4",o.sleet,o.cyan,o.salmon],padding:0,isBar:true},bar3:{size:300,colors:["#0d696e",o.cyan,"#8e4129",o.salmon],padding:0,isBar:true},bar4:{size:400,colors:["#d4d4d4",o.sleet,"#33a919"],padding:0,isBar:true},bar5:{size:400,colors:["#d4d4d4",o.lavender,o.midnight,"#919834","#c177cf","#c16e00","#029af2","#2a6993"],padding:0,isBar:true}});function c(t,e,a){return a?Math.round(t*100/e):Math.round(t*1e4/e)/100}function u(t,e){return t*360/e}function h(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function f(t,e,a,r){var n=h(t+t*e*Math.cos(Math.PI*a/180));var i=h(t+t*e*Math.sin(Math.PI*a/180));if(r!==undefined){var s=h(t+t*e*Math.cos(Math.PI*r/180));var o=h(t+t*e*Math.sin(Math.PI*r/180));return{x1:n,y1:i,x2:s,y2:o}}return{x:n,y:i}}function d(t,e,a,r,n){var i=h(n/2*t);return"A ".concat(i,", ").concat(i," 0 ").concat(e," ").concat(h(a),", ").concat(h(r))}function p(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var e=this.popoverEl.querySelector("button");e&&e.click()}}function v(t,e){if(this.popoverEl&&!this.isTabbing){e.coords={x:t.clientX,y:t.clientY};m.call(this,e)}}function g(t,e){if(this.popoverEl&&this.isTabbing){e.coords=n(t.target);m.call(this,e)}}function b(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;x.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;w.call(this);break;case"Tab":E.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function m(t){var e=this;if(!!this.popoverEl&&!!t.title&&!!t.text){this.popoverEl.popoverTitle=t.title;this.popoverEl.popoverText=t.text;this.popoverEl.buttonText=t.buttonText;this.popoverEl.coords=t.coords;this.popoverEl.sliceRef=t.sliceRef;window.setTimeout((function(){if(e.popoverEl){e.popoverEl.open=true}}),30);var a=s((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){this.popoverEl.open=false;return[2]}))}))}),10);document.addEventListener("scroll",(function(){a()}));var r=i(this.el);if(!!r){r.addEventListener("scroll",(function(){a()}))}}}function w(){var t=a(document.activeElement);var e=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;y.call(this,e)}function x(){if(this.sliceEls){var t=a(document.activeElement);var e=this.sliceEls.indexOf(t);if(e===-1){e=0}else if(e===0){e=this.sliceEls.length-1}else{e-=1}y.call(this,e)}}function y(t){var e=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;if(this.popoverEl){this.popoverEl.open=false}this.el.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();window.setTimeout((function(){if(e.popoverEl){e.popoverEl.open=true}}),10)}}function E(){var t=this;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){if(t.el){t.el.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}}),100)}function D(t){return __awaiter(this,void 0,void 0,(function(){var e,a;var r=this;return __generator(this,(function(n){this.slicesData=[];e=0;a=Array.from(this.el.children);this.total=a.reduce((function(t,e){return t+=parseInt(e.getAttribute("amount")||"0")}),0);a.forEach((function(n,i){var s=parseInt(n.getAttribute("amount")||"0");var o=c(s,r.total,true);var u=a[i===0?a.length-1:i-1];var h=c(parseInt(u.getAttribute("amount")||"0"),r.total,true);var f=a[i===a.length-1?0:i+1];var d=c(parseInt(f.getAttribute("amount")||"0"),r.total,true);var p=o<4;var v=h<5;var g=d<5;var b=p&&(v||g);var m=o===0&&s>0;if(m&&(d<8||h<8)){b=true}var w=t==="bar5"?r.notStartedColor?i:i+1:i;var x=l[t].colors[w];var y={amount:s,perc:o,legend:n.getAttribute("legend"),color:x||"#d4d4d4",offset:e,id:"".concat(r.uid,"-").concat(i+1),title:n.getAttribute("popover-title"),text:n.getAttribute("popover-text"),buttonText:n.getAttribute("popover-button-text"),sliceRef:n,inSmallCluster:b};e+=s;r.slicesData.push(y)}));return[2]}))}))}function k(t,e,a){var r=u(e,this.total)-90;var n=t/this.total*360;var i=r+n;var s=n>180?"1 1":"0 1";var o=n>180?"1 0":"0 0";var l=this.chartData.size/2;var c=this.chartData.thickness;var h=1;var p=a==="doughnut0"||a==="doughnut";var v=1.5;var g=p?2.25:3;if(n===360){i-=.01}var b=f(l,h,r+v,i);var m=f(l,c,r+g,i);var w="M ".concat(b.x1,", ").concat(b.y1," ");var x=d(h,s,b.x2,b.y2,this.chartData.size);var y=" L ".concat(m.x2,", ").concat(m.y2," ");var E=d(c,o,m.x1,m.y1,this.chartData.size);return w+x+y+E+" z"}function M(){return e("defs",null,e("filter",{id:"wmHoverDropShadow"},e("feGaussianBlur",{stdDeviation:"3"}),e("feOffset",{result:"offsetblur"}),e("feFlood",{"flood-color":"#333"}),e("feComposite",{operator:"in",in2:"offsetblur"}),e("feMerge",null,e("feMergeNode",null),e("feMergeNode",{in:"SourceGraphic"}))))}function z(t){var a=this;var r=this.chartData.size+this.chartData.padding;var n=t==="doughnut0"||t==="doughnut";return e("div",{class:"chart-wrapper doughnut-wrapper"},e("svg",{width:r+"px",height:r+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},M(),this.slicesData.map((function(e){return T.call(a,e,t)})),n?e("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},c(this.slicesData[0].amount,this.total,true)+"%"):e("g",{transform:"translate(".concat(this.chartData.padding/2,", ").concat(this.chartData.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},this.slicesData.map((function(t){return t.amount>0?I.call(a,t):""})))))}function T(t,a){var r=this;return e("g",{transform:"translate(".concat(this.chartData.padding/2,", ").concat(this.chartData.padding/2,")")},e("path",{id:t.id,class:"segment doughnut-segment",fill:t.amount?t.color:"transparent",d:k.call(this,t.amount,t.offset,a),onClick:function(e){return v.call(r,e,t)},onFocus:function(e){return g.call(r,e,t)},onKeyDown:function(t){return p.call(r,t)},role:"img","aria-label":t.legend}))}function I(t){if(!t.inSmallCluster){var a=u(t.offset+t.amount/2,this.total);var r=f(this.chartData.size/2,1.4,a-90),n=r.x,i=r.y;return e("text",{class:"value",x:n+"px",y:i+"px"},"".concat(t.perc>0?t.perc:"<1","%"))}}function _(t){var a=this;var r=t==="bar1"||t==="bar";return e("div",{class:"chart-wrapper bar-wrapper"},r?e("div",{class:"single-perc"},c(this.slicesData[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),e("div",{class:{"inner-bar-wrapper":true,"show-values":this.tempValueFormat==="percentage"||this.tempValueFormat==="amount"}},!r?e("div",{class:"values"},this.slicesData.map((function(t,e){return t.perc>0?a.renderBarText(t,e):""}))):"",e("div",{class:"bar-segments-wrapper"},this.slicesData.map((function(t,e){return A.call(a,t,e)}))),r?S.call(this):""))}function A(t,a){var r=this;var n=a!==this.slicesData.length-1;var i="calc(".concat(c(t.amount,this.total,false),"%").concat(n?" - 2px":"",")");return e("div",{class:"segment bar-segment ".concat(c(t.amount,this.total,false)===0?"zero":""),style:{backgroundColor:t.color,width:i},onClick:function(e){return v.call(r,e,t)},onFocus:function(e){return g.call(r,e,t)},onKeyDown:function(t){return p.call(r,t)}},e("span",{class:"sr-only"},t.legend))}function B(){if(this.showLegend){var t=this.slicesData.reduce((function(t,e){return t=e.inSmallCluster?true:t}),false);return e("div",{class:"legend-wrapper"},e("div",{class:"legend ".concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.total>0?this.slicesData.map((function(t){if(!!t.amount||!!t.legend){return e("div",{class:"legend-item"},e("div",{class:"legend-color",style:{"background-color":t.color}}),e("div",{class:"legend-text"},t.legend))}})):""),!this.chartData.isBar&&t?e("div",{class:"cluster-warning"},r.formatMessage({id:"chart.hiddenPercentages",defaultMessage:"Percentages smaller than 5% are not shown when too close to each other."}),e("br",null),r.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details."})):"")}}function S(){if(this.completionMessage){return e("div",{class:"completion-message"},this.completionMessage)}}}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,a,r){function n(t){return t instanceof a?t:new a((function(e){e(t)}))}return new(a||(a=Promise))((function(a,i){function s(t){try{l(r.next(t))}catch(t){i(t)}}function o(t){try{l(r["throw"](t))}catch(t){i(t)}}function l(t){t.done?a(t.value):n(t.value).then(s,o)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return l([t,e])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(a)try{if(r=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:a.label++;return{value:s[1],done:false};case 5:a.label++;n=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1];i=s;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(s);break}if(i[2])a.ops.pop();a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t];n=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-726b9452.system.js","./p-93f6326d.system.js"],(function(t){"use strict";var e,a,r,n,i,s;return{setters:[function(t){e=t.h},function(t){a=t.c;r=t.i;n=t.b;i=t.f;s=t.d}],execute:function(){t({a:_,b:z,c:S,d:c,e:E,g:D,h:b,r:B});var o={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca"};var l=t("t",{doughnut:{size:155,colors:[o.forest,"#bfbfbf"],thickness:.73,padding:25,isBar:false},doughnut0:{size:155,colors:[o.forest,"#bfbfbf"],thickness:.73,padding:25,isBar:false},doughnut1:{size:130,colors:[o.lavender,o.midnight,"#d4d4d4"],thickness:.5,padding:90,isBar:false},doughnut2:{size:130,colors:[o.cyan,o.salmon,"#d4d4d4"],thickness:.5,padding:90,isBar:false},doughnut3:{size:130,colors:[o.lavender,o.midnight,"#919834","#c177cf","#c16e00","#029af2","#2a6993"],thickness:.5,padding:90,isBar:false},bar:{size:350,colors:[o.forest,"#bfbfbf"],padding:0,isBar:true},bar1:{size:350,colors:[o.forest,"#bfbfbf"],padding:0,isBar:true},bar2:{size:400,colors:["#d4d4d4",o.sleet,o.cyan,o.salmon],padding:0,isBar:true},bar3:{size:300,colors:["#0d696e",o.cyan,"#8e4129",o.salmon],padding:0,isBar:true},bar4:{size:400,colors:["#d4d4d4",o.sleet,"#33a919"],padding:0,isBar:true},bar5:{size:400,colors:["#d4d4d4",o.lavender,o.midnight,"#919834","#c177cf","#c16e00","#029af2","#2a6993"],padding:0,isBar:true}});function c(t,e,a){return a?Math.round(t*100/e):Math.round(t*1e4/e)/100}function u(t,e){return t*360/e}function h(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function f(t,e,a,r){var n=h(t+t*e*Math.cos(Math.PI*a/180));var i=h(t+t*e*Math.sin(Math.PI*a/180));if(r!==undefined){var s=h(t+t*e*Math.cos(Math.PI*r/180));var o=h(t+t*e*Math.sin(Math.PI*r/180));return{x1:n,y1:i,x2:s,y2:o}}return{x:n,y:i}}function d(t,e,a,r,n){var i=h(n/2*t);return"A ".concat(i,", ").concat(i," 0 ").concat(e," ").concat(h(a),", ").concat(h(r))}function p(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var e=this.popoverEl.querySelector("button");e&&e.click()}}function v(t,e){if(this.popoverEl&&!this.isTabbing){e.coords={x:t.clientX,y:t.clientY};m.call(this,e)}}function g(t,e){if(this.popoverEl&&this.isTabbing){e.coords=n(t.target);m.call(this,e)}}function b(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;x.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;w.call(this);break;case"Tab":E.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function m(t){var e=this;if(!!this.popoverEl&&!!t.title&&!!t.text){this.popoverEl.popoverTitle=t.title;this.popoverEl.popoverText=t.text;this.popoverEl.buttonText=t.buttonText;this.popoverEl.coords=t.coords;this.popoverEl.sliceRef=t.sliceRef;window.setTimeout((function(){if(e.popoverEl){e.popoverEl.open=true}}),30);var a=s((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(t){this.popoverEl.open=false;return[2]}))}))}),10);document.addEventListener("scroll",(function(){a()}));var r=i(this.el);if(!!r){r.addEventListener("scroll",(function(){a()}))}}}function w(){var t=a(document.activeElement);var e=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;y.call(this,e)}function x(){if(this.sliceEls){var t=a(document.activeElement);var e=this.sliceEls.indexOf(t);if(e===-1){e=0}else if(e===0){e=this.sliceEls.length-1}else{e-=1}y.call(this,e)}}function y(t){var e=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;if(this.popoverEl){this.popoverEl.open=false}this.el.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();window.setTimeout((function(){if(e.popoverEl){e.popoverEl.open=true}}),10)}}function E(){var t=this;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){if(t.el){t.el.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}}),100)}function D(t){return __awaiter(this,void 0,void 0,(function(){var e,a;var r=this;return __generator(this,(function(n){this.slicesData=[];e=0;a=Array.from(this.el.children);this.total=a.reduce((function(t,e){return t+=parseInt(e.getAttribute("amount")||"0")}),0);a.forEach((function(n,i){var s=parseInt(n.getAttribute("amount")||"0");var o=c(s,r.total,true);var u=a[i===0?a.length-1:i-1];var h=c(parseInt(u.getAttribute("amount")||"0"),r.total,true);var f=a[i===a.length-1?0:i+1];var d=c(parseInt(f.getAttribute("amount")||"0"),r.total,true);var p=o<4;var v=h<5;var g=d<5;var b=p&&(v||g);var m=o===0&&s>0;if(m&&(d<8||h<8)){b=true}var w=t==="bar5"?r.notStartedColor?i:i+1:i;var x=l[t].colors[w];var y={amount:s,perc:o,legend:n.getAttribute("legend"),color:x||"#d4d4d4",offset:e,id:"".concat(r.uid,"-").concat(i+1),title:n.getAttribute("popover-title"),text:n.getAttribute("popover-text"),buttonText:n.getAttribute("popover-button-text"),sliceRef:n,inSmallCluster:b};e+=s;r.slicesData.push(y)}));return[2]}))}))}function k(t,e,a){var r=u(e,this.total)-90;var n=t/this.total*360;var i=r+n;var s=n>180?"1 1":"0 1";var o=n>180?"1 0":"0 0";var l=this.chartData.size/2;var c=this.chartData.thickness;var h=1;var p=a==="doughnut0"||a==="doughnut";var v=1.5;var g=p?2.25:3;if(n===360){i-=.01}var b=f(l,h,r+v,i);var m=f(l,c,r+g,i);var w="M ".concat(b.x1,", ").concat(b.y1," ");var x=d(h,s,b.x2,b.y2,this.chartData.size);var y=" L ".concat(m.x2,", ").concat(m.y2," ");var E=d(c,o,m.x1,m.y1,this.chartData.size);return w+x+y+E+" z"}function M(){return e("defs",null,e("filter",{id:"wmHoverDropShadow"},e("feGaussianBlur",{stdDeviation:"3"}),e("feOffset",{result:"offsetblur"}),e("feFlood",{"flood-color":"#333"}),e("feComposite",{operator:"in",in2:"offsetblur"}),e("feMerge",null,e("feMergeNode",null),e("feMergeNode",{in:"SourceGraphic"}))))}function z(t){var a=this;var r=this.chartData.size+this.chartData.padding;var n=t==="doughnut0"||t==="doughnut";return e("div",{class:"chart-wrapper doughnut-wrapper"},e("svg",{width:r+"px",height:r+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},M(),this.slicesData.map((function(e){return T.call(a,e,t)})),n?e("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},c(this.slicesData[0].amount,this.total,true)+"%"):e("g",{transform:"translate(".concat(this.chartData.padding/2,", ").concat(this.chartData.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},this.slicesData.map((function(t){return t.amount>0?I.call(a,t):""})))))}function T(t,a){var r=this;return e("g",{transform:"translate(".concat(this.chartData.padding/2,", ").concat(this.chartData.padding/2,")")},e("path",{id:t.id,class:"segment doughnut-segment",fill:t.amount?t.color:"transparent",d:k.call(this,t.amount,t.offset,a),onClick:function(e){return v.call(r,e,t)},onFocus:function(e){return g.call(r,e,t)},onKeyDown:function(t){return p.call(r,t)},role:"img","aria-label":t.legend}))}function I(t){if(!t.inSmallCluster){var a=u(t.offset+t.amount/2,this.total);var r=f(this.chartData.size/2,1.4,a-90),n=r.x,i=r.y;return e("text",{class:"value",x:n+"px",y:i+"px"},"".concat(t.perc>0?t.perc:"<1","%"))}}function _(t){var a=this;var r=t==="bar1"||t==="bar";return e("div",{class:"chart-wrapper bar-wrapper"},r?e("div",{class:"single-perc"},c(this.slicesData[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),e("div",{class:{"inner-bar-wrapper":true,"show-values":this.tempValueFormat==="percentage"||this.tempValueFormat==="amount"}},!r?e("div",{class:"values"},this.slicesData.map((function(t,e){return t.perc>0?a.renderBarText(t,e):""}))):"",e("div",{class:"bar-segments-wrapper"},this.slicesData.map((function(t,e){return A.call(a,t,e)}))),r?S.call(this):""))}function A(t,a){var r=this;var n=a!==this.slicesData.length-1;var i="calc(".concat(c(t.amount,this.total,false),"%").concat(n?" - 2px":"",")");return e("div",{class:"segment bar-segment ".concat(c(t.amount,this.total,false)===0?"zero":""),style:{backgroundColor:t.color,width:i},onClick:function(e){return v.call(r,e,t)},onFocus:function(e){return g.call(r,e,t)},onKeyDown:function(t){return p.call(r,t)}},e("span",{class:"sr-only"},t.legend))}function B(){if(this.showLegend){var t=this.slicesData.reduce((function(t,e){return t=e.inSmallCluster?true:t}),false);return e("div",{class:"legend-wrapper"},e("div",{class:"legend ".concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.total>0?this.slicesData.map((function(t){if(!!t.amount||!!t.legend){return e("div",{class:"legend-item"},e("div",{class:"legend-color",style:{"background-color":t.color}}),e("div",{class:"legend-text"},t.legend))}})):""),!this.chartData.isBar&&t?e("div",{class:"cluster-warning"},r.formatMessage({id:"chart.hiddenPercentages",defaultMessage:"Percentages smaller than 5% are not shown when too close to each other."}),e("br",null),r.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details."})):"")}}function S(){if(this.completionMessage){return e("div",{class:"completion-message"},this.completionMessage)}}}}}));
|