{"version":3,"file":"primeng-steps.mjs","sources":["../../src/app/components/steps/steps.ts","../../src/app/components/steps/primeng-steps.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, NgModule, OnDestroy, OnInit, Output, ViewEncapsulation } from '@angular/core';\nimport { ActivatedRoute, Router, RouterModule } from '@angular/router';\nimport { LicenseManager, MenuItem } from 'primeng/api';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'p-steps',\n template: `\n
\n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./steps.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Steps implements OnInit, OnDestroy, AfterViewInit {\n @Input() activeIndex: number = 0;\n\n @Input() model: MenuItem[];\n\n @Input() readonly: boolean = true;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Output() activeIndexChange: EventEmitter = new EventEmitter();\n\n constructor(private router: Router, private route: ActivatedRoute, private cd: ChangeDetectorRef) {}\n\n subscription: Subscription;\n\n ngOnInit() {\n this.subscription = this.router.events.subscribe(() => this.cd.markForCheck());\n }\n\n ngAfterViewInit() {\n LicenseManager.check();\n }\n\n itemClick(event: Event, item: MenuItem, i: number) {\n if (this.readonly || item.disabled) {\n event.preventDefault();\n return;\n }\n\n this.activeIndexChange.emit(i);\n\n if (!item.url && !item.routerLink) {\n event.preventDefault();\n }\n\n if (item.command) {\n item.command({\n originalEvent: event,\n item: item,\n index: i\n });\n }\n }\n\n isClickableRouterLink(item: MenuItem) {\n return item.routerLink && !this.readonly && !item.disabled;\n }\n\n isActive(item: MenuItem, index: number) {\n if (item.routerLink) {\n let routerLink = Array.isArray(item.routerLink) ? item.routerLink : [item.routerLink];\n\n return this.router.isActive(this.router.createUrlTree(routerLink, { relativeTo: this.route }).toString(), false);\n }\n\n return index === this.activeIndex;\n }\n\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule, RouterModule, TooltipModule],\n exports: [Steps, RouterModule, TooltipModule],\n declarations: [Steps]\n})\nexport class StepsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MA4Ea,KAAK,CAAA;AAad,IAAA,WAAA,CAAoB,MAAc,EAAU,KAAqB,EAAU,EAAqB,EAAA;AAA5E,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AAAU,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;AAAU,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAmB;AAZvF,QAAA,IAAW,CAAA,WAAA,GAAW,CAAC,CAAC;AAIxB,QAAA,IAAQ,CAAA,QAAA,GAAY,IAAI,CAAC;AAMxB,QAAA,IAAA,CAAA,iBAAiB,GAAsB,IAAI,YAAY,EAAE,CAAC;KAEgC;IAIpG,QAAQ,GAAA;QACJ,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC;KAClF;IAED,eAAe,GAAA;QACX,cAAc,CAAC,KAAK,EAAE,CAAC;KAC1B;AAED,IAAA,SAAS,CAAC,KAAY,EAAE,IAAc,EAAE,CAAS,EAAA;AAC7C,QAAA,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE;YAChC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,OAAO;AACV,SAAA;AAED,QAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE/B,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAC/B,KAAK,CAAC,cAAc,EAAE,CAAC;AAC1B,SAAA;Q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