{"version":3,"file":"primeng-steps.js","sources":["../../src/app/components/steps/steps.ts","../../src/app/components/steps/primeng-steps.ts"],"sourcesContent":["import {NgModule,Component,Input,Output,EventEmitter,ChangeDetectionStrategy, ViewEncapsulation, OnInit, OnDestroy, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MenuItem} from 'primeng/api';\nimport {RouterModule, Router, ActivatedRoute} from '@angular/router';\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})\nexport class Steps implements OnInit, OnDestroy {\n \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 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) {\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 return this.router.isActive(item.routerLink, false) || this.router.isActive(this.router.createUrlTree([item.routerLink], {relativeTo: this.route}).toString(), false);\n else \n return index === this.activeIndex;\n }\n\n ngOnDestroy() {\n this.subscription.unsubscribe();\n }\n}\n\n@NgModule({\n imports: [CommonModule,RouterModule],\n exports: [Steps,RouterModule],\n declarations: [Steps]\n})\nexport class StepsModule { }","/**\n * Generated bundle index. Do not edit.\n */\n\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