ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
200 lines (190 loc) • 11.9 kB
JavaScript
import { __decorate, __metadata } from 'tslib';
import { CommonModule } from '@angular/common';
import { InputBoolean, NzAddOnModule } from 'ng-zorro-antd/core';
import { Directive, ElementRef, Renderer2, ChangeDetectionStrategy, Component, TemplateRef, ViewChild, ViewEncapsulation, ContentChild, Input, NgModule } from '@angular/core';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardGridDirective = /** @class */ (function () {
function NzCardGridDirective(elementRef, renderer) {
renderer.addClass(elementRef.nativeElement, 'ant-card-grid');
}
NzCardGridDirective.decorators = [
{ type: Directive, args: [{
selector: '[nz-card-grid]',
exportAs: 'nzCardGrid'
},] }
];
/** @nocollapse */
NzCardGridDirective.ctorParameters = function () { return [
{ type: ElementRef },
{ type: Renderer2 }
]; };
return NzCardGridDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardTabComponent = /** @class */ (function () {
function NzCardTabComponent() {
}
NzCardTabComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-card-tab',
exportAs: 'nzCardTab',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>"
}] }
];
NzCardTabComponent.propDecorators = {
template: [{ type: ViewChild, args: [TemplateRef,] }]
};
return NzCardTabComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardComponent = /** @class */ (function () {
function NzCardComponent(renderer, elementRef) {
this.nzBordered = true;
this.nzLoading = false;
this.nzHoverable = false;
this.nzActions = [];
renderer.addClass(elementRef.nativeElement, 'ant-card');
}
NzCardComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-card',
exportAs: 'nzCard',
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: "<div class=\"ant-card-head\" *ngIf=\"nzTitle || nzExtra || tab\">\n <div class=\"ant-card-head-wrapper\">\n <div class=\"ant-card-head-title\" *ngIf=\"nzTitle\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n <div class=\"ant-card-extra\" *ngIf=\"nzExtra\">\n <ng-container *nzStringTemplateOutlet=\"nzExtra\">{{ nzExtra }}</ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"tab\">\n <ng-template [ngTemplateOutlet]=\"tab.template\"></ng-template>\n </ng-container>\n</div>\n<div class=\"ant-card-cover\" *ngIf=\"nzCover\">\n <ng-template [ngTemplateOutlet]=\"nzCover\"></ng-template>\n</div>\n<div class=\"ant-card-body\" [ngStyle]=\"nzBodyStyle\">\n <ng-container *ngIf=\"!nzLoading\">\n <ng-content></ng-content>\n </ng-container>\n <nz-card-loading *ngIf=\"nzLoading\"></nz-card-loading>\n</div>\n<ul class=\"ant-card-actions\" *ngIf=\"nzActions.length\">\n <li *ngFor=\"let action of nzActions\" [style.width.%]=\"100 / nzActions.length\">\n <span><ng-template [ngTemplateOutlet]=\"action\"></ng-template></span>\n </li>\n</ul>",
host: {
'[class.ant-card-loading]': 'nzLoading',
'[class.ant-card-bordered]': 'nzBordered',
'[class.ant-card-hoverable]': 'nzHoverable',
'[class.ant-card-type-inner]': "nzType === 'inner'",
'[class.ant-card-contain-tabs]': '!!tab'
},
styles: ["\n nz-card {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzCardComponent.ctorParameters = function () { return [
{ type: Renderer2 },
{ type: ElementRef }
]; };
NzCardComponent.propDecorators = {
nzBordered: [{ type: Input }],
nzLoading: [{ type: Input }],
nzHoverable: [{ type: Input }],
nzBodyStyle: [{ type: Input }],
nzCover: [{ type: Input }],
nzActions: [{ type: Input }],
nzType: [{ type: Input }],
nzTitle: [{ type: Input }],
nzExtra: [{ type: Input }],
tab: [{ type: ContentChild, args: [NzCardTabComponent,] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCardComponent.prototype, "nzBordered", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCardComponent.prototype, "nzLoading", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCardComponent.prototype, "nzHoverable", void 0);
return NzCardComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardLoadingComponent = /** @class */ (function () {
function NzCardLoadingComponent(elementRef, renderer) {
renderer.addClass(elementRef.nativeElement, 'ant-card-loading-content');
}
NzCardLoadingComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-card-loading',
exportAs: 'nzCardLoading',
template: "<div class=\"ant-card-loading-content\">\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-22\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-8\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-15\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-6\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-18\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-13\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-9\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-4\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-3\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-16\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-8\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-6\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-8\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n</div>",
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
styles: ["\n nz-card-loading {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzCardLoadingComponent.ctorParameters = function () { return [
{ type: ElementRef },
{ type: Renderer2 }
]; };
return NzCardLoadingComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardMetaComponent = /** @class */ (function () {
function NzCardMetaComponent(elementRef, renderer) {
renderer.addClass(elementRef.nativeElement, 'ant-card-meta');
}
NzCardMetaComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-card-meta',
exportAs: 'nzCardMeta',
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
template: "<div class=\"ant-card-meta-avatar\" *ngIf=\"nzAvatar\">\n <ng-template [ngTemplateOutlet]=\"nzAvatar\"></ng-template>\n</div>\n<div class=\"ant-card-meta-detail\" *ngIf=\"nzTitle || nzDescription\">\n <div class=\"ant-card-meta-title\" *ngIf=\"nzTitle\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n <div class=\"ant-card-meta-description\" *ngIf=\"nzDescription\">\n <ng-container *nzStringTemplateOutlet=\"nzDescription\">{{ nzDescription }}</ng-container>\n </div>\n</div>",
styles: ["\n nz-card-meta {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzCardMetaComponent.ctorParameters = function () { return [
{ type: ElementRef },
{ type: Renderer2 }
]; };
NzCardMetaComponent.propDecorators = {
nzTitle: [{ type: Input }],
nzDescription: [{ type: Input }],
nzAvatar: [{ type: Input }]
};
return NzCardMetaComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardModule = /** @class */ (function () {
function NzCardModule() {
}
NzCardModule.decorators = [
{ type: NgModule, args: [{
imports: [CommonModule, NzAddOnModule],
declarations: [NzCardComponent, NzCardGridDirective, NzCardMetaComponent, NzCardLoadingComponent, NzCardTabComponent],
exports: [NzCardComponent, NzCardGridDirective, NzCardMetaComponent, NzCardLoadingComponent, NzCardTabComponent]
},] }
];
return NzCardModule;
}());
/**
* @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
*/
export { NzCardGridDirective, NzCardComponent, NzCardModule, NzCardLoadingComponent, NzCardMetaComponent, NzCardTabComponent };
//# sourceMappingURL=ng-zorro-antd-card.js.map