UNPKG

jqwidgets-scripts-custom

Version:

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

4 lines (3 loc) 4.18 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/jqxdockpanel'); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxdockpanel",["exports","@angular/core"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxdockpanel={}),t.ng.core)}(this,function(t,e){"use strict";function s(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,o,s=i.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(n=s.next()).done;)r.push(n.value)}catch(h){o={error:h}}finally{try{n&&!n.done&&(i=s["return"])&&i.call(s)}finally{if(o)throw o.error}}return r}var i=function(){function t(t){this.autoCreate=!0,this.properties=["disabled","height","lastchildfill","width"],this.onLayout=new e.EventEmitter,this.elementRef=t}return t.prototype.ngOnInit=function(){this.autoCreate&&this.createComponent()},t.prototype.ngOnChanges=function(t){if(this.host)for(var e=0;e<this.properties.length;e++){var i="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),n=!1;if(this[i]!==undefined){if("object"==typeof this[i]){if(this[i]instanceof Array&&(n=this.arraysEqual(this[i],this.host.jqxDockPanel(this.properties[e]))),n)return!1;this.host.jqxDockPanel(this.properties[e],this[i]);continue}this[i]!==this.host.jqxDockPanel(this.properties[e])&&this.host.jqxDockPanel(this.properties[e],this[i])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var i="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[i]!==undefined&&(t[this.properties[e]]=this[i])}return t},t.prototype.moveClasses=function(t,e){var i,n=t.classList;0<n.length&&(i=e.classList).add.apply(i,function o(){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 i=t.style.cssText;e.style.cssText=i,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,"jqxDockPanel",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.jqxDockPanel("setOptions",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxDockPanel("disabled");this.host.jqxDockPanel("disabled",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxDockPanel("height");this.host.jqxDockPanel("height",t)},t.prototype.lastchildfill=function(t){if(t===undefined)return this.host.jqxDockPanel("lastchildfill");this.host.jqxDockPanel("lastchildfill",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxDockPanel("width");this.host.jqxDockPanel("width",t)},t.prototype.refresh=function(){this.host.jqxDockPanel("refresh")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("layout",function(t){e.onLayout.emit(t)})},t.decorators=[{type:e.Component,args:[{selector:"jqxDockPanel",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrDisabled:[{type:e.Input,args:["disabled"]}],attrLastchildfill:[{type:e.Input,args:["lastchildfill"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onLayout:[{type:e.Output}]},t}(),n=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[],declarations:[i],exports:[i]}]}],t}();t.jqxDockPanelComponent=i,t.jqxDockPanelModule=n,Object.defineProperty(t,"__esModule",{value:!0})});