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) • 6.22 kB
JavaScript
require('../../jqwidgets/jqxcore');
require('../../jqwidgets/jqxmaskedinput');
!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/jqxmaskedinput",["exports","@angular/core","@angular/forms"],e):e((t["jqwidgets-ng"]=t["jqwidgets-ng"]||{},t["jqwidgets-ng"].jqxmaskedinput={}),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 s,i,o=n.call(t),r=[];try{for(;(void 0===e||0<e--)&&!(s=o.next()).done;)r.push(s.value)}catch(a){i={error:a}}finally{try{s&&!s.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return r}var s=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=["disabled","height","mask","promptChar","readOnly","rtl","theme","textAlign","value","width"],this.onTouchedCallback=s,this.onChangeCallback=s,this.onChange=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),s=!1;if(this[n]!==undefined){if("object"==typeof this[n]){if(this[n]instanceof Array&&(s=this.arraysEqual(this[n],this.host.jqxMaskedInput(this.properties[e]))),s)return!1;this.host.jqxMaskedInput(this.properties[e],this[n]);continue}this[n]!==this.host.jqxMaskedInput(this.properties[e])&&this.host.jqxMaskedInput(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,s=t.classList;0<s.length&&(n=e.classList).add.apply(n,function i(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t}(s)),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.__wireEvents__(),this.widgetObject=jqwidgets.createInstance(this.host,"jqxMaskedInput",t))},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.jqxMaskedInput("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.jqxMaskedInput("setOptions",t)},t.prototype.disabled=function(t){if(t===undefined)return this.host.jqxMaskedInput("disabled");this.host.jqxMaskedInput("disabled",t)},t.prototype.height=function(t){if(t===undefined)return this.host.jqxMaskedInput("height");this.host.jqxMaskedInput("height",t)},t.prototype.mask=function(t){if(t===undefined)return this.host.jqxMaskedInput("mask");this.host.jqxMaskedInput("mask",t)},t.prototype.promptChar=function(t){if(t===undefined)return this.host.jqxMaskedInput("promptChar");this.host.jqxMaskedInput("promptChar",t)},t.prototype.readOnly=function(t){if(t===undefined)return this.host.jqxMaskedInput("readOnly");this.host.jqxMaskedInput("readOnly",t)},t.prototype.rtl=function(t){if(t===undefined)return this.host.jqxMaskedInput("rtl");this.host.jqxMaskedInput("rtl",t)},t.prototype.theme=function(t){if(t===undefined)return this.host.jqxMaskedInput("theme");this.host.jqxMaskedInput("theme",t)},t.prototype.textAlign=function(t){if(t===undefined)return this.host.jqxMaskedInput("textAlign");this.host.jqxMaskedInput("textAlign",t)},t.prototype.value=function(t){if(t===undefined)return this.host.jqxMaskedInput("value");this.host.jqxMaskedInput("value",t)},t.prototype.width=function(t){if(t===undefined)return this.host.jqxMaskedInput("width");this.host.jqxMaskedInput("width",t)},t.prototype.clear=function(){this.host.jqxMaskedInput("clear")},t.prototype.destroy=function(){this.host.jqxMaskedInput("destroy")},t.prototype.focus=function(){this.host.jqxMaskedInput("focus")},t.prototype.val=function(t){return t!==undefined?this.host.jqxMaskedInput("val",t):this.host.jqxMaskedInput("val")},t.prototype.__wireEvents__=function(){var e=this;this.host.parent().on("change",function(t){e.onChange.emit(t),e.onChangeCallback(e.host.val())}),this.host.parent().on("valueChanged",function(t){e.onValueChanged.emit(t),e.onChangeCallback(e.host.val())})},t.decorators=[{type:e.Component,args:[{selector:"jqxMaskedInput",template:"<input>",providers:[i],changeDetection:e.ChangeDetectionStrategy.OnPush}]}],t.ctorParameters=function(){return[{type:e.ElementRef}]},t.propDecorators={attrDisabled:[{type:e.Input,args:["disabled"]}],attrMask:[{type:e.Input,args:["mask"]}],attrPromptChar:[{type:e.Input,args:["promptChar"]}],attrReadOnly:[{type:e.Input,args:["readOnly"]}],attrRtl:[{type:e.Input,args:["rtl"]}],attrTheme:[{type:e.Input,args:["theme"]}],attrTextAlign:[{type:e.Input,args:["textAlign"]}],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}],onValueChanged:[{type:e.Output}]},t}(),a=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[n.FormsModule],declarations:[r],exports:[r]}]}],t}();t.jqxMaskedInputComponent=r,t.jqxMaskedInputModule=a,Object.defineProperty(t,"__esModule",{value:!0})});