UNPKG

@covalent/echarts

Version:
2 lines 3.95 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("echarts/lib/component/toolbox"),require("@angular/core"),require("@covalent/echarts/base")):"function"==typeof define&&define.amd?define("@covalent/echarts/toolbox",["exports","@angular/common","echarts/lib/component/toolbox","@angular/core","@covalent/echarts/base"],e):e((t.covalent=t.covalent||{},t.covalent.echarts=t.covalent.echarts||{},t.covalent.echarts.toolbox={}),t.ng.common,null,t.ng.core,t.covalent.echarts.base)}(this,function(t,e,o,n,i){"use strict";var r=function(){return(r=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a=function(){function t(){}return t.decorators=[{type:n.Directive,args:[{selector:"ng-template[tdViewDataFormatter]"}]}],t}(),s=function(){function t(t,e,o){this._changeDetectorRef=t,this._elementRef=e,this._optionsService=o,this._state={},this.config={},this.show=!0,this.showTitle=!0,this.transitionDuration=.5,this.left="auto",this.top="auto",this.right="auto",this.bottom="auto",this.width="auto",this.height="auto"}return t.prototype.ngOnChanges=function(){this._setOptions()},t.prototype.ngOnDestroy=function(){this._removeOption()},t.prototype._setOptions=function(){this._checkFormatterTemplate();var t=i.assignDefined(this._state,{show:this.show,name:this.trigger,orient:this.orient,itemSize:this.itemSize,itemGap:this.itemGap,showTitle:this.showTitle,label:this.label,feature:this.feature,iconStyle:this.iconStyle,zlevel:this.zlevel,z:this.z,transitionDuration:this.transitionDuration,left:this.left,top:this.top,right:this.right,bottom:this.bottom,width:this.width,height:this.height},this.config?this.config:{});this._optionsService.setOption("toolbox",t)},t.prototype._removeOption=function(){this._optionsService.clearOption("toolbox")},t.prototype._checkFormatterTemplate=function(){this.formatterTemplate&&(this.feature=r({},this.feature,{dataView:r({},this.feature.dataView,{optionToContent:this._optionToContentFormatter()})}))},t.prototype._optionToContentFormatter=function(){var t=this;return function(){return t._changeDetectorRef.markForCheck(),t._elementRef.nativeElement.innerHTML}},t.decorators=[{type:n.Component,args:[{selector:"td-chart-toolbox",template:'<ng-template #toolboxContent\n [ngTemplateOutlet]="formatterTemplate">\n</ng-template>',changeDetection:n.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:n.ChangeDetectorRef},{type:n.ElementRef},{type:i.TdChartOptionsService}]},t.propDecorators={config:[{type:n.Input,args:["config"]}],show:[{type:n.Input,args:["show"]}],trigger:[{type:n.Input,args:["name"]}],orient:[{type:n.Input,args:["orient"]}],itemSize:[{type:n.Input,args:["itemSize"]}],itemGap:[{type:n.Input,args:["itemGap"]}],showTitle:[{type:n.Input,args:["showTitle"]}],label:[{type:n.Input,args:["label"]}],feature:[{type:n.Input,args:["feature"]}],iconStyle:[{type:n.Input,args:["iconStyle"]}],zlevel:[{type:n.Input,args:["zlevel"]}],z:[{type:n.Input,args:["z"]}],transitionDuration:[{type:n.Input,args:["transitionDuration"]}],left:[{type:n.Input,args:["left"]}],top:[{type:n.Input,args:["top"]}],right:[{type:n.Input,args:["right"]}],bottom:[{type:n.Input,args:["bottom"]}],width:[{type:n.Input,args:["width"]}],height:[{type:n.Input,args:["height"]}],formatterTemplate:[{type:n.ContentChild,args:[a,{read:n.TemplateRef}]}],fullTemplate:[{type:n.ViewChild,args:["toolboxContent"]}]},t}(),p=[s,a],h=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule],declarations:[p],exports:[p]}]}],t}();t.TOOLBOX_MODULE_COMPONENTS=p,t.CovalentToolboxEchartsModule=h,t.TdChartViewDataFormatterDirective=a,t.TdChartToolboxComponent=s,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=covalent-echarts-toolbox.umd.min.js.map