Icard/angular-clarity-master(work.../node_modules/primeng/fesm2022/primeng-card.mjs.map

1 line
8.4 KiB
Plaintext
Raw Normal View History

2024-07-16 15:23:22 +00:00
{"version":3,"file":"primeng-card.mjs","sources":["../../src/app/components/card/card.ts","../../src/app/components/card/primeng-card.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, ElementRef, Input, NgModule, QueryList, SimpleChange, TemplateRef, ViewEncapsulation, signal } from '@angular/core';\nimport { BlockableUI, Footer, Header, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { ObjectUtils } from 'primeng/utils';\n/**\n * Card is a flexible container component.\n * @group Components\n */\n@Component({\n selector: 'p-card',\n template: `\n <div [ngClass]=\"'p-card p-component'\" [ngStyle]=\"_style()\" [class]=\"styleClass\" [attr.data-pc-name]=\"'card'\">\n <div class=\"p-card-header\" *ngIf=\"headerFacet || headerTemplate\">\n <ng-content select=\"p-header\"></ng-content>\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </div>\n <div class=\"p-card-body\">\n <div class=\"p-card-title\" *ngIf=\"header || titleTemplate\">\n {{ header }}\n <ng-container *ngTemplateOutlet=\"titleTemplate\"></ng-container>\n </div>\n <div class=\"p-card-subtitle\" *ngIf=\"subheader || subtitleTemplate\">\n {{ subheader }}\n <ng-container *ngTemplateOutlet=\"subtitleTemplate\"></ng-container>\n </div>\n <div class=\"p-card-content\">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </div>\n <div class=\"p-card-footer\" *ngIf=\"footerFacet || footerTemplate\">\n <ng-content select=\"p-footer\"></ng-content>\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./card.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Card implements AfterContentInit, BlockableUI {\n /**\n * Header of the card.\n * @group Props\n */\n @Input() header: string | undefined;\n /**\n * Subheader of the card.\n * @group Props\n */\n @Input() subheader: string | undefined;\n /**\n * Inline style of the element.\n * @group Props\n */\n @Input() set style(value: { [klass: string]: any } | null | undefined) {\n if (!ObjectUtils.equals(this._style(), value)) {\n this._style.set(value);\n }\n }\n /**\n * Class of the element.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n\n @ContentChild(Header) headerFacet: TemplateRef<any> | undefined;\n\n @ContentChild(Footer) footerFacet: TemplateRef<any> | undefined;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n headerTemplate: TemplateRef<any> | undefined;\n\n titleTemplate: TemplateRef<any> | undefined;\n\n subtitleTemplate: TemplateRef<any> | undefined;\n\n contentTemplate: TemplateRef<any> | undefined;\n\n footerTemplate: TemplateRef<any> | undefined;\n\n _style = signal<{ [klass: string]: any } | null | undefined>(null);\n\n constructor(private el: ElementRef) {}\n\n ngAfterContentInit() {\n (this.templates as QueryList<PrimeTemplate>).forEach((item) => {\n switch (item.getType()) {\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'title':\n this.titleTemplate = item.template;\n break;\n\n case 'subtitle':\n this.subtitleTemplate = item.template;\n break;\n\n