angular2-chartjs
Version:
Chart.js component for Angular2
128 lines (127 loc) • 6.23 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 './chart.component';
import * as import1 from '@angular/core/src/change_detection/change_detection';
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/linker/component_factory';
import * as import8 from '@angular/core/src/linker/element_ref';
export class Wrapper_ChartComponent {
/*private*/ _eventHandler:Function;
context:import0.ChartComponent;
/*private*/ _changed:boolean;
/*private*/ _changes:{[key: string]:any};
/*private*/ _expr_0:any;
/*private*/ _expr_1:any;
/*private*/ _expr_2:any;
constructor(p0:any) {
this._changed = false;
this._changes = {};
this.context = new import0.ChartComponent(p0);
this._expr_0 = import1.UNINITIALIZED;
this._expr_1 = import1.UNINITIALIZED;
this._expr_2 = import1.UNINITIALIZED;
}
ngOnDetach(view:import2.AppView<any>,componentView:import2.AppView<any>,el:any):void {
}
ngOnDestroy():void {
}
check_type(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_0,currValue))) {
this._changed = true;
this.context.type = currValue;
this._changes['type'] = new import1.SimpleChange(this._expr_0,currValue);
this._expr_0 = currValue;
}
}
check_data(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_1,currValue))) {
this._changed = true;
this.context.data = currValue;
this._changes['data'] = new import1.SimpleChange(this._expr_1,currValue);
this._expr_1 = currValue;
}
}
check_options(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_2,currValue))) {
this._changed = true;
this.context.options = currValue;
this._changes['options'] = new import1.SimpleChange(this._expr_2,currValue);
this._expr_2 = currValue;
}
}
ngDoCheck(view:import2.AppView<any>,el:any,throwOnChange:boolean):boolean {
var changed:any = this._changed;
this._changed = false;
if (!throwOnChange) {
if (changed) {
this.context.ngOnChanges(this._changes);
this._changes = {};
}
if ((view.numberOfChecks === 0)) { this.context.ngOnInit(); }
}
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):void {
this._eventHandler = _eventHandler;
}
}
var renderType_ChartComponent_Host:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,([] as any[]),{});
class View_ChartComponent_Host0 extends import2.AppView<any> {
_el_0:any;
compView_0:import2.AppView<import0.ChartComponent>;
_ChartComponent_0_3:Wrapper_ChartComponent;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_ChartComponent_Host0,renderType_ChartComponent_Host,import6.ViewType.HOST,viewUtils,parentView,parentIndex,parentElement,import1.ChangeDetectorStatus.CheckAlways);
}
createInternal(rootSelector:string):import7.ComponentRef<any> {
this._el_0 = import3.selectOrCreateRenderHostElement(this.renderer,'chart',import3.EMPTY_INLINE_ARRAY,rootSelector,(null as any));
this.compView_0 = new View_ChartComponent0(this.viewUtils,this,0,this._el_0);
this._ChartComponent_0_3 = new Wrapper_ChartComponent(new import8.ElementRef(this._el_0));
this.compView_0.create(this._ChartComponent_0_3.context);
this.init(this._el_0,((<any>this.renderer).directRenderer? (null as any): [this._el_0]),(null as any));
return new import7.ComponentRef_<any>(0,this,this._el_0,this._ChartComponent_0_3.context);
}
injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
if (((token === import0.ChartComponent) && (0 === requestNodeIndex))) { return this._ChartComponent_0_3.context; }
return notFoundResult;
}
detectChangesInternal(throwOnChange:boolean):void {
this._ChartComponent_0_3.ngDoCheck(this,this._el_0,throwOnChange);
this.compView_0.detectChanges(throwOnChange);
}
destroyInternal():void {
this.compView_0.destroy();
}
visitRootNodesInternal(cb:any,ctx:any):void {
cb(this._el_0,ctx);
}
}
export const ChartComponentNgFactory:import7.ComponentFactory<import0.ChartComponent> = new import7.ComponentFactory<import0.ChartComponent>('chart',View_ChartComponent_Host0,import0.ChartComponent);
const styles_ChartComponent:any[] = ['[_nghost-%COMP%] { display: block; }'];
var renderType_ChartComponent:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.Emulated,styles_ChartComponent,{});
export class View_ChartComponent0 extends import2.AppView<import0.ChartComponent> {
_el_0:any;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_ChartComponent0,renderType_ChartComponent,import6.ViewType.COMPONENT,viewUtils,parentView,parentIndex,parentElement,import1.ChangeDetectorStatus.CheckAlways);
}
createInternal(rootSelector:string):import7.ComponentRef<any> {
const parentRenderNode:any = this.renderer.createViewRoot(this.parentElement);
this._el_0 = import3.createRenderElement(this.renderer,parentRenderNode,'canvas',import3.EMPTY_INLINE_ARRAY,(null as any));
this.init((null as any),((<any>this.renderer).directRenderer? (null as any): [this._el_0]),(null as any));
return (null as any);
}
}