source: trip-planner-front/node_modules/primeng/fesm2020/primeng-defer.mjs.map

Last change on this file was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 4.0 KB
Line 
1{"version":3,"file":"primeng-defer.mjs","sources":["../../src/app/components/defer/defer.ts","../../src/app/components/defer/primeng-defer.ts"],"sourcesContent":["import {NgModule,Directive,ElementRef,AfterViewInit,OnDestroy,TemplateRef,EmbeddedViewRef,\n ViewContainerRef,Renderer2,EventEmitter,Output,ContentChild, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\n@Directive({\n selector: '[pDefer]',\n host: {\n 'class': 'p-element'\n }\n})\nexport class DeferredLoader implements AfterViewInit,OnDestroy {\n\n @Output() onLoad: EventEmitter<any> = new EventEmitter();\n\n @ContentChild(TemplateRef) template: TemplateRef<any>;\n\n documentScrollListener: Function;\n\n view: EmbeddedViewRef<any>;\n\n constructor(public el: ElementRef, public renderer: Renderer2, public viewContainer: ViewContainerRef, private cd: ChangeDetectorRef) {}\n\n ngAfterViewInit() {\n if (this.shouldLoad()) {\n this.load();\n }\n\n if (!this.isLoaded()) {\n this.documentScrollListener = this.renderer.listen('window', 'scroll', () => {\n if (this.shouldLoad()) {\n this.load();\n this.documentScrollListener();\n this.documentScrollListener = null;\n }\n });\n }\n }\n\n shouldLoad(): boolean {\n if (this.isLoaded()) {\n return false;\n }\n else {\n let rect = this.el.nativeElement.getBoundingClientRect();\n let docElement = document.documentElement;\n let winHeight = docElement.clientHeight;\n\n return (winHeight >= rect.top);\n }\n }\n\n load(): void {\n this.view = this.viewContainer.createEmbeddedView(this.template);\n this.onLoad.emit();\n this.cd.detectChanges();\n }\n\n isLoaded() {\n return this.view != null;\n }\n\n ngOnDestroy() {\n this.view = null;\n\n if (this.documentScrollListener) {\n this.documentScrollListener();\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [DeferredLoader],\n declarations: [DeferredLoader]\n})\nexport class DeferModule { }\n","/**\n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