{ "version": 3, "sources": ["src/app/shared/components/card-block/card-block.component.ts", "src/app/shared/components/card-block/card-block.component.html"], "sourcesContent": ["import { Component, OnInit, Input, ViewEncapsulation, ChangeDetectionStrategy, TemplateRef, Output, EventEmitter } from '@angular/core';\r\nimport { slideInOut } from '@shared/animations/slide-in-out';\r\nimport { CldSourceMediaSize } from '../cld-picture/cld-picture.interface';\r\nimport { UsersService } from '@shared/services/users/users.service';\r\nimport { UserInfo } from 'app/shared/services/users/types/user-info';\r\nimport { Observable } from 'rxjs';\r\nimport { UserRolesEnum } from '@collections/users/enums/user-roles.enums';\r\nimport { Platform } from '@angular/cdk/platform';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { MatIcon } from '@angular/material/icon';\r\nimport { RenderIfDirective } from '../../directives/render-if.directive';\r\nimport { RouterLink } from '@angular/router';\r\nimport { CldPictureComponent } from '../cld-picture/cld-picture.component';\r\nimport { NgClass } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'card-block',\r\n templateUrl: './card-block.component.html',\r\n styleUrls: ['./card-block.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [slideInOut],\r\n standalone: true,\r\n imports: [CldPictureComponent, RouterLink, RenderIfDirective, MatIcon, NgTemplateOutlet, NgClass]\r\n})\r\nexport class CardBlockComponent implements OnInit {\r\n hovered = false;\r\n @Input() id: string;\r\n @Input() image: string;\r\n @Input() imageSizes: CldSourceMediaSize[];\r\n @Input() lazyLoadImage: boolean;\r\n @Input() type: string;\r\n @Input() title: string;\r\n @Input() url: string;\r\n @Input() text: string;\r\n @Input() views = 0;\r\n @Input() isAccessibleForFree: boolean;\r\n @Input() itemIndex = 0;\r\n @Input() footerTpl: TemplateRef;\r\n @Input() fallbackImage: string;\r\n @Input() state: any;\r\n @Input() seeAll: boolean;\r\n @Output() onItemSelected: EventEmitter = new EventEmitter();\r\n user$: Observable;\r\n UserRolesEnum = UserRolesEnum;\r\n\r\n constructor(\r\n private usersService: UsersService,\r\n private platform: Platform\r\n )\r\n { }\r\n\r\n ngOnInit(): void {\r\n // da valutare\r\n // if(!this.platform.isBrowser) {\r\n this.lazyLoadImage = true;\r\n // }\r\n\r\n this.user$ = this.usersService.onUserChange\r\n\r\n }\r\n\r\n itemSelected(): void {\r\n this.onItemSelected.emit();\r\n }\r\n\r\n}\r\n", "@if (seeAll){\r\n
\r\n
\r\n {{title}}\r\n
\r\n \r\n \r\n
\r\n}\r\n@else {\r\n
\r\n
\r\n \r\n \r\n \r\n @if (hovered) {\r\n
\r\n {{text}}\r\n
\r\n } \r\n
\r\n {{views}}\r\n \r\n @if ( isAccessibleForFree !== undefined) {\r\n {{ isAccessibleForFree ? 'Free access' : 'Login needed' }}\r\n }\r\n
\r\n\r\n
\r\n \r\n
\r\n {{title}}\r\n
\r\n \r\n\r\n \r\n
\r\n}"], "mappings": "6qBCMEA,EAAA,CAAA,oCALFC,EAAA,EAAA,MAAA,CAAA,EACEC,EAAA,aAAA,UAAA,CAAAC,EAAAC,CAAA,EAAA,IAAAC,EAAAC,EAAA,EAAA,OAAAC,EAAAF,EAAAG,QAAwB,EAAI,CAAA,CAAA,EAAC,aAAA,UAAA,CAAAL,EAAAC,CAAA,EAAA,IAAAC,EAAAC,EAAA,EAAA,OAAAC,EAAAF,EAAAG,QAAyB,EAAK,CAAA,CAAA,EAC3DP,EAAA,EAAA,MAAA,CAAA,EAAkF,EAAA,IAAA,CAAA,EAC1CC,EAAA,QAAA,UAAA,CAAAC,EAAAC,CAAA,EAAA,IAAAC,EAAAC,EAAA,EAAA,OAAAC,EAASF,EAAAI,aAAA,CAAc,CAAA,CAAA,EAAyEC,EAAA,CAAA,EAASC,EAAA,EAAI,EAErJC,EAAA,EAAAC,EAAA,EAAA,EAAA,eAAA,CAAA,EACAC,EAAA,CAAA,EACFH,EAAA,oBAJOI,EAAA,CAAA,EAAAC,EAAA,aAAAX,EAAAY,GAAA,EAAkB,QAAAZ,EAAAa,KAAA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\u0275\u0275elementStart", "\u0275\u0275listener", "\u0275\u0275restoreView", "_r1", "ctx_r1", "\u0275\u0275nextContext", "\u0275\u0275resetView", "hovered", "itemSelected", "\u0275\u0275text", "\u0275\u0275elementEnd", "\u0275\u0275template", "CardBlockComponent_Conditional_0_ng_container_4_Template", "\u0275\u0275projection", "\u0275\u0275advance", "\u0275\u0275property", "url", "state", "\u0275\u0275textInterpolate", "title", "footerTpl", "_r4", "undefined", "text", "isAccessibleForFree", "\u0275\u0275element", "CardBlockComponent_Conditional_1_div_4_Conditional_4_Template", "views", "\u0275\u0275conditional", "_r3", "CardBlockComponent_Conditional_1_Conditional_3_Template", "CardBlockComponent_Conditional_1_div_4_Template", "CardBlockComponent_Conditional_1_ng_container_8_Template", "\u0275\u0275pureFunction1", "_c1", "type", "image", "fallbackImage", "imageSizes", "lazyLoadImage", "_c3", "_c2", "UserRolesEnum", "admin", "_c4", "CardBlockComponent", "constructor", "usersService", "platform", "itemIndex", "onItemSelected", "EventEmitter", "ngOnInit", "user$", "onUserChange", "emit", "\u0275\u0275directiveInject", "UsersService", "Platform", "selectors", "inputs", "id", "seeAll", "outputs", "standalone", "features", "\u0275\u0275StandaloneFeature", "ngContentSelectors", "_c0", "decls", "vars", "consts", "template", "rf", "ctx", "CardBlockComponent_Conditional_0_Template", "CardBlockComponent_Conditional_1_Template", "CldPictureComponent", "RouterLink", "RenderIfDirective", "MatIcon", "NgTemplateOutlet", "NgClass", "encapsulation", "data", "animation", "slideInOut", "changeDetection", "_CardBlockComponent"] }