UNPKG

ng-zorro-antd

Version:

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

150 lines (139 loc) 6.59 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('ng-zorro-antd/core')) : typeof define === 'function' && define.amd ? define('ng-zorro-antd/divider', ['exports', '@angular/common', '@angular/core', 'ng-zorro-antd/core'], factory) : (factory((global['ng-zorro-antd'] = global['ng-zorro-antd'] || {}, global['ng-zorro-antd'].divider = {}),global.ng.common,global.ng.core,global['ng-zorro-antd'].core)); }(this, (function (exports,common,core,core$1) { 'use strict'; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var NzDividerComponent = /** @class */ (function () { function NzDividerComponent(elementRef, nzUpdateHostClassService) { this.elementRef = elementRef; this.nzUpdateHostClassService = nzUpdateHostClassService; this.nzType = 'horizontal'; this.nzOrientation = ''; this.nzDashed = false; } /** * @private * @return {?} */ NzDividerComponent.prototype.setClass = /** * @private * @return {?} */ function () { var _a; /** @type {?} */ var orientationPrefix = this.nzOrientation.length > 0 ? '-' + this.nzOrientation : this.nzOrientation; this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, (_a = {}, _a['ant-divider'] = true, _a["ant-divider-" + this.nzType] = true, _a["ant-divider-with-text" + orientationPrefix] = this.nzText, _a["ant-divider-dashed"] = this.nzDashed, _a)); }; /** * @return {?} */ NzDividerComponent.prototype.ngOnChanges = /** * @return {?} */ function () { this.setClass(); }; /** * @return {?} */ NzDividerComponent.prototype.ngOnInit = /** * @return {?} */ function () { this.setClass(); }; NzDividerComponent.decorators = [ { type: core.Component, args: [{ selector: 'nz-divider', exportAs: 'nzDivider', template: "<span *ngIf=\"nzText\" class=\"ant-divider-inner-text\">\n <ng-container *nzStringTemplateOutlet=\"nzText\">{{ nzText }}</ng-container>\n</span>", preserveWhitespaces: false, providers: [core$1.NzUpdateHostClassService], encapsulation: core.ViewEncapsulation.None, changeDetection: core.ChangeDetectionStrategy.OnPush }] } ]; /** @nocollapse */ NzDividerComponent.ctorParameters = function () { return [ { type: core.ElementRef }, { type: core$1.NzUpdateHostClassService } ]; }; NzDividerComponent.propDecorators = { nzText: [{ type: core.Input }], nzType: [{ type: core.Input }], nzOrientation: [{ type: core.Input }], nzDashed: [{ type: core.Input }] }; __decorate([ core$1.InputBoolean(), __metadata("design:type", Object) ], NzDividerComponent.prototype, "nzDashed", void 0); return NzDividerComponent; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var NzDividerModule = /** @class */ (function () { function NzDividerModule() { } NzDividerModule.decorators = [ { type: core.NgModule, args: [{ imports: [common.CommonModule, core$1.NzAddOnModule], declarations: [NzDividerComponent], exports: [NzDividerComponent] },] } ]; return NzDividerModule; }()); /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ exports.NzDividerComponent = NzDividerComponent; exports.NzDividerModule = NzDividerModule; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=ng-zorro-antd-divider.umd.js.map