/** * @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/core/components/formly.form'; 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 '../../../../src/core/services/formly.form.builder'; import * as import9 from '@angular/core/src/linker/view_container'; import * as import10 from '../../../node_modules/@angular/common/src/directives/ng_for.ngfactory'; import * as import11 from '@angular/core/src/linker/template_ref'; import * as import12 from '@angular/core/src/change_detection/differs/iterable_differs'; import * as import13 from '@angular/common/src/directives/ng_for'; import * as import14 from '../../../../src/core/components/formly.field'; import * as import15 from '../../../node_modules/@angular/common/src/directives/ng_class.ngfactory'; import * as import16 from './formly.field.ngfactory'; import * as import17 from '@angular/core/src/change_detection/differs/keyvalue_differs'; import * as import18 from '@angular/core/src/linker/element_ref'; import * as import19 from '../../../../src/core/services/formly.event.emitter'; import * as import20 from '../../../../src/core/services/formly.config'; import * as import21 from '@angular/core/src/linker/component_factory_resolver'; import * as import22 from '@angular/common/src/directives/ng_class'; export class Wrapper_FormlyForm { /*private*/ _eventHandler:Function; context:import0.FormlyForm; /*private*/ _changed:boolean; /*private*/ _changes:{[key: string]:any}; /*private*/ _expr_0:any; /*private*/ _expr_1:any; /*private*/ _expr_2:any; /*private*/ _expr_3:any; constructor(p0:any) { this._changed = false; this._changes = {}; this.context = new import0.FormlyForm(p0); this._expr_0 = import1.UNINITIALIZED; this._expr_1 = import1.UNINITIALIZED; this._expr_2 = import1.UNINITIALIZED; this._expr_3 = import1.UNINITIALIZED; } ngOnDetach(view:import2.AppView,componentView:import2.AppView,el:any):void { } ngOnDestroy():void { } check_model(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_0,currValue))) { this._changed = true; this.context.model = currValue; this._changes['model'] = new import1.SimpleChange(this._expr_0,currValue); this._expr_0 = currValue; } } check_form(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_1,currValue))) { this._changed = true; this.context.form = currValue; this._changes['form'] = new import1.SimpleChange(this._expr_1,currValue); this._expr_1 = currValue; } } check_fields(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_2,currValue))) { this._changed = true; this.context.fields = currValue; this._changes['fields'] = new import1.SimpleChange(this._expr_2,currValue); this._expr_2 = currValue; } } check_options(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_3,currValue))) { this._changed = true; this.context.options = currValue; this._changes['options'] = new import1.SimpleChange(this._expr_3,currValue); this._expr_3 = currValue; } } ngDoCheck(view:import2.AppView,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,componentView:import2.AppView,el:any,throwOnChange:boolean):void { } handleEvent(eventName:string,$event:any):boolean { var result:boolean = true; return result; } subscribe(view:import2.AppView,_eventHandler:any):void { this._eventHandler = _eventHandler; } } var renderType_FormlyForm_Host:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,([] as any[]),{}); class View_FormlyForm_Host0 extends import2.AppView { _el_0:any; compView_0:import2.AppView; _FormlyForm_0_3:Wrapper_FormlyForm; constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView,parentIndex:number,parentElement:any) { super(View_FormlyForm_Host0,renderType_FormlyForm_Host,import6.ViewType.HOST,viewUtils,parentView,parentIndex,parentElement,import1.ChangeDetectorStatus.CheckAlways); } createInternal(rootSelector:string):import7.ComponentRef { this._el_0 = import3.selectOrCreateRenderHostElement(this.renderer,'formly-form',import3.EMPTY_INLINE_ARRAY,rootSelector,(null as any)); this.compView_0 = new View_FormlyForm0(this.viewUtils,this,0,this._el_0); this._FormlyForm_0_3 = new Wrapper_FormlyForm(this.injectorGet(import8.FormlyFormBuilder,this.parentIndex)); this.compView_0.create(this._FormlyForm_0_3.context); this.init(this._el_0,((this.renderer).directRenderer? (null as any): [this._el_0]),(null as any)); return new import7.ComponentRef_(0,this,this._el_0,this._FormlyForm_0_3.context); } injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { if (((token === import0.FormlyForm) && (0 === requestNodeIndex))) { return this._FormlyForm_0_3.context; } return notFoundResult; } detectChangesInternal(throwOnChange:boolean):void { this._FormlyForm_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); } visitProjectableNodesInternal(nodeIndex:number,ngContentIndex:number,cb:any,ctx:any):void { if (((nodeIndex == 0) && (ngContentIndex == 0))) { } } } export const FormlyFormNgFactory:import7.ComponentFactory = new import7.ComponentFactory('formly-form',View_FormlyForm_Host0,import0.FormlyForm); const styles_FormlyForm:any[] = ([] as any[]); var renderType_FormlyForm:import4.RenderComponentType = import3.createRenderComponentType('',1,import5.ViewEncapsulation.None,styles_FormlyForm,{}); export class View_FormlyForm0 extends import2.AppView { _text_0:any; _anchor_1:any; /*private*/ _vc_1:import9.ViewContainer; _TemplateRef_1_5:any; _NgFor_1_6:import10.Wrapper_NgFor; _text_2:any; _text_3:any; constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView,parentIndex:number,parentElement:any) { super(View_FormlyForm0,renderType_FormlyForm,import6.ViewType.COMPONENT,viewUtils,parentView,parentIndex,parentElement,import1.ChangeDetectorStatus.CheckAlways); } createInternal(rootSelector:string):import7.ComponentRef { const parentRenderNode:any = this.renderer.createViewRoot(this.parentElement); this._text_0 = this.renderer.createText(parentRenderNode,'\n ',(null as any)); this._anchor_1 = this.renderer.createTemplateAnchor(parentRenderNode,(null as any)); this._vc_1 = new import9.ViewContainer(1,(null as any),this,this._anchor_1); this._TemplateRef_1_5 = new import11.TemplateRef_(this,1,this._anchor_1); this._NgFor_1_6 = new import10.Wrapper_NgFor(this._vc_1.vcRef,this._TemplateRef_1_5,this.parentView.injectorGet(import12.IterableDiffers,this.parentIndex),this.ref); this._text_2 = this.renderer.createText(parentRenderNode,'\n ',(null as any)); this.projectNodes(parentRenderNode,0); this._text_3 = this.renderer.createText(parentRenderNode,'\n ',(null as any)); this.init((null as any),((this.renderer).directRenderer? (null as any): [ this._text_0, this._anchor_1, this._text_2, this._text_3 ] ),(null as any)); return (null as any); } injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { if (((token === import11.TemplateRef) && (1 === requestNodeIndex))) { return this._TemplateRef_1_5; } if (((token === import13.NgFor) && (1 === requestNodeIndex))) { return this._NgFor_1_6.context; } return notFoundResult; } detectChangesInternal(throwOnChange:boolean):void { const currVal_1_0_0:any = this.context.fields; this._NgFor_1_6.check_ngForOf(currVal_1_0_0,throwOnChange,false); this._NgFor_1_6.ngDoCheck(this,this._anchor_1,throwOnChange); this._vc_1.detectChangesInNestedViews(throwOnChange); } destroyInternal():void { this._vc_1.destroyNestedViews(); } createEmbeddedViewInternal(nodeIndex:number):import2.AppView { if ((nodeIndex == 1)) { return new View_FormlyForm1(this.viewUtils,this,1,this._anchor_1,this._vc_1); } return (null as any); } } class View_FormlyForm1 extends import2.AppView { _el_0:any; compView_0:import2.AppView; _NgClass_0_3:import15.Wrapper_NgClass; _FormlyField_0_4:import16.Wrapper_FormlyField; _text_1:any; constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView,parentIndex:number,parentElement:any,declaredViewContainer:import9.ViewContainer) { super(View_FormlyForm1,renderType_FormlyForm,import6.ViewType.EMBEDDED,viewUtils,parentView,parentIndex,parentElement,import1.ChangeDetectorStatus.CheckAlways,declaredViewContainer); } createInternal(rootSelector:string):import7.ComponentRef { this._el_0 = import3.createRenderElement(this.renderer,(null as any),'formly-field',import3.EMPTY_INLINE_ARRAY,(null as any)); this.compView_0 = new import16.View_FormlyField0(this.viewUtils,this,0,this._el_0); this._NgClass_0_3 = new import15.Wrapper_NgClass(this.parentView.injectorGet(import12.IterableDiffers,this.parentIndex),this.parentView.injectorGet(import17.KeyValueDiffers,this.parentIndex),new import18.ElementRef(this._el_0),this.renderer); this._FormlyField_0_4 = new import16.Wrapper_FormlyField(new import18.ElementRef(this._el_0),this.parentView.injectorGet(import19.FormlyPubSub,this.parentIndex),this.renderer,this.parentView.injectorGet(import20.FormlyConfig,this.parentIndex),this.parentView.injectorGet(import21.ComponentFactoryResolver,this.parentIndex)); this._text_1 = this.renderer.createText((null as any),'\n ',(null as any)); this.compView_0.create(this._FormlyField_0_4.context); var disposable_0:Function = import3.subscribeToRenderElement(this,this._el_0,new import3.InlineArray2(2,'modelChange',(null as any)),this.eventHandler(this.handleEvent_0)); this._FormlyField_0_4.subscribe(this,this.eventHandler(this.handleEvent_0),true); this.init(this._el_0,((this.renderer).directRenderer? (null as any): [ this._el_0, this._text_1 ] ),[disposable_0]); return (null as any); } injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { if (((token === import22.NgClass) && ((0 <= requestNodeIndex) && (requestNodeIndex <= 1)))) { return this._NgClass_0_3.context; } if (((token === import14.FormlyField) && ((0 <= requestNodeIndex) && (requestNodeIndex <= 1)))) { return this._FormlyField_0_4.context; } return notFoundResult; } detectChangesInternal(throwOnChange:boolean):void { const currVal_0_0_0:any = (!this.context.$implicit.fieldGroup? this.context.$implicit.className: (undefined as any)); this._NgClass_0_3.check_ngClass(currVal_0_0_0,throwOnChange,false); this._NgClass_0_3.ngDoCheck(this,this._el_0,throwOnChange); const currVal_0_1_0:any = this.parentView.context.fieldModel(this.context.$implicit); this._FormlyField_0_4.check_model(currVal_0_1_0,throwOnChange,false); const currVal_0_1_1:any = this.parentView.context.form; this._FormlyField_0_4.check_form(currVal_0_1_1,throwOnChange,false); const currVal_0_1_2:any = this.context.$implicit; this._FormlyField_0_4.check_field(currVal_0_1_2,throwOnChange,false); const currVal_0_1_3:any = this.parentView.context.options; this._FormlyField_0_4.check_options(currVal_0_1_3,throwOnChange,false); const currVal_0_1_4:any = this.context.$implicit.hideExpression; this._FormlyField_0_4.check_hide(currVal_0_1_4,throwOnChange,false); this._FormlyField_0_4.ngDoCheck(this,this._el_0,throwOnChange); this.compView_0.detectChanges(throwOnChange); } destroyInternal():void { this.compView_0.destroy(); this._FormlyField_0_4.ngOnDestroy(); } visitRootNodesInternal(cb:any,ctx:any):void { cb(this._el_0,ctx); } handleEvent_0(eventName:string,$event:any):boolean { this.markPathToRootAsCheckOnce(); var result:boolean = true; if ((eventName == 'modelChange')) { const pd_sub_0:any = ((this.parentView.context.changeModel($event)) !== false); result = (pd_sub_0 && result); } return result; } }