Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-inputs

Package Overview
Dependencies
Maintainers
2
Versions
249
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-inputs - npm Package Compare versions

Comparing version 1.0.18 to 1.0.19

dist/ej2-inputs.umd.min.js.map

6

dist/ej2-inputs.umd.min.js
/*!
* filename: ej2-inputs.umd.min.js
* version : 1.0.18
* version : 1.0.19
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -11,2 +11,4 @@ * Use of this code is subject to the terms of our license.

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var n=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return e[i].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var i,s;i=[n,t,n(1),n(5)],void 0!==(s=function(e,t,n,i){"use strict";function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),s(n),s(i)}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s;i=[n,t,n(2)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(r<3?s(a):r>3?s(t,n,a):s(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};i=[n,t,n(3),n(3),n(3),n(3),n(3),n(4)],void 0!==(s=function(e,t,n,i,s,o,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="e-input-group-icon",h=new RegExp("/^(-)?(d*)$/"),d=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.isPrevFocused=!1,i.decimalSeparator=".",i.intRegExp=new RegExp("/^(-)?(d*)$/"),i.isCalled=!1,i}return r(t,e),t.prototype.preRender=function(){var e=o.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),this.angularTagName=null,"EJ-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var t=s.createElement("input"),i=0;for(i;i<this.element.attributes.length;i++)t.setAttribute(this.element.attributes[i].nodeName,this.element.attributes[i].nodeValue),t.innerHTML=this.element.innerHTML;this.element.parentNode.appendChild(t),this.element.parentNode.removeChild(this.element),this.element=t,o.setValue("ej2_instances",e,this.element)}s.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off","aria-live":"assertive"});var r={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:""};this.l10n=new n.L10n("numerictextbox",r,this.locale),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.checkAttributes(),this.prevValue=this.value,this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},t.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),o.isNullOrUndefined(this.width)||s.setStyleAttribute(this.container,{width:o.formatUnit(this.width)}),this.changeValue(this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0))},t.prototype.checkAttributes=function(){for(var e=["value","min","max","step","disabled","readonly","style","name"],t=0,n=e;t<n.length;t++){var i=n[t];if(!o.isNullOrUndefined(this.element.getAttribute(i)))switch(i){case"disabled":var s="disabled"!==this.element.getAttribute(i)&&"true"!==this.element.getAttribute(i);this.setProperties({enabled:s},!0);break;case"readonly":var r="readonly"===this.element.getAttribute(i)||"true"===this.element.getAttribute(i);this.setProperties({readonly:r},!0);break;case"style":this.inputStyle=this.element.getAttribute(i);break;case"name":this.inputName=this.element.getAttribute(i);break;default:var a=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(i));(null!==a&&!isNaN(a)||"value"===i)&&this.setProperties(o.setValue(i,a,{}),!0)}}},t.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},t.prototype.initCultureFunc=function(){this.instance=new l.Internationalization(this.locale)},t.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==o.getValue("currency",this)&&o.setValue("currency",this.currency,this.cultureInfo)},t.prototype.createWrapper=function(){var e=u.Input.createInput({element:this.element,customTag:this.angularTagName,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:this.cssClass,enableRtl:this.enableRtl,enabled:this.enabled}});this.container=e.container,s.addClass([this.container],"e-numeric"),this.readonly&&s.attributes(this.element,{"aria-readonly":"true"}),this.hiddenInput=s.createElement("input",{attrs:{type:"hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),s.attributes(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.element),null!==this.inputStyle&&s.attributes(this.container,{style:this.inputStyle})},t.prototype.spinBtnCreation=function(){this.spinDown=u.Input.appendSpan(c+" e-spin-down",this.container),s.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),this.spinUp=u.Input.appendSpan(c+" e-spin-up",this.container),s.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},t.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),s.attributes(this.element,{"aria-valuemin":this.min.toString(),"aria-valuemax":this.max.toString()})},t.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},t.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},t.prototype.action=function(e){var t=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(t,this.step,e)),this.raiseChangeEvent()},t.prototype.checkErrorClass=function(){this.isValidState?s.removeClass([this.container],"e-error"):s.addClass([this.container],"e-error"),s.attributes(this.element,{"aria-invalid":this.isValidState?"false":"true"})},t.prototype.wireEvents=function(){n.EventHandler.add(this.element,"focus",this.focusIn,this),n.EventHandler.add(this.element,"blur",this.focusOut,this),n.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),n.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),n.EventHandler.add(this.element,"change",this.changeHandler,this),n.EventHandler.add(this.element,"paste",this.pasteHandler,this)},t.prototype.wireSpinBtnEvents=function(){n.EventHandler.add(this.spinUp,n.Browser.touchStartEvent,this.mouseDownOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchStartEvent,this.mouseDownOnSpinner,this),n.EventHandler.add(this.spinUp,n.Browser.touchEndEvent,this.mouseUpOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchEndEvent,this.mouseUpOnSpinner,this),n.EventHandler.add(this.spinUp,n.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},t.prototype.unwireEvents=function(){n.EventHandler.remove(this.element,"focus",this.focusIn),n.EventHandler.remove(this.element,"blur",this.focusOut),n.EventHandler.remove(this.element,"keydown",this.keyDownHandler),n.EventHandler.remove(this.element,"keypress",this.keyPressHandler),n.EventHandler.remove(this.element,"change",this.changeHandler),n.EventHandler.remove(this.element,"paste",this.pasteHandler)},t.prototype.unwireSpinBtnEvents=function(){n.EventHandler.remove(this.spinUp,n.Browser.touchStartEvent,this.mouseDownOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchStartEvent,this.mouseDownOnSpinner),n.EventHandler.remove(this.spinUp,n.Browser.touchEndEvent,this.mouseUpOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchEndEvent,this.mouseUpOnSpinner),n.EventHandler.remove(this.spinUp,n.Browser.touchMoveEvent,this.touchMoveOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchMoveEvent,this.touchMoveOnSpinner)},t.prototype.changeHandler=function(e){this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},t.prototype.raiseChangeEvent=function(e){if(this.prevValue!==this.value){var t={};this.changeEventArgs={value:this.value,previousValue:this.prevValue},e&&(this.changeEventArgs.event=e),o.merge(t,this.changeEventArgs),this.prevValue=this.value,this.trigger("change",t)}},t.prototype.pasteHandler=function(){var e=this,t=this.element.value;setTimeout(function(){e.numericRegex().test(e.element.value)||e.setElementValue(t)})},t.prototype.keyDownHandler=function(e){switch(e.keyCode){case 38:e.preventDefault(),this.action("increment");break;case 40:e.preventDefault(),this.action("decrement")}this.element.value.length||(this.setProperties({value:null},!0),this.updateValue(this.instance.getNumberParser({format:"n"})(this.element.value)))},t.prototype.performAction=function(e,t,n){(null===e||isNaN(e))&&(e=0);var i="increment"===n?e+t:e-t;return i=this.correctRounding(e,t,i),this.strictMode?this.trimValue(i):i},t.prototype.correctRounding=function(e,t,n){var i=new RegExp("[,.](.*)"),s=(e.toString(),t.toString(),i.test(e.toString())),r=i.test(t.toString());if(s||r){var a=s?i.exec(e.toString())[0].length:0,o=r?i.exec(t.toString())[0].length:0,l=Math.max(a,o);return e=this.roundValue(n,l)}return n},t.prototype.roundValue=function(e,t){t=t||0;var n=Math.pow(10,t);return e*=n,e=Math.round(e)/n},t.prototype.updateValue=function(e,t){null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.raiseChangeEvent(t)},t.prototype.changeValue=function(e){if(e||0===e){var t=void 0,n=e.toString().split(".")[1];t=n&&n.length?n.length:0,null!==this.decimals&&(t=t<this.decimals?t:this.decimals),this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},t.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber(),t=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(t),s.attributes(this.element,{"aria-valuenow":e}),this.hiddenInput.value=e}else this.setElementValue(""),this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},t.prototype.setElementValue=function(e,t){u.Input.setValue(e,t||this.element,this.floatLabelType)},t.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},t.prototype.formatNumber=function(){var e,t=this.value,n=t.toString().split(".")[1];return e=n&&n.length?n.length:0,null!==this.decimals&&(e=e<this.decimals?e:this.decimals),this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},t.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},t.prototype.roundNumber=function(e,t){var n=e,i=t||0,s=n.toString().split("e");n=Math.round(Number(s[0]+"e"+(s[1]?Number(s[1])+i:i)));var r=n.toString().split("e");return n=Number(r[0]+"e"+(r[1]?Number(r[1])-i:-i)),Number(n.toFixed(i))},t.prototype.cancelEvent=function(e){return e.preventDefault(),!1},t.prototype.keyPressHandler=function(e){if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var t=String.fromCharCode(e.which),n=this.element.value;return n=n.substring(0,this.element.selectionStart)+t+n.substring(this.element.selectionEnd),!!this.numericRegex().test(n)||(e.preventDefault(),e.stopPropagation(),!1)},t.prototype.numericRegex=function(){var e=l.getNumericObject(this.locale),t=o.getValue("decimal",e),n="*";return"."===t&&(t="\\"+t),0===this.decimals?h:(this.decimals&&this.validateDecimalOnType&&(n="{0,"+this.decimals+"}"),new RegExp("^(-)?(((\\d+("+t+"\\d"+n+")?)|("+t+"\\d"+n+")))?$"))},t.prototype.mouseWheel=function(e){e.preventDefault();var t,n=e;n.wheelDelta?t=n.wheelDelta/120:n.detail&&(t=-n.detail/3),t>0?this.action("increment"):t<0&&this.action("decrement"),this.cancelEvent(e)},t.prototype.focusIn=function(e){if(this.enabled&&!this.readonly){if(this.isFocused=!0,s.removeClass([this.container],"e-error"),this.prevValue=this.value,this.value||0===this.value){var t=this.formatNumber();this.setElementValue(t),this.isPrevFocused||this.element.setSelectionRange(0,t.length)}n.Browser.isDevice||n.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},t.prototype.focusOut=function(e){var t=this;if(this.isPrevFocused){if(e.preventDefault(),n.Browser.isDevice){var i=this.element.value;this.element.focus(),this.isPrevFocused=!1;var s=this.element;setTimeout(function(){t.setElementValue(i,s)},200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var r=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(r),n.Browser.isDevice||n.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}},t.prototype.mouseDownOnSpinner=function(e){var t=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){var i=(this.getElementData(e),e.currentTarget),s=i.classList.contains("e-spin-up")?"increment":"decrement";n.EventHandler.add(i,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval(function(){t.isCalled=!0,t.action(s)},150),n.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},t.prototype.touchMoveOnSpinner=function(e){document.elementFromPoint(e.clientX,e.clientY).classList.contains(c)||clearInterval(this.timeOut)},t.prototype.mouseUpOnSpinner=function(e){if(this.isPrevFocused&&(this.element.focus(),n.Browser.isDevice||(this.isPrevFocused=!1)),n.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var t=e.currentTarget,i=t.classList.contains("e-spin-up")?"increment":"decrement";n.EventHandler.remove(t,"mouseleave",this.mouseUpClick),this.isCalled||this.action(i),this.isCalled=!1,n.EventHandler.remove(document,"mouseup",this.mouseUpClick)}},t.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},t.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,n.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),n.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},t.prototype.increment=function(e){void 0===e&&(e=this.step),this.changeValue(this.performAction(this.value,e,"increment"))},t.prototype.decrement=function(e){void 0===e&&(e=this.step),this.changeValue(this.performAction(this.value,e,"decrement"))},t.prototype.destroy=function(){this.unwireEvents(),s.detach(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),s.detach(this.spinUp),s.detach(this.spinDown)),this.container.parentElement.appendChild(this.cloneElement),s.detach(this.container),e.prototype.destroy.call(this)},t.prototype.getText=function(){return this.element.value},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];switch(r){case"width":s.setStyleAttribute(this.container,{width:o.formatUnit(e.width)});break;case"cssClass":u.Input.setCssClass(e.cssClass,[this.container],t.cssClass);break;case"enabled":u.Input.setEnabled(e.enabled,this.element);break;case"enableRtl":u.Input.setEnableRtl(e.enableRtl,[this.container]);break;case"readonly":u.Input.setReadonly(e.readonly,this.element),this.readonly?s.attributes(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"placeholder":u.Input.setPlaceholder(e.placeholder,this.element);break;case"step":this.step=e.step,this.validateStep();break;case"showSpinButton":e.showSpinButton?this.spinBtnCreation():(s.detach(this.spinUp),s.detach(this.spinDown));break;case"value":this.updateValue(e.value);break;case"min":case"max":o.setValue(r,o.getValue(r,e),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=e.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.updatePlaceholder(),u.Input.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":o.setValue(r,o.getValue(r,e),this.cultureInfo),this.updateValue(this.value);break;case"format":o.setValue(r,o.getValue(r,e),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=e.decimals,this.updateValue(this.value)}}},t.prototype.getModuleName=function(){return"numerictextbox"},t}(n.Component);a([n.Property("")],d.prototype,"cssClass",void 0),a([n.Property(null)],d.prototype,"value",void 0),a([n.Property(-Number.MAX_VALUE)],d.prototype,"min",void 0),a([n.Property(Number.MAX_VALUE)],d.prototype,"max",void 0),a([n.Property(1)],d.prototype,"step",void 0),a([n.Property(null)],d.prototype,"width",void 0),a([n.Property(null)],d.prototype,"placeholder",void 0),a([n.Property(!0)],d.prototype,"showSpinButton",void 0),a([n.Property(!1)],d.prototype,"readonly",void 0),a([n.Property(!0)],d.prototype,"enabled",void 0),a([n.Property(!1)],d.prototype,"enableRtl",void 0),a([n.Property(!1)],d.prototype,"enablePersistence",void 0),a([n.Property("n2")],d.prototype,"format",void 0),a([n.Property(null)],d.prototype,"decimals",void 0),a([n.Property(null)],d.prototype,"currency",void 0),a([n.Property(!0)],d.prototype,"strictMode",void 0),a([n.Property(!1)],d.prototype,"validateDecimalOnType",void 0),a([n.Property("Never")],d.prototype,"floatLabelType",void 0),a([n.Event()],d.prototype,"created",void 0),a([n.Event()],d.prototype,"destroyed",void 0),a([n.Event()],d.prototype,"change",void 0),d=a([i.NotifyPropertyChanges],d),t.NumericTextBox=d,t.numerictextboxHelper=n.CreateBuilder(d)}.apply(t,i))&&(e.exports=s)},function(t,n){t.exports=e},function(e,t,n){var i,s;i=[n,t,n(3)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"};!function(e){function t(e){var t={container:null,buttons:[],clearButton:null};if(n.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(t.container=f(e,i.INPUTGROUP,i.INPUTCUSTOMTAG,"span"),e.element.parentNode.insertBefore(t.container,e.element),n.addClass([e.element],i.INPUT),t.container.appendChild(e.element)):l(e,t),e.element.addEventListener("focus",function(){var e=d(this);e.classList.contains("e-input-group")&&e.classList.add("e-input-focus")}),e.element.addEventListener("blur",function(){var e=d(this);e.classList.contains("e-input-group")&&e.classList.remove("e-input-focus")}),n.isNullOrUndefined(e.properties)||n.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(t.clearButton=p(e.element,t.container),t.container.classList.contains(i.FLOATINPUT)&&n.addClass([t.container],i.INPUTGROUP)),!n.isNullOrUndefined(e.buttons))for(var s=0;s<e.buttons.length;s++)t.buttons.push(P(e.buttons[s],t.container));return t=u(e,t),U=t,t}function s(){var e=d(this).getElementsByClassName("e-float-text")[0];n.addClass([e],i.LABELTOP),e.classList.contains(i.LABELBOTTOM)&&n.removeClass([e],i.LABELBOTTOM)}function r(){var e=d(this);if(""===e.getElementsByTagName("input")[0].value){var t=e.getElementsByClassName("e-float-text")[0];t.classList.contains(i.LABELTOP)&&n.removeClass([t],i.LABELTOP),n.addClass([t],i.LABELBOTTOM)}}function a(e){e.addEventListener("focus",s),e.addEventListener("blur",r)}function o(e){e.removeEventListener("focus",s),e.removeEventListener("blur",r)}function l(e,t){var s,r;"Auto"===e.floatLabelType&&a(e.element),n.isNullOrUndefined(t.container)?(t.container=f(e,i.FLOATINPUT,i.FLOATCUSTOMTAG,"div"),e.element.parentNode.insertBefore(t.container,e.element)):(n.isNullOrUndefined(e.customTag)||t.container.classList.add(i.FLOATCUSTOMTAG),t.container.classList.add(i.FLOATINPUT)),s=n.createElement("span",{className:i.FLOATLINE}),r=n.createElement("label",{className:i.FLOATTEXT}),n.isNullOrUndefined(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),n.attributes(e.element,{"aria-labelledby":r.id})),n.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(r.innerHTML=e.element.placeholder,e.element.removeAttribute("placeholder")),n.isNullOrUndefined(e.properties)||n.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(r.innerHTML=e.properties.placeholder),r.innerHTML||t.container.classList.add(i.NOFLOATLABEL),t.container.appendChild(e.element),t.container.appendChild(s),t.container.appendChild(r),h(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(i.LABELBOTTOM)&&n.removeClass([r],i.LABELBOTTOM),n.addClass([r],i.LABELTOP)),"Auto"===e.floatLabelType&&(e.element.addEventListener("input",function(t){h(e.element.value,r)}),e.element.addEventListener("blur",function(t){h(e.element.value,r)}))}function u(e,t){if(!n.isNullOrUndefined(e.properties))for(var i=0,s=Object.keys(e.properties);i<s.length;i++){var r=s[i];switch(r){case"cssClass":b(e.properties.cssClass,[t.container]);break;case"enabled":N(e.properties.enabled,e.element);break;case"enableRtl":O(e.properties.enableRtl,[t.container]);break;case"placeholder":E(e.properties.placeholder,e.element);break;case"readonly":L(e.properties.readonly,e.element)}}return t}function c(e,t){e?n.removeClass([t],i.CLEARICONHIDE):n.addClass([t],i.CLEARICONHIDE)}function h(e,t){e?(n.addClass([t],i.LABELTOP),t.classList.contains(i.LABELBOTTOM)&&n.removeClass([t],i.LABELBOTTOM)):(t.classList.contains(i.LABELTOP)&&n.removeClass([t],i.LABELTOP),n.addClass([t],i.LABELBOTTOM))}function d(e){return e.parentNode}function p(e,t){var s=n.createElement("span",{className:i.CLEARICON});return t.appendChild(s),!n.isNullOrUndefined(U.container)&&U.container.classList.contains(i.FLOATINPUT)&&n.addClass([U.container],i.INPUTGROUP),n.addClass([s],i.CLEARICONHIDE),m(e,s),s}function m(e,t){t.addEventListener("click",function(s){e.classList.contains(i.DISABLE)||e.readOnly||(s.preventDefault(),e!==document.activeElement&&e.focus(),e.value="",n.addClass([t],i.CLEARICONHIDE))}),e.addEventListener("input",function(n){c(e.value,t)}),e.addEventListener("focus",function(n){c(e.value,t)}),e.addEventListener("blur",function(e){setTimeout(function(){n.addClass([t],i.CLEARICONHIDE)},200)})}function v(e,t){if(d(e).classList.contains(i.FLOATINPUT)&&"Auto"===t){var n=d(e).getElementsByClassName("e-float-text")[0];h(e.value,n)}}function f(e,t,i,s){var r;return n.isNullOrUndefined(e.customTag)?r=n.createElement(s,{className:t}):(r=n.createElement(e.customTag,{className:t}),r.classList.add(i)),r}function y(e,t,s,r){if(t.value=e,n.isNullOrUndefined(s)||"Auto"!==s||v(t,s),!n.isNullOrUndefined(r)&&r){var a=d(t),o=a.getElementsByClassName(i.CLEARICON)[0];t.value&&a.classList.contains("e-input-focus")?n.removeClass([o],i.CLEARICONHIDE):n.addClass([o],i.CLEARICONHIDE)}}function b(e,t,i){n.isNullOrUndefined(i)||""===i||n.removeClass(t,i),n.isNullOrUndefined(e)||""===e||n.addClass(t,e)}function E(e,t){var s;s=d(t),s.classList.contains(i.FLOATINPUT)?n.isNullOrUndefined(e)||""===e?(s.classList.add(i.NOFLOATLABEL),s.getElementsByClassName(i.FLOATTEXT)[0].textContent=""):(s.getElementsByClassName(i.FLOATTEXT)[0].textContent=e,s.classList.remove(i.NOFLOATLABEL)):n.isNullOrUndefined(e)||""===e?(t.removeAttribute("placeholder"),t.removeAttribute("aria-placeholder")):n.attributes(t,{placeholder:e,"aria-placeholder":e})}function L(e,t,i){e?n.attributes(t,{readonly:""}):t.removeAttribute("readonly"),n.isNullOrUndefined(i)||v(t,i)}function O(e,t){e?n.addClass(t,i.RTL):n.removeClass(t,i.RTL)}function N(e,t,s){var r={disabled:"disabled","aria-disabled":"true"};e?(t.classList.remove(i.DISABLE),T(r,t)):(t.classList.add(i.DISABLE),g(r,t)),n.isNullOrUndefined(s)||v(t,s)}function T(e,t){for(var n=0,s=Object.keys(e);n<s.length;n++){var r=s[n],a=void 0;a=d(t),"disabled"===r&&t.classList.remove(i.DISABLE),"disabled"===r&&a.classList.contains(i.INPUTGROUP)&&a.classList.remove(i.DISABLE),"placeholder"===r&&a.classList.contains(i.FLOATINPUT)?a.getElementsByClassName(i.FLOATTEXT)[0].textContent="":t.removeAttribute(r)}}function g(e,t){for(var n=0,s=Object.keys(e);n<s.length;n++){var r=s[n],a=void 0;a=d(t),"disabled"===r&&t.classList.add(i.DISABLE),"disabled"===r&&a.classList.contains(i.INPUTGROUP)&&a.classList.add(i.DISABLE),"placeholder"===r&&a.classList.contains(i.FLOATINPUT)?a.getElementsByClassName(i.FLOATTEXT)[0].textContent=e[r]:t.setAttribute(r,e[r])}}function C(e){var t=e.container;if(!n.isNullOrUndefined(t)&&t.classList.contains(i.FLOATINPUT)){var s=t.querySelector("input"),r=t.querySelector("."+i.FLOATTEXT).textContent,a=null!==t.querySelector(".e-clear-icon");n.detach(t.querySelector("."+i.FLOATLINE)),n.detach(t.querySelector("."+i.FLOATTEXT)),n.classList(t,[i.INPUTGROUP],[i.FLOATINPUT]),o(s),n.attributes(s,{placeholder:r}),s.classList.add(i.INPUT),a||s.removeAttribute("required")}}function A(e,t,s){var r=n.closest(e,"."+i.INPUTGROUP);if("Never"!==t){var a=r.tagName;a="DIV"!==a&&"SPAN"!==a?a:null;var o={element:e,floatLabelType:t,customTag:a,properties:{placeholder:s}},u=r.querySelector(".e-clear-icon"),c={container:r};if(e.classList.remove(i.INPUT),l(o,c),n.isNullOrUndefined(u)&&(u=r.querySelector(".e-input-group-icon")),n.isNullOrUndefined(u))r.classList.remove(i.INPUTGROUP);else{var h=r.querySelector("."+i.FLOATLINE),d=r.querySelector("."+i.FLOATTEXT);r.insertBefore(e,u),r.insertBefore(h,u),r.insertBefore(d,u)}}}function P(e,t){var s=n.createElement("span",{className:e});return t.appendChild(s),t.classList.contains(i.INPUTGROUP)||t.classList.add(i.INPUTGROUP),s.addEventListener("mousedown",function(){t.classList.contains("e-disabled")||t.querySelector("input").readOnly||this.classList.add("e-input-btn-ripple")}),s.addEventListener("mouseup",function(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}),s}var U={container:null,buttons:[],clearButton:null};e.createInput=t,e.setValue=y,e.setCssClass=b,e.setPlaceholder=E,e.setReadonly=L,e.setEnableRtl=O,e.setEnabled=N,e.removeAttributes=T,e.addAttributes=g,e.removeFloating=C,e.addFloating=A,e.appendSpan=P}(t.Input||(t.Input={}))}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s;i=[n,t,n(4)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=s)}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var n=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var i,r;i=[n,t,n(1),n(5),n(6)],void 0!==(r=function(e,t,n,i,r){"use strict";function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),s(n),s(i),s(r)}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(2)],void 0!==(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r,s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,a=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,n,a):r(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a};i=[n,t,n(3),n(3),n(3),n(3),n(3),n(4)],void 0!==(r=function(e,t,n,i,r,l,o,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h="e-input-group-icon",c=new RegExp("/^(-)?(d*)$/"),d=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.isPrevFocused=!1,i.decimalSeparator=".",i.intRegExp=new RegExp("/^(-)?(d*)$/"),i.isCalled=!1,i}return s(t,e),t.prototype.preRender=function(){var e=l.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),this.angularTagName=null,"EJ-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var t=r.createElement("input"),i=0;for(i;i<this.element.attributes.length;i++)t.setAttribute(this.element.attributes[i].nodeName,this.element.attributes[i].nodeValue),t.innerHTML=this.element.innerHTML;this.element.parentNode.appendChild(t),this.element.parentNode.removeChild(this.element),this.element=t,l.setValue("ej2_instances",e,this.element)}r.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off","aria-live":"assertive"});var s={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:""};this.l10n=new n.L10n("numerictextbox",s,this.locale),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.checkAttributes(),this.prevValue=this.value,this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},t.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),l.isNullOrUndefined(this.width)||r.setStyleAttribute(this.container,{width:l.formatUnit(this.width)}),this.changeValue(this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0))},t.prototype.checkAttributes=function(){for(var e=["value","min","max","step","disabled","readonly","style","name"],t=0,n=e;t<n.length;t++){var i=n[t];if(!l.isNullOrUndefined(this.element.getAttribute(i)))switch(i){case"disabled":var r="disabled"!==this.element.getAttribute(i)&&"true"!==this.element.getAttribute(i);this.setProperties({enabled:r},!0);break;case"readonly":var s="readonly"===this.element.getAttribute(i)||"true"===this.element.getAttribute(i);this.setProperties({readonly:s},!0);break;case"style":this.inputStyle=this.element.getAttribute(i);break;case"name":this.inputName=this.element.getAttribute(i);break;default:var a=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(i));(null!==a&&!isNaN(a)||"value"===i)&&this.setProperties(l.setValue(i,a,{}),!0)}}},t.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},t.prototype.initCultureFunc=function(){this.instance=new o.Internationalization(this.locale)},t.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==l.getValue("currency",this)&&l.setValue("currency",this.currency,this.cultureInfo)},t.prototype.createWrapper=function(){var e=u.Input.createInput({element:this.element,customTag:this.angularTagName,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:this.cssClass,enableRtl:this.enableRtl,enabled:this.enabled}});this.container=e.container,r.addClass([this.container],"e-numeric"),this.readonly&&r.attributes(this.element,{"aria-readonly":"true"}),this.hiddenInput=r.createElement("input",{attrs:{type:"hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),r.attributes(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.element),null!==this.inputStyle&&r.attributes(this.container,{style:this.inputStyle})},t.prototype.spinBtnCreation=function(){this.spinDown=u.Input.appendSpan(h+" e-spin-down",this.container),r.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),this.spinUp=u.Input.appendSpan(h+" e-spin-up",this.container),r.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},t.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),r.attributes(this.element,{"aria-valuemin":this.min.toString(),"aria-valuemax":this.max.toString()})},t.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},t.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},t.prototype.action=function(e){var t=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(t,this.step,e)),this.raiseChangeEvent()},t.prototype.checkErrorClass=function(){this.isValidState?r.removeClass([this.container],"e-error"):r.addClass([this.container],"e-error"),r.attributes(this.element,{"aria-invalid":this.isValidState?"false":"true"})},t.prototype.wireEvents=function(){n.EventHandler.add(this.element,"focus",this.focusIn,this),n.EventHandler.add(this.element,"blur",this.focusOut,this),n.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),n.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),n.EventHandler.add(this.element,"change",this.changeHandler,this),n.EventHandler.add(this.element,"paste",this.pasteHandler,this)},t.prototype.wireSpinBtnEvents=function(){n.EventHandler.add(this.spinUp,n.Browser.touchStartEvent,this.mouseDownOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchStartEvent,this.mouseDownOnSpinner,this),n.EventHandler.add(this.spinUp,n.Browser.touchEndEvent,this.mouseUpOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchEndEvent,this.mouseUpOnSpinner,this),n.EventHandler.add(this.spinUp,n.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},t.prototype.unwireEvents=function(){n.EventHandler.remove(this.element,"focus",this.focusIn),n.EventHandler.remove(this.element,"blur",this.focusOut),n.EventHandler.remove(this.element,"keydown",this.keyDownHandler),n.EventHandler.remove(this.element,"keypress",this.keyPressHandler),n.EventHandler.remove(this.element,"change",this.changeHandler),n.EventHandler.remove(this.element,"paste",this.pasteHandler)},t.prototype.unwireSpinBtnEvents=function(){n.EventHandler.remove(this.spinUp,n.Browser.touchStartEvent,this.mouseDownOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchStartEvent,this.mouseDownOnSpinner),n.EventHandler.remove(this.spinUp,n.Browser.touchEndEvent,this.mouseUpOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchEndEvent,this.mouseUpOnSpinner),n.EventHandler.remove(this.spinUp,n.Browser.touchMoveEvent,this.touchMoveOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchMoveEvent,this.touchMoveOnSpinner)},t.prototype.changeHandler=function(e){this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},t.prototype.raiseChangeEvent=function(e){if(this.prevValue!==this.value){var t={};this.changeEventArgs={value:this.value,previousValue:this.prevValue},e&&(this.changeEventArgs.event=e),l.merge(t,this.changeEventArgs),this.prevValue=this.value,this.trigger("change",t)}},t.prototype.pasteHandler=function(){var e=this,t=this.element.value;setTimeout(function(){e.numericRegex().test(e.element.value)||e.setElementValue(t)})},t.prototype.keyDownHandler=function(e){switch(e.keyCode){case 38:e.preventDefault(),this.action("increment");break;case 40:e.preventDefault(),this.action("decrement")}this.element.value.length||(this.setProperties({value:null},!0),this.updateValue(this.instance.getNumberParser({format:"n"})(this.element.value)))},t.prototype.performAction=function(e,t,n){(null===e||isNaN(e))&&(e=0);var i="increment"===n?e+t:e-t;return i=this.correctRounding(e,t,i),this.strictMode?this.trimValue(i):i},t.prototype.correctRounding=function(e,t,n){var i=new RegExp("[,.](.*)"),r=(e.toString(),t.toString(),i.test(e.toString())),s=i.test(t.toString());if(r||s){var a=r?i.exec(e.toString())[0].length:0,l=s?i.exec(t.toString())[0].length:0,o=Math.max(a,l);return e=this.roundValue(n,o)}return n},t.prototype.roundValue=function(e,t){t=t||0;var n=Math.pow(10,t);return e*=n,e=Math.round(e)/n},t.prototype.updateValue=function(e,t){null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.raiseChangeEvent(t)},t.prototype.changeValue=function(e){if(e||0===e){var t=void 0,n=e.toString().split(".")[1];t=n&&n.length?n.length:0,null!==this.decimals&&(t=t<this.decimals?t:this.decimals),this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},t.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber(),t=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value);this.setElementValue(t),r.attributes(this.element,{"aria-valuenow":e}),this.hiddenInput.value=e}else this.setElementValue(""),this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},t.prototype.setElementValue=function(e,t){u.Input.setValue(e,t||this.element,this.floatLabelType)},t.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},t.prototype.formatNumber=function(){var e,t=this.value,n=t.toString().split(".")[1];return e=n&&n.length?n.length:0,null!==this.decimals&&(e=e<this.decimals?e:this.decimals),this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},t.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},t.prototype.roundNumber=function(e,t){var n=e,i=t||0,r=n.toString().split("e");n=Math.round(Number(r[0]+"e"+(r[1]?Number(r[1])+i:i)));var s=n.toString().split("e");return n=Number(s[0]+"e"+(s[1]?Number(s[1])-i:-i)),Number(n.toFixed(i))},t.prototype.cancelEvent=function(e){return e.preventDefault(),!1},t.prototype.keyPressHandler=function(e){if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var t=String.fromCharCode(e.which),n=this.element.value;return n=n.substring(0,this.element.selectionStart)+t+n.substring(this.element.selectionEnd),!!this.numericRegex().test(n)||(e.preventDefault(),e.stopPropagation(),!1)},t.prototype.numericRegex=function(){var e=o.getNumericObject(this.locale),t=l.getValue("decimal",e),n="*";return"."===t&&(t="\\"+t),0===this.decimals?c:(this.decimals&&this.validateDecimalOnType&&(n="{0,"+this.decimals+"}"),new RegExp("^(-)?(((\\d+("+t+"\\d"+n+")?)|("+t+"\\d"+n+")))?$"))},t.prototype.mouseWheel=function(e){e.preventDefault();var t,n=e;n.wheelDelta?t=n.wheelDelta/120:n.detail&&(t=-n.detail/3),t>0?this.action("increment"):t<0&&this.action("decrement"),this.cancelEvent(e)},t.prototype.focusIn=function(e){if(this.enabled&&!this.readonly){if(this.isFocused=!0,r.removeClass([this.container],"e-error"),this.prevValue=this.value,this.value||0===this.value){var t=this.formatNumber();this.setElementValue(t),this.isPrevFocused||this.element.setSelectionRange(0,t.length)}n.Browser.isDevice||n.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},t.prototype.focusOut=function(e){var t=this;if(this.isPrevFocused){if(e.preventDefault(),n.Browser.isDevice){var i=this.element.value;this.element.focus(),this.isPrevFocused=!1;var r=this.element;setTimeout(function(){t.setElementValue(i,r)},200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var s=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(s),n.Browser.isDevice||n.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}},t.prototype.mouseDownOnSpinner=function(e){var t=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){var i=(this.getElementData(e),e.currentTarget),r=i.classList.contains("e-spin-up")?"increment":"decrement";n.EventHandler.add(i,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval(function(){t.isCalled=!0,t.action(r)},150),n.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},t.prototype.touchMoveOnSpinner=function(e){document.elementFromPoint(e.clientX,e.clientY).classList.contains(h)||clearInterval(this.timeOut)},t.prototype.mouseUpOnSpinner=function(e){if(this.isPrevFocused&&(this.element.focus(),n.Browser.isDevice||(this.isPrevFocused=!1)),n.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var t=e.currentTarget,i=t.classList.contains("e-spin-up")?"increment":"decrement";n.EventHandler.remove(t,"mouseleave",this.mouseUpClick),this.isCalled||this.action(i),this.isCalled=!1,n.EventHandler.remove(document,"mouseup",this.mouseUpClick)}},t.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},t.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,n.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),n.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},t.prototype.increment=function(e){void 0===e&&(e=this.step),this.changeValue(this.performAction(this.value,e,"increment"))},t.prototype.decrement=function(e){void 0===e&&(e=this.step),this.changeValue(this.performAction(this.value,e,"decrement"))},t.prototype.destroy=function(){this.unwireEvents(),r.detach(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),r.detach(this.spinUp),r.detach(this.spinDown)),this.container.parentElement.appendChild(this.cloneElement),r.detach(this.container),e.prototype.destroy.call(this)},t.prototype.getText=function(){return this.element.value},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){var s=i[n];switch(s){case"width":r.setStyleAttribute(this.container,{width:l.formatUnit(e.width)});break;case"cssClass":u.Input.setCssClass(e.cssClass,[this.container],t.cssClass);break;case"enabled":u.Input.setEnabled(e.enabled,this.element);break;case"enableRtl":u.Input.setEnableRtl(e.enableRtl,[this.container]);break;case"readonly":u.Input.setReadonly(e.readonly,this.element),this.readonly?r.attributes(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"placeholder":u.Input.setPlaceholder(e.placeholder,this.element);break;case"step":this.step=e.step,this.validateStep();break;case"showSpinButton":e.showSpinButton?this.spinBtnCreation():(r.detach(this.spinUp),r.detach(this.spinDown));break;case"value":this.updateValue(e.value);break;case"min":case"max":l.setValue(s,l.getValue(s,e),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=e.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.updatePlaceholder(),u.Input.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":l.setValue(s,l.getValue(s,e),this.cultureInfo),this.updateValue(this.value);break;case"format":l.setValue(s,l.getValue(s,e),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=e.decimals,this.updateValue(this.value)}}},t.prototype.getModuleName=function(){return"numerictextbox"},t}(n.Component);a([n.Property("")],d.prototype,"cssClass",void 0),a([n.Property(null)],d.prototype,"value",void 0),a([n.Property(-Number.MAX_VALUE)],d.prototype,"min",void 0),a([n.Property(Number.MAX_VALUE)],d.prototype,"max",void 0),a([n.Property(1)],d.prototype,"step",void 0),a([n.Property(null)],d.prototype,"width",void 0),a([n.Property(null)],d.prototype,"placeholder",void 0),a([n.Property(!0)],d.prototype,"showSpinButton",void 0),a([n.Property(!1)],d.prototype,"readonly",void 0),a([n.Property(!0)],d.prototype,"enabled",void 0),a([n.Property(!1)],d.prototype,"enableRtl",void 0),a([n.Property(!1)],d.prototype,"enablePersistence",void 0),a([n.Property("n2")],d.prototype,"format",void 0),a([n.Property(null)],d.prototype,"decimals",void 0),a([n.Property(null)],d.prototype,"currency",void 0),a([n.Property(!0)],d.prototype,"strictMode",void 0),a([n.Property(!1)],d.prototype,"validateDecimalOnType",void 0),a([n.Property("Never")],d.prototype,"floatLabelType",void 0),a([n.Event()],d.prototype,"created",void 0),a([n.Event()],d.prototype,"destroyed",void 0),a([n.Event()],d.prototype,"change",void 0),d=a([i.NotifyPropertyChanges],d),t.NumericTextBox=d,t.numerictextboxHelper=n.CreateBuilder(d)}.apply(t,i))&&(e.exports=r)},function(t,n){t.exports=e},function(e,t,n){var i,r;i=[n,t,n(3)],void 0!==(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"};!function(e){function t(e){var t={container:null,buttons:[],clearButton:null};if(n.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(t.container=f(e,i.INPUTGROUP,i.INPUTCUSTOMTAG,"span"),e.element.parentNode.insertBefore(t.container,e.element),n.addClass([e.element],i.INPUT),t.container.appendChild(e.element)):o(e,t),e.element.addEventListener("focus",function(){var e=d(this);e.classList.contains("e-input-group")&&e.classList.add("e-input-focus")}),e.element.addEventListener("blur",function(){var e=d(this);e.classList.contains("e-input-group")&&e.classList.remove("e-input-focus")}),n.isNullOrUndefined(e.properties)||n.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(t.clearButton=p(e.element,t.container),t.container.classList.contains(i.FLOATINPUT)&&n.addClass([t.container],i.INPUTGROUP)),!n.isNullOrUndefined(e.buttons))for(var r=0;r<e.buttons.length;r++)t.buttons.push(C(e.buttons[r],t.container));return t=u(e,t),w=t,t}function r(){var e=d(this).getElementsByClassName("e-float-text")[0];n.addClass([e],i.LABELTOP),e.classList.contains(i.LABELBOTTOM)&&n.removeClass([e],i.LABELBOTTOM)}function s(){var e=d(this);if(""===e.getElementsByTagName("input")[0].value){var t=e.getElementsByClassName("e-float-text")[0];t.classList.contains(i.LABELTOP)&&n.removeClass([t],i.LABELTOP),n.addClass([t],i.LABELBOTTOM)}}function a(e){e.addEventListener("focus",r),e.addEventListener("blur",s)}function l(e){e.removeEventListener("focus",r),e.removeEventListener("blur",s)}function o(e,t){var r,s;"Auto"===e.floatLabelType&&a(e.element),n.isNullOrUndefined(t.container)?(t.container=f(e,i.FLOATINPUT,i.FLOATCUSTOMTAG,"div"),e.element.parentNode.insertBefore(t.container,e.element)):(n.isNullOrUndefined(e.customTag)||t.container.classList.add(i.FLOATCUSTOMTAG),t.container.classList.add(i.FLOATINPUT)),r=n.createElement("span",{className:i.FLOATLINE}),s=n.createElement("label",{className:i.FLOATTEXT}),n.isNullOrUndefined(e.element.id)||""===e.element.id||(s.id="label_"+e.element.id.replace(/ /g,"_"),n.attributes(e.element,{"aria-labelledby":s.id})),n.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(s.innerHTML=e.element.placeholder,e.element.removeAttribute("placeholder")),n.isNullOrUndefined(e.properties)||n.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(s.innerHTML=e.properties.placeholder),s.innerHTML||t.container.classList.add(i.NOFLOATLABEL),t.container.appendChild(e.element),t.container.appendChild(r),t.container.appendChild(s),c(e.element.value,s),"Always"===e.floatLabelType&&(s.classList.contains(i.LABELBOTTOM)&&n.removeClass([s],i.LABELBOTTOM),n.addClass([s],i.LABELTOP)),"Auto"===e.floatLabelType&&(e.element.addEventListener("input",function(t){c(e.element.value,s)}),e.element.addEventListener("blur",function(t){c(e.element.value,s)}))}function u(e,t){if(!n.isNullOrUndefined(e.properties))for(var i=0,r=Object.keys(e.properties);i<r.length;i++){var s=r[i];switch(s){case"cssClass":g(e.properties.cssClass,[t.container]);break;case"enabled":O(e.properties.enabled,e.element);break;case"enableRtl":L(e.properties.enableRtl,[t.container]);break;case"placeholder":E(e.properties.placeholder,e.element);break;case"readonly":b(e.properties.readonly,e.element)}}return t}function h(e,t){e?n.removeClass([t],i.CLEARICONHIDE):n.addClass([t],i.CLEARICONHIDE)}function c(e,t){e?(n.addClass([t],i.LABELTOP),t.classList.contains(i.LABELBOTTOM)&&n.removeClass([t],i.LABELBOTTOM)):(t.classList.contains(i.LABELTOP)&&n.removeClass([t],i.LABELTOP),n.addClass([t],i.LABELBOTTOM))}function d(e){return e.parentNode}function p(e,t){var r=n.createElement("span",{className:i.CLEARICON});return t.appendChild(r),!n.isNullOrUndefined(w.container)&&w.container.classList.contains(i.FLOATINPUT)&&n.addClass([w.container],i.INPUTGROUP),n.addClass([r],i.CLEARICONHIDE),m(e,r),r}function m(e,t){t.addEventListener("click",function(r){e.classList.contains(i.DISABLE)||e.readOnly||(r.preventDefault(),e!==document.activeElement&&e.focus(),e.value="",n.addClass([t],i.CLEARICONHIDE))}),e.addEventListener("input",function(n){h(e.value,t)}),e.addEventListener("focus",function(n){h(e.value,t)}),e.addEventListener("blur",function(e){setTimeout(function(){n.addClass([t],i.CLEARICONHIDE)},200)})}function v(e,t){if(d(e).classList.contains(i.FLOATINPUT)&&"Auto"===t){var n=d(e).getElementsByClassName("e-float-text")[0];c(e.value,n)}}function f(e,t,i,r){var s;return n.isNullOrUndefined(e.customTag)?s=n.createElement(r,{className:t}):(s=n.createElement(e.customTag,{className:t}),s.classList.add(i)),s}function y(e,t,r,s){if(t.value=e,n.isNullOrUndefined(r)||"Auto"!==r||v(t,r),!n.isNullOrUndefined(s)&&s){var a=d(t),l=a.getElementsByClassName(i.CLEARICON)[0];t.value&&a.classList.contains("e-input-focus")?n.removeClass([l],i.CLEARICONHIDE):n.addClass([l],i.CLEARICONHIDE)}}function g(e,t,i){n.isNullOrUndefined(i)||""===i||n.removeClass(t,i),n.isNullOrUndefined(e)||""===e||n.addClass(t,e)}function E(e,t){var r;r=d(t),r.classList.contains(i.FLOATINPUT)?n.isNullOrUndefined(e)||""===e?(r.classList.add(i.NOFLOATLABEL),r.getElementsByClassName(i.FLOATTEXT)[0].textContent=""):(r.getElementsByClassName(i.FLOATTEXT)[0].textContent=e,r.classList.remove(i.NOFLOATLABEL)):n.isNullOrUndefined(e)||""===e?(t.removeAttribute("placeholder"),t.removeAttribute("aria-placeholder")):n.attributes(t,{placeholder:e,"aria-placeholder":e})}function b(e,t,i){e?n.attributes(t,{readonly:""}):t.removeAttribute("readonly"),n.isNullOrUndefined(i)||v(t,i)}function L(e,t){e?n.addClass(t,i.RTL):n.removeClass(t,i.RTL)}function O(e,t,r){var s={disabled:"disabled","aria-disabled":"true"};e?(t.classList.remove(i.DISABLE),N(s,t)):(t.classList.add(i.DISABLE),T(s,t)),n.isNullOrUndefined(r)||v(t,r)}function N(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++){var s=r[n],a=void 0;a=d(t),"disabled"===s&&t.classList.remove(i.DISABLE),"disabled"===s&&a.classList.contains(i.INPUTGROUP)&&a.classList.remove(i.DISABLE),"placeholder"===s&&a.classList.contains(i.FLOATINPUT)?a.getElementsByClassName(i.FLOATTEXT)[0].textContent="":t.removeAttribute(s)}}function T(e,t){for(var n=0,r=Object.keys(e);n<r.length;n++){var s=r[n],a=void 0;a=d(t),"disabled"===s&&t.classList.add(i.DISABLE),"disabled"===s&&a.classList.contains(i.INPUTGROUP)&&a.classList.add(i.DISABLE),"placeholder"===s&&a.classList.contains(i.FLOATINPUT)?a.getElementsByClassName(i.FLOATTEXT)[0].textContent=e[s]:t.setAttribute(s,e[s])}}function A(e){var t=e.container;if(!n.isNullOrUndefined(t)&&t.classList.contains(i.FLOATINPUT)){var r=t.querySelector("input"),s=t.querySelector("."+i.FLOATTEXT).textContent,a=null!==t.querySelector(".e-clear-icon");n.detach(t.querySelector("."+i.FLOATLINE)),n.detach(t.querySelector("."+i.FLOATTEXT)),n.classList(t,[i.INPUTGROUP],[i.FLOATINPUT]),l(r),n.attributes(r,{placeholder:s}),r.classList.add(i.INPUT),a||r.removeAttribute("required")}}function P(e,t,r){var s=n.closest(e,"."+i.INPUTGROUP);if("Never"!==t){var a=s.tagName;a="DIV"!==a&&"SPAN"!==a?a:null;var l={element:e,floatLabelType:t,customTag:a,properties:{placeholder:r}},u=s.querySelector(".e-clear-icon"),h={container:s};if(e.classList.remove(i.INPUT),o(l,h),n.isNullOrUndefined(u)&&(u=s.querySelector(".e-input-group-icon")),n.isNullOrUndefined(u))s.classList.remove(i.INPUTGROUP);else{var c=s.querySelector("."+i.FLOATLINE),d=s.querySelector("."+i.FLOATTEXT);s.insertBefore(e,u),s.insertBefore(c,u),s.insertBefore(d,u)}}}function C(e,t){var r=n.createElement("span",{className:e});return t.appendChild(r),t.classList.contains(i.INPUTGROUP)||t.classList.add(i.INPUTGROUP),r.addEventListener("mousedown",function(){t.classList.contains("e-disabled")||t.querySelector("input").readOnly||this.classList.add("e-input-btn-ripple")}),r.addEventListener("mouseup",function(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}),r}var w={container:null,buttons:[],clearButton:null};e.createInput=t,e.setValue=y,e.setCssClass=g,e.setPlaceholder=E,e.setReadonly=b,e.setEnableRtl=L,e.setEnabled=O,e.removeAttributes=N,e.addAttributes=T,e.removeFloating=A,e.addFloating=P,e.appendSpan=C}(t.Input||(t.Input={}))}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(4)],void 0!==(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(7)],void 0!==(r=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r,s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=this&&this.__decorate||function(e,t,n,i){var r,s=arguments.length,a=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(s<3?r(a):s>3?r(t,n,a):r(t,n))||a);return s>3&&a&&Object.defineProperty(t,n,a),a};i=[n,t,n(3),n(3),n(3)],void 0!==(r=function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l,o=new RegExp("^[A-Za-z0-9._%+-]{3,}@[a-zA-Z]{3,}([.]{1}[a-zA-Z]{2,5}|[.]{1}[a-zA-Z]{2,4}[.]{1}[a-zA-Z]{2,4})$"),u=new RegExp("^((ftp|http|https)://)?www.([A-z]{2,}).([A-z]{2,})$"),h=new RegExp("^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"),c=new RegExp("^[0-9]*$"),d=new RegExp("^[+]?[0-9]{9,13}$"),p=new RegExp("^\\d{13,16}$");!function(e){e[e.Message=0]="Message",e[e.Label=1]="Label"}(l=t.ErrorOption||(t.ErrorOption={}));var m=v=function(e){function t(t,i){var r=e.call(this,i,t)||this;if(r.validated=[],r.errorRules=[],r.allowSubmit=!1,r.required="required",r.infoElement=null,r.inputElement=null,r.selectQuery="input:not([type=reset]):not([type=button]), select, textarea",r.defaultMessages={required:"This field is required.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateIso:"Please enter a valid date ( ISO ).",creditcard:"Please enter valid card number",number:"Please enter a valid number.",digits:"Please enter only digits.",maxLength:"Please enter no more than {0} characters.",minLength:"Please enter at least {0} characters.",rangeLength:"Please enter a value between {0} and {1} characters long.",range:"Please enter a value between {0} and {1}.",max:"Please enter a value less than or equal to {0}.",min:"Please enter a value greater than or equal to {0}.",regex:"Please enter a correct value.",tel:"Please enter a valid phone number.",pattern:"Please enter a correct pattern value.",equalTo:"Please enter the valid match text"},t="string"==typeof t?n.select(t,document):t,null!=r.element)return r.element.setAttribute("novalidate",""),r.inputElements=n.selectAll(r.selectQuery,r.element),r.createHTML5Rules(),r.wireEvents(),r}return s(t,e),t.prototype.addRules=function(e,t){this.rules.hasOwnProperty(e)?i.extend(this.rules[e],t,{}):this.rules[e]=t},t.prototype.removeRules=function(e,t){if(e||t)if(this.rules[e]&&!t)delete this.rules[e];else{if(i.isNullOrUndefined(this.rules[e]&&t))return;for(var n=0;n<t.length;n++)delete this.rules[e][t[n]]}else this.rules={}},t.prototype.validate=function(e){var t=Object.keys(this.rules);if(e&&t.length)return this.validateRules(e),-1!==t.indexOf(e)&&0===this.errorRules.filter(function(t){return t.name===e}).length;for(var n=0,i=t;n<i.length;n++){var r=i[n];this.validateRules(r)}return 0===this.errorRules.length},t.prototype.reset=function(){this.errorRules=[],this.validated=[],this.element.reset();for(var e=n.selectAll(this.selectQuery,this.element),t=0,i=e;t<i.length;t++){var r=i[t],s=r
;s.removeAttribute("aria-invalid"),s.classList.remove(this.errorClass),s.name.length>0&&(this.getInputElement(s.name),this.getErrorElement(s.name),this.hideMessage(s.name)),s.classList.remove(this.validClass)}},t.prototype.getInputElement=function(e){return this.inputElement=n.select("[name="+e+"]",this.element),this.inputElement},t.prototype.destroy=function(){this.reset(),this.unwireEvents(),this.rules={};for(var t=n.selectAll("."+this.errorClass+", ."+this.validClass,this.element),i=0,r=t;i<r.length;i++){r[i].remove()}e.prototype.destroy.call(this)},t.prototype.onPropertyChanged=function(e,t){},t.prototype.getModuleName=function(){return"formValidator"},t.prototype.createHTML5Rules=function(){for(var e=["required","regex","rangeLength","maxLength","minLength","dateIso","digits","pattern","data-val-required","type","data-validation","min","max","range","equalTo","data-val-minlength-min","data-val-equalto-other","data-val-maxlength-max","data-val-range-min","data-val-regex-pattern","data-val-length-max","data-val-creditcard","data-val-phone"],t=["email","url","date","number","tel"],n=0,i=this.inputElements;n<i.length;n++){for(var r=i[n],s={},a=0,l=e;a<l.length;a++){var o=l[a];if(null!==r.getAttribute(o))switch(o){case"required":this.defRule(r,s,o,r.required);break;case"data-validation":o=r.getAttribute(o),this.defRule(r,s,o,!0);break;case"type":-1!==t.indexOf(r.type)&&this.defRule(r,s,r.type,!0);break;case"rangeLength":case"range":this.defRule(r,s,o,JSON.parse(r.getAttribute(o)));break;case"equalTo":var u=r.getAttribute(o);this.defRule(r,s,o,u);break;default:"true"===r.getAttribute("data-val")?this.annotationRule(r,s,o,r.getAttribute(o)):this.defRule(r,s,o,r.getAttribute(o))}}0!==Object.keys(s).length&&this.addRules(r.name,s)}},t.prototype.annotationRule=function(e,t,n,i){var r=n.split("-"),s=["required","creditcard","phone","maxlength","minlength","range","regex","equalto"],a=r[r.length-1],l=r[r.length-2];if(-1!==s.indexOf(a))switch(a){case"required":this.defRule(e,t,"required",i);break;case"creditcard":this.defRule(e,t,"creditcard",i);break;case"phone":this.defRule(e,t,"tel",i)}else if(-1!==s.indexOf(l))switch(l){case"maxlength":this.defRule(e,t,"maxLength",i);break;case"minlength":this.defRule(e,t,"minLength",i);break;case"range":var o=e.getAttribute("data-val-range-min"),u=e.getAttribute("data-val-range-max");this.defRule(e,t,"range",[o,u]);break;case"equalto":var h=e.getAttribute(n).split(".");this.defRule(e,t,"equalTo",h[h.length-1]);break;case"regex":this.defRule(e,t,"regex",i)}},t.prototype.defRule=function(e,t,n,i){var r=e.getAttribute("data-"+n+"-message"),s=e.getAttribute("data-val-"+n);r?i=[i,r]:s&&(i=[i,s]),t[n]=i},t.prototype.wireEvents=function(){for(var e=0,t=this.inputElements;e<t.length;e++){var n=t[e];v.isCheckable(n)?i.EventHandler.add(n,"click",this.clickHandler,this):"SELECT"===n.tagName?i.EventHandler.add(n,"change",this.changeHandler,this):(i.EventHandler.add(n,"focusout",this.focusOutHandler,this),i.EventHandler.add(n,"keyup",this.keyUpHandler,this))}i.EventHandler.add(this.element,"submit",this.submitHandler,this)},t.prototype.unwireEvents=function(){for(var e=0,t=this.inputElements;e<t.length;e++){var n=t[e];i.EventHandler.clearEvents(n)}i.EventHandler.remove(this.element,"submit",this.submitHandler)},t.prototype.focusOutHandler=function(e){this.trigger("focusout",e);var t=e.target;this.rules[t.name]&&(this.rules[t.name][this.required]||t.value.length>0?this.validate(t.name):-1===this.validated.indexOf(t.name)&&this.validated.push(t.name))},t.prototype.keyUpHandler=function(e){this.trigger("keyup",e);var t=e.target,n=[16,17,18,20,35,36,37,38,39,40,45,144,225];(9!==e.which||this.rules[t.name]&&(!this.rules[t.name]||this.rules[t.name][this.required]))&&-1!==this.validated.indexOf(t.name)&&this.rules[t.name]&&-1===n.indexOf(e.which)&&this.validate(t.name)},t.prototype.clickHandler=function(e){this.trigger("click",e);var t=e.target;"submit"!==t.type?this.validate(t.name):null!==t.getAttribute("formnovalidate")&&(this.allowSubmit=!0)},t.prototype.changeHandler=function(e){this.trigger("change",e);var t=e.target;this.validate(t.name)},t.prototype.submitHandler=function(e){this.trigger("submit",e),this.allowSubmit||this.validate()?this.allowSubmit=!1:e.preventDefault()},t.prototype.validateRules=function(e){if(this.rules[e]){var t=Object.keys(this.rules[e]);this.getInputElement(e),this.getErrorElement(e);for(var n=0,i=t;n<i.length;n++){var r=i[n],s=this.getErrorMessage(this.rules[e][r],r),a={name:e,message:s},l={inputName:e,element:this.inputElement,message:s};if(!this.isValid(e,r)&&!this.inputElement.classList.contains(this.ignore)){this.removeErrorRules(e),this.errorRules.push(a),this.inputElement.setAttribute("aria-invalid","true"),this.inputElement.setAttribute("aria-describedby",this.inputElement.id+"-info"),this.infoElement?this.showMessage(a):this.createErrorElement(e,a.message,this.inputElement),l.errorElement=this.infoElement,l.status="failure",this.inputElement.classList.add(this.errorClass),this.inputElement.classList.remove(this.validClass),this.trigger("validationComplete",l),"required"===r&&this.inputElement.setAttribute("aria-required","true");break}this.hideMessage(e),l.status="success",this.trigger("validationComplete",l)}}},t.prototype.isValid=function(e,t){var i=this.rules[e][t],r=i instanceof Array&&"string"==typeof i[1]?i[0]:i,s=this.rules[e][t],a={value:this.inputElement.value,param:r,element:this.inputElement,formElement:this.element};if(this.trigger("validationBegin",a),s&&"function"==typeof s[0]){return s[0].call(this,{element:this.inputElement,value:this.inputElement.value})}return v.isCheckable(this.inputElement)?"required"!==t||n.selectAll("input[name="+e+"]:checked",this.element).length>0:v.checkValidator[t](a)},t.prototype.getErrorMessage=function(e,t){var n=e instanceof Array&&"string"==typeof e[1]?e[1]:this.defaultMessages[t],r=n.match(/{(\d)}/g);if(!i.isNullOrUndefined(r))for(var s=0;s<r.length;s++){var a=e instanceof Array?e[s]:e;n=n.replace(r[s],a)}return n},t.prototype.createErrorElement=function(e,t,i){var r=n.createElement(this.errorElement,{className:this.errorClass,innerHTML:t,attrs:{for:e}});if(this.errorOption===l.Message&&(r.classList.remove(this.errorClass),r.classList.add("e-message"),r=n.createElement(this.errorContainer,{className:this.errorClass,innerHTML:r.outerHTML})),r.id=this.inputElement.name+"-info",this.element.querySelector('[data-valmsg-for="'+i.id+'"]'))this.element.querySelector('[data-valmsg-for="'+i.id+'"]').appendChild(r);else if(!0===i.hasAttribute("data-msg-containerid")){var s=i.getAttribute("data-msg-containerid"),a=i.parentElement.querySelector("#"+s);a.appendChild(r)}else null!=this.customPlacement?this.customPlacement.call(this,this.inputElement,r):this.inputElement.parentNode.insertBefore(r,this.inputElement.nextSibling);r.style.display="block",this.getErrorElement(e),this.validated.push(e),this.checkRequired(e)},t.prototype.getErrorElement=function(e){return this.infoElement=n.select(this.errorElement+"."+this.errorClass,this.inputElement.parentElement),this.infoElement||(this.infoElement=n.select(this.errorElement+"."+this.errorClass+'[for="'+e+'"]')),this.infoElement},t.prototype.removeErrorRules=function(e){for(var t=0;t<this.errorRules.length;t++){this.errorRules[t].name===e&&this.errorRules.splice(t,1)}},t.prototype.showMessage=function(e){this.infoElement.style.display="block",this.infoElement.innerHTML=e.message,this.checkRequired(e.name)},t.prototype.hideMessage=function(e){this.infoElement&&(this.infoElement.style.display="none",this.removeErrorRules(e),this.inputElement.classList.add(this.validClass),this.inputElement.classList.remove(this.errorClass),this.inputElement.setAttribute("aria-invalid","false"))},t.prototype.checkRequired=function(e){this.rules[e][this.required]||this.inputElement.value.length||(this.infoElement.innerHTML=this.inputElement.value,this.infoElement.setAttribute("aria-invalid","false"),this.hideMessage(e))},t.isCheckable=function(e){var t=e.getAttribute("type");return t&&("checkbox"===t||"radio"===t||"submit"===t)},t}(n.Base);m.checkValidator={required:function(e){return e.value.length>0},email:function(e){return o.test(e.value)},url:function(e){return u.test(e.value)},dateIso:function(e){return h.test(e.value)},tel:function(e){return d.test(e.value)},creditcard:function(e){return p.test(e.value)},number:function(e){return!isNaN(Number(e.value))&&-1===e.value.indexOf(" ")},digits:function(e){return c.test(e.value)},maxLength:function(e){return e.value.length<=e.param},minLength:function(e){return e.value.length>=e.param},rangeLength:function(e){var t=e.param;return e.value.length>=t[0]&&e.value.length<=t[1]},range:function(e){var t=e.param;return!isNaN(Number(e.value))&&Number(e.value)>=t[0]&&Number(e.value)<=t[1]},date:function(e){return!isNaN(new Date(e.value).getTime())},max:function(e){return isNaN(Number(e.value))?new Date(e.value).getTime()<=new Date(JSON.parse(JSON.stringify(e.param))).getTime():+e.value<=e.param},min:function(e){return isNaN(Number(e.value))?new Date(e.value).getTime()>=new Date(JSON.parse(JSON.stringify(e.param))).getTime():+e.value>=e.param},regex:function(e){return new RegExp(e.param).test(e.value)},equalTo:function(e){var t=e.formElement.querySelector("#"+e.param);return e.param=t.value,e.param===e.value}},a([r.Property("e-hidden")],m.prototype,"ignore",void 0),a([r.Property({})],m.prototype,"rules",void 0),a([r.Property("e-error")],m.prototype,"errorClass",void 0),a([r.Property("e-valid")],m.prototype,"validClass",void 0),a([r.Property("label")],m.prototype,"errorElement",void 0),a([r.Property("div")],m.prototype,"errorContainer",void 0),a([r.Property(l.Label)],m.prototype,"errorOption",void 0),a([r.Event()],m.prototype,"focusout",void 0),a([r.Event()],m.prototype,"keyup",void 0),a([r.Event()],m.prototype,"click",void 0),a([r.Event()],m.prototype,"change",void 0),a([r.Event()],m.prototype,"submit",void 0),a([r.Event()],m.prototype,"validationBegin",void 0),a([r.Event()],m.prototype,"validationComplete",void 0),a([r.Event()],m.prototype,"customPlacement",void 0),m=v=a([r.NotifyPropertyChanges],m),t.FormValidator=m;var v}.apply(t,i))&&(e.exports=r)}])});
//# sourceMappingURL=ej2-inputs.umd.min.js.map
export * from './numerictextbox/index';
export * from './input/index';
export * from './form-validator/index';
{
"name": "@syncfusion/ej2-inputs",
"version": "1.0.18",
"version": "1.0.19",
"description": "Essential JS 2 Input Components",

@@ -9,3 +9,3 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "^1.0.18"
"@syncfusion/ej2-base": "^1.0.19"
},

@@ -12,0 +12,0 @@ "devDependencies": {

@@ -6,1 +6,2 @@ /**

export * from './input/index';
export * from './form-validator/index';

@@ -1,2 +0,2 @@

define(["require", "exports", "./numerictextbox/index", "./input/index"], function (require, exports, index_1, index_2) {
define(["require", "exports", "./numerictextbox/index", "./input/index", "./form-validator/index"], function (require, exports, index_1, index_2, index_3) {
"use strict";

@@ -9,2 +9,3 @@ function __export(m) {

__export(index_2);
__export(index_3);
});

@@ -239,5 +239,4 @@ import { Component, EmitType } from '@syncfusion/ej2-base';

/**
* Prepares the NumericTextBox for safe removal from the DOM.
* Detaches all event handlers, attributes, and classes to avoid memory leaks.
* > This method does not remove the NumericTextBox input element from the DOM.
* Removes the component from the DOM and detaches all its related event handlers.
* Also it maintains the initial input element from the DOM.
* @method destroy

@@ -244,0 +243,0 @@ * @return {void}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc