{"version":3,"file":"primeng-panel.mjs","sources":["../../src/app/components/panel/panel.ts","../../src/app/components/panel/primeng-panel.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport { AfterContentInit, AfterViewInit, ChangeDetectionStrategy, Component, ContentChild, ContentChildren, ElementRef, EventEmitter, Input, NgModule, Output, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { BlockableUI, Footer, LicenseManager, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { MinusIcon } from 'primeng/icons/minus';\nimport { PlusIcon } from 'primeng/icons/plus';\nimport { RippleModule } from 'primeng/ripple';\n\ntype PanelIconPosition = 'start' | 'end' | 'center';\n\nlet idx: number = 0;\n\n@Component({\n selector: 'p-panel',\n template: `\n
\n
\n {{ header }}\n \n \n
\n \n \n \n \n \n \n \n\n \n \n \n \n \n\n \n \n
\n
\n \n
\n \n \n
\n\n
\n \n \n
\n
\n \n `,\n animations: [\n trigger('panelContent', [\n state(\n 'hidden',\n style({\n height: '0'\n })\n ),\n state(\n 'void',\n style({\n height: '{{height}}'\n }),\n { params: { height: '0' } }\n ),\n state(\n 'visible',\n style({\n height: '*'\n })\n ),\n transition('visible <=> hidden', [animate('{{transitionParams}}')]),\n transition('void => hidden', animate('{{transitionParams}}')),\n transition('void => visible', animate('{{transitionParams}}'))\n ])\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./panel.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Panel implements AfterContentInit, BlockableUI, AfterViewInit {\n @Input() toggleable: boolean;\n\n @Input() header: string;\n\n @Input() collapsed: boolean = false;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() iconPos: PanelIconPosition = 'end';\n\n @Input() expandIcon: string;\n\n @Input() collapseIcon: string;\n\n @Input() showHeader: boolean = true;\n\n @Input() toggler: string = 'icon';\n\n @Output() collapsedChange: EventEmitter = new EventEmitter();\n\n @Output() onBeforeToggle: EventEmitter = new EventEmitter();\n\n @Output() onAfterToggle: EventEmitter = new EventEmitter();\n\n @Input() transitionOptions: string = '400ms cubic-bezier(0.86, 0, 0.07, 1)';\n\n @ContentChild(Footer) footerFacet;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n public iconTemplate: TemplateRef;\n\n animating: boolean;\n\n headerTemplate: TemplateRef;\n\n contentTemplate: TemplateRef;\n\n footerTemplate: TemplateRef;\n\n headerIconTemplate: TemplateRef;\n\n id: string = `p-panel-${idx++}`;\n\n constructor(private el: ElementRef) {}\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'content':\n this.contentTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n case 'icons':\n this.iconTemplate = item.template;\n break;\n\n case 'headericons':\n this.headerIconTemplate = item.template;\n break;\n\n default:\n this.contentTemplate = item.template;\n break;\n }\n });\n }\n\n ngAfterViewInit() {\n LicenseManager.check();\n }\n\n onHeaderClick(event: Event) {\n if (this.toggler === 'header') {\n this.toggle(event);\n }\n }\n\n onIconClick(event: Event) {\n if (this.toggler === 'icon') {\n this.toggle(event);\n }\n }\n\n toggle(event: Event) {\n if (this.animating) {\n return false;\n }\n\n this.animating = true;\n this.onBeforeToggle.emit({ originalEvent: event, collapsed: this.collapsed });\n\n if (this.toggleable) {\n if (this.collapsed) this.expand(event);\n else this.collapse(event);\n }\n\n event.preventDefault();\n }\n\n expand(event) {\n this.collapsed = false;\n this.collapsedChange.emit(this.collapsed);\n }\n\n collapse(event) {\n this.collapsed = true;\n this.collapsedChange.emit(this.collapsed);\n }\n\n getBlockableElement(): HTMLElement {\n return this.el.nativeElement.children[0];\n }\n\n onToggleDone(event: Event) {\n this.animating = false;\n this.onAfterToggle.emit({ originalEvent: event, collapsed: this.collapsed });\n }\n}\n\n@NgModule({\n imports: [CommonModule, SharedModule, RippleModule, PlusIcon, MinusIcon],\n exports: [Panel, SharedModule],\n declarations: [Panel]\n})\nexport class PanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;AAUA,IAAI,GAAG,GAAW,CAAC,CAAC;MAmGP,KAAK,CAAA;AA+Cd,IAAA,WAAA,CAAoB,EAAc,EAAA;AAAd,QAAA,IAAE,CAAA,EAAA,GAAF,EAAE,CAAY;AA1CzB,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK,CAAC;AAM3B,QAAA,IAAO,CAAA,OAAA,GAAsB,KAAK,CAAC;AAMnC,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAE3B,QAAA,IAAO,CAAA,OAAA,GAAW,MAAM,CAAC;AAExB,QAAA,IAAA,CAAA,eAAe,GAAsB,IAAI,YAAY,EAAE,CAAC;AAExD,QAAA,IAAA,CAAA,cAAc,GAAsB,IAAI,YAAY,EAAE,CAAC;AAEvD,QAAA,IAAA,CAAA,aAAa,GAAsB,IAAI,YAAY,EAAE,CAAC;AAEvD,QAAA,IAAiB,CAAA,iBAAA,GAAW,sCAAsC,CAAC;AAkB5E,QAAA,IAAA,CAAA,EAAE,GAAW,WAAW,GAAG,EAAE,EAAE,CAAC;KAEM;IAEtC,kBAAkB,GAAA;QACd,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AAC5B,YAAA,QAAQ,IAAI,CAAC,OAAO,EAAE;AAClB,gBAAA,KAAK,QAAQ;AACT,oBAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC;oBACpC,MAAM;AAEV,gBAAA,KAAK,SAAS;AACV,oBAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC;oBACrC,MAAM;AAEV,gBAAA,KAAK,QAAQ;AACT,oBAAA,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC;oBACpC,MAAM;AAE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