@swimlane/ngx-charts
Version:
Declarative Charting Framework for Angular2 and beyond!
437 lines (436 loc) • 22.5 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/common/axes/x-axis-ticks.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 '@angular/core/src/linker/query_list';
import * as import10 from '@angular/core/src/linker/view_container';
import * as import11 from '../../../node_modules/@angular/common/src/directives/ng_for.ngfactory';
import * as import12 from '@angular/core/src/linker/template_ref';
import * as import13 from '@angular/core/src/change_detection/differs/iterable_differs';
import * as import14 from '@angular/core/src/linker/element_ref';
import * as import15 from '@angular/common/src/directives/ng_for';
import * as import16 from '@angular/core/src/security';
import * as import17 from '../../../node_modules/@angular/common/src/directives/ng_if.ngfactory';
import * as import18 from '@angular/common/src/directives/ng_if';
export class Wrapper_XAxisTicksComponent {
/*private*/ _eventHandler:Function;
context:import0.XAxisTicksComponent;
/*private*/ _changed:boolean;
/*private*/ _changes:{[key: string]:any};
/*private*/ _expr_0:any;
/*private*/ _expr_1:any;
/*private*/ _expr_2:any;
/*private*/ _expr_3:any;
/*private*/ _expr_4:any;
/*private*/ _expr_5:any;
/*private*/ _expr_6:any;
/*private*/ _expr_7:any;
subscription0:any;
constructor() {
this._changed = false;
this._changes = {};
this.context = new import0.XAxisTicksComponent();
this._expr_0 = import1.UNINITIALIZED;
this._expr_1 = import1.UNINITIALIZED;
this._expr_2 = import1.UNINITIALIZED;
this._expr_3 = import1.UNINITIALIZED;
this._expr_4 = import1.UNINITIALIZED;
this._expr_5 = import1.UNINITIALIZED;
this._expr_6 = import1.UNINITIALIZED;
this._expr_7 = import1.UNINITIALIZED;
}
ngOnDetach(view:import2.AppView<any>,componentView:import2.AppView<any>,el:any):void {
}
ngOnDestroy():void {
(this.subscription0 && this.subscription0.unsubscribe());
}
check_scale(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_0,currValue))) {
this._changed = true;
this.context.scale = currValue;
this._changes['scale'] = new import1.SimpleChange(this._expr_0,currValue);
this._expr_0 = currValue;
}
}
check_orient(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_1,currValue))) {
this._changed = true;
this.context.orient = currValue;
this._changes['orient'] = new import1.SimpleChange(this._expr_1,currValue);
this._expr_1 = currValue;
}
}
check_tickArguments(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_2,currValue))) {
this._changed = true;
this.context.tickArguments = currValue;
this._changes['tickArguments'] = new import1.SimpleChange(this._expr_2,currValue);
this._expr_2 = currValue;
}
}
check_tickStroke(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_3,currValue))) {
this._changed = true;
this.context.tickStroke = currValue;
this._changes['tickStroke'] = new import1.SimpleChange(this._expr_3,currValue);
this._expr_3 = currValue;
}
}
check_tickFormatting(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_4,currValue))) {
this._changed = true;
this.context.tickFormatting = currValue;
this._changes['tickFormatting'] = new import1.SimpleChange(this._expr_4,currValue);
this._expr_4 = currValue;
}
}
check_showGridLines(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_5,currValue))) {
this._changed = true;
this.context.showGridLines = currValue;
this._changes['showGridLines'] = new import1.SimpleChange(this._expr_5,currValue);
this._expr_5 = currValue;
}
}
check_gridLineHeight(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_6,currValue))) {
this._changed = true;
this.context.gridLineHeight = currValue;
this._changes['gridLineHeight'] = new import1.SimpleChange(this._expr_6,currValue);
this._expr_6 = currValue;
}
}
check_width(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_7,currValue))) {
this._changed = true;
this.context.width = currValue;
this._changes['width'] = new import1.SimpleChange(this._expr_7,currValue);
this._expr_7 = 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 = {};
} }
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.dimensionsChanged.subscribe(_eventHandler.bind(view,'dimensionsChanged'))); }
}
}
var renderType_XAxisTicksComponent_Host:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,([] as any[]),{});
class View_XAxisTicksComponent_Host0 extends import2.AppView<any> {
_el_0:any;
compView_0:import2.AppView<import0.XAxisTicksComponent>;
_XAxisTicksComponent_0_3:Wrapper_XAxisTicksComponent;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_XAxisTicksComponent_Host0,renderType_XAxisTicksComponent_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-x-axis-ticks',''),rootSelector,(null as any));
this.compView_0 = new View_XAxisTicksComponent0(this.viewUtils,this,0,this._el_0);
this._XAxisTicksComponent_0_3 = new Wrapper_XAxisTicksComponent();
this.compView_0.create(this._XAxisTicksComponent_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._XAxisTicksComponent_0_3.context);
}
injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
if (((token === import0.XAxisTicksComponent) && (0 === requestNodeIndex))) { return this._XAxisTicksComponent_0_3.context; }
return notFoundResult;
}
detectChangesInternal(throwOnChange:boolean):void {
if (this._XAxisTicksComponent_0_3.ngDoCheck(this,this._el_0,throwOnChange)) { this.compView_0.markAsCheckOnce(); }
this.compView_0.internalDetectChanges(throwOnChange);
if (!throwOnChange) { if ((this.numberOfChecks === 0)) { this._XAxisTicksComponent_0_3.context.ngAfterViewInit(); } }
}
destroyInternal():void {
this.compView_0.destroy();
this._XAxisTicksComponent_0_3.ngOnDestroy();
}
visitRootNodesInternal(cb:any,ctx:any):void {
cb(this._el_0,ctx);
}
}
export const XAxisTicksComponentNgFactory:import8.ComponentFactory<import0.XAxisTicksComponent> = new import8.ComponentFactory<import0.XAxisTicksComponent>('g[ngx-charts-x-axis-ticks]',View_XAxisTicksComponent_Host0,import0.XAxisTicksComponent);
const styles_XAxisTicksComponent:any[] = ([] as any[]);
var renderType_XAxisTicksComponent:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,styles_XAxisTicksComponent,{});
export class View_XAxisTicksComponent0 extends import2.AppView<import0.XAxisTicksComponent> {
_viewQuery_ticksel_0:import9.QueryList<any>;
_text_0:any;
_el_1:any;
_text_2:any;
_anchor_3:any;
/*private*/ _vc_3:import10.ViewContainer;
_TemplateRef_3_5:any;
_NgFor_3_6:import11.Wrapper_NgFor;
_text_4:any;
_text_5:any;
_anchor_6:any;
/*private*/ _vc_6:import10.ViewContainer;
_TemplateRef_6_5:any;
_NgFor_6_6:import11.Wrapper_NgFor;
_text_7:any;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_XAxisTicksComponent0,renderType_XAxisTicksComponent,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._viewQuery_ticksel_0 = new import9.QueryList<any>();
this._text_0 = this.renderer.createText(parentRenderNode,'\n ',(null as any));
this._el_1 = import3.createRenderElement(this.renderer,parentRenderNode,':svg:g',import3.EMPTY_INLINE_ARRAY,(null as any));
this._text_2 = this.renderer.createText(this._el_1,'\n ',(null as any));
this._anchor_3 = this.renderer.createTemplateAnchor(this._el_1,(null as any));
this._vc_3 = new import10.ViewContainer(3,1,this,this._anchor_3);
this._TemplateRef_3_5 = new import12.TemplateRef_(this,3,this._anchor_3);
this._NgFor_3_6 = new import11.Wrapper_NgFor(this._vc_3.vcRef,this._TemplateRef_3_5,this.parentView.injectorGet(import13.IterableDiffers,this.parentIndex),this.ref);
this._text_4 = this.renderer.createText(this._el_1,'\n ',(null as any));
this._text_5 = this.renderer.createText(parentRenderNode,'\n\n ',(null as any));
this._anchor_6 = this.renderer.createTemplateAnchor(parentRenderNode,(null as any));
this._vc_6 = new import10.ViewContainer(6,(null as any),this,this._anchor_6);
this._TemplateRef_6_5 = new import12.TemplateRef_(this,6,this._anchor_6);
this._NgFor_6_6 = new import11.Wrapper_NgFor(this._vc_6.vcRef,this._TemplateRef_6_5,this.parentView.injectorGet(import13.IterableDiffers,this.parentIndex),this.ref);
this._text_7 = this.renderer.createText(parentRenderNode,'\n ',(null as any));
this._viewQuery_ticksel_0.reset([new import14.ElementRef(this._el_1)]);
this.context.ticksElement = this._viewQuery_ticksel_0.first;
this.init((null as any),((<any>this.renderer).directRenderer? (null as any): [
this._text_0,
this._el_1,
this._text_2,
this._anchor_3,
this._text_4,
this._text_5,
this._anchor_6,
this._text_7
]
),(null as any));
return (null as any);
}
injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
if (((token === import12.TemplateRef) && (3 === requestNodeIndex))) { return this._TemplateRef_3_5; }
if (((token === import15.NgFor) && (3 === requestNodeIndex))) { return this._NgFor_3_6.context; }
if (((token === import12.TemplateRef) && (6 === requestNodeIndex))) { return this._TemplateRef_6_5; }
if (((token === import15.NgFor) && (6 === requestNodeIndex))) { return this._NgFor_6_6.context; }
return notFoundResult;
}
detectChangesInternal(throwOnChange:boolean):void {
const currVal_3_0_0:any = this.context.ticks;
this._NgFor_3_6.check_ngForOf(currVal_3_0_0,throwOnChange,false);
this._NgFor_3_6.ngDoCheck(this,this._anchor_3,throwOnChange);
const currVal_6_0_0:any = this.context.ticks;
this._NgFor_6_6.check_ngForOf(currVal_6_0_0,throwOnChange,false);
this._NgFor_6_6.ngDoCheck(this,this._anchor_6,throwOnChange);
this._vc_3.detectChangesInNestedViews(throwOnChange);
this._vc_6.detectChangesInNestedViews(throwOnChange);
}
destroyInternal():void {
this._vc_3.destroyNestedViews();
this._vc_6.destroyNestedViews();
}
createEmbeddedViewInternal(nodeIndex:number):import2.AppView<any> {
if ((nodeIndex == 3)) { return new View_XAxisTicksComponent1(this.viewUtils,this,3,this._anchor_3,this._vc_3); }
if ((nodeIndex == 6)) { return new View_XAxisTicksComponent2(this.viewUtils,this,6,this._anchor_6,this._vc_6); }
return (null as any);
}
}
class View_XAxisTicksComponent1 extends import2.AppView<any> {
_el_0:any;
_text_1:any;
_el_2:any;
_text_3:any;
_text_4:any;
_el_5:any;
_text_6:any;
_text_7:any;
/*private*/ _expr_8:any;
/*private*/ _expr_9:any;
/*private*/ _expr_10:any;
/*private*/ _expr_11:any;
/*private*/ _expr_12:any;
/*private*/ _expr_13:any;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any,declaredViewContainer:import10.ViewContainer) {
super(View_XAxisTicksComponent1,renderType_XAxisTicksComponent,import6.ViewType.EMBEDDED,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways,declaredViewContainer);
this._expr_8 = import1.UNINITIALIZED;
this._expr_9 = import1.UNINITIALIZED;
this._expr_10 = import1.UNINITIALIZED;
this._expr_11 = import1.UNINITIALIZED;
this._expr_12 = import1.UNINITIALIZED;
this._expr_13 = import1.UNINITIALIZED;
}
createInternal(rootSelector:string):import8.ComponentRef<any> {
this._el_0 = import3.createRenderElement(this.renderer,(null as any),':svg:g',new import3.InlineArray2(2,'class','tick'),(null as any));
this._text_1 = this.renderer.createText(this._el_0,'\n ',(null as any));
this._el_2 = import3.createRenderElement(this.renderer,this._el_0,':svg:title',import3.EMPTY_INLINE_ARRAY,(null as any));
this._text_3 = this.renderer.createText(this._el_2,'',(null as any));
this._text_4 = this.renderer.createText(this._el_0,'\n ',(null as any));
this._el_5 = import3.createRenderElement(this.renderer,this._el_0,':svg:text',new import3.InlineArray2(2,'stroke-width','0.01'),(null as any));
this._text_6 = this.renderer.createText(this._el_5,'',(null as any));
this._text_7 = this.renderer.createText(this._el_0,'\n ',(null as any));
this.init(this._el_0,((<any>this.renderer).directRenderer? (null as any): [
this._el_0,
this._text_1,
this._el_2,
this._text_3,
this._text_4,
this._el_5,
this._text_6,
this._text_7
]
),(null as any));
return (null as any);
}
detectChangesInternal(throwOnChange:boolean):void {
const currVal_8:any = this.parentView.context.tickTransform(this.context.$implicit);
if (import3.checkBinding(throwOnChange,this._expr_8,currVal_8)) {
this.renderer.setElementAttribute(this._el_0,'transform',((currVal_8 == null)? (null as any): currVal_8.toString()));
this._expr_8 = currVal_8;
}
const currVal_9:any = import3.inlineInterpolate(1,'',this.parentView.context.tickFormat(this.context.$implicit),'');
if (import3.checkBinding(throwOnChange,this._expr_9,currVal_9)) {
this.renderer.setText(this._text_3,currVal_9);
this._expr_9 = currVal_9;
}
const currVal_10:any = this.parentView.context.textAnchor;
if (import3.checkBinding(throwOnChange,this._expr_10,currVal_10)) {
this.renderer.setElementAttribute(this._el_5,'text-anchor',((currVal_10 == null)? (null as any): currVal_10.toString()));
this._expr_10 = currVal_10;
}
const currVal_11:any = this.parentView.context.textTransform;
if (import3.checkBinding(throwOnChange,this._expr_11,currVal_11)) {
this.renderer.setElementAttribute(this._el_5,'transform',((currVal_11 == null)? (null as any): currVal_11.toString()));
this._expr_11 = currVal_11;
}
const currVal_12:any = '12px';
if (import3.checkBinding(throwOnChange,this._expr_12,currVal_12)) {
this.renderer.setElementStyle(this._el_5,'font-size',((this.viewUtils.sanitizer.sanitize(import16.SecurityContext.STYLE,currVal_12) == null)? (null as any): this.viewUtils.sanitizer.sanitize(import16.SecurityContext.STYLE,currVal_12).toString()));
this._expr_12 = currVal_12;
}
const currVal_13:any = import3.inlineInterpolate(1,'\n ',this.parentView.context.trimLabel(this.parentView.context.tickFormat(this.context.$implicit)),'\n ');
if (import3.checkBinding(throwOnChange,this._expr_13,currVal_13)) {
this.renderer.setText(this._text_6,currVal_13);
this._expr_13 = currVal_13;
}
}
visitRootNodesInternal(cb:any,ctx:any):void {
cb(this._el_0,ctx);
}
}
class View_XAxisTicksComponent2 extends import2.AppView<any> {
_el_0:any;
_text_1:any;
_anchor_2:any;
/*private*/ _vc_2:import10.ViewContainer;
_TemplateRef_2_5:any;
_NgIf_2_6:import17.Wrapper_NgIf;
_text_3:any;
/*private*/ _expr_7:any;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any,declaredViewContainer:import10.ViewContainer) {
super(View_XAxisTicksComponent2,renderType_XAxisTicksComponent,import6.ViewType.EMBEDDED,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways,declaredViewContainer);
this._expr_7 = import1.UNINITIALIZED;
}
createInternal(rootSelector:string):import8.ComponentRef<any> {
this._el_0 = import3.createRenderElement(this.renderer,(null as any),':svg:g',import3.EMPTY_INLINE_ARRAY,(null as any));
this._text_1 = this.renderer.createText(this._el_0,'\n ',(null as any));
this._anchor_2 = this.renderer.createTemplateAnchor(this._el_0,(null as any));
this._vc_2 = new import10.ViewContainer(2,0,this,this._anchor_2);
this._TemplateRef_2_5 = new import12.TemplateRef_(this,2,this._anchor_2);
this._NgIf_2_6 = new import17.Wrapper_NgIf(this._vc_2.vcRef,this._TemplateRef_2_5);
this._text_3 = this.renderer.createText(this._el_0,'\n ',(null as any));
this.init(this._el_0,((<any>this.renderer).directRenderer? (null as any): [
this._el_0,
this._text_1,
this._anchor_2,
this._text_3
]
),(null as any));
return (null as any);
}
injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
if (((token === import12.TemplateRef) && (2 === requestNodeIndex))) { return this._TemplateRef_2_5; }
if (((token === import18.NgIf) && (2 === requestNodeIndex))) { return this._NgIf_2_6.context; }
return notFoundResult;
}
detectChangesInternal(throwOnChange:boolean):void {
const currVal_2_0_0:any = this.parentView.context.showGridLines;
this._NgIf_2_6.check_ngIf(currVal_2_0_0,throwOnChange,false);
this._NgIf_2_6.ngDoCheck(this,this._anchor_2,throwOnChange);
this._vc_2.detectChangesInNestedViews(throwOnChange);
const currVal_7:any = this.parentView.context.tickTransform(this.context.$implicit);
if (import3.checkBinding(throwOnChange,this._expr_7,currVal_7)) {
this.renderer.setElementAttribute(this._el_0,'transform',((currVal_7 == null)? (null as any): currVal_7.toString()));
this._expr_7 = currVal_7;
}
}
destroyInternal():void {
this._vc_2.destroyNestedViews();
}
visitRootNodesInternal(cb:any,ctx:any):void {
cb(this._el_0,ctx);
}
createEmbeddedViewInternal(nodeIndex:number):import2.AppView<any> {
if ((nodeIndex == 2)) { return new View_XAxisTicksComponent3(this.viewUtils,this,2,this._anchor_2,this._vc_2); }
return (null as any);
}
}
class View_XAxisTicksComponent3 extends import2.AppView<any> {
_el_0:any;
_text_1:any;
_el_2:any;
_text_3:any;
/*private*/ _expr_4:any;
/*private*/ _expr_5:any;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any,declaredViewContainer:import10.ViewContainer) {
super(View_XAxisTicksComponent3,renderType_XAxisTicksComponent,import6.ViewType.EMBEDDED,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways,declaredViewContainer);
this._expr_4 = import1.UNINITIALIZED;
this._expr_5 = import1.UNINITIALIZED;
}
createInternal(rootSelector:string):import8.ComponentRef<any> {
this._el_0 = import3.createRenderElement(this.renderer,(null as any),':svg:g',import3.EMPTY_INLINE_ARRAY,(null as any));
this._text_1 = this.renderer.createText(this._el_0,'\n ',(null as any));
this._el_2 = import3.createRenderElement(this.renderer,this._el_0,':svg:line',new import3.InlineArray4(4,'class','gridline-path gridline-path-vertical','y2','0'),(null as any));
this._text_3 = this.renderer.createText(this._el_0,'\n ',(null as any));
this.init(this._el_0,((<any>this.renderer).directRenderer? (null as any): [
this._el_0,
this._text_1,
this._el_2,
this._text_3
]
),(null as any));
return (null as any);
}
detectChangesInternal(throwOnChange:boolean):void {
const currVal_4:any = this.parentView.parentView.context.gridLineTransform();
if (import3.checkBinding(throwOnChange,this._expr_4,currVal_4)) {
this.renderer.setElementAttribute(this._el_0,'transform',((currVal_4 == null)? (null as any): currVal_4.toString()));
this._expr_4 = currVal_4;
}
const currVal_5:any = (0 - this.parentView.parentView.context.gridLineHeight);
if (import3.checkBinding(throwOnChange,this._expr_5,currVal_5)) {
this.renderer.setElementAttribute(this._el_2,'y1',((currVal_5 == null)? (null as any): currVal_5.toString()));
this._expr_5 = currVal_5;
}
}
visitRootNodesInternal(cb:any,ctx:any):void {
cb(this._el_0,ctx);
}
}