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) 8.68 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/jqxdraw'); require('../../jqwidgets/jqxbargauge'); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxbargauge",["exports","@angular/core"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxbargauge={}),t.ng.core)}(this,function(t,e){"use strict";function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return a}var n=function(){function t(t){this.autoCreate=!0,this.properties=["animationDuration","backgroundColor","barSpacing","baseValue","colorScheme","customColorScheme","disabled","endAngle","formatFunction","height","labels","max","min","relativeInnerRadius","rendered","startAngle","title","tooltip","useGradient","values","width"],this.onDrawEnd=new e.EventEmitter,this.onDrawStart=new e.EventEmitter,this.onInitialized=new e.EventEmitter,this.onTooltipClose=new e.EventEmitter,this.onTooltipOpen=new e.EventEmitter,this.onValueChanged=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 n="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),r=!1;if(this[n]!==undefined){if("object"==typeof this[n]){if(this[n]instanceof Array&&(r=this.arraysEqual(this[n],this.host.jqxBarGauge(this.properties[e]))),r)return!1;this.host.jqxBarGauge(this.properties[e],this[n]);continue}this[n]!==this.host.jqxBarGauge(this.properties[e])&&this.host.jqxBarGauge(this.properties[e],this[n])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var n="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[n]!==undefined&&(t[this.properties[e]]=this[n])}return t},t.prototype.moveClasses=function(t,e){var n,r=t.classList;0<r.length&&(n=e.classList).add.apply(n,function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t}(r)),t.className=""},t.prototype.moveStyles=function(t,e){var n=t.style.cssText;e.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]),"string"==typeof t.width&&-1!==t.width.indexOf("%")&&(t.width=parseInt(t.width,10)/100*this.host.parent().parent().parent().width()),"string"==typeof t.height&&-1!==t.height.indexOf("%")&&(t.height=parseInt(t.height,10)/100*this.host.parent().parent().parent().height()),this.__wireEvents__(),this.widgetObject=jqwidgets.createInstance(this.host,"jqxBarGauge",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.jqxBarGauge("setOptions",t)},t.prototype.animationDuration=function(t){if(t===undefined)return this.host.jqxBarGauge("animationDuration");this.host.jqxBarGauge("animationDuration",t)},t.prototype.backgroundColor=function(t){if(t===undefined)return this.host.jqxBarGauge("backgroundColor");this.host.jqxBarGauge("backgroundColor",t)},t.prototype.barSpacing=function(t){if(t===undefined)return this.host.jqxBarGauge("barSpacing");this.host.jqxBarGauge("barSpacing",t)},t.prototype.baseValue=function(t){if(t===undefined)return this.host.jqxBarGauge("baseValue");this.host.jqxBarGauge("baseValue",t)},t.prototype.colorScheme=function(t){if(t===undefined)return this.host.jqxBarGauge("colorScheme");this.host.jqxBarGauge("colorScheme",t)},t.prototype.customColorScheme=function(t){if(t===undefined)return this.host.jqxBarGauge("customColorScheme");this.host.jqxBarGauge("customColorScheme",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxBarGauge("disabled");this.host.jqxBarGauge("disabled",t)},t.prototype.endAngle=function(t){if(t===undefined)return this.host.jqxBarGauge("endAngle");this.host.jqxBarGauge("endAngle",t)},t.prototype.formatFunction=function(t){if(t===undefined)return this.host.jqxBarGauge("formatFunction");this.host.jqxBarGauge("formatFunction",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxBarGauge("height");this.host.jqxBarGauge("height",t)},t.prototype.labels=function(t){if(t===undefined)return this.host.jqxBarGauge("labels");this.host.jqxBarGauge("labels",t)},t.prototype.max=function(t){if(t===undefined)return this.host.jqxBarGauge("max");this.host.jqxBarGauge("max",t)},t.prototype.min=function(t){if(t===undefined)return this.host.jqxBarGauge("min");this.host.jqxBarGauge("min",t)},t.prototype.relativeInnerRadius=function(t){if(t===undefined)return this.host.jqxBarGauge("relativeInnerRadius");this.host.jqxBarGauge("relativeInnerRadius",t)},t.prototype.rendered=function(t){if(t===undefined)return this.host.jqxBarGauge("rendered");this.host.jqxBarGauge("rendered",t)},t.prototype.startAngle=function(t){if(t===undefined)return this.host.jqxBarGauge("startAngle");this.host.jqxBarGauge("startAngle",t)},t.prototype.title=function(t){if(t===undefined)return this.host.jqxBarGauge("title");this.host.jqxBarGauge("title",t)},t.prototype.tooltip=function(t){if(t===undefined)return this.host.jqxBarGauge("tooltip");this.host.jqxBarGauge("tooltip",t)},t.prototype.useGradient=function(t){if(t===undefined)return this.host.jqxBarGauge("useGradient");this.host.jqxBarGauge("useGradient",t)},t.prototype.values=function(t){if(t===undefined)return this.host.jqxBarGauge("values");this.host.jqxBarGauge("values",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxBarGauge("width");this.host.jqxBarGauge("width",t)},t.prototype.refresh=function(){this.host.jqxBarGauge("refresh")},t.prototype.render=function(){this.host.jqxBarGauge("render")},t.prototype.val=function(t){return t!==undefined?this.host.jqxBarGauge("val",t):this.host.jqxBarGauge("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("drawEnd",function(t){e.onDrawEnd.emit(t)}),this.host.on("drawStart",function(t){e.onDrawStart.emit(t)}),this.host.on("initialized",function(t){e.onInitialized.emit(t)}),this.host.on("tooltipClose",function(t){e.onTooltipClose.emit(t)}),this.host.on("tooltipOpen",function(t){e.onTooltipOpen.emit(t)}),this.host.on("valueChanged",function(t){e.onValueChanged.emit(t)})},t.decorators=[{type:e.Component,args:[{selector:"jqxBarGauge",template:"<div><ng-content></ng-content></div>"}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrAnimationDuration:[{type:e.Input,args:["animationDuration"]}],attrBackgroundColor:[{type:e.Input,args:["backgroundColor"]}],attrBarSpacing:[{type:e.Input,args:["barSpacing"]}],attrBaseValue:[{type:e.Input,args:["baseValue"]}],attrColorScheme:[{type:e.Input,args:["colorScheme"]}],attrCustomColorScheme:[{type:e.Input,args:["customColorScheme"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrEndAngle:[{type:e.Input,args:["endAngle"]}],attrFormatFunction:[{type:e.Input,args:["formatFunction"]}],attrLabels:[{type:e.Input,args:["labels"]}],attrMax:[{type:e.Input,args:["max"]}],attrMin:[{type:e.Input,args:["min"]}],attrRelativeInnerRadius:[{type:e.Input,args:["relativeInnerRadius"]}],attrRendered:[{type:e.Input,args:["rendered"]}],attrStartAngle:[{type:e.Input,args:["startAngle"]}],attrTitle:[{type:e.Input,args:["title"]}],attrTooltip:[{type:e.Input,args:["tooltip"]}],attrUseGradient:[{type:e.Input,args:["useGradient"]}],attrValues:[{type:e.Input,args:["values"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onDrawEnd:[{type:e.Output}],onDrawStart:[{type:e.Output}],onInitialized:[{type:e.Output}],onTooltipClose:[{type:e.Output}],onTooltipOpen:[{type:e.Output}],onValueChanged:[{type:e.Output}]},t}(),r=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[],declarations:[n],exports:[n]}]}],t}();t.jqxBarGaugeComponent=n,t.jqxBarGaugeModule=r,Object.defineProperty(t,"__esModule",{value:!0})});