Icard/angular-clarity-master(work.../node_modules/primeng/fesm2022/primeng-animate.mjs.map

1 line
6.1 KiB
Plaintext
Raw Normal View History

2024-07-16 14:55:36 +00:00
{"version":3,"file":"primeng-animate.mjs","sources":["../../src/app/components/animate/animate.ts","../../src/app/components/animate/primeng-animate.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterViewInit, Directive, ElementRef, Input, NgModule, OnInit, Renderer2 } from '@angular/core';\nimport { DomHandler } from 'primeng/dom';\n/**\n * Animate manages PrimeFlex CSS classes declaratively to during enter/leave animations on scroll or on page load.\n * @group Components\n */\n@Directive({\n selector: '[pAnimate]',\n host: {\n '[class.p-animate]': 'true'\n }\n})\nexport class Animate implements OnInit, AfterViewInit {\n /**\n * Selector to define the CSS class for enter animation.\n * @group Props\n */\n @Input() enterClass: string | undefined;\n /**\n * Selector to define the CSS class for leave animation.\n * @group Props\n */\n @Input() leaveClass: string | undefined;\n\n observer: IntersectionObserver | undefined;\n\n timeout: any;\n\n constructor(private host: ElementRef, public el: ElementRef, public renderer: Renderer2) {}\n\n ngOnInit() {\n console.log('pAnimate directive is deprecated in 16.7.0 and will be removed in the future. Use pAnimateOnScroll directive instead');\n }\n\n ngAfterViewInit() {\n this.bindIntersectionObserver();\n }\n\n bindIntersectionObserver() {\n const options = {\n root: null,\n rootMargin: '0px',\n threshold: 1.0\n };\n\n this.observer = new IntersectionObserver((el) => this.isVisible(el), options);\n this.observer.observe(this.host.nativeElement);\n }\n\n isVisible(element: IntersectionObserverEntry[]) {\n const [intersectionObserverEntry] = element;\n intersectionObserverEntry.isIntersecting ? this.enter() : this.leave();\n }\n\n enter() {\n this.host.nativeElement.style.visibility = 'visible';\n DomHandler.addClass(this.host.nativeElement, this.enterClass as string);\n }\n\n leave() {\n DomHandler.removeClass(this.host.nativeElement, this.enterClass as string);\n if (this.leaveClass) {\n DomHandler.addClass(this.host.nativeElement, this.leaveClass);\n }\n\n const animationDuration = this.host.nativeElement.style.animationDuration || 500;\n\n this.timeout = setTimeout(() => {\n this.host.nativeElement.style.visibility = 'hidden';\n }, animationDuration);\n }\n\n unbindIntersectionObserver() {\n if (this.observer) {\n this.observer.unobserve(this.host.nativeElement);\n }\n }\n\n ngOnDestroy() {\n this.unbindIntersectionObserver();\n clearTimeout(this.timeout);\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [Animate],\n declarations: [Animate]\n})\nexport class AnimateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAGA;;;AAGG;MAOU,OAAO,CAAA;AAgBI,IAAA,IAAA,CAAA;AAAyB,IAAA,EAAA,CAAA;AAAuB,IAAA,QAAA,CAAA;AAfpE;;;AAGG;AACM,IAAA,UAAU,CAAqB;AACxC;;;AAGG;AACM,IAAA,UAAU,CAAqB;AAExC,IAAA,QAAQ,CAAmC;AAE3C,IAAA,OAAO,CAAM;AAEb,IAAA,WAAA,CAAoB,IAAgB,EAAS,EAAc,EAAS,QAAmB,EAAA;QAAnE,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAAS,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;QAAS,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;KAAI;IAE3F,QAAQ,GAAA;AACJ,QAAA,OAAO,CAAC,GAAG,CAAC,sHAAsH,CAAC,CAAC;KACvI;IAED,eAAe,GAAA;QACX,IAAI,CAAC,wBAAwB,EAAE,CAAC;KACnC;IAED,wBAAwB,GAAA;AACpB,QAAA,MAAM,OAAO,GAAG;AACZ,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,UAAU,EAAE,KAAK;AACjB,YAAA,SAAS,EAAE,GAAG;SACjB,CAAC;QAEF,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAoB,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QAC9E,IAAI,CAAC,QAAQ,CAAC,OAAO,CAA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