2 lines
3.8 KiB
JavaScript
2 lines
3.8 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms")):"function"==typeof define&&define.amd?define("primeng/radiobutton",["exports","@angular/core","@angular/common","@angular/forms"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.radiobutton={}),e.ng.core,e.ng.common,e.ng.forms)}(this,(function(e,t,n,o){"use strict";var i={provide:o.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return a})),multi:!0},a=function(){function e(e){this.cd=e,this.onClick=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onModelChange=function(){},this.onModelTouched=function(){}}return e.prototype.handleClick=function(e,t,n){e.preventDefault(),this.disabled||(this.select(e),n&&t.focus())},e.prototype.select=function(e){this.disabled||(this.inputViewChild.nativeElement.checked=!0,this.checked=!0,this.onModelChange(this.value),this.onClick.emit(e))},e.prototype.writeValue=function(e){this.checked=e==this.value,this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.checked=this.checked),this.cd.markForCheck()},e.prototype.registerOnChange=function(e){this.onModelChange=e},e.prototype.registerOnTouched=function(e){this.onModelTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e,this.cd.markForCheck()},e.prototype.onInputFocus=function(e){this.focused=!0,this.onFocus.emit(e)},e.prototype.onInputBlur=function(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)},e.prototype.onChange=function(e){this.select(e)},e.prototype.focus=function(){this.inputViewChild.nativeElement.focus()},e}();a.decorators=[{type:t.Component,args:[{selector:"p-radioButton",template:'\n <div [ngStyle]="style" [ngClass]="{\'p-radiobutton p-component\':true,\'p-radiobutton-checked\': checked, \'p-radiobutton-disabled\': disabled, \'p-radiobutton-focused\': focused}" [class]="styleClass">\n <div class="p-hidden-accessible">\n <input #rb type="radio" [attr.id]="inputId" [attr.name]="name" [attr.value]="value" [attr.tabindex]="tabindex" [attr.aria-labelledby]="ariaLabelledBy"\n [checked]="checked" (change)="onChange($event)" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" [disabled]="disabled">\n </div>\n <div (click)="handleClick($event, rb, true)" role="radio" [attr.aria-checked]="checked"\n [ngClass]="{\'p-radiobutton-box\':true,\n \'p-highlight\': checked, \'p-disabled\': disabled, \'p-focus\': focused}">\n <span class="p-radiobutton-icon"></span>\n </div>\n </div>\n <label (click)="select($event)" [class]="labelStyleClass"\n [ngClass]="{\'p-radiobutton-label\':true, \'p-radiobutton-label-active\':rb.checked, \'p-disabled\':disabled, \'p-radiobutton-label-focus\':focused}"\n *ngIf="label" [attr.for]="inputId">{{label}}</label>\n ',providers:[i],changeDetection:t.ChangeDetectionStrategy.OnPush}]}],a.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},a.propDecorators={value:[{type:t.Input}],name:[{type:t.Input}],disabled:[{type:t.Input}],label:[{type:t.Input}],tabindex:[{type:t.Input}],inputId:[{type:t.Input}],ariaLabelledBy:[{type:t.Input}],style:[{type:t.Input}],styleClass:[{type:t.Input}],labelStyleClass:[{type:t.Input}],onClick:[{type:t.Output}],onFocus:[{type:t.Output}],onBlur:[{type:t.Output}],inputViewChild:[{type:t.ViewChild,args:["rb"]}]};var s=function(){};s.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],exports:[a],declarations:[a]}]}],e.RADIO_VALUE_ACCESSOR=i,e.RadioButton=a,e.RadioButtonModule=s,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
//# sourceMappingURL=primeng-radiobutton.umd.min.js.map
|