UNPKG

jqwidgets-scripts-custom

Version:

jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.

4 lines (3 loc) 7.29 kB
require('../../jqwidgets/jqxcore'); require('../../jqwidgets/jqxradiobutton'); !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define("jqwidgets-ng/jqxradiobutton",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxradiobutton={}),t.ng.core,t.ng.forms)}(this,function(t,e,o){"use strict";function s(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,i,s=o.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(n=s.next()).done;)r.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(o=s["return"])&&o.call(s)}finally{if(i)throw i.error}}return r}var n=function(){},i={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return r}),multi:!0},r=function(){function t(t){this.autoCreate=!0,this.properties=["animationShowDelay","animationHideDelay","boxSize","checked","disabled","enableContainerClick","groupName","hasThreeStates","height","rtl","theme","width"],this.onTouchedCallback=n,this.onChangeCallback=n,this.onChecked=new e.EventEmitter,this.onChange=new e.EventEmitter,this.onUnchecked=new e.EventEmitter,this.elementRef=t}return t.prototype.ngOnInit=function(){this.autoCreate&&this.createComponent()},t.prototype.ngOnChanges=function(t){if(this.host)for(var e=0;e<this.properties.length;e++){var o="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),n=!1;if(this[o]!==undefined){if("object"==typeof this[o]){if(this[o]instanceof Array&&(n=this.arraysEqual(this[o],this.host.jqxRadioButton(this.properties[e]))),n)return!1;this.host.jqxRadioButton(this.properties[e],this[o]);continue}this[o]!==this.host.jqxRadioButton(this.properties[e])&&this.host.jqxRadioButton(this.properties[e],this[o])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var o="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[o]!==undefined&&(t[this.properties[e]]=this[o])}return t},t.prototype.moveClasses=function(t,e){var o,n=t.classList;0<n.length&&(o=e.classList).add.apply(o,function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}(n)),t.className=""},t.prototype.moveStyles=function(t,e){var o=t.style.cssText;e.style.cssText=o,t.style.cssText=""},t.prototype.createComponent=function(t){this.host||(t?JQXLite.extend(t,this.manageAttributes()):t=this.manageAttributes(),this.host=JQXLite(this.elementRef.nativeElement.firstChild),this.moveClasses(this.elementRef.nativeElement,this.host[0]),this.moveStyles(this.elementRef.nativeElement,this.host[0]),this.__wireEvents__(),this.widgetObject=jqwidgets.createInstance(this.host,"jqxRadioButton",t),this.valueAttr=this.host[0].parentElement.getAttribute("value"),!0===t.checked&&this.onChangeCallback(this.valueAttr))},t.prototype.createWidget=function(t){this.createComponent(t)},t.prototype.__updateRect__=function(){this.host&&this.host.css({width:this.attrWidth,height:this.attrHeight})},t.prototype.writeValue=function(t){this.widgetObject},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setOptions=function(t){this.host.jqxRadioButton("setOptions",t)},t.prototype.animationShowDelay=function(t){if(t===undefined)return this.host.jqxRadioButton("animationShowDelay");this.host.jqxRadioButton("animationShowDelay",t)},t.prototype.animationHideDelay=function(t){if(t===undefined)return this.host.jqxRadioButton("animationHideDelay");this.host.jqxRadioButton("animationHideDelay",t)},t.prototype.boxSize=function(t){if(t===undefined)return this.host.jqxRadioButton("boxSize");this.host.jqxRadioButton("boxSize",t)},t.prototype.checked=function(t){if(t===undefined)return this.host.jqxRadioButton("checked");this.host.jqxRadioButton("checked",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxRadioButton("disabled");this.host.jqxRadioButton("disabled",t)},t.prototype.enableContainerClick=function(t){if(t===undefined)return this.host.jqxRadioButton("enableContainerClick");this.host.jqxRadioButton("enableContainerClick",t)},t.prototype.groupName=function(t){if(t===undefined)return this.host.jqxRadioButton("groupName");this.host.jqxRadioButton("groupName",t)},t.prototype.hasThreeStates=function(t){if(t===undefined)return this.host.jqxRadioButton("hasThreeStates");this.host.jqxRadioButton("hasThreeStates",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxRadioButton("height");this.host.jqxRadioButton("height",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxRadioButton("rtl");this.host.jqxRadioButton("rtl",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxRadioButton("theme");this.host.jqxRadioButton("theme",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxRadioButton("width");this.host.jqxRadioButton("width",t)},t.prototype.check=function(){this.host.jqxRadioButton("check")},t.prototype.disable=function(){this.host.jqxRadioButton("disable")},t.prototype.destroy=function(){this.host.jqxRadioButton("destroy")},t.prototype.enable=function(){this.host.jqxRadioButton("enable")},t.prototype.focus=function(){this.host.jqxRadioButton("focus")},t.prototype.render=function(){this.host.jqxRadioButton("render")},t.prototype.uncheck=function(){this.host.jqxRadioButton("uncheck")},t.prototype.val=function(t){return t!==undefined?this.host.jqxRadioButton("val",t):this.host.jqxRadioButton("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("checked",function(t){e.onChecked.emit(t),e.onChangeCallback(e.valueAttr)}),this.host.on("change",function(t){e.onChange.emit(t)}),this.host.on("unchecked",function(t){e.onUnchecked.emit(t)})},t.decorators=[{type:e.Component,args:[{selector:"jqxRadioButton",template:"<div><ng-content></ng-content></div>",providers:[i],changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrAnimationShowDelay:[{type:e.Input,args:["animationShowDelay"]}],attrAnimationHideDelay:[{type:e.Input,args:["animationHideDelay"]}],attrBoxSize:[{type:e.Input,args:["boxSize"]}],attrChecked:[{type:e.Input,args:["checked"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrEnableContainerClick:[{type:e.Input,args:["enableContainerClick"]}],attrGroupName:[{type:e.Input,args:["groupName"]}],attrHasThreeStates:[{type:e.Input,args:["hasThreeStates"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrTheme:[{type:e.Input,args:["theme"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onChecked:[{type:e.Output}],onChange:[{type:e.Output}],onUnchecked:[{type:e.Output}]},t}(),a=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.FormsModule],declarations:[r],exports:[r]}]}],t}();t.jqxRadioButtonComponent=r,t.jqxRadioButtonModule=a,Object.defineProperty(t,"__esModule",{value:!0})});