UNPKG

novo-elements

Version:

Bullhorn's NOVO Element Repository for Angular 2

439 lines (438 loc) 23 kB
/** * @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/elements/calendar/CalendarMonth'; 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/i18n/tokens'; import * as import10 from '../../../../src/elements/calendar/CalendarMonthHeader'; import * as import11 from './CalendarMonthHeader.ngfactory'; import * as import12 from '@angular/core/src/linker/view_container'; import * as import13 from '../../../node_modules/@angular/common/src/directives/ng_for.ngfactory'; import * as import14 from '@angular/core/src/linker/template_ref'; import * as import15 from '@angular/core/src/change_detection/differs/iterable_differs'; import * as import16 from '@angular/common/src/directives/ng_for'; import * as import17 from '@angular/common/src/pipes/slice_pipe'; import * as import18 from '../../../../src/elements/calendar/CalendarMonthDay'; import * as import19 from './CalendarMonthDay.ngfactory'; export class Wrapper_CalendarMonthElement { /*private*/ _eventHandler:Function; context:import0.CalendarMonthElement; /*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; /*private*/ _expr_8:any; /*private*/ _expr_9:any; subscription0:any; subscription1:any; subscription2:any; constructor(p0:any,p1:any) { this._changed = false; this._changes = {}; this.context = new import0.CalendarMonthElement(p0,p1); 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; } ngOnDetach(view:import2.AppView<any>,componentView:import2.AppView<any>,el:any):void { } ngOnDestroy():void { this.context.ngOnDestroy(); (this.subscription0 && this.subscription0.unsubscribe()); (this.subscription1 && this.subscription1.unsubscribe()); (this.subscription2 && this.subscription2.unsubscribe()); } check_viewDate(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_0,currValue))) { this._changed = true; this.context.viewDate = currValue; this._changes['viewDate'] = new import1.SimpleChange(this._expr_0,currValue); this._expr_0 = currValue; } } check_events(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_1,currValue))) { this._changed = true; this.context.events = currValue; this._changes['events'] = new import1.SimpleChange(this._expr_1,currValue); this._expr_1 = currValue; } } check_excludeDays(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_2,currValue))) { this._changed = true; this.context.excludeDays = currValue; this._changes['excludeDays'] = new import1.SimpleChange(this._expr_2,currValue); this._expr_2 = currValue; } } check_dayModifier(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_3,currValue))) { this._changed = true; this.context.dayModifier = currValue; this._changes['dayModifier'] = new import1.SimpleChange(this._expr_3,currValue); this._expr_3 = currValue; } } check_refresh(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_4,currValue))) { this._changed = true; this.context.refresh = currValue; this._changes['refresh'] = new import1.SimpleChange(this._expr_4,currValue); this._expr_4 = currValue; } } check_locale(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_5,currValue))) { this._changed = true; this.context.locale = currValue; this._changes['locale'] = new import1.SimpleChange(this._expr_5,currValue); this._expr_5 = currValue; } } check_tooltipPlacement(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_6,currValue))) { this._changed = true; this.context.tooltipPlacement = currValue; this._changes['tooltipPlacement'] = new import1.SimpleChange(this._expr_6,currValue); this._expr_6 = currValue; } } check_weekStartsOn(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_7,currValue))) { this._changed = true; this.context.weekStartsOn = currValue; this._changes['weekStartsOn'] = new import1.SimpleChange(this._expr_7,currValue); this._expr_7 = currValue; } } check_headerTemplate(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_8,currValue))) { this._changed = true; this.context.headerTemplate = currValue; this._changes['headerTemplate'] = new import1.SimpleChange(this._expr_8,currValue); this._expr_8 = currValue; } } check_cellTemplate(currValue:any,throwOnChange:boolean,forceUpdate:boolean):void { if ((forceUpdate || import3.checkBinding(throwOnChange,this._expr_9,currValue))) { this._changed = true; this.context.cellTemplate = currValue; this._changes['cellTemplate'] = new import1.SimpleChange(this._expr_9,currValue); this._expr_9 = 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,emit0:boolean,emit1:boolean,emit2:boolean):void { this._eventHandler = _eventHandler; if (emit0) { (this.subscription0 = this.context.dayClicked.subscribe(_eventHandler.bind(view,'dayClicked'))); } if (emit1) { (this.subscription1 = this.context.eventClicked.subscribe(_eventHandler.bind(view,'eventClicked'))); } if (emit2) { (this.subscription2 = this.context.eventTimesChanged.subscribe(_eventHandler.bind(view,'eventTimesChanged'))); } } } var renderType_CalendarMonthElement_Host:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,([] as any[]),{}); class View_CalendarMonthElement_Host0 extends import2.AppView<any> { _el_0:any; compView_0:import2.AppView<import0.CalendarMonthElement>; _CalendarMonthElement_0_3:Wrapper_CalendarMonthElement; constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) { super(View_CalendarMonthElement_Host0,renderType_CalendarMonthElement_Host,import6.ViewType.HOST,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways); } createInternal(rootSelector:string):import8.ComponentRef<any> { this._el_0 = import3.selectOrCreateRenderHostElement(this.renderer,'novo-calendar-month',import3.EMPTY_INLINE_ARRAY,rootSelector,(null as any)); this.compView_0 = new View_CalendarMonthElement0(this.viewUtils,this,0,this._el_0); this._CalendarMonthElement_0_3 = new Wrapper_CalendarMonthElement(this.compView_0.ref,this.injectorGet(import9.LOCALE_ID,this.parentIndex)); this.compView_0.create(this._CalendarMonthElement_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._CalendarMonthElement_0_3.context); } injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { if (((token === import0.CalendarMonthElement) && (0 === requestNodeIndex))) { return this._CalendarMonthElement_0_3.context; } return notFoundResult; } detectChangesInternal(throwOnChange:boolean):void { this._CalendarMonthElement_0_3.ngDoCheck(this,this._el_0,throwOnChange); this.compView_0.internalDetectChanges(throwOnChange); } destroyInternal():void { this.compView_0.destroy(); this._CalendarMonthElement_0_3.ngOnDestroy(); } visitRootNodesInternal(cb:any,ctx:any):void { cb(this._el_0,ctx); } } export const CalendarMonthElementNgFactory:import8.ComponentFactory<import0.CalendarMonthElement> = new import8.ComponentFactory<import0.CalendarMonthElement>('novo-calendar-month',View_CalendarMonthElement_Host0,import0.CalendarMonthElement); const styles_CalendarMonthElement:any[] = ([] as any[]); var renderType_CalendarMonthElement:import4.RenderComponentType = import3.createRenderComponentType('',0,import5.ViewEncapsulation.None,styles_CalendarMonthElement,{}); export class View_CalendarMonthElement0 extends import2.AppView<import0.CalendarMonthElement> { _text_0:any; _el_1:any; _text_2:any; _el_3:any; compView_3:import2.AppView<import10.CalendarMonthHeaderElement>; _CalendarMonthHeaderElement_3_3:import11.Wrapper_CalendarMonthHeaderElement; _text_4:any; _text_5:any; _el_6:any; _text_7:any; _anchor_8:any; /*private*/ _vc_8:import12.ViewContainer; _TemplateRef_8_5:any; _NgFor_8_6:import13.Wrapper_NgFor; _text_9:any; _text_10:any; _text_11:any; constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any) { super(View_CalendarMonthElement0,renderType_CalendarMonthElement,import6.ViewType.COMPONENT,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways); } 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',new import3.InlineArray2(2,'class','calendar-month-view'),(null as any)); this._text_2 = this.renderer.createText(this._el_1,'\n ',(null as any)); this._el_3 = import3.createRenderElement(this.renderer,this._el_1,'novo-calendar-month-header',import3.EMPTY_INLINE_ARRAY,(null as any)); this.compView_3 = new import11.View_CalendarMonthHeaderElement0(this.viewUtils,this,3,this._el_3); this._CalendarMonthHeaderElement_3_3 = new import11.Wrapper_CalendarMonthHeaderElement(); this._text_4 = this.renderer.createText((null as any),'\n ',(null as any)); this.compView_3.create(this._CalendarMonthHeaderElement_3_3.context); this._text_5 = this.renderer.createText(this._el_1,'\n ',(null as any)); this._el_6 = import3.createRenderElement(this.renderer,this._el_1,'div',new import3.InlineArray2(2,'class','calendar-days'),(null as any)); this._text_7 = this.renderer.createText(this._el_6,'\n ',(null as any)); this._anchor_8 = this.renderer.createTemplateAnchor(this._el_6,(null as any)); this._vc_8 = new import12.ViewContainer(8,6,this,this._anchor_8); this._TemplateRef_8_5 = new import14.TemplateRef_(this,8,this._anchor_8); this._NgFor_8_6 = new import13.Wrapper_NgFor(this._vc_8.vcRef,this._TemplateRef_8_5,this.parentView.injectorGet(import15.IterableDiffers,this.parentIndex),this.ref); this._text_9 = this.renderer.createText(this._el_6,'\n ',(null as any)); this._text_10 = this.renderer.createText(this._el_1,'\n ',(null as any)); this._text_11 = this.renderer.createText(parentRenderNode,'\n ',(null as any)); var disposable_0:Function = import3.subscribeToRenderElement(this,this._el_3,new import3.InlineArray2(2,'viewDateChange',(null as any)),this.eventHandler(this.handleEvent_3)); this._CalendarMonthHeaderElement_3_3.subscribe(this,this.eventHandler(this.handleEvent_3),true); this.init((null as any),((<any>this.renderer).directRenderer? (null as any): [ this._text_0, this._el_1, this._text_2, this._el_3, this._text_4, this._text_5, this._el_6, this._text_7, this._anchor_8, this._text_9, this._text_10, this._text_11 ] ),[disposable_0]); return (null as any); } injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { if (((token === import10.CalendarMonthHeaderElement) && ((3 <= requestNodeIndex) && (requestNodeIndex <= 4)))) { return this._CalendarMonthHeaderElement_3_3.context; } if (((token === import14.TemplateRef) && (8 === requestNodeIndex))) { return this._TemplateRef_8_5; } if (((token === import16.NgFor) && (8 === requestNodeIndex))) { return this._NgFor_8_6.context; } return notFoundResult; } detectChangesInternal(throwOnChange:boolean):void { const currVal_3_0_0:any = this.context.viewDate; this._CalendarMonthHeaderElement_3_3.check_viewDate(currVal_3_0_0,throwOnChange,false); const currVal_3_0_1:any = this.context.columnHeaders; this._CalendarMonthHeaderElement_3_3.check_days(currVal_3_0_1,throwOnChange,false); const currVal_3_0_2:any = this.context.locale; this._CalendarMonthHeaderElement_3_3.check_locale(currVal_3_0_2,throwOnChange,false); const currVal_3_0_3:any = this.context.headerTemplate; this._CalendarMonthHeaderElement_3_3.check_customTemplate(currVal_3_0_3,throwOnChange,false); this._CalendarMonthHeaderElement_3_3.ngDoCheck(this,this._el_3,throwOnChange); const currVal_8_0_0:any = this.context.view.rowOffsets; this._NgFor_8_6.check_ngForOf(currVal_8_0_0,throwOnChange,false); this._NgFor_8_6.ngDoCheck(this,this._anchor_8,throwOnChange); this._vc_8.detectChangesInNestedViews(throwOnChange); this.compView_3.internalDetectChanges(throwOnChange); } destroyInternal():void { this._vc_8.destroyNestedViews(); this.compView_3.destroy(); this._CalendarMonthHeaderElement_3_3.ngOnDestroy(); } createEmbeddedViewInternal(nodeIndex:number):import2.AppView<any> { if ((nodeIndex == 8)) { return new View_CalendarMonthElement1(this.viewUtils,this,8,this._anchor_8,this._vc_8); } return (null as any); } handleEvent_3(eventName:string,$event:any):boolean { this.markPathToRootAsCheckOnce(); var result:boolean = true; if ((eventName == 'viewDateChange')) { const pd_sub_0:any = ((<any>(this.context.viewDate = $event)) !== false); result = (pd_sub_0 && result); } if ((eventName == 'viewDateChange')) { const pd_sub_1:any = ((<any>this.context.refreshAll()) !== false); result = (pd_sub_1 && result); } return result; } } class View_CalendarMonthElement1 extends import2.AppView<any> { _el_0:any; _text_1:any; _el_2:any; _text_3:any; _anchor_4:any; /*private*/ _vc_4:import12.ViewContainer; _TemplateRef_4_5:any; _NgFor_4_6:import13.Wrapper_NgFor; _text_5:any; _text_6:any; _pipe_slice_0:import17.SlicePipe; constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any,declaredViewContainer:import12.ViewContainer) { super(View_CalendarMonthElement1,renderType_CalendarMonthElement,import6.ViewType.EMBEDDED,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways,declaredViewContainer); } createInternal(rootSelector:string):import8.ComponentRef<any> { this._el_0 = import3.createRenderElement(this.renderer,(null as any),'div',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,'div',new import3.InlineArray2(2,'class','calendar-cell-row'),(null as any)); this._text_3 = this.renderer.createText(this._el_2,'\n ',(null as any)); this._anchor_4 = this.renderer.createTemplateAnchor(this._el_2,(null as any)); this._vc_4 = new import12.ViewContainer(4,2,this,this._anchor_4); this._TemplateRef_4_5 = new import14.TemplateRef_(this,4,this._anchor_4); this._NgFor_4_6 = new import13.Wrapper_NgFor(this._vc_4.vcRef,this._TemplateRef_4_5,this.parentView.parentView.injectorGet(import15.IterableDiffers,this.parentView.parentIndex),this.parentView.ref); this._text_5 = this.renderer.createText(this._el_2,'\n ',(null as any)); this._text_6 = this.renderer.createText(this._el_0,'\n ',(null as any)); this._pipe_slice_0 = new import17.SlicePipe(); 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._anchor_4, this._text_5, this._text_6 ] ),(null as any)); return (null as any); } injectorGetInternal(token:any,requestNodeIndex:number,notFoundResult:any):any { if (((token === import14.TemplateRef) && (4 === requestNodeIndex))) { return this._TemplateRef_4_5; } if (((token === import16.NgFor) && (4 === requestNodeIndex))) { return this._NgFor_4_6.context; } return notFoundResult; } detectChangesInternal(throwOnChange:boolean):void { const valUnwrapper:any = new import1.ValueUnwrapper(); valUnwrapper.reset(); const currVal_4_0_0:any = valUnwrapper.unwrap(this._pipe_slice_0.transform(this.parentView.context.view.days,this.context.$implicit,(this.context.$implicit + this.parentView.context.view.totalDaysVisibleInWeek))); this._NgFor_4_6.check_ngForOf(currVal_4_0_0,throwOnChange,valUnwrapper.hasWrappedValue); this._NgFor_4_6.ngDoCheck(this,this._anchor_4,throwOnChange); this._vc_4.detectChangesInNestedViews(throwOnChange); } destroyInternal():void { this._vc_4.destroyNestedViews(); } visitRootNodesInternal(cb:any,ctx:any):void { cb(this._el_0,ctx); } createEmbeddedViewInternal(nodeIndex:number):import2.AppView<any> { if ((nodeIndex == 4)) { return new View_CalendarMonthElement2(this.viewUtils,this,4,this._anchor_4,this._vc_4); } return (null as any); } } class View_CalendarMonthElement2 extends import2.AppView<any> { _el_0:any; compView_0:import2.AppView<import18.CalendarMonthDayElement>; _CalendarMonthDayElement_0_3:import19.Wrapper_CalendarMonthDayElement; _text_1:any; constructor(viewUtils:import3.ViewUtils,parentView:import2.AppView<any>,parentIndex:number,parentElement:any,declaredViewContainer:import12.ViewContainer) { super(View_CalendarMonthElement2,renderType_CalendarMonthElement,import6.ViewType.EMBEDDED,viewUtils,parentView,parentIndex,parentElement,import7.ChangeDetectorStatus.CheckAlways,declaredViewContainer); } createInternal(rootSelector:string):import8.ComponentRef<any> { this._el_0 = import3.createRenderElement(this.renderer,(null as any),'novo-calendar-month-day',import3.EMPTY_INLINE_ARRAY,(null as any)); this.compView_0 = new import19.View_CalendarMonthDayElement0(this.viewUtils,this,0,this._el_0); this._CalendarMonthDayElement_0_3 = new import19.Wrapper_CalendarMonthDayElement(); this._text_1 = this.renderer.createText((null as any),'\n ',(null as any)); this.compView_0.create(this._CalendarMonthDayElement_0_3.context); var disposable_0:Function = import3.subscribeToRenderElement(this,this._el_0,new import3.InlineArray4(4,'click',(null as any),'eventClicked',(null as any)),this.eventHandler(this.handleEvent_0)); this._CalendarMonthDayElement_0_3.subscribe(this,this.eventHandler(this.handleEvent_0),true); this.init(this._el_0,((<any>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 === import18.CalendarMonthDayElement) && ((0 <= requestNodeIndex) && (requestNodeIndex <= 1)))) { return this._CalendarMonthDayElement_0_3.context; } return notFoundResult; } detectChangesInternal(throwOnChange:boolean):void { const currVal_0_0_0:any = this.context.$implicit; this._CalendarMonthDayElement_0_3.check_day(currVal_0_0_0,throwOnChange,false); const currVal_0_0_1:any = this.parentView.parentView.context.locale; this._CalendarMonthDayElement_0_3.check_locale(currVal_0_0_1,throwOnChange,false); const currVal_0_0_2:any = this.parentView.parentView.context.cellTemplate; this._CalendarMonthDayElement_0_3.check_customTemplate(currVal_0_0_2,throwOnChange,false); this._CalendarMonthDayElement_0_3.ngDoCheck(this,this._el_0,throwOnChange); this._CalendarMonthDayElement_0_3.checkHost(this,this.compView_0,this._el_0,throwOnChange); this.compView_0.internalDetectChanges(throwOnChange); } destroyInternal():void { this.compView_0.destroy(); this._CalendarMonthDayElement_0_3.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 == 'click')) { const pd_sub_0:any = ((<any>this.parentView.parentView.context.dayClicked.emit({day: this.context.$implicit})) !== false); result = (pd_sub_0 && result); } if ((eventName == 'eventClicked')) { const pd_sub_1:any = ((<any>this.parentView.parentView.context.eventClicked.emit({ day: this.context.$implicit, event: $event.event } )) !== false); result = (pd_sub_1 && result); } return result; } }