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.59 kB
JavaScript
require('../../jqwidgets/jqxcore');
require('../../jqwidgets/jqxcheckbox');
!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/jqxcheckbox",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxcheckbox={}),t.ng.core,t.ng.forms)}(this,function(t,e,o){"use strict";function h(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,i,h=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=h.next()).done;)s.push(n.value)}catch(r){i={error:r}}finally{try{n&&!n.done&&(o=h["return"])&&o.call(h)}finally{if(i)throw i.error}}return s}var n=function(){},i={provide:o.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return s}),multi:!0},s=function(){function t(t){this.autoCreate=!0,this.properties=["animationShowDelay","animationHideDelay","boxSize","checked","disabled","enableContainerClick","groupName","height","hasThreeStates","locked","rtl","theme","width"],this.onTouchedCallback=n,this.onChangeCallback=n,this.onChecked=new e.EventEmitter,this.onChange=new e.EventEmitter,this.onIndeterminate=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.jqxCheckBox(this.properties[e]))),n)return!1;this.host.jqxCheckBox(this.properties[e],this[o]);continue}this[o]!==this.host.jqxCheckBox(this.properties[e])&&this.host.jqxCheckBox(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(h(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,"jqxCheckBox",t),t.checked!==undefined?this.onChangeCallback(t.checked):this.onChangeCallback(!1))},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.jqxCheckBox("setOptions",t)},t.prototype.animationShowDelay=function(t){if(t===undefined)return this.host.jqxCheckBox("animationShowDelay");this.host.jqxCheckBox("animationShowDelay",t)},t.prototype.animationHideDelay=function(t){if(t===undefined)return this.host.jqxCheckBox("animationHideDelay");this.host.jqxCheckBox("animationHideDelay",t)},t.prototype.boxSize=function(t){if(t===undefined)return this.host.jqxCheckBox("boxSize");this.host.jqxCheckBox("boxSize",t)},t.prototype.checked=function(t){if(t===undefined)return this.host.jqxCheckBox("checked");this.host.jqxCheckBox("checked",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxCheckBox("disabled");this.host.jqxCheckBox("disabled",t)},t.prototype.enableContainerClick=function(t){if(t===undefined)return this.host.jqxCheckBox("enableContainerClick");this.host.jqxCheckBox("enableContainerClick",t)},t.prototype.groupName=function(t){if(t===undefined)return this.host.jqxCheckBox("groupName");this.host.jqxCheckBox("groupName",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxCheckBox("height");this.host.jqxCheckBox("height",t)},t.prototype.hasThreeStates=function(t){if(t===undefined)return this.host.jqxCheckBox("hasThreeStates");this.host.jqxCheckBox("hasThreeStates",t)},t.prototype.locked=function(t){if(t===undefined)return this.host.jqxCheckBox("locked");this.host.jqxCheckBox("locked",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxCheckBox("rtl");this.host.jqxCheckBox("rtl",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxCheckBox("theme");this.host.jqxCheckBox("theme",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxCheckBox("width");this.host.jqxCheckBox("width",t)},t.prototype.check=function(){this.host.jqxCheckBox("check")},t.prototype.disable=function(){this.host.jqxCheckBox("disable")},t.prototype.destroy=function(){this.host.jqxCheckBox("destroy")},t.prototype.enable=function(){this.host.jqxCheckBox("enable")},t.prototype.focus=function(){this.host.jqxCheckBox("focus")},t.prototype.indeterminate=function(){this.host.jqxCheckBox("indeterminate")},t.prototype.render=function(){this.host.jqxCheckBox("render")},t.prototype.toggle=function(){this.host.jqxCheckBox("toggle")},t.prototype.uncheck=function(){this.host.jqxCheckBox("uncheck")},t.prototype.val=function(t){return t!==undefined?this.host.jqxCheckBox("val",t):this.host.jqxCheckBox("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("checked",function(t){e.onChecked.emit(t)}),this.host.on("change",function(t){e.onChange.emit(t),t.args&&e.onChangeCallback(t.args.checked)}),this.host.on("indeterminate",function(t){e.onIndeterminate.emit(t)}),this.host.on("unchecked",function(t){e.onUnchecked.emit(t)})},t.decorators=[{type:e.Component,args:[{selector:"jqxCheckBox",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"]}],attrLocked:[{type:e.Input,args:["locked"]}],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}],onIndeterminate:[{type:e.Output}],onUnchecked:[{type:e.Output}]},t}(),r=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[o.FormsModule],declarations:[s],exports:[s]}]}],t}();t.jqxCheckBoxComponent=s,t.jqxCheckBoxModule=r,Object.defineProperty(t,"__esModule",{value:!0})});