{"version":3,"file":"primeng-splitbutton.mjs","sources":["../../src/app/components/splitbutton/splitbutton.ts","../../src/app/components/splitbutton/primeng-splitbutton.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, ContentChildren, ElementRef, EventEmitter, Input, NgModule, Output, QueryList, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { LicenseManager, MenuItem, PrimeTemplate } from 'primeng/api';\nimport { ButtonModule } from 'primeng/button';\nimport { ChevronDownIcon } from 'primeng/icons/chevrondown';\nimport { TieredMenu, TieredMenuModule } from 'primeng/tieredmenu';\n\ntype SplitButtonIconPosition = 'left' | 'right';\n\n@Component({\n selector: 'p-splitButton',\n template: `\n
\n \n \n \n \n \n \n \n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./splitbutton.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class SplitButton implements AfterViewInit {\n @Input() model: MenuItem[];\n\n @Input() icon: string;\n\n @Input() iconPos: SplitButtonIconPosition = 'left';\n\n @Input() label: string;\n\n @Output() onClick: EventEmitter = new EventEmitter();\n\n @Output() onDropdownClick: EventEmitter = new EventEmitter();\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() menuStyle: any;\n\n @Input() menuStyleClass: string;\n\n @Input() disabled: boolean;\n\n @Input() tabindex: number;\n\n @Input() appendTo: any;\n\n @Input() dir: string;\n\n @Input() expandAriaLabel: string;\n\n @Input() showTransitionOptions: string = '.12s cubic-bezier(0, 0, 0.2, 1)';\n\n @Input() hideTransitionOptions: string = '.1s linear';\n\n @ViewChild('container') containerViewChild: ElementRef;\n\n @ViewChild('defaultbtn') buttonViewChild: ElementRef;\n\n @ViewChild('menu') menu: TieredMenu;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n contentTemplate: TemplateRef;\n\n dropdownIconTemplate: TemplateRef;\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch (item.getType()) {\n case 'content':\n this.contentTemplate = item.template;\n break;\n\n case 'dropdownicon':\n this.dropdownIconTemplate = 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 onDefaultButtonClick(event: Event) {\n this.onClick.emit(event);\n }\n\n onDropdownButtonClick(event: Event) {\n this.onDropdownClick.emit(event);\n this.menu.toggle({ currentTarget: this.containerViewChild.nativeElement, relativeAlign: this.appendTo == null });\n }\n}\n\n@NgModule({\n imports: [CommonModule, ButtonModule, TieredMenuModule, ChevronDownIcon],\n exports: [SplitButton, ButtonModule, TieredMenuModule],\n declarations: [SplitButton]\n})\nexport class SplitButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAmCa,WAAW,CAAA;AA1BxB,IAAA,WAAA,GAAA;AA+Ba,QAAA,IAAO,CAAA,OAAA,GAA4B,MAAM,CAAC;AAIzC,QAAA,IAAA,CAAA,OAAO,GAAsB,IAAI,YAAY,EAAE,CAAC;AAEhD,QAAA,IAAA,CAAA,eAAe,GAAsB,IAAI,YAAY,EAAE,CAAC;AAoBzD,QAAA,IAAqB,CAAA,qBAAA,GAAW,iCAAiC,CAAC;AAElE,QAAA,IAAqB,CAAA,qBAAA,GAAW,YAAY,CAAC;KA4CzD;IA9BG,kBAAkB,GAAA;QACd,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AAC5B,YAAA,QAAQ,IAAI,CAAC,OAAO,EAAE;AAClB,gBAAA,KAAK,SAAS;AACV,oBAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC;oBACrC,MAAM;AAEV,gBAAA,KAAK,cAAc;AACf,oBAAA,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,QAAQ,CAAC;oBAC1C,MAAM;AAEV,gBAAA;AACI,oBAAA,IAAI,CA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