{"version":3,"sources":["../../src/app/components/splitbutton/splitbutton.ts"],"names":["SplitButton","this","iconPos","onClick","EventEmitter","onDropdownClick","showTransitionOptions","hideTransitionOptions","prototype","onDefaultButtonClick","event","emit","onDropdownButtonClick","menu","toggle","currentTarget","containerViewChild","nativeElement","relativeAlign","appendTo","Component","args","selector","template","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","Input","Output","ViewChild","NgModule","imports","CommonModule","ButtonModule","MenuModule","exports","declarations"],"mappings":"kiBAMA,SAAAA,IAoBaC,KAAAC,QAAkB,OAIjBD,KAAAE,QAA6B,IAAIC,EAAAA,aAEjCH,KAAAI,gBAAqC,IAAID,EAAAA,aAkB1CH,KAAAK,sBAAgC,kCAEhCL,KAAAM,sBAAgC,oBAQzCP,EAAAQ,UAAAC,qBAAA,SAAqBC,GACjBT,KAAKE,QAAQQ,KAAKD,IAGtBV,EAAAQ,UAAAI,sBAAA,SAAsBF,GAClBT,KAAKI,gBAAgBM,KAAKD,GAC1BT,KAAKY,KAAKC,OAAO,CAACC,cAAed,KAAKe,mBAAmBC,cAAeC,cAAgC,MAAjBjB,KAAKkB,qCA5DnGC,EAAAA,UAASC,KAAA,CAAC,CACPC,SAAU,gBACVC,SAAU,kyBAQVC,gBAAiBC,EAAAA,wBAAwBC,OACzCC,cAAeC,EAAAA,kBAAkBC,0bAKhCC,EAAAA,oBAEAA,EAAAA,uBAEAA,EAAAA,qBAEAA,EAAAA,uBAEAC,EAAAA,gCAEAA,EAAAA,sBAEAD,EAAAA,0BAEAA,EAAAA,yBAEAA,EAAAA,8BAEAA,EAAAA,wBAEAA,EAAAA,wBAEAA,EAAAA,wBAEAA,EAAAA,mBAEAA,EAAAA,qCAEAA,EAAAA,qCAEAA,EAAAA,kCAEAE,EAAAA,UAASX,KAAA,CAAC,sCAEVW,EAAAA,UAASX,KAAA,CAAC,4BAEVW,EAAAA,UAASX,KAAA,CAAC,iBAkBf,iCALCY,EAAAA,SAAQZ,KAAA,CAAC,CACNa,QAAS,CAACC,EAAAA,aAAaC,EAAAA,aAAaC,EAAAA,YACpCC,QAAS,CAACtC,EAAYoC,EAAAA,cACtBG,aAAc,CAACvC","sourcesContent":["import {NgModule,Component,ElementRef,Input,Output,EventEmitter,ViewChild,ChangeDetectionStrategy,ViewEncapsulation} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MenuItem} from 'primeng/api';\nimport {ButtonModule} from 'primeng/button';\nimport {MenuModule, Menu} from 'primeng/menu';\n\n@Component({\n selector: 'p-splitButton',\n template: `\n
\n \n \n \n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./splitbutton.css']\n})\nexport class SplitButton {\n\n @Input() model: MenuItem[];\n\n @Input() icon: string;\n\n @Input() iconPos: string = '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() 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: Menu;\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\n@NgModule({\n imports: [CommonModule,ButtonModule,MenuModule],\n exports: [SplitButton,ButtonModule],\n declarations: [SplitButton]\n})\nexport class SplitButtonModule { }\n"]}