ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
266 lines • 29 kB
JavaScript
import { __decorate } from "tslib";
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
import { NgClass, NgIf, NgTemplateOutlet } from '@angular/common';
import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core';
import { fromEvent, Subject } from 'rxjs';
import { filter, takeUntil } from 'rxjs/operators';
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
import { NzDestroyService } from 'ng-zorro-antd/core/services';
import { InputBoolean } from 'ng-zorro-antd/core/util';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzProgressModule } from 'ng-zorro-antd/progress';
import * as i0 from "@angular/core";
import * as i1 from "ng-zorro-antd/core/services";
import * as i2 from "ng-zorro-antd/progress";
import * as i3 from "ng-zorro-antd/icon";
import * as i4 from "ng-zorro-antd/core/outlet";
export class NzStepComponent {
get nzStatus() {
return this._status;
}
set nzStatus(status) {
this._status = status;
this.isCustomStatus = true;
}
get nzIcon() {
return this._icon;
}
set nzIcon(value) {
if (!(value instanceof TemplateRef)) {
this.oldAPIIcon = typeof value === 'string' && value.indexOf('anticon') > -1;
}
else {
}
this._icon = value;
}
get showProgress() {
return (this.nzPercentage !== null &&
!this.nzIcon &&
this.nzStatus === 'process' &&
this.nzPercentage >= 0 &&
this.nzPercentage <= 100);
}
get currentIndex() {
return this._currentIndex;
}
set currentIndex(current) {
this._currentIndex = current;
if (!this.isCustomStatus) {
this._status = current > this.index ? 'finish' : current === this.index ? this.outStatus || '' : 'wait';
}
}
constructor(cdr, ngZone, destroy$) {
this.cdr = cdr;
this.ngZone = ngZone;
this.destroy$ = destroy$;
this.nzDisabled = false;
this.nzPercentage = null;
this.nzSize = 'default';
this.isCustomStatus = false;
this._status = 'wait';
this.oldAPIIcon = true;
this.direction = 'horizontal';
this.index = 0;
this.last = false;
this.outStatus = 'process';
this.showProcessDot = false;
this.clickable = false;
this.clickOutsideAngular$ = new Subject();
this.nullProcessFormat = () => null;
this._currentIndex = 0;
}
ngOnInit() {
this.ngZone.runOutsideAngular(() => fromEvent(this.itemContainer.nativeElement, 'click')
.pipe(filter(() => this.clickable && this.currentIndex !== this.index && !this.nzDisabled), takeUntil(this.destroy$))
.subscribe(() => {
this.clickOutsideAngular$.next(this.index);
}));
}
enable() {
this.nzDisabled = false;
this.cdr.markForCheck();
}
disable() {
this.nzDisabled = true;
this.cdr.markForCheck();
}
markForCheck() {
this.cdr.markForCheck();
}
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: NzStepComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1.NzDestroyService }], target: i0.ɵɵFactoryTarget.Component }); }
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: NzStepComponent, isStandalone: true, selector: "nz-step", inputs: { nzTitle: "nzTitle", nzSubtitle: "nzSubtitle", nzDescription: "nzDescription", nzDisabled: "nzDisabled", nzPercentage: "nzPercentage", nzSize: "nzSize", nzStatus: "nzStatus", nzIcon: "nzIcon" }, host: { properties: { "class.ant-steps-item-wait": "nzStatus === \"wait\"", "class.ant-steps-item-process": "nzStatus === \"process\"", "class.ant-steps-item-finish": "nzStatus === \"finish\"", "class.ant-steps-item-error": "nzStatus === \"error\"", "class.ant-steps-item-active": "currentIndex === index", "class.ant-steps-item-disabled": "nzDisabled", "class.ant-steps-item-custom": "!!nzIcon", "class.ant-steps-next-error": "(outStatus === \"error\") && (currentIndex === index + 1)" }, classAttribute: "ant-steps-item" }, providers: [NzDestroyService], viewQueries: [{ propertyName: "processDotTemplate", first: true, predicate: ["processDotTemplate"], descendants: true }, { propertyName: "itemContainer", first: true, predicate: ["itemContainer"], descendants: true, static: true }], exportAs: ["nzStep"], ngImport: i0, template: `
<div
#itemContainer
class="ant-steps-item-container"
[attr.role]="clickable && !nzDisabled ? 'button' : null"
[tabindex]="clickable && !nzDisabled ? 0 : null"
>
<div class="ant-steps-item-tail" *ngIf="last !== true"></div>
<div class="ant-steps-item-icon">
<ng-template [ngIf]="!showProcessDot">
<div *ngIf="showProgress" class="ant-steps-progress-icon">
<nz-progress
[nzPercent]="nzPercentage"
nzType="circle"
[nzWidth]="nzSize === 'small' ? 32 : 40"
[nzFormat]="nullProcessFormat"
[nzStrokeWidth]="4"
></nz-progress>
</div>
<span class="ant-steps-icon" *ngIf="nzStatus === 'finish' && !nzIcon"
><span nz-icon nzType="check"></span
></span>
<span class="ant-steps-icon" *ngIf="nzStatus === 'error'"><span nz-icon nzType="close"></span></span>
<span class="ant-steps-icon" *ngIf="(nzStatus === 'process' || nzStatus === 'wait') && !nzIcon">
{{ index + 1 }}
</span>
<span class="ant-steps-icon" *ngIf="nzIcon">
<ng-container *nzStringTemplateOutlet="nzIcon; let icon">
<span nz-icon [nzType]="!oldAPIIcon && icon" [ngClass]="oldAPIIcon && icon"></span>
</ng-container>
</span>
</ng-template>
<ng-template [ngIf]="showProcessDot">
<span class="ant-steps-icon">
<ng-template #processDotTemplate>
<span class="ant-steps-icon-dot"></span>
</ng-template>
<ng-template
[ngTemplateOutlet]="customProcessTemplate || processDotTemplate"
[ngTemplateOutletContext]="{
$implicit: processDotTemplate,
status: nzStatus,
index: index
}"
></ng-template>
</span>
</ng-template>
</div>
<div class="ant-steps-item-content">
<div class="ant-steps-item-title">
<ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>
<div *ngIf="nzSubtitle" class="ant-steps-item-subtitle">
<ng-container *nzStringTemplateOutlet="nzSubtitle">{{ nzSubtitle }}</ng-container>
</div>
</div>
<div class="ant-steps-item-description">
<ng-container *nzStringTemplateOutlet="nzDescription">{{ nzDescription }}</ng-container>
</div>
</div>
</div>
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: NzProgressModule }, { kind: "component", type: i2.NzProgressComponent, selector: "nz-progress", inputs: ["nzShowInfo", "nzWidth", "nzStrokeColor", "nzSize", "nzFormat", "nzSuccessPercent", "nzPercent", "nzStrokeWidth", "nzGapDegree", "nzStatus", "nzType", "nzGapPosition", "nzStrokeLinecap", "nzSteps"], exportAs: ["nzProgress"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzOutletModule }, { kind: "directive", type: i4.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
__decorate([
InputBoolean()
], NzStepComponent.prototype, "nzDisabled", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: NzStepComponent, decorators: [{
type: Component,
args: [{
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
selector: 'nz-step',
exportAs: 'nzStep',
preserveWhitespaces: false,
template: `
<div
#itemContainer
class="ant-steps-item-container"
[attr.role]="clickable && !nzDisabled ? 'button' : null"
[tabindex]="clickable && !nzDisabled ? 0 : null"
>
<div class="ant-steps-item-tail" *ngIf="last !== true"></div>
<div class="ant-steps-item-icon">
<ng-template [ngIf]="!showProcessDot">
<div *ngIf="showProgress" class="ant-steps-progress-icon">
<nz-progress
[nzPercent]="nzPercentage"
nzType="circle"
[nzWidth]="nzSize === 'small' ? 32 : 40"
[nzFormat]="nullProcessFormat"
[nzStrokeWidth]="4"
></nz-progress>
</div>
<span class="ant-steps-icon" *ngIf="nzStatus === 'finish' && !nzIcon"
><span nz-icon nzType="check"></span
></span>
<span class="ant-steps-icon" *ngIf="nzStatus === 'error'"><span nz-icon nzType="close"></span></span>
<span class="ant-steps-icon" *ngIf="(nzStatus === 'process' || nzStatus === 'wait') && !nzIcon">
{{ index + 1 }}
</span>
<span class="ant-steps-icon" *ngIf="nzIcon">
<ng-container *nzStringTemplateOutlet="nzIcon; let icon">
<span nz-icon [nzType]="!oldAPIIcon && icon" [ngClass]="oldAPIIcon && icon"></span>
</ng-container>
</span>
</ng-template>
<ng-template [ngIf]="showProcessDot">
<span class="ant-steps-icon">
<ng-template #processDotTemplate>
<span class="ant-steps-icon-dot"></span>
</ng-template>
<ng-template
[ngTemplateOutlet]="customProcessTemplate || processDotTemplate"
[ngTemplateOutletContext]="{
$implicit: processDotTemplate,
status: nzStatus,
index: index
}"
></ng-template>
</span>
</ng-template>
</div>
<div class="ant-steps-item-content">
<div class="ant-steps-item-title">
<ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>
<div *ngIf="nzSubtitle" class="ant-steps-item-subtitle">
<ng-container *nzStringTemplateOutlet="nzSubtitle">{{ nzSubtitle }}</ng-container>
</div>
</div>
<div class="ant-steps-item-description">
<ng-container *nzStringTemplateOutlet="nzDescription">{{ nzDescription }}</ng-container>
</div>
</div>
</div>
`,
host: {
class: 'ant-steps-item',
'[class.ant-steps-item-wait]': 'nzStatus === "wait"',
'[class.ant-steps-item-process]': 'nzStatus === "process"',
'[class.ant-steps-item-finish]': 'nzStatus === "finish"',
'[class.ant-steps-item-error]': 'nzStatus === "error"',
'[class.ant-steps-item-active]': 'currentIndex === index',
'[class.ant-steps-item-disabled]': 'nzDisabled',
'[class.ant-steps-item-custom]': '!!nzIcon',
'[class.ant-steps-next-error]': '(outStatus === "error") && (currentIndex === index + 1)'
},
providers: [NzDestroyService],
imports: [NgIf, NzProgressModule, NzIconModule, NzOutletModule, NgClass, NgTemplateOutlet],
standalone: true
}]
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1.NzDestroyService }], propDecorators: { processDotTemplate: [{
type: ViewChild,
args: ['processDotTemplate', { static: false }]
}], itemContainer: [{
type: ViewChild,
args: ['itemContainer', { static: true }]
}], nzTitle: [{
type: Input
}], nzSubtitle: [{
type: Input
}], nzDescription: [{
type: Input
}], nzDisabled: [{
type: Input
}], nzPercentage: [{
type: Input
}], nzSize: [{
type: Input
}], nzStatus: [{
type: Input
}], nzIcon: [{
type: Input
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RlcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9jb21wb25lbnRzL3N0ZXBzL3N0ZXAuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7O0dBR0c7QUFFSCxPQUFPLEVBQUUsT0FBTyxFQUFFLElBQUksRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ2xFLE9BQU8sRUFDTCx1QkFBdUIsRUFFdkIsU0FBUyxFQUVULEtBQUssRUFHTCxXQUFXLEVBQ1gsU0FBUyxFQUNULGlCQUFpQixFQUNsQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsU0FBUyxFQUFFLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMxQyxPQUFPLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRW5ELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsZ0JBQWdC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U3RhdHVzID09PSAnZmluaXNoJyAmJiAhbnpJY29uXCJcbiAgICAgICAgICAgID48c3BhbiBuei1pY29uIG56VHlwZT1cImNoZWNrXCI+PC9zcGFuXG4gICAgICAgICAgPjwvc3Bhbj5cbiAgICAgICAgICA8c3BhbiBjbGFzcz1cImFudC1zdGVwcy1pY29uXCIgKm5nSWY9XCJuelN0YXR1cyA9PT0gJ2Vycm9yJ1wiPjxzcGFuIG56LWljb24gbnpUeXBlPVwiY2xvc2VcIj48L3NwYW4+PC9zcGFuPlxuICAgICAgICAgIDxzcGFuIGNsYXNzPVwiYW50LXN0ZXBzLWljb25cIiAqbmdJZj1cIihuelN0YXR1cyA9PT0gJ3Byb2Nlc3MnIHx8IG56U3RhdHVzID09PSAnd2FpdCcpICYmICFuekljb25cIj5cbiAgICAgICAgICAgIHt7IGluZGV4ICsgMSB9fVxuICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICA8c3BhbiBjbGFzcz1cImFudC1zdGVwcy1pY29uXCIgKm5nSWY9XCJuekljb25cIj5cbiAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm56U3RyaW5nVGVtcGxhdGVPdXRsZXQ9XCJuekljb247IGxldCBpY29uXCI+XG4gICAgICAgICAgICAgIDxzcGFuIG56LWljb24gW256VHlwZV09XCIhb2xkQVBJSWNvbiAmJiBpY29uXCIgW25nQ2xhc3NdPVwib2xkQVBJSWNvbiAmJiBpY29uXCI+PC9zcGFuPlxuICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgPC9zcGFuPlxuICAgICAgICA8L25nLXRlbXBsYXRlPlxuICAgICAgICA8bmctdGVtcGxhdGUgW25nSWZdPVwic2hvd1Byb2Nlc3NEb3RcIj5cbiAgICAgICAgICA8c3BhbiBjbGFzcz1cImFudC1zdGVwcy1pY29uXCI+XG4gICAgICAgICAgICA8bmctdGVtcGxhdGUgI3Byb2Nlc3NEb3RUZW1wbGF0ZT5cbiAgICAgICAgICAgICAgPHNwY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