angular2-wizard-angular-material
Version:
This is an Angular2 Form Wizard component. Just like any form wizard. You can define steps and control how each step works. You can enable/disable navigation button based on validity of the current step. Currently, the component only support basic functio
181 lines (180 loc) • 8.59 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 './wizard-step.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';
export class Wrapper_WizardStepComponent {
/*private*/ _eventHandler:Function;
context:import0.WizardStepComponent;
/*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;
subscription0:any;
subscription1:any;
subscription2:any;
constructor() {
this._changed = false;
this.context = new import0.WizardStepComponent();
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;
}
ngOnDetach(view:import2.AppView<any>,componentView:import2.AppView<any>,el:any):void {
}
ngOnDestroy():void {
(this.subscription0 && this.subscription0.unsubscribe());
(this.subscription1 && this.subscription1.unsubscribe());
(this.subscription2 && this.subscription2.unsubscribe());
}
check_title(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_0,currValue))) {
this._changed = true;
this.context.title = currValue;
this._expr_0 = currValue;
}
}
check_hidden(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_1,currValue))) {
this._changed = true;
this.context.hidden = currValue;
this._expr_1 = currValue;
}
}
check_isValid(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_2,currValue))) {
this._changed = true;
this.context.isValid = currValue;
this._expr_2 = currValue;
}
}
check_showNext(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_3,currValue))) {
this._changed = true;
this.context.showNext = currValue;
this._expr_3 = currValue;
}
}
check_showPrev(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_4,currValue))) {
this._changed = true;
this.context.showPrev = currValue;
this._expr_4 = currValue;
}
}
check_isActive(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void {
if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_5,currValue))) {
this._changed = true;
this.context.isActive = currValue;
this._expr_5 = 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,emit1:boolean,emit2:boolean):void {
this._eventHandler = _eventHandler;
if (emit0) { (this.subscription0 = this.context.onNext.subscribe(_eventHandler.bind(view,'onNext'))); }
if (emit1) { (this.subscription1 = this.context.onPrev.subscribe(_eventHandler.bind(view,'onPrev'))); }
if (emit2) { (this.subscription2 = this.context.onComplete.subscribe(_eventHandler.bind(view,'onComplete'))); }
}
}
var renderType_WizardStepComponent_Host:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,([] as any[]),{});
class View_WizardStepComponent_Host0 extends import2.AppView<any> {
_el_0:any;
compView_0:import2.AppView<import0.WizardStepComponent>;
_WizardStepComponent_0_3:Wrapper_WizardStepComponent;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_WizardStepComponent_Host0,renderType_WizardStepComponent_Host,import6.ViewType.HOST,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways);
}
createInternal(rootSelector:string):import8.ComponentRef<any> {
this._el_0 = import3.selectOrCreateRenderHostElement(this.renderer,'wizard-step',import3.EMPTY_INLINE_ARRAY,rootSelector,(null as any));
this.compView_0 = new View_WizardStepComponent0(this.viewUtils,this,0,this._el_0);
this._WizardStepComponent_0_3 = new Wrapper_WizardStepComponent();
this.compView_0.create(this._WizardStepComponent_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._WizardStepComponent_0_3.context);
}
injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any {
if (((token === import0.WizardStepComponent) && (0 === requestNodeIndex))) { return this._WizardStepComponent_0_3.context; }
return notFoundResult;
}
detectChangesInternal(throwOnChange:boolean):void {
this._WizardStepComponent_0_3.ngDoCheck(this,this._el_0,throwOnChange);
this.compView_0.internalDetectChanges(throwOnChange);
}
destroyInternal():void {
this.compView_0.destroy();
this._WizardStepComponent_0_3.ngOnDestroy();
}
visitRootNodesInternal(cb:any,ctx:any):void {
cb(this._el_0,ctx);
}
visitProjectableNodesInternal(nodeIndex:number,ngContentIndex:number,cb:any,ctx:any):void {
if (((nodeIndex == 0) && (ngContentIndex == 0))) { }
}
}
export const WizardStepComponentNgFactory:import8.ComponentFactory<import0.WizardStepComponent> = new import8.ComponentFactory<import0.WizardStepComponent>('wizard-step',View_WizardStepComponent_Host0,import0.WizardStepComponent);
const styles_WizardStepComponent:any[] = ([] as any[]);
var renderType_WizardStepComponent:import4.RenderComponentType = import3.createRenderComponentType('',1,import5.ViewEncapsulation.None,styles_WizardStepComponent,{});
export class View_WizardStepComponent0 extends import2.AppView<import0.WizardStepComponent> {
_text_0:any;
_el_1:any;
_text_2:any;
_text_3:any;
_text_4:any;
/*private*/ _expr_5:any;
constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) {
super(View_WizardStepComponent0,renderType_WizardStepComponent,import6.ViewType.COMPONENT,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways);
this._expr_5 = import1.UNINITIALIZED;
}
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,'div',import3.EMPTY_INLINE_ARRAY,(null as any));
this._text_2 = this.renderer.createText(this._el_1,'\n ',(null as any));
this.projectNodes(this._el_1,0);
this._text_3 = this.renderer.createText(this._el_1,'\n ',(null as any));
this._text_4 = this.renderer.createText(parentRenderNode,'\n ',(null as any));
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._text_4
]
),(null as any));
return (null as any);
}
detectChangesInternal(throwOnChange:boolean):void {
const currVal_5:boolean = !this.context.isActive;
if (import3.checkBinding(throwOnChange,this._expr_5,currVal_5)) {
this.renderer.setElementProperty(this._el_1,'hidden',currVal_5);
this._expr_5 = currVal_5;
}
}
}