{"version":3,"file":"primeng-steps.umd.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\nexport * from './public_api';\n"],"names":["EventEmitter","Component","ChangeDetectionStrategy","ViewEncapsulation","Router","ActivatedRoute","ChangeDetectorRef","Input","Output","NgModule","CommonModule","RouterModule"],"mappings":";;;;;;;QAkDI,eAAoB,MAAc,EAAU,KAAoB,EAAU,EAAqB;YAA3E,WAAM,GAAN,MAAM,CAAQ;YAAU,UAAK,GAAL,KAAK,CAAe;YAAU,OAAE,GAAF,EAAE,CAAmB;YAZtF,gBAAW,GAAW,CAAC,CAAC;YAIxB,aAAQ,GAAa,IAAI,CAAC;YAMzB,sBAAiB,GAAsB,IAAIA,iBAAY,EAAE,CAAC;SAEgC;QAIpG,wBAAQ,GAAR;YAAA,iBAEC;YADG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,cAAM,OAAA,KAAI,CAAC,EAAE,CAAC,YAAY,EAAE,GAAA,CAAC,CAAC;SAClF;QAED,yBAAS,GAAT,UAAU,KAAY,EAAE,IAAc,EAAE,CAAS;YAC7C,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAChC,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,OAAO;aACV;YAED,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAE/B,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACX,KAAK,CAAC,cAAc,EAAE,CAAC;aAC1B;YAED,IAAI,IAAI,CAAC,OAAO,EAAE;gBACd,IAAI,CAAC,OAAO,CAAC;oBACT,aAAa,EAAE,KAAK;oBACpB,IAAI,EAAE,IAAI;oBACV,KAAK,EAAE,CAAC;iBACX,CAAC,CAAC;aACN;SACJ;QAED,qCAAqB,GAArB,UAAsB,IAAc;YAChC,OAAO,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;SAC9D;QAED,wBAAQ,GAAR,UAA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