{"version":3,"file":"ng-zorro-antd-card.mjs","sources":["../../components/card/card-grid.directive.ts","../../components/card/card-tab.component.ts","../../components/card/card-loading.component.ts","../../components/card/card.component.ts","../../components/card/card-meta.component.ts","../../components/card/card.module.ts","../../components/card/public-api.ts","../../components/card/ng-zorro-antd-card.ts"],"sourcesContent":["/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, Input } from '@angular/core';\n\nimport { BooleanInput } from 'ng-zorro-antd/core/types';\nimport { InputBoolean } from 'ng-zorro-antd/core/util';\n\n@Directive({\n  selector: '[nz-card-grid]',\n  exportAs: 'nzCardGrid',\n  host: {\n    class: 'ant-card-grid',\n    '[class.ant-card-hoverable]': 'nzHoverable'\n  }\n})\nexport class NzCardGridDirective {\n  static ngAcceptInputType_nzHoverable: BooleanInput;\n  @Input() @InputBoolean() nzHoverable = true;\n\n  constructor() {}\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core';\n\n@Component({\n  selector: 'nz-card-tab',\n  exportAs: 'nzCardTab',\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  template: `\n    <ng-template>\n      <ng-content></ng-content>\n    </ng-template>\n  `\n})\nexport class NzCardTabComponent {\n  @ViewChild(TemplateRef, { static: true }) template!: TemplateRef<void>;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n  selector: 'nz-card-loading',\n  exportAs: 'nzCardLoading',\n  template: `\n    <div class=\"ant-card-loading-content\">\n      <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\" *ngFor=\"let listOfClassName of listOfLoading\">\n        <div\n          *ngFor=\"let className of listOfClassName\"\n          [ngClass]=\"className\"\n          style=\"padding-left: 4px; padding-right: 4px;\"\n        >\n          <div class=\"ant-card-loading-block\"></div>\n        </div>\n      </div>\n    </div>\n  `,\n  preserveWhitespaces: false,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  host: { class: 'ant-card-loading-content' }\n})\nexport class NzCardLoadingComponent {\n  listOfLoading: string[][] = [\n    ['ant-col-22'],\n    ['ant-col-8', 'ant-col-15'],\n    ['ant-col-6', 'ant-col-18'],\n    ['ant-col-13', 'ant-col-9'],\n    ['ant-col-4', 'ant-col-3', 'ant-col-16'],\n    ['ant-col-8', 'ant-col-6', 'ant-col-8']\n  ];\n  constructor() {}\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Direction, Directionality } from '@angular/cdk/bidi';\nimport {\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ContentChild,\n  ContentChildren,\n  Input,\n  OnDestroy,\n  OnInit,\n  Optional,\n  QueryList,\n  TemplateRef,\n  ViewEncapsulation\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { NzConfigKey, NzConfigService, WithConfig } from 'ng-zorro-antd/core/config';\nimport { BooleanInput, NgStyleInterface, NzSizeDSType } from 'ng-zorro-antd/core/types';\nimport { InputBoolean } from 'ng-zorro-antd/core/util';\n\nimport { NzCardGridDirective } from './card-grid.directive';\nimport { NzCardTabComponent } from './card-tab.component';\n\nconst NZ_CONFIG_MODULE_NAME: NzConfigKey = 'card';\n\n@Component({\n  selector: 'nz-card',\n  exportAs: 'nzCard',\n  preserveWhitespaces: false,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  template: `\n    <div class=\"ant-card-head\" *ngIf=\"nzTitle || nzExtra || listOfNzCardTabComponent\">\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=\"listOfNzCardTabComponent\">\n        <ng-template [ngTemplateOutlet]=\"listOfNzCardTabComponent.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; else loadingTemplate\">\n        <ng-content></ng-content>\n      </ng-container>\n      <ng-template #loadingTemplate>\n        <nz-card-loading></nz-card-loading>\n      </ng-template>\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>\n  `,\n  host: {\n    class: 'ant-card',\n    '[class.ant-card-loading]': 'nzLoading',\n    '[class.ant-card-bordered]': 'nzBorderless === false && nzBordered',\n    '[class.ant-card-hoverable]': 'nzHoverable',\n    '[class.ant-card-small]': 'nzSize === \"small\"',\n    '[class.ant-card-contain-grid]': 'listOfNzCardGridDirective && listOfNzCardGridDirective.length',\n    '[class.ant-card-type-inner]': 'nzType === \"inner\"',\n    '[class.ant-card-contain-tabs]': '!!listOfNzCardTabComponent',\n    '[class.ant-card-rtl]': `dir === 'rtl'`\n  }\n})\nexport class NzCardComponent implements OnDestroy, OnInit {\n  readonly _nzModuleName: NzConfigKey = NZ_CONFIG_MODULE_NAME;\n  static ngAcceptInputType_nzBordered: BooleanInput;\n  static ngAcceptInputType_nzBorderless: BooleanInput;\n  static ngAcceptInputType_nzLoading: BooleanInput;\n  static ngAcceptInputType_nzHoverable: BooleanInput;\n\n  @Input() @WithConfig() @InputBoolean() nzBordered: boolean = true;\n  @Input() @WithConfig() @InputBoolean() nzBorderless: boolean = false;\n  @Input() @InputBoolean() nzLoading = false;\n  @Input() @WithConfig() @InputBoolean() nzHoverable: boolean = false;\n  @Input() nzBodyStyle: NgStyleInterface | null = null;\n  @Input() nzCover?: TemplateRef<void>;\n  @Input() nzActions: Array<TemplateRef<void>> = [];\n  @Input() nzType: string | 'inner' | null = null;\n  @Input() @WithConfig() nzSize: NzSizeDSType = 'default';\n  @Input() nzTitle?: string | TemplateRef<void>;\n  @Input() nzExtra?: string | TemplateRef<void>;\n  @ContentChild(NzCardTabComponent, { static: false }) listOfNzCardTabComponent?: NzCardTabComponent;\n  @ContentChildren(NzCardGridDirective) listOfNzCardGridDirective!: QueryList<NzCardGridDirective>;\n  dir: Direction = 'ltr';\n\n  private destroy$ = new Subject();\n\n  constructor(\n    public nzConfigService: NzConfigService,\n    private cdr: ChangeDetectorRef,\n    @Optional() private directionality: Directionality\n  ) {\n    this.nzConfigService\n      .getConfigChangeEventForComponent(NZ_CONFIG_MODULE_NAME)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe(() => {\n        this.cdr.markForCheck();\n      });\n  }\n\n  ngOnInit(): void {\n    this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction: Direction) => {\n      this.dir = direction;\n      this.cdr.detectChanges();\n    });\n\n    this.dir = this.directionality.value;\n  }\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\n\n@Component({\n  selector: 'nz-card-meta',\n  exportAs: 'nzCardMeta',\n  preserveWhitespaces: false,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  template: `\n    <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>\n  `,\n  host: { class: 'ant-card-meta' }\n})\nexport class NzCardMetaComponent {\n  @Input() nzTitle: string | TemplateRef<void> | null = null;\n  @Input() nzDescription: string | TemplateRef<void> | null = null;\n  @Input() nzAvatar: TemplateRef<void> | null = null;\n\n  constructor() {}\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { BidiModule } from '@angular/cdk/bidi';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\nimport { NzCardGridDirective } from './card-grid.directive';\nimport { NzCardLoadingComponent } from './card-loading.component';\nimport { NzCardMetaComponent } from './card-meta.component';\nimport { NzCardTabComponent } from './card-tab.component';\nimport { NzCardComponent } from './card.component';\n\n@NgModule({\n  imports: [CommonModule, NzOutletModule],\n  declarations: [NzCardComponent, NzCardGridDirective, NzCardMetaComponent, NzCardLoadingComponent, NzCardTabComponent],\n  exports: [\n    BidiModule,\n    NzCardComponent,\n    NzCardGridDirective,\n    NzCardMetaComponent,\n    NzCardLoadingComponent,\n    NzCardTabComponent\n  ]\n})\nexport class NzCardModule {}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nexport * from './card-grid.directive';\nexport * from './card.component';\nexport * from './card.module';\nexport * from './card-loading.component';\nexport * from './card-meta.component';\nexport * from './card-tab.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAkBa,mBAAmB;IAI9B;QAFyB,gBAAW,GAAG,IAAI,CAAC;KAE5B;;gHAJL,mBAAmB;oGAAnB,mBAAmB;AAEL;IAAf,YAAY,EAAE;wDAAoB;2FAFjC,mBAAmB;kBAR/B,SAAS;mBAAC;oBACT,QAAQ,EAAE,gBAAgB;oBAC1B,QAAQ,EAAE,YAAY;oBACtB,IAAI,EAAE;wBACJ,KAAK,EAAE,eAAe;wBACtB,4BAA4B,EAAE,aAAa;qBAC5C;iBACF;0EAG0B,WAAW;sBAAnC,KAAK;;;ACpBR;;;;MAkBa,kBAAkB;;+GAAlB,kBAAkB;mGAAlB,kBAAkB,6FAClB,WAAW,uFAPZ;;;;GAIT;2FAEU,kBAAkB;kBAX9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,aAAa;oBACvB,QAAQ,EAAE,WAAW;oBACrB,aAAa,EAAE,iBAAiB,CAAC,IAAI;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE;;;;GAIT;iBACF;8BAE2C,QAAQ;sBAAjD,SAAS;uBAAC,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;ACnB1C;;;;MA4Ba,sBAAsB;IASjC;QARA,kBAAa,GAAe;YAC1B,CAAC,YAAY,CAAC;YACd,CAAC,WAAW,EAAE,YAAY,CAAC;YAC3B,CAAC,WAAW,EAAE,YAAY,CAAC;YAC3B,CAAC,YAAY,E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