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) • 10.4 kB
JavaScript
require('../../jqwidgets/jqxcore');
require('../../jqwidgets/jqxbuttons');
require('../../jqwidgets/jqxnumberinput');
!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/jqxnumberinput",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxnumberinput={}),t.ng.core,t.ng.forms)}(this,function(t,e,n){"use strict";function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return s}var i=function(){},r={provide:n.NG_VALUE_ACCESSOR,useExisting:e.forwardRef(function(){return s}),multi:!0},s=function(){function t(t){this.autoCreate=!0,this.properties=["allowNull","decimal","disabled","decimalDigits","decimalSeparator","digits","groupSeparator","groupSize","height","inputMode","min","max","negativeSymbol","placeHolder","promptChar","rtl","readOnly","spinMode","spinButtons","spinButtonsWidth","spinButtonsStep","symbol","symbolPosition","textAlign","template","theme","value","width"],this.onTouchedCallback=i,this.onChangeCallback=i,this.onChange=new e.EventEmitter,this.onTextchanged=new e.EventEmitter,this.onValueChanged=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),i=!1;if(this[n]!==undefined){if("object"==typeof this[n]){if(this[n]instanceof Array&&(i=this.arraysEqual(this[n],this.host.jqxNumberInput(this.properties[e]))),i)return!1;this.host.jqxNumberInput(this.properties[e],this[n]);continue}this[n]!==this.host.jqxNumberInput(this.properties[e])&&this.host.jqxNumberInput(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,i=t.classList;0<i.length&&(n=e.classList).add.apply(n,function r(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t}(i)),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){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.widgetObject=jqwidgets.createInstance(this.host,"jqxNumberInput",t),this.host=this.widgetObject.host,this.__wireEvents__())},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&&this.host.jqxNumberInput("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.jqxNumberInput("setOptions",t)},t.prototype.allowNull=function(t){if(t===undefined)return this.host.jqxNumberInput("allowNull");this.host.jqxNumberInput("allowNull",t)},t.prototype.decimal=function(t){if(t===undefined)return this.host.jqxNumberInput("decimal");this.host.jqxNumberInput("decimal",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxNumberInput("disabled");this.host.jqxNumberInput("disabled",t)},t.prototype.decimalDigits=function(t){if(t===undefined)return this.host.jqxNumberInput("decimalDigits");this.host.jqxNumberInput("decimalDigits",t)},t.prototype.decimalSeparator=function(t){if(t===undefined)return this.host.jqxNumberInput("decimalSeparator");this.host.jqxNumberInput("decimalSeparator",t)},t.prototype.digits=function(t){if(t===undefined)return this.host.jqxNumberInput("digits");this.host.jqxNumberInput("digits",t)},t.prototype.groupSeparator=function(t){if(t===undefined)return this.host.jqxNumberInput("groupSeparator");this.host.jqxNumberInput("groupSeparator",t)},t.prototype.groupSize=function(t){if(t===undefined)return this.host.jqxNumberInput("groupSize");this.host.jqxNumberInput("groupSize",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxNumberInput("height");this.host.jqxNumberInput("height",t)},t.prototype.inputMode=function(t){if(t===undefined)return this.host.jqxNumberInput("inputMode");this.host.jqxNumberInput("inputMode",t)},t.prototype.min=function(t){if(t===undefined)return this.host.jqxNumberInput("min");this.host.jqxNumberInput("min",t)},t.prototype.max=function(t){if(t===undefined)return this.host.jqxNumberInput("max");this.host.jqxNumberInput("max",t)},t.prototype.negativeSymbol=function(t){if(t===undefined)return this.host.jqxNumberInput("negativeSymbol");this.host.jqxNumberInput("negativeSymbol",t)},t.prototype.placeHolder=function(t){if(t===undefined)return this.host.jqxNumberInput("placeHolder");this.host.jqxNumberInput("placeHolder",t)},t.prototype.promptChar=function(t){if(t===undefined)return this.host.jqxNumberInput("promptChar");this.host.jqxNumberInput("promptChar",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxNumberInput("rtl");this.host.jqxNumberInput("rtl",t)},t.prototype.readOnly=function(t){if(t===undefined)return this.host.jqxNumberInput("readOnly");this.host.jqxNumberInput("readOnly",t)},t.prototype.spinMode=function(t){if(t===undefined)return this.host.jqxNumberInput("spinMode");this.host.jqxNumberInput("spinMode",t)},t.prototype.spinButtons=function(t){if(t===undefined)return this.host.jqxNumberInput("spinButtons");this.host.jqxNumberInput("spinButtons",t)},t.prototype.spinButtonsWidth=function(t){if(t===undefined)return this.host.jqxNumberInput("spinButtonsWidth");this.host.jqxNumberInput("spinButtonsWidth",t)},t.prototype.spinButtonsStep=function(t){if(t===undefined)return this.host.jqxNumberInput("spinButtonsStep");this.host.jqxNumberInput("spinButtonsStep",t)},t.prototype.symbol=function(t){if(t===undefined)return this.host.jqxNumberInput("symbol");this.host.jqxNumberInput("symbol",t)},t.prototype.symbolPosition=function(t){if(t===undefined)return this.host.jqxNumberInput("symbolPosition");this.host.jqxNumberInput("symbolPosition",t)},t.prototype.textAlign=function(t){if(t===undefined)return this.host.jqxNumberInput("textAlign");this.host.jqxNumberInput("textAlign",t)},t.prototype.template=function(t){if(t===undefined)return this.host.jqxNumberInput("template");this.host.jqxNumberInput("template",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxNumberInput("theme");this.host.jqxNumberInput("theme",t)},t.prototype.value=function(t){if(t===undefined)return this.host.jqxNumberInput("value");this.host.jqxNumberInput("value",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxNumberInput("width");this.host.jqxNumberInput("width",t)},t.prototype.clear=function(){this.host.jqxNumberInput("clear")},t.prototype.destroy=function(){this.host.jqxNumberInput("destroy")},t.prototype.focus=function(){this.host.jqxNumberInput("focus")},t.prototype.getDecimal=function(){return this.host.jqxNumberInput("getDecimal")},t.prototype.setDecimal=function(t){this.host.jqxNumberInput("setDecimal",t)},t.prototype.val=function(t){return t!==undefined?this.host.jqxNumberInput("val",t):this.host.jqxNumberInput("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)}),this.host.on("textchanged",function(t){e.onTextchanged.emit(t),t.args&&e.onChangeCallback(t.args.value)}),this.host.on("valueChanged",function(t){e.onValueChanged.emit(t),t.args&&e.onChangeCallback(t.args.value)})},t.decorators=[{type:e.Component,args:[{selector:"jqxNumberInput",template:"<input>",providers:[r],changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrAllowNull:[{type:e.Input,args:["allowNull"]}],attrDecimal:[{type:e.Input,args:["decimal"]}],attrDisabled:[{type:e.Input,args:["disabled"]}],attrDecimalDigits:[{type:e.Input,args:["decimalDigits"]}],attrDecimalSeparator:[{type:e.Input,args:["decimalSeparator"]}],attrDigits:[{type:e.Input,args:["digits"]}],attrGroupSeparator:[{type:e.Input,args:["groupSeparator"]}],attrGroupSize:[{type:e.Input,args:["groupSize"]}],attrInputMode:[{type:e.Input,args:["inputMode"]}],attrMin:[{type:e.Input,args:["min"]}],attrMax:[{type:e.Input,args:["max"]}],attrNegativeSymbol:[{type:e.Input,args:["negativeSymbol"]}],attrPlaceHolder:[{type:e.Input,args:["placeHolder"]}],attrPromptChar:[{type:e.Input,args:["promptChar"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrReadOnly:[{type:e.Input,args:["readOnly"]}],attrSpinMode:[{type:e.Input,args:["spinMode"]}],attrSpinButtons:[{type:e.Input,args:["spinButtons"]}],attrSpinButtonsWidth:[{type:e.Input,args:["spinButtonsWidth"]}],attrSpinButtonsStep:[{type:e.Input,args:["spinButtonsStep"]}],attrSymbol:[{type:e.Input,args:["symbol"]}],attrSymbolPosition:[{type:e.Input,args:["symbolPosition"]}],attrTextAlign:[{type:e.Input,args:["textAlign"]}],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}],onTextchanged:[{type:e.Output}],onValueChanged:[{type:e.Output}]},t}(),u=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[n.FormsModule],declarations:[s],exports:[s]}]}],t}();t.jqxNumberInputComponent=s,t.jqxNumberInputModule=u,Object.defineProperty(t,"__esModule",{value:!0})});