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) • 19.4 kB
JavaScript
require('../../jqwidgets/jqxcore');
require('../../jqwidgets/jqxdata');
require('../../jqwidgets/jqxbuttons');
require('../../jqwidgets/jqxscrollbar');
require('../../jqwidgets/jqxlistbox');
require('../../jqwidgets/jqxdragdrop');
!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/jqxlistbox",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxlistbox={}),t.ng.core,t.ng.forms)}(this,function(t,e,o){"use strict";function n(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var i,s,n=o.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(i=n.next()).done;)r.push(i.value)}catch(h){s={error:h}}finally{try{i&&!i.done&&(o=n["return"])&&o.call(n)}finally{if(s)throw s.error}}return r}var i=function(){},s={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return r}),multi:!0},r=function(){function t(t){this.autoCreate=!0,this.properties=["autoHeight","allowDrag","allowDrop","checkboxes","disabled","displayMember","dropAction","dragStart","dragEnd","enableHover","enableSelection","equalItemsWidth","filterable","filterHeight","filterDelay","filterPlaceHolder","height","hasThreeStates","itemHeight","incrementalSearch","incrementalSearchDelay","multiple","multipleextended","renderer","rendered","rtl","selectedIndex","selectedIndexes","source","scrollBarSize","searchMode","theme","valueMember","width"],this.onTouchedCallback=i,this.onChangeCallback=i,this.onBindingComplete=new e.EventEmitter,this.onChange=new e.EventEmitter,this.onCheckChange=new e.EventEmitter,this.onDragStart=new e.EventEmitter,this.onDragEnd=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.jqxListBox({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),i=!1;if(this[o]!==undefined){if("object"==typeof this[o]){if(this[o]instanceof Array&&(i=this.arraysEqual(this[o],this.host.jqxListBox(this.properties[e]))),i)return!1;this.host.jqxListBox(this.properties[e],this[o]);continue}this[o]!==this.host.jqxListBox(this.properties[e])&&this.host.jqxListBox(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,i=t.classList;0<i.length&&(o=e.classList).add.apply(o,function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t}(i)),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,"jqxListBox",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.jqxListBox("setOptions",t)},t.prototype.autoHeight=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("autoHeight");this.host.jqxListBox("autoHeight",t)},t.prototype.allowDrag=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("allowDrag");this.host.jqxListBox("allowDrag",t)},t.prototype.allowDrop=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("allowDrop");this.host.jqxListBox("allowDrop",t)},t.prototype.checkboxes=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("checkboxes");this.host.jqxListBox("checkboxes",t)},t.prototype.disabled=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("disabled");this.host.jqxListBox("disabled",t)},t.prototype.displayMember=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("displayMember");this.host.jqxListBox("displayMember",t)},t.prototype.dropAction=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("dropAction");this.host.jqxListBox("dropAction",t)},t.prototype.dragStart=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("dragStart");this.host.jqxListBox("dragStart",t)},t.prototype.dragEnd=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("dragEnd");this.host.jqxListBox("dragEnd",t)},t.prototype.enableHover=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("enableHover");this.host.jqxListBox("enableHover",t)},t.prototype.enableSelection=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("enableSelection");this.host.jqxListBox("enableSelection",t)},t.prototype.equalItemsWidth=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("equalItemsWidth");this.host.jqxListBox("equalItemsWidth",t)},t.prototype.filterable=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("filterable");this.host.jqxListBox("filterable",t)},t.prototype.filterHeight=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("filterHeight");this.host.jqxListBox("filterHeight",t)},t.prototype.filterDelay=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("filterDelay");this.host.jqxListBox("filterDelay",t)},t.prototype.filterPlaceHolder=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("filterPlaceHolder");this.host.jqxListBox("filterPlaceHolder",t)},t.prototype.height=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("height");this.host.jqxListBox("height",t)},t.prototype.hasThreeStates=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("hasThreeStates");this.host.jqxListBox("hasThreeStates",t)},t.prototype.itemHeight=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("itemHeight");this.host.jqxListBox("itemHeight",t)},t.prototype.incrementalSearch=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("incrementalSearch");this.host.jqxListBox("incrementalSearch",t)},t.prototype.incrementalSearchDelay=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("incrementalSearchDelay");this.host.jqxListBox("incrementalSearchDelay",t)},t.prototype.multiple=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("multiple");this.host.jqxListBox("multiple",t)},t.prototype.multipleextended=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("multipleextended");this.host.jqxListBox("multipleextended",t)},t.prototype.renderer=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("renderer");this.host.jqxListBox("renderer",t)},t.prototype.rendered=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("rendered");this.host.jqxListBox("rendered",t)},t.prototype.rtl=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("rtl");this.host.jqxListBox("rtl",t)},t.prototype.selectedIndex=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("selectedIndex");this.host.jqxListBox("selectedIndex",t)},t.prototype.selectedIndexes=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("selectedIndexes");this.host.jqxListBox("selectedIndexes",t)},t.prototype.source=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("source");this.host.jqxListBox("source",t)},t.prototype.scrollBarSize=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("scrollBarSize");this.host.jqxListBox("scrollBarSize",t)},t.prototype.searchMode=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("searchMode");this.host.jqxListBox("searchMode",t)},t.prototype.theme=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("theme");this.host.jqxListBox("theme",t)},t.prototype.valueMember=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("valueMember");this.host.jqxListBox("valueMember",t)},t.prototype.width=function(t){if(this.autoCreate&&!this.host&&this.createComponent(),t===undefined)return this.host.jqxListBox("width");this.host.jqxListBox("width",t)},t.prototype.addItem=function(t){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("addItem",t)},t.prototype.beginUpdate=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("beginUpdate")},t.prototype.clear=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("clear")},t.prototype.clearSelection=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("clearSelection")},t.prototype.checkIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("checkIndex",t)},t.prototype.checkItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("checkItem",t)},t.prototype.checkAll=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("checkAll")},t.prototype.clearFilter=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("clearFilter")},t.prototype.destroy=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("destroy")},t.prototype.disableItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("disableItem",t)},t.prototype.disableAt=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("disableAt",t)},t.prototype.enableItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("enableItem",t)},t.prototype.enableAt=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("enableAt",t)},t.prototype.ensureVisible=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("ensureVisible",t)},t.prototype.endUpdate=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("endUpdate")},t.prototype.focus=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("focus")},t.prototype.getItems=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("getItems")},t.prototype.getSelectedItems=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("getSelectedItems")},t.prototype.getCheckedItems=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("getCheckedItems")},t.prototype.getItem=function(t){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("getItem",t)},t.prototype.getItemByValue=function(t){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("getItemByValue",t)},t.prototype.getSelectedItem=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("getSelectedItem")},t.prototype.getSelectedIndex=function(){return this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("getSelectedIndex")},t.prototype.insertAt=function(t,e){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("insertAt",t,e)},t.prototype.invalidate=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("invalidate")},t.prototype.indeterminateItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("indeterminateItem",t)},t.prototype.indeterminateIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("indeterminateIndex",t)},t.prototype.loadFromSelect=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("loadFromSelect",t)},t.prototype.removeItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("removeItem",t)},t.prototype.removeAt=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("removeAt",t)},t.prototype.render=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("render")},t.prototype.refresh=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("refresh")},t.prototype.selectItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("selectItem",t)},t.prototype.selectIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("selectIndex",t)},t.prototype.updateItem=function(t,e){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("updateItem",t,e)},t.prototype.updateAt=function(t,e){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("updateAt",t,e)},t.prototype.unselectIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("unselectIndex",t)},t.prototype.unselectItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("unselectItem",t)},t.prototype.uncheckIndex=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("uncheckIndex",t)},t.prototype.uncheckItem=function(t){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("uncheckItem",t)},t.prototype.uncheckAll=function(){this.autoCreate&&!this.host&&this.createComponent(),this.host.jqxListBox("uncheckAll")},t.prototype.val=function(t){return t!==undefined?this.host.jqxListBox("val",t):this.host.jqxListBox("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("bindingComplete",function(t){e.onBindingComplete.emit(t)}),this.host.on("change",function(t){e.onChange.emit(t),t.args&&e.onChangeCallback(t.args.item.value)}),this.host.on("checkChange",function(t){e.onCheckChange.emit(t)}),this.host.on("dragStart",function(t){e.onDragStart.emit(t)}),this.host.on("dragEnd",function(t){e.onDragEnd.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:"jqxListBox",template:"<div><ng-content></ng-content></div>",providers:[s],changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrAutoHeight:[{type:e.Input,args:["autoHeight"]}],attrAllowDrag:[{type:e.Input,args:["allowDrag"]}],attrAllowDrop:[{type:e.Input,args:["allowDrop"]}],attrCheckboxes:[{type:e.Input,args:["checkboxes"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrDisplayMember:[{type:e.Input,args:["displayMember"]}],attrDropAction:[{type:e.Input,args:["dropAction"]}],attrDragStart:[{type:e.Input,args:["dragStart"]}],attrDragEnd:[{type:e.Input,args:["dragEnd"]}],attrEnableHover:[{type:e.Input,args:["enableHover"]}],attrEnableSelection:[{type:e.Input,args:["enableSelection"]}],attrEqualItemsWidth:[{type:e.Input,args:["equalItemsWidth"]}],attrFilterable:[{type:e.Input,args:["filterable"]}],attrFilterHeight:[{type:e.Input,args:["filterHeight"]}],attrFilterDelay:[{type:e.Input,args:["filterDelay"]}],attrFilterPlaceHolder:[{type:e.Input,args:["filterPlaceHolder"]}],attrHasThreeStates:[{type:e.Input,args:["hasThreeStates"]}],attrItemHeight:[{type:e.Input,args:["itemHeight"]}],attrIncrementalSearch:[{type:e.Input,args:["incrementalSearch"]}],attrIncrementalSearchDelay:[{type:e.Input,args:["incrementalSearchDelay"]}],attrMultiple:[{type:e.Input,args:["multiple"]}],attrMultipleextended:[{type:e.Input,args:["multipleextended"]}],attrRenderer:[{type:e.Input,args:["renderer"]}],attrRendered:[{type:e.Input,args:["rendered"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrSelectedIndex:[{type:e.Input,args:["selectedIndex"]}],attrSelectedIndexes:[{type:e.Input,args:["selectedIndexes"]}],attrSource:[{type:e.Input,args:["source"]}],attrScrollBarSize:[{type:e.Input,args:["scrollBarSize"]}],attrSearchMode:[{type:e.Input,args:["searchMode"]}],attrTheme:[{type:e.Input,args:["theme"]}],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}],onChange:[{type:e.Output}],onCheckChange:[{type:e.Output}],onDragStart:[{type:e.Output}],onDragEnd:[{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.jqxListBoxComponent=r,t.jqxListBoxModule=h,Object.defineProperty(t,"__esModule",{value:!0})});