source: trip-planner-front/node_modules/primeng/esm2020/scrollpanel/scrollpanel.mjs@ 6fe77af

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

adding photos

  • Property mode set to 100644
File size: 37.3 KB
Line 
1import { NgModule, Component, Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren } from '@angular/core';
2import { CommonModule } from '@angular/common';
3import { DomHandler } from 'primeng/dom';
4import { PrimeTemplate } from 'primeng/api';
5import * as i0 from "@angular/core";
6import * as i1 from "@angular/common";
7export class ScrollPanel {
8 constructor(el, zone, cd) {
9 this.el = el;
10 this.zone = zone;
11 this.cd = cd;
12 this.timeoutFrame = (fn) => setTimeout(fn, 0);
13 }
14 ngAfterViewInit() {
15 this.zone.runOutsideAngular(() => {
16 this.moveBar();
17 this.moveBar = this.moveBar.bind(this);
18 this.onXBarMouseDown = this.onXBarMouseDown.bind(this);
19 this.onYBarMouseDown = this.onYBarMouseDown.bind(this);
20 this.onDocumentMouseMove = this.onDocumentMouseMove.bind(this);
21 this.onDocumentMouseUp = this.onDocumentMouseUp.bind(this);
22 window.addEventListener('resize', this.moveBar);
23 this.contentViewChild.nativeElement.addEventListener('scroll', this.moveBar);
24 this.contentViewChild.nativeElement.addEventListener('mouseenter', this.moveBar);
25 this.xBarViewChild.nativeElement.addEventListener('mousedown', this.onXBarMouseDown);
26 this.yBarViewChild.nativeElement.addEventListener('mousedown', this.onYBarMouseDown);
27 this.calculateContainerHeight();
28 this.initialized = true;
29 });
30 }
31 ngAfterContentInit() {
32 this.templates.forEach((item) => {
33 switch (item.getType()) {
34 case 'content':
35 this.contentTemplate = item.template;
36 break;
37 default:
38 this.contentTemplate = item.template;
39 break;
40 }
41 });
42 }
43 calculateContainerHeight() {
44 let container = this.containerViewChild.nativeElement;
45 let content = this.contentViewChild.nativeElement;
46 let xBar = this.xBarViewChild.nativeElement;
47 let containerStyles = getComputedStyle(container), xBarStyles = getComputedStyle(xBar), pureContainerHeight = DomHandler.getHeight(container) - parseInt(xBarStyles['height'], 10);
48 if (containerStyles['max-height'] != "none" && pureContainerHeight == 0) {
49 if (content.offsetHeight + parseInt(xBarStyles['height'], 10) > parseInt(containerStyles['max-height'], 10)) {
50 container.style.height = containerStyles['max-height'];
51 }
52 else {
53 container.style.height = content.offsetHeight + parseFloat(containerStyles.paddingTop) + parseFloat(containerStyles.paddingBottom) + parseFloat(containerStyles.borderTopWidth) + parseFloat(containerStyles.borderBottomWidth) + "px";
54 }
55 }
56 }
57 moveBar() {
58 let container = this.containerViewChild.nativeElement;
59 let content = this.contentViewChild.nativeElement;
60 /* horizontal scroll */
61 let xBar = this.xBarViewChild.nativeElement;
62 let totalWidth = content.scrollWidth;
63 let ownWidth = content.clientWidth;
64 let bottom = (container.clientHeight - xBar.clientHeight) * -1;
65 this.scrollXRatio = ownWidth / totalWidth;
66 /* vertical scroll */
67 let yBar = this.yBarViewChild.nativeElement;
68 let totalHeight = content.scrollHeight;
69 let ownHeight = content.clientHeight;
70 let right = (container.clientWidth - yBar.clientWidth) * -1;
71 this.scrollYRatio = ownHeight / totalHeight;
72 this.requestAnimationFrame(() => {
73 if (this.scrollXRatio >= 1) {
74 DomHandler.addClass(xBar, 'p-scrollpanel-hidden');
75 }
76 else {
77 DomHandler.removeClass(xBar, 'p-scrollpanel-hidden');
78 const xBarWidth = Math.max(this.scrollXRatio * 100, 10);
79 const xBarLeft = content.scrollLeft * (100 - xBarWidth) / (totalWidth - ownWidth);
80 xBar.style.cssText = 'width:' + xBarWidth + '%; left:' + xBarLeft + '%;bottom:' + bottom + 'px;';
81 }
82 if (this.scrollYRatio >= 1) {
83 DomHandler.addClass(yBar, 'p-scrollpanel-hidden');
84 }
85 else {
86 DomHandler.removeClass(yBar, 'p-scrollpanel-hidden');
87 const yBarHeight = Math.max(this.scrollYRatio * 100, 10);
88 const yBarTop = content.scrollTop * (100 - yBarHeight) / (totalHeight - ownHeight);
89 yBar.style.cssText = 'height:' + yBarHeight + '%; top: calc(' + yBarTop + '% - ' + xBar.clientHeight + 'px);right:' + right + 'px;';
90 }
91 });
92 this.cd.markForCheck();
93 }
94 onYBarMouseDown(e) {
95 this.isYBarClicked = true;
96 this.lastPageY = e.pageY;
97 DomHandler.addClass(this.yBarViewChild.nativeElement, 'p-scrollpanel-grabbed');
98 DomHandler.addClass(document.body, 'p-scrollpanel-grabbed');
99 document.addEventListener('mousemove', this.onDocumentMouseMove);
100 document.addEventListener('mouseup', this.onDocumentMouseUp);
101 e.preventDefault();
102 }
103 onXBarMouseDown(e) {
104 this.isXBarClicked = true;
105 this.lastPageX = e.pageX;
106 DomHandler.addClass(this.xBarViewChild.nativeElement, 'p-scrollpanel-grabbed');
107 DomHandler.addClass(document.body, 'p-scrollpanel-grabbed');
108 document.addEventListener('mousemove', this.onDocumentMouseMove);
109 document.addEventListener('mouseup', this.onDocumentMouseUp);
110 e.preventDefault();
111 }
112 onDocumentMouseMove(e) {
113 if (this.isXBarClicked) {
114 this.onMouseMoveForXBar(e);
115 }
116 else if (this.isYBarClicked) {
117 this.onMouseMoveForYBar(e);
118 }
119 else {
120 this.onMouseMoveForXBar(e);
121 this.onMouseMoveForYBar(e);
122 }
123 }
124 onMouseMoveForXBar(e) {
125 let deltaX = e.pageX - this.lastPageX;
126 this.lastPageX = e.pageX;
127 this.requestAnimationFrame(() => {
128 this.contentViewChild.nativeElement.scrollLeft += deltaX / this.scrollXRatio;
129 });
130 }
131 onMouseMoveForYBar(e) {
132 let deltaY = e.pageY - this.lastPageY;
133 this.lastPageY = e.pageY;
134 this.requestAnimationFrame(() => {
135 this.contentViewChild.nativeElement.scrollTop += deltaY / this.scrollYRatio;
136 });
137 }
138 scrollTop(scrollTop) {
139 let scrollableHeight = this.contentViewChild.nativeElement.scrollHeight - this.contentViewChild.nativeElement.clientHeight;
140 scrollTop = scrollTop > scrollableHeight ? scrollableHeight : scrollTop > 0 ? scrollTop : 0;
141 this.contentViewChild.nativeElement.scrollTop = scrollTop;
142 }
143 onDocumentMouseUp(e) {
144 DomHandler.removeClass(this.yBarViewChild.nativeElement, 'p-scrollpanel-grabbed');
145 DomHandler.removeClass(this.xBarViewChild.nativeElement, 'p-scrollpanel-grabbed');
146 DomHandler.removeClass(document.body, 'p-scrollpanel-grabbed');
147 document.removeEventListener('mousemove', this.onDocumentMouseMove);
148 document.removeEventListener('mouseup', this.onDocumentMouseUp);
149 this.isXBarClicked = false;
150 this.isYBarClicked = false;
151 }
152 requestAnimationFrame(f) {
153 let frame = window.requestAnimationFrame || this.timeoutFrame;
154 frame(f);
155 }
156 ngOnDestroy() {
157 if (this.initialized) {
158 window.removeEventListener('resize', this.moveBar);
159 this.contentViewChild.nativeElement.removeEventListener('scroll', this.moveBar);
160 this.contentViewChild.nativeElement.removeEventListener('mouseenter', this.moveBar);
161 this.xBarViewChild.nativeElement.removeEventListener('mousedown', this.onXBarMouseDown);
162 this.yBarViewChild.nativeElement.removeEventListener('mousedown', this.onYBarMouseDown);
163 }
164 }
165 refresh() {
166 this.moveBar();
167 }
168}
169ScrollPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ScrollPanel, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
170ScrollPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: ScrollPanel, selector: "p-scrollPanel", inputs: { style: "style", styleClass: "styleClass" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }, { propertyName: "contentViewChild", first: true, predicate: ["content"], descendants: true }, { propertyName: "xBarViewChild", first: true, predicate: ["xBar"], descendants: true }, { propertyName: "yBarViewChild", first: true, predicate: ["yBar"], descendants: true }], ngImport: i0, template: `
171 <div #container [ngClass]="'p-scrollpanel p-component'" [ngStyle]="style" [class]="styleClass">
172 <div class="p-scrollpanel-wrapper">
173 <div #content class="p-scrollpanel-content">
174 <ng-content></ng-content>
175 <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
176 </div>
177 </div>
178 <div #xBar class="p-scrollpanel-bar p-scrollpanel-bar-x"></div>
179 <div #yBar class="p-scrollpanel-bar p-scrollpanel-bar-y"></div>
180 </div>
181 `, isInline: true, styles: [".p-scrollpanel-wrapper{overflow:hidden;width:100%;height:100%;position:relative;z-index:1;float:left}.p-scrollpanel-content{height:calc(100% + 18px);width:calc(100% + 18px);padding:0 18px 18px 0;position:relative;overflow:auto;box-sizing:border-box}.p-scrollpanel-bar{position:relative;background:#c1c1c1;border-radius:3px;z-index:2;cursor:pointer;opacity:0;transition:opacity .25s linear}.p-scrollpanel-bar-y{width:9px;top:0}.p-scrollpanel-bar-x{height:9px;bottom:0}.p-scrollpanel-hidden{visibility:hidden}.p-scrollpanel:hover .p-scrollpanel-bar,.p-scrollpanel:active .p-scrollpanel-bar{opacity:1}.p-scrollpanel-grabbed{-webkit-user-select:none;-ms-user-select:none;user-select:none}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
182i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ScrollPanel, decorators: [{
183 type: Component,
184 args: [{ selector: 'p-scrollPanel', template: `
185 <div #container [ngClass]="'p-scrollpanel p-component'" [ngStyle]="style" [class]="styleClass">
186 <div class="p-scrollpanel-wrapper">
187 <div #content class="p-scrollpanel-content">
188 <ng-content></ng-content>
189 <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
190 </div>
191 </div>
192 <div #xBar class="p-scrollpanel-bar p-scrollpanel-bar-x"></div>
193 <div #yBar class="p-scrollpanel-bar p-scrollpanel-bar-y"></div>
194 </div>
195 `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
196 'class': 'p-element'
197 }, styles: [".p-scrollpanel-wrapper{overflow:hidden;width:100%;height:100%;position:relative;z-index:1;float:left}.p-scrollpanel-content{height:calc(100% + 18px);width:calc(100% + 18px);padding:0 18px 18px 0;position:relative;overflow:auto;box-sizing:border-box}.p-scrollpanel-bar{position:relative;background:#c1c1c1;border-radius:3px;z-index:2;cursor:pointer;opacity:0;transition:opacity .25s linear}.p-scrollpanel-bar-y{width:9px;top:0}.p-scrollpanel-bar-x{height:9px;bottom:0}.p-scrollpanel-hidden{visibility:hidden}.p-scrollpanel:hover .p-scrollpanel-bar,.p-scrollpanel:active .p-scrollpanel-bar{opacity:1}.p-scrollpanel-grabbed{-webkit-user-select:none;-ms-user-select:none;user-select:none}\n"] }]
198 }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { style: [{
199 type: Input
200 }], styleClass: [{
201 type: Input
202 }], containerViewChild: [{
203 type: ViewChild,
204 args: ['container']
205 }], contentViewChild: [{
206 type: ViewChild,
207 args: ['content']
208 }], xBarViewChild: [{
209 type: ViewChild,
210 args: ['xBar']
211 }], yBarViewChild: [{
212 type: ViewChild,
213 args: ['yBar']
214 }], templates: [{
215 type: ContentChildren,
216 args: [PrimeTemplate]
217 }] } });
218export class ScrollPanelModule {
219}
220ScrollPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ScrollPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
221ScrollPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ScrollPanelModule, declarations: [ScrollPanel], imports: [CommonModule], exports: [ScrollPanel] });
222ScrollPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ScrollPanelModule, imports: [[CommonModule]] });
223i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: ScrollPanelModule, decorators: [{
224 type: NgModule,
225 args: [{
226 imports: [CommonModule],
227 exports: [ScrollPanel],
228 declarations: [ScrollPanel]
229 }]
230 }] });
231//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Nyb2xscGFuZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL2NvbXBvbmVudHMvc2Nyb2xscGFuZWwvc2Nyb2xscGFuZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFnRCxTQUFTLEVBQUUsdUJBQXVCLEVBQUUsaUJBQWlCLEVBQXVDLGVBQWUsRUFBMEIsTUFBTSxlQUFlLENBQUM7QUFDOU8sT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDekMsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGFBQWEsQ0FBQzs7O0FBdUI1QyxNQUFNLE9BQU8sV0FBVztJQU1wQixZQUFtQixFQUFjLEVBQVMsSUFBWSxFQUFTLEVBQXFCO1FBQWpFLE9BQUUsR0FBRixFQUFFLENBQVk7UUFBUyxTQUFJLEdBQUosSUFBSSxDQUFRO1FBQVMsT0FBRSxHQUFGLEVBQUUsQ0FBbUI7UUFnQnBGLGlCQUFZLEdBQVEsQ0FBQyxFQUFFLEVBQUUsRUFBRSxDQUFDLFVBQVUsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUM7SUFoQn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ZlQmFyKTtcbiAgICAgICAgICAgIHRoaXMueEJhclZpZXdDaGlsZC5uYXRpdmVFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNlZG93bicsIHRoaXMub25YQmFyTW91c2VEb3duKTtcbiAgICAgICAgICAgIHRoaXMueUJhclZpZXdDaGlsZC5uYXRpdmVFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNlZG93bicsIHRoaXMub25ZQmFyTW91c2VEb3duKTtcblxuICAgICAgICAgICAgdGhpcy5jYWxjdWxhdGVDb250YWluZXJIZWlnaHQoKTtcblxuICAgICAgICAgICAgdGhpcy5pbml0aWFsaXplZCA9IHRydWU7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIG5nQWZ0ZXJDb250ZW50SW5pdCgpIHtcbiAgICAgICAgdGhpcy50ZW1wbGF0ZXMuZm9yRWFjaCgoaXRlbSkgPT4ge1xuICAgICAgICAgICAgc3dpdGNoKGl0ZW0uZ2V0VHlwZSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAnY29udGVudCc6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGVudFRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGVudFRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgY2FsY3VsYXRlQ29udGFpbmVySGVpZ2h0KCkge1xuICAgICAgICBsZXQgY29udGFpbmVyID0gdGhpcy5jb250YWluZXJWaWV3Q2hpbGQubmF0aXZlRWxlbWVudDtcbiAgICAgICAgbGV0IGNvbnRlbnQgPSB0aGlzLmNvbnRlbnRWaWV3Q2hpbGQubmF0aXZlRWxlbWVudDtcbiAgICAgIC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XRpdmVFbGVtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ3Njcm9sbCcsIHRoaXMubW92ZUJhcik7XG4gICAgICAgICAgICB0aGlzLmNvbnRlbnRWaWV3Q2hpbGQubmF0aXZlRWxlbWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdtb3VzZWVudGVyJywgdGhpcy5tb3ZlQmFyKTtcbiAgICAgICAgICAgIHRoaXMueEJhclZpZXdDaGlsZC5uYXRpdmVFbGVtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ21vdXNlZG93bicsIHRoaXMub25YQmFyTW91c2VEb3duKTtcbiAgICAgICAgICAgIHRoaXMueUJhclZpZXdDaGlsZC5uYXRpdmVFbGVtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ21vdXNlZG93bicsIHRoaXMub25ZQmFyTW91c2VEb3duKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlZnJlc2goKSB7XG4gICAgICAgIHRoaXMubW92ZUJhcigpO1xuICAgIH1cblxufVxuXG5ATmdNb2R1bGUoe1xuICAgIGltcG9ydHM6IFtDb21tb25Nb2R1bGVdLFxuICAgIGV4cG9ydHM6IFtTY3JvbGxQYW5lbF0sXG4gICAgZGVjbGFyYXRpb25zOiBbU2Nyb2xsUGFuZWxdXG59KVxuZXhwb3J0IGNsYXNzIFNjcm9sbFBhbmVsTW9kdWxlIHsgfVxuIl19
Note: See TracBrowser for help on using the repository browser.