UNPKG

smart-webcomponents

Version:

Web Components & Custom Elements for Professional Web Applications

34 lines (20 loc) 327 kB
/* Smart UI v22.0.10 (2025-02-10) Copyright (c) 2011-2024 jQWidgets. License: https://htmlelements.com/license/ */ // (function(){ if (typeof document === 'undefined') { return; } /* Smart UI v19.1.1 (2024-June) Copyright (c) 2011-2024 jQWidgets. License: https://htmlelements.com/license/ */ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 2612: /***/ (() => { Smart("smart-button",class extends Smart.ContentElement{static get properties(){return{value:{type:"string"},name:{type:"string"},type:{value:"button",type:"string"},clickMode:{allowedValues:["hover","press","release","pressAndRelease"],type:"string",value:"release"}}}static get styleUrls(){return["smart.button.css"]}template(){return"<button class=\"smart-button smart-unselectable\" inner-h-t-m-l='[[innerHTML]]' id='button' type='[[type]]' name='[[name]]' value='[[value]]' disabled='[[disabled]]' role=\"presentation\"></button>"}refresh(){}static get listeners(){return{"button.down":"_downHandler","button.mouseenter":"_mouseEnterHandler","button.mouseleave":"_mouseLeaveHandler","button.touchend":"_touchEndHandler","button.click":"_clickHandler","button.up":"_upHandler",up:"_upHandler","button.focus":"_focusHandler","button.blur":"_blurHandler"}}focus(){const e=this;e.$.button?e.$.button.focus():HTMLElement.prototype.focus.call(e)}blur(){const e=this;e.$.button?e.$.button.blur():HTMLElement.prototype.blur.call(e)}_upHandler(e){const t=this;if(e.stopPropagation(),t.$.setAttributeValue("active",!1),t.dataset.target){const n=document.querySelector(t.dataset.target);let a=t.dataset.toggle,r=t.dataset.arguments;const i="smart-window".toLowerCase();if(n&&n.nodeName.toLowerCase()===i&&"modal"===a&&(a="openModal"),"tab"===a||"pill"===a||"list"===a){const e=this.closest(".nav, .list-group"),a='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',r=!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?e.children(".active"):e.querySelectorAll("li > .active");if(e){const n=e.querySelectorAll(a);for(let e=0;e<n.length;e++)n[e].classList.remove("primary");for(let e=0;e<r.length;e++)r[e].classList.remove("active");let i=t.parentNode;for(;i;){if("LI"===i.nodeName){i.classList.add("active");break}i=i.parentNode}t.classList.add("primary")}return n.parentNode.querySelectorAll(".active").forEach((e=>{e.classList.remove("active"),e.classList.add("smart-hidden")})),n.classList.add("active"),void n.classList.remove("smart-hidden")}a&&n&&!n[a]&&"collapse"===a&&(setTimeout((()=>{n.classList.contains("smart-hidden")?n.classList.remove("smart-hidden"):n.classList.add("smart-hidden")})),e.originalEvent.preventDefault()),a&&n&&!n[a]&&"dropdown"===a?(setTimeout((()=>{n.opened=!n.opened})),e.originalEvent.preventDefault()):a&&n&&n[a]&&(setTimeout((()=>{r?n[a](r):n[a]()}),50),e.originalEvent.preventDefault())}}_focusHandler(){this.$.setAttributeValue("focus",!0),this.$.fireEvent("focus")}_blurHandler(){this.$.setAttributeValue("focus",!1),this.$.fireEvent("blur")}_clickHandler(e){const t=this;("release"!==t.clickMode&&"pressAndRelease"!==t.clickMode||t.readonly)&&(e.preventDefault(),e.stopPropagation())}_downHandler(e){const t=this;if(!(t.disabled||(t.hasRippleAnimation&&Smart.Utilities.Animation.Ripple.animate(t,e.pageX,e.pageY),t.$.setAttributeValue("active",!0),"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||t.readonly))){if(t.hasAttribute("smart-blazor"))return void t.$.dispatchEvent(new Event("click"));const n="buttons"in e?e.buttons:e.which;t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}}_mouseEnterHandler(e){const t=this;if(!t.readonly&&(t.$button.setAttributeValue("hover",!0),t.$.setAttributeValue("hover",!0),"hover"===t.clickMode)){const n="buttons"in e?e.buttons:e.which;if(t.hasAttribute("smart-blazor"))return void t.$.dispatchEvent(new Event("click"));t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}}_touchEndHandler(){const e=this;setTimeout((function(){e.$button.setAttributeValue("hover",!1),e.$.setAttributeValue("hover",!1)}),300)}_mouseLeaveHandler(){this.$button.setAttributeValue("hover",!1),this.$.setAttributeValue("hover",!1)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const a=this;"disabled"===e?(a._setFocusable(),a.$button&&a.$button.setAttributeValue("hover",!1),a.$.setAttributeValue("hover",!1),a instanceof Smart.RepeatButton&&a._stopRepeat()):"unfocusable"===e&&a._setFocusable()}_setFocusable(){const e=this,t=e.$.button?e.$.button:e;if(e.disabled||e.unfocusable)return t.removeAttribute("tabindex"),void(t.tabIndex=-1);t.tabIndex=e.tabIndex>0?e.tabIndex:0}ready(){const e=this;super.ready(),e.setAttribute("role","button"),e._setFocusable(),e.enableShadowDOM&&e.$.hiddenInput&&e.appendChild(e.$.hiddenInput)}}),Smart("smart-repeat-button",class extends Smart.Button{static get properties(){return{delay:{value:50,type:"number"},initialDelay:{value:150,type:"number"}}}static get listeners(){return{"button.down":"_startRepeat","button.mouseenter":"_overriddenHandler","button.mouseleave":"_overriddenHandler","button.pointerenter":"_updateInBoundsFlag","button.pointerleave":"_updateInBoundsFlag","button.touchmove":"_touchmoveHandler","document.up":"_stopRepeat"}}_clickHandler(e){const t=this;("release"!==t.clickMode||t.preventDefaultClick||t.readonly||t.disabled)&&(e.preventDefault(),e.stopPropagation(),t.preventDefaultClick=!1)}_updateInBoundsFlag(e){const t=this;-1!==e.type.indexOf("leave")?(t._isPointerInBounds=!1,t.$button.setAttributeValue("hover",!1),t.$.setAttributeValue("hover",!1)):(t._isPointerInBounds=!0,t.$button.setAttributeValue("hover",!0),t.$.setAttributeValue("hover",!0)),1!==("buttons"in e?e.buttons:e.which)&&t._stopRepeat(e)}_startRepeat(e){const t=this;t.setAttribute("active",""),t._initialTimer||t.readonly||(t._initialTimer=setTimeout((function(){t._repeatTimer=setInterval((()=>{if(t._isPointerInBounds){if(t.hasAttribute("smart-blazor"))return t.$.dispatchEvent(new Event("click")),void(t.preventDefaultClick=!0);const n="buttons"in e?e.buttons:e.which;t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),t.preventDefaultClick=!0}}),t.delay)}),t.initialDelay))}_stopRepeat(e){const t=this;t.readonly||e&&("pointercancel"===e.type||e.originalEvent&&"pointercancel"===e.originalEvent.type)||(t.$.setAttributeValue("active",!1),t._repeatTimer&&(clearInterval(t._repeatTimer),t._repeatTimer=null),t._initialTimer&&(clearTimeout(t._initialTimer),t._initialTimer=null))}_touchmoveHandler(e){this.preventDefaultClick&&e.cancelable&&(e.preventDefault(),e.stopPropagation())}_overriddenHandler(){}}),Smart("smart-toggle-button",class extends Smart.Button{static get properties(){return{checked:{value:!1,type:"boolean?"},falseContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminateContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminate:{value:!1,type:"boolean"},trueContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminateTemplate:{value:null,type:"any"},trueTemplate:{value:null,type:"any"},falseTemplate:{value:null,type:"any"},type:{value:"toggle",type:"string",defaultReflectToAttribute:!0,readonly:!0}}}static get listeners(){return{keydown:"_keyHandler",keyup:"_keyHandler",dragstart:"_dragStartHandler","button.click":"_buttonClickHandler","button.mouseenter":"_buttonMouseEnterHandler","button.mouseleave":"_buttonMouseLeaveHandler","document.up":"_documentUpHandler"}}ready(){super.ready(),this._setAriaState(),this._updateGroupValue()}_setAriaState(){const e=this,t=e.checked;null!==t?e.setAttribute("aria-pressed",t):e.setAttribute("aria-pressed","mixed")}_buttonClickHandler(){}_buttonMouseLeaveHandler(){this.removeAttribute("hover")}_buttonMouseEnterHandler(){const e=this;e.setAttribute("hover",""),e.disabled||e.readonly||"hover"!==e.clickMode||(e._changeCheckState("pointer"),e.focus(),e._updateHidenInputNameAndValue())}_documentUpHandler(e){const t=this;t._pressed&&(t._pressed=!1,t.disabled||t.readonly||"press"===t.clickMode||"pointercancel"===e.originalEvent.type||(t._changeCheckState("pointer"),t.focus(),t._updateHidenInputNameAndValue()))}_downHandler(e){const t=this;t.disabled||t.readonly||(t.hasRippleAnimation&&Smart.Utilities.Animation.Ripple.animate(t,e.pageX,e.pageY),t._pressed=!0,"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||(t._changeCheckState("pointer"),t.hasAttribute("smart-blazor")?t.$.dispatchEvent(new Event("click")):t.$.fireEvent("click"),t._updateHidenInputNameAndValue()),"press"===t.clickMode&&(e.preventDefault(),e.stopPropagation()))}_dragStartHandler(e){e.preventDefault()}_keyHandler(e){const t=this;if(!0!==t.disabled&&!t.readonly&&32===e.keyCode){if("keydown"===e.type)return void e.preventDefault();if("none"===t.switchMode)return;t._changeCheckState("keyboard"),t._updateHidenInputNameAndValue()}}_updateGroupValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const n=document.querySelectorAll('[data-target="'+e.dataset.target+'"]'),a=[];if(e.checked){const n=e.dataset.property,a=e.dataset.value;if(n&&void 0!==t[n]){let e=a;"true"===e&&(e=!0),"false"===e&&(e=!1),t[n]=e}}for(let t=0;t<n.length;t++){const r=n[t];r.checked&&(r.name?(a.push(r.name),e.id&&r.setAttribute("data-id",e.id)):e.id&&a.push(e.id))}t.value=a.toString(),e._targetDispatchTimer&&clearTimeout(e._targetDispatchTimer),e._targetDispatchTimer=setTimeout((()=>{t.dispatchEvent(new Event("change"))}),100)}}}_changeCheckState(e){const t=this;let n=null;null===t.checked?t.checked=!0:(n=t.checked,t.checked=!t.checked),t._handleTextSelection(),t.$.fireEvent("change",{value:t.checked,oldValue:n,changeType:e}),t.checked?t.$.fireEvent("checkValue",{changeType:e}):t.$.fireEvent("uncheckValue",{changeType:e}),t._updateGroupValue(),t._setAriaState()}_handleTextSelection(){const e=this;e.$.addClass("smart-unselectable"),e.timer&&clearTimeout(e.timer),e.timer=setTimeout((()=>e.$.removeClass("smart-unselectable")),500)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const a=this;if("checked"===e)return a.$.fireEvent("change",{value:n,oldValue:t,changeType:"api"}),void a._setAriaState();switch(e){case"trueTemplate":a._handleTemplate(!0);break;case"falseTemplate":a._handleTemplate(!1);break;case"indeterminateTemplate":a._handleTemplate()}}_htmlBindOnInitialization(){const e=this;e._bindContentProperty("trueContent","smart-true-content"),e._bindContentProperty("falseContent","smart-false-content"),e._bindContentProperty("indeterminateContent","smart-indeterminate-content")}_bindContentProperty(e,t){const n=this;if(!n.$[e+"Container"])return;let a=document.createElement("div");a.innerHTML=n.innerHTML;let r,i=a.getElementsByClassName(t);if(i.length>0)for(let e=0;e<i.length;e++)r=i[e];""===n[e]&&(n[e]=void 0===r?"":r.outerHTML),n.$[e+"Container"].innerHTML=n[e]}_updateContentProperties(){const e=this;function t(t){e.$[t+"Container"]&&(e[t]=e.$[t+"Container"].innerHTML)}t("trueContent"),t("falseContent"),t("indeterminateContent")}_updateHidenInputValue(){const e=this;if(!e.$.hiddenInput)return;let t;t=null===e.checked?"null":!1===e.checked?"off":e.value||"on",e.$.hiddenInput.setAttribute("value",t)}_updateHidenInputName(){const e=this;if(!e.$.hiddenInput)return;let t=!1===e.checked?"":e.name||"";e.$.hiddenInput.setAttribute("name",t)}_updateHidenInputNameAndValue(){this._updateHidenInputName(),this._updateHidenInputValue()}_handleTemplate(e,t){const n=this;let a,r,i;if(!0===e?(a=n.trueTemplate,r=n.$.trueContentContainer,i=n.trueContent):!1===e?(a=n.falseTemplate,r=n.$.falseContentContainer,i=n.falseContent):(a=n.indeterminateTemplate,r=n.$.indeterminateContentContainer,i=n.indeterminateContent),t&&(r.innerHTML=i||""),null===a||!a)return;if("function"==typeof a)return void a(r,{value:i});if(!("content"in document.createElement("template")))return void n.error(n.localize("htmlTemplateNotSuported",{elementType:n.nodeName.toLowerCase()}));if(a=document.getElementById(a),null===a||!("content"in a))return void n.error(n.localize("invalidTemplate",{elementType:n.nodeName.toLowerCase(),property:"template"}));const o=a.content,l=o.childNodes.length,s=/{{\w+}}/g;let u,d=[];for(let e=0;e<l;e++)for(u=s.exec(o.childNodes[e].innerHTML);u;)d.push({childNodeIndex:e,bindingString:u[0]}),u=s.exec(o.childNodes[e].innerHTML);const c=d.length;let p,h,m=document.importNode(a.content,!0);for(let e=0;e<c;e++){p=m.childNodes[d[e].childNodeIndex],h=d.length;for(let t=0;t<h;t++)p.innerHTML=p.innerHTML.replace(d[e].bindingString,i)}r.innerHTML="";for(let e=0;e<m.childNodes.length;e++)m.childNodes[e].outerHTML&&(r.innerHTML+=m.childNodes[e].outerHTML)}}); /***/ }), /***/ 1139: /***/ (() => { Smart("smart-combo-box",class extends Smart.DropDownList{static get properties(){return{autoComplete:{allowedValues:["none","manual","auto","inline","list"],type:"string",value:"none"},autoCompleteDelay:{value:100,type:"number"},autoOpenShortcutKey:{value:[],type:"array"},dropDownOpenMode:{allowedValues:["none","default","dropDownButton","auto"],value:"dropDownButton",defaultReflectToAttribute:!0,type:"string"},escKeyMode:{allowedValues:["clearValue","firstPossibleValue","none","previousValue"],type:"string",value:"none"},inputPurpose:{type:"string",value:"off"},minLength:{type:"number",value:2},maxLength:{type:"number",value:-1},value:{value:"",type:"any"}}}static get listeners(){return{"input.focus":"_inputFocusHandler","input.blur":"_inputFocusHandler","dropDownButton.focus":"_dropDownButtonFocusHandler","dropDownButton.blur":"_dropDownButtonFocusHandler","input.change":"_inputChangeEventHandler","input.mouseenter":"_buttonsMouseEventsHandler","input.mouseleave":"_buttonsMouseEventsHandler","document.down":"_documentDownHandler","document.up":"_documentUpHandler","document.selectstart":"_selectStartHandler","dropDownButton.down":"_buttonsDownHandler","dropDownButton.mouseenter":"_buttonsMouseEventsHandler","dropDownButton.mouseleave":"_buttonsMouseEventsHandler",keydown:"_keyDownHandler",keyup:"_keyUpHandler","listBox.change":"_listBoxChangeHandler","listBox.itemClick":"_listBoxItemClickHandler","listBox.keydown":"_listBoxKeyDownHandler","listBox.scrollBottomReached":"_scrollBottomReachedHandler","listBox.scrollTopReached":"_scrollTopReachedHandler",wheel:"_mouseWheelHandler"}}static get styleUrls(){return["smart.combobox.css"]}template(){return'<div id="container" role="presentation">\n <span class="smart-label" id="label">[[label]]</span>\n <div id="content" class="smart-content" role="presentation">\n <div class="smart-buttons-container" id="buttonsContainer" role="presentation">\n <span id="actionButton" class="smart-action-button" role="presentation">\n <input name="[[name]]" class="smart-input" id="input" placeholder="[[placeholder]]" autocomplete="[[inputPurpose]]" role="textbox" aria-label="[[placeholder]]" />\n <div class="smart-combo-box-auto-complete-string" id="autoCompleteString"></div>\n </span>\n <span id="dropDownButton" class="smart-drop-down-button" role="button" aria-label="Toggle popup">\n <span class="smart-drop-down-button-icon" id="arrow" aria-hidden="true"></span>\n </span>\n </div>\n <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="presentation">\n <smart-list-box id="listBox" unfocusable\n animation="[[animation]]"\n data-source="[[dataSource]]"\n disabled="[[disabled]]"\n display-loading-indicator="[[displayLoadingIndicator]]"\n display-member="[[displayMember]]"\n filterable="[[filterable]]"\n filter-callback="[[filterCallback]]"\n filter-mode="[[filterMode]]"\n filter-input-placeholder="[[filterInputPlaceholder]]"\n grouped="[[grouped]]"\n group-member="[[groupMember]]"\n item-height="[[itemHeight]]"\n item-measure-mode="[[itemMeasureMode]]"\n item-template="[[itemTemplate]]"\n incremental-search-delay="[[incrementalSearchDelay]]"\n incremental-search-mode="[[incrementalSearchMode]]"\n loading-indicator-placeholder="[[loadingIndicatorPlaceholder]]"\n loading-indicator-position="[[loadingIndicatorPosition]]"\n placeholder="[[dropDownPlaceholder]]"\n readonly="[[readonly]]"\n right-to-left="[[rightToLeft]]"\n selected-indexes="{{selectedIndexes}}"\n selection-mode="[[selectionMode]]"\n selected-values="{{selectedValues}}"\n sorted="[[sorted]]"\n theme="[[theme]]"\n value-member="[[valueMember]]"\n horizontal-scroll-bar-visibility="[[horizontalScrollBarVisibility]]"\n vertical-scroll-bar-visibility="[[verticalScrollBarVisibility]]"\n virtualized="[[virtualized]]">\n <content></content>\n </smart-list-box>\n <div id="resizeBar" class="smart-drop-down-resize-bar" aria-label="Resize">\n <div></div>\n </div>\n </div>\n </div>\n <span class="smart-hint" id="hint">[[hint]]</span>\n </div>'}render(){super.render();const e=this;e.value!==e.$.input.value&&(e.$.input.value=e.value)}propertyChangedHandler(e,t,o){const n=this;switch(e){case"autoComplete":if("list"===o){n.$.listBox.$.filterInput.value="";let e=n.$.listBox.context;n.$.listBox.context=n.$.listBox,n.$.listBox._filterItems(!0),n.$.listBox.context=e,n._setDropDownSize()}n._autoComplete(!0),n._setAriaAutocomplete();break;case"dataSource":case"displayMember":n._clearSelection(!0),n._setDropDownSize(),n._positionDetection.checkBrowserBounds("vertically"),n._positionDetection.positionDropDown(),n._positionDetection.checkBrowserBounds("horizontally");break;case"maxLength":n.$.input.setAttribute("maxlength",n.maxLength);break;case"disabled":n.$.input.disabled=o,n._setFocusable(),n.close(),n._positionDetection&&n._positionDetection.handleAutoPositioning(),n._ariaPropertyChangedHandler("disabled",o);break;case"readonly":n.$.input.readOnly=o,n.close(),n._ariaPropertyChangedHandler("readonly",o);break;case"selectedValues":case"selectedIndexes":n._clearSelection(!0);break;case"selectionMode":case"selectionDisplayMode":n._clearSelection(),n._applySelectionDisplayMode(),"tokens"===n.selectionDisplayMode&&(n._currentSelection=void 0),n._applySelection(n.selectionMode),"selectionMode"===e&&super.propertyChangedHandler(e,t,o);break;case"tokenTemplate":if(n.$.selectionField)for(;"SPAN"===n.$.selectionField.firstElementChild.nodeName;)n.$.selectionField.removeChild(n.$.selectionField.firstElementChild);n._tokenTemplate=n._validateTemplate(n.tokenTemplate),n._applySelection();break;case"value":{n.clearSelection(),n.value=n.$.input.value=n._oldValue=o,n._queryItems(!0);const e=[];if(n.dataSource&&n.dataSource.length>0)for(let t=0;t<n.dataSource.length;t++){const i=n.dataSource[t];(i.value&&o.indexOf(i.value)>=0||i.label&&o.indexOf(i.label)>=0)&&e.push(i.value)}e.length>0&&(n.selectedValues=e),n._currentSelection&&!n._currentSelection.length&&(n.$.fireEvent("change",{oldValue:t,value:n.$.input.value,addedItems:[],removedItems:[],selected:[],disabled:[],index:[],label:[]}),n._updateTargetValue())}break;default:super.propertyChangedHandler(e,t,o)}}clearItems(){this.$.listBox.clearItems(),this._clearSelection(!0)}clearSelection(){this.$.listBox.clearSelection(),this._clearSelection(!arguments[0])}blur(){this.$.input.blur()}close(){super.close(),this.$.input.removeAttribute("aria-controls")}focus(){this.$.input.focus()}open(){super.open(),this.$.input.setAttribute("aria-controls",this.$.listBox.id)}_setFocusable(){const e=this;if(!e.disabled&&!e.unfocusable){let t=e.tabIndex>0?e.tabIndex:0;return e.$.input.tabIndex=t,void("dropDownButton"===e.dropDownOpenMode?e.$.dropDownButton.setAttribute("tabindex",t):e.$.dropDownButton.removeAttribute("tabindex"))}e.$.input.tabIndex=-1,e.$.dropDownButton.removeAttribute("tabindex")}_autoComplete(e){const t=this;if("list"===t.autoComplete)return;if(0===t.$.listBox._items.length&&"function"!=typeof t.dataSource)return void t.close();const o=t.$.input.value.length<t.minLength?"":"escaped"===t.displayMode?t._toDefaultDisplayMode(t.$.input.value):t.$.input.value;let n;1===t.$.listBox.selectedValues.length&&(n=t.$.listBox.getItem(t.$.listBox.selectedValues[0])),t.$.autoCompleteString.textContent="",t.$.listBox.$.filterInput.value="none"===t.autoComplete||t.$.input.value.length<t.minLength?"":o;let i=t.$.listBox.context;t.$.listBox.context=t.$.listBox,t.$.listBox._filterItems(!!e,(function(){if(!t.$.listBox.isAttached||!t.$.input)return;const e=t.enableShadowDOM?t.shadowRoot.activeElement:document.activeElement;if(t._setDropDownSize(),t.opened&&(t._positionDetection.positionDropDown(),t._positionDetection.checkBrowserBounds()),t.$.listBox._filteredItems&&t.$.listBox._filteredItems.length>0){if(t.$.listBox._scrollView.scrollTop=t.$.listBox._filteredItems[0].offsetTop,"none"!==t.autoComplete&&t.$.input.value.length>=t.minLength&&!function(e){for(let t=0;t<e.length;t++)if(e[t]._focused&&e[t].hasAttribute&&e[t].hasAttribute("focus"))return!0}(t.$.listBox._filteredItems)&&t._focus(t.$.listBox._filteredItems[0]),e===t.$.input&&"inline"===t.autoComplete&&t.$.input.value.length>=t.minLength&&t._updateAutoCompleteHelper(),n&&n[t.inputMember]===t.$.listBox._filteredItems[0][t.inputMember]&&n.value===t.$.listBox._filteredItems[0].value&&(t.$.listBox.context=t.$.listBox,t.$.listBox._select(t.$.listBox._filteredItems[0],!0),t.$.listBox.context=i),o!==t.$.listBox._filteredItems[0][t.inputMember]||Smart.TextBox&&t instanceof Smart.TextBox&&"auto"===t.dropDownOpenMode){if(t._closedFromKeyCombination)return void(t._closedFromKeyCombination=!1);if(o.length<t.minLength&&!(Smart.TextBox&&t instanceof Smart.TextBox&&"auto"===t.dropDownOpenMode))return void t.close();t.isCompleted&&"none"!==t.dropDownOpenMode&&e===t.$.input&&t.open()}}else t["function"==typeof t.dataSource?"open":"close"]()}),!0),t.$.listBox.context=i}_updateAutoCompleteHelper(){const e=this,t=e.$.autoCompleteString;if(t.style.width=e.$.input.offsetWidth+"px",t.style.height=e.$.input.offsetHeight+"px",t.style.left=e.$.input.offsetLeft+"px",t.style.top=e.$.input.offsetTop+"px",t.style.paddingLeft=e.selectedIndexes.length>0?0:null,!e._focusedItem)return void(t.textContent="");const o=e.$.input.value,n=e._focusedItem[e.inputMember];n.length!==o.length&&0===n.toLowerCase().indexOf(o.toLowerCase())&&(t.textContent=e.$.input.value+n.slice(o.length))}_applySelection(e,t){const o=this;if(o.$.selectionField||(o.$.selectionField=o.$.actionButton),o.$.autoCompleteString.textContent="",0!==o.selectedIndexes.length){if(o.$.listBox._items&&0!==o.$.listBox._items.length)if("one"===o.selectionMode||"zeroAndOne"===o.selectionMode||"zeroOrOne"===o.selectionMode||"radioButton"===o.selectionMode){if(o._currentSelection&&o._currentSelection.length>o.selectedIndexes.length)return o._currentSelection=o.selectedIndexes.map((e=>o.$.listBox._items[e][o.inputMember])),o.$.input.value=o._currentSelection.toString(),void(o._oldValue=o.value=o._currentSelection.toString());o._clearSelection(),o._currentSelection=o.selectedIndexes.map((e=>o.$.listBox._items[e][o.inputMember])),o.$.input.value=o._currentSelection.toString(),o._oldValue=o.value=o._currentSelection.toString(),o.$.container.setAttribute("has-value",""),"none"!==o.autoComplete&&"function"!=typeof o.dataSource&&(o._autoComplete(!0),o._keyboardNavigation||o.close())}else{for(o.$.input.value="",o.$.input.placeholder="",o.$.container.setAttribute("has-value","");"SPAN"===o.$.selectionField.firstElementChild.nodeName;)o.$.selectionField.removeChild(o.$.selectionField.firstElementChild);let e,t,n=document.createDocumentFragment();t=1!==o.selectedIndexes.length||"oneOrManyExtended"!==o.selectionMode&&"oneOrMany"!==o.selectionMode?"tokens"===o.selectionDisplayMode?"&#10006":",":"",o.selectedIndexes.map((i=>{e=o._applyTokenTemplate(o.$.listBox._items[i][o.inputMember],t),e._value=o.$.listBox._items[i].value,n.appendChild(e)})),o.$.selectionField.insertBefore(n,o.$.input),o._currentSelection=o.selectedIndexes.map((e=>o.$.listBox._items[e][o.inputMember])),o._oldValue=o.value=o._currentSelection.toString(),o._positionDetection.positionDropDown()}}else o._clearSelection(t&&t.index>-1&&o.$.input.value===o.$.listBox._items[t.index][o.inputMember])}_applySelectionDisplayMode(){const e=this;"one"===e.selectionMode||"zeroAndOne"===e.selectionMode||"zeroOrOne"===e.selectionMode||"radioButton"===e.selectionMode?e.$.removeClass("auto-height"):e.$.addClass("auto-height")}_bindingCompleteHandler(){this._queryItems(),this._setDropDownSize()}_buttonsMouseEventsHandler(e){const t=this;t.disabled||t.readonly||("mouseenter"===e.type?(e.target.setAttribute("hover",""),t.setAttribute("hover",""),"auto"!==t.dropDownOpenMode||Smart.TextBox&&t instanceof Smart.TextBox?"dropDownButton"===t.dropDownOpenMode&&e.target===t.$.dropDownButton&&t.setAttribute("drop-down-button-hover",""):e.target===t.$.dropDownButton?(t.open(),t.$.input.focus()):t.close()):(e.target.removeAttribute("hover"),t.removeAttribute("hover"),t.removeAttribute("drop-down-button-hover")))}_createElement(){const e=this;e.classList.add("smart-drop-down-box"),e._tokenTemplate=e._validateTemplate(e.tokenTemplate),e._applySelectionDisplayMode(),e._applySelection(e.selectionMode),"none"!==e.autoComplete&&e._autoComplete(!0),e._setDropDownSize(),e.$.input.disabled=e.disabled,e.$.input.readOnly=e.readonly,e._setFocusable(),e.$.input.value.length>0&&0===e.selectedIndexes.length&&(e.$.container.setAttribute("has-value",""),e._oldValue=e.value=e.$.input.value),e.maxLength>0&&e.$.input.setAttribute("maxlength",e.maxLength),e.$.arrow.noRipple=!0,e.checkLicense(),e._setAriaRelations(!0)}_clearSelection(e){const t=this;if(e&&(t.$.input.value="",t.value=""),t.$.input.placeholder=t.placeholder,t.$.autoCompleteString.textContent="",t._currentSelection=[],t.$.selectionField)for(;"SPAN"===t.$.selectionField.firstElementChild.nodeName;)t.$.selectionField.removeChild(t.$.selectionField.firstElementChild);"none"!==t.autoComplete&&"list"!==t.autoComplete&&t.$.input.value.length>0&&(t._autoCompleteTimer&&clearTimeout(t._autoCompleteTimer),"function"!=typeof t.dataSource&&(t._autoCompleteTimer=setTimeout((function(){t._autoComplete(!0)}),t.autoCompleteDelay))),t.$.input.value.length||t.$.container.removeAttribute("has-value")}_documentDownHandler(e){const t=this;super._documentDownHandler(e);let o=e.originalEvent.target;(t.shadowRoot||t.isInShadowDOM)&&(o=e.originalEvent.composedPath()[0]),o!==t.$.dropDownButton||"none"===t.dropDownOpenMode||Smart.Utilities.Core.isMobile||requestAnimationFrame((()=>t.$.input.focus()))}_documentUpHandler(e){const t=this;let o=e.originalEvent.target,n=o.closest?o.closest("smart-combo-box"):void 0;(t.shadowRoot||t.isInShadowDOM)&&(o=e.originalEvent.composedPath()[0],n=o.getRootNode().host);const i=o;if(t._resizeDetails&&t._resizeDetails.started)return t._resizeDetails.started=t._resizeDetails.resizeEventFired=!1,t.removeAttribute("resizing"),t._dropDownResized=!0,void t.$.fireEvent("resizeEnd",{position:{left:e.pageX,top:e.pageY}});if(t.disabled||t._isDropDownClicked||t.readonly)return void delete t._isDropDownClicked;if(t._overlayDown)return t.close(),void delete t._overlayDown;if(o===t.$.input||void 0===o||o===t.$.resizeBar)return;if(o===t.$.selectionField)return void t.$.input.focus();if(o===t.$.dropDownButton&&"none"!==t.dropDownOpenMode)return t._preventDropDownClose=!0,o===t._buttonClicked&&t.$dropDownContainer.hasClass("smart-visibility-hidden")&&"pointercancel"!==e.originalEvent.type?t.open():t.close(),Smart.Utilities.Core.isMobile||requestAnimationFrame((()=>t.$.input.focus())),void(t._buttonClicked=void 0);const l=o.closest(".smart-drop-down-list-selection-label");if(l&&n===t&&"none"!==t.dropDownOpenMode){const e=t.$.listBox._items.filter((e=>e[t.inputMember].toString()===l.innerHTML))[0];if(!e||t.$.fireEvent("tokenClick",{index:t.$.listBox._items.indexOf(e),label:e.label,value:e.value}).defaultPrevented)return;return t.open(),t.$.input.focus(),t.$.listBox.ensureVisible(e),void t._focus(e)}if("tokens"===t.selectionDisplayMode&&o.closest(".smart-drop-down-list-unselect-button")&&n===t){if(1===t.selectedIndexes.length&&["zeroOrMany","zeroOrOne","checkBox"].indexOf(t.selectionMode)<0)return;return t.unselect(t.$.listBox._items.filter((e=>e[t.inputMember].toString()===o.previousElementSibling.innerHTML))[0]),void t.$.input.focus()}o=t._getUpEventTarget(o),void 0!==o?((!t.$dropDownContainer.hasClass("smart-visibility-hidden")&&"dropDownContainer"!==o&&"item"!==o||"item"===o&&t.selectionMode.indexOf("Many")<0&&"checkBox"!==t.selectionMode)&&t.close(),("item"===o||"dropDownContainer"===o&&i!==t.$.listBox.$.filterInput)&&t.$.input.focus()):t.$.input.focus()}_dropDownButtonFocusHandler(e){const t=this;"focus"===e.type?("dropDownButton"!==t.dropDownOpenMode&&t.$.input.focus(),t.setAttribute("focus","")):t.removeAttribute("focus")}_inputFocusHandler(e){const t=this;if(!t.disabled)if("focus"===e.type)t.setAttribute("focus",""),t._buttonClicked||(t._oldValue=t.$.input.value),t.$.fireEvent("focus");else{if(t.removeAttribute("focus"),t.$.fireEvent("blur"),""!==e.target.value||0!==t.selectedIndexes.length&&""===e.target.value?t.$.container.setAttribute("has-value",""):t.$.container.removeAttribute("has-value"),t._preventDropDownClose||(t.opened&&("auto"===t.autoComplete||"inline"===t.autoComplete)&&t.$.input.value.length>0&&t._focusedItem&&!t._focusedItem.selected&&t.select(t._focusedItem),t.close()),!t._handleAutoCompleteModeList())return;"previousValue"===t.escKeyMode&&(t.value=t.$.input.value)}}_handleAutoCompleteModeList(){const e=this;if("list"===e.autoComplete&&!e._buttonClicked){if(e.opened&&e._isDropDownClicked)return!1;if(e.$.autoCompleteString.textContent="",e._lastSelectedItem)e._lastSelectedItem.selected||e.select(e._lastSelectedItem);else if(e.$.input.value.length&&e._oldValue){const t=e.$.listBox._queryItems(e._oldValue,e.incrementalSearchMode);for(let o=0;o<t.length;o++)if(!t[o].hidden){t[o].selected||e.select(t[o]),e._focus(t[o]);break}e.value=e.$.input.value=e._oldValue}else e.value=e.$.input.value=""}}_inputChangeEventHandler(e){const t=this;e.stopPropagation(),t._preventInputChangeEvent?delete t._preventInputChangeEvent:t._isDropDownClicked||t._oldValue===t.$.input.value||(t.$.fireEvent("change",{oldValue:t._oldValue,value:t.$.input.value,addedItems:[],removedItems:[],selected:[],disabled:[],index:[],label:[]}),t._updateTargetValue())}_keyDownHandler(e){const t=this,o=t.enableShadowDOM?e.composedPath()[0]:e.target;if(t.disabled||t.readonly||o===t.$.listBox.$.filterInput)return;const n="function"==typeof t._focusedItem?t._focusedItem():t._focusedItem;switch(e.key){case"Enter":if(delete t._preventInputChangeEvent,o===t.$.input&&n&&t.opened){if(n.selected&&"list"===t.autoComplete)return t.close(),t._unfocus(),void t._handleAutoCompleteModeList();n.disabled||(t.select(n),t._preventInputChangeEvent=!0),!t.$dropDownContainer.hasClass("smart-visibility-hidden")&&t.selectionMode.indexOf("one")>-1&&(t.close(),t._unfocus())}else o===t.$.dropDownButton?(t.$.dropDownButton.setAttribute("active",""),t.$dropDownContainer.hasClass("smart-visibility-hidden")&&"none"!==t.dropDownOpenMode?t.open():t.close(),t.$.input.focus()):t.close();return void t._handleAutoCompleteModeList();case"Escape":switch(t.escKeyMode){case"none":t.$dropDownContainer.hasClass("smart-visibility-hidden")||(t.close(),t._unfocus());break;case"clearValue":t.value=t.$.input.value="",t.close();break;case"previousValue":t.$.input.value=t._oldValue;break;case"firstPossibleValue":{const e=t.$.listBox._items.find((e=>!e.disabled&&!e.hidden&&!e.readonly));if(e){const o=e[t.inputMember];t.$.input.value===o&&t.close(),t.$.input.value=o}t.close();break}}break;case"End":case"Home":case"PageUp":case"PageDown":case"ArrowUp":case"ArrowDown":if(!0===t._autoOpenOnKeyDown(e))return;if(e.altKey){if(t._closedFromKeyCombination=!0,t.$dropDownContainer.hasClass("smart-visibility-hidden")&&"none"!==t.dropDownOpenMode){if("ArrowDown"===e.key&&t.open(),!t.opened)return;if(0===t.items.length)return;0===t.selectedIndexes.length?t._focus(t.items[0]):t.selectedIndexes.length>0&&!t.$.listBox._items[t.selectedIndexes[t.selectedIndexes.length-1]].hidden&&t._focus(t.items[t.selectedIndexes[t.selectedIndexes.length-1]])}else t.close();return}if(o===t.$.input&&t.$dropDownContainer.hasClass("smart-visibility-hidden"))return void(e.ctrlKey&&(e.preventDefault(),t._handleKeyStroke(e.key)));if(("PageUp"===e.key||"PageDown"===e.key)&&!n||o===t.$.listBox.$.filterInput)return;if(e.preventDefault(),!n||n&&!n._focused)return void t._focus(t.items[0]);t._handleKeyStroke(e.key),"inline"!==t.autoComplete&&"list"!==t.autoComplete||t._updateAutoCompleteHelper();break;case"Backspace":if(t.$.input.previousElementSibling){if(0===t.$.input.value.length){if(1===t.selectedIndexes.length&&["zeroOrMany","zeroOrOne","checkBox"].indexOf(t.selectionMode)<0)return;const e=t.$.listBox.getItem(t.$.input.previousElementSibling._value);e?t.unselect(e):t.$.selectionField.firstElementChild&&"SPAN"===t.$.selectionField.firstElementChild.nodeName&&t.$.selectionField.removeChild(t.$.selectionField.firstElementChild)}return}t.selectedIndexes.length>1&&t.clearSelection(!0);break;default:if(o===t.$.input&&"oneOrManyExtended"===t.selectionMode&&(t.$.listBox._keysPressed[e.key]=!0),!0===t._autoOpenOnKeyDown(e))return}}_handleKeyStroke(e){const t=this,o=t.$.listBox;if("none"===t.autoComplete)return void o._handleKeyStrokes(e);const n=t.items;switch(e){case"ArrowLeft":case"ArrowUp":t._handleArrowKeys(!0);break;case"ArrowRight":case"ArrowDown":t._handleArrowKeys(!1);break;case"Home":case"End":{if(0===n.length)return;const i="Home"===e;t._focus(i?n[0]:n[n.length-1]),o.scrollTop=i?0:o.scrollHeight;break}case"PageUp":t._pageUpKeyHandler(n);break;case"PageDown":t._pageDownKeyHandler(n)}o._recycle()}_handleArrowKeys(e){const t=this,o=t.$.listBox;let n;if(t._focusedItem)n=t.$.listBox._indexOf(t._focusedItem),t._focusedItem._focused=!1;else{if(0===t.selectedIndexes.length)return;n=t.selectedIndexes[t.selectedIndexes.length-1]}const i=e?o._getPreviousItem(n):o._getNextItem(n);t._focus(i),"list"===t.autoComplete&&o._items[n]!==i&&(t._keyboardNavigation=!0,o.clearSelection(),o.select(i),delete t._keyboardNavigation),t.ensureVisible(i)}_pageDownKeyHandler(e){const t=this,o=t.$.listBox;let n,i=o._items[t.selectedIndexes[t.selectedIndexes.length-1]];o._focusedItem&&(i=o._focusedItem);const l=o._indexOf(i);let s=i.top+o.$.itemsContainer.offsetHeight-i.height;for(let t=l;t<e.length;t++)if(e[t].top>=s){n=e[t];break}n||(n=e[e.length-1]),t._focus(n),(n.height+n.top>o.$.itemsContainer.scrollTop+o.$.itemsContainer.offsetHeight||n.top<o.$.itemsContainer.scrollTop)&&(o.scrollTop=n.top-o.$.itemsContainer.offsetHeight+n.height)}_pageUpKeyHandler(e){const t=this,o=t.$.listBox;let n=o._items[t.selectedIndexes[t.selectedIndexes.length-1]];o._focusedItem&&(n=o._focusedItem);const i=n.top-o.$.itemsContainer.offsetHeight;let l;for(let t=o._indexOf(n);t>0;t--)if(e[t].top<=i){l=e[t];break}l||(l=e[0]),o._focus(l),o.scrollTop=l.top,0===o._indexOf(l)&&(o.scrollTop=0)}_autoOpenOnKeyDown(e){const t=this;if(t.opened||!t.opened&&t.autoOpenShortcutKey.indexOf(e.key)<0)return;t.selectedIndexes.length&&t._focus(t.items[t.selectedIndexes[t.selectedIndexes.length-1]]);const o="function"==typeof t._focusedItem?t._focusedItem():t._focusedItem;return t.open(),(!o||o&&!o._focused)&&("ArrowDown"===e.key?t._focus(t.items[0]):"ArrowUp"===e.key&&t._focus(t.items[t.items.length-1]),t.ensureVisible(t._focusedItem)),!0}_keyUpHandler(e){const t=this,o=t.enableShadowDOM?e.composedPath()[0]:e.target;if(!(t.disabled||"none"===t.escKeyMode&&"Escape"===e.key||o===t.$.listBox.$.filterInput))if(delete t._preventInputChangeEvent,o===t.$.input&&"oneOrManyExtended"===t.selectionMode&&(t.$.listBox._keysPressed[e.key]=!1),["one","zeroAndOne","radioButton","zeroOrOne"].indexOf(t.selectionMode)>-1&&1===t.selectedIndexes.length&&t.$.input.value!==(t._currentSelection?t._currentSelection[0]:void 0)&&t.unselect(t.$.listBox._items[t.selectedIndexes[0]]),"Enter"!==e.key){if(o===t.$.input&&e.key.indexOf("Arrow")<0&&["Control","Shift"].indexOf(e.key)<0){if(t.value===t.$.input.value)return;if(t._currentSelection?t.value=t._currentSelection.toString()+(t._currentSelection.length>0?",":"")+t.$.input.value:t.value=t.$.input.value,t.$.autoCompleteString.textContent="",t._closedFromKeyCombination)return void(t._closedFromKeyCombination=!1);if("none"!==t.autoComplete&&"list"!==t.autoComplete?(t.$.input.value!==(t._currentSelection?t._currentSelection.toString():void 0)||t.$.listBox._filteredItems&&t.$.listBox._filteredItems.length!==t.$.listBox._items.length)&&(t._autoCompleteTimer&&clearTimeout(t._autoCompleteTimer),t._autoCompleteTimer=setTimeout((function(){t._autoComplete(!0)}),t.autoCompleteDelay)):(t.$.input.value.length>0&&t._queryItems(),!t._focusedItem||"Escape"===e.key&&"firstPossibleValue"===t.escKeyMode||(t.open()," "!==e.key&&(t.$.listBox._scrollView.scrollTop=t._focusedItem.offsetTop))),"none"!==t.autoComplete&&"list"!==t.autoComplete&&t.$.listBox._filteredItems&&t.$.listBox._filteredItems.length===t.$.listBox._items.length)return void t.close()}}else t.$.dropDownButton.removeAttribute("active")}_queryItems(e){const t=this;if(!t.value||!t.$.input)return;let o=t.$.listBox._queryItems(t.$.input.previousElementSibling?t.$.input.value:t.value,t.incrementalSearchMode);0===o.length&&t._unfocus();for(let n=0;n<o.length;n++)if(!o[n].hidden){e&&!o[n].selected&&t.select(o[n]),t._focus(o[n]);break}"list"===t.autoComplete&&(t.enableShadowDOM?t.shadowRoot.activeElement:document.activeElement)===t.$.input&&t.$.input.value.length>=t.minLength?(t._lastSelectedItem=t._focusedItem,t._updateAutoCompleteHelper()):t._lastSelectedItem=void 0}_selectStartHandler(e){this._resizeDetails&&this._resizeDetails.started&&e.preventDefault()}_unfocus(){const e=this;e._focusedItem&&(e._focusedItem._focused=!1,e.$.listBox._focusedItem=void 0)}_setAriaRelations(){const e=this;e.setAttribute("role","combobox"),e.setAttribute("aria-describedby",e.$.hint.id),e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-labelledby",e.$.label.id),e._ariaButton=e,e._setAriaAutocomplete()}_setAriaAutocomplete(){const e=this.autoComplete,t=this.$.input;"none"===e?t.setAttribute("aria-autocomplete","none"):"auto"===e||"manual"===e?t.setAttribute("aria-autocomplete","list"):t.setAttribute("aria-autocomplete","both")}}); /***/ }), /***/ 7650: /***/ (() => { Smart("smart-drop-down-list",class extends Smart.ContentElement{static get properties(){return{autoCloseDelay:{value:100,type:"number"},dataSource:{value:null,type:"any",reflectToAttribute:!1},displayLoadingIndicator:{value:!1,type:"boolean"},displayMember:{value:"",type:"string"},displayMode:{allowedValues:["outlined","filled","underlined"],value:"outlined",type:"string"},dropDownAppendTo:{value:null,type:"any"},dropDownButtonPosition:{allowedValues:["none","left","right","top","bottom"],value:"right",defaultReflectToAttribute:!0,type:"string"},dropDownMinHeight:{value:"",type:"any",validator:"_propertyValidator"},dropDownHeight:{value:"",type:"any",validator:"_propertyValidator"},dropDownMaxHeight:{value:"",type:"any",validator:"_propertyValidator"},dropDownOpenMode:{allowedValues:["none","default","dropDownButton","auto"],value:"default",type:"string"},dropDownOverlay:{value:!1,type:"boolean"},dropDownPlaceholder:{value:"No Items",type:"string"},dropDownPosition:{allowedValues:["auto","top","bottom","overlay-top","overlay-center","overlay-bottom","center-bottom","center-top"],value:"auto",type:"string"},dropDownMinWidth:{value:"",type:"any",validator:"_propertyValidator"},dropDownWidth:{value:"",type:"any",validator:"_propertyValidator"},dropDownMaxWidth:{value:"",type:"any",validator:"_propertyValidator"},filterable:{value:!1,type:"boolean"},filterInputPlaceholder:{value:"",type:"string"},filterCallback:{value:null,type:"function?"},filterMode:{value:"startsWithIgnoreCase",allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase","custom"],type:"string"},grouped:{value:!1,type:"boolean"},groupMember:{value:"",type:"string"},hint:{value:"",type:"string"},horizontalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]},incrementalSearchDelay:{value:700,type:"number?"},incrementalSearchMode:{value:"startsWithIgnoreCase",allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string"},itemMeasureMode:{value:"auto",allowedValues:["auto","precise"],type:"string"},inputMember:{value:"label",type:"string"},itemTemplate:{value:null,type:"any"},itemHeight:{value:null,type:"number?"},label:{value:"",type:"string"},loadingIndicatorPlaceholder:{value:"Loading...",type:"string"},loadingIndicatorPosition:{value:"center",allowedValues:["bottom","center","top"],type:"string"},messages:{extend:!0,value:{en:{invalidNode:'{{elementType}}: Invalid parameter "{{node}}" when calling {{method}}.'}},type:"object"},name:{value:"",type:"string"},opened:{value:!1,type:"boolean"},placeholder:{value:"",type:"string"},resizeMode:{value:"none",allowedValues:["none","horizontal","vertical","both"],type:"string"},resizeIndicator:{value:!1,type:"boolean"},selectionDisplayMode:{value:"plain",allowedValues:["plain","placeholder","tokens"],type:"string"},selectionMode:{value:"zeroAndOne",allowedValues:["none","oneOrManyExtended","zeroOrMany","oneOrMany","zeroOrOne","zeroAndOne","one","checkBox","radioButton"],type:"string"},selectedIndexes:{value:[],type:"array"},selectedValues:{value:[],type:"array"},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},tokenTemplate:{value:null,type:"any"},type:{value:"list",type:"string",defaultReflectToAttribute:!0,readonly:!0},valueMember:{value:"",type:"string"},virtualized:{value:!1,type:"boolean"},verticalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]}}}static get listeners(){return{"actionButton.down":"_buttonsDownHandler","actionButton.mouseenter":"_buttonsMouseEventsHandler","actionButton.mouseleave":"_buttonsMouseEventsHandler","actionButton.focus":"_buttonsFocusHandler","actionButton.blur":"_buttonsFocusHandler","document.selectstart":"_selectStartHandler","document.dragstart":"_dragStartHandler","document.down":"_documentDownHandler","document.up":"_documentUpHandler","document.move":"_documentMoveHandler","dropDownButton.down":"_buttonsDownHandler","dropDownButton.mouseenter":"_buttonsMouseEventsHandler","dropDownButton.mouseleave":"_buttonsMouseEventsHandler",keydown:"_keyDownHandler",keyup:"_keyUpHandler",focus:"_focusEventHandler",blur:"_blurEventHandler","dropDownButton.focus":"_buttonsFocusHandler","dropDownButton.blur":"_buttonsFocusHandler","dropDownContainer.transitionend":"_dropDownTransitionendHandler","listBox.change":"_listBoxChangeHandler","listBox.itemClick":"_listBoxItemClickHandler","listBox.keydown":"_listBoxKeyDownHandler","listBox.bindingComplete":"_bindingCompleteHandler","listBox.scrollBottomReached":"_scrollBottomReachedHandler","listBox.scrollTopReached":"_scrollTopReachedHandler",mouseenter:"_mouseEnterHandler",mouseleave:"_mouseLeaveHandler",resize:"_resizeHandler","resizeBar.move":"_resizeBarMoveHandler",styleChanged:"_styleChangedHandler",wheel:"_mouseWheelHandler"}}template(){return'<div id="container" role="presentation">\n <span class="smart-label" id="label">[[label]]</span>\n <div id="content" class="smart-content" role="presentation">\n <div class="smart-buttons-container" id="buttonsContainer" role="presentation">\n <span id="actionButton" class ="smart-action-button" role="presentation">[[placeholder]]</span>\n <span id="dropDownButton" class="smart-drop-down-button">\n <span class ="smart-drop-down-button-icon" id="arrow" aria-hidden="true"></span>\n </span>\n </div>\n <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="presentation">\n <smart-list-box id="listBox" unfocusable\n animation="[[animation]]"\n data-source="[[dataSource]]"\n disabled="[[disabled]]"\n display-loading-indicator="[[displayLoadingIndicator]]"\n display-member="[[displayMember]]"\n filterable="[[filterable]]"\n filter-callback="[[filterCallback]]"\n filter-mode="[[filterMode]]"\n filter-input-placeholder="[[filterInputPlaceholder]]"\n grouped="[[grouped]]"\n group-member="[[groupMember]]"\n item-height="[[itemHeight]]"\n item-measure-mode="[[itemMeasureMode]]"\n item-template="[[itemTemplate]]"\n incremental-search-delay="[[incrementalSearchDelay]]"\n incremental-search-mode="[[incrementalSearchMode]]"\n loading-indicator-placeholder="[[loadingIndicatorPlaceholder]]"\n loading-indicator-position="[[loadingIndicatorPosition]]"\n name="[[name]]"\n placeholder="[[dropDownPlaceholder]]"\n right-to-left="[[rightToLeft]]"\n readonly="[[readonly]]"\n selected-indexes="{{selectedIndexes}}"\n selection-mode="[[selectionMode]]"\n selected-values="{{selectedValues}}"\n sorted="[[sorted]]"\n sort-direction="[[sortDirection]]"\n theme="[[theme]]"\n value-member="[[valueMember]]"\n horizontal-scroll-bar-visibility="[[horizontalScrollBarVisibility]]"\n vertical-scroll-bar-visibility="[[verticalScrollBarVisibility]]"\n virtualized="[[virtualized]]">\n <content></content>\n </smart-list-box>\n <div id="resizeBar" class="smart-drop-down-resize-bar" aria-label="Resize">\n <div></div>\n </div>\n </div>\n </div>\n <span class="smart-hint smart-hidden" id="hint">[[hint]]</span>\n <input id="hiddenInput" type="hidden" name="[[name]]">\n </div>'}static get styleUrls(){return["smart.dropdownlist.css","smart.dropdown.css"]}dataBind(){this.$.listBox.dataBind()}propertyChangedHandler(e,t,o){super.propertyChangedHandler(e,t,o);const n=this;switch(e){case"animation":n.$.dropDownContainer.setAttribute("animation",n.animation);break;case"disabled":n._setFocusable(),n.close(),n._positionDetection.handleAutoPositioning();break;case"dataSource":case"displayMember":case"inputMember":n.$.actionButton&&(n.$.actionButton.innerHTML=n.placeholder),n._setDropDownSize(),n._positionDetection.checkBrowserBounds("vertically"),n._positionDetection.positionDropDown(),n._positionDetection.checkBrowserBounds("horizontally");break;case"dropDownAppendTo":n._positionDetection.dropDownAppendToChangedHandler();break;case"dropDownOpenMode":n._setFocusable(),n.$dropDownContainer.addClass("smart-visibility-hidden"),n.$.dropDownContainer.setAttribute("drop-down-open-mode",o),n.$.dropDownButton.removeAttribute("selected"),n.removeAttribute("drop-down-button-focus"),n.removeAttribute("action-button-focus"),n.opened=!1,n._ariaButton&&n._ariaButton.setAttribute("