UNPKG

jqwidgets-scripts-custom

Version:

jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.

5 lines (4 loc) 7.84 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/jqxbuttons'); require('../../jqwidgets/jqxdropdownbutton'); !function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxdropdownbutton",["exports","@angular/core"],o):o((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxdropdownbutton={}),t.ng.core)}(this,function(t,o){"use strict";function i(t,o){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,r,i=n.call(t),s=[];try{for(;(void 0===o||0<o--)&&!(e=i.next()).done;)s.push(e.value)}catch(p){r={error:p}}finally{try{e&&!e.done&&(n=i["return"])&&n.call(i)}finally{if(r)throw r.error}}return s}var n=function(){function t(t){this.autoCreate=!0,this.properties=["animationType","arrowSize","autoOpen","closeDelay","disabled","dropDownHorizontalAlignment","dropDownVerticalAlignment","dropDownWidth","enableBrowserBoundsDetection","height","initContent","openDelay","popupZIndex","rtl","template","theme","width"],this.onClose=new o.EventEmitter,this.onOpen=new o.EventEmitter,this.elementRef=t}return t.prototype.ngOnInit=function(){this.autoCreate&&this.createComponent()},t.prototype.ngOnChanges=function(t){if(this.host)for(var o=0;o<this.properties.length;o++){var n="attr"+this.properties[o].substring(0,1).toUpperCase()+this.properties[o].substring(1),e=!1;if(this[n]!==undefined){if("object"==typeof this[n]){if(this[n]instanceof Array&&(e=this.arraysEqual(this[n],this.host.jqxDropDownButton(this.properties[o]))),e)return!1;this.host.jqxDropDownButton(this.properties[o],this[n]);continue}this[n]!==this.host.jqxDropDownButton(this.properties[o])&&this.host.jqxDropDownButton(this.properties[o],this[n])}}},t.prototype.arraysEqual=function(t,o){if(t&&!o||!t&&o)return!1;if(t.length!=o.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==o[n])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},o=0;o<this.properties.length;o++){var n="attr"+this.properties[o].substring(0,1).toUpperCase()+this.properties[o].substring(1);this[n]!==undefined&&(t[this.properties[o]]=this[n])}return t},t.prototype.moveClasses=function(t,o){var n,e=t.classList;0<e.length&&(n=o.classList).add.apply(n,function r(){for(var t=[],o=0;o<arguments.length;o++)t=t.concat(i(arguments[o]));return t}(e)),t.className=""},t.prototype.moveStyles=function(t,o){var n=t.style.cssText;o.style.cssText=n,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,"jqxDropDownButton",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.setOptions=function(t){this.host.jqxDropDownButton("setOptions",t)},t.prototype.animationType=function(t){if(t===undefined)return this.host.jqxDropDownButton("animationType");this.host.jqxDropDownButton("animationType",t)},t.prototype.arrowSize=function(t){if(t===undefined)return this.host.jqxDropDownButton("arrowSize");this.host.jqxDropDownButton("arrowSize",t)},t.prototype.autoOpen=function(t){if(t===undefined)return this.host.jqxDropDownButton("autoOpen");this.host.jqxDropDownButton("autoOpen",t)},t.prototype.closeDelay=function(t){if(t===undefined)return this.host.jqxDropDownButton("closeDelay");this.host.jqxDropDownButton("closeDelay",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxDropDownButton("disabled");this.host.jqxDropDownButton("disabled",t)},t.prototype.dropDownHorizontalAlignment=function(t){if(t===undefined)return this.host.jqxDropDownButton("dropDownHorizontalAlignment");this.host.jqxDropDownButton("dropDownHorizontalAlignment",t)},t.prototype.dropDownVerticalAlignment=function(t){if(t===undefined)return this.host.jqxDropDownButton("dropDownVerticalAlignment");this.host.jqxDropDownButton("dropDownVerticalAlignment",t)},t.prototype.dropDownWidth=function(t){if(t===undefined)return this.host.jqxDropDownButton("dropDownWidth");this.host.jqxDropDownButton("dropDownWidth",t)},t.prototype.enableBrowserBoundsDetection=function(t){if(t===undefined)return this.host.jqxDropDownButton("enableBrowserBoundsDetection");this.host.jqxDropDownButton("enableBrowserBoundsDetection",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxDropDownButton("height");this.host.jqxDropDownButton("height",t)},t.prototype.initContent=function(t){if(t===undefined)return this.host.jqxDropDownButton("initContent");this.host.jqxDropDownButton("initContent",t)},t.prototype.openDelay=function(t){if(t===undefined)return this.host.jqxDropDownButton("openDelay");this.host.jqxDropDownButton("openDelay",t)},t.prototype.popupZIndex=function(t){if(t===undefined)return this.host.jqxDropDownButton("popupZIndex");this.host.jqxDropDownButton("popupZIndex",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxDropDownButton("rtl");this.host.jqxDropDownButton("rtl",t)},t.prototype.template=function(t){if(t===undefined)return this.host.jqxDropDownButton("template");this.host.jqxDropDownButton("template",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxDropDownButton("theme");this.host.jqxDropDownButton("theme",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxDropDownButton("width");this.host.jqxDropDownButton("width",t)},t.prototype.close=function(){this.host.jqxDropDownButton("close")},t.prototype.destroy=function(){this.host.jqxDropDownButton("destroy")},t.prototype.focus=function(){this.host.jqxDropDownButton("focus")},t.prototype.getContent=function(){return this.host.jqxDropDownButton("getContent")},t.prototype.isOpened=function(){return this.host.jqxDropDownButton("isOpened")},t.prototype.open=function(){this.host.jqxDropDownButton("open")},t.prototype.setContent=function(t){this.host.jqxDropDownButton("setContent",t)},t.prototype.__wireEvents__=function(){var o=this;this.host.on("close",function(t){o.onClose.emit(t)}),this.host.on("open",function(t){o.onOpen.emit(t)})},t.decorators=[{type:o.Component,args:[{selector:"jqxDropDownButton",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:o.ElementRef}]},t.propDecorators={attrAnimationType:[{type:o.Input,args:["animationType"]}],attrArrowSize:[{type:o.Input,args:["arrowSize"]}],attrAutoOpen:[{type:o.Input,args:["autoOpen"]}],attrCloseDelay:[{type:o.Input,args:["closeDelay"]}],attrDisabled:[{type:o.Input,args:["disabled"]}],attrDropDownHorizontalAlignment:[{type:o.Input,args:["dropDownHorizontalAlignment"]}],attrDropDownVerticalAlignment:[{type:o.Input,args:["dropDownVerticalAlignment"]}],attrDropDownWidth:[{type:o.Input,args:["dropDownWidth"]}],attrEnableBrowserBoundsDetection:[{type:o.Input,args:["enableBrowserBoundsDetection"]}],attrInitContent:[{type:o.Input,args:["initContent"]}],attrOpenDelay:[{type:o.Input,args:["openDelay"]}],attrPopupZIndex:[{type:o.Input,args:["popupZIndex"]}],attrRtl:[{type:o.Input,args:["rtl"]}],attrTemplate:[{type:o.Input,args:["template"]}],attrTheme:[{type:o.Input,args:["theme"]}],attrWidth:[{type:o.Input,args:["width"]}],attrHeight:[{type:o.Input,args:["height"]}],autoCreate:[{type:o.Input,args:["auto-create"]}],onClose:[{type:o.Output}],onOpen:[{type:o.Output}]},t}(),e=function(){function t(){}return t.decorators=[{type:o.NgModule,args:[{imports:[],declarations:[n],exports:[n]}]}],t}();t.jqxDropDownButtonComponent=n,t.jqxDropDownButtonModule=e,Object.defineProperty(t,"__esModule",{value:!0})});