@syncfusion/ej2-multicolumn-combobox 29.2.4 → 30.1.37
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/.eslintrc.json +2 -0
- package/dist/ej2-multicolumn-combobox.umd.min.js +2 -2
- package/dist/ej2-multicolumn-combobox.umd.min.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es2015.js +8 -0
- package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es5.js +8 -0
- package/dist/es6/ej2-multicolumn-combobox.es5.js.map +1 -1
- package/dist/global/ej2-multicolumn-combobox.min.js +2 -2
- package/dist/global/ej2-multicolumn-combobox.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +14 -49
- package/src/multicolumn-combobox/multi-column-combo-box.d.ts +1 -0
- package/src/multicolumn-combobox/multi-column-combo-box.js +8 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-multicolumn-combobox.min.js
|
|
3
|
-
* version :
|
|
3
|
+
* version : 30.1.37
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
this.ej=this.ej||{},this.ej.multicolumncombobox=function(t,e,i,n,r,o){"use strict";var s=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},l=function(t,e,i,n){return new(i||(i=Promise))(function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):new i(function(e){e(t.value)}).then(s,a)}l((n=n.apply(t,e||[])).next())})},p=function(t,e){function i(t){return function(e){return n([t,e])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,o&&(s=2&i[0]?o.return:i[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,i[1])).done)return s;switch(o=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,o=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){l.label=i[1];break}if(6===i[0]&&l.label<s[1]){l.label=s[1],s=i;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(i);break}s[2]&&l.ops.pop(),l.trys.pop();continue}i=e.call(t,l)}catch(t){i=[6,t],o=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var r,o,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},u="e-nodata",d=function(){function t(){}return t.prototype.InjectModules=function(){o.Grid.Inject(o.VirtualScroll,o.Group,o.Edit,o.Sort,o.Resize)},t}();!function(t){t.StartsWith="StartsWith",t.EndsWith="EndsWith",t.Contains="Contains"}(t.FilterType||(t.FilterType={})),function(t){t.None="None",t.Ascending="Ascending",t.Descending="Descending"}(t.SortOrder||(t.SortOrder={})),function(t){t.OneColumn="OneColumn",t.MultipleColumns="MultipleColumns"}(t.SortType||(t.SortType={})),function(t){t.Both="Both",t.Content="Content",t.Header="Header"}(t.WrapMode||(t.WrapMode={}));var h=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s(i,t),a([e.Property()],i.prototype,"text",void 0),a([e.Property()],i.prototype,"value",void 0),a([e.Property()],i.prototype,"groupBy",void 0),i}(e.ChildProperty),c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s(i,t),a([e.Property("")],i.prototype,"field",void 0),a([e.Property("")],i.prototype,"header",void 0),a([e.Property("")],i.prototype,"width",void 0),a([e.Property("")],i.prototype,"textAlign",void 0),a([e.Property(null)],i.prototype,"format",void 0),a([e.Property(!1)],i.prototype,"displayAsCheckBox",void 0),a([e.Property(null)],i.prototype,"template",void 0),a([e.Property(null)],i.prototype,"headerTemplate",void 0),a([e.Property(null)],i.prototype,"customAttributes",void 0),i}(e.ChildProperty),g=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return s(n,i),a([e.Property(!1)],n.prototype,"enableAltRow",void 0),a([e.Property(null)],n.prototype,"rowHeight",void 0),a([e.Property("Default")],n.prototype,"gridLines",void 0),a([e.Property(!1)],n.prototype,"allowTextWrap",void 0),a([e.Property(t.WrapMode.Both)],n.prototype,"textWrapMode",void 0),a([e.Property(!1)],n.prototype,"allowResizing",void 0),a([e.Event()],n.prototype,"resizing",void 0),a([e.Event()],n.prototype,"resizeStart",void 0),a([e.Event()],n.prototype,"resizeStop",void 0),n}(e.ChildProperty),f=function(f){function y(t,e){var i=f.call(this,t,e)||this;return i.gridInject=new d,i.isShowSpinner=!0,i.gridInject.InjectModules(),i}return s(y,f),y.prototype.preRender=function(){this.element.id||(this.element.id=e.getUniqueID("e-"+this.getModuleName())),this.keyConfigs={escape:"escape",altUp:"alt+uparrow",altDown:"alt+downarrow",tab:"tab",shiftTab:"shift+tab",end:"end",enter:"enter",home:"home",moveDown:"downarrow",moveUp:"uparrow"},this.matchedRowEle=this.matchedContent=this.exactMatchedContent=null,this.persistData()},y.prototype.getDirective=function(){return"EJS-MULTICOLUMNCOMBOBOX"},y.prototype.getModuleName=function(){return"multicolumncombobox"},y.prototype.getPersistData=function(){return this.addOnPersist(["value"])},y.prototype.persistData=function(){if(this.enablePersistence){this.element.id+="_wrapper";var t=window.localStorage.getItem(this.getModuleName()+this.element.id);e.isNullOrUndefined(t)||""===t||this.setProperties(JSON.parse(t),!0)}},y.prototype.render=function(){this.renderInput(),this.renderGrid(),this.popupDiv=this.createElement("div",{className:"e-popup-content"}),this.popupDiv.appendChild(this.gridEle),this.setHTMLAttributes(),this.renderPopup(),this.wireEvents()},y.prototype.setHiddenValue=function(){if(e.isNullOrUndefined(this.value))return void(this.hiddenElement.innerHTML="");var t=this.hiddenElement.querySelector("option");if(e.isNullOrUndefined(t)){if(!e.isNullOrUndefined(this.hiddenElement)){var i=document.createElement("option");i.text=this.text,i.setAttribute("value",this.value.toString()),i.setAttribute("selected",""),this.hiddenElement.appendChild(i)}}else t.textContent=this.text,t.setAttribute("value",this.value.toString())},y.prototype.renderGrid=function(){var i=this,r=this.getGridColumns(),s=this.sortOrder.toString().toLowerCase();this.gridObj=new o.Grid({dataSource:this.dataSource,columns:r,allowSorting:this.allowSorting,enableStickyHeader:!0,gridLines:this.gridSettings.gridLines,rowHeight:this.gridSettings.rowHeight,enableAltRow:this.gridSettings.enableAltRow,enableVirtualization:this.enableVirtualization,enableRtl:this.enableRtl,editSettings:{allowAdding:!1},query:this.query,allowTextWrap:this.gridSettings.allowTextWrap,textWrapSettings:{wrapMode:this.gridSettings.textWrapMode},height:this.popupHeight,allowResizing:this.gridSettings.allowResizing,allowMultiSorting:"multiplecolumns"===this.sortType.toString().toLowerCase()&&this.allowSorting,rowTemplate:this.itemTemplate,beforeDataBound:function(){i.dataSource instanceof n.DataManager&&i.isShowSpinner&&(i.showHideSpinner(!0),i.isShowSpinner=!1)},dataBound:function(){i.onDataBound()},actionFailure:function(t){i.onActionFailure(t)},actionBegin:function(t){i.trigger("actionBegin",t)},actionComplete:this.handleActionComplete.bind(this),keyPressed:this.handleKeyPressed.bind(this),resizing:function(t){i.gridSettings.resizing&&i.gridSettings.resizing.call(i,t)},resizeStart:function(t){i.gridSettings.resizeStart&&i.gridSettings.resizeStart.call(i,t)},resizeStop:function(t){i.gridSettings.resizeStop&&i.gridSettings.resizeStop.call(i,t)}}),this.gridEle=this.createElement("div",{id:this.element.id+"_"+e.getUniqueID("grid"),className:"e-multicolumn-grid"}),this.updateGroupByField(),r.length>0&&(this.gridObj.columns[0].isPrimaryKey=!0),"none"!==s&&(this.gridObj.sortSettings={columns:[{field:this.fields.text,direction:"ascending"===s?t.SortOrder.Ascending:t.SortOrder.Descending}]}),this.gridObj.appendTo(this.gridEle),e.isNullOrUndefined(this.value)&&e.isNullOrUndefined(this.text)&&e.isNullOrUndefined(this.index)||this.initValue(null,null,!0)},y.prototype.handleActionComplete=function(t){var e=this;if(this.trigger("actionComplete",t),"sorting"===t.requestType&&this.updateRowSelection(t),Array.isArray(t.rows)&&this.isDataFiltered){var i=0;t.rows.forEach(function(t){var n=e.gridObj.getRowElementByUID(t.uid);n&&(i+=n.getBoundingClientRect().height)}),this.popupRowHeight=i||parseFloat(this.popupHeight),this.updateGridHeight(!0,!0)}this.popupObj.refreshPosition(),this.gridObj.element.querySelector(".e-content").scrollTop=0},y.prototype.handleKeyPressed=function(t){"Enter"===t.key&&(t.cancel=!0,this.isPopupOpen&&(this.selectedGridRow(this.gridObj.getRows()[this.gridObj.selectedRowIndex],t,!0),this.hidePopup(t),this.focusIn(t))),this.fields.groupBy&&(t.cancel=!0,this.gridKeyActionHandler(t,!0))},y.prototype.isRowMatching=function(t,e,i){var n=function(t){var e=[];return t&&"object"==typeof t?Array.isArray(t)?t.forEach(function(t){return e.push.apply(e,n(t))}):Object.keys(t).forEach(function(i){return e.push.apply(e,n(t[""+i]))}):null!=t&&e.push(String(t)),e},r=n(t);return-1!==r.indexOf(e)&&-1!==r.indexOf(i)},y.prototype.updateRowSelection=function(t){var e=this;t&&t.rows.forEach(function(t){e.selectDataRow(t.data,t.index)})},y.prototype.selectDataRow=function(t,e){if(this.isRowMatching(t,this.value?this.value.toString():"",this.text?this.text.toString():"")){this.gridObj.selectRow(e);var i=this.isProtectedOnChange;return this.isProtectedOnChange=!0,this.index=e,void(this.isProtectedOnChange=i)}},y.prototype.findIndex=function(t,e){return t.findIndex(function(t){return Object.keys(e).every(function(i){return t[i]===e[i]})})},y.prototype.getGridColumns=function(){var t=this;return this.columns.map(function(e){var i=e.field,n=e.header,r=e.width,o=e.textAlign,s=e.format,a=e.displayAsCheckBox,l=e.template,p=e.headerTemplate,u=e.customAttributes;return{field:i,headerText:n,width:r,textAlign:""===o.toString()&&t.enableRtl?"Right":o,format:s,displayAsCheckBox:a,template:l,headerTemplate:p,customAttributes:u,type:a&&!s?"boolean":void 0}})},y.prototype.updateGroupByField=function(){var t=this.fields.groupBy,i=""!==t&&!e.isNullOrUndefined(t);if(i){"multiplecolumns"!==this.sortType.toString().toLowerCase()&&this.gridEle.classList.add("e-multicolumn-group");var n=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.allowGrouping=!0,this.gridObj.groupSettings={showDropArea:!1,columns:[t]},this.groupTemplate&&i&&(this.gridObj.groupSettings.captionTemplate=this.groupTemplate),this.isVue&&(this.gridObj.isVue=this.isVue),this.isProtectedOnChange=n}},y.prototype.onDataBound=function(){var t=this,i=this.dataSource.length,r=this.popupDiv.querySelector(".e-multicolumn-grid"),o=this.popupDiv.classList.contains(u);if(i<=0&&r)this.l10nUpdate(),this.popupDiv.removeChild(this.gridEle),e.addClass([this.popupDiv],[u]);else if(o&&i>=1){e.removeClass([this.popupDiv],[u]);var s=this.popupDiv.querySelector(".e-no-records");s&&this.popupDiv.removeChild(s)}if(this.isInitialRender){var a=this.popupDiv.querySelector(".e-gridcontent tr"),l=o?this.popupDiv.getBoundingClientRect().height:a?a.getBoundingClientRect().height:0;this.popupRowHeight=l,this.popupObj.hide(),this.popupEle.style.visibility="unset",this.isInitialRender=!1}var p=this.gridObj.element.querySelectorAll(".e-row");this.isDataFiltered&&p.length>0&&""!==this.inputEle.value&&p[0].classList.add("e-row-focus"),this.dataSource instanceof n.DataManager&&setTimeout(function(){t.showHideSpinner(!1)})},y.prototype.showHideSpinner=function(t){t?r.showSpinner(this.dropdownElement):r.hideSpinner(this.dropdownElement)},y.prototype.onActionFailure=function(t){this.trigger("actionFailure",t),this.l10nUpdate(!0),e.addClass([this.popupDiv],[u])},y.prototype.renderInput=function(){var t=["aria-expanded","aria-readOnly","aria-disabled","autocomplete","autocapitalize","spellcheck","tabindex"];"INPUT"===this.element.tagName?(this.inputEle=this.element,e.isNullOrUndefined(this.inputEle.getAttribute("role"))&&this.inputEle.setAttribute("role","combobox"),e.isNullOrUndefined(this.inputEle.getAttribute("type"))&&this.inputEle.setAttribute("type","text"),function(i,n){for(var r in n)n.hasOwnProperty(r)&&-1!==t.indexOf(r)&&e.isNullOrUndefined(i.getAttribute(r))&&i.setAttribute(r,n[r])}(this.inputEle,{"aria-expanded":"false","aria-readOnly":this.readonly.toString(),"aria-disabled":this.disabled.toString(),autocomplete:"off",autocapitalize:"off",spellcheck:"false",tabindex:"0"})):(this.inputEle=this.createElement("input",{attrs:{role:"textbox",type:"text"}}),this.element.parentElement.insertBefore(this.inputEle,this.element)),this.inputObj=i.Input.createInput({element:this.inputEle,buttons:["e-input-group-icon e-multicolumn-list-icon e-icons"],floatLabelType:this.floatLabelType,properties:{enabled:!this.disabled,readonly:this.readonly,placeholder:this.placeholder,enableRtl:this.enableRtl,showClearButton:this.showClearButton,cssClass:this.cssClass}},this.createElement),this.inputWrapper=this.inputObj.container,this.inputWrapper.classList.add("e-multicolumn-list"),this.inputWrapper.setAttribute("spellcheck","false"),this.hiddenElement=this.createElement("select",{attrs:{"aria-hidden":"true",tabindex:"-1",class:"e-multicolumn-list-hidden"}}),e.prepend([this.hiddenElement],this.inputWrapper);var n=this.inputEle.getAttribute("name")?this.inputEle.getAttribute("name"):this.inputEle.getAttribute("id");this.hiddenElement.setAttribute("name",n),this.inputEle.removeAttribute("name"),this.hiddenElement.hasAttribute("aria-label")||this.hiddenElement.setAttribute("aria-label",this.getModuleName()),this.element.tagName===this.getDirective()&&this.element.appendChild(this.inputWrapper),this.setElementWidth(this.width),this.dropdownElement=this.inputWrapper.querySelector(".e-input-group-icon.e-multicolumn-list-icon.e-icons"),r.createSpinner({target:this.dropdownElement})},y.prototype.setElementWidth=function(t){if(!e.isNullOrUndefined(t)){var i=this.inputWrapper;"number"==typeof t?i.style.width=e.formatUnit(t):"string"==typeof t&&(i.style.width=t.match(/px|%|em/)?t:e.formatUnit(t))}},y.prototype.setHTMLAttributes=function(){var t=this,e=this.htmlAttributes,n=this.inputEle;if(Object.keys(e).length)for(var r=0,o=Object.keys(e);r<o.length;r++){var s=o[r];switch(s){case"class":this.inputWrapper.classList.add(e[s]);break;case"disabled":this.setProperties({enabled:!1},!0),this.setEnable();break;case"readonly":this.setProperties({readonly:!0},!0),this.dataBind();break;case"style":var a=e[s];this.inputWrapper.style.cssText="",a&&a.split(";").forEach(function(e){var i=e.split(":").map(function(t){return t.trim()}),n=i[0],r=i[1];n&&r&&t.inputWrapper.style.setProperty(n,r)});break;default:var l=["title","id","placeholder","role","autocomplete","autocapitalize","spellcheck","minlength","maxlength"];["name","required"].indexOf(s)>-1||0===s.indexOf("data")?this.hiddenElement.setAttribute(s,this.htmlAttributes[""+s]):l.indexOf(s)>-1&&"placeholder"===s?i.Input.setPlaceholder(e[s],n):n.setAttribute(s,e[s])}}},y.prototype.setEnable=function(){i.Input.setEnabled(!this.disabled,this.inputEle),this.disabled?(this.isPopupOpen&&this.hidePopup(),e.addClass([this.inputWrapper],"e-disabled"),this.inputWrapper&&this.inputWrapper.classList.contains("e-input-focus")&&e.removeClass([this.inputWrapper],["e-input-focus"]),this.setAriaDisabled("true")):(e.removeClass([this.inputWrapper],"e-disabled"),this.setAriaDisabled("false"))},y.prototype.setAriaDisabled=function(t){this.inputEle.setAttribute("aria-disabled",t),this.inputWrapper.setAttribute("aria-disabled",t)},y.prototype.updateFieldValue=function(t,i){return e.getValue(t,i).toString()},y.prototype.initValue=function(t,i,r){var o,s,a,l,p=this,u=this.gridObj.getSelectedRecords()[0],d=this.gridObj.getSelectedRows()[0],h=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=this.value?this.value.toString():this.value,this.isProtectedOnChange=h;var c=function(t){var e=p.updateCurrentValues(o,t);s=e.currentValue,a=e.currentText,l=e.currentIndex};if(!t&&(!e.isNullOrUndefined(this.value)||!e.isNullOrUndefined(this.text))||t&&void 0!==i){var g=t?i?this.value:this.text:e.isNullOrUndefined(this.value)?this.text:this.value;!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof n.DataManager?this.dataSource.executeQuery(new n.Query).then(function(n){var h=n.result,f=h.filter(function(n){return p.updateFieldValue(t?i?p.fields.value:p.fields.text:e.isNullOrUndefined(p.value)?p.fields.text:p.fields.value,n)===g});f.length>0&&(o=f[0],c(h),p.updateChangeEvent(o,u,d,s,a,l,t,r),p.gridObj.selectRow(p.index))}):!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array&&(o=this.dataSource.filter(function(n){return p.updateFieldValue(t?i?p.fields.value:p.fields.text:e.isNullOrUndefined(p.value)?p.fields.text:p.fields.value,n)===g})[0],c(this.dataSource))}else e.isNullOrUndefined(this.index)||(!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof n.DataManager?this.dataSource.executeQuery(new n.Query).then(function(e){var i=e.result;o=i[p.index],c(i),p.updateChangeEvent(o,u,d,s,a,l,t,r),p.gridObj.selectRow(p.index)}):!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array&&(this.fields.groupBy?setTimeout(function(){var e=p.gridObj.getRows();if(e&&e.length>0)for(var i=p.gridObj.getRowInfo(e[p.index]).rowData,n=p.fields.value,h=0;h<e.length;h++)if(i&&i[parseInt(n.toString(),10)]===p.dataSource[parseInt(h.toString(),10)][parseInt(n.toString(),10)]){o=i,c(p.dataSource),p.updateChangeEvent(o,u,d,s,a,l,t,r),p.gridObj.selectRow(p.index);break}}):(o=this.dataSource[this.index],c(this.dataSource))));this.dataSource instanceof n.DataManager||this.updateChangeEvent(o,u,d,s,a,l,t,r)},y.prototype.updateChangeEvent=function(t,e,i,n,r,o,s,a){var l=t?this.updateFieldValue(this.fields.value,t):null,p={value:t?l:null,itemData:{text:r,value:n},item:this.getDataByValue(this.value),previousItemData:e,previousItemElement:i,itemElement:this.inputWrapper,event:null,isInteracted:!s};this.updateValues(n,r,o,p,a)},y.prototype.updateCurrentValues=function(t,n){if(!e.isNullOrUndefined(t)){var r=this.updateFieldValue(this.fields.text,t),o=this.updateFieldValue(this.fields.value,t);return i.Input.setValue(r,this.inputEle,this.floatLabelType,this.showClearButton),{currentValue:o,currentText:r,currentIndex:n.indexOf(t)}}return{currentValue:null,currentText:null,currentIndex:null}},y.prototype.renderPopup=function(){this.popupEle=this.createElement("div",{id:this.element.id+"_options",className:"e-multicolumn-list e-popup "+(null!==this.cssClass?this.cssClass:"")}),e.attributes(this.popupEle,{"aria-label":this.element.id,role:"dialog"}),document.body.appendChild(this.popupEle),this.createPopup(this.popupEle),e.prepend([this.popupDiv],this.popupEle),this.footerTemplate&&this.setFooterTemplate();var t=this.getSize(!1);if(this.popupEle.style.maxHeight=t,this.footerTemplate){var i=Math.round(this.footer.getBoundingClientRect().height);t=e.formatUnit(parseInt(t,10)-i+"px")}this.popupDiv.style.maxHeight=t,this.updateGridHeight(),this.popupEle.style.visibility="hidden",this.isInitialRender=!0},y.prototype.updateGridHeight=function(t,i){var n;if(t){var r=this.gridObj.getContent().querySelector(".e-content"),o=r.offsetHeight-r.clientHeight;""===this.fields.groupBy||e.isNullOrUndefined(this.fields.groupBy)||(this.popupRowHeight+=this.popupRowHeight),n=i&&this.popupRowHeight<this.prevGridHeight?this.popupRowHeight+o+"px":this.prevGridHeight+"px"}else this.prevGridHeight=this.popupDiv.getBoundingClientRect().height-this.popupDiv.querySelector(".e-gridheader").getBoundingClientRect().height,n=this.prevGridHeight+"px";var s=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.height=n,this.isProtectedOnChange=s},y.prototype.createPopup=function(t){var i=this;this.popupObj=new r.Popup(t,{width:this.getSize(!0),targetType:"relative",collision:{X:"flip",Y:"flip"},relateTo:this.inputWrapper,enableRtl:this.enableRtl,position:{X:"left",Y:"bottom"},targetExitViewport:function(){e.Browser.isDevice||i.hidePopup()},open:function(){i.inputEle.focus(),i.updateClearIconState()}})},y.prototype.setFooterTemplate=function(){this.footer?this.isReact&&"function"==typeof this.footerTemplate?this.clearTemplate(["footerTemplate"]):this.footer.innerHTML="":(this.footer=this.createElement("div"),e.addClass([this.footer],"e-popup-footer"));var t=this.getTemplateFunction(this.footerTemplate)({count:this.dataSource.length},this,"footerTemplate",this.element.id+"footerTemplate",this.isStringTemplate,void 0,this.footer);t&&(t=Array.prototype.slice.call(t),e.append(t,this.footer)),e.append([this.footer],this.popupEle)},y.prototype.l10nUpdate=function(t){if(this.noRecord?this.noRecord.innerHTML="":this.noRecord=this.createElement("div"),"No records found"!==this.noRecordsTemplate||"Request Failed"!==this.actionFailureTemplate){var i=t?this.actionFailureTemplate:this.noRecordsTemplate,n=t?this.element.id+"_actionFailure":this.element.id+"_noRecords",r=t?"actionFailureTemplate":"noRecordsTemplate",o=this.getTemplateFunction(i)({},this,r,n,this.isStringTemplate,void 0,this.noRecord);o&&(o=Array.prototype.slice.call(o),e.append(o,this.noRecord))}else{var s={noRecordsTemplate:"No records found",actionFailureTemplate:"Request Failed"};this.l10n=new e.L10n("multicolumncombobox",s,this.locale),this.noRecord.innerHTML=t?this.l10n.getConstant("actionFailureTemplate"):this.l10n.getConstant("noRecordsTemplate")}e.addClass([this.noRecord],"e-no-records"),e.prepend([this.noRecord],this.popupDiv),this.popupObj.refreshPosition()},y.prototype.getTemplateFunction=function(t){if("string"==typeof t){var i="";try{var n=e.select(t);i=n?"SCRIPT"===n.tagName?n.innerHTML:n.outerHTML:t}catch(e){i=t}return e.compile(i)}return e.compile(t)},y.prototype.getSize=function(t){var i=t?this.popupWidth:this.popupHeight,n=e.formatUnit(i);return n.includes("%")?n=((t?this.inputWrapper.offsetWidth:document.documentElement.clientHeight)*parseFloat(n)/100).toString()+"px":"string"==typeof i&&(n=i.match(/px|em/)?i:n),n},y.prototype.selectedGridRow=function(t,e,n){var r=this,o={isInteracted:!!e,item:this.gridObj.getSelectedRecords()[0],itemElement:t,itemData:this.gridObj.getSelectedRecords()[0],event:e,cancel:!1},s=this.gridObj.getSelectedRecords()[0],a=s?this.updateFieldValue(this.fields.text,s):"",l=s?this.updateFieldValue(this.fields.value,s):"",p={isInteracted:!!e,item:s,itemElement:t,itemData:{text:s?a:"",value:s?l:""},event:e,cancel:!1,value:s?l:"",previousItemData:{text:this.text,value:this.value},previousItemElement:this.previousItemElement};this.trigger("select",o,function(t){if(!t.cancel&&t.itemData){var o=e,u="Enter"===o.key||"Tab"===o.key||o.shiftKey&&"Tab"===o.key||o.altKey&&"ArrowUp"===o.key;(!n||n&&u)&&r.updateValues(s?l:"",s?a:"",r.gridObj.selectedRowIndex,p),i.Input.setValue(s?a:"",r.inputEle,r.floatLabelType,r.showClearButton),r.setHiddenValue(),(!n||n&&u)&&r.hidePopup(e)}})},y.prototype.updateValues=function(t,i,n,r,o){this.previousItemElement=r.itemElement;var s=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.text=i||this.text,this.value=t||this.value,this.index=this.selectedRowIndex=e.isNullOrUndefined(n)?this.index:n,this.isProtectedOnChange=s,this.setHiddenValue(),o||this.triggerChangeEvent(r)},y.prototype.triggerChangeEvent=function(t){this.trigger("change",t,function(t){t.cancel})},y.prototype.inputHandler=function(t){var e=this;if(this.showPopup(null,!0),this.updateClearIconState(),this.allowFiltering){var i=t.target.value.toLowerCase(),n=!1,r={preventDefaultAction:!1,text:i,updateData:function(t,o,s){r.cancel||(n=!0,e.filterAction(t,i,o,s))},event:t,cancel:!1};this.trigger("filtering",r,function(t){t.cancel||t.preventDefaultAction||n||e.filterAction(e.dataSource,i,e.query,e.fields)})}this.updateInputValue(t.target.value)},y.prototype.updateInputValue=function(t){return l(this,void 0,void 0,function(){var e,i,r,o,s,a,l;return p(this,function(p){switch(p.label){case 0:return this.dataSource instanceof n.DataManager?(s=new n.Query,[4,this.dataSource.executeQuery(s)]):[3,2];case 1:return a=p.sent(),l=a.result,e=this.filterDatas(l,t),r=e.data,o=e.exactData,[3,3];case 2:Array.isArray(this.dataSource)&&(i=this.filterDatas(this.dataSource,t),r=i.data,o=i.exactData),p.label=3;case 3:return this.selectFilteredRows(r,o),[2]}})})},y.prototype.filterDatas=function(t,e){var i=this;return{data:t.filter(function(t){var n=i.updateFieldValue(i.fields.text,t);return e&&n.toLowerCase().startsWith(e.toLowerCase())}),exactData:t.filter(function(t){return i.updateFieldValue(i.fields.text,t)===e})}},y.prototype.selectFilteredRows=function(t,e){if(t.length<=0)return void(this.matchedRowEle=this.matchedContent=this.exactMatchedContent=null);this.matchedContent=t[0],this.exactMatchedContent=e[0];var i=this.findIndex(this.gridObj.currentViewData,this.matchedContent);this.matchedRowEle=this.gridObj.getRowByIndex(i)},y.prototype.filterAction=function(t,i,r,o){var s=this,a=r||new n.Query,l=this.filterType.toString().toLowerCase();if(e.isNullOrUndefined(r)&&e.isNullOrUndefined(o))this.updateGridDataSource(t);else if(r)t instanceof n.DataManager?this.filteringHandler(t,i,r,o):new n.DataManager(t).executeQuery(r).then(function(t){var e=t.result;s.updateGridDataSource(e)});else if(t instanceof n.DataManager)this.filteringHandler(t,i,a,o);else if(Array.isArray(t)){var p=t.filter(function(t){return s.filterData(t,l,i,o)});this.updateGridDataSource(p)}},y.prototype.filteringHandler=function(t,e,i,n){var r,o=this,s=this.filterType.toString().toLowerCase();t.executeQuery(i).then(function(t){var i=t.result;r=i.filter(function(t){return o.filterData(t,s,e,n)}),o.updateGridDataSource(r)})},y.prototype.filterData=function(t,e,i,n){var r=this.updateFieldValue(n?n.text:this.fields.text,t).toLowerCase();switch(e){case"startswith":return r.startsWith(i);case"endswith":return r.endsWith(i);case"contains":return r.includes(i);default:return!1}},y.prototype.updateGridDataSource=function(t){if(t.length>0){e.removeClass([this.popupDiv],[u]);var i=this.popupDiv.querySelector(".e-no-records");i&&this.popupDiv.removeChild(i),this.gridObj.dataSource=t,this.isDataFiltered=!0}else this.l10nUpdate(),e.addClass([this.popupDiv],[u])},y.prototype.wireEvents=function(){e.isNullOrUndefined(this.inputObj.buttons[0])||(e.EventHandler.add(this.inputObj.buttons[0],"mousedown",this.preventBlur,this),e.EventHandler.add(this.inputObj.buttons[0],"mousedown",this.dropDownClick,this)),e.EventHandler.add(document,"mousedown",this.onDocumentClick,this),e.EventHandler.add(this.gridEle,"click",this.onMouseClick,this),e.EventHandler.add(this.inputEle,"input",this.inputHandler,this),e.EventHandler.add(this.inputEle,"focus",this.focusIn,this),this.showClearButton&&e.EventHandler.add(this.inputObj.clearButton,"mousedown",this.clearText,this),e.EventHandler.add(window,"resize",this.windowResize,this),this.keyboardModule=new e.KeyboardEvents(this.inputWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.keyboardModule=new e.KeyboardEvents(this.gridEle,{keyAction:this.gridKeyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},y.prototype.unWireEvents=function(){e.isNullOrUndefined(this.inputObj.buttons[0])||(e.EventHandler.remove(this.inputObj.buttons[0],"mousedown",this.preventBlur),e.EventHandler.remove(this.inputObj.buttons[0],"mousedown",this.dropDownClick)),e.EventHandler.remove(document,"mousedown",this.onDocumentClick),e.EventHandler.remove(this.inputEle,"input",this.inputHandler),e.EventHandler.remove(this.inputWrapper,"focus",this.focusIn),e.EventHandler.remove(window,"resize",this.windowResize),e.EventHandler.remove(this.gridEle,"click",this.onMouseClick),this.showClearButton&&e.EventHandler.remove(this.inputObj.clearButton,"mousedown",this.clearText),this.keyboardModule&&this.keyboardModule.destroy()},y.prototype.preventBlur=function(t){t.preventDefault()},y.prototype.dropDownClick=function(t){if(!this.disabled&&!this.readonly){var e=this.gridEle.querySelector(".e-row-focus");e&&e.classList.remove("e-row-focus"),this.isPopupOpen?this.hidePopup(t):this.showPopup(t)}},y.prototype.onMouseClick=function(t){var i=t.target,n=e.closest(i,".e-row"),r=this.gridObj.selectedRowIndex;n&&(r>=0?this.selectedGridRow(n,t):(this.gridObj.selectedRowIndex=this.gridObj.getRows().indexOf(n),this.gridObj.selectRow(this.gridObj.selectedRowIndex),this.hidePopup(t)))},y.prototype.onDocumentClick=function(t){var i=t.target;if(this.disabled||this.readonly||!this.isPopupOpen)return void(i.closest(".e-multicolumn-list")||this.focusOut());if(i.classList.contains("e-multicolumn-list-icon")||e.closest(i,".e-multicolumn-list.e-popup"))t.preventDefault();else if(!i.classList.contains("e-multicolumncombobox")&&!i.classList.contains("e-clear-icon")){e.isNullOrUndefined(this.text)||this.updateInputValue(this.text);var n=""===this.inputEle.value;this.updateValuesOnInput(t,null,n)}},y.prototype.updateValuesOnInput=function(t,e,i,n){void 0===n&&(n=!1);var r=t||e,o=n?this.matchedContent:this.exactMatchedContent;if(o||"Enter"===r.code||(this.inputEle.value=this.value=this.index=this.text=null),this.hidePopup(r),this.matchedRowEle&&!i&&o){u=this.isProtectedOnChange;this.isProtectedOnChange=!0;var s=this.updateFieldValue(this.fields.text,this.matchedContent),a=this.updateFieldValue(this.fields.value,this.matchedContent);this.inputEle.value=s,this.value=a;var l=this.findIndex(this.gridObj.currentViewData,this.matchedContent);this.index=l,this.text=s,this.gridObj.selectRow(l),this.selectedGridRow(this.gridObj.getRowByIndex(l),r),this.previousItemElement=this.gridObj.getSelectedRows()[0],this.isProtectedOnChange=u}else if(this.isDataFiltered){this.inputEle.value="";var p={value:null,itemData:{text:null,value:null},item:null,previousItemData:{text:this.text,value:this.value},previousItemElement:this.previousItemElement,itemElement:null,event:r,isInteracted:!0,cancel:!1},u=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.text=this.value=this.index=null,this.gridObj.refreshColumns(),this.isProtectedOnChange=u,this.triggerChangeEvent(p),this.isDataFiltered=!1,this.matchedContent=this.matchedRowEle=null}},y.prototype.clearText=function(t){this.isDataFiltered=!0,this.updateValuesOnInput(t,null,!0)},y.prototype.windowResize=function(){this.popupObj&&(this.popupObj.setProperties({width:this.getSize(!0)}),this.popupObj.refreshPosition())},y.prototype.setCssClass=function(t,i){var n=this.popupObj?[this.inputWrapper,this.popupObj.element]:[this.inputWrapper];e.isNullOrUndefined(i)||""===i||e.removeClass(n,i.split(" ")),e.isNullOrUndefined(t)||""===t||e.addClass(n,t.split(" "))},y.prototype.keyActionHandler=function(t){switch(t.action){case"escape":case"altUp":case"shiftTab":case"tab":this.isPopupOpen?this.hidePopup(t):this.focusOut();break;case"altDown":this.isPopupOpen||(this.showPopup(t),this.updateSelectedItem(t,!1));break;case"moveDown":case"moveUp":this.updateSelectedItem(t,!0,!0);break;case"enter":this.updateValuesOnInput(null,t,!1,!0),this.focusIn(t);break;case"home":case"end":this.updateSelectedItem(t)}},y.prototype.gridKeyActionHandler=function(t,e){var i={ArrowDown:"moveDown",ArrowUp:"moveUp",End:"end",Home:"home",Tab:"tab",Escape:"escape","Shift+Tab":"shiftTab","Alt+ArrowUp":"altUp"};if(e){var n=(t.altKey?"Alt+":"")+(t.shiftKey?"Shift+":"")+t.key;t.action=i[n]||t.action}switch(t.action){case"escape":case"tab":case"shiftTab":case"altUp":this.isPopupOpen&&(t.preventDefault(),"escape"!==t.action&&this.updateSelectedItem(t),this.hidePopup(t));break;case"moveDown":case"moveUp":case"home":case"end":this.updateSelectedItem(t)}},y.prototype.updateSelectedItem=function(t,e,i){var r=this;if(void 0===e&&(e=!0),this.isPopupOpen){var o=this.fields.groupBy?this.gridObj.selectedRowIndex||0:this.gridObj.selectedRowIndex,s=this.dataSource instanceof n.DataManager?this.remoteDataLength:this.dataSource.length;-1===o&&("moveDown"===t.action||"moveUp"===t.action)||"home"===t.action?o=0:o>=s-1&&"moveDown"===t.action||"end"===t.action?o=s-1:"moveDown"===t.action&&o>=0&&o<=s-1&&(this.fields.groupBy||i)?o+=1:("moveUp"===t.action&&o>0&&this.fields.groupBy||i)&&(o-=1),this.enableVirtualization?setTimeout(function(){r.selectRow(t,e,o)}):this.selectRow(t,e,o)}},y.prototype.selectRow=function(t,e,i){void 0===e&&(e=!0),this.gridObj.selectRow(i),this.gridObj.selectedRowIndex=i;var n=this.gridEle.querySelector(".e-row-focus");n&&n.classList.remove("e-row-focus"),e&&this.selectedGridRow(this.gridObj.getRows()[parseInt(i.toString(),10)],t,!0)},y.prototype.updateClearIconState=function(){var t=this.inputWrapper.querySelector(".e-clear-icon");t&&(t.style.display=""===this.inputEle.value?"none":"flex")},y.prototype.updateDynamicDataSource=function(t,e){if(this.gridObj){var i;this.isShowSpinner=!0,this.gridObj.dataSource=t,e instanceof n.DataManager?e.executeQuery(new n.Query).then(function(t){i=t.result.length}):i=e.length,0===i&&this.popupDiv.appendChild(this.gridEle)}},y.prototype.focusIn=function(t){this.disabled||this.readonly||(e.addClass([this.inputWrapper],["e-input-focus"]),this.inputEle.focus(),this.updateClearIconState(),this.trigger("focus",t),"Never"!==this.floatLabelType&&i.Input.calculateWidth(this.inputEle,this.inputWrapper))},y.prototype.focusOut=function(t){if(!this.disabled&&!this.readonly&&(this.isPopupOpen&&this.hidePopup(t),this.inputWrapper)){e.removeClass([this.inputWrapper],["e-input-focus"]);var n=this.inputWrapper.querySelector(".e-clear-icon");n&&(n.style.display="none"),"Never"!==this.floatLabelType&&i.Input.calculateWidth(this.inputEle,this.inputWrapper)}},y.prototype.showPopup=function(t,i){var r=this,o={name:"FadeIn",duration:100},s={popup:this.popupObj,event:t,cancel:!1,animation:o};this.trigger("open",s,function(t){if(!t.cancel&&!r.isPopupOpen){r.isPopupOpen=!0,r.popupObj.refreshPosition(),e.addClass([r.inputWrapper],["e-icon-anim"]),e.attributes(r.inputEle,{"aria-expanded":"true","aria-owns":r.element.id+"_popup","aria-controls":r.element.id}),i||(r.value||r.text||r.index)&&r.gridObj.selectRow(r.selectedRowIndex);var o=r.gridObj.getContent();if(o){var s=o.querySelector(".e-rowcell.e-active"),a=o.querySelector(".e-row");s?r.inputEle.setAttribute("aria-activedescendant",s.parentElement.getAttribute("data-uid")):a&&r.inputEle.setAttribute("aria-activedescendant",a.getAttribute("data-uid"))}!e.isNullOrUndefined(r.dataSource)&&r.dataSource instanceof n.DataManager&&r.dataSource.executeQuery(new n.Query).then(function(t){r.remoteDataLength=t.result.length}),r.popupObj.show(new e.Animation(t.animation),r.popupEle.firstElementChild)}})},y.prototype.hidePopup=function(t){var i=this,n={name:"FadeOut",duration:100},r={popup:this.popupObj,event:t||null,cancel:!1,animation:n},o=t?t.target:null;this.trigger("close",r,function(n){n.cancel||(i.isPopupOpen=!1,e.removeClass([i.inputWrapper],["e-icon-anim"]),e.attributes(i.inputEle,{"aria-expanded":"false"}),i.popupObj.hide(new e.Animation(n.animation)),o&&(o.classList.contains("e-multicolumn-list-icon")||o.classList.contains("e-rowcell"))?(i.value||i.gridObj.refreshColumns(),setTimeout(function(){i.focusIn(t)})):i.focusOut(),i.inputEle.removeAttribute("aria-owns"),i.inputEle.removeAttribute("aria-activedescendant"))}),setTimeout(function(){i.gridObj&&(i.gridObj.dataSource=i.dataSource,i.updateGridHeight(!0,!1))},100)},y.prototype.addItems=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.editSettings.allowAdding=!0,this.gridObj.dataBind(),this.isProtectedOnChange=i,this.gridObj.addRecord(t,e)},y.prototype.getItems=function(){return this.gridObj.getDataRows()},y.prototype.getDataByValue=function(t){var i=this;return!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array?this.dataSource.filter(function(e){return i.updateFieldValue(i.fields.value,e)===t})[0]:(!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof n.DataManager&&this.dataSource.executeQuery(new n.Query).then(function(e){return e.result.filter(function(e){return i.updateFieldValue(i.fields.value,e)===t})[0]}),null)},y.prototype.destroy=function(){if(this.unWireEvents(),this.gridObj&&(this.gridObj.destroy(),e.detach(this.gridObj.element)),this.inputEle){for(var t=["placeholder","aria-expanded","spellcheck","aria-label","role","type","aria-owns","aria-controls","aria-readonly","autocomplete","autocapitalize","spellcheck","aria-activedescendant"],n=0;n<t.length;n++)this.inputEle.removeAttribute(t[n]);this.inputEle.classList.remove("e-input"),i.Input.setValue("",this.inputEle,this.floatLabelType,this.showClearButton)}this.popupEle&&(this.popupEle.removeAttribute("aria-label"),this.popupEle.removeAttribute("role")),this.popupObj&&(this.popupObj.destroy(),e.detach(this.popupObj.element)),this.element.tagName!==this.getDirective()&&this.inputWrapper.parentElement.insertBefore(this.element,this.inputWrapper),this.inputObj&&(e.detach(this.inputObj.container),this.inputObj=null),i.Input.destroy({element:this.inputEle,floatLabelType:this.floatLabelType,properties:this.properties}),e.detach(this.inputWrapper),e.detach(this.popupDiv),this.inputEle=null,this.previousItemElement=null,this.inputWrapper.innerHTML="",this.inputWrapper=null,this.popupDiv=null,this.popupObj=null,this.gridObj=null,this.gridEle=null,this.popupEle=null,this.footer=null,this.noRecord=null,this.hiddenElement=null,this.dropdownElement=null,f.prototype.destroy.call(this)},y.prototype.onPropertyChanged=function(n,r){for(var o=0,s=Object.keys(n);o<s.length;o++){var a=s[o],l=void 0;switch(a){case"width":case"popupWidth":"width"===a&&this.setElementWidth(n.width),this.popupObj&&(this.popupObj.element.style.width=this.getSize(!0));break;case"popupHeight":if(this.popupObj){var p=this.getSize(!1);this.popupObj.element.style.maxHeight=p,this.popupDiv.style.maxHeight=p,this.gridObj.height=p}break;case"placeholder":i.Input.setPlaceholder(n.placeholder,this.inputEle);break;case"readonly":i.Input.setReadonly(this.readonly,this.inputEle);break;case"disabled":i.Input.setEnabled(!this.disabled,this.inputEle),this.setEnable();break;case"cssClass":this.setCssClass(n.cssClass,r.cssClass);break;case"floatLabelType":i.Input.removeFloating(this.inputObj),i.Input.addFloating(this.inputEle,this.floatLabelType,this.placeholder);break;case"showClearButton":i.Input.setClearButton(n.showClearButton,this.inputEle,this.inputObj);break;case"value":this.initValue(!0,!0);break;case"text":this.initValue(!0,!1);break;case"index":this.initValue(!0);break;case"sortOrder":this.gridObj&&(this.gridObj.sortSettings.columns=[{field:this.fields.text,direction:n.sortOrder===t.SortOrder.Ascending?t.SortOrder.Ascending:t.SortOrder.Descending}]);break;case"htmlAttributes":this.setHTMLAttributes();break;case"noRecordsTemplate":this.l10nUpdate();break;case"actionFailureTemplate":this.l10nUpdate(!0);break;case"footerTemplate":this.setFooterTemplate();break;case"itemTemplate":this.gridObj&&(this.gridObj.rowTemplate=n.itemTemplate);break;case"groupTemplate":this.groupTemplate=n.groupTemplate,this.updateGroupByField();break;case"enableRtl":this.gridObj&&this.popupObj&&(this.gridObj.enableRtl=n.enableRtl,i.Input.setEnableRtl(n.enableRtl,[this.inputWrapper]),this.popupObj.enableRtl=n.enableRtl);break;case"dataSource":this.updateDynamicDataSource(n.dataSource,r.dataSource);break;case"query":this.gridObj&&(this.gridObj.query=n.query);break;case"gridSettings":this.gridObj&&(this.gridObj.gridLines=n.gridSettings.gridLines,this.gridObj.rowHeight=n.gridSettings.rowHeight,this.gridObj.enableAltRow=n.gridSettings.enableAltRow,this.gridObj.allowResizing=n.gridSettings.allowResizing,e.isNullOrUndefined(n.gridSettings.allowTextWrap)||(this.gridObj.allowTextWrap=n.gridSettings.allowTextWrap),e.isNullOrUndefined(n.gridSettings.textWrapMode)||(this.gridObj.textWrapSettings.wrapMode=n.gridSettings.textWrapMode));break;case"fields":this.fields=n.fields,this.updateGroupByField();break;case"filterType":this.filterType=n.filterType;break;case"enableVirtualization":this.gridObj&&(this.enableVirtualization=this.gridObj.enableVirtualization=n.enableVirtualization);break;case"sortType":this.gridObj&&(this.sortType=n.sortType,this.gridObj.allowMultiSorting="multiplecolumns"===this.sortType.toString().toLowerCase()&&this.allowSorting);break;case"allowFiltering":this.allowFiltering=n.allowFiltering;break;case"allowSorting":this.gridObj&&(this.allowSorting=this.gridObj.allowSorting=n.allowSorting);break;case"columns":this.gridObj&&(l=this.getGridColumns(),this.gridObj.columns=l)}}},a([e.Property([])],y.prototype,"dataSource",void 0),a([e.Property(null)],y.prototype,"text",void 0),a([e.Property(null)],y.prototype,"value",void 0),a([e.Property(null)],y.prototype,"index",void 0),a([e.Property("100%")],y.prototype,"width",void 0),a([e.Property("300px")],y.prototype,"popupHeight",void 0),a([e.Property("100%")],y.prototype,"popupWidth",void 0),a([e.Property(null)],y.prototype,"placeholder",void 0),a([e.Property(!0)],y.prototype,"allowFiltering",void 0),a([e.Property(!0)],y.prototype,"allowSorting",void 0),a([e.Property(!1)],y.prototype,"showClearButton",void 0),a([e.Property("")],y.prototype,"cssClass",void 0),a([e.Complex({text:null,value:null,groupBy:null},h)],y.prototype,"fields",void 0),a([e.Collection([],c)],y.prototype,"columns",void 0),a([e.Complex({},g)],y.prototype,"gridSettings",void 0),a([e.Property(t.FilterType.StartsWith)],y.prototype,"filterType",void 0),a([e.Property("Never")],y.prototype,"floatLabelType",void 0),a([e.Property(t.SortOrder.None)],y.prototype,"sortOrder",void 0),a([e.Property(t.SortType.OneColumn)],y.prototype,"sortType",void 0),a([e.Property(!1)],y.prototype,"enableVirtualization",void 0),a([e.Property(!1)],y.prototype,"disabled",void 0),a([e.Property(!1)],y.prototype,"readonly",void 0),a([e.Property(!1)],y.prototype,"enablePersistence",void 0),a([e.Property()],y.prototype,"query",void 0),a([e.Property(null)],y.prototype,"itemTemplate",void 0),a([e.Property(null)],y.prototype,"footerTemplate",void 0),a([e.Property(null)],y.prototype,"groupTemplate",void 0),a([e.Property("Request Failed")],y.prototype,"actionFailureTemplate",void 0),a([e.Property("No records found")],y.prototype,"noRecordsTemplate",void 0),a([e.Property({})],y.prototype,"htmlAttributes",void 0),a([e.Event()],y.prototype,"created",void 0),a([e.Event()],y.prototype,"open",void 0),a([e.Event()],y.prototype,"close",void 0),a([e.Event()],y.prototype,"actionFailure",void 0),a([e.Event()],y.prototype,"actionBegin",void 0),a([e.Event()],y.prototype,"actionComplete",void 0),a([e.Event()],y.prototype,"filtering",void 0),a([e.Event()],y.prototype,"select",void 0),a([e.Event()],y.prototype,"change",void 0),y=a([e.NotifyPropertyChanges],y)}(e.Component);return t.Column=c,t.FieldSettings=h,t.GridSettings=g,t.MultiColumnComboBox=f,t.MultiColumnGrid=d,t}({},ej.base,ej.inputs,ej.data,ej.popups,ej.grids),this.ejs=ej;
|
|
10
|
+
this.ej=this.ej||{},this.ej.multicolumncombobox=function(t,e,i,n,r,o){"use strict";var s=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=function(t,e,i,n){var r,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,i,s):r(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},l=function(t,e,i,n){return new(i||(i=Promise))(function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){t.done?r(t.value):new i(function(e){e(t.value)}).then(s,a)}l((n=n.apply(t,e||[])).next())})},p=function(t,e){function i(t){return function(e){return n([t,e])}}function n(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,o&&(s=2&i[0]?o.return:i[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,i[1])).done)return s;switch(o=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,o=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===i[0]||2===i[0])){l=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){l.label=i[1];break}if(6===i[0]&&l.label<s[1]){l.label=s[1],s=i;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(i);break}s[2]&&l.ops.pop(),l.trys.pop();continue}i=e.call(t,l)}catch(t){i=[6,t],o=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}var r,o,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},u="e-nodata",d=function(){function t(){}return t.prototype.InjectModules=function(){o.Grid.Inject(o.VirtualScroll,o.Group,o.Edit,o.Sort,o.Resize)},t}();!function(t){t.StartsWith="StartsWith",t.EndsWith="EndsWith",t.Contains="Contains"}(t.FilterType||(t.FilterType={})),function(t){t.None="None",t.Ascending="Ascending",t.Descending="Descending"}(t.SortOrder||(t.SortOrder={})),function(t){t.OneColumn="OneColumn",t.MultipleColumns="MultipleColumns"}(t.SortType||(t.SortType={})),function(t){t.Both="Both",t.Content="Content",t.Header="Header"}(t.WrapMode||(t.WrapMode={}));var h=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s(i,t),a([e.Property()],i.prototype,"text",void 0),a([e.Property()],i.prototype,"value",void 0),a([e.Property()],i.prototype,"groupBy",void 0),i}(e.ChildProperty),c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s(i,t),a([e.Property("")],i.prototype,"field",void 0),a([e.Property("")],i.prototype,"header",void 0),a([e.Property("")],i.prototype,"width",void 0),a([e.Property("")],i.prototype,"textAlign",void 0),a([e.Property(null)],i.prototype,"format",void 0),a([e.Property(!1)],i.prototype,"displayAsCheckBox",void 0),a([e.Property(null)],i.prototype,"template",void 0),a([e.Property(null)],i.prototype,"headerTemplate",void 0),a([e.Property(null)],i.prototype,"customAttributes",void 0),i}(e.ChildProperty),g=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return s(n,i),a([e.Property(!1)],n.prototype,"enableAltRow",void 0),a([e.Property(null)],n.prototype,"rowHeight",void 0),a([e.Property("Default")],n.prototype,"gridLines",void 0),a([e.Property(!1)],n.prototype,"allowTextWrap",void 0),a([e.Property(t.WrapMode.Both)],n.prototype,"textWrapMode",void 0),a([e.Property(!1)],n.prototype,"allowResizing",void 0),a([e.Event()],n.prototype,"resizing",void 0),a([e.Event()],n.prototype,"resizeStart",void 0),a([e.Event()],n.prototype,"resizeStop",void 0),n}(e.ChildProperty),f=function(f){function y(t,e){var i=f.call(this,t,e)||this;return i.gridInject=new d,i.isShowSpinner=!0,i.gridInject.InjectModules(),i}return s(y,f),y.prototype.preRender=function(){this.element.id||(this.element.id=e.getUniqueID("e-"+this.getModuleName())),this.keyConfigs={escape:"escape",altUp:"alt+uparrow",altDown:"alt+downarrow",tab:"tab",shiftTab:"shift+tab",end:"end",enter:"enter",home:"home",moveDown:"downarrow",moveUp:"uparrow"},this.matchedRowEle=this.matchedContent=this.exactMatchedContent=null,this.persistData()},y.prototype.getDirective=function(){return"EJS-MULTICOLUMNCOMBOBOX"},y.prototype.getModuleName=function(){return"multicolumncombobox"},y.prototype.getPersistData=function(){return this.addOnPersist(["value"])},y.prototype.persistData=function(){if(this.enablePersistence){this.element.id+="_wrapper";var t=window.localStorage.getItem(this.getModuleName()+this.element.id);e.isNullOrUndefined(t)||""===t||this.setProperties(JSON.parse(t),!0)}},y.prototype.render=function(){this.renderInput(),this.renderGrid(),this.popupDiv=this.createElement("div",{className:"e-popup-content"}),this.popupDiv.appendChild(this.gridEle),this.setHTMLAttributes(),this.renderPopup(),this.wireEvents()},y.prototype.setHiddenValue=function(){if(e.isNullOrUndefined(this.value))return void(this.hiddenElement.innerHTML="");var t=this.hiddenElement.querySelector("option");if(e.isNullOrUndefined(t)){if(!e.isNullOrUndefined(this.hiddenElement)){var i=document.createElement("option");i.text=this.text,i.setAttribute("value",this.value.toString()),i.setAttribute("selected",""),this.hiddenElement.appendChild(i)}}else t.textContent=this.text,t.setAttribute("value",this.value.toString())},y.prototype.renderGrid=function(){var i=this,r=this.getGridColumns(),s=this.sortOrder.toString().toLowerCase();this.gridObj=new o.Grid({dataSource:this.dataSource,columns:r,allowSorting:this.allowSorting,enableStickyHeader:!0,gridLines:this.gridSettings.gridLines,rowHeight:this.gridSettings.rowHeight,enableAltRow:this.gridSettings.enableAltRow,enableVirtualization:this.enableVirtualization,enableRtl:this.enableRtl,editSettings:{allowAdding:!1},query:this.query,allowTextWrap:this.gridSettings.allowTextWrap,textWrapSettings:{wrapMode:this.gridSettings.textWrapMode},height:this.popupHeight,allowResizing:this.gridSettings.allowResizing,allowMultiSorting:"multiplecolumns"===this.sortType.toString().toLowerCase()&&this.allowSorting,rowTemplate:this.itemTemplate,beforeDataBound:function(){i.dataSource instanceof n.DataManager&&i.isShowSpinner&&(i.showHideSpinner(!0),i.isShowSpinner=!1)},dataBound:function(){i.onDataBound()},actionFailure:function(t){i.onActionFailure(t)},actionBegin:function(t){i.trigger("actionBegin",t)},actionComplete:this.handleActionComplete.bind(this),keyPressed:this.handleKeyPressed.bind(this),resizing:function(t){i.gridSettings.resizing&&i.gridSettings.resizing.call(i,t)},resizeStart:function(t){i.gridSettings.resizeStart&&i.gridSettings.resizeStart.call(i,t)},resizeStop:function(t){i.gridSettings.resizeStop&&i.gridSettings.resizeStop.call(i,t)}}),this.gridEle=this.createElement("div",{id:this.element.id+"_"+e.getUniqueID("grid"),className:"e-multicolumn-grid"}),this.updateGroupByField(),r.length>0&&(this.gridObj.columns[0].isPrimaryKey=!0),"none"!==s&&(this.gridObj.sortSettings={columns:[{field:this.fields.text,direction:"ascending"===s?t.SortOrder.Ascending:t.SortOrder.Descending}]}),this.gridObj.appendTo(this.gridEle),e.isNullOrUndefined(this.value)&&e.isNullOrUndefined(this.text)&&e.isNullOrUndefined(this.index)||this.initValue(null,null,!0)},y.prototype.handleActionComplete=function(t){var e=this;if(this.trigger("actionComplete",t),"sorting"===t.requestType&&this.updateRowSelection(t),Array.isArray(t.rows)&&this.isDataFiltered){var i=0;t.rows.forEach(function(t){var n=e.gridObj.getRowElementByUID(t.uid);n&&(i+=n.getBoundingClientRect().height)}),this.popupRowHeight=i||parseFloat(this.popupHeight),this.updateGridHeight(!0,!0)}this.popupObj.refreshPosition(),this.gridObj.element.querySelector(".e-content").scrollTop=0},y.prototype.handleKeyPressed=function(t){"Enter"===t.key&&(t.cancel=!0,this.isPopupOpen&&(this.selectedGridRow(this.gridObj.getRows()[this.gridObj.selectedRowIndex],t,!0),this.hidePopup(t),this.focusIn(t))),this.fields.groupBy&&(t.cancel=!0,this.gridKeyActionHandler(t,!0))},y.prototype.isRowMatching=function(t,e,i){var n=function(t){var e=[];return t&&"object"==typeof t?Array.isArray(t)?t.forEach(function(t){return e.push.apply(e,n(t))}):Object.keys(t).forEach(function(i){return e.push.apply(e,n(t[""+i]))}):null!=t&&e.push(String(t)),e},r=n(t);return-1!==r.indexOf(e)&&-1!==r.indexOf(i)},y.prototype.updateRowSelection=function(t){var e=this;t&&t.rows.forEach(function(t){e.selectDataRow(t.data,t.index)})},y.prototype.selectDataRow=function(t,e){if(this.isRowMatching(t,this.value?this.value.toString():"",this.text?this.text.toString():"")){this.gridObj.selectRow(e);var i=this.isProtectedOnChange;return this.isProtectedOnChange=!0,this.index=e,void(this.isProtectedOnChange=i)}},y.prototype.findIndex=function(t,e){return t.findIndex(function(t){return Object.keys(e).every(function(i){return t[i]===e[i]})})},y.prototype.getGridColumns=function(){var t=this;return this.columns.map(function(e){var i=e.field,n=e.header,r=e.width,o=e.textAlign,s=e.format,a=e.displayAsCheckBox,l=e.template,p=e.headerTemplate,u=e.customAttributes;return{field:i,headerText:n,width:r,textAlign:""===o.toString()&&t.enableRtl?"Right":o,format:s,displayAsCheckBox:a,template:l,headerTemplate:p,customAttributes:u,type:a&&!s?"boolean":void 0}})},y.prototype.updateGroupByField=function(){var t=this.fields.groupBy,i=""!==t&&!e.isNullOrUndefined(t);if(i){"multiplecolumns"!==this.sortType.toString().toLowerCase()&&this.gridEle.classList.add("e-multicolumn-group");var n=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.allowGrouping=!0,this.gridObj.groupSettings={showDropArea:!1,columns:[t]},this.groupTemplate&&i&&(this.gridObj.groupSettings.captionTemplate=this.groupTemplate),this.isVue&&(this.gridObj.isVue=this.isVue),this.isProtectedOnChange=n}},y.prototype.onDataBound=function(){var t=this;this.isLocaleChanged&&(this.isLocaleChanged=!1,this.unWireEvents(),this.wireEvents());var i=this.dataSource.length,r=this.popupDiv.querySelector(".e-multicolumn-grid"),o=this.popupDiv.classList.contains(u);if(i<=0&&r)this.l10nUpdate(),this.popupDiv.removeChild(this.gridEle),e.addClass([this.popupDiv],[u]);else if(o&&i>=1){e.removeClass([this.popupDiv],[u]);var s=this.popupDiv.querySelector(".e-no-records");s&&this.popupDiv.removeChild(s)}if(this.isInitialRender){var a=this.popupDiv.querySelector(".e-gridcontent tr"),l=o?this.popupDiv.getBoundingClientRect().height:a?a.getBoundingClientRect().height:0;this.popupRowHeight=l,this.popupObj.hide(),this.popupEle.style.visibility="unset",this.isInitialRender=!1}var p=this.gridObj.element.querySelectorAll(".e-row");this.isDataFiltered&&p.length>0&&""!==this.inputEle.value&&p[0].classList.add("e-row-focus"),this.dataSource instanceof n.DataManager&&setTimeout(function(){t.showHideSpinner(!1)})},y.prototype.showHideSpinner=function(t){t?r.showSpinner(this.dropdownElement):r.hideSpinner(this.dropdownElement)},y.prototype.onActionFailure=function(t){this.trigger("actionFailure",t),this.l10nUpdate(!0),e.addClass([this.popupDiv],[u])},y.prototype.renderInput=function(){var t=["aria-expanded","aria-readOnly","aria-disabled","autocomplete","autocapitalize","spellcheck","tabindex"];"INPUT"===this.element.tagName?(this.inputEle=this.element,e.isNullOrUndefined(this.inputEle.getAttribute("role"))&&this.inputEle.setAttribute("role","combobox"),e.isNullOrUndefined(this.inputEle.getAttribute("type"))&&this.inputEle.setAttribute("type","text"),function(i,n){for(var r in n)n.hasOwnProperty(r)&&-1!==t.indexOf(r)&&e.isNullOrUndefined(i.getAttribute(r))&&i.setAttribute(r,n[r])}(this.inputEle,{"aria-expanded":"false","aria-readOnly":this.readonly.toString(),"aria-disabled":this.disabled.toString(),autocomplete:"off",autocapitalize:"off",spellcheck:"false",tabindex:"0"})):(this.inputEle=this.createElement("input",{attrs:{role:"textbox",type:"text"}}),this.element.parentElement.insertBefore(this.inputEle,this.element)),this.inputObj=i.Input.createInput({element:this.inputEle,buttons:["e-input-group-icon e-multicolumn-list-icon e-icons"],floatLabelType:this.floatLabelType,properties:{enabled:!this.disabled,readonly:this.readonly,placeholder:this.placeholder,enableRtl:this.enableRtl,showClearButton:this.showClearButton,cssClass:this.cssClass}},this.createElement),this.inputWrapper=this.inputObj.container,this.inputWrapper.classList.add("e-multicolumn-list"),this.inputWrapper.setAttribute("spellcheck","false"),this.hiddenElement=this.createElement("select",{attrs:{"aria-hidden":"true",tabindex:"-1",class:"e-multicolumn-list-hidden"}}),e.prepend([this.hiddenElement],this.inputWrapper);var n=this.inputEle.getAttribute("name")?this.inputEle.getAttribute("name"):this.inputEle.getAttribute("id");this.hiddenElement.setAttribute("name",n),this.inputEle.removeAttribute("name"),this.hiddenElement.hasAttribute("aria-label")||this.hiddenElement.setAttribute("aria-label",this.getModuleName()),this.element.tagName===this.getDirective()&&this.element.appendChild(this.inputWrapper),this.setElementWidth(this.width),this.dropdownElement=this.inputWrapper.querySelector(".e-input-group-icon.e-multicolumn-list-icon.e-icons"),r.createSpinner({target:this.dropdownElement})},y.prototype.setElementWidth=function(t){if(!e.isNullOrUndefined(t)){var i=this.inputWrapper;"number"==typeof t?i.style.width=e.formatUnit(t):"string"==typeof t&&(i.style.width=t.match(/px|%|em/)?t:e.formatUnit(t))}},y.prototype.setHTMLAttributes=function(){var t=this,e=this.htmlAttributes,n=this.inputEle;if(Object.keys(e).length)for(var r=0,o=Object.keys(e);r<o.length;r++){var s=o[r];switch(s){case"class":this.inputWrapper.classList.add(e[s]);break;case"disabled":this.setProperties({enabled:!1},!0),this.setEnable();break;case"readonly":this.setProperties({readonly:!0},!0),this.dataBind();break;case"style":var a=e[s];this.inputWrapper.style.cssText="",a&&a.split(";").forEach(function(e){var i=e.split(":").map(function(t){return t.trim()}),n=i[0],r=i[1];n&&r&&t.inputWrapper.style.setProperty(n,r)});break;default:var l=["title","id","placeholder","role","autocomplete","autocapitalize","spellcheck","minlength","maxlength"];["name","required"].indexOf(s)>-1||0===s.indexOf("data")?this.hiddenElement.setAttribute(s,this.htmlAttributes[""+s]):l.indexOf(s)>-1&&"placeholder"===s?i.Input.setPlaceholder(e[s],n):n.setAttribute(s,e[s])}}},y.prototype.setEnable=function(){i.Input.setEnabled(!this.disabled,this.inputEle),this.disabled?(this.isPopupOpen&&this.hidePopup(),e.addClass([this.inputWrapper],"e-disabled"),this.inputWrapper&&this.inputWrapper.classList.contains("e-input-focus")&&e.removeClass([this.inputWrapper],["e-input-focus"]),this.setAriaDisabled("true")):(e.removeClass([this.inputWrapper],"e-disabled"),this.setAriaDisabled("false"))},y.prototype.setAriaDisabled=function(t){this.inputEle.setAttribute("aria-disabled",t),this.inputWrapper.setAttribute("aria-disabled",t)},y.prototype.updateFieldValue=function(t,i){return e.getValue(t,i).toString()},y.prototype.initValue=function(t,i,r){var o,s,a,l,p=this,u=this.gridObj.getSelectedRecords()[0],d=this.gridObj.getSelectedRows()[0],h=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.value=this.value?this.value.toString():this.value,this.isProtectedOnChange=h;var c=function(t){var e=p.updateCurrentValues(o,t);s=e.currentValue,a=e.currentText,l=e.currentIndex};if(!t&&(!e.isNullOrUndefined(this.value)||!e.isNullOrUndefined(this.text))||t&&void 0!==i){var g=t?i?this.value:this.text:e.isNullOrUndefined(this.value)?this.text:this.value;!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof n.DataManager?this.dataSource.executeQuery(new n.Query).then(function(n){var h=n.result,f=h.filter(function(n){return p.updateFieldValue(t?i?p.fields.value:p.fields.text:e.isNullOrUndefined(p.value)?p.fields.text:p.fields.value,n)===g});f.length>0&&(o=f[0],c(h),p.updateChangeEvent(o,u,d,s,a,l,t,r),p.gridObj.selectRow(p.index))}):!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array&&(o=this.dataSource.filter(function(n){return p.updateFieldValue(t?i?p.fields.value:p.fields.text:e.isNullOrUndefined(p.value)?p.fields.text:p.fields.value,n)===g})[0],c(this.dataSource))}else e.isNullOrUndefined(this.index)||(!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof n.DataManager?this.dataSource.executeQuery(new n.Query).then(function(e){var i=e.result;o=i[p.index],c(i),p.updateChangeEvent(o,u,d,s,a,l,t,r),p.gridObj.selectRow(p.index)}):!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array&&(this.fields.groupBy?setTimeout(function(){var e=p.gridObj.getRows();if(e&&e.length>0)for(var i=p.gridObj.getRowInfo(e[p.index]).rowData,n=p.fields.value,h=0;h<e.length;h++)if(i&&i[parseInt(n.toString(),10)]===p.dataSource[parseInt(h.toString(),10)][parseInt(n.toString(),10)]){o=i,c(p.dataSource),p.updateChangeEvent(o,u,d,s,a,l,t,r),p.gridObj.selectRow(p.index);break}}):(o=this.dataSource[this.index],c(this.dataSource))));this.dataSource instanceof n.DataManager||this.updateChangeEvent(o,u,d,s,a,l,t,r)},y.prototype.updateChangeEvent=function(t,e,i,n,r,o,s,a){var l=t?this.updateFieldValue(this.fields.value,t):null,p={value:t?l:null,itemData:{text:r,value:n},item:this.getDataByValue(this.value),previousItemData:e,previousItemElement:i,itemElement:this.inputWrapper,event:null,isInteracted:!s};this.updateValues(n,r,o,p,a)},y.prototype.updateCurrentValues=function(t,n){if(!e.isNullOrUndefined(t)){var r=this.updateFieldValue(this.fields.text,t),o=this.updateFieldValue(this.fields.value,t);return i.Input.setValue(r,this.inputEle,this.floatLabelType,this.showClearButton),{currentValue:o,currentText:r,currentIndex:n.indexOf(t)}}return{currentValue:null,currentText:null,currentIndex:null}},y.prototype.renderPopup=function(){this.popupEle=this.createElement("div",{id:this.element.id+"_options",className:"e-multicolumn-list e-popup "+(null!==this.cssClass?this.cssClass:"")}),e.attributes(this.popupEle,{"aria-label":this.element.id,role:"dialog"}),document.body.appendChild(this.popupEle),this.createPopup(this.popupEle),e.prepend([this.popupDiv],this.popupEle),this.footerTemplate&&this.setFooterTemplate();var t=this.getSize(!1);if(this.popupEle.style.maxHeight=t,this.footerTemplate){var i=Math.round(this.footer.getBoundingClientRect().height);t=e.formatUnit(parseInt(t,10)-i+"px")}this.popupDiv.style.maxHeight=t,this.updateGridHeight(),this.popupEle.style.visibility="hidden",this.isInitialRender=!0},y.prototype.updateGridHeight=function(t,i){var n;if(t){var r=this.gridObj.getContent().querySelector(".e-content"),o=r.offsetHeight-r.clientHeight;""===this.fields.groupBy||e.isNullOrUndefined(this.fields.groupBy)||(this.popupRowHeight+=this.popupRowHeight),n=i&&this.popupRowHeight<this.prevGridHeight?this.popupRowHeight+o+"px":this.prevGridHeight+"px"}else this.prevGridHeight=this.popupDiv.getBoundingClientRect().height-this.popupDiv.querySelector(".e-gridheader").getBoundingClientRect().height,n=this.prevGridHeight+"px";var s=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.height=n,this.isProtectedOnChange=s},y.prototype.createPopup=function(t){var i=this;this.popupObj=new r.Popup(t,{width:this.getSize(!0),targetType:"relative",collision:{X:"flip",Y:"flip"},relateTo:this.inputWrapper,enableRtl:this.enableRtl,position:{X:"left",Y:"bottom"},targetExitViewport:function(){e.Browser.isDevice||i.hidePopup()},open:function(){i.inputEle.focus(),i.updateClearIconState()}})},y.prototype.setFooterTemplate=function(){this.footer?this.isReact&&"function"==typeof this.footerTemplate?this.clearTemplate(["footerTemplate"]):this.footer.innerHTML="":(this.footer=this.createElement("div"),e.addClass([this.footer],"e-popup-footer"));var t=this.getTemplateFunction(this.footerTemplate)({count:this.dataSource.length},this,"footerTemplate",this.element.id+"footerTemplate",this.isStringTemplate,void 0,this.footer);t&&(t=Array.prototype.slice.call(t),e.append(t,this.footer)),e.append([this.footer],this.popupEle)},y.prototype.l10nUpdate=function(t){if(this.noRecord?this.noRecord.innerHTML="":this.noRecord=this.createElement("div"),"No records found"!==this.noRecordsTemplate||"Request Failed"!==this.actionFailureTemplate){var i=t?this.actionFailureTemplate:this.noRecordsTemplate,n=t?this.element.id+"_actionFailure":this.element.id+"_noRecords",r=t?"actionFailureTemplate":"noRecordsTemplate",o=this.getTemplateFunction(i)({},this,r,n,this.isStringTemplate,void 0,this.noRecord);o&&(o=Array.prototype.slice.call(o),e.append(o,this.noRecord))}else{var s={noRecordsTemplate:"No records found",actionFailureTemplate:"Request Failed"};this.l10n=new e.L10n("multicolumncombobox",s,this.locale),this.noRecord.innerHTML=t?this.l10n.getConstant("actionFailureTemplate"):this.l10n.getConstant("noRecordsTemplate")}e.addClass([this.noRecord],"e-no-records"),e.prepend([this.noRecord],this.popupDiv),this.popupObj.refreshPosition()},y.prototype.getTemplateFunction=function(t){if("string"==typeof t){var i="";try{var n=e.select(t);i=n?"SCRIPT"===n.tagName?n.innerHTML:n.outerHTML:t}catch(e){i=t}return e.compile(i)}return e.compile(t)},y.prototype.getSize=function(t){var i=t?this.popupWidth:this.popupHeight,n=e.formatUnit(i);return n.includes("%")?n=((t?this.inputWrapper.offsetWidth:document.documentElement.clientHeight)*parseFloat(n)/100).toString()+"px":"string"==typeof i&&(n=i.match(/px|em/)?i:n),n},y.prototype.selectedGridRow=function(t,e,n){var r=this,o={isInteracted:!!e,item:this.gridObj.getSelectedRecords()[0],itemElement:t,itemData:this.gridObj.getSelectedRecords()[0],event:e,cancel:!1},s=this.gridObj.getSelectedRecords()[0],a=s?this.updateFieldValue(this.fields.text,s):"",l=s?this.updateFieldValue(this.fields.value,s):"",p={isInteracted:!!e,item:s,itemElement:t,itemData:{text:s?a:"",value:s?l:""},event:e,cancel:!1,value:s?l:"",previousItemData:{text:this.text,value:this.value},previousItemElement:this.previousItemElement};this.trigger("select",o,function(t){if(!t.cancel&&t.itemData){var o=e,u="Enter"===o.key||"Tab"===o.key||o.shiftKey&&"Tab"===o.key||o.altKey&&"ArrowUp"===o.key;(!n||n&&u)&&r.updateValues(s?l:"",s?a:"",r.gridObj.selectedRowIndex,p),i.Input.setValue(s?a:"",r.inputEle,r.floatLabelType,r.showClearButton),r.setHiddenValue(),(!n||n&&u)&&r.hidePopup(e)}})},y.prototype.updateValues=function(t,i,n,r,o){this.previousItemElement=r.itemElement;var s=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.text=i||this.text,this.value=t||this.value,this.index=this.selectedRowIndex=e.isNullOrUndefined(n)?this.index:n,this.isProtectedOnChange=s,this.setHiddenValue(),o||this.triggerChangeEvent(r)},y.prototype.triggerChangeEvent=function(t){this.trigger("change",t,function(t){t.cancel})},y.prototype.inputHandler=function(t){var e=this;if(this.showPopup(null,!0),this.updateClearIconState(),this.allowFiltering){var i=t.target.value.toLowerCase(),n=!1,r={preventDefaultAction:!1,text:i,updateData:function(t,o,s){r.cancel||(n=!0,e.filterAction(t,i,o,s))},event:t,cancel:!1};this.trigger("filtering",r,function(t){t.cancel||t.preventDefaultAction||n||e.filterAction(e.dataSource,i,e.query,e.fields)})}this.updateInputValue(t.target.value)},y.prototype.updateInputValue=function(t){return l(this,void 0,void 0,function(){var e,i,r,o,s,a,l;return p(this,function(p){switch(p.label){case 0:return this.dataSource instanceof n.DataManager?(s=new n.Query,[4,this.dataSource.executeQuery(s)]):[3,2];case 1:return a=p.sent(),l=a.result,e=this.filterDatas(l,t),r=e.data,o=e.exactData,[3,3];case 2:Array.isArray(this.dataSource)&&(i=this.filterDatas(this.dataSource,t),r=i.data,o=i.exactData),p.label=3;case 3:return this.selectFilteredRows(r,o),[2]}})})},y.prototype.filterDatas=function(t,e){var i=this;return{data:t.filter(function(t){var n=i.updateFieldValue(i.fields.text,t);return e&&n.toLowerCase().startsWith(e.toLowerCase())}),exactData:t.filter(function(t){return i.updateFieldValue(i.fields.text,t)===e})}},y.prototype.selectFilteredRows=function(t,e){if(t.length<=0)return void(this.matchedRowEle=this.matchedContent=this.exactMatchedContent=null);this.matchedContent=t[0],this.exactMatchedContent=e[0];var i=this.findIndex(this.gridObj.currentViewData,this.matchedContent);this.matchedRowEle=this.gridObj.getRowByIndex(i)},y.prototype.filterAction=function(t,i,r,o){var s=this,a=r||new n.Query,l=this.filterType.toString().toLowerCase();if(e.isNullOrUndefined(r)&&e.isNullOrUndefined(o))this.updateGridDataSource(t);else if(r)t instanceof n.DataManager?this.filteringHandler(t,i,r,o):new n.DataManager(t).executeQuery(r).then(function(t){var e=t.result;s.updateGridDataSource(e)});else if(t instanceof n.DataManager)this.filteringHandler(t,i,a,o);else if(Array.isArray(t)){var p=t.filter(function(t){return s.filterData(t,l,i,o)});this.updateGridDataSource(p)}},y.prototype.filteringHandler=function(t,e,i,n){var r,o=this,s=this.filterType.toString().toLowerCase();t.executeQuery(i).then(function(t){var i=t.result;r=i.filter(function(t){return o.filterData(t,s,e,n)}),o.updateGridDataSource(r)})},y.prototype.filterData=function(t,e,i,n){var r=this.updateFieldValue(n?n.text:this.fields.text,t).toLowerCase();switch(e){case"startswith":return r.startsWith(i);case"endswith":return r.endsWith(i);case"contains":return r.includes(i);default:return!1}},y.prototype.updateGridDataSource=function(t){if(t.length>0){e.removeClass([this.popupDiv],[u]);var i=this.popupDiv.querySelector(".e-no-records");i&&this.popupDiv.removeChild(i),this.gridObj.dataSource=t,this.isDataFiltered=!0}else this.l10nUpdate(),e.addClass([this.popupDiv],[u])},y.prototype.wireEvents=function(){e.isNullOrUndefined(this.inputObj.buttons[0])||(e.EventHandler.add(this.inputObj.buttons[0],"mousedown",this.preventBlur,this),e.EventHandler.add(this.inputObj.buttons[0],"mousedown",this.dropDownClick,this)),e.EventHandler.add(document,"mousedown",this.onDocumentClick,this),e.EventHandler.add(this.gridEle,"click",this.onMouseClick,this),e.EventHandler.add(this.inputEle,"input",this.inputHandler,this),e.EventHandler.add(this.inputEle,"focus",this.focusIn,this),this.showClearButton&&e.EventHandler.add(this.inputObj.clearButton,"mousedown",this.clearText,this),e.EventHandler.add(window,"resize",this.windowResize,this),this.keyboardModule=new e.KeyboardEvents(this.inputWrapper,{keyAction:this.keyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"}),this.keyboardModule=new e.KeyboardEvents(this.gridEle,{keyAction:this.gridKeyActionHandler.bind(this),keyConfigs:this.keyConfigs,eventName:"keydown"})},y.prototype.unWireEvents=function(){e.isNullOrUndefined(this.inputObj.buttons[0])||(e.EventHandler.remove(this.inputObj.buttons[0],"mousedown",this.preventBlur),e.EventHandler.remove(this.inputObj.buttons[0],"mousedown",this.dropDownClick)),e.EventHandler.remove(document,"mousedown",this.onDocumentClick),e.EventHandler.remove(this.inputEle,"input",this.inputHandler),e.EventHandler.remove(this.inputWrapper,"focus",this.focusIn),e.EventHandler.remove(window,"resize",this.windowResize),e.EventHandler.remove(this.gridEle,"click",this.onMouseClick),this.showClearButton&&e.EventHandler.remove(this.inputObj.clearButton,"mousedown",this.clearText),this.keyboardModule&&this.keyboardModule.destroy()},y.prototype.preventBlur=function(t){t.preventDefault()},y.prototype.dropDownClick=function(t){if(!this.disabled&&!this.readonly){var e=this.gridEle.querySelector(".e-row-focus");e&&e.classList.remove("e-row-focus"),this.isPopupOpen?this.hidePopup(t):this.showPopup(t)}},y.prototype.onMouseClick=function(t){var i=t.target,n=e.closest(i,".e-row"),r=this.gridObj.selectedRowIndex;n&&(r>=0?this.selectedGridRow(n,t):(this.gridObj.selectedRowIndex=this.gridObj.getRows().indexOf(n),this.gridObj.selectRow(this.gridObj.selectedRowIndex),this.hidePopup(t)))},y.prototype.onDocumentClick=function(t){var i=t.target;if(this.disabled||this.readonly||!this.isPopupOpen)return void(i.closest(".e-multicolumn-list")||this.focusOut());if(i.classList.contains("e-multicolumn-list-icon")||e.closest(i,".e-multicolumn-list.e-popup"))t.preventDefault();else if(!i.classList.contains("e-multicolumncombobox")&&!i.classList.contains("e-clear-icon")){e.isNullOrUndefined(this.text)||this.updateInputValue(this.text);var n=""===this.inputEle.value;this.updateValuesOnInput(t,null,n)}},y.prototype.updateValuesOnInput=function(t,e,i,n){void 0===n&&(n=!1);var r=t||e,o=n?this.matchedContent:this.exactMatchedContent;if(o||"Enter"===r.code||(this.inputEle.value=this.value=this.index=this.text=null),this.hidePopup(r),this.matchedRowEle&&!i&&o){u=this.isProtectedOnChange;this.isProtectedOnChange=!0;var s=this.updateFieldValue(this.fields.text,this.matchedContent),a=this.updateFieldValue(this.fields.value,this.matchedContent);this.inputEle.value=s,this.value=a;var l=this.findIndex(this.gridObj.currentViewData,this.matchedContent);this.index=l,this.text=s,this.gridObj.selectRow(l),this.selectedGridRow(this.gridObj.getRowByIndex(l),r),this.previousItemElement=this.gridObj.getSelectedRows()[0],this.isProtectedOnChange=u}else if(this.isDataFiltered){this.inputEle.value="";var p={value:null,itemData:{text:null,value:null},item:null,previousItemData:{text:this.text,value:this.value},previousItemElement:this.previousItemElement,itemElement:null,event:r,isInteracted:!0,cancel:!1},u=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.text=this.value=this.index=null,this.gridObj.refreshColumns(),this.isProtectedOnChange=u,this.triggerChangeEvent(p),this.isDataFiltered=!1,this.matchedContent=this.matchedRowEle=null}},y.prototype.clearText=function(t){this.isDataFiltered=!0,this.updateValuesOnInput(t,null,!0)},y.prototype.windowResize=function(){this.popupObj&&(this.popupObj.setProperties({width:this.getSize(!0)}),this.popupObj.refreshPosition())},y.prototype.setCssClass=function(t,i){var n=this.popupObj?[this.inputWrapper,this.popupObj.element]:[this.inputWrapper];e.isNullOrUndefined(i)||""===i||e.removeClass(n,i.split(" ")),e.isNullOrUndefined(t)||""===t||e.addClass(n,t.split(" "))},y.prototype.keyActionHandler=function(t){switch(t.action){case"escape":case"altUp":case"shiftTab":case"tab":this.isPopupOpen?this.hidePopup(t):this.focusOut();break;case"altDown":this.isPopupOpen||(this.showPopup(t),this.updateSelectedItem(t,!1));break;case"moveDown":case"moveUp":this.updateSelectedItem(t,!0,!0);break;case"enter":this.updateValuesOnInput(null,t,!1,!0),this.focusIn(t);break;case"home":case"end":this.updateSelectedItem(t)}},y.prototype.gridKeyActionHandler=function(t,e){var i={ArrowDown:"moveDown",ArrowUp:"moveUp",End:"end",Home:"home",Tab:"tab",Escape:"escape","Shift+Tab":"shiftTab","Alt+ArrowUp":"altUp"};if(e){var n=(t.altKey?"Alt+":"")+(t.shiftKey?"Shift+":"")+t.key;t.action=i[n]||t.action}switch(t.action){case"escape":case"tab":case"shiftTab":case"altUp":this.isPopupOpen&&(t.preventDefault(),"escape"!==t.action&&this.updateSelectedItem(t),this.hidePopup(t));break;case"moveDown":case"moveUp":case"home":case"end":this.updateSelectedItem(t)}},y.prototype.updateSelectedItem=function(t,e,i){var r=this;if(void 0===e&&(e=!0),this.isPopupOpen){var o=this.fields.groupBy?this.gridObj.selectedRowIndex||0:this.gridObj.selectedRowIndex,s=this.dataSource instanceof n.DataManager?this.remoteDataLength:this.dataSource.length;-1===o&&("moveDown"===t.action||"moveUp"===t.action)||"home"===t.action?o=0:o>=s-1&&"moveDown"===t.action||"end"===t.action?o=s-1:"moveDown"===t.action&&o>=0&&o<=s-1&&(this.fields.groupBy||i)?o+=1:("moveUp"===t.action&&o>0&&this.fields.groupBy||i)&&(o-=1),this.enableVirtualization?setTimeout(function(){r.selectRow(t,e,o)}):this.selectRow(t,e,o)}},y.prototype.selectRow=function(t,e,i){void 0===e&&(e=!0),this.gridObj.selectRow(i),this.gridObj.selectedRowIndex=i;var n=this.gridEle.querySelector(".e-row-focus");n&&n.classList.remove("e-row-focus"),e&&this.selectedGridRow(this.gridObj.getRows()[parseInt(i.toString(),10)],t,!0)},y.prototype.updateClearIconState=function(){var t=this.inputWrapper.querySelector(".e-clear-icon");t&&(t.style.display=""===this.inputEle.value?"none":"flex")},y.prototype.updateDynamicDataSource=function(t,e){if(this.gridObj){var i;this.isShowSpinner=!0,this.gridObj.dataSource=t,e instanceof n.DataManager?e.executeQuery(new n.Query).then(function(t){i=t.result.length}):i=e.length,0===i&&this.popupDiv.appendChild(this.gridEle)}},y.prototype.focusIn=function(t){this.disabled||this.readonly||(e.addClass([this.inputWrapper],["e-input-focus"]),this.inputEle.focus(),this.updateClearIconState(),this.trigger("focus",t),"Never"!==this.floatLabelType&&i.Input.calculateWidth(this.inputEle,this.inputWrapper))},y.prototype.focusOut=function(t){if(!this.disabled&&!this.readonly&&(this.isPopupOpen&&this.hidePopup(t),this.inputWrapper)){e.removeClass([this.inputWrapper],["e-input-focus"]);var n=this.inputWrapper.querySelector(".e-clear-icon");n&&(n.style.display="none"),"Never"!==this.floatLabelType&&i.Input.calculateWidth(this.inputEle,this.inputWrapper)}},y.prototype.showPopup=function(t,i){var r=this,o={name:"FadeIn",duration:100},s={popup:this.popupObj,event:t,cancel:!1,animation:o};this.trigger("open",s,function(t){if(!t.cancel&&!r.isPopupOpen){r.isPopupOpen=!0,r.popupObj.refreshPosition(),e.addClass([r.inputWrapper],["e-icon-anim"]),e.attributes(r.inputEle,{"aria-expanded":"true","aria-owns":r.element.id+"_popup","aria-controls":r.element.id}),i||(r.value||r.text||r.index)&&r.gridObj.selectRow(r.selectedRowIndex);var o=r.gridObj.getContent();if(o){var s=o.querySelector(".e-rowcell.e-active"),a=o.querySelector(".e-row");s?r.inputEle.setAttribute("aria-activedescendant",s.parentElement.getAttribute("data-uid")):a&&r.inputEle.setAttribute("aria-activedescendant",a.getAttribute("data-uid"))}!e.isNullOrUndefined(r.dataSource)&&r.dataSource instanceof n.DataManager&&r.dataSource.executeQuery(new n.Query).then(function(t){r.remoteDataLength=t.result.length}),r.popupObj.show(new e.Animation(t.animation),r.popupEle.firstElementChild)}})},y.prototype.hidePopup=function(t){var i=this,n={name:"FadeOut",duration:100},r={popup:this.popupObj,event:t||null,cancel:!1,animation:n},o=t?t.target:null;this.trigger("close",r,function(n){n.cancel||(i.isPopupOpen=!1,e.removeClass([i.inputWrapper],["e-icon-anim"]),e.attributes(i.inputEle,{"aria-expanded":"false"}),i.popupObj.hide(new e.Animation(n.animation)),o&&(o.classList.contains("e-multicolumn-list-icon")||o.classList.contains("e-rowcell"))?(i.value||i.gridObj.refreshColumns(),setTimeout(function(){i.focusIn(t)})):i.focusOut(),i.inputEle.removeAttribute("aria-owns"),i.inputEle.removeAttribute("aria-activedescendant"))}),setTimeout(function(){i.gridObj&&(i.gridObj.dataSource=i.dataSource,i.updateGridHeight(!0,!1))},100)},y.prototype.addItems=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.gridObj.editSettings.allowAdding=!0,this.gridObj.dataBind(),this.isProtectedOnChange=i,this.gridObj.addRecord(t,e)},y.prototype.getItems=function(){return this.gridObj.getDataRows()},y.prototype.getDataByValue=function(t){var i=this;return!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof Array?this.dataSource.filter(function(e){return i.updateFieldValue(i.fields.value,e)===t})[0]:(!e.isNullOrUndefined(this.dataSource)&&this.dataSource instanceof n.DataManager&&this.dataSource.executeQuery(new n.Query).then(function(e){return e.result.filter(function(e){return i.updateFieldValue(i.fields.value,e)===t})[0]}),null)},y.prototype.destroy=function(){if(this.unWireEvents(),this.gridObj&&(this.gridObj.destroy(),e.detach(this.gridObj.element)),this.inputEle){for(var t=["placeholder","aria-expanded","spellcheck","aria-label","role","type","aria-owns","aria-controls","aria-readonly","autocomplete","autocapitalize","spellcheck","aria-activedescendant"],n=0;n<t.length;n++)this.inputEle.removeAttribute(t[n]);this.inputEle.classList.remove("e-input"),i.Input.setValue("",this.inputEle,this.floatLabelType,this.showClearButton)}this.popupEle&&(this.popupEle.removeAttribute("aria-label"),this.popupEle.removeAttribute("role")),this.popupObj&&(this.popupObj.destroy(),e.detach(this.popupObj.element)),this.element.tagName!==this.getDirective()&&this.inputWrapper.parentElement.insertBefore(this.element,this.inputWrapper),this.inputObj&&(e.detach(this.inputObj.container),this.inputObj=null),i.Input.destroy({element:this.inputEle,floatLabelType:this.floatLabelType,properties:this.properties}),e.detach(this.inputWrapper),e.detach(this.popupDiv),this.inputEle=null,this.previousItemElement=null,this.inputWrapper.innerHTML="",this.inputWrapper=null,this.popupDiv=null,this.popupObj=null,this.gridObj=null,this.gridEle=null,this.popupEle=null,this.footer=null,this.noRecord=null,this.hiddenElement=null,this.dropdownElement=null,f.prototype.destroy.call(this)},y.prototype.onPropertyChanged=function(n,r){for(var o=0,s=Object.keys(n);o<s.length;o++){var a=s[o],l=void 0;switch(a){case"width":case"popupWidth":"width"===a&&this.setElementWidth(n.width),this.popupObj&&(this.popupObj.element.style.width=this.getSize(!0));break;case"popupHeight":if(this.popupObj){var p=this.getSize(!1);this.popupObj.element.style.maxHeight=p,this.popupDiv.style.maxHeight=p,this.gridObj.height=p}break;case"placeholder":i.Input.setPlaceholder(n.placeholder,this.inputEle);break;case"readonly":i.Input.setReadonly(this.readonly,this.inputEle);break;case"disabled":i.Input.setEnabled(!this.disabled,this.inputEle),this.setEnable();break;case"cssClass":this.setCssClass(n.cssClass,r.cssClass);break;case"floatLabelType":i.Input.removeFloating(this.inputObj),i.Input.addFloating(this.inputEle,this.floatLabelType,this.placeholder);break;case"showClearButton":i.Input.setClearButton(n.showClearButton,this.inputEle,this.inputObj);break;case"value":this.initValue(!0,!0);break;case"text":this.initValue(!0,!1);break;case"index":this.initValue(!0);break;case"sortOrder":this.gridObj&&(this.gridObj.sortSettings.columns=[{field:this.fields.text,direction:n.sortOrder===t.SortOrder.Ascending?t.SortOrder.Ascending:t.SortOrder.Descending}]);break;case"htmlAttributes":this.setHTMLAttributes();break;case"noRecordsTemplate":this.l10nUpdate();break;case"actionFailureTemplate":this.l10nUpdate(!0);break;case"footerTemplate":this.setFooterTemplate();break;case"itemTemplate":this.gridObj&&(this.gridObj.rowTemplate=n.itemTemplate);break;case"groupTemplate":this.groupTemplate=n.groupTemplate,this.updateGroupByField();break;case"enableRtl":this.gridObj&&this.popupObj&&(this.gridObj.enableRtl=n.enableRtl,i.Input.setEnableRtl(n.enableRtl,[this.inputWrapper]),this.popupObj.enableRtl=n.enableRtl);break;case"dataSource":this.updateDynamicDataSource(n.dataSource,r.dataSource);break;case"query":this.gridObj&&(this.gridObj.query=n.query);break;case"gridSettings":this.gridObj&&(this.gridObj.gridLines=n.gridSettings.gridLines,this.gridObj.rowHeight=n.gridSettings.rowHeight,this.gridObj.enableAltRow=n.gridSettings.enableAltRow,this.gridObj.allowResizing=n.gridSettings.allowResizing,e.isNullOrUndefined(n.gridSettings.allowTextWrap)||(this.gridObj.allowTextWrap=n.gridSettings.allowTextWrap),e.isNullOrUndefined(n.gridSettings.textWrapMode)||(this.gridObj.textWrapSettings.wrapMode=n.gridSettings.textWrapMode));break;case"fields":this.fields=n.fields,this.updateGroupByField();break;case"filterType":this.filterType=n.filterType;break;case"enableVirtualization":this.gridObj&&(this.enableVirtualization=this.gridObj.enableVirtualization=n.enableVirtualization);break;case"sortType":this.gridObj&&(this.sortType=n.sortType,this.gridObj.allowMultiSorting="multiplecolumns"===this.sortType.toString().toLowerCase()&&this.allowSorting);break;case"allowFiltering":this.allowFiltering=n.allowFiltering;break;case"allowSorting":this.gridObj&&(this.allowSorting=this.gridObj.allowSorting=n.allowSorting);break;case"columns":this.gridObj&&(l=this.getGridColumns(),this.gridObj.columns=l);break;case"locale":this.isLocaleChanged=!0}}},a([e.Property([])],y.prototype,"dataSource",void 0),a([e.Property(null)],y.prototype,"text",void 0),a([e.Property(null)],y.prototype,"value",void 0),a([e.Property(null)],y.prototype,"index",void 0),a([e.Property("100%")],y.prototype,"width",void 0),a([e.Property("300px")],y.prototype,"popupHeight",void 0),a([e.Property("100%")],y.prototype,"popupWidth",void 0),a([e.Property(null)],y.prototype,"placeholder",void 0),a([e.Property(!0)],y.prototype,"allowFiltering",void 0),a([e.Property(!0)],y.prototype,"allowSorting",void 0),a([e.Property(!1)],y.prototype,"showClearButton",void 0),a([e.Property("")],y.prototype,"cssClass",void 0),a([e.Complex({text:null,value:null,groupBy:null},h)],y.prototype,"fields",void 0),a([e.Collection([],c)],y.prototype,"columns",void 0),a([e.Complex({},g)],y.prototype,"gridSettings",void 0),a([e.Property(t.FilterType.StartsWith)],y.prototype,"filterType",void 0),a([e.Property("Never")],y.prototype,"floatLabelType",void 0),a([e.Property(t.SortOrder.None)],y.prototype,"sortOrder",void 0),a([e.Property(t.SortType.OneColumn)],y.prototype,"sortType",void 0),a([e.Property(!1)],y.prototype,"enableVirtualization",void 0),a([e.Property(!1)],y.prototype,"disabled",void 0),a([e.Property(!1)],y.prototype,"readonly",void 0),a([e.Property(!1)],y.prototype,"enablePersistence",void 0),a([e.Property()],y.prototype,"query",void 0),a([e.Property(null)],y.prototype,"itemTemplate",void 0),a([e.Property(null)],y.prototype,"footerTemplate",void 0),a([e.Property(null)],y.prototype,"groupTemplate",void 0),a([e.Property("Request Failed")],y.prototype,"actionFailureTemplate",void 0),a([e.Property("No records found")],y.prototype,"noRecordsTemplate",void 0),a([e.Property({})],y.prototype,"htmlAttributes",void 0),a([e.Event()],y.prototype,"created",void 0),a([e.Event()],y.prototype,"open",void 0),a([e.Event()],y.prototype,"close",void 0),a([e.Event()],y.prototype,"actionFailure",void 0),a([e.Event()],y.prototype,"actionBegin",void 0),a([e.Event()],y.prototype,"actionComplete",void 0),a([e.Event()],y.prototype,"filtering",void 0),a([e.Event()],y.prototype,"select",void 0),a([e.Event()],y.prototype,"change",void 0),y=a([e.NotifyPropertyChanges],y)}(e.Component);return t.Column=c,t.FieldSettings=h,t.GridSettings=g,t.MultiColumnComboBox=f,t.MultiColumnGrid=d,t}({},ej.base,ej.inputs,ej.data,ej.popups,ej.grids),this.ejs=ej;
|
|
11
11
|
//# sourceMappingURL=ej2-multicolumn-combobox.min.js.map
|