UNPKG

4.09 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/router")):"function"==typeof define&&define.amd?define("primeng/steps",["exports","@angular/core","@angular/common","@angular/router"],t):t(((e=e||self).primeng=e.primeng||{},e.primeng.steps={}),e.ng.core,e.ng.common,e.ng.router)}(this,(function(e,t,i,n){"use strict";var a=this&&this.__decorate||function(e,t,i,n){var a,r=arguments.length,o=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,i,o):a(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},r=function(){function e(){this.activeIndex=0,this.readonly=!0,this.activeIndexChange=new t.EventEmitter}return e.prototype.itemClick=function(e,t,i){this.readonly||t.disabled?e.preventDefault():(this.activeIndexChange.emit(i),t.url||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t,index:i}))},a([t.Input()],e.prototype,"activeIndex",void 0),a([t.Input()],e.prototype,"model",void 0),a([t.Input()],e.prototype,"readonly",void 0),a([t.Input()],e.prototype,"style",void 0),a([t.Input()],e.prototype,"styleClass",void 0),a([t.Output()],e.prototype,"activeIndexChange",void 0),e=a([t.Component({selector:"p-steps",template:'\n <div [ngClass]="{\'ui-steps ui-widget ui-helper-clearfix\':true,\'ui-steps-readonly\':readonly}" [ngStyle]="style" [class]="styleClass">\n <ul role="tablist">\n <li *ngFor="let item of model; let i = index" class="ui-steps-item" #menuitem [ngStyle]="item.style" [class]="item.styleClass" role="tab" [attr.aria-selected]="i === activeIndex" [attr.aria-expanded]="i === activeIndex"\n [ngClass]="{\'ui-state-highlight ui-steps-current\':(i === activeIndex),\n \'ui-state-default\':(i !== activeIndex),\n \'ui-state-complete\':(i < activeIndex),\n \'ui-state-disabled ui-steps-incomplete\':item.disabled||(i !== activeIndex && readonly)}">\n <a *ngIf="!item.routerLink" [attr.href]="item.url" class="ui-menuitem-link" role="presentation" (click)="itemClick($event, item, i)" (keydown.enter)="itemClick($event, item, i)" [attr.target]="item.target" [attr.id]="item.id" \n [attr.tabindex]="item.disabled||(i !== activeIndex && readonly) ? null : (item.tabindex ? item.tabindex : \'0\')">\n <span class="ui-steps-number">{{i + 1}}</span>\n <span class="ui-steps-title">{{item.label}}</span>\n </a>\n <a *ngIf="item.routerLink" [routerLink]="item.routerLink" [queryParams]="item.queryParams" role="presentation" [routerLinkActive]="\'ui-menuitem-link-active\'" [routerLinkActiveOptions]="item.routerLinkActiveOptions||{exact:false}" class="ui-menuitem-link" \n (click)="itemClick($event, item, i)" (keydown.enter)="itemClick($event, item, i)" [attr.target]="item.target" [attr.id]="item.id" [attr.tabindex]="item.disabled||(i !== activeIndex && readonly) ? null : (item.tabindex ? item.tabindex : \'0\')"\n [fragment]="item.fragment" [queryParamsHandling]="item.queryParamsHandling" [preserveFragment]="item.preserveFragment" [skipLocationChange]="item.skipLocationChange" [replaceUrl]="item.replaceUrl" [state]="item.state">\n <span class="ui-steps-number">{{i + 1}}</span>\n <span class="ui-steps-title">{{item.label}}</span>\n </a>\n </li>\n </ul>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.Default})],e)}(),o=function(){function e(){}return e=a([t.NgModule({imports:[i.CommonModule,n.RouterModule],exports:[r,n.RouterModule],declarations:[r]})],e)}();e.Steps=r,e.StepsModule=o,Object.defineProperty(e,"__esModule",{value:!0})}));
2//# sourceMappingURL=primeng-steps.umd.min.js.map
\No newline at end of file