jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
5 lines (4 loc) • 7.25 kB
JavaScript
require('../../jqwidgets/jqxcore');
require('../../jqwidgets/jqxbuttons');
require('../../jqwidgets/jqxcomplexinput');
!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/jqxcomplexinput",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxcomplexinput={}),t.ng.core,t.ng.forms)}(this,function(t,e,n){"use strict";function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,s=n.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(o=s.next()).done;)r.push(o.value)}catch(p){i={error:p}}finally{try{o&&!o.done&&(n=s["return"])&&n.call(s)}finally{if(i)throw i.error}}return r}var o=function(){},i={provide:n.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return r}),multi:!0},r=function(){function t(t){this.autoCreate=!0,this.properties=["decimalNotation","disabled","height","placeHolder","roundedCorners","rtl","spinButtons","spinButtonsStep","template","theme","value","width"],this.onTouchedCallback=o,this.onChangeCallback=o,this.onChange=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 n="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1),o=!1;if(this[n]!==undefined){if("object"==typeof this[n]){if(this[n]instanceof Array&&(o=this.arraysEqual(this[n],this.host.jqxComplexInput(this.properties[e]))),o)return!1;this.host.jqxComplexInput(this.properties[e],this[n]);continue}this[n]!==this.host.jqxComplexInput(this.properties[e])&&this.host.jqxComplexInput(this.properties[e],this[n])}}},t.prototype.arraysEqual=function(t,e){if(t&&!e||!t&&e)return!1;if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},t.prototype.manageAttributes=function(){for(var t={},e=0;e<this.properties.length;e++){var n="attr"+this.properties[e].substring(0,1).toUpperCase()+this.properties[e].substring(1);this[n]!==undefined&&(t[this.properties[e]]=this[n])}return t},t.prototype.moveClasses=function(t,e){var n,o=t.classList;0<o.length&&(n=e.classList).add.apply(n,function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}(o)),t.className=""},t.prototype.moveStyles=function(t,e){var n=t.style.cssText;e.style.cssText=n,t.style.cssText=""},t.prototype.createComponent=function(t){var e=this;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,"jqxComplexInput",t),setTimeout(function(t){e.host.jqxComplexInput({value:"JQXLite{options.value}"})}))},t.prototype.createWidget=function(t){this.createComponent(t)},t.prototype.__updateRect__=function(){this.host&&this.host.css({width:this.attrWidth,height:this.attrHeight})},Object.defineProperty(t.prototype,"ngValue",{get:function(){return this.widgetObject?this.host.val():""},set:function(t){this.widgetObject&&this.onChangeCallback(t)},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.widgetObject&&(this.onChangeCallback(this.host.val()),this.host.jqxComplexInput("val",t))},t.prototype.registerOnChange=function(t){this.onChangeCallback=t},t.prototype.registerOnTouched=function(t){this.onTouchedCallback=t},t.prototype.setOptions=function(t){this.host.jqxComplexInput("setOptions",t)},t.prototype.decimalNotation=function(t){if(t===undefined)return this.host.jqxComplexInput("decimalNotation");this.host.jqxComplexInput("decimalNotation",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxComplexInput("disabled");this.host.jqxComplexInput("disabled",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxComplexInput("height");this.host.jqxComplexInput("height",t)},t.prototype.placeHolder=function(t){if(t===undefined)return this.host.jqxComplexInput("placeHolder");this.host.jqxComplexInput("placeHolder",t)},t.prototype.roundedCorners=function(t){if(t===undefined)return this.host.jqxComplexInput("roundedCorners");this.host.jqxComplexInput("roundedCorners",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxComplexInput("rtl");this.host.jqxComplexInput("rtl",t)},t.prototype.spinButtons=function(t){if(t===undefined)return this.host.jqxComplexInput("spinButtons");this.host.jqxComplexInput("spinButtons",t)},t.prototype.spinButtonsStep=function(t){if(t===undefined)return this.host.jqxComplexInput("spinButtonsStep");this.host.jqxComplexInput("spinButtonsStep",t)},t.prototype.template=function(t){if(t===undefined)return this.host.jqxComplexInput("template");this.host.jqxComplexInput("template",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxComplexInput("theme");this.host.jqxComplexInput("theme",t)},t.prototype.value=function(t){if(t===undefined)return this.host.jqxComplexInput("value");this.host.jqxComplexInput("value",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxComplexInput("width");this.host.jqxComplexInput("width",t)},t.prototype.destroy=function(){this.host.jqxComplexInput("destroy")},t.prototype.getReal=function(t){return this.host.jqxComplexInput("getReal",t)},t.prototype.getImaginary=function(t){return this.host.jqxComplexInput("getImaginary",t)},t.prototype.render=function(){this.host.jqxComplexInput("render")},t.prototype.refresh=function(){this.host.jqxComplexInput("refresh")},t.prototype.val=function(t){return t!==undefined?this.host.jqxComplexInput("val",t):this.host.jqxComplexInput("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.on("change",function(t){e.onChange.emit(t),t.args&&e.onChangeCallback(t.args.value)})},t.decorators=[{type:e.Component,args:[{selector:"jqxComplexInput",template:'<div style="display: inline-flex;"><input [(ngModel)]="ngValue"><div></div></div>',providers:[i],changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrDecimalNotation:[{type:e.Input,args:["decimalNotation"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrPlaceHolder:[{type:e.Input,args:["placeHolder"]}],attrRoundedCorners:[{type:e.Input,args:["roundedCorners"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrSpinButtons:[{type:e.Input,args:["spinButtons"]}],attrSpinButtonsStep:[{type:e.Input,args:["spinButtonsStep"]}],attrTemplate:[{type:e.Input,args:["template"]}],attrTheme:[{type:e.Input,args:["theme"]}],attrValue:[{type:e.Input,args:["value"]}],attrWidth:[{type:e.Input,args:["width"]}],attrHeight:[{type:e.Input,args:["height"]}],autoCreate:[{type:e.Input,args:["auto-create"]}],onChange:[{type:e.Output}]},t}(),p=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[n.FormsModule],declarations:[r],exports:[r]}]}],t}();t.jqxComplexInputComponent=r,t.jqxComplexInputModule=p,Object.defineProperty(t,"__esModule",{value:!0})});