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

1 line
34 KiB
Plaintext
Raw Permalink Normal View History

2024-07-16 15:23:22 +00:00
{"version":3,"file":"primeng-scrollpanel.mjs","sources":["../../src/app/components/scrollpanel/scrollpanel.ts","../../src/app/components/scrollpanel/primeng-scrollpanel.ts"],"sourcesContent":["import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n Inject,\n Input,\n NgModule,\n NgZone,\n OnDestroy,\n PLATFORM_ID,\n QueryList,\n Renderer2,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n numberAttribute\n} from '@angular/core';\nimport { PrimeTemplate } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { UniqueComponentId } from 'primeng/utils';\n\n/**\n * ScrollPanel is a cross browser, lightweight and themable alternative to native browser scrollbar.\n * @group Components\n */\n@Component({\n selector: 'p-scrollPanel',\n template: `\n <div #container [ngClass]=\"'p-scrollpanel p-component'\" [ngStyle]=\"style\" [class]=\"styleClass\" [attr.data-pc-name]=\"'scrollpanel'\">\n <div class=\"p-scrollpanel-wrapper\" [attr.data-pc-section]=\"'wrapper'\">\n <div #content class=\"p-scrollpanel-content\" [attr.data-pc-section]=\"'content'\" (mouseenter)=\"moveBar()\" (scroll)=\"onScroll($event)\">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </div>\n </div>\n <div\n #xBar\n class=\"p-scrollpanel-bar p-scrollpanel-bar-x\"\n tabindex=\"0\"\n role=\"scrollbar\"\n [attr.aria-orientation]=\"'horizontal'\"\n [attr.aria-valuenow]=\"lastScrollLeft\"\n [attr.data-pc-section]=\"'barx'\"\n [attr.aria-controls]=\"contentId\"\n (mousedown)=\"onXBarMouseDown($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onKeyUp()\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur()\"\n ></div>\n <div\n #yBar\n class=\"p-scrollpanel-bar p-scrollpanel-bar-y\"\n tabindex=\"0\"\n role=\"scrollbar\"\n [attr.aria-orientation]=\"'vertical'\"\n [attr.aria-valuenow]=\"lastScrollTop\"\n [attr.data-pc-section]=\"'bary'\"\n [attr.aria-controls]=\"contentId\"\n (mousedown)=\"onYBarMouseDown($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onKeyUp()\"\n (focus)=\"onFocus($event)\"\n ></div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./scrollpanel.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class ScrollPanel implements AfterViewInit, AfterContentInit, OnDestroy {\n /**\n * Inline style of the component.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the component.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Step factor to scroll the content while pressing the arrow keys.\n * @group Props\n */\n @Input({ transform: numberAttribute }) step: number = 5;\n\n @ViewChild('container') containerViewChild: ElementRef | undefined;\n\n @ViewChild('content') contentViewChild: ElementRef | undefined;\n\n @ViewChild('xBar') xBarViewChild: ElementRef | undefined;\n\n @ViewChild('yBar') yBarViewChild: ElementRef | undefined;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n scrollYRatio: number | undefined;\n\n scrollXRatio: number | undefined;\n\n timeoutFrame: any = (fn: VoidFunction) => setTim