@watermarkinsights/ripple 3.12.0 → 3.13.0-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chartFunctions-44ae2eee.js → chartFunctions-34fdd3ce.js} +1 -1
- package/dist/cjs/{functions-1a67b971.js → functions-120449cf.js} +245 -32
- package/dist/cjs/{global-122fc638.js → global-1d1d0ab3.js} +7 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
- package/dist/cjs/priv-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/ripple.cjs.js +2 -2
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/wm-button.cjs.entry.js +50 -38
- package/dist/cjs/wm-chart.cjs.entry.js +2 -2
- package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-input.cjs.entry.js +1 -1
- package/dist/cjs/wm-modal-footer.cjs.entry.js +1 -1
- package/dist/cjs/wm-modal-header.cjs.entry.js +1 -1
- package/dist/cjs/wm-modal.cjs.entry.js +1 -1
- package/dist/cjs/wm-navigation_3.cjs.entry.js +1 -1
- package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
- package/dist/cjs/wm-network-uploader.cjs.entry.js +6 -4
- package/dist/cjs/wm-option_2.cjs.entry.js +345 -122
- package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-search.cjs.entry.js +1 -1
- package/dist/cjs/wm-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
- package/dist/cjs/wm-tag-input.cjs.entry.js +1 -1
- package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-toggletip.cjs.entry.js +4 -4
- package/dist/cjs/wm-uploader.cjs.entry.js +9 -11
- package/dist/collection/components/wm-button/wm-button.css +1 -0
- package/dist/collection/components/wm-button/wm-button.js +50 -40
- package/dist/collection/components/wm-modal/wm-modal-footer.js +1 -1
- package/dist/collection/components/wm-option/wm-option.css +12 -0
- package/dist/collection/components/wm-option/wm-option.js +34 -29
- package/dist/collection/components/wm-select/wm-select.css +76 -23
- package/dist/collection/components/wm-select/wm-select.js +385 -125
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +5 -5
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +0 -3
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +4 -2
- package/dist/collection/components/wm-uploader/wm-uploader.css +1 -5
- package/dist/collection/components/wm-uploader/wm-uploader.js +7 -9
- package/dist/collection/global/__mocks__/functions.js +9 -0
- package/dist/collection/global/functions.js +1 -28
- package/dist/collection/global/global.js +6 -4
- package/dist/esm/{chartFunctions-8fa800a6.js → chartFunctions-20f05eb5.js} +1 -1
- package/dist/esm/{functions-61c7bb1f.js → functions-036af8dc.js} +245 -32
- package/dist/esm/{global-5902ef31.js → global-590c515d.js} +7 -5
- package/dist/esm/loader.js +2 -2
- package/dist/esm/priv-chart-popover.entry.js +1 -1
- package/dist/esm/priv-datepicker.entry.js +1 -1
- package/dist/esm/ripple.js +2 -2
- package/dist/esm/wm-action-menu_2.entry.js +1 -1
- package/dist/esm/wm-button.entry.js +51 -39
- package/dist/esm/wm-chart.entry.js +2 -2
- package/dist/esm/wm-datepicker.entry.js +1 -1
- package/dist/esm/wm-input.entry.js +1 -1
- package/dist/esm/wm-modal-footer.entry.js +1 -1
- package/dist/esm/wm-modal-header.entry.js +1 -1
- package/dist/esm/wm-modal.entry.js +1 -1
- package/dist/esm/wm-navigation_3.entry.js +1 -1
- package/dist/esm/wm-navigator.entry.js +1 -1
- package/dist/esm/wm-network-uploader.entry.js +6 -4
- package/dist/esm/wm-option_2.entry.js +345 -122
- package/dist/esm/wm-pagination.entry.js +1 -1
- package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
- package/dist/esm/wm-search.entry.js +1 -1
- package/dist/esm/wm-snackbar.entry.js +1 -1
- package/dist/esm/wm-tab-item_3.entry.js +1 -1
- package/dist/esm/wm-tag-input.entry.js +1 -1
- package/dist/esm/wm-timepicker.entry.js +1 -1
- package/dist/esm/wm-toggletip.entry.js +4 -4
- package/dist/esm/wm-uploader.entry.js +9 -11
- package/dist/esm-es5/{chartFunctions-8fa800a6.js → chartFunctions-20f05eb5.js} +1 -1
- package/dist/esm-es5/{functions-61c7bb1f.js → functions-036af8dc.js} +2 -2
- package/dist/esm-es5/global-590c515d.js +1 -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/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.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/ripple/{p-28bf6a2e.system.js → p-04d8b674.system.js} +1 -1
- package/dist/ripple/{p-d3ed8b65.system.entry.js → p-04e44b30.system.entry.js} +1 -1
- package/dist/ripple/{p-fdc4a599.system.entry.js → p-0556279c.system.entry.js} +1 -1
- package/dist/ripple/{p-1242752c.system.entry.js → p-06adbeb9.system.entry.js} +1 -1
- package/dist/ripple/{p-42aa51fe.system.entry.js → p-0e9ccc6f.system.entry.js} +1 -1
- package/dist/ripple/{p-520b0f54.entry.js → p-17ceb8c1.entry.js} +1 -1
- package/dist/ripple/{p-8caae464.entry.js → p-1887286e.entry.js} +1 -1
- package/dist/ripple/{p-c873b490.system.entry.js → p-1ccd994d.system.entry.js} +1 -1
- package/dist/ripple/p-1d795f42.entry.js +1 -0
- package/dist/ripple/p-2996bfe6.entry.js +1 -0
- package/dist/ripple/{p-30745db6.entry.js → p-2f860b24.entry.js} +1 -1
- package/dist/ripple/p-3489b502.js +1 -0
- package/dist/ripple/{p-cd4fda75.entry.js → p-3680b55d.entry.js} +1 -1
- package/dist/ripple/p-3745c620.system.js +1 -0
- package/dist/ripple/{p-f12a510f.entry.js → p-3a1d6fc4.entry.js} +1 -1
- package/dist/ripple/p-42337590.entry.js +1 -0
- package/dist/ripple/{p-68155230.system.entry.js → p-49fd7ede.system.entry.js} +1 -1
- package/dist/ripple/{p-8aa9f811.js → p-4ecd3430.js} +1 -1
- package/dist/ripple/{p-5471864e.system.entry.js → p-62eac2d6.system.entry.js} +1 -1
- package/dist/ripple/{p-5e041c35.entry.js → p-6aa6a818.entry.js} +1 -1
- package/dist/ripple/{p-487f7419.system.entry.js → p-6bf5cbf4.system.entry.js} +1 -1
- package/dist/ripple/{p-e180001c.system.entry.js → p-7173b0a7.system.entry.js} +1 -1
- package/dist/ripple/p-726c979a.system.js +15 -0
- package/dist/ripple/{p-eacd33cc.system.entry.js → p-752da0fb.system.entry.js} +1 -1
- package/dist/ripple/{p-f36b74bf.entry.js → p-7ae1a630.entry.js} +1 -1
- package/dist/ripple/{p-8d347cd5.entry.js → p-7ecbf258.entry.js} +1 -1
- package/dist/ripple/{p-75ef731b.system.entry.js → p-7ef6a7cf.system.entry.js} +1 -1
- package/dist/ripple/p-8612829b.system.entry.js +1 -0
- package/dist/ripple/{p-398b2486.system.entry.js → p-895f5ec5.system.entry.js} +1 -1
- package/dist/ripple/{p-d3603def.entry.js → p-8de546e8.entry.js} +1 -1
- package/dist/ripple/{p-35cfcf9f.entry.js → p-93dee724.entry.js} +1 -1
- package/dist/ripple/{p-0f33461d.entry.js → p-97c2b06f.entry.js} +1 -1
- package/dist/ripple/{p-9f12284b.system.entry.js → p-995ba16f.system.entry.js} +1 -1
- package/dist/ripple/p-9c92c93f.entry.js +1 -0
- package/dist/ripple/p-9e09d7a1.entry.js +1 -0
- package/dist/ripple/{p-f0656464.entry.js → p-a04ba6c8.entry.js} +1 -1
- package/dist/ripple/{p-44035b02.system.entry.js → p-af3ce4fc.system.entry.js} +1 -1
- package/dist/ripple/p-bbcafbd6.system.entry.js +1 -0
- package/dist/ripple/{p-eee347b4.system.entry.js → p-c1443a0e.system.entry.js} +1 -1
- package/dist/ripple/{p-212aac05.system.entry.js → p-ca383a43.system.entry.js} +1 -1
- package/dist/ripple/{p-ca2fbd1b.system.js → p-cc247ee1.system.js} +1 -1
- package/dist/ripple/{p-73d66b0a.system.entry.js → p-cd3d74d1.system.entry.js} +1 -1
- package/dist/ripple/p-d1ac96e1.system.entry.js +1 -0
- package/dist/ripple/{p-3f1d8211.system.entry.js → p-d48c56c7.system.entry.js} +1 -1
- package/dist/ripple/{p-15b1c11b.js → p-de3367ee.js} +2 -2
- package/dist/ripple/{p-e748e22b.entry.js → p-e083fca6.entry.js} +1 -1
- package/dist/ripple/{p-3e6498ea.system.entry.js → p-e4439bc3.system.entry.js} +1 -1
- package/dist/ripple/{p-e49b9a96.entry.js → p-e524d462.entry.js} +1 -1
- package/dist/ripple/{p-92226595.entry.js → p-e8d39f68.entry.js} +1 -1
- package/dist/ripple/{p-00fa3d4b.entry.js → p-ed91be1a.entry.js} +1 -1
- package/dist/ripple/{p-d81a4e7c.system.entry.js → p-f23b3986.system.entry.js} +1 -1
- package/dist/ripple/{p-e75e75e0.entry.js → p-fda61e7e.entry.js} +1 -1
- package/dist/ripple/p-fe952112.entry.js +1 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/wm-button/wm-button.d.ts +4 -4
- package/dist/types/components/wm-option/wm-option.d.ts +5 -2
- package/dist/types/components/wm-select/wm-select.d.ts +39 -12
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +2 -2
- package/dist/types/components.d.ts +10 -6
- package/dist/types/global/__mocks__/functions.d.ts +1 -0
- package/dist/types/global/functions.d.ts +2 -2
- package/dist/types/global/interfaces.d.ts +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/global-5902ef31.js +0 -1
- package/dist/ripple/p-1b058a44.entry.js +0 -1
- package/dist/ripple/p-2077203e.system.js +0 -1
- package/dist/ripple/p-379b125b.entry.js +0 -1
- package/dist/ripple/p-49bf0b81.js +0 -1
- package/dist/ripple/p-584fef7f.system.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-9fe64cec.entry.js +0 -1
- package/dist/ripple/p-a82d37d8.entry.js +0 -1
- package/dist/ripple/p-ac2485a6.system.entry.js +0 -1
- package/dist/ripple/p-ba168596.entry.js +0 -1
- package/dist/ripple/p-ed657559.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,f as forceUpdate,h,H as Host,g as getElement}from"./index-7603f98e.js";import{g as generateId,d as debounce,i as intl,p as hasValidType}from"./functions-61c7bb1f.js";var wmUploaderCss=':host .wm-button,wm-uploader .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:inherit;border:2px solid #575195;color:#575195;font-family:inherit;font-size:0.75rem;font-weight:700;height:2.75rem;padding:0 1.3333333333em;cursor:pointer;position:relative;background:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button,wm-uploader .wm-button{height:3.3333333333em}}:host .wm-button.nowrap,wm-uploader .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,wm-uploader .wm-button:focus{outline:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner,wm-uploader .wm-button::-moz-focus-inner{border:0;outline:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) :host .wm-button.-textonly .button-text,wm-uploader .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) :host .wm-button.-textonly .button-text,:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) wm-uploader .wm-button.-textonly .button-text,wm-uploader .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) wm-uploader .wm-button.-textonly .button-text{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 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled),wm-uploader .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark),wm-uploader .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark){-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 .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner,wm-uploader .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled),wm-uploader .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled){background:transparent;border:2px solid #fff;color:#fff}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover,wm-uploader .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark,wm-uploader .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-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 #c6b4e3;-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 #c6b4e3;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 #c6b4e3;outline:none}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption),wm-uploader .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-button .mdi,wm-uploader .wm-button .mdi{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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi,wm-uploader .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi,wm-uploader .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly),wm-uploader .wm-button.-primary:not(.-textonly){background:#575195;color:#fff}:host .wm-button.-primary:not(.-textonly):not(:focus),wm-uploader .wm-button.-primary:not(.-textonly):not(:focus){-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)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:#464177}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled),wm-uploader .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:#575195;background:#fff;border:2px solid #fff}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover,wm-uploader .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-secondary:hover:not(:disabled):not(.disabled),:host .wm-button.-icononly:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:#464177;color:#fff}:host .wm-button.-textonly,wm-uploader .wm-button.-textonly{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1}:host .wm-button.-textonly+.-textonly,wm-uploader .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus,wm-uploader .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner,wm-uploader .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text,wm-uploader .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{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 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text,wm-uploader .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, #fff), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #fff 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small,wm-uploader .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete),wm-uploader .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete,wm-uploader .wm-button.-textonly.-permanentlydelete{color:#c0392b}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark),wm-uploader .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline;color:#c0392b !important}:host .wm-button.-textonly.dark,wm-uploader .wm-button.-textonly.dark{color:#fff}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline;color:#fff !important}:host .wm-button.-icononly,wm-uploader .wm-button.-icononly,:host .wm-button.-navigational,wm-uploader .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),wm-uploader .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus),wm-uploader .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,wm-uploader .wm-button.-icononly,:host .wm-button.-navigational,wm-uploader .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly,wm-uploader .wm-button.-icononly{border-width:1px !important}:host .wm-button.-icononly:before,wm-uploader .wm-button.-icononly: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}:host .wm-button.-navigational,wm-uploader .wm-button.-navigational{border:none !important;background-color:transparent}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled),wm-uploader .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:#575195}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,wm-uploader .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected,wm-uploader .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:#d7d6d9}:host .wm-button.-navigational:before,wm-uploader .wm-button.-navigational: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}:host .wm-button.-permanentlydelete:not(.-textonly),wm-uploader .wm-button.-permanentlydelete:not(.-textonly){background:#c0392b;border-color:#c0392b;color:#fff}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark),wm-uploader .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:#9a2e22;border-color:#9a2e22}:host .wm-button.-pairnegative,wm-uploader .wm-button.-pairnegative{background:#cc4c3e;border-color:#cc4c3e;color:#fff}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:#a33d32;border-color:#a33d32}:host .wm-button.-pairpositive,wm-uploader .wm-button.-pairpositive{background:#15868d;border-color:#15868d;color:#fff}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:#116b71;border-color:#116b71}:host .wm-button.-selectoronly,wm-uploader .wm-button.-selectoronly{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;background:transparent;border:1px solid #575195;border-radius:3px 3px 3px 3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;color:#575195;font-weight:500;font-size:0.875rem;text-transform:none;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selectoronly,wm-uploader .wm-button.-selectoronly{height:2.5rem}}:host .wm-button.-selectoronly:before,wm-uploader .wm-button.-selectoronly: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;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}:host .wm-button.-selectoronly:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-selectoronly:hover:not(:disabled):not(.disabled){background:transparent;text-decoration:none}:host .wm-button.-selectoronly:active,wm-uploader .wm-button.-selectoronly:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selectoronly::-moz-focus-inner,wm-uploader .wm-button.-selectoronly::-moz-focus-inner{border:0}:host .wm-button.-selectoronly .overflowcontrol,wm-uploader .wm-button.-selectoronly .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button:disabled,wm-uploader .wm-button:disabled,:host .wm-button.disabled,wm-uploader .wm-button.disabled{background:inherit;border-color:#737373;color:#737373;cursor:default;pointer-events:none}:host .wm-button:disabled.-primary,wm-uploader .wm-button:disabled.-primary,:host .wm-button:disabled.-permanentlydelete,wm-uploader .wm-button:disabled.-permanentlydelete,:host .wm-button:disabled.-pairnegative,wm-uploader .wm-button:disabled.-pairnegative,:host .wm-button:disabled.-pairpositive,wm-uploader .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-primary,wm-uploader .wm-button.disabled.-primary,:host .wm-button.disabled.-permanentlydelete,wm-uploader .wm-button.disabled.-permanentlydelete,:host .wm-button.disabled.-pairnegative,wm-uploader .wm-button.disabled.-pairnegative,:host .wm-button.disabled.-pairpositive,wm-uploader .wm-button.disabled.-pairpositive{background:#737373;color:#fff;border-color:#737373}:host .wm-button:disabled.-secondary,wm-uploader .wm-button:disabled.-secondary,:host .wm-button.disabled.-secondary,wm-uploader .wm-button.disabled.-secondary{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button:disabled.-selectoronly,wm-uploader .wm-button:disabled.-selectoronly,:host .wm-button.disabled.-selectoronly,wm-uploader .wm-button.disabled.-selectoronly{color:#737373}:host .wm-button:disabled.-textonly,wm-uploader .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly,wm-uploader .wm-button.disabled.-textonly{color:#6b6b6b;background:transparent}:host .wm-button:disabled.dark.-secondary:not(.-permanentlydelete),wm-uploader .wm-button:disabled.dark.-secondary:not(.-permanentlydelete),:host .wm-button:disabled.dark.-textonly,wm-uploader .wm-button:disabled.dark.-textonly,:host .wm-button:disabled.dark.-navigational,wm-uploader .wm-button:disabled.dark.-navigational,:host .wm-button:disabled.dark.-icononly,wm-uploader .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-secondary:not(.-permanentlydelete),wm-uploader .wm-button.disabled.dark.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.dark.-textonly,wm-uploader .wm-button.disabled.dark.-textonly,:host .wm-button.disabled.dark.-navigational,wm-uploader .wm-button.disabled.dark.-navigational,:host .wm-button.disabled.dark.-icononly,wm-uploader .wm-button.disabled.dark.-icononly{color:#b5b5b5;border-color:#b5b5b5}:host .wm-button:disabled.dark.-primary,wm-uploader .wm-button:disabled.dark.-primary,:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),wm-uploader .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-primary,wm-uploader .wm-button.disabled.dark.-primary,:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly),wm-uploader .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:#a6a6a6;border-color:#a6a6a6;color:#353b48}:host a.wm-button,wm-uploader a.wm-button,:host label.wm-button,wm-uploader label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host,wm-uploader{width:100%;height:100%;display:block;position:relative;max-width:1140px}:host[dir=RTL] .mdi,wm-uploader[dir=RTL] .mdi{margin-left:0.3125rem;margin-right:0}:host input:focus+.wm-button.user-is-tabbing,wm-uploader input:focus+.wm-button.user-is-tabbing{-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 !important;-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 !important;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 !important}:host *,wm-uploader *{-webkit-box-sizing:border-box;box-sizing:border-box}.wm-button.disabled{pointer-events:initial !important}.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}.header{margin-bottom:2.5rem}.header.type1,.header.type2{margin-bottom:1rem}.header .slot-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:start;align-items:flex-start}.header .info-wrapper{-ms-flex-align:center;align-items:center}.header .info-wrapper .info{font-size:0.875rem;margin-left:1rem}.header .accepted-types{font-size:0.875rem}.header .requirements{font-size:0.875rem;margin-left:1rem}.footer{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;padding:0.9375rem 1.875rem}.footer .notif-wrapper{-ms-flex-align:end;align-items:flex-end}.footer .filecount-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.footer .filecount-wrapper .filecount{font-size:0.875rem;margin-right:1rem}.notif-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin-bottom:0.75rem}.notif-wrapper.type1,.notif-wrapper.type2{-ms-flex-direction:column;flex-direction:column;margin-bottom:1rem}.notif-wrapper .requirements{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.notif{padding-top:0.25rem;font-size:0.875rem;font-style:italic;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.notif.error{color:#c0392b}.info-wrapper{position:relative;display:-ms-flexbox;display:flex}.name-wrapper{overflow:hidden}.name-wrapper+.file-controls{-ms-flex:none;flex:none;margin-left:1rem}.empty-block{margin:5rem auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.empty-block .upload-file{margin-bottom:1.875rem}.empty-block .empty-message{font-size:0.875rem;margin-bottom:0.4375rem}.empty-block .empty-message.large{font-size:1.5rem}.empty-block .info-wrapper{-ms-flex-pack:center;justify-content:center;width:100%}.empty-block .info-wrapper .wm-button{width:auto}.list-container{overflow-y:unset}.list-container.checkmark-spacer{margin-right:2.75rem}.list-container.type1,.list-container.type2{overflow-y:auto}.list-container.type1 ul,.list-container.type2 ul{margin:revert}.list-container.type1 .file-list li,.list-container.type1 .inprogress-list li,.list-container.type2 .file-list li,.list-container.type2 .inprogress-list li{margin-bottom:1.625rem}.list-container.type1 .error-list li,.list-container.type2 .error-list li{margin-bottom:1.25rem}.list-container.type1{padding:0 1.875rem;height:16.25rem}ul{list-style:none;padding:0;width:100%;margin:0}ul li{position:relative;font-size:0.875rem;margin-bottom:0.5rem}ul li .file{min-width:300px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:relative;height:3.5rem;padding:0.5rem 1.25rem;background:#f4f4f4;border:1px solid #6b6b6b;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}ul li .file+.file{margin-top:1.25rem}ul li .file .filename{font-weight:500;white-space:nowrap}ul li .file .left-group{overflow:hidden}ul li .file .right-group{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:5rem}ul li .file .right-group .file-controls{display:-ms-flexbox;display:flex}ul li .file .right-group .file-info{white-space:nowrap;margin-right:1rem}ul li .file wm-button+wm-button{margin-left:1rem}ul li.condensed .right-group{padding-left:2.5rem}ul li.checked .file:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f133";position:absolute;right:-44px;color:#088000;font-size:28px;line-height:1}ul .progress{position:absolute;left:0;top:0;right:0;height:8px}ul.file-list li,ul.inprogress-list li{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ul.file-list li .file,ul.inprogress-list li .file{-ms-flex:1;flex:1}ul.error-list li{margin-bottom:0.5rem;color:#c0392b}ul.error-list li .file{border:1px solid #c0392b;background-color:#f5ebea;height:3.75rem}ul.error-list li .error-message{padding-top:0.25rem;font-style:italic}.ch-measure{width:1ch !important}';var Uploader=function(){function e(e){var t=this;registerInstance(this,e);this.wmUploaderFilesSelected=createEvent(this,"wmUploaderFilesSelected",7);this.wmFilesSelected=createEvent(this,"wmFilesSelected",7);this.wmUploaderDeleteFile=createEvent(this,"wmUploaderDeleteFile",7);this.wmDeleteFile=createEvent(this,"wmDeleteFile",7);this.wmUploaderDownloadFile=createEvent(this,"wmUploaderDownloadFile",7);this.wmDownloadFile=createEvent(this,"wmDownloadFile",7);this.wmUploaderPreviewFile=createEvent(this,"wmUploaderPreviewFile",7);this.fileTypes="pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv";this.defaultMaxSize=100;this.maxSize=this.defaultMaxSize;this.sortBy="date";this.showInfo="time";this.fileList=[];this.filesToUpload=[];this.isTabbing=false;this.errorList=[];this.isCondensed=false;this.inputId=generateId();this.debouncedResize=debounce((function(){t.isCondensed=t.el.clientWidth<500;forceUpdate(t.el)}),50)}Object.defineProperty(e.prototype,"tooltipEl",{get:function(){return document.getElementById("wm-tooltip")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"uploadButtonEl",{get:function(){return this.el.shadowRoot.querySelector("#".concat(this.inputId))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempUploaderType",{get:function(){return this.type||this.uploaderType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chMeasure",{get:function(){return this.el.shadowRoot.querySelector(".ch-measure").clientWidth},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"fileLimitReached",{get:function(){return this.maxFiles&&this.fileList.length>=this.maxFiles},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"fileUploadLimitMessage",{get:function(){return intl.formatMessage({id:"uploader.fileUploadLimit",defaultMessage:"Maximum number of files reached",description:"Message displayed when reaching the file upload limit"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"fileCountMessage",{get:function(){return this.fileLimitReached?this.fileUploadLimitMessage:intl.formatMessage({id:"uploader.fileCount",defaultMessage:"{x} of {y} Files",description:"A count of the number of files currently uploaded"},{x:this.fileList.length,y:this.maxFiles})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"maxSizeMessage",{get:function(){return intl.formatMessage({id:"uploader.maxSize",defaultMessage:"Maximum file size {maxSize}MB",description:"An indicator of the maximum file size the uploader allows"},{maxSize:this.maxSize})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"acceptedFileTypesMessage",{get:function(){var e="."+this.fileTypes.split(" ").join(", .");return intl.formatMessage({id:"uploader.acceptedFileTypes",defaultMessage:"Accepted file {amount, plural, =1 {type} other {types}}: {fileTypes}"},{fileTypes:e,amount:this.fileTypes.split(" ").length})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewActionMessage",{get:function(){return intl.formatMessage({id:"uploader.previewAction",defaultMessage:"Preview File",description:"Label of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadActionMessage",{get:function(){return intl.formatMessage({id:"uploader.downloadAction",defaultMessage:"Download File",description:"Label of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteActionMessage",{get:function(){return intl.formatMessage({id:"uploader.deleteAction",defaultMessage:"Delete File",description:"Label of a button that triggers a file to be delete"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clearButtonText",{get:function(){return intl.formatMessage({id:"uploader.clearErrorText",defaultMessage:"Clear",description:"Text for a button used to clear an error"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"actionMenuLabel",{get:function(){return intl.formatMessage({id:"uploader.actionMenuLabel",defaultMessage:"Actions",description:"Label of a button that opens a menu of file actions"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleUploadProgress=function(e){var t=this;this.fileList.map((function(o){if(o.id===e.detail.id){o.progress=e.detail.progress;forceUpdate(t.el)}}));if(e.detail.progress===100){this.numFilesInProgress-=1}if(!this.srProgress&&this.numFilesInProgress){var o=this.numFilesInProgress;this.srProgress=setInterval((function(){var e=t.fileList.reduce((function(e,t){return t.progress?e+t.progress:e}),0);if(t.liveRegion){t.liveRegion.innerHTML=intl.formatMessage({id:"uploader.uploadProgress",defaultMessage:"Upload progress: {percentage}%"},{percentage:Math.floor(e/o)})}}),5e3)}};e.prototype.parseFiles=function(){if(!!this.files){if(typeof this.files==="string"){var e=JSON.parse(this.files);if(typeof e==="object"){this.fileList=e}else{throw new Error("could not parse string passed to files attribute")}}else{throw new Error("Attribute 'files' should be a string")}}};e.prototype.parseRejectedFiles=function(){if(!!this.rejectedFiles){if(typeof this.files==="string"){var e=JSON.parse(this.rejectedFiles);if(typeof e==="object"){this.errorList=e}else{throw new Error("could not parse string passed to errors attribute")}}else{throw new Error("Attribute 'rejected-files' should be a string")}}};e.prototype.setMaxSize=function(){this.maxSize=this.maxSize>this.defaultMaxSize?this.defaultMaxSize:this.maxSize};e.prototype.uploadNotifications=function(e,t){var o=this;if(t>0&&e===0){setTimeout((function(){o.notif=null}),20*1e3);var i=intl.formatMessage({id:"uploader.finishedUploading",defaultMessage:"Finished uploading"});this.notif={id:5,message:i,isError:false};if(this.liveRegion){this.liveRegion.innerHTML=i}this.numFilesInProgress=null;clearInterval(this.srProgress);forceUpdate(this.el)}else if(e>0&&e!=t){var i=intl.formatMessage({id:"uploader.filesUploading",defaultMessage:"{num, plural, one {1 file uploading} other {# files uploading}}"},{num:e});this.notif={id:6,message:i,isError:false};if(this.liveRegion){this.liveRegion.innerHTML=i}forceUpdate(this.el)}};e.prototype.isValidSize=function(e){return this.convertBytes(e,"MB").size<=this.maxSize};e.prototype.convertBytes=function(e,t){var o=["bytes","KB","MB","GB","TB"];var i=0;var n=typeof e==="number"?e:parseInt(e);if(t){while(o.indexOf(t)>i){n/=1024;i++}}else{while(n>1e3){n/=1024;i++}}return{size:n,unit:o[i]}};e.prototype.isDuplicate=function(e){return this.fileList.find((function(t){var o=t.type?t.name+"."+t.type:t.name;return o===e}))};e.prototype.isEmpty=function(){return!this.fileList.length&&!this.errorList.length};Object.defineProperty(e.prototype,"isDisabled",{get:function(){if(!this.notif){if(this.fileLimitReached){var e=this.fileUploadLimitMessage;this.notif={id:1,message:e,isError:true};if(this.liveRegion){this.liveRegion.innerHTML=e}}else{this.notif=null}}else if(this.notif.id===1){if(!this.fileLimitReached){this.notif=null}}return this.fileLimitReached||this.numFilesInProgress>0},enumerable:false,configurable:true});e.prototype.isItemUploading=function(e){return e.hasOwnProperty("progress")&&e.progress<100};e.prototype.clearError=function(e){this.errorList=this.errorList.filter((function(t){return t.name!=e}));this.notif=null};e.prototype.clearErrors=function(){this.errorList=[];this.notif=null};e.prototype.handleFiles=function(e){var t=this;this.filesToUpload=[];var o=this.fileTypes.split(" ").join(", ");var i=Array.from(e.target.files);if(!!this.maxFiles&&this.fileList.length+i.length>this.maxFiles){var n=intl.formatMessage({id:"uploader.fileUploadExceeded",defaultMessage:"The number of selected files exceeds the limit."});this.notif={id:2,message:n,isError:true};if(this.liveRegion){this.liveRegion.innerHTML=n}}else{i&&i.map((function(e){if(!hasValidType(e,t.fileTypes)){var i={name:e.name,message:intl.formatMessage({id:"uploader.invalidFileType",defaultMessage:"The file type is invalid. Accepted types: {validTypes}"},{validTypes:o})};t.errorList.push(i)}else if(e.size===0){var i={name:e.name,message:intl.formatMessage({id:"uploader.zeroFileSize",defaultMessage:"The file must be more than 0 bytes",description:"Error message when user attempts to upload a file of no size"})};t.errorList.push(i)}else if(!t.isValidSize(e.size)){var i={name:e.name,message:intl.formatMessage({id:"uploader.fileTooLarge",defaultMessage:"The selected file is too large. Maximum file size is {size}Mb"},{size:t.maxSize})};t.errorList.push(i)}else if(t.isDuplicate(e.name)){var i={name:e.name,message:intl.formatMessage({id:"uploader.duplicateName",defaultMessage:"A file with this name already exists."})};t.errorList.push(i)}else{t.filesToUpload.push(e)}}));if(this.filesToUpload.length>0){this.numFilesInProgress=this.filesToUpload.length;this.wmUploaderFilesSelected.emit(this.filesToUpload);this.wmFilesSelected.emit(this.filesToUpload)}}e.target.value=""};e.prototype.previewFile=function(e){this.clearErrors();this.wmUploaderPreviewFile.emit(e.id)};e.prototype.downloadFile=function(e){this.clearErrors();this.wmUploaderDownloadFile.emit(e.id);this.wmDownloadFile.emit(e.id)};e.prototype.deleteFile=function(e){this.clearErrors();forceUpdate(this.el);this.wmUploaderDeleteFile.emit(e.id);this.wmDeleteFile.emit(e.id)};e.prototype.componentWillLoad=function(){var e=this;if(!this.buttonText){throw new Error("wm-uploader: button-text is a required prop")}if(this.type){console.warn("wm-uploader: type has been deprecated as of v3.1.0. Please use uploader-type instead.")}if(this.tempUploaderType==="1"&&!this.emptyStateText){throw new Error("wm-uploader: empty-state-text is a required prop")}var t=new ResizeObserver((function(){return e.debouncedResize()}));t.observe(this.el);this.setMaxSize();this.parseFiles();this.clearErrors();this.parseRejectedFiles()};e.prototype.componentDidLoad=function(){if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.showTooltip=function(e,t){this.tooltipEl.textContent=t;this.positionTooltip("bottom",e,this.tooltipEl);this.tooltipEl.style.transitionDelay="500ms";this.tooltipEl.style.opacity="1"};e.prototype.hideTooltip=function(){this.tooltipEl.style.transitionDelay="0s";this.tooltipEl.style.opacity="0"};e.prototype.positionTooltip=function(e,t,o){var i=o.getBoundingClientRect().height;var n=o.getBoundingClientRect().width;var r=(t.getBoundingClientRect().height-i)/2;var a=(t.getBoundingClientRect().width-n)/2;var s=t.getBoundingClientRect().top+r;var l=t.getBoundingClientRect().left+a;if(e.includes("top")){s=t.getBoundingClientRect().top-i-8}if(e.includes("bottom")){s=t.getBoundingClientRect().bottom+8}if(e.includes("left")){l=t.getBoundingClientRect().left-n-8}if(e.includes("right")){l=t.getBoundingClientRect().right+8}l=Math.max(l,24);o.style.top=(s/16).toString()+"rem";o.style.left=(l/16).toString()+"rem"};e.prototype.uploadButtonOnClick=function(e){var t=this;if(this.isDisabled){e.preventDefault();if(this.liveRegion){var o="";if(this.numFilesInProgress>0){o=intl.formatMessage({id:"uploader.waitToUpload",defaultMessage:"Please wait for current upload to complete before uploading new files.",description:"Message for screen reader users"})}else if(this.fileLimitReached){o=this.fileUploadLimitMessage}if(o){this.liveRegion.innerHTML="";new Promise((function(e){setTimeout((function(){e("")}),500)})).then((function(){return t.liveRegion.innerHTML=o}))}}}else{this.clearErrors()}};e.prototype.renderUploadSvg=function(){return h("svg",{class:"upload-file",width:"91",height:"84",viewBox:"0 0 91 84"},h("path",{transform:"rotate(-180.000000) translate(-452, -255.5)",fill:"#eae8ec",d:"M361,249.681818 L361,197.318182 C361,194.118182 365.555061,191.5 371.122358,191.5 L391.316463,191.5 L391.286495,200.562515 L369.871211,200.600292 L369.885404,200.622146 L369.886423,246.655947 L443.657038,246.840767 L443.657038,200.622146 L421.683537,200.622146 L421.683537,191.5 L441.978865,191.5 C447.546162,191.5 452,194.118182 452,197.318182 L452,249.681818 C452,252.881818 447.546162,255.5 441.978865,255.5 L371.122358,255.5 C365.504449,255.5 361,252.881818 361,249.681818 Z M391.5,207 L406,221 L420.5,207 L409.625,207 L409.625,172 L402.375,172 L402.375,207 L391.5,207 Z"}))};e.prototype.renderIcon=function(){var e=this.icon&&this.icon==="f066";return this.icon&&h("span",{class:"mdi ".concat(e?"rotate":"")},String.fromCodePoint(parseInt("0x".concat(this.icon))))};e.prototype.renderInfo=function(){return this.info&&this.tempUploaderType==="2"?h("span",{class:"info"},this.info):""};e.prototype.renderNotif=function(){return this.notif?h("div",{class:"notif ".concat(this.notif.isError?"error":"")},this.notif.message):""};e.prototype.renderUploadButton=function(e){var t=this;return h("div",{class:"info-wrapper"},h("input",{name:this.inputId,id:this.inputId,class:"sr-only","aria-describedby":"file-count max-size accepted-types",type:"file",multiple:true,onClick:function(e){return t.uploadButtonOnClick(e)},onChange:function(e){return t.handleFiles(e)}}),h("label",{htmlFor:this.inputId,class:"wm-button ".concat(e).concat(this.isTabbing?" user-is-tabbing":"")},this.renderIcon(),this.buttonText),this.renderInfo())};e.prototype.renderEmptyState=function(){return h("div",{class:"empty-block"},this.renderUploadSvg(),h("div",{class:"empty-message"},this.emptyStateText),this.renderUploadButton("-primary empty-button"),this.renderNotif())};e.prototype.renderFileName=function(e,t){var o=this;return h("div",{class:"left-group"},h("div",{class:"name-wrapper"},h("span",{class:"filename","data-filename":e,onMouseEnter:function(t){return o.handleFilenameMouseEnter(t,e)},onMouseLeave:function(){return o.hideTooltip()}}),t&&h("span",{class:"sr-only"},"uploading"),h("div",{class:"sr-only ch-measure"})))};e.prototype.renderErrorList=function(){var e=this;if(!!this.errorList.length){if(this.liveRegion){var t=this.errorList.reduce((function(e,t){return e+"".concat(t.name,": ").concat(t.message," ")}),"");this.liveRegion.innerHTML=t}return h("ul",{class:"error-list"},this.errorList.map((function(t){var o=intl.formatMessage({id:"uploader.clearErrorLabel",defaultMessage:"Clear {fileName} error",description:"Label for a button used to clear an error, including filename"},{fileName:t.name});return h("li",null,h("div",{class:"file --error"},e.renderFileName(t.name,false),h("wm-button",{"permanently-delete":true,"button-type":"textonly","label-for-identical-buttons":o,onClick:function(){e.clearError(t.name);e.uploadButtonEl.focus()}},e.clearButtonText)),h("div",{class:"error-message"},t.message))})))}};e.prototype.renderFileInProgress=function(e){var t=e.type?"".concat(e.name,".").concat(e.type):e.name;return h("li",null,h("div",{class:"file --progress"},h("div",{class:"progress",style:{background:"linear-gradient(to right, rgba(67, 126, 142, 1) ".concat(e.progress,"%, transparent ").concat(e.progress,"%)")}}),this.renderFileName(t,this.isItemUploading(e))))};e.prototype.renderFile=function(e){var t=e.type?"".concat(e.name,".").concat(e.type):e.name;var o=e.fileActions&&e.fileActions.split(" ").length===1;var i=!this.tempUploaderType&&this.isCondensed&&!o;var n=!this.tempUploaderType&&!this.isCondensed;var r=!this.tempUploaderType&&(e.progress===100||e.progress==="100");return h("li",{class:"".concat(this.isCondensed?"condensed":""," ").concat(r?"checked":"")},h("div",{class:"file --saved"},this.renderFileName(t,this.isItemUploading(e)),h("div",{class:"right-group"},n&&this.renderFileInfo(e),i?this.renderActionMenu(e):this.renderFileActions(e))))};e.prototype.handleFilenameMouseEnter=function(e,t){if(e.target.textContent.includes("...")){this.showTooltip(e.target,t)}};e.prototype.componentDidRender=function(){var e=this;var t=this.el.shadowRoot.querySelectorAll(".file");t.forEach((function(t){return e.truncateFileName(t)}))};e.prototype.truncateFileName=function(e){var t=e.querySelector(".left-group");var o=t.getBoundingClientRect().left;var i=e.querySelector(".right-group");var n=i?i.getBoundingClientRect().left:e.getBoundingClientRect().right-20;var r=e.querySelector(".filename");var a=n-o;var s=r.dataset.filename;var l=a>s.length*this.chMeasure;if(!l){var d=s.slice(s.lastIndexOf("."));var p=Math.floor(a/this.chMeasure);var u=3+3+d.length;var m=Math.max(2,p-u);var c=s.slice(0,m);var b=s.slice(s.indexOf(d)-3,s.length);s="".concat(c.trim(),"...").concat(b.trim())}r.textContent=s};e.prototype.renderFileActions=function(e){var t=this;var o="download delete";var i=e.fileActions||o;var n=h("wm-button",{class:"preview-button","button-type":"icononly",tooltip:"Preview","tooltip-position":"bottom","label-for-identical-buttons":"preview ".concat(e.name),icon:"f208",onClick:function(){return t.previewFile(e)}});var r=h("wm-button",{class:"download-button","button-type":"icononly",tooltip:"Download","tooltip-position":"bottom","label-for-identical-buttons":"download ".concat(e.name),icon:"f1da",onClick:function(){return t.downloadFile(e)}});var a=h("wm-button",{class:"delete-button","button-type":"icononly",tooltip:"Delete","tooltip-position":"bottom","label-for-identical-buttons":"delete ".concat(e.name),icon:"f1c0",onClick:function(){return t.deleteFile(e)}});return h("div",{class:"file-controls"},i.includes("preview")&&n,i.includes("download")&&r,i.includes("delete")&&a)};e.prototype.renderActionMenu=function(e){var t=this;var o="download delete";var i=e.fileActions||o;var n=h("wm-menuitem",{icon:"f208",onClick:function(){return t.previewFile(e)}},this.previewActionMessage);var r=h("wm-menuitem",{icon:"f1da",onClick:function(){return t.downloadFile(e)}},this.downloadActionMessage);var a=h("wm-menuitem",{icon:"f1c0",onClick:function(){return t.deleteFile(e)}},this.deleteActionMessage);return h("wm-action-menu",{"action-menu-type":"icon",tooltip:this.actionMenuLabel,"tooltip-position":"bottom","label-for-identical-buttons":"".concat(e.name," ").concat(this.actionMenuLabel)},i.includes("preview")&&n,i.includes("download")&&r,i.includes("delete")&&a)};e.prototype.renderFileInfo=function(e){var t=undefined;if(this.showInfo==="time"){var o=new Date(Date.parse(e.lastUpdated));var i=o.getDate();var n=o.getMonth()+1;var r=o.getFullYear();var a=o.toLocaleTimeString("en-us",{hour:"numeric",minute:"2-digit"});var s="".concat(n,"/").concat(i,"/").concat(r," ").concat(a);t=h("div",{class:"file-info"},s)}else if(this.showInfo==="size"&&e.size){var l=this.convertBytes(e.size);t=h("div",{class:"file-info"},"".concat(l.size.toFixed(0)," ").concat(l.unit))}return t};e.prototype.renderFileList=function(){var e=this;if(this.fileList){this.sortBy==="name"?this.fileList.sort((function(e,t){return e.name.localeCompare(t.name)})):this.fileList.sort((function(e,t){return Date.parse(e.lastUpdated)-Date.parse(t.lastUpdated)}));return h("div",null,h("ul",{class:"inprogress-list"},this.fileList.filter((function(t){return e.isItemUploading(t)})).map((function(t){return e.renderFileInProgress(t)}))),h("ul",{class:"file-list"},this.fileList.filter((function(t){return!e.isItemUploading(t)})).map((function(t){return e.renderFile(t)}))))}};e.prototype.legacyRenderHeader=function(){return h("div",{class:"header ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},h("div",{class:"slot-wrapper"},h("slot",null),h("div",{class:"notif-wrapper ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},this.renderUploadButton("-secondary ".concat(this.isDisabled?"disabled":"")),this.renderNotif())))};e.prototype.renderHeader=function(){return h("div",{class:"header ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},h("div",{class:"notif-wrapper ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},this.renderUploadButton("-secondary ".concat(this.isDisabled?"disabled":"")),this.renderRequirements()),h("div",{id:"accepted-types",class:"accepted-types"},this.acceptedFileTypesMessage),this.renderNotif())};e.prototype.renderRequirements=function(){return h("div",{class:"requirements"},this.maxFiles&&h("span",{id:"file-count"},this.fileCountMessage),this.maxSize!==this.defaultMaxSize&&h("span",{id:"max-size"},this.maxSizeMessage))};e.prototype.renderFooter=function(){return h("div",{class:"footer"},h("div",{class:"notif-wrapper ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},h("div",{class:"filecount-wrapper"},h("div",{class:"filecount"},intl.formatMessage({id:"uploader.filesAdded",defaultMessage:"{numFiles, plural, one {1 file added} other {# files added}}"},{numFiles:this.fileList.length})),this.renderUploadButton("-primary ".concat(this.isDisabled?"disabled":""))),this.renderNotif()))};e.prototype.renderWithItems=function(){var e=this.fileList.filter((function(e){return e.progress===(typeof e.progress==="number"?100:"100")})).length>0;return h("div",null,!this.tempUploaderType&&this.renderHeader(),this.tempUploaderType==="2"&&this.legacyRenderHeader(),h("div",{class:"list-container type".concat(this.tempUploaderType," ").concat(!this.tempUploaderType&&e?"checkmark-spacer":"")},this.renderErrorList(),this.renderFileList()),this.tempUploaderType==="1"&&this.renderFooter())};e.prototype.render=function(){var e=this;return h(Host,null,this.isEmpty()&&this.tempUploaderType==="1"?this.renderEmptyState():this.renderWithItems(),h("div",{ref:function(t){return e.liveRegion=t},class:"live-region sr-only","aria-live":"assertive","aria-atomic":"true"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{files:["parseFiles"],rejectedFiles:["parseRejectedFiles"],maxSize:["setMaxSize"],numFilesInProgress:["uploadNotifications"]}},enumerable:false,configurable:true});return e}();Uploader.style=wmUploaderCss;export{Uploader as wm_uploader};
|
|
1
|
+
import{r as registerInstance,c as createEvent,f as forceUpdate,h,H as Host,g as getElement}from"./index-7603f98e.js";import{g as generateId,d as debounce,i as intl,p as hasValidType}from"./functions-036af8dc.js";var wmUploaderCss=':host .wm-button,wm-uploader .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:inherit;border:2px solid #575195;color:#575195;font-family:inherit;font-size:0.75rem;font-weight:700;height:2.75rem;padding:0 1.3333333333em;cursor:pointer;position:relative;background:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button,wm-uploader .wm-button{height:3.3333333333em}}:host .wm-button.nowrap,wm-uploader .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,wm-uploader .wm-button:focus{outline:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner,wm-uploader .wm-button::-moz-focus-inner{border:0;outline:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) :host .wm-button.-textonly .button-text,wm-uploader .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) :host .wm-button.-textonly .button-text,:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) wm-uploader .wm-button.-textonly .button-text,wm-uploader .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled) wm-uploader .wm-button.-textonly .button-text{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 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled),wm-uploader .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark),wm-uploader .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark){-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 .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner,wm-uploader .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled),wm-uploader .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled){background:transparent;border:2px solid #fff;color:#fff}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover,wm-uploader .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark,wm-uploader .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-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 #c6b4e3;-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 #c6b4e3;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 #c6b4e3;outline:none}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption),wm-uploader .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-button .mdi,wm-uploader .wm-button .mdi{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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi,wm-uploader .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi,wm-uploader .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly),wm-uploader .wm-button.-primary:not(.-textonly){background:#575195;color:#fff}:host .wm-button.-primary:not(.-textonly):not(:focus),wm-uploader .wm-button.-primary:not(.-textonly):not(:focus){-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)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:#464177}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled),wm-uploader .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:#575195;background:#fff;border:2px solid #fff}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover,wm-uploader .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-secondary:hover:not(:disabled):not(.disabled),:host .wm-button.-icononly:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:#464177;color:#fff}:host .wm-button.-textonly,wm-uploader .wm-button.-textonly{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1}:host .wm-button.-textonly+.-textonly,wm-uploader .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus,wm-uploader .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner,wm-uploader .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text,wm-uploader .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{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 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text,wm-uploader .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, #fff), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #fff 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small,wm-uploader .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete),wm-uploader .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete,wm-uploader .wm-button.-textonly.-permanentlydelete{color:#c0392b}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark),wm-uploader .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline;color:#c0392b !important}:host .wm-button.-textonly.dark,wm-uploader .wm-button.-textonly.dark{color:#fff}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline;color:#fff !important}:host .wm-button.-icononly,wm-uploader .wm-button.-icononly,:host .wm-button.-navigational,wm-uploader .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),wm-uploader .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus),wm-uploader .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,wm-uploader .wm-button.-icononly,:host .wm-button.-navigational,wm-uploader .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly,wm-uploader .wm-button.-icononly{border-width:1px !important}:host .wm-button.-icononly:before,wm-uploader .wm-button.-icononly: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}:host .wm-button.-navigational,wm-uploader .wm-button.-navigational{border:none !important;background-color:transparent}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled),wm-uploader .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:#575195}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,wm-uploader .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected,wm-uploader .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:#d7d6d9}:host .wm-button.-navigational:before,wm-uploader .wm-button.-navigational: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}:host .wm-button.-permanentlydelete:not(.-textonly),wm-uploader .wm-button.-permanentlydelete:not(.-textonly){background:#c0392b;border-color:#c0392b;color:#fff}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark),wm-uploader .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:#9a2e22;border-color:#9a2e22}:host .wm-button.-pairnegative,wm-uploader .wm-button.-pairnegative{background:#cc4c3e;border-color:#cc4c3e;color:#fff}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:#a33d32;border-color:#a33d32}:host .wm-button.-pairpositive,wm-uploader .wm-button.-pairpositive{background:#15868d;border-color:#15868d;color:#fff}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:#116b71;border-color:#116b71}:host .wm-button.-selectoronly,wm-uploader .wm-button.-selectoronly{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;background:transparent;border:1px solid #575195;border-radius:3px 3px 3px 3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;color:#575195;font-weight:500;font-size:0.875rem;text-transform:none;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selectoronly,wm-uploader .wm-button.-selectoronly{height:2.5rem}}:host .wm-button.-selectoronly:before,wm-uploader .wm-button.-selectoronly: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;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}:host .wm-button.-selectoronly:hover:not(:disabled):not(.disabled),wm-uploader .wm-button.-selectoronly:hover:not(:disabled):not(.disabled){background:transparent;text-decoration:none}:host .wm-button.-selectoronly:active,wm-uploader .wm-button.-selectoronly:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selectoronly::-moz-focus-inner,wm-uploader .wm-button.-selectoronly::-moz-focus-inner{border:0}:host .wm-button.-selectoronly .overflowcontrol,wm-uploader .wm-button.-selectoronly .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button:disabled,wm-uploader .wm-button:disabled,:host .wm-button.disabled,wm-uploader .wm-button.disabled{background:inherit;border-color:#737373;color:#737373;cursor:default;pointer-events:none}:host .wm-button:disabled.-primary,wm-uploader .wm-button:disabled.-primary,:host .wm-button:disabled.-permanentlydelete,wm-uploader .wm-button:disabled.-permanentlydelete,:host .wm-button:disabled.-pairnegative,wm-uploader .wm-button:disabled.-pairnegative,:host .wm-button:disabled.-pairpositive,wm-uploader .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-primary,wm-uploader .wm-button.disabled.-primary,:host .wm-button.disabled.-permanentlydelete,wm-uploader .wm-button.disabled.-permanentlydelete,:host .wm-button.disabled.-pairnegative,wm-uploader .wm-button.disabled.-pairnegative,:host .wm-button.disabled.-pairpositive,wm-uploader .wm-button.disabled.-pairpositive{background:#737373;color:#fff;border-color:#737373}:host .wm-button:disabled.-secondary,wm-uploader .wm-button:disabled.-secondary,:host .wm-button.disabled.-secondary,wm-uploader .wm-button.disabled.-secondary{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button:disabled.-selectoronly,wm-uploader .wm-button:disabled.-selectoronly,:host .wm-button.disabled.-selectoronly,wm-uploader .wm-button.disabled.-selectoronly{color:#737373}:host .wm-button:disabled.-textonly,wm-uploader .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly,wm-uploader .wm-button.disabled.-textonly{color:#6b6b6b;background:transparent}:host .wm-button:disabled.dark.-secondary:not(.-permanentlydelete),wm-uploader .wm-button:disabled.dark.-secondary:not(.-permanentlydelete),:host .wm-button:disabled.dark.-textonly,wm-uploader .wm-button:disabled.dark.-textonly,:host .wm-button:disabled.dark.-navigational,wm-uploader .wm-button:disabled.dark.-navigational,:host .wm-button:disabled.dark.-icononly,wm-uploader .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-secondary:not(.-permanentlydelete),wm-uploader .wm-button.disabled.dark.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.dark.-textonly,wm-uploader .wm-button.disabled.dark.-textonly,:host .wm-button.disabled.dark.-navigational,wm-uploader .wm-button.disabled.dark.-navigational,:host .wm-button.disabled.dark.-icononly,wm-uploader .wm-button.disabled.dark.-icononly{color:#b5b5b5;border-color:#b5b5b5}:host .wm-button:disabled.dark.-primary,wm-uploader .wm-button:disabled.dark.-primary,:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),wm-uploader .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-primary,wm-uploader .wm-button.disabled.dark.-primary,:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly),wm-uploader .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:#a6a6a6;border-color:#a6a6a6;color:#353b48}:host a.wm-button,wm-uploader a.wm-button,:host label.wm-button,wm-uploader label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host,wm-uploader{width:100%;height:100%;display:block;position:relative;max-width:1140px}:host[dir=RTL] .mdi,wm-uploader[dir=RTL] .mdi{margin-left:0.3125rem;margin-right:0}:host input:focus+.wm-button.user-is-tabbing,wm-uploader input:focus+.wm-button.user-is-tabbing{-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 !important;-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 !important;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 !important}:host *,wm-uploader *{-webkit-box-sizing:border-box;box-sizing:border-box}.wm-button.disabled{pointer-events:initial !important}.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}.header{margin-bottom:2.5rem}.header.type1,.header.type2{margin-bottom:1rem}.header .slot-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:start;align-items:flex-start}.header .info-wrapper{-ms-flex-align:center;align-items:center}.header .info-wrapper .info{font-size:0.875rem;margin-left:1rem}.header .accepted-types{font-size:0.875rem}.header .requirements{font-size:0.875rem;margin-left:1rem}.footer{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;padding:0.9375rem 1.875rem}.footer .notif-wrapper{-ms-flex-align:end;align-items:flex-end}.footer .filecount-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.footer .filecount-wrapper .filecount{font-size:0.875rem;margin-right:1rem}.notif-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin-bottom:0.75rem}.notif-wrapper.type1,.notif-wrapper.type2{-ms-flex-direction:column;flex-direction:column;margin-bottom:1rem}.notif-wrapper .requirements{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.notif{padding-top:0.25rem;font-size:0.875rem;font-style:italic}.notif.error{color:#c0392b}.info-wrapper{position:relative;display:-ms-flexbox;display:flex}.name-wrapper{overflow:hidden}.name-wrapper+.file-controls{-ms-flex:none;flex:none;margin-left:1rem}.empty-block{margin:5rem auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.empty-block .upload-file{margin-bottom:1.875rem}.empty-block .empty-message{font-size:0.875rem;margin-bottom:0.4375rem}.empty-block .empty-message.large{font-size:1.5rem}.empty-block .info-wrapper{-ms-flex-pack:center;justify-content:center;width:100%}.empty-block .info-wrapper .wm-button{width:auto}.list-container{overflow-y:unset}.list-container.checkmark-spacer{margin-right:2.75rem}.list-container.type1,.list-container.type2{overflow-y:auto}.list-container.type1 ul,.list-container.type2 ul{margin:revert}.list-container.type1 .file-list li,.list-container.type1 .inprogress-list li,.list-container.type2 .file-list li,.list-container.type2 .inprogress-list li{margin-bottom:1.625rem}.list-container.type1 .error-list li,.list-container.type2 .error-list li{margin-bottom:1.25rem}.list-container.type1{padding:0 1.875rem;height:16.25rem}ul{list-style:none;padding:0;width:100%;margin:0}ul li{position:relative;font-size:0.875rem;margin-bottom:0.5rem}ul li .file{min-width:300px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:relative;height:3.5rem;padding:0.5rem 1.25rem;background:#f4f4f4;border:1px solid #6b6b6b;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}ul li .file+.file{margin-top:1.25rem}ul li .file .filename{white-space:nowrap}ul li .file .left-group{overflow:hidden}ul li .file .right-group{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:5rem}ul li .file .right-group .file-controls{display:-ms-flexbox;display:flex}ul li .file .right-group .file-info{white-space:nowrap;margin-right:1rem}ul li .file wm-button+wm-button{margin-left:1rem}ul li.condensed .right-group{padding-left:2.5rem}ul li.checked .file:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f133";position:absolute;right:-44px;color:#088000;font-size:28px;line-height:1}ul .progress{position:absolute;left:0;top:0;right:0;height:8px}ul.file-list li,ul.inprogress-list li{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ul.file-list li .file,ul.inprogress-list li .file{-ms-flex:1;flex:1}ul.error-list li{margin-bottom:0.5rem}ul.error-list li .file{border:1px solid #c0392b;background-color:#f5ebea;height:3.75rem}ul.error-list li .error-message{color:#c0392b;padding-top:0.25rem;font-style:italic}.ch-measure{width:1ch !important}';var Uploader=function(){function e(e){var t=this;registerInstance(this,e);this.wmUploaderFilesSelected=createEvent(this,"wmUploaderFilesSelected",7);this.wmFilesSelected=createEvent(this,"wmFilesSelected",7);this.wmUploaderDeleteFile=createEvent(this,"wmUploaderDeleteFile",7);this.wmDeleteFile=createEvent(this,"wmDeleteFile",7);this.wmUploaderDownloadFile=createEvent(this,"wmUploaderDownloadFile",7);this.wmDownloadFile=createEvent(this,"wmDownloadFile",7);this.wmUploaderPreviewFile=createEvent(this,"wmUploaderPreviewFile",7);this.fileTypes="pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv";this.defaultMaxSize=100;this.maxSize=this.defaultMaxSize;this.sortBy="date";this.showInfo="time";this.fileList=[];this.filesToUpload=[];this.isTabbing=false;this.errorList=[];this.isCondensed=false;this.inputId=generateId();this.debouncedResize=debounce((function(){t.isCondensed=t.el.clientWidth<500;forceUpdate(t.el)}),50)}Object.defineProperty(e.prototype,"tooltipEl",{get:function(){return document.getElementById("wm-tooltip")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"uploadButtonEl",{get:function(){return this.el.shadowRoot.querySelector("#".concat(this.inputId))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tempUploaderType",{get:function(){return this.type||this.uploaderType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chMeasure",{get:function(){return this.el.shadowRoot.querySelector(".ch-measure").clientWidth},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"fileLimitReached",{get:function(){return this.maxFiles&&this.fileList.length>=this.maxFiles},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"fileUploadLimitMessage",{get:function(){return intl.formatMessage({id:"uploader.fileUploadLimit",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"fileCountMessage",{get:function(){return intl.formatMessage({id:"uploader.fileCount",defaultMessage:"{x} of {y} Files",description:"A count of the number of files currently uploaded"},{x:this.fileList.length,y:this.maxFiles})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"maxSizeMessage",{get:function(){return intl.formatMessage({id:"uploader.maxSize",defaultMessage:"Maximum file size {maxSize}MB",description:"An indicator of the maximum file size the uploader allows"},{maxSize:this.maxSize})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"acceptedFileTypesMessage",{get:function(){var e="."+this.fileTypes.split(" ").join(", .");return intl.formatMessage({id:"uploader.acceptedFileTypes",defaultMessage:"Accepted file {amount, plural, =1 {type} other {types}}: {fileTypes}"},{fileTypes:e,amount:this.fileTypes.split(" ").length})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewActionMessage",{get:function(){return intl.formatMessage({id:"uploader.previewAction",defaultMessage:"Preview File",description:"Label of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadActionMessage",{get:function(){return intl.formatMessage({id:"uploader.downloadAction",defaultMessage:"Download File",description:"Label of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteActionMessage",{get:function(){return intl.formatMessage({id:"uploader.deleteAction",defaultMessage:"Delete File",description:"Label of a button that triggers a file to be delete"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clearButtonText",{get:function(){return intl.formatMessage({id:"uploader.clearErrorText",defaultMessage:"Clear",description:"Text for a button used to clear an error"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"actionMenuLabel",{get:function(){return intl.formatMessage({id:"uploader.actionMenuLabel",defaultMessage:"Actions",description:"Label of a button that opens a menu of file actions"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleUploadProgress=function(e){var t=this;this.fileList.map((function(o){if(o.id===e.detail.id){o.progress=e.detail.progress;forceUpdate(t.el)}}));if(e.detail.progress===100){this.numFilesInProgress-=1}if(!this.srProgress&&this.numFilesInProgress){var o=this.numFilesInProgress;this.srProgress=setInterval((function(){var e=t.fileList.reduce((function(e,t){return t.progress?e+t.progress:e}),0);if(t.liveRegion){t.liveRegion.innerHTML=intl.formatMessage({id:"uploader.uploadProgress",defaultMessage:"Upload progress: {percentage}%"},{percentage:Math.floor(e/o)})}}),5e3)}};e.prototype.parseFiles=function(){if(!!this.files){if(typeof this.files==="string"){var e=JSON.parse(this.files);if(typeof e==="object"){this.fileList=e}else{throw new Error("could not parse string passed to files attribute")}}else{throw new Error("Attribute 'files' should be a string")}}};e.prototype.parseRejectedFiles=function(){if(!!this.rejectedFiles){if(typeof this.files==="string"){var e=JSON.parse(this.rejectedFiles);if(typeof e==="object"){this.errorList=e}else{throw new Error("could not parse string passed to errors attribute")}}else{throw new Error("Attribute 'rejected-files' should be a string")}}};e.prototype.setMaxSize=function(){this.maxSize=this.maxSize>this.defaultMaxSize?this.defaultMaxSize:this.maxSize};e.prototype.uploadNotifications=function(e,t){var o=this;if(t>0&&e===0){setTimeout((function(){o.notif=null}),20*1e3);var i=intl.formatMessage({id:"uploader.finishedUploading",defaultMessage:"Finished uploading"});this.notif={id:5,message:i,isError:false};if(this.liveRegion){this.liveRegion.innerHTML=i}this.numFilesInProgress=null;clearInterval(this.srProgress);forceUpdate(this.el)}else if(e>0&&e!=t){var i=intl.formatMessage({id:"uploader.filesUploading",defaultMessage:"{num, plural, one {1 file uploading} other {# files uploading}}"},{num:e});this.notif={id:6,message:i,isError:false};if(this.liveRegion){this.liveRegion.innerHTML=i}forceUpdate(this.el)}};e.prototype.isValidSize=function(e){return this.convertBytes(e,"MB").size<=this.maxSize};e.prototype.convertBytes=function(e,t){var o=["bytes","KB","MB","GB","TB"];var i=0;var n=typeof e==="number"?e:parseInt(e);if(t){while(o.indexOf(t)>i){n/=1024;i++}}else{while(n>1e3){n/=1024;i++}}return{size:n,unit:o[i]}};e.prototype.isDuplicate=function(e){return this.fileList.find((function(t){var o=t.type?t.name+"."+t.type:t.name;return o===e}))};e.prototype.isEmpty=function(){return!this.fileList.length&&!this.errorList.length};Object.defineProperty(e.prototype,"isDisabled",{get:function(){if(!this.notif){if(this.fileLimitReached){var e=this.fileUploadLimitMessage;this.notif={id:1,message:e,isError:true};if(this.liveRegion){this.liveRegion.innerHTML=e}}else{this.notif=null}}else if(this.notif.id===1){if(!this.fileLimitReached){this.notif=null}}return this.fileLimitReached||this.numFilesInProgress>0},enumerable:false,configurable:true});e.prototype.isItemUploading=function(e){return e.hasOwnProperty("progress")&&e.progress<100};e.prototype.clearError=function(e){this.errorList=this.errorList.filter((function(t){return t.name!=e}));this.notif=null};e.prototype.clearErrors=function(){this.errorList=[];this.notif=null};e.prototype.handleFiles=function(e){var t=this;this.filesToUpload=[];var o=this.fileTypes.split(" ").join(", ");var i=Array.from(e.target.files);if(!!this.maxFiles&&this.fileList.length+i.length>this.maxFiles){var n=intl.formatMessage({id:"uploader.fileUploadExceeded",defaultMessage:"The number of selected files exceeds the limit."});this.notif={id:2,message:n,isError:true};if(this.liveRegion){this.liveRegion.innerHTML=n}}else{i&&i.map((function(e){if(!hasValidType(e,t.fileTypes)){var i={name:e.name,message:intl.formatMessage({id:"uploader.invalidFileType",defaultMessage:"The file type is invalid. Accepted types: {validTypes}"},{validTypes:o})};t.errorList.push(i)}else if(e.size===0){var i={name:e.name,message:intl.formatMessage({id:"uploader.zeroFileSize",defaultMessage:"The file must be more than 0 bytes",description:"Error message when user attempts to upload a file of no size"})};t.errorList.push(i)}else if(!t.isValidSize(e.size)){var i={name:e.name,message:intl.formatMessage({id:"uploader.fileTooLarge",defaultMessage:"The selected file is too large. Maximum file size is {size}Mb"},{size:t.maxSize})};t.errorList.push(i)}else if(t.isDuplicate(e.name)){var i={name:e.name,message:intl.formatMessage({id:"uploader.duplicateName",defaultMessage:"A file with this name already exists."})};t.errorList.push(i)}else{t.filesToUpload.push(e)}}));if(this.filesToUpload.length>0){this.numFilesInProgress=this.filesToUpload.length;this.wmUploaderFilesSelected.emit(this.filesToUpload);this.wmFilesSelected.emit(this.filesToUpload)}}e.target.value=""};e.prototype.previewFile=function(e){this.clearErrors();this.wmUploaderPreviewFile.emit(e.id)};e.prototype.downloadFile=function(e){this.clearErrors();this.wmUploaderDownloadFile.emit(e.id);this.wmDownloadFile.emit(e.id)};e.prototype.deleteFile=function(e){this.clearErrors();forceUpdate(this.el);this.wmUploaderDeleteFile.emit(e.id);this.wmDeleteFile.emit(e.id)};e.prototype.componentWillLoad=function(){var e=this;if(!this.buttonText){throw new Error("wm-uploader: button-text is a required prop")}if(this.type){console.warn("wm-uploader: type has been deprecated as of v3.1.0. Please use uploader-type instead.")}if(this.tempUploaderType==="1"&&!this.emptyStateText){throw new Error("wm-uploader: empty-state-text is a required prop")}var t=new ResizeObserver((function(){return e.debouncedResize()}));t.observe(this.el);this.setMaxSize();this.parseFiles();this.clearErrors();this.parseRejectedFiles()};e.prototype.componentDidLoad=function(){if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};e.prototype.showTooltip=function(e,t){this.tooltipEl.textContent=t;this.positionTooltip("bottom",e,this.tooltipEl);this.tooltipEl.style.transitionDelay="500ms";this.tooltipEl.style.opacity="1"};e.prototype.hideTooltip=function(){this.tooltipEl.style.transitionDelay="0s";this.tooltipEl.style.opacity="0"};e.prototype.positionTooltip=function(e,t,o){var i=o.getBoundingClientRect().height;var n=o.getBoundingClientRect().width;var r=(t.getBoundingClientRect().height-i)/2;var a=(t.getBoundingClientRect().width-n)/2;var s=t.getBoundingClientRect().top+r;var l=t.getBoundingClientRect().left+a;if(e.includes("top")){s=t.getBoundingClientRect().top-i-8}if(e.includes("bottom")){s=t.getBoundingClientRect().bottom+8}if(e.includes("left")){l=t.getBoundingClientRect().left-n-8}if(e.includes("right")){l=t.getBoundingClientRect().right+8}l=Math.max(l,24);o.style.top=(s/16).toString()+"rem";o.style.left=(l/16).toString()+"rem"};e.prototype.uploadButtonOnClick=function(e){var t=this;if(this.isDisabled){e.preventDefault();if(this.liveRegion){var o="";if(this.numFilesInProgress>0){o=intl.formatMessage({id:"uploader.waitToUpload",defaultMessage:"Please wait for current upload to complete before uploading new files.",description:"Message for screen reader users"})}else if(this.fileLimitReached){o=this.fileUploadLimitMessage}if(o){this.liveRegion.innerHTML="";new Promise((function(e){setTimeout((function(){e("")}),500)})).then((function(){return t.liveRegion.innerHTML=o}))}}}else{this.clearErrors()}};e.prototype.renderUploadSvg=function(){return h("svg",{class:"upload-file",width:"91",height:"84",viewBox:"0 0 91 84"},h("path",{transform:"rotate(-180.000000) translate(-452, -255.5)",fill:"#eae8ec",d:"M361,249.681818 L361,197.318182 C361,194.118182 365.555061,191.5 371.122358,191.5 L391.316463,191.5 L391.286495,200.562515 L369.871211,200.600292 L369.885404,200.622146 L369.886423,246.655947 L443.657038,246.840767 L443.657038,200.622146 L421.683537,200.622146 L421.683537,191.5 L441.978865,191.5 C447.546162,191.5 452,194.118182 452,197.318182 L452,249.681818 C452,252.881818 447.546162,255.5 441.978865,255.5 L371.122358,255.5 C365.504449,255.5 361,252.881818 361,249.681818 Z M391.5,207 L406,221 L420.5,207 L409.625,207 L409.625,172 L402.375,172 L402.375,207 L391.5,207 Z"}))};e.prototype.renderIcon=function(){var e=this.icon&&this.icon==="f066";return this.icon&&h("span",{class:"mdi ".concat(e?"rotate":"")},String.fromCodePoint(parseInt("0x".concat(this.icon))))};e.prototype.renderInfo=function(){return this.info&&this.tempUploaderType==="2"?h("span",{class:"info"},this.info):""};e.prototype.renderNotif=function(){return this.notif?h("div",{class:"notif ".concat(this.notif.isError?"error":"")},this.notif.message):""};e.prototype.renderUploadButton=function(e){var t=this;return h("div",{class:"info-wrapper"},h("input",{name:this.inputId,id:this.inputId,class:"sr-only","aria-describedby":"file-count max-size accepted-types",type:"file",multiple:true,onClick:function(e){return t.uploadButtonOnClick(e)},onChange:function(e){return t.handleFiles(e)}}),h("label",{htmlFor:this.inputId,class:"wm-button ".concat(e).concat(this.isTabbing?" user-is-tabbing":"")},this.renderIcon(),this.buttonText),this.renderInfo())};e.prototype.renderEmptyState=function(){return h("div",{class:"empty-block"},this.renderUploadSvg(),h("div",{class:"empty-message"},this.emptyStateText),this.renderUploadButton("-primary empty-button"),this.renderNotif())};e.prototype.renderFileName=function(e,t){var o=this;return h("div",{class:"left-group"},h("div",{class:"name-wrapper"},h("span",{class:"filename","data-filename":e,onMouseEnter:function(t){return o.handleFilenameMouseEnter(t,e)},onMouseLeave:function(){return o.hideTooltip()}}),t&&h("span",{class:"sr-only"},"uploading"),h("div",{class:"sr-only ch-measure"})))};e.prototype.renderErrorList=function(){var e=this;if(!!this.errorList.length){if(this.liveRegion){var t=this.errorList.reduce((function(e,t){return e+"".concat(t.name,": ").concat(t.message," ")}),"");this.liveRegion.innerHTML=t}return h("ul",{class:"error-list"},this.errorList.map((function(t){var o=intl.formatMessage({id:"uploader.clearErrorLabel",defaultMessage:"Clear {fileName} error",description:"Label for a button used to clear an error, including filename"},{fileName:t.name});return h("li",null,h("div",{class:"file --error"},e.renderFileName(t.name,false),h("wm-button",{"permanently-delete":true,"button-type":"textonly","label-for-identical-buttons":o,onClick:function(){e.clearError(t.name);e.uploadButtonEl.focus()}},e.clearButtonText)),h("div",{class:"error-message"},t.message))})))}};e.prototype.renderFileInProgress=function(e){var t=e.type?"".concat(e.name,".").concat(e.type):e.name;return h("li",null,h("div",{class:"file --progress"},h("div",{class:"progress",style:{background:"linear-gradient(to right, rgba(67, 126, 142, 1) ".concat(e.progress,"%, transparent ").concat(e.progress,"%)")}}),this.renderFileName(t,this.isItemUploading(e))))};e.prototype.renderFile=function(e){var t=e.type?"".concat(e.name,".").concat(e.type):e.name;var o=e.fileActions&&e.fileActions.split(" ").length===1;var i=!this.tempUploaderType&&this.isCondensed&&!o;var n=!this.tempUploaderType&&!this.isCondensed;var r=!this.tempUploaderType&&(e.progress===100||e.progress==="100");return h("li",{class:"".concat(this.isCondensed?"condensed":""," ").concat(r?"checked":"")},h("div",{class:"file --saved"},this.renderFileName(t,this.isItemUploading(e)),h("div",{class:"right-group"},n&&this.renderFileInfo(e),i?this.renderActionMenu(e):this.renderFileActions(e))))};e.prototype.handleFilenameMouseEnter=function(e,t){if(e.target.textContent.includes("...")){this.showTooltip(e.target,t)}};e.prototype.componentDidRender=function(){var e=this;var t=this.el.shadowRoot.querySelectorAll(".file");t.forEach((function(t){return e.truncateFileName(t)}))};e.prototype.truncateFileName=function(e){var t=e.querySelector(".left-group");var o=t.getBoundingClientRect().left;var i=e.querySelector(".right-group");var n=i?i.getBoundingClientRect().left:e.getBoundingClientRect().right-20;var r=e.querySelector(".filename");var a=n-o;var s=r.dataset.filename;var l=a>s.length*this.chMeasure;if(!l){var d=s.slice(s.lastIndexOf("."));var p=Math.floor(a/this.chMeasure);var u=3+3+d.length;var m=Math.max(2,p-u);var c=s.slice(0,m);var b=s.slice(s.indexOf(d)-3,s.length);s="".concat(c.trim(),"...").concat(b.trim())}r.textContent=s};e.prototype.renderFileActions=function(e){var t=this;var o="download delete";var i=e.fileActions||o;var n=h("wm-button",{class:"preview-button","button-type":"icononly",tooltip:"Preview","tooltip-position":"bottom","label-for-identical-buttons":"preview ".concat(e.name),icon:"f208",onClick:function(){return t.previewFile(e)}});var r=h("wm-button",{class:"download-button","button-type":"icononly",tooltip:"Download","tooltip-position":"bottom","label-for-identical-buttons":"download ".concat(e.name),icon:"f1da",onClick:function(){return t.downloadFile(e)}});var a=h("wm-button",{class:"delete-button","button-type":"icononly",tooltip:"Delete","tooltip-position":"bottom","label-for-identical-buttons":"delete ".concat(e.name),icon:"f1c0",onClick:function(){return t.deleteFile(e)}});return h("div",{class:"file-controls"},i.includes("preview")&&n,i.includes("download")&&r,i.includes("delete")&&a)};e.prototype.renderActionMenu=function(e){var t=this;var o="download delete";var i=e.fileActions||o;var n=h("wm-menuitem",{icon:"f208",onClick:function(){return t.previewFile(e)}},this.previewActionMessage);var r=h("wm-menuitem",{icon:"f1da",onClick:function(){return t.downloadFile(e)}},this.downloadActionMessage);var a=h("wm-menuitem",{icon:"f1c0",onClick:function(){return t.deleteFile(e)}},this.deleteActionMessage);return h("wm-action-menu",{"action-menu-type":"icon",tooltip:this.actionMenuLabel,"tooltip-position":"bottom","label-for-identical-buttons":"".concat(e.name," ").concat(this.actionMenuLabel)},i.includes("preview")&&n,i.includes("download")&&r,i.includes("delete")&&a)};e.prototype.renderFileInfo=function(e){var t=undefined;if(this.showInfo==="time"){var o=new Date(Date.parse(e.lastUpdated));var i=o.getDate();var n=o.getMonth()+1;var r=o.getFullYear();var a=o.toLocaleTimeString("en-us",{hour:"numeric",minute:"2-digit"});var s="".concat(n,"/").concat(i,"/").concat(r," ").concat(a);t=h("div",{class:"file-info"},s)}else if(this.showInfo==="size"&&e.size){var l=this.convertBytes(e.size);t=h("div",{class:"file-info"},"".concat(l.size.toFixed(0)," ").concat(l.unit))}return t};e.prototype.renderFileList=function(){var e=this;if(this.fileList){this.sortBy==="name"?this.fileList.sort((function(e,t){return e.name.localeCompare(t.name)})):this.fileList.sort((function(e,t){return Date.parse(e.lastUpdated)-Date.parse(t.lastUpdated)}));return h("div",null,h("ul",{class:"inprogress-list"},this.fileList.filter((function(t){return e.isItemUploading(t)})).map((function(t){return e.renderFileInProgress(t)}))),h("ul",{class:"file-list"},this.fileList.filter((function(t){return!e.isItemUploading(t)})).map((function(t){return e.renderFile(t)}))))}};e.prototype.legacyRenderHeader=function(){return h("div",{class:"header ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},h("div",{class:"slot-wrapper"},h("slot",null),h("div",{class:"notif-wrapper ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},this.renderUploadButton("-secondary ".concat(this.isDisabled?"disabled":"")),this.renderNotif())))};e.prototype.renderHeader=function(){return h("div",{class:"header ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},h("div",{class:"notif-wrapper ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},this.renderUploadButton("-secondary ".concat(this.isDisabled?"disabled":"")),this.renderRequirements()),h("div",{id:"accepted-types",class:"accepted-types"},this.acceptedFileTypesMessage),this.renderNotif())};e.prototype.renderRequirements=function(){return h("div",{class:"requirements"},this.maxFiles&&h("span",{id:"file-count"},this.fileCountMessage),this.maxSize!==this.defaultMaxSize&&h("span",{id:"max-size"},this.maxSizeMessage))};e.prototype.renderFooter=function(){return h("div",{class:"footer"},h("div",{class:"notif-wrapper ".concat(this.tempUploaderType?"type".concat(this.tempUploaderType):"")},h("div",{class:"filecount-wrapper"},h("div",{class:"filecount"},intl.formatMessage({id:"uploader.filesAdded",defaultMessage:"{numFiles, plural, one {1 file added} other {# files added}}"},{numFiles:this.fileList.length})),this.renderUploadButton("-primary ".concat(this.isDisabled?"disabled":""))),this.renderNotif()))};e.prototype.renderWithItems=function(){var e=this.fileList.filter((function(e){return e.progress===(typeof e.progress==="number"?100:"100")})).length>0;return h("div",null,!this.tempUploaderType&&this.renderHeader(),this.tempUploaderType==="2"&&this.legacyRenderHeader(),h("div",{class:"list-container type".concat(this.tempUploaderType," ").concat(!this.tempUploaderType&&e?"checkmark-spacer":"")},this.renderErrorList(),this.renderFileList()),this.tempUploaderType==="1"&&this.renderFooter())};e.prototype.render=function(){var e=this;return h(Host,null,this.isEmpty()&&this.tempUploaderType==="1"?this.renderEmptyState():this.renderWithItems(),h("div",{ref:function(t){return e.liveRegion=t},class:"live-region sr-only","aria-live":"assertive","aria-atomic":"true"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{files:["parseFiles"],rejectedFiles:["parseRejectedFiles"],maxSize:["setMaxSize"],numFilesInProgress:["uploadNotifications"]}},enumerable:false,configurable:true});return e}();Uploader.style=wmUploaderCss;export{Uploader as wm_uploader};
|
|
@@ -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-a0c3ef16.system.js","./p-726c979a.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 +1 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(a,s,n){if(n||arguments.length===2)for(var r=0,i=s.length,t;r<i;r++){if(t||!(r in s)){if(!t)t=Array.prototype.slice.call(s,0,r);t[r]=s[r]}}return a.concat(t||Array.prototype.slice.call(s))};System.register(["./p-a0c3ef16.system.js","./p-76ca7498.system.js"],(function(a){"use strict";var s,n,r,i,t,e;return{setters:[function(a){s=a.r;n=a.c;r=a.h;i=a.g},function(a){t=a.i;e=a.g}],execute:function(){var o='.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active){-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 #c6b4e3;-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 #c6b4e3;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 #c6b4e3;outline:none}:host *,wm-snackbar *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:unset}:host .wm-snackbars,wm-snackbar .wm-snackbars{position:fixed;bottom:0;left:1.25rem;right:1.25rem;padding:0.25rem 0.625rem 1.875rem;z-index:2001;max-width:35.5rem;max-height:17.5rem;-webkit-overflow-scrolling:touch;overflow:auto}:host .wm-snackbars.empty,wm-snackbar .wm-snackbars.empty{-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);padding-top:0;padding-bottom:0}:host .wm-snackbars .wm-snack-wrapper,wm-snackbar .wm-snackbars .wm-snack-wrapper{width:100%;height:100%}:host .wm-snackbars .wm-snack-wrapper:not(:last-child),wm-snackbar .wm-snackbars .wm-snack-wrapper:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar{-webkit-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);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;-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);font-size:0.875rem;color:#fff;padding:0.9375rem 1.875rem;background:#4a4a4a;opacity:0;left:0;position:relative;font-family:inherit}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link{letter-spacing:0;text-transform:none;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1;color:#85dadf;margin:0 3.125rem 0 0.625rem;text-decoration:none;font-weight:600;cursor:pointer}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::after,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::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;display:inline;content:"\\f137";margin-left:0.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover{text-decoration:underline}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus{outline:none;border:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child),wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button),wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button){opacity:1}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;padding:0}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext{width:100%}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;background-color:#3b3b3b;color:#ffffff;cursor:pointer;border:none;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{min-width:1.875rem;min-height:1.875rem}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack: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:"\\f156"}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover{background-color:#fff;color:#4a4a4a}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus{outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack>.tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);font-size:0.875rem;text-transform:none;font-weight:normal;background:black;color:#fff;padding:0;line-height:normal;z-index:30}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip{top:2.0625rem;left:auto}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .sr-only,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .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}:host .sr-only,wm-snackbar .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}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{top:2.0625rem;left:auto}}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .link:focus:not(:active){outline:none;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #85dadf), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #85dadf 66%, transparent 0) repeat-x;background-size:0.375rem 0.1875rem;background-position:0 1em;border-radius:0;line-height:normal}';var c=a("wm_snackbar",function(){function a(a){s(this,a);this.wmSnackbarSnackFinished=n(this,"wmSnackbarSnackFinished",7);this.userFinishedSnack=n(this,"userFinishedSnack",7);this.wmSnackbarActionTriggered=n(this,"wmSnackbarActionTriggered",7);this.userTriggeredAction=n(this,"userTriggeredAction",7);this.notifications="[]";this.parsedNotifications=[];this.isTabbing=false;this.timers=[];this.newNotification=false;this.newWindowMessage=t.formatMessage({id:"global.newWindowLink",defaultMessage:"Opens in a new window."})}a.prototype.updateSnacks=function(a){var s=this;var n=JSON.parse(a);var r=n.length;var i=this.parsedNotifications.length;this.parsedNotifications=[];for(var t=0;t<r;t++){var e={id:n[t].id.toString(),message:n[t].message.toString(),link:n[t].link.toString(),newWindow:!!n[t].newWindow};this.parsedNotifications=__spreadArray(__spreadArray([],this.parsedNotifications,true),[e],false)}if(i<this.parsedNotifications.length){var o=window.setTimeout((function(){return s.snackExpired()}),2e4);this.timers=__spreadArray([o],this.timers,true);this.storeElToFocusOnDismiss();this.newNotification=true}else{this.newNotification=false}};a.prototype.componentWillLoad=function(){this.uid=this.el.id?this.el.id:e()};a.prototype.componentDidUpdate=function(){this.isTabbing&&this.newNotification&&this.focusLinkAndDisableTimer();this.newNotification=false};a.prototype.checkForTabbing=function(a){if(a.key==="Tab"){this.toggleTabbingOn()}};a.prototype.handleMouse=function(){this.toggleTabbingOff()};a.prototype.focusLinkAndDisableTimer=function(){var a=this.parsedNotifications[0];if(a.link){var s=this.el.shadowRoot.querySelector("#action-".concat(a.id));s.focus();this.stopTimer(a)}};a.prototype.toggleTabbingOn=function(){this.isTabbing=true;this.snackbarEl&&this.snackbarEl.classList.add("user-is-tabbing")};a.prototype.toggleTabbingOff=function(){this.isTabbing=false;this.snackbarEl&&this.snackbarEl.classList.remove("user-is-tabbing")};a.prototype.storeElToFocusOnDismiss=function(){var a=document.activeElement;while(a&&a.shadowRoot){a=a.shadowRoot.activeElement}this.focusOnDismiss=a};a.prototype.snackDismissed=function(a){this.endSnack(a);a.link&&this.isTabbing&&this.focusOnDismiss.focus()};a.prototype.snackExpired=function(){var a=this.parsedNotifications[this.parsedNotifications.length-1];this.endSnack(a)};a.prototype.endSnack=function(a){this.stopTimer(a);this.wmSnackbarSnackFinished.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow});this.userFinishedSnack.emit({id:a.id,message:a.message,link:a.link})};a.prototype.snackLinkClicked=function(a){this.stopTimer(a);this.wmSnackbarActionTriggered.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow});this.userTriggeredAction.emit({id:a.id,message:a.message,link:a.link})};a.prototype.stopTimer=function(a){var s=this;this.parsedNotifications.forEach((function(n,r){if(n.id===a.id){clearTimeout(s.timers[r]);s.timers=s.timers.filter((function(a,s){if(s!==r){return a}}))}}))};a.prototype.renderSnackbars=function(){var a=this;return this.parsedNotifications.map((function(s){return r("div",{class:"wm-snack-wrapper"},r("div",{id:"snack-".concat(a.uid),class:"wm-snackbar active neutral"},r("div",{class:"sr-only",tabindex:s.link?0:-1,onFocus:function(){return s.link&&a.snackDismissed(s)}}),r("div",{class:"wm-snackbarmsg"},r("div",{class:"msgtext"},r("span",null,s.message),s.link&&r("a",{id:"action-".concat(s.id),class:"link ".concat(s.newWindow?"new-window":""),"aria-label":"Click to ".concat(s.link,"...").concat(s.newWindow?" "+a.newWindowMessage:""),tabindex:0,onClick:function(){a.snackLinkClicked(s)},onKeyDown:function(n){return n.key==="Enter"&&a.snackLinkClicked(s)}},r("span",{"aria-hidden":"true"},s.link))),r("button",{id:"close-button-".concat(s.id),"aria-label":"Close this notification",class:"closesnack",tabindex:s.link?0:-1,onClick:function(){return a.snackDismissed(s)}},r("span",{class:"tooltip","aria-hidden":"true"},"Close"))),r("div",{class:"sr-only",tabindex:s.link?0:-1,onFocus:function(){return s.link&&a.snackDismissed(s)}})))}))};a.prototype.renderLiveRegion=function(){var a=this.parsedNotifications[0];var s=this.isTabbing?"":a.link;var n="".concat(a.message," ").concat(s);var r=this.el.shadowRoot.querySelector("#wm-live-region-".concat(this.uid));if(r){r.innerHTML="";var i=document.createElement("span");i.innerHTML=n;r.appendChild(i)}};a.prototype.render=function(){var a=this;this.newNotification&&this.renderLiveRegion();var s=this.renderSnackbars();var n=this.parsedNotifications.length===0?"empty":"";return r("div",{ref:function(s){return a.snackbarEl=s},class:"wm-snackbars ".concat(n)},r("div",{class:"sr-only","aria-live":"polite","aria-atomic":"false",id:"wm-live-region-".concat(this.uid)}),s)};Object.defineProperty(a.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{notifications:["updateSnacks"]}},enumerable:false,configurable:true});return a}());c.style=o}}}));
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(a,s,n){if(n||arguments.length===2)for(var r=0,i=s.length,t;r<i;r++){if(t||!(r in s)){if(!t)t=Array.prototype.slice.call(s,0,r);t[r]=s[r]}}return a.concat(t||Array.prototype.slice.call(s))};System.register(["./p-a0c3ef16.system.js","./p-726c979a.system.js"],(function(a){"use strict";var s,n,r,i,t,e;return{setters:[function(a){s=a.r;n=a.c;r=a.h;i=a.g},function(a){t=a.i;e=a.g}],execute:function(){var o='.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active){-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 #c6b4e3;-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 #c6b4e3;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 #c6b4e3;outline:none}:host *,wm-snackbar *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:unset}:host .wm-snackbars,wm-snackbar .wm-snackbars{position:fixed;bottom:0;left:1.25rem;right:1.25rem;padding:0.25rem 0.625rem 1.875rem;z-index:2001;max-width:35.5rem;max-height:17.5rem;-webkit-overflow-scrolling:touch;overflow:auto}:host .wm-snackbars.empty,wm-snackbar .wm-snackbars.empty{-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);padding-top:0;padding-bottom:0}:host .wm-snackbars .wm-snack-wrapper,wm-snackbar .wm-snackbars .wm-snack-wrapper{width:100%;height:100%}:host .wm-snackbars .wm-snack-wrapper:not(:last-child),wm-snackbar .wm-snackbars .wm-snack-wrapper:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar{-webkit-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);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;-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);font-size:0.875rem;color:#fff;padding:0.9375rem 1.875rem;background:#4a4a4a;opacity:0;left:0;position:relative;font-family:inherit}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link{letter-spacing:0;text-transform:none;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1;color:#85dadf;margin:0 3.125rem 0 0.625rem;text-decoration:none;font-weight:600;cursor:pointer}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::after,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::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;display:inline;content:"\\f137";margin-left:0.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover{text-decoration:underline}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus{outline:none;border:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child),wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button),wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button){opacity:1}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;padding:0}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext{width:100%}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;background-color:#3b3b3b;color:#ffffff;cursor:pointer;border:none;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{min-width:1.875rem;min-height:1.875rem}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack: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:"\\f156"}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover{background-color:#fff;color:#4a4a4a}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus{outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack>.tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);font-size:0.875rem;text-transform:none;font-weight:normal;background:black;color:#fff;padding:0;line-height:normal;z-index:30}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover>.tooltip,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack.user-is-tabbing:focus>.tooltip{top:2.0625rem;left:auto}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .sr-only,wm-snackbar .wm-snackbars .wm-snack-wrapper .wm-snackbar .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}:host .sr-only,wm-snackbar .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}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{top:2.0625rem;left:auto}}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .link:focus:not(:active){outline:none;background:-webkit-gradient(linear, left top, right top, color-stop(66%, #85dadf), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, #85dadf 66%, transparent 0) repeat-x;background-size:0.375rem 0.1875rem;background-position:0 1em;border-radius:0;line-height:normal}';var c=a("wm_snackbar",function(){function a(a){s(this,a);this.wmSnackbarSnackFinished=n(this,"wmSnackbarSnackFinished",7);this.userFinishedSnack=n(this,"userFinishedSnack",7);this.wmSnackbarActionTriggered=n(this,"wmSnackbarActionTriggered",7);this.userTriggeredAction=n(this,"userTriggeredAction",7);this.notifications="[]";this.parsedNotifications=[];this.isTabbing=false;this.timers=[];this.newNotification=false;this.newWindowMessage=t.formatMessage({id:"global.newWindowLink",defaultMessage:"Opens in a new window."})}a.prototype.updateSnacks=function(a){var s=this;var n=JSON.parse(a);var r=n.length;var i=this.parsedNotifications.length;this.parsedNotifications=[];for(var t=0;t<r;t++){var e={id:n[t].id.toString(),message:n[t].message.toString(),link:n[t].link.toString(),newWindow:!!n[t].newWindow};this.parsedNotifications=__spreadArray(__spreadArray([],this.parsedNotifications,true),[e],false)}if(i<this.parsedNotifications.length){var o=window.setTimeout((function(){return s.snackExpired()}),2e4);this.timers=__spreadArray([o],this.timers,true);this.storeElToFocusOnDismiss();this.newNotification=true}else{this.newNotification=false}};a.prototype.componentWillLoad=function(){this.uid=this.el.id?this.el.id:e()};a.prototype.componentDidUpdate=function(){this.isTabbing&&this.newNotification&&this.focusLinkAndDisableTimer();this.newNotification=false};a.prototype.checkForTabbing=function(a){if(a.key==="Tab"){this.toggleTabbingOn()}};a.prototype.handleMouse=function(){this.toggleTabbingOff()};a.prototype.focusLinkAndDisableTimer=function(){var a=this.parsedNotifications[0];if(a.link){var s=this.el.shadowRoot.querySelector("#action-".concat(a.id));s.focus();this.stopTimer(a)}};a.prototype.toggleTabbingOn=function(){this.isTabbing=true;this.snackbarEl&&this.snackbarEl.classList.add("user-is-tabbing")};a.prototype.toggleTabbingOff=function(){this.isTabbing=false;this.snackbarEl&&this.snackbarEl.classList.remove("user-is-tabbing")};a.prototype.storeElToFocusOnDismiss=function(){var a=document.activeElement;while(a&&a.shadowRoot){a=a.shadowRoot.activeElement}this.focusOnDismiss=a};a.prototype.snackDismissed=function(a){this.endSnack(a);a.link&&this.isTabbing&&this.focusOnDismiss.focus()};a.prototype.snackExpired=function(){var a=this.parsedNotifications[this.parsedNotifications.length-1];this.endSnack(a)};a.prototype.endSnack=function(a){this.stopTimer(a);this.wmSnackbarSnackFinished.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow});this.userFinishedSnack.emit({id:a.id,message:a.message,link:a.link})};a.prototype.snackLinkClicked=function(a){this.stopTimer(a);this.wmSnackbarActionTriggered.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow});this.userTriggeredAction.emit({id:a.id,message:a.message,link:a.link})};a.prototype.stopTimer=function(a){var s=this;this.parsedNotifications.forEach((function(n,r){if(n.id===a.id){clearTimeout(s.timers[r]);s.timers=s.timers.filter((function(a,s){if(s!==r){return a}}))}}))};a.prototype.renderSnackbars=function(){var a=this;return this.parsedNotifications.map((function(s){return r("div",{class:"wm-snack-wrapper"},r("div",{id:"snack-".concat(a.uid),class:"wm-snackbar active neutral"},r("div",{class:"sr-only",tabindex:s.link?0:-1,onFocus:function(){return s.link&&a.snackDismissed(s)}}),r("div",{class:"wm-snackbarmsg"},r("div",{class:"msgtext"},r("span",null,s.message),s.link&&r("a",{id:"action-".concat(s.id),class:"link ".concat(s.newWindow?"new-window":""),"aria-label":"Click to ".concat(s.link,"...").concat(s.newWindow?" "+a.newWindowMessage:""),tabindex:0,onClick:function(){a.snackLinkClicked(s)},onKeyDown:function(n){return n.key==="Enter"&&a.snackLinkClicked(s)}},r("span",{"aria-hidden":"true"},s.link))),r("button",{id:"close-button-".concat(s.id),"aria-label":"Close this notification",class:"closesnack",tabindex:s.link?0:-1,onClick:function(){return a.snackDismissed(s)}},r("span",{class:"tooltip","aria-hidden":"true"},"Close"))),r("div",{class:"sr-only",tabindex:s.link?0:-1,onFocus:function(){return s.link&&a.snackDismissed(s)}})))}))};a.prototype.renderLiveRegion=function(){var a=this.parsedNotifications[0];var s=this.isTabbing?"":a.link;var n="".concat(a.message," ").concat(s);var r=this.el.shadowRoot.querySelector("#wm-live-region-".concat(this.uid));if(r){r.innerHTML="";var i=document.createElement("span");i.innerHTML=n;r.appendChild(i)}};a.prototype.render=function(){var a=this;this.newNotification&&this.renderLiveRegion();var s=this.renderSnackbars();var n=this.parsedNotifications.length===0?"empty":"";return r("div",{ref:function(s){return a.snackbarEl=s},class:"wm-snackbars ".concat(n)},r("div",{class:"sr-only","aria-live":"polite","aria-atomic":"false",id:"wm-live-region-".concat(this.uid)}),s)};Object.defineProperty(a.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(a,"watchers",{get:function(){return{notifications:["updateSnacks"]}},enumerable:false,configurable:true});return a}());c.style=o}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-a0c3ef16.system.js","./p-76ca7498.system.js"],(function(t){"use strict";var o,e,i,r,n,l,p,s,g;return{setters:[function(t){o=t.r;e=t.h;i=t.H;r=t.g},function(t){n=t.i;l=t.l;p=t.m;s=t.n;g=t.o}],execute:function(){var a=':host,wm-toggletip{display:inline-block;position:relative;height:40px;width:40px}:host .button,wm-toggletip .button{display:-ms-flexbox;display:flex;background:none;border:none;padding:0;width:inherit;height:inherit;border-radius:50%;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:relative;cursor:pointer}:host .button:before,wm-toggletip .button:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f2fc";font-size:16px;color:#4a4a4a;background:radial-gradient(white 40%, transparent 0%)}:host .button:focus,wm-toggletip .button:focus{outline:none}:host .button:focus.user-is-tabbing,wm-toggletip .button:focus.user-is-tabbing{-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 .button:focus.user-is-tabbing::-moz-focus-inner,wm-toggletip .button:focus.user-is-tabbing::-moz-focus-inner{border:0}:host .tooltip,wm-toggletip .tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);pointer-events:none;font-family:inherit;font-size:0.875rem;text-transform:none;font-weight:normal;background:black;color:#fff;padding:0.375rem;line-height:normal;z-index:30;white-space:nowrap}:host .tooltip.hover,wm-toggletip .tooltip.hover{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;white-space:nowrap}:host .toggletip,wm-toggletip .toggletip{position:absolute;max-width:13.75rem;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5rem 0.75rem;border-radius:0.1875rem;background:#4a4a4a;color:white;font-size:14px;z-index:30}:host .toggletip.top:before,wm-toggletip .toggletip.top:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:#4a4a4a;border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.bottom:before,wm-toggletip .toggletip.bottom:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:#4a4a4a;border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.right:before,wm-toggletip .toggletip.right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-right-color:#4a4a4a;border-right-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-left-width:0px;top:calc(50% - 6px);left:-0.1875rem}:host .toggletip.left:before,wm-toggletip .toggletip.left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-left-color:#4a4a4a;border-left-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-right-width:0px;top:calc(50% - 6px);right:-0.1875rem}:host .toggletip.bottom-right:before,wm-toggletip .toggletip.bottom-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:#4a4a4a;border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.bottom-left:before,wm-toggletip .toggletip.bottom-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:#4a4a4a;border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.top-right:before,wm-toggletip .toggletip.top-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:#4a4a4a;border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.top-left:before,wm-toggletip .toggletip.top-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:#4a4a4a;border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.hidden,wm-toggletip .toggletip.hidden{-webkit-transform:scale(0, 0) !important;transform:scale(0, 0) !important;visibility:hidden}:host .toggletip.top,:host .tooltip.top,wm-toggletip .toggletip.top,wm-toggletip .tooltip.top{-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%);bottom:40px;left:20px}:host .toggletip.bottom,:host .tooltip.bottom,wm-toggletip .toggletip.bottom,wm-toggletip .tooltip.bottom{-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%);top:40px;left:20px}:host .toggletip.right,:host .tooltip.right,wm-toggletip .toggletip.right,wm-toggletip .tooltip.right{-webkit-transform:translate(100%, calc(-50% - 20px));transform:translate(100%, calc(-50% - 20px));right:0px}:host .toggletip.left,:host .tooltip.left,wm-toggletip .toggletip.left,wm-toggletip .tooltip.left{-webkit-transform:translate(-100%, calc(-50% - 20px));transform:translate(-100%, calc(-50% - 20px));left:0px}:host .toggletip.bottom-right,:host .tooltip.bottom-right,wm-toggletip .toggletip.bottom-right,wm-toggletip .tooltip.bottom-right{top:40px;left:0px}:host .toggletip.bottom-left,:host .tooltip.bottom-left,wm-toggletip .toggletip.bottom-left,wm-toggletip .tooltip.bottom-left{top:40px;right:0px}:host .toggletip.top-right,:host .tooltip.top-right,wm-toggletip .toggletip.top-right,wm-toggletip .tooltip.top-right{bottom:40px;left:0px}:host .toggletip.top-left,:host .tooltip.top-left,wm-toggletip .toggletip.top-left,wm-toggletip .tooltip.top-left{bottom:40px;right:0px}:host .sr-only,wm-toggletip .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var h=t("wm_toggletip",function(){function t(t){o(this,t);this.tooltipPosition="bottom-right";this.isOpen=false;this.isTabbing=false;this.tooltipMessage=n.formatMessage({id:"toggletip.moreInformation",defaultMessage:"More information"})}Object.defineProperty(t.prototype,"tempTooltip",{get:function(){return this.tooltip||this.tooltipText},enumerable:false,configurable:true});t.prototype.componentWillLoad=function(){var t=["top","right","bottom","left","top-right","top-left","bottom-right","bottom-left"];if(!this.label){console.error("wm-toggletip must have a label property")}if(!this.tempTooltip){console.error("wm-toggletip must have a tooltip property")}if(!t.includes(this.tooltipPosition)){console.error('wm-toggletip: tooltip-position has an invalid value of "'.concat(this.tooltipPosition,'", make sure to use one of the following values: ').concat(t))}if(this.tooltipText){console.warn("wm-toggletip: tooltip-text has been deprecated as of v3.1.0. Please use tooltip instead.")}this.el.focus=function(){this.shadowRoot.querySelector("button").focus()}};t.prototype.handleKeydown=function(t){switch(t.key){case"Escape":t.preventDefault();if(this.isOpen){t.stopPropagation();this.close()}break;case"Tab":if(this.isOpen){this.close()}}};t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleClick=function(t){if(this.isOpen){if(t.target===this.el||this.el.contains(t.target)){this.announceToggletip()}else{this.close()}}};t.prototype.open=function(){this.isOpen=true;this.announceToggletip()};t.prototype.close=function(){this.isOpen=false;this.hideTooltip()};t.prototype.showTooltip=function(){this.setToggletipPosition();this.tooltipEl.classList.add("hover")};t.prototype.hideTooltip=function(){this.tooltipEl.classList.remove("hover")};t.prototype.announceToggletip=function(){var t=this;this.liveRegionEl.innerHTML="";setTimeout((function(){t.liveRegionEl.innerHTML=t.tempTooltip}),10)};t.prototype.setToggletipPosition=function(){if(this.tooltipPosition.includes("bottom")&&l(this.el,this.toggletipEl)){this.tooltipPosition=this.tooltipPosition.replace("bottom","top")}else if(this.tooltipPosition.includes("top")&&p(this.el,this.toggletipEl)){this.tooltipPosition=this.tooltipPosition.replace("top","bottom")}if(this.tooltipPosition.includes("left")&&s(this.el,this.toggletipEl)){this.tooltipPosition=this.tooltipPosition.replace("left","right")}else if(this.tooltipPosition.includes("right")&&g(this.el,this.toggletipEl)){this.tooltipPosition=this.tooltipPosition.replace("right","left")}};t.prototype.render=function(){var t=this;return e(i,null,e("button",{class:"button ".concat(this.isTabbing?"user-is-tabbing":""),type:"button","aria-label":this.label,onClick:function(){t.setToggletipPosition();t.open()},onMouseEnter:function(){return t.showTooltip()},onMouseLeave:function(){return t.hideTooltip()},onFocus:function(){return t.showTooltip()},onBlur:function(){return t.hideTooltip()}}),e("div",{ref:function(o){return t.tooltipEl=o},class:"tooltip ".concat(this.tooltipPosition," ").concat(this.isOpen?"hidden":""),"aria-hidden":"true"},this.tooltipMessage),e("div",{ref:function(o){return t.toggletipEl=o},class:"toggletip ".concat(this.isOpen?"":"hidden"," ").concat(this.tooltipPosition)},this.tempTooltip),e("div",{ref:function(o){return t.liveRegionEl=o},class:"live-region sr-only",role:"status","aria-live":"polite","aria-atomic":"true"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());h.style=a}}}));
|
|
1
|
+
System.register(["./p-a0c3ef16.system.js","./p-726c979a.system.js"],(function(t){"use strict";var o,e,i,r,n,l,p,s,g;return{setters:[function(t){o=t.r;e=t.h;i=t.H;r=t.g},function(t){n=t.i;l=t.l;p=t.m;s=t.n;g=t.o}],execute:function(){var a=':host,wm-toggletip{display:inline-block;position:relative;height:40px;width:40px}:host .button,wm-toggletip .button{display:-ms-flexbox;display:flex;background:none;border:none;padding:0;width:inherit;height:inherit;border-radius:50%;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:relative;cursor:pointer}:host .button:before,wm-toggletip .button:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f2fc";font-size:16px;color:#4a4a4a;background:radial-gradient(white 40%, transparent 0%)}:host .button:focus,wm-toggletip .button:focus{outline:none}:host .button:focus.user-is-tabbing,wm-toggletip .button:focus.user-is-tabbing{-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 .button:focus.user-is-tabbing::-moz-focus-inner,wm-toggletip .button:focus.user-is-tabbing::-moz-focus-inner{border:0}:host .tooltip,wm-toggletip .tooltip{position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip:rect(0, 0, 0, 0);pointer-events:none;font-family:inherit;font-size:0.875rem;text-transform:none;font-weight:normal;background:black;color:#fff;padding:0.375rem;line-height:normal;z-index:30;white-space:nowrap}:host .tooltip.hover,wm-toggletip .tooltip.hover{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;white-space:nowrap}:host .toggletip,wm-toggletip .toggletip{position:absolute;max-width:13.75rem;width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5rem 0.75rem;border-radius:0.1875rem;background:#4a4a4a;color:white;font-size:14px;z-index:30}:host .toggletip.top:before,wm-toggletip .toggletip.top:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:#4a4a4a;border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.bottom:before,wm-toggletip .toggletip.bottom:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:#4a4a4a;border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%}:host .toggletip.right:before,wm-toggletip .toggletip.right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-right-color:#4a4a4a;border-right-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-left-width:0px;top:calc(50% - 6px);left:-0.1875rem}:host .toggletip.left:before,wm-toggletip .toggletip.left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-left-color:#4a4a4a;border-left-width:0.25rem;border-top-width:0.375rem;border-bottom-width:0.375rem;border-right-width:0px;top:calc(50% - 6px);right:-0.1875rem}:host .toggletip.bottom-right:before,wm-toggletip .toggletip.bottom-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:#4a4a4a;border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.bottom-left:before,wm-toggletip .toggletip.bottom-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;bottom:100%;border-bottom-color:#4a4a4a;border-bottom-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.top-right:before,wm-toggletip .toggletip.top-right:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:#4a4a4a;border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;margin-left:unset;left:0.875rem}:host .toggletip.top-left:before,wm-toggletip .toggletip.top-left:before{content:"";position:absolute;border:solid transparent;height:0;width:0;pointer-events:none;top:100%;border-top-color:#4a4a4a;border-top-width:0.25rem;border-left-width:0.375rem;border-right-width:0.375rem;margin-left:-0.375rem;left:50%;left:unset;margin-left:unset;right:0.875rem}:host .toggletip.hidden,wm-toggletip .toggletip.hidden{-webkit-transform:scale(0, 0) !important;transform:scale(0, 0) !important;visibility:hidden}:host .toggletip.top,:host .tooltip.top,wm-toggletip .toggletip.top,wm-toggletip .tooltip.top{-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%);bottom:40px;left:20px}:host .toggletip.bottom,:host .tooltip.bottom,wm-toggletip .toggletip.bottom,wm-toggletip .tooltip.bottom{-webkit-transform:translate(-50%, 0%);transform:translate(-50%, 0%);top:40px;left:20px}:host .toggletip.right,:host .tooltip.right,wm-toggletip .toggletip.right,wm-toggletip .tooltip.right{-webkit-transform:translate(100%, calc(-50% - 20px));transform:translate(100%, calc(-50% - 20px));right:0px}:host .toggletip.left,:host .tooltip.left,wm-toggletip .toggletip.left,wm-toggletip .tooltip.left{-webkit-transform:translate(-100%, calc(-50% - 20px));transform:translate(-100%, calc(-50% - 20px));left:0px}:host .toggletip.bottom-right,:host .tooltip.bottom-right,wm-toggletip .toggletip.bottom-right,wm-toggletip .tooltip.bottom-right{top:40px;left:0px}:host .toggletip.bottom-left,:host .tooltip.bottom-left,wm-toggletip .toggletip.bottom-left,wm-toggletip .tooltip.bottom-left{top:40px;right:0px}:host .toggletip.top-right,:host .tooltip.top-right,wm-toggletip .toggletip.top-right,wm-toggletip .tooltip.top-right{bottom:40px;left:0px}:host .toggletip.top-left,:host .tooltip.top-left,wm-toggletip .toggletip.top-left,wm-toggletip .tooltip.top-left{bottom:40px;right:0px}:host .sr-only,wm-toggletip .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var h=t("wm_toggletip",function(){function t(t){o(this,t);this.tooltipPosition="bottom-right";this.isOpen=false;this.isTabbing=false;this.tooltipMessage=n.formatMessage({id:"toggletip.moreInformation",defaultMessage:"More information"})}Object.defineProperty(t.prototype,"tempTooltip",{get:function(){return this.tooltip||this.tooltipText},enumerable:false,configurable:true});t.prototype.componentWillLoad=function(){var t=["top","right","bottom","left","top-right","top-left","bottom-right","bottom-left"];if(!this.label){console.error("wm-toggletip must have a label property")}if(!this.tempTooltip){console.error("wm-toggletip must have a tooltip property")}if(!t.includes(this.tooltipPosition)){console.error('wm-toggletip: tooltip-position has an invalid value of "'.concat(this.tooltipPosition,'", make sure to use one of the following values: ').concat(t))}if(this.tooltipText){console.warn("wm-toggletip: tooltip-text has been deprecated as of v3.1.0. Please use tooltip instead.")}this.el.focus=function(){this.shadowRoot.querySelector("button").focus()}};t.prototype.handleKeydown=function(t){switch(t.key){case"Escape":t.preventDefault();if(this.isOpen){t.stopPropagation();this.close()}break;case"Tab":if(this.isOpen){this.close()}}};t.prototype.toggleTabbingOn=function(){this.isTabbing=true};t.prototype.toggleTabbingOff=function(){this.isTabbing=false};t.prototype.handleClick=function(t){if(this.isOpen){if(t.target===this.el||this.el.contains(t.target)){this.announceToggletip()}else{this.close()}}};t.prototype.open=function(){this.isOpen=true;this.announceToggletip()};t.prototype.close=function(){this.isOpen=false;this.hideTooltip()};t.prototype.showTooltip=function(){this.setToggletipPosition();this.tooltipEl.classList.add("hover")};t.prototype.hideTooltip=function(){this.tooltipEl.classList.remove("hover")};t.prototype.announceToggletip=function(){var t=this;this.liveRegionEl.innerHTML="";setTimeout((function(){t.liveRegionEl.innerHTML=t.tempTooltip}),10)};t.prototype.setToggletipPosition=function(){if(this.tooltipPosition.includes("bottom")&&l(this.el,this.toggletipEl)){this.tooltipPosition=this.tooltipPosition.replace("bottom","top")}else if(this.tooltipPosition.includes("top")&&p(this.el,this.toggletipEl)){this.tooltipPosition=this.tooltipPosition.replace("top","bottom")}if(this.tooltipPosition.includes("left")&&s(this.el,this.toggletipEl)){this.tooltipPosition=this.tooltipPosition.replace("left","right")}else if(this.tooltipPosition.includes("right")&&g(this.el,this.toggletipEl)){this.tooltipPosition=this.tooltipPosition.replace("right","left")}};t.prototype.render=function(){var t=this;return e(i,null,e("button",{class:"button ".concat(this.isTabbing?"user-is-tabbing":""),type:"button","aria-label":this.label,onClick:function(){t.setToggletipPosition();t.open()},onMouseEnter:function(){return t.showTooltip()},onMouseLeave:function(){return t.hideTooltip()},onFocus:function(){return t.showTooltip()},onBlur:function(){return t.hideTooltip()}}),e("div",{ref:function(o){return t.tooltipEl=o},class:"tooltip ".concat(this.tooltipPosition," ").concat(this.isOpen?"hidden":""),"aria-hidden":"true"},this.tooltipMessage),e("div",{ref:function(o){return t.toggletipEl=o},class:"toggletip ".concat(this.isOpen?"":"hidden"," ").concat(this.tooltipPosition)},this.tempTooltip),e("div",{ref:function(o){return t.liveRegionEl=o},class:"live-region sr-only",role:"status","aria-live":"polite","aria-atomic":"true"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());h.style=a}}}));
|
|
@@ -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-a0c3ef16.system.js","./p-f5df5903.system.js","./p-726c979a.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}}}));
|