@momentum-ui/web-components 3.2.17 → 3.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2273.js +48 -46
- package/dist/7137.js +1 -1
- package/dist/7262.js +1 -1
- package/dist/8881.js +1 -1
- package/dist/comp/md-accordion-item-entry.js +1 -1
- package/dist/comp/md-accordion-item.js +1 -1
- package/dist/comp/md-button-group-entry.js +1 -1
- package/dist/comp/md-button-group.js +1 -1
- package/dist/comp/md-card-alert-entry.js +6 -6
- package/dist/comp/md-card-entry.js +1 -1
- package/dist/comp/md-card.js +1 -1
- package/dist/comp/md-checkbox-entry.js +1 -1
- package/dist/comp/md-checkbox.js +1 -1
- package/dist/comp/md-coachmark-entry.js +1 -1
- package/dist/comp/md-coachmark.js +1 -1
- package/dist/comp/md-combobox-entry.js +48 -46
- package/dist/comp/md-combobox.js +1 -1
- package/dist/comp/md-country-code-picker-entry.js +1 -1
- package/dist/comp/md-country-code-picker.js +1 -1
- package/dist/comp/md-draggable-item-entry.js +1 -1
- package/dist/comp/md-draggable-item.js +1 -1
- package/dist/comp/md-dropdown-entry.js +1 -1
- package/dist/comp/md-dropdown.js +1 -1
- package/dist/comp/md-favorite-entry.js +1 -1
- package/dist/comp/md-favorite.js +1 -1
- package/dist/comp/md-floating-minimize-entry.js +1 -1
- package/dist/comp/md-floating-minimize.js +1 -1
- package/dist/comp/md-floating-modal-entry.js +80 -53
- package/dist/comp/md-floating-modal.js +1 -1
- package/dist/comp/md-grabber-entry.js +1 -1
- package/dist/comp/md-grabber.js +1 -1
- package/dist/comp/md-list-item-entry.js +1 -1
- package/dist/comp/md-list-item.js +1 -1
- package/dist/comp/md-menu-entry.js +1 -1
- package/dist/comp/md-menu.js +1 -1
- package/dist/comp/md-modal-entry.js +1 -1
- package/dist/comp/md-modal.js +1 -1
- package/dist/comp/md-phone-input-entry.js +1 -1
- package/dist/comp/md-phone-input.js +1 -1
- package/dist/comp/md-radio-entry.js +1 -1
- package/dist/comp/md-radio.js +1 -1
- package/dist/comp/md-slider-entry.js +1 -1
- package/dist/comp/md-slider.js +1 -1
- package/dist/comp/md-tab-entry.js +1 -1
- package/dist/comp/md-tab-panel-entry.js +1 -1
- package/dist/comp/md-tab-panel.js +1 -1
- package/dist/comp/md-tab.js +1 -1
- package/dist/comp/md-tabs-entry.js +1 -1
- package/dist/comp/md-tabs.js +1 -1
- package/dist/comp/md-timepicker-entry.js +1 -1
- package/dist/comp/md-timepicker.js +1 -1
- package/dist/comp/md-toggle-switch-entry.js +1 -1
- package/dist/comp/md-toggle-switch.js +1 -1
- package/dist/esm/2273.js +48 -46
- package/dist/esm/3155.js +1 -1
- package/dist/esm/3648.js +1 -1
- package/dist/esm/4654.js +48 -46
- package/dist/esm/7137.js +1 -1
- package/dist/esm/comp/md-accordion-item-entry.js +1 -1
- package/dist/esm/comp/md-accordion-item.js +1 -1
- package/dist/esm/comp/md-button-group-entry.js +1 -1
- package/dist/esm/comp/md-button-group.js +1 -1
- package/dist/esm/comp/md-card-alert-entry.js +5 -5
- package/dist/esm/comp/md-card-entry.js +1 -1
- package/dist/esm/comp/md-card.js +1 -1
- package/dist/esm/comp/md-checkbox-entry.js +1 -1
- package/dist/esm/comp/md-checkbox.js +1 -1
- package/dist/esm/comp/md-coachmark-entry.js +1 -1
- package/dist/esm/comp/md-coachmark.js +1 -1
- package/dist/esm/comp/md-combobox-entry.js +1 -1
- package/dist/esm/comp/md-combobox.js +1 -1
- package/dist/esm/comp/md-country-code-picker-entry.js +1 -1
- package/dist/esm/comp/md-country-code-picker.js +1 -1
- package/dist/esm/comp/md-draggable-item-entry.js +1 -1
- package/dist/esm/comp/md-draggable-item.js +1 -1
- package/dist/esm/comp/md-dropdown-entry.js +1 -1
- package/dist/esm/comp/md-dropdown.js +1 -1
- package/dist/esm/comp/md-favorite-entry.js +1 -1
- package/dist/esm/comp/md-favorite.js +1 -1
- package/dist/esm/comp/md-floating-minimize-entry.js +1 -1
- package/dist/esm/comp/md-floating-minimize.js +1 -1
- package/dist/esm/comp/md-floating-modal-entry.js +71 -44
- package/dist/esm/comp/md-floating-modal.js +1 -1
- package/dist/esm/comp/md-grabber-entry.js +1 -1
- package/dist/esm/comp/md-grabber.js +1 -1
- package/dist/esm/comp/md-list-item-entry.js +1 -1
- package/dist/esm/comp/md-list-item.js +1 -1
- package/dist/esm/comp/md-menu-entry.js +1 -1
- package/dist/esm/comp/md-menu.js +1 -1
- package/dist/esm/comp/md-modal-entry.js +1 -1
- package/dist/esm/comp/md-modal.js +1 -1
- package/dist/esm/comp/md-phone-input-entry.js +1 -1
- package/dist/esm/comp/md-phone-input.js +1 -1
- package/dist/esm/comp/md-radio-entry.js +1 -1
- package/dist/esm/comp/md-radio.js +1 -1
- package/dist/esm/comp/md-slider-entry.js +1 -1
- package/dist/esm/comp/md-slider.js +1 -1
- package/dist/esm/comp/md-tab-entry.js +1 -1
- package/dist/esm/comp/md-tab-panel-entry.js +1 -1
- package/dist/esm/comp/md-tab-panel.js +1 -1
- package/dist/esm/comp/md-tab.js +1 -1
- package/dist/esm/comp/md-tabs-entry.js +1 -1
- package/dist/esm/comp/md-tabs.js +1 -1
- package/dist/esm/comp/md-timepicker-entry.js +1 -1
- package/dist/esm/comp/md-timepicker.js +1 -1
- package/dist/esm/comp/md-toggle-switch-entry.js +1 -1
- package/dist/esm/comp/md-toggle-switch.js +1 -1
- package/dist/esm/index-entry.js +242 -215
- package/dist/esm/index.js +1 -1
- package/dist/index-entry.js +129 -100
- package/dist/index.js +1 -1
- package/dist/types/[sandbox]/examples/editable-field.d.ts +1 -1
- package/dist/types/components/avatar/Avatar.d.ts +3 -3
- package/dist/types/components/badge/Badge.d.ts +1 -1
- package/dist/types/components/button/Button.d.ts +2 -2
- package/dist/types/components/card-alert/CardAlert.d.ts +6 -1
- package/dist/types/components/chip/Chip.d.ts +3 -3
- package/dist/types/components/combobox/ComboBox.d.ts +5 -3
- package/dist/types/components/dropdown/Dropdown.d.ts +2 -2
- package/dist/types/components/editable-textfield/EditableTextfield.d.ts +1 -1
- package/dist/types/components/floating-modal/FloatingModal.d.ts +8 -0
- package/dist/types/components/floating-modal/FloatingModal.stories.d.ts +4 -0
- package/dist/types/components/input/Input.d.ts +5 -5
- package/dist/types/components/radio/Radio.d.ts +1 -1
- package/dist/types/components/taskitem/TaskItem.utils.d.ts +1 -1
- package/dist/types/internal-components/color-table/ColorTable.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(t,e,i,s,o,l,n,r,a)=>(()=>{"use strict";var h,d={2273(t,e,i){i.r(e),i.d(e,{ComboBox:()=>s}),i(7906),i(1821);var s,o=i(2900),l=i(7704),n=i(9609),r=i(2050),a=i(4084),h=i(7161),d=i(429),u=i(5125),p=i(291),c=i(8175),m=i(318),b=i(7103),g=i(4047),f=function(t,e,i,s){var o,l=arguments.length,n=l<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(n=(l<3?o(n):l>3?o(e,i,n):o(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n},x=function(t,e,i,s){return new(i||(i=Promise))(function(o,l){function n(t){try{a(s.next(t))}catch(t){l(t)}}function r(t){try{a(s.throw(t))}catch(t){l(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,r)}a((s=s.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,l.yC)(h.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e,i,s,o;const l=this._focusedIndex;if(this.checkForVirtualScroll()){let l;l=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const n=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===l):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),n&&(null==n||n.toggleAttribute("focused",!0));const r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("lit-virtualizer");r&&(-1===t?null===(s=r.element(t))||void 0===s||s.scrollIntoView({block:"start"}):null===(o=r.element(t))||void 0===o||o.scrollIntoView({block:"center"}))}else if(this.lists){const e=this.lists[l];e&&e.toggleAttribute("focused",!1);const i=this.lists[t];i&&i.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",l)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("options")&&this.expanded&&this.checkForVirtualScroll()&&this.updateOnNextFrame(()=>{this.resizeListbox()}),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),l=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?String(t[this.optionValue]):t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?String(t[this.optionId]):t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==r?void 0:r.top)<s&&(i=r.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return x(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return x(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);if(this.setSelectedAttribute(t),t)if(this.setSelectedOption(t),this.isMulti)this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected());else{const i=this.getOptionValue(t);this.inputValue=i,this.setInputValue(i),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))}}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;if(!this.readOnly)switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded){if(this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue))return void this.setCustomValue();this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);!e||this.showSelectedCount||this.isMulti||(this.inputValue=this.getOptionValue(e)),e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()})}if(this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,b.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[a.A,g.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return h.html`
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js"));else if("function"==typeof define&&define.amd)define(["lit","lit/decorators.js","lit/directives/class-map.js","lit/directives/style-map.js","lit/directives/if-defined.js","@momentum-ui/icons/data/momentumUiIconsNames.json","@momentum-ui/utils/lib/getColorValue","mobx","lit/directives/repeat.js"],e);else{var i="object"==typeof exports?e(require("lit"),require("lit/decorators.js"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js"),require("lit/directives/if-defined.js"),require("@momentum-ui/icons/data/momentumUiIconsNames.json"),require("@momentum-ui/utils/lib/getColorValue"),require("mobx"),require("lit/directives/repeat.js")):e(t.lit,t["lit/decorators.js"],t["lit/directives/class-map.js"],t["lit/directives/style-map.js"],t["lit/directives/if-defined.js"],t["@momentum-ui/icons/data/momentumUiIconsNames.json"],t["@momentum-ui/utils/lib/getColorValue"],t.mobx,t["lit/directives/repeat.js"]);for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(self,(t,e,i,s,o,l,n,r,a)=>(()=>{"use strict";var h,d={2273(t,e,i){i.r(e),i.d(e,{ComboBox:()=>s}),i(7906),i(1821);var s,o=i(2900),l=i(7704),n=i(9609),r=i(2050),a=i(93),h=i(4084),d=i(7161),u=i(429),p=i(5125),c=i(291),m=i(8175),b=i(318),g=i(7103),f=i(4047),x=function(t,e,i,s){var o,l=arguments.length,n=l<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(n=(l<3?o(n):l>3?o(e,i,n):o(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n},v=function(t,e,i,s){return new(i||(i=Promise))(function(o,l){function n(t){try{a(s.next(t))}catch(t){l(t)}}function r(t){try{a(s.throw(t))}catch(t){l(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(n,r)}a((s=s.apply(t,e||[])).next())})};!function(t){class e{determineMessageType(t){return t.reduce((t,e)=>"error"===e?t:e.type,"")}filterMessagesByType(t,e){return t.reduce((t,i)=>i.type===e?t.concat(i.message):t,[])}}t.MessageController=e;let i=class extends((0,l.yC)(d.LitElement)){constructor(){super(...arguments),this._focusedIndex=-1,this._focusedGroupIndex=-1,this.label="Options",this.options=[],this.customOptions=[],this.placeholder="",this.isMulti=!1,this.useVirtualScroll=!1,this.disabled=!1,this.ordered=!1,this.expanded=!1,this.groupExpandedList=[],this.searchItem=!1,this.compact=!1,this.noClearIcon=!1,this.selectWhenInFocus=!1,this.selectedOptions=[],this.visibleOptions=8,this.optionId="",this.optionValue="",this.isCustomContent=!1,this.searchable=!1,this.shape="none",this.value=[],this.inputValue="",this.allowCustomValue=!1,this.autofocus=!1,this.resultsTextLocalization="No Results",this.optionsTextLocalization="No Options",this.trimSpace=!1,this.invalid=!1,this.invalidText="",this.ariaLabel="",this.searchResultAriaLabel="",this.ariaLabelForComboBox="",this.clearAriaLabel="Clear",this.arrowAriaLabel="Expand",this.clearIconHeight="auto",this.allTextLocalization="All",this.selectAllTextLocalization="Select All",this.selectedTextLocalization="Selected",this.allowSelectAll=!1,this.showCustomError=!1,this.showLoader=!1,this.showSelectedCount=!1,this.popupChevronAriaHidden="true",this.newMomentum=!1,this.showFilterIcon=!1,this.preventFilter=!1,this.isDropdownArrow=!1,this.comboboxId="",this.helpText="",this.messageArr=[],this.htmlId="",this._fallbackId=(0,a.O)("md-combobox"),this.readOnly=!1,this.messageController=new e,this.isOptGroup=!1,this.isSelectAllChecked=!1,this.multiSelectedIndex=-1,this.multiSelected=[],this.customContent=[],this.notifySelectedChange=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("change-selected",{composed:!0,bubbles:!0,detail:t}))},0),this.handleGroupFilter=t=>{const e=t.filter(t=>{if("string"!=typeof t&&"true"===t.isLabel)return t.groupName});return this.searchItem=!0,this.groupExpandedList=e.map(t=>{if("string"!=typeof t)return t.groupName}),t.filter(e=>"string"==typeof e||"true"!==e.isLabel||!!t.find(t=>{if("string"!=typeof e&&"string"!=typeof t)return e.groupName===t.groupName&&"false"===t.isLabel}))},this.notifyInputValueChanged=(0,r.sg)(t=>{this.dispatchEvent(new CustomEvent("combobox-input",{composed:!0,bubbles:!0,detail:{value:t}})),this.notifySearchResultCount(),this.focusedGroupIndex=0,requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})},250),this.handleOutsideClick=t=>{let e=!1;const i=t.composedPath();i.length&&(e=!!i.find(t=>t===this),e||(this.setVisualListbox(!1),this.unselectedAllMultiTag()))}}get messageId(){return`${this.htmlId||this._fallbackId}-message`}get focusedIndex(){return this._focusedIndex}set focusedIndex(t){this.updateFocusedIndex(t)}updateFocusedIndex(t){var e,i,s,o;const l=this._focusedIndex;if(this.checkForVirtualScroll()){let l;l=this.allowSelectAll?0===t?"selectAll":this.getOptionId(this.filteredOptions[t-1]):this.getOptionId(this.filteredOptions[t]);const n=this.lists?null===(e=[...this.lists])||void 0===e?void 0:e.find(t=>0!==t.offsetHeight&&t.id===l):"";this.lists&&[...this.lists].forEach(t=>{t.toggleAttribute("focused",!1)}),n&&(null==n||n.toggleAttribute("focused",!0));const r=null===(i=this.shadowRoot)||void 0===i?void 0:i.querySelector("lit-virtualizer");r&&(-1===t?null===(s=r.element(t))||void 0===s||s.scrollIntoView({block:"start"}):null===(o=r.element(t))||void 0===o||o.scrollIntoView({block:"center"}))}else if(this.lists){const e=this.lists[l];e&&e.toggleAttribute("focused",!1);const i=this.lists[t];i&&i.toggleAttribute("focused",!0)}this._focusedIndex=t,this.requestUpdate("focusedIndex",l)}get focusedGroupIndex(){return this._focusedGroupIndex}set focusedGroupIndex(t){const e=this._focusedGroupIndex;if(this.labels&&0!==this.labels.length){const i=this.labels[e];i&&i.toggleAttribute("focused",!1);const s=this.labels[t];s&&(s.toggleAttribute("focused",!0),s.focus())}this._focusedGroupIndex=t,this.requestUpdate("focusedGroupIndex",e)}get messageType(){return this.messageArr.length>0?this.messageController.determineMessageType(this.messageArr):null}get messages(){return this.messageType?this.messageController.filterMessagesByType(this.messageArr,this.messageType):null}notifySearchResultCount(){if(this.searchResultAriaLabel){const t=/{{.*?}}/g;this.ariaLabelForComboBox=this.searchResultAriaLabel.replace(t,this.filteredOptions.length.toString())}else this.ariaLabel?this.ariaLabelForComboBox=`${this.ariaLabel}, ${this.filteredOptions.length} results found.`:this.ariaLabelForComboBox=`ComboBox Element, ${this.filteredOptions.length} results found.`}firstUpdated(t){this.ariaLabelForComboBox=this.ariaLabel?this.ariaLabel:"ComboBox Element",super.firstUpdated(t),this.isCustomContent&&(this.optionId="id",this.optionValue="value",this.setOptionCustomContent()),this.setInitialValue()}updated(t){super.updated(t),t.has("expanded")&&(this.expanded?(this.resizeListbox(),this.checkSelectedOptions()):this.unCheckAllOptions()),t.has("focusedIndex")&&this.focusedIndex>=0&&(this.checkForVirtualScroll()||this.scrollToOption()),t.has("value")&&0===this.selectedOptions.length&&this.setInitialValue(),t.has("options")&&this.expanded&&this.checkForVirtualScroll()&&this.updateOnNextFrame(()=>{this.resizeListbox()}),t.has("customOptions")&&this.isCustomContent&&(this.setOptionCustomContent(),this.resizeListbox()),t.has("showCustomError")&&this.resizeListbox(),t.has("showLoader")&&this.resizeListbox(),t.has("searchItem")&&this.resizeListbox()}handleFocusIn(t){var e;this.disabled&&!this.readOnly||(this.noClearIcon&&(requestAnimationFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}),this.selectWhenInFocus&&this.input.select()),null===(e=super.handleFocusIn)||void 0===e||e.call(this,t)),this.dispatchEvent(new CustomEvent("combobox-focus-in",{composed:!0,bubbles:!0}))}handleFocusOut(t){var e;null===(e=super.handleFocusOut)||void 0===e||e.call(this,t),this.dispatchEvent(new CustomEvent("combobox-focus-out",{composed:!0,bubbles:!0}))}findFilteredOption(t){return this.isOptionObject(t)?this.filteredOptions.findIndex(e=>this.getOptionId(e)===this.getOptionId(t)&&this.getOptionValue(e)===this.getOptionValue(t)):this.filteredOptions.indexOf(t)}setInitialValue(){var t;if(this.value.length)if(this.isMulti)this.value.forEach(t=>{-1!==this.findFilteredOption(t)&&this.setSelectedOption(t)});else{const e=this.value[0],i=this.findFilteredOption(e);-1!==i&&(this.setSelectedOption(e),this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedIndex=i,this.focusedGroupIndex=-1)}}isOptionObject(t){return"object"==typeof t&&null!==t}setOptionCustomContent(){if(this.isOptGroup){const t=[...this.querySelectorAll("optgroup")],e=[];for(const i of t){const t=i.getAttribute("label"),s=[...i.querySelectorAll("[slot]")];e.push({isLabel:"true",[this.optionValue]:t,groupName:t});for(const i of s){const s=i.getAttribute("aria-label"),o=i.getAttribute("display-value"),l=i.getAttribute("slot");s&&o&&e.push({[this.optionId]:s,[this.optionValue]:o,isLabel:"false",groupName:t,slot:l})}}this.options=e}else this.customContent=[...this.querySelectorAll("[slot]")],this.customContent&&this.customContent.length?this.options=this.customContent.map(t=>{const e=t.getAttribute("aria-label"),i=t.getAttribute("display-value");if(e&&i)return{[this.optionId]:e,[this.optionValue]:i}}):this.options=[]}getOptionValue(t){return this.isOptionObject(t)?String(t[this.optionValue]):t}getOptionGroupName(t){return null==t?void 0:t.groupName}getOptionId(t){return this.isOptionObject(t)?String(t[this.optionId]):t}getFocusedItem(t){if(t>=0)return this.filteredOptions[t]}setupEvents(){document.addEventListener("click",this.handleOutsideClick),this.addEventListener("remove-all-selected",this.removeAllSelected),this.addEventListener("selected-changed",this.selectedChange)}teardownEvents(){document.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("remove-all-selected",this.removeAllSelected),this.removeEventListener("selected-changed",this.selectedChange)}setVisualListbox(t){this.expanded=t}setGroupList(t){this.groupExpandedList.includes(t)?(this.groupExpandedList.splice(this.groupExpandedList.indexOf(t),1),this.groupExpandedList=[...this.groupExpandedList]):this.searchItem?this.groupExpandedList.push(t):this.groupExpandedList=[t]}findSelectedOption(t){return this.optionId&&t?this.selectedOptions.findIndex(e=>e&&e[this.optionId]===t[this.optionId]):this.selectedOptions.indexOf(t)}findOptionIndex(t){const e=t.composedPath();if(this.checkForVirtualScroll()){let t="";return[...this.lists].forEach(i=>{e.includes(i)&&(t=i.id)}),this.filteredOptions.findIndex(e=>this.getOptionId(e)===t)}return[...this.lists].findIndex(t=>e.includes(t))}checkSelectedOptions(){if(this.checkForVirtualScroll()){const t=this.selectedOptions.map(t=>this.getOptionId(t)),e=[...this.lists].filter(t=>"selectAll"!==t.id);null==e||e.forEach(e=>{t.includes(e.id)?(this.isMulti&&(null==e||e.setAttribute("aria-checked","true")),null==e||e.setAttribute("aria-selected","true")):this.isMulti&&(null==e||e.setAttribute("aria-checked","false"))})}}unCheckAllOptions(){var t;this.checkForVirtualScroll()&&this.isMulti&&(null===(t=[...this.lists])||void 0===t||t.forEach(t=>{"selectAll"!==(null==t?void 0:t.id)&&(null==t||t.setAttribute("aria-checked","false"))}))}setSelectedOption(t){this.isMulti||(this.selectedOptions=[]);const e=this.findSelectedOption(t);if(-1!==e){const t=this.selectedOptions[e];this.selectedOptions.splice(e,1),this.notifySelectedChange({value:t,selected:this.selectedOptions})}else this.selectedOptions.push(t),this.notifySelectedChange({value:t,selected:this.selectedOptions});this.checkSelectedOptions(),this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected()),this.requestUpdate()}filterOptions(t){if(this.preventFilter)return this.searchItem=!1,this.options;if(t&&t.length){const e=this.options.filter(e=>this.isOptGroup&&"string"!=typeof e&&"true"===e.isLabel?e:(this.isCustomContent?this.getOptionId(e):this.getOptionValue(e)).toLowerCase().includes(t.toLowerCase()));return this.isOptGroup?this.handleGroupFilter(e):e}return this.searchItem=!1,this.options}getListBoxVerticalPadding(){if(this.listBox){const t=window.getComputedStyle(this.listBox,null),e=parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"));if(!isNaN(e))return e+2}return 10}resizeListbox(){this.updateOnNextFrame(()=>{var t;let e=0,i=0,s=0;const o=this.getListBoxVerticalPadding();if(this.lists){const t=this.checkForVirtualScroll()?[...this.lists].filter(t=>0!==t.offsetHeight):[...this.lists];e=t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0),s=this.checkForVirtualScroll()&&this.allowSelectAll?t.slice(1,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0):t.slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)}if(this.labels&&(i=[...this.labels].slice(0,this.visibleOptions).reduce((t,e)=>t+e.offsetHeight,0)),this.listBox&&(this.listBox.style.maxHeight=`${e+i+o}px`),this.virtualizer&&(this.virtualizer.style.height=`${s+o}px`),this.showCustomError||this.showLoader){const e=null===(t=this.listBox)||void 0===t?void 0:t.querySelector("[slot]");this.listBox&&e&&(this.listBox.style.height=`${e.clientHeight+o}px`,this.listBox.style.maxHeight=`${e.clientHeight+o}px`)}})}setInputValue(t=""){this.input.value=t}updateOnNextFrame(t){requestAnimationFrame(t)}unCheckedAllOptions(){this.isMulti&&(this.lists.forEach((t,e)=>this.unCheckedOption(e)),this.isSelectAllChecked=!1)}unCheckedOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","false"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}checkAllOptions(){this.isMulti&&this.lists.forEach((t,e)=>this.checkOption(e))}checkOption(t){this.isMulti&&(this.lists[t].setAttribute("aria-checked","true"),this.notifySelectedChange({value:this.filteredOptions[t],selected:this.selectedOptions}))}isSelectAllSelected(){return this.selectedOptions.length===this.options.length}setFocusOnHost(t){this.setFocus&&this.setFocus(t)}isOptionFocused(t){return this.focusedIndex===t}getAriaState(t){return this.isOptionFocused(t)}scrollToOption(){var t,e;let i=0;const{top:s,bottom:o}=this.listBox.getBoundingClientRect(),l=this.lists[this.focusedIndex],n=null===(t=this.lists[this.focusedIndex+1]||l)||void 0===t?void 0:t.getBoundingClientRect(),r=null===(e=this.lists[this.focusedIndex-1]||l)||void 0===e?void 0:e.getBoundingClientRect();(null==n?void 0:n.bottom)>o?i=n.bottom-o+2:(null==r?void 0:r.top)<s&&(i=r.top-s-2),this.updateOnNextFrame(()=>{this.listBox.scrollTop+=i})}getCustomContentName(t){const e=this.options.indexOf(t);if(this.isOptGroup){const t=this.options[e];if(t&&"string"!=typeof t)return t.slot}else if(-1!==e)return this.customContent[e].slot}setInputSelectionRange(t,e){this.input.setSelectionRange(t,e)}isOptionChecked(t){return-1!==this.findSelectedOption(t)?"true":"false"}getInputSelection(){return this.input.selectionStart}canMultiSelect(){return 0===this.getInputSelection()&&0!==this.selectedOptions.length&&this.isMulti}removeMultiTag(){this.selected&&this.multiSelected.forEach(t=>{const e=this.selected[t];e&&e.hasAttribute("selected")&&this.removeSelected(this.selectedOptions[t])})}unselectedAllMultiTag(){this.selected&&this.selected.forEach(t=>t.removeAttribute("selected")),this.multiSelectedIndex=-1}findLastMultiSelected(){return this.selected[this.multiSelectedIndex]}toggleMultiSelectedTag(t,e){t&&t.toggleAttribute("selected",e)}selectMultiTag(t){if(this.canMultiSelect()){if(!t){this.multiSelected=[];const t=this.findLastMultiSelected();this.toggleMultiSelectedTag(t,!1)}this.multiSelectedIndex<=0?this.multiSelectedIndex=this.selectedOptions.length-1:this.multiSelectedIndex--,this.multiSelected.push(this.multiSelectedIndex);const e=this.findLastMultiSelected();this.toggleMultiSelectedTag(e,!0)}}handleListClick(t){return v(this,void 0,void 0,function*(){this.dispatchEvent(new CustomEvent("selected-changed",{detail:{event:t}})),yield this.updateComplete,this.isMulti?this.setVisualListbox(!0):this.setVisualListbox(!1),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})})}handleSelectAll(){return v(this,void 0,void 0,function*(){this.isSelectAllChecked=!this.isSelectAllChecked,this.isSelectAllChecked?(this.selectedOptions=[...this.options],this.checkAllOptions()):(this.selectedOptions=[],this.unCheckedAllOptions()),yield this.updateComplete,this.setVisualListbox(!0),this.notifySelectedChange({selected:this.selectedOptions})})}handleInputKeyUp(t){switch(t.code){case o.Uz.Escape:break;case o.Uz.Backspace:this.setFocusOnHost(!0),this.setVisualListbox(!0),this.resizeListbox(),this.removeMultiTag();break;case o.Uz.ArrowLeft:this.isMulti&&(t.shiftKey?this.selectMultiTag(!0):this.selectMultiTag(!1));break;default:this.isMulti&&this.unselectedAllMultiTag()}}handleInput(t){const e=t.target.value;this.inputValue=e.trim(),this.notifyInputValueChanged(e.trim())}removeAllSelected(){var t;this.focusedIndex=-1,this.focusedGroupIndex=-1,this.selectedOptions=[],this.inputValue="",this.setInputValue(),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,""),this.setVisualListbox(!1),this.unCheckedAllOptions(),this.setSelectedAttribute(void 0),this.updateOnNextFrame(()=>{this.input.focus()}),this.notifySelectedChange({selected:this.selectedOptions})}removeSelected(t){const e=this.findSelectedOption(t),i=this.filteredOptions.indexOf(t);-1!==i&&this.unCheckedOption(i),-1!==e&&(this.selectedOptions.splice(e,1),this.requestUpdate()),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1})}selectedChange(t){var e;const{event:i}=t.detail;let s=this.findOptionIndex(i);if(-1!==s){this.focusedIndex=this.allowSelectAll&&this.checkForVirtualScroll()?s+1:s,this.isMulti&&this.allowSelectAll&&!this.checkForVirtualScroll()&&(s-=1);const t=this.getFocusedItem(s);if(this.setSelectedAttribute(t),t)if(this.setSelectedOption(t),this.isMulti)this.isMulti&&this.allowSelectAll&&(this.isSelectAllChecked=this.isSelectAllSelected());else{const i=this.getOptionValue(t);this.inputValue=i,this.setInputValue(i),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(t))}}}setSelectedAttribute(t){var e;let i="";t&&(i=this.getOptionId(t)),null===(e=this.lists)||void 0===e||e.forEach((t,e)=>{(null==t?void 0:t.id)===i?null==t||t.setAttribute("selected","true"):null==t||t.setAttribute("selected","false")})}shouldChangeButton(){const t=this.input&&this.input.value.length>0&&!this.noClearIcon||this.isMulti&&this.selectedOptions.length&&!this.noClearIcon;return t&&document.dispatchEvent(new CustomEvent("on-widget-update")),t}setCustomValue(){this.optionId||this.optionValue||(this.options=[...this.options,this.inputValue],this.setSelectedOption(this.inputValue),this.isMulti||this.updateOnNextFrame(()=>{var t;this.focusedIndex=this.filteredOptions.length-1;const e=this.getFocusedItem(this.focusedIndex);e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))}),this.dispatchEvent(new CustomEvent("custom-value-add",{composed:!0,bubbles:!0,detail:{value:this.inputValue}}))),this.inputValue=""}handleGroupFocus(){this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.filteredGroupOptions.length>0&&-1===this.focusedGroupIndex&&(this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===this.groupExpandedList[0])),this.updateOnNextFrame(()=>{-1===this.focusedGroupIndex||!this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length-1||this.allowSelectAll&&this.focusedGroupIndex>=this.filteredGroupOptions.length?this.focusedGroupIndex=0:this.focusedGroupIndex++}),this.focusedIndex=-1}handleInputKeyDown(t){var e,i;if(!this.readOnly)switch(t.code){case o.Uz.Backspace:this.focusedIndex=-1;break;case o.Uz.Tab:case o.Uz.Enter:if(this.setFocusOnHost(!0),this.expanded){if(this.allowCustomValue&&this.input&&this.input.value.length&&-1===this.findFilteredOption(this.inputValue))return void this.setCustomValue();this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);!e||this.showSelectedCount||this.isMulti||(this.inputValue=this.getOptionValue(e)),e&&(this.setSelectedAttribute(e),this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()})}if(this.setVisualListbox(!1),t.code===o.Uz.Tab&&this.isMulti)return;break;case o.Uz.ArrowDown:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return void this.handleGroupFocus();this.setFocusOnHost(!1),this.expanded||this.setVisualListbox(!0),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.focusedGroupIndex=-1)});break;case o.Uz.ArrowLeft:case o.Uz.ArrowRight:t.stopPropagation();break;case o.Uz.Escape:this.setFocusOnHost(!0),this.expanded?(t.stopPropagation(),this.setVisualListbox(!1)):(this.setInputValue(),null===(e=this.input)||void 0===e||e.setAttribute(o.iw.AriaActivedescendant,""),this.focusedIndex=-1,this.focusedGroupIndex=-1,this.removeAllSelected(),this.setSelectedAttribute(void 0));break;case o.Uz.Home:this.setInputSelectionRange(0,0);break;case o.Uz.End:{const{length:t}=this.inputValue;this.setInputSelectionRange(t,t)}break;case o.Uz.Space:if(this.isMulti&&this.expanded){t.preventDefault();const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.setSelectedAttribute(e),this.showSelectedCount||(this.setInputValue(),null===(i=this.input)||void 0===i||i.setAttribute(o.iw.AriaActivedescendant,""))),0===this.focusedIndex&&this.allowSelectAll&&this.handleSelectAll()}this.expanded=!0}}handleGroupLabelKeyDown(t,e){switch(t.code){case o.Uz.Tab:this.handleGroupFocus();break;case o.Uz.Enter:case o.Uz.Space:-1!==this.focusedGroupIndex?this.toggleGroupListBox(t,e.value):(this.setFocusOnHost(!0),this.setVisualListbox(!1),this.updateOnNextFrame(()=>{var t;const e=this.getFocusedItem(this.allowSelectAll?this.focusedIndex-1:this.focusedIndex);e&&(this.setSelectedOption(e),this.showSelectedCount||(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)),this.updateOnNextFrame(()=>{this.input.focus(),this.focusedGroupIndex=-1}))),this.isMulti&&this.allowSelectAll&&0===this.focusedIndex&&this.handleSelectAll()}));break;case o.Uz.ArrowDown:if(0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;-1===this.focusedIndex||!this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length-1||this.allowSelectAll&&this.focusedIndex>=this.filteredOptions.length?this.focusedIndex=0:this.focusedIndex++;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],!this.showSelectedCount&&e&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e))),this.focusedGroupIndex=-1});break;case o.Uz.ArrowUp:if(this.isOptGroup&&0===this.filteredOptions.length)return;this.setFocusOnHost(!1),this.updateOnNextFrame(()=>{var t;this.focusedIndex<=0?this.focusedIndex=this.allowSelectAll?this.filteredOptions.length:this.filteredOptions.length-1:this.focusedIndex--;const e=this.getFocusedItem(this.focusedIndex);this.groupExpandedList=[this.getOptionGroupName(e)],e&&!this.showSelectedCount&&(this.setInputValue(this.getOptionValue(e)),null===(t=this.input)||void 0===t||t.setAttribute(o.iw.AriaActivedescendant,this.getOptionId(e)))});break;case o.Uz.Escape:this.focusedGroupIndex=-1,this.setVisualListbox(!1),this.setFocusOnHost(!0),this.input.focus();break;default:this.setVisualListbox(!0)}}toggleVisualListBox(t){var e,i;if(!this.readOnly){if(t.target.classList.contains("md-combobox-listbox"))t.target.focus();else if("md-icon"===t.target.localName){const s=null===(i=null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.parentElement;if(s){const t=s.querySelector(".md-combobox-listbox");(0,g.setTimeout)(()=>{t.focus()},10)}}this.expanded?this.setVisualListbox(!1):(this.dispatchEvent(new CustomEvent("combobox-on-expand",{composed:!0,bubbles:!0})),this.notifySearchResultCount(),this.setVisualListbox(!0)),this.input.focus(),this.setGroupList(""),this.focusedGroupIndex=-1}}toggleGroupListBox(t,e){t.stopPropagation(),this.focusedGroupIndex=this.filteredGroupOptions.findIndex(t=>"string"!=typeof t&&t.groupName===e),this.setGroupList(e),this.resizeListbox()}handleRemoveAll(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-all-selected"))}connectedCallback(){super.connectedCallback(),this.setupEvents(),this.querySelector("optgroup")&&(this.isOptGroup=!0)}disconnectedCallback(){super.disconnectedCallback(),this.teardownEvents()}static get styles(){return[h.A,f.A]}get listItemOptionMap(){return{"md-combobox-multiselect":this.isMulti,compact:this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}get filteredOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t&&this.groupExpandedList.includes(this.getOptionGroupName(t))?"false"===t.isLabel:void 0))}get filteredGroupOptions(){return this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).filter(t=>!this.isOptGroup||("string"!=typeof t?"true"===t.isLabel:void 0))}get comboBoxTemplateClassMap(){return{[`md-combobox--${this.shape}`]:!!this.shape,"md-combobox-searchable":this.searchable,"md-combobox-has-leading-icon":this.searchable||this.showFilterIcon,"md-new-combobox":this.newMomentum,[`md-${this.messageType}`]:!!this.messageType,"md-combobox-readonly":this.readOnly,"md-combobox-compact":this.compact,"md-combobox-dropdown-arrow":this.isDropdownArrow}}searchIconTemplate(){return this.leadingIconTemplate("search-bold","search-icon")}filterIconTemplate(){return this.leadingIconTemplate("filter-bold","filter-icon")}leadingIconTemplate(t,e){return d.html`
|
|
2
2
|
<md-icon
|
|
3
3
|
name=${t}
|
|
4
4
|
class=${e}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
aria-hidden="true"
|
|
8
8
|
@click=${this.toggleVisualListBox}
|
|
9
9
|
></md-icon>
|
|
10
|
-
`}selectedOptionTemplate(t){return
|
|
10
|
+
`}selectedOptionTemplate(t){return d.html`
|
|
11
11
|
<div class="md-combobox-selected-item">
|
|
12
12
|
<span>${this.getOptionValue(t)}</span>
|
|
13
13
|
<md-icon
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
@click=${()=>this.removeSelected(t)}
|
|
20
20
|
></md-icon>
|
|
21
21
|
</div>
|
|
22
|
-
`}clearButtonTemplate(){return
|
|
22
|
+
`}clearButtonTemplate(){return d.html`
|
|
23
23
|
<button
|
|
24
24
|
type="button"
|
|
25
25
|
class="md-combobox-button clear"
|
|
@@ -39,28 +39,28 @@
|
|
|
39
39
|
style="height: ${this.clearIconHeight};"
|
|
40
40
|
></md-icon>
|
|
41
41
|
</button>
|
|
42
|
-
`}arrowButtonTemplate(){return
|
|
42
|
+
`}arrowButtonTemplate(){return d.html`
|
|
43
43
|
<button
|
|
44
44
|
type="button"
|
|
45
45
|
class="md-combobox-button arrow-down"
|
|
46
46
|
part="combobox-button-arrow"
|
|
47
47
|
aria-expanded=${this.expanded}
|
|
48
|
-
aria-label=${(0,
|
|
48
|
+
aria-label=${(0,c.ifDefined)("true"===this.popupChevronAriaHidden?void 0:this.arrowAriaLabel)}
|
|
49
49
|
aria-controls="md-combobox-listbox"
|
|
50
50
|
tabindex="-1"
|
|
51
|
-
aria-hidden=${(0,
|
|
51
|
+
aria-hidden=${(0,c.ifDefined)("true"===this.popupChevronAriaHidden?"true":void 0)}
|
|
52
52
|
?disabled=${this.disabled}
|
|
53
53
|
?readonly=${this.readOnly}
|
|
54
54
|
@click=${this.toggleVisualListBox}
|
|
55
55
|
>
|
|
56
56
|
<md-icon name="arrow-down-bold" size="16" iconSet="momentumDesign" aria-hidden="true"></md-icon>
|
|
57
57
|
</button>
|
|
58
|
-
`}groupArrowButtonTemplate(t){const e=this.groupExpandedList.includes(t)?"arrow-up-bold":"arrow-down-bold";return
|
|
58
|
+
`}groupArrowButtonTemplate(t){const e=this.groupExpandedList.includes(t)?"arrow-up-bold":"arrow-down-bold";return d.html`
|
|
59
59
|
<button
|
|
60
60
|
type="button"
|
|
61
61
|
class="md-combobox-button"
|
|
62
62
|
part="combobox-button-arrow"
|
|
63
|
-
aria-label=${(0,
|
|
63
|
+
aria-label=${(0,c.ifDefined)("true"===this.popupChevronAriaHidden?void 0:this.arrowAriaLabel)}
|
|
64
64
|
aria-controls="md-combobox-listbox"
|
|
65
65
|
tabindex="-1"
|
|
66
66
|
aria-hidden=${"true"===this.popupChevronAriaHidden?"true":"false"}
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
<md-icon name=${e} size="12" iconSet="momentumDesign" aria-hidden="true"></md-icon>
|
|
73
73
|
</span>
|
|
74
74
|
</button>
|
|
75
|
-
`}getSelectAllOption(){const t=this.checkForVirtualScroll()?`, 1 of ${this.options.length+1}`:"";return
|
|
75
|
+
`}getSelectAllOption(){const t=this.checkForVirtualScroll()?`, 1 of ${this.options.length+1}`:"";return d.html`
|
|
76
76
|
<div
|
|
77
77
|
id="selectAll"
|
|
78
78
|
part="combobox-option"
|
|
79
|
-
class="md-combobox-option ${(0,
|
|
79
|
+
class="md-combobox-option ${(0,p.classMap)(this.listItemOptionMap)}"
|
|
80
80
|
@click=${this.handleSelectAll}
|
|
81
81
|
aria-label="${this.selectAllTextLocalization}${t}"
|
|
82
|
-
aria-checked=${(0,
|
|
82
|
+
aria-checked=${(0,c.ifDefined)(this.isSelectAllChecked?"true":void 0)}
|
|
83
83
|
role="checkbox"
|
|
84
84
|
>
|
|
85
85
|
<span class="select-option" aria-hidden="true">
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
|
|
89
89
|
<span part="label" class="select-label" aria-hidden="true">${this.selectAllTextLocalization}</span>
|
|
90
90
|
</div>
|
|
91
|
-
`}getSelctedCount(){return 0===this.selectedOptions.length?
|
|
91
|
+
`}getSelctedCount(){return 0===this.selectedOptions.length?d.nothing:this.isSelectAllSelected()?d.html` <span class="selected-count">${this.allTextLocalization}</span> `:d.html`
|
|
92
92
|
<span class="selected-count">${this.selectedOptions.length} ${this.selectedTextLocalization}</span>
|
|
93
|
-
`}checkForVirtualScroll(){return this.useVirtualScroll&&!this.isOptGroup}rangeChanged(){this.updateFocusedIndex(this.focusedIndex),this.checkSelectedOptions(),this.resizeListbox()}getCustomErrorContent(){const t=this.querySelector("[slot]")||this.shadowRoot.querySelector("[slot]");return document.createRange().createContextualFragment(`${null==t?void 0:t.outerHTML}`)}getCustomContent(t){const e=this.getCustomContentName(t);if(this.isOptGroup){const t=[...this.querySelectorAll("[slot]")].find(t=>t.slot===e);return t?document.createRange().createContextualFragment(`${t.outerHTML}`):
|
|
93
|
+
`}checkForVirtualScroll(){return this.useVirtualScroll&&!this.isOptGroup}rangeChanged(){this.updateFocusedIndex(this.focusedIndex),this.checkSelectedOptions(),this.resizeListbox()}getCustomErrorContent(){const t=this.querySelector("[slot]")||this.shadowRoot.querySelector("[slot]");return document.createRange().createContextualFragment(`${null==t?void 0:t.outerHTML}`)}getCustomContent(t){const e=this.getCustomContentName(t);if(this.isOptGroup){const t=[...this.querySelectorAll("[slot]")].find(t=>t.slot===e);return t?document.createRange().createContextualFragment(`${t.outerHTML}`):d.html``}return d.html` <slot name=${(0,c.ifDefined)(e)}></slot> `}renderGroupLabelHeader(t,e){return d.html`
|
|
94
94
|
<div
|
|
95
95
|
part="group-label"
|
|
96
96
|
class="group-label"
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
<span part="group-label">${t.value}</span>
|
|
106
106
|
${this.groupArrowButtonTemplate(t.value)}
|
|
107
107
|
</div>
|
|
108
|
-
`}renderWithoutVirtualScroll(){return(0,
|
|
108
|
+
`}renderWithoutVirtualScroll(){return(0,m.repeat)(this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue),t=>this.getOptionId(t),(t,e)=>"string"!=typeof t&&this.isOptGroup&&"true"===t.isLabel?this.renderGroupLabelHeader(t,e):!this.isOptGroup||this.groupExpandedList.includes(this.getOptionGroupName(t))?this.renderItem(t,e):void 0)}highlightingSearchedText(t){return(0,r.ws)(this.getOptionValue(t),this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).map(({text:t,matching:e})=>e?d.html` <span class="highlight-text" part="select-label">${t}</span> `:d.html` <span class="selected-label-text" part="select-label">${t}</span> `)}addStyle(){const t=!this.expanded||this.options.length&&0===this.filteredOptions.length&&this.inputValue&&this.allowCustomValue;return this.checkForVirtualScroll()?(0,b.styleMap)({visibility:t?"hidden":"visible","z-index":t?"-1":"99",overflow:"hidden"}):(0,b.styleMap)({display:t?"none":"block","z-index":"99",overflow:"auto"})}renderItem(t,e){const i=this.allowSelectAll?e+2:e+1,s=this.allowSelectAll?this.options.length+1:this.options.length,o=this.checkForVirtualScroll()?`, ${i} of ${s}`:"";return d.html`
|
|
109
109
|
<div
|
|
110
110
|
id=${this.getOptionId(t)}
|
|
111
111
|
title="${this.getOptionValue(t)}"
|
|
@@ -117,26 +117,26 @@
|
|
|
117
117
|
aria-label="${this.isCustomContent?this.getOptionId(t):this.getOptionValue(t)}${o}"
|
|
118
118
|
tabindex="-1"
|
|
119
119
|
@click=${t=>this.handleListClick(t)}
|
|
120
|
-
aria-checked=${(0,
|
|
120
|
+
aria-checked=${(0,c.ifDefined)(this.isMulti?this.isOptionChecked.call(this,t):void 0)}
|
|
121
121
|
>
|
|
122
|
-
${this.isMulti?
|
|
122
|
+
${this.isMulti?d.html`
|
|
123
123
|
<span class="select-option" aria-hidden="true">
|
|
124
124
|
<md-icon name="check-bold" size="14" iconSet="momentumDesign"></md-icon>
|
|
125
125
|
</span>
|
|
126
|
-
`:
|
|
126
|
+
`:d.nothing}
|
|
127
127
|
<span part="label" class="select-label" aria-hidden="true">
|
|
128
128
|
${this.isCustomContent?this.getCustomContent(t):this.highlightingSearchedText(t)}
|
|
129
129
|
</span>
|
|
130
130
|
</div>
|
|
131
|
-
`}inputTitle(){return this.isMulti?this.selectedOptions.length>0?`${this.selectedOptions.length} ${this.selectedTextLocalization}`:this.placeholder:this.selectedOptions.length>0?this.getOptionValue(this.selectedOptions[0]):this.placeholder}helpTextTemplate(){return this.helpText?
|
|
131
|
+
`}inputTitle(){return this.isMulti?this.selectedOptions.length>0?`${this.selectedOptions.length} ${this.selectedTextLocalization}`:this.placeholder:this.selectedOptions.length>0?this.getOptionValue(this.selectedOptions[0]):this.placeholder}helpTextTemplate(){return this.helpText?d.html`
|
|
132
132
|
<md-help-text
|
|
133
|
-
class="help-text ${(0,
|
|
133
|
+
class="help-text ${(0,p.classMap)({disabled:this.disabled,newMomentum:this.newMomentum})}"
|
|
134
134
|
.message=${this.helpText}
|
|
135
|
-
style=${(0,
|
|
135
|
+
style=${(0,b.styleMap)({width:"100%"})}
|
|
136
136
|
></md-help-text>
|
|
137
|
-
`:
|
|
138
|
-
<div id="${this.
|
|
139
|
-
${(0,
|
|
137
|
+
`:d.nothing}messagesTemplate(){return this.messages&&this.messages.length?d.html`
|
|
138
|
+
<div id="${this.messageId}" part="message" class="md-combobox__messages">
|
|
139
|
+
${(0,m.repeat)(this.messages,(t,e)=>d.html`
|
|
140
140
|
<md-help-text
|
|
141
141
|
.message=${t}
|
|
142
142
|
.id=${this.messageArr[e].id||""}
|
|
@@ -145,26 +145,28 @@
|
|
|
145
145
|
></md-help-text>
|
|
146
146
|
`)}
|
|
147
147
|
</div>
|
|
148
|
-
`:
|
|
148
|
+
`:d.nothing}get newArrowButtonTemplate(){return d.html`<div class="md-combobox-right-arrow">${this.arrowButtonTemplate()}</div>`}get renderNewMomentumArrow(){return d.html` ${this.isDropdownArrow?this.arrowButtonTemplate():this.newArrowButtonTemplate} `}get renderTrailingInputControls(){const t=!this.readOnly&&this.shouldChangeButton();return this.newMomentum?t&&this.isDropdownArrow?d.html`${this.clearButtonTemplate()}`:t?d.html`${this.clearButtonTemplate()} ${this.renderNewMomentumArrow}`:this.renderNewMomentumArrow:this.compact?d.html`${d.nothing}`:d.html`${t?this.clearButtonTemplate():this.arrowButtonTemplate()}`}get renderVirtualScroll(){return d.html`
|
|
149
149
|
<div class="virtual-scroll" @rangeChanged=${this.rangeChanged}>
|
|
150
150
|
<lit-virtualizer
|
|
151
151
|
.items=${this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue)}
|
|
152
152
|
.renderItem=${(t,e)=>this.renderItem(t,e)}
|
|
153
153
|
></lit-virtualizer>
|
|
154
154
|
</div>
|
|
155
|
-
`}render(){return
|
|
156
|
-
<div part="combobox" class="md-combobox md-combobox-list ${(0,
|
|
157
|
-
<div part="group" class="group ${(0,
|
|
158
|
-
${this.searchable?this.searchIconTemplate():this.showFilterIcon?this.filterIconTemplate():
|
|
155
|
+
`}render(){return d.html`
|
|
156
|
+
<div part="combobox" class="md-combobox md-combobox-list ${(0,p.classMap)(this.comboBoxTemplateClassMap)}">
|
|
157
|
+
<div part="group" class="group ${(0,p.classMap)(this.listItemOptionMap)}">
|
|
158
|
+
${this.searchable?this.searchIconTemplate():this.showFilterIcon?this.filterIconTemplate():d.nothing}
|
|
159
159
|
<div class="md-combobox__multiwrap" part="multiwrap">
|
|
160
|
-
${this.isMulti?this.isMulti&&!this.showSelectedCount?(0,
|
|
160
|
+
${this.isMulti?this.isMulti&&!this.showSelectedCount?(0,m.repeat)(this.selectedOptions,t=>this.selectedOptionTemplate(t)):this.getSelctedCount():d.nothing}
|
|
161
161
|
<input
|
|
162
|
-
id=${(0,
|
|
162
|
+
id=${(0,c.ifDefined)(this.comboboxId||void 0)}
|
|
163
163
|
class="md-combobox-listbox"
|
|
164
164
|
type="text"
|
|
165
165
|
role="combobox"
|
|
166
166
|
aria-autocomplete="both"
|
|
167
|
-
aria-label=${(0,
|
|
167
|
+
aria-label=${(0,c.ifDefined)(this.inputValue&&this.selectedOptions.length>0?void 0:this.ariaLabelForComboBox)}
|
|
168
|
+
aria-describedby=${(0,c.ifDefined)(this.messages&&this.messages.length?this.messageId:void 0)}
|
|
169
|
+
aria-invalid=${(0,c.ifDefined)("error"===this.messageType?"true":void 0)}
|
|
168
170
|
part="multiwrap-input"
|
|
169
171
|
aria-expanded=${this.expanded}
|
|
170
172
|
placeholder=${this.inputValue&&this.selectedOptions.length>0||this.isMulti&&this.showSelectedCount&&0!==this.selectedOptions.length?"":this.placeholder}
|
|
@@ -172,7 +174,7 @@
|
|
|
172
174
|
?readonly=${this.allowSelectAll||this.readOnly}
|
|
173
175
|
?disabled=${this.disabled}
|
|
174
176
|
?autofocus=${this.autofocus}
|
|
175
|
-
title=${(0,
|
|
177
|
+
title=${(0,c.ifDefined)(this.inputValue&&this.selectedOptions.length>0?void 0:this.inputTitle())}
|
|
176
178
|
.value=${this.inputValue}
|
|
177
179
|
@click=${this.toggleVisualListBox}
|
|
178
180
|
@input=${this.handleInput}
|
|
@@ -183,42 +185,42 @@
|
|
|
183
185
|
${this.renderTrailingInputControls}
|
|
184
186
|
</div>
|
|
185
187
|
|
|
186
|
-
${this.showLoader||this.showCustomError?
|
|
188
|
+
${this.showLoader||this.showCustomError?d.html`
|
|
187
189
|
<div
|
|
188
190
|
id="md-combobox-listbox"
|
|
189
191
|
part="combobox-options"
|
|
190
192
|
aria-label=${this.ariaLabel}
|
|
191
|
-
style=${(0,
|
|
193
|
+
style=${(0,b.styleMap)({display:this.expanded?"block":"none","z-index":"99"})}
|
|
192
194
|
>
|
|
193
195
|
${this.getCustomErrorContent()}
|
|
194
196
|
</div>
|
|
195
|
-
`:
|
|
197
|
+
`:d.html`
|
|
196
198
|
<div
|
|
197
199
|
id="md-combobox-listbox"
|
|
198
200
|
part="combobox-options"
|
|
199
201
|
aria-label=${this.ariaLabel||this.label}
|
|
200
202
|
style=${this.addStyle()}
|
|
201
|
-
role=${(0,
|
|
203
|
+
role=${(0,c.ifDefined)(this.checkForVirtualScroll()?void 0:"listbox")}
|
|
202
204
|
>
|
|
203
|
-
${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():
|
|
204
|
-
${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:
|
|
205
|
-
${this.options.length&&0===this.filteredOptions.length&&this.inputValue&&!this.allowCustomValue?
|
|
205
|
+
${this.isMulti&&this.allowSelectAll&&this.expanded?this.getSelectAllOption():d.nothing}
|
|
206
|
+
${this.checkForVirtualScroll()?0!==this.options.length&&this.filterOptions(this.trimSpace?this.inputValue.replace(/\s+/g,""):this.inputValue).length>0?this.renderVirtualScroll:d.nothing:this.renderWithoutVirtualScroll()}
|
|
207
|
+
${this.options.length&&0===this.filteredOptions.length&&this.inputValue&&!this.allowCustomValue?d.html`
|
|
206
208
|
<div class="no-result md-combobox-option" role="option" aria-selected="false" tabindex="-1">
|
|
207
209
|
${this.resultsTextLocalization.trim()}
|
|
208
210
|
</div>
|
|
209
|
-
`:
|
|
210
|
-
${0===this.options.length?
|
|
211
|
+
`:d.nothing}
|
|
212
|
+
${0===this.options.length?d.html`
|
|
211
213
|
<div class="no-result md-combobox-option" role="option" aria-selected="false" tabindex="-1">
|
|
212
214
|
${this.optionsTextLocalization.trim()}
|
|
213
215
|
</div>
|
|
214
|
-
`:
|
|
216
|
+
`:d.nothing}
|
|
215
217
|
</div>
|
|
216
218
|
`}
|
|
217
219
|
</div>
|
|
218
|
-
${this.invalid?
|
|
219
|
-
<div part="message" class="md-combobox-error ${(0,
|
|
220
|
+
${this.invalid?d.html`
|
|
221
|
+
<div part="message" class="md-combobox-error ${(0,p.classMap)({"md-new-combobox-error":this.newMomentum})}">
|
|
220
222
|
<md-help-text .message=${this.invalidText} messageType="error"></md-help-text>
|
|
221
223
|
</div>
|
|
222
|
-
`:
|
|
224
|
+
`:d.nothing}
|
|
223
225
|
${this.messagesTemplate()} ${this.helpTextTemplate()}
|
|
224
|
-
`}};
|
|
226
|
+
`}};x([(0,u.property)({type:String})],i.prototype,"label",void 0),x([(0,u.property)({type:Array})],i.prototype,"options",void 0),x([(0,u.property)({type:Array,attribute:"custom-options"})],i.prototype,"customOptions",void 0),x([(0,u.property)({type:String})],i.prototype,"placeholder",void 0),x([(0,u.property)({type:Boolean,attribute:"is-multi"})],i.prototype,"isMulti",void 0),x([(0,u.property)({type:Boolean,attribute:"use-virtual-scroll"})],i.prototype,"useVirtualScroll",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"ordered",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"expanded",void 0),x([(0,u.property)({type:Array,reflect:!0})],i.prototype,"groupExpandedList",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),x([(0,u.property)({type:Boolean,attribute:"no-clear-icon"})],i.prototype,"noClearIcon",void 0),x([(0,u.property)({type:Boolean,attribute:"select-when-in-focus"})],i.prototype,"selectWhenInFocus",void 0),x([(0,u.property)({type:Array})],i.prototype,"selectedOptions",void 0),x([(0,u.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),x([(0,u.property)({type:String,attribute:"option-id",reflect:!0})],i.prototype,"optionId",void 0),x([(0,u.property)({type:String,attribute:"option-value",reflect:!0})],i.prototype,"optionValue",void 0),x([(0,u.property)({type:Boolean,attribute:"with-custom-content"})],i.prototype,"isCustomContent",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),x([(0,u.property)({type:String})],i.prototype,"shape",void 0),x([(0,u.property)({type:Array})],i.prototype,"value",void 0),x([(0,u.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),x([(0,u.property)({type:Boolean,attribute:"allow-custom-value",reflect:!0})],i.prototype,"allowCustomValue",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),x([(0,u.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),x([(0,u.property)({type:String,attribute:"no-options-i18n"})],i.prototype,"optionsTextLocalization",void 0),x([(0,u.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"invalid",void 0),x([(0,u.property)({type:String,reflect:!0,attribute:"invalid-text-i18n"})],i.prototype,"invalidText",void 0),x([(0,u.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),x([(0,u.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),x([(0,u.state)()],i.prototype,"ariaLabelForComboBox",void 0),x([(0,u.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),x([(0,u.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),x([(0,u.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),x([(0,u.property)({type:String,attribute:"all-i18n"})],i.prototype,"allTextLocalization",void 0),x([(0,u.property)({type:String,attribute:"select-all-i18n"})],i.prototype,"selectAllTextLocalization",void 0),x([(0,u.property)({type:String,attribute:"selected-all-i18n"})],i.prototype,"selectedTextLocalization",void 0),x([(0,u.property)({type:Boolean,attribute:"allow-select-all",reflect:!0})],i.prototype,"allowSelectAll",void 0),x([(0,u.property)({type:Boolean,attribute:"show-custom-error",reflect:!0})],i.prototype,"showCustomError",void 0),x([(0,u.property)({type:Boolean,attribute:"show-loader",reflect:!0})],i.prototype,"showLoader",void 0),x([(0,u.property)({type:Boolean,attribute:"show-selected-count",reflect:!0})],i.prototype,"showSelectedCount",void 0),x([(0,u.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"newMomentum",void 0),x([(0,u.property)({type:Boolean,attribute:"show-filter-icon"})],i.prototype,"showFilterIcon",void 0),x([(0,u.property)({type:Boolean,attribute:"prevent-filter"})],i.prototype,"preventFilter",void 0),x([(0,u.property)({type:Boolean,attribute:"is-dropdown-arrow"})],i.prototype,"isDropdownArrow",void 0),x([(0,u.property)({type:String})],i.prototype,"comboboxId",void 0),x([(0,u.property)({type:String})],i.prototype,"helpText",void 0),x([(0,u.property)({type:Array})],i.prototype,"messageArr",void 0),x([(0,u.property)({type:String})],i.prototype,"htmlId",void 0),x([(0,u.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),x([(0,u.state)()],i.prototype,"isOptGroup",void 0),x([(0,u.state)()],i.prototype,"isSelectAllChecked",void 0),x([(0,u.query)(".group")],i.prototype,"group",void 0),x([(0,u.query)(".md-combobox-listbox")],i.prototype,"input",void 0),x([(0,u.query)(".md-combobox-button")],i.prototype,"button",void 0),x([(0,u.query)("div#md-combobox-listbox")],i.prototype,"listBox",void 0),x([(0,u.query)(".virtual-scroll")],i.prototype,"virtualizer",void 0),x([(0,u.queryAll)("div.md-combobox-option")],i.prototype,"lists",void 0),x([(0,u.queryAll)(".group-label")],i.prototype,"labels",void 0),x([(0,u.queryAll)(".md-combobox-selected-item")],i.prototype,"selected",void 0),i=x([(0,n.w)("md-combobox")],i),t.ELEMENT=i}(s||(s={}))},2022(t){t.exports=l},554(t){t.exports=n},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=o},8175(t){t.exports=a},318(t){t.exports=s},5314(t){t.exports=r}},u={};function p(t){var e=u[t];if(void 0!==e)return e.exports;var i=u[t]={exports:{}};return d[t].call(i.exports,i,i.exports,p),i.exports}p.m=d,h=[],p.O=(t,e,i,s)=>{if(!e){var o=1/0;for(a=0;a<h.length;a++){for(var[e,i,s]=h[a],l=!0,n=0;n<e.length;n++)(!1&s||o>=s)&&Object.keys(p.O).every(t=>p.O[t](e[n]))?e.splice(n--,1):(l=!1,s<o&&(o=s));if(l){h.splice(a--,1);var r=i();void 0!==r&&(t=r)}}return t}s=s||0;for(var a=h.length;a>0&&h[a-1][2]>s;a--)h[a]=h[a-1];h[a]=[e,i,s]},p.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return p.d(e,{a:e}),e},p.d=(t,e)=>{for(var i in e)p.o(e,i)&&!p.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},p.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),p.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),p.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={2169:0,2273:0};p.O.j=e=>0===t[e];var e=(e,i)=>{var s,o,[l,n,r]=i,a=0;if(l.some(e=>0!==t[e])){for(s in n)p.o(n,s)&&(p.m[s]=n[s]);if(r)var h=r(p)}for(e&&e(i);a<l.length;a++)o=l[a],p.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return p.O(h)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var c=p.O(void 0,[7103,9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,5201,8227,7704,2797,7906,93,4047,4431,8138],()=>p(2273));return p.O(c)})());
|
package/dist/comp/md-combobox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../7103"),require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../
|
|
1
|
+
require("../7103"),require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../5584"),require("../5201"),require("../8227"),require("../7704"),require("../2797"),require("../7906"),require("../93"),require("../4047"),require("../4431"),require("../8138"),module.exports=require("../comp/md-combobox-entry");
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
${(0,u.repeat)(this.sortedCodeList,e=>e.name,(e,t)=>this.countryCodeOptionTemplate(e,t))}
|
|
37
37
|
</md-combobox>
|
|
38
38
|
</div>
|
|
39
|
-
`}};m([(0,d.property)({type:String,reflect:!0})],t.prototype,"codePlaceholder",void 0),m([(0,d.property)({type:String,attribute:"country-calling-code"})],t.prototype,"countryCallingCode",void 0),m([(0,d.property)({type:Boolean,attribute:"show-flags"})],t.prototype,"showFlags",void 0),m([(0,d.property)({type:Boolean})],t.prototype,"pill",void 0),m([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),m([(0,d.property)({type:String})],t.prototype,"ariaLabel",void 0),m([(0,d.property)({type:String})],t.prototype,"clearAriaLabel",void 0),m([(0,d.property)({type:String})],t.prototype,"id",void 0),m([(0,d.property)({type:Boolean})],t.prototype,"newMomentum",void 0),m([(0,d.property)({type:Boolean})],t.prototype,"isDropdownArrow",void 0),m([(0,d.state)()],t.prototype,"countryCode",void 0),m([(0,d.state)()],t.prototype,"codeList",void 0),m([(0,d.query)("md-combobox")],t.prototype,"combobox",void 0),t=m([(0,i.w)("md-country-code-picker")],t),e.ELEMENT=t}(r||(r={}))},2022(e){e.exports=s},554(e){e.exports=n},3060(e){e.exports=d},5875(e){e.exports=c},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=o},291(e){e.exports=i},8175(e){e.exports=a},318(e){e.exports=r},5314(e){e.exports=l}},m={};function y(e){var t=m[e];if(void 0!==t)return t.exports;var o=m[e]={exports:{}};return p[e].call(o.exports,o,o.exports,y),o.exports}y.m=p,u=[],y.O=(e,t,o,r)=>{if(!t){var i=1/0;for(a=0;a<u.length;a++){for(var[t,o,r]=u[a],s=!0,n=0;n<t.length;n++)(!1&r||i>=r)&&Object.keys(y.O).every(e=>y.O[e](t[n]))?t.splice(n--,1):(s=!1,r<i&&(i=r));if(s){u.splice(a--,1);var l=o();void 0!==l&&(e=l)}}return e}r=r||0;for(var a=u.length;a>0&&u[a-1][2]>r;a--)u[a]=u[a-1];u[a]=[t,o,r]},y.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return y.d(t,{a:t}),t},y.d=(e,t)=>{for(var o in t)y.o(t,o)&&!y.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},y.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),y.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),y.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6753:0};y.O.j=t=>0===e[t];var t=(t,o)=>{var r,i,[s,n,l]=o,a=0;if(s.some(t=>0!==e[t])){for(r in n)y.o(n,r)&&(y.m[r]=n[r]);if(l)var d=l(y)}for(t&&t(o);a<s.length;a++)i=s[a],y.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return y.O(d)},o=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var h=y.O(void 0,[7103,9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,
|
|
39
|
+
`}};m([(0,d.property)({type:String,reflect:!0})],t.prototype,"codePlaceholder",void 0),m([(0,d.property)({type:String,attribute:"country-calling-code"})],t.prototype,"countryCallingCode",void 0),m([(0,d.property)({type:Boolean,attribute:"show-flags"})],t.prototype,"showFlags",void 0),m([(0,d.property)({type:Boolean})],t.prototype,"pill",void 0),m([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),m([(0,d.property)({type:String})],t.prototype,"ariaLabel",void 0),m([(0,d.property)({type:String})],t.prototype,"clearAriaLabel",void 0),m([(0,d.property)({type:String})],t.prototype,"id",void 0),m([(0,d.property)({type:Boolean})],t.prototype,"newMomentum",void 0),m([(0,d.property)({type:Boolean})],t.prototype,"isDropdownArrow",void 0),m([(0,d.state)()],t.prototype,"countryCode",void 0),m([(0,d.state)()],t.prototype,"codeList",void 0),m([(0,d.query)("md-combobox")],t.prototype,"combobox",void 0),t=m([(0,i.w)("md-country-code-picker")],t),e.ELEMENT=t}(r||(r={}))},2022(e){e.exports=s},554(e){e.exports=n},3060(e){e.exports=d},5875(e){e.exports=c},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=o},291(e){e.exports=i},8175(e){e.exports=a},318(e){e.exports=r},5314(e){e.exports=l}},m={};function y(e){var t=m[e];if(void 0!==t)return t.exports;var o=m[e]={exports:{}};return p[e].call(o.exports,o,o.exports,y),o.exports}y.m=p,u=[],y.O=(e,t,o,r)=>{if(!t){var i=1/0;for(a=0;a<u.length;a++){for(var[t,o,r]=u[a],s=!0,n=0;n<t.length;n++)(!1&r||i>=r)&&Object.keys(y.O).every(e=>y.O[e](t[n]))?t.splice(n--,1):(s=!1,r<i&&(i=r));if(s){u.splice(a--,1);var l=o();void 0!==l&&(e=l)}}return e}r=r||0;for(var a=u.length;a>0&&u[a-1][2]>r;a--)u[a]=u[a-1];u[a]=[t,o,r]},y.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return y.d(t,{a:t}),t},y.d=(e,t)=>{for(var o in t)y.o(t,o)&&!y.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},y.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),y.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),y.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6753:0};y.O.j=t=>0===e[t];var t=(t,o)=>{var r,i,[s,n,l]=o,a=0;if(s.some(t=>0!==e[t])){for(r in n)y.o(n,r)&&(y.m[r]=n[r]);if(l)var d=l(y)}for(t&&t(o);a<s.length;a++)i=s[a],y.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return y.O(d)},o=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var h=y.O(void 0,[7103,9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,5201,8227,7704,2797,7906,93,4047,4431,8138,2273,8373],()=>y(6709));return y.O(h)})());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../7103"),require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../
|
|
1
|
+
require("../7103"),require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../5584"),require("../5201"),require("../8227"),require("../7704"),require("../2797"),require("../7906"),require("../93"),require("../4047"),require("../4431"),require("../8138"),require("../2273"),require("../8373"),module.exports=require("../comp/md-country-code-picker-entry");
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
<slot></slot>
|
|
9
9
|
${this.extended?d.html` <slot name="extended"></slot> `:d.nothing}
|
|
10
10
|
</div>
|
|
11
|
-
`}};c([(0,a.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",void 0),c([(0,a.property)({type:Boolean,reflect:!0})],t.prototype,"extended",void 0),c([(0,a.property)({type:Boolean,reflect:!0})],t.prototype,"editable",void 0),t=c([(0,s.w)("md-draggable-item")],t),e.ELEMENT=t}(o||(o={}))},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=r}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,o=[],l.O=(e,t,r,i)=>{if(!t){var s=1/0;for(p=0;p<o.length;p++){for(var[t,r,i]=o[p],d=!0,a=0;a<t.length;a++)(!1&i||s>=i)&&Object.keys(l.O).every(e=>l.O[e](t[a]))?t.splice(a--,1):(d=!1,i<s&&(s=i));if(d){o.splice(p--,1);var n=r();void 0!==n&&(e=n)}}return e}i=i||0;for(var p=o.length;p>0&&o[p-1][2]>i;p--)o[p]=o[p-1];o[p]=[t,r,i]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={7219:0};l.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[s,d,a]=r,n=0;if(s.some(t=>0!==e[t])){for(o in d)l.o(d,o)&&(l.m[o]=d[o]);if(a)var p=a(l)}for(t&&t(r);n<s.length;n++)i=s[n],l.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return l.O(p)},r=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var d=l.O(void 0,[9609,4084,2364,9938,4781,5201,
|
|
11
|
+
`}};c([(0,a.property)({type:Boolean,reflect:!0})],t.prototype,"disabled",void 0),c([(0,a.property)({type:Boolean,reflect:!0})],t.prototype,"extended",void 0),c([(0,a.property)({type:Boolean,reflect:!0})],t.prototype,"editable",void 0),t=c([(0,s.w)("md-draggable-item")],t),e.ELEMENT=t}(o||(o={}))},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=r}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return i[e](r,r.exports,l),r.exports}l.m=i,o=[],l.O=(e,t,r,i)=>{if(!t){var s=1/0;for(p=0;p<o.length;p++){for(var[t,r,i]=o[p],d=!0,a=0;a<t.length;a++)(!1&i||s>=i)&&Object.keys(l.O).every(e=>l.O[e](t[a]))?t.splice(a--,1):(d=!1,i<s&&(s=i));if(d){o.splice(p--,1);var n=r();void 0!==n&&(e=n)}}return e}i=i||0;for(var p=o.length;p>0&&o[p-1][2]>i;p--)o[p]=o[p-1];o[p]=[t,r,i]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={7219:0};l.O.j=t=>0===e[t];var t=(t,r)=>{var o,i,[s,d,a]=r,n=0;if(s.some(t=>0!==e[t])){for(o in d)l.o(d,o)&&(l.m[o]=d[o]);if(a)var p=a(l)}for(t&&t(r);n<s.length;n++)i=s[n],l.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return l.O(p)},r=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var d=l.O(void 0,[9609,4084,2364,9938,4781,5584,5201,8227,7704,5757,9431],()=>l(5730));return l.O(d)})());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../9609"),require("../4084"),require("../2364"),require("../9938"),require("../4781"),require("../
|
|
1
|
+
require("../9609"),require("../4084"),require("../2364"),require("../9938"),require("../4781"),require("../5584"),require("../5201"),require("../8227"),require("../7704"),require("../5757"),require("../9431"),module.exports=require("../comp/md-draggable-item-entry");
|
|
@@ -147,4 +147,4 @@
|
|
|
147
147
|
</ul>
|
|
148
148
|
</div>
|
|
149
149
|
${this.messagesTemplate()} ${this.helpTextTemplate()}
|
|
150
|
-
`}};f([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),f([(0,d.property)({type:Array})],i.prototype,"options",void 0),f([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),f([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),f([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),f([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),f([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),f([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),f([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),f([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),f([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),f([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),f([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),f([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),f([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),f([(0,d.property)({type:String})],i.prototype,"helpText",void 0),f([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),f([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),f([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),f([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),f([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),f([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),f([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),f([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),f([(0,d.state)()],i.prototype,"selectedKey",void 0),f([(0,d.state)()],i.prototype,"expanded",void 0),f([(0,d.state)()],i.prototype,"focusedIndex",void 0),f([(0,d.query)("label")],i.prototype,"label",void 0),f([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),f([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),f([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=f([(0,n.wW)("md-dropdown")],i),e.ELEMENT=i}(s||(s={}))},7704(e,t,i){i.d(t,{wW:()=>o.w,yC:()=>s.y}),i(2364);var s=i(3203),o=(i(9938),i(5201),i(4781),i(608),i(9609))},2022(e){e.exports=n},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=o},8175(e){e.exports=l},318(e){e.exports=s},5314(e){e.exports=a}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,u),i.exports}u.m=p,d=[],u.O=(e,t,i,s)=>{if(!t){var o=1/0;for(l=0;l<d.length;l++){for(var[t,i,s]=d[l],n=!0,r=0;r<t.length;r++)(!1&s||o>=s)&&Object.keys(u.O).every(e=>u.O[e](t[r]))?t.splice(r--,1):(n=!1,s<o&&(o=s));if(n){d.splice(l--,1);var a=i();void 0!==a&&(e=a)}}return e}s=s||0;for(var l=d.length;l>0&&d[l-1][2]>s;l--)d[l]=d[l-1];d[l]=[t,i,s]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={561:0,2942:0,5323:0,7704:0,7711:0,8180:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var s,o,[n,r,a]=i,l=0;if(n.some(t=>0!==e[t])){for(s in r)u.o(r,s)&&(u.m[s]=r[s]);if(a)var d=a(u)}for(t&&t(i);l<n.length;l++)o=n[l],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var c=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,
|
|
150
|
+
`}};f([(0,d.property)({type:String,attribute:"title"})],i.prototype,"title",void 0),f([(0,d.property)({type:Array})],i.prototype,"options",void 0),f([(0,d.property)({type:String,attribute:"option-id"})],i.prototype,"optionId",void 0),f([(0,d.property)({type:String,attribute:"option-value"})],i.prototype,"optionValue",void 0),f([(0,d.property)({type:Object})],i.prototype,"defaultOption",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"disabled",void 0),f([(0,d.property)({type:Number,attribute:"custom-tab-index",reflect:!0})],i.prototype,"customTabIndex",void 0),f([(0,d.property)({type:Boolean,attribute:"allow-unselected",reflect:!0})],i.prototype,"allowUnselected",void 0),f([(0,d.property)({type:Number,attribute:"visible-option",reflect:!0})],i.prototype,"visibleOptions",void 0),f([(0,d.property)({type:Boolean})],i.prototype,"newMomentum",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"compact",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchable",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"searchItem",void 0),f([(0,d.property)({type:String,attribute:"input-value",reflect:!0})],i.prototype,"inputValue",void 0),f([(0,d.property)({type:String})],i.prototype,"placeholder",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"readOnly",void 0),f([(0,d.property)({type:Boolean,reflect:!0})],i.prototype,"autofocus",void 0),f([(0,d.property)({type:String,attribute:"left-icon",reflect:!0})],i.prototype,"leftIcon",void 0),f([(0,d.property)({type:Boolean,reflect:!0,attribute:"search-trim-space"})],i.prototype,"trimSpace",void 0),f([(0,d.property)({type:String,attribute:"no-results-i18n"})],i.prototype,"resultsTextLocalization",void 0),f([(0,d.property)({type:Boolean})],i.prototype,"pill",void 0),f([(0,d.property)({type:String})],i.prototype,"helpText",void 0),f([(0,d.property)({type:Array})],i.prototype,"messageArr",void 0),f([(0,d.property)({type:String})],i.prototype,"htmlId",void 0),f([(0,d.property)({type:String,attribute:"clear-aria-label"})],i.prototype,"clearAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"clear-icon-height"})],i.prototype,"clearIconHeight",void 0),f([(0,d.property)({type:String,attribute:"arrow-aria-label"})],i.prototype,"arrowAriaLabel",void 0),f([(0,d.property)({type:String,attribute:"popup-chevron-aria-hidden"})],i.prototype,"popupChevronAriaHidden",void 0),f([(0,d.property)({type:String,reflect:!0})],i.prototype,"ariaLabel",void 0),f([(0,d.property)({type:String,attribute:"search-result-aria-label"})],i.prototype,"searchResultAriaLabel",void 0),f([(0,d.state)()],i.prototype,"ariaLabelForDropdown",void 0),f([(0,d.state)()],i.prototype,"dropdownRenderOptions",void 0),f([(0,d.state)()],i.prototype,"selectedKey",void 0),f([(0,d.state)()],i.prototype,"expanded",void 0),f([(0,d.state)()],i.prototype,"focusedIndex",void 0),f([(0,d.query)("label")],i.prototype,"label",void 0),f([(0,d.query)(".md-dropdown-input")],i.prototype,"input",void 0),f([(0,d.query)("ul.md-dropdown-list")],i.prototype,"optionsList",void 0),f([(0,d.queryAll)("li.md-dropdown-option")],i.prototype,"optionsListItems",void 0),i=f([(0,n.wW)("md-dropdown")],i),e.ELEMENT=i}(s||(s={}))},7704(e,t,i){i.d(t,{wW:()=>o.w,yC:()=>s.y}),i(2364);var s=i(3203),o=(i(9938),i(5201),i(4781),i(608),i(9609))},2022(e){e.exports=n},554(e){e.exports=r},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=o},8175(e){e.exports=l},318(e){e.exports=s},5314(e){e.exports=a}},h={};function u(e){var t=h[e];if(void 0!==t)return t.exports;var i=h[e]={exports:{}};return p[e](i,i.exports,u),i.exports}u.m=p,d=[],u.O=(e,t,i,s)=>{if(!t){var o=1/0;for(l=0;l<d.length;l++){for(var[t,i,s]=d[l],n=!0,r=0;r<t.length;r++)(!1&s||o>=s)&&Object.keys(u.O).every(e=>u.O[e](t[r]))?t.splice(r--,1):(n=!1,s<o&&(o=s));if(n){d.splice(l--,1);var a=i();void 0!==a&&(e=a)}}return e}s=s||0;for(var l=d.length;l>0&&d[l-1][2]>s;l--)d[l]=d[l-1];d[l]=[t,i,s]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={561:0,2942:0,5323:0,7704:0,7711:0,8180:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var s,o,[n,r,a]=i,l=0;if(n.some(t=>0!==e[t])){for(s in r)u.o(r,s)&&(u.m[s]=r[s]);if(a)var d=a(u)}for(t&&t(i);l<n.length;l++)o=n[l],u.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return u.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var c=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,5201,8227,2050,8138,5057],()=>u(621));return u.O(c)})());
|
package/dist/comp/md-dropdown.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../
|
|
1
|
+
require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../5584"),require("../5201"),require("../8227"),require("../2050"),require("../8138"),require("../5057"),module.exports=require("../comp/md-dropdown-entry");
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
size="16"
|
|
21
21
|
></md-icon>
|
|
22
22
|
</label>
|
|
23
|
-
`}};p([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),p([(0,d.property)({type:Boolean})],t.prototype,"checked",void 0),p([(0,d.property)({type:String})],t.prototype,"value",void 0),p([(0,d.property)({type:String})],t.prototype,"id",void 0),p([(0,d.property)({type:String})],t.prototype,"label",void 0),t=p([(0,l.w)("md-favorite")],t),e.ELEMENT=t}(o||(o={}))},2022(e){e.exports=s},554(e){e.exports=l},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=r},318(e){e.exports=o},5314(e){e.exports=a}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={exports:{}};return d[e](i,i.exports,u),i.exports}u.m=d,n=[],u.O=(e,t,i,o)=>{if(!t){var r=1/0;for(d=0;d<n.length;d++){for(var[t,i,o]=n[d],s=!0,l=0;l<t.length;l++)(!1&o||r>=o)&&Object.keys(u.O).every(e=>u.O[e](t[l]))?t.splice(l--,1):(s=!1,o<r&&(r=o));if(s){n.splice(d--,1);var a=i();void 0!==a&&(e=a)}}return e}o=o||0;for(var d=n.length;d>0&&n[d-1][2]>o;d--)n[d]=n[d-1];n[d]=[t,i,o]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6920:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var o,r,[s,l,a]=i,n=0;if(s.some(t=>0!==e[t])){for(o in l)u.o(l,o)&&(u.m[o]=l[o]);if(a)var d=a(u)}for(t&&t(i);n<s.length;n++)r=s[n],u.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return u.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var m=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,
|
|
23
|
+
`}};p([(0,d.property)({type:Boolean})],t.prototype,"disabled",void 0),p([(0,d.property)({type:Boolean})],t.prototype,"checked",void 0),p([(0,d.property)({type:String})],t.prototype,"value",void 0),p([(0,d.property)({type:String})],t.prototype,"id",void 0),p([(0,d.property)({type:String})],t.prototype,"label",void 0),t=p([(0,l.w)("md-favorite")],t),e.ELEMENT=t}(o||(o={}))},2022(e){e.exports=s},554(e){e.exports=l},7161(t){t.exports=e},429(e){e.exports=t},5125(e){e.exports=i},291(e){e.exports=r},318(e){e.exports=o},5314(e){e.exports=a}},c={};function u(e){var t=c[e];if(void 0!==t)return t.exports;var i=c[e]={exports:{}};return d[e](i,i.exports,u),i.exports}u.m=d,n=[],u.O=(e,t,i,o)=>{if(!t){var r=1/0;for(d=0;d<n.length;d++){for(var[t,i,o]=n[d],s=!0,l=0;l<t.length;l++)(!1&o||r>=o)&&Object.keys(u.O).every(e=>u.O[e](t[l]))?t.splice(l--,1):(s=!1,o<r&&(r=o));if(s){n.splice(d--,1);var a=i();void 0!==a&&(e=a)}}return e}o=o||0;for(var d=n.length;d>0&&n[d-1][2]>o;d--)n[d]=n[d-1];n[d]=[t,i,o]},u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var i in t)u.o(t,i)&&!u.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={6920:0};u.O.j=t=>0===e[t];var t=(t,i)=>{var o,r,[s,l,a]=i,n=0;if(s.some(t=>0!==e[t])){for(o in l)u.o(l,o)&&(u.m[o]=l[o]);if(a)var d=a(u)}for(t&&t(i);n<s.length;n++)r=s[n],u.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return u.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var m=u.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,5201,8227,2900,7704,6816],()=>u(23));return u.O(m)})());
|
package/dist/comp/md-favorite.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../
|
|
1
|
+
require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../5584"),require("../5201"),require("../8227"),require("../2900"),require("../7704"),require("../6816"),module.exports=require("../comp/md-favorite-entry");
|
|
@@ -40,4 +40,4 @@
|
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
42
|
`:m.nothing}
|
|
43
|
-
`}};f([(0,u.property)({type:String})],e.prototype,"heading",void 0),f([(0,u.property)({type:String})],e.prototype,"label",void 0),f([(0,u.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),f([(0,u.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),f([(0,u.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),f([(0,u.property)({type:String,attribute:"maximize-icon-aria-label"})],e.prototype,"maximizeIconAriaLabel",void 0),f([(0,u.property)({type:Object})],e.prototype,"minPosition",void 0),f([(0,u.query)(".md-floating")],e.prototype,"container",void 0),f([(0,u.query)(".md-floating__header")],e.prototype,"header",void 0),f([(0,u.state)()],e.prototype,"dragOccured",void 0),f([(0,u.state)()],e.prototype,"containerTransform",void 0),e=f([(0,s.w)("md-floating-modal-minimized")],e),t.ELEMENT=e}(n||(n={}))},8088(t){t.exports=l},7346(t){t.exports=d},9e3(t){t.exports=c},727(t){t.exports=m},3288(t){t.exports=u},2022(t){t.exports=r},554(t){t.exports=s},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=o},318(t){t.exports=n},5314(t){t.exports=a}},f={};function v(t){var e=f[t];if(void 0!==e)return e.exports;var i=f[t]={exports:{}};return p[t](i,i.exports,v),i.exports}v.m=p,h=[],v.O=(t,e,i,n)=>{if(!e){var o=1/0;for(l=0;l<h.length;l++){for(var[e,i,n]=h[l],r=!0,s=0;s<e.length;s++)(!1&n||o>=n)&&Object.keys(v.O).every(t=>v.O[t](e[s]))?e.splice(s--,1):(r=!1,n<o&&(o=n));if(r){h.splice(l--,1);var a=i();void 0!==a&&(t=a)}}return t}n=n||0;for(var l=h.length;l>0&&h[l-1][2]>n;l--)h[l]=h[l-1];h[l]=[e,i,n]},v.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return v.d(e,{a:e}),e},v.d=(t,e)=>{for(var i in e)v.o(e,i)&&!v.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={9237:0};v.O.j=e=>0===t[e];var e=(e,i)=>{var n,o,[r,s,a]=i,l=0;if(r.some(e=>0!==t[e])){for(n in s)v.o(s,n)&&(v.m[n]=s[n]);if(a)var d=a(v)}for(e&&e(i);l<r.length;l++)o=r[l],v.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return v.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var y=v.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5201,
|
|
43
|
+
`}};f([(0,u.property)({type:String})],e.prototype,"heading",void 0),f([(0,u.property)({type:String})],e.prototype,"label",void 0),f([(0,u.property)({type:Boolean,reflect:!0})],e.prototype,"show",void 0),f([(0,u.property)({type:String,attribute:"close-aria-label"})],e.prototype,"closeAriaLabel",void 0),f([(0,u.property)({type:Boolean,reflect:!0})],e.prototype,"minimize",void 0),f([(0,u.property)({type:String,attribute:"maximize-icon-aria-label"})],e.prototype,"maximizeIconAriaLabel",void 0),f([(0,u.property)({type:Object})],e.prototype,"minPosition",void 0),f([(0,u.query)(".md-floating")],e.prototype,"container",void 0),f([(0,u.query)(".md-floating__header")],e.prototype,"header",void 0),f([(0,u.state)()],e.prototype,"dragOccured",void 0),f([(0,u.state)()],e.prototype,"containerTransform",void 0),e=f([(0,s.w)("md-floating-modal-minimized")],e),t.ELEMENT=e}(n||(n={}))},8088(t){t.exports=l},7346(t){t.exports=d},9e3(t){t.exports=c},727(t){t.exports=m},3288(t){t.exports=u},2022(t){t.exports=r},554(t){t.exports=s},7161(e){e.exports=t},429(t){t.exports=e},5125(t){t.exports=i},291(t){t.exports=o},318(t){t.exports=n},5314(t){t.exports=a}},f={};function v(t){var e=f[t];if(void 0!==e)return e.exports;var i=f[t]={exports:{}};return p[t](i,i.exports,v),i.exports}v.m=p,h=[],v.O=(t,e,i,n)=>{if(!e){var o=1/0;for(l=0;l<h.length;l++){for(var[e,i,n]=h[l],r=!0,s=0;s<e.length;s++)(!1&n||o>=n)&&Object.keys(v.O).every(t=>v.O[t](e[s]))?e.splice(s--,1):(r=!1,n<o&&(o=n));if(r){h.splice(l--,1);var a=i();void 0!==a&&(t=a)}}return t}n=n||0;for(var l=h.length;l>0&&h[l-1][2]>n;l--)h[l]=h[l-1];h[l]=[e,i,n]},v.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return v.d(e,{a:e}),e},v.d=(t,e)=>{for(var i in e)v.o(e,i)&&!v.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t={9237:0};v.O.j=e=>0===t[e];var e=(e,i)=>{var n,o,[r,s,a]=i,l=0;if(r.some(e=>0!==t[e])){for(n in s)v.o(s,n)&&(v.m[n]=s[n]);if(a)var d=a(v)}for(e&&e(i);l<r.length;l++)o=r[l],v.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return v.O(d)},i=self["momentum-web-components-[id]"]=self["momentum-web-components-[id]"]||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var y=v.O(void 0,[9609,4084,3305,4739,7154,9773,5983,9488,1821,2364,9938,4781,5584,5201,8227,2900,7704,2050,7262],()=>v(5958));return v.O(y)})());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../
|
|
1
|
+
require("../9609"),require("../4084"),require("../3305"),require("../4739"),require("../7154"),require("../9773"),require("../5983"),require("../9488"),require("../1821"),require("../2364"),require("../9938"),require("../4781"),require("../5584"),require("../5201"),require("../8227"),require("../2900"),require("../7704"),require("../2050"),require("../7262"),module.exports=require("../comp/md-floating-minimize-entry");
|