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.17 to 1.0.18

4

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

@@ -11,2 +11,2 @@ * 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.element.value=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();this.element.value=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value),s.attributes(this.element,{"aria-valuenow":e}),this.hiddenInput.value=e}else this.element.value="",this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},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.element.value=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){if(this.isPrevFocused){if(e.preventDefault(),n.Browser.isDevice){var t=this.element.value;this.element.focus(),this.isPrevFocused=!1;var i=this.element;setTimeout(function(){i.value=t},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),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(C(e.buttons[s],t.container));return t=u(e,t),A=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)),n.attributes(e.element,{required:"true"}),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":y(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":b(e.properties.placeholder,e.element);break;case"readonly":E(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){n.attributes(e,{required:""});var s=n.createElement("span",{className:i.CLEARICON});return t.appendChild(s),!n.isNullOrUndefined(A.container)&&A.container.classList.contains(i.FLOATINPUT)&&n.addClass([A.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,i){n.isNullOrUndefined(i)||""===i||n.removeClass(t,i),n.isNullOrUndefined(e)||""===e||n.addClass(t,e)}function b(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 E(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,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 N(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 P(e,t,s){var r=n.closest(e,"."+i.INPUTGROUP);if("Never"!==t){var a={element:e,floatLabelType:t,properties:{placeholder:s}},o=r.querySelector(".e-clear-icon"),u={container:r};if(e.classList.remove(i.INPUT),l(a,u),n.isNullOrUndefined(o)&&(o=r.querySelector(".e-input-group-icon")),n.isNullOrUndefined(o))r.classList.remove(i.INPUTGROUP);else{var c=r.querySelector("."+i.FLOATLINE),h=r.querySelector("."+i.FLOATTEXT);r.insertBefore(e,o),r.insertBefore(c,o),r.insertBefore(h,o)}}}function C(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 A={container:null,buttons:[],clearButton:null};e.createInput=t,e.setCssClass=y,e.setPlaceholder=b,e.setReadonly=E,e.setEnableRtl=L,e.setEnabled=O,e.removeAttributes=T,e.addAttributes=g,e.removeFloating=N,e.addFloating=P,e.appendSpan=C}(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 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)}])});

@@ -106,3 +106,2 @@ import { createElement, attributes, addClass, removeClass, detach, classList, closest, isNullOrUndefined } from '@syncfusion/ej2-base';

}
attributes(args.element, { 'required': 'true' });
floatLinelement = createElement('span', { className: CLASSNAMES.FLOATLINE });

@@ -196,3 +195,2 @@ floatLabelElement = createElement('label', { className: CLASSNAMES.FLOATTEXT });

