source: trip-planner-front/node_modules/primeng/fesm2020/primeng-card.mjs@ 1ad8e64

Last change on this file since 1ad8e64 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 7.0 KB
Line 
1import * as i0 from '@angular/core';
2import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChild, ContentChildren, NgModule } from '@angular/core';
3import * as i1 from '@angular/common';
4import { CommonModule } from '@angular/common';
5import { Header, Footer, PrimeTemplate, SharedModule } from 'primeng/api';
6
7class Card {
8 constructor(el) {
9 this.el = el;
10 }
11 ngAfterContentInit() {
12 this.templates.forEach((item) => {
13 switch (item.getType()) {
14 case 'header':
15 this.headerTemplate = item.template;
16 break;
17 case 'title':
18 this.titleTemplate = item.template;
19 break;
20 case 'subtitle':
21 this.subtitleTemplate = item.template;
22 break;
23 case 'content':
24 this.contentTemplate = item.template;
25 break;
26 case 'footer':
27 this.footerTemplate = item.template;
28 break;
29 default:
30 this.contentTemplate = item.template;
31 break;
32 }
33 });
34 }
35 getBlockableElement() {
36 return this.el.nativeElement.children[0];
37 }
38}
39Card.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Card, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
40Card.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: Card, selector: "p-card", inputs: { header: "header", subheader: "subheader", style: "style", styleClass: "styleClass" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "headerFacet", first: true, predicate: Header, descendants: true }, { propertyName: "footerFacet", first: true, predicate: Footer, descendants: true }, { propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: `
41 <div [ngClass]="'p-card p-component'" [ngStyle]="style" [class]="styleClass">
42 <div class="p-card-header" *ngIf="headerFacet || headerTemplate">
43 <ng-content select="p-header"></ng-content>
44 <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
45 </div>
46 <div class="p-card-body">
47 <div class="p-card-title" *ngIf="header || titleTemplate">
48 {{header}}
49 <ng-container *ngTemplateOutlet="titleTemplate"></ng-container>
50 </div>
51 <div class="p-card-subtitle" *ngIf="subheader || subtitleTemplate">
52 {{subheader}}
53 <ng-container *ngTemplateOutlet="subtitleTemplate"></ng-container>
54 </div>
55 <div class="p-card-content">
56 <ng-content></ng-content>
57 <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
58 </div>
59 <div class="p-card-footer" *ngIf="footerFacet || footerTemplate">
60 <ng-content select="p-footer"></ng-content>
61 <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
62 </div>
63 </div>
64 </div>
65 `, isInline: true, styles: [".p-card-header img{width:100%}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
66i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: Card, decorators: [{
67 type: Component,
68 args: [{ selector: 'p-card', template: `
69 <div [ngClass]="'p-card p-component'" [ngStyle]="style" [class]="styleClass">
70 <div class="p-card-header" *ngIf="headerFacet || headerTemplate">
71 <ng-content select="p-header"></ng-content>
72 <ng-container *ngTemplateOutlet="headerTemplate"></ng-container>
73 </div>
74 <div class="p-card-body">
75 <div class="p-card-title" *ngIf="header || titleTemplate">
76 {{header}}
77 <ng-container *ngTemplateOutlet="titleTemplate"></ng-container>
78 </div>
79 <div class="p-card-subtitle" *ngIf="subheader || subtitleTemplate">
80 {{subheader}}
81 <ng-container *ngTemplateOutlet="subtitleTemplate"></ng-container>
82 </div>
83 <div class="p-card-content">
84 <ng-content></ng-content>
85 <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
86 </div>
87 <div class="p-card-footer" *ngIf="footerFacet || footerTemplate">
88 <ng-content select="p-footer"></ng-content>
89 <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>
90 </div>
91 </div>
92 </div>
93 `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
94 'class': 'p-element'
95 }, styles: [".p-card-header img{width:100%}\n"] }]
96 }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { header: [{
97 type: Input
98 }], subheader: [{
99 type: Input
100 }], style: [{
101 type: Input
102 }], styleClass: [{
103 type: Input
104 }], headerFacet: [{
105 type: ContentChild,
106 args: [Header]
107 }], footerFacet: [{
108 type: ContentChild,
109 args: [Footer]
110 }], templates: [{
111 type: ContentChildren,
112 args: [PrimeTemplate]
113 }] } });
114class CardModule {
115}
116CardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
117CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: CardModule, declarations: [Card], imports: [CommonModule], exports: [Card, SharedModule] });
118CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: CardModule, imports: [[CommonModule], SharedModule] });
119i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: CardModule, decorators: [{
120 type: NgModule,
121 args: [{
122 imports: [CommonModule],
123 exports: [Card, SharedModule],
124 declarations: [Card]
125 }]
126 }] });
127
128/**
129 * Generated bundle index. Do not edit.
130 */
131
132export { Card, CardModule };
Note: See TracBrowser for help on using the repository browser.