jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
8 lines (7 loc) • 20.3 kB
JavaScript
require('../../jqwidgets/jqxcore');
require('../../jqwidgets/jqxdata');
require('../../jqwidgets/jqxbuttons');
require('../../jqwidgets/jqxscrollbar');
require('../../jqwidgets/jqxlistbox');
require('../../jqwidgets/jqxdropdownlist');
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxdropdownlist",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxdropdownlist={}),t.ng.core,t.ng.forms)}(this,function(t,e,o){"use strict";function s(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,i,s=o.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(n=s.next()).done;)r.push(n.value)}catch(h){i={error:h}}finally{try{n&&!n.done&&(o=s["return"])&&o.call(s)}finally{if(i)throw i.error}}return r}var n=function(){},i={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return r}),multi:!0},r=function(){function t(t){this.autoCreate=!0,this.properties=["autoOpen","autoDropDownHeight","animationType","checkboxes","closeDelay","disabled","displayMember","dropDownHorizontalAlignment","dropDownVerticalAlignment","dropDownHeight","dropDownWidth","enableSelection","enableBrowserBoundsDetection","enableHover","filterable","filterHeight","filterDelay","filterPlaceHolder","height","incrementalSearch","incrementalSearchDelay","itemHeight","openDelay","placeHolder","popupZIndex","rtl","renderer","selectionRenderer","searchMode","source","selectedIndex","theme","template","valueMember","width"],this.onTouchedCallback=n,this.onChangeCallback=n,this.onBindingComplete=new e.EventEmitter,this.onClose=new e.EventEmitter,this.onCheckChange=new e.EventEmitter,this.onChange=new e.EventEmitter,this.onOpen=new e.EventEmitter,this.onSelect=new e.EventEmitter,this.onUnselect=new e.EventEmitter,this.elementRef=t}return t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){var t="",e={};if(0<JQXLite(this.elementRef.nativeElement.children).find("li").length){this.container=document.createElement("div"),t=this.elementRef.nativeElement.innerHTML,this.container.appendChild(this.elementRef.nativeElement.firstChild),this.elementRef.nativeElement.innerHTML=t,this.content=t;var o=JQXLite.jqx.parseSourceTag(this.container);e.source=o.items}this.autoCreate&&this.createComponent(e)},t.prototype.ngAfterViewChecked=function(){if(this.container&&this.content!==this.container.innerHTML){this.content=this.container.innerHTML;var t=JQXLite.jqx.parseSourceTag(this.container);this.host.jqxDropDownList({source:t.items})}},t.prototype.ngOnChanges=function(t){if(this.host)for(var e=0;e<this.properties.length;e++){var o="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),n=!1;if(this[o]!==undefined){if("object"==typeof this[o]){if(this[o]instanceof Array&&(n=this.arraysEqual(this[o],this.host.jqxDropDownList(this.properties[e]))),n)return!1;this.host.jqxDropDownList(this.properties[e],this[o]);continue}this[o]!==this.host.jqxDropDownList(this.properties[e])&&this.host.jqxDropDownList(this.properties[e],this[o])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var o="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[o]!==undefined&&(t[this.properties[e]]=this[o])}return t},t.prototype.moveClasses=function(t,e){var o,n=t.classList;0<n.length&&(o=e.classList).add.apply(o,function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}(n)),t.className=""},t.prototype.moveStyles=function(t,e){var o=t.style.cssText;e.style.cssText=o,t.style.cssText=""},t.prototype.createComponent=function(t){this.host||(t?JQXLite.extend(t,this.manageAttributes()):t=this.manageAttributes(),this.host=JQXLite(this.elementRef.nativeElement.firstChild),this.moveClasses(this.elementRef.nativeElement,this.host[0]),this.moveStyles(this.elementRef.nativeElement,this.host[0]),this.__wireEvents__(),this.widgetObject=jqwidgets.createInstance(this.host,"jqxDropDownList",t))},t.prototype.createWidget=function(t){this.createComponent(t)},t.prototype.__updateRect__=function(){this.host&&this.host.css({width:this.attrWidth,height:this.attrHeight})},t.prototype.writeValue=function(t){this.widgetObject&&this.onChangeCallback(this.host.val())},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setOptions=function(t){this.host.jqxDropDownList("setOptions",t)},t.prototype.autoOpen=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("autoOpen");this.host.jqxDropDownList("autoOpen",t)},t.prototype.autoDropDownHeight=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("autoDropDownHeight");this.host.jqxDropDownList("autoDropDownHeight",t)},t.prototype.animationType=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("animationType");this.host.jqxDropDownList("animationType",t)},t.prototype.checkboxes=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("checkboxes");this.host.jqxDropDownList("checkboxes",t)},t.prototype.closeDelay=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("closeDelay");this.host.jqxDropDownList("closeDelay",t)},t.prototype.disabled=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("disabled");this.host.jqxDropDownList("disabled",t)},t.prototype.displayMember=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("displayMember");this.host.jqxDropDownList("displayMember",t)},t.prototype.dropDownHorizontalAlignment=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("dropDownHorizontalAlignment");this.host.jqxDropDownList("dropDownHorizontalAlignment",t)},t.prototype.dropDownVerticalAlignment=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("dropDownVerticalAlignment");this.host.jqxDropDownList("dropDownVerticalAlignment",t)},t.prototype.dropDownHeight=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("dropDownHeight");this.host.jqxDropDownList("dropDownHeight",t)},t.prototype.dropDownWidth=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("dropDownWidth");this.host.jqxDropDownList("dropDownWidth",t)},t.prototype.enableSelection=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("enableSelection");this.host.jqxDropDownList("enableSelection",t)},t.prototype.enableBrowserBoundsDetection=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("enableBrowserBoundsDetection");this.host.jqxDropDownList("enableBrowserBoundsDetection",t)},t.prototype.enableHover=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("enableHover");this.host.jqxDropDownList("enableHover",t)},t.prototype.filterable=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("filterable");this.host.jqxDropDownList("filterable",t)},t.prototype.filterHeight=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("filterHeight");this.host.jqxDropDownList("filterHeight",t)},t.prototype.filterDelay=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("filterDelay");this.host.jqxDropDownList("filterDelay",t)},t.prototype.filterPlaceHolder=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("filterPlaceHolder");this.host.jqxDropDownList("filterPlaceHolder",t)},t.prototype.height=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("height");this.host.jqxDropDownList("height",t)},t.prototype.incrementalSearch=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("incrementalSearch");this.host.jqxDropDownList("incrementalSearch",t)},t.prototype.incrementalSearchDelay=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("incrementalSearchDelay");this.host.jqxDropDownList("incrementalSearchDelay",t)},t.prototype.itemHeight=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("itemHeight");this.host.jqxDropDownList("itemHeight",t)},t.prototype.openDelay=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("openDelay");this.host.jqxDropDownList("openDelay",t)},t.prototype.placeHolder=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("placeHolder");this.host.jqxDropDownList("placeHolder",t)},t.prototype.popupZIndex=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("popupZIndex");this.host.jqxDropDownList("popupZIndex",t)},t.prototype.rtl=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("rtl");this.host.jqxDropDownList("rtl",t)},t.prototype.renderer=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("renderer");this.host.jqxDropDownList("renderer",t)},t.prototype.selectionRenderer=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("selectionRenderer");this.host.jqxDropDownList("selectionRenderer",t)},t.prototype.searchMode=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("searchMode");this.host.jqxDropDownList("searchMode",t)},t.prototype.source=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("source");this.host.jqxDropDownList("source",t)},t.prototype.selectedIndex=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("selectedIndex");this.host.jqxDropDownList("selectedIndex",t)},t.prototype.theme=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("theme");this.host.jqxDropDownList("theme",t)},t.prototype.template=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("template");this.host.jqxDropDownList("template",t)},t.prototype.valueMember=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("valueMember");this.host.jqxDropDownList("valueMember",t)},t.prototype.width=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxDropDownList("width");this.host.jqxDropDownList("width",t)},t.prototype.addItem=function(t){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("addItem",t)},t.prototype.clearSelection=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("clearSelection")},t.prototype.clear=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("clear")},t.prototype.close=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("close")},t.prototype.checkIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("checkIndex",t)},t.prototype.checkItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("checkItem",t)},t.prototype.checkAll=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("checkAll")},t.prototype.clearFilter=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("clearFilter")},t.prototype.destroy=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("destroy")},t.prototype.disableItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("disableItem",t)},t.prototype.disableAt=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("disableAt",t)},t.prototype.enableItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("enableItem",t)},t.prototype.enableAt=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("enableAt",t)},t.prototype.ensureVisible=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("ensureVisible",t)},t.prototype.focus=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("focus")},t.prototype.getItem=function(t){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("getItem",t)},t.prototype.getItemByValue=function(t){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("getItemByValue",t)},t.prototype.getItems=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("getItems")},t.prototype.getCheckedItems=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("getCheckedItems")},t.prototype.getSelectedItem=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("getSelectedItem")},t.prototype.getSelectedIndex=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("getSelectedIndex")},t.prototype.insertAt=function(t,e){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("insertAt",t,e)},t.prototype.isOpened=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("isOpened")},t.prototype.indeterminateIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("indeterminateIndex",t)},t.prototype.indeterminateItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("indeterminateItem",t)},t.prototype.loadFromSelect=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("loadFromSelect",t)},t.prototype.open=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("open")},t.prototype.removeItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("removeItem",t)},t.prototype.removeAt=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("removeAt",t)},t.prototype.selectIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("selectIndex",t)},t.prototype.selectItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("selectItem",t)},t.prototype.setContent=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("setContent",t)},t.prototype.updateItem=function(t,e){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("updateItem",t,e)},t.prototype.updateAt=function(t,e){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("updateAt",t,e)},t.prototype.unselectIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("unselectIndex",t)},t.prototype.unselectItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("unselectItem",t)},t.prototype.uncheckIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("uncheckIndex",t)},t.prototype.uncheckItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("uncheckItem",t)},t.prototype.uncheckAll=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxDropDownList("uncheckAll")},t.prototype.val=function(t){return t!==undefined?this.host.jqxDropDownList("val",t):this.host.jqxDropDownList("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("bindingComplete",function(t){e.onBindingComplete.emit(t)}),this.host.on("close",function(t){e.onClose.emit(t)}),this.host.on("checkChange",function(t){e.onCheckChange.emit(t)}),this.host.on("change",function(t){e.onChange.emit(t),t.args&&e.onChangeCallback(t.args.item.value)}),this.host.on("open",function(t){e.onOpen.emit(t)}),this.host.on("select",function(t){e.onSelect.emit(t)}),this.host.on("unselect",function(t){e.onUnselect.emit(t)})},t.decorators=[{type:e.Component,args:[{selector:"jqxDropDownList",template:"<div><ng-content></ng-content></div>",providers:[i],changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrAutoOpen:[{type:e.Input,args:["autoOpen"]}],attrAutoDropDownHeight:[{type:e.Input,args:["autoDropDownHeight"]}],attrAnimationType:[{type:e.Input,args:["animationType"]}],attrCheckboxes:[{type:e.Input,args:["checkboxes"]}],attrCloseDelay:[{type:e.Input,args:["closeDelay"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrDisplayMember:[{type:e.Input,args:["displayMember"]}],attrDropDownHorizontalAlignment:[{type:e.Input,args:["dropDownHorizontalAlignment"]}],attrDropDownVerticalAlignment:[{type:e.Input,args:["dropDownVerticalAlignment"]}],attrDropDownHeight:[{type:e.Input,args:["dropDownHeight"]}],attrDropDownWidth:[{type:e.Input,args:["dropDownWidth"]}],attrEnableSelection:[{type:e.Input,args:["enableSelection"]}],attrEnableBrowserBoundsDetection:[{type:e.Input,args:["enableBrowserBoundsDetection"]}],attrEnableHover:[{type:e.Input,args:["enableHover"]}],attrFilterable:[{type:e.Input,args:["filterable"]}],attrFilterHeight:[{type:e.Input,args:["filterHeight"]}],attrFilterDelay:[{type:e.Input,args:["filterDelay"]}],attrFilterPlaceHolder:[{type:e.Input,args:["filterPlaceHolder"]}],attrIncrementalSearch:[{type:e.Input,args:["incrementalSearch"]}],attrIncrementalSearchDelay:[{type:e.Input,args:["incrementalSearchDelay"]}],attrItemHeight:[{type:e.Input,args:["itemHeight"]}],attrOpenDelay:[{type:e.Input,args:["openDelay"]}],attrPlaceHolder:[{type:e.Input,args:["placeHolder"]}],attrPopupZIndex:[{type:e.Input,args:["popupZIndex"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrRenderer:[{type:e.Input,args:["renderer"]}],attrSelectionRenderer:[{type:e.Input,args:["selectionRenderer"]}],attrSearchMode:[{type:e.Input,args:["searchMode"]}],attrSource:[{type:e.Input,args:["source"]}],attrSelectedIndex:[{type:e.Input,args:["selectedIndex"]}],attrTheme:[{type:e.Input,args:["theme"]}],attrTemplate:[{type:e.Input,args:["template"]}],attrValueMember:[{type:e.Input,args:["valueMember"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onBindingComplete:[{type:e.Output}],onClose:[{type:e.Output}],onCheckChange:[{type:e.Output}],onChange:[{type:e.Output}],onOpen:[{type:e.Output}],onSelect:[{type:e.Output}],onUnselect:[{type:e.Output}]},t}(),h=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.FormsModule],declarations:[r],exports:[r]}]}],t}();t.jqxDropDownListComponent=r,t.jqxDropDownListModule=h,Object.defineProperty(t,"__esModule",{value:!0})});