function createClearButton(element, container) {
attributes(element, { 'required': '' });
var button = createElement('span', { className: CLASSNAMES.CLEARICON });

@@ -247,2 +245,19 @@ container.appendChild(button);

}
function setValue(value, element, floatLabelType, clearButton) {
element.value = value;
if ((!isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
validateLabel(element, floatLabelType);
}
if (!isNullOrUndefined(clearButton) && clearButton) {
var parentElement = getParentNode(element);
var button = parentElement.getElementsByClassName(CLASSNAMES.CLEARICON)[0];
if (element.value && parentElement.classList.contains('e-input-focus')) {
removeClass([button], CLASSNAMES.CLEARICONHIDE);
}
else {
addClass([button], CLASSNAMES.CLEARICONHIDE);
}
}
}
Input.setValue = setValue;
function setCssClass(cssClass, elements, oldClass) {

@@ -378,3 +393,5 @@ if (!isNullOrUndefined(oldClass) && oldClass !== '') {

if (type !== 'Never') {
var args = { element: input, floatLabelType: type, properties: { placeholder: placeholder } };
var customTag = container.tagName;
customTag = customTag !== 'DIV' && customTag !== 'SPAN' ? customTag : null;
var args = { element: input, floatLabelType: type, customTag: customTag, properties: { placeholder: placeholder } };
var iconEle = container.querySelector('.e-clear-icon');

@@ -381,0 +398,0 @@ var inputObj = { container: container };

@@ -277,3 +277,3 @@ var __extends = (this && this.__extends) || (function () {

if (!_this.numericRegex().test(_this.element.value)) {
_this.element.value = beforeUpdate;
_this.setElementValue(beforeUpdate);
}

@@ -362,3 +362,4 @@ });

var value = this.formatNumber();
this.element.value = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
var elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
this.setElementValue(elementValue);
attributes(this.element, { 'aria-valuenow': value });

@@ -368,3 +369,3 @@ this.hiddenInput.value = value;

else {
this.element.value = '';
this.setElementValue('');
this.element.removeAttribute('aria-valuenow');

@@ -375,2 +376,5 @@ this.hiddenInput.value = null;

;
NumericTextBox.prototype.setElementValue = function (val, element) {
Input.setValue(val, (element ? element : this.element), this.floatLabelType);
};
NumericTextBox.prototype.validateState = function () {

@@ -482,3 +486,3 @@ this.isValidState = true;

var formatValue = this.formatNumber();
this.element.value = formatValue;
this.setElementValue(formatValue);
if (!this.isPrevFocused) {

@@ -494,2 +498,3 @@ this.element.setSelectionRange(0, formatValue.length);

NumericTextBox.prototype.focusOut = function (event) {
var _this = this;
if (this.isPrevFocused) {

@@ -503,3 +508,3 @@ event.preventDefault();

setTimeout(function () {
ele_1.value = value_1;
_this.setElementValue(value_1, ele_1);
}, 200);

@@ -506,0 +511,0 @@ }

{
"name": "@syncfusion/ej2-inputs",
"version": "1.0.17",
"version": "1.0.18",
"description": "Essential JS 2 Input Components",

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

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

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

@@ -18,2 +18,13 @@ /**

/**
* Sets the value to the input element.
* ```
* E.g : Input.setValue('content', element, "Auto", true );
* ```
* @param value - Specify the value of the input element.
* @param element - The element on which the specified value is updated.
* @param floatLabelType - Specify the float label type of the input element.
* @param clearButton - Boolean value to specify whether the clear icon is enabled / disabled on the input.
*/
function setValue(value: string, element: HTMLInputElement, floatLabelType?: string, clearButton?: boolean): void;
/**
* Sets the single or multiple cssClass to wrapper of input element.

@@ -20,0 +31,0 @@ * ```

@@ -108,3 +108,2 @@ define(["require", "exports", "@syncfusion/ej2-base"], function (require, exports, ej2_base_1) {

}
ej2_base_1.attributes(args.element, { 'required': 'true' });
floatLinelement = ej2_base_1.createElement('span', { className: CLASSNAMES.FLOATLINE });

@@ -198,3 +197,2 @@ floatLabelElement = ej2_base_1.createElement('label', { className: CLASSNAMES.FLOATTEXT });

function createClearButton(element, container) {
ej2_base_1.attributes(element, { 'required': '' });
var button = ej2_base_1.createElement('span', { className: CLASSNAMES.CLEARICON });

@@ -249,2 +247,19 @@ container.appendChild(button);

}
function setValue(value, element, floatLabelType, clearButton) {
element.value = value;
if ((!ej2_base_1.isNullOrUndefined(floatLabelType)) && floatLabelType === 'Auto') {
validateLabel(element, floatLabelType);
}
if (!ej2_base_1.isNullOrUndefined(clearButton) && clearButton) {
var parentElement = getParentNode(element);
var button = parentElement.getElementsByClassName(CLASSNAMES.CLEARICON)[0];
if (element.value && parentElement.classList.contains('e-input-focus')) {
ej2_base_1.removeClass([button], CLASSNAMES.CLEARICONHIDE);
}
else {
ej2_base_1.addClass([button], CLASSNAMES.CLEARICONHIDE);
}
}
}
Input.setValue = setValue;
function setCssClass(cssClass, elements, oldClass) {

@@ -380,3 +395,5 @@ if (!ej2_base_1.isNullOrUndefined(oldClass) && oldClass !== '') {

if (type !== 'Never') {
var args = { element: input, floatLabelType: type, properties: { placeholder: placeholder } };
var customTag = container.tagName;
customTag = customTag !== 'DIV' && customTag !== 'SPAN' ? customTag : null;
var args = { element: input, floatLabelType: type, customTag: customTag, properties: { placeholder: placeholder } };
var iconEle = container.querySelector('.e-clear-icon');

@@ -383,0 +400,0 @@ var inputObj = { container: container };

@@ -67,3 +67,3 @@ import{NumericTextBox} from "./numerictextbox";

/**
* Overrides the global culture and localization value for this component. Default Global culture is 'en-US'
* Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
*/

@@ -70,0 +70,0 @@ locale(value:string): BuilderProperties;

@@ -210,2 +210,3 @@ import { Component, EmitType } from '@syncfusion/ej2-base';

private modifyText();
private setElementValue(val, element?);
private validateState();

@@ -212,0 +213,0 @@ private formatNumber();

@@ -274,3 +274,3 @@ var __extends = (this && this.__extends) || (function () {

if (!_this.numericRegex().test(_this.element.value)) {
_this.element.value = beforeUpdate;
_this.setElementValue(beforeUpdate);
}

@@ -359,3 +359,4 @@ });

var value = this.formatNumber();
this.element.value = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
var elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
this.setElementValue(elementValue);
ej2_base_3.attributes(this.element, { 'aria-valuenow': value });

@@ -365,3 +366,3 @@ this.hiddenInput.value = value;

else {
this.element.value = '';
this.setElementValue('');
this.element.removeAttribute('aria-valuenow');

@@ -372,2 +373,5 @@ this.hiddenInput.value = null;

;
NumericTextBox.prototype.setElementValue = function (val, element) {
input_1.Input.setValue(val, (element ? element : this.element), this.floatLabelType);
};
NumericTextBox.prototype.validateState = function () {

@@ -479,3 +483,3 @@ this.isValidState = true;

var formatValue = this.formatNumber();
this.element.value = formatValue;
this.setElementValue(formatValue);
if (!this.isPrevFocused) {

@@ -491,2 +495,3 @@ this.element.setSelectionRange(0, formatValue.length);

NumericTextBox.prototype.focusOut = function (event) {
var _this = this;
if (this.isPrevFocused) {

@@ -500,3 +505,3 @@ event.preventDefault();

setTimeout(function () {
ele_1.value = value_1;
_this.setElementValue(value_1, ele_1);
}, 200);

@@ -503,0 +508,0 @@ }

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

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

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

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