source: trip-planner-front/node_modules/.cache/babel-webpack/530432dd715df9d41b976e2ff2f8f05a.json@ 76712b2

Last change on this file since 76712b2 was e29cc2e, checked in by Ema <ema_spirova@…>, 3 years ago

primeNG components

  • Property mode set to 100644
File size: 14.2 KB
RevLine 
[e29cc2e]1{"ast":null,"code":"import * as i0 from '@angular/core';\nimport { Directive, Optional, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler } from 'primeng/dom';\nimport * as i1 from 'primeng/api';\n\nclass Ripple {\n constructor(el, zone, config) {\n this.el = el;\n this.zone = zone;\n this.config = config;\n }\n\n ngAfterViewInit() {\n if (this.config && this.config.ripple) {\n this.zone.runOutsideAngular(() => {\n this.create();\n this.mouseDownListener = this.onMouseDown.bind(this);\n this.el.nativeElement.addEventListener('mousedown', this.mouseDownListener);\n });\n }\n }\n\n onMouseDown(event) {\n let ink = this.getInk();\n\n if (!ink || getComputedStyle(ink, null).display === 'none') {\n return;\n }\n\n DomHandler.removeClass(ink, 'p-ink-active');\n\n if (!DomHandler.getHeight(ink) && !DomHandler.getWidth(ink)) {\n let d = Math.max(DomHandler.getOuterWidth(this.el.nativeElement), DomHandler.getOuterHeight(this.el.nativeElement));\n ink.style.height = d + 'px';\n ink.style.width = d + 'px';\n }\n\n let offset = DomHandler.getOffset(this.el.nativeElement);\n let x = event.pageX - offset.left + document.body.scrollTop - DomHandler.getWidth(ink) / 2;\n let y = event.pageY - offset.top + document.body.scrollLeft - DomHandler.getHeight(ink) / 2;\n ink.style.top = y + 'px';\n ink.style.left = x + 'px';\n DomHandler.addClass(ink, 'p-ink-active');\n }\n\n getInk() {\n for (let i = 0; i < this.el.nativeElement.children.length; i++) {\n if (this.el.nativeElement.children[i].className.indexOf('p-ink') !== -1) {\n return this.el.nativeElement.children[i];\n }\n }\n\n return null;\n }\n\n resetInk() {\n let ink = this.getInk();\n\n if (ink) {\n DomHandler.removeClass(ink, 'p-ink-active');\n }\n }\n\n onAnimationEnd(event) {\n DomHandler.removeClass(event.currentTarget, 'p-ink-active');\n }\n\n create() {\n let ink = document.createElement('span');\n ink.className = 'p-ink';\n this.el.nativeElement.appendChild(ink);\n this.animationListener = this.onAnimationEnd.bind(this);\n ink.addEventListener('animationend', this.animationListener);\n }\n\n remove() {\n let ink = this.getInk();\n\n if (ink) {\n this.el.nativeElement.removeEventListener('mousedown', this.mouseDownListener);\n ink.removeEventListener('animationend', this.animationListener);\n DomHandler.removeElement(ink);\n }\n }\n\n ngOnDestroy() {\n if (this.config && this.config.ripple) {\n this.remove();\n }\n }\n\n}\n\nRipple.ɵfac = function Ripple_Factory(t) {\n return new (t || Ripple)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1.PrimeNGConfig, 8));\n};\n\nRipple.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: Ripple,\n selectors: [[\"\", \"pRipple\", \"\"]],\n hostAttrs: [1, \"p-ripple\", \"p-element\"]\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(Ripple, [{\n type: Directive,\n args: [{\n selector: '[pRipple]',\n host: {\n 'class': 'p-ripple p-element'\n }\n }]\n }], function () {\n return [{\n type: i0.ElementRef\n }, {\n type: i0.NgZone\n }, {\n type: i1.PrimeNGConfig,\n decorators: [{\n type: Optional\n }]\n }];\n }, null);\n})();\n\nclass RippleModule {}\n\nRippleModule.ɵfac = function RippleModule_Factory(t) {\n return new (t || RippleModule)();\n};\n\nRippleModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: RippleModule\n});\nRippleModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n});\n\n(function () {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(RippleModule, [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n exports: [Ripple],\n declarations: [Ripple]\n }]\n }], null, null);\n})();\n/**\n * Generated bundle index. Do not edit.\n */\n\n\nexport { Ripple, RippleModule };","map":{"version":3,"sources":["C:/Users/DELL/Desktop/bachelor-thesis/trip-planner-front/node_modules/primeng/fesm2015/primeng-ripple.mjs"],"names":["i0","Directive","Optional","NgModule","CommonModule","DomHandler","i1","Ripple","constructor","el","zone","config","ngAfterViewInit","ripple","runOutsideAngular","create","mouseDownListener","onMouseDown","bind","nativeElement","addEventListener","event","ink","getInk","getComputedStyle","display","removeClass","getHeight","getWidth","d","Math","max","getOuterWidth","getOuterHeight","style","height","width","offset","getOffset","x","pageX","left","document","body","scrollTop","y","pageY","top","scrollLeft","addClass","i","children","length","className","indexOf","resetInk","onAnimationEnd","currentTarget","createElement","appendChild","animationListener","remove","removeEventListener","removeElement","ngOnDestroy","ɵfac","ElementRef","NgZone","PrimeNGConfig","ɵdir","type","args","selector","host","decorators","RippleModule","ɵmod","ɵinj","imports","exports","declarations"],"mappings":"AAAA,OAAO,KAAKA,EAAZ,MAAoB,eAApB;AACA,SAASC,SAAT,EAAoBC,QAApB,EAA8BC,QAA9B,QAA8C,eAA9C;AACA,SAASC,YAAT,QAA6B,iBAA7B;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,OAAO,KAAKC,EAAZ,MAAoB,aAApB;;AAEA,MAAMC,MAAN,CAAa;AACTC,EAAAA,WAAW,CAACC,EAAD,EAAKC,IAAL,EAAWC,MAAX,EAAmB;AAC1B,SAAKF,EAAL,GAAUA,EAAV;AACA,SAAKC,IAAL,GAAYA,IAAZ;AACA,SAAKC,MAAL,GAAcA,MAAd;AACH;;AACDC,EAAAA,eAAe,GAAG;AACd,QAAI,KAAKD,MAAL,IAAe,KAAKA,MAAL,CAAYE,MAA/B,EAAuC;AACnC,WAAKH,IAAL,CAAUI,iBAAV,CAA4B,MAAM;AAC9B,aAAKC,MAAL;AACA,aAAKC,iBAAL,GAAyB,KAAKC,WAAL,CAAiBC,IAAjB,CAAsB,IAAtB,CAAzB;AACA,aAAKT,EAA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B,EAA+C;AAAEG,MAAAA,IAAI,EAAEhE,EAAE,CAAC8D,aAAX;AAA0BM,MAAAA,UAAU,EAAE,CAAC;AAC7EJ,QAAAA,IAAI,EAAEpE;AADuE,OAAD;AAAtC,KAA/C,CAAP;AAGH,GAZL;AAAA;;AAaA,MAAMyE,YAAN,CAAmB;;AAEnBA,YAAY,CAACV,IAAb;AAAA,mBAAyGU,YAAzG;AAAA;;AACAA,YAAY,CAACC,IAAb,kBAlByF5E,EAkBzF;AAAA,QAA0G2E;AAA1G;AACAA,YAAY,CAACE,IAAb,kBAnByF7E,EAmBzF;AAAA,YAAkI,CAACI,YAAD,CAAlI;AAAA;;AACA;AAAA,qDApByFJ,EAoBzF,mBAA2F2E,YAA3F,EAAqH,CAAC;AAC1GL,IAAAA,IAAI,EAAEnE,QADoG;AAE1GoE,IAAAA,IAAI,EAAE,CAAC;AACCO,MAAAA,OAAO,EAAE,CAAC1E,YAAD,CADV;AAEC2E,MAAAA,OAAO,EAAE,CAACxE,MAAD,CAFV;AAGCyE,MAAAA,YAAY,EAAE,CAACzE,MAAD;AAHf,KAAD;AAFoG,GAAD,CAArH;AAAA;AASA;AACA;AACA;;;AAEA,SAASA,MAAT,EAAiBoE,YAAjB","sourcesContent":["import * as i0 from '@angular/core';\nimport { Directive, Optional, NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler } from 'primeng/dom';\nimport * as i1 from 'primeng/api';\n\nclass Ripple {\n constructor(el, zone, config) {\n this.el = el;\n this.zone = zone;\n this.config = config;\n }\n ngAfterViewInit() {\n if (this.config && this.config.ripple) {\n this.zone.runOutsideAngular(() => {\n this.create();\n this.mouseDownListener = this.onMouseDown.bind(this);\n this.el.nativeElement.addEventListener('mousedown', this.mouseDownListener);\n });\n }\n }\n onMouseDown(event) {\n let ink = this.getInk();\n if (!ink || getComputedStyle(ink, null).display === 'none') {\n return;\n }\n DomHandler.removeClass(ink, 'p-ink-active');\n if (!DomHandler.getHeight(ink) && !DomHandler.getWidth(ink)) {\n let d = Math.max(DomHandler.getOuterWidth(this.el.nativeElement), DomHandler.getOuterHeight(this.el.nativeElement));\n ink.style.height = d + 'px';\n ink.style.width = d + 'px';\n }\n let offset = DomHandler.getOffset(this.el.nativeElement);\n let x = event.pageX - offset.left + document.body.scrollTop - DomHandler.getWidth(ink) / 2;\n let y = event.pageY - offset.top + document.body.scrollLeft - DomHandler.getHeight(ink) / 2;\n ink.style.top = y + 'px';\n ink.style.left = x + 'px';\n DomHandler.addClass(ink, 'p-ink-active');\n }\n getInk() {\n for (let i = 0; i < this.el.nativeElement.children.length; i++) {\n if (this.el.nativeElement.children[i].className.indexOf('p-ink') !== -1) {\n return this.el.nativeElement.children[i];\n }\n }\n return null;\n }\n resetInk() {\n let ink = this.getInk();\n if (ink) {\n DomHandler.removeClass(ink, 'p-ink-active');\n }\n }\n onAnimationEnd(event) {\n DomHandler.removeClass(event.currentTarget, 'p-ink-active');\n }\n create() {\n let ink = document.createElement('span');\n ink.className = 'p-ink';\n this.el.nativeElement.appendChild(ink);\n this.animationListener = this.onAnimationEnd.bind(this);\n ink.addEventListener('animationend', this.animationListener);\n }\n remove() {\n let ink = this.getInk();\n if (ink) {\n this.el.nativeElement.removeEventListener('mousedown', this.mouseDownListener);\n ink.removeEventListener('animationend', this.animationListener);\n DomHandler.removeElement(ink);\n }\n }\n ngOnDestroy() {\n if (this.config && this.config.ripple) {\n this.remove();\n }\n }\n}\nRipple.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: Ripple, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i1.PrimeNGConfig, optional: true }], target: i0.ɵɵFactoryTarget.Directive });\nRipple.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"12.0.0\", version: \"13.0.0\", type: Ripple, selector: \"[pRipple]\", host: { classAttribute: \"p-ripple p-element\" }, ngImport: i0 });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: Ripple, decorators: [{\n type: Directive,\n args: [{\n selector: '[pRipple]',\n host: {\n 'class': 'p-ripple p-element'\n }\n }]\n }], ctorParameters: function () {\n return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i1.PrimeNGConfig, decorators: [{\n type: Optional\n }] }];\n } });\nclass RippleModule {\n}\nRippleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: RippleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\nRippleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: RippleModule, declarations: [Ripple], imports: [CommonModule], exports: [Ripple] });\nRippleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: RippleModule, imports: [[CommonModule]] });\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"13.0.0\", ngImport: i0, type: RippleModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CommonModule],\n exports: [Ripple],\n declarations: [Ripple]\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Ripple, RippleModule };\n"]},"metadata":{},"sourceType":"module"}
Note: See TracBrowser for help on using the repository browser.