@swimlane/ngx-charts
Version:
Declarative Charting Framework for Angular2 and beyond!
223 lines (222 loc) • 12.1 kB
text/typescript
/**
* @fileoverview This file is generated by the Angular 2 template compiler.
* Do not edit.
* @suppress {suspiciousCode,uselessCode,missingProperties}
*/
/* tslint:disable */
import * as import0 from '../../../src/gauge/gauge-arc.component';
import * as import1 from '@angular/core/src/change_detection/change_detection_util';
import * as import2 from '@angular/core/src/linker/view';
import * as import3 from '@angular/core/src/linker/view_utils';
import * as import4 from '@angular/core/src/render/api';
import * as import5 from '@angular/core/src/metadata/view';
import * as import6 from '@angular/core/src/linker/view_type';
import * as import7 from '@angular/core/src/change_detection/constants';
import * as import8 from '@angular/core/src/linker/component_factory';
import * as import9 from '../../../src/pie-chart/pie-arc.component';
import * as import10 from '../pie-chart/pie-arc.component.ngfactory';
import * as import11 from '@angular/core/src/linker/element_ref';
export class Wrapper_GaugeArcComponent {
/*private*/ _eventHandler:Function;
context:import0.GaugeArcComponent;
/*private*/ _changed:boolean;
/*private*/ _expr_0:any;
/*private*/ _expr_1:any;
/*private*/ _expr_2:any;
/*private*/ _expr_3:any;
subscription0:any;
constructor() {
this._changed = false;
this.context = new import0.GaugeArcComponent();
this._expr_0 = import1.UNINITIALIZED;
this._expr_1 = import1.UNINITIALIZED;
this._expr_2 = import1.UNINITIALIZED;
this._expr_3 = import1.UNINITIALIZED;
}
ngOnDetach(view:import2.AppView<any>,componentView:import2.AppView<any>,el:any):void {
}
ngOnDestroy():void {
(this.subscription0 && this.subscription0.unsubscribe());
}
check_backgroundArc(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_0,currValue))) {
this._changed = true;
this.context.backgroundArc = currValue;
this._expr_0 = currValue;
}
}
check_valueArc(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_1,currValue))) {
this._changed = true;
this.context.valueArc = currValue;
this._expr_1 = currValue;
}
}
check_cornerRadius(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_2,currValue))) {
this._changed = true;
this.context.cornerRadius = currValue;
this._expr_2 = currValue;
}
}
check_colors(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_3,currValue))) {
this._changed = true;
this.context.colors = currValue;
this._expr_3 = currValue;
}
}
ngDoCheck(view:import2.AppView<any>,el:any,throwOnChange:boolean):boolean {
var changed:any = this._changed;
this._changed = false;
return changed;
}
checkHost(view:import2.AppView<any>,componentView:import2.AppView<any>,el:any,throwOnChange:boolean):void {
}
handleEvent(eventName:string,$event:any):boolean {
var result:boolean = true;
return result;
}
subscribe(view:import2.AppView<any>,_eventHandler:any,emit0:boolean):void {
this._eventHandler = _eventHandler;
if (emit0) { (this.subscription0 = this.context.select.subscribe(_eventHandler.bind(view,'select'))); }
}
}
var renderType_GaugeArcComponent_Host:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,([] as any[]),{});
class View_GaugeArcComponent_Host0 extends import2.AppView<any> {
_el_0:any;
compView_0:import2.AppView<import0.GaugeArcComponent>;
_GaugeArcComponent_0_3:Wrapper_GaugeArcComponent;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_GaugeArcComponent_Host0,renderType_GaugeArcComponent_Host,import6.ViewType.HOST,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways);
}
createInternal(rootSelector:string):import8.ComponentRef<any> {
this._el_0 = import3.selectOrCreateRenderHostElement(this.renderer,'g',new import3.InlineArray2(2,'ngx-charts-gauge-arc',''),rootSelector,(null as any));
this.compView_0 = new View_GaugeArcComponent0(this.viewUtils,this,0,this._el_0);
this._GaugeArcComponent_0_3 = new Wrapper_GaugeArcComponent();
this.compView_0.create(this._GaugeArcComponent_0_3.context);
this.init(this._el_0,((<any>this.renderer).directRenderer? (null as any): [this._el_0]),(null as any));
return new import8.ComponentRef_<any>(0,this,this._el_0,this._GaugeArcComponent_0_3.context);
}
injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
if (((token === import0.GaugeArcComponent) && (0 === requestNodeIndex))) { return this._GaugeArcComponent_0_3.context; }
return notFoundResult;
}
detectChangesInternal(throwOnChange:boolean):void {
if (this._GaugeArcComponent_0_3.ngDoCheck(this,this._el_0,throwOnChange)) { this.compView_0.markAsCheckOnce(); }
this.compView_0.internalDetectChanges(throwOnChange);
}
destroyInternal():void {
this.compView_0.destroy();
this._GaugeArcComponent_0_3.ngOnDestroy();
}
visitRootNodesInternal(cb:any,ctx:any):void {
cb(this._el_0,ctx);
}
}
export const GaugeArcComponentNgFactory:import8.ComponentFactory<import0.GaugeArcComponent> = new import8.ComponentFactory<import0.GaugeArcComponent>('g[ngx-charts-gauge-arc]',View_GaugeArcComponent_Host0,import0.GaugeArcComponent);
const styles_GaugeArcComponent:any[] = ([] as any[]);
var renderType_GaugeArcComponent:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,styles_GaugeArcComponent,{});
export class View_GaugeArcComponent0 extends import2.AppView<import0.GaugeArcComponent> {
_text_0:any;
_el_1:any;
compView_1:import2.AppView<import9.PieArcComponent>;
_PieArcComponent_1_3:import10.Wrapper_PieArcComponent;
_text_2:any;
_text_3:any;
_el_4:any;
compView_4:import2.AppView<import9.PieArcComponent>;
_PieArcComponent_4_3:import10.Wrapper_PieArcComponent;
_text_5:any;
_text_6:any;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_GaugeArcComponent0,renderType_GaugeArcComponent,import6.ViewType.COMPONENT,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckOnce);
}
createInternal(rootSelector:string):import8.ComponentRef<any> {
const parentRenderNode:any = this.renderer.createViewRoot(this.parentElement);
this._text_0 = this.renderer.createText(parentRenderNode,'\n ',(null as any));
this._el_1 = import3.createRenderElement(this.renderer,parentRenderNode,':svg:g',new import3.InlineArray4(4,'class','background-arc','ngx-charts-pie-arc',''),(null as any));
this.compView_1 = new import10.View_PieArcComponent0(this.viewUtils,this,1,this._el_1);
this._PieArcComponent_1_3 = new import10.Wrapper_PieArcComponent(new import11.ElementRef(this._el_1));
this._text_2 = this.renderer.createText((null as any),'\n ',(null as any));
this.compView_1.create(this._PieArcComponent_1_3.context);
this._text_3 = this.renderer.createText(parentRenderNode,'\n ',(null as any));
this._el_4 = import3.createRenderElement(this.renderer,parentRenderNode,':svg:g',new import3.InlineArray2(2,'ngx-charts-pie-arc',''),(null as any));
this.compView_4 = new import10.View_PieArcComponent0(this.viewUtils,this,4,this._el_4);
this._PieArcComponent_4_3 = new import10.Wrapper_PieArcComponent(new import11.ElementRef(this._el_4));
this._text_5 = this.renderer.createText((null as any),'\n ',(null as any));
this.compView_4.create(this._PieArcComponent_4_3.context);
this._text_6 = this.renderer.createText(parentRenderNode,'\n ',(null as any));
var disposable_0:Function = import3.subscribeToRenderElement(this,this._el_4,new import3.InlineArray2(2,'select',(null as any)),this.eventHandler(this.handleEvent_4));
this._PieArcComponent_4_3.subscribe(this,this.eventHandler(this.handleEvent_4),true,false,false);
this.init((null as any),((<any>this.renderer).directRenderer? (null as any): [
this._text_0,
this._el_1,
this._text_2,
this._text_3,
this._el_4,
this._text_5,
this._text_6
]
),[disposable_0]);
return (null as any);
}
injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
if (((token === import9.PieArcComponent) && ((1 <= requestNodeIndex) && (requestNodeIndex <= 2)))) { return this._PieArcComponent_1_3.context; }
if (((token === import9.PieArcComponent) && ((4 <= requestNodeIndex) && (requestNodeIndex <= 5)))) { return this._PieArcComponent_4_3.context; }
return notFoundResult;
}
detectChangesInternal(throwOnChange:boolean):void {
const currVal_1_0_0:any = 0;
this._PieArcComponent_1_3.check_startAngle(currVal_1_0_0,throwOnChange,false);
const currVal_1_0_1:any = this.context.backgroundArc.endAngle;
this._PieArcComponent_1_3.check_endAngle(currVal_1_0_1,throwOnChange,false);
const currVal_1_0_2:any = this.context.backgroundArc.innerRadius;
this._PieArcComponent_1_3.check_innerRadius(currVal_1_0_2,throwOnChange,false);
const currVal_1_0_3:any = this.context.backgroundArc.outerRadius;
this._PieArcComponent_1_3.check_outerRadius(currVal_1_0_3,throwOnChange,false);
const currVal_1_0_4:any = this.context.cornerRadius;
this._PieArcComponent_1_3.check_cornerRadius(currVal_1_0_4,throwOnChange,false);
const currVal_1_0_5:any = this.context.backgroundArc.data;
this._PieArcComponent_1_3.check_data(currVal_1_0_5,throwOnChange,false);
const currVal_1_0_6:any = false;
this._PieArcComponent_1_3.check_animate(currVal_1_0_6,throwOnChange,false);
const currVal_1_0_7:any = false;
this._PieArcComponent_1_3.check_pointerEvents(currVal_1_0_7,throwOnChange,false);
if (this._PieArcComponent_1_3.ngDoCheck(this,this._el_1,throwOnChange)) { this.compView_1.markAsCheckOnce(); }
const currVal_4_0_0:any = this.context.colors.getColor(this.context.valueArc.data.value);
this._PieArcComponent_4_3.check_fill(currVal_4_0_0,throwOnChange,false);
const currVal_4_0_1:any = 0;
this._PieArcComponent_4_3.check_startAngle(currVal_4_0_1,throwOnChange,false);
const currVal_4_0_2:any = this.context.valueArc.endAngle;
this._PieArcComponent_4_3.check_endAngle(currVal_4_0_2,throwOnChange,false);
const currVal_4_0_3:any = this.context.valueArc.innerRadius;
this._PieArcComponent_4_3.check_innerRadius(currVal_4_0_3,throwOnChange,false);
const currVal_4_0_4:any = this.context.valueArc.outerRadius;
this._PieArcComponent_4_3.check_outerRadius(currVal_4_0_4,throwOnChange,false);
const currVal_4_0_5:any = this.context.cornerRadius;
this._PieArcComponent_4_3.check_cornerRadius(currVal_4_0_5,throwOnChange,false);
const currVal_4_0_6:any = this.context.valueArc.data;
this._PieArcComponent_4_3.check_data(currVal_4_0_6,throwOnChange,false);
const currVal_4_0_7:any = true;
this._PieArcComponent_4_3.check_animate(currVal_4_0_7,throwOnChange,false);
if (this._PieArcComponent_4_3.ngDoCheck(this,this._el_4,throwOnChange)) { this.compView_4.markAsCheckOnce(); }
this.compView_1.internalDetectChanges(throwOnChange);
this.compView_4.internalDetectChanges(throwOnChange);
}
destroyInternal():void {
this.compView_1.destroy();
this.compView_4.destroy();
this._PieArcComponent_1_3.ngOnDestroy();
this._PieArcComponent_4_3.ngOnDestroy();
}
handleEvent_4(eventName:string,$event:any):boolean {
this.markPathToRootAsCheckOnce();
var result:boolean = true;
if ((eventName == 'select')) {
const pd_sub_0:any = ((<any>this.context.select.emit($event)) !== false);
result = (pd_sub_0 && result);
}
return result;
}
}