@watermarkinsights/ripple 3.36.0 → 3.36.1
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-41c67866.js → chartFunctions-dcefe35e.js} +1 -1
- package/dist/cjs/{functions-45f36418.js → functions-b85d9b0c.js} +1 -1
- package/dist/cjs/{global-c795cff3.js → global-3efdaff1.js} +1 -1
- package/dist/cjs/{intl-a84cd5ef.js → intl-800e0638.js} +1 -1
- 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 +9 -2
- package/dist/cjs/wm-chart.cjs.entry.js +3 -3
- package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-file.cjs.entry.js +1 -1
- package/dist/cjs/wm-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
- package/dist/cjs/wm-modal-header.cjs.entry.js +2 -2
- package/dist/cjs/wm-modal.cjs.entry.js +1 -1
- package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
- package/dist/cjs/wm-network-uploader.cjs.entry.js +2 -2
- package/dist/cjs/wm-option_2.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
- package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/wm-button/wm-button.js +8 -1
- package/dist/collection/components/wm-button/wm-button.spec.js +6 -0
- package/dist/esm/{chartFunctions-e539d991.js → chartFunctions-38758d18.js} +1 -1
- package/dist/esm/{functions-7fc7cf30.js → functions-da3b00cf.js} +1 -1
- package/dist/esm/{global-1dca883b.js → global-0469a5f5.js} +1 -1
- package/dist/esm/{intl-f0475a8e.js → intl-3eb5074d.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-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 +9 -2
- package/dist/esm/wm-chart.entry.js +3 -3
- package/dist/esm/wm-datepicker.entry.js +1 -1
- package/dist/esm/wm-file.entry.js +1 -1
- package/dist/esm/wm-input.entry.js +2 -2
- package/dist/esm/wm-line-chart.entry.js +3 -3
- package/dist/esm/wm-modal-header.entry.js +2 -2
- package/dist/esm/wm-modal.entry.js +1 -1
- package/dist/esm/wm-navigation_3.entry.js +2 -2
- package/dist/esm/wm-navigator.entry.js +1 -1
- package/dist/esm/wm-network-uploader.entry.js +2 -2
- package/dist/esm/wm-option_2.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/wm-snackbar.entry.js +2 -2
- package/dist/esm/wm-tab-item_3.entry.js +1 -1
- package/dist/esm/wm-tag-input.entry.js +2 -2
- package/dist/esm/wm-timepicker.entry.js +1 -1
- package/dist/esm/wm-toggletip.entry.js +1 -1
- package/dist/esm/wm-uploader.entry.js +2 -2
- package/dist/esm-es5/{chartFunctions-e539d991.js → chartFunctions-38758d18.js} +1 -1
- package/dist/esm-es5/{functions-7fc7cf30.js → functions-da3b00cf.js} +1 -1
- package/dist/esm-es5/{global-1dca883b.js → global-0469a5f5.js} +1 -1
- package/dist/esm-es5/{intl-f0475a8e.js → intl-3eb5074d.js} +1 -1
- 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-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-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-1cb7bdc5.entry.js → p-14e956bd.entry.js} +1 -1
- package/dist/ripple/{p-5d78937a.entry.js → p-1678e4b5.entry.js} +1 -1
- package/dist/ripple/{p-4a58b0ff.system.entry.js → p-172fa114.system.entry.js} +1 -1
- package/dist/ripple/{p-a9012b82.system.entry.js → p-1984e1c7.system.entry.js} +1 -1
- package/dist/ripple/{p-2b378ac6.js → p-1eb5a93a.js} +1 -1
- package/dist/ripple/{p-6639cf6c.entry.js → p-203152e7.entry.js} +1 -1
- package/dist/ripple/{p-cabf1867.system.entry.js → p-249597a9.system.entry.js} +1 -1
- package/dist/ripple/{p-f3ff86da.entry.js → p-2683ea3a.entry.js} +1 -1
- package/dist/ripple/{p-56747d40.system.entry.js → p-2c049e82.system.entry.js} +1 -1
- package/dist/ripple/{p-0872dd92.entry.js → p-2c9fa4e1.entry.js} +1 -1
- package/dist/ripple/{p-936e078c.system.js → p-2e52e36f.system.js} +1 -1
- package/dist/ripple/{p-212d0c64.entry.js → p-32c8a588.entry.js} +1 -1
- package/dist/ripple/{p-24ac418e.system.entry.js → p-3642dff3.system.entry.js} +1 -1
- package/dist/ripple/{p-935eafa7.system.entry.js → p-3b138cf2.system.entry.js} +1 -1
- package/dist/ripple/{p-fd0fc5e1.system.entry.js → p-3cc86126.system.entry.js} +1 -1
- package/dist/ripple/{p-6628e036.system.entry.js → p-427747c5.system.entry.js} +1 -1
- package/dist/ripple/{p-5da6b9ff.system.entry.js → p-4891e621.system.entry.js} +1 -1
- package/dist/ripple/{p-6546dda7.entry.js → p-5c2d6dae.entry.js} +1 -1
- package/dist/ripple/{p-765b53d8.system.entry.js → p-63abf623.system.entry.js} +1 -1
- package/dist/ripple/{p-16708229.js → p-69092dc0.js} +1 -1
- package/dist/ripple/{p-74880dac.system.entry.js → p-6fb4eb05.system.entry.js} +1 -1
- package/dist/ripple/{p-08e0007e.system.entry.js → p-70bcec5b.system.entry.js} +1 -1
- package/dist/ripple/{p-d4ebbe84.system.js → p-7eb9bac9.system.js} +1 -1
- package/dist/ripple/{p-71ecba7e.system.entry.js → p-7f1c918f.system.entry.js} +1 -1
- package/dist/ripple/{p-0730d70d.system.entry.js → p-81c40ed3.system.entry.js} +1 -1
- package/dist/ripple/{p-a6317ac6.entry.js → p-81c52231.entry.js} +1 -1
- package/dist/ripple/{p-64abb6d9.system.entry.js → p-86878f67.system.entry.js} +1 -1
- package/dist/ripple/{p-e4f352fe.system.js → p-975c0d09.system.js} +1 -1
- package/dist/ripple/{p-766a4a70.system.entry.js → p-9be73edd.system.entry.js} +1 -1
- package/dist/ripple/{p-89bc016a.js → p-9f3a6192.js} +1 -1
- package/dist/ripple/{p-770f02d4.entry.js → p-a3ce6f93.entry.js} +1 -1
- package/dist/ripple/{p-00850d97.entry.js → p-a7dd417d.entry.js} +1 -1
- package/dist/ripple/{p-0a846e45.entry.js → p-aa3f9686.entry.js} +1 -1
- package/dist/ripple/{p-20495238.js → p-af1d2a68.js} +1 -1
- package/dist/ripple/{p-1a7b1578.system.js → p-b3c4e012.system.js} +1 -1
- package/dist/ripple/{p-4418858d.entry.js → p-bdce95d4.entry.js} +1 -1
- package/dist/ripple/{p-b22858cd.entry.js → p-be78d6db.entry.js} +1 -1
- package/dist/ripple/{p-4d5e075b.system.entry.js → p-bf85a915.system.entry.js} +1 -1
- package/dist/ripple/{p-29960160.system.entry.js → p-c1b36890.system.entry.js} +1 -1
- package/dist/ripple/{p-53b84f6d.entry.js → p-c44fb391.entry.js} +1 -1
- package/dist/ripple/{p-d9268ba1.system.entry.js → p-cd01caeb.system.entry.js} +1 -1
- package/dist/ripple/{p-b111bc7d.entry.js → p-d26d60fd.entry.js} +1 -1
- package/dist/ripple/{p-68f11410.entry.js → p-d3353dda.entry.js} +1 -1
- package/dist/ripple/{p-a7a9c931.entry.js → p-d3b54132.entry.js} +1 -1
- package/dist/ripple/{p-77ea81c7.system.entry.js → p-d3df5034.system.entry.js} +1 -1
- package/dist/ripple/{p-f1aed810.system.entry.js → p-da048416.system.entry.js} +1 -1
- package/dist/ripple/{p-23a5adae.entry.js → p-dea254a1.entry.js} +1 -1
- package/dist/ripple/{p-5e005259.system.entry.js → p-e527bff3.system.entry.js} +1 -1
- package/dist/ripple/p-e54add34.entry.js +1 -0
- package/dist/ripple/{p-7b91eba4.system.entry.js → p-e5e28616.system.entry.js} +1 -1
- package/dist/ripple/{p-2bbf689a.system.entry.js → p-e8732b27.system.entry.js} +1 -1
- package/dist/ripple/{p-8a38e526.system.js → p-ef635a54.system.js} +1 -1
- package/dist/ripple/{p-6f36e973.entry.js → p-f2f4b743.entry.js} +1 -1
- package/dist/ripple/{p-69c802aa.entry.js → p-f3184d03.entry.js} +1 -1
- package/dist/ripple/{p-cd67e184.entry.js → p-f7391b66.entry.js} +1 -1
- package/dist/ripple/{p-f9e942f6.entry.js → p-fbb44d4c.entry.js} +1 -1
- package/dist/ripple/{p-63466d04.entry.js → p-fcb4328c.entry.js} +1 -1
- 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 +2 -0
- package/package.json +1 -1
- package/dist/ripple/p-dc069d46.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register([],(function(){"use strict";return{execute:function(){var o="3.36.0";function r(){var o="\n :root {\n /* Color Palette */\n --wmcolor-acidwashjeans: #9bb6d7;\n --wmcolor-asphalt: #353b48;\n --wmcolor-asphalt-light: #454b57;\n --wmcolor-cement: #afadb1;\n --wmcolor-charcoal: #4a4a4a;\n --wmcolor-cowboyjeans: #18314E;\n --wmcolor-cyan: #19a1a9;\n --wmcolor-cyan-dark: #15868d;\n --wmcolor-cyan-darker: #116b71;\n --wmcolor-cyber: #ddf1f2;\n --wmcolor-dadjeans: #244974;\n --wmcolor-firetruck: #c0392b;\n --wmcolor-firetruck-dark: #9a2e22;\n --wmcolor-firetruck-darker: #73221a;\n --wmcolor-firetruck-light: #f6e1df;\n --wmcolor-forest: #088000;\n --wmcolor-forest-dark: #054d00;\n --wmcolor-forest-light: #daecd9;\n --wmcolor-gray: #6b6b6b;\n --wmcolor-gray-light: #A6A6A6;\n --wmcolor-lavender: #8B86CA;\n --wmcolor-linen: #E1E9F3;\n --wmcolor-meteorite: #454b57;\n --wmcolor-midnight: #2e1b46;\n --wmcolor-momjeans: #366dae;\n --wmcolor-brightblue: #3862e9;\n --wmcolor-palelilacgray: #e9e7ec;\n --wmcolor-palelilacgray-dark: #d2d0d4;\n --wmcolor-paleviolet: #eeedf7;\n --wmcolor-periwinkle: #575195;\n --wmcolor-periwinkle-dark: #464177;\n --wmcolor-salmon: #ff5f4e;\n --wmcolor-salmon-dark: #cc4c3e;\n --wmcolor-salmon-darker: #a33d32;\n --wmcolor-snow: #fafafa;\n --wmcolor-transparent: transparent;\n --wmcolor-violet: #61279e;\n --wmcolor-violet-light: #c6b4e3;\n --wmcolor-white: #fff;\n --wmcolor-whitesmoke: #f4f4f4;\n\n /* Base Tokens */\n --wmcolor-background-dark-secondary: var(--wmcolor-meteorite);\n --wmcolor-background-dark: var(--wmcolor-asphalt);\n --wmcolor-background-disabled: var(--wmcolor-whitesmoke);\n --wmcolor-background-error: var(--wmcolor-firetruck-light);\n --wmcolor-background-highlight: var(--wmcolor-cyber);\n --wmcolor-background-positive: var(--wmcolor-forest-light);\n --wmcolor-background-readonly: var(--wmcolor-whitesmoke);\n --wmcolor-background-selected: var(--wmcolor-paleviolet);\n --wmcolor-background-transparent: var(--wmcolor-transparent);\n --wmcolor-background: var(--wmcolor-white);\n --wmcolor-border-dark: var(--wmcolor-charcoal);\n --wmcolor-border-error: var(--wmcolor-negative);\n --wmcolor-border-focus: var(--wmcolor-cyan);\n --wmcolor-border-light: var(--wmcolor-whitesmoke);\n --wmcolor-border: var(--wmcolor-palelilacgray-dark);\n --wmcolor-brand-dark: var(--wmcolor-midnight); \n --wmcolor-brand: var(--wmcolor-periwinkle);\n --wmcolor-card-background: var(--wmcolor-white);\n --wmcolor-icon-accent: var(--wmcolor-gray);\n --wmcolor-interactive-background-focus: var(--wmcolor-palelilacgray);\n --wmcolor-interactive-background-hover: var(--wmcolor-whitesmoke);\n --wmcolor-interactive-delete-hover: var(--wmcolor-firetruck-dark);\n --wmcolor-interactive-delete: var(--wmcolor-firetruck);\n --wmcolor-interactive-disabled-ondark: var(--wmcolor-gray-light);\n --wmcolor-interactive-disabled: var(--wmcolor-gray);\n --wmcolor-interactive-focus-ondark: var(--wmcolor-violet-light);\n --wmcolor-interactive-focus-textonly-ondark: var(--wmcolor-white);\n --wmcolor-interactive-focus-textonly: var(--wmcolor-brightblue);\n --wmcolor-interactive-focus: var(--wmcolor-violet);\n --wmcolor-interactive-hover-ondark: var(--wmcolor-palelilacgray);\n --wmcolor-interactive-hover: var(--wmcolor-periwinkle-dark);\n --wmcolor-interactive-negative-hover: var(--wmcolor-salmon-darker);\n --wmcolor-interactive-negative: var(--wmcolor-salmon-dark);\n --wmcolor-interactive-ondark: var(--wmcolor-white);\n --wmcolor-interactive-positive-hover: var(--wmcolor-cyan-darker);\n --wmcolor-interactive-positive: var(--wmcolor-cyan-dark);\n --wmcolor-interactive-text-disabled-ondark: var(--wmcolor-asphalt);\n --wmcolor-interactive-text-ondark: var(--wmcolor-brand);\n --wmcolor-interactive-text-selected: var(--wmcolor-interactive-text);\n --wmcolor-interactive-text: var(--wmcolor-white);\n --wmcolor-interactive: var(--wmcolor-brand);\n --wmcolor-link-text: var(--wmcolor-interactive);\n --wmcolor-negative: var(--wmcolor-firetruck);\n --wmcolor-option-background-focus: var(--wmcolor-palelilacgray); \n --wmcolor-option-background-hover: var(--wmcolor-interactive-background-hover);\n --wmcolor-option-background: var(--wmcolor-background);\n --wmcolor-option-border: var(--wmcolor-border-light);\n --wmcolor-option-text-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-option-text: var(--wmcolor-text);\n --wmcolor-overlay: rgba(25,25,25,0.4);\n --wmcolor-positive-dark: var(--wmcolor-forest-dark);\n --wmcolor-positive: var(--wmcolor-forest);\n --wmcolor-progress: var(--wmcolor-cyan-dark);\n --wmcolor-table-altrow-background: var(--wmcolor-snow);\n --wmcolor-table-header-background: var(--wmcolor-palelilacgray);\n --wmcolor-table-row-background-selected: var(--wmcolor-background-highlight);\n --wmcolor-table-row-background: var(--wmcolor-white);\n --wmcolor-table-row-border-selected: var(--wmcolor-border-focus);\n --wmcolor-text-error: var(--wmcolor-negative);\n --wmcolor-text-negative: var(--wmcolor-firetruck);\n --wmcolor-text-ondark: var(--wmcolor-white);\n --wmcolor-text-positive: var(--wmcolor-positive);\n --wmcolor-text-required: var(--wmcolor-negative);\n --wmcolor-text: var(--wmcolor-charcoal);\n --wmcolor-tooltip-background: black; /* EXCEPTION */\n --wmcolor-tooltip-text: var(--wmcolor-text-ondark);\n\n /* Shared Tokens */\n --wmcolor-button-background-delete-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-background-delete-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-delete-hover: var(--wmcolor-interactive-delete-hover);\n --wmcolor-button-background-delete: var(--wmcolor-interactive-delete);\n --wmcolor-button-background-icononly-hover-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-background-icononly-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-icononly-ondark: var(--wmcolor-background-transparent);\n --wmcolor-button-background-icononly: var(--wmcolor-background);\n --wmcolor-button-background-navigational-hover-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-background-navigational-hover: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-navigational-ondark: var(--wmcolor-background-transparent);\n --wmcolor-button-background-navigational: var(--wmcolor-background-transparent);\n --wmcolor-button-background-negative-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-negative-hover: var(--wmcolor-interactive-negative-hover);\n --wmcolor-button-background-negative: var(--wmcolor-interactive-negative);\n --wmcolor-button-background-positive-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-positive-hover: var(--wmcolor-interactive-positive-hover);\n --wmcolor-button-background-positive: var(--wmcolor-interactive-positive);\n --wmcolor-button-background-primary-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-background-primary-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-primary-hover-ondark: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-primary-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-primary-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-background-primary: var(--wmcolor-interactive);\n --wmcolor-button-background-secondary-hover-ondark: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-secondary-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-secondary-ondark: var(--wmcolor-background-transparent);\n --wmcolor-button-background-secondary: var(--wmcolor-background);\n --wmcolor-button-background-selector-hover-ondark: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-selector-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-selector-ondark: var(--wmcolor-background-transparent);\n --wmcolor-button-background-selector: var(--wmcolor-background);\n --wmcolor-button-background-selectorprimary-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-background-selectorprimary-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-selectorprimary-hover-ondark: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-selectorprimary-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-selectorprimary-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-background-selectorprimary: var(--wmcolor-interactive);\n --wmcolor-button-border-icononly-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-border-icononly-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-border-icononly-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-border-icononly: var(--wmcolor-interactive);\n --wmcolor-button-border-secondary-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-border-secondary-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-border-secondary-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-border-secondary: var(--wmcolor-interactive);\n --wmcolor-button-border-selector-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-border-selector-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-border-selector-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-border-selector: var(--wmcolor-interactive);\n --wmcolor-button-icon-icononly-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-icon-icononly-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-icon-icononly-hover-ondark: var(--wmcolor-interactive);\n --wmcolor-button-icon-icononly-hover: var(--wmcolor-interactive-ondark);\n --wmcolor-button-icon-icononly-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-icon-icononly: var(--wmcolor-interactive);\n --wmcolor-button-icon-navigational-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-icon-navigational-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-icon-navigational-hover-ondark: var(--wmcolor-interactive);\n --wmcolor-button-icon-navigational-hover: var(--wmcolor-interactive);\n --wmcolor-button-icon-navigational-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-icon-navigational: var(--wmcolor-interactive);\n --wmcolor-button-text-delete-disabled-ondark: var(--wmcolor-interactive-text-disabled-ondark);\n --wmcolor-button-text-delete-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-delete: var(--wmcolor-interactive-text);\n --wmcolor-button-text-negative-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-negative: var(--wmcolor-interactive-text);\n --wmcolor-button-text-positive-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-positive: var(--wmcolor-interactive-text);\n --wmcolor-button-text-primary-disabled-ondark: var(--wmcolor-interactive-text-disabled-ondark);\n --wmcolor-button-text-primary-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-primary-ondark: var(--wmcolor-interactive-text-ondark);\n --wmcolor-button-text-primary: var(--wmcolor-interactive-text);\n --wmcolor-button-text-secondary-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-text-secondary-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-text-secondary-hover-ondark: var(--wmcolor-interactive);\n --wmcolor-button-text-secondary-hover: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-secondary-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-secondary: var(--wmcolor-interactive);\n --wmcolor-button-text-selector-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-text-selector-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-text-selector-hover-ondark: var(--wmcolor-interactive);\n --wmcolor-button-text-selector-hover: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-selector-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-selector: var(--wmcolor-interactive);\n --wmcolor-button-text-selectorprimary-disabled-ondark: var(--wmcolor-interactive-text-disabled-ondark);\n --wmcolor-button-text-selectorprimary-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-selectorprimary-ondark: var(--wmcolor-interactive-text-ondark);\n --wmcolor-button-text-selectorprimary: var(--wmcolor-interactive-text);\n --wmcolor-button-text-textonly-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-text-textonly-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-text-textonly-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-textonly: var(--wmcolor-interactive);\n --wmcolor-chart-gridline: var(--wmcolor-border);\n --wmcolor-chart-popover-background: var(--wmcolor-background);\n --wmcolor-input-background-disabled: var(--wmcolor-background-disabled);\n --wmcolor-input-background: var(--wmcolor-background);\n --wmcolor-input-border-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-input-border-error: var(--wmcolor-border-error);\n --wmcolor-input-border-focus: var(--wmcolor-border-focus);\n --wmcolor-input-border: var(--wmcolor-border-dark);\n --wmcolor-input-charcount-background: var(--wmcolor-background-readonly);\n --wmcolor-input-text-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-input-text: var(--wmcolor-text);\n --wmcolor-input-unit-background: var(--wmcolor-background-readonly);\n }\n ";var r=document.createElement("style");r.textContent=o;document.head.appendChild(r)}function n(){var o='\n :root[wm-theme="neutral"] {\n --wmcolor-brand: var(--wmcolor-momjeans);\n --wmcolor-brand-dark: var(--wmcolor-cowboyjeans);\n --wmcolor-interactive-focus-ondark: var(--wmcolor-acidwashjeans);\n --wmcolor-interactive-focus: var(--wmcolor-brightblue);\n --wmcolor-interactive-hover: var(--wmcolor-dadjeans);\n --wmcolor-background-selected: var(--wmcolor-linen);\n }\n ';var r=document.createElement("style");r.textContent=o;document.head.appendChild(r)}if(window.navigator.plugins.length>0){console.log("Ripple component library",o)}function t(o){if(o.key=="Tab"){var r=new Event("wmUserIsTabbing");window.dispatchEvent(r);document.querySelector("body").classList.add("wmcl-user-is-tabbing")}if(o.key=="ArrowLeft"||o.key=="ArrowUp"||o.key=="ArrowRight"||o.key=="ArrowDown"){var r=new Event("wmUserIsKeying");window.dispatchEvent(r);document.querySelector("body").classList.add("wmcl-user-is-keying")}}function e(){var o=new Event("wmUserIsNotTabbing");window.dispatchEvent(o);document.querySelector("body").classList.remove("wmcl-user-is-tabbing");document.querySelector("body").classList.remove("wmcl-user-is-keying")}window.addEventListener("keydown",t);window.addEventListener("mousedown",e);var a=document.createElement("div");a.id="wm-tooltip-container";var c=document.createElement("div");c.id="wm-tooltip";c.setAttribute("aria-hidden","true");var l=document.createElement("style");l.textContent="\n#wm-tooltip {\n position: fixed;\n overflow: hidden;\n pointer-events: none;\n line-height: normal;\n font-family: inherit;\n font-size: 0.875rem;\n text-transform: none;\n font-weight: normal;\n background: var(--wmcolor-tooltip-background);\n color: var(--wmcolor-tooltip-text);\n z-index: 999999;\n max-width: var(--wmTooltipMaxWidth, 13.75rem);\n margin-right: 1.5rem;\n padding: 0.375rem;\n transition-property: opacity;\n transition-delay: 0s;\n opacity: 0;\n top: 0;\n left: 0;\n transform: translateZ(0);\n will-change: transform;\n transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));\n}\n\n#wm-tooltip.show {\n transition-delay: 500ms;\n opacity: 1;\n}\n";document.head.appendChild(l);a.appendChild(c);document.querySelector("body").appendChild(a);r();document.documentElement.getAttribute("wm-theme")=="neutral"&&n()}}}));
|
|
1
|
+
System.register([],(function(){"use strict";return{execute:function(){var o="3.36.1";function r(){var o="\n :root {\n /* Color Palette */\n --wmcolor-acidwashjeans: #9bb6d7;\n --wmcolor-asphalt: #353b48;\n --wmcolor-asphalt-light: #454b57;\n --wmcolor-cement: #afadb1;\n --wmcolor-charcoal: #4a4a4a;\n --wmcolor-cowboyjeans: #18314E;\n --wmcolor-cyan: #19a1a9;\n --wmcolor-cyan-dark: #15868d;\n --wmcolor-cyan-darker: #116b71;\n --wmcolor-cyber: #ddf1f2;\n --wmcolor-dadjeans: #244974;\n --wmcolor-firetruck: #c0392b;\n --wmcolor-firetruck-dark: #9a2e22;\n --wmcolor-firetruck-darker: #73221a;\n --wmcolor-firetruck-light: #f6e1df;\n --wmcolor-forest: #088000;\n --wmcolor-forest-dark: #054d00;\n --wmcolor-forest-light: #daecd9;\n --wmcolor-gray: #6b6b6b;\n --wmcolor-gray-light: #A6A6A6;\n --wmcolor-lavender: #8B86CA;\n --wmcolor-linen: #E1E9F3;\n --wmcolor-meteorite: #454b57;\n --wmcolor-midnight: #2e1b46;\n --wmcolor-momjeans: #366dae;\n --wmcolor-brightblue: #3862e9;\n --wmcolor-palelilacgray: #e9e7ec;\n --wmcolor-palelilacgray-dark: #d2d0d4;\n --wmcolor-paleviolet: #eeedf7;\n --wmcolor-periwinkle: #575195;\n --wmcolor-periwinkle-dark: #464177;\n --wmcolor-salmon: #ff5f4e;\n --wmcolor-salmon-dark: #cc4c3e;\n --wmcolor-salmon-darker: #a33d32;\n --wmcolor-snow: #fafafa;\n --wmcolor-transparent: transparent;\n --wmcolor-violet: #61279e;\n --wmcolor-violet-light: #c6b4e3;\n --wmcolor-white: #fff;\n --wmcolor-whitesmoke: #f4f4f4;\n\n /* Base Tokens */\n --wmcolor-background-dark-secondary: var(--wmcolor-meteorite);\n --wmcolor-background-dark: var(--wmcolor-asphalt);\n --wmcolor-background-disabled: var(--wmcolor-whitesmoke);\n --wmcolor-background-error: var(--wmcolor-firetruck-light);\n --wmcolor-background-highlight: var(--wmcolor-cyber);\n --wmcolor-background-positive: var(--wmcolor-forest-light);\n --wmcolor-background-readonly: var(--wmcolor-whitesmoke);\n --wmcolor-background-selected: var(--wmcolor-paleviolet);\n --wmcolor-background-transparent: var(--wmcolor-transparent);\n --wmcolor-background: var(--wmcolor-white);\n --wmcolor-border-dark: var(--wmcolor-charcoal);\n --wmcolor-border-error: var(--wmcolor-negative);\n --wmcolor-border-focus: var(--wmcolor-cyan);\n --wmcolor-border-light: var(--wmcolor-whitesmoke);\n --wmcolor-border: var(--wmcolor-palelilacgray-dark);\n --wmcolor-brand-dark: var(--wmcolor-midnight); \n --wmcolor-brand: var(--wmcolor-periwinkle);\n --wmcolor-card-background: var(--wmcolor-white);\n --wmcolor-icon-accent: var(--wmcolor-gray);\n --wmcolor-interactive-background-focus: var(--wmcolor-palelilacgray);\n --wmcolor-interactive-background-hover: var(--wmcolor-whitesmoke);\n --wmcolor-interactive-delete-hover: var(--wmcolor-firetruck-dark);\n --wmcolor-interactive-delete: var(--wmcolor-firetruck);\n --wmcolor-interactive-disabled-ondark: var(--wmcolor-gray-light);\n --wmcolor-interactive-disabled: var(--wmcolor-gray);\n --wmcolor-interactive-focus-ondark: var(--wmcolor-violet-light);\n --wmcolor-interactive-focus-textonly-ondark: var(--wmcolor-white);\n --wmcolor-interactive-focus-textonly: var(--wmcolor-brightblue);\n --wmcolor-interactive-focus: var(--wmcolor-violet);\n --wmcolor-interactive-hover-ondark: var(--wmcolor-palelilacgray);\n --wmcolor-interactive-hover: var(--wmcolor-periwinkle-dark);\n --wmcolor-interactive-negative-hover: var(--wmcolor-salmon-darker);\n --wmcolor-interactive-negative: var(--wmcolor-salmon-dark);\n --wmcolor-interactive-ondark: var(--wmcolor-white);\n --wmcolor-interactive-positive-hover: var(--wmcolor-cyan-darker);\n --wmcolor-interactive-positive: var(--wmcolor-cyan-dark);\n --wmcolor-interactive-text-disabled-ondark: var(--wmcolor-asphalt);\n --wmcolor-interactive-text-ondark: var(--wmcolor-brand);\n --wmcolor-interactive-text-selected: var(--wmcolor-interactive-text);\n --wmcolor-interactive-text: var(--wmcolor-white);\n --wmcolor-interactive: var(--wmcolor-brand);\n --wmcolor-link-text: var(--wmcolor-interactive);\n --wmcolor-negative: var(--wmcolor-firetruck);\n --wmcolor-option-background-focus: var(--wmcolor-palelilacgray); \n --wmcolor-option-background-hover: var(--wmcolor-interactive-background-hover);\n --wmcolor-option-background: var(--wmcolor-background);\n --wmcolor-option-border: var(--wmcolor-border-light);\n --wmcolor-option-text-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-option-text: var(--wmcolor-text);\n --wmcolor-overlay: rgba(25,25,25,0.4);\n --wmcolor-positive-dark: var(--wmcolor-forest-dark);\n --wmcolor-positive: var(--wmcolor-forest);\n --wmcolor-progress: var(--wmcolor-cyan-dark);\n --wmcolor-table-altrow-background: var(--wmcolor-snow);\n --wmcolor-table-header-background: var(--wmcolor-palelilacgray);\n --wmcolor-table-row-background-selected: var(--wmcolor-background-highlight);\n --wmcolor-table-row-background: var(--wmcolor-white);\n --wmcolor-table-row-border-selected: var(--wmcolor-border-focus);\n --wmcolor-text-error: var(--wmcolor-negative);\n --wmcolor-text-negative: var(--wmcolor-firetruck);\n --wmcolor-text-ondark: var(--wmcolor-white);\n --wmcolor-text-positive: var(--wmcolor-positive);\n --wmcolor-text-required: var(--wmcolor-negative);\n --wmcolor-text: var(--wmcolor-charcoal);\n --wmcolor-tooltip-background: black; /* EXCEPTION */\n --wmcolor-tooltip-text: var(--wmcolor-text-ondark);\n\n /* Shared Tokens */\n --wmcolor-button-background-delete-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-background-delete-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-delete-hover: var(--wmcolor-interactive-delete-hover);\n --wmcolor-button-background-delete: var(--wmcolor-interactive-delete);\n --wmcolor-button-background-icononly-hover-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-background-icononly-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-icononly-ondark: var(--wmcolor-background-transparent);\n --wmcolor-button-background-icononly: var(--wmcolor-background);\n --wmcolor-button-background-navigational-hover-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-background-navigational-hover: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-navigational-ondark: var(--wmcolor-background-transparent);\n --wmcolor-button-background-navigational: var(--wmcolor-background-transparent);\n --wmcolor-button-background-negative-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-negative-hover: var(--wmcolor-interactive-negative-hover);\n --wmcolor-button-background-negative: var(--wmcolor-interactive-negative);\n --wmcolor-button-background-positive-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-positive-hover: var(--wmcolor-interactive-positive-hover);\n --wmcolor-button-background-positive: var(--wmcolor-interactive-positive);\n --wmcolor-button-background-primary-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-background-primary-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-primary-hover-ondark: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-primary-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-primary-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-background-primary: var(--wmcolor-interactive);\n --wmcolor-button-background-secondary-hover-ondark: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-secondary-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-secondary-ondark: var(--wmcolor-background-transparent);\n --wmcolor-button-background-secondary: var(--wmcolor-background);\n --wmcolor-button-background-selector-hover-ondark: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-selector-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-selector-ondark: var(--wmcolor-background-transparent);\n --wmcolor-button-background-selector: var(--wmcolor-background);\n --wmcolor-button-background-selectorprimary-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-background-selectorprimary-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-background-selectorprimary-hover-ondark: var(--wmcolor-interactive-hover-ondark);\n --wmcolor-button-background-selectorprimary-hover: var(--wmcolor-interactive-hover);\n --wmcolor-button-background-selectorprimary-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-background-selectorprimary: var(--wmcolor-interactive);\n --wmcolor-button-border-icononly-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-border-icononly-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-border-icononly-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-border-icononly: var(--wmcolor-interactive);\n --wmcolor-button-border-secondary-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-border-secondary-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-border-secondary-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-border-secondary: var(--wmcolor-interactive);\n --wmcolor-button-border-selector-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-border-selector-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-border-selector-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-border-selector: var(--wmcolor-interactive);\n --wmcolor-button-icon-icononly-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-icon-icononly-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-icon-icononly-hover-ondark: var(--wmcolor-interactive);\n --wmcolor-button-icon-icononly-hover: var(--wmcolor-interactive-ondark);\n --wmcolor-button-icon-icononly-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-icon-icononly: var(--wmcolor-interactive);\n --wmcolor-button-icon-navigational-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-icon-navigational-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-icon-navigational-hover-ondark: var(--wmcolor-interactive);\n --wmcolor-button-icon-navigational-hover: var(--wmcolor-interactive);\n --wmcolor-button-icon-navigational-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-icon-navigational: var(--wmcolor-interactive);\n --wmcolor-button-text-delete-disabled-ondark: var(--wmcolor-interactive-text-disabled-ondark);\n --wmcolor-button-text-delete-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-delete: var(--wmcolor-interactive-text);\n --wmcolor-button-text-negative-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-negative: var(--wmcolor-interactive-text);\n --wmcolor-button-text-positive-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-positive: var(--wmcolor-interactive-text);\n --wmcolor-button-text-primary-disabled-ondark: var(--wmcolor-interactive-text-disabled-ondark);\n --wmcolor-button-text-primary-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-primary-ondark: var(--wmcolor-interactive-text-ondark);\n --wmcolor-button-text-primary: var(--wmcolor-interactive-text);\n --wmcolor-button-text-secondary-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-text-secondary-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-text-secondary-hover-ondark: var(--wmcolor-interactive);\n --wmcolor-button-text-secondary-hover: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-secondary-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-secondary: var(--wmcolor-interactive);\n --wmcolor-button-text-selector-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-text-selector-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-text-selector-hover-ondark: var(--wmcolor-interactive);\n --wmcolor-button-text-selector-hover: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-selector-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-selector: var(--wmcolor-interactive);\n --wmcolor-button-text-selectorprimary-disabled-ondark: var(--wmcolor-interactive-text-disabled-ondark);\n --wmcolor-button-text-selectorprimary-disabled: var(--wmcolor-interactive-text);\n --wmcolor-button-text-selectorprimary-ondark: var(--wmcolor-interactive-text-ondark);\n --wmcolor-button-text-selectorprimary: var(--wmcolor-interactive-text);\n --wmcolor-button-text-textonly-disabled-ondark: var(--wmcolor-interactive-disabled-ondark);\n --wmcolor-button-text-textonly-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-button-text-textonly-ondark: var(--wmcolor-interactive-ondark);\n --wmcolor-button-text-textonly: var(--wmcolor-interactive);\n --wmcolor-chart-gridline: var(--wmcolor-border);\n --wmcolor-chart-popover-background: var(--wmcolor-background);\n --wmcolor-input-background-disabled: var(--wmcolor-background-disabled);\n --wmcolor-input-background: var(--wmcolor-background);\n --wmcolor-input-border-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-input-border-error: var(--wmcolor-border-error);\n --wmcolor-input-border-focus: var(--wmcolor-border-focus);\n --wmcolor-input-border: var(--wmcolor-border-dark);\n --wmcolor-input-charcount-background: var(--wmcolor-background-readonly);\n --wmcolor-input-text-disabled: var(--wmcolor-interactive-disabled);\n --wmcolor-input-text: var(--wmcolor-text);\n --wmcolor-input-unit-background: var(--wmcolor-background-readonly);\n }\n ";var r=document.createElement("style");r.textContent=o;document.head.appendChild(r)}function n(){var o='\n :root[wm-theme="neutral"] {\n --wmcolor-brand: var(--wmcolor-momjeans);\n --wmcolor-brand-dark: var(--wmcolor-cowboyjeans);\n --wmcolor-interactive-focus-ondark: var(--wmcolor-acidwashjeans);\n --wmcolor-interactive-focus: var(--wmcolor-brightblue);\n --wmcolor-interactive-hover: var(--wmcolor-dadjeans);\n --wmcolor-background-selected: var(--wmcolor-linen);\n }\n ';var r=document.createElement("style");r.textContent=o;document.head.appendChild(r)}if(window.navigator.plugins.length>0){console.log("Ripple component library",o)}function t(o){if(o.key=="Tab"){var r=new Event("wmUserIsTabbing");window.dispatchEvent(r);document.querySelector("body").classList.add("wmcl-user-is-tabbing")}if(o.key=="ArrowLeft"||o.key=="ArrowUp"||o.key=="ArrowRight"||o.key=="ArrowDown"){var r=new Event("wmUserIsKeying");window.dispatchEvent(r);document.querySelector("body").classList.add("wmcl-user-is-keying")}}function e(){var o=new Event("wmUserIsNotTabbing");window.dispatchEvent(o);document.querySelector("body").classList.remove("wmcl-user-is-tabbing");document.querySelector("body").classList.remove("wmcl-user-is-keying")}window.addEventListener("keydown",t);window.addEventListener("mousedown",e);var a=document.createElement("div");a.id="wm-tooltip-container";var c=document.createElement("div");c.id="wm-tooltip";c.setAttribute("aria-hidden","true");var l=document.createElement("style");l.textContent="\n#wm-tooltip {\n position: fixed;\n overflow: hidden;\n pointer-events: none;\n line-height: normal;\n font-family: inherit;\n font-size: 0.875rem;\n text-transform: none;\n font-weight: normal;\n background: var(--wmcolor-tooltip-background);\n color: var(--wmcolor-tooltip-text);\n z-index: 999999;\n max-width: var(--wmTooltipMaxWidth, 13.75rem);\n margin-right: 1.5rem;\n padding: 0.375rem;\n transition-property: opacity;\n transition-delay: 0s;\n opacity: 0;\n top: 0;\n left: 0;\n transform: translateZ(0);\n will-change: transform;\n transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));\n}\n\n#wm-tooltip.show {\n transition-delay: 500ms;\n opacity: 1;\n}\n";document.head.appendChild(l);a.appendChild(c);document.querySelector("body").appendChild(a);r();document.documentElement.getAttribute("wm-theme")=="neutral"&&n()}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e,H as i,g as a}from"./p-11b416c7.js";import{g as s,c as n}from"./p-
|
|
1
|
+
import{r as t,c as o,h as e,H as i,g as a}from"./p-11b416c7.js";import{g as s,c as n}from"./p-af1d2a68.js";const m=class{constructor(e){t(this,e),this.focusLastElement=o(this,"focusLastElement",3),this.focusFirstElement=o(this,"focusFirstElement",3),this.wmModalCloseTriggered=o(this,"wmModalCloseTriggered",3),this.wmCloseTriggered=o(this,"wmCloseTriggered",7),this.wmModalPrimaryTriggered=o(this,"wmModalPrimaryTriggered",7),this.wmPrimaryTriggered=o(this,"wmPrimaryTriggered",7),this.wmModalSecondaryTriggered=o(this,"wmModalSecondaryTriggered",7),this.wmSecondaryTriggered=o(this,"wmSecondaryTriggered",7),this.bodyFocusListener=()=>this.redirectFocusFromBody(),this.open=!1,this.isOpen=!1,this.elementToFocus="",this.modalType=null,this.isTypeDialog=null,this.uid=void 0}get tempOpen(){return this.open||this.isOpen}get tempModalType(){return this.modalType?this.modalType:this.isTypeDialog?"dialog":"modal"}get focusOnOpenEl(){let t=null;"primary"===this.elementToFocus||"secondary"===this.elementToFocus?t=this.el.querySelector(`#wm-${this.elementToFocus}-${this.uid}`):this.elementToFocus&&(t=this.el.querySelector("#"+this.elementToFocus),!t&&console.warn("Ripple Component Library: The modal component couldn't find an element matching the id you passed for 'elementToFocus'. It will fall back to the default and focus the close button when the modal opens."));const o=this.el.querySelector(`#wm-modal-close-${this.uid}`);return t||o}toggleModal(){this.tempOpen?this.showModal():this.hideModal()}handleClick(t){this.tempOpen&&t.target===this.overlayEl&&this.focusOnOpenEl.focus()}closeModalOnEscape(t){"Escape"===t.key&&(t.stopPropagation(),this.wmModalCloseTriggered.emit(),this.wmCloseTriggered.emit(),this.open=!1)}showModal(){this.setAriaDescribedbyOnModal(),this.setElToFocusOnClose(),document.body.style.overflow="hidden",document.body.tabIndex=0,document.body.removeEventListener("focus",this.bodyFocusListener,!0),document.body.addEventListener("focus",this.bodyFocusListener,!0),window.requestAnimationFrame((()=>{window.requestAnimationFrame((()=>this.focusOnOpenEl.focus()))}))}hideModal(){document.body.style.overflow="visible",document.body.tabIndex=-1,document.body.removeEventListener("focus",this.bodyFocusListener,!0),window.requestAnimationFrame((()=>this.focusOnCloseEl.focus()))}componentWillLoad(){this.isOpen&&console.warn("wm-modal: is-open has been deprecated as of v3.1.0. Please use open instead."),this.isTypeDialog&&console.warn("wm-modal: is-type-dialog has been deprecated as of v3.1.0. Please use modal-type instead."),"primary"!==this.elementToFocus&&"secondary"!==this.elementToFocus||this.el.id||console.error("You are telling the modal to focus an element in the footer when it opens. That's fine! But when you do that, you also need to give the wm-modal-wrapper an ID and set the ID of the modal body to 'content-[id of wm-modal-wrapper]. This is for accessibility purposes."),this.el.focus=()=>{this.focusOnOpenEl.focus()},this.uid=this.el.id?this.el.id:s()}componentDidLoad(){this.tempOpen&&this.showModal()}async emitCloseEvent(){this.wmModalCloseTriggered.emit(),this.wmCloseTriggered.emit()}async emitPrimaryEvent(){this.wmModalPrimaryTriggered.emit(),this.wmPrimaryTriggered.emit()}async emitSecondaryEvent(){this.wmModalSecondaryTriggered.emit(),this.wmSecondaryTriggered.emit()}setAriaDescribedbyOnModal(){document.getElementById(`content-${this.uid}`)?this.el.setAttribute("aria-describedby",`wm-modal-heading-text-${this.uid} content-${this.uid}`):console.warn("Ripple Component Library: The element containing the body of the modal must include an id in the format 'content-[id of modal]' for accessibility purposes.")}setElToFocusOnClose(){const t=document.activeElement;this.focusOnCloseEl="WM-MENUITEM"===t.tagName?t.parentElement:n(t)}redirectFocusFromBody(){"BODY"===document.activeElement.tagName&&this.focusOnOpenEl.focus()}render(){return e(i,{class:`${this.tempOpen?"":"hide "}${"wm-"+this.tempModalType}`,role:"dialog","aria-describedby":`wm-modal-heading-text-${this.uid}`,"aria-modal":"true",tabindex:this.tempOpen?0:null,onFocus:()=>{this.focusLastElement.emit()}},e("div",{class:"overlay",ref:t=>this.overlayEl=t}),e("div",{class:"sr-only",tabIndex:0,onFocus:()=>{this.focusFirstElement.emit()}}))}get el(){return a(this)}static get watchers(){return{open:["toggleModal"],isOpen:["toggleModal"]}}};m.style="wm-modal{--wmcolor-modal-background:var(--wmcolor-background);--wmcolor-modal-border:var(--wmcolor-border);--wmcolor-modal-heading:var(--wmcolor-text);--wmcolor-modal-overlay:var(--wmcolor-overlay);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);z-index:2001;width:80vw;max-width:750px;max-height:80vh;-webkit-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);-moz-box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14);box-shadow:0px 11px 15px 0px rgba(0, 0, 0, 0.2), 0px 9px 46px 8px rgba(0, 0, 0, 0.12), 0px 24px 38px 3px rgba(0, 0, 0, 0.14)}wm-modal *{-webkit-box-sizing:border-box;box-sizing:border-box}wm-modal>*{width:80vw;max-width:750px;background:var(--wmcolor-modal-background)}wm-modal>*:focus{outline:none}wm-modal wm-modal-header,wm-modal wm-modal-footer{padding:1.25rem 1.875rem}wm-modal wm-modal-header{z-index:2003}wm-modal wm-modal-footer{z-index:2003}wm-modal>:not(wm-modal-header):not(wm-modal-footer){max-height:calc(80vh - 166px);z-index:2002}wm-modal.wm-modal wm-modal-header{border-bottom:1px solid var(--wmcolor-modal-border)}wm-modal.wm-modal wm-modal-footer{border-top:1px solid var(--wmcolor-modal-border)}@media only screen and (max-width: 768px){wm-modal.wm-modal{height:100%;max-height:none;max-width:none;width:100vw}wm-modal.wm-modal>*{max-width:none;width:100vw}wm-modal.wm-modal>*:not(wm-modal-header):not(wm-modal-footer){max-height:none;height:calc(100vh - 166px)}}wm-modal.wm-dialog>:not(wm-modal-header):not(wm-modal-footer){padding:0 1.875rem 1.25rem 1.875rem;font-size:0.875rem;border:none}wm-modal .overlay{width:100vw;height:100vh;max-width:none;max-height:none;position:fixed !important;top:-1;bottom:1;left:-1;right:1;-webkit-transform:translate(0%, 0%);transform:translate(0%, 0%);background-color:var(--wmcolor-modal-overlay);-ms-transition:opacity 0.5s ease-out;-webkit-transition:opacity 0.5s ease-out;-moz-transition:opacity 0.5s ease-out;transition:opacity 0.5s ease-out;z-index:2000}wm-modal.hide{visibility:hidden}wm-modal .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}";export{m as wm_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as o,h as i,H as r,g as s}from"./p-11b416c7.js";import{g as a,d as n,u as h,i as l,v as d,w as c,l as p,h as g,s as w,o as m}from"./p-20495238.js";import{g as u}from"./p-2b378ac6.js";const b=class{constructor(i){t(this,i),this.wmTagInputChanged=e(this,"wmTagInputChanged",7),this.uid=this.el.id?this.el.id:a(),this.openUp=!1,this.inModal=!1,this.debouncedUpdate=n((()=>o(this.el)),30),this.label=void 0,this.labelPosition="top",this.options="",this.selectedTags="",this.info=void 0,this.errorMessage=void 0,this.addNew=!0,this.placeholder=void 0,this.requiredField=!1,this.characterLimit=50,this.maxTags=void 0,this.tagInputType="dropdown",this.colHeaders=void 0,this.colWidths=void 0,this.colWrap=void 0,this.messageConfig="",this.focusedListItem=void 0,this.focusedTag=null,this.tablePosition={row:0,column:1},this.isExpanded=!1,this.tagsList=h(this.selectedTags),this.optionsList=h(this.options),this.charCount=0,this.liveRegionMessage=""}get tooltipVisible(){return document.getElementById("wm-tooltip").classList.contains("show")}get focusedElement(){return this.el.shadowRoot.activeElement}get listItemEls(){return Array.from(this.dropdownEl.querySelectorAll("li"))}get tagEls(){return this.tagAreaEl?Array.from(this.tagAreaEl.querySelectorAll(".tag")):[]}get nonLockedTagEls(){return this.tagEls.filter((t=>!t.classList.contains("locked")))}get optionEls(){return Array.from(this.dropdownEl.querySelectorAll(".option"))}get wmRowEls(){return Array.from(this.el.querySelectorAll("wm-tag-input-row"))}get localRowEls(){return Array.from(this.el.shadowRoot.querySelectorAll("tr"))}get filteredRows(){return this.wmRowEls.filter((t=>{const e=this.inputEl?this.inputEl.value.toLowerCase():"";return[t.col1,t.col2,t.col3,t.col4].join("").toLowerCase().includes(e)}))}get nonLockedTagsList(){let t=[];return"table"===this.tagInputType?this.tagsList.forEach((e=>{this.wmRowEls.filter((t=>e===t.id))[0].locked||t.push(e)})):"dropdown"===this.tagInputType&&(t=this.tagsList),t}get tagLimitReached(){return!!(this.maxTags&&this.tagsList.length>=this.maxTags)}get noResultsMessage(){return l.formatMessage({id:"tagInput.noResults",defaultMessage:"No results match your search.",description:"Message displayed when a user's search returns empty."})}get componentMessages(){const t={addNewHelpText:l.formatMessage({id:"tagInput.addNewHelpText",defaultMessage:"Press the Enter or Comma key to add a new tag.",description:"Help text appearing in a dropdown. Use imperative"}),selectionHelpText:l.formatMessage({id:"tagInput.selectionHelpText",defaultMessage:"Search and select a tag.",description:"Help text appearing in a dropdown. Use imperative"}),maxTagsReached:l.formatMessage({id:"tagInput.maxTagsReached",defaultMessage:"No more tags can be added because the limit has been reached."}),tagAreaInstructions:l.formatMessage({id:"tagInput.tagAreaInstructions",defaultMessage:"tag selection. Press Backspace or Delete to remove a tag."}),tagsAdded:l.formatMessage({id:"tagInput.tagsAdded",defaultMessage:"Tags added",description:"For the user to understand how close they are to the tag limit, followed by x/y count"})},e=d(this.messageConfig);return e?Object.assign(Object.assign({},t),e):t}get inputMinimumWidth(){const t=getComputedStyle(this.inputEl),e=getComputedStyle(this.tagEls[this.tagEls.length-1]),o=[t.paddingLeft,t.paddingRight,t.marginLeft,t.marginRight,e.marginRight].reduce(((t,e)=>t+parseInt(e.replace("px",""))),0);return Math.max(150,c(this.inputEl,this.placeholder).width+o)}generateTagAddedMessage(t){return l.formatMessage({id:"tagInput.tagAdded",defaultMessage:"{tagName} added.",description:"A confirmation for adding a tag."},{tagName:t})}generateTagAlreadyAddedMessage(t){return l.formatMessage({id:"tagInput.tagAlreadyAdded",defaultMessage:"{tagName} has already been added.",description:"An alert for adding a tag that is already present."},{tagName:t})}componentWillLoad(){this.placeholder||(this.placeholder=this.createPlaceholderDefault(this.addNew,!!this.options)),this.label||console.error("wm-tag-input must have a label property"),this.consolidateSelectedTags(),this.el.focus=()=>{const t=this.nonLockedTagEls[0];t?(this.tagAreaEl.focus(),this.focusTag(t)):this.inputEl.focus()},new ResizeObserver((()=>this.debouncedUpdate())).observe(this.el),this.el.closest("wm-modal")&&(this.inModal=!0)}componentDidLoad(){this.tagEls.forEach((t=>t.classList.remove("highlight")))}componentDidRender(){this.positionInput(),this.tagEls.forEach((t=>{const e=t.querySelector(".tag-text"),o=this.el.shadowRoot.querySelector(".tags-and-input-wrapper"),i=e.getBoundingClientRect().left,r=o.getBoundingClientRect().right-10-8-28;let s=t.dataset.tag;if("table"===this.tagInputType){const t=this.el.querySelector(`#${s}`);s=t?t.col1:""}e.textContent=p(e,s,r-i,5)}))}consolidateSelectedTags(){this.tagsList.forEach((t=>{this.includesCaseInsensitive(this.optionsList,t)||(this.options+=`${this.options.length>0?",":""}${t}`)})),this.optionsList=h(this.options)}createPlaceholderDefault(t,e){const o=l.formatMessage({id:"tagInput.placeholderAddAndSearch",defaultMessage:"Add or search for a tag",description:"Placeholder text. Use imperative"}),i=l.formatMessage({id:"tagInput.placeholderSearch",defaultMessage:"Search and select a tag",description:"Placeholder text. Use imperative"}),r=l.formatMessage({id:"tagInput.placeholderAdd",defaultMessage:"Add a new tag",description:"Placeholder text. Use imperative"});let s="";return t&&e?s=o:!t&&e?s=i:t&&(s=r),s}reflectSelectedTags(t,e){let o="",i=this.tagsList;o=t.length>e.length?t.filter((t=>!e.includes(t)))[0]:e.filter((e=>!t.includes(e)))[0],"table"===this.tagInputType&&(o=this.wmRowEls.filter((t=>t.id===o))[0],i=this.tagsList.map((t=>this.el.querySelector(`#${t}`)))),this.selectedTags=this.listToCSV(this.tagsList),this.wmTagInputChanged.emit({value:i,tagChanged:o})}handleErrorMessageChange(){this.errorMessage&&this.announce(this.errorMessage)}handleRowUpdate(){o(this.el)}closeIfNotElOrChild(t){const e=t.target!==this.el&&!this.el.shadowRoot.contains(t.target);"dropdown"===this.tagInputType&&e&&this.isExpanded&&this.closeDropdown()}dismissTooltip(){this.tooltipVisible&&g()}handleInputKeyDown(t){switch(/^.$/.test(t.key)&&this.inputEl.value.length>=this.characterLimit&&this.announce(this.generateCharacterLimitWarning(this.inputEl.value.length,this.characterLimit)),t.stopPropagation(),t.key){case"Enter":t.preventDefault(),this.handleInputEnter();break;case"ArrowDown":t.preventDefault(),this.handleInputArrowDown();break;case"ArrowUp":t.preventDefault(),this.handleInputArrowUp();break;case"ArrowLeft":"table"===this.tagInputType&&this.tablePosition.row&&(t.preventDefault(),this.moveLeftCell());break;case"ArrowRight":"table"===this.tagInputType&&this.tablePosition.row&&(t.preventDefault(),this.moveRightCell());break;case"Escape":"dropdown"===this.tagInputType&&this.isExpanded&&this.closeDropdown();break;case"ArrowLeft":case"Backspace":this.handleInputBackspace()}}handleInputFocus(){"dropdown"===this.tagInputType&&(this.openDropdown(),this.clearListItemFocus()),o(this.el)}handleInputChanged(t){this.charCount=t.length,"dropdown"===this.tagInputType?(this.clearListItemFocus(),this.charCount>=this.characterLimit-5&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit)),this.isExpanded||this.openDropdown()):"table"===this.tagInputType&&this.clearCellFocus(),t.includes(",")&&this.addNew?(t.split(",").forEach((t=>this.submitInput(this.addNew,t.trim()))),this.announce(this.generateTagAddedMessage(t.split(",").join(", ")))):this.announceExistingOptions()}handleInputEnter(){"dropdown"===this.tagInputType?this.focusedListItem?this.handleListItemClick(this.focusedListItem):this.submitInput(this.addNew,this.inputEl.value.trim()):"table"===this.tagInputType&&this.tablePosition.row>0&&this.handleTableRowClick(this.localRowEls[this.tablePosition.row].id)}submitInput(t,e){const o=e.match(/\S/);t&&o&&(this.addTag(e),this.optionsList=this.addOption(e),this.resetInput())}handleInputArrowDown(){"table"===this.tagInputType?this.moveDownRow():"dropdown"===this.tagInputType&&this.isExpanded?this.moveDownListItem():"dropdown"===this.tagInputType&&this.openDropdown()}handleInputArrowUp(){"table"===this.tagInputType?this.moveUpRow():"dropdown"===this.tagInputType&&this.isExpanded?this.moveUpListItem():"dropdown"===this.tagInputType&&this.openDropdown()}handleInputBackspace(){""===this.inputEl.value&&this.tagsList.length>0&&window.requestAnimationFrame((()=>{this.nonLockedTagsList.length>0&&(this.tagAreaEl.focus(),this.focusTag(this.tagEls[this.tagEls.length-1]))}))}handleListItemKeyDown(t){const e=t.target;switch(t.key){case"Enter":case" ":t.preventDefault(),e.click();break;case"ArrowDown":t.preventDefault(),this.moveDownListItem();break;case"ArrowUp":t.preventDefault(),this.moveUpListItem();break;case"Escape":this.focusedElement!==this.inputEl?this.inputEl.focus():"dropdown"===this.tagInputType&&this.closeDropdown()}}handleListItemClick(t){const e=t.dataset.option.trim()||"";this.includesCaseInsensitive(this.tagsList,e)?this.announce(this.generateTagAlreadyAddedMessage(e)):(this.resetInput(),this.addTag(e),this.optionsList=this.addOption(e),this.focusedListItem=null)}handleTableRowClick(t){this.el.querySelector(`#${t}`).locked||(this.includesCaseInsensitive(this.tagsList,t)?this.removeTag(t):this.tagLimitReached||(this.addTag(t),this.resetInput()))}handleTagAreaKeyDown(t){switch(t.key){case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.moveLeftTag();break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.moveRightTag();break;case"Backspace":case"Delete":this.handleTagAreaDelete()}}handleTagAreaDelete(){const t=this.focusedTag&&this.focusedTag.classList.contains("locked");this.focusedTag&&!t&&(this.removeTag(this.focusedTag.dataset.tag),0===this.nonLockedTagsList.length?this.inputEl.focus():(this.focusedTag=this.focusedTag===this.tagEls[this.tagEls.length-1]?this.tagEls[this.tagEls.length-2]:this.focusedTag,this.focusTag(this.focusedTag)))}handleBlur(t,e){const o=t.relatedTarget!==e&&!this.el.shadowRoot.contains(t.relatedTarget);this.dismissTooltip(),this.clearCellFocus(),o&&(this.fieldWrapperEl.classList.remove("focused"),"dropdown"===this.tagInputType&&this.closeDropdown())}handleCellMouseEnter(t){const e=t.target,o=e.querySelector(".cell-content-wrapper");o.scrollWidth>o.clientWidth&&w("bottom",e,e.innerText)}handleTagAreaFocus(){"dropdown"===this.tagInputType&&this.closeDropdown();const t=this.nonLockedTagEls[0];t&&this.focusTag(t)}handleRemoveButtonClick(t){this.moveLeftTag(),this.removeTag(t)}moveDownListItem(){if(this.listItemEls.length>0){this.focusListItem(this.focusedListItem&&this.focusedListItem.nextElementSibling?this.focusedListItem.nextElementSibling:this.listItemEls[0])}}moveUpListItem(){if(this.listItemEls.length>0){const t=this.listItemEls[this.listItemEls.length-1];this.focusedListItem?this.focusedListItem.previousElementSibling?this.focusListItem(this.focusedListItem.previousElementSibling):this.clearListItemFocus():this.focusListItem(t)}}moveDownRow(){this.filteredRows.length>0&&(0===this.tablePosition.row||this.tablePosition.row===this.filteredRows.length?this.tablePosition.row=1:this.tablePosition.row++,this.filteredRows[this.tablePosition.row-1].locked?this.moveDownRow():this.focusCell(this.tablePosition))}moveUpRow(){if(this.filteredRows.length>0){0===this.tablePosition.row?this.tablePosition.row=this.filteredRows.length:1===this.tablePosition.row?this.tablePosition.row=0:this.tablePosition.row--;const t=this.filteredRows[this.tablePosition.row-1];t&&t.locked?this.moveUpRow():t?this.focusCell(this.tablePosition):this.clearCellFocus()}}moveLeftCell(){1!=this.tablePosition.column&&(this.tablePosition.column--,this.focusCell(this.tablePosition))}moveRightCell(){const t=h(this.colHeaders).length;this.tablePosition.column<t&&(this.tablePosition.column++,this.focusCell(this.tablePosition))}moveLeftTag(){const t=this.tagEls[this.tagEls.length-1];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.previousElementSibling)?this.focusedTag.previousElementSibling:t,this.focusedTag.classList.contains("locked")&&this.nonLockedTagEls.length>0?this.moveLeftTag():this.focusTag(this.focusedTag)}moveRightTag(){const t=this.tagEls[0];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.nextElementSibling)?this.focusedTag.nextElementSibling:t,this.focusedTag.classList.contains("locked")?this.moveRightTag():this.focusTag(this.focusedTag)}addOption(t){let e=this.optionsList;return this.includesCaseInsensitive(this.optionsList,t)||(e=e.concat(t)),e}removeOption(t){this.optionsList=this.filterCaseInsensitive(this.optionsList,t)}addTag(t){let e=this.tagsList;const o=this.includesCaseInsensitive(this.tagsList,t),i=this.optionsList.filter((e=>e.toLowerCase()===t.toLowerCase()))[0];if(!o){let o=t;"table"===this.tagInputType&&(o=this.el.querySelector(`#${t}`).col1),this.announce(this.generateTagAddedMessage(o)),this.tagsList=e.concat(i||t),this.tagLimitReached?this.tagAreaEl.focus():window.requestAnimationFrame((()=>this.tagsAndInputWrapperEl.scrollTop=this.tagsAndInputWrapperEl.scrollHeight))}}removeTag(t){let e=t;"table"===this.tagInputType&&(e=this.el.querySelector(`#${t}`).col1);const o=l.formatMessage({id:"tagInput.tagRemoved",defaultMessage:"{tag} removed"},{tag:e});if(this.announce(o),this.tagsList=this.filterCaseInsensitive(this.tagsList,t),"dropdown"===this.tagInputType){const e=h(this.options);this.includesCaseInsensitive(this.optionsList,t)&&!this.includesCaseInsensitive(e,t)&&this.removeOption(t)}}focusListItem(t){this.focusedListItem=t,this.inputEl.setAttribute("aria-activedescendant",this.focusedListItem.id),t.scrollIntoView({block:"nearest"})}focusTag(t){t.classList.contains("locked")?(this.focusedTag=null,this.tagAreaEl.setAttribute("aria-activedescendant","")):(this.focusedTag=t,this.tagAreaEl.setAttribute("aria-activedescendant",this.focusedTag.id),this.focusedTag.scrollIntoView({block:"nearest"})),window.requestAnimationFrame((()=>{g();const e=t.querySelector(".tag-text"),o=t.dataset.tag;o!==e.textContent&&e.textContent.includes("...")&&w("bottom",t,o)}))}focusCell(t){if(this.clearCellFocus(!1),t.row){const e=this.localRowEls[t.row],o=e.querySelectorAll("td")[t.column-1],i=o.querySelector(".cell-content-wrapper"),r=i.scrollWidth>i.clientWidth;e.classList.add("focused"),o.classList.add("focused"),o.scrollIntoView({block:"nearest"}),this.inputEl.setAttribute("aria-activedescendant",o.id),this.dismissTooltip(),r&&w("bottom",o,o.innerText)}}clearTagFocus(){this.tagAreaEl.setAttribute("aria-activedescendant",""),this.focusedTag=null}clearCellFocus(t=!0){this.inputEl.setAttribute("aria-activedescendant",""),t&&(this.tablePosition={row:0,column:1}),this.localRowEls.forEach((t=>{t.classList.remove("focused"),t.querySelectorAll("td").forEach((t=>{t.classList.remove("focused")}))}))}openDropdown(){this.openUp=m(this.el,this.dropdownEl.clientHeight,this.el.clientHeight,-2),this.isExpanded=!0}closeDropdown(){this.clearListItemFocus(),this.isExpanded=!1}clearListItemFocus(){this.focusedListItem=null,this.inputEl.setAttribute("aria-activedescendant",""),this.listItemEls.forEach((t=>{t.classList.remove("focused")}))}resetInput(){this.charCount=0,this.inputEl.value=""}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionMessage=t}announceExistingOptions(){window.requestAnimationFrame((()=>{let t=0;"dropdown"===this.tagInputType?t=this.optionEls.length:"table"===this.tagInputType&&(t=this.filteredRows.length);const e=l.formatMessage({id:"tagInput.existingOptions",defaultMessage:"{num, plural, one {1 existing option.} other {# existing options.}}"},{num:t});this.announce(e)}))}generateCharacterLimitWarning(t,e){let o=u.getCharactersEntered(t,e);return t>=e&&(o+=` ${u.characterLimitReached}`),o}positionInput(){const t=this.tagEls[this.tagEls.length-1];if(this.inputEl.style.position="static",this.inputEl.style.width="100%",this.inputEl.classList.add("extended"),t){const e=this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right;e>=this.inputMinimumWidth&&(this.inputEl.style.position="absolute",this.inputEl.style.top=t.offsetTop.toString()+"px",this.inputEl.style.width=(e-8).toString()+"px",this.inputEl.classList.remove("extended"))}}handleTagMouseEnter(t){const e=t.target.querySelector(".tag-text").textContent,o=t.target.dataset.tag;e!==o&&e.includes("...")&&w("bottom",t.target,o)}listToCSV(t){return t.join(",")}includesCaseInsensitive(t,e){return t.map((t=>t.toLowerCase())).includes(e.toLowerCase())}filterCaseInsensitive(t,e){return t.filter((t=>t.toLowerCase()!==e.toLowerCase()))}sortCaseInsensitive(t){return t.sort(((t,e)=>(t=t.toLowerCase())>(e=e.toLowerCase())?1:t<e?-1:0))}renderTags(){let t=[],e=[];return this.tagsList.forEach(((o,r)=>{const s=`tag${r+1}`;let a="",n=!1;if("dropdown"===this.tagInputType)a=o;else if("table"===this.tagInputType){const t=this.el.querySelector(`#${o}`);a=t?t.col1:"",n=!!t&&t.locked}(n?t:e).push(i("li",{id:s,class:`tag highlight ${this.focusedTag&&this.focusedTag.id===s?"focused":""} ${n?"locked":""}`,"data-tag":o,role:"option",onMouseEnter:t=>this.handleTagMouseEnter(t),onMouseLeave:g},i("span",{class:"sr-only"},o),i("span",{class:"tag-text","aria-hidden":"true"},a),n?i("div",{class:"icon lock"}):i("button",{class:"icon remove-btn",tabIndex:-1,onClick:()=>this.handleRemoveButtonClick(o)})))})),[...t,...e]}renderDropdown(){return i("div",{class:`dropdown-wrapper ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,ref:t=>this.dropdownEl=t},i("div",{id:"help-text",class:"help-text"},this.renderHelpText()),i("ul",{class:"dropdown",id:"dropdown",role:"listbox","aria-multiselectable":"true","aria-expanded":!!this.isExpanded&&"true","aria-label":this.label,tabindex:-1},this.inputEl&&this.renderAddNewButton(),this.renderListItems(this.optionsList)))}renderListItems(t){return t=this.sortCaseInsensitive(t),this.inputEl&&this.inputEl.value&&(t=this.optionsList.filter((t=>t.toLowerCase().includes(this.inputEl.value.toLowerCase())))),t.map(((t,e)=>{const o=`option${e+1}`,r=this.focusedListItem&&this.focusedListItem.id===o,s=this.includesCaseInsensitive(this.tagsList,t);return i("li",{class:"option "+(r?"focused":""),role:"option",id:o,"data-option":t,"aria-selected":s?"true":"false","aria-disabled":s?"true":"false",onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t.target)},t)}))}renderAddNewButton(){const t=this.inputEl.value.match(/\S/),e=this.includesCaseInsensitive(this.optionsList,this.inputEl.value.trim());if(this.addNew&&t&&!e){const t="add-new-btn",e=this.focusedListItem&&this.focusedListItem.id===t;return i("li",{role:"option",class:"add-new-btn "+(e?"focused":""),id:t,"data-option":this.inputEl.value,onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t.target),tabIndex:e?0:-1},`Add "${this.inputEl.value.trim()}"`)}return""}renderHelpText(){let t="";return this.optionsList.length>0&&(t+=this.componentMessages.selectionHelpText),this.addNew&&(t+=" "+this.componentMessages.addNewHelpText),t}renderTagCounter(){if(this.maxTags)return i("div",{class:"lower-row"},i("div",{id:"max-tags"},`${this.componentMessages.tagsAdded}: ${this.tagsList.length}/${this.maxTags}`,this.tagLimitReached&&` - ${this.componentMessages.maxTagsReached}`))}renderTable(){return i("div",{class:"table-wrapper",onScroll:()=>this.dismissTooltip()},i("table",{id:"table",role:"grid",class:this.colWidths?"fixed-widths":"","aria-label":this.label,"aria-multiselectable":"true"},this.renderTableHeaders(),this.filteredRows.length?this.renderTableRows():i("div",{class:"no-results"},this.noResultsMessage)))}renderTableHeaders(){return i("tr",{class:"headers",role:"row"},h(this.colHeaders).map(((t,e)=>{let o="wrap";return this.colWrap&&h(this.colWrap)[e]&&(o=h(this.colWrap)[e]),i("th",{class:`header-cell ${o}`,role:"columnheader",width:this.colWidths?h(this.colWidths)[e]:""},t)})))}renderTableRows(){return this.filteredRows.map((t=>{const e=this.includesCaseInsensitive(this.tagsList,t.id);return i("tr",{id:t.id,class:`${t.locked?"locked":""} ${e?"selected":""}`,role:"row",onClick:()=>this.handleTableRowClick(t.id)},this.renderTableCells(t))}))}renderTableCells(t){const e=[t.col1,t.col2,t.col3,t.col4].filter((t=>!!t)),o=this.includesCaseInsensitive(this.tagsList,t.id);return e.map(((e,r)=>{const s=`${t.id}-col${r+1}`;let a="wrap";return this.colWrap&&h(this.colWrap)[r]&&(a=h(this.colWrap)[r]),i("td",{id:s,role:"gridcell","aria-describedby":`${s}-description`,"aria-selected":o.toString(),onMouseEnter:t=>this.handleCellMouseEnter(t),onMouseLeave:()=>this.dismissTooltip()},i("div",{class:`cell-content-wrapper ${a}`},e),i("div",{class:"description",id:`${s}-description`},t.locked?"locked":""))}))}render(){return i(r,{id:this.uid},i("div",{class:`wrapper label-${this.labelPosition} ${this.errorMessage?"invalid":""}`},i("div",{class:"label-wrapper"},i("label",{class:"label",htmlFor:`input${this.uid}`},this.label,this.requiredField&&i("span",{class:"required","aria-hidden":"true"},"*"))),i("div",{class:`field-wrapper ${this.focusedElement?"focused":""} ${this.errorMessage?"invalid":""}`,ref:t=>this.fieldWrapperEl=t},i("div",{class:"upper-row"},i("div",{class:"tags-and-input-wrapper "+(this.inModal?"in-modal":""),ref:t=>this.tagsAndInputWrapperEl=t},this.tagsList.length>0&&i("ul",{ref:t=>this.tagAreaEl=t,class:"tag-area",role:"listbox","aria-activedescendant":"","aria-orientation":"horizontal","aria-label":`${this.label} ${this.tagsList.length>0?this.componentMessages.tagAreaInstructions:""}`,tabindex:this.nonLockedTagsList.length>0?0:-1,"aria-describedby":"info max-tags",onFocus:()=>this.handleTagAreaFocus(),onBlur:t=>{this.clearTagFocus(),this.handleBlur(t,this.el)},onKeyDown:t=>this.handleTagAreaKeyDown(t)},this.renderTags()),i("input",{id:`input${this.uid}`,class:"input "+(this.tagLimitReached?"hidden":""),role:"combobox",ref:t=>this.inputEl=t,autocomplete:"off","aria-required":this.requiredField?"true":null,"aria-controls":this.tagInputType,"aria-describedby":"help-text"+(this.errorMessage?" error ":""),"aria-label":`${this.label} ${"dropdown"===this.tagInputType?u.getCharacterLimit(this.characterLimit):""}`,"aria-expanded":"dropdown"===this.tagInputType?this.isExpanded.toString():null,placeholder:this.placeholder,maxLength:"dropdown"===this.tagInputType?this.characterLimit:void 0,onInput:()=>this.handleInputChanged(this.inputEl.value),onBlur:t=>{this.handleBlur(t,this.el)},onFocus:()=>this.handleInputFocus(),onKeyDown:t=>this.handleInputKeyDown(t)})),"dropdown"===this.tagInputType&&i("div",{class:"character-count"},this.charCount,"/",this.characterLimit)),this.renderTagCounter(),"dropdown"===this.tagInputType&&this.renderDropdown()),this.info&&i("div",{id:"info",class:"info-text"},this.info),this.errorMessage&&i("div",{id:"error"},this.errorMessage),i("div",{class:"sr-only","aria-live":"assertive",ref:t=>this.liveRegionEl=t,"aria-atomic":"true"},this.liveRegionMessage),"table"===this.tagInputType&&this.renderTable()))}static get delegatesFocus(){return!0}get el(){return s(this)}static get watchers(){return{tagsList:["reflectSelectedTags"],errorMessage:["handleErrorMessageChange"]}}};b.style=':host{--wmcolor-taginput-altrow-background-table:var(--wmcolor-table-altrow-background);--wmcolor-taginput-border:var(--wmcolor-input-border);--wmcolor-taginput-charcount-background:var(--wmcolor-input-charcount-background);--wmcolor-taginput-header-background-table:var(--wmcolor-table-header-background);--wmcolor-taginput-help-text:var(--wmcolor-text);--wmcolor-taginput-icon:var(--wmcolor-icon-accent);--wmcolor-taginput-maxtags-background:var(--wmcolor-background-readonly);--wmcolor-taginput-maxtags-border:var(--wmcolor-input-border);--wmcolor-taginput-maxtags-text:var(--wmcolor-text);--wmcolor-taginput-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-taginput-option-background:var(--wmcolor-option-background);--wmcolor-taginput-option-border:var(--wmcolor-option-border);--wmcolor-taginput-option-text-selected:var(--wmcolor-option-text-disabled);--wmcolor-taginput-option-text:var(--wmcolor-interactive);--wmcolor-taginput-row-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-taginput-row-background-selected:var(--wmcolor-table-row-background-selected);--wmcolor-taginput-row-background-table:var(--wmcolor-table-row-background);--wmcolor-taginput-row-border-selected:var(--wmcolor-table-row-border-selected);--wmcolor-taginput-tag-background-focus:var(--wmcolor-palelilacgray-dark);--wmcolor-taginput-tag-background-highlight:var(--wmcolor-background-highlight);--wmcolor-taginput-tag-background-locked:var(--wmcolor-interactive-disabled);--wmcolor-taginput-tag-background:var(--wmcolor-palelilacgray);--wmcolor-taginput-tag-text-locked:var(--wmcolor-text-ondark);--wmcolor-taginput-tag-text:var(--wmcolor-text);--wmcolor-taginput-tagbutton-background-hover:var(--wmcolor-button-background-icononly-hover);--wmcolor-taginput-tagbutton-border:var(--wmcolor-button-border-icononly);--wmcolor-taginput-tagbutton-icon-hover:var(--wmcolor-button-icon-icononly-hover);--wmcolor-taginput-tagbutton-icon:var(--wmcolor-button-icon-icononly);font-family:inherit;width:100%;display:block;max-height:80vh}:host *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{width:100%;height:100%;max-height:inherit;min-height:inherit;position:relative}:host .field-wrapper{position:relative;width:100%;border:1px solid;border-color:var(--wmcolor-taginput-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}:host .field-wrapper.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper:not(.label-left) .field-wrapper{-ms-flex-negative:0;flex-shrink:0}:host .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:var(--wmcolor-taginput-charcount-background);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper{position:relative;width:100%;padding:8px 8px 8px 0;overflow:auto;max-height:200px}:host .tags-and-input-wrapper.in-modal{max-height:20vh}:host .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between}:host .upper-row:before{-ms-flex-item-align:start;align-self:flex-start;display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-taginput-icon);padding:0.75rem 0.5rem 0.75rem 0.75rem;line-height:normal;font-size:1.12rem}:host .lower-row{width:100%;min-height:1.875rem}:host #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:1.875rem;background-color:var(--wmcolor-taginput-maxtags-background);padding:0.5rem 1rem;color:var(--wmcolor-taginput-maxtags-text);font-size:0.875rem;border-top:1px solid var(--wmcolor-taginput-maxtags-border);border-radius:0 0 3px 3px}:host .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0;margin:0;gap:8px}:host .tag-area:focus{outline:none}:host .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:var(--wmcolor-taginput-tag-text);background-color:var(--wmcolor-taginput-tag-background);padding:0.5rem 0.625rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:var(--wmcolor-taginput-tag-background)}50%{background-color:var(--wmcolor-taginput-tag-background-highlight)}100%{background-color:var(--wmcolor-taginput-tag-background)}}@keyframes fadeIn{0%{background-color:var(--wmcolor-taginput-tag-background)}50%{background-color:var(--wmcolor-taginput-tag-background-highlight)}100%{background-color:var(--wmcolor-taginput-tag-background)}}:host .tag-area [role=option].focused{background-color:var(--wmcolor-taginput-tag-background-focus)}:host .tag-area [role=option].locked{background-color:var(--wmcolor-taginput-tag-background-locked);color:var(--wmcolor-taginput-tag-text-locked)}:host .tag-area [role=option] .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;padding:0;margin-left:0.5rem}:host .tag-area [role=option] .icon.remove-btn{border:1px solid var(--wmcolor-taginput-tagbutton-border);color:var(--wmcolor-taginput-tagbutton-icon);border-radius:50%;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 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)}:host .tag-area [role=option] .icon.remove-btn:hover{color:var(--wmcolor-taginput-tagbutton-icon-hover);background-color:var(--wmcolor-taginput-tagbutton-background-hover)}:host .tag-area [role=option] .icon.remove-btn: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 .tag-area [role=option] .icon.lock{color:var(--wmcolor-taginput-tag-text-locked)}:host .tag-area [role=option] .icon.lock: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:"\\f341"}:host .input{font-family:inherit;border:none;height:1.75rem;padding:0;margin:0;right:8px}:host .input.hidden{display:none}:host .input:focus{outline:none}:host .tag-area+.input.extended{-webkit-margin-before:8px;margin-block-start:8px}:host .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:var(--wmcolor-taginput-option-background);list-style:none;min-height:2.6875rem;white-space:pre-wrap;overflow-wrap:anywhere}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn{cursor:pointer;color:var(--wmcolor-taginput-option-text);font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:var(--wmcolor-taginput-option-text-selected);font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused{outline:none;background:var(--wmcolor-taginput-option-background-hover)}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text{color:var(--wmcolor-taginput-help-text);height:auto;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem;white-space:normal}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child){border-bottom:2px solid var(--wmcolor-taginput-option-border)}:host .info-text{font-style:italic;margin-top:0.25rem}:host .table-wrapper{overflow:auto;margin-top:1.5rem}:host .table-wrapper #table{width:100%;border-spacing:0px}:host .table-wrapper #table.fixed-widths{table-layout:fixed}:host .table-wrapper #table .headers{height:2.5rem;background-color:var(--wmcolor-taginput-header-background-table)}:host .table-wrapper #table .headers th{text-align:left;font-size:0.75rem;font-weight:700;text-transform:uppercase;padding:0 1.5rem}:host .table-wrapper tr:nth-child(even){background-color:var(--wmcolor-taginput-altrow-background-table)}:host .table-wrapper tr.selected{background-color:var(--wmcolor-taginput-row-background-selected);-webkit-box-shadow:inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);box-shadow:inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);font-weight:500}:host .table-wrapper tr.focused:not(.locked),:host .table-wrapper tr:hover:not(.locked){background-color:var(--wmcolor-taginput-row-background-hover);-webkit-box-shadow:none;box-shadow:none}:host .table-wrapper tr.locked td{cursor:auto}:host .table-wrapper tr.locked td:first-child .cell-content-wrapper: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:"\\f33e";margin-right:0.5rem;color:var(--wmcolor-taginput-tag-text)}:host .table-wrapper td{height:3.75rem;vertical-align:middle;padding:0 1.5rem;cursor:pointer}:host .table-wrapper td.focused{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px var(--wmcolor-interactive-focus)}:host .table-wrapper td .cell-content-wrapper.trunc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .table-wrapper td .description{display:none}:host .no-results{padding:1.25rem 1.5rem}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host #error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem}';export{b as wm_tag_input}
|
|
1
|
+
import{r as t,c as e,f as o,h as i,H as r,g as s}from"./p-11b416c7.js";import{g as a,d as n,u as h,i as l,v as d,w as c,l as p,h as g,s as w,o as m}from"./p-af1d2a68.js";import{g as u}from"./p-1eb5a93a.js";const b=class{constructor(i){t(this,i),this.wmTagInputChanged=e(this,"wmTagInputChanged",7),this.uid=this.el.id?this.el.id:a(),this.openUp=!1,this.inModal=!1,this.debouncedUpdate=n((()=>o(this.el)),30),this.label=void 0,this.labelPosition="top",this.options="",this.selectedTags="",this.info=void 0,this.errorMessage=void 0,this.addNew=!0,this.placeholder=void 0,this.requiredField=!1,this.characterLimit=50,this.maxTags=void 0,this.tagInputType="dropdown",this.colHeaders=void 0,this.colWidths=void 0,this.colWrap=void 0,this.messageConfig="",this.focusedListItem=void 0,this.focusedTag=null,this.tablePosition={row:0,column:1},this.isExpanded=!1,this.tagsList=h(this.selectedTags),this.optionsList=h(this.options),this.charCount=0,this.liveRegionMessage=""}get tooltipVisible(){return document.getElementById("wm-tooltip").classList.contains("show")}get focusedElement(){return this.el.shadowRoot.activeElement}get listItemEls(){return Array.from(this.dropdownEl.querySelectorAll("li"))}get tagEls(){return this.tagAreaEl?Array.from(this.tagAreaEl.querySelectorAll(".tag")):[]}get nonLockedTagEls(){return this.tagEls.filter((t=>!t.classList.contains("locked")))}get optionEls(){return Array.from(this.dropdownEl.querySelectorAll(".option"))}get wmRowEls(){return Array.from(this.el.querySelectorAll("wm-tag-input-row"))}get localRowEls(){return Array.from(this.el.shadowRoot.querySelectorAll("tr"))}get filteredRows(){return this.wmRowEls.filter((t=>{const e=this.inputEl?this.inputEl.value.toLowerCase():"";return[t.col1,t.col2,t.col3,t.col4].join("").toLowerCase().includes(e)}))}get nonLockedTagsList(){let t=[];return"table"===this.tagInputType?this.tagsList.forEach((e=>{this.wmRowEls.filter((t=>e===t.id))[0].locked||t.push(e)})):"dropdown"===this.tagInputType&&(t=this.tagsList),t}get tagLimitReached(){return!!(this.maxTags&&this.tagsList.length>=this.maxTags)}get noResultsMessage(){return l.formatMessage({id:"tagInput.noResults",defaultMessage:"No results match your search.",description:"Message displayed when a user's search returns empty."})}get componentMessages(){const t={addNewHelpText:l.formatMessage({id:"tagInput.addNewHelpText",defaultMessage:"Press the Enter or Comma key to add a new tag.",description:"Help text appearing in a dropdown. Use imperative"}),selectionHelpText:l.formatMessage({id:"tagInput.selectionHelpText",defaultMessage:"Search and select a tag.",description:"Help text appearing in a dropdown. Use imperative"}),maxTagsReached:l.formatMessage({id:"tagInput.maxTagsReached",defaultMessage:"No more tags can be added because the limit has been reached."}),tagAreaInstructions:l.formatMessage({id:"tagInput.tagAreaInstructions",defaultMessage:"tag selection. Press Backspace or Delete to remove a tag."}),tagsAdded:l.formatMessage({id:"tagInput.tagsAdded",defaultMessage:"Tags added",description:"For the user to understand how close they are to the tag limit, followed by x/y count"})},e=d(this.messageConfig);return e?Object.assign(Object.assign({},t),e):t}get inputMinimumWidth(){const t=getComputedStyle(this.inputEl),e=getComputedStyle(this.tagEls[this.tagEls.length-1]),o=[t.paddingLeft,t.paddingRight,t.marginLeft,t.marginRight,e.marginRight].reduce(((t,e)=>t+parseInt(e.replace("px",""))),0);return Math.max(150,c(this.inputEl,this.placeholder).width+o)}generateTagAddedMessage(t){return l.formatMessage({id:"tagInput.tagAdded",defaultMessage:"{tagName} added.",description:"A confirmation for adding a tag."},{tagName:t})}generateTagAlreadyAddedMessage(t){return l.formatMessage({id:"tagInput.tagAlreadyAdded",defaultMessage:"{tagName} has already been added.",description:"An alert for adding a tag that is already present."},{tagName:t})}componentWillLoad(){this.placeholder||(this.placeholder=this.createPlaceholderDefault(this.addNew,!!this.options)),this.label||console.error("wm-tag-input must have a label property"),this.consolidateSelectedTags(),this.el.focus=()=>{const t=this.nonLockedTagEls[0];t?(this.tagAreaEl.focus(),this.focusTag(t)):this.inputEl.focus()},new ResizeObserver((()=>this.debouncedUpdate())).observe(this.el),this.el.closest("wm-modal")&&(this.inModal=!0)}componentDidLoad(){this.tagEls.forEach((t=>t.classList.remove("highlight")))}componentDidRender(){this.positionInput(),this.tagEls.forEach((t=>{const e=t.querySelector(".tag-text"),o=this.el.shadowRoot.querySelector(".tags-and-input-wrapper"),i=e.getBoundingClientRect().left,r=o.getBoundingClientRect().right-10-8-28;let s=t.dataset.tag;if("table"===this.tagInputType){const t=this.el.querySelector(`#${s}`);s=t?t.col1:""}e.textContent=p(e,s,r-i,5)}))}consolidateSelectedTags(){this.tagsList.forEach((t=>{this.includesCaseInsensitive(this.optionsList,t)||(this.options+=`${this.options.length>0?",":""}${t}`)})),this.optionsList=h(this.options)}createPlaceholderDefault(t,e){const o=l.formatMessage({id:"tagInput.placeholderAddAndSearch",defaultMessage:"Add or search for a tag",description:"Placeholder text. Use imperative"}),i=l.formatMessage({id:"tagInput.placeholderSearch",defaultMessage:"Search and select a tag",description:"Placeholder text. Use imperative"}),r=l.formatMessage({id:"tagInput.placeholderAdd",defaultMessage:"Add a new tag",description:"Placeholder text. Use imperative"});let s="";return t&&e?s=o:!t&&e?s=i:t&&(s=r),s}reflectSelectedTags(t,e){let o="",i=this.tagsList;o=t.length>e.length?t.filter((t=>!e.includes(t)))[0]:e.filter((e=>!t.includes(e)))[0],"table"===this.tagInputType&&(o=this.wmRowEls.filter((t=>t.id===o))[0],i=this.tagsList.map((t=>this.el.querySelector(`#${t}`)))),this.selectedTags=this.listToCSV(this.tagsList),this.wmTagInputChanged.emit({value:i,tagChanged:o})}handleErrorMessageChange(){this.errorMessage&&this.announce(this.errorMessage)}handleRowUpdate(){o(this.el)}closeIfNotElOrChild(t){const e=t.target!==this.el&&!this.el.shadowRoot.contains(t.target);"dropdown"===this.tagInputType&&e&&this.isExpanded&&this.closeDropdown()}dismissTooltip(){this.tooltipVisible&&g()}handleInputKeyDown(t){switch(/^.$/.test(t.key)&&this.inputEl.value.length>=this.characterLimit&&this.announce(this.generateCharacterLimitWarning(this.inputEl.value.length,this.characterLimit)),t.stopPropagation(),t.key){case"Enter":t.preventDefault(),this.handleInputEnter();break;case"ArrowDown":t.preventDefault(),this.handleInputArrowDown();break;case"ArrowUp":t.preventDefault(),this.handleInputArrowUp();break;case"ArrowLeft":"table"===this.tagInputType&&this.tablePosition.row&&(t.preventDefault(),this.moveLeftCell());break;case"ArrowRight":"table"===this.tagInputType&&this.tablePosition.row&&(t.preventDefault(),this.moveRightCell());break;case"Escape":"dropdown"===this.tagInputType&&this.isExpanded&&this.closeDropdown();break;case"ArrowLeft":case"Backspace":this.handleInputBackspace()}}handleInputFocus(){"dropdown"===this.tagInputType&&(this.openDropdown(),this.clearListItemFocus()),o(this.el)}handleInputChanged(t){this.charCount=t.length,"dropdown"===this.tagInputType?(this.clearListItemFocus(),this.charCount>=this.characterLimit-5&&this.announce(this.generateCharacterLimitWarning(this.charCount,this.characterLimit)),this.isExpanded||this.openDropdown()):"table"===this.tagInputType&&this.clearCellFocus(),t.includes(",")&&this.addNew?(t.split(",").forEach((t=>this.submitInput(this.addNew,t.trim()))),this.announce(this.generateTagAddedMessage(t.split(",").join(", ")))):this.announceExistingOptions()}handleInputEnter(){"dropdown"===this.tagInputType?this.focusedListItem?this.handleListItemClick(this.focusedListItem):this.submitInput(this.addNew,this.inputEl.value.trim()):"table"===this.tagInputType&&this.tablePosition.row>0&&this.handleTableRowClick(this.localRowEls[this.tablePosition.row].id)}submitInput(t,e){const o=e.match(/\S/);t&&o&&(this.addTag(e),this.optionsList=this.addOption(e),this.resetInput())}handleInputArrowDown(){"table"===this.tagInputType?this.moveDownRow():"dropdown"===this.tagInputType&&this.isExpanded?this.moveDownListItem():"dropdown"===this.tagInputType&&this.openDropdown()}handleInputArrowUp(){"table"===this.tagInputType?this.moveUpRow():"dropdown"===this.tagInputType&&this.isExpanded?this.moveUpListItem():"dropdown"===this.tagInputType&&this.openDropdown()}handleInputBackspace(){""===this.inputEl.value&&this.tagsList.length>0&&window.requestAnimationFrame((()=>{this.nonLockedTagsList.length>0&&(this.tagAreaEl.focus(),this.focusTag(this.tagEls[this.tagEls.length-1]))}))}handleListItemKeyDown(t){const e=t.target;switch(t.key){case"Enter":case" ":t.preventDefault(),e.click();break;case"ArrowDown":t.preventDefault(),this.moveDownListItem();break;case"ArrowUp":t.preventDefault(),this.moveUpListItem();break;case"Escape":this.focusedElement!==this.inputEl?this.inputEl.focus():"dropdown"===this.tagInputType&&this.closeDropdown()}}handleListItemClick(t){const e=t.dataset.option.trim()||"";this.includesCaseInsensitive(this.tagsList,e)?this.announce(this.generateTagAlreadyAddedMessage(e)):(this.resetInput(),this.addTag(e),this.optionsList=this.addOption(e),this.focusedListItem=null)}handleTableRowClick(t){this.el.querySelector(`#${t}`).locked||(this.includesCaseInsensitive(this.tagsList,t)?this.removeTag(t):this.tagLimitReached||(this.addTag(t),this.resetInput()))}handleTagAreaKeyDown(t){switch(t.key){case"ArrowLeft":case"ArrowUp":t.preventDefault(),this.moveLeftTag();break;case"ArrowRight":case"ArrowDown":t.preventDefault(),this.moveRightTag();break;case"Backspace":case"Delete":this.handleTagAreaDelete()}}handleTagAreaDelete(){const t=this.focusedTag&&this.focusedTag.classList.contains("locked");this.focusedTag&&!t&&(this.removeTag(this.focusedTag.dataset.tag),0===this.nonLockedTagsList.length?this.inputEl.focus():(this.focusedTag=this.focusedTag===this.tagEls[this.tagEls.length-1]?this.tagEls[this.tagEls.length-2]:this.focusedTag,this.focusTag(this.focusedTag)))}handleBlur(t,e){const o=t.relatedTarget!==e&&!this.el.shadowRoot.contains(t.relatedTarget);this.dismissTooltip(),this.clearCellFocus(),o&&(this.fieldWrapperEl.classList.remove("focused"),"dropdown"===this.tagInputType&&this.closeDropdown())}handleCellMouseEnter(t){const e=t.target,o=e.querySelector(".cell-content-wrapper");o.scrollWidth>o.clientWidth&&w("bottom",e,e.innerText)}handleTagAreaFocus(){"dropdown"===this.tagInputType&&this.closeDropdown();const t=this.nonLockedTagEls[0];t&&this.focusTag(t)}handleRemoveButtonClick(t){this.moveLeftTag(),this.removeTag(t)}moveDownListItem(){if(this.listItemEls.length>0){this.focusListItem(this.focusedListItem&&this.focusedListItem.nextElementSibling?this.focusedListItem.nextElementSibling:this.listItemEls[0])}}moveUpListItem(){if(this.listItemEls.length>0){const t=this.listItemEls[this.listItemEls.length-1];this.focusedListItem?this.focusedListItem.previousElementSibling?this.focusListItem(this.focusedListItem.previousElementSibling):this.clearListItemFocus():this.focusListItem(t)}}moveDownRow(){this.filteredRows.length>0&&(0===this.tablePosition.row||this.tablePosition.row===this.filteredRows.length?this.tablePosition.row=1:this.tablePosition.row++,this.filteredRows[this.tablePosition.row-1].locked?this.moveDownRow():this.focusCell(this.tablePosition))}moveUpRow(){if(this.filteredRows.length>0){0===this.tablePosition.row?this.tablePosition.row=this.filteredRows.length:1===this.tablePosition.row?this.tablePosition.row=0:this.tablePosition.row--;const t=this.filteredRows[this.tablePosition.row-1];t&&t.locked?this.moveUpRow():t?this.focusCell(this.tablePosition):this.clearCellFocus()}}moveLeftCell(){1!=this.tablePosition.column&&(this.tablePosition.column--,this.focusCell(this.tablePosition))}moveRightCell(){const t=h(this.colHeaders).length;this.tablePosition.column<t&&(this.tablePosition.column++,this.focusCell(this.tablePosition))}moveLeftTag(){const t=this.tagEls[this.tagEls.length-1];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.previousElementSibling)?this.focusedTag.previousElementSibling:t,this.focusedTag.classList.contains("locked")&&this.nonLockedTagEls.length>0?this.moveLeftTag():this.focusTag(this.focusedTag)}moveRightTag(){const t=this.tagEls[0];this.focusedTag=this.focusedTag&&this.tagEls.includes(this.focusedTag.nextElementSibling)?this.focusedTag.nextElementSibling:t,this.focusedTag.classList.contains("locked")?this.moveRightTag():this.focusTag(this.focusedTag)}addOption(t){let e=this.optionsList;return this.includesCaseInsensitive(this.optionsList,t)||(e=e.concat(t)),e}removeOption(t){this.optionsList=this.filterCaseInsensitive(this.optionsList,t)}addTag(t){let e=this.tagsList;const o=this.includesCaseInsensitive(this.tagsList,t),i=this.optionsList.filter((e=>e.toLowerCase()===t.toLowerCase()))[0];if(!o){let o=t;"table"===this.tagInputType&&(o=this.el.querySelector(`#${t}`).col1),this.announce(this.generateTagAddedMessage(o)),this.tagsList=e.concat(i||t),this.tagLimitReached?this.tagAreaEl.focus():window.requestAnimationFrame((()=>this.tagsAndInputWrapperEl.scrollTop=this.tagsAndInputWrapperEl.scrollHeight))}}removeTag(t){let e=t;"table"===this.tagInputType&&(e=this.el.querySelector(`#${t}`).col1);const o=l.formatMessage({id:"tagInput.tagRemoved",defaultMessage:"{tag} removed"},{tag:e});if(this.announce(o),this.tagsList=this.filterCaseInsensitive(this.tagsList,t),"dropdown"===this.tagInputType){const e=h(this.options);this.includesCaseInsensitive(this.optionsList,t)&&!this.includesCaseInsensitive(e,t)&&this.removeOption(t)}}focusListItem(t){this.focusedListItem=t,this.inputEl.setAttribute("aria-activedescendant",this.focusedListItem.id),t.scrollIntoView({block:"nearest"})}focusTag(t){t.classList.contains("locked")?(this.focusedTag=null,this.tagAreaEl.setAttribute("aria-activedescendant","")):(this.focusedTag=t,this.tagAreaEl.setAttribute("aria-activedescendant",this.focusedTag.id),this.focusedTag.scrollIntoView({block:"nearest"})),window.requestAnimationFrame((()=>{g();const e=t.querySelector(".tag-text"),o=t.dataset.tag;o!==e.textContent&&e.textContent.includes("...")&&w("bottom",t,o)}))}focusCell(t){if(this.clearCellFocus(!1),t.row){const e=this.localRowEls[t.row],o=e.querySelectorAll("td")[t.column-1],i=o.querySelector(".cell-content-wrapper"),r=i.scrollWidth>i.clientWidth;e.classList.add("focused"),o.classList.add("focused"),o.scrollIntoView({block:"nearest"}),this.inputEl.setAttribute("aria-activedescendant",o.id),this.dismissTooltip(),r&&w("bottom",o,o.innerText)}}clearTagFocus(){this.tagAreaEl.setAttribute("aria-activedescendant",""),this.focusedTag=null}clearCellFocus(t=!0){this.inputEl.setAttribute("aria-activedescendant",""),t&&(this.tablePosition={row:0,column:1}),this.localRowEls.forEach((t=>{t.classList.remove("focused"),t.querySelectorAll("td").forEach((t=>{t.classList.remove("focused")}))}))}openDropdown(){this.openUp=m(this.el,this.dropdownEl.clientHeight,this.el.clientHeight,-2),this.isExpanded=!0}closeDropdown(){this.clearListItemFocus(),this.isExpanded=!1}clearListItemFocus(){this.focusedListItem=null,this.inputEl.setAttribute("aria-activedescendant",""),this.listItemEls.forEach((t=>{t.classList.remove("focused")}))}resetInput(){this.charCount=0,this.inputEl.value=""}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.liveRegionMessage=t}announceExistingOptions(){window.requestAnimationFrame((()=>{let t=0;"dropdown"===this.tagInputType?t=this.optionEls.length:"table"===this.tagInputType&&(t=this.filteredRows.length);const e=l.formatMessage({id:"tagInput.existingOptions",defaultMessage:"{num, plural, one {1 existing option.} other {# existing options.}}"},{num:t});this.announce(e)}))}generateCharacterLimitWarning(t,e){let o=u.getCharactersEntered(t,e);return t>=e&&(o+=` ${u.characterLimitReached}`),o}positionInput(){const t=this.tagEls[this.tagEls.length-1];if(this.inputEl.style.position="static",this.inputEl.style.width="100%",this.inputEl.classList.add("extended"),t){const e=this.tagAreaEl.getBoundingClientRect().right-t.getBoundingClientRect().right;e>=this.inputMinimumWidth&&(this.inputEl.style.position="absolute",this.inputEl.style.top=t.offsetTop.toString()+"px",this.inputEl.style.width=(e-8).toString()+"px",this.inputEl.classList.remove("extended"))}}handleTagMouseEnter(t){const e=t.target.querySelector(".tag-text").textContent,o=t.target.dataset.tag;e!==o&&e.includes("...")&&w("bottom",t.target,o)}listToCSV(t){return t.join(",")}includesCaseInsensitive(t,e){return t.map((t=>t.toLowerCase())).includes(e.toLowerCase())}filterCaseInsensitive(t,e){return t.filter((t=>t.toLowerCase()!==e.toLowerCase()))}sortCaseInsensitive(t){return t.sort(((t,e)=>(t=t.toLowerCase())>(e=e.toLowerCase())?1:t<e?-1:0))}renderTags(){let t=[],e=[];return this.tagsList.forEach(((o,r)=>{const s=`tag${r+1}`;let a="",n=!1;if("dropdown"===this.tagInputType)a=o;else if("table"===this.tagInputType){const t=this.el.querySelector(`#${o}`);a=t?t.col1:"",n=!!t&&t.locked}(n?t:e).push(i("li",{id:s,class:`tag highlight ${this.focusedTag&&this.focusedTag.id===s?"focused":""} ${n?"locked":""}`,"data-tag":o,role:"option",onMouseEnter:t=>this.handleTagMouseEnter(t),onMouseLeave:g},i("span",{class:"sr-only"},o),i("span",{class:"tag-text","aria-hidden":"true"},a),n?i("div",{class:"icon lock"}):i("button",{class:"icon remove-btn",tabIndex:-1,onClick:()=>this.handleRemoveButtonClick(o)})))})),[...t,...e]}renderDropdown(){return i("div",{class:`dropdown-wrapper ${this.isExpanded?"open":""} ${this.openUp?"upwards":""}`,ref:t=>this.dropdownEl=t},i("div",{id:"help-text",class:"help-text"},this.renderHelpText()),i("ul",{class:"dropdown",id:"dropdown",role:"listbox","aria-multiselectable":"true","aria-expanded":!!this.isExpanded&&"true","aria-label":this.label,tabindex:-1},this.inputEl&&this.renderAddNewButton(),this.renderListItems(this.optionsList)))}renderListItems(t){return t=this.sortCaseInsensitive(t),this.inputEl&&this.inputEl.value&&(t=this.optionsList.filter((t=>t.toLowerCase().includes(this.inputEl.value.toLowerCase())))),t.map(((t,e)=>{const o=`option${e+1}`,r=this.focusedListItem&&this.focusedListItem.id===o,s=this.includesCaseInsensitive(this.tagsList,t);return i("li",{class:"option "+(r?"focused":""),role:"option",id:o,"data-option":t,"aria-selected":s?"true":"false","aria-disabled":s?"true":"false",onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t.target)},t)}))}renderAddNewButton(){const t=this.inputEl.value.match(/\S/),e=this.includesCaseInsensitive(this.optionsList,this.inputEl.value.trim());if(this.addNew&&t&&!e){const t="add-new-btn",e=this.focusedListItem&&this.focusedListItem.id===t;return i("li",{role:"option",class:"add-new-btn "+(e?"focused":""),id:t,"data-option":this.inputEl.value,onKeyDown:t=>this.handleListItemKeyDown(t),onBlur:t=>this.handleBlur(t,this.el),onClick:t=>this.handleListItemClick(t.target),tabIndex:e?0:-1},`Add "${this.inputEl.value.trim()}"`)}return""}renderHelpText(){let t="";return this.optionsList.length>0&&(t+=this.componentMessages.selectionHelpText),this.addNew&&(t+=" "+this.componentMessages.addNewHelpText),t}renderTagCounter(){if(this.maxTags)return i("div",{class:"lower-row"},i("div",{id:"max-tags"},`${this.componentMessages.tagsAdded}: ${this.tagsList.length}/${this.maxTags}`,this.tagLimitReached&&` - ${this.componentMessages.maxTagsReached}`))}renderTable(){return i("div",{class:"table-wrapper",onScroll:()=>this.dismissTooltip()},i("table",{id:"table",role:"grid",class:this.colWidths?"fixed-widths":"","aria-label":this.label,"aria-multiselectable":"true"},this.renderTableHeaders(),this.filteredRows.length?this.renderTableRows():i("div",{class:"no-results"},this.noResultsMessage)))}renderTableHeaders(){return i("tr",{class:"headers",role:"row"},h(this.colHeaders).map(((t,e)=>{let o="wrap";return this.colWrap&&h(this.colWrap)[e]&&(o=h(this.colWrap)[e]),i("th",{class:`header-cell ${o}`,role:"columnheader",width:this.colWidths?h(this.colWidths)[e]:""},t)})))}renderTableRows(){return this.filteredRows.map((t=>{const e=this.includesCaseInsensitive(this.tagsList,t.id);return i("tr",{id:t.id,class:`${t.locked?"locked":""} ${e?"selected":""}`,role:"row",onClick:()=>this.handleTableRowClick(t.id)},this.renderTableCells(t))}))}renderTableCells(t){const e=[t.col1,t.col2,t.col3,t.col4].filter((t=>!!t)),o=this.includesCaseInsensitive(this.tagsList,t.id);return e.map(((e,r)=>{const s=`${t.id}-col${r+1}`;let a="wrap";return this.colWrap&&h(this.colWrap)[r]&&(a=h(this.colWrap)[r]),i("td",{id:s,role:"gridcell","aria-describedby":`${s}-description`,"aria-selected":o.toString(),onMouseEnter:t=>this.handleCellMouseEnter(t),onMouseLeave:()=>this.dismissTooltip()},i("div",{class:`cell-content-wrapper ${a}`},e),i("div",{class:"description",id:`${s}-description`},t.locked?"locked":""))}))}render(){return i(r,{id:this.uid},i("div",{class:`wrapper label-${this.labelPosition} ${this.errorMessage?"invalid":""}`},i("div",{class:"label-wrapper"},i("label",{class:"label",htmlFor:`input${this.uid}`},this.label,this.requiredField&&i("span",{class:"required","aria-hidden":"true"},"*"))),i("div",{class:`field-wrapper ${this.focusedElement?"focused":""} ${this.errorMessage?"invalid":""}`,ref:t=>this.fieldWrapperEl=t},i("div",{class:"upper-row"},i("div",{class:"tags-and-input-wrapper "+(this.inModal?"in-modal":""),ref:t=>this.tagsAndInputWrapperEl=t},this.tagsList.length>0&&i("ul",{ref:t=>this.tagAreaEl=t,class:"tag-area",role:"listbox","aria-activedescendant":"","aria-orientation":"horizontal","aria-label":`${this.label} ${this.tagsList.length>0?this.componentMessages.tagAreaInstructions:""}`,tabindex:this.nonLockedTagsList.length>0?0:-1,"aria-describedby":"info max-tags",onFocus:()=>this.handleTagAreaFocus(),onBlur:t=>{this.clearTagFocus(),this.handleBlur(t,this.el)},onKeyDown:t=>this.handleTagAreaKeyDown(t)},this.renderTags()),i("input",{id:`input${this.uid}`,class:"input "+(this.tagLimitReached?"hidden":""),role:"combobox",ref:t=>this.inputEl=t,autocomplete:"off","aria-required":this.requiredField?"true":null,"aria-controls":this.tagInputType,"aria-describedby":"help-text"+(this.errorMessage?" error ":""),"aria-label":`${this.label} ${"dropdown"===this.tagInputType?u.getCharacterLimit(this.characterLimit):""}`,"aria-expanded":"dropdown"===this.tagInputType?this.isExpanded.toString():null,placeholder:this.placeholder,maxLength:"dropdown"===this.tagInputType?this.characterLimit:void 0,onInput:()=>this.handleInputChanged(this.inputEl.value),onBlur:t=>{this.handleBlur(t,this.el)},onFocus:()=>this.handleInputFocus(),onKeyDown:t=>this.handleInputKeyDown(t)})),"dropdown"===this.tagInputType&&i("div",{class:"character-count"},this.charCount,"/",this.characterLimit)),this.renderTagCounter(),"dropdown"===this.tagInputType&&this.renderDropdown()),this.info&&i("div",{id:"info",class:"info-text"},this.info),this.errorMessage&&i("div",{id:"error"},this.errorMessage),i("div",{class:"sr-only","aria-live":"assertive",ref:t=>this.liveRegionEl=t,"aria-atomic":"true"},this.liveRegionMessage),"table"===this.tagInputType&&this.renderTable()))}static get delegatesFocus(){return!0}get el(){return s(this)}static get watchers(){return{tagsList:["reflectSelectedTags"],errorMessage:["handleErrorMessageChange"]}}};b.style=':host{--wmcolor-taginput-altrow-background-table:var(--wmcolor-table-altrow-background);--wmcolor-taginput-border:var(--wmcolor-input-border);--wmcolor-taginput-charcount-background:var(--wmcolor-input-charcount-background);--wmcolor-taginput-header-background-table:var(--wmcolor-table-header-background);--wmcolor-taginput-help-text:var(--wmcolor-text);--wmcolor-taginput-icon:var(--wmcolor-icon-accent);--wmcolor-taginput-maxtags-background:var(--wmcolor-background-readonly);--wmcolor-taginput-maxtags-border:var(--wmcolor-input-border);--wmcolor-taginput-maxtags-text:var(--wmcolor-text);--wmcolor-taginput-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-taginput-option-background:var(--wmcolor-option-background);--wmcolor-taginput-option-border:var(--wmcolor-option-border);--wmcolor-taginput-option-text-selected:var(--wmcolor-option-text-disabled);--wmcolor-taginput-option-text:var(--wmcolor-interactive);--wmcolor-taginput-row-background-hover:var(--wmcolor-interactive-background-hover);--wmcolor-taginput-row-background-selected:var(--wmcolor-table-row-background-selected);--wmcolor-taginput-row-background-table:var(--wmcolor-table-row-background);--wmcolor-taginput-row-border-selected:var(--wmcolor-table-row-border-selected);--wmcolor-taginput-tag-background-focus:var(--wmcolor-palelilacgray-dark);--wmcolor-taginput-tag-background-highlight:var(--wmcolor-background-highlight);--wmcolor-taginput-tag-background-locked:var(--wmcolor-interactive-disabled);--wmcolor-taginput-tag-background:var(--wmcolor-palelilacgray);--wmcolor-taginput-tag-text-locked:var(--wmcolor-text-ondark);--wmcolor-taginput-tag-text:var(--wmcolor-text);--wmcolor-taginput-tagbutton-background-hover:var(--wmcolor-button-background-icononly-hover);--wmcolor-taginput-tagbutton-border:var(--wmcolor-button-border-icononly);--wmcolor-taginput-tagbutton-icon-hover:var(--wmcolor-button-icon-icononly-hover);--wmcolor-taginput-tagbutton-icon:var(--wmcolor-button-icon-icononly);font-family:inherit;width:100%;display:block;max-height:80vh}:host *{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:14px}:host .wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}:host .wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}:host .wrapper .label .required{color:var(--wmcolor-text-required)}:host .wrapper.label-left{-ms-flex-direction:row;flex-direction:row}:host .wrapper.label-left .label-wrapper{line-height:2.5rem}:host .wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}:host .wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .wrapper.invalid .label{color:var(--wmcolor-text-error)}:host .wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] :host .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}:host .wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}:host .wrapper{width:100%;height:100%;max-height:inherit;min-height:inherit;position:relative}:host .field-wrapper{position:relative;width:100%;border:1px solid;border-color:var(--wmcolor-taginput-border);-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px}:host .field-wrapper.focused{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}:host .field-wrapper.invalid{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}:host .wrapper:not(.label-left) .field-wrapper{-ms-flex-negative:0;flex-shrink:0}:host .character-count{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:5rem;background-color:var(--wmcolor-taginput-charcount-background);font-size:0.875rem;font-weight:500;-ms-flex-item-align:stretch;align-self:stretch}:host .tags-and-input-wrapper{position:relative;width:100%;padding:8px 8px 8px 0;overflow:auto;max-height:200px}:host .tags-and-input-wrapper.in-modal{max-height:20vh}:host .upper-row{width:100%;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:justify;justify-content:space-between}:host .upper-row:before{-ms-flex-item-align:start;align-self:flex-start;display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-taginput-icon);padding:0.75rem 0.5rem 0.75rem 0.75rem;line-height:normal;font-size:1.12rem}:host .lower-row{width:100%;min-height:1.875rem}:host #max-tags{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:1.875rem;background-color:var(--wmcolor-taginput-maxtags-background);padding:0.5rem 1rem;color:var(--wmcolor-taginput-maxtags-text);font-size:0.875rem;border-top:1px solid var(--wmcolor-taginput-maxtags-border);border-radius:0 0 3px 3px}:host .tag-area{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0;margin:0;gap:8px}:host .tag-area:focus{outline:none}:host .tag-area [role=option]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;height:1.75rem;list-style:none;color:var(--wmcolor-taginput-tag-text);background-color:var(--wmcolor-taginput-tag-background);padding:0.5rem 0.625rem;-webkit-transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);white-space:pre}:host .tag-area [role=option].highlight{-webkit-animation:fadeIn 1s;animation:fadeIn 1s}@-webkit-keyframes fadeIn{0%{background-color:var(--wmcolor-taginput-tag-background)}50%{background-color:var(--wmcolor-taginput-tag-background-highlight)}100%{background-color:var(--wmcolor-taginput-tag-background)}}@keyframes fadeIn{0%{background-color:var(--wmcolor-taginput-tag-background)}50%{background-color:var(--wmcolor-taginput-tag-background-highlight)}100%{background-color:var(--wmcolor-taginput-tag-background)}}:host .tag-area [role=option].focused{background-color:var(--wmcolor-taginput-tag-background-focus)}:host .tag-area [role=option].locked{background-color:var(--wmcolor-taginput-tag-background-locked);color:var(--wmcolor-taginput-tag-text-locked)}:host .tag-area [role=option] .icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:1.25rem;width:1.25rem;padding:0;margin-left:0.5rem}:host .tag-area [role=option] .icon.remove-btn{border:1px solid var(--wmcolor-taginput-tagbutton-border);color:var(--wmcolor-taginput-tagbutton-icon);border-radius:50%;cursor:pointer;-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 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)}:host .tag-area [role=option] .icon.remove-btn:hover{color:var(--wmcolor-taginput-tagbutton-icon-hover);background-color:var(--wmcolor-taginput-tagbutton-background-hover)}:host .tag-area [role=option] .icon.remove-btn: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 .tag-area [role=option] .icon.lock{color:var(--wmcolor-taginput-tag-text-locked)}:host .tag-area [role=option] .icon.lock: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:"\\f341"}:host .input{font-family:inherit;border:none;height:1.75rem;padding:0;margin:0;right:8px}:host .input.hidden{display:none}:host .input:focus{outline:none}:host .tag-area+.input.extended{-webkit-margin-before:8px;margin-block-start:8px}:host .dropdown-wrapper{margin:0;padding:0;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:calc(100% + 2px);right:0;z-index:100;width:100%;font-size:0.875rem}:host .dropdown-wrapper .dropdown{-webkit-overflow-scrolling:touch;overflow:auto;max-height:12.5rem;margin:0;padding:0}:host .dropdown-wrapper.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}:host .dropdown-wrapper.upwards{top:unset;bottom:calc(100% + 2px);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}:host .dropdown-wrapper li,:host .dropdown-wrapper div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0 1rem;background:var(--wmcolor-taginput-option-background);list-style:none;min-height:2.6875rem;white-space:pre-wrap;overflow-wrap:anywhere}:host .dropdown-wrapper li[role=option],:host .dropdown-wrapper li.add-new-btn,:host .dropdown-wrapper div[role=option],:host .dropdown-wrapper div.add-new-btn{cursor:pointer;color:var(--wmcolor-taginput-option-text);font-weight:bold;width:100%;border:none}:host .dropdown-wrapper li[role=option][aria-selected=true],:host .dropdown-wrapper li.add-new-btn[aria-selected=true],:host .dropdown-wrapper div[role=option][aria-selected=true],:host .dropdown-wrapper div.add-new-btn[aria-selected=true]{color:var(--wmcolor-taginput-option-text-selected);font-style:italic;font-weight:normal;cursor:unset}:host .dropdown-wrapper li[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper li[role=option].focused,:host .dropdown-wrapper li.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper li.add-new-btn.focused,:host .dropdown-wrapper div[role=option]:hover:not([aria-selected=true]),:host .dropdown-wrapper div[role=option].focused,:host .dropdown-wrapper div.add-new-btn:hover:not([aria-selected=true]),:host .dropdown-wrapper div.add-new-btn.focused{outline:none;background:var(--wmcolor-taginput-option-background-hover)}:host .dropdown-wrapper li.help-text,:host .dropdown-wrapper div.help-text{color:var(--wmcolor-taginput-help-text);height:auto;min-height:2.6875rem;padding-top:0.25rem;padding-bottom:0.25rem;white-space:normal}:host .dropdown-wrapper li:not(:last-child),:host .dropdown-wrapper div:not(:last-child){border-bottom:2px solid var(--wmcolor-taginput-option-border)}:host .info-text{font-style:italic;margin-top:0.25rem}:host .table-wrapper{overflow:auto;margin-top:1.5rem}:host .table-wrapper #table{width:100%;border-spacing:0px}:host .table-wrapper #table.fixed-widths{table-layout:fixed}:host .table-wrapper #table .headers{height:2.5rem;background-color:var(--wmcolor-taginput-header-background-table)}:host .table-wrapper #table .headers th{text-align:left;font-size:0.75rem;font-weight:700;text-transform:uppercase;padding:0 1.5rem}:host .table-wrapper tr:nth-child(even){background-color:var(--wmcolor-taginput-altrow-background-table)}:host .table-wrapper tr.selected{background-color:var(--wmcolor-taginput-row-background-selected);-webkit-box-shadow:inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);box-shadow:inset 0 0 0 1px var(--wmcolor-taginput-row-border-selected);font-weight:500}:host .table-wrapper tr.focused:not(.locked),:host .table-wrapper tr:hover:not(.locked){background-color:var(--wmcolor-taginput-row-background-hover);-webkit-box-shadow:none;box-shadow:none}:host .table-wrapper tr.locked td{cursor:auto}:host .table-wrapper tr.locked td:first-child .cell-content-wrapper: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:"\\f33e";margin-right:0.5rem;color:var(--wmcolor-taginput-tag-text)}:host .table-wrapper td{height:3.75rem;vertical-align:middle;padding:0 1.5rem;cursor:pointer}:host .table-wrapper td.focused{-webkit-box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:inset 0 2px 2px 0 rgba(244, 243, 246, 0.2), inset 0 2px 2px 0 rgba(0, 0, 0, 0.1), inset 0 0 4px 3px var(--wmcolor-interactive-focus)}:host .table-wrapper td .cell-content-wrapper.trunc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .table-wrapper td .description{display:none}:host .no-results{padding:1.25rem 1.5rem}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host #error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem}';export{b as wm_tag_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,t,e,r){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,i){function a(o){try{l(r.next(o))}catch(o){i(o)}}function s(o){try{l(r["throw"](o))}catch(o){i(o)}}function l(o){o.done?e(o.value):n(o.value).then(a,s)}l((r=r.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(o){return function(t){return l([o,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(e=0)),e)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:e.label++;return{value:s[1],done:false};case 5:e.label++;n=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){e.label=s[1];break}if(s[0]===6&&e.label<i[1]){e.label=i[1];i=s;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(s);break}if(i[2])e.ops.pop();e.trys.pop();continue}s=t.call(o,e)}catch(o){s=[6,o];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-c467a1e1.system.js","./p-313b6073.system.js","./p-d4ebbe84.system.js","./p-936e078c.system.js"],(function(o){"use strict";var t,e,r,n,i,a,s,l,d,c,u,b,m,p;return{setters:[function(o){t=o.r;e=o.c;r=o.f;n=o.h;i=o.H;a=o.g},function(o){s=o.g;l=o.p;d=o.a;c=o.d},function(o){u=o.g;b=o.i;m=o.x},function(o){p=o.g}],execute:function(){var h=':host .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:100%;border:2px solid transparent;font-family:inherit;font-size:0.75rem;font-weight:700;min-height:2.75rem;padding:12px 1.3333333333em;cursor:pointer;position:relative;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;-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button{min-height:3.3333333333em}}:host .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner{border:0;outline:none}:host .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 var(--wmcolor-interactive-focus);-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 var(--wmcolor-interactive-focus);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 var(--wmcolor-interactive-focus)}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).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 var(--wmcolor-interactive-focus-ondark);-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 var(--wmcolor-interactive-focus-ondark);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 var(--wmcolor-interactive-focus-ondark);outline:none}:host .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{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{margin-right:0.3125rem;font-size:0.875rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly){background:var(--wmcolor-button-background-primary);color:var(--wmcolor-button-text-primary)}:host .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-primary-hover)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-primary-ondark);background:var(--wmcolor-button-background-primary-ondark)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-primary-hover-ondark)}:host .wm-button.-secondary{color:var(--wmcolor-button-text-secondary);border:2px solid var(--wmcolor-button-border-secondary);background:var(--wmcolor-button-background-secondary)}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-secondary-hover);color:var(--wmcolor-button-text-secondary-hover);border-color:transparent}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-secondary-ondark);background:var(--wmcolor-button-background-secondary-ondark);border-color:var(--wmcolor-button-border-secondary-ondark)}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-secondary-hover-ondark);background:var(--wmcolor-button-background-secondary-hover-ondark);border-color:transparent}:host .wm-button.-textonly{color:var(--wmcolor-button-text-textonly);-webkit-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:0;height:auto;min-height:unset;border-radius:0;line-height:1;overflow-wrap:anywhere}:host .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-interactive-focus-textonly)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-interactive-focus-textonly) 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{background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-interactive-focus-textonly-ondark)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-interactive-focus-textonly-ondark) 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.dark{color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete{color:var(--wmcolor-button-background-delete)}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-icononly,:host .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),:host .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,:host .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly .mdi,:host .wm-button.-navigational .mdi{font-size:1.12rem}:host .wm-button.-icononly{border-width:1px !important;color:var(--wmcolor-button-icon-icononly);border-color:var(--wmcolor-button-border-icononly);background-color:var(--wmcolor-button-background-icononly)}:host .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.-icononly:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-icononly-hover);color:var(--wmcolor-button-icon-icononly-hover);border-color:transparent}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-icononly-ondark);background:var(--wmcolor-button-background-icononly-ondark);border-color:var(--wmcolor-button-border-icononly-ondark)}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-icononly-hover-ondark);background:var(--wmcolor-button-background-icononly-hover-ondark);border-color:transparent}:host .wm-button.-navigational{border:none !important;background-color:var(--wmcolor-button-background-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:var(--wmcolor-button-background-navigational-hover)}:host .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.-navigational.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational-ondark);background:var(--wmcolor-button-background-navigational-ondark)}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-navigational-hover-ondark);background:var(--wmcolor-button-background-navigational-hover-ondark)}:host .wm-button.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-pairnegative{background:var(--wmcolor-button-background-negative);border-color:var(--wmcolor-button-background-negative);color:var(--wmcolor-button-text-negative)}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-negative-hover);border-color:var(--wmcolor-button-background-negative-hover)}:host .wm-button.-pairpositive{background:var(--wmcolor-button-background-positive);border-color:var(--wmcolor-button-background-positive);color:var(--wmcolor-button-text-positive)}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-positive-hover);border-color:var(--wmcolor-button-background-positive-hover)}:host .wm-button.-selector,:host .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;border-radius:3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;font-weight:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,:host .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,:host .wm-button.-selector-primary: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%);font-size:1.12rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,:host .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector{background:var(--wmcolor-button-background-selector);color:var(--wmcolor-button-text-selector);border-color:var(--wmcolor-button-border-selector)}:host .wm-button.-selector:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selector-hover);color:var(--wmcolor-button-text-selector-hover);border-color:transparent}:host .wm-button.-selector.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selector-ondark);border-color:var(--wmcolor-button-border-selector-ondark);background:var(--wmcolor-button-background-selector-ondark)}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selector-hover-ondark);background:var(--wmcolor-button-background-selector-hover-ondark);border-color:transparent}:host .wm-button.-selector-primary{background:var(--wmcolor-button-background-selectorprimary);color:var(--wmcolor-button-text-selectorprimary)}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selectorprimary-hover)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selectorprimary-ondark);background:var(--wmcolor-button-background-selectorprimary-ondark)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selectorprimary-hover-ondark);background:var(--wmcolor-button-background-selectorprimary-hover-ondark)}:host .wm-button:disabled,:host .wm-button.disabled{cursor:default;pointer-events:none}:host .wm-button:disabled.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.-secondary:not(.-permanentlydelete){-webkit-box-shadow:none;box-shadow:none;border-color:var(--wmcolor-button-border-secondary-disabled);color:var(--wmcolor-button-text-secondary-disabled)}:host .wm-button:disabled.-primary,:host .wm-button.disabled.-primary{background:var(--wmcolor-button-background-primary-disabled);color:var(--wmcolor-button-text-primary-disabled)}:host .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-permanentlydelete{background:var(--wmcolor-button-background-delete-disabled);color:var(--wmcolor-button-text-delete-disabled);border-color:var(--wmcolor-button-background-delete-disabled)}:host .wm-button:disabled.-pairnegative,:host .wm-button.disabled.-pairnegative{background:var(--wmcolor-button-background-negative-disabled);border-color:var(--wmcolor-button-background-negative-disabled);color:var(--wmcolor-button-text-negative-disabled)}:host .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-pairpositive{background:var(--wmcolor-button-background-positive-disabled);border-color:var(--wmcolor-button-background-positive-disabled);color:var(--wmcolor-button-text-positive-disabled)}:host .wm-button:disabled.-selector,:host .wm-button.disabled.-selector{color:var(--wmcolor-button-text-selector-disabled);border-color:var(--wmcolor-button-border-selector-disabled)}:host .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary{background:var(--wmcolor-button-background-selectorprimary-disabled);color:var(--wmcolor-button-text-selectorprimary-disabled)}:host .wm-button:disabled.-navigational,:host .wm-button.disabled.-navigational{color:var(--wmcolor-button-icon-navigational-disabled)}:host .wm-button:disabled.-icononly,:host .wm-button.disabled.-icononly{color:var(--wmcolor-button-icon-icononly-disabled);border-color:var(--wmcolor-button-border-icononly-disabled)}:host .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly{color:var(--wmcolor-button-text-textonly-disabled);background:transparent}:host .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-icononly{background:transparent;color:var(--wmcolor-button-icon-icononly-disabled-ondark);border-color:var(--wmcolor-button-border-icononly-disabled-ondark)}:host .wm-button:disabled.dark.-navigational,:host .wm-button.disabled.dark.-navigational{color:var(--wmcolor-button-icon-navigational-disabled-ondark)}:host .wm-button:disabled.dark.-textonly,:host .wm-button.disabled.dark.-textonly{color:var(--wmcolor-button-text-textonly-disabled-ondark)}:host .wm-button:disabled.dark.-primary,:host .wm-button.disabled.dark.-primary{color:var(--wmcolor-button-text-primary-disabled-ondark);background:var(--wmcolor-button-background-primary-disabled-ondark)}:host .wm-button:disabled.dark.-secondary,:host .wm-button.disabled.dark.-secondary{background:transparent;color:var(--wmcolor-button-text-secondary-disabled-ondark);border-color:var(--wmcolor-button-border-secondary-disabled-ondark)}:host .wm-button:disabled.dark.-selector,:host .wm-button.disabled.dark.-selector{color:var(--wmcolor-button-text-selector-disabled-ondark);border-color:var(--wmcolor-button-border-selector-disabled-ondark);background:var(--wmcolor-button-background-selector-disabled-ondark)}:host .wm-button:disabled.dark.-selector-primary,:host .wm-button.disabled.dark.-selector-primary{color:var(--wmcolor-button-text-selectorprimary-disabled-ondark);background:var(--wmcolor-button-background-selectorprimary-disabled-ondark)}:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete-disabled-ondark);color:var(--wmcolor-button-text-delete-disabled-ondark)}:host a.wm-button,:host label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host{width:100%;position:relative}:host[dir=RTL] .mdi{margin-left:0.3125rem;margin-right:0}:host 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 var(--wmcolor-uploader-button-focus) !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 var(--wmcolor-uploader-button-focus) !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 var(--wmcolor-uploader-button-focus) !important}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}.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{position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.header .notif-wrapper{-ms-flex-align:end;align-items:flex-end}.notif-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.notif-wrapper .notif{font-size:0.875rem;font-style:italic;margin-top:0.25rem}@media (max-width: 60.9375rem){.descr{margin-bottom:0.5rem}.notif-wrapper{margin-bottom:1rem}.header .notif-wrapper{-ms-flex-align:start;align-items:flex-start}}.file-info{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.file-info+.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:1.5rem;margin-bottom:0.4375rem}.empty-block .notif-wrapper{-ms-flex-pack:center;justify-content:center}.empty-block .notif-wrapper .wm-button{width:auto}ul{list-style:none;padding:0;width:100%}ul li{font-size:0.875rem}ul li .file{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:relative;height:3.75rem;padding:0.5rem 1.25rem;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}ul li .file+.file{margin-top:1.25rem}ul li .file .filename{font-weight:500}ul li .file .filedate{margin-left:3.75rem;font-weight:normal;font-style:italic}ul li .file wm-button+wm-button{margin-left:1rem}ul.file-list .file.--saved,ul.inprogress-list .file{margin-bottom:1.625rem}ul .progress{position:absolute;left:0;top:0;right:0;height:8px}ul.error-list li{margin-bottom:1.25rem;color:var(--wmcolor-text-error)}ul.error-list li .file{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}ul .error-message{padding-top:0.25rem;font-style:italic}';var g=o("wm_network_uploader",function(){function o(o){t(this,o);this.wmNetworkUploaderFilesChanged=e(this,"wmNetworkUploaderFilesChanged",7);this.inputId=u();this.isTabbing=false;this.fileList=[];this.inProgressList=[];this.errorList=[];this.notif=undefined;this.snackbar=[];this.numFilesInProgress=undefined;this.getPath=undefined;this.requestUploadPath=undefined;this.uploadPath=undefined;this.requestDownloadPath=undefined;this.deletePath=undefined;this.associatedData=undefined;this.buttonText=undefined;this.emptyStateText=undefined;this.icon=undefined;this.fileTypes="pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv";this.maxSize=100;this.maxFiles=undefined;this.sortBy="date"}o.prototype.toggleTabbingOn=function(){this.isTabbing=true};o.prototype.toggleTabbingOff=function(){this.isTabbing=false};o.prototype.handleUploadProgress=function(o){var t=this;this.inProgressList.map((function(e){if(e.name===o.detail.file_name){e.progress=o.detail.progress;r(t.el)}}));if(o.detail.progress===100){this.numFilesInProgress-=1}if(!this.srProgress&&this.numFilesInProgress){var e=this.numFilesInProgress;this.srProgress=setInterval((function(){var o=t.inProgressList.reduce((function(o,t){return t.progress?o+t.progress:o}),0);if(t.liveRegion){t.liveRegion.innerHTML=b.formatMessage({id:"uploader.uploadProgress",defaultMessage:"Upload progress: {percentage}%"},{percentage:Math.floor(o/e)})}}),5e3)}};o.prototype.handleFinishedSnack=function(o){this.snackbar=this.snackbar.filter((function(t){return t.id!==o.detail.id}))};o.prototype.setMaxSize=function(){this.maxSize=this.maxSize>100?100:this.maxSize};o.prototype.uploadNotifications=function(o,t){var e=this;if(t>0&&o===0){setTimeout((function(){e.notif=null}),20*1e3);var n=b.formatMessage({id:"uploader.finishedUploading",defaultMessage:"Finished uploading"});this.notif={id:5,message:n};if(this.liveRegion){this.liveRegion.innerHTML=n}this.numFilesInProgress=null;clearInterval(this.srProgress);r(this.el)}else if(o>0&&o!=t){var n=b.formatMessage({id:"uploader.filesUploading",defaultMessage:"{num, plural, one {1 file uploading} other {# files uploading}}"},{num:o});this.notif={id:6,message:n};if(this.liveRegion){this.liveRegion.innerHTML=n}r(this.el)}};o.prototype.emitFileListEvent=function(){this.wmNetworkUploaderFilesChanged.emit(this.fileList)};o.prototype.formatDate=function(o,t,e){var r=Date.parse(o);if(t.match(/^[a-zA-Z]*(-[a-zA-Z0-9]*)*$/g)){try{Intl.getCanonicalLocales(t)}catch(o){t="en-us"}}else{return o}if(!!r){var n=new Date(r);var i=n.getFullYear();var a=("0"+(n.getMonth()+1)).substr(-2);var s=("0"+n.getDate()).substr(-2);var l=n.toLocaleTimeString([t,"en-us"],{timeZone:e,hour:"numeric",minute:"numeric"});return"".concat(i,"/").concat(a,"/").concat(s," ").concat(l)}else{return o}};o.prototype.isValidSize=function(o){return o/1024/1024<=this.maxSize};o.prototype.isDuplicate=function(o){return this.fileList.find((function(t){return t.file_name===o}))};o.prototype.isEmpty=function(){return!this.fileList.length&&!this.inProgressList.length&&!this.errorList.length};Object.defineProperty(o.prototype,"isDisabled",{get:function(){var o=!!this.maxFiles&&this.fileList.length>=this.maxFiles;if(!this.notif){if(o){var t=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"});this.notif={id:1,message:t};if(this.liveRegion){this.liveRegion.innerHTML=t}}else{this.notif=null}}else if(this.notif.id===1){if(!o){this.notif=null}}return o||this.numFilesInProgress>0},enumerable:false,configurable:true});o.prototype.purgeProgressList=function(o){this.inProgressList=this.inProgressList.filter((function(t){return t.progress!==100&&t.name!==o.file_name}))};o.prototype.getExistingFiles=function(){var o=this;s(this.getPath).then((function(t){t.map((function(t){return o.purgeProgressList(t)}));if(o.sortBy==="name"){t.sort((function(o,t){return o.file_name.localeCompare(t.file_name)}))}o.fileList=t})).catch((function(o){console.error(o)}))};o.prototype.clearErrors=function(){this.errorList=[];this.notif=null};o.prototype.handleFiles=function(o){var t=this;var e=Array.from(o.target.files);var n=this.fileTypes.split(" ").join(", ");if(!!this.maxFiles&&this.fileList.length+e.length>this.maxFiles){var i=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"});this.notif={id:2,message:i};if(this.liveRegion){this.liveRegion.innerHTML=i}}else{e&&e.map((function(o){if(!m(o,t.fileTypes)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.invalidFileType",defaultMessage:"The file type is invalid. Accepted types: {validTypes}"},{validTypes:n})};t.errorList.push(e)}else if(!t.isValidSize(o.size)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.fileTooLarge",defaultMessage:"The selected file is too large. Maximum file size is {size}Mb"},{size:t.maxSize})};t.errorList.push(e)}else if(t.isDuplicate(o.name)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.duplicateName",defaultMessage:"A file with this name already exists."})};t.errorList.push(e)}else{t.inProgressList.push(o)}r(t.el)}));if(this.inProgressList.length>0){this.numFilesInProgress=this.inProgressList.length;this.inProgressList.map((function(o,e){t.uploadFile(o,e)}))}}o.target.value=""};o.prototype.uploadFile=function(o,t){var e=this;s(this.requestUploadPath+t.toString()).then((function(t){return __awaiter(e,void 0,void 0,(function(){var e,r,n;var i=this;return __generator(this,(function(a){switch(a.label){case 0:e=JSON.parse(this.associatedData);r=Object.assign(Object.assign({},e),{file_name:o.name,mime_type:o.type,file_path:t.path,document_uuid:t.guid});n=function(t){var e=t.lengthComputable&&t.total!==0?t.loaded/t.total*100:0;var r=new CustomEvent("wmUploadProgress",{detail:{file_name:o.name,progress:e}});i.el.dispatchEvent(r)};return[4,l(t.url,o,n)];case 1:a.sent();return[4,d(this.uploadPath,r)];case 2:a.sent();this.getExistingFiles();return[2]}}))}))})).catch((function(o){e.numFilesInProgress=null;e.inProgressList=[];e.notif={id:3,message:p.genericError};console.error(o)}))};o.prototype.downloadFile=function(o,t){this.clearErrors();var e={file_path:t,file_uuid:o};d(this.requestDownloadPath,e).then((function(o){window.location.assign(o.url)})).catch((function(o){console.error(o)}))};o.prototype.deleteFile=function(o){var t=this;this.clearErrors();this.snackbar.push({message:b.formatMessage({id:"uploader.fileDeleted",defaultMessage:"{fileName} was deleted."},{fileName:o.file_name}),id:o.uuid,link:""});this.fileList=this.fileList.filter((function(t){return t.uuid!==o.uuid}));c("".concat(this.deletePath,"/").concat(o.uuid)).catch((function(e){t.notif={id:4,message:b.formatMessage({id:"uploader.fileNotDeleted",defaultMessage:"{fileName} could not be deleted."},{fileName:o.file_name})};t.getExistingFiles();console.error(e)}))};o.prototype.componentWillLoad=function(){if(!this.getPath){throw new Error("wm-network-uploader: get-path is a required prop")}if(!this.requestUploadPath){throw new Error("wm-network-uploader: request-upload-path is a required prop")}if(!this.uploadPath){throw new Error("wm-network-uploader: upload-path is a required prop")}if(!this.requestDownloadPath){throw new Error("wm-network-uploader: request-download-path is a required prop")}if(!this.deletePath){throw new Error("wm-network-uploader: delete-path is a required prop")}if(!this.buttonText){throw new Error("wm-network-uploader: button-text is a required prop")}if(!this.emptyStateText){throw new Error("wm-network-uploader: empty-state-text is a required prop")}if(!this.associatedData){throw new Error("wm-network-uploader: associated-data is a required prop")}this.setMaxSize();this.clearErrors()};o.prototype.componentDidLoad=function(){this.getExistingFiles();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};o.prototype.uploadButtonOnClick=function(o){var t=this;if(this.isDisabled){o.preventDefault();if(this.liveRegion){var e=!!this.maxFiles&&this.fileList.length>=this.maxFiles;var r="";if(this.numFilesInProgress>0){r=b.formatMessage({id:"uploader.waitToUpload",defaultMessage:"Please wait for current upload to complete before uploading new files.",description:"Message for screen reader users"})}else if(e){r=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"})}if(r){this.liveRegion.innerHTML="";new Promise((function(o){setTimeout((function(){o("")}),500)})).then((function(){return t.liveRegion.innerHTML=r}))}}}else{this.clearErrors()}};o.prototype.renderUploadSvg=function(){return n("svg",{class:"upload-file",width:"91",height:"84",viewBox:"0 0 91 84"},n("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"}))};o.prototype.renderIcon=function(){var o=this.icon&&this.icon==="f066";return this.icon&&n("span",{class:"mdi ".concat(o?"rotate":"")},String.fromCodePoint(parseInt("0x".concat(this.icon))))};o.prototype.renderNotif=function(){return this.notif?n("span",{class:"notif"},this.notif.message):""};o.prototype.renderUploadButton=function(o){var t=this;return n("div",{class:"notif-wrapper"},n("input",{name:this.inputId,id:this.inputId,class:"sr-only",type:"file",multiple:true,onClick:function(o){return t.uploadButtonOnClick(o)},onChange:function(o){return t.handleFiles(o)}}),n("label",{htmlFor:this.inputId,class:"wm-button ".concat(o).concat(this.isTabbing?" user-is-tabbing":"")},this.renderIcon(),this.buttonText),this.renderNotif())};o.prototype.renderWithItems=function(){return n("div",null,n("div",{class:"header"},n("div",{class:"descr"},n("slot",null)),this.renderUploadButton(this.isDisabled?"disabled":"")),this.renderErrorList(),this.renderInProgressList(),this.renderFileList())};o.prototype.renderEmptyState=function(){return n("div",null,n("div",{class:"header"},n("div",{class:"descr"},n("slot",null))),n("div",{class:"empty-block"},this.renderUploadSvg(),n("div",{class:"empty-message"},this.emptyStateText),this.renderUploadButton("-primary empty-button")))};o.prototype.renderErrorList=function(){if(!!this.errorList.length){if(this.liveRegion){var o=this.errorList.reduce((function(o,t){return o+"".concat(t.file_name,": ").concat(t.message," ")}),"");this.liveRegion.innerHTML=o}return n("ul",{class:"error-list"},this.errorList.map((function(o){return n("li",null,n("div",{class:"file --error"},n("div",{class:"file-info"},n("span",{class:"filename"},o.file_name))),n("div",{class:"error-message"},o.message))})))}};o.prototype.renderInProgressList=function(){return n("ul",{class:"inprogress-list"},this.inProgressList.map((function(o){return n("li",null,n("div",{class:"file --progress"},n("div",{class:"progress",style:{background:"linear-gradient(to right, rgba(67, 126, 142, 1) ".concat(o.progress,"%, transparent ").concat(o.progress,"%)")}}),n("div",{class:"file-info"},n("span",{class:"filename"},o.name," ",n("span",{class:"sr-only"},"uploading")))))})))};o.prototype.renderFile=function(o){var t=this;return n("li",null,n("div",{class:"file --saved"},n("div",{class:"file-info"},n("span",{class:"filename"},o.file_name),n("span",{class:"filedate"},this.formatDate(o.updated_at,b.locale,Intl.DateTimeFormat().resolvedOptions().timeZone))),n("div",{class:"file-controls"},n("wm-button",{class:"download-button","button-type":"icononly",tooltip:"download","label-for-identical-buttons":"download ".concat(o.file_name),icon:"f1da",onClick:function(){return t.downloadFile(o.uuid,o.file_path)}}),n("wm-button",{class:"delete-button","button-type":"icononly",tooltip:"remove","label-for-identical-buttons":"remove ".concat(o.file_name),icon:"f1c0",onClick:function(){return t.deleteFile(o)}}))))};o.prototype.renderFileList=function(){var o=this;return n("ul",{class:"file-list"},this.fileList.map((function(t){return o.renderFile(t)})))};o.prototype.render=function(){var o=this;return n(i,null,this.isEmpty()?this.renderEmptyState():this.renderWithItems(),n("wm-snackbar",{notifications:JSON.stringify(this.snackbar)}),n("div",{ref:function(t){return o.liveRegion=t},class:"live-region sr-only","aria-live":"assertive","aria-atomic":"true"}))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{maxSize:["setMaxSize"],numFilesInProgress:["uploadNotifications"],fileList:["emitFileListEvent"]}},enumerable:false,configurable:true});return o}());g.style=h}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,t,e,r){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,i){function a(o){try{l(r.next(o))}catch(o){i(o)}}function s(o){try{l(r["throw"](o))}catch(o){i(o)}}function l(o){o.done?e(o.value):n(o.value).then(a,s)}l((r=r.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(o){return function(t){return l([o,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(e=0)),e)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:e.label++;return{value:s[1],done:false};case 5:e.label++;n=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){e.label=s[1];break}if(s[0]===6&&e.label<i[1]){e.label=i[1];i=s;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(s);break}if(i[2])e.ops.pop();e.trys.pop();continue}s=t.call(o,e)}catch(o){s=[6,o];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-c467a1e1.system.js","./p-313b6073.system.js","./p-7eb9bac9.system.js","./p-2e52e36f.system.js"],(function(o){"use strict";var t,e,r,n,i,a,s,l,d,c,u,b,m,p;return{setters:[function(o){t=o.r;e=o.c;r=o.f;n=o.h;i=o.H;a=o.g},function(o){s=o.g;l=o.p;d=o.a;c=o.d},function(o){u=o.g;b=o.i;m=o.x},function(o){p=o.g}],execute:function(){var h=':host .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:100%;border:2px solid transparent;font-family:inherit;font-size:0.75rem;font-weight:700;min-height:2.75rem;padding:12px 1.3333333333em;cursor:pointer;position:relative;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;-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button{min-height:3.3333333333em}}:host .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner{border:0;outline:none}:host .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 var(--wmcolor-interactive-focus);-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 var(--wmcolor-interactive-focus);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 var(--wmcolor-interactive-focus)}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).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 var(--wmcolor-interactive-focus-ondark);-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 var(--wmcolor-interactive-focus-ondark);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 var(--wmcolor-interactive-focus-ondark);outline:none}:host .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{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{margin-right:0.3125rem;font-size:0.875rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly){background:var(--wmcolor-button-background-primary);color:var(--wmcolor-button-text-primary)}:host .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-primary-hover)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-primary-ondark);background:var(--wmcolor-button-background-primary-ondark)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-primary-hover-ondark)}:host .wm-button.-secondary{color:var(--wmcolor-button-text-secondary);border:2px solid var(--wmcolor-button-border-secondary);background:var(--wmcolor-button-background-secondary)}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-secondary-hover);color:var(--wmcolor-button-text-secondary-hover);border-color:transparent}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-secondary-ondark);background:var(--wmcolor-button-background-secondary-ondark);border-color:var(--wmcolor-button-border-secondary-ondark)}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-secondary-hover-ondark);background:var(--wmcolor-button-background-secondary-hover-ondark);border-color:transparent}:host .wm-button.-textonly{color:var(--wmcolor-button-text-textonly);-webkit-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:0;height:auto;min-height:unset;border-radius:0;line-height:1;overflow-wrap:anywhere}:host .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-interactive-focus-textonly)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-interactive-focus-textonly) 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{background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-interactive-focus-textonly-ondark)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-interactive-focus-textonly-ondark) 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.dark{color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete{color:var(--wmcolor-button-background-delete)}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-icononly,:host .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),:host .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,:host .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly .mdi,:host .wm-button.-navigational .mdi{font-size:1.12rem}:host .wm-button.-icononly{border-width:1px !important;color:var(--wmcolor-button-icon-icononly);border-color:var(--wmcolor-button-border-icononly);background-color:var(--wmcolor-button-background-icononly)}:host .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.-icononly:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-icononly-hover);color:var(--wmcolor-button-icon-icononly-hover);border-color:transparent}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-icononly-ondark);background:var(--wmcolor-button-background-icononly-ondark);border-color:var(--wmcolor-button-border-icononly-ondark)}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-icononly-hover-ondark);background:var(--wmcolor-button-background-icononly-hover-ondark);border-color:transparent}:host .wm-button.-navigational{border:none !important;background-color:var(--wmcolor-button-background-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:var(--wmcolor-button-background-navigational-hover)}:host .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.-navigational.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational-ondark);background:var(--wmcolor-button-background-navigational-ondark)}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-navigational-hover-ondark);background:var(--wmcolor-button-background-navigational-hover-ondark)}:host .wm-button.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-pairnegative{background:var(--wmcolor-button-background-negative);border-color:var(--wmcolor-button-background-negative);color:var(--wmcolor-button-text-negative)}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-negative-hover);border-color:var(--wmcolor-button-background-negative-hover)}:host .wm-button.-pairpositive{background:var(--wmcolor-button-background-positive);border-color:var(--wmcolor-button-background-positive);color:var(--wmcolor-button-text-positive)}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-positive-hover);border-color:var(--wmcolor-button-background-positive-hover)}:host .wm-button.-selector,:host .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;border-radius:3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;font-weight:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,:host .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,:host .wm-button.-selector-primary: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%);font-size:1.12rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,:host .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector{background:var(--wmcolor-button-background-selector);color:var(--wmcolor-button-text-selector);border-color:var(--wmcolor-button-border-selector)}:host .wm-button.-selector:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selector-hover);color:var(--wmcolor-button-text-selector-hover);border-color:transparent}:host .wm-button.-selector.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selector-ondark);border-color:var(--wmcolor-button-border-selector-ondark);background:var(--wmcolor-button-background-selector-ondark)}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selector-hover-ondark);background:var(--wmcolor-button-background-selector-hover-ondark);border-color:transparent}:host .wm-button.-selector-primary{background:var(--wmcolor-button-background-selectorprimary);color:var(--wmcolor-button-text-selectorprimary)}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selectorprimary-hover)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selectorprimary-ondark);background:var(--wmcolor-button-background-selectorprimary-ondark)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selectorprimary-hover-ondark);background:var(--wmcolor-button-background-selectorprimary-hover-ondark)}:host .wm-button:disabled,:host .wm-button.disabled{cursor:default;pointer-events:none}:host .wm-button:disabled.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.-secondary:not(.-permanentlydelete){-webkit-box-shadow:none;box-shadow:none;border-color:var(--wmcolor-button-border-secondary-disabled);color:var(--wmcolor-button-text-secondary-disabled)}:host .wm-button:disabled.-primary,:host .wm-button.disabled.-primary{background:var(--wmcolor-button-background-primary-disabled);color:var(--wmcolor-button-text-primary-disabled)}:host .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-permanentlydelete{background:var(--wmcolor-button-background-delete-disabled);color:var(--wmcolor-button-text-delete-disabled);border-color:var(--wmcolor-button-background-delete-disabled)}:host .wm-button:disabled.-pairnegative,:host .wm-button.disabled.-pairnegative{background:var(--wmcolor-button-background-negative-disabled);border-color:var(--wmcolor-button-background-negative-disabled);color:var(--wmcolor-button-text-negative-disabled)}:host .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-pairpositive{background:var(--wmcolor-button-background-positive-disabled);border-color:var(--wmcolor-button-background-positive-disabled);color:var(--wmcolor-button-text-positive-disabled)}:host .wm-button:disabled.-selector,:host .wm-button.disabled.-selector{color:var(--wmcolor-button-text-selector-disabled);border-color:var(--wmcolor-button-border-selector-disabled)}:host .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary{background:var(--wmcolor-button-background-selectorprimary-disabled);color:var(--wmcolor-button-text-selectorprimary-disabled)}:host .wm-button:disabled.-navigational,:host .wm-button.disabled.-navigational{color:var(--wmcolor-button-icon-navigational-disabled)}:host .wm-button:disabled.-icononly,:host .wm-button.disabled.-icononly{color:var(--wmcolor-button-icon-icononly-disabled);border-color:var(--wmcolor-button-border-icononly-disabled)}:host .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly{color:var(--wmcolor-button-text-textonly-disabled);background:transparent}:host .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-icononly{background:transparent;color:var(--wmcolor-button-icon-icononly-disabled-ondark);border-color:var(--wmcolor-button-border-icononly-disabled-ondark)}:host .wm-button:disabled.dark.-navigational,:host .wm-button.disabled.dark.-navigational{color:var(--wmcolor-button-icon-navigational-disabled-ondark)}:host .wm-button:disabled.dark.-textonly,:host .wm-button.disabled.dark.-textonly{color:var(--wmcolor-button-text-textonly-disabled-ondark)}:host .wm-button:disabled.dark.-primary,:host .wm-button.disabled.dark.-primary{color:var(--wmcolor-button-text-primary-disabled-ondark);background:var(--wmcolor-button-background-primary-disabled-ondark)}:host .wm-button:disabled.dark.-secondary,:host .wm-button.disabled.dark.-secondary{background:transparent;color:var(--wmcolor-button-text-secondary-disabled-ondark);border-color:var(--wmcolor-button-border-secondary-disabled-ondark)}:host .wm-button:disabled.dark.-selector,:host .wm-button.disabled.dark.-selector{color:var(--wmcolor-button-text-selector-disabled-ondark);border-color:var(--wmcolor-button-border-selector-disabled-ondark);background:var(--wmcolor-button-background-selector-disabled-ondark)}:host .wm-button:disabled.dark.-selector-primary,:host .wm-button.disabled.dark.-selector-primary{color:var(--wmcolor-button-text-selectorprimary-disabled-ondark);background:var(--wmcolor-button-background-selectorprimary-disabled-ondark)}:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete-disabled-ondark);color:var(--wmcolor-button-text-delete-disabled-ondark)}:host a.wm-button,:host label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host{width:100%;position:relative}:host[dir=RTL] .mdi{margin-left:0.3125rem;margin-right:0}:host 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 var(--wmcolor-uploader-button-focus) !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 var(--wmcolor-uploader-button-focus) !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 var(--wmcolor-uploader-button-focus) !important}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}.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{position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:wrap;flex-wrap:wrap}.header .notif-wrapper{-ms-flex-align:end;align-items:flex-end}.notif-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.notif-wrapper .notif{font-size:0.875rem;font-style:italic;margin-top:0.25rem}@media (max-width: 60.9375rem){.descr{margin-bottom:0.5rem}.notif-wrapper{margin-bottom:1rem}.header .notif-wrapper{-ms-flex-align:start;align-items:flex-start}}.file-info{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.file-info+.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:1.5rem;margin-bottom:0.4375rem}.empty-block .notif-wrapper{-ms-flex-pack:center;justify-content:center}.empty-block .notif-wrapper .wm-button{width:auto}ul{list-style:none;padding:0;width:100%}ul li{font-size:0.875rem}ul li .file{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:relative;height:3.75rem;padding:0.5rem 1.25rem;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}ul li .file+.file{margin-top:1.25rem}ul li .file .filename{font-weight:500}ul li .file .filedate{margin-left:3.75rem;font-weight:normal;font-style:italic}ul li .file wm-button+wm-button{margin-left:1rem}ul.file-list .file.--saved,ul.inprogress-list .file{margin-bottom:1.625rem}ul .progress{position:absolute;left:0;top:0;right:0;height:8px}ul.error-list li{margin-bottom:1.25rem;color:var(--wmcolor-text-error)}ul.error-list li .file{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}ul .error-message{padding-top:0.25rem;font-style:italic}';var g=o("wm_network_uploader",function(){function o(o){t(this,o);this.wmNetworkUploaderFilesChanged=e(this,"wmNetworkUploaderFilesChanged",7);this.inputId=u();this.isTabbing=false;this.fileList=[];this.inProgressList=[];this.errorList=[];this.notif=undefined;this.snackbar=[];this.numFilesInProgress=undefined;this.getPath=undefined;this.requestUploadPath=undefined;this.uploadPath=undefined;this.requestDownloadPath=undefined;this.deletePath=undefined;this.associatedData=undefined;this.buttonText=undefined;this.emptyStateText=undefined;this.icon=undefined;this.fileTypes="pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv";this.maxSize=100;this.maxFiles=undefined;this.sortBy="date"}o.prototype.toggleTabbingOn=function(){this.isTabbing=true};o.prototype.toggleTabbingOff=function(){this.isTabbing=false};o.prototype.handleUploadProgress=function(o){var t=this;this.inProgressList.map((function(e){if(e.name===o.detail.file_name){e.progress=o.detail.progress;r(t.el)}}));if(o.detail.progress===100){this.numFilesInProgress-=1}if(!this.srProgress&&this.numFilesInProgress){var e=this.numFilesInProgress;this.srProgress=setInterval((function(){var o=t.inProgressList.reduce((function(o,t){return t.progress?o+t.progress:o}),0);if(t.liveRegion){t.liveRegion.innerHTML=b.formatMessage({id:"uploader.uploadProgress",defaultMessage:"Upload progress: {percentage}%"},{percentage:Math.floor(o/e)})}}),5e3)}};o.prototype.handleFinishedSnack=function(o){this.snackbar=this.snackbar.filter((function(t){return t.id!==o.detail.id}))};o.prototype.setMaxSize=function(){this.maxSize=this.maxSize>100?100:this.maxSize};o.prototype.uploadNotifications=function(o,t){var e=this;if(t>0&&o===0){setTimeout((function(){e.notif=null}),20*1e3);var n=b.formatMessage({id:"uploader.finishedUploading",defaultMessage:"Finished uploading"});this.notif={id:5,message:n};if(this.liveRegion){this.liveRegion.innerHTML=n}this.numFilesInProgress=null;clearInterval(this.srProgress);r(this.el)}else if(o>0&&o!=t){var n=b.formatMessage({id:"uploader.filesUploading",defaultMessage:"{num, plural, one {1 file uploading} other {# files uploading}}"},{num:o});this.notif={id:6,message:n};if(this.liveRegion){this.liveRegion.innerHTML=n}r(this.el)}};o.prototype.emitFileListEvent=function(){this.wmNetworkUploaderFilesChanged.emit(this.fileList)};o.prototype.formatDate=function(o,t,e){var r=Date.parse(o);if(t.match(/^[a-zA-Z]*(-[a-zA-Z0-9]*)*$/g)){try{Intl.getCanonicalLocales(t)}catch(o){t="en-us"}}else{return o}if(!!r){var n=new Date(r);var i=n.getFullYear();var a=("0"+(n.getMonth()+1)).substr(-2);var s=("0"+n.getDate()).substr(-2);var l=n.toLocaleTimeString([t,"en-us"],{timeZone:e,hour:"numeric",minute:"numeric"});return"".concat(i,"/").concat(a,"/").concat(s," ").concat(l)}else{return o}};o.prototype.isValidSize=function(o){return o/1024/1024<=this.maxSize};o.prototype.isDuplicate=function(o){return this.fileList.find((function(t){return t.file_name===o}))};o.prototype.isEmpty=function(){return!this.fileList.length&&!this.inProgressList.length&&!this.errorList.length};Object.defineProperty(o.prototype,"isDisabled",{get:function(){var o=!!this.maxFiles&&this.fileList.length>=this.maxFiles;if(!this.notif){if(o){var t=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"});this.notif={id:1,message:t};if(this.liveRegion){this.liveRegion.innerHTML=t}}else{this.notif=null}}else if(this.notif.id===1){if(!o){this.notif=null}}return o||this.numFilesInProgress>0},enumerable:false,configurable:true});o.prototype.purgeProgressList=function(o){this.inProgressList=this.inProgressList.filter((function(t){return t.progress!==100&&t.name!==o.file_name}))};o.prototype.getExistingFiles=function(){var o=this;s(this.getPath).then((function(t){t.map((function(t){return o.purgeProgressList(t)}));if(o.sortBy==="name"){t.sort((function(o,t){return o.file_name.localeCompare(t.file_name)}))}o.fileList=t})).catch((function(o){console.error(o)}))};o.prototype.clearErrors=function(){this.errorList=[];this.notif=null};o.prototype.handleFiles=function(o){var t=this;var e=Array.from(o.target.files);var n=this.fileTypes.split(" ").join(", ");if(!!this.maxFiles&&this.fileList.length+e.length>this.maxFiles){var i=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"});this.notif={id:2,message:i};if(this.liveRegion){this.liveRegion.innerHTML=i}}else{e&&e.map((function(o){if(!m(o,t.fileTypes)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.invalidFileType",defaultMessage:"The file type is invalid. Accepted types: {validTypes}"},{validTypes:n})};t.errorList.push(e)}else if(!t.isValidSize(o.size)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.fileTooLarge",defaultMessage:"The selected file is too large. Maximum file size is {size}Mb"},{size:t.maxSize})};t.errorList.push(e)}else if(t.isDuplicate(o.name)){var e={file_name:o.name,message:b.formatMessage({id:"uploader.duplicateName",defaultMessage:"A file with this name already exists."})};t.errorList.push(e)}else{t.inProgressList.push(o)}r(t.el)}));if(this.inProgressList.length>0){this.numFilesInProgress=this.inProgressList.length;this.inProgressList.map((function(o,e){t.uploadFile(o,e)}))}}o.target.value=""};o.prototype.uploadFile=function(o,t){var e=this;s(this.requestUploadPath+t.toString()).then((function(t){return __awaiter(e,void 0,void 0,(function(){var e,r,n;var i=this;return __generator(this,(function(a){switch(a.label){case 0:e=JSON.parse(this.associatedData);r=Object.assign(Object.assign({},e),{file_name:o.name,mime_type:o.type,file_path:t.path,document_uuid:t.guid});n=function(t){var e=t.lengthComputable&&t.total!==0?t.loaded/t.total*100:0;var r=new CustomEvent("wmUploadProgress",{detail:{file_name:o.name,progress:e}});i.el.dispatchEvent(r)};return[4,l(t.url,o,n)];case 1:a.sent();return[4,d(this.uploadPath,r)];case 2:a.sent();this.getExistingFiles();return[2]}}))}))})).catch((function(o){e.numFilesInProgress=null;e.inProgressList=[];e.notif={id:3,message:p.genericError};console.error(o)}))};o.prototype.downloadFile=function(o,t){this.clearErrors();var e={file_path:t,file_uuid:o};d(this.requestDownloadPath,e).then((function(o){window.location.assign(o.url)})).catch((function(o){console.error(o)}))};o.prototype.deleteFile=function(o){var t=this;this.clearErrors();this.snackbar.push({message:b.formatMessage({id:"uploader.fileDeleted",defaultMessage:"{fileName} was deleted."},{fileName:o.file_name}),id:o.uuid,link:""});this.fileList=this.fileList.filter((function(t){return t.uuid!==o.uuid}));c("".concat(this.deletePath,"/").concat(o.uuid)).catch((function(e){t.notif={id:4,message:b.formatMessage({id:"uploader.fileNotDeleted",defaultMessage:"{fileName} could not be deleted."},{fileName:o.file_name})};t.getExistingFiles();console.error(e)}))};o.prototype.componentWillLoad=function(){if(!this.getPath){throw new Error("wm-network-uploader: get-path is a required prop")}if(!this.requestUploadPath){throw new Error("wm-network-uploader: request-upload-path is a required prop")}if(!this.uploadPath){throw new Error("wm-network-uploader: upload-path is a required prop")}if(!this.requestDownloadPath){throw new Error("wm-network-uploader: request-download-path is a required prop")}if(!this.deletePath){throw new Error("wm-network-uploader: delete-path is a required prop")}if(!this.buttonText){throw new Error("wm-network-uploader: button-text is a required prop")}if(!this.emptyStateText){throw new Error("wm-network-uploader: empty-state-text is a required prop")}if(!this.associatedData){throw new Error("wm-network-uploader: associated-data is a required prop")}this.setMaxSize();this.clearErrors()};o.prototype.componentDidLoad=function(){this.getExistingFiles();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}};o.prototype.uploadButtonOnClick=function(o){var t=this;if(this.isDisabled){o.preventDefault();if(this.liveRegion){var e=!!this.maxFiles&&this.fileList.length>=this.maxFiles;var r="";if(this.numFilesInProgress>0){r=b.formatMessage({id:"uploader.waitToUpload",defaultMessage:"Please wait for current upload to complete before uploading new files.",description:"Message for screen reader users"})}else if(e){r=b.formatMessage({id:"uploader.fileUploadLimitExceeded",defaultMessage:"Upload unsuccessful because file selection would exceed the maximum number of files",description:"Message displayed when trying to upload too many files"})}if(r){this.liveRegion.innerHTML="";new Promise((function(o){setTimeout((function(){o("")}),500)})).then((function(){return t.liveRegion.innerHTML=r}))}}}else{this.clearErrors()}};o.prototype.renderUploadSvg=function(){return n("svg",{class:"upload-file",width:"91",height:"84",viewBox:"0 0 91 84"},n("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"}))};o.prototype.renderIcon=function(){var o=this.icon&&this.icon==="f066";return this.icon&&n("span",{class:"mdi ".concat(o?"rotate":"")},String.fromCodePoint(parseInt("0x".concat(this.icon))))};o.prototype.renderNotif=function(){return this.notif?n("span",{class:"notif"},this.notif.message):""};o.prototype.renderUploadButton=function(o){var t=this;return n("div",{class:"notif-wrapper"},n("input",{name:this.inputId,id:this.inputId,class:"sr-only",type:"file",multiple:true,onClick:function(o){return t.uploadButtonOnClick(o)},onChange:function(o){return t.handleFiles(o)}}),n("label",{htmlFor:this.inputId,class:"wm-button ".concat(o).concat(this.isTabbing?" user-is-tabbing":"")},this.renderIcon(),this.buttonText),this.renderNotif())};o.prototype.renderWithItems=function(){return n("div",null,n("div",{class:"header"},n("div",{class:"descr"},n("slot",null)),this.renderUploadButton(this.isDisabled?"disabled":"")),this.renderErrorList(),this.renderInProgressList(),this.renderFileList())};o.prototype.renderEmptyState=function(){return n("div",null,n("div",{class:"header"},n("div",{class:"descr"},n("slot",null))),n("div",{class:"empty-block"},this.renderUploadSvg(),n("div",{class:"empty-message"},this.emptyStateText),this.renderUploadButton("-primary empty-button")))};o.prototype.renderErrorList=function(){if(!!this.errorList.length){if(this.liveRegion){var o=this.errorList.reduce((function(o,t){return o+"".concat(t.file_name,": ").concat(t.message," ")}),"");this.liveRegion.innerHTML=o}return n("ul",{class:"error-list"},this.errorList.map((function(o){return n("li",null,n("div",{class:"file --error"},n("div",{class:"file-info"},n("span",{class:"filename"},o.file_name))),n("div",{class:"error-message"},o.message))})))}};o.prototype.renderInProgressList=function(){return n("ul",{class:"inprogress-list"},this.inProgressList.map((function(o){return n("li",null,n("div",{class:"file --progress"},n("div",{class:"progress",style:{background:"linear-gradient(to right, rgba(67, 126, 142, 1) ".concat(o.progress,"%, transparent ").concat(o.progress,"%)")}}),n("div",{class:"file-info"},n("span",{class:"filename"},o.name," ",n("span",{class:"sr-only"},"uploading")))))})))};o.prototype.renderFile=function(o){var t=this;return n("li",null,n("div",{class:"file --saved"},n("div",{class:"file-info"},n("span",{class:"filename"},o.file_name),n("span",{class:"filedate"},this.formatDate(o.updated_at,b.locale,Intl.DateTimeFormat().resolvedOptions().timeZone))),n("div",{class:"file-controls"},n("wm-button",{class:"download-button","button-type":"icononly",tooltip:"download","label-for-identical-buttons":"download ".concat(o.file_name),icon:"f1da",onClick:function(){return t.downloadFile(o.uuid,o.file_path)}}),n("wm-button",{class:"delete-button","button-type":"icononly",tooltip:"remove","label-for-identical-buttons":"remove ".concat(o.file_name),icon:"f1c0",onClick:function(){return t.deleteFile(o)}}))))};o.prototype.renderFileList=function(){var o=this;return n("ul",{class:"file-list"},this.fileList.map((function(t){return o.renderFile(t)})))};o.prototype.render=function(){var o=this;return n(i,null,this.isEmpty()?this.renderEmptyState():this.renderWithItems(),n("wm-snackbar",{notifications:JSON.stringify(this.snackbar)}),n("div",{ref:function(t){return o.liveRegion=t},class:"live-region sr-only","aria-live":"assertive","aria-atomic":"true"}))};Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{maxSize:["setMaxSize"],numFilesInProgress:["uploadNotifications"],fileList:["emitFileListEvent"]}},enumerable:false,configurable:true});return o}());g.style=h}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-c467a1e1.system.js","./p-d4ebbe84.system.js"],(function(e){"use strict";var t,o,r,i,n,l,a,s,c,d,p;return{setters:[function(e){t=e.r;o=e.c;r=e.f;i=e.h;n=e.H;l=e.g},function(e){a=e.d;s=e.i;c=e.l;d=e.s;p=e.h}],execute:function(){var f=':host{--wmcolor-file-background-error:var(--wmcolor-background-error);--wmcolor-file-background:var(--wmcolor-background-readonly);--wmcolor-file-border-error:var(--wmcolor-border-error);--wmcolor-file-border:var(--wmcolor-border);--wmcolor-file-checkmark-icon:var(--wmcolor-positive);--wmcolor-file-progress:var(--wmcolor-progress);display:block;width:100%}.file-wrapper{font-size:0.875rem;position:relative;list-style:none}.file-wrapper .file{min-width:300px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;height:3.5rem;padding:0 1.25rem;position:relative;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.file-wrapper .file .filename{display:inline-block;white-space:nowrap}.file-wrapper .file .left-group{overflow:hidden}.file-wrapper .file .right-group{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:5rem;gap:1rem}.file-wrapper .file .right-group.condensed{padding-left:2.5rem}.file-wrapper .file .right-group .file-controls{display:-ms-flexbox;display:flex;gap:1rem}.file-wrapper .file .right-group .file-info{white-space:nowrap}.file-wrapper .file.--error{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}.file-wrapper.checked .file:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f133";position:absolute;right:-44px;color:var(--wmcolor-file-checkmark-icon);font-size:28px;line-height:1}.name-wrapper{overflow:hidden}.progress{position:absolute;left:0;top:0;right:0;height:8px}.error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var u=e("wm_file",function(){function e(e){var i=this;t(this,e);this.wmIntFilePreviewed=o(this,"wmIntFilePreviewed",7);this.wmIntFileDownloaded=o(this,"wmIntFileDownloaded",7);this.wmIntFileDeleted=o(this,"wmIntFileDeleted",7);this.wmFileClearErrorClicked=o(this,"wmFileClearErrorClicked",7);this.isWithinLegacyUploader=false;this.debouncedResize=a((function(){i.isCondensed=i.el.clientWidth<500;r(i.el)}),50);this.file=undefined;this.showInfo="time";this.errorMessage=undefined;this.isCondensed=false}Object.defineProperty(e.prototype,"fileData",{get:function(){var e=this.file?JSON.parse(this.file):null;if(e&&e.progress&&typeof e.progress==="string"&&e.progress.match(/^[0-9]+$/)){e.progress=parseInt(e.progress.toString())}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUploading",{get:function(){return this.fileData&&this.fileData.hasOwnProperty("progress")&&this.fileData.progress<100},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewButtonTooltip",{get:function(){return s.formatMessage({id:"file.previewButtonTooltip",defaultMessage:"Preview",description:"Tooltip of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadButtonTooltip",{get:function(){return s.formatMessage({id:"file.downloadButtonTooltip",defaultMessage:"Download",description:"Tooltip of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteButtonTooltip",{get:function(){return s.formatMessage({id:"file.deleteButtonTooltip",defaultMessage:"Delete",description:"Tooltip of a button that triggers a file to be deleted"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewActionMessage",{get:function(){return s.formatMessage({id:"file.previewAction",defaultMessage:"Preview File",description:"Label of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadActionMessage",{get:function(){return s.formatMessage({id:"file.downloadAction",defaultMessage:"Download File",description:"Label of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteActionMessage",{get:function(){return s.formatMessage({id:"file.deleteAction",defaultMessage:"Delete File",description:"Label of a button that triggers a file to be delete"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"actionMenuLabel",{get:function(){return s.formatMessage({id:"file.actionMenuLabel",defaultMessage:"Actions",description:"Label of a button that opens a menu of file actions"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clearButtonText",{get:function(){return s.formatMessage({id:"file.clearErrorText",defaultMessage:"Clear",description:"Text for a button used to clear an error"})},enumerable:false,configurable:true});e.prototype.generateClearButtonLabel=function(e){return s.formatMessage({id:"file.clearErrorLabel",defaultMessage:"Clear {fileName} error",description:"Label for a button used to clear an error, including filename"},{fileName:e})};e.prototype.componentWillLoad=function(){var e=this;var t=this.el.getRootNode().host;if(t&&t.nodeName==="WM-UPLOADER"){if(t.type||t.uploaderType){this.isWithinLegacyUploader=true}}var o=new ResizeObserver((function(){return e.debouncedResize()}));o.observe(this.el)};e.prototype.componentDidRender=function(){var e=this.el.shadowRoot.querySelector(".filename");var t=this.el.shadowRoot.querySelector(".left-group").getBoundingClientRect().left;var o=this.el.shadowRoot.querySelector(".right-group");var r=o?o.getBoundingClientRect().left:this.el.shadowRoot.querySelector(".file-wrapper").getBoundingClientRect().right-20;e.textContent=c(e,e.dataset.filename,r-t,7)};e.prototype.previewFile=function(e){this.wmIntFilePreviewed.emit(e.id)};e.prototype.downloadFile=function(e){this.wmIntFileDownloaded.emit(e.id)};e.prototype.deleteFile=function(e){this.wmIntFileDeleted.emit(e.id)};e.prototype.handleFilenameMouseEnter=function(e,t){if(e.target.textContent.includes("...")){d("bottom",e.target,t)}};e.prototype.renderFileName=function(e,t){var o=this;return i("div",{class:"left-group"},i("div",{class:"name-wrapper"},i("span",{class:"sr-only"},e),i("span",{"aria-hidden":"true",class:"filename","data-filename":e,onMouseEnter:function(t){return o.handleFilenameMouseEnter(t,e)},onMouseLeave:function(){return p()}}),t&&i("span",{class:"sr-only"},"uploading")))};e.prototype.renderFileInfo=function(e,t){var o="";if(t==="time"&&e.lastUpdated){o=e.lastUpdated}else if(t==="size"&&e.size){o=e.size}return i("div",{class:"file-info"},o)};e.prototype.renderActionMenu=function(e){var t=this;var o="download delete";var r=e.fileActions||o;var n=i("wm-menuitem",{icon:"f208",onClick:function(){return t.previewFile(e)}},this.previewActionMessage);var l=i("wm-menuitem",{icon:"f1da",onClick:function(){return t.downloadFile(e)}},this.downloadActionMessage);var a=i("wm-menuitem",{icon:"f1c0",onClick:function(){return t.deleteFile(e)}},this.deleteActionMessage);return i("wm-action-menu",{"action-menu-type":"icon",tooltip:this.actionMenuLabel,"tooltip-position":"bottom","label-for-identical-buttons":"".concat(e.name," ").concat(this.actionMenuLabel)},r.includes("preview")&&n,r.includes("download")&&l,r.includes("delete")&&a)};e.prototype.renderFileActionButtons=function(e){var t=this;var o="download delete";var r=e.fileActions||o;var n=i("wm-button",{class:"preview-button","button-type":"icononly",tooltip:this.previewButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"preview ".concat(e.name),icon:"f208",onClick:function(){return t.previewFile(e)}});var l=i("wm-button",{class:"download-button","button-type":"icononly",tooltip:this.downloadButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"download ".concat(e.name),icon:"f1da",onClick:function(){return t.downloadFile(e)}});var a=i("wm-button",{class:"delete-button","button-type":"icononly",tooltip:this.deleteButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"delete ".concat(e.name),icon:"f1c0",onClick:function(){return t.deleteFile(e)}});return i("div",{class:"file-controls"},r.includes("preview")&&n,r.includes("download")&&l,r.includes("delete")&&a)};e.prototype.renderFileInProgress=function(e){var t=e.type?"".concat(e.name,".").concat(e.type):e.name;return i("div",{class:"file-wrapper"},i("div",{class:"file --progress"},i("div",{class:"progress",style:{background:"linear-gradient(to right, var(--wmcolor-file-progress) ".concat(e.progress,"%, transparent ").concat(e.progress,"%)")}}),this.renderFileName(t,this.isUploading)))};e.prototype.renderFileControls=function(e){var t=e.fileActions&&e.fileActions.split(" ").length===1;var o=this.isCondensed&&!t;return o?this.renderActionMenu(e):this.renderFileActionButtons(e)};e.prototype.renderFile=function(e){var t=this;var o=e.type?"".concat(e.name,".").concat(e.type):e.name;var r=!this.isWithinLegacyUploader&&e.progress===100;return i("div",{class:"file-wrapper ".concat(r?"checked":"")},i("div",{class:"file ".concat(this.errorMessage?"--error":"")},this.renderFileName(o,this.isUploading),!this.errorMessage&&i("div",{class:"right-group ".concat(this.isCondensed?"condensed":"")},this.showInfo!=="none"&&this.renderFileInfo(e,this.showInfo),e.fileActions!==""&&this.renderFileControls(e)),this.errorMessage&&i("wm-button",{"permanently-delete":true,"button-type":"textonly","label-for-identical-buttons":this.generateClearButtonLabel(e.name),onClick:function(){return t.wmFileClearErrorClicked.emit({name:e.name})}},this.clearButtonText)),this.errorMessage&&i("div",{class:"error-message"},this.errorMessage))};e.prototype.render=function(){return i(n,{role:"listitem"},this.isUploading?this.renderFileInProgress(this.fileData):this.renderFile(this.fileData))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});return e}());u.style=f}}}));
|
|
1
|
+
System.register(["./p-c467a1e1.system.js","./p-7eb9bac9.system.js"],(function(e){"use strict";var t,o,r,i,n,l,a,s,c,d,p;return{setters:[function(e){t=e.r;o=e.c;r=e.f;i=e.h;n=e.H;l=e.g},function(e){a=e.d;s=e.i;c=e.l;d=e.s;p=e.h}],execute:function(){var f=':host{--wmcolor-file-background-error:var(--wmcolor-background-error);--wmcolor-file-background:var(--wmcolor-background-readonly);--wmcolor-file-border-error:var(--wmcolor-border-error);--wmcolor-file-border:var(--wmcolor-border);--wmcolor-file-checkmark-icon:var(--wmcolor-positive);--wmcolor-file-progress:var(--wmcolor-progress);display:block;width:100%}.file-wrapper{font-size:0.875rem;position:relative;list-style:none}.file-wrapper .file{min-width:300px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;height:3.5rem;padding:0 1.25rem;position:relative;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.file-wrapper .file .filename{display:inline-block;white-space:nowrap}.file-wrapper .file .left-group{overflow:hidden}.file-wrapper .file .right-group{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:5rem;gap:1rem}.file-wrapper .file .right-group.condensed{padding-left:2.5rem}.file-wrapper .file .right-group .file-controls{display:-ms-flexbox;display:flex;gap:1rem}.file-wrapper .file .right-group .file-info{white-space:nowrap}.file-wrapper .file.--error{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}.file-wrapper.checked .file:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f133";position:absolute;right:-44px;color:var(--wmcolor-file-checkmark-icon);font-size:28px;line-height:1}.name-wrapper{overflow:hidden}.progress{position:absolute;left:0;top:0;right:0;height:8px}.error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var u=e("wm_file",function(){function e(e){var i=this;t(this,e);this.wmIntFilePreviewed=o(this,"wmIntFilePreviewed",7);this.wmIntFileDownloaded=o(this,"wmIntFileDownloaded",7);this.wmIntFileDeleted=o(this,"wmIntFileDeleted",7);this.wmFileClearErrorClicked=o(this,"wmFileClearErrorClicked",7);this.isWithinLegacyUploader=false;this.debouncedResize=a((function(){i.isCondensed=i.el.clientWidth<500;r(i.el)}),50);this.file=undefined;this.showInfo="time";this.errorMessage=undefined;this.isCondensed=false}Object.defineProperty(e.prototype,"fileData",{get:function(){var e=this.file?JSON.parse(this.file):null;if(e&&e.progress&&typeof e.progress==="string"&&e.progress.match(/^[0-9]+$/)){e.progress=parseInt(e.progress.toString())}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUploading",{get:function(){return this.fileData&&this.fileData.hasOwnProperty("progress")&&this.fileData.progress<100},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewButtonTooltip",{get:function(){return s.formatMessage({id:"file.previewButtonTooltip",defaultMessage:"Preview",description:"Tooltip of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadButtonTooltip",{get:function(){return s.formatMessage({id:"file.downloadButtonTooltip",defaultMessage:"Download",description:"Tooltip of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteButtonTooltip",{get:function(){return s.formatMessage({id:"file.deleteButtonTooltip",defaultMessage:"Delete",description:"Tooltip of a button that triggers a file to be deleted"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewActionMessage",{get:function(){return s.formatMessage({id:"file.previewAction",defaultMessage:"Preview File",description:"Label of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadActionMessage",{get:function(){return s.formatMessage({id:"file.downloadAction",defaultMessage:"Download File",description:"Label of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteActionMessage",{get:function(){return s.formatMessage({id:"file.deleteAction",defaultMessage:"Delete File",description:"Label of a button that triggers a file to be delete"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"actionMenuLabel",{get:function(){return s.formatMessage({id:"file.actionMenuLabel",defaultMessage:"Actions",description:"Label of a button that opens a menu of file actions"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clearButtonText",{get:function(){return s.formatMessage({id:"file.clearErrorText",defaultMessage:"Clear",description:"Text for a button used to clear an error"})},enumerable:false,configurable:true});e.prototype.generateClearButtonLabel=function(e){return s.formatMessage({id:"file.clearErrorLabel",defaultMessage:"Clear {fileName} error",description:"Label for a button used to clear an error, including filename"},{fileName:e})};e.prototype.componentWillLoad=function(){var e=this;var t=this.el.getRootNode().host;if(t&&t.nodeName==="WM-UPLOADER"){if(t.type||t.uploaderType){this.isWithinLegacyUploader=true}}var o=new ResizeObserver((function(){return e.debouncedResize()}));o.observe(this.el)};e.prototype.componentDidRender=function(){var e=this.el.shadowRoot.querySelector(".filename");var t=this.el.shadowRoot.querySelector(".left-group").getBoundingClientRect().left;var o=this.el.shadowRoot.querySelector(".right-group");var r=o?o.getBoundingClientRect().left:this.el.shadowRoot.querySelector(".file-wrapper").getBoundingClientRect().right-20;e.textContent=c(e,e.dataset.filename,r-t,7)};e.prototype.previewFile=function(e){this.wmIntFilePreviewed.emit(e.id)};e.prototype.downloadFile=function(e){this.wmIntFileDownloaded.emit(e.id)};e.prototype.deleteFile=function(e){this.wmIntFileDeleted.emit(e.id)};e.prototype.handleFilenameMouseEnter=function(e,t){if(e.target.textContent.includes("...")){d("bottom",e.target,t)}};e.prototype.renderFileName=function(e,t){var o=this;return i("div",{class:"left-group"},i("div",{class:"name-wrapper"},i("span",{class:"sr-only"},e),i("span",{"aria-hidden":"true",class:"filename","data-filename":e,onMouseEnter:function(t){return o.handleFilenameMouseEnter(t,e)},onMouseLeave:function(){return p()}}),t&&i("span",{class:"sr-only"},"uploading")))};e.prototype.renderFileInfo=function(e,t){var o="";if(t==="time"&&e.lastUpdated){o=e.lastUpdated}else if(t==="size"&&e.size){o=e.size}return i("div",{class:"file-info"},o)};e.prototype.renderActionMenu=function(e){var t=this;var o="download delete";var r=e.fileActions||o;var n=i("wm-menuitem",{icon:"f208",onClick:function(){return t.previewFile(e)}},this.previewActionMessage);var l=i("wm-menuitem",{icon:"f1da",onClick:function(){return t.downloadFile(e)}},this.downloadActionMessage);var a=i("wm-menuitem",{icon:"f1c0",onClick:function(){return t.deleteFile(e)}},this.deleteActionMessage);return i("wm-action-menu",{"action-menu-type":"icon",tooltip:this.actionMenuLabel,"tooltip-position":"bottom","label-for-identical-buttons":"".concat(e.name," ").concat(this.actionMenuLabel)},r.includes("preview")&&n,r.includes("download")&&l,r.includes("delete")&&a)};e.prototype.renderFileActionButtons=function(e){var t=this;var o="download delete";var r=e.fileActions||o;var n=i("wm-button",{class:"preview-button","button-type":"icononly",tooltip:this.previewButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"preview ".concat(e.name),icon:"f208",onClick:function(){return t.previewFile(e)}});var l=i("wm-button",{class:"download-button","button-type":"icononly",tooltip:this.downloadButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"download ".concat(e.name),icon:"f1da",onClick:function(){return t.downloadFile(e)}});var a=i("wm-button",{class:"delete-button","button-type":"icononly",tooltip:this.deleteButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"delete ".concat(e.name),icon:"f1c0",onClick:function(){return t.deleteFile(e)}});return i("div",{class:"file-controls"},r.includes("preview")&&n,r.includes("download")&&l,r.includes("delete")&&a)};e.prototype.renderFileInProgress=function(e){var t=e.type?"".concat(e.name,".").concat(e.type):e.name;return i("div",{class:"file-wrapper"},i("div",{class:"file --progress"},i("div",{class:"progress",style:{background:"linear-gradient(to right, var(--wmcolor-file-progress) ".concat(e.progress,"%, transparent ").concat(e.progress,"%)")}}),this.renderFileName(t,this.isUploading)))};e.prototype.renderFileControls=function(e){var t=e.fileActions&&e.fileActions.split(" ").length===1;var o=this.isCondensed&&!t;return o?this.renderActionMenu(e):this.renderFileActionButtons(e)};e.prototype.renderFile=function(e){var t=this;var o=e.type?"".concat(e.name,".").concat(e.type):e.name;var r=!this.isWithinLegacyUploader&&e.progress===100;return i("div",{class:"file-wrapper ".concat(r?"checked":"")},i("div",{class:"file ".concat(this.errorMessage?"--error":"")},this.renderFileName(o,this.isUploading),!this.errorMessage&&i("div",{class:"right-group ".concat(this.isCondensed?"condensed":"")},this.showInfo!=="none"&&this.renderFileInfo(e,this.showInfo),e.fileActions!==""&&this.renderFileControls(e)),this.errorMessage&&i("wm-button",{"permanently-delete":true,"button-type":"textonly","label-for-identical-buttons":this.generateClearButtonLabel(e.name),onClick:function(){return t.wmFileClearErrorClicked.emit({name:e.name})}},this.clearButtonText)),this.errorMessage&&i("div",{class:"error-message"},this.errorMessage))};e.prototype.render=function(){return i(n,{role:"listitem"},this.isUploading?this.renderFileInProgress(this.fileData):this.renderFile(this.fileData))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});return e}());u.style=f}}}));
|