@watermarkinsights/ripple 5.7.0-3 → 5.7.0-5

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.
Files changed (48) hide show
  1. package/dist/cjs/{global-14eeb83e.js → global-5f3aed27.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/priv-option-list.cjs.entry.js +14 -2
  4. package/dist/cjs/ripple.cjs.js +2 -2
  5. package/dist/cjs/wm-nested-select.cjs.entry.js +12 -6
  6. package/dist/cjs/wm-optgroup.cjs.entry.js +4 -4
  7. package/dist/cjs/wm-option_2.cjs.entry.js +2 -2
  8. package/dist/collection/components/selects/priv-option-list/priv-option-list.css +5 -0
  9. package/dist/collection/components/selects/priv-option-list/priv-option-list.js +48 -1
  10. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +2 -2
  11. package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +29 -5
  12. package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +4 -4
  13. package/dist/collection/components/selects/wm-select/wm-select.css +1 -1
  14. package/dist/collection/components/selects/wm-select/wm-select.js +1 -1
  15. package/dist/esm/{global-fb856536.js → global-f0d5062d.js} +1 -1
  16. package/dist/esm/loader.js +2 -2
  17. package/dist/esm/priv-option-list.entry.js +14 -2
  18. package/dist/esm/ripple.js +2 -2
  19. package/dist/esm/wm-nested-select.entry.js +12 -6
  20. package/dist/esm/wm-optgroup.entry.js +4 -4
  21. package/dist/esm/wm-option_2.entry.js +2 -2
  22. package/dist/esm-es5/{global-fb856536.js → global-f0d5062d.js} +1 -1
  23. package/dist/esm-es5/loader.js +1 -1
  24. package/dist/esm-es5/priv-option-list.entry.js +1 -1
  25. package/dist/esm-es5/ripple.js +1 -1
  26. package/dist/esm-es5/wm-nested-select.entry.js +1 -1
  27. package/dist/esm-es5/wm-optgroup.entry.js +1 -1
  28. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  29. package/dist/ripple/p-134c0c34.entry.js +1 -0
  30. package/dist/ripple/{p-3fd7b1de.js → p-1ee83607.js} +1 -1
  31. package/dist/ripple/{p-dab8c0c7.entry.js → p-226fe4e0.entry.js} +1 -1
  32. package/dist/ripple/{p-22278cad.system.js → p-24051ba4.system.js} +1 -1
  33. package/dist/ripple/{p-94c124cc.entry.js → p-2f664fdd.entry.js} +1 -1
  34. package/dist/ripple/p-4d956340.system.entry.js +1 -0
  35. package/dist/ripple/{p-f5f2a958.entry.js → p-a65f8259.entry.js} +1 -1
  36. package/dist/ripple/p-c21221b4.system.entry.js +1 -0
  37. package/dist/ripple/{p-b980f699.system.entry.js → p-cab9cadd.system.entry.js} +1 -1
  38. package/dist/ripple/{p-70350a03.system.entry.js → p-f4bcee58.system.entry.js} +1 -1
  39. package/dist/ripple/{p-3d3b7266.system.js → p-f6eb20b6.system.js} +1 -1
  40. package/dist/ripple/ripple.esm.js +1 -1
  41. package/dist/ripple/ripple.js +1 -1
  42. package/dist/types/components/selects/priv-option-list/priv-option-list.d.ts +3 -0
  43. package/dist/types/components/selects/wm-nested-select/wm-nested-select.d.ts +1 -1
  44. package/dist/types/components.d.ts +6 -0
  45. package/package.json +1 -1
  46. package/dist/ripple/p-493a03e1.system.entry.js +0 -1
  47. package/dist/ripple/p-50523d8f.system.entry.js +0 -1
  48. package/dist/ripple/p-e12dd07d.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,f as forceUpdate,h,H as Host,g as getElement}from"./index-558b5a82.js";import{i as intl,t as toBool,k as shouldOpenUp,B as getContextMeasurements,z as isElOrChild,y as getTextDir}from"./functions-b791a892.js";import{g as globalMessages}from"./intl-f2f7ce8b.js";var wmNestedSelectCss=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.button-wrapper .displayedoption{height:2.75rem}}.button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.button-wrapper .displayedoption.expanded:before{content:"\\f143"}.button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.button-wrapper .displayedoption:focus{outline:none}.button-wrapper .displayedoption::-moz-focus-inner{border:0}.button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.dropdown{overflow-x:hidden;overflow-y:auto;-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;transform:scale(1, 0);-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;transition: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:40;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem;max-height:var(--max-height);overflow:auto}.dropdown.upwards{top:unset;bottom:100%;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.hidden{visibility:hidden}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.menu{width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.menu.hidden{position:absolute;max-height:100%;overflow:hidden}.menu .menuitem{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;font-weight:600}.menu .menuitem:not(:last-child){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}.menu .menuitem.disabled{color:var(--wmcolor-select-option-text-disabled);cursor:auto}.menu .menuitem.clear-selection{color:var(--wmcolor-select-text);-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center}.menu .menuitem.clear-selection: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";pointer-events:none;padding-right:0.5rem;font-size:1.12rem}.menu :focus{outline:none;background:var(--wmcolor-interactive-background-focus)}.menu :hover{background:var(--wmcolor-select-option-background-hover);outline:none}.group-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:"\\f142";position:absolute;right:1.25rem;pointer-events:none;font-size:1.12rem}.group-btn.disabled{background:var(--wmcolor-select-option-background-disabled)}.selection-count,.disabled-indication{margin-right:40px;font-weight:400;font-style:italic}.disabled-indication{color:var(--wmcolor-interactive-disabled)}.option-list-wrapper{background:white;width:100%;-webkit-transform:translateX(0%);transform:translateX(0%);-webkit-transition:-webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:-webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:transform 0.2s cubic-bezier(0.04, 0, 0.2, 1), -webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1)}.option-list-wrapper.hidden{-webkit-transform:translateX(100%);transform:translateX(100%);position:absolute;top:0px;max-height:100%;overflow-y:hidden}.measurement-area{position:absolute;visibility:hidden;height:0px;pointer-events:none}.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 NestedSelect=function(){function e(e){registerInstance(this,e);this.wmNestedSelectBlurred=createEvent(this,"wmNestedSelectBlurred",7);this.openUp=false;this.constrainedMaxHeight="";this.overflowCount=0;this.displayedOptions=[];this.clearSelectionMessage=this.multiple?intl.formatMessage({id:"select.multiClearSelection",defaultMessage:"Clear all Selections",description:"Button text to clear selection. Use imperative"}):intl.formatMessage({id:"select.singleClearSelection",defaultMessage:"Clear Selection",description:"Button text to clear selection. Use imperative"});this.disabled=false;this.maxHeight="200px";this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage=undefined;this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=this.multiple?intl.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text for multiple select. Use imperative"}):intl.formatMessage({id:"select.singlePlaceholder",defaultMessage:"Select an Option",description:"Placeholder text for single select. Use imperative"});this.searchPlaceholder=intl.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=intl.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isExpanded=false;this.showClearSelectionButton=false}Object.defineProperty(e.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"optgroupEls",{get:function(){return Array.from(this.el.querySelectorAll("wm-optgroup"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"menuitemEls",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll(".menuitem"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allSelected",{get:function(){return this.childOptions.every((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var t=new MutationObserver((function(t){return t.forEach((function(t){return e.handleChildChange()}))}));t.observe(this.el,{childList:true,attributes:true,subtree:true,attributeFilter:["selected"]})};e.prototype.handleChildChange=function(){this.setButtonText();forceUpdate(this.el);if(this.multiple){this.optgroupEls.forEach((function(e){return e.handleChildChange()}))}};e.prototype.setButtonText=function(){this.displayedOptions=this.childOptions.filter((function(e){return e.selected}));if(this.multiple){var e=38;var t=window.getComputedStyle(this.buttonEl);var o=parseInt(t.getPropertyValue("padding-left").slice(0,-2));var r=parseInt(t.getPropertyValue("padding-right").slice(0,-2));var i=this.buttonEl.clientWidth-o-r-e;this.overflowCount=0;this.measurementAreaEl.textContent=this.displayedOptions.map((function(e){return e.textContent})).join(", ");var n=this.measurementAreaEl.clientWidth;while(n>i&&this.displayedOptions.length>1){this.overflowCount++;this.displayedOptions.pop();this.measurementAreaEl.textContent=this.displayedOptions.map((function(e){return e.textContent})).join(", ");n=this.measurementAreaEl.clientWidth}}};e.prototype.countOptgroupSelected=function(e){var t=Array.from(e.querySelectorAll("wm-option")).filter((function(e){return e.selected}));return t.length};e.prototype.handleOptionSelection=function(){if(!this.multiple){this.close()}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}if(this.isExpanded){this.isExpanded=false;this.dropdownEl.classList.remove("open");window.setTimeout((function(){t.optgroupEls.forEach((function(e){return e.isExpanded=false}));if(e){t.buttonEl.focus()}}),150)}};e.prototype.open=function(){var e=this;if(!this.isDisabled){this.showClearSelectionButton=this.childOptions.some((function(e){return e.selected}));this.isExpanded=true;this.dropdownEl.classList.add("open");var t=this.el.clientHeight;this.openUp=shouldOpenUp(this.el,this.dropdownEl.clientHeight,t,0);this.constrainedMaxHeight="";if(this.openUp){var o=getContextMeasurements(this.el).spaceAbove;if(parseInt(getComputedStyle(this.dropdownEl).getPropertyValue("max-height").replace("px",""))>o){this.constrainedMaxHeight=o.toString()+"px"}}window.requestAnimationFrame((function(){e.focusFirstMenuitem()}))}};e.prototype.focusFirstMenuitem=function(){if(this.menuitemEls.length>0){this.menuitemEls[0].focus()}};e.prototype.moveDown=function(e){var t=this.menuitemEls.indexOf(e);if(t==this.menuitemEls.length-1){this.menuitemEls[0].focus()}else{this.menuitemEls[t+1].focus()}};e.prototype.moveUp=function(e){var t=this.menuitemEls.indexOf(e);if(t==0){this.menuitemEls[this.menuitemEls.length-1].focus()}else{this.menuitemEls[t-1].focus()}};e.prototype.handleButtonBlur=function(e){if(isElOrChild(this.el,e.relatedTarget)){e.stopPropagation()}};e.prototype.handleClick=function(e){if(!isElOrChild(this.el,e.target)){this.close()}};e.prototype.handleMenuitemKeydown=function(e){switch(e.key){case"ArrowDown":e.preventDefault();this.moveDown(e.target);break;case"ArrowUp":e.preventDefault();this.moveUp(e.target);break;case"ArrowRight":if(e.target.classList.contains("group-btn")){e.preventDefault();e.target.click()}break;case"Escape":e.preventDefault();this.close();break}};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmNestedSelectBlurred.emit()}};e.prototype.handleOptgroupExpanded=function(){this.menuEl.classList.add("hidden");this.optListWrapperEl.classList.remove("hidden")};e.prototype.handleOptgroupHidden=function(e){this.showClearSelectionButton=this.childOptions.some((function(e){return e.selected}));this.menuEl.classList.remove("hidden");this.optListWrapperEl.classList.add("hidden");var t=this.el.shadowRoot.querySelector("button[data-label=".concat(e.detail,"]"));t.focus()};e.prototype.renderButtonText=function(){if(this.displayedOptions.length<1){return h("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(e,t){return h("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return h("span",null,h("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.handleClearSelection=function(){this.optgroupEls.forEach((function(e){return e.emitDeselection()}));if(!this.multiple){this.close()}};e.prototype.renderClearSelectionButton=function(){var e=this;if(this.showClearSelectionButton){return h("button",{class:"menuitem clear-selection",onClick:function(){return e.handleClearSelection()},tabindex:-1,onKeyDown:function(t){return e.handleMenuitemKeydown(t)}},this.clearSelectionMessage)}};e.prototype.renderSelectionCount=function(e){var t=this.countOptgroupSelected(e);if(t){var o=intl.formatMessage({id:"select.optgroupSingleSelectionCount",defaultMessage:"Item Selected",description:"Text indicating number of selected in a group, where only a single selection is possible."},{numSelected:t});var r=intl.formatMessage({id:"select.optgroupMultipleSelectionCount",defaultMessage:"{numSelected} Selected",description:"Text indicating number of selected in a group, where multiple selections are possible."},{numSelected:t});return h("div",{class:"selection-count"},h("span",null,this.multiple?r:o))}};e.prototype.render=function(){var e;var t=this;var o=(e={id:"selectbtn"},e["disabled"]=this.isDisabled,e["aria-controls"]="list",e["aria-labelledby"]="label selectbtn",e["aria-describedby"]="error",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){t.isExpanded?t.close():t.open()},e);return h(Host,{onBlur:function(e){return t.handleComponentBlur(e)}},h("div",{class:"wrapper ".concat(getTextDir()," label-").concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},h("div",{class:"label-wrapper"},h("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?h("span",{class:"required"},h("span",{class:"sr-only"},globalMessages.requiredField),h("span",{"aria-hidden":"true"},"*")):"")),h("div",{class:"button-wrapper"},h("button",Object.assign({},o,{class:"displayedoption ".concat(this.isExpanded?"expanded":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)},onFocus:function(){return t.close()}}),h("span",{class:"overflowcontrol"},h("span",{class:"button-text"},this.renderButtonText())),this.renderOverflowCount(),h("div",{ref:function(e){return t.measurementAreaEl=e},class:"measurement-area","aria-hidden":"true"})),h("div",{class:"dropdown ".concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e},style:{"--max-height":this.constrainedMaxHeight?this.constrainedMaxHeight:this.maxHeight}},h("div",{ref:function(e){return t.menuEl=e},class:"menu"},this.renderClearSelectionButton(),this.optgroupEls.map((function(e){return h("button",{class:"menuitem group-btn ".concat(e.disabled?"disabled":""),role:"menuitem","data-label":e.label,tabindex:-1,"aria-disabled":e.disabled,onClick:function(){if(!e.disabled){e.isExpanded=!e.isExpanded;forceUpdate(t.el)}},onKeyDown:function(e){return t.handleMenuitemKeydown(e)}},h("span",null,e.label),t.renderSelectionCount(e),e.disabled&&h("div",{class:"disabled-indication"},"Disabled"))}))),h("div",{ref:function(e){return t.optListWrapperEl=e},class:"option-list-wrapper hidden"},h("slot",null))),h("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();NestedSelect.style=wmNestedSelectCss;export{NestedSelect as wm_nested_select};
1
+ import{r as registerInstance,c as createEvent,f as forceUpdate,h,H as Host,g as getElement}from"./index-558b5a82.js";import{i as intl,t as toBool,k as shouldOpenUp,B as getContextMeasurements,z as isElOrChild,y as getTextDir}from"./functions-b791a892.js";import{g as globalMessages}from"./intl-f2f7ce8b.js";var wmNestedSelectCss=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.button-wrapper .displayedoption{height:2.75rem}}.button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.button-wrapper .displayedoption.expanded:before{content:"\\f143"}.button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.button-wrapper .displayedoption:focus{outline:none}.button-wrapper .displayedoption::-moz-focus-inner{border:0}.button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.dropdown{overflow-x:hidden;overflow-y:auto;-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;transform:scale(1, 0);-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;transition: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:40;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.dropdown.upwards{top:unset;bottom:100%;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.hidden{visibility:hidden}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.menu{width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:var(--max-height);overflow-y:auto}.menu.hidden{position:absolute;max-height:100%;overflow:hidden}.menu .menuitem{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;font-weight:600}.menu .menuitem:not(:last-child){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}.menu .menuitem.disabled{color:var(--wmcolor-select-option-text-disabled);cursor:auto}.menu .menuitem.clear-selection{color:var(--wmcolor-select-text);-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center}.menu .menuitem.clear-selection: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";pointer-events:none;padding-right:0.5rem;font-size:1.12rem}.menu :focus{outline:none;background:var(--wmcolor-interactive-background-focus)}.menu :hover{background:var(--wmcolor-select-option-background-hover);outline:none}.group-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:"\\f142";position:absolute;right:1.25rem;pointer-events:none;font-size:1.12rem}.group-btn.disabled{background:var(--wmcolor-select-option-background-disabled)}.selection-count,.disabled-indication{margin-right:40px;font-weight:400;font-style:italic}.disabled-indication{color:var(--wmcolor-interactive-disabled)}.option-list-wrapper{background:white;width:100%;-webkit-transform:translateX(0%);transform:translateX(0%);-webkit-transition:-webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:-webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:transform 0.2s cubic-bezier(0.04, 0, 0.2, 1), -webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1)}.option-list-wrapper.hidden{-webkit-transform:translateX(100%);transform:translateX(100%);position:absolute;top:0px;max-height:100%;overflow-y:hidden}.measurement-area{position:absolute;visibility:hidden;height:0px;pointer-events:none}.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 NestedSelect=function(){function e(e){registerInstance(this,e);this.wmNestedSelectBlurred=createEvent(this,"wmNestedSelectBlurred",7);this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.clearSelectionMessage=this.multiple?intl.formatMessage({id:"select.multiClearSelection",defaultMessage:"Clear all Selections",description:"Button text to clear selection. Use imperative"}):intl.formatMessage({id:"select.singleClearSelection",defaultMessage:"Clear Selection",description:"Button text to clear selection. Use imperative"});this.disabled=false;this.maxHeight="200px";this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage=undefined;this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=this.multiple?intl.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text for multiple select. Use imperative"}):intl.formatMessage({id:"select.singlePlaceholder",defaultMessage:"Select an Option",description:"Placeholder text for single select. Use imperative"});this.searchPlaceholder=intl.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=intl.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isExpanded=false;this.showClearSelectionButton=false;this.constrainedMaxHeight=this.maxHeight}Object.defineProperty(e.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"optgroupEls",{get:function(){return Array.from(this.el.querySelectorAll("wm-optgroup"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"menuitemEls",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll(".menuitem"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allSelected",{get:function(){return this.childOptions.every((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.componentWillLoad=function(){var e=this;var t=new MutationObserver((function(t){return t.forEach((function(t){return e.handleChildChange()}))}));t.observe(this.el,{childList:true,attributes:true,subtree:true,attributeFilter:["selected"]})};e.prototype.handleChildChange=function(){this.setButtonText();forceUpdate(this.el);if(this.multiple){this.optgroupEls.forEach((function(e){return e.handleChildChange()}))}};e.prototype.setButtonText=function(){this.displayedOptions=this.childOptions.filter((function(e){return e.selected}));if(this.multiple){var e=38;var t=window.getComputedStyle(this.buttonEl);var o=parseInt(t.getPropertyValue("padding-left").slice(0,-2));var r=parseInt(t.getPropertyValue("padding-right").slice(0,-2));var i=this.buttonEl.clientWidth-o-r-e;this.overflowCount=0;this.measurementAreaEl.textContent=this.displayedOptions.map((function(e){return e.textContent})).join(", ");var n=this.measurementAreaEl.clientWidth;while(n>i&&this.displayedOptions.length>1){this.overflowCount++;this.displayedOptions.pop();this.measurementAreaEl.textContent=this.displayedOptions.map((function(e){return e.textContent})).join(", ");n=this.measurementAreaEl.clientWidth}}};e.prototype.countOptgroupSelected=function(e){var t=Array.from(e.querySelectorAll("wm-option")).filter((function(e){return e.selected}));return t.length};e.prototype.handleOptionSelection=function(){if(!this.multiple){this.close()}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}if(this.isExpanded){this.isExpanded=false;this.dropdownEl.classList.remove("open");window.setTimeout((function(){t.optgroupEls.forEach((function(e){return e.isExpanded=false}));if(e){t.buttonEl.focus()}}),150)}};e.prototype.open=function(){var e=this;if(!this.isDisabled){this.showClearSelectionButton=this.childOptions.some((function(e){return e.selected}));this.isExpanded=true;this.dropdownEl.classList.add("open");var t=this.el.clientHeight;this.openUp=shouldOpenUp(this.el,this.dropdownEl.clientHeight,t,0);this.constrainedMaxHeight=this.maxHeight;var o=getContextMeasurements(this.el).spaceAbove;if(this.openUp){if(parseInt(getComputedStyle(this.menuEl).getPropertyValue("--max-height").replace("px",""))>o){this.constrainedMaxHeight=o.toString()+"px"}}this.optgroupEls.forEach((function(t){t.shadowRoot.querySelector("priv-option-list").upwardsHeightLimit=e.openUp?o:null}));window.requestAnimationFrame((function(){e.focusFirstMenuitem()}))}};e.prototype.focusFirstMenuitem=function(){if(this.menuitemEls.length>0){this.menuitemEls[0].focus()}};e.prototype.moveDown=function(e){var t=this.menuitemEls.indexOf(e);if(t==this.menuitemEls.length-1){this.menuitemEls[0].focus()}else{this.menuitemEls[t+1].focus()}};e.prototype.moveUp=function(e){var t=this.menuitemEls.indexOf(e);if(t==0){this.menuitemEls[this.menuitemEls.length-1].focus()}else{this.menuitemEls[t-1].focus()}};e.prototype.handleButtonBlur=function(e){if(isElOrChild(this.el,e.relatedTarget)){e.stopPropagation()}};e.prototype.handleClick=function(e){if(!isElOrChild(this.el,e.target)){this.close()}};e.prototype.handleMenuitemKeydown=function(e){switch(e.key){case"ArrowDown":e.preventDefault();this.moveDown(e.target);break;case"ArrowUp":e.preventDefault();this.moveUp(e.target);break;case"ArrowRight":if(e.target.classList.contains("group-btn")){e.preventDefault();e.target.click()}break;case"Escape":e.preventDefault();this.close();break}};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmNestedSelectBlurred.emit()}};e.prototype.handleOptgroupExpanded=function(){this.menuEl.classList.add("hidden");this.optListWrapperEl.classList.remove("hidden")};e.prototype.handleOptgroupHidden=function(e){this.showClearSelectionButton=this.childOptions.some((function(e){return e.selected}));this.menuEl.classList.remove("hidden");this.optListWrapperEl.classList.add("hidden");var t=this.el.shadowRoot.querySelector("button[data-label=".concat(e.detail,"]"));t.focus()};e.prototype.renderButtonText=function(){if(this.displayedOptions.length<1){return h("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(e,t){return h("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return h("span",null,h("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.handleClearSelection=function(){this.optgroupEls.forEach((function(e){return e.emitDeselection()}));if(!this.multiple){this.close()}};e.prototype.renderClearSelectionButton=function(){var e=this;if(this.showClearSelectionButton){return h("button",{class:"menuitem clear-selection",onClick:function(){return e.handleClearSelection()},tabindex:-1,onKeyDown:function(t){return e.handleMenuitemKeydown(t)}},this.clearSelectionMessage)}};e.prototype.renderSelectionCount=function(e){var t=this.countOptgroupSelected(e);if(t){var o=intl.formatMessage({id:"select.optgroupSingleSelectionCount",defaultMessage:"Item Selected",description:"Text indicating number of selected in a group, where only a single selection is possible."},{numSelected:t});var r=intl.formatMessage({id:"select.optgroupMultipleSelectionCount",defaultMessage:"{numSelected} Selected",description:"Text indicating number of selected in a group, where multiple selections are possible."},{numSelected:t});return h("div",{class:"selection-count"},h("span",null,this.multiple?r:o))}};e.prototype.render=function(){var e;var t=this;var o=(e={id:"selectbtn"},e["disabled"]=this.isDisabled,e["aria-controls"]="list",e["aria-labelledby"]="label selectbtn",e["aria-describedby"]="error",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){t.isExpanded?t.close():t.open()},e);return h(Host,{onBlur:function(e){return t.handleComponentBlur(e)}},h("div",{class:"wrapper ".concat(getTextDir()," label-").concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},h("div",{class:"label-wrapper"},h("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?h("span",{class:"required"},h("span",{class:"sr-only"},globalMessages.requiredField),h("span",{"aria-hidden":"true"},"*")):"")),h("div",{class:"button-wrapper"},h("button",Object.assign({},o,{class:"displayedoption ".concat(this.isExpanded?"expanded":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)},onFocus:function(){return t.close()}}),h("span",{class:"overflowcontrol"},h("span",{class:"button-text"},this.renderButtonText())),this.renderOverflowCount(),h("div",{ref:function(e){return t.measurementAreaEl=e},class:"measurement-area","aria-hidden":"true"})),h("div",{class:"dropdown ".concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},h("div",{ref:function(e){return t.menuEl=e},class:"menu",style:{"--max-height":this.constrainedMaxHeight}},this.renderClearSelectionButton(),this.optgroupEls.map((function(e){return h("button",{class:"menuitem group-btn ".concat(e.disabled?"disabled":""),role:"menuitem","data-label":e.label,tabindex:-1,"aria-disabled":e.disabled,onClick:function(){if(!e.disabled){e.isExpanded=!e.isExpanded;forceUpdate(t.el)}},onKeyDown:function(e){return t.handleMenuitemKeydown(e)}},h("span",null,e.label),t.renderSelectionCount(e),e.disabled&&h("div",{class:"disabled-indication"},"Disabled"))}))),h("div",{ref:function(e){return t.optListWrapperEl=e},class:"option-list-wrapper hidden"},h("slot",null))),h("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();NestedSelect.style=wmNestedSelectCss;export{NestedSelect as wm_nested_select};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i["throw"](t))}catch(t){o(t)}}function u(t){t.done?n(t.value):r(t.value).then(s,a)}u((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return u([t,e])}}function u(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(t){a=[6,t];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-558b5a82.js";import{t as toBool,a as handleDisabledAttribute}from"./functions-b791a892.js";var wmOptgroupCss=":host{width:100%;display:none}: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(.visible){display:unset}";var Optgroup=function(){function t(t){registerInstance(this,t);this.wmOptgroupAllSelected=createEvent(this,"wmOptgroupAllSelected",7);this.wmOptgroupAllDeselected=createEvent(this,"wmOptgroupAllDeselected",7);this.optgroupExpanded=createEvent(this,"optgroupExpanded",7);this.optgroupHidden=createEvent(this,"optgroupHidden",7);this.label=undefined;this.isExpanded=false;this.multiple=false;this.disabled=false}Object.defineProperty(t.prototype,"parentNestedSelect",{get:function(){return this.el.parentElement},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});t.prototype.isExpandedChanged=function(){var t=this;if(this.isExpanded){this.el.classList.add("visible");this.optgroupExpanded.emit();window.setTimeout((function(){t.optionListEl.handleInitialFocus()}),250)}else{this.optgroupHidden.emit(this.label);this.optionListEl.clearSearch();window.setTimeout((function(){t.el.classList.remove("visible");if(t.parentNestedSelect.multiple){t.optionListEl.updateOptionVisibility()}}),250)}};t.prototype.emitDeselection=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.wmOptgroupAllDeselected.emit();return[2]}))}))};t.prototype.handleChildChange=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.optionListEl.handleChildChange();return[2]}))}))};t.prototype.handleOptionKeyLeft=function(){this.isExpanded=false};t.prototype.componentWillLoad=function(){handleDisabledAttribute(this.el,this.isDisabled)};t.prototype.render=function(){var t=this;return h(Host,null,h("div",{class:"list-wrapper"},h("priv-option-list",{ref:function(e){return t.optionListEl=e},multiple:this.parentNestedSelect.multiple,search:this.parentNestedSelect.search,searchPlaceholder:this.parentNestedSelect.searchPlaceholder,optgroupLabel:this.label,selectAll:this.parentNestedSelect.selectAll,onOptionListAllSelected:function(){return t.wmOptgroupAllSelected.emit()},onOptionListAllDeselected:function(){return t.wmOptgroupAllDeselected.emit()}},h("slot",null))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isExpanded:["isExpandedChanged"]}},enumerable:false,configurable:true});return t}();Optgroup.style=wmOptgroupCss;export{Optgroup as wm_optgroup};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function s(t){try{u(i.next(t))}catch(t){o(t)}}function a(t){try{u(i["throw"](t))}catch(t){o(t)}}function u(t){t.done?n(t.value):r(t.value).then(s,a)}u((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(t){return function(e){return u([t,e])}}function u(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(t){a=[6,t];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-558b5a82.js";import{t as toBool,a as handleDisabledAttribute}from"./functions-b791a892.js";var wmOptgroupCss=":host{width:100%;display:none}: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(.visible){display:unset}";var Optgroup=function(){function t(t){registerInstance(this,t);this.wmOptgroupAllSelected=createEvent(this,"wmOptgroupAllSelected",7);this.wmOptgroupAllDeselected=createEvent(this,"wmOptgroupAllDeselected",7);this.optgroupExpanded=createEvent(this,"optgroupExpanded",7);this.optgroupHidden=createEvent(this,"optgroupHidden",7);this.label=undefined;this.isExpanded=false;this.multiple=false;this.disabled=false}Object.defineProperty(t.prototype,"parentNestedSelect",{get:function(){return this.el.parentElement},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});t.prototype.isExpandedChanged=function(){var t=this;if(this.isExpanded){this.el.classList.add("visible");this.optgroupExpanded.emit();window.setTimeout((function(){t.optionListEl.handleInitialFocus()}),250)}else{this.optgroupHidden.emit(this.label);this.optionListEl.clearSearch();window.setTimeout((function(){t.el.classList.remove("visible")}),250)}if(this.parentNestedSelect.multiple){this.optionListEl.updateOptionVisibility()}};t.prototype.emitDeselection=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.wmOptgroupAllDeselected.emit();return[2]}))}))};t.prototype.handleChildChange=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.optionListEl.handleChildChange();return[2]}))}))};t.prototype.handleOptionKeyLeft=function(){this.isExpanded=false};t.prototype.componentWillLoad=function(){handleDisabledAttribute(this.el,this.isDisabled)};t.prototype.render=function(){var t=this;return h(Host,null,h("div",{class:"list-wrapper"},h("priv-option-list",{ref:function(e){return t.optionListEl=e},multiple:this.parentNestedSelect.multiple,search:this.parentNestedSelect.search,maxHeight:this.parentNestedSelect.constrainedMaxHeight,searchPlaceholder:this.parentNestedSelect.searchPlaceholder,optgroupLabel:this.label,selectAll:this.parentNestedSelect.selectAll,onOptionListAllSelected:function(){return t.wmOptgroupAllSelected.emit()},onOptionListAllDeselected:function(){return t.wmOptgroupAllDeselected.emit()}},h("slot",null))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isExpanded:["isExpandedChanged"]}},enumerable:false,configurable:true});return t}();Optgroup.style=wmOptgroupCss;export{Optgroup as wm_optgroup};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-558b5a82.js";import{i as intl,t as toBool,z as isElOrChild,a as handleDisabledAttribute,k as shouldOpenUp,y as getTextDir}from"./functions-b791a892.js";import{g as globalMessages}from"./intl-f2f7ce8b.js";var wmOptionCss=':host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.checkbox:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f131";display:inline-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background-selected);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){color:var(--wmcolor-select-option-text-disabled);background:var(--wmcolor-select-option-background-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host([aria-disabled=true]) .subinfo{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.clone.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;gap:16px}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:-ms-flexbox;display:flex}.option-text{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus){outline:none;background:var(--wmcolor-select-option-background-focus)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}';var Option=function(){function t(t){registerInstance(this,t);this.wmOptionSelected=createEvent(this,"wmOptionSelected",7);this.wmOptionDeselected=createEvent(this,"wmOptionDeselected",7);this.intCloneClicked=createEvent(this,"intCloneClicked",7);this.wmKeyUpPressed=createEvent(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=createEvent(this,"wmKeyDownPressed",7);this.wmKeyLeftPressed=createEvent(this,"wmKeyLeftPressed",7);this.wmEscKeyPressed=createEvent(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=createEvent(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=createEvent(this,"wmEndKeyPressed",7);this.wmEnterKeyPressed=createEvent(this,"wmEnterKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmOptionBlurred=createEvent(this,"wmOptionBlurred",7);this.value=undefined;this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false;this.searchTerm=""}Object.defineProperty(t.prototype,"hostClasses",{get:function(){var t=[];if(this.subinfo){t.push("hassubinfo")}if(this.parentOptionList.multiple){t.push("multi-option")}if(!this.el.textContent.toLowerCase().includes(this.searchTerm)){t.push("filtered-out")}return t.join(" ")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"parentOptionList",{get:function(){if(this.el.classList.contains("clone")){return this.el.closest("priv-option-list")}else{return this.el.assignedSlot.closest("priv-option-list")}},enumerable:false,configurable:true});t.prototype.handleKeydown=function(t){switch(t.key){case"ArrowUp":t.preventDefault();this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":t.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":t.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case"Escape":t.preventDefault();t.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":t.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":t.preventDefault();this.wmEndKeyPressed.emit();break;case"ArrowLeft":t.preventDefault();this.wmKeyLeftPressed.emit();break;default:if(t.key.length===1){t.preventDefault();this.wmLetterPressed.emit({letter:t.key,optionEl:this.el})}}};t.prototype.handleSelection=function(){if(!this.disabled){if(this.el.classList.contains("clone")){this.intCloneClicked.emit(this.el)}else{if(this.parentOptionList.multiple){this.selected?this.wmOptionDeselected.emit(this.el):this.wmOptionSelected.emit(this.el)}else{this.wmOptionSelected.emit(this.el)}}}};t.prototype.handleBlur=function(t){this.wmOptionBlurred.emit({relatedTarget:t.relatedTarget})};t.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.setAttribute("aria-selected","false")};t.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};t.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};t.prototype.handleSearch=function(t){this.searchTerm=t.detail.searchTerm.toLowerCase();if(this.searchTerm&&this.el.textContent.toLowerCase().includes(this.searchTerm)){var e=this.el.textContent.toLowerCase().indexOf(this.searchTerm);var r=this.el.textContent.slice(0,e);var i=this.el.textContent.slice(e,e+this.searchTerm.length);var o=this.el.textContent.slice(e+this.searchTerm.length);var n=document.createElement("span");n.textContent=r;var s=document.createElement("strong");s.textContent=i;var a=document.createElement("span");a.textContent=o;this.textEl.innerHTML="";this.textEl.appendChild(n);this.textEl.appendChild(s);this.textEl.appendChild(a)}else{this.textEl.textContent=this.el.textContent}};t.prototype.componentWillLoad=function(){var t=this;this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick();this.parentOptionList.addEventListener("optionListSearchChanged",(function(e){return t.handleSearch(e)}))};t.prototype.render=function(){var t=this;return h(Host,{role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},h("div",{class:"option-wrapper ".concat(this.parentOptionList.multiple?"checkbox":"")},h("span",{class:"option-text","aria-hidden":"true",ref:function(e){return t.textEl=e}},this.el.textContent),h("span",{class:"sr-only"},this.el.textContent)),h("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"]}},enumerable:false,configurable:true});return t}();Option.style=wmOptionCss;var wmSelectCss=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem;max-height:var(--max-height);overflow:auto}.wrapper .button-wrapper>.dropdown.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.measurement-area{position:absolute;visibility:hidden;height:0px;pointer-events:none}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var Select=function(){function t(t){registerInstance(this,t);this.wmSelectDidLoad=createEvent(this,"wmSelectDidLoad",7);this.wmSelectBlurred=createEvent(this,"wmSelectBlurred",7);this.wmSelectAllSelected=createEvent(this,"wmSelectAllSelected",7);this.wmSelectAllDeselected=createEvent(this,"wmSelectAllDeselected",7);this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.disabled=false;this.maxHeight="200px";this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage=undefined;this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=intl.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.searchPlaceholder=intl.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=intl.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isExpanded=false;this.announcement=""}Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"selectedOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(t){return t.selected}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allSelected",{get:function(){return this.childOptions.every((function(t){return t.selected}))},enumerable:false,configurable:true});t.prototype.handleOptionSelection=function(){if(!this.multiple){this.close()}};t.prototype.handleChildEnter=function(){this.close()};t.prototype.closePopupOnEscape=function(){this.close()};t.prototype.handleOptionBlur=function(t){if(!isElOrChild(this.el,t.detail.relatedTarget)){var e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget;this.el.dispatchEvent(e)}};t.prototype.handleClick=function(t){if(!isElOrChild(this.el,t.target)){this.close()}};t.prototype.handleButtonBlur=function(t){if(isElOrChild(this.el,t.relatedTarget)){t.stopPropagation()}};t.prototype.handleKey=function(t){switch(t.key){case"ArrowDown":if(this.isExpanded===false){t.preventDefault();this.open("next")}break;case"ArrowUp":if(this.isExpanded===false){t.preventDefault();this.open("previous")}break}};t.prototype.componentWillLoad=function(){var t=this;if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}if(!this.multiple&&this.selectedOptions.length===0){console.error("wm-select should have one initial option selected")}handleDisabledAttribute(this.el,this.isDisabled);var e=new MutationObserver((function(e){return e.forEach((function(e){return t.handleChildChange()}))}));e.observe(this.el,{childList:true,attributes:true,subtree:true,attributeFilter:["selected"]})};t.prototype.handleChildChange=function(){this.setButtonText();forceUpdate(this.el);if(this.multiple){this.optionListEl.handleChildChange()}};t.prototype.componentDidLoad=function(){this.wmSelectDidLoad.emit();this.dropdownEl.classList.add("hidden");forceUpdate(this.el);this.setButtonText()};t.prototype.open=function(t){var e=this;if(!this.isDisabled){var r=this.el.clientHeight;var i=this.buttonEl.clientHeight;this.openUp=shouldOpenUp(this.el,this.dropdownEl.clientHeight,r,i);this.isExpanded=true;this.dropdownEl.classList.remove("hidden");window.requestAnimationFrame((function(){e.optionListEl.handleInitialFocus(t)}))}};t.prototype.close=function(t){var e=this;if(t===void 0){t=true}if(this.isExpanded){this.isExpanded=false;this.optionListEl.unfocusAll();window.setTimeout((function(){e.dropdownEl.classList.add("hidden");if(e.optionListEl.multiple){e.optionListEl.updateOptionVisibility()}if(e.search){e.optionListEl.clearSearch()}if(t){e.buttonEl.focus()}}),150)}};t.prototype.announceError=function(){var t=this;if(this.errorMessage){setTimeout((function(){return t.announce(t.errorMessage)}),100)}};t.prototype.handleDisabledChange=function(){handleDisabledAttribute(this.el,this.isDisabled)};t.prototype.handleComponentBlur=function(t){if(!this.el.contains(t.relatedTarget)){this.close(false);this.wmSelectBlurred.emit()}};t.prototype.setButtonText=function(){this.displayedOptions=this.childOptions.filter((function(t){return t.selected}));if(this.multiple){var t=38;var e=window.getComputedStyle(this.buttonEl);var r=parseInt(e.getPropertyValue("padding-left").slice(0,-2));var i=parseInt(e.getPropertyValue("padding-right").slice(0,-2));var o=this.buttonEl.clientWidth-r-i-t;this.overflowCount=0;this.measurementAreaEl.textContent=this.displayedOptions.map((function(t){return t.textContent})).join(", ");var n=this.measurementAreaEl.clientWidth;while(n>o&&this.displayedOptions.length>1){this.overflowCount++;this.displayedOptions.pop();this.measurementAreaEl.textContent=this.displayedOptions.map((function(t){return t.textContent})).join(", ");n=this.measurementAreaEl.clientWidth}}};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.announcement=t};t.prototype.renderButtonText=function(){if(this.multiple&&this.displayedOptions.length<1){return h("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(t,e){return h("span",null,e>0?", ":"",t.textContent)}))}};t.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return h("span",null,h("span",{class:"overflow-counter"},"+",this.overflowCount))}};t.prototype.render=function(){var t;var e=this;var r=!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo;var i=(t={id:"selectbtn"},t["disabled"]=this.isDisabled,t["aria-controls"]="list",t["aria-labelledby"]="label selectbtn",t["aria-describedby"]="error",t["aria-expanded"]=this.isExpanded?"true":"false",t.onClick=function(){return e.isExpanded?e.close():e.open()},t);return h(Host,{onBlur:function(t){return e.handleComponentBlur(t)}},h("div",{class:"wrapper ".concat(getTextDir()," label-").concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},h("div",{class:"label-wrapper"},h("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?h("span",{class:"required"},h("span",{class:"sr-only"},globalMessages.requiredField),h("span",{"aria-hidden":"true"},"*")):"")),h("div",{class:"button-wrapper"},h("button",Object.assign({},i,{class:"displayedoption",ref:function(t){return e.buttonEl=t},onBlur:function(t){return e.handleButtonBlur(t)},onFocus:function(){return e.close()}}),h("span",{class:"overflowcontrol ".concat(r?"hassubinfo":"")},h("span",{class:"button-text"},this.renderButtonText()),r&&h("span",{class:"subinfo"},this.selectedOptions[0].subinfo)),this.renderOverflowCount(),h("div",{ref:function(t){return e.measurementAreaEl=t},class:"measurement-area","aria-hidden":"true"})),h("div",{class:"dropdown ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(t){return e.dropdownEl=t},style:{"--max-height":this.maxHeight}},h("priv-option-list",{ref:function(t){return e.optionListEl=t},multiple:this.multiple,search:this.search,selectAll:this.selectAll,searchPlaceholder:this.searchPlaceholder,onOptionListCloseRequested:function(){return e.close()},onOptionListAllSelected:function(){return e.wmSelectAllSelected.emit()},onOptionListAllDeselected:function(){return e.wmSelectAllDeselected.emit()}},h("slot",null))),h("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage),h("div",{id:"announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:function(t){return e.liveRegionEl=t}},this.announcement))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{errorMessage:["announceError"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return t}();Select.style=wmSelectCss;export{Option as wm_option,Select as wm_select};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement,f as forceUpdate}from"./index-558b5a82.js";import{i as intl,t as toBool,z as isElOrChild,a as handleDisabledAttribute,k as shouldOpenUp,y as getTextDir}from"./functions-b791a892.js";import{g as globalMessages}from"./intl-f2f7ce8b.js";var wmOptionCss=':host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.checkbox:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f131";display:inline-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background-selected);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){color:var(--wmcolor-select-option-text-disabled);background:var(--wmcolor-select-option-background-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host([aria-disabled=true]) .subinfo{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.clone.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;gap:16px}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:-ms-flexbox;display:flex}.option-text{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus){outline:none;background:var(--wmcolor-select-option-background-focus)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}';var Option=function(){function t(t){registerInstance(this,t);this.wmOptionSelected=createEvent(this,"wmOptionSelected",7);this.wmOptionDeselected=createEvent(this,"wmOptionDeselected",7);this.intCloneClicked=createEvent(this,"intCloneClicked",7);this.wmKeyUpPressed=createEvent(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=createEvent(this,"wmKeyDownPressed",7);this.wmKeyLeftPressed=createEvent(this,"wmKeyLeftPressed",7);this.wmEscKeyPressed=createEvent(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=createEvent(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=createEvent(this,"wmEndKeyPressed",7);this.wmEnterKeyPressed=createEvent(this,"wmEnterKeyPressed",7);this.wmLetterPressed=createEvent(this,"wmLetterPressed",7);this.wmOptionBlurred=createEvent(this,"wmOptionBlurred",7);this.value=undefined;this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false;this.searchTerm=""}Object.defineProperty(t.prototype,"hostClasses",{get:function(){var t=[];if(this.subinfo){t.push("hassubinfo")}if(this.parentOptionList.multiple){t.push("multi-option")}if(!this.el.textContent.toLowerCase().includes(this.searchTerm)){t.push("filtered-out")}return t.join(" ")},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"parentOptionList",{get:function(){if(this.el.classList.contains("clone")){return this.el.closest("priv-option-list")}else{return this.el.assignedSlot.closest("priv-option-list")}},enumerable:false,configurable:true});t.prototype.handleKeydown=function(t){switch(t.key){case"ArrowUp":t.preventDefault();this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":t.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":t.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case"Escape":t.preventDefault();t.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":t.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":t.preventDefault();this.wmEndKeyPressed.emit();break;case"ArrowLeft":t.preventDefault();this.wmKeyLeftPressed.emit();break;default:if(t.key.length===1){t.preventDefault();this.wmLetterPressed.emit({letter:t.key,optionEl:this.el})}}};t.prototype.handleSelection=function(){if(!this.disabled){if(this.el.classList.contains("clone")){this.intCloneClicked.emit(this.el)}else{if(this.parentOptionList.multiple){this.selected?this.wmOptionDeselected.emit(this.el):this.wmOptionSelected.emit(this.el)}else{this.wmOptionSelected.emit(this.el)}}}};t.prototype.handleBlur=function(t){this.wmOptionBlurred.emit({relatedTarget:t.relatedTarget})};t.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.setAttribute("aria-selected","false")};t.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};t.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};t.prototype.handleSearch=function(t){this.searchTerm=t.detail.searchTerm.toLowerCase();if(this.searchTerm&&this.el.textContent.toLowerCase().includes(this.searchTerm)){var e=this.el.textContent.toLowerCase().indexOf(this.searchTerm);var r=this.el.textContent.slice(0,e);var i=this.el.textContent.slice(e,e+this.searchTerm.length);var o=this.el.textContent.slice(e+this.searchTerm.length);var n=document.createElement("span");n.textContent=r;var s=document.createElement("strong");s.textContent=i;var a=document.createElement("span");a.textContent=o;this.textEl.innerHTML="";this.textEl.appendChild(n);this.textEl.appendChild(s);this.textEl.appendChild(a)}else{this.textEl.textContent=this.el.textContent}};t.prototype.componentWillLoad=function(){var t=this;this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick();this.parentOptionList.addEventListener("optionListSearchChanged",(function(e){return t.handleSearch(e)}))};t.prototype.render=function(){var t=this;return h(Host,{role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},h("div",{class:"option-wrapper ".concat(this.parentOptionList.multiple?"checkbox":"")},h("span",{class:"option-text","aria-hidden":"true",ref:function(e){return t.textEl=e}},this.el.textContent),h("span",{class:"sr-only"},this.el.textContent)),h("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"]}},enumerable:false,configurable:true});return t}();Option.style=wmOptionCss;var wmSelectCss=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem;max-height:var(--max-height);overflow-y:auto}.wrapper .button-wrapper>.dropdown.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.measurement-area{position:absolute;visibility:hidden;height:0px;pointer-events:none}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var Select=function(){function t(t){registerInstance(this,t);this.wmSelectDidLoad=createEvent(this,"wmSelectDidLoad",7);this.wmSelectBlurred=createEvent(this,"wmSelectBlurred",7);this.wmSelectAllSelected=createEvent(this,"wmSelectAllSelected",7);this.wmSelectAllDeselected=createEvent(this,"wmSelectAllDeselected",7);this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.disabled=false;this.maxHeight="200px";this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage=undefined;this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=intl.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.searchPlaceholder=intl.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=intl.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isExpanded=false;this.announcement=""}Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isDisabled",{get:function(){return toBool(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"selectedOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(t){return t.selected}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allSelected",{get:function(){return this.childOptions.every((function(t){return t.selected}))},enumerable:false,configurable:true});t.prototype.handleOptionSelection=function(){if(!this.multiple){this.close()}};t.prototype.handleChildEnter=function(){this.close()};t.prototype.closePopupOnEscape=function(){this.close()};t.prototype.handleOptionBlur=function(t){if(!isElOrChild(this.el,t.detail.relatedTarget)){var e=new CustomEvent("blur");e.relatedTarget=t.detail.relatedTarget;this.el.dispatchEvent(e)}};t.prototype.handleClick=function(t){if(!isElOrChild(this.el,t.target)){this.close()}};t.prototype.handleButtonBlur=function(t){if(isElOrChild(this.el,t.relatedTarget)){t.stopPropagation()}};t.prototype.handleKey=function(t){switch(t.key){case"ArrowDown":if(this.isExpanded===false){t.preventDefault();this.open("next")}break;case"ArrowUp":if(this.isExpanded===false){t.preventDefault();this.open("previous")}break}};t.prototype.componentWillLoad=function(){var t=this;if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}if(!this.multiple&&this.selectedOptions.length===0){console.error("wm-select should have one initial option selected")}handleDisabledAttribute(this.el,this.isDisabled);var e=new MutationObserver((function(e){return e.forEach((function(e){return t.handleChildChange()}))}));e.observe(this.el,{childList:true,attributes:true,subtree:true,attributeFilter:["selected"]})};t.prototype.handleChildChange=function(){this.setButtonText();forceUpdate(this.el);if(this.multiple){this.optionListEl.handleChildChange()}};t.prototype.componentDidLoad=function(){this.wmSelectDidLoad.emit();this.dropdownEl.classList.add("hidden");forceUpdate(this.el);this.setButtonText()};t.prototype.open=function(t){var e=this;if(!this.isDisabled){var r=this.el.clientHeight;var i=this.buttonEl.clientHeight;this.openUp=shouldOpenUp(this.el,this.dropdownEl.clientHeight,r,i);this.isExpanded=true;this.dropdownEl.classList.remove("hidden");window.requestAnimationFrame((function(){e.optionListEl.handleInitialFocus(t)}))}};t.prototype.close=function(t){var e=this;if(t===void 0){t=true}if(this.isExpanded){this.isExpanded=false;this.optionListEl.unfocusAll();window.setTimeout((function(){e.dropdownEl.classList.add("hidden");if(e.optionListEl.multiple){e.optionListEl.updateOptionVisibility()}if(e.search){e.optionListEl.clearSearch()}if(t){e.buttonEl.focus()}}),150)}};t.prototype.announceError=function(){var t=this;if(this.errorMessage){setTimeout((function(){return t.announce(t.errorMessage)}),100)}};t.prototype.handleDisabledChange=function(){handleDisabledAttribute(this.el,this.isDisabled)};t.prototype.handleComponentBlur=function(t){if(!this.el.contains(t.relatedTarget)){this.close(false);this.wmSelectBlurred.emit()}};t.prototype.setButtonText=function(){this.displayedOptions=this.childOptions.filter((function(t){return t.selected}));if(this.multiple){var t=38;var e=window.getComputedStyle(this.buttonEl);var r=parseInt(e.getPropertyValue("padding-left").slice(0,-2));var i=parseInt(e.getPropertyValue("padding-right").slice(0,-2));var o=this.buttonEl.clientWidth-r-i-t;this.overflowCount=0;this.measurementAreaEl.textContent=this.displayedOptions.map((function(t){return t.textContent})).join(", ");var n=this.measurementAreaEl.clientWidth;while(n>o&&this.displayedOptions.length>1){this.overflowCount++;this.displayedOptions.pop();this.measurementAreaEl.textContent=this.displayedOptions.map((function(t){return t.textContent})).join(", ");n=this.measurementAreaEl.clientWidth}}};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.announcement=t};t.prototype.renderButtonText=function(){if(this.multiple&&this.displayedOptions.length<1){return h("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(t,e){return h("span",null,e>0?", ":"",t.textContent)}))}};t.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return h("span",null,h("span",{class:"overflow-counter"},"+",this.overflowCount))}};t.prototype.render=function(){var t;var e=this;var r=!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo;var i=(t={id:"selectbtn"},t["disabled"]=this.isDisabled,t["aria-controls"]="list",t["aria-labelledby"]="label selectbtn",t["aria-describedby"]="error",t["aria-expanded"]=this.isExpanded?"true":"false",t.onClick=function(){return e.isExpanded?e.close():e.open()},t);return h(Host,{onBlur:function(t){return e.handleComponentBlur(t)}},h("div",{class:"wrapper ".concat(getTextDir()," label-").concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},h("div",{class:"label-wrapper"},h("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?h("span",{class:"required"},h("span",{class:"sr-only"},globalMessages.requiredField),h("span",{"aria-hidden":"true"},"*")):"")),h("div",{class:"button-wrapper"},h("button",Object.assign({},i,{class:"displayedoption",ref:function(t){return e.buttonEl=t},onBlur:function(t){return e.handleButtonBlur(t)},onFocus:function(){return e.close()}}),h("span",{class:"overflowcontrol ".concat(r?"hassubinfo":"")},h("span",{class:"button-text"},this.renderButtonText()),r&&h("span",{class:"subinfo"},this.selectedOptions[0].subinfo)),this.renderOverflowCount(),h("div",{ref:function(t){return e.measurementAreaEl=t},class:"measurement-area","aria-hidden":"true"})),h("div",{class:"dropdown ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(t){return e.dropdownEl=t}},h("priv-option-list",{ref:function(t){return e.optionListEl=t},multiple:this.multiple,search:this.search,selectAll:this.selectAll,maxHeight:this.maxHeight,searchPlaceholder:this.searchPlaceholder,onOptionListCloseRequested:function(){return e.close()},onOptionListAllSelected:function(){return e.wmSelectAllSelected.emit()},onOptionListAllDeselected:function(){return e.wmSelectAllDeselected.emit()}},h("slot",null))),h("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage),h("div",{id:"announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:function(t){return e.liveRegionEl=t}},this.announcement))))};Object.defineProperty(t,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{errorMessage:["announceError"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return t}();Select.style=wmSelectCss;export{Option as wm_option,Select as wm_select};
@@ -0,0 +1 @@
1
+ import{r as e,c as t,f as o,h as i,H as r,g as n}from"./p-568c595f.js";import{i as s,t as a,k as l,B as c,z as d,y as p}from"./p-16f65bf4.js";import{g as m}from"./p-21d372ed.js";const h=class{constructor(o){e(this,o),this.wmNestedSelectBlurred=t(this,"wmNestedSelectBlurred",7),this.openUp=!1,this.overflowCount=0,this.displayedOptions=[],this.clearSelectionMessage=s.formatMessage(this.multiple?{id:"select.multiClearSelection",defaultMessage:"Clear all Selections",description:"Button text to clear selection. Use imperative"}:{id:"select.singleClearSelection",defaultMessage:"Clear Selection",description:"Button text to clear selection. Use imperative"}),this.disabled=!1,this.maxHeight="200px",this.label=void 0,this.labelPosition="top",this.requiredField=!1,this.errorMessage=void 0,this.multiple=!1,this.search=!1,this.selectAll=!1,this.placeholder=s.formatMessage(this.multiple?{id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text for multiple select. Use imperative"}:{id:"select.singlePlaceholder",defaultMessage:"Select an Option",description:"Placeholder text for single select. Use imperative"}),this.searchPlaceholder=s.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"}),this.allSelectedMessage=s.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"}),this.isExpanded=!1,this.showClearSelectionButton=!1,this.constrainedMaxHeight=this.maxHeight}get isDisabled(){return a(this.disabled)}get childOptions(){return Array.from(this.el.querySelectorAll("wm-option"))}get optgroupEls(){return Array.from(this.el.querySelectorAll("wm-optgroup"))}get menuitemEls(){return Array.from(this.el.shadowRoot.querySelectorAll(".menuitem"))}get allSelected(){return this.childOptions.every((e=>e.selected))}componentWillLoad(){new MutationObserver((e=>e.forEach((()=>this.handleChildChange())))).observe(this.el,{childList:!0,attributes:!0,subtree:!0,attributeFilter:["selected"]})}handleChildChange(){this.setButtonText(),o(this.el),this.multiple&&this.optgroupEls.forEach((e=>e.handleChildChange()))}setButtonText(){if(this.displayedOptions=this.childOptions.filter((e=>e.selected)),this.multiple){const e=38,t=window.getComputedStyle(this.buttonEl),o=parseInt(t.getPropertyValue("padding-left").slice(0,-2)),i=parseInt(t.getPropertyValue("padding-right").slice(0,-2)),r=this.buttonEl.clientWidth-o-i-e;this.overflowCount=0,this.measurementAreaEl.textContent=this.displayedOptions.map((e=>e.textContent)).join(", ");let n=this.measurementAreaEl.clientWidth;for(;n>r&&this.displayedOptions.length>1;)this.overflowCount++,this.displayedOptions.pop(),this.measurementAreaEl.textContent=this.displayedOptions.map((e=>e.textContent)).join(", "),n=this.measurementAreaEl.clientWidth}}countOptgroupSelected(e){return Array.from(e.querySelectorAll("wm-option")).filter((e=>e.selected)).length}handleOptionSelection(){this.multiple||this.close()}handleChildEnter(){this.close()}closePopupOnEscape(){this.close()}close(e=!0){this.isExpanded&&(this.isExpanded=!1,this.dropdownEl.classList.remove("open"),window.setTimeout((()=>{this.optgroupEls.forEach((e=>e.isExpanded=!1)),e&&this.buttonEl.focus()}),150))}open(){if(!this.isDisabled){this.showClearSelectionButton=this.childOptions.some((e=>e.selected)),this.isExpanded=!0,this.dropdownEl.classList.add("open"),this.openUp=l(this.el,this.dropdownEl.clientHeight,this.el.clientHeight,0),this.constrainedMaxHeight=this.maxHeight;const e=c(this.el).spaceAbove;this.openUp&&parseInt(getComputedStyle(this.menuEl).getPropertyValue("--max-height").replace("px",""))>e&&(this.constrainedMaxHeight=e.toString()+"px"),this.optgroupEls.forEach((t=>{t.shadowRoot.querySelector("priv-option-list").upwardsHeightLimit=this.openUp?e:null})),window.requestAnimationFrame((()=>{this.focusFirstMenuitem()}))}}focusFirstMenuitem(){this.menuitemEls.length>0&&this.menuitemEls[0].focus()}moveDown(e){const t=this.menuitemEls.indexOf(e);t==this.menuitemEls.length-1?this.menuitemEls[0].focus():this.menuitemEls[t+1].focus()}moveUp(e){const t=this.menuitemEls.indexOf(e);0==t?this.menuitemEls[this.menuitemEls.length-1].focus():this.menuitemEls[t-1].focus()}handleButtonBlur(e){d(this.el,e.relatedTarget)&&e.stopPropagation()}handleClick(e){d(this.el,e.target)||this.close()}handleMenuitemKeydown(e){switch(e.key){case"ArrowDown":e.preventDefault(),this.moveDown(e.target);break;case"ArrowUp":e.preventDefault(),this.moveUp(e.target);break;case"ArrowRight":e.target.classList.contains("group-btn")&&(e.preventDefault(),e.target.click());break;case"Escape":e.preventDefault(),this.close()}}handleComponentBlur(e){this.el.contains(e.relatedTarget)||(this.close(!1),this.wmNestedSelectBlurred.emit())}handleOptgroupExpanded(){this.menuEl.classList.add("hidden"),this.optListWrapperEl.classList.remove("hidden")}handleOptgroupHidden(e){this.showClearSelectionButton=this.childOptions.some((e=>e.selected)),this.menuEl.classList.remove("hidden"),this.optListWrapperEl.classList.add("hidden"),this.el.shadowRoot.querySelector(`button[data-label=${e.detail}]`).focus()}renderButtonText(){return this.displayedOptions.length<1?i("span",null,this.placeholder):this.multiple&&this.allSelected&&this.overflowCount>0?this.allSelectedMessage:this.displayedOptions.map(((e,t)=>i("span",null,t>0?", ":"",e.textContent)))}renderOverflowCount(){if(this.overflowCount>0&&!this.allSelected)return i("span",null,i("span",{class:"overflow-counter"},"+",this.overflowCount))}handleClearSelection(){this.optgroupEls.forEach((e=>e.emitDeselection())),this.multiple||this.close()}renderClearSelectionButton(){if(this.showClearSelectionButton)return i("button",{class:"menuitem clear-selection",onClick:()=>this.handleClearSelection(),tabindex:-1,onKeyDown:e=>this.handleMenuitemKeydown(e)},this.clearSelectionMessage)}renderSelectionCount(e){const t=this.countOptgroupSelected(e);if(t){const e=s.formatMessage({id:"select.optgroupSingleSelectionCount",defaultMessage:"Item Selected",description:"Text indicating number of selected in a group, where only a single selection is possible."},{numSelected:t}),o=s.formatMessage({id:"select.optgroupMultipleSelectionCount",defaultMessage:"{numSelected} Selected",description:"Text indicating number of selected in a group, where multiple selections are possible."},{numSelected:t});return i("div",{class:"selection-count"},i("span",null,this.multiple?o:e))}}render(){const e={id:"selectbtn",disabled:this.isDisabled,"aria-controls":"list","aria-labelledby":"label selectbtn","aria-describedby":"error","aria-expanded":this.isExpanded?"true":"false",onClick:()=>{this.isExpanded?this.close():this.open()}};return i(r,{onBlur:e=>this.handleComponentBlur(e)},i("div",{class:`wrapper ${p()} label-${this.labelPosition} ${this.errorMessage?"invalid":""}`},i("div",{class:"label-wrapper"},i("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?i("span",{class:"required"},i("span",{class:"sr-only"},m.requiredField),i("span",{"aria-hidden":"true"},"*")):"")),i("div",{class:"button-wrapper"},i("button",Object.assign({},e,{class:"displayedoption "+(this.isExpanded?"expanded":""),ref:e=>this.buttonEl=e,onBlur:e=>this.handleButtonBlur(e),onFocus:()=>this.close()}),i("span",{class:"overflowcontrol"},i("span",{class:"button-text"},this.renderButtonText())),this.renderOverflowCount(),i("div",{ref:e=>this.measurementAreaEl=e,class:"measurement-area","aria-hidden":"true"})),i("div",{class:"dropdown "+(this.openUp?"upwards":""),ref:e=>this.dropdownEl=e},i("div",{ref:e=>this.menuEl=e,class:"menu",style:{"--max-height":this.constrainedMaxHeight}},this.renderClearSelectionButton(),this.optgroupEls.map((e=>i("button",{class:"menuitem group-btn "+(e.disabled?"disabled":""),role:"menuitem","data-label":e.label,tabindex:-1,"aria-disabled":e.disabled,onClick:()=>{e.disabled||(e.isExpanded=!e.isExpanded,o(this.el))},onKeyDown:e=>this.handleMenuitemKeydown(e)},i("span",null,e.label),this.renderSelectionCount(e),e.disabled&&i("div",{class:"disabled-indication"},"Disabled"))))),i("div",{ref:e=>this.optListWrapperEl=e,class:"option-list-wrapper hidden"},i("slot",null))),i("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage))))}static get delegatesFocus(){return!0}get el(){return n(this)}};h.style=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.button-wrapper .displayedoption{height:2.75rem}}.button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.button-wrapper .displayedoption.expanded:before{content:"\\f143"}.button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.button-wrapper .displayedoption:focus{outline:none}.button-wrapper .displayedoption::-moz-focus-inner{border:0}.button-wrapper .displayedoption:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.dropdown{overflow-x:hidden;overflow-y:auto;-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;transform:scale(1, 0);-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;transition: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:40;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.dropdown.upwards{top:unset;bottom:100%;-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.dropdown.hidden{visibility:hidden}.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.menu{width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:var(--max-height);overflow-y:auto}.menu.hidden{position:absolute;max-height:100%;overflow:hidden}.menu .menuitem{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;font-weight:600}.menu .menuitem:not(:last-child){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}.menu .menuitem.disabled{color:var(--wmcolor-select-option-text-disabled);cursor:auto}.menu .menuitem.clear-selection{color:var(--wmcolor-select-text);-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center}.menu .menuitem.clear-selection: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";pointer-events:none;padding-right:0.5rem;font-size:1.12rem}.menu :focus{outline:none;background:var(--wmcolor-interactive-background-focus)}.menu :hover{background:var(--wmcolor-select-option-background-hover);outline:none}.group-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:"\\f142";position:absolute;right:1.25rem;pointer-events:none;font-size:1.12rem}.group-btn.disabled{background:var(--wmcolor-select-option-background-disabled)}.selection-count,.disabled-indication{margin-right:40px;font-weight:400;font-style:italic}.disabled-indication{color:var(--wmcolor-interactive-disabled)}.option-list-wrapper{background:white;width:100%;-webkit-transform:translateX(0%);transform:translateX(0%);-webkit-transition:-webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:-webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:transform 0.2s cubic-bezier(0.04, 0, 0.2, 1);transition:transform 0.2s cubic-bezier(0.04, 0, 0.2, 1), -webkit-transform 0.2s cubic-bezier(0.04, 0, 0.2, 1)}.option-list-wrapper.hidden{-webkit-transform:translateX(100%);transform:translateX(100%);position:absolute;top:0px;max-height:100%;overflow-y:hidden}.measurement-area{position:absolute;visibility:hidden;height:0px;pointer-events:none}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{h as wm_nested_select}
@@ -1 +1 @@
1
- window.navigator.plugins.length>0&&console.log("Ripple component library","5.7.0-3"),window.addEventListener("keydown",(function(n){if("Tab"==n.key){var o=new Event("wmUserIsTabbing");window.dispatchEvent(o),document.querySelector("body").classList.add("wmcl-user-is-tabbing")}"ArrowLeft"!=n.key&&"ArrowUp"!=n.key&&"ArrowRight"!=n.key&&"ArrowDown"!=n.key||(o=new Event("wmUserIsKeying"),window.dispatchEvent(o),document.querySelector("body").classList.add("wmcl-user-is-keying"))})),window.addEventListener("mousedown",(function(){var n=new Event("wmUserIsNotTabbing");window.dispatchEvent(n),document.querySelector("body").classList.remove("wmcl-user-is-tabbing"),document.querySelector("body").classList.remove("wmcl-user-is-keying")}));const n=document.createElement("div");n.id="wm-tooltip-container";const o=document.createElement("div");o.id="wm-tooltip",o.classList.add("wm-tooltip"),o.setAttribute("popover","manual"),o.setAttribute("aria-hidden","true");const t=document.createElement("style");t.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 inset: unset;\n top: 0;\n left: 0;\n transform: translateZ(0);\n will-change: transform;\n transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));\n border: none;\n}\n\n.wm-tooltip:popover-open {\n opacity: 0;\n}\n\n.wm-tooltip.show {\n transition-delay: 500ms;\n opacity: 1;\n}\n",document.head.appendChild(t),n.appendChild(o),document.querySelector("body").appendChild(n);
1
+ window.navigator.plugins.length>0&&console.log("Ripple component library","5.7.0-5"),window.addEventListener("keydown",(function(n){if("Tab"==n.key){var o=new Event("wmUserIsTabbing");window.dispatchEvent(o),document.querySelector("body").classList.add("wmcl-user-is-tabbing")}"ArrowLeft"!=n.key&&"ArrowUp"!=n.key&&"ArrowRight"!=n.key&&"ArrowDown"!=n.key||(o=new Event("wmUserIsKeying"),window.dispatchEvent(o),document.querySelector("body").classList.add("wmcl-user-is-keying"))})),window.addEventListener("mousedown",(function(){var n=new Event("wmUserIsNotTabbing");window.dispatchEvent(n),document.querySelector("body").classList.remove("wmcl-user-is-tabbing"),document.querySelector("body").classList.remove("wmcl-user-is-keying")}));const n=document.createElement("div");n.id="wm-tooltip-container";const o=document.createElement("div");o.id="wm-tooltip",o.classList.add("wm-tooltip"),o.setAttribute("popover","manual"),o.setAttribute("aria-hidden","true");const t=document.createElement("style");t.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 inset: unset;\n top: 0;\n left: 0;\n transform: translateZ(0);\n will-change: transform;\n transform: translate(var(--wmTooltipLeft), var(--wmTooltipTop));\n border: none;\n}\n\n.wm-tooltip:popover-open {\n opacity: 0;\n}\n\n.wm-tooltip.show {\n transition-delay: 500ms;\n opacity: 1;\n}\n",document.head.appendChild(t),n.appendChild(o),document.querySelector("body").appendChild(n);
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e,g as h}from"./p-568c595f.js";import{t as o,a as n}from"./p-16f65bf4.js";const p=class{constructor(s){t(this,s),this.wmOptgroupAllSelected=i(this,"wmOptgroupAllSelected",7),this.wmOptgroupAllDeselected=i(this,"wmOptgroupAllDeselected",7),this.optgroupExpanded=i(this,"optgroupExpanded",7),this.optgroupHidden=i(this,"optgroupHidden",7),this.label=void 0,this.isExpanded=!1,this.multiple=!1,this.disabled=!1}get parentNestedSelect(){return this.el.parentElement}get isDisabled(){return o(this.disabled)}isExpandedChanged(){this.isExpanded?(this.el.classList.add("visible"),this.optgroupExpanded.emit(),window.setTimeout((()=>{this.optionListEl.handleInitialFocus()}),250)):(this.optgroupHidden.emit(this.label),this.optionListEl.clearSearch(),window.setTimeout((()=>{this.el.classList.remove("visible"),this.parentNestedSelect.multiple&&this.optionListEl.updateOptionVisibility()}),250))}async emitDeselection(){this.wmOptgroupAllDeselected.emit()}async handleChildChange(){this.optionListEl.handleChildChange()}handleOptionKeyLeft(){this.isExpanded=!1}componentWillLoad(){n(this.el,this.isDisabled)}render(){return s(e,null,s("div",{class:"list-wrapper"},s("priv-option-list",{ref:t=>this.optionListEl=t,multiple:this.parentNestedSelect.multiple,search:this.parentNestedSelect.search,searchPlaceholder:this.parentNestedSelect.searchPlaceholder,optgroupLabel:this.label,selectAll:this.parentNestedSelect.selectAll,onOptionListAllSelected:()=>this.wmOptgroupAllSelected.emit(),onOptionListAllDeselected:()=>this.wmOptgroupAllDeselected.emit()},s("slot",null))))}static get delegatesFocus(){return!0}get el(){return h(this)}static get watchers(){return{isExpanded:["isExpandedChanged"]}}};p.style=":host{width:100%;display:none}: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(.visible){display:unset}";export{p as wm_optgroup}
1
+ import{r as t,c as i,h as s,H as e,g as h}from"./p-568c595f.js";import{t as o,a as n}from"./p-16f65bf4.js";const p=class{constructor(s){t(this,s),this.wmOptgroupAllSelected=i(this,"wmOptgroupAllSelected",7),this.wmOptgroupAllDeselected=i(this,"wmOptgroupAllDeselected",7),this.optgroupExpanded=i(this,"optgroupExpanded",7),this.optgroupHidden=i(this,"optgroupHidden",7),this.label=void 0,this.isExpanded=!1,this.multiple=!1,this.disabled=!1}get parentNestedSelect(){return this.el.parentElement}get isDisabled(){return o(this.disabled)}isExpandedChanged(){this.isExpanded?(this.el.classList.add("visible"),this.optgroupExpanded.emit(),window.setTimeout((()=>{this.optionListEl.handleInitialFocus()}),250)):(this.optgroupHidden.emit(this.label),this.optionListEl.clearSearch(),window.setTimeout((()=>{this.el.classList.remove("visible")}),250)),this.parentNestedSelect.multiple&&this.optionListEl.updateOptionVisibility()}async emitDeselection(){this.wmOptgroupAllDeselected.emit()}async handleChildChange(){this.optionListEl.handleChildChange()}handleOptionKeyLeft(){this.isExpanded=!1}componentWillLoad(){n(this.el,this.isDisabled)}render(){return s(e,null,s("div",{class:"list-wrapper"},s("priv-option-list",{ref:t=>this.optionListEl=t,multiple:this.parentNestedSelect.multiple,search:this.parentNestedSelect.search,maxHeight:this.parentNestedSelect.constrainedMaxHeight,searchPlaceholder:this.parentNestedSelect.searchPlaceholder,optgroupLabel:this.label,selectAll:this.parentNestedSelect.selectAll,onOptionListAllSelected:()=>this.wmOptgroupAllSelected.emit(),onOptionListAllDeselected:()=>this.wmOptgroupAllDeselected.emit()},s("slot",null))))}static get delegatesFocus(){return!0}get el(){return h(this)}static get watchers(){return{isExpanded:["isExpandedChanged"]}}};p.style=":host{width:100%;display:none}: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(.visible){display:unset}";export{p as wm_optgroup}
@@ -1 +1 @@
1
- System.register(["./p-ab8d78cc.system.js","./p-3d3b7266.system.js"],(function(e,a){"use strict";var t,l;return{setters:[function(a){t=a.p;l=a.b;e("setNonce",a.s)},function(){}],execute:function(){var e=function(){var e=a.meta.url;var l={};if(e!==""){l.resourcesUrl=new URL(".",e).href}return t(l)};e().then((function(e){return l(JSON.parse('[["p-749597da.system",[[17,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"keydownOnTabItem","handleKeydown"]],{"selectedTab":["setSelected"]}],[17,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]}],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]}]]],["p-ed1f6b8d.system",[[17,"wm-file",{"name":[1],"type":[1],"fileActions":[1,"file-actions"],"lastUpdated":[1,"last-updated"],"progress":[514],"size":[1],"uploadedBy":[1,"uploaded-by"],"errorMessage":[1,"error-message"],"showInfo":[1025,"show-info"]}]]],["p-6cc07645.system",[[17,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"itemIndexToFocus":[32]},[[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]],{"products":["parseData"]}]]],["p-70350a03.system",[[17,"wm-optgroup",{"label":[1],"isExpanded":[1028,"is-expanded"],"multiple":[1028],"disabled":[4],"emitDeselection":[64],"handleChildChange":[64]},[[0,"wmKeyLeftPressed","handleOptionKeyLeft"]],{"isExpanded":["isExpandedChanged"]}]]],["p-6d129ef8.system",[[17,"wm-navigation",{"open":[1540]},[[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]],{"open":["handleStateChange"]}],[17,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[17,"wm-navigation-item",{"href":[1],"text":[1],"active":[4]}]]],["p-db9657eb.system",[[17,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]],{"mode":["handleModeUpdate"]}],[17,"wm-progress-monitor",{"breakpoint":[8],"groupLegend":[1,"group-legend"],"barLabelsWidth":[1,"bar-labels-width"]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-5a9e3108.system",[[17,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"labelWidth":[1,"label-width"],"subinfo":[1],"valueFormat":[1,"value-format"],"showGrid":[4,"show-grid"],"showLegend":[4,"show-legend"],"showBarLegend":[4,"show-bar-legend"],"notStartedColor":[4,"not-started-color"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-e081fdc2.system",[[17,"wm-date-range",{"dateFormat":[1,"date-format"],"disabled":[4],"errorMessage":[513,"error-message"],"invalidStart":[4,"invalid-start"],"invalidEnd":[4,"invalid-end"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"],"preselected":[1],"requiredField":[4,"required-field"],"valueStart":[1025,"value-start"],"valueEnd":[1025,"value-end"],"availSpace":[32],"isExpanded":[32],"reformatDate":[64],"isValidISO":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"],[0,"outOfCal","handleOutOfCal"],[0,"cellHovered","handleCellHovered"],[9,"resize","setAvailSpace"]],{"disabled":["handleDisabled"],"valueStart":["updateValueStart"],"valueEnd":["updateValueEnd"],"errorMessage":["handleErrorMessage"]}]]],["p-cad0c5f9.system",[[17,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1,"label-position"],"label":[1],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"reformatDate":[64],"isValidIso":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"cellTriggered","handleCellTriggered"]],{"disabled":["handleDisabledChange"],"value":["updateValue"],"errorMessage":["announceError"]}]]],["p-725230dd.system",[[1,"wm-line-chart",{"label":[1],"description":[1],"xAxisLabel":[1,"x-axis-label"],"yAxisLabel":[1,"y-axis-label"],"lineData":[513,"line-data"],"units":[1],"labelWidth":[1,"label-width"],"highlightQualifier":[1,"highlight-qualifier"],"highlightStart":[1,"highlight-start"],"highlightEnd":[1,"highlight-end"],"visibilityToggles":[4,"visibility-toggles"],"showDeltas":[4,"show-deltas"],"yRange":[1,"y-range"],"parsedLineData":[32],"popoverIndex":[32],"focusedLine":[32],"hiddenLines":[32],"isTabbing":[32],"intervalSkip":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"lineData":["parseData"],"intervalSkip":["handleIntervalSkip"]}]]],["p-294b38ca.system",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}]]],["p-50388b6f.system",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]}]]],["p-f40e1468.system",[[17,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"announcement":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"numResults":["handleNumResultsUpdate"],"disabled":["handleDisabledChange"]}]]],["p-32bf3f5b.system",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-c9543950.system",[[17,"wm-file-list",{"showInfo":[1,"show-info"]}]]],["p-30b905eb.system",[[17,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"inputWidth":[1,"input-width"],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"symbolBefore":[1,"symbol-before"],"symbolAfter":[1,"symbol-after"],"textAfter":[1,"text-after"],"type":[1],"step":[2],"min":[2],"max":[2],"isSubmit":[4,"is-submit"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-84603f1f.system",[[4,"wm-modal",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"returnFocusEl":[32],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},null,{"open":["toggleModal"]}]]],["p-50523d8f.system",[[17,"wm-nested-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"showClearSelectionButton":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmEscKeyPressed","closePopupOnEscape"],[6,"click","handleClick"],[0,"optgroupExpanded","handleOptgroupExpanded"],[0,"optgroupHidden","handleOptgroupHidden"]]]]],["p-1389302e.system",[[17,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeSize":[4,"is-large-size"],"srAnnouncement":[32]},null,{"totalItems":["calculateTotalPages"],"itemsPerPage":["calculateTotalPages"]}]]],["p-c853e185.system",[[1,"wm-snackbar",{"notifications":[1537],"isTabbing":[32],"announcement":[32]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]],{"notifications":["updateSnacks"]}]]],["p-3deaf4d9.system",[[17,"wm-tag-input",{"label":[1],"errorMessage":[1,"error-message"],"info":[1],"labelPosition":[1,"label-position"],"maxTags":[2,"max-tags"],"placeholder":[1025],"requiredField":[4,"required-field"],"tagInputType":[1,"tag-input-type"],"helpText":[1,"help-text"],"addNew":[4,"add-new"],"characterLimit":[2,"character-limit"],"colHeaders":[1,"col-headers"],"colWidths":[1,"col-widths"],"colWrap":[1,"col-wrap"],"isKeying":[32],"isExpanded":[32],"liveRegionMessage":[32],"focusedOption":[32],"focusedColumn":[32],"focusedTagIndex":[32],"tagsList":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"privTagOptionSelected","handleTagOptionSelected"],[0,"privTagOptionDeselected","handleTagOptionDeselected"],[4,"click","handleClick"],[11,"scroll","dismissTooltip"],[0,"blur","handleBlur"]],{"errorMessage":["announceError"]}]]],["p-fa4f1030.system",[[0,"wm-tag-option",{"selected":[1540],"locked":[4],"col1":[1],"col2":[1],"col3":[1],"col4":[1],"emitSelectedEvent":[64],"emitDeselectedEvent":[64]},null,{"selected":["handleSelected"]}]]],["p-505eca1c.system",[[1,"wm-textarea",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"inputWidth":[1,"input-width"],"inputHeight":[1,"input-height"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-0b1c6965.system",[[17,"wm-timepicker",{"disabled":[4],"value":[1025],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"isValidTime":[64],"reformatTime":[64]},[[0,"keydown","handleKey"]],{"disabled":["handleDisabledChange"],"value":["handleValueChange"],"errorMessage":["announceError"]}]]],["p-a3c01e10.system",[[17,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipPosition":[1537,"tooltip-position"],"targetSize":[1,"target-size"],"isOpen":[32]},[[0,"keydown","handleKeydown"],[4,"click","handleClick"]]]]],["p-3e415c49.system",[[17,"wm-uploader",{"label":[1],"buttonText":[1,"button-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1,"max-size"],"maxFiles":[2,"max-files"],"errorMessage":[1,"error-message"],"requiredField":[4,"required-field"],"showInfo":[1,"show-info"],"isTabbing":[32],"notif":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmFileErrorCleared","handleFileErrorCleared"],[0,"wmFileDelete","storeDeletedId"]],{"errorMessage":["announceError"]}]]],["p-65d26233.system",[[0,"wm-wrapper"]]],["p-311923b2.system",[[17,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"]}]]],["p-021ff5fa.system",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-ca971eac.system",[[0,"priv-calendar",{"disabled":[4],"view":[1025],"focusDate":[1025,"focus-date"],"startDate":[1,"start-date"],"endDate":[1,"end-date"],"hoverDate":[1,"hover-date"],"focusFirstFocusable":[64],"focusLastFocusable":[64],"focusCell":[64]},[[0,"keydown","handleKey"]],{"focusDate":["handleFocusDate"]}]]],["p-a0ecb6d7.system",[[0,"priv-chart-popover",{"open":[1028],"sliceDetails":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]],{"open":["handleOpenChange"],"sliceDetails":["handleDetailsChange"]}]]],["p-b980f699.system",[[17,"wm-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"]],{"errorMessage":["announceError"],"disabled":["handleDisabledChange"]}],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]],{"selected":["syncAriaSelected"],"disabled":["syncAriaDisabled","updateDisabledOnClick"]}]]],["p-493a03e1.system",[[4,"priv-option-list",{"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"searchPlaceholder":[1,"search-placeholder"],"optgroupLabel":[1,"optgroup-label"],"announcement":[32],"searchTerm":[32],"handleChildChange":[64],"clearSearch":[64],"focusOption":[64],"handleInitialFocus":[64],"unfocusAll":[64],"updateOptionVisibility":[64]},[[0,"wmLetterPressed","findAndFocusOption"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"intCloneClicked","handleOptionCloneSelection"]]]]],["p-c2e00d4a.system",[[17,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"isSubmit":[4,"is-submit"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]],{"buttonType":["validateType"],"icon":["updateIcon"],"disabled":["handleDisabledChange"]}]]],["p-b01f9998.system",[[17,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"darkMode":[4,"dark-mode"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"icon":[1025],"description":[1]},[[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]],{"disabled":["setOnClick"]}]]]]'),e)}))}}}));
1
+ System.register(["./p-ab8d78cc.system.js","./p-f6eb20b6.system.js"],(function(e,a){"use strict";var t,l;return{setters:[function(a){t=a.p;l=a.b;e("setNonce",a.s)},function(){}],execute:function(){var e=function(){var e=a.meta.url;var l={};if(e!==""){l.resourcesUrl=new URL(".",e).href}return t(l)};e().then((function(e){return l(JSON.parse('[["p-749597da.system",[[17,"wm-tab-list",{"customBackground":[1,"custom-background"],"customPadding":[1,"custom-padding"],"selectedTab":[1,"selected-tab"]},[[0,"tabItemLoaded","tabItemLoaded"],[0,"keydownOnTabItem","handleKeydown"]],{"selectedTab":["setSelected"]}],[17,"wm-tab-item",{"selected":[4],"show":[4],"tabId":[1,"tab-id"]}],[0,"wm-tab-panel",{"active":[1028],"tabId":[1025,"tab-id"]}]]],["p-ed1f6b8d.system",[[17,"wm-file",{"name":[1],"type":[1],"fileActions":[1,"file-actions"],"lastUpdated":[1,"last-updated"],"progress":[514],"size":[1],"uploadedBy":[1,"uploaded-by"],"errorMessage":[1,"error-message"],"showInfo":[1025,"show-info"]}]]],["p-6cc07645.system",[[17,"wm-navigator",{"userName":[1,"user-name"],"email":[1],"authType":[2,"auth-type"],"connectionName":[1,"connection-name"],"logoutUrl":[1,"logout-url"],"products":[1],"loadFromUserinfo":[4,"load-from-userinfo"],"isOpen":[32],"itemIndexToFocus":[32]},[[0,"keydown","handleKeys"],[0,"keydownOnNavItem","handleKeydown"],[4,"click","handleClick"],[0,"buttonActivated","handleButtonClick"]],{"products":["parseData"]}]]],["p-f4bcee58.system",[[17,"wm-optgroup",{"label":[1],"isExpanded":[1028,"is-expanded"],"multiple":[1028],"disabled":[4],"emitDeselection":[64],"handleChildChange":[64]},[[0,"wmKeyLeftPressed","handleOptionKeyLeft"]],{"isExpanded":["isExpandedChanged"]}]]],["p-6d129ef8.system",[[17,"wm-navigation",{"open":[1540]},[[0,"keydown","closeOnEscape"],[9,"resize","handleWindowResize"],[8,"wmNavigationHamburgerClicked","handleHamburgerClicked"],[0,"wmNavigationItemClicked","handleClickOnItem"]],{"open":["handleStateChange"]}],[17,"wm-navigation-hamburger",{"navId":[1,"nav-id"],"isTabbing":[32],"open":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[4,"wmNavigationStateChanged","handleNavigationStateChanged"]]],[17,"wm-navigation-item",{"href":[1],"text":[1],"active":[4]}]]],["p-db9657eb.system",[[17,"wm-progress-indicator",{"label":[1],"subinfo":[1],"completionMessage":[1,"completion-message"],"showLegend":[4,"show-legend"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"isTabbing":[32],"mode":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmProgressSliceUpdated","handleSliceUpdate"]],{"mode":["handleModeUpdate"]}],[17,"wm-progress-monitor",{"breakpoint":[8],"groupLegend":[1,"group-legend"],"barLabelsWidth":[1,"bar-labels-width"]}],[1,"wm-progress-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-5a9e3108.system",[[17,"wm-chart",{"chartType":[1,"chart-type"],"label":[1],"labelWidth":[1,"label-width"],"subinfo":[1],"valueFormat":[1,"value-format"],"showGrid":[4,"show-grid"],"showLegend":[4,"show-legend"],"showBarLegend":[4,"show-bar-legend"],"notStartedColor":[4,"not-started-color"],"printMode":[4,"print-mode"],"printModeFormat":[1,"print-mode-format"],"labelPosition":[1,"label-position"],"isTabbing":[32],"userIsNavigating":[32],"focusedSliceId":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"keydown","handleKeydown"],[0,"wmChartSliceUpdated","handleSliceUpdate"]]]]],["p-e081fdc2.system",[[17,"wm-date-range",{"dateFormat":[1,"date-format"],"disabled":[4],"errorMessage":[513,"error-message"],"invalidStart":[4,"invalid-start"],"invalidEnd":[4,"invalid-end"],"labelStart":[1,"label-start"],"labelEnd":[1,"label-end"],"preselected":[1],"requiredField":[4,"required-field"],"valueStart":[1025,"value-start"],"valueEnd":[1025,"value-end"],"availSpace":[32],"isExpanded":[32],"reformatDate":[64],"isValidISO":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"popupBlurred","handlePopupBlurred"],[0,"cellTriggered","handleCellTriggered"],[0,"outOfCal","handleOutOfCal"],[0,"cellHovered","handleCellHovered"],[9,"resize","setAvailSpace"]],{"disabled":["handleDisabled"],"valueStart":["updateValueStart"],"valueEnd":["updateValueEnd"],"errorMessage":["handleErrorMessage"]}]]],["p-cad0c5f9.system",[[17,"wm-datepicker",{"value":[1025],"disabled":[4],"dateFormat":[1,"date-format"],"errorMessage":[513,"error-message"],"labelPosition":[1,"label-position"],"label":[1],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"reformatDate":[64],"isValidIso":[64]},[[0,"keydown","handleKey"],[4,"click","blurHandler"],[8,"blur","handleBlurOnWindow"],[0,"cellTriggered","handleCellTriggered"]],{"disabled":["handleDisabledChange"],"value":["updateValue"],"errorMessage":["announceError"]}]]],["p-725230dd.system",[[1,"wm-line-chart",{"label":[1],"description":[1],"xAxisLabel":[1,"x-axis-label"],"yAxisLabel":[1,"y-axis-label"],"lineData":[513,"line-data"],"units":[1],"labelWidth":[1,"label-width"],"highlightQualifier":[1,"highlight-qualifier"],"highlightStart":[1,"highlight-start"],"highlightEnd":[1,"highlight-end"],"visibilityToggles":[4,"visibility-toggles"],"showDeltas":[4,"show-deltas"],"yRange":[1,"y-range"],"parsedLineData":[32],"popoverIndex":[32],"focusedLine":[32],"hiddenLines":[32],"isTabbing":[32],"intervalSkip":[32],"announcement":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"lineData":["parseData"],"intervalSkip":["handleIntervalSkip"]}]]],["p-294b38ca.system",[[0,"wm-modal-footer",{"secondaryText":[1,"secondary-text"],"primaryText":[1,"primary-text"],"infoText":[1,"info-text"],"primaryActionDisabled":[4,"primary-action-disabled"],"deleteStyle":[4,"delete-style"]}]]],["p-50388b6f.system",[[0,"wm-modal-header",{"heading":[1],"subheading":[1]}]]],["p-f40e1468.system",[[17,"wm-search",{"searchType":[1025,"search-type"],"disabled":[516],"placeholder":[1],"label":[1],"numResults":[1026,"num-results"],"value":[1537],"highlightedId":[1,"highlighted-id"],"highlightedName":[1,"highlighted-name"],"isTabbing":[32],"highlightedNum":[32],"previousBlurredValue":[32],"parentModal":[32],"announcement":[32],"updateValue":[64]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"]],{"numResults":["handleNumResultsUpdate"],"disabled":["handleDisabledChange"]}]]],["p-32bf3f5b.system",[[0,"wm-chart-slice",{"legend":[1],"amount":[1],"popoverTitle":[1,"popover-title"],"popoverText":[1,"popover-text"],"popoverButtonText":[1,"popover-button-text"]}]]],["p-c9543950.system",[[17,"wm-file-list",{"showInfo":[1,"show-info"]}]]],["p-30b905eb.system",[[17,"wm-input",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"inputWidth":[1,"input-width"],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"symbolBefore":[1,"symbol-before"],"symbolAfter":[1,"symbol-after"],"textAfter":[1,"text-after"],"type":[1],"step":[2],"min":[2],"max":[2],"isSubmit":[4,"is-submit"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-84603f1f.system",[[4,"wm-modal",{"open":[1540],"elementToFocus":[1025,"element-to-focus"],"modalType":[513,"modal-type"],"uid":[1537],"returnFocusEl":[32],"emitCloseEvent":[64],"emitPrimaryEvent":[64],"emitSecondaryEvent":[64]},null,{"open":["toggleModal"]}]]],["p-c21221b4.system",[[17,"wm-nested-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"constrainedMaxHeight":[1,"constrained-max-height"],"isExpanded":[32],"showClearSelectionButton":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmEscKeyPressed","closePopupOnEscape"],[6,"click","handleClick"],[0,"optgroupExpanded","handleOptgroupExpanded"],[0,"optgroupHidden","handleOptgroupHidden"]]]]],["p-1389302e.system",[[17,"wm-pagination",{"currentPage":[2,"current-page"],"totalItems":[2,"total-items"],"itemsPerPage":[2,"items-per-page"],"value":[2],"isLargeSize":[4,"is-large-size"],"srAnnouncement":[32]},null,{"totalItems":["calculateTotalPages"],"itemsPerPage":["calculateTotalPages"]}]]],["p-c853e185.system",[[1,"wm-snackbar",{"notifications":[1537],"isTabbing":[32],"announcement":[32]},[[4,"keydown","checkForTabbing"],[5,"mouseover","handleMouse"]],{"notifications":["updateSnacks"]}]]],["p-3deaf4d9.system",[[17,"wm-tag-input",{"label":[1],"errorMessage":[1,"error-message"],"info":[1],"labelPosition":[1,"label-position"],"maxTags":[2,"max-tags"],"placeholder":[1025],"requiredField":[4,"required-field"],"tagInputType":[1,"tag-input-type"],"helpText":[1,"help-text"],"addNew":[4,"add-new"],"characterLimit":[2,"character-limit"],"colHeaders":[1,"col-headers"],"colWidths":[1,"col-widths"],"colWrap":[1,"col-wrap"],"isKeying":[32],"isExpanded":[32],"liveRegionMessage":[32],"focusedOption":[32],"focusedColumn":[32],"focusedTagIndex":[32],"tagsList":[32]},[[8,"wmUserIsKeying","toggleKeyingOn"],[8,"wmUserIsTabbing","toggleKeyingOn"],[8,"wmUserIsNotKeying","toggleKeyingOff"],[8,"wmUserIsNotTabbing","toggleKeyingOff"],[0,"privTagOptionSelected","handleTagOptionSelected"],[0,"privTagOptionDeselected","handleTagOptionDeselected"],[4,"click","handleClick"],[11,"scroll","dismissTooltip"],[0,"blur","handleBlur"]],{"errorMessage":["announceError"]}]]],["p-fa4f1030.system",[[0,"wm-tag-option",{"selected":[1540],"locked":[4],"col1":[1],"col2":[1],"col3":[1],"col4":[1],"emitSelectedEvent":[64],"emitDeselectedEvent":[64]},null,{"selected":["handleSelected"]}]]],["p-505eca1c.system",[[1,"wm-textarea",{"label":[1],"labelPosition":[1,"label-position"],"value":[1025],"disabled":[4],"info":[1],"placeholder":[1],"requiredField":[4,"required-field"],"errorMessage":[1,"error-message"],"characterLimit":[2,"character-limit"],"inputWidth":[1,"input-width"],"inputHeight":[1,"input-height"],"announcement":[32]},null,{"disabled":["handleDisabledChange"],"errorMessage":["announceError"]}]]],["p-0b1c6965.system",[[17,"wm-timepicker",{"disabled":[4],"value":[1025],"errorMessage":[1,"error-message"],"label":[1],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"preselected":[1],"isExpanded":[32],"isValidTime":[64],"reformatTime":[64]},[[0,"keydown","handleKey"]],{"disabled":["handleDisabledChange"],"value":["handleValueChange"],"errorMessage":["announceError"]}]]],["p-a3c01e10.system",[[17,"wm-toggletip",{"label":[1],"tooltip":[1025],"tooltipPosition":[1537,"tooltip-position"],"targetSize":[1,"target-size"],"isOpen":[32]},[[0,"keydown","handleKeydown"],[4,"click","handleClick"]]]]],["p-3e415c49.system",[[17,"wm-uploader",{"label":[1],"buttonText":[1,"button-text"],"icon":[1],"fileTypes":[1,"file-types"],"maxSize":[1,"max-size"],"maxFiles":[2,"max-files"],"errorMessage":[1,"error-message"],"requiredField":[4,"required-field"],"showInfo":[1,"show-info"],"isTabbing":[32],"notif":[32],"isCondensed":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[0,"wmFileErrorCleared","handleFileErrorCleared"],[0,"wmFileDelete","storeDeletedId"]],{"errorMessage":["announceError"]}]]],["p-65d26233.system",[[0,"wm-wrapper"]]],["p-311923b2.system",[[17,"priv-navigator-button",{"expanded":[1028],"altText":[1,"alt-text"]}]]],["p-021ff5fa.system",[[1,"priv-navigator-item",{"selected":[1028],"focused":[1028],"link":[1025]},[[0,"keydown","handleKeyDown"]]]]],["p-ca971eac.system",[[0,"priv-calendar",{"disabled":[4],"view":[1025],"focusDate":[1025,"focus-date"],"startDate":[1,"start-date"],"endDate":[1,"end-date"],"hoverDate":[1,"hover-date"],"focusFirstFocusable":[64],"focusLastFocusable":[64],"focusCell":[64]},[[0,"keydown","handleKey"]],{"focusDate":["handleFocusDate"]}]]],["p-a0ecb6d7.system",[[0,"priv-chart-popover",{"open":[1028],"sliceDetails":[16]},[[4,"click","handleClickOnDocument"],[0,"click","handleClick"]],{"open":["handleOpenChange"],"sliceDetails":["handleDetailsChange"]}]]],["p-cab9cadd.system",[[17,"wm-select",{"disabled":[516],"maxHeight":[1,"max-height"],"label":[1025],"labelPosition":[1,"label-position"],"requiredField":[4,"required-field"],"errorMessage":[1025,"error-message"],"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"placeholder":[1],"searchPlaceholder":[1,"search-placeholder"],"allSelectedMessage":[1,"all-selected-message"],"isExpanded":[32],"announcement":[32]},[[0,"wmOptionSelected","handleOptionSelection"],[0,"wmEnterKeyPressed","handleChildEnter"],[0,"wmEscKeyPressed","closePopupOnEscape"],[0,"wmOptionBlurred","handleOptionBlur"],[6,"click","handleClick"],[0,"keydown","handleKey"]],{"errorMessage":["announceError"],"disabled":["handleDisabledChange"]}],[1,"wm-option",{"value":[1],"subinfo":[1025],"disabled":[516],"selected":[516],"focused":[4],"searchTerm":[32]},[[0,"keydown","handleKeydown"],[0,"click","handleSelection"],[0,"blur","handleBlur"]],{"selected":["syncAriaSelected"],"disabled":["syncAriaDisabled","updateDisabledOnClick"]}]]],["p-4d956340.system",[[4,"priv-option-list",{"multiple":[4],"search":[4],"selectAll":[4,"select-all"],"searchPlaceholder":[1,"search-placeholder"],"optgroupLabel":[1,"optgroup-label"],"maxHeight":[1,"max-height"],"upwardsHeightLimit":[2,"upwards-height-limit"],"announcement":[32],"searchTerm":[32],"handleChildChange":[64],"clearSearch":[64],"focusOption":[64],"handleInitialFocus":[64],"unfocusAll":[64],"updateOptionVisibility":[64]},[[0,"wmLetterPressed","findAndFocusOption"],[0,"wmOptionSelected","handleOptionSelection"],[0,"wmKeyUpPressed","handleChildUp"],[0,"wmKeyDownPressed","handleChildDown"],[0,"wmHomeKeyPressed","moveToFirstOption"],[0,"wmEndKeyPressed","moveToLastOption"],[0,"intCloneClicked","handleOptionCloneSelection"]]]]],["p-c2e00d4a.system",[[17,"wm-button",{"disabled":[516],"buttonType":[1025,"button-type"],"icon":[1537],"iconSize":[1,"icon-size"],"iconRotate":[2,"icon-rotate"],"iconFlip":[1,"icon-flip"],"tooltip":[1537],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"tooltipPosition":[1,"tooltip-position"],"permanentlyDelete":[4,"permanently-delete"],"textWrap":[4,"text-wrap"],"customBackground":[1,"custom-background"],"isSubmit":[4,"is-submit"],"isTabbing":[32]},[[8,"wmUserIsTabbing","toggleTabbingOn"],[8,"wmUserIsNotTabbing","toggleTabbingOff"],[11,"scroll","handleScroll"],[0,"keydown","handleKeydown"]],{"buttonType":["validateType"],"icon":["updateIcon"],"disabled":["handleDisabledChange"]}]]],["p-b01f9998.system",[[17,"wm-action-menu",{"tooltipPosition":[1,"tooltip-position"],"actionMenuType":[1,"action-menu-type"],"buttonText":[1,"button-text"],"disabled":[516],"tooltip":[1],"labelForIdenticalButtons":[1,"label-for-identical-buttons"],"darkMode":[4,"dark-mode"],"isExpanded":[32]},[[0,"wmMenuitemClicked","handleClickedItem"],[0,"wmKeyUpPressed","handleKeyUp"],[0,"wmKeyDownPressed","handleKeyDown"],[0,"wmHomeKeyPressed","handleHomeKey"],[0,"wmEndKeyPressed","handleEndKey"],[0,"wmTabKeyPressed","handleTabKey"],[0,"wmEscKeyPressed","handleEscKey"],[0,"keydown","handleKey"],[0,"wmMenuitemBlurred","handleMenuitemBlur"],[0,"wmLetterPressed","findAndFocusItem"]]],[1,"wm-menuitem",{"disabled":[4],"icon":[1025],"description":[1]},[[0,"keydown","handleKeydown"],[0,"click","handleClick"],[0,"blur","handleBlur"]],{"disabled":["setOnClick"]}]]]]'),e)}))}}}));
@@ -1 +1 @@
1
- import{r as t,c as e,f as s,h as i,g as o}from"./p-568c595f.js";import{i as r,d as n,z as h}from"./p-16f65bf4.js";const l=class{constructor(s){t(this,s),this.optionListSearchChanged=e(this,"optionListSearchChanged",7),this.optionListCloseRequested=e(this,"optionListCloseRequested",7),this.optionListAllSelected=e(this,"optionListAllSelected",7),this.optionListAllDeselected=e(this,"optionListAllDeselected",7),this.wmEscKeyPressed=e(this,"wmEscKeyPressed",7),this.wmKeyLeftPressed=e(this,"wmKeyLeftPressed",7),this.searchIndex=0,this.keysSoFar="",this.selectAllMessage=r.formatMessage({id:"select.selectAll",defaultMessage:"Select All"}),this.deselectAllMessage=r.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"}),this.allOptionsSelectedMessage=r.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"}),this.allOptionsDeselectedMessage=r.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"}),this.debouncedSearch=n((()=>{this.searchTerm=this.searchFieldEl.value,this.optionListSearchChanged.emit({searchTerm:this.searchTerm}),this.announce(this.filteredOptions.length?this.resultsFoundMessage:this.noResultsFoundMessage)}),150),this.debouncedClearKeysSoFar=n((()=>{this.keysSoFar=""}),500),this.multiple=!1,this.search=!1,this.selectAll=!1,this.searchPlaceholder=void 0,this.optgroupLabel=void 0,this.announcement="",this.searchTerm=""}get childOptions(){return Array.from(this.el.getRootNode().host.querySelectorAll("wm-option"))}get cloneOptions(){return Array.from(this.el.querySelectorAll("wm-option"))}get allOptionEls(){return this.cloneOptions.concat(this.childOptions)}get isInNestedSelect(){return!!this.optgroupLabel}get visibleOptionEls(){return this.allOptionEls.filter((t=>!t.classList.contains("hidden")&&!t.classList.contains("filtered-out")))}get filteredOptions(){return this.childOptions.filter((t=>{var e;return null===(e=t.textContent)||void 0===e?void 0:e.toLowerCase().includes(this.searchTerm.toLowerCase())}))}get selectedOptions(){return Array.from(this.el.querySelectorAll("wm-option")).filter((t=>t.selected))}get visibleSelectAllButton(){return this.selectAll&&this.multiple&&""===this.searchTerm}get allSelected(){return this.childOptions.every((t=>t.selected))}get resultsFoundMessage(){return r.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})}get noResultsFoundMessage(){return r.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})}findAndFocusOption(t){const e=t.detail.letter.toLowerCase(),s=t.detail.optionEl;if(this.keysSoFar||" "!=e){this.keysSoFar||this.visibleOptionEls.forEach(((t,e)=>{t.focused&&(this.searchIndex=e)})),this.keysSoFar+=e;let t=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);t||(t=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)),t&&this.focusOption(t),this.debouncedClearKeysSoFar()}else s.click()}handleOptionSelection(t){this.focusOption(t.detail)}handleChildUp(t){this.moveUp(t.detail)}handleChildDown(t){this.moveDown(t.detail)}moveToFirstOption(){this.focusOption(this.visibleOptionEls[0])}moveToLastOption(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])}handleOptionCloneSelection(t){this.findCorrespondingOption(t.detail).click()}componentDidLoad(){this.multiple&&this.updateOptionVisibility()}async handleChildChange(){s(this.el)}async clearSearch(){this.search&&(this.searchFieldEl.value="",this.searchTerm="",this.optionListSearchChanged.emit({searchTerm:this.searchTerm}))}async focusOption(t){this.allOptionEls.forEach((e=>e.focused=e===t)),t.scrollIntoView({block:"nearest"}),window.setTimeout((()=>t.scrollIntoView({block:"nearest"})),60),t.focus()}async handleInitialFocus(t){switch(t){case"next":this.search?(this.searchFieldEl.focus(),this.listboxEl.scrollTop=0):this.moveDown(this.visibleOptionEls.filter((t=>t.selected)).slice(-1)[0]);break;case"previous":this.search?this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1]):this.moveUp(this.visibleOptionEls.filter((t=>t.selected))[0]);break;default:this.search?(this.searchFieldEl.focus(),this.listboxEl.scrollTop=0):this.focusOption(this.selectedOptions.length>0?this.visibleOptionEls.filter((t=>t.selected))[0]:this.visibleOptionEls[0])}}async unfocusAll(){this.allOptionEls.map((t=>t.focused=!1))}findMatchInRange(t,e,s){let i=null;return t.slice(e,s).forEach((t=>{const e=t.textContent;!i&&e&&e.toLowerCase().startsWith(this.keysSoFar)&&(i=t)})),i}findCorrespondingOption(t){return t.classList.contains("clone")?this.childOptions[this.cloneOptions.indexOf(t)]:this.cloneOptions[this.childOptions.indexOf(t)]}handleSearchFieldBlur(t){this.searchFieldWrapperEl.classList.remove("focus"),h(this.el,t.relatedTarget)&&t.stopPropagation()}handleKeyDown(t){const e=t.target;switch(t.key){case"ArrowDown":t.preventDefault(),this.moveDown(t.target);break;case"ArrowUp":t.preventDefault(),this.moveUp(t.target);break;case"ArrowLeft":this.isInNestedSelect&&e!=this.searchFieldEl&&(t.preventDefault(),this.wmKeyLeftPressed.emit());break;case"Escape":t.preventDefault(),this.wmEscKeyPressed.emit();break;case"Enter":e===this.selectAllEl&&(t.preventDefault(),this.handleSelectAllClick(),this.close());break;case" ":e===this.selectAllEl&&(t.preventDefault(),this.handleSelectAllClick())}}close(){this.multiple&&this.updateOptionVisibility(),this.optionListCloseRequested.emit()}handleSelectAllClick(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()}selectAllOptions(){this.announce(this.allOptionsSelectedMessage),this.optionListAllSelected.emit()}deselectAllOptions(){this.announce(this.allOptionsDeselectedMessage),this.optionListAllDeselected.emit()}moveUp(t){const e=this.visibleOptionEls;this.selectAllEl&&e.unshift(this.selectAllEl),this.searchFieldEl&&e.unshift(this.searchFieldEl),this.isInNestedSelect&&e.unshift(this.returnBtnEl);const s=e[e.indexOf(t)-1]||e[e.length-1];s&&this.focusOption(s)}moveDown(t){const e=this.visibleOptionEls;this.selectAllEl&&e.unshift(this.selectAllEl),this.searchFieldEl&&e.unshift(this.searchFieldEl),this.isInNestedSelect&&e.unshift(this.returnBtnEl);const s=e[e.indexOf(t)+1]||e[0];s&&this.focusOption(s)}async updateOptionVisibility(){this.childOptions.forEach(((t,e)=>{const s=this.cloneOptions[e];t.selected?(t.classList.add("hidden"),s.classList.remove("hidden")):(t.classList.remove("hidden"),s.classList.add("hidden"))}));const t=this.visibleOptionEls.filter((t=>t.classList.contains("clone"))),e=t.length===this.visibleOptionEls.length;t.forEach(((s,i)=>{e||i!==t.length-1?s.classList.remove("last"):s.classList.add("last")}))}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}renderReturnBtn(){return i("button",{ref:t=>this.returnBtnEl=t,id:"return-btn",class:"return-btn",onKeyDown:t=>this.handleKeyDown(t),onClick:()=>{this.el.getRootNode().host.isExpanded=!1}},this.optgroupLabel)}renderSearchField(){return i("div",{class:"search"},i("div",{class:"searchfield-wrapper",ref:t=>this.searchFieldWrapperEl=t},i("div",{class:"icon"}),i("input",{ref:t=>this.searchFieldEl=t,class:"searchfield",role:"combobox","aria-controls":"list",onKeyDown:t=>this.handleKeyDown(t),onFocus:()=>this.searchFieldWrapperEl.classList.add("focus"),onBlur:t=>this.handleSearchFieldBlur(t),onInput:()=>this.debouncedSearch(),placeholder:this.searchPlaceholder})))}renderSearchFailedMessage(){return i("div",{class:"search-results-message"},this.noResultsFoundMessage)}renderSelectAllButton(){return i("button",{ref:t=>this.selectAllEl=t,class:"select-all",onClick:()=>this.handleSelectAllClick(),onKeyDown:t=>this.handleKeyDown(t),tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)}renderCloneOptions(){return Array.from(this.childOptions).map((t=>i("wm-option",{class:"clone",subinfo:t.subinfo,selected:t.selected},t.textContent)))}render(){return i("div",{class:"list-wrapper"},this.isInNestedSelect&&this.renderReturnBtn(),this.search&&this.renderSearchField(),this.visibleSelectAllButton&&this.renderSelectAllButton(),i("div",{id:"list",class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label",ref:t=>this.listboxEl=t},this.searchTerm&&0===this.filteredOptions.length&&this.renderSearchFailedMessage(),this.multiple&&this.renderCloneOptions(),i("slot",null)),i("div",{id:"optionlist-announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:t=>this.liveRegionEl=t},this.announcement))}get el(){return o(this)}};l.style='.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.return-btn,.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);background:var(--wmcolor-select-option-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.return-btn:hover,.select-all:hover{outline:none;background:var(--wmcolor-select-option-background-hover)}.return-btn:focus,.select-all:focus{outline:none;background:var(--wmcolor-select-option-background-focus)}.return-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-weight:600;font-size:0.875rem;border-bottom:1px solid #4a4a4a}.return-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:"\\f141";pointer-events:none;font-size:1.28rem}';export{l as priv_option_list}
1
+ import{r as t,c as e,f as s,h as i,g as o}from"./p-568c595f.js";import{i as r,d as n,z as h}from"./p-16f65bf4.js";const l=class{constructor(s){t(this,s),this.optionListSearchChanged=e(this,"optionListSearchChanged",7),this.optionListCloseRequested=e(this,"optionListCloseRequested",7),this.optionListAllSelected=e(this,"optionListAllSelected",7),this.optionListAllDeselected=e(this,"optionListAllDeselected",7),this.wmEscKeyPressed=e(this,"wmEscKeyPressed",7),this.wmKeyLeftPressed=e(this,"wmKeyLeftPressed",7),this.searchIndex=0,this.keysSoFar="",this.selectAllMessage=r.formatMessage({id:"select.selectAll",defaultMessage:"Select All"}),this.deselectAllMessage=r.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"}),this.allOptionsSelectedMessage=r.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"}),this.allOptionsDeselectedMessage=r.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"}),this.debouncedSearch=n((()=>{this.searchTerm=this.searchFieldEl.value,this.optionListSearchChanged.emit({searchTerm:this.searchTerm}),this.announce(this.filteredOptions.length?this.resultsFoundMessage:this.noResultsFoundMessage)}),150),this.debouncedClearKeysSoFar=n((()=>{this.keysSoFar=""}),500),this.multiple=!1,this.search=!1,this.selectAll=!1,this.searchPlaceholder=void 0,this.optgroupLabel=void 0,this.maxHeight=void 0,this.upwardsHeightLimit=null,this.announcement="",this.searchTerm=""}get childOptions(){return Array.from(this.el.getRootNode().host.querySelectorAll("wm-option"))}get cloneOptions(){return Array.from(this.el.querySelectorAll("wm-option"))}get allOptionEls(){return this.cloneOptions.concat(this.childOptions)}get isInNestedSelect(){return!!this.optgroupLabel}get visibleOptionEls(){return this.allOptionEls.filter((t=>!t.classList.contains("hidden")&&!t.classList.contains("filtered-out")))}get filteredOptions(){return this.childOptions.filter((t=>{var e;return null===(e=t.textContent)||void 0===e?void 0:e.toLowerCase().includes(this.searchTerm.toLowerCase())}))}get selectedOptions(){return Array.from(this.el.querySelectorAll("wm-option")).filter((t=>t.selected))}get visibleSelectAllButton(){return this.selectAll&&this.multiple&&""===this.searchTerm}get allSelected(){return this.childOptions.every((t=>t.selected))}get resultsFoundMessage(){return r.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})}get noResultsFoundMessage(){return r.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})}get effectiveMaxHeight(){let t=this.maxHeight;return this.upwardsHeightLimit&&this.el.parentElement.clientHeight>this.upwardsHeightLimit&&(t=this.upwardsHeightLimit-(this.isInNestedSelect?this.returnBtnEl.clientHeight:0)-(this.selectAll?this.selectAllEl.clientHeight:0)-(this.search?this.searchFieldWrapperEl.clientHeight:0)+"px"),t}findAndFocusOption(t){const e=t.detail.letter.toLowerCase(),s=t.detail.optionEl;if(this.keysSoFar||" "!=e){this.keysSoFar||this.visibleOptionEls.forEach(((t,e)=>{t.focused&&(this.searchIndex=e)})),this.keysSoFar+=e;let t=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);t||(t=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)),t&&this.focusOption(t),this.debouncedClearKeysSoFar()}else s.click()}handleOptionSelection(t){this.focusOption(t.detail)}handleChildUp(t){this.moveUp(t.detail)}handleChildDown(t){this.moveDown(t.detail)}moveToFirstOption(){this.focusOption(this.visibleOptionEls[0])}moveToLastOption(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])}handleOptionCloneSelection(t){this.findCorrespondingOption(t.detail).click()}componentDidLoad(){this.multiple&&this.updateOptionVisibility()}async handleChildChange(){s(this.el)}async clearSearch(){this.search&&(this.searchFieldEl.value="",this.searchTerm="",this.optionListSearchChanged.emit({searchTerm:this.searchTerm}))}async focusOption(t){this.allOptionEls.forEach((e=>e.focused=e===t)),t.scrollIntoView({block:"nearest"}),window.setTimeout((()=>t.scrollIntoView({block:"nearest"})),60),t.focus()}async handleInitialFocus(t){switch(t){case"next":this.search?(this.searchFieldEl.focus(),this.listboxEl.scrollTop=0):this.moveDown(this.visibleOptionEls.filter((t=>t.selected)).slice(-1)[0]);break;case"previous":this.search?this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1]):this.moveUp(this.visibleOptionEls.filter((t=>t.selected))[0]);break;default:this.search?(this.searchFieldEl.focus(),this.listboxEl.scrollTop=0):this.focusOption(this.selectedOptions.length>0?this.visibleOptionEls.filter((t=>t.selected))[0]:this.visibleOptionEls[0])}}async unfocusAll(){this.allOptionEls.map((t=>t.focused=!1))}findMatchInRange(t,e,s){let i=null;return t.slice(e,s).forEach((t=>{const e=t.textContent;!i&&e&&e.toLowerCase().startsWith(this.keysSoFar)&&(i=t)})),i}findCorrespondingOption(t){return t.classList.contains("clone")?this.childOptions[this.cloneOptions.indexOf(t)]:this.cloneOptions[this.childOptions.indexOf(t)]}handleSearchFieldBlur(t){this.searchFieldWrapperEl.classList.remove("focus"),h(this.el,t.relatedTarget)&&t.stopPropagation()}handleKeyDown(t){const e=t.target;switch(t.key){case"ArrowDown":t.preventDefault(),this.moveDown(t.target);break;case"ArrowUp":t.preventDefault(),this.moveUp(t.target);break;case"ArrowLeft":this.isInNestedSelect&&e!=this.searchFieldEl&&(t.preventDefault(),this.wmKeyLeftPressed.emit());break;case"Escape":t.preventDefault(),this.wmEscKeyPressed.emit();break;case"Enter":e===this.selectAllEl&&(t.preventDefault(),this.handleSelectAllClick(),this.close());break;case" ":e===this.selectAllEl&&(t.preventDefault(),this.handleSelectAllClick())}}close(){this.multiple&&this.updateOptionVisibility(),this.optionListCloseRequested.emit()}handleSelectAllClick(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()}selectAllOptions(){this.announce(this.allOptionsSelectedMessage),this.optionListAllSelected.emit()}deselectAllOptions(){this.announce(this.allOptionsDeselectedMessage),this.optionListAllDeselected.emit()}moveUp(t){const e=this.visibleOptionEls;this.selectAllEl&&e.unshift(this.selectAllEl),this.searchFieldEl&&e.unshift(this.searchFieldEl),this.isInNestedSelect&&e.unshift(this.returnBtnEl);const s=e[e.indexOf(t)-1]||e[e.length-1];s&&this.focusOption(s)}moveDown(t){const e=this.visibleOptionEls;this.selectAllEl&&e.unshift(this.selectAllEl),this.searchFieldEl&&e.unshift(this.searchFieldEl),this.isInNestedSelect&&e.unshift(this.returnBtnEl);const s=e[e.indexOf(t)+1]||e[0];s&&this.focusOption(s)}async updateOptionVisibility(){this.childOptions.forEach(((t,e)=>{const s=this.cloneOptions[e];t.selected?(t.classList.add("hidden"),s.classList.remove("hidden")):(t.classList.remove("hidden"),s.classList.add("hidden"))}));const t=this.visibleOptionEls.filter((t=>t.classList.contains("clone"))),e=t.length===this.visibleOptionEls.length;t.forEach(((s,i)=>{e||i!==t.length-1?s.classList.remove("last"):s.classList.add("last")}))}announce(t){this.liveRegionEl.textContent===t&&(t+=" "),this.announcement=t}renderReturnBtn(){return i("button",{ref:t=>this.returnBtnEl=t,id:"return-btn",class:"return-btn",onKeyDown:t=>this.handleKeyDown(t),onClick:()=>{this.el.getRootNode().host.isExpanded=!1}},this.optgroupLabel)}renderSearchField(){return i("div",{class:"search"},i("div",{class:"searchfield-wrapper",ref:t=>this.searchFieldWrapperEl=t},i("div",{class:"icon"}),i("input",{ref:t=>this.searchFieldEl=t,class:"searchfield",role:"combobox","aria-controls":"list",onKeyDown:t=>this.handleKeyDown(t),onFocus:()=>this.searchFieldWrapperEl.classList.add("focus"),onBlur:t=>this.handleSearchFieldBlur(t),onInput:()=>this.debouncedSearch(),placeholder:this.searchPlaceholder})))}renderSearchFailedMessage(){return i("div",{class:"search-results-message"},this.noResultsFoundMessage)}renderSelectAllButton(){return i("button",{ref:t=>this.selectAllEl=t,class:"select-all",onClick:()=>this.handleSelectAllClick(),onKeyDown:t=>this.handleKeyDown(t),tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)}renderCloneOptions(){return Array.from(this.childOptions).map((t=>i("wm-option",{class:"clone",subinfo:t.subinfo,selected:t.selected},t.textContent)))}render(){return i("div",{class:"list-wrapper"},this.isInNestedSelect&&this.renderReturnBtn(),this.search&&this.renderSearchField(),this.visibleSelectAllButton&&this.renderSelectAllButton(),i("div",{id:"list",class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label",ref:t=>this.listboxEl=t,style:{"--max-height":this.effectiveMaxHeight}},this.searchTerm&&0===this.filteredOptions.length&&this.renderSearchFailedMessage(),this.multiple&&this.renderCloneOptions(),i("slot",null)),i("div",{id:"optionlist-announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:t=>this.liveRegionEl=t},this.announcement))}get el(){return o(this)}};l.style='.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.return-btn,.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);background:var(--wmcolor-select-option-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.return-btn:hover,.select-all:hover{outline:none;background:var(--wmcolor-select-option-background-hover)}.return-btn:focus,.select-all:focus{outline:none;background:var(--wmcolor-select-option-background-focus)}.options-wrapper{overflow-y:auto;max-height:var(--max-height)}.return-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-weight:600;font-size:0.875rem;border-bottom:1px solid #4a4a4a}.return-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:"\\f141";pointer-events:none;font-size:1.28rem}';export{l as priv_option_list}
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function o(t){try{a(n.next(t))}catch(t){s(t)}}function u(t){try{a(n["throw"](t))}catch(t){s(t)}}function a(t){t.done?i(t.value):r(t.value).then(o,u)}a((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(t){return function(e){return a([t,e])}}function a(u){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(i=0)),i)try{if(n=1,r&&(s=u[0]&2?r["return"]:u[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,u[1])).done)return s;if(r=0,s)u=[u[0]&2,s.value];switch(u[0]){case 0:case 1:s=u;break;case 4:i.label++;return{value:u[1],done:false};case 5:i.label++;r=u[1];u=[0];continue;case 7:u=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){i=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){i.label=u[1];break}if(u[0]===6&&i.label<s[1]){i.label=s[1];s=u;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(u);break}if(s[2])i.ops.pop();i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t];r=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-ae82b3d2.system.js"],(function(t){"use strict";var e,i,n,r,s,o,u,a;return{setters:[function(t){e=t.r;i=t.c;n=t.f;r=t.h;s=t.g},function(t){o=t.i;u=t.d;a=t.z}],execute:function(){var c='.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.return-btn,.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);background:var(--wmcolor-select-option-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.return-btn:hover,.select-all:hover{outline:none;background:var(--wmcolor-select-option-background-hover)}.return-btn:focus,.select-all:focus{outline:none;background:var(--wmcolor-select-option-background-focus)}.options-wrapper{overflow-y:auto;max-height:var(--max-height)}.return-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-weight:600;font-size:0.875rem;border-bottom:1px solid #4a4a4a}.return-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:"\\f141";pointer-events:none;font-size:1.28rem}';var l=t("priv_option_list",function(){function t(t){var n=this;e(this,t);this.optionListSearchChanged=i(this,"optionListSearchChanged",7);this.optionListCloseRequested=i(this,"optionListCloseRequested",7);this.optionListAllSelected=i(this,"optionListAllSelected",7);this.optionListAllDeselected=i(this,"optionListAllDeselected",7);this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7);this.wmKeyLeftPressed=i(this,"wmKeyLeftPressed",7);this.searchIndex=0;this.keysSoFar="";this.selectAllMessage=o.formatMessage({id:"select.selectAll",defaultMessage:"Select All"});this.deselectAllMessage=o.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"});this.allOptionsSelectedMessage=o.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"});this.allOptionsDeselectedMessage=o.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"});this.debouncedSearch=u((function(){n.searchTerm=n.searchFieldEl.value;n.optionListSearchChanged.emit({searchTerm:n.searchTerm});if(n.filteredOptions.length){n.announce(n.resultsFoundMessage)}else{n.announce(n.noResultsFoundMessage)}}),150);this.debouncedClearKeysSoFar=u((function(){n.keysSoFar=""}),500);this.multiple=false;this.search=false;this.selectAll=false;this.searchPlaceholder=undefined;this.optgroupLabel=undefined;this.maxHeight=undefined;this.upwardsHeightLimit=null;this.announcement="";this.searchTerm=""}Object.defineProperty(t.prototype,"childOptions",{get:function(){return Array.from(this.el.getRootNode().host.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"cloneOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allOptionEls",{get:function(){return this.cloneOptions.concat(this.childOptions)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isInNestedSelect",{get:function(){return!!this.optgroupLabel},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"visibleOptionEls",{get:function(){return this.allOptionEls.filter((function(t){return!t.classList.contains("hidden")&&!t.classList.contains("filtered-out")}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"filteredOptions",{get:function(){var t=this;return this.childOptions.filter((function(e){var i;return(i=e.textContent)===null||i===void 0?void 0:i.toLowerCase().includes(t.searchTerm.toLowerCase())}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"selectedOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(t){return t.selected}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"visibleSelectAllButton",{get:function(){return this.selectAll&&this.multiple&&this.searchTerm===""},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allSelected",{get:function(){return this.childOptions.every((function(t){return t.selected}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"resultsFoundMessage",{get:function(){return o.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"noResultsFoundMessage",{get:function(){return o.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"effectiveMaxHeight",{get:function(){var t=this.maxHeight;if(this.upwardsHeightLimit&&this.el.parentElement.clientHeight>this.upwardsHeightLimit){t="".concat(this.upwardsHeightLimit-(this.isInNestedSelect?this.returnBtnEl.clientHeight:0)-(this.selectAll?this.selectAllEl.clientHeight:0)-(this.search?this.searchFieldWrapperEl.clientHeight:0),"px")}return t},enumerable:false,configurable:true});t.prototype.findAndFocusOption=function(t){var e=this;var i=t.detail.letter.toLowerCase();var n=t.detail.optionEl;if(!this.keysSoFar&&i==" "){n.click()}else{if(!this.keysSoFar){this.visibleOptionEls.forEach((function(t,i){if(t.focused){e.searchIndex=i}}))}this.keysSoFar+=i;var r=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);if(!r){r=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)}if(r){this.focusOption(r)}this.debouncedClearKeysSoFar()}};t.prototype.handleOptionSelection=function(t){this.focusOption(t.detail)};t.prototype.handleChildUp=function(t){this.moveUp(t.detail)};t.prototype.handleChildDown=function(t){this.moveDown(t.detail)};t.prototype.moveToFirstOption=function(){this.focusOption(this.visibleOptionEls[0])};t.prototype.moveToLastOption=function(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])};t.prototype.handleOptionCloneSelection=function(t){var e=this.findCorrespondingOption(t.detail);e.click()};t.prototype.componentDidLoad=function(){if(this.multiple){this.updateOptionVisibility()}};t.prototype.handleChildChange=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){n(this.el);return[2]}))}))};t.prototype.clearSearch=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.search){this.searchFieldEl.value="";this.searchTerm="";this.optionListSearchChanged.emit({searchTerm:this.searchTerm})}return[2]}))}))};t.prototype.focusOption=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.allOptionEls.forEach((function(e){return e.focused=e===t}));t.scrollIntoView({block:"nearest"});window.setTimeout((function(){return t.scrollIntoView({block:"nearest"})}),60);t.focus();return[2]}))}))};t.prototype.handleInitialFocus=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(t){case"next":if(this.search){this.searchFieldEl.focus();this.listboxEl.scrollTop=0}else{this.moveDown(this.visibleOptionEls.filter((function(t){return t.selected})).slice(-1)[0])}break;case"previous":if(this.search){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])}else{this.moveUp(this.visibleOptionEls.filter((function(t){return t.selected}))[0])}break;default:if(this.search){this.searchFieldEl.focus();this.listboxEl.scrollTop=0}else if(this.selectedOptions.length>0){this.focusOption(this.visibleOptionEls.filter((function(t){return t.selected}))[0])}else{this.focusOption(this.visibleOptionEls[0])}break}return[2]}))}))};t.prototype.unfocusAll=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.allOptionEls.map((function(t){return t.focused=false}));return[2]}))}))};t.prototype.findMatchInRange=function(t,e,i){var n=this;var r=null;var s=t.slice(e,i);s.forEach((function(t){var e=t.textContent;if(!r&&e&&e.toLowerCase().startsWith(n.keysSoFar)){r=t}}));return r};t.prototype.findCorrespondingOption=function(t){var e=t.classList.contains("clone");return e?this.childOptions[this.cloneOptions.indexOf(t)]:this.cloneOptions[this.childOptions.indexOf(t)]};t.prototype.handleSearchFieldBlur=function(t){this.searchFieldWrapperEl.classList.remove("focus");if(a(this.el,t.relatedTarget)){t.stopPropagation()}};t.prototype.handleKeyDown=function(t){var e=t.target;switch(t.key){case"ArrowDown":t.preventDefault();this.moveDown(t.target);break;case"ArrowUp":t.preventDefault();this.moveUp(t.target);break;case"ArrowLeft":if(this.isInNestedSelect&&e!=this.searchFieldEl){t.preventDefault();this.wmKeyLeftPressed.emit()}break;case"Escape":t.preventDefault();this.wmEscKeyPressed.emit();break;case"Enter":if(e===this.selectAllEl){t.preventDefault();this.handleSelectAllClick();this.close()}break;case" ":if(e===this.selectAllEl){t.preventDefault();this.handleSelectAllClick()}break}};t.prototype.close=function(){if(this.multiple){this.updateOptionVisibility()}this.optionListCloseRequested.emit()};t.prototype.handleSelectAllClick=function(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()};t.prototype.selectAllOptions=function(){this.announce(this.allOptionsSelectedMessage);this.optionListAllSelected.emit()};t.prototype.deselectAllOptions=function(){this.announce(this.allOptionsDeselectedMessage);this.optionListAllDeselected.emit()};t.prototype.moveUp=function(t){var e=this.visibleOptionEls;if(this.selectAllEl){e.unshift(this.selectAllEl)}if(this.searchFieldEl){e.unshift(this.searchFieldEl)}if(this.isInNestedSelect){e.unshift(this.returnBtnEl)}var i=e[e.indexOf(t)-1]||e[e.length-1];if(i){this.focusOption(i)}};t.prototype.moveDown=function(t){var e=this.visibleOptionEls;if(this.selectAllEl){e.unshift(this.selectAllEl)}if(this.searchFieldEl){e.unshift(this.searchFieldEl)}if(this.isInNestedSelect){e.unshift(this.returnBtnEl)}var i=e[e.indexOf(t)+1]||e[0];if(i){this.focusOption(i)}};t.prototype.updateOptionVisibility=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;var i=this;return __generator(this,(function(n){this.childOptions.forEach((function(t,e){var n=i.cloneOptions[e];if(t.selected){t.classList.add("hidden");n.classList.remove("hidden")}else{t.classList.remove("hidden");n.classList.add("hidden")}}));t=this.visibleOptionEls.filter((function(t){return t.classList.contains("clone")}));e=t.length===this.visibleOptionEls.length;t.forEach((function(i,n){if(!e&&n===t.length-1){i.classList.add("last")}else{i.classList.remove("last")}}));return[2]}))}))};t.prototype.announce=function(t){if(this.liveRegionEl.textContent===t){t+=" "}this.announcement=t};t.prototype.renderReturnBtn=function(){var t=this;return r("button",{ref:function(e){return t.returnBtnEl=e},id:"return-btn",class:"return-btn",onKeyDown:function(e){return t.handleKeyDown(e)},onClick:function(){t.el.getRootNode().host.isExpanded=false}},this.optgroupLabel)};t.prototype.renderSearchField=function(){var t=this;return r("div",{class:"search"},r("div",{class:"searchfield-wrapper",ref:function(e){return t.searchFieldWrapperEl=e}},r("div",{class:"icon"}),r("input",{ref:function(e){return t.searchFieldEl=e},class:"searchfield",role:"combobox","aria-controls":"list",onKeyDown:function(e){return t.handleKeyDown(e)},onFocus:function(){return t.searchFieldWrapperEl.classList.add("focus")},onBlur:function(e){return t.handleSearchFieldBlur(e)},onInput:function(){return t.debouncedSearch()},placeholder:this.searchPlaceholder})))};t.prototype.renderSearchFailedMessage=function(){return r("div",{class:"search-results-message"},this.noResultsFoundMessage)};t.prototype.renderSelectAllButton=function(){var t=this;return r("button",{ref:function(e){return t.selectAllEl=e},class:"select-all",onClick:function(){return t.handleSelectAllClick()},onKeyDown:function(e){return t.handleKeyDown(e)},tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)};t.prototype.renderCloneOptions=function(){return Array.from(this.childOptions).map((function(t){var e=t;return r("wm-option",{class:"clone",subinfo:e.subinfo,selected:e.selected},e.textContent)}))};t.prototype.render=function(){var t=this;return r("div",{class:"list-wrapper"},this.isInNestedSelect&&this.renderReturnBtn(),this.search&&this.renderSearchField(),this.visibleSelectAllButton&&this.renderSelectAllButton(),r("div",{id:"list",class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label",ref:function(e){return t.listboxEl=e},style:{"--max-height":this.effectiveMaxHeight}},this.searchTerm&&this.filteredOptions.length===0&&this.renderSearchFailedMessage(),this.multiple&&this.renderCloneOptions(),r("slot",null)),r("div",{id:"optionlist-announcement","aria-live":"polite","aria-atomic":"true",class:"sr-only",ref:function(e){return t.liveRegionEl=e}},this.announcement))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());l.style=c}}}));