angular2-spinner
Version:
Angular2 Spinner Indicator
175 lines (174 loc) • 9.92 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 './angular2-spinner';
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/security';
import * as import5 from '@angular/core/src/render/api';
import * as import6 from '@angular/core/src/metadata/view';
import * as import7 from '@angular/core/src/linker/view_type';
import * as import8 from '@angular/core/src/change_detection/constants';
import * as import9 from '@angular/core/src/linker/component_factory';
export class Wrapper_SpinnerComponent {
/*private*/ _eventHandler:Function;
context:import0.SpinnerComponent;
/*private*/ _changed:boolean;
/*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;
/*private*/ _expr_8:any;
/*private*/ _expr_9:any;
/*private*/ _expr_10:any;
constructor() {
this._changed = false;
this.context = new import0.SpinnerComponent();
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;
this._expr_8 = import1.UNINITIALIZED;
this._expr_9 = import1.UNINITIALIZED;
this._expr_10 = import1.UNINITIALIZED;
}
ngOnDetach(view:import2.AppView<any>,componentView:import2.AppView<any>,el:any):void {
}
ngOnDestroy():void {
}
check_size(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_0,currValue))) {
this._changed = true;
this.context.size = currValue;
this._expr_0 = currValue;
}
}
check_tickness(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_1,currValue))) {
this._changed = true;
this.context.tickness = currValue;
this._expr_1 = currValue;
}
}
check_color(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_2,currValue))) {
this._changed = true;
this.context.color = currValue;
this._expr_2 = currValue;
}
}
check_opacity(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_3,currValue))) {
this._changed = true;
this.context.opacity = currValue;
this._expr_3 = currValue;
}
}
ngDoCheck(view:import2.AppView<any>,el:any,throwOnChange:boolean):boolean {
var changed:any = this._changed;
this._changed = false;
if (!throwOnChange) { if ((view.numberOfChecks === 0)) { this.context.ngOnInit(); } }
return changed;
}
checkHost(view:import2.AppView<any>,componentView:import2.AppView<any>,el:any,throwOnChange:boolean):void {
const currVal_4:any = this.context.size;
if (import3.checkBinding(throwOnChange,this._expr_4,currVal_4)) {
view.renderer.setElementStyle(el,'width',((view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_4) == null)? (null as any): (view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_4).toString() + 'px')));
this._expr_4 = currVal_4;
}
const currVal_5:any = this.context.size;
if (import3.checkBinding(throwOnChange,this._expr_5,currVal_5)) {
view.renderer.setElementStyle(el,'height',((view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_5) == null)? (null as any): (view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_5).toString() + 'px')));
this._expr_5 = currVal_5;
}
const currVal_6:any = this.context.tickness;
if (import3.checkBinding(throwOnChange,this._expr_6,currVal_6)) {
view.renderer.setElementStyle(el,'borderWidth',((view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_6) == null)? (null as any): (view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_6).toString() + 'px')));
this._expr_6 = currVal_6;
}
const currVal_7:any = this.context.color;
if (import3.checkBinding(throwOnChange,this._expr_7,currVal_7)) {
view.renderer.setElementStyle(el,'borderTopColor',((view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_7) == null)? (null as any): view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_7).toString()));
this._expr_7 = currVal_7;
}
const currVal_8:any = this.context.secondColor;
if (import3.checkBinding(throwOnChange,this._expr_8,currVal_8)) {
view.renderer.setElementStyle(el,'borderBottomColor',((view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_8) == null)? (null as any): view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_8).toString()));
this._expr_8 = currVal_8;
}
const currVal_9:any = this.context.secondColor;
if (import3.checkBinding(throwOnChange,this._expr_9,currVal_9)) {
view.renderer.setElementStyle(el,'borderLeftColor',((view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_9) == null)? (null as any): view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_9).toString()));
this._expr_9 = currVal_9;
}
const currVal_10:any = this.context.secondColor;
if (import3.checkBinding(throwOnChange,this._expr_10,currVal_10)) {
view.renderer.setElementStyle(el,'borderRightColor',((view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_10) == null)? (null as any): view.viewUtils.sanitizer.sanitize(import4.SecurityContext.STYLE,currVal_10).toString()));
this._expr_10 = currVal_10;
}
}
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_SpinnerComponent_Host:import5.RenderComponentType = import3.createRenderComponentType('',0,import6.ViewEncapsulation.None,([] as any[]),{});
class View_SpinnerComponent_Host0 extends import2.AppView<any> {
_el_0:any;
compView_0:import2.AppView<import0.SpinnerComponent>;
_SpinnerComponent_0_3:Wrapper_SpinnerComponent;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_SpinnerComponent_Host0,renderType_SpinnerComponent_Host,import7.ViewType.HOST,viewUtils,parentView,parentIndex,parentElement,import8.ChangeDetectorStatus.CheckAlways);
}
createInternal(rootSelector:string):import9.ComponentRef<any> {
this._el_0 = import3.selectOrCreateRenderHostElement(this.renderer,'spinner',import3.EMPTY_INLINE_ARRAY,rootSelector,(null as any));
this.compView_0 = new View_SpinnerComponent0(this.viewUtils,this,0,this._el_0);
this._SpinnerComponent_0_3 = new Wrapper_SpinnerComponent();
this.compView_0.create(this._SpinnerComponent_0_3.context);
this.init(this._el_0,((<any>this.renderer).directRenderer? (null as any): [this._el_0]),(null as any));
return new import9.ComponentRef_<any>(0,this,this._el_0,this._SpinnerComponent_0_3.context);
}
injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
if (((token === import0.SpinnerComponent) && (0 === requestNodeIndex))) { return this._SpinnerComponent_0_3.context; }
return notFoundResult;
}
detectChangesInternal(throwOnChange:boolean):void {
this._SpinnerComponent_0_3.ngDoCheck(this,this._el_0,throwOnChange);
this._SpinnerComponent_0_3.checkHost(this,this.compView_0,this._el_0,throwOnChange);
this.compView_0.internalDetectChanges(throwOnChange);
}
destroyInternal():void {
this.compView_0.destroy();
}
visitRootNodesInternal(cb:any,ctx:any):void {
cb(this._el_0,ctx);
}
}
export const SpinnerComponentNgFactory:import9.ComponentFactory<import0.SpinnerComponent> = new import9.ComponentFactory<import0.SpinnerComponent>('spinner',View_SpinnerComponent_Host0,import0.SpinnerComponent);
const styles_SpinnerComponent:any[] = ['@keyframes spin {\n from {transform: rotate(0deg);}\n to {transform: rotate(360deg);}\n }\n\n [_nghost-%COMP%] {\n position:relative;\n box-sizing: border-box;\n display:inline-block;\n padding:0px;\n border-radius:100%;\n border-style:solid;\n animation: spin 0.8s linear infinite;\n }\n\n [_nghost-%COMP%] .margins[_ngcontent-%COMP%] {\n margin: 0px 10px;\n }'];
var renderType_SpinnerComponent:import5.RenderComponentType = import3.createRenderComponentType('',0,import6.ViewEncapsulation.Emulated,styles_SpinnerComponent,{});
export class View_SpinnerComponent0 extends import2.AppView<import0.SpinnerComponent> {
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_SpinnerComponent0,renderType_SpinnerComponent,import7.ViewType.COMPONENT,viewUtils,parentView,parentIndex,parentElement,import8.ChangeDetectorStatus.CheckAlways);
}
createInternal(rootSelector:string):import9.ComponentRef<any> {
const parentRenderNode:any = this.renderer.createViewRoot(this.parentElement);
this.init((null as any),((<any>this.renderer).directRenderer? (null as any): ([] as any[])),(null as any));
return (null as any);
}
}