{"version":3,"file":"primeng-dock.mjs","sources":["../../src/app/components/dock/dock.ts","../../src/app/components/dock/primeng-dock.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, ElementRef, Input, NgModule, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { LicenseManager, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { RippleModule } from 'primeng/ripple';\nimport { TooltipModule } from 'primeng/tooltip';\n\n@Component({\n selector: 'p-dock',\n template: `\n
\n
\n \n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./dock.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Dock implements AfterContentInit, AfterViewInit {\n @Input() id: string;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() model: any[] = null;\n\n @Input() position: string = 'bottom';\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n itemTemplate: TemplateRef;\n\n currentIndex: number;\n\n constructor(private el: ElementRef, public cd: ChangeDetectorRef) {\n this.currentIndex = -3;\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'item':\n this.itemTemplate = item.template;\n break;\n\n default:\n this.itemTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewInit() {\n LicenseManager.check();\n }\n\n onListMouseLeave() {\n this.currentIndex = -3;\n this.cd.markForCheck();\n }\n\n onItemMouseEnter(index) {\n this.currentIndex = index;\n\n if (index === 1) {\n }\n\n this.cd.markForCheck();\n }\n\n onItemClick(e, item) {\n if (item.command) {\n item.command({ originalEvent: e, item });\n }\n }\n\n get containerClass() {\n return {\n ['p-dock p-component ' + ` p-dock-${this.position}`]: true\n };\n }\n\n isClickableRouterLink(item: any) {\n return item.routerLink && !item.disabled;\n }\n\n itemClass(index) {\n return {\n 'p-dock-item': true,\n 'p-dock-item-second-prev': this.currentIndex - 2 === index,\n 'p-dock-item-prev': this.currentIndex - 1 === index,\n 'p-dock-item-current': this.currentIndex === index,\n 'p-dock-item-next': this.currentIndex + 1 === index,\n 'p-dock-item-second-next': this.currentIndex + 2 === index\n };\n }\n}\n\n@NgModule({\n imports: [CommonModule, RouterModule, RippleModule, TooltipModule],\n exports: [Dock, SharedModule, TooltipModule, RouterModule],\n declarations: [Dock]\n})\nexport class DockModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAwEa,IAAI,CAAA;IAiBb,WAAoB,CAAA,EAAc,EAAS,EAAqB,EAAA;AAA5C,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;AAAS,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAmB;AAVvD,QAAA,IAAK,CAAA,KAAA,GAAU,IAAI,CAAC;AAEpB,QAAA,IAAQ,CAAA,QAAA,GAAW,QAAQ,CAAC;AASjC,QAAA,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;KAC1B;IAED,kBAAkB,GAAA;QACd,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AAC5B,YAAA,QAAQ,IAAI,CAAC,OAAO,EAAE;AAClB,gBAAA,KAAK,MAAM;AACP,oBAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC;oBAClC,MAAM;AAEV,gBAAA;AACI,oBAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC;oBAClC,MAAM;AACb,aAAA;AACL,SAAC,CAAC,CAAC;KACN;IAED,eAAe,GAAA;QACX,cAAc,CAAC,KAAK,EAAE,CAAC;KAC1B;IAED,gBAAgB,GAAA;AACZ,QAAA,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;AACvB,QAAA,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC;KAC1B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