{"version":3,"file":"primeng-inplace.mjs","sources":["../../src/app/components/inplace/inplace.ts","../../src/app/components/inplace/primeng-inplace.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, EventEmitter, Input, NgModule, Output, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { LicenseManager, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { ButtonModule } from 'primeng/button';\nimport { TimesIcon } from 'primeng/icons/times';\n\n@Component({\n selector: 'p-inplaceDisplay',\n template: '',\n host: {\n class: 'p-element'\n }\n})\nexport class InplaceDisplay {}\n\n@Component({\n selector: 'p-inplaceContent',\n template: '',\n host: {\n class: 'p-element'\n }\n})\nexport class InplaceContent {}\n\n@Component({\n selector: 'p-inplace',\n template: `\n
\n
\n \n \n
\n
\n \n \n\n \n \n \n \n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./inplace.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Inplace implements AfterContentInit, AfterViewInit {\n @Input() active: boolean;\n\n @Input() closable: boolean;\n\n @Input() disabled: boolean;\n\n @Input() preventClick: boolean;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() closeIcon: string;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n @Output() onActivate: EventEmitter = new EventEmitter();\n\n @Output() onDeactivate: EventEmitter = new EventEmitter();\n\n hover: boolean;\n\n displayTemplate: TemplateRef;\n\n contentTemplate: TemplateRef;\n\n closeIconTemplate: TemplateRef;\n\n constructor(public cd: ChangeDetectorRef) {}\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'display':\n this.displayTemplate = item.template;\n break;\n\n case 'closeicon':\n this.closeIconTemplate = item.template;\n break;\n\n case 'content':\n this.contentTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewInit() {\n LicenseManager.check();\n }\n\n onActivateClick(event) {\n if (!this.preventClick) this.activate(event);\n }\n\n onDeactivateClick(event) {\n if (!this.preventClick) this.deactivate(event);\n }\n\n activate(event?: Event) {\n if (!this.disabled) {\n this.active = true;\n this.onActivate.emit(event);\n this.cd.markForCheck();\n }\n }\n\n deactivate(event?: Event) {\n if (!this.disabled) {\n this.active = false;\n this.hover = false;\n this.onDeactivate.emit(event);\n this.cd.markForCheck();\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (event.which === 13) {\n this.activate(event);\n event.preventDefault();\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule, ButtonModule, SharedModule, TimesIcon],\n exports: [Inplace, InplaceDisplay, InplaceContent, ButtonModule, SharedModule],\n declarations: [Inplace, InplaceDisplay, InplaceContent]\n})\nexport class InplaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAaa,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,+FALb,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;2FAK5B,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,IAAI,EAAE;AACF,wBAAA,KAAK,EAAE,WAAW;AACrB,qBAAA;iBACJ,CAAA;;MAUY,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,E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