{"version":3,"file":"primeng-chip.mjs","sources":["../../src/app/components/chip/chip.ts","../../src/app/components/chip/primeng-chip.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, AfterViewInit, ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, Input, NgModule, Output, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { LicenseManager, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { TimesCircleIcon } from 'primeng/icons/timescircle';\n\n@Component({\n selector: 'p-chip',\n template: `\n
\n \n \n \n
{{ label }}
\n \n \n \n \n \n \n \n \n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./chip.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Chip implements AfterContentInit, AfterViewInit {\n @Input() label: string;\n\n @Input() icon: string;\n\n @Input() image: string;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() removable: boolean;\n\n @Input() removeIcon: string;\n\n @Output() onRemove: EventEmitter = new EventEmitter();\n\n @Output() onImageError: EventEmitter = new EventEmitter();\n\n visible: boolean = true;\n\n removeIconTemplate: TemplateRef;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'removeicon':\n this.removeIconTemplate = item.template;\n break;\n\n default:\n this.removeIconTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewInit() {\n LicenseManager.check();\n }\n\n containerClass() {\n return {\n 'p-chip p-component': true,\n 'p-chip-image': this.image != null\n };\n }\n\n close(event) {\n this.visible = false;\n this.onRemove.emit(event);\n }\n\n imageError(event) {\n this.onImageError.emit(event);\n }\n}\n\n@NgModule({\n imports: [CommonModule, TimesCircleIcon, SharedModule],\n exports: [Chip, SharedModule],\n declarations: [Chip]\n})\nexport class ChipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";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