UNPKG

jqwidgets-scripts-custom

Version:

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

3 lines (2 loc) 3.85 kB
require('../../jqwidgets/jqxcore'); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxpivotdesigner",["exports","@angular/core"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxpivotdesigner={}),t.ng.core)}(this,function(t,e){"use strict";function n(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,s,n=i.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=n.next()).done;)o.push(r.value)}catch(p){s={error:p}}finally{try{r&&!r.done&&(i=n["return"])&&i.call(n)}finally{if(s)throw s.error}}return o}var i=function(){function t(t){var e=this;this.autoCreate=!0,this.properties=["type","target"],this.elementRef=t,JQXLite(window).resize(function(){e.__updateRect__()})}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),r=!1;if(this[i]!==undefined){if("object"==typeof this[i]){if(this[i]instanceof Array&&(r=this.arraysEqual(this[i],this.host.jqxPivotDesigner(this.properties[e]))),r)return!1;this.host.jqxPivotDesigner(this.properties[e],this[i]);continue}this[i]!==this.host.jqxPivotDesigner(this.properties[e])&&this.host.jqxPivotDesigner(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,r=t.classList;0<r.length&&(i=e.classList).add.apply(i,function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(n(arguments[e]));return t}(r)),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,"jqxPivotDesigner",t),this.__updateRect__())},t.prototype.createWidget=function(t){this.createComponent(t)},t.prototype.__updateRect__=function(){this.host&&this.host.css({width:this.attrWidth,height:this.attrHeight}),this.refresh()},t.prototype.setOptions=function(t){this.host.jqxPivotDesigner("setOptions",t)},t.prototype.type=function(t){if(t===undefined)return this.host.jqxPivotDesigner("type");this.host.jqxPivotDesigner("type",t)},t.prototype.target=function(t){if(t===undefined)return this.host.jqxPivotDesigner("target");this.host.jqxPivotDesigner("target",t)},t.prototype.refresh=function(){this.host.jqxPivotDesigner("refresh")},t.prototype.__wireEvents__=function(){},t.decorators=[{type:e.Component,args:[{selector:"jqxPivotDesigner",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrType:[{type:e.Input,args:["type"]}],attrTarget:[{type:e.Input,args:["target"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}]},t}(),r=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[],declarations:[i],exports:[i]}]}],t}();t.jqxPivotDesignerComponent=i,t.jqxPivotDesignerModule=r,Object.defineProperty(t,"__esModule",{value:!0})});