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.75 kB
JavaScript
require('../../jqwidgets/jqxcore');
require('../../jqwidgets/jqxdraw');
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxdraw",["exports","@angular/core"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxdraw={}),t.ng.core)}(this,function(t,e){"use strict";function i(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,s,i=r.call(t),n=[];try{for(;(void 0===e||0<e--)&&!(o=i.next()).done;)n.push(o.value)}catch(h){s={error:h}}finally{try{o&&!o.done&&(r=i["return"])&&r.call(i)}finally{if(s)throw s.error}}return n}var r=function(){function t(t){this.autoCreate=!0,this.properties=["renderEngine"],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 r="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),o=!1;if(this[r]!==undefined){if("object"==typeof this[r]){if(this[r]instanceof Array&&(o=this.arraysEqual(this[r],this.host.jqxDraw(this.properties[e]))),o)return!1;this.host.jqxDraw(this.properties[e],this[r]);continue}this[r]!==this.host.jqxDraw(this.properties[e])&&this.host.jqxDraw(this.properties[e],this[r])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var r="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[r]!==undefined&&(t[this.properties[e]]=this[r])}return t},t.prototype.moveClasses=function(t,e){var r,o=t.classList;0<o.length&&(r=e.classList).add.apply(r,function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t}(o)),t.className=""},t.prototype.moveStyles=function(t,e){var r=t.style.cssText;e.style.cssText=r,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.host.append("div"),this.host.css({width:this.attrWidth,height:this.attrHeight}),this.__wireEvents__(),this.widgetObject=jqwidgets.createInstance(this.host,"jqxDraw",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.jqxDraw("setOptions",t)},t.prototype.renderEngine=function(t){if(t===undefined)return this.host.jqxDraw("renderEngine");this.host.jqxDraw("renderEngine",t)},t.prototype.attr=function(t,e){this.host.jqxDraw("attr",t,e)},t.prototype.circle=function(t,e,r,o){return this.host.jqxDraw("circle",t,e,r,o)},t.prototype.clear=function(){this.host.jqxDraw("clear")},t.prototype.getAttr=function(t,e){return this.host.jqxDraw("getAttr",t,e)},t.prototype.getSize=function(){return this.host.jqxDraw("getSize")},t.prototype.line=function(t,e,r,o,s){return this.host.jqxDraw("line",t,e,r,o,s)},t.prototype.measureText=function(t,e,r){return this.host.jqxDraw("measureText",t,e,r)},t.prototype.on=function(t,e,r){this.host.jqxDraw("on",t,e,r)},t.prototype.off=function(t,e,r){this.host.jqxDraw("off",t,e,r)},t.prototype.path=function(t,e){return this.host.jqxDraw("path",t,e)},t.prototype.pieslice=function(t,e,r,o,s,i,n,h){return this.host.jqxDraw("pieslice",t,e,r,o,s,i,n,h)},t.prototype.refresh=function(){this.host.jqxDraw("refresh")},t.prototype.rect=function(t,e,r,o,s){return this.host.jqxDraw("rect",t,e,r,o,s)},t.prototype.saveAsJPEG=function(t,e){this.host.jqxDraw("saveAsJPEG",t,e)},t.prototype.saveAsPNG=function(t,e){this.host.jqxDraw("saveAsPNG",t,e)},t.prototype.text=function(t,e,r,o,s,i,n,h,a,p,u){return this.host.jqxDraw("text",t,e,r,o,s,i,n,h,a,p,u)},t.prototype.__wireEvents__=function(){},t.decorators=[{type:e.Component,args:[{selector:"jqxDraw",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrRenderEngine:[{type:e.Input,args:["renderEngine"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}]},t}(),o=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[],declarations:[r],exports:[r]}]}],t}();t.jqxDrawComponent=r,t.jqxDrawModule=o,Object.defineProperty(t,"__esModule",{value:!0})});