UNPKG

ng-zorro-antd-yj

Version:

An enterprise-class UI components based on Ant Design and Angular

103 lines 7.86 kB
/** * @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 { InputBoolean, InputNumber } from '../core/util/convert'; /** * @record */ export function NzSliderTrackStyle() { } if (false) { /** @type {?|undefined} */ NzSliderTrackStyle.prototype.bottom; /** @type {?|undefined} */ NzSliderTrackStyle.prototype.height; /** @type {?|undefined} */ NzSliderTrackStyle.prototype.left; /** @type {?|undefined} */ NzSliderTrackStyle.prototype.width; /** @type {?|undefined} */ NzSliderTrackStyle.prototype.visibility; } var NzSliderTrackComponent = /** @class */ (function () { function NzSliderTrackComponent() { this.nzVertical = false; this.nzIncluded = false; this.style = {}; } /** * @param {?} changes * @return {?} */ NzSliderTrackComponent.prototype.ngOnChanges = /** * @param {?} changes * @return {?} */ function (changes) { if (changes.nzIncluded) { this.style.visibility = this.nzIncluded ? 'visible' : 'hidden'; } if (changes.nzVertical || changes.nzOffset || changes.nzLength) { if (this.nzVertical) { this.style.bottom = this.nzOffset + "%"; this.style.height = this.nzLength + "%"; this.style.left = null; this.style.width = null; } else { this.style.left = this.nzOffset + "%"; this.style.width = this.nzLength + "%"; this.style.bottom = null; this.style.height = null; } } }; NzSliderTrackComponent.decorators = [ { type: Component, args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'nz-slider-track', preserveWhitespaces: false, template: "<div class=\"ant-slider-track\" [ngStyle]=\"style\"></div>" }] } ]; NzSliderTrackComponent.propDecorators = { nzOffset: [{ type: Input }], nzLength: [{ type: Input }], nzVertical: [{ type: Input }], nzIncluded: [{ type: Input }] }; tslib_1.__decorate([ InputNumber(), tslib_1.__metadata("design:type", Number) ], NzSliderTrackComponent.prototype, "nzOffset", void 0); tslib_1.__decorate([ InputNumber(), tslib_1.__metadata("design:type", Number) ], NzSliderTrackComponent.prototype, "nzLength", void 0); tslib_1.__decorate([ InputBoolean(), tslib_1.__metadata("design:type", Object) ], NzSliderTrackComponent.prototype, "nzVertical", void 0); tslib_1.__decorate([ InputBoolean(), tslib_1.__metadata("design:type", Object) ], NzSliderTrackComponent.prototype, "nzIncluded", void 0); return NzSliderTrackComponent; }()); export { NzSliderTrackComponent }; if (false) { /** @type {?} */ NzSliderTrackComponent.prototype.nzOffset; /** @type {?} */ NzSliderTrackComponent.prototype.nzLength; /** @type {?} */ NzSliderTrackComponent.prototype.nzVertical; /** @type {?} */ NzSliderTrackComponent.prototype.nzIncluded; /** @type {?} */ NzSliderTrackComponent.prototype.style; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnotc2xpZGVyLXRyYWNrLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLXpvcnJvLWFudGQteWovIiwic291cmNlcyI6WyJzbGlkZXIvbnotc2xpZGVyLXRyYWNrLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUE0QixpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV2SCxPQUFPLEVBQUUsWUFBWSxFQUFFLFdBQVcsRUFBRSxNQUFNLHNCQUFzQixDQUFDOzs7O0FBRWpFLHdDQU1DOzs7SUFMQyxvQ0FBdUI7O0lBQ3ZCLG9DQUF1Qjs7SUFDdkIsa0NBQXFCOztJQUNyQixtQ0FBc0I7O0lBQ3RCLHdDQUFvQjs7QUFHdEI7SUFBQTtRQVUyQixlQUFVLEdBQUcsS0FBSyxDQUFDO1FBQ25CLGVBQVUsR0FBRyxLQUFLLENBQUM7UUFFNUMsVUFBSyxHQUF1QixFQUFFLENBQUM7SUFvQmpDLENBQUM7Ozs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