ng-zorro-antd-yj
Version:
An enterprise-class UI components based on Ant Design and Angular
299 lines • 26.7 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import * as tslib_1 from "tslib";
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
import { InputNumber } from '../core/util';
import { isNotNil } from '../core/util/check';
var NzProgressComponent = /** @class */ (function () {
function NzProgressComponent() {
this.nzShowInfo = true;
this.nzWidth = 132;
this.nzType = 'line';
this.nzStrokeLinecap = 'round';
this.statusColorMap = {
normal: '#108ee9',
exception: '#ff5500',
success: '#87d068'
};
this.cachedStatus = 'normal';
this.inferredStatus = 'normal';
this.inferredStrokeWidth = 8;
}
Object.defineProperty(NzProgressComponent.prototype, "formatter", {
get: /**
* @return {?}
*/
function () {
return this.nzFormat || ((/**
* @param {?} p
* @return {?}
*/
function (p) { return p + "%"; }));
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "status", {
get: /**
* @return {?}
*/
function () {
return this.nzStatus || this.inferredStatus;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "strokeWidth", {
get: /**
* @return {?}
*/
function () {
return this.nzStrokeWidth || this.inferredStrokeWidth;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "isCircleStyle", {
get: /**
* @return {?}
*/
function () {
return this.nzType === 'circle' || this.nzType === 'dashboard';
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzProgressComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.updatePathStyles();
this.updateIcon();
};
/**
* @param {?} changes
* @return {?}
*/
NzProgressComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var nzGapPosition = changes.nzGapPosition, nzStrokeLinecap = changes.nzStrokeLinecap, nzGapDegree = changes.nzGapDegree, nzType = changes.nzType, nzSize = changes.nzSize, nzStatus = changes.nzStatus, nzPercent = changes.nzPercent, nzSuccessPercent = changes.nzSuccessPercent;
if (nzGapPosition || nzStrokeLinecap || nzGapDegree || nzType || nzPercent) {
this.updatePathStyles();
}
if (nzSize) {
if (this.nzSize === 'small') {
this.inferredStrokeWidth = 6;
}
}
if (nzStatus) {
this.cachedStatus = this.nzStatus || this.cachedStatus;
this.updateIcon();
}
if (nzPercent || nzSuccessPercent) {
/** @type {?} */
var fillAll = parseInt(this.nzPercent.toString(), 10) >= 100;
if (fillAll) {
if ((isNotNil(this.nzSuccessPercent) && (/** @type {?} */ (this.nzSuccessPercent)) >= 100) || this.nzSuccessPercent === undefined) {
this.inferredStatus = 'success';
}
}
else {
this.inferredStatus = this.cachedStatus;
}
this.updateIcon();
}
if (nzType) {
if (this.nzType !== 'line') {
this.inferredStrokeWidth = 6;
}
if (this.nzType === 'dashboard') {
this.inferredGapPosition = 'bottom';
this.inferredGapDegree = 75;
}
if (this.nzType === 'circle') {
this.inferredGapDegree = 0;
}
}
};
/**
* @return {?}
*/
NzProgressComponent.prototype.updatePathStyles = /**
* @return {?}
*/
function () {
/** @type {?} */
var radius = 50 - this.strokeWidth / 2;
/** @type {?} */
var gapPosition = this.nzGapPosition || this.inferredGapPosition;
/** @type {?} */
var beginPositionX = 0;
/** @type {?} */
var beginPositionY = -radius;
/** @type {?} */
var endPositionX = 0;
/** @type {?} */
var endPositionY = radius * -2;
switch (gapPosition) {
case 'left':
beginPositionX = -radius;
beginPositionY = 0;
endPositionX = radius * 2;
endPositionY = 0;
break;
case 'right':
beginPositionX = radius;
beginPositionY = 0;
endPositionX = radius * -2;
endPositionY = 0;
break;
case 'bottom':
beginPositionY = radius;
endPositionY = radius * 2;
break;
default:
}
this.pathString = "M 50,50 m " + beginPositionX + "," + beginPositionY + "\n a " + radius + "," + radius + " 0 1 1 " + endPositionX + "," + -endPositionY + "\n a " + radius + "," + radius + " 0 1 1 " + -endPositionX + "," + endPositionY;
/** @type {?} */
var len = Math.PI * 2 * radius;
/** @type {?} */
var gapDegree = this.nzGapDegree || this.inferredGapDegree;
this.trailPathStyle = {
strokeDasharray: len - gapDegree + "px " + len + "px",
strokeDashoffset: "-" + gapDegree / 2 + "px",
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s'
};
this.strokePathStyle = {
strokeDasharray: (this.nzPercent / 100) * (len - gapDegree) + "px " + len + "px",
strokeDashoffset: "-" + gapDegree / 2 + "px",
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s' // eslint-disable-line
};
};
/**
* @return {?}
*/
NzProgressComponent.prototype.updateIcon = /**
* @return {?}
*/
function () {
/** @type {?} */
var isCircle = this.nzType === 'circle' || this.nzType === 'dashboard';
/** @type {?} */
var ret = this.status === 'success' ? 'check' : this.status === 'exception' ? 'close' : '';
this.icon = ret ? ret + (isCircle ? '-o' : '-circle-fill') : '';
};
NzProgressComponent.decorators = [
{ type: Component, args: [{
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
selector: 'nz-progress',
preserveWhitespaces: false,
template: "<ng-template #progressInfoTemplate>\n <span class=\"ant-progress-text\" *ngIf=\"nzShowInfo\">\n <ng-container *ngIf=\"status === 'exception' || (status === 'success' && !nzFormat); else formatTemplate\">\n <i nz-icon [nzType]=\"icon\"></i>\n </ng-container>\n <ng-template #formatTemplate>\n {{ formatter(nzPercent) }}\n </ng-template>\n </span>\n</ng-template>\n<div\n [ngClass]=\"'ant-progress ant-progress-status-' + status\"\n [class.ant-progress-line]=\"nzType == 'line'\"\n [class.ant-progress-small]=\"nzSize == 'small'\"\n [class.ant-progress-show-info]=\"nzShowInfo\"\n [class.ant-progress-circle]=\"isCircleStyle\"\n>\n <!-- Line progress -->\n <div *ngIf=\"nzType === 'line'\">\n <div class=\"ant-progress-outer\">\n <div class=\"ant-progress-inner\">\n <div\n class=\"ant-progress-bg\"\n [style.width.%]=\"nzPercent\"\n [style.border-radius]=\"nzStrokeLinecap === 'round' ? '100px' : '0'\"\n [style.background]=\"nzStrokeColor\"\n [style.height.px]=\"strokeWidth\"\n ></div>\n <div\n class=\"ant-progress-success-bg\"\n [style.width.%]=\"nzSuccessPercent\"\n [style.border-radius]=\"nzStrokeLinecap === 'round' ? '100px' : '0'\"\n [style.height.px]=\"strokeWidth\"\n ></div>\n </div>\n </div>\n <ng-template [ngTemplateOutlet]=\"progressInfoTemplate\"></ng-template>\n </div>\n <!-- Circle/Dashboard progress -->\n <div\n [style.width.px]=\"this.nzWidth\"\n [style.height.px]=\"this.nzWidth\"\n [style.fontSize.px]=\"this.nzWidth * 0.15 + 6\"\n class=\"ant-progress-inner\"\n *ngIf=\"isCircleStyle\"\n >\n <svg class=\"ant-progress-circle \" viewBox=\"0 0 100 100\">\n <path\n class=\"ant-progress-circle-trail\"\n stroke=\"#f3f3f3\"\n fill-opacity=\"0\"\n [attr.stroke-width]=\"strokeWidth\"\n [ngStyle]=\"trailPathStyle\"\n [attr.d]=\"pathString\"\n ></path>\n <path\n class=\"ant-progress-circle-path\"\n [attr.d]=\"pathString\"\n [attr.stroke-linecap]=\"nzStrokeLinecap\"\n fill-opacity=\"0\"\n [attr.stroke]=\"nzStrokeColor || statusColorMap[status]\"\n [attr.stroke-width]=\"nzPercent ? strokeWidth : 0\"\n [ngStyle]=\"strokePathStyle\"\n ></path>\n </svg>\n <ng-template [ngTemplateOutlet]=\"progressInfoTemplate\"></ng-template>\n </div>\n</div>\n"
}] }
];
NzProgressComponent.propDecorators = {
nzShowInfo: [{ type: Input }],
nzWidth: [{ type: Input }],
nzStrokeColor: [{ type: Input }],
nzSize: [{ type: Input }],
nzFormat: [{ type: Input }],
nzSuccessPercent: [{ type: Input }],
nzPercent: [{ type: Input }],
nzStrokeWidth: [{ type: Input }],
nzGapDegree: [{ type: Input }],
nzStatus: [{ type: Input }],
nzType: [{ type: Input }],
nzGapPosition: [{ type: Input }],
nzStrokeLinecap: [{ type: Input }]
};
tslib_1.__decorate([
InputNumber(),
tslib_1.__metadata("design:type", Number)
], NzProgressComponent.prototype, "nzSuccessPercent", void 0);
tslib_1.__decorate([
InputNumber(),
tslib_1.__metadata("design:type", Number)
], NzProgressComponent.prototype, "nzPercent", void 0);
tslib_1.__decorate([
InputNumber(),
tslib_1.__metadata("design:type", Number)
], NzProgressComponent.prototype, "nzStrokeWidth", void 0);
tslib_1.__decorate([
InputNumber(),
tslib_1.__metadata("design:type", Number)
], NzProgressComponent.prototype, "nzGapDegree", void 0);
return NzProgressComponent;
}());
export { NzProgressComponent };
if (false) {
/** @type {?} */
NzProgressComponent.prototype.nzShowInfo;
/** @type {?} */
NzProgressComponent.prototype.nzWidth;
/** @type {?} */
NzProgressComponent.prototype.nzStrokeColor;
/** @type {?} */
NzProgressComponent.prototype.nzSize;
/** @type {?} */
NzProgressComponent.prototype.nzFormat;
/** @type {?} */
NzProgressComponent.prototype.nzSuccessPercent;
/** @type {?} */
NzProgressComponent.prototype.nzPercent;
/** @type {?} */
NzProgressComponent.prototype.nzStrokeWidth;
/** @type {?} */
NzProgressComponent.prototype.nzGapDegree;
/** @type {?} */
NzProgressComponent.prototype.nzStatus;
/** @type {?} */
NzProgressComponent.prototype.nzType;
/** @type {?} */
NzProgressComponent.prototype.nzGapPosition;
/** @type {?} */
NzProgressComponent.prototype.nzStrokeLinecap;
/** @type {?} */
NzProgressComponent.prototype.trailPathStyle;
/** @type {?} */
NzProgressComponent.prototype.strokePathStyle;
/** @type {?} */
NzProgressComponent.prototype.pathString;
/** @type {?} */
NzProgressComponent.prototype.icon;
/** @type {?} */
NzProgressComponent.prototype.statusColorMap;
/**
* @type {?}
* @private
*/
NzProgressComponent.prototype.cachedStatus;
/**
* @type {?}
* @private
*/
NzProgressComponent.prototype.inferredStatus;
/**
* @type {?}
* @private
*/
NzProgressComponent.prototype.inferredStrokeWidth;
/**
* @type {?}
* @private
*/
NzProgressComponent.prototype.inferredGapPosition;
/**
* @type {?}
* @private
*/
NzProgress